From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 00:32:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18F7EAC0; Sun, 13 Jan 2013 00:32:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0B171F6C; Sun, 13 Jan 2013 00:32:08 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D0W7K3030056; Sun, 13 Jan 2013 00:32:07 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D0W7Em030055; Sun, 13 Jan 2013 00:32:07 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201301130032.r0D0W7Em030055@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 13 Jan 2013 00:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245351 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 00:32:08 -0000 Author: mjg Date: Sun Jan 13 00:32:07 2013 New Revision: 245351 URL: http://svnweb.freebsd.org/changeset/base/245351 Log: MFC r245113: lockmgr: unlock interlock (if requested) when dealing with upgrade/downgrade requests for LK_NOSHARE locks, just like for shared locks. PR: kern/174969 Modified: stable/9/sys/kern/kern_lock.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_lock.c ============================================================================== --- stable/9/sys/kern/kern_lock.c Sat Jan 12 23:49:11 2013 (r245350) +++ stable/9/sys/kern/kern_lock.c Sun Jan 13 00:32:07 2013 (r245351) @@ -489,6 +489,8 @@ __lockmgr_args(struct lock *lk, u_int fl case LK_DOWNGRADE: _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line); + if (flags & LK_INTERLOCK) + class->lc_unlock(ilk); return (0); } } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 00:46:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B3BC2CA6; Sun, 13 Jan 2013 00:46:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 99C52FAC; Sun, 13 Jan 2013 00:46:39 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D0kdMf033253; Sun, 13 Jan 2013 00:46:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D0kdEn033252; Sun, 13 Jan 2013 00:46:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301130046.r0D0kdEn033252@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 Jan 2013 00:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245352 - stable/9/sys/fs/nullfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 00:46:39 -0000 Author: kib Date: Sun Jan 13 00:46:39 2013 New Revision: 245352 URL: http://svnweb.freebsd.org/changeset/base/245352 Log: MFC r245262: When nullfs mount is forcibly unmounted and nullfs vnode is reclaimed, get back the leased write reference from the lower vnode. There is no other path which can correct v_writecount on the lowervp. Modified: stable/9/sys/fs/nullfs/null_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vnops.c Sun Jan 13 00:32:07 2013 (r245351) +++ stable/9/sys/fs/nullfs/null_vnops.c Sun Jan 13 00:46:39 2013 (r245352) @@ -725,6 +725,14 @@ null_reclaim(struct vop_reclaim_args *ap vp->v_object = NULL; vp->v_vnlock = &vp->v_lock; VI_UNLOCK(vp); + + /* + * If we were opened for write, we leased one write reference + * to the lower vnode. If this is a reclamation due to the + * forced unmount, undo the reference now. + */ + if (vp->v_writecount > 0) + VOP_ADD_WRITECOUNT(lowervp, -1); vput(lowervp); free(xp, M_NULLFSNODE); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 00:55:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 50236EE9; Sun, 13 Jan 2013 00:55:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 29654FE5; Sun, 13 Jan 2013 00:55:32 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D0tWHW035943; Sun, 13 Jan 2013 00:55:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D0tV2x035938; Sun, 13 Jan 2013 00:55:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301130055.r0D0tV2x035938@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 Jan 2013 00:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245353 - stable/9/sys/fs/nullfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 00:55:32 -0000 Author: kib Date: Sun Jan 13 00:55:30 2013 New Revision: 245353 URL: http://svnweb.freebsd.org/changeset/base/245353 Log: MFC r245004: Add the "nocache" nullfs mount option. MFC r245033: Fix reversed condition in the assertion. Modified: stable/9/sys/fs/nullfs/null.h stable/9/sys/fs/nullfs/null_subr.c stable/9/sys/fs/nullfs/null_vfsops.c stable/9/sys/fs/nullfs/null_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nullfs/null.h ============================================================================== --- stable/9/sys/fs/nullfs/null.h Sun Jan 13 00:46:39 2013 (r245352) +++ stable/9/sys/fs/nullfs/null.h Sun Jan 13 00:55:30 2013 (r245353) @@ -34,9 +34,15 @@ * $FreeBSD$ */ +#ifndef FS_NULL_H +#define FS_NULL_H + +#define NULLM_CACHE 0x0001 + struct null_mount { struct mount *nullm_vfs; struct vnode *nullm_rootvp; /* Reference to root null_node */ + uint64_t nullm_flags; }; #ifdef _KERNEL @@ -80,3 +86,5 @@ MALLOC_DECLARE(M_NULLFSNODE); #endif /* NULLFS_DEBUG */ #endif /* _KERNEL */ + +#endif Modified: stable/9/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/9/sys/fs/nullfs/null_subr.c Sun Jan 13 00:46:39 2013 (r245352) +++ stable/9/sys/fs/nullfs/null_subr.c Sun Jan 13 00:55:30 2013 (r245353) @@ -224,6 +224,9 @@ null_nodeget(mp, lowervp, vpp) * provide ready to use vnode. */ if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) { + KASSERT((MOUNTTONULLMOUNT(mp)->nullm_flags & NULLM_CACHE) != 0, + ("lowervp %p is not excl locked and cache is disabled", + lowervp)); vn_lock(lowervp, LK_UPGRADE | LK_RETRY); if ((lowervp->v_iflag & VI_DOOMED) != 0) { vput(lowervp); Modified: stable/9/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vfsops.c Sun Jan 13 00:46:39 2013 (r245352) +++ stable/9/sys/fs/nullfs/null_vfsops.c Sun Jan 13 00:55:30 2013 (r245353) @@ -67,6 +67,15 @@ static vfs_vget_t nullfs_vget; static vfs_extattrctl_t nullfs_extattrctl; static vfs_reclaim_lowervp_t nullfs_reclaim_lowervp; +/* Mount options that we support. */ +static const char *nullfs_opts[] = { + "cache", + "export", + "from", + "target", + NULL +}; + /* * Mount null layer */ @@ -86,9 +95,11 @@ nullfs_mount(struct mount *mp) if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_NULLFS)) return (EPERM); - if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); + if (vfs_filteropt(mp->mnt_optnew, nullfs_opts)) + return (EINVAL); + /* * Update is a no-op */ @@ -149,7 +160,7 @@ nullfs_mount(struct mount *mp) } xmp = (struct null_mount *) malloc(sizeof(struct null_mount), - M_NULLFSMNT, M_WAITOK); + M_NULLFSMNT, M_WAITOK | M_ZERO); /* * Save reference to underlying FS @@ -187,17 +198,27 @@ nullfs_mount(struct mount *mp) mp->mnt_flag |= MNT_LOCAL; MNT_IUNLOCK(mp); } + + xmp->nullm_flags |= NULLM_CACHE; + if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) + xmp->nullm_flags &= ~NULLM_CACHE; + MNT_ILOCK(mp); - mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & - (MNTK_MPSAFE | MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED); + if ((xmp->nullm_flags & NULLM_CACHE) != 0) { + mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & + (MNTK_MPSAFE | MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | + MNTK_EXTENDED_SHARED); + } mp->mnt_kern_flag |= MNTK_LOOKUP_EXCL_DOTDOT; MNT_IUNLOCK(mp); mp->mnt_data = xmp; vfs_getnewfsid(mp); - MNT_ILOCK(xmp->nullm_vfs); - TAILQ_INSERT_TAIL(&xmp->nullm_vfs->mnt_uppers, mp, mnt_upper_link); - MNT_IUNLOCK(xmp->nullm_vfs); + if ((xmp->nullm_flags & NULLM_CACHE) != 0) { + MNT_ILOCK(xmp->nullm_vfs); + TAILQ_INSERT_TAIL(&xmp->nullm_vfs->mnt_uppers, mp, + mnt_upper_link); + MNT_IUNLOCK(xmp->nullm_vfs); + } vfs_mountedfrom(mp, target); @@ -235,13 +256,15 @@ nullfs_unmount(mp, mntflags) */ mntdata = mp->mnt_data; ump = mntdata->nullm_vfs; - MNT_ILOCK(ump); - while ((ump->mnt_kern_flag & MNTK_VGONE_UPPER) != 0) { - ump->mnt_kern_flag |= MNTK_VGONE_WAITER; - msleep(&ump->mnt_uppers, &ump->mnt_mtx, 0, "vgnupw", 0); + if ((mntdata->nullm_flags & NULLM_CACHE) != 0) { + MNT_ILOCK(ump); + while ((ump->mnt_kern_flag & MNTK_VGONE_UPPER) != 0) { + ump->mnt_kern_flag |= MNTK_VGONE_WAITER; + msleep(&ump->mnt_uppers, &ump->mnt_mtx, 0, "vgnupw", 0); + } + TAILQ_REMOVE(&ump->mnt_uppers, mp, mnt_upper_link); + MNT_IUNLOCK(ump); } - TAILQ_REMOVE(&ump->mnt_uppers, mp, mnt_upper_link); - MNT_IUNLOCK(ump); mp->mnt_data = NULL; free(mntdata, M_NULLFSMNT); return (0); Modified: stable/9/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vnops.c Sun Jan 13 00:46:39 2013 (r245352) +++ stable/9/sys/fs/nullfs/null_vnops.c Sun Jan 13 00:55:30 2013 (r245353) @@ -692,7 +692,22 @@ null_unlock(struct vop_unlock_args *ap) static int null_inactive(struct vop_inactive_args *ap __unused) { + struct vnode *vp; + struct mount *mp; + struct null_mount *xmp; + vp = ap->a_vp; + mp = vp->v_mount; + xmp = MOUNTTONULLMOUNT(mp); + if ((xmp->nullm_flags & NULLM_CACHE) == 0) { + /* + * If this is the last reference and caching of the + * nullfs vnodes is not enabled, then free up the + * vnode so as not to tie up the lower vnodes. + */ + vp->v_object = NULL; + vrecycle(vp, curthread); + } return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 00:58:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 87800EC; Sun, 13 Jan 2013 00:58:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 479A0FF8; Sun, 13 Jan 2013 00:58:03 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D0w36O036286; Sun, 13 Jan 2013 00:58:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D0w3sw036285; Sun, 13 Jan 2013 00:58:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301130058.r0D0w3sw036285@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 Jan 2013 00:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245354 - stable/9/sbin/mount_nullfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 00:58:03 -0000 Author: kib Date: Sun Jan 13 00:58:02 2013 New Revision: 245354 URL: http://svnweb.freebsd.org/changeset/base/245354 Log: MFC r245005: Allow to specify "cache" and "nocache" as an option for mount_nullfs(8). Modified: stable/9/sbin/mount_nullfs/mount_nullfs.c Directory Properties: stable/9/sbin/mount_nullfs/ (props changed) Modified: stable/9/sbin/mount_nullfs/mount_nullfs.c ============================================================================== --- stable/9/sbin/mount_nullfs/mount_nullfs.c Sun Jan 13 00:55:30 2013 (r245353) +++ stable/9/sbin/mount_nullfs/mount_nullfs.c Sun Jan 13 00:58:02 2013 (r245354) @@ -57,27 +57,35 @@ static const char rcsid[] = #include "mntopts.h" -struct mntopt mopts[] = { - MOPT_STDOPTS, - MOPT_END -}; - int subdir(const char *, const char *); static void usage(void) __dead2; int main(int argc, char *argv[]) { - struct iovec iov[6]; - int ch, mntflags; + struct iovec *iov; + char *p, *val; char source[MAXPATHLEN]; char target[MAXPATHLEN]; + char errmsg[255]; + int ch, mntflags, iovlen; + char nullfs[] = "nullfs"; + iov = NULL; + iovlen = 0; mntflags = 0; + errmsg[0] = '\0'; while ((ch = getopt(argc, argv, "o:")) != -1) switch(ch) { case 'o': - getmntopts(optarg, mopts, &mntflags, 0); + val = strdup(""); + p = strchr(optarg, '='); + if (p != NULL) { + free(val); + *p = '\0'; + val = p + 1; + } + build_iovec(&iov, &iovlen, optarg, val, (size_t)-1); break; case '?': default: @@ -97,21 +105,16 @@ main(int argc, char *argv[]) errx(EX_USAGE, "%s (%s) and %s are not distinct paths", argv[0], target, argv[1]); - iov[0].iov_base = strdup("fstype"); - iov[0].iov_len = sizeof("fstype"); - iov[1].iov_base = strdup("nullfs"); - iov[1].iov_len = strlen(iov[1].iov_base) + 1; - iov[2].iov_base = strdup("fspath"); - iov[2].iov_len = sizeof("fspath"); - iov[3].iov_base = source; - iov[3].iov_len = strlen(source) + 1; - iov[4].iov_base = strdup("target"); - iov[4].iov_len = sizeof("target"); - iov[5].iov_base = target; - iov[5].iov_len = strlen(target) + 1; - - if (nmount(iov, 6, mntflags)) - err(1, NULL); + build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1); + build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); + build_iovec(&iov, &iovlen, "target", target, (size_t)-1); + build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); + if (nmount(iov, iovlen, mntflags) < 0) { + if (errmsg[0] != 0) + err(1, "%s: %s", source, errmsg); + else + err(1, "%s", source); + } exit(0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 01:26:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9CFAE87D; Sun, 13 Jan 2013 01:26:51 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8E579125; Sun, 13 Jan 2013 01:26:51 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D1Qp5X045321; Sun, 13 Jan 2013 01:26:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D1QpUd045320; Sun, 13 Jan 2013 01:26:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201301130126.r0D1QpUd045320@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 13 Jan 2013 01:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245356 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 01:26:51 -0000 Author: pfg Date: Sun Jan 13 01:26:50 2013 New Revision: 245356 URL: http://svnweb.freebsd.org/changeset/base/245356 Log: ext2fs: cleanup the dinode structure. It was plagued with style errors and the offsets had been lost. While here took the time to update the fields according to the latest ext4 documentation. Reviewed by: bde Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dinode.h Sun Jan 13 01:22:40 2013 (r245355) +++ stable/9/sys/fs/ext2fs/ext2_dinode.h Sun Jan 13 01:26:50 2013 (r245356) @@ -29,8 +29,6 @@ #ifndef _FS_EXT2FS_EXT2_DINODE_H_ #define _FS_EXT2FS_EXT2_DINODE_H_ -#define e2di_size_high e2di_dacl - /* * Special inode numbers * The root inode is the root of the file system. Inode 0 can't be used for @@ -87,11 +85,11 @@ struct ext2fs_dinode { uint16_t e2di_mode; /* 0: IFMT, permissions; see below. */ uint16_t e2di_uid; /* 2: Owner UID */ - uint32_t e2di_size; /* 4: Size (in bytes) */ - uint32_t e2di_atime; /* 8: Access time */ - uint32_t e2di_ctime; /* 12: Change time */ - uint32_t e2di_mtime; /* 16: Modification time */ - uint32_t e2di_dtime; /* 20: Deletion time */ + uint32_t e2di_size; /* 4: Size (in bytes) */ + uint32_t e2di_atime; /* 8: Access time */ + uint32_t e2di_ctime; /* 12: Change time */ + uint32_t e2di_mtime; /* 16: Modification time */ + uint32_t e2di_dtime; /* 20: Deletion time */ uint16_t e2di_gid; /* 24: Owner GID */ uint16_t e2di_nlink; /* 26: File link count */ uint32_t e2di_nblock; /* 28: Blocks count */ @@ -99,22 +97,23 @@ struct ext2fs_dinode { uint32_t e2di_version; /* 36: Low 32 bits inode version */ uint32_t e2di_blocks[EXT2_N_BLOCKS]; /* 40: disk blocks */ uint32_t e2di_gen; /* 100: generation number */ - uint32_t e2di_facl; /* 104: file ACL (not implemented) */ - uint32_t e2di_dacl; /* 108: dir ACL (not implemented) */ - uint32_t e2di_faddr; /* 112: fragment address */ + uint32_t e2di_facl; /* 104: Low EA block */ + uint32_t e2di_size_high; /* 108: Upper bits of file size */ + uint32_t e2di_faddr; /* 112: Fragment address (obsolete) */ uint16_t e2di_nblock_high; /* 116: Blocks count bits 47:32 */ - uint16_t e2di_facl_high; /* 118: file ACL bits 47:32 */ + uint16_t e2di_facl_high; /* 118: File EA bits 47:32 */ uint16_t e2di_uid_high; /* 120: Owner UID top 16 bits */ uint16_t e2di_gid_high; /* 122: Owner GID top 16 bits */ - uint32_t e2di_linux_reserved3; /* 124 */ - uint16_t e2di_extra_isize; - uint16_t e2di_pad1; - uint32_t e2di_ctime_extra; /* Extra change time */ - uint32_t e2di_mtime_extra; /* Extra modification time */ - uint32_t e2di_atime_extra; /* Extra access time */ - uint32_t e2di_crtime; /* Creation (birth)time */ - uint32_t e2di_crtime_extra; /* Extra creation (birth)time */ - uint32_t e2di_version_hi; /* High 30 bits of inode version */ + uint16_t e2di_chksum_lo; /* 124: Lower inode checksum */ + uint16_t e2di_lx_reserved; /* 126: Unused */ + uint16_t e2di_extra_isize; /* 128: Size of this inode */ + uint16_t e2di_chksum_hi; /* 130: High inode checksum */ + uint32_t e2di_ctime_extra; /* 132: Extra change time */ + uint32_t e2di_mtime_extra; /* 136: Extra modification time */ + uint32_t e2di_atime_extra; /* 140: Extra access time */ + uint32_t e2di_crtime; /* 144: Creation (birth)time */ + uint32_t e2di_crtime_extra; /* 148: Extra creation (birth)time */ + uint32_t e2di_version_hi; /* 152: High bits of inode version */ }; #endif /* !_FS_EXT2FS_EXT2_DINODE_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 03:32:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 739EB12F; Sun, 13 Jan 2013 03:32:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by mx1.freebsd.org (Postfix) with ESMTP id 48E8C637; Sun, 13 Jan 2013 03:32:48 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id x10so1492768wey.5 for ; Sat, 12 Jan 2013 19:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=lCBAz13WFsabfAqfXtgIO0i8yXz6sLJj3nK1o66fi34=; b=IC+369ljYjOVdEBVnVC57A9Hc5uNgUWhao2zo2bF23eCXHo6vTdr2GffT/IFPLkbX+ t8qFnwj3+TM3pYOh8XZZFU9rwaSefR7/YbvqGxHdQlboe2Fl57qyZEz5FrcPAg96EjEr Ucb6nZDdVLJBhoQxhEMRt/A3HFefkMFZnXc8b/PlYArqzGrll1TKg6HGfrALX30PLV1U K1i5e4DSoDjVjJd2z5wFg5wcLGqnAMvsVCdN7KK+R8yO5ODPLk9tTjgbkTYBpLkRdjwQ qb4PErzAVRl0nf8A0yx2dp9szCfKgTb068VRUVduULfiVxLvLlhG3zCc9QpJkiTUhqii WTcA== MIME-Version: 1.0 X-Received: by 10.180.33.44 with SMTP id o12mr6249141wii.28.1358047968150; Sat, 12 Jan 2013 19:32:48 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Sat, 12 Jan 2013 19:32:48 -0800 (PST) In-Reply-To: <50F1BD69.4060104@mu.org> References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> Date: Sat, 12 Jan 2013 19:32:48 -0800 X-Google-Sender-Auth: 52LCZPns2O474AuVy9F2QvuVIaA Message-ID: Subject: Re: svn commit: r243631 - in head/sys: kern sys From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, Andre Oppermann , Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 03:32:50 -0000 On 12 January 2013 11:45, Alfred Perlstein wrote: > I'm not sure if regressing to the waterfall method of development is a good > idea at this point. > > I see a light at the end of the tunnel and we to continue to just handle > these minor corner cases as we progress. > > If we move to a model where a minor bug is grounds to completely remove > helpful code then nothing will ever get done. > Allocating 512MB worth of callwheels on a 16GB MIPS machine is a little silly, don't you think? That suggests to me that the extent of which maxfiles/maxusers/etc percolates the codebase wasn't totally understood by those who wish to change it. I'd rather see some more investigative work into outlining things that need fixing and start fixing those, rather than "just change stuff and fix whatever issues creep up." I kinda hope we all understand what we're working on in the kernel a little better than that. Adrian From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 04:13:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 729EB585; Sun, 13 Jan 2013 04:13:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4A11B6D8; Sun, 13 Jan 2013 04:13:15 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D4DFtg095519; Sun, 13 Jan 2013 04:13:15 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D4DEgT095516; Sun, 13 Jan 2013 04:13:14 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201301130413.r0D4DEgT095516@svn.freebsd.org> From: Mark Johnston Date: Sun, 13 Jan 2013 04:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245357 - in stable/8/sys/dev/usb: . quirk X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 04:13:15 -0000 Author: markj Date: Sun Jan 13 04:13:14 2013 New Revision: 245357 URL: http://svnweb.freebsd.org/changeset/base/245357 Log: MFC r244719: Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they typically do not handle the SYNCHRONIZE_CACHE command - they either return an error or the firmware enters a reset loop. Approved by: rstone (co-mentor) 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/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Jan 13 01:26:50 2013 (r245356) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Jan 13 04:13:14 2013 (r245357) @@ -467,6 +467,7 @@ static struct usb_quirk_entry usb_quirks * after issuing non-supported commands: */ USB_QUIRK(ALCOR, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY, UQ_MATCH_VENDOR_ONLY), + USB_QUIRK(APPLE, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Jan 13 01:26:50 2013 (r245356) +++ stable/8/sys/dev/usb/usbdevs Sun Jan 13 04:13:14 2013 (r245357) @@ -1050,6 +1050,7 @@ product AOX USB101 0x0008 Ethernet product APC UPS 0x0002 Uninterruptible Power Supply /* Apple Computer products */ +product APPLE DUMMY 0x0000 Dummy product product APPLE IMAC_KBD 0x0201 USB iMac Keyboard product APPLE KBD 0x0202 USB Keyboard M2452 product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 04:13:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B652B6F3; Sun, 13 Jan 2013 04:13:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8D72C6E1; Sun, 13 Jan 2013 04:13:46 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D4Dk6c095634; Sun, 13 Jan 2013 04:13:46 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D4DkXX095632; Sun, 13 Jan 2013 04:13:46 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201301130413.r0D4DkXX095632@svn.freebsd.org> From: Mark Johnston Date: Sun, 13 Jan 2013 04:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245358 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 04:13:46 -0000 Author: markj Date: Sun Jan 13 04:13:45 2013 New Revision: 245358 URL: http://svnweb.freebsd.org/changeset/base/245358 Log: MFC r244719: Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they typically do not handle the SYNCHRONIZE_CACHE command - they either return an error or the firmware enters a reset loop. Approved by: rstone (co-mentor) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Sun Jan 13 04:13:14 2013 (r245357) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Sun Jan 13 04:13:45 2013 (r245358) @@ -480,6 +480,7 @@ static struct usb_quirk_entry usb_quirks * after issuing non-supported commands: */ USB_QUIRK(ALCOR, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY, UQ_MATCH_VENDOR_ONLY), + USB_QUIRK(APPLE, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sun Jan 13 04:13:14 2013 (r245357) +++ stable/9/sys/dev/usb/usbdevs Sun Jan 13 04:13:45 2013 (r245358) @@ -1049,6 +1049,7 @@ product AOX USB101 0x0008 Ethernet product APC UPS 0x0002 Uninterruptible Power Supply /* Apple Computer products */ +product APPLE DUMMY 0x0000 Dummy product product APPLE IMAC_KBD 0x0201 USB iMac Keyboard product APPLE KBD 0x0202 USB Keyboard M2452 product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 04:14:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AEDF9862; Sun, 13 Jan 2013 04:14:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 888246E9; Sun, 13 Jan 2013 04:14:31 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D4EVmb095790; Sun, 13 Jan 2013 04:14:31 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D4EV4E095788; Sun, 13 Jan 2013 04:14:31 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201301130414.r0D4EV4E095788@svn.freebsd.org> From: Mark Johnston Date: Sun, 13 Jan 2013 04:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245359 - stable/8/usr.sbin/newsyslog X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 04:14:31 -0000 Author: markj Date: Sun Jan 13 04:14:30 2013 New Revision: 245359 URL: http://svnweb.freebsd.org/changeset/base/245359 Log: MFC r244995 r244996 r244997. MFC r244995: Fix a typo in an error message. MFC r244996: Have -n imply -r, since dry-run mode obviously doesn't require root privileges. MFC r244997: Make sure to update the mtime of a logfile after archiving it. This ensures that the next rotation happens at the correct time when using interval-based rotations. Approved by: rstone (co-mentor) Modified: stable/8/usr.sbin/newsyslog/newsyslog.8 stable/8/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/8/usr.sbin/newsyslog/ (props changed) Modified: stable/8/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.8 Sun Jan 13 04:13:45 2013 (r245358) +++ stable/8/usr.sbin/newsyslog/newsyslog.8 Sun Jan 13 04:14:30 2013 (r245359) @@ -126,7 +126,9 @@ reasons for either trimming that log or Cause .Nm not to trim the logs, but to print out what it would do if this option -were not specified. +were not specified. This option implies the +.Fl r +option. .It Fl r Remove the restriction that .Nm Modified: stable/8/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.c Sun Jan 13 04:13:45 2013 (r245358) +++ stable/8/usr.sbin/newsyslog/newsyslog.c Sun Jan 13 04:14:30 2013 (r245359) @@ -639,7 +639,7 @@ parse_args(int argc, char **argv) break; case 'n': noaction++; - break; + /* FALLTHROUGH */ case 'r': needroot = 0; break; @@ -1576,7 +1576,7 @@ delete_oldest_timelog(const struct conf_ oldlogs[i].fname); else if (unlinkat(dirfd, oldlogs[i].fname, 0) != 0) { snprintf(errbuf, sizeof(errbuf), - "Could not delet old logfile '%s'", + "Could not delete old logfile '%s'", oldlogs[i].fname); perror(errbuf); } @@ -1778,12 +1778,21 @@ do_rotate(const struct conf_entry *ent) printf("\tcp %s %s\n", ent->log, file1); else printf("\tln %s %s\n", ent->log, file1); + printf("\ttouch %s\t\t" + "# Update mtime for 'when'-interval processing\n", + file1); } else { if (!(flags & CE_BINARY)) { /* Report the trimming to the old log */ log_trim(ent->log, ent); } savelog(ent->log, file1); + /* + * Interval-based rotations are done using the mtime of + * the most recently archived log, so make sure it gets + * updated during a rotation. + */ + utimes(file1, NULL); } change_attrs(file1, ent); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 04:14:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 014509BF; Sun, 13 Jan 2013 04:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C66896EE; Sun, 13 Jan 2013 04:14:46 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D4EkZi095860; Sun, 13 Jan 2013 04:14:46 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D4EkU7095856; Sun, 13 Jan 2013 04:14:46 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201301130414.r0D4EkU7095856@svn.freebsd.org> From: Mark Johnston Date: Sun, 13 Jan 2013 04:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245360 - stable/9/usr.sbin/newsyslog X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 04:14:47 -0000 Author: markj Date: Sun Jan 13 04:14:46 2013 New Revision: 245360 URL: http://svnweb.freebsd.org/changeset/base/245360 Log: MFC r244995 r244996 r244997. MFC r244995: Fix a typo in an error message. MFC r244996: Have -n imply -r, since dry-run mode obviously doesn't require root privileges. MFC r244997: Make sure to update the mtime of a logfile after archiving it. This ensures that the next rotation happens at the correct time when using interval-based rotations. Approved by: rstone (co-mentor) Modified: stable/9/usr.sbin/newsyslog/newsyslog.8 stable/9/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/9/usr.sbin/newsyslog/ (props changed) Modified: stable/9/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.8 Sun Jan 13 04:14:30 2013 (r245359) +++ stable/9/usr.sbin/newsyslog/newsyslog.8 Sun Jan 13 04:14:46 2013 (r245360) @@ -125,7 +125,9 @@ reasons for either trimming that log or Cause .Nm not to trim the logs, but to print out what it would do if this option -were not specified. +were not specified. This option implies the +.Fl r +option. .It Fl r Remove the restriction that .Nm Modified: stable/9/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.c Sun Jan 13 04:14:30 2013 (r245359) +++ stable/9/usr.sbin/newsyslog/newsyslog.c Sun Jan 13 04:14:46 2013 (r245360) @@ -642,7 +642,7 @@ parse_args(int argc, char **argv) break; case 'n': noaction++; - break; + /* FALLTHROUGH */ case 'r': needroot = 0; break; @@ -1580,7 +1580,7 @@ delete_oldest_timelog(const struct conf_ oldlogs[i].fname); else if (unlinkat(dirfd, oldlogs[i].fname, 0) != 0) { snprintf(errbuf, sizeof(errbuf), - "Could not delet old logfile '%s'", + "Could not delete old logfile '%s'", oldlogs[i].fname); perror(errbuf); } @@ -1812,12 +1812,21 @@ do_rotate(const struct conf_entry *ent) printf("\tcp %s %s\n", ent->log, file1); else printf("\tln %s %s\n", ent->log, file1); + printf("\ttouch %s\t\t" + "# Update mtime for 'when'-interval processing\n", + file1); } else { if (!(flags & CE_BINARY)) { /* Report the trimming to the old log */ log_trim(ent->log, ent); } savelog(ent->log, file1); + /* + * Interval-based rotations are done using the mtime of + * the most recently archived log, so make sure it gets + * updated during a rotation. + */ + utimes(file1, NULL); } change_attrs(file1, ent); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 04:28:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BE006C82; Sun, 13 Jan 2013 04:28:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A0BEF74E; Sun, 13 Jan 2013 04:28:45 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D4SjKa099376; Sun, 13 Jan 2013 04:28:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D4SjdV099375; Sun, 13 Jan 2013 04:28:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301130428.r0D4SjdV099375@svn.freebsd.org> From: Xin LI Date: Sun, 13 Jan 2013 04:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245361 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 04:28:45 -0000 Author: delphij Date: Sun Jan 13 04:28:44 2013 New Revision: 245361 URL: http://svnweb.freebsd.org/changeset/base/245361 Log: Use the right format string for line buffer. PR: bin/174910 Submitted by: Fabian Keil Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Sun Jan 13 04:14:46 2013 (r245360) +++ head/sbin/sysctl/sysctl.c Sun Jan 13 04:28:44 2013 (r245361) @@ -266,7 +266,7 @@ parse(const char *string, int lineno) if (!(kind & CTLFLAG_WR)) { if (kind & CTLFLAG_TUN) { - warnx("oid '%s' is a read only tunable%p", bufp, line); + warnx("oid '%s' is a read only tunable%s", bufp, line); warnx("Tunable values are set in /boot/loader.conf"); } else warnx("oid '%s' is read only%s", bufp, line); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 07:14:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B281D275; Sun, 13 Jan 2013 07:14:18 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 974E89F5; Sun, 13 Jan 2013 07:14:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D7EIUp050198; Sun, 13 Jan 2013 07:14:18 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D7EHfx050184; Sun, 13 Jan 2013 07:14:17 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201301130714.r0D7EHfx050184@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 13 Jan 2013 07:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245362 - in head/sys: amd64/conf conf i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 07:14:18 -0000 Author: bryanv Date: Sun Jan 13 07:14:16 2013 New Revision: 245362 URL: http://svnweb.freebsd.org/changeset/base/245362 Log: Add VirtIO to the i386 and amd64 GENERIC kernels This also removes the kludge from r239009 that covered only the network driver. Reviewed by: grehan Approved by: grehan (mentor) MFC after: 1 week Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/i386/conf/GENERIC head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Jan 13 04:28:44 2013 (r245361) +++ head/sys/amd64/conf/GENERIC Sun Jan 13 07:14:16 2013 (r245362) @@ -332,3 +332,11 @@ device snd_via8233 # VIA VT8233x Audio device mmc # MMC/SD bus device mmcsd # MMC/SD memory card device sdhci # Generic PCI SD Host Controller + +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI device +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Sun Jan 13 04:28:44 2013 (r245361) +++ head/sys/amd64/conf/NOTES Sun Jan 13 07:14:16 2013 (r245362) @@ -440,6 +440,15 @@ device safe # SafeNet 1141 options SAFE_DEBUG # enable debugging support: hw.safe.debug options SAFE_RNDTEST # enable rndtest support +# +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI Interface +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device + ##################################################################### # Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 13 04:28:44 2013 (r245361) +++ head/sys/conf/files Sun Jan 13 07:14:16 2013 (r245362) @@ -2276,15 +2276,6 @@ dev/utopia/idtphy.c optional utopia dev/utopia/suni.c optional utopia dev/utopia/utopia.c optional utopia dev/vge/if_vge.c optional vge -# -# virtio support -# -dev/virtio/pci/virtio_pci.c optional vtnet -dev/virtio/virtio.c optional vtnet -dev/virtio/virtqueue.c optional vtnet -dev/virtio/network/if_vtnet.c optional vtnet -dev/virtio/virtio_bus_if.m optional vtnet -dev/virtio/virtio_if.m optional vtnet dev/vkbd/vkbd.c optional vkbd dev/vr/if_vr.c optional vr pci Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Sun Jan 13 04:28:44 2013 (r245361) +++ head/sys/conf/files.amd64 Sun Jan 13 07:14:16 2013 (r245362) @@ -390,6 +390,15 @@ dev/isci/scil/scif_sas_task_request.c dev/isci/scil/scif_sas_task_request_state_handlers.c optional isci dev/isci/scil/scif_sas_task_request_states.c optional isci dev/isci/scil/scif_sas_timer.c optional isci +dev/virtio/virtio.c optional virtio +dev/virtio/virtqueue.c optional virtio +dev/virtio/virtio_bus_if.m optional virtio +dev/virtio/virtio_if.m optional virtio +dev/virtio/pci/virtio_pci.c optional virtio_pci virtio pci +dev/virtio/network/if_vtnet.c optional vtnet virtio +dev/virtio/block/virtio_blk.c optional virtio_blk virtio +dev/virtio/balloon/virtio_balloon.c optional virtio_balloon virtio +dev/virtio/scsi/virtio_scsi.c optional virtio_scsi virtio scbus isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/kern_clocksource.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Sun Jan 13 04:28:44 2013 (r245361) +++ head/sys/conf/files.i386 Sun Jan 13 07:14:16 2013 (r245362) @@ -371,6 +371,15 @@ dev/isci/scil/scif_sas_task_request.c dev/isci/scil/scif_sas_task_request_state_handlers.c optional isci dev/isci/scil/scif_sas_task_request_states.c optional isci dev/isci/scil/scif_sas_timer.c optional isci +dev/virtio/virtio.c optional virtio +dev/virtio/virtqueue.c optional virtio +dev/virtio/virtio_bus_if.m optional virtio +dev/virtio/virtio_if.m optional virtio +dev/virtio/pci/virtio_pci.c optional virtio_pci virtio pci +dev/virtio/network/if_vtnet.c optional vtnet virtio +dev/virtio/block/virtio_blk.c optional virtio_blk virtio +dev/virtio/balloon/virtio_balloon.c optional virtio_balloon virtio +dev/virtio/scsi/virtio_scsi.c optional virtio_scsi virtio scbus i386/acpica/acpi_machdep.c optional acpi acpi_wakecode.o optional acpi \ dependency "$S/i386/acpica/acpi_wakecode.S assym.s" \ Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Jan 13 04:28:44 2013 (r245361) +++ head/sys/i386/conf/GENERIC Sun Jan 13 07:14:16 2013 (r245362) @@ -346,3 +346,11 @@ device snd_via8233 # VIA VT8233x Audio device mmc # MMC/SD bus device mmcsd # MMC/SD memory card device sdhci # Generic PCI SD Host Controller + +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI device +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Sun Jan 13 04:28:44 2013 (r245361) +++ head/sys/i386/conf/NOTES Sun Jan 13 07:14:16 2013 (r245362) @@ -771,6 +771,15 @@ device glxiic # AMD Geode LX CS5536 Sy # device glxsb # AMD Geode LX Security Block +# +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI Interface +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device + ##################################################################### # From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 10:10:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A78C730B; Sun, 13 Jan 2013 10:10:17 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id 7C37AE71; Sun, 13 Jan 2013 10:10:17 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 81BE34C0245; Sun, 13 Jan 2013 04:10:16 -0600 (CST) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 62F924C026C; Sun, 13 Jan 2013 04:10:16 -0600 (CST) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id YV5ZnCWvqjQm; Sun, 13 Jan 2013 04:10:16 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id B26D84C0245; Sun, 13 Jan 2013 04:10:15 -0600 (CST) Message-ID: <50F28806.10505@rice.edu> Date: Sun, 13 Jan 2013 04:10:14 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Oleksandr Tymoshenko Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> In-Reply-To: <50EB1841.5030006@bluezbox.com> Content-Type: multipart/mixed; boundary="------------060309000103040501070209" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andre Oppermann X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 10:10:17 -0000 This is a multi-part message in MIME format. --------------060309000103040501070209 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 01/07/2013 12:47, Oleksandr Tymoshenko wrote: > On 12/27/2012 6:46 PM, Oleksandr Tymoshenko wrote: >> On 12/18/2012 1:59 AM, Alan Cox wrote: >>> On 12/17/2012 23:40, Oleksandr Tymoshenko wrote: >>>> On 2012-12-08, at 1:21 PM, Alan Cox wrote: >>>> >>>>> On 12/08/2012 14:32, Andre Oppermann wrote: >>>> .. skipped .. >>>> >>>>>> The trouble seems to come from NSFBUFS which is (512 + maxusers * >>>>>> 16) >>>>>> resulting in a kernel map of (512 + 400 * 16) * PAGE_SIZE = >>>>>> 27MB. This >>>>>> seem to be pushing it with the smaller ARM kmap layout. >>>>>> >>>>>> Does it boot and run when you set the tunable kern.ipc.nsfbufs=3500? >>>>>> >>>>>> ARM does have a direct map mode as well which doesn't require the >>>>>> allocation >>>>>> of sfbufs. I'm not sure which other problems that approach has. >>>>>> >>>>> Only a few (3?) platforms use it. It reduces the size of the user >>>>> address space, and translation between physical addresses and >>>>> direct map >>>>> addresses is not computationally trivial as it is on other >>>>> architectures, e.g., amd64, ia64. However, it does try to use large >>>>> page mappings. >>>>> >>>>> >>>>>> Hopefully alc@ (added to cc) can answer that and also why the >>>>>> kmap of >>>>>> 27MB >>>>>> manages to wrench the ARM kernel. >>>>>> >>>>> Arm does not define caps on either the buffer map size (param.h) >>>>> or the >>>>> kmem map size (vmparam.h). It would probably make sense to copy >>>>> these >>>>> definitions from i386. >>>> Adding caps didn't help. I did some digging and found out that >>>> although address range >>>> 0xc0000000 .. 0xffffffff is indeed valid for ARM in general actual >>>> KVA space varies for >>>> each specific hardware platform. This "real" KVA is defined by >>>> >>>> pair and ifI use them instead of >>> VM_MAX_KERNEL_ADDRESS> >>>> in init_param2 function my pandaboard successfully boots. Since >>>> former pair is used for defining >>>> kernel_map boundaries I believe it should be used for auto tuning >>>> as well. >>> >>> That makes sense. However, "virtual_avail" isn't the start of the >>> kernel address space. The kernel map always starts at >>> VM_MIN_KERNEL_ADDRESS. (See kmem_init().) "virtual_avail" represents >>> the next unallocated virtual address in the kernel address space at an >>> early point in initialization. "virtual_avail" and "virtual_end" >>> aren't >>> used after that, or outside the VM system. Please use >>> vm_map_min(kernel_map) and vm_map_max(kernel_map) instead. >> >> I checked: kernel_map is not available (NULL) at this point. So we >> can't use it to >> determine real KVA size. Closest thing we can get is >> virtual_avail/virtual_end pair. >> >> Andre, could you approve attached patch for commit or suggest better >> solution? > > Any update on this one? Can I proceed with commit? > Yes, I've now spent a little bit of time looking at this, and I don't see why these calculations and tunable_mbinit() need to be performed before the kernel map is initialized. Let me summarize what I found: 1. The function tunable_mbinit() now has a dependency on the global variable maxmbufmem. tunable_mbinit() is executed under SI_SUB_TUNABLES. tunable_mbinit() defines the global variable nmbclusters. The statements made in the comment at the head of tunable_mbinit() all appear to be false: /* * tunable_mbinit() has to be run before init_maxsockets() thus * the SYSINIT order below is SI_ORDER_MIDDLE while init_maxsockets() * runs at SI_ORDER_ANY. * * NB: This has to be done before VM init. */ I don't see anything in init_maxsockets() that depends on tunable_mbinit(). Moreover, the statement about "VM init" is only correct if you regard the initialization of the kernel's malloc as "VM init". 2. The function kmeminit() in kern/kern_malloc.c has a dependency on the global variable nmbclusters. kmeminit() is executed under SI_SUB_KMEM, which comes after the initialization of the virtual memory system, including the kernel map. 3. The function vm_ksubmap_init() has a dependency on the global variable maxpipekva. vm_ksubmap_init() is executed under SI_SUB_CPU, which comes after SI_SUB_KMEM. Am I missing anything? I'm attaching a patch that defers the calculation of maxpipekva until we actually need it in vm_ksubmap_init(). Any comments on this patch are welcome. Alan --------------060309000103040501070209 Content-Type: text/plain; charset=ISO-8859-15; name="maxpipekva2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maxpipekva2.patch" Index: kern/subr_param.c =================================================================== --- kern/subr_param.c (revision 245346) +++ kern/subr_param.c (working copy) @@ -97,7 +97,6 @@ quad_t maxmbufmem; /* max mbuf memory */ pid_t pid_max = PID_MAX; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ -long maxpipekva; /* Limit on pipe KVA */ int vm_guest; /* Running as virtual machine guest? */ u_long maxtsiz; /* max text size */ u_long dfldsiz; /* initial data size limit */ @@ -339,18 +338,6 @@ init_param2(long physpages) TUNABLE_QUAD_FETCH("kern.maxmbufmem", &maxmbufmem); if (maxmbufmem > (realmem / 4) * 3) maxmbufmem = (realmem / 4) * 3; - - /* - * The default for maxpipekva is min(1/64 of the kernel address space, - * max(1/64 of main memory, 512KB)). See sys_pipe.c for more details. - */ - maxpipekva = (physpages / 64) * PAGE_SIZE; - TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva); - if (maxpipekva < 512 * 1024) - maxpipekva = 512 * 1024; - if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64) - maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / - 64; } /* Index: kern/sys_pipe.c =================================================================== --- kern/sys_pipe.c (revision 245346) +++ kern/sys_pipe.c (working copy) @@ -207,6 +207,8 @@ static int pipeallocfail; static int piperesizefail; static int piperesizeallowed = 1; +long maxpipekva; + SYSCTL_LONG(_kern_ipc, OID_AUTO, maxpipekva, CTLFLAG_RDTUN, &maxpipekva, 0, "Pipe KVA limit"); SYSCTL_LONG(_kern_ipc, OID_AUTO, pipekva, CTLFLAG_RD, Index: vm/vm_init.c =================================================================== --- vm/vm_init.c (revision 245346) +++ vm/vm_init.c (working copy) @@ -132,12 +132,14 @@ vm_ksubmap_init(struct kva_md_info *kmi) { vm_offset_t firstaddr; caddr_t v; - vm_size_t size = 0; + vm_size_t kernel_map_size, size = 0; long physmem_est; vm_offset_t minaddr; vm_offset_t maxaddr; vm_map_t clean_map; + kernel_map_size = kernel_map->max_offset - kernel_map->min_offset; + /* * Allocate space for system data structures. * The first available kernel virtual address is in "v". @@ -163,8 +165,7 @@ again: * Discount the physical memory larger than the size of kernel_map * to avoid eating up all of KVA space. */ - physmem_est = lmin(physmem, btoc(kernel_map->max_offset - - kernel_map->min_offset)); + physmem_est = lmin(physmem, btoc(kernel_map_size)); v = kern_vfs_bio_buffer_alloc(v, physmem_est); @@ -195,6 +196,18 @@ again: pager_map->system_map = 1; exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, exec_map_entries * round_page(PATH_MAX + ARG_MAX), FALSE); + + /* + * The default size for the pipe submap, "maxpipekva", is min(1/64 of + * the kernel virtual address space, max(1/64 of the physical memory, + * 512KB)). See sys_pipe.c for more details. + */ + maxpipekva = ctob(physmem / 64); + TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva); + if (maxpipekva < 512 * 1024) + maxpipekva = 512 * 1024; + if (maxpipekva > kernel_map_size / 64) + maxpipekva = kernel_map_size / 64; pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, FALSE); --------------060309000103040501070209-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 10:38:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 29250947; Sun, 13 Jan 2013 10:38:31 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7CEF23; Sun, 13 Jan 2013 10:38:30 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1TuL1u-000Eyn-CL; Sun, 13 Jan 2013 14:43:06 +0400 Date: Sun, 13 Jan 2013 14:43:06 +0400 From: Slawa Olhovchenkov To: Alexander Motin Subject: Re: svn commit: r242314 - head/sys/geom/raid Message-ID: <20130113104306.GA27697@zxy.spb.ru> References: <201210291418.q9TEIsrZ078107@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210291418.q9TEIsrZ078107@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 10:38:31 -0000 On Mon, Oct 29, 2012 at 02:18:54PM +0000, Alexander Motin wrote: > Author: mav > Date: Mon Oct 29 14:18:54 2012 > New Revision: 242314 > URL: http://svn.freebsd.org/changeset/base/242314 > > Log: > Make GEOM RAID more aggressive in marking volumes as clean on shutdown > and move that action from shutdown_pre_sync to shutdown_post_sync stage > to avoid extra flapping. > > ZFS tends to not close devices on shutdown, that doesn't allow GEOM RAID > to shutdown gracefully. To handle that, mark volume as clean just when > shutdown time comes and there are no active writes. > > MFC after: 2 weeks kern/113957 ? > Modified: > head/sys/geom/raid/g_raid.c > > Modified: head/sys/geom/raid/g_raid.c > ============================================================================== > --- head/sys/geom/raid/g_raid.c Mon Oct 29 13:58:11 2012 (r242313) > +++ head/sys/geom/raid/g_raid.c Mon Oct 29 14:18:54 2012 (r242314) > @@ -108,8 +108,9 @@ LIST_HEAD(, g_raid_tr_class) g_raid_tr_c > LIST_HEAD(, g_raid_volume) g_raid_volumes = > LIST_HEAD_INITIALIZER(g_raid_volumes); > > -static eventhandler_tag g_raid_pre_sync = NULL; > +static eventhandler_tag g_raid_post_sync = NULL; > static int g_raid_started = 0; > +static int g_raid_shutdown = 0; > > static int g_raid_destroy_geom(struct gctl_req *req, struct g_class *mp, > struct g_geom *gp); > @@ -881,7 +882,7 @@ g_raid_orphan(struct g_consumer *cp) > G_RAID_EVENT_DISK); > } > > -static int > +static void > g_raid_clean(struct g_raid_volume *vol, int acw) > { > struct g_raid_softc *sc; > @@ -892,22 +893,21 @@ g_raid_clean(struct g_raid_volume *vol, > sx_assert(&sc->sc_lock, SX_XLOCKED); > > // if ((sc->sc_flags & G_RAID_DEVICE_FLAG_NOFAILSYNC) != 0) > -// return (0); > +// return; > if (!vol->v_dirty) > - return (0); > + return; > if (vol->v_writes > 0) > - return (0); > + return; > if (acw > 0 || (acw == -1 && > vol->v_provider != NULL && vol->v_provider->acw > 0)) { > timeout = g_raid_clean_time - (time_uptime - vol->v_last_write); > - if (timeout > 0) > - return (timeout); > + if (!g_raid_shutdown && timeout > 0) > + return; > } > vol->v_dirty = 0; > G_RAID_DEBUG1(1, sc, "Volume %s marked as clean.", > vol->v_name); > g_raid_write_metadata(sc, vol, NULL, NULL); > - return (0); > } > > static void > @@ -1520,8 +1520,7 @@ process: > g_raid_disk_done_request(bp); > } else if (rv == EWOULDBLOCK) { > TAILQ_FOREACH(vol, &sc->sc_volumes, v_next) { > - if (vol->v_writes == 0 && vol->v_dirty) > - g_raid_clean(vol, -1); > + g_raid_clean(vol, -1); > if (bioq_first(&vol->v_inflight) == NULL && > vol->v_tr) { > t.tv_sec = g_raid_idle_threshold / 1000000; > @@ -1783,7 +1782,7 @@ g_raid_access(struct g_provider *pp, int > error = ENXIO; > goto out; > } > - if (dcw == 0 && vol->v_dirty) > + if (dcw == 0) > g_raid_clean(vol, dcw); > vol->v_provider_open += acr + acw + ace; > /* Handle delayed node destruction. */ > @@ -2379,21 +2378,25 @@ g_raid_dumpconf(struct sbuf *sb, const c > } > > static void > -g_raid_shutdown_pre_sync(void *arg, int howto) > +g_raid_shutdown_post_sync(void *arg, int howto) > { > struct g_class *mp; > struct g_geom *gp, *gp2; > struct g_raid_softc *sc; > + struct g_raid_volume *vol; > int error; > > mp = arg; > DROP_GIANT(); > g_topology_lock(); > + g_raid_shutdown = 1; > LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { > if ((sc = gp->softc) == NULL) > continue; > g_topology_unlock(); > sx_xlock(&sc->sc_lock); > + TAILQ_FOREACH(vol, &sc->sc_volumes, v_next) > + g_raid_clean(vol, -1); > g_cancel_event(sc); > error = g_raid_destroy(sc, G_RAID_DESTROY_DELAYED); > if (error != 0) > @@ -2408,9 +2411,9 @@ static void > g_raid_init(struct g_class *mp) > { > > - g_raid_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync, > - g_raid_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST); > - if (g_raid_pre_sync == NULL) > + g_raid_post_sync = EVENTHANDLER_REGISTER(shutdown_post_sync, > + g_raid_shutdown_post_sync, mp, SHUTDOWN_PRI_FIRST); > + if (g_raid_post_sync == NULL) > G_RAID_DEBUG(0, "Warning! Cannot register shutdown event."); > g_raid_started = 1; > } > @@ -2419,8 +2422,8 @@ static void > g_raid_fini(struct g_class *mp) > { > > - if (g_raid_pre_sync != NULL) > - EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_raid_pre_sync); > + if (g_raid_post_sync != NULL) > + EVENTHANDLER_DEREGISTER(shutdown_post_sync, g_raid_post_sync); > g_raid_started = 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" From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 11:38:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A3DDD2C7; Sun, 13 Jan 2013 11:38:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 69CC0E2; Sun, 13 Jan 2013 11:38:33 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id D346146B09; Sun, 13 Jan 2013 06:38:32 -0500 (EST) Date: Sun, 13 Jan 2013 11:38:32 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Nathan Whitehorn Subject: Re: svn commit: r245331 - head/sys/mips/mips In-Reply-To: <50F18F83.9080604@freebsd.org> Message-ID: References: <201301121553.r0CFrjRU080518@svn.freebsd.org> <50F18F83.9080604@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 11:38:33 -0000 On Sat, 12 Jan 2013, Nathan Whitehorn wrote: >> In a sign of weakness, replicate the MIPS bus_space_generic.c to >> produce a new FDT version, which will perform necessary address >> space translation for bus_space -- the solution used in NLM's MIPS >> FDT support, but possibly not quite the right thing. This is >> inconsistent with regular I/O via the nexus and the generic >> bus_space, which instead perform translation via pmap_mapdev() >> when a resource is activated. However, it will work while I >> attempt to identify what the right way to reconcile possible >> approaches. >> >> (Another approach might be to make simplebus use Nexus's activate >> routine instead of a generic one?) >> >> Sponsored by: DARPA, AFRL > > Using nexus's instead of having a parallel universe of "FDT" things is, in > my opinion, the right way to go. It's what we do on PowerPC and SPARC with > real Open Firmware and there is no reason to do things any differently with > FDT. What I've done here is tracked the one existing FDT implementation on MIPS, from NLM XLP, effectively promoting it for use across all MIPS. We'll need to coordinate changing the model across both. I'm not sure I understand sufficiently the difference between how nexus is handling things on PowerPC/sparc64 vs MIPS such that using the generic busspace implementation doesn't work with FDT, but does on those platforms. Certainly, I was unable to use bus_space_generic on MIPS for this purpose, as it didn't to the P->V translation (that's the way around it is due to xkphys on MIPS) when used via the FDT path. Do you have insight there? Robert From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 14:30:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5A69D287; Sun, 13 Jan 2013 14:30:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4D00A78A; Sun, 13 Jan 2013 14:30:38 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DEUb2Z077395; Sun, 13 Jan 2013 14:30:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DEUbqI077393; Sun, 13 Jan 2013 14:30:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301131430.r0DEUbqI077393@svn.freebsd.org> From: Alexander Motin Date: Sun, 13 Jan 2013 14:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245363 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 14:30:38 -0000 Author: mav Date: Sun Jan 13 14:30:37 2013 New Revision: 245363 URL: http://svnweb.freebsd.org/changeset/base/245363 Log: Improve support for disabled disks. If disabled disk disconnected and then reconnected back, leave it as disconnected. If new disk inserted instead of disabled, rebuild it and leave as enabled. Modified: head/sys/geom/raid/g_raid.c head/sys/geom/raid/md_intel.c Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Sun Jan 13 07:14:16 2013 (r245362) +++ head/sys/geom/raid/g_raid.c Sun Jan 13 14:30:37 2013 (r245363) @@ -538,7 +538,7 @@ g_raid_report_disk_state(struct g_raid_d if (disk->d_consumer == NULL) return; if (disk->d_state == G_RAID_DISK_S_DISABLED) { - ; + s = G_STATE_ACTIVE; /* XXX */ } else if (disk->d_state == G_RAID_DISK_S_FAILED || disk->d_state == G_RAID_DISK_S_STALE_FAILED) { s = G_STATE_FAILED; Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Sun Jan 13 07:14:16 2013 (r245362) +++ head/sys/geom/raid/md_intel.c Sun Jan 13 14:30:37 2013 (r245363) @@ -787,13 +787,9 @@ g_raid_md_intel_start_disk(struct g_raid disk_pos = intel_meta_find_disk(meta, pd->pd_disk_meta.serial); if (disk_pos < 0) { G_RAID_DEBUG1(1, sc, "Unknown, probably new or stale disk"); - /* Disabled disk is useless for us. */ - if (pd->pd_disk_meta.flags & INTEL_F_DISABLED) { - g_raid_change_disk_state(disk, G_RAID_DISK_S_DISABLED); - return (0); - } /* Failed stale disk is useless for us. */ - if (pd->pd_disk_meta.flags & INTEL_F_FAILED) { + if ((pd->pd_disk_meta.flags & INTEL_F_FAILED) && + !(pd->pd_disk_meta.flags & INTEL_F_DISABLED)) { g_raid_change_disk_state(disk, G_RAID_DISK_S_STALE_FAILED); return (0); } @@ -884,10 +880,11 @@ nofit: } /* Welcome the new disk. */ - if (resurrection) - g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); - else if (meta->disk[disk_pos].flags & INTEL_F_DISABLED) + if ((meta->disk[disk_pos].flags & INTEL_F_DISABLED) && + !(pd->pd_disk_meta.flags & INTEL_F_SPARE)) g_raid_change_disk_state(disk, G_RAID_DISK_S_DISABLED); + else if (resurrection) + g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); else if (meta->disk[disk_pos].flags & INTEL_F_FAILED) g_raid_change_disk_state(disk, G_RAID_DISK_S_FAILED); else if (meta->disk[disk_pos].flags & INTEL_F_SPARE) @@ -910,14 +907,15 @@ nofit: migr_global = 0; } - if (resurrection) { - /* Stale disk, almost same as new. */ - g_raid_change_subdisk_state(sd, - G_RAID_SUBDISK_S_NEW); - } else if (meta->disk[disk_pos].flags & INTEL_F_DISABLED) { + if ((meta->disk[disk_pos].flags & INTEL_F_DISABLED) && + !(pd->pd_disk_meta.flags & INTEL_F_SPARE)) { /* Disabled disk, useless. */ g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_NONE); + } else if (resurrection) { + /* Stale disk, almost same as new. */ + g_raid_change_subdisk_state(sd, + G_RAID_SUBDISK_S_NEW); } else if (meta->disk[disk_pos].flags & INTEL_F_FAILED) { /* Failed disk, almost useless. */ g_raid_change_subdisk_state(sd, @@ -1021,7 +1019,8 @@ nofit: /* Update status of our need for spare. */ if (mdi->mdio_started) { mdi->mdio_incomplete = - (g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE) < + (g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE) + + g_raid_ndisks(sc, G_RAID_DISK_S_DISABLED) < meta->total_disks); } @@ -1053,7 +1052,8 @@ g_raid_md_intel_refill(struct g_raid_sof update = 0; do { /* Make sure we miss anything. */ - na = g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE); + na = g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE) + + g_raid_ndisks(sc, G_RAID_DISK_S_DISABLED); if (na == meta->total_disks) break; @@ -1065,7 +1065,8 @@ g_raid_md_intel_refill(struct g_raid_sof TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_RAID_DISK_S_STALE) { update += g_raid_md_intel_start_disk(disk); - if (disk->d_state == G_RAID_DISK_S_ACTIVE) + if (disk->d_state == G_RAID_DISK_S_ACTIVE || + disk->d_state == G_RAID_DISK_S_DISABLED) break; } } @@ -1089,8 +1090,8 @@ g_raid_md_intel_refill(struct g_raid_sof } /* Update status of our need for spare. */ - mdi->mdio_incomplete = (g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE) < - meta->total_disks); + mdi->mdio_incomplete = (g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE) + + g_raid_ndisks(sc, G_RAID_DISK_S_DISABLED) < meta->total_disks); /* Request retaste hoping to find spare. */ if (mdi->mdio_incomplete) { @@ -2242,7 +2243,8 @@ g_raid_md_write_intel(struct g_raid_md_o pd->pd_disk_meta.flags = INTEL_F_FAILED | INTEL_F_ASSIGNED | INTEL_F_DISABLED; } else { - pd->pd_disk_meta.flags = INTEL_F_ASSIGNED; + if (!(pd->pd_disk_meta.flags & INTEL_F_DISABLED)) + pd->pd_disk_meta.flags = INTEL_F_ASSIGNED; if (pd->pd_disk_meta.id != 0xffffffff) { pd->pd_disk_meta.id = 0xffffffff; len = strlen(pd->pd_disk_meta.serial); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 14:38:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1AA515FD; Sun, 13 Jan 2013 14:38:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F2F267CA; Sun, 13 Jan 2013 14:38:09 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DEc9f6079835; Sun, 13 Jan 2013 14:38:09 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DEc9xX079834; Sun, 13 Jan 2013 14:38:09 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131438.r0DEc9xX079834@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 14:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245364 - head/sys/dev/altera/jtag_uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 14:38:10 -0000 Author: rwatson Date: Sun Jan 13 14:38:09 2013 New Revision: 245364 URL: http://svnweb.freebsd.org/changeset/base/245364 Log: Merge Perforce changeset 219917 to head: Copy Altera JTAG UART nexus bus attachment as a starting point for an FDT bus attachment. Sponsored by: DARPA, AFRL Added: head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c - copied unchanged from r245363, head/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c Copied: head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c (from r245363, head/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c Sun Jan 13 14:38:09 2013 (r245364, copy of r245363, head/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c) @@ -0,0 +1,143 @@ +/*- + * Copyright (c) 2012 Robert N. M. Watson + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +/* + * Nexus bus attachment for Altera JTAG UARTs. Appropriate for most Altera + * FPGA SoC-style configurations in which the IP core will be exposed to the + * processor via a memory-mapped Avalon bus. + */ +static int +altera_jtag_uart_nexus_probe(device_t dev) +{ + + device_set_desc(dev, "Altera JTAG UART"); + return (BUS_PROBE_DEFAULT); +} + +static int +altera_jtag_uart_nexus_attach(device_t dev) +{ + struct altera_jtag_uart_softc *sc; + int error; + + error = 0; + sc = device_get_softc(dev); + sc->ajus_dev = dev; + sc->ajus_unit = device_get_unit(dev); + sc->ajus_mem_rid = 0; + sc->ajus_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->ajus_mem_rid, RF_ACTIVE); + if (sc->ajus_mem_res == NULL) { + device_printf(dev, "couldn't map memory\n"); + error = ENXIO; + goto out; + } + + /* + * Interrupt support is optional -- if we can't allocate an IRQ, then + * we fall back on polling. + */ + sc->ajus_irq_rid = 0; + sc->ajus_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &sc->ajus_irq_rid, RF_ACTIVE | RF_SHAREABLE); + if (sc->ajus_irq_res == NULL) + device_printf(dev, + "IRQ unavailable; selecting polled operation\n"); + error = altera_jtag_uart_attach(sc); +out: + if (error) { + if (sc->ajus_irq_res != NULL) + bus_release_resource(dev, SYS_RES_IRQ, + sc->ajus_irq_rid, sc->ajus_irq_res); + if (sc->ajus_mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + sc->ajus_mem_rid, sc->ajus_mem_res); + } + return (error); +} + +static int +altera_jtag_uart_nexus_detach(device_t dev) +{ + struct altera_jtag_uart_softc *sc; + + sc = device_get_softc(dev); + KASSERT(sc->ajus_mem_res != NULL, ("%s: resources not allocated", + __func__)); + + altera_jtag_uart_detach(sc); + bus_release_resource(dev, SYS_RES_IRQ, sc->ajus_irq_rid, + sc->ajus_irq_res); + bus_release_resource(dev, SYS_RES_MEMORY, sc->ajus_mem_rid, + sc->ajus_mem_res); + return (0); +} + +static device_method_t altera_jtag_uart_nexus_methods[] = { + DEVMETHOD(device_probe, altera_jtag_uart_nexus_probe), + DEVMETHOD(device_attach, altera_jtag_uart_nexus_attach), + DEVMETHOD(device_detach, altera_jtag_uart_nexus_detach), + { 0, 0 } +}; + +static driver_t altera_jtag_uart_nexus_driver = { + "altera_jtag_uart", + altera_jtag_uart_nexus_methods, + sizeof(struct altera_jtag_uart_softc), +}; + +static devclass_t altera_jtag_uart_devclass; + +DRIVER_MODULE(altera_jtag_uart, nexus, altera_jtag_uart_nexus_driver, + altera_jtag_uart_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 15:08:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 47EF4E28; Sun, 13 Jan 2013 15:08:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 37D24918; Sun, 13 Jan 2013 15:08:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DF8Igq088208; Sun, 13 Jan 2013 15:08:18 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DF8H4v088205; Sun, 13 Jan 2013 15:08:17 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131508.r0DF8H4v088205@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 15:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245365 - in head/sys: dev/altera/jtag_uart mips/beri X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 15:08:18 -0000 Author: rwatson Date: Sun Jan 13 15:08:17 2013 New Revision: 245365 URL: http://svnweb.freebsd.org/changeset/base/245365 Log: Merge Perforce changeset 219918 to head: Naive first cut at an FDT bus attachment for the Altera JTAG UART. Sponsored by: DARPA, AFRL Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c head/sys/mips/beri/files.beri Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c ============================================================================== --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c Sun Jan 13 14:38:09 2013 (r245364) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c Sun Jan 13 15:08:17 2013 (r245365) @@ -52,21 +52,27 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include +#include + /* - * Nexus bus attachment for Altera JTAG UARTs. Appropriate for most Altera - * FPGA SoC-style configurations in which the IP core will be exposed to the - * processor via a memory-mapped Avalon bus. + * FDT bus attachment for Altera JTAG UARTs. */ static int -altera_jtag_uart_nexus_probe(device_t dev) +altera_jtag_uart_fdt_probe(device_t dev) { - device_set_desc(dev, "Altera JTAG UART"); - return (BUS_PROBE_DEFAULT); + if (ofw_bus_is_compatible(dev, "altera,jtag_uart-11_0")) { + device_set_desc(dev, "Altera JTAG UART"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int -altera_jtag_uart_nexus_attach(device_t dev) +altera_jtag_uart_fdt_attach(device_t dev) { struct altera_jtag_uart_softc *sc; int error; @@ -108,7 +114,7 @@ out: } static int -altera_jtag_uart_nexus_detach(device_t dev) +altera_jtag_uart_fdt_detach(device_t dev) { struct altera_jtag_uart_softc *sc; @@ -124,20 +130,20 @@ altera_jtag_uart_nexus_detach(device_t d return (0); } -static device_method_t altera_jtag_uart_nexus_methods[] = { - DEVMETHOD(device_probe, altera_jtag_uart_nexus_probe), - DEVMETHOD(device_attach, altera_jtag_uart_nexus_attach), - DEVMETHOD(device_detach, altera_jtag_uart_nexus_detach), +static device_method_t altera_jtag_uart_fdt_methods[] = { + DEVMETHOD(device_probe, altera_jtag_uart_fdt_probe), + DEVMETHOD(device_attach, altera_jtag_uart_fdt_attach), + DEVMETHOD(device_detach, altera_jtag_uart_fdt_detach), { 0, 0 } }; -static driver_t altera_jtag_uart_nexus_driver = { +static driver_t altera_jtag_uart_fdt_driver = { "altera_jtag_uart", - altera_jtag_uart_nexus_methods, + altera_jtag_uart_fdt_methods, sizeof(struct altera_jtag_uart_softc), }; static devclass_t altera_jtag_uart_devclass; -DRIVER_MODULE(altera_jtag_uart, nexus, altera_jtag_uart_nexus_driver, +DRIVER_MODULE(altera_jtag_uart, simplebus, altera_jtag_uart_fdt_driver, altera_jtag_uart_devclass, 0, 0); Modified: head/sys/mips/beri/files.beri ============================================================================== --- head/sys/mips/beri/files.beri Sun Jan 13 14:38:09 2013 (r245364) +++ head/sys/mips/beri/files.beri Sun Jan 13 15:08:17 2013 (r245365) @@ -1,6 +1,7 @@ # $FreeBSD$ dev/altera/jtag_uart/altera_jtag_uart_cons.c optional altera_jtag_uart dev/altera/jtag_uart/altera_jtag_uart_tty.c optional altera_jtag_uart +dev/altera/jtag_uart/altera_jtag_uart_fdt.c optional altera_jtag_uart fdt dev/altera/jtag_uart/altera_jtag_uart_nexus.c optional altera_jtag_uart dev/terasic/de4led/terasic_de4led.c optional terasic_de4led dev/terasic/de4led/terasic_de4led_nexus.c optional terasic_de4led From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 15:10:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AEFA4FB4; Sun, 13 Jan 2013 15:10:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8A6931; Sun, 13 Jan 2013 15:10:27 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DFARX4089536; Sun, 13 Jan 2013 15:10:27 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DFARdw089528; Sun, 13 Jan 2013 15:10:27 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131510.r0DFARdw089528@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 15:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245366 - head/sys/dev/terasic/de4led X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 15:10:27 -0000 Author: rwatson Date: Sun Jan 13 15:10:27 2013 New Revision: 245366 URL: http://svnweb.freebsd.org/changeset/base/245366 Log: Merge Perforce changeset 219921 to head: Copy DE4 LED nexus bus attachment as a starting point for an FDT attachment. Sponsored by: DARPA, AFRL Added: head/sys/dev/terasic/de4led/terasic_de4led_fdt.c - copied unchanged from r245363, head/sys/dev/terasic/de4led/terasic_de4led_nexus.c Copied: head/sys/dev/terasic/de4led/terasic_de4led_fdt.c (from r245363, head/sys/dev/terasic/de4led/terasic_de4led_nexus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/terasic/de4led/terasic_de4led_fdt.c Sun Jan 13 15:10:27 2013 (r245366, copy of r245363, head/sys/dev/terasic/de4led/terasic_de4led_nexus.c) @@ -0,0 +1,112 @@ +/*- + * Copyright (c) 2012 Robert N. M. Watson + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +/* + * Nexus bus attachment for the 8-element LED on the Terasic DE-4 FPGA board, + * which is hooked up to the processor via a memory-mapped Avalon bus. + */ +static int +terasic_de4led_nexus_probe(device_t dev) +{ + + device_set_desc(dev, "Terasic DE4 8-element LED"); + return (BUS_PROBE_DEFAULT); +} + +static int +terasic_de4led_nexus_attach(device_t dev) +{ + struct terasic_de4led_softc *sc; + + sc = device_get_softc(dev); + sc->tdl_dev = dev; + sc->tdl_unit = device_get_unit(dev); + sc->tdl_rid = 0; + sc->tdl_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->tdl_rid, RF_ACTIVE); + if (sc->tdl_res == NULL) { + device_printf(dev, "couldn't map memory\n"); + return (ENXIO); + } + terasic_de4led_attach(sc); + return (0); +} + +static int +terasic_de4led_nexus_detach(device_t dev) +{ + struct terasic_de4led_softc *sc; + + sc = device_get_softc(dev); + KASSERT(sc->tdl_res != NULL, ("%s: resources not allocated", + __func__)); + terasic_de4led_detach(sc); + bus_release_resource(dev, SYS_RES_MEMORY, sc->tdl_rid, sc->tdl_res); + return (0); +} + +static device_method_t terasic_de4led_nexus_methods[] = { + DEVMETHOD(device_probe, terasic_de4led_nexus_probe), + DEVMETHOD(device_attach, terasic_de4led_nexus_attach), + DEVMETHOD(device_detach, terasic_de4led_nexus_detach), + { 0, 0 } +}; + +static driver_t terasic_de4led_nexus_driver = { + "terasic_de4led", + terasic_de4led_nexus_methods, + sizeof(struct terasic_de4led_softc), +}; + +static devclass_t terasic_de4led_devclass; + +DRIVER_MODULE(terasic_de4led, nexus, terasic_de4led_nexus_driver, + terasic_de4led_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 15:12:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ED5071D3; Sun, 13 Jan 2013 15:12:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D668A94C; Sun, 13 Jan 2013 15:12:35 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DFCZ77090452; Sun, 13 Jan 2013 15:12:35 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DFCZTJ090450; Sun, 13 Jan 2013 15:12:35 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131512.r0DFCZTJ090450@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 15:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245367 - in head/sys: dev/terasic/de4led mips/beri X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 15:12:36 -0000 Author: rwatson Date: Sun Jan 13 15:12:35 2013 New Revision: 245367 URL: http://svnweb.freebsd.org/changeset/base/245367 Log: Merge Perforce changeset 219922 to head: Update nexus parts in copied DE4LED attachment to use FDT. Sponsored by: DARPA, AFRL Modified: head/sys/dev/terasic/de4led/terasic_de4led_fdt.c head/sys/mips/beri/files.beri Modified: head/sys/dev/terasic/de4led/terasic_de4led_fdt.c ============================================================================== --- head/sys/dev/terasic/de4led/terasic_de4led_fdt.c Sun Jan 13 15:10:27 2013 (r245366) +++ head/sys/dev/terasic/de4led/terasic_de4led_fdt.c Sun Jan 13 15:12:35 2013 (r245367) @@ -47,6 +47,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include + #include /* @@ -54,15 +59,18 @@ __FBSDID("$FreeBSD$"); * which is hooked up to the processor via a memory-mapped Avalon bus. */ static int -terasic_de4led_nexus_probe(device_t dev) +terasic_de4led_fdt_probe(device_t dev) { - device_set_desc(dev, "Terasic DE4 8-element LED"); - return (BUS_PROBE_DEFAULT); + if (ofw_bus_is_compatible(dev, "cambridge,de4led")) { + device_set_desc(dev, "Terasic DE4 8-element LED"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int -terasic_de4led_nexus_attach(device_t dev) +terasic_de4led_fdt_attach(device_t dev) { struct terasic_de4led_softc *sc; @@ -81,7 +89,7 @@ terasic_de4led_nexus_attach(device_t dev } static int -terasic_de4led_nexus_detach(device_t dev) +terasic_de4led_fdt_detach(device_t dev) { struct terasic_de4led_softc *sc; @@ -93,20 +101,20 @@ terasic_de4led_nexus_detach(device_t dev return (0); } -static device_method_t terasic_de4led_nexus_methods[] = { - DEVMETHOD(device_probe, terasic_de4led_nexus_probe), - DEVMETHOD(device_attach, terasic_de4led_nexus_attach), - DEVMETHOD(device_detach, terasic_de4led_nexus_detach), +static device_method_t terasic_de4led_fdt_methods[] = { + DEVMETHOD(device_probe, terasic_de4led_fdt_probe), + DEVMETHOD(device_attach, terasic_de4led_fdt_attach), + DEVMETHOD(device_detach, terasic_de4led_fdt_detach), { 0, 0 } }; -static driver_t terasic_de4led_nexus_driver = { +static driver_t terasic_de4led_fdt_driver = { "terasic_de4led", - terasic_de4led_nexus_methods, + terasic_de4led_fdt_methods, sizeof(struct terasic_de4led_softc), }; static devclass_t terasic_de4led_devclass; -DRIVER_MODULE(terasic_de4led, nexus, terasic_de4led_nexus_driver, +DRIVER_MODULE(terasic_de4led, simplebus, terasic_de4led_fdt_driver, terasic_de4led_devclass, 0, 0); Modified: head/sys/mips/beri/files.beri ============================================================================== --- head/sys/mips/beri/files.beri Sun Jan 13 15:10:27 2013 (r245366) +++ head/sys/mips/beri/files.beri Sun Jan 13 15:12:35 2013 (r245367) @@ -4,6 +4,7 @@ dev/altera/jtag_uart/altera_jtag_uart_tt dev/altera/jtag_uart/altera_jtag_uart_fdt.c optional altera_jtag_uart fdt dev/altera/jtag_uart/altera_jtag_uart_nexus.c optional altera_jtag_uart dev/terasic/de4led/terasic_de4led.c optional terasic_de4led +dev/terasic/de4led/terasic_de4led_fdt.c optional terasic_de4led fdt dev/terasic/de4led/terasic_de4led_nexus.c optional terasic_de4led dev/terasic/mtl/terasic_mtl.c optional terasic_mtl dev/terasic/mtl/terasic_mtl_nexus.c optional terasic_mtl From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 15:13:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 440C5348; Sun, 13 Jan 2013 15:13:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3688A955; Sun, 13 Jan 2013 15:13:26 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DFDQuX090600; Sun, 13 Jan 2013 15:13:26 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DFDQLk090599; Sun, 13 Jan 2013 15:13:26 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131513.r0DFDQLk090599@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 15:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245368 - head/sys/dev/altera/sdcard X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 15:13:26 -0000 Author: rwatson Date: Sun Jan 13 15:13:25 2013 New Revision: 245368 URL: http://svnweb.freebsd.org/changeset/base/245368 Log: Merge Perforce changeset 219926 to head: Copy Altera SDCard nexus attachment as a starting point for the FDT attachment. Sponsored by: DARPA, AFRL Added: head/sys/dev/altera/sdcard/altera_sdcard_fdt.c - copied unchanged from r245363, head/sys/dev/altera/sdcard/altera_sdcard_nexus.c Copied: head/sys/dev/altera/sdcard/altera_sdcard_fdt.c (from r245363, head/sys/dev/altera/sdcard/altera_sdcard_nexus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/altera/sdcard/altera_sdcard_fdt.c Sun Jan 13 15:13:25 2013 (r245368, copy of r245363, head/sys/dev/altera/sdcard/altera_sdcard_nexus.c) @@ -0,0 +1,116 @@ +/*- + * Copyright (c) 2012 Robert N. M. Watson + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +/* + * Nexus bus attachment for the Altera SD Card IP core. Appropriate for most + * Altera FPGA SoC-style configurations in which the IP core will be exposed + * to the processor via a memory-mapped Avalon bus. + */ +static int +altera_sdcard_nexus_probe(device_t dev) +{ + + device_set_desc(dev, "Altera Secure Data Card IP Core"); + return (BUS_PROBE_DEFAULT); +} + +static int +altera_sdcard_nexus_attach(device_t dev) +{ + struct altera_sdcard_softc *sc; + + sc = device_get_softc(dev); + sc->as_dev = dev; + sc->as_unit = device_get_unit(dev); + sc->as_rid = 0; + sc->as_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->as_rid, RF_ACTIVE); + if (sc->as_res == NULL) { + device_printf(dev, "couldn't map memory\n"); + return (ENXIO); + } + altera_sdcard_attach(sc); + return (0); +} + +static int +altera_sdcard_nexus_detach(device_t dev) +{ + struct altera_sdcard_softc *sc; + + sc = device_get_softc(dev); + KASSERT(sc->as_res != NULL, ("%s: resources not allocated", + __func__)); + altera_sdcard_detach(sc); + bus_release_resource(dev, SYS_RES_MEMORY, sc->as_rid, sc->as_res); + return (0); +} + +static device_method_t altera_sdcard_nexus_methods[] = { + DEVMETHOD(device_probe, altera_sdcard_nexus_probe), + DEVMETHOD(device_attach, altera_sdcard_nexus_attach), + DEVMETHOD(device_detach, altera_sdcard_nexus_detach), + { 0, 0 } +}; + +static driver_t altera_sdcard_nexus_driver = { + "altera_sdcardc", + altera_sdcard_nexus_methods, + sizeof(struct altera_sdcard_softc), +}; + +static devclass_t altera_sdcard_devclass; + +DRIVER_MODULE(altera_sdcard, nexus, altera_sdcard_nexus_driver, + altera_sdcard_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 15:15:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A04D84C1; Sun, 13 Jan 2013 15:15:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 812C4965; Sun, 13 Jan 2013 15:15:25 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DFFPTn090875; Sun, 13 Jan 2013 15:15:25 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DFFPwm090873; Sun, 13 Jan 2013 15:15:25 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131515.r0DFFPwm090873@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 15:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245369 - in head/sys: conf dev/altera/sdcard X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 15:15:25 -0000 Author: rwatson Date: Sun Jan 13 15:15:24 2013 New Revision: 245369 URL: http://svnweb.freebsd.org/changeset/base/245369 Log: Merge Perforce changeset 219927 to head: Implement an FDT attachment for the Altera SD Card driver Sponsored by: DARPA, AFRL Modified: head/sys/conf/files head/sys/dev/altera/sdcard/altera_sdcard_fdt.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 13 15:13:25 2013 (r245368) +++ head/sys/conf/files Sun Jan 13 15:15:24 2013 (r245369) @@ -641,6 +641,7 @@ dev/altera/avgen/altera_avgen.c optiona dev/altera/sdcard/altera_sdcard.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_disk.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_io.c optional altera_sdcard +dev/altera/sdcard/altera_sdcard_fdt.c optional altera_sdcard fdt dev/altera/sdcard/altera_sdcard_nexus.c optional altera_sdcard dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amrp amr Modified: head/sys/dev/altera/sdcard/altera_sdcard_fdt.c ============================================================================== --- head/sys/dev/altera/sdcard/altera_sdcard_fdt.c Sun Jan 13 15:13:25 2013 (r245368) +++ head/sys/dev/altera/sdcard/altera_sdcard_fdt.c Sun Jan 13 15:15:24 2013 (r245369) @@ -52,21 +52,27 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include +#include + /* - * Nexus bus attachment for the Altera SD Card IP core. Appropriate for most - * Altera FPGA SoC-style configurations in which the IP core will be exposed - * to the processor via a memory-mapped Avalon bus. + * FDT bus attachment for the Altera SD Card IP core. */ static int -altera_sdcard_nexus_probe(device_t dev) +altera_sdcard_fdt_probe(device_t dev) { - device_set_desc(dev, "Altera Secure Data Card IP Core"); - return (BUS_PROBE_DEFAULT); + if (ofw_bus_is_compatible(dev, "altera,sdcard_11_2011")) { + device_set_desc(dev, "Altera Secure Data Card IP Core"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int -altera_sdcard_nexus_attach(device_t dev) +altera_sdcard_fdt_attach(device_t dev) { struct altera_sdcard_softc *sc; @@ -85,7 +91,7 @@ altera_sdcard_nexus_attach(device_t dev) } static int -altera_sdcard_nexus_detach(device_t dev) +altera_sdcard_fdt_detach(device_t dev) { struct altera_sdcard_softc *sc; @@ -97,20 +103,20 @@ altera_sdcard_nexus_detach(device_t dev) return (0); } -static device_method_t altera_sdcard_nexus_methods[] = { - DEVMETHOD(device_probe, altera_sdcard_nexus_probe), - DEVMETHOD(device_attach, altera_sdcard_nexus_attach), - DEVMETHOD(device_detach, altera_sdcard_nexus_detach), +static device_method_t altera_sdcard_fdt_methods[] = { + DEVMETHOD(device_probe, altera_sdcard_fdt_probe), + DEVMETHOD(device_attach, altera_sdcard_fdt_attach), + DEVMETHOD(device_detach, altera_sdcard_fdt_detach), { 0, 0 } }; -static driver_t altera_sdcard_nexus_driver = { +static driver_t altera_sdcard_fdt_driver = { "altera_sdcardc", - altera_sdcard_nexus_methods, + altera_sdcard_fdt_methods, sizeof(struct altera_sdcard_softc), }; static devclass_t altera_sdcard_devclass; -DRIVER_MODULE(altera_sdcard, nexus, altera_sdcard_nexus_driver, +DRIVER_MODULE(altera_sdcard, simplebus, altera_sdcard_fdt_driver, altera_sdcard_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 15:16:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B80B362F; Sun, 13 Jan 2013 15:16:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AA74996C; Sun, 13 Jan 2013 15:16:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DFGIc6090997; Sun, 13 Jan 2013 15:16:18 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DFGIhu090996; Sun, 13 Jan 2013 15:16:18 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131516.r0DFGIhu090996@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 15:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245370 - head/sys/dev/isf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 15:16:18 -0000 Author: rwatson Date: Sun Jan 13 15:16:18 2013 New Revision: 245370 URL: http://svnweb.freebsd.org/changeset/base/245370 Log: Merge Perforce changeset 219929 to head: Replicate nexus attachment for isf(4) to become an FDT attachment. Sponsored by: DARPA, AFRL Added: head/sys/dev/isf/isf_fdt.c - copied unchanged from r245363, head/sys/dev/isf/isf_nexus.c Copied: head/sys/dev/isf/isf_fdt.c (from r245363, head/sys/dev/isf/isf_nexus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/isf/isf_fdt.c Sun Jan 13 15:16:18 2013 (r245370, copy of r245363, head/sys/dev/isf/isf_nexus.c) @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2012 Robert N. M. Watson + * Copyright (c) 2012 SRI International + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +/* + * Nexus bus attachment for the Intel Strata Flash devices. Appropriate for + * most Altera FPGA SoC-style configurations in which the part will be exposed + * to the processor via a memory-mapped Avalon bus. + */ +static int +isf_nexus_probe(device_t dev) +{ + + device_set_desc(dev, "Intel StrataFlash NOR flash device"); + return (BUS_PROBE_DEFAULT); +} + +static int +isf_nexus_attach(device_t dev) +{ + int error; + struct isf_softc *sc; + + sc = device_get_softc(dev); + sc->isf_dev = dev; + sc->isf_unit = device_get_unit(dev); + sc->isf_rid = 0; + sc->isf_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->isf_rid, RF_ACTIVE); + if (sc->isf_res == NULL) { + device_printf(dev, "couldn't map memory\n"); + return (ENXIO); + } + error = isf_attach(sc); + if (error) + bus_release_resource(dev, SYS_RES_MEMORY, sc->isf_rid, + sc->isf_res); + return (error); +} + +static int +isf_nexus_detach(device_t dev) +{ + struct isf_softc *sc; + + sc = device_get_softc(dev); + KASSERT(sc->isf_res != NULL, ("%s: resources not allocated", + __func__)); + isf_detach(sc); + bus_release_resource(dev, SYS_RES_MEMORY, sc->isf_rid, sc->isf_res); + return (0); +} + +static device_method_t isf_nexus_methods[] = { + DEVMETHOD(device_probe, isf_nexus_probe), + DEVMETHOD(device_attach, isf_nexus_attach), + DEVMETHOD(device_detach, isf_nexus_detach), + { 0, 0 } +}; + +static driver_t isf_nexus_driver = { + "isf", + isf_nexus_methods, + sizeof(struct isf_softc), +}; + +static devclass_t isf_devclass; + +DRIVER_MODULE(isf, nexus, isf_nexus_driver, isf_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:20:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EEAE594A; Sun, 13 Jan 2013 16:20:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D29BBD73; Sun, 13 Jan 2013 16:20:40 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGKeAt010404; Sun, 13 Jan 2013 16:20:40 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGKe9X010402; Sun, 13 Jan 2013 16:20:40 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131620.r0DGKe9X010402@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245371 - in head/sys: conf dev/isf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:20:41 -0000 Author: rwatson Date: Sun Jan 13 16:20:40 2013 New Revision: 245371 URL: http://svnweb.freebsd.org/changeset/base/245371 Log: Partially merge Perforce changeset 219930 to head: Add an Intel StrataFlash (isf) driver FDT attachment. Portions of the original changeset hooking up FDT use for BERI will be merged separately. Sponsored by: DARPA, AFRL Modified: head/sys/conf/files head/sys/dev/isf/isf_fdt.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 13 15:16:18 2013 (r245370) +++ head/sys/conf/files Sun Jan 13 16:20:40 2013 (r245371) @@ -1416,6 +1416,7 @@ dev/iscsi/initiator/isc_soc.c optional i dev/iscsi/initiator/isc_sm.c optional iscsi_initiator scbus dev/iscsi/initiator/isc_subr.c optional iscsi_initiator scbus dev/isf/isf.c optional isf +dev/isf/isf_fdt.c optional isf fdt dev/isf/isf_nexus.c optional isf dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp Modified: head/sys/dev/isf/isf_fdt.c ============================================================================== --- head/sys/dev/isf/isf_fdt.c Sun Jan 13 15:16:18 2013 (r245370) +++ head/sys/dev/isf/isf_fdt.c Sun Jan 13 16:20:40 2013 (r245371) @@ -51,23 +51,29 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include +#include + #include /* - * Nexus bus attachment for the Intel Strata Flash devices. Appropriate for - * most Altera FPGA SoC-style configurations in which the part will be exposed - * to the processor via a memory-mapped Avalon bus. + * FDT bus attachment for the Intel Strata Flash devices. */ static int -isf_nexus_probe(device_t dev) +isf_fdt_probe(device_t dev) { - device_set_desc(dev, "Intel StrataFlash NOR flash device"); - return (BUS_PROBE_DEFAULT); + if (ofw_bus_is_compatible(dev, "intel,strataflash")) { + device_set_desc(dev, "Intel StrataFlash NOR flash device"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int -isf_nexus_attach(device_t dev) +isf_fdt_attach(device_t dev) { int error; struct isf_softc *sc; @@ -90,7 +96,7 @@ isf_nexus_attach(device_t dev) } static int -isf_nexus_detach(device_t dev) +isf_fdt_detach(device_t dev) { struct isf_softc *sc; @@ -102,19 +108,19 @@ isf_nexus_detach(device_t dev) return (0); } -static device_method_t isf_nexus_methods[] = { - DEVMETHOD(device_probe, isf_nexus_probe), - DEVMETHOD(device_attach, isf_nexus_attach), - DEVMETHOD(device_detach, isf_nexus_detach), +static device_method_t isf_fdt_methods[] = { + DEVMETHOD(device_probe, isf_fdt_probe), + DEVMETHOD(device_attach, isf_fdt_attach), + DEVMETHOD(device_detach, isf_fdt_detach), { 0, 0 } }; -static driver_t isf_nexus_driver = { +static driver_t isf_fdt_driver = { "isf", - isf_nexus_methods, + isf_fdt_methods, sizeof(struct isf_softc), }; static devclass_t isf_devclass; -DRIVER_MODULE(isf, nexus, isf_nexus_driver, isf_devclass, 0, 0); +DRIVER_MODULE(isf, simplebus, isf_fdt_driver, isf_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:21:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1D9A8AE6; Sun, 13 Jan 2013 16:21:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 01985D82; Sun, 13 Jan 2013 16:21:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGLp2J010748; Sun, 13 Jan 2013 16:21:51 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGLpwK010747; Sun, 13 Jan 2013 16:21:51 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131621.r0DGLpwK010747@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245372 - head/sys/dev/terasic/mtl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:21:52 -0000 Author: rwatson Date: Sun Jan 13 16:21:51 2013 New Revision: 245372 URL: http://svnweb.freebsd.org/changeset/base/245372 Log: Merge Perforce changeset 219937 to head: Copy Terasic MTL nexus bus attachment as a starting point for an FDT attachment for the same driver. Sponsored by: DARPA, AFRL Added: head/sys/dev/terasic/mtl/terasic_mtl_fdt.c - copied unchanged from r245363, head/sys/dev/terasic/mtl/terasic_mtl_nexus.c Copied: head/sys/dev/terasic/mtl/terasic_mtl_fdt.c (from r245363, head/sys/dev/terasic/mtl/terasic_mtl_nexus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Sun Jan 13 16:21:51 2013 (r245372, copy of r245363, head/sys/dev/terasic/mtl/terasic_mtl_nexus.c) @@ -0,0 +1,196 @@ +/*- + * Copyright (c) 2012 Robert N. M. Watson + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include /* struct vt_mode */ +#include /* video_adapter_t */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +static int +terasic_mtl_nexus_probe(device_t dev) +{ + + device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); + return (BUS_PROBE_DEFAULT); +} + +static int +terasic_mtl_nexus_attach(device_t dev) +{ + struct terasic_mtl_softc *sc; + u_long pixel_maddr, text_maddr, reg_maddr; + u_long pixel_msize, text_msize, reg_msize; + int error; + + sc = device_get_softc(dev); + sc->mtl_dev = dev; + sc->mtl_unit = device_get_unit(dev); + + /* + * Query non-standard hints to find the locations of our two memory + * regions. Enforce certain alignment and size requirements. + */ + if (resource_long_value(device_get_name(dev), device_get_unit(dev), + "reg_maddr", ®_maddr) != 0 || (reg_maddr % PAGE_SIZE != 0)) { + device_printf(dev, "improper register address"); + return (ENXIO); + } + if (resource_long_value(device_get_name(dev), device_get_unit(dev), + "reg_msize", ®_msize) != 0 || (reg_msize % PAGE_SIZE != 0)) { + device_printf(dev, "improper register size"); + return (ENXIO); + } + if (resource_long_value(device_get_name(dev), device_get_unit(dev), + "pixel_maddr", &pixel_maddr) != 0 || + (pixel_maddr % PAGE_SIZE != 0)) { + device_printf(dev, "improper pixel frame buffer address"); + return (ENXIO); + } + if (resource_long_value(device_get_name(dev), device_get_unit(dev), + "pixel_msize", &pixel_msize) != 0 || + (pixel_msize % PAGE_SIZE != 0)) { + device_printf(dev, "improper pixel frame buffer size"); + return (ENXIO); + } + if (resource_long_value(device_get_name(dev), device_get_unit(dev), + "text_maddr", &text_maddr) != 0 || + (text_maddr % PAGE_SIZE != 0)) { + device_printf(dev, "improper text frame buffer address"); + return (ENXIO); + } + if (resource_long_value(device_get_name(dev), device_get_unit(dev), + "text_msize", &text_msize) != 0 || + (text_msize % PAGE_SIZE != 0)) { + device_printf(dev, "improper text frame buffer size"); + return (ENXIO); + } + + /* + * Allocate resources. + */ + sc->mtl_reg_rid = 0; + sc->mtl_reg_res = bus_alloc_resource(dev, SYS_RES_MEMORY, + &sc->mtl_reg_rid, reg_maddr, reg_maddr + reg_msize - 1, + reg_msize, RF_ACTIVE); + if (sc->mtl_reg_res == NULL) { + device_printf(dev, "couldn't map register memory\n"); + error = ENXIO; + goto error; + } + device_printf(sc->mtl_dev, "registers at mem %p-%p\n", + (void *)reg_maddr, (void *)(reg_maddr + reg_msize)); + sc->mtl_pixel_rid = 0; + sc->mtl_pixel_res = bus_alloc_resource(dev, SYS_RES_MEMORY, + &sc->mtl_pixel_rid, pixel_maddr, pixel_maddr + pixel_msize - 1, + pixel_msize, RF_ACTIVE); + if (sc->mtl_pixel_res == NULL) { + device_printf(dev, "couldn't map pixel memory\n"); + error = ENXIO; + goto error; + } + device_printf(sc->mtl_dev, "pixel frame buffer at mem %p-%p\n", + (void *)pixel_maddr, (void *)(pixel_maddr + pixel_msize)); + sc->mtl_text_rid = 0; + sc->mtl_text_res = bus_alloc_resource(dev, SYS_RES_MEMORY, + &sc->mtl_text_rid, text_maddr, text_maddr + text_msize - 1, + text_msize, RF_ACTIVE); + if (sc->mtl_text_res == NULL) { + device_printf(dev, "couldn't map text memory\n"); + error = ENXIO; + goto error; + } + device_printf(sc->mtl_dev, "text frame buffer at mem %p-%p\n", + (void *)text_maddr, (void *)(text_maddr + text_msize)); + error = terasic_mtl_attach(sc); + if (error == 0) + return (0); +error: + if (sc->mtl_text_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_text_rid, + sc->mtl_text_res); + if (sc->mtl_pixel_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_pixel_rid, + sc->mtl_pixel_res); + if (sc->mtl_reg_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_reg_rid, + sc->mtl_reg_res); + return (error); +} + +static int +terasic_mtl_nexus_detach(device_t dev) +{ + struct terasic_mtl_softc *sc; + + sc = device_get_softc(dev); + terasic_mtl_detach(sc); + bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_text_rid, + sc->mtl_text_res); + bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_pixel_rid, + sc->mtl_pixel_res); + bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_reg_rid, + sc->mtl_reg_res); + return (0); +} + +static device_method_t terasic_mtl_nexus_methods[] = { + DEVMETHOD(device_probe, terasic_mtl_nexus_probe), + DEVMETHOD(device_attach, terasic_mtl_nexus_attach), + DEVMETHOD(device_detach, terasic_mtl_nexus_detach), + { 0, 0 } +}; + +static driver_t terasic_mtl_nexus_driver = { + "terasic_mtl", + terasic_mtl_nexus_methods, + sizeof(struct terasic_mtl_softc), +}; + +static devclass_t terasic_mtl_devclass; + +DRIVER_MODULE(mtl, nexus, terasic_mtl_nexus_driver, terasic_mtl_devclass, 0, + 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:27:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EA0E3DF1; Sun, 13 Jan 2013 16:27:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C1124DCE; Sun, 13 Jan 2013 16:27:57 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGRvg5011548; Sun, 13 Jan 2013 16:27:57 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGRvOg011546; Sun, 13 Jan 2013 16:27:57 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131627.r0DGRvOg011546@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245373 - in head/sys: dev/terasic/mtl mips/beri X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:27:58 -0000 Author: rwatson Date: Sun Jan 13 16:27:56 2013 New Revision: 245373 URL: http://svnweb.freebsd.org/changeset/base/245373 Log: Partially merge Perforce changeset 219938 to head: Write FDT attachment for the Terasic MTL (multitouch LCD) driver. Exploit the fact that FDT allows multiple memory ranges to be assigned to a device, giving us a cleaner description than device.hints does. Portions of this changeset that remove mtl from BERI device.hints and add to DTS will be merged separately. Sponsored by: DARPA, AFRL Modified: head/sys/dev/terasic/mtl/terasic_mtl_fdt.c head/sys/mips/beri/files.beri Modified: head/sys/dev/terasic/mtl/terasic_mtl_fdt.c ============================================================================== --- head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Sun Jan 13 16:21:51 2013 (r245372) +++ head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Sun Jan 13 16:27:56 2013 (r245373) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Robert N. M. Watson + * Copyright (c) 2012-2013 Robert N. M. Watson * All rights reserved. * * This software was developed by SRI International and the University of @@ -48,22 +48,28 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include + #include static int -terasic_mtl_nexus_probe(device_t dev) +terasic_mtl_fdt_probe(device_t dev) { - device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); - return (BUS_PROBE_DEFAULT); + if (ofw_bus_is_compatible(dev, "cambridge,mtl")) { + device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int -terasic_mtl_nexus_attach(device_t dev) +terasic_mtl_fdt_attach(device_t dev) { struct terasic_mtl_softc *sc; - u_long pixel_maddr, text_maddr, reg_maddr; - u_long pixel_msize, text_msize, reg_msize; int error; sc = device_get_softc(dev); @@ -71,80 +77,80 @@ terasic_mtl_nexus_attach(device_t dev) sc->mtl_unit = device_get_unit(dev); /* - * Query non-standard hints to find the locations of our two memory - * regions. Enforce certain alignment and size requirements. - */ - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "reg_maddr", ®_maddr) != 0 || (reg_maddr % PAGE_SIZE != 0)) { - device_printf(dev, "improper register address"); - return (ENXIO); - } - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "reg_msize", ®_msize) != 0 || (reg_msize % PAGE_SIZE != 0)) { - device_printf(dev, "improper register size"); - return (ENXIO); - } - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "pixel_maddr", &pixel_maddr) != 0 || - (pixel_maddr % PAGE_SIZE != 0)) { - device_printf(dev, "improper pixel frame buffer address"); - return (ENXIO); - } - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "pixel_msize", &pixel_msize) != 0 || - (pixel_msize % PAGE_SIZE != 0)) { - device_printf(dev, "improper pixel frame buffer size"); - return (ENXIO); - } - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "text_maddr", &text_maddr) != 0 || - (text_maddr % PAGE_SIZE != 0)) { - device_printf(dev, "improper text frame buffer address"); - return (ENXIO); - } - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "text_msize", &text_msize) != 0 || - (text_msize % PAGE_SIZE != 0)) { - device_printf(dev, "improper text frame buffer size"); - return (ENXIO); - } - - /* - * Allocate resources. + * FDT allows multiple memory resources to be defined for a device; + * query them in the order registers, pixel buffer, text buffer. + * However, we need to sanity-check that they are page-aligned and + * page-sized, so we may still abort. */ sc->mtl_reg_rid = 0; - sc->mtl_reg_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->mtl_reg_rid, reg_maddr, reg_maddr + reg_msize - 1, - reg_msize, RF_ACTIVE); + sc->mtl_reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->mtl_reg_rid, RF_ACTIVE); if (sc->mtl_reg_res == NULL) { device_printf(dev, "couldn't map register memory\n"); error = ENXIO; goto error; } + if (rman_get_start(sc->mtl_reg_res) % PAGE_SIZE != 0) { + device_printf(dev, "improper register address"); + error = ENXIO; + goto error; + } + if (rman_get_size(sc->mtl_reg_res) % PAGE_SIZE != 0) { + device_printf(dev, "improper register size"); + error = ENXIO; + goto error; + } device_printf(sc->mtl_dev, "registers at mem %p-%p\n", - (void *)reg_maddr, (void *)(reg_maddr + reg_msize)); - sc->mtl_pixel_rid = 0; - sc->mtl_pixel_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->mtl_pixel_rid, pixel_maddr, pixel_maddr + pixel_msize - 1, - pixel_msize, RF_ACTIVE); + (void *)rman_get_start(sc->mtl_reg_res), + (void *)(rman_get_start(sc->mtl_reg_res) + + rman_get_size(sc->mtl_reg_res))); + + sc->mtl_pixel_rid = 1; + sc->mtl_pixel_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->mtl_pixel_rid, RF_ACTIVE); if (sc->mtl_pixel_res == NULL) { device_printf(dev, "couldn't map pixel memory\n"); error = ENXIO; goto error; } + if (rman_get_start(sc->mtl_pixel_res) % PAGE_SIZE != 0) { + device_printf(dev, "improper pixel address"); + error = ENXIO; + goto error; + } + if (rman_get_size(sc->mtl_pixel_res) % PAGE_SIZE != 0) { + device_printf(dev, "improper pixel size"); + error = ENXIO; + goto error; + } device_printf(sc->mtl_dev, "pixel frame buffer at mem %p-%p\n", - (void *)pixel_maddr, (void *)(pixel_maddr + pixel_msize)); - sc->mtl_text_rid = 0; - sc->mtl_text_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->mtl_text_rid, text_maddr, text_maddr + text_msize - 1, - text_msize, RF_ACTIVE); + (void *)rman_get_start(sc->mtl_pixel_res), + (void *)(rman_get_start(sc->mtl_pixel_res) + + rman_get_size(sc->mtl_pixel_res))); + + sc->mtl_text_rid = 2; + sc->mtl_text_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->mtl_text_rid, RF_ACTIVE); if (sc->mtl_text_res == NULL) { device_printf(dev, "couldn't map text memory\n"); error = ENXIO; goto error; } + if (rman_get_start(sc->mtl_text_res) % PAGE_SIZE != 0) { + device_printf(dev, "improper text address"); + error = ENXIO; + goto error; + } + if (rman_get_size(sc->mtl_text_res) % PAGE_SIZE != 0) { + device_printf(dev, "improper text size"); + error = ENXIO; + goto error; + } device_printf(sc->mtl_dev, "text frame buffer at mem %p-%p\n", - (void *)text_maddr, (void *)(text_maddr + text_msize)); + (void *)rman_get_start(sc->mtl_text_res), + (void *)(rman_get_start(sc->mtl_text_res) + + rman_get_size(sc->mtl_text_res))); + error = terasic_mtl_attach(sc); if (error == 0) return (0); @@ -162,7 +168,7 @@ error: } static int -terasic_mtl_nexus_detach(device_t dev) +terasic_mtl_fdt_detach(device_t dev) { struct terasic_mtl_softc *sc; @@ -177,20 +183,20 @@ terasic_mtl_nexus_detach(device_t dev) return (0); } -static device_method_t terasic_mtl_nexus_methods[] = { - DEVMETHOD(device_probe, terasic_mtl_nexus_probe), - DEVMETHOD(device_attach, terasic_mtl_nexus_attach), - DEVMETHOD(device_detach, terasic_mtl_nexus_detach), +static device_method_t terasic_mtl_fdt_methods[] = { + DEVMETHOD(device_probe, terasic_mtl_fdt_probe), + DEVMETHOD(device_attach, terasic_mtl_fdt_attach), + DEVMETHOD(device_detach, terasic_mtl_fdt_detach), { 0, 0 } }; -static driver_t terasic_mtl_nexus_driver = { +static driver_t terasic_mtl_fdt_driver = { "terasic_mtl", - terasic_mtl_nexus_methods, + terasic_mtl_fdt_methods, sizeof(struct terasic_mtl_softc), }; static devclass_t terasic_mtl_devclass; -DRIVER_MODULE(mtl, nexus, terasic_mtl_nexus_driver, terasic_mtl_devclass, 0, +DRIVER_MODULE(mtl, simplebus, terasic_mtl_fdt_driver, terasic_mtl_devclass, 0, 0); Modified: head/sys/mips/beri/files.beri ============================================================================== --- head/sys/mips/beri/files.beri Sun Jan 13 16:21:51 2013 (r245372) +++ head/sys/mips/beri/files.beri Sun Jan 13 16:27:56 2013 (r245373) @@ -7,6 +7,7 @@ dev/terasic/de4led/terasic_de4led.c opti dev/terasic/de4led/terasic_de4led_fdt.c optional terasic_de4led fdt dev/terasic/de4led/terasic_de4led_nexus.c optional terasic_de4led dev/terasic/mtl/terasic_mtl.c optional terasic_mtl +dev/terasic/mtl/terasic_mtl_fdt.c optional terasic_mtl fdt dev/terasic/mtl/terasic_mtl_nexus.c optional terasic_mtl dev/terasic/mtl/terasic_mtl_pixel.c optional terasic_mtl dev/terasic/mtl/terasic_mtl_reg.c optional terasic_mtl From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:36:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 141963A8; Sun, 13 Jan 2013 16:36:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E2189E40; Sun, 13 Jan 2013 16:36:36 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 58B7146B2D; Sun, 13 Jan 2013 11:36:36 -0500 (EST) Date: Sun, 13 Jan 2013 16:36:36 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andrew Thompson Subject: Re: svn commit: r245329 - head/sys/mips/beri In-Reply-To: Message-ID: References: <201301121235.r0CCZ0dI023716@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:36:37 -0000 On Sun, 13 Jan 2013, Andrew Thompson wrote: >> Merge Perforce change @219935 to head: >> >> Initialise Openfirmware/FDT code earlier in the FreeBSD/beri boot, >> so that the results will be available for configuring the console >> UART (eventually). >> >> Suggested by: thompsa > > Two Andrew Ts down south, we always get mixed up. ... but both very nice people. :-) Sorry about the mixup! Robert From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:41:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 358A6570; Sun, 13 Jan 2013 16:41:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0C710E68; Sun, 13 Jan 2013 16:41:26 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGfPJ3016507; Sun, 13 Jan 2013 16:41:25 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGfPQ7016506; Sun, 13 Jan 2013 16:41:25 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131641.r0DGfPQ7016506@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245375 - head/sys/dev/altera/avgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:41:26 -0000 Author: rwatson Date: Sun Jan 13 16:41:25 2013 New Revision: 245375 URL: http://svnweb.freebsd.org/changeset/base/245375 Log: Merge Perforce changeset 219939 to head: Start restructuring of altera_avgen(4) so that it can have an FDT attachment -- this requires first properly breaking out the current nexus attachment from the driver implementation. Sponsored by: DARPA, AFRL Added: head/sys/dev/altera/avgen/altera_avgen_nexus.c - copied unchanged from r245363, head/sys/dev/altera/avgen/altera_avgen.c Copied: head/sys/dev/altera/avgen/altera_avgen_nexus.c (from r245363, head/sys/dev/altera/avgen/altera_avgen.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/altera/avgen/altera_avgen_nexus.c Sun Jan 13 16:41:25 2013 (r245375, copy of r245363, head/sys/dev/altera/avgen/altera_avgen.c) @@ -0,0 +1,451 @@ +/*- + * Copyright (c) 2012 Robert N. M. Watson + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +/* + * Generic device driver for allowing read(), write(), and mmap() on + * memory-mapped, Avalon-attached devices. There is no actual dependence on + * Avalon, so conceivably this should just be soc_dev or similar, since many + * system-on-chip bus environments would work fine with the same code. + */ + +static d_mmap_t altera_avgen_mmap; +static d_read_t altera_avgen_read; +static d_write_t altera_avgen_write; + +static struct cdevsw avg_cdevsw = { + .d_version = D_VERSION, + .d_mmap = altera_avgen_mmap, + .d_read = altera_avgen_read, + .d_write = altera_avgen_write, + .d_name = "altera_avgen", +}; + +static int +altera_avgen_read(struct cdev *dev, struct uio *uio, int flag) +{ + struct altera_avgen_softc *sc; + u_long offset, size; +#ifdef NOTYET + uint64_t v8; +#endif + uint32_t v4; + uint16_t v2; + uint8_t v1; + u_int width; + int error; + + sc = dev->si_drv1; + if ((sc->avg_flags & ALTERA_AVALON_FLAG_READ) == 0) + return (EACCES); + width = sc->avg_width; + if (uio->uio_offset < 0 || uio->uio_offset % width != 0 || + uio->uio_resid % width != 0) + return (ENODEV); + size = rman_get_size(sc->avg_res); + if ((uio->uio_offset + uio->uio_resid < 0) || + (uio->uio_offset + uio->uio_resid > size)) + return (ENODEV); + while (uio->uio_resid > 0) { + offset = uio->uio_offset; + if (offset + width > size) + return (ENODEV); + switch (width) { + case 1: + v1 = bus_read_1(sc->avg_res, offset); + error = uiomove(&v1, sizeof(v1), uio); + break; + + case 2: + v2 = bus_read_2(sc->avg_res, offset); + error = uiomove(&v2, sizeof(v2), uio); + break; + + case 4: + v4 = bus_read_4(sc->avg_res, offset); + error = uiomove(&v4, sizeof(v4), uio); + break; + +#ifdef NOTYET + case 8: + v8 = bus_read_8(sc->avg_res, offset); + error = uiomove(&v8, sizeof(v8), uio); + break; + +#endif + + default: + panic("%s: unexpected widthment %u", __func__, width); + } + if (error) + return (error); + } + return (0); +} + +static int +altera_avgen_write(struct cdev *dev, struct uio *uio, int flag) +{ + struct altera_avgen_softc *sc; + u_long offset, size; +#ifdef NOTYET + uint64_t v8; +#endif + uint32_t v4; + uint16_t v2; + uint8_t v1; + u_int width; + int error; + + sc = dev->si_drv1; + if ((sc->avg_flags & ALTERA_AVALON_FLAG_WRITE) == 0) + return (EACCES); + width = sc->avg_width; + if (uio->uio_offset < 0 || uio->uio_offset % width != 0 || + uio->uio_resid % width != 0) + return (ENODEV); + size = rman_get_size(sc->avg_res); + while (uio->uio_resid > 0) { + offset = uio->uio_offset; + if (offset + width > size) + return (ENODEV); + switch (width) { + case 1: + error = uiomove(&v1, sizeof(v1), uio); + if (error) + return (error); + bus_write_1(sc->avg_res, offset, v1); + break; + + case 2: + error = uiomove(&v2, sizeof(v2), uio); + if (error) + return (error); + bus_write_2(sc->avg_res, offset, v2); + break; + + case 4: + error = uiomove(&v4, sizeof(v4), uio); + if (error) + return (error); + bus_write_4(sc->avg_res, offset, v4); + break; + +#ifdef NOTYET + case 8: + error = uiomove(&v8, sizeof(v8), uio); + if (error) + return (error); + bus_write_8(sc->avg_res, offset, v8); + break; +#endif + + default: + panic("%s: unexpected width %u", __func__, width); + } + } + return (0); +} + +static int +altera_avgen_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, + int nprot, vm_memattr_t *memattr) +{ + struct altera_avgen_softc *sc; + + sc = dev->si_drv1; + if (nprot & VM_PROT_READ) { + if ((sc->avg_flags & ALTERA_AVALON_FLAG_MMAP_READ) == 0) + return (EACCES); + } + if (nprot & VM_PROT_WRITE) { + if ((sc->avg_flags & ALTERA_AVALON_FLAG_MMAP_WRITE) == 0) + return (EACCES); + } + if (nprot & VM_PROT_EXECUTE) { + if ((sc->avg_flags & ALTERA_AVALON_FLAG_MMAP_EXEC) == 0) + return (EACCES); + } + if (trunc_page(offset) == offset && + rman_get_size(sc->avg_res) >= offset + PAGE_SIZE) { + *paddr = rman_get_start(sc->avg_res) + offset; + *memattr = VM_MEMATTR_UNCACHEABLE; + } else + return (ENODEV); + return (0); +} + +static int +altera_avgen_nexus_probe(device_t dev) +{ + + device_set_desc(dev, "Generic Altera Avalon device attachment"); + return (BUS_PROBE_DEFAULT); +} + +static int +altera_avgen_process_options(struct altera_avgen_softc *sc, + const char *str_fileio, const char *str_mmapio, const char *str_devname, + int devunit) +{ + const char *cp; + device_t dev = sc->avg_dev; + + /* + * Check for valid combinations of options. + */ + if (str_fileio == NULL && str_mmapio == NULL) { + device_printf(dev, + "at least one of %s or %s must be specified\n", + ALTERA_AVALON_STR_FILEIO, ALTERA_AVALON_STR_MMAPIO); + return (ENXIO); + } + if (str_devname == NULL && devunit != -1) { + device_printf(dev, "%s requires %s be specified\n", + ALTERA_AVALON_STR_DEVUNIT, ALTERA_AVALON_STR_DEVNAME); + return (ENXIO); + } + + /* + * Extract, digest, and save values. + */ + switch (sc->avg_width) { + case 1: + case 2: + case 4: +#ifdef NOTYET + case 8: +#endif + break; + + default: + device_printf(dev, "%s unsupported value %u\n", + ALTERA_AVALON_STR_WIDTH, sc->avg_width); + return (ENXIO); + } + sc->avg_flags = 0; + if (str_fileio != NULL) { + for (cp = str_fileio; *cp != '\0'; cp++) { + switch (*cp) { + case ALTERA_AVALON_CHAR_READ: + sc->avg_flags |= ALTERA_AVALON_FLAG_READ; + break; + + case ALTERA_AVALON_CHAR_WRITE: + sc->avg_flags |= ALTERA_AVALON_FLAG_WRITE; + break; + + default: + device_printf(dev, + "invalid %s character %c\n", + ALTERA_AVALON_STR_FILEIO, *cp); + return (ENXIO); + } + } + } + if (str_mmapio != NULL) { + for (cp = str_mmapio; *cp != '\0'; cp++) { + switch (*cp) { + case ALTERA_AVALON_CHAR_READ: + sc->avg_flags |= ALTERA_AVALON_FLAG_MMAP_READ; + break; + + case ALTERA_AVALON_CHAR_WRITE: + sc->avg_flags |= + ALTERA_AVALON_FLAG_MMAP_WRITE; + break; + + case ALTERA_AVALON_CHAR_EXEC: + sc->avg_flags |= ALTERA_AVALON_FLAG_MMAP_EXEC; + break; + + default: + device_printf(dev, + "invalid %s character %c\n", + ALTERA_AVALON_STR_MMAPIO, *cp); + return (ENXIO); + } + } + } + return (0); +} + +static int +altera_avgen_nexus_attach(device_t dev) +{ + struct altera_avgen_softc *sc; + const char *str_fileio, *str_mmapio; + const char *str_devname; + char devname[SPECNAMELEN + 1]; + int devunit, error; + + sc = device_get_softc(dev); + sc->avg_dev = dev; + sc->avg_unit = device_get_unit(dev); + + /* + * Query non-standard hints to find out what operations are permitted + * on the device, and whether it is cached. + */ + str_fileio = NULL; + str_mmapio = NULL; + str_devname = NULL; + devunit = -1; + sc->avg_width = 1; + error = resource_int_value(device_get_name(dev), device_get_unit(dev), + ALTERA_AVALON_STR_WIDTH, &sc->avg_width); + if (error != 0 && error != ENOENT) { + device_printf(dev, "invalid %s\n", ALTERA_AVALON_STR_WIDTH); + return (error); + } + (void)resource_string_value(device_get_name(dev), + device_get_unit(dev), ALTERA_AVALON_STR_FILEIO, &str_fileio); + (void)resource_string_value(device_get_name(dev), + device_get_unit(dev), ALTERA_AVALON_STR_MMAPIO, &str_mmapio); + (void)resource_string_value(device_get_name(dev), + device_get_unit(dev), ALTERA_AVALON_STR_DEVNAME, &str_devname); + (void)resource_int_value(device_get_name(dev), device_get_unit(dev), + ALTERA_AVALON_STR_DEVUNIT, &devunit); + error = altera_avgen_process_options(sc, str_fileio, str_mmapio, + str_devname, devunit); + if (error) + return (error); + + /* Select a device name. */ + if (str_devname != NULL) { + if (devunit != -1) + (void)snprintf(devname, sizeof(devname), "%s%d", + str_devname, devunit); + else + (void)snprintf(devname, sizeof(devname), "%s", + str_devname); + } else + snprintf(devname, sizeof(devname), "%s%d", "avgen", + sc->avg_unit); + + /* Memory allocation and checking. */ + sc->avg_rid = 0; + sc->avg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->avg_rid, RF_ACTIVE); + if (sc->avg_res == NULL) { + device_printf(dev, "couldn't map memory\n"); + return (ENXIO); + } + if (rman_get_size(sc->avg_res) >= PAGE_SIZE || str_mmapio != NULL) { + if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) { + device_printf(dev, + "memory region not even multiple of page size\n"); + error = ENXIO; + goto error; + } + if (rman_get_start(sc->avg_res) % PAGE_SIZE != 0) { + device_printf(dev, "memory region not page-aligned\n"); + error = ENXIO; + goto error; + } + } + + /* Device node allocation. */ + if (str_devname == NULL) { + str_devname = "altera_avgen%d"; + devunit = sc->avg_unit; + } + if (devunit != -1) + sc->avg_cdev = make_dev(&avg_cdevsw, sc->avg_unit, UID_ROOT, + GID_WHEEL, S_IRUSR | S_IWUSR, str_devname, devunit); + else + sc->avg_cdev = make_dev(&avg_cdevsw, sc->avg_unit, UID_ROOT, + GID_WHEEL, S_IRUSR | S_IWUSR, str_devname); + if (sc->avg_cdev == NULL) { + device_printf(sc->avg_dev, "%s: make_dev failed\n", __func__); + error = ENXIO; + goto error; + } + /* XXXRW: Slight race between make_dev(9) and here. */ + sc->avg_cdev->si_drv1 = sc; + return (0); + +error: + bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); + return (error); +} + +static int +altera_avgen_nexus_detach(device_t dev) +{ + struct altera_avgen_softc *sc; + + sc = device_get_softc(dev); + destroy_dev(sc->avg_cdev); + bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); + return (0); +} + +static device_method_t altera_avgen_nexus_methods[] = { + DEVMETHOD(device_probe, altera_avgen_nexus_probe), + DEVMETHOD(device_attach, altera_avgen_nexus_attach), + DEVMETHOD(device_detach, altera_avgen_nexus_detach), + { 0, 0 } +}; + +static driver_t altera_avgen_nexus_driver = { + "altera_avgen", + altera_avgen_nexus_methods, + sizeof(struct altera_avgen_softc), +}; + +static devclass_t altera_avgen_devclass; + +DRIVER_MODULE(avgen, nexus, altera_avgen_nexus_driver, altera_avgen_devclass, + 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:44:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CF7077D0; Sun, 13 Jan 2013 16:44:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C0EDEE7F; Sun, 13 Jan 2013 16:44:00 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGi0k8016945; Sun, 13 Jan 2013 16:44:00 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGi0nw016938; Sun, 13 Jan 2013 16:44:00 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131644.r0DGi0nw016938@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245376 - in head/sys: conf dev/altera/avgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:44:00 -0000 Author: rwatson Date: Sun Jan 13 16:43:59 2013 New Revision: 245376 URL: http://svnweb.freebsd.org/changeset/base/245376 Log: Merge Perforce changeset 219940 to head: Rework altera_avgen(4) to cleanly(ish) separate nexus bus attachment from the driver itself. This should allow us to plug in an fdt attachment more easily. Sponsored by: DARPA, AFRL Modified: head/sys/conf/files head/sys/dev/altera/avgen/altera_avgen.c head/sys/dev/altera/avgen/altera_avgen.h head/sys/dev/altera/avgen/altera_avgen_nexus.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 13 16:41:25 2013 (r245375) +++ head/sys/conf/files Sun Jan 13 16:43:59 2013 (r245376) @@ -638,6 +638,7 @@ dev/aic7xxx/aic7xxx_pci.c optional ahc p dev/alc/if_alc.c optional alc pci dev/ale/if_ale.c optional ale pci dev/altera/avgen/altera_avgen.c optional altera_avgen +dev/altera/avgen/altera_avgen_nexus.c optional altera_avgen dev/altera/sdcard/altera_sdcard.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_disk.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_io.c optional altera_sdcard Modified: head/sys/dev/altera/avgen/altera_avgen.c ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen.c Sun Jan 13 16:41:25 2013 (r245375) +++ head/sys/dev/altera/avgen/altera_avgen.c Sun Jan 13 16:43:59 2013 (r245376) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Robert N. M. Watson + * Copyright (c) 2012-2013 Robert N. M. Watson * All rights reserved. * * This software was developed by SRI International and the University of @@ -226,13 +226,6 @@ altera_avgen_mmap(struct cdev *dev, vm_o return (0); } -static int -altera_avgen_nexus_probe(device_t dev) -{ - - device_set_desc(dev, "Generic Altera Avalon device attachment"); - return (BUS_PROBE_DEFAULT); -} static int altera_avgen_process_options(struct altera_avgen_softc *sc, @@ -321,42 +314,14 @@ altera_avgen_process_options(struct alte return (0); } -static int -altera_avgen_nexus_attach(device_t dev) +int +altera_avgen_attach(struct altera_avgen_softc *sc, const char *str_fileio, + const char *str_mmapio, const char *str_devname, int devunit) { - struct altera_avgen_softc *sc; - const char *str_fileio, *str_mmapio; - const char *str_devname; + device_t dev = sc->avg_dev; char devname[SPECNAMELEN + 1]; - int devunit, error; - - sc = device_get_softc(dev); - sc->avg_dev = dev; - sc->avg_unit = device_get_unit(dev); + int error; - /* - * Query non-standard hints to find out what operations are permitted - * on the device, and whether it is cached. - */ - str_fileio = NULL; - str_mmapio = NULL; - str_devname = NULL; - devunit = -1; - sc->avg_width = 1; - error = resource_int_value(device_get_name(dev), device_get_unit(dev), - ALTERA_AVALON_STR_WIDTH, &sc->avg_width); - if (error != 0 && error != ENOENT) { - device_printf(dev, "invalid %s\n", ALTERA_AVALON_STR_WIDTH); - return (error); - } - (void)resource_string_value(device_get_name(dev), - device_get_unit(dev), ALTERA_AVALON_STR_FILEIO, &str_fileio); - (void)resource_string_value(device_get_name(dev), - device_get_unit(dev), ALTERA_AVALON_STR_MMAPIO, &str_mmapio); - (void)resource_string_value(device_get_name(dev), - device_get_unit(dev), ALTERA_AVALON_STR_DEVNAME, &str_devname); - (void)resource_int_value(device_get_name(dev), device_get_unit(dev), - ALTERA_AVALON_STR_DEVUNIT, &devunit); error = altera_avgen_process_options(sc, str_fileio, str_mmapio, str_devname, devunit); if (error) @@ -374,25 +339,15 @@ altera_avgen_nexus_attach(device_t dev) snprintf(devname, sizeof(devname), "%s%d", "avgen", sc->avg_unit); - /* Memory allocation and checking. */ - sc->avg_rid = 0; - sc->avg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->avg_rid, RF_ACTIVE); - if (sc->avg_res == NULL) { - device_printf(dev, "couldn't map memory\n"); - return (ENXIO); - } if (rman_get_size(sc->avg_res) >= PAGE_SIZE || str_mmapio != NULL) { if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) { device_printf(dev, "memory region not even multiple of page size\n"); - error = ENXIO; - goto error; + return (ENXIO); } if (rman_get_start(sc->avg_res) % PAGE_SIZE != 0) { device_printf(dev, "memory region not page-aligned\n"); - error = ENXIO; - goto error; + return (ENXIO); } } @@ -409,43 +364,16 @@ altera_avgen_nexus_attach(device_t dev) GID_WHEEL, S_IRUSR | S_IWUSR, str_devname); if (sc->avg_cdev == NULL) { device_printf(sc->avg_dev, "%s: make_dev failed\n", __func__); - error = ENXIO; - goto error; + return (ENXIO); } /* XXXRW: Slight race between make_dev(9) and here. */ sc->avg_cdev->si_drv1 = sc; return (0); - -error: - bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); - return (error); } -static int -altera_avgen_nexus_detach(device_t dev) +void +altera_avgen_detach(struct altera_avgen_softc *sc) { - struct altera_avgen_softc *sc; - sc = device_get_softc(dev); destroy_dev(sc->avg_cdev); - bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); - return (0); } - -static device_method_t altera_avgen_nexus_methods[] = { - DEVMETHOD(device_probe, altera_avgen_nexus_probe), - DEVMETHOD(device_attach, altera_avgen_nexus_attach), - DEVMETHOD(device_detach, altera_avgen_nexus_detach), - { 0, 0 } -}; - -static driver_t altera_avgen_nexus_driver = { - "altera_avgen", - altera_avgen_nexus_methods, - sizeof(struct altera_avgen_softc), -}; - -static devclass_t altera_avgen_devclass; - -DRIVER_MODULE(avgen, nexus, altera_avgen_nexus_driver, altera_avgen_devclass, - 0, 0); Modified: head/sys/dev/altera/avgen/altera_avgen.h ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen.h Sun Jan 13 16:41:25 2013 (r245375) +++ head/sys/dev/altera/avgen/altera_avgen.h Sun Jan 13 16:43:59 2013 (r245376) @@ -77,7 +77,9 @@ struct altera_avgen_softc { /* * Driver setup routines from the bus attachment/teardown. */ -int altera_avgen_attach(struct altera_avgen_softc *sc); +int altera_avgen_attach(struct altera_avgen_softc *sc, + const char *str_fileio, const char *str_mmapio, + const char *str_devname, int devunit); void altera_avgen_detach(struct altera_avgen_softc *sc); #endif /* _DEV_ALTERA_AVALON_H_ */ Modified: head/sys/dev/altera/avgen/altera_avgen_nexus.c ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen_nexus.c Sun Jan 13 16:41:25 2013 (r245375) +++ head/sys/dev/altera/avgen/altera_avgen_nexus.c Sun Jan 13 16:43:59 2013 (r245376) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Robert N. M. Watson + * Copyright (c) 2012-2013 Robert N. M. Watson * All rights reserved. * * This software was developed by SRI International and the University of @@ -53,179 +53,6 @@ __FBSDID("$FreeBSD$"); #include -/* - * Generic device driver for allowing read(), write(), and mmap() on - * memory-mapped, Avalon-attached devices. There is no actual dependence on - * Avalon, so conceivably this should just be soc_dev or similar, since many - * system-on-chip bus environments would work fine with the same code. - */ - -static d_mmap_t altera_avgen_mmap; -static d_read_t altera_avgen_read; -static d_write_t altera_avgen_write; - -static struct cdevsw avg_cdevsw = { - .d_version = D_VERSION, - .d_mmap = altera_avgen_mmap, - .d_read = altera_avgen_read, - .d_write = altera_avgen_write, - .d_name = "altera_avgen", -}; - -static int -altera_avgen_read(struct cdev *dev, struct uio *uio, int flag) -{ - struct altera_avgen_softc *sc; - u_long offset, size; -#ifdef NOTYET - uint64_t v8; -#endif - uint32_t v4; - uint16_t v2; - uint8_t v1; - u_int width; - int error; - - sc = dev->si_drv1; - if ((sc->avg_flags & ALTERA_AVALON_FLAG_READ) == 0) - return (EACCES); - width = sc->avg_width; - if (uio->uio_offset < 0 || uio->uio_offset % width != 0 || - uio->uio_resid % width != 0) - return (ENODEV); - size = rman_get_size(sc->avg_res); - if ((uio->uio_offset + uio->uio_resid < 0) || - (uio->uio_offset + uio->uio_resid > size)) - return (ENODEV); - while (uio->uio_resid > 0) { - offset = uio->uio_offset; - if (offset + width > size) - return (ENODEV); - switch (width) { - case 1: - v1 = bus_read_1(sc->avg_res, offset); - error = uiomove(&v1, sizeof(v1), uio); - break; - - case 2: - v2 = bus_read_2(sc->avg_res, offset); - error = uiomove(&v2, sizeof(v2), uio); - break; - - case 4: - v4 = bus_read_4(sc->avg_res, offset); - error = uiomove(&v4, sizeof(v4), uio); - break; - -#ifdef NOTYET - case 8: - v8 = bus_read_8(sc->avg_res, offset); - error = uiomove(&v8, sizeof(v8), uio); - break; - -#endif - - default: - panic("%s: unexpected widthment %u", __func__, width); - } - if (error) - return (error); - } - return (0); -} - -static int -altera_avgen_write(struct cdev *dev, struct uio *uio, int flag) -{ - struct altera_avgen_softc *sc; - u_long offset, size; -#ifdef NOTYET - uint64_t v8; -#endif - uint32_t v4; - uint16_t v2; - uint8_t v1; - u_int width; - int error; - - sc = dev->si_drv1; - if ((sc->avg_flags & ALTERA_AVALON_FLAG_WRITE) == 0) - return (EACCES); - width = sc->avg_width; - if (uio->uio_offset < 0 || uio->uio_offset % width != 0 || - uio->uio_resid % width != 0) - return (ENODEV); - size = rman_get_size(sc->avg_res); - while (uio->uio_resid > 0) { - offset = uio->uio_offset; - if (offset + width > size) - return (ENODEV); - switch (width) { - case 1: - error = uiomove(&v1, sizeof(v1), uio); - if (error) - return (error); - bus_write_1(sc->avg_res, offset, v1); - break; - - case 2: - error = uiomove(&v2, sizeof(v2), uio); - if (error) - return (error); - bus_write_2(sc->avg_res, offset, v2); - break; - - case 4: - error = uiomove(&v4, sizeof(v4), uio); - if (error) - return (error); - bus_write_4(sc->avg_res, offset, v4); - break; - -#ifdef NOTYET - case 8: - error = uiomove(&v8, sizeof(v8), uio); - if (error) - return (error); - bus_write_8(sc->avg_res, offset, v8); - break; -#endif - - default: - panic("%s: unexpected width %u", __func__, width); - } - } - return (0); -} - -static int -altera_avgen_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, - int nprot, vm_memattr_t *memattr) -{ - struct altera_avgen_softc *sc; - - sc = dev->si_drv1; - if (nprot & VM_PROT_READ) { - if ((sc->avg_flags & ALTERA_AVALON_FLAG_MMAP_READ) == 0) - return (EACCES); - } - if (nprot & VM_PROT_WRITE) { - if ((sc->avg_flags & ALTERA_AVALON_FLAG_MMAP_WRITE) == 0) - return (EACCES); - } - if (nprot & VM_PROT_EXECUTE) { - if ((sc->avg_flags & ALTERA_AVALON_FLAG_MMAP_EXEC) == 0) - return (EACCES); - } - if (trunc_page(offset) == offset && - rman_get_size(sc->avg_res) >= offset + PAGE_SIZE) { - *paddr = rman_get_start(sc->avg_res) + offset; - *memattr = VM_MEMATTR_UNCACHEABLE; - } else - return (ENODEV); - return (0); -} - static int altera_avgen_nexus_probe(device_t dev) { @@ -235,99 +62,11 @@ altera_avgen_nexus_probe(device_t dev) } static int -altera_avgen_process_options(struct altera_avgen_softc *sc, - const char *str_fileio, const char *str_mmapio, const char *str_devname, - int devunit) -{ - const char *cp; - device_t dev = sc->avg_dev; - - /* - * Check for valid combinations of options. - */ - if (str_fileio == NULL && str_mmapio == NULL) { - device_printf(dev, - "at least one of %s or %s must be specified\n", - ALTERA_AVALON_STR_FILEIO, ALTERA_AVALON_STR_MMAPIO); - return (ENXIO); - } - if (str_devname == NULL && devunit != -1) { - device_printf(dev, "%s requires %s be specified\n", - ALTERA_AVALON_STR_DEVUNIT, ALTERA_AVALON_STR_DEVNAME); - return (ENXIO); - } - - /* - * Extract, digest, and save values. - */ - switch (sc->avg_width) { - case 1: - case 2: - case 4: -#ifdef NOTYET - case 8: -#endif - break; - - default: - device_printf(dev, "%s unsupported value %u\n", - ALTERA_AVALON_STR_WIDTH, sc->avg_width); - return (ENXIO); - } - sc->avg_flags = 0; - if (str_fileio != NULL) { - for (cp = str_fileio; *cp != '\0'; cp++) { - switch (*cp) { - case ALTERA_AVALON_CHAR_READ: - sc->avg_flags |= ALTERA_AVALON_FLAG_READ; - break; - - case ALTERA_AVALON_CHAR_WRITE: - sc->avg_flags |= ALTERA_AVALON_FLAG_WRITE; - break; - - default: - device_printf(dev, - "invalid %s character %c\n", - ALTERA_AVALON_STR_FILEIO, *cp); - return (ENXIO); - } - } - } - if (str_mmapio != NULL) { - for (cp = str_mmapio; *cp != '\0'; cp++) { - switch (*cp) { - case ALTERA_AVALON_CHAR_READ: - sc->avg_flags |= ALTERA_AVALON_FLAG_MMAP_READ; - break; - - case ALTERA_AVALON_CHAR_WRITE: - sc->avg_flags |= - ALTERA_AVALON_FLAG_MMAP_WRITE; - break; - - case ALTERA_AVALON_CHAR_EXEC: - sc->avg_flags |= ALTERA_AVALON_FLAG_MMAP_EXEC; - break; - - default: - device_printf(dev, - "invalid %s character %c\n", - ALTERA_AVALON_STR_MMAPIO, *cp); - return (ENXIO); - } - } - } - return (0); -} - -static int altera_avgen_nexus_attach(device_t dev) { struct altera_avgen_softc *sc; const char *str_fileio, *str_mmapio; const char *str_devname; - char devname[SPECNAMELEN + 1]; int devunit, error; sc = device_get_softc(dev); @@ -357,22 +96,6 @@ altera_avgen_nexus_attach(device_t dev) device_get_unit(dev), ALTERA_AVALON_STR_DEVNAME, &str_devname); (void)resource_int_value(device_get_name(dev), device_get_unit(dev), ALTERA_AVALON_STR_DEVUNIT, &devunit); - error = altera_avgen_process_options(sc, str_fileio, str_mmapio, - str_devname, devunit); - if (error) - return (error); - - /* Select a device name. */ - if (str_devname != NULL) { - if (devunit != -1) - (void)snprintf(devname, sizeof(devname), "%s%d", - str_devname, devunit); - else - (void)snprintf(devname, sizeof(devname), "%s", - str_devname); - } else - snprintf(devname, sizeof(devname), "%s%d", "avgen", - sc->avg_unit); /* Memory allocation and checking. */ sc->avg_rid = 0; @@ -382,42 +105,11 @@ altera_avgen_nexus_attach(device_t dev) device_printf(dev, "couldn't map memory\n"); return (ENXIO); } - if (rman_get_size(sc->avg_res) >= PAGE_SIZE || str_mmapio != NULL) { - if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) { - device_printf(dev, - "memory region not even multiple of page size\n"); - error = ENXIO; - goto error; - } - if (rman_get_start(sc->avg_res) % PAGE_SIZE != 0) { - device_printf(dev, "memory region not page-aligned\n"); - error = ENXIO; - goto error; - } - } - - /* Device node allocation. */ - if (str_devname == NULL) { - str_devname = "altera_avgen%d"; - devunit = sc->avg_unit; - } - if (devunit != -1) - sc->avg_cdev = make_dev(&avg_cdevsw, sc->avg_unit, UID_ROOT, - GID_WHEEL, S_IRUSR | S_IWUSR, str_devname, devunit); - else - sc->avg_cdev = make_dev(&avg_cdevsw, sc->avg_unit, UID_ROOT, - GID_WHEEL, S_IRUSR | S_IWUSR, str_devname); - if (sc->avg_cdev == NULL) { - device_printf(sc->avg_dev, "%s: make_dev failed\n", __func__); - error = ENXIO; - goto error; - } - /* XXXRW: Slight race between make_dev(9) and here. */ - sc->avg_cdev->si_drv1 = sc; - return (0); - -error: - bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); + error = altera_avgen_attach(sc, str_fileio, str_mmapio, str_devname, + devunit); + if (error != 0) + bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, + sc->avg_res); return (error); } @@ -427,7 +119,7 @@ altera_avgen_nexus_detach(device_t dev) struct altera_avgen_softc *sc; sc = device_get_softc(dev); - destroy_dev(sc->avg_cdev); + altera_avgen_detach(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:44:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 955EF94C; Sun, 13 Jan 2013 16:44:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79068E8A; Sun, 13 Jan 2013 16:44:46 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGikgF017068; Sun, 13 Jan 2013 16:44:46 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGikj7017067; Sun, 13 Jan 2013 16:44:46 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131644.r0DGikj7017067@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245377 - head/sys/dev/altera/avgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:44:46 -0000 Author: rwatson Date: Sun Jan 13 16:44:45 2013 New Revision: 245377 URL: http://svnweb.freebsd.org/changeset/base/245377 Log: Merge Perforce changeset 219941 to head: Copy altera_avgen(4) nexus attachment as a starting point for an FDT attachment. Sponsored by: DARPA, AFRL Added: head/sys/dev/altera/avgen/altera_avgen_fdt.c - copied unchanged from r245376, head/sys/dev/altera/avgen/altera_avgen_nexus.c Copied: head/sys/dev/altera/avgen/altera_avgen_fdt.c (from r245376, head/sys/dev/altera/avgen/altera_avgen_nexus.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/altera/avgen/altera_avgen_fdt.c Sun Jan 13 16:44:45 2013 (r245377, copy of r245376, head/sys/dev/altera/avgen/altera_avgen_nexus.c) @@ -0,0 +1,143 @@ +/*- + * Copyright (c) 2012-2013 Robert N. M. Watson + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +static int +altera_avgen_nexus_probe(device_t dev) +{ + + device_set_desc(dev, "Generic Altera Avalon device attachment"); + return (BUS_PROBE_DEFAULT); +} + +static int +altera_avgen_nexus_attach(device_t dev) +{ + struct altera_avgen_softc *sc; + const char *str_fileio, *str_mmapio; + const char *str_devname; + int devunit, error; + + sc = device_get_softc(dev); + sc->avg_dev = dev; + sc->avg_unit = device_get_unit(dev); + + /* + * Query non-standard hints to find out what operations are permitted + * on the device, and whether it is cached. + */ + str_fileio = NULL; + str_mmapio = NULL; + str_devname = NULL; + devunit = -1; + sc->avg_width = 1; + error = resource_int_value(device_get_name(dev), device_get_unit(dev), + ALTERA_AVALON_STR_WIDTH, &sc->avg_width); + if (error != 0 && error != ENOENT) { + device_printf(dev, "invalid %s\n", ALTERA_AVALON_STR_WIDTH); + return (error); + } + (void)resource_string_value(device_get_name(dev), + device_get_unit(dev), ALTERA_AVALON_STR_FILEIO, &str_fileio); + (void)resource_string_value(device_get_name(dev), + device_get_unit(dev), ALTERA_AVALON_STR_MMAPIO, &str_mmapio); + (void)resource_string_value(device_get_name(dev), + device_get_unit(dev), ALTERA_AVALON_STR_DEVNAME, &str_devname); + (void)resource_int_value(device_get_name(dev), device_get_unit(dev), + ALTERA_AVALON_STR_DEVUNIT, &devunit); + + /* Memory allocation and checking. */ + sc->avg_rid = 0; + sc->avg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->avg_rid, RF_ACTIVE); + if (sc->avg_res == NULL) { + device_printf(dev, "couldn't map memory\n"); + return (ENXIO); + } + error = altera_avgen_attach(sc, str_fileio, str_mmapio, str_devname, + devunit); + if (error != 0) + bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, + sc->avg_res); + return (error); +} + +static int +altera_avgen_nexus_detach(device_t dev) +{ + struct altera_avgen_softc *sc; + + sc = device_get_softc(dev); + altera_avgen_detach(sc); + bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); + return (0); +} + +static device_method_t altera_avgen_nexus_methods[] = { + DEVMETHOD(device_probe, altera_avgen_nexus_probe), + DEVMETHOD(device_attach, altera_avgen_nexus_attach), + DEVMETHOD(device_detach, altera_avgen_nexus_detach), + { 0, 0 } +}; + +static driver_t altera_avgen_nexus_driver = { + "altera_avgen", + altera_avgen_nexus_methods, + sizeof(struct altera_avgen_softc), +}; + +static devclass_t altera_avgen_devclass; + +DRIVER_MODULE(avgen, nexus, altera_avgen_nexus_driver, altera_avgen_devclass, + 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:51:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id ABCE8B36; Sun, 13 Jan 2013 16:51:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8F31DEBD; Sun, 13 Jan 2013 16:51:58 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGpwut019581; Sun, 13 Jan 2013 16:51:58 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGpw3m019579; Sun, 13 Jan 2013 16:51:58 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131651.r0DGpw3m019579@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245378 - in head/sys: conf dev/altera/avgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:51:58 -0000 Author: rwatson Date: Sun Jan 13 16:51:57 2013 New Revision: 245378 URL: http://svnweb.freebsd.org/changeset/base/245378 Log: Partially merge Perforce changeset 219942 to head: Implement an FDT attachment for altera_avgen(4). Portions of the changeset updating DTS and device.hints will be merged separately. Sponsored by: DARPA, AFRL Modified: head/sys/conf/files head/sys/dev/altera/avgen/altera_avgen_fdt.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 13 16:44:45 2013 (r245377) +++ head/sys/conf/files Sun Jan 13 16:51:57 2013 (r245378) @@ -638,6 +638,7 @@ dev/aic7xxx/aic7xxx_pci.c optional ahc p dev/alc/if_alc.c optional alc pci dev/ale/if_ale.c optional ale pci dev/altera/avgen/altera_avgen.c optional altera_avgen +dev/altera/avgen/altera_avgen_fdt.c optional altera_avgen fdt dev/altera/avgen/altera_avgen_nexus.c optional altera_avgen dev/altera/sdcard/altera_sdcard.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_disk.c optional altera_sdcard Modified: head/sys/dev/altera/avgen/altera_avgen_fdt.c ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen_fdt.c Sun Jan 13 16:44:45 2013 (r245377) +++ head/sys/dev/altera/avgen/altera_avgen_fdt.c Sun Jan 13 16:51:57 2013 (r245378) @@ -51,22 +51,32 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include +#include + #include static int -altera_avgen_nexus_probe(device_t dev) +altera_avgen_fdt_probe(device_t dev) { - device_set_desc(dev, "Generic Altera Avalon device attachment"); - return (BUS_PROBE_DEFAULT); + if (ofw_bus_is_compatible(dev, "sri-cambridge,avgen")) { + device_set_desc(dev, "Generic Altera Avalon device attachment"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int -altera_avgen_nexus_attach(device_t dev) +altera_avgen_fdt_attach(device_t dev) { struct altera_avgen_softc *sc; - const char *str_fileio, *str_mmapio; - const char *str_devname; + char *str_fileio, *str_mmapio; + char *str_devname; + phandle_t node; + pcell_t cell; int devunit, error; sc = device_get_softc(dev); @@ -74,28 +84,25 @@ altera_avgen_nexus_attach(device_t dev) sc->avg_unit = device_get_unit(dev); /* - * Query non-standard hints to find out what operations are permitted - * on the device, and whether it is cached. + * Query driver-specific OpenFirmware properties to determine how to + * expose the device via /dev. */ str_fileio = NULL; str_mmapio = NULL; str_devname = NULL; devunit = -1; sc->avg_width = 1; - error = resource_int_value(device_get_name(dev), device_get_unit(dev), - ALTERA_AVALON_STR_WIDTH, &sc->avg_width); - if (error != 0 && error != ENOENT) { - device_printf(dev, "invalid %s\n", ALTERA_AVALON_STR_WIDTH); - return (error); - } - (void)resource_string_value(device_get_name(dev), - device_get_unit(dev), ALTERA_AVALON_STR_FILEIO, &str_fileio); - (void)resource_string_value(device_get_name(dev), - device_get_unit(dev), ALTERA_AVALON_STR_MMAPIO, &str_mmapio); - (void)resource_string_value(device_get_name(dev), - device_get_unit(dev), ALTERA_AVALON_STR_DEVNAME, &str_devname); - (void)resource_int_value(device_get_name(dev), device_get_unit(dev), - ALTERA_AVALON_STR_DEVUNIT, &devunit); + node = ofw_bus_get_node(dev); + if (OF_getprop(node, "sri-cambridge,width", &cell, sizeof(cell)) > 0) + sc->avg_width = cell; + (void)OF_getprop_alloc(node, "sri-cambridge,fileio", sizeof(char), + (void **)&str_fileio); + (void)OF_getprop_alloc(node, "sri-cambridge,mmapio", sizeof(char), + (void **)&str_mmapio); + (void)OF_getprop_alloc(node, "sri-cambridge,devname", sizeof(char), + (void **)&str_devname); + if (OF_getprop(node, "sri-cambridge,devunit", &cell, sizeof(cell)) > 0) + devunit = cell; /* Memory allocation and checking. */ sc->avg_rid = 0; @@ -110,11 +117,17 @@ altera_avgen_nexus_attach(device_t dev) if (error != 0) bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); + if (str_fileio != NULL) + free(str_fileio, M_OFWPROP); + if (str_mmapio != NULL) + free(str_mmapio, M_OFWPROP); + if (str_devname != NULL) + free(str_devname, M_OFWPROP); return (error); } static int -altera_avgen_nexus_detach(device_t dev) +altera_avgen_fdt_detach(device_t dev) { struct altera_avgen_softc *sc; @@ -124,20 +137,20 @@ altera_avgen_nexus_detach(device_t dev) return (0); } -static device_method_t altera_avgen_nexus_methods[] = { - DEVMETHOD(device_probe, altera_avgen_nexus_probe), - DEVMETHOD(device_attach, altera_avgen_nexus_attach), - DEVMETHOD(device_detach, altera_avgen_nexus_detach), +static device_method_t altera_avgen_fdt_methods[] = { + DEVMETHOD(device_probe, altera_avgen_fdt_probe), + DEVMETHOD(device_attach, altera_avgen_fdt_attach), + DEVMETHOD(device_detach, altera_avgen_fdt_detach), { 0, 0 } }; -static driver_t altera_avgen_nexus_driver = { +static driver_t altera_avgen_fdt_driver = { "altera_avgen", - altera_avgen_nexus_methods, + altera_avgen_fdt_methods, sizeof(struct altera_avgen_softc), }; static devclass_t altera_avgen_devclass; -DRIVER_MODULE(avgen, nexus, altera_avgen_nexus_driver, altera_avgen_devclass, - 0, 0); +DRIVER_MODULE(avgen, simplebus, altera_avgen_fdt_driver, + altera_avgen_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:53:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 76354CD4; Sun, 13 Jan 2013 16:53:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 636C1ED5; Sun, 13 Jan 2013 16:53:32 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGrWub019823; Sun, 13 Jan 2013 16:53:32 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGrWYb019821; Sun, 13 Jan 2013 16:53:32 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131653.r0DGrWYb019821@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245379 - in head/sys/dev/terasic: de4led mtl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:53:32 -0000 Author: rwatson Date: Sun Jan 13 16:53:31 2013 New Revision: 245379 URL: http://svnweb.freebsd.org/changeset/base/245379 Log: Partially merge Perforce changeset 219944 to head: Consistently use the vendor name "sri-cambridge" for device compatibility strings on the BERI platform. Sponsored by: DARPA, AFRL Modified: head/sys/dev/terasic/de4led/terasic_de4led_fdt.c head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Modified: head/sys/dev/terasic/de4led/terasic_de4led_fdt.c ============================================================================== --- head/sys/dev/terasic/de4led/terasic_de4led_fdt.c Sun Jan 13 16:51:57 2013 (r245378) +++ head/sys/dev/terasic/de4led/terasic_de4led_fdt.c Sun Jan 13 16:53:31 2013 (r245379) @@ -62,7 +62,7 @@ static int terasic_de4led_fdt_probe(device_t dev) { - if (ofw_bus_is_compatible(dev, "cambridge,de4led")) { + if (ofw_bus_is_compatible(dev, "sri-cambridge,de4led")) { device_set_desc(dev, "Terasic DE4 8-element LED"); return (BUS_PROBE_DEFAULT); } Modified: head/sys/dev/terasic/mtl/terasic_mtl_fdt.c ============================================================================== --- head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Sun Jan 13 16:51:57 2013 (r245378) +++ head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Sun Jan 13 16:53:31 2013 (r245379) @@ -59,7 +59,7 @@ static int terasic_mtl_fdt_probe(device_t dev) { - if (ofw_bus_is_compatible(dev, "cambridge,mtl")) { + if (ofw_bus_is_compatible(dev, "sri-cambridge,mtl")) { device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); return (BUS_PROBE_DEFAULT); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 16:57:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A8777F75; Sun, 13 Jan 2013 16:57:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 83377F06; Sun, 13 Jan 2013 16:57:16 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DGvGxL020368; Sun, 13 Jan 2013 16:57:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DGvBL0020335; Sun, 13 Jan 2013 16:57:11 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201301131657.r0DGvBL0020335@svn.freebsd.org> From: Robert Watson Date: Sun, 13 Jan 2013 16:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245380 - in head/sys/dev: altera/avgen altera/jtag_uart altera/sdcard isf terasic/de4led terasic/mtl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 16:57:16 -0000 Author: rwatson Date: Sun Jan 13 16:57:11 2013 New Revision: 245380 URL: http://svnweb.freebsd.org/changeset/base/245380 Log: Merge Perforce changeset 219952 to head: Make different bus attachments for Altera and Terasice device drivers share the same devclass_t. Sponsored by: DARPA, AFRL Modified: head/sys/dev/altera/avgen/altera_avgen.c head/sys/dev/altera/avgen/altera_avgen.h head/sys/dev/altera/avgen/altera_avgen_fdt.c head/sys/dev/altera/avgen/altera_avgen_nexus.c head/sys/dev/altera/jtag_uart/altera_jtag_uart.h head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c head/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c head/sys/dev/altera/sdcard/altera_sdcard.c head/sys/dev/altera/sdcard/altera_sdcard.h head/sys/dev/altera/sdcard/altera_sdcard_fdt.c head/sys/dev/altera/sdcard/altera_sdcard_nexus.c head/sys/dev/isf/isf.c head/sys/dev/isf/isf.h head/sys/dev/isf/isf_fdt.c head/sys/dev/isf/isf_nexus.c head/sys/dev/terasic/de4led/terasic_de4led.c head/sys/dev/terasic/de4led/terasic_de4led.h head/sys/dev/terasic/de4led/terasic_de4led_fdt.c head/sys/dev/terasic/de4led/terasic_de4led_nexus.c head/sys/dev/terasic/mtl/terasic_mtl.c head/sys/dev/terasic/mtl/terasic_mtl.h head/sys/dev/terasic/mtl/terasic_mtl_fdt.c head/sys/dev/terasic/mtl/terasic_mtl_nexus.c Modified: head/sys/dev/altera/avgen/altera_avgen.c ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/avgen/altera_avgen.c Sun Jan 13 16:57:11 2013 (r245380) @@ -60,6 +60,8 @@ __FBSDID("$FreeBSD$"); * system-on-chip bus environments would work fine with the same code. */ +devclass_t altera_avgen_devclass; + static d_mmap_t altera_avgen_mmap; static d_read_t altera_avgen_read; static d_write_t altera_avgen_write; Modified: head/sys/dev/altera/avgen/altera_avgen.h ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen.h Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/avgen/altera_avgen.h Sun Jan 13 16:57:11 2013 (r245380) @@ -82,4 +82,6 @@ int altera_avgen_attach(struct altera_av const char *str_devname, int devunit); void altera_avgen_detach(struct altera_avgen_softc *sc); +extern devclass_t altera_avgen_devclass; + #endif /* _DEV_ALTERA_AVALON_H_ */ Modified: head/sys/dev/altera/avgen/altera_avgen_fdt.c ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen_fdt.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/avgen/altera_avgen_fdt.c Sun Jan 13 16:57:11 2013 (r245380) @@ -150,7 +150,5 @@ static driver_t altera_avgen_fdt_driver sizeof(struct altera_avgen_softc), }; -static devclass_t altera_avgen_devclass; - DRIVER_MODULE(avgen, simplebus, altera_avgen_fdt_driver, altera_avgen_devclass, 0, 0); Modified: head/sys/dev/altera/avgen/altera_avgen_nexus.c ============================================================================== --- head/sys/dev/altera/avgen/altera_avgen_nexus.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/avgen/altera_avgen_nexus.c Sun Jan 13 16:57:11 2013 (r245380) @@ -137,7 +137,5 @@ static driver_t altera_avgen_nexus_drive sizeof(struct altera_avgen_softc), }; -static devclass_t altera_avgen_devclass; - DRIVER_MODULE(avgen, nexus, altera_avgen_nexus_driver, altera_avgen_devclass, 0, 0); Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart.h ============================================================================== --- head/sys/dev/altera/jtag_uart/altera_jtag_uart.h Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart.h Sun Jan 13 16:57:11 2013 (r245380) @@ -194,4 +194,6 @@ extern u_int aju_cons_jtag_missed; int altera_jtag_uart_attach(struct altera_jtag_uart_softc *sc); void altera_jtag_uart_detach(struct altera_jtag_uart_softc *sc); +extern devclass_t altera_jtag_uart_devclass; + #endif /* _DEV_ALTERA_JTAG_UART_H_ */ Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c ============================================================================== --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c Sun Jan 13 16:57:11 2013 (r245380) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -46,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include +devclass_t altera_jtag_uart_devclass; + /* * One-byte buffer as we can't check whether the UART is readable without * actually reading from it, synchronised by a spinlock; this lock also Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c ============================================================================== --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c Sun Jan 13 16:57:11 2013 (r245380) @@ -143,7 +143,5 @@ static driver_t altera_jtag_uart_fdt_dri sizeof(struct altera_jtag_uart_softc), }; -static devclass_t altera_jtag_uart_devclass; - DRIVER_MODULE(altera_jtag_uart, simplebus, altera_jtag_uart_fdt_driver, altera_jtag_uart_devclass, 0, 0); Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c ============================================================================== --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c Sun Jan 13 16:57:11 2013 (r245380) @@ -137,7 +137,5 @@ static driver_t altera_jtag_uart_nexus_d sizeof(struct altera_jtag_uart_softc), }; -static devclass_t altera_jtag_uart_devclass; - DRIVER_MODULE(altera_jtag_uart, nexus, altera_jtag_uart_nexus_driver, altera_jtag_uart_devclass, 0, 0); Modified: head/sys/dev/altera/sdcard/altera_sdcard.c ============================================================================== --- head/sys/dev/altera/sdcard/altera_sdcard.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/sdcard/altera_sdcard.c Sun Jan 13 16:57:11 2013 (r245380) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); * 3. Handle read-only SD Cards. * 4. Tune timeouts based on real-world SD Card speeds. */ +devclass_t altera_sdcard_devclass; void altera_sdcard_attach(struct altera_sdcard_softc *sc) Modified: head/sys/dev/altera/sdcard/altera_sdcard.h ============================================================================== --- head/sys/dev/altera/sdcard/altera_sdcard.h Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/sdcard/altera_sdcard.h Sun Jan 13 16:57:11 2013 (r245380) @@ -244,4 +244,6 @@ void altera_sdcard_start(struct altera_s void altera_sdcard_disk_insert(struct altera_sdcard_softc *sc); void altera_sdcard_disk_remove(struct altera_sdcard_softc *sc); +extern devclass_t altera_sdcard_devclass; + #endif /* _DEV_ALTERA_SDCARD_H_ */ Modified: head/sys/dev/altera/sdcard/altera_sdcard_fdt.c ============================================================================== --- head/sys/dev/altera/sdcard/altera_sdcard_fdt.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/sdcard/altera_sdcard_fdt.c Sun Jan 13 16:57:11 2013 (r245380) @@ -116,7 +116,5 @@ static driver_t altera_sdcard_fdt_driver sizeof(struct altera_sdcard_softc), }; -static devclass_t altera_sdcard_devclass; - DRIVER_MODULE(altera_sdcard, simplebus, altera_sdcard_fdt_driver, altera_sdcard_devclass, 0, 0); Modified: head/sys/dev/altera/sdcard/altera_sdcard_nexus.c ============================================================================== --- head/sys/dev/altera/sdcard/altera_sdcard_nexus.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/altera/sdcard/altera_sdcard_nexus.c Sun Jan 13 16:57:11 2013 (r245380) @@ -110,7 +110,5 @@ static driver_t altera_sdcard_nexus_driv sizeof(struct altera_sdcard_softc), }; -static devclass_t altera_sdcard_devclass; - DRIVER_MODULE(altera_sdcard, nexus, altera_sdcard_nexus_driver, altera_sdcard_devclass, 0, 0); Modified: head/sys/dev/isf/isf.c ============================================================================== --- head/sys/dev/isf/isf.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/isf/isf.c Sun Jan 13 16:57:11 2013 (r245380) @@ -150,6 +150,7 @@ static void isf_task(void *arg); * physical package, due to variable block size support in the StrataFlash * part. */ +devclass_t isf_devclass; static uint16_t isf_read_reg(struct isf_softc *sc, uint16_t reg) Modified: head/sys/dev/isf/isf.h ============================================================================== --- head/sys/dev/isf/isf.h Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/isf/isf.h Sun Jan 13 16:57:11 2013 (r245380) @@ -89,6 +89,8 @@ struct isf_softc { int isf_attach(struct isf_softc *sc); void isf_detach(struct isf_softc *sc); + +extern devclass_t isf_devclass; #endif /* _KERNEL */ #endif /* _DEV_ISF_H_ */ Modified: head/sys/dev/isf/isf_fdt.c ============================================================================== --- head/sys/dev/isf/isf_fdt.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/isf/isf_fdt.c Sun Jan 13 16:57:11 2013 (r245380) @@ -121,6 +121,4 @@ static driver_t isf_fdt_driver = { sizeof(struct isf_softc), }; -static devclass_t isf_devclass; - DRIVER_MODULE(isf, simplebus, isf_fdt_driver, isf_devclass, 0, 0); Modified: head/sys/dev/isf/isf_nexus.c ============================================================================== --- head/sys/dev/isf/isf_nexus.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/isf/isf_nexus.c Sun Jan 13 16:57:11 2013 (r245380) @@ -115,6 +115,4 @@ static driver_t isf_nexus_driver = { sizeof(struct isf_softc), }; -static devclass_t isf_devclass; - DRIVER_MODULE(isf, nexus, isf_nexus_driver, isf_devclass, 0, 0); Modified: head/sys/dev/terasic/de4led/terasic_de4led.c ============================================================================== --- head/sys/dev/terasic/de4led/terasic_de4led.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/de4led/terasic_de4led.c Sun Jan 13 16:57:11 2013 (r245380) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include +devclass_t terasic_de4led_devclass; + static void terasic_de4led_update(struct terasic_de4led_softc *sc) { Modified: head/sys/dev/terasic/de4led/terasic_de4led.h ============================================================================== --- head/sys/dev/terasic/de4led/terasic_de4led.h Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/de4led/terasic_de4led.h Sun Jan 13 16:57:11 2013 (r245380) @@ -72,4 +72,6 @@ struct terasic_de4led_softc { void terasic_de4led_attach(struct terasic_de4led_softc *sc); void terasic_de4led_detach(struct terasic_de4led_softc *sc); +extern devclass_t terasic_de4led_devclass; + #endif /* _DEV_TERASIC_DE4LED_H_ */ Modified: head/sys/dev/terasic/de4led/terasic_de4led_fdt.c ============================================================================== --- head/sys/dev/terasic/de4led/terasic_de4led_fdt.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/de4led/terasic_de4led_fdt.c Sun Jan 13 16:57:11 2013 (r245380) @@ -114,7 +114,5 @@ static driver_t terasic_de4led_fdt_drive sizeof(struct terasic_de4led_softc), }; -static devclass_t terasic_de4led_devclass; - DRIVER_MODULE(terasic_de4led, simplebus, terasic_de4led_fdt_driver, terasic_de4led_devclass, 0, 0); Modified: head/sys/dev/terasic/de4led/terasic_de4led_nexus.c ============================================================================== --- head/sys/dev/terasic/de4led/terasic_de4led_nexus.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/de4led/terasic_de4led_nexus.c Sun Jan 13 16:57:11 2013 (r245380) @@ -106,7 +106,5 @@ static driver_t terasic_de4led_nexus_dri sizeof(struct terasic_de4led_softc), }; -static devclass_t terasic_de4led_devclass; - DRIVER_MODULE(terasic_de4led, nexus, terasic_de4led_nexus_driver, terasic_de4led_devclass, 0, 0); Modified: head/sys/dev/terasic/mtl/terasic_mtl.c ============================================================================== --- head/sys/dev/terasic/mtl/terasic_mtl.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/mtl/terasic_mtl.c Sun Jan 13 16:57:11 2013 (r245380) @@ -63,6 +63,9 @@ __FBSDID("$FreeBSD$"); * attached as they may be called even if the attach routine hasn't been, on * an error. */ + +devclass_t terasic_mtl_devclass; + int terasic_mtl_attach(struct terasic_mtl_softc *sc) { Modified: head/sys/dev/terasic/mtl/terasic_mtl.h ============================================================================== --- head/sys/dev/terasic/mtl/terasic_mtl.h Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/mtl/terasic_mtl.h Sun Jan 13 16:57:11 2013 (r245380) @@ -159,6 +159,8 @@ struct terasic_mtl_softc { int terasic_mtl_attach(struct terasic_mtl_softc *sc); void terasic_mtl_detach(struct terasic_mtl_softc *sc); +extern devclass_t terasic_mtl_devclass; + /* * Sub-driver setup routines. */ Modified: head/sys/dev/terasic/mtl/terasic_mtl_fdt.c ============================================================================== --- head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/mtl/terasic_mtl_fdt.c Sun Jan 13 16:57:11 2013 (r245380) @@ -196,7 +196,5 @@ static driver_t terasic_mtl_fdt_driver = sizeof(struct terasic_mtl_softc), }; -static devclass_t terasic_mtl_devclass; - DRIVER_MODULE(mtl, simplebus, terasic_mtl_fdt_driver, terasic_mtl_devclass, 0, 0); Modified: head/sys/dev/terasic/mtl/terasic_mtl_nexus.c ============================================================================== --- head/sys/dev/terasic/mtl/terasic_mtl_nexus.c Sun Jan 13 16:53:31 2013 (r245379) +++ head/sys/dev/terasic/mtl/terasic_mtl_nexus.c Sun Jan 13 16:57:11 2013 (r245380) @@ -190,7 +190,5 @@ static driver_t terasic_mtl_nexus_driver sizeof(struct terasic_mtl_softc), }; -static devclass_t terasic_mtl_devclass; - DRIVER_MODULE(mtl, nexus, terasic_mtl_nexus_driver, terasic_mtl_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 18:06:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 04EA4F0C; Sun, 13 Jan 2013 18:06:32 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C16961DF; Sun, 13 Jan 2013 18:06:31 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (unknown [207.238.187.242]) by elvis.mu.org (Postfix) with ESMTPSA id 3E2691A3C52; Sun, 13 Jan 2013 10:06:21 -0800 (PST) Message-ID: <50F2F79C.7040109@mu.org> Date: Sun, 13 Jan 2013 13:06:20 -0500 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Andre Oppermann , Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 18:06:32 -0000 On 1/12/13 10:32 PM, Adrian Chadd wrote: > On 12 January 2013 11:45, Alfred Perlstein wrote: > >> I'm not sure if regressing to the waterfall method of development is a good >> idea at this point. >> >> I see a light at the end of the tunnel and we to continue to just handle >> these minor corner cases as we progress. >> >> If we move to a model where a minor bug is grounds to completely remove >> helpful code then nothing will ever get done. >> > Allocating 512MB worth of callwheels on a 16GB MIPS machine is a > little silly, don't you think? > > That suggests to me that the extent of which maxfiles/maxusers/etc > percolates the codebase wasn't totally understood by those who wish to > change it. > > I'd rather see some more investigative work into outlining things that > need fixing and start fixing those, rather than "just change stuff and > fix whatever issues creep up." > > I kinda hope we all understand what we're working on in the kernel a > little better than that. Cool! I'm glad people are now aware of the callwheel allocation being insane with large maxusers. I saw this about a month ago (if not longer), but since there were half a dozen people calling me an imbecile who hadn't really yet read the code I didn't want to inflame them more by fixing that with "a hack". (actually a simple fix). A simple fix is to clamp callwheel size to the previous result of a maxusers of 384 and call it a day. However the simplicity of that approach would probably inflame too many feelings so I am unsure as how to proceed. Any ideas? -Alfred From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 19:19:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ADA8231B; Sun, 13 Jan 2013 19:19:41 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF9A6F0; Sun, 13 Jan 2013 19:19:41 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DJJfap061657; Sun, 13 Jan 2013 19:19:41 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DJJfNb061653; Sun, 13 Jan 2013 19:19:41 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301131919.r0DJJfNb061653@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 13 Jan 2013 19:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245381 - in head: bin/sh tools/regression/bin/sh/expansion X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 19:19:41 -0000 Author: jilles Date: Sun Jan 13 19:19:40 2013 New Revision: 245381 URL: http://svnweb.freebsd.org/changeset/base/245381 Log: sh: Don't lose $? when backquoted command ends with semicolon or newline. An empty simple command was added and overwrote the exit status with 0. This affects `...` but not $(...). Example: v=`false;`; echo $? Added: head/tools/regression/bin/sh/expansion/cmdsubst14.0 (contents, props changed) head/tools/regression/bin/sh/expansion/cmdsubst15.0 (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sun Jan 13 16:57:11 2013 (r245380) +++ head/bin/sh/parser.c Sun Jan 13 19:19:40 2013 (r245381) @@ -286,7 +286,8 @@ list(int nlflag, int erflag) tokpushback++; } checkkwd = CHKNL | CHKKWD | CHKALIAS; - if (!nlflag && !erflag && tokendlist[peektoken()]) + if (!nlflag && (erflag ? peektoken() == TEOF : + tokendlist[peektoken()])) return ntop; break; case TEOF: Added: head/tools/regression/bin/sh/expansion/cmdsubst14.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst14.0 Sun Jan 13 19:19:40 2013 (r245381) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +! v=`false + +` Added: head/tools/regression/bin/sh/expansion/cmdsubst15.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst15.0 Sun Jan 13 19:19:40 2013 (r245381) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +! v=`false; + +` From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 19:26:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7E86D658; Sun, 13 Jan 2013 19:26:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE8675A; Sun, 13 Jan 2013 19:26:34 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DJQXj4064112; Sun, 13 Jan 2013 19:26:33 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DJQXQS064110; Sun, 13 Jan 2013 19:26:33 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301131926.r0DJQXQS064110@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 13 Jan 2013 19:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245382 - in head: bin/sh tools/regression/bin/sh/parser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 19:26:34 -0000 Author: jilles Date: Sun Jan 13 19:26:33 2013 New Revision: 245382 URL: http://svnweb.freebsd.org/changeset/base/245382 Log: sh: Fix crash when parsing '{ } &'. MFC after: 1 week Added: head/tools/regression/bin/sh/parser/empty-braces1.0 (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sun Jan 13 19:19:40 2013 (r245381) +++ head/bin/sh/parser.c Sun Jan 13 19:26:33 2013 (r245382) @@ -240,9 +240,9 @@ list(int nlflag, int erflag) n2 = andor(); tok = readtoken(); if (tok == TBACKGND) { - if (n2->type == NPIPE) { + if (n2 != NULL && n2->type == NPIPE) { n2->npipe.backgnd = 1; - } else if (n2->type == NREDIR) { + } else if (n2 != NULL && n2->type == NREDIR) { n2->type = NBACKGND; } else { n3 = (union node *)stalloc(sizeof (struct nredir)); Added: head/tools/regression/bin/sh/parser/empty-braces1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/empty-braces1.0 Sun Jan 13 19:26:33 2013 (r245382) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +# Unfortunately, some scripts depend on the extension of allowing an empty +# pair of braces. + +{ } & +wait $! From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 19:39:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E83C3E08; Sun, 13 Jan 2013 19:39:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A973A802; Sun, 13 Jan 2013 19:39:14 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DJdEYh066925; Sun, 13 Jan 2013 19:39:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DJdDTl066919; Sun, 13 Jan 2013 19:39:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301131939.r0DJdDTl066919@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 13 Jan 2013 19:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245383 - head/tools/regression/bin/sh/execution X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 19:39:15 -0000 Author: jilles Date: Sun Jan 13 19:39:13 2013 New Revision: 245383 URL: http://svnweb.freebsd.org/changeset/base/245383 Log: sh: Add some testcases related to subshells. These failed in earlier attempts to execute more subshells without forking. The patches are uncommitted. Added: head/tools/regression/bin/sh/execution/subshell1.0 (contents, props changed) head/tools/regression/bin/sh/execution/subshell1.0.stdout (contents, props changed) head/tools/regression/bin/sh/execution/subshell2.0 (contents, props changed) head/tools/regression/bin/sh/execution/subshell3.0 (contents, props changed) head/tools/regression/bin/sh/execution/subshell4.0 (contents, props changed) Added: head/tools/regression/bin/sh/execution/subshell1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/subshell1.0 Sun Jan 13 19:39:13 2013 (r245383) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +(eval "cd / +v=$(printf %0100000d 1) +echo \${#v}") +echo end Added: head/tools/regression/bin/sh/execution/subshell1.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/subshell1.0.stdout Sun Jan 13 19:39:13 2013 (r245383) @@ -0,0 +1,2 @@ +100000 +end Added: head/tools/regression/bin/sh/execution/subshell2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/subshell2.0 Sun Jan 13 19:39:13 2013 (r245383) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +f() { + x=2 +} +( + x=1 + f + [ "$x" = 2 ] +) Added: head/tools/regression/bin/sh/execution/subshell3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/subshell3.0 Sun Jan 13 19:39:13 2013 (r245383) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +(false; exit) && exit 3 +exit 0 Added: head/tools/regression/bin/sh/execution/subshell4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/subshell4.0 Sun Jan 13 19:39:13 2013 (r245383) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +(eval "set v=1"; false) && echo bad; : From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 20:35:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 249D9F98; Sun, 13 Jan 2013 20:35:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D9B18A3D; Sun, 13 Jan 2013 20:35:08 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DKZ8he084293; Sun, 13 Jan 2013 20:35:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DKZ8Uk084292; Sun, 13 Jan 2013 20:35:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201301132035.r0DKZ8Uk084292@svn.freebsd.org> From: Dimitry Andric Date: Sun, 13 Jan 2013 20:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245384 - stable/9/contrib/gcc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 20:35:09 -0000 Author: dim Date: Sun Jan 13 20:35:08 2013 New Revision: 245384 URL: http://svnweb.freebsd.org/changeset/base/245384 Log: MFC r245272: Add an ugly hack to libgcc's unwind code, to make it behave properly at runtime on amd64, when it is compiled by clang. Some versions of clang don't save and restore all callee registers, if a __builtin_eh_return() intrinsic is used in a function. This is particularly bad on amd64. Until the problem gets fixed by upstream, use an asm statement to force clang to assume the registers in question are clobbered, when invoking __builtin_eh_return(), so it will emit code to save and restore them. This should fix the crashes reported on -current with some C++ programs, particularly those that throw exceptions over multiple function boundaries. Reported by: stefanf Modified: stable/9/contrib/gcc/unwind-dw2.c Directory Properties: stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/unwind-dw2.c ============================================================================== --- stable/9/contrib/gcc/unwind-dw2.c Sun Jan 13 19:39:13 2013 (r245383) +++ stable/9/contrib/gcc/unwind-dw2.c Sun Jan 13 20:35:08 2013 (r245384) @@ -1438,6 +1438,17 @@ uw_init_context_1 (struct _Unwind_Contex context->ra = __builtin_extract_return_addr (outer_ra); } +#if defined(__clang__) && defined(__amd64__) +/* Some versions of clang don't save and restore all callee registers, if a + __builtin_eh_return() intrinsic is used in a function. This is particularly + bad on amd64. For now, use the following ugly hack to force it to assume + those registers are clobbered, when invoking __builtin_eh_return(), so it + will emit code to save and restore them. */ +#define CLOBBER_REGS_HACK \ + __asm __volatile(" " : : : "r15", "r14", "r13", "r12", "rbx", "rdx", "rax"); +#else +#define CLOBBER_REGS_HACK +#endif /* __clang__ */ /* Install TARGET into CURRENT so that we can return to it. This is a macro because __builtin_eh_return must be invoked in the context of @@ -1448,6 +1459,7 @@ uw_init_context_1 (struct _Unwind_Contex { \ long offset = uw_install_context_1 ((CURRENT), (TARGET)); \ void *handler = __builtin_frob_return_addr ((TARGET)->ra); \ + CLOBBER_REGS_HACK \ __builtin_eh_return (offset, handler); \ } \ while (0) From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 20:45:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0D79664A; Sun, 13 Jan 2013 20:45:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by mx1.freebsd.org (Postfix) with ESMTP id B80FEAB4; Sun, 13 Jan 2013 20:45:07 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id x48so1739075wey.22 for ; Sun, 13 Jan 2013 12:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Ux6Kc7xf62oVjwpPbMRBhx86a59mcVFLdG7i3kI364w=; b=PBAeqPabPhgJss31wKGaCnSfptuN/WJ24fQsuQkEkam6wUauQBOtpwdZNdkn5MrYcJ cehaxYzHHJGiIxrwrtoKyblsMTxDCi9MQUQNHzxoBSuMn7bhbFokCuiEIvOM45wmNPr0 CBBNE0AxISCwZla9Gio6W0nKO4XhrSsq0aHo0mQCLAHjAet4MKomFucMuGpRNMXTQRJS /Q49xUu3rQ36D3+eL0meZ5ql7D7mk9Me1nw7sRkTE691F68Rx5ObIjml4CCWH9IHyIPf 89JNbeic3ALJe2bbxuZqrKdSbExAZ0YVeo/mauiqn3CgWBd9C48lTs8QMPDYhguSiow1 fOdg== MIME-Version: 1.0 X-Received: by 10.180.93.133 with SMTP id cu5mr8908659wib.32.1358109906576; Sun, 13 Jan 2013 12:45:06 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Sun, 13 Jan 2013 12:45:06 -0800 (PST) In-Reply-To: <50F2F79C.7040109@mu.org> References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> <50F2F79C.7040109@mu.org> Date: Sun, 13 Jan 2013 12:45:06 -0800 X-Google-Sender-Auth: NJJ1tZuTaqXvaQ9ziZpjmySGud8 Message-ID: Subject: Re: svn commit: r243631 - in head/sys: kern sys From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, Andre Oppermann , Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 20:45:09 -0000 .. I think the "right" solution is to still review what things rely on maxusers/maxfiles/etc and figure out which make sense to scale off of a global variable, and which don't. Adrian From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 21:25:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 29E1928C; Sun, 13 Jan 2013 21:25:44 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 126EAD82; Sun, 13 Jan 2013 21:25:44 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DLPhum099316; Sun, 13 Jan 2013 21:25:43 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DLPhOP099315; Sun, 13 Jan 2013 21:25:43 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201301132125.r0DLPhOP099315@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 13 Jan 2013 21:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245385 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 21:25:44 -0000 Author: mjg Date: Sun Jan 13 21:25:43 2013 New Revision: 245385 URL: http://svnweb.freebsd.org/changeset/base/245385 Log: libutil: eliminate 'found' variable in gr_equal Submitted by: Christoph Mallon Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Sun Jan 13 20:35:08 2013 (r245384) +++ head/lib/libutil/gr_util.c Sun Jan 13 21:25:43 2013 (r245385) @@ -346,7 +346,6 @@ gr_equal(const struct group *gr1, const { int gr1_ndx; int gr2_ndx; - bool found; /* Check that the non-member information is the same. */ if (gr1->gr_name == NULL || gr2->gr_name == NULL) { @@ -367,17 +366,15 @@ gr_equal(const struct group *gr1, const if (gr1->gr_mem != gr2->gr_mem) return (false); } else { - for (found = false, gr1_ndx = 0; gr1->gr_mem[gr1_ndx] != NULL; - gr1_ndx++) { - for (gr2_ndx = 0; gr2->gr_mem[gr2_ndx] != NULL; - gr2_ndx++) + for (gr1_ndx = 0; gr1->gr_mem[gr1_ndx] != NULL; gr1_ndx++) { + for (gr2_ndx = 0;; gr2_ndx++) { + if (gr2->gr_mem[gr2_ndx] == NULL) + return (false); if (strcmp(gr1->gr_mem[gr1_ndx], gr2->gr_mem[gr2_ndx]) == 0) { - found = true; break; } - if (!found) - return (false); + } } /* Check that group2 does not have more members than group1. */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 21:26:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 651D84E0; Sun, 13 Jan 2013 21:26:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 568D3D95; Sun, 13 Jan 2013 21:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DLQwPE099470; Sun, 13 Jan 2013 21:26:58 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DLQwXd099469; Sun, 13 Jan 2013 21:26:58 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201301132126.r0DLQwXd099469@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 13 Jan 2013 21:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245386 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 21:26:58 -0000 Author: mjg Date: Sun Jan 13 21:26:57 2013 New Revision: 245386 URL: http://svnweb.freebsd.org/changeset/base/245386 Log: libutil: move group_line_format into the scop of its only user. Submitted by: Christoph Mallon Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Sun Jan 13 21:25:43 2013 (r245385) +++ head/lib/libutil/gr_util.c Sun Jan 13 21:26:57 2013 (r245386) @@ -50,8 +50,6 @@ static char group_file[PATH_MAX]; static char tempname[PATH_MAX]; static int initialized; -static const char group_line_format[] = "%s:%s:%ju:"; - /* * Initialize statics */ @@ -391,6 +389,7 @@ gr_equal(const struct group *gr1, const char * gr_make(const struct group *gr) { + const char *group_line_format = "%s:%s:%ju:"; char *line; size_t line_size; int ndx; From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 21:28:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B0DC66C8; Sun, 13 Jan 2013 21:28:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A396ADB3; Sun, 13 Jan 2013 21:28:47 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DLSlWd099715; Sun, 13 Jan 2013 21:28:47 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DLSlnw099714; Sun, 13 Jan 2013 21:28:47 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201301132128.r0DLSlnw099714@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 13 Jan 2013 21:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245387 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 21:28:47 -0000 Author: mjg Date: Sun Jan 13 21:28:47 2013 New Revision: 245387 URL: http://svnweb.freebsd.org/changeset/base/245387 Log: libutil: utilize strsep instead of strcat in a loop in gr_make Submitted by: Christoph Mallon Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Sun Jan 13 21:26:57 2013 (r245386) +++ head/lib/libutil/gr_util.c Sun Jan 13 21:28:47 2013 (r245387) @@ -390,7 +390,9 @@ char * gr_make(const struct group *gr) { const char *group_line_format = "%s:%s:%ju:"; + const char *sep; char *line; + char *p; size_t line_size; int ndx; @@ -405,16 +407,18 @@ gr_make(const struct group *gr) } /* Create the group line and fill it. */ - if ((line = malloc(line_size)) == NULL) + if ((line = p = malloc(line_size)) == NULL) return (NULL); - snprintf(line, line_size, group_line_format, gr->gr_name, gr->gr_passwd, + p += sprintf(p, group_line_format, gr->gr_name, gr->gr_passwd, (uintmax_t)gr->gr_gid); - if (gr->gr_mem != NULL) + if (gr->gr_mem != NULL) { + sep = ""; for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { - strcat(line, gr->gr_mem[ndx]); - if (gr->gr_mem[ndx + 1] != NULL) - strcat(line, ","); + p = stpcpy(p, sep); + p = stpcpy(p, gr->gr_mem[ndx]); + sep = ","; } + } return (line); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 21:32:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 56FF2A0F; Sun, 13 Jan 2013 21:32:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3ED3CDFC; Sun, 13 Jan 2013 21:32:41 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DLWfMN001943; Sun, 13 Jan 2013 21:32:41 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DLWf0v001942; Sun, 13 Jan 2013 21:32:41 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201301132132.r0DLWf0v001942@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 13 Jan 2013 21:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245388 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 21:32:41 -0000 Author: gonzo Date: Sun Jan 13 21:32:40 2013 New Revision: 245388 URL: http://svnweb.freebsd.org/changeset/base/245388 Log: Remove accidentally copypasted comment Spotted by: gavin Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Sun Jan 13 21:28:47 2013 (r245387) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Sun Jan 13 21:32:40 2013 (r245388) @@ -82,11 +82,6 @@ initarm_late_init(void) pcell_t cells[2]; int len; - /* - * It seems there is no way to let syscons framework know - * that framebuffer resolution has changed. So just try - * to fetch data from FDT and go with defaults if failed - */ system = OF_finddevice("/system"); if (system != 0) { len = OF_getprop(system, "linux,serial", &cells, sizeof(cells)); From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 22:05:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 016BCA42; Sun, 13 Jan 2013 22:05:46 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B6DE129; Sun, 13 Jan 2013 22:05:46 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DM5kiE011162; Sun, 13 Jan 2013 22:05:46 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DM5kc2011161; Sun, 13 Jan 2013 22:05:46 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201301132205.r0DM5kc2011161@svn.freebsd.org> From: Aleksandr Rybalko Date: Sun, 13 Jan 2013 22:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245389 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 22:05:47 -0000 Author: ray Date: Sun Jan 13 22:05:46 2013 New Revision: 245389 URL: http://svnweb.freebsd.org/changeset/base/245389 Log: Enable syscons framebuffer support for bcm2835. It makes possible to run Xorg on Raspberry Pi. o convert mmap address to physical. o add FBIOGTYPE ioctl handler - allow to get screen resolution by new xf86-video-scfb driver. Originally designed for "Efika MX" project. Sponsored by: FreeBSD Foundation Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sun Jan 13 21:32:40 2013 (r245388) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sun Jan 13 22:05:46 2013 (r245389) @@ -136,6 +136,7 @@ struct video_adapter_softc { int console; intptr_t fb_addr; + intptr_t fb_paddr; unsigned int fb_size; unsigned int height; @@ -222,6 +223,7 @@ bcm_fb_init(void *arg) fb_config->screen_size); va_sc->fb_addr = (intptr_t)pmap_mapdev(fb_config->base, fb_config->screen_size); + va_sc->fb_paddr = fb_config->base; va_sc->fb_size = fb_config->screen_size; va_sc->depth = fb_config->bpp; va_sc->stride = fb_config->pitch; @@ -795,7 +797,7 @@ bcmfb_mmap(video_adapter_t *adp, vm_ooff * framebuffer, since it shouldn't be touched */ if (offset < sc->stride*sc->height) { - *paddr = sc->fb_addr + offset; + *paddr = sc->fb_paddr + offset; return (0); } @@ -805,6 +807,27 @@ bcmfb_mmap(video_adapter_t *adp, vm_ooff static int bcmfb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t data) { + struct video_adapter_softc *sc; + struct fbtype *fb; + + sc = (struct video_adapter_softc *)adp; + + switch (cmd) { + case FBIOGTYPE: + fb = (struct fbtype *)data; + fb->fb_type = FBTYPE_PCIMISC; + fb->fb_height = sc->height; + fb->fb_width = sc->width; + fb->fb_depth = sc->depth; + if (sc->depth <= 1 || sc->depth > 8) + fb->fb_cmsize = 0; + else + fb->fb_cmsize = 1 << sc->depth; + fb->fb_size = sc->fb_size; + break; + default: + return (fb_commonioctl(adp, cmd, data)); + } return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 22:08:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D8C4CE8D; Sun, 13 Jan 2013 22:08:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CA90EC0; Sun, 13 Jan 2013 22:08:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DM8IMn011540; Sun, 13 Jan 2013 22:08:18 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DM8Iqp011539; Sun, 13 Jan 2013 22:08:18 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201301132208.r0DM8Iqp011539@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 13 Jan 2013 22:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245390 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 22:08:18 -0000 Author: mjg Date: Sun Jan 13 22:08:18 2013 New Revision: 245390 URL: http://svnweb.freebsd.org/changeset/base/245390 Log: libutil: fix typo in comment for gr_fini. Submitted by: Christoph Mallon Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Sun Jan 13 22:05:46 2013 (r245389) +++ head/lib/libutil/gr_util.c Sun Jan 13 22:08:18 2013 (r245390) @@ -316,7 +316,7 @@ gr_mkdb(void) } /* - * Clean up. Preserver errno for the caller's convenience. + * Clean up. Preserves errno for the caller's convenience. */ void gr_fini(void) From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 22:35:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 42606B4B; Sun, 13 Jan 2013 22:35:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4A3266; Sun, 13 Jan 2013 22:35:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DMZq1v019791; Sun, 13 Jan 2013 22:35:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DMZpBp019790; Sun, 13 Jan 2013 22:35:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301132235.r0DMZpBp019790@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 13 Jan 2013 22:35:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245392 - head/tools/regression/bin/sh/expansion X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 22:35:52 -0000 Author: jilles Date: Sun Jan 13 22:35:51 2013 New Revision: 245392 URL: http://svnweb.freebsd.org/changeset/base/245392 Log: sh: Add testcase that $? is preserved into a simple command substitution. The test builtins/trap6.0 already uses this but having it separate eases diagnosis if this would break. Added: head/tools/regression/bin/sh/expansion/cmdsubst16.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/cmdsubst16.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst16.0 Sun Jan 13 22:35:51 2013 (r245392) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +f() { return 3; } +f +[ `echo $?` = 3 ] From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 22:36:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A0A0FCB9; Sun, 13 Jan 2013 22:36:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 91DFB26E; Sun, 13 Jan 2013 22:36:13 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DMaD15019875; Sun, 13 Jan 2013 22:36:13 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DMaCZn019871; Sun, 13 Jan 2013 22:36:12 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201301132236.r0DMaCZn019871@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 13 Jan 2013 22:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245393 - stable/8/usr.sbin/pkg X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 22:36:13 -0000 Author: bapt Date: Sun Jan 13 22:36:12 2013 New Revision: 245393 URL: http://svnweb.freebsd.org/changeset/base/245393 Log: MFC: r243883 if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead of pkgbeta.FreeBSD.org Added: stable/8/usr.sbin/pkg/dns_utils.c - copied unchanged from r243883, head/usr.sbin/pkg/dns_utils.c stable/8/usr.sbin/pkg/dns_utils.h - copied unchanged from r243883, head/usr.sbin/pkg/dns_utils.h Modified: stable/8/usr.sbin/pkg/Makefile stable/8/usr.sbin/pkg/pkg.c Directory Properties: stable/8/usr.sbin/pkg/ (props changed) Modified: stable/8/usr.sbin/pkg/Makefile ============================================================================== --- stable/8/usr.sbin/pkg/Makefile Sun Jan 13 22:35:51 2013 (r245392) +++ stable/8/usr.sbin/pkg/Makefile Sun Jan 13 22:36:12 2013 (r245393) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= pkg -SRC= pkg.c +SRCS= pkg.c dns_utils.c NO_MAN= yes DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} Copied: stable/8/usr.sbin/pkg/dns_utils.c (from r243883, head/usr.sbin/pkg/dns_utils.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.sbin/pkg/dns_utils.c Sun Jan 13 22:36:12 2013 (r245393, copy of r243883, head/usr.sbin/pkg/dns_utils.c) @@ -0,0 +1,136 @@ +/*- + * Copyright (c) 2012 Baptiste Daroussin + * 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, + * without modification, immediately at the beginning of the file. + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include "dns_utils.h" + +typedef union { + HEADER hdr; + unsigned char buf[1024]; +} dns_query; + +struct dns_srvinfo * +dns_getsrvinfo(const char *zone) +{ + struct dns_srvinfo **res, *first; + unsigned char *end, *p; + char host[MAXHOSTNAMELEN]; + dns_query q; + int len, qdcount, ancount, n, i; + unsigned int type, class, ttl, priority, weight, port; + + if ((len = res_query(zone, C_IN, T_SRV, q.buf, sizeof(q.buf))) == -1 || + len < (int)sizeof(HEADER)) + return (NULL); + + qdcount = ntohs(q.hdr.qdcount); + ancount = ntohs(q.hdr.ancount); + + end = q.buf + len; + p = q.buf + sizeof(HEADER); + + while(qdcount > 0 && p < end) { + qdcount--; + if((len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN)) < 0) + return (NULL); + p += len + NS_QFIXEDSZ; + } + + res = malloc(sizeof(struct dns_srvinfo) * ancount); + if (res == NULL) + return (NULL); + memset(res, 0, sizeof(struct dns_srvinfo) * ancount); + + n = 0; + while (ancount > 0 && p < end) { + ancount--; + len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN); + if (len < 0) { + for (i = 0; i < n; i++) + free(res[i]); + free(res); + return NULL; + } + + p += len; + + NS_GET16(type, p); + NS_GET16(class, p); + NS_GET32(ttl, p); + NS_GET16(len, p); + + if (type != T_SRV) { + p += len; + continue; + } + + NS_GET16(priority, p); + NS_GET16(weight, p); + NS_GET16(port, p); + + len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN); + if (len < 0) { + for (i = 0; i < n; i++) + free(res[i]); + free(res); + return (NULL); + } + + res[n] = malloc(sizeof(struct dns_srvinfo)); + if (res[n] == NULL) { + for (i = 0; i < n; i++) + free(res[i]); + free(res); + return (NULL); + } + res[n]->type = type; + res[n]->class = class; + res[n]->ttl = ttl; + res[n]->priority = priority; + res[n]->weight = weight; + res[n]->port = port; + res[n]->next = NULL; + strlcpy(res[n]->host, host, MAXHOSTNAMELEN); + + p += len; + n++; + } + + for (i = 0; i < n - 1; i++) + res[i]->next = res[i + 1]; + + first = res[0]; + free(res); + + return (first); +} Copied: stable/8/usr.sbin/pkg/dns_utils.h (from r243883, head/usr.sbin/pkg/dns_utils.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.sbin/pkg/dns_utils.h Sun Jan 13 22:36:12 2013 (r245393, copy of r243883, head/usr.sbin/pkg/dns_utils.h) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2012 Baptiste Daroussin + * 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 DNS_UTILS_H +#define DNS_UTILS_H +struct dns_srvinfo { + unsigned int type; + unsigned int class; + unsigned int ttl; + unsigned int priority; + unsigned int weight; + unsigned int port; + char host[MAXHOSTNAMELEN]; + struct dns_srvinfo *next; +}; + +struct dns_srvinfo * + dns_getsrvinfo(const char *zone); + +#endif Modified: stable/8/usr.sbin/pkg/pkg.c ============================================================================== --- stable/8/usr.sbin/pkg/pkg.c Sun Jan 13 22:35:51 2013 (r245392) +++ stable/8/usr.sbin/pkg/pkg.c Sun Jan 13 22:36:12 2013 (r245393) @@ -48,9 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include "elf_tables.h" +#include "dns_utils.h" #define _LOCALBASE "/usr/local" -#define _PKGS_URL "http://pkgbeta.FreeBSD.org" +#define _PKGS_URL "http://pkg.FreeBSD.org" static const char * elf_corres_to_string(struct _elf_corres *m, int e) @@ -281,16 +282,20 @@ install_pkg_static(char *path, char *pkg static int bootstrap_pkg(void) { + struct url *u; FILE *remote; FILE *config; char *site; + struct dns_srvinfo *mirrors, *current; + /* To store _https._tcp. + hostname + \0 */ + char zone[MAXHOSTNAMELEN + 13]; char url[MAXPATHLEN]; char conf[MAXPATHLEN]; char abi[BUFSIZ]; char tmppkg[MAXPATHLEN]; char buf[10240]; char pkgstatic[MAXPATHLEN]; - int fd, retry, ret; + int fd, retry, ret, max_retry; struct url_stat st; off_t done, r; time_t now; @@ -298,9 +303,11 @@ bootstrap_pkg(void) done = 0; last = 0; + max_retry = 3; ret = -1; remote = NULL; config = NULL; + current = mirrors = NULL; printf("Bootstrapping pkg please wait\n"); @@ -324,12 +331,37 @@ bootstrap_pkg(void) return (-1); } - retry = 3; - do { - remote = fetchXGetURL(url, &st, ""); - if (remote == NULL) - sleep(1); - } while (remote == NULL && retry-- > 0); + retry = max_retry; + + u = fetchParseURL(url); + while (remote == NULL) { + if (retry == max_retry) { + if (strcmp(u->scheme, "file") != 0) { + snprintf(zone, sizeof(zone), + "_%s._tcp.%s", u->scheme, u->host); + printf("%s\n", zone); + mirrors = dns_getsrvinfo(zone); + current = mirrors; + } + } + + if (mirrors != NULL) + strlcpy(u->host, current->host, sizeof(u->host)); + + remote = fetchXGet(u, &st, ""); + if (remote == NULL) { + --retry; + if (retry <= 0) + goto fetchfail; + if (mirrors == NULL) { + sleep(1); + } else { + current = current->next; + if (current == NULL) + current = mirrors; + } + } + } if (remote == NULL) goto fetchfail; From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 22:37:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4F5A5E36; Sun, 13 Jan 2013 22:37:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 251EB284; Sun, 13 Jan 2013 22:37:47 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DMblZf020060; Sun, 13 Jan 2013 22:37:47 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DMbkDE020056; Sun, 13 Jan 2013 22:37:46 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201301132237.r0DMbkDE020056@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 13 Jan 2013 22:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245394 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 22:37:47 -0000 Author: bapt Date: Sun Jan 13 22:37:45 2013 New Revision: 245394 URL: http://svnweb.freebsd.org/changeset/base/245394 Log: MFC: r243883 if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead of pkgbeta.FreeBSD.org Added: stable/9/usr.sbin/pkg/dns_utils.c - copied unchanged from r243883, head/usr.sbin/pkg/dns_utils.c stable/9/usr.sbin/pkg/dns_utils.h - copied unchanged from r243883, head/usr.sbin/pkg/dns_utils.h Modified: stable/9/usr.sbin/pkg/Makefile stable/9/usr.sbin/pkg/pkg.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/Makefile ============================================================================== --- stable/9/usr.sbin/pkg/Makefile Sun Jan 13 22:36:12 2013 (r245393) +++ stable/9/usr.sbin/pkg/Makefile Sun Jan 13 22:37:45 2013 (r245394) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= pkg -SRC= pkg.c +SRCS= pkg.c dns_utils.c NO_MAN= yes DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} Copied: stable/9/usr.sbin/pkg/dns_utils.c (from r243883, head/usr.sbin/pkg/dns_utils.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/usr.sbin/pkg/dns_utils.c Sun Jan 13 22:37:45 2013 (r245394, copy of r243883, head/usr.sbin/pkg/dns_utils.c) @@ -0,0 +1,136 @@ +/*- + * Copyright (c) 2012 Baptiste Daroussin + * 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, + * without modification, immediately at the beginning of the file. + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include "dns_utils.h" + +typedef union { + HEADER hdr; + unsigned char buf[1024]; +} dns_query; + +struct dns_srvinfo * +dns_getsrvinfo(const char *zone) +{ + struct dns_srvinfo **res, *first; + unsigned char *end, *p; + char host[MAXHOSTNAMELEN]; + dns_query q; + int len, qdcount, ancount, n, i; + unsigned int type, class, ttl, priority, weight, port; + + if ((len = res_query(zone, C_IN, T_SRV, q.buf, sizeof(q.buf))) == -1 || + len < (int)sizeof(HEADER)) + return (NULL); + + qdcount = ntohs(q.hdr.qdcount); + ancount = ntohs(q.hdr.ancount); + + end = q.buf + len; + p = q.buf + sizeof(HEADER); + + while(qdcount > 0 && p < end) { + qdcount--; + if((len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN)) < 0) + return (NULL); + p += len + NS_QFIXEDSZ; + } + + res = malloc(sizeof(struct dns_srvinfo) * ancount); + if (res == NULL) + return (NULL); + memset(res, 0, sizeof(struct dns_srvinfo) * ancount); + + n = 0; + while (ancount > 0 && p < end) { + ancount--; + len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN); + if (len < 0) { + for (i = 0; i < n; i++) + free(res[i]); + free(res); + return NULL; + } + + p += len; + + NS_GET16(type, p); + NS_GET16(class, p); + NS_GET32(ttl, p); + NS_GET16(len, p); + + if (type != T_SRV) { + p += len; + continue; + } + + NS_GET16(priority, p); + NS_GET16(weight, p); + NS_GET16(port, p); + + len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN); + if (len < 0) { + for (i = 0; i < n; i++) + free(res[i]); + free(res); + return (NULL); + } + + res[n] = malloc(sizeof(struct dns_srvinfo)); + if (res[n] == NULL) { + for (i = 0; i < n; i++) + free(res[i]); + free(res); + return (NULL); + } + res[n]->type = type; + res[n]->class = class; + res[n]->ttl = ttl; + res[n]->priority = priority; + res[n]->weight = weight; + res[n]->port = port; + res[n]->next = NULL; + strlcpy(res[n]->host, host, MAXHOSTNAMELEN); + + p += len; + n++; + } + + for (i = 0; i < n - 1; i++) + res[i]->next = res[i + 1]; + + first = res[0]; + free(res); + + return (first); +} Copied: stable/9/usr.sbin/pkg/dns_utils.h (from r243883, head/usr.sbin/pkg/dns_utils.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/usr.sbin/pkg/dns_utils.h Sun Jan 13 22:37:45 2013 (r245394, copy of r243883, head/usr.sbin/pkg/dns_utils.h) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2012 Baptiste Daroussin + * 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 DNS_UTILS_H +#define DNS_UTILS_H +struct dns_srvinfo { + unsigned int type; + unsigned int class; + unsigned int ttl; + unsigned int priority; + unsigned int weight; + unsigned int port; + char host[MAXHOSTNAMELEN]; + struct dns_srvinfo *next; +}; + +struct dns_srvinfo * + dns_getsrvinfo(const char *zone); + +#endif Modified: stable/9/usr.sbin/pkg/pkg.c ============================================================================== --- stable/9/usr.sbin/pkg/pkg.c Sun Jan 13 22:36:12 2013 (r245393) +++ stable/9/usr.sbin/pkg/pkg.c Sun Jan 13 22:37:45 2013 (r245394) @@ -48,9 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include "elf_tables.h" +#include "dns_utils.h" #define _LOCALBASE "/usr/local" -#define _PKGS_URL "http://pkgbeta.FreeBSD.org" +#define _PKGS_URL "http://pkg.FreeBSD.org" static const char * elf_corres_to_string(struct _elf_corres *m, int e) @@ -281,16 +282,20 @@ install_pkg_static(char *path, char *pkg static int bootstrap_pkg(void) { + struct url *u; FILE *remote; FILE *config; char *site; + struct dns_srvinfo *mirrors, *current; + /* To store _https._tcp. + hostname + \0 */ + char zone[MAXHOSTNAMELEN + 13]; char url[MAXPATHLEN]; char conf[MAXPATHLEN]; char abi[BUFSIZ]; char tmppkg[MAXPATHLEN]; char buf[10240]; char pkgstatic[MAXPATHLEN]; - int fd, retry, ret; + int fd, retry, ret, max_retry; struct url_stat st; off_t done, r; time_t now; @@ -298,9 +303,11 @@ bootstrap_pkg(void) done = 0; last = 0; + max_retry = 3; ret = -1; remote = NULL; config = NULL; + current = mirrors = NULL; printf("Bootstrapping pkg please wait\n"); @@ -324,12 +331,37 @@ bootstrap_pkg(void) return (-1); } - retry = 3; - do { - remote = fetchXGetURL(url, &st, ""); - if (remote == NULL) - sleep(1); - } while (remote == NULL && retry-- > 0); + retry = max_retry; + + u = fetchParseURL(url); + while (remote == NULL) { + if (retry == max_retry) { + if (strcmp(u->scheme, "file") != 0) { + snprintf(zone, sizeof(zone), + "_%s._tcp.%s", u->scheme, u->host); + printf("%s\n", zone); + mirrors = dns_getsrvinfo(zone); + current = mirrors; + } + } + + if (mirrors != NULL) + strlcpy(u->host, current->host, sizeof(u->host)); + + remote = fetchXGet(u, &st, ""); + if (remote == NULL) { + --retry; + if (retry <= 0) + goto fetchfail; + if (mirrors == NULL) { + sleep(1); + } else { + current = current->next; + if (current == NULL) + current = mirrors; + } + } + } if (remote == NULL) goto fetchfail; From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 22:41:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B4925176; Sun, 13 Jan 2013 22:41:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A72DA2A6; Sun, 13 Jan 2013 22:41:58 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DMfwRP022215; Sun, 13 Jan 2013 22:41:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DMfwZX022214; Sun, 13 Jan 2013 22:41:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301132241.r0DMfwZX022214@svn.freebsd.org> From: Adrian Chadd Date: Sun, 13 Jan 2013 22:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245396 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 22:41:58 -0000 Author: adrian Date: Sun Jan 13 22:41:58 2013 New Revision: 245396 URL: http://svnweb.freebsd.org/changeset/base/245396 Log: If we're doing a kickpcu, make sure we flush the whole RX list rather than stopping after 128 frames. Whilst here, add in some code that lets me optionally flip back to the original behaviour of calling ath_startrecv(). Modified: head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Sun Jan 13 22:41:44 2013 (r245395) +++ head/sys/dev/ath/if_ath_rx.c Sun Jan 13 22:41:58 2013 (r245396) @@ -845,6 +845,7 @@ ath_rx_proc(struct ath_softc *sc, int re int16_t nf; u_int64_t tsf; int npkts = 0; + int kickpcu = 0; /* XXX we must not hold the ATH_LOCK here */ ATH_UNLOCK_ASSERT(sc); @@ -852,6 +853,7 @@ ath_rx_proc(struct ath_softc *sc, int re ATH_PCU_LOCK(sc); sc->sc_rxproc_cnt++; + kickpcu = sc->sc_kickpcu; ATH_PCU_UNLOCK(sc); DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: called\n", __func__); @@ -866,7 +868,7 @@ ath_rx_proc(struct ath_softc *sc, int re * latency can jump by quite a bit, causing throughput * degredation. */ - if (npkts >= ATH_RX_MAX) + if (!kickpcu && npkts >= ATH_RX_MAX) break; bf = TAILQ_FIRST(&sc->sc_rxbuf); @@ -961,6 +963,9 @@ rx_proc_next: __func__, npkts); /* XXX rxslink? */ +#if 0 + ath_startrecv(sc); +#else /* * XXX can we hold the PCU lock here? * Are there any net80211 buffer calls involved? @@ -970,6 +975,7 @@ rx_proc_next: ath_hal_rxena(ah); /* enable recv descriptors */ ath_mode_init(sc); /* set filters, etc. */ ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */ +#endif ath_hal_intrset(ah, sc->sc_imask); sc->sc_kickpcu = 0; From owner-svn-src-all@FreeBSD.ORG Sun Jan 13 23:00:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6A426BDC; Sun, 13 Jan 2013 23:00:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 525E0362; Sun, 13 Jan 2013 23:00:41 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0DN0ftl028343; Sun, 13 Jan 2013 23:00:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0DN0fJe028342; Sun, 13 Jan 2013 23:00:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301132300.r0DN0fJe028342@svn.freebsd.org> From: Alexander Motin Date: Sun, 13 Jan 2013 23:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245398 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Jan 2013 23:00:41 -0000 Author: mav Date: Sun Jan 13 23:00:40 2013 New Revision: 245398 URL: http://svnweb.freebsd.org/changeset/base/245398 Log: - Add checks for Intel metadata version and attributes. Ignore disks with unsupported metadata types like Intel Smart Response to not corrupt them. - Improve setting of these things during metadata writing to protect from incapable BIOS'es and other implementations. Modified: head/sys/geom/raid/md_intel.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Sun Jan 13 22:46:06 2013 (r245397) +++ head/sys/geom/raid/md_intel.c Sun Jan 13 23:00:40 2013 (r245398) @@ -165,6 +165,11 @@ struct intel_raid_conf { #define INTEL_ATTR_RAID1E 0x00000008 #define INTEL_ATTR_RAID5 0x00000010 #define INTEL_ATTR_RAIDCNG 0x00000020 +#define INTEL_ATTR_EXT_STRIP 0x00000040 +#define INTEL_ATTR_NVM_CACHE 0x02000000 +#define INTEL_ATTR_2TB_DISK 0x04000000 +#define INTEL_ATTR_BBM 0x08000000 +#define INTEL_ATTR_NVM_CACHE2 0x10000000 #define INTEL_ATTR_2TB 0x20000000 #define INTEL_ATTR_PM 0x40000000 #define INTEL_ATTR_CHECKSUM 0x80000000 @@ -182,6 +187,11 @@ struct intel_raid_conf { /* Here goes total_volumes of struct intel_raid_vol. */ } __packed; +#define INTEL_ATTR_SUPPORTED ( INTEL_ATTR_RAID0 | INTEL_ATTR_RAID1 | \ + INTEL_ATTR_RAID10 | INTEL_ATTR_RAID1E | INTEL_ATTR_RAID5 | \ + INTEL_ATTR_RAIDCNG | INTEL_ATTR_EXT_STRIP | INTEL_ATTR_2TB_DISK | \ + INTEL_ATTR_2TB | INTEL_ATTR_PM | INTEL_ATTR_CHECKSUM ) + #define INTEL_MAX_MD_SIZE(ndisks) \ (sizeof(struct intel_raid_conf) + \ sizeof(struct intel_raid_disk) * (ndisks - 1) + \ @@ -554,6 +564,21 @@ badsize: g_raid_md_intel_print(meta); + if (strncmp(meta->version, INTEL_VERSION_1300, 6) > 0) { + G_RAID_DEBUG(1, "Intel unsupported version: '%.6s'", + meta->version); + free(meta, M_MD_INTEL); + return (NULL); + } + + if (strncmp(meta->version, INTEL_VERSION_1300, 6) >= 0 && + (meta->attributes & ~INTEL_ATTR_SUPPORTED) != 0) { + G_RAID_DEBUG(1, "Intel unsupported attributes: 0x%08x", + meta->attributes & ~INTEL_ATTR_SUPPORTED); + free(meta, M_MD_INTEL); + return (NULL); + } + /* Validate disk indexes. */ for (i = 0; i < meta->total_volumes; i++) { mvol = intel_get_volume(meta, i); @@ -2268,6 +2293,8 @@ g_raid_md_write_intel(struct g_raid_md_o if (pd->pd_disk_pos < 0) continue; meta->disk[pd->pd_disk_pos] = pd->pd_disk_meta; + if (pd->pd_disk_meta.sectors_hi != 0) + meta->attributes |= INTEL_ATTR_2TB_DISK; } /* Fill volumes and maps. */ @@ -2297,12 +2324,16 @@ g_raid_md_write_intel(struct g_raid_md_o meta->attributes |= INTEL_ATTR_RAID1; else if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID5) meta->attributes |= INTEL_ATTR_RAID5; - else + else if ((vol->v_disks_count & 1) == 0) meta->attributes |= INTEL_ATTR_RAID10; + else + meta->attributes |= INTEL_ATTR_RAID1E; + if (pv->pv_cng) + meta->attributes |= INTEL_ATTR_RAIDCNG; + if (vol->v_strip_size > 131072) + meta->attributes |= INTEL_ATTR_EXT_STRIP; - if (meta->attributes & INTEL_ATTR_2TB) - cv = INTEL_VERSION_1300; - else if (pv->pv_cng) + if (pv->pv_cng) cv = INTEL_VERSION_1206; else if (vol->v_disks_count > 4) cv = INTEL_VERSION_1204; @@ -2310,8 +2341,6 @@ g_raid_md_write_intel(struct g_raid_md_o cv = INTEL_VERSION_1202; else if (vol->v_disks_count > 2) cv = INTEL_VERSION_1201; - else if (vi > 0) - cv = INTEL_VERSION_1200; else if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1) cv = INTEL_VERSION_1100; else @@ -2321,6 +2350,8 @@ g_raid_md_write_intel(struct g_raid_md_o strlcpy(&mvol->name[0], vol->v_name, sizeof(mvol->name)); mvol->total_sectors = vol->v_mediasize / sectorsize; + mvol->state = (INTEL_ST_READ_COALESCING | + INTEL_ST_WRITE_COALESCING); if (pv->pv_cng) { mvol->state |= INTEL_ST_CLONE_N_GO; if (pv->pv_cng_man_sync) @@ -2437,7 +2468,10 @@ g_raid_md_write_intel(struct g_raid_md_o vi++; } meta->total_volumes = vi; - if (strcmp(version, INTEL_VERSION_1300) != 0) + if (vi > 1 || meta->attributes & + (INTEL_ATTR_EXT_STRIP | INTEL_ATTR_2TB_DISK | INTEL_ATTR_2TB)) + version = INTEL_VERSION_1300; + if (strcmp(version, INTEL_VERSION_1300) < 0) meta->attributes &= INTEL_ATTR_CHECKSUM; memcpy(&meta->version[0], version, sizeof(INTEL_VERSION_1000) - 1); From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 00:38:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4A2F5E5F; Mon, 14 Jan 2013 00:38:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3D30F86D; Mon, 14 Jan 2013 00:38:53 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E0cqeo057247; Mon, 14 Jan 2013 00:38:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E0cqIM057246; Mon, 14 Jan 2013 00:38:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301140038.r0E0cqIM057246@svn.freebsd.org> From: Alexander Motin Date: Mon, 14 Jan 2013 00:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245400 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 00:38:53 -0000 Author: mav Date: Mon Jan 14 00:38:51 2013 New Revision: 245400 URL: http://svnweb.freebsd.org/changeset/base/245400 Log: Windows driver writes relative volume IDs to metadata field. Use that value as a hint for raid/rX device number to make it persistent across reboots. Modified: head/sys/geom/raid/md_intel.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Sun Jan 13 23:36:21 2013 (r245399) +++ head/sys/geom/raid/md_intel.c Mon Jan 14 00:38:51 2013 (r245400) @@ -1150,7 +1150,7 @@ g_raid_md_intel_start(struct g_raid_soft for (i = 0; i < meta->total_volumes; i++) { mvol = intel_get_volume(meta, i); mmap = intel_get_map(mvol, 0); - vol = g_raid_create_volume(sc, mvol->name, -1); + vol = g_raid_create_volume(sc, mvol->name, mvol->tid - 1); pv = malloc(sizeof(*pv), M_MD_INTEL, M_WAITOK | M_ZERO); pv->pv_volume_pos = i; pv->pv_cng = (mvol->state & INTEL_ST_CLONE_N_GO) != 0; @@ -2352,6 +2352,7 @@ g_raid_md_write_intel(struct g_raid_md_o mvol->total_sectors = vol->v_mediasize / sectorsize; mvol->state = (INTEL_ST_READ_COALESCING | INTEL_ST_WRITE_COALESCING); + mvol->tid = vol->v_global_id + 1; if (pv->pv_cng) { mvol->state |= INTEL_ST_CLONE_N_GO; if (pv->pv_cng_man_sync) From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 01:09:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BA2D97CC; Mon, 14 Jan 2013 01:09:24 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 801F697B; Mon, 14 Jan 2013 01:09:24 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E19O3E066983; Mon, 14 Jan 2013 01:09:24 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E19NZp066979; Mon, 14 Jan 2013 01:09:23 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201301140109.r0E19NZp066979@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Jan 2013 01:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245401 - in head/usr.sbin/bsdconfig: . networking/share security usermgmt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 01:09:24 -0000 Author: dteske Date: Mon Jan 14 01:09:23 2013 New Revision: 245401 URL: http://svnweb.freebsd.org/changeset/base/245401 Log: Add missing dialog(1) arguments to internationalize "Help"-button label. Modified: head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/usermgmt/usermgmt Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Mon Jan 14 00:38:51 2013 (r245400) +++ head/usr.sbin/bsdconfig/bsdconfig Mon Jan 14 01:09:23 2013 (r245401) @@ -192,6 +192,7 @@ dialog_menu_main() --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_exit_bsdconfig\" \ --help-button \ + --help-label \"\$msg_help\" \ ${USE_XDIALOG:+--help \"\"} \ --menu \"\$prompt\" $size $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Mon Jan 14 00:38:51 2013 (r245400) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Mon Jan 14 01:09:23 2013 (r245401) @@ -343,6 +343,7 @@ f_dialog_menu_netdev_edit() --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --help-button \ + --help-label \"\$msg_help\" \ ${USE_XDIALOG:+--help \"\"} \ --menu \"\$prompt\" $size \ $menu_list \ Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Mon Jan 14 00:38:51 2013 (r245400) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Mon Jan 14 01:09:23 2013 (r245401) @@ -78,6 +78,7 @@ dialog_menu_main() --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --help-button \ + --help-label \"\$msg_help\" \ ${USE_XDIALOG:+--help \"\"} \ --menu \"\$prompt\" $size \ $menu_list \ Modified: head/usr.sbin/bsdconfig/usermgmt/usermgmt ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/usermgmt Mon Jan 14 00:38:51 2013 (r245400) +++ head/usr.sbin/bsdconfig/usermgmt/usermgmt Mon Jan 14 01:09:23 2013 (r245401) @@ -88,6 +88,7 @@ dialog_menu_main() --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --help-button \ + --help-label \"\$msg_help\" \ ${USE_XDIALOG:+--help \"\"} \ --menu \"\" $size $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 01:15:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 194FA9CB; Mon, 14 Jan 2013 01:15:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0B51E9B6; Mon, 14 Jan 2013 01:15:27 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E1FQKb069573; Mon, 14 Jan 2013 01:15:26 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E1FQKp069562; Mon, 14 Jan 2013 01:15:26 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201301140115.r0E1FQKp069562@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Jan 2013 01:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245402 - in head/usr.sbin/bsdconfig: networking/share share startup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 01:15:27 -0000 Author: dteske Date: Mon Jan 14 01:15:25 2013 New Revision: 245402 URL: http://svnweb.freebsd.org/changeset/base/245402 Log: Add new f_yesno/f_noyes wrapper functions (which take printf(1) syntax). Modified: head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/networking/share/hostname.subr head/usr.sbin/bsdconfig/networking/share/routing.subr head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/startup/rcdelete Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Mon Jan 14 01:09:23 2013 (r245401) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Mon Jan 14 01:15:25 2013 (r245402) @@ -456,9 +456,8 @@ f_dialog_menu_netdev_edit() # Re/Apply the settings if desired # if [ ! "$dhcp" ]; then - f_dialog_yesno "Would you like to bring the $interface" \ - "interface up right now?" - if [ $? -eq $SUCCESS ]; then + if f_yesno "$msg_bring_interface_up" "$interface" + then f_show_info "$msg_bring_interface_up" "$interface" local dr="$( f_sysrc_get defaultrouter )" err Modified: head/usr.sbin/bsdconfig/networking/share/hostname.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/hostname.subr Mon Jan 14 01:09:23 2013 (r245401) +++ head/usr.sbin/bsdconfig/networking/share/hostname.subr Mon Jan 14 01:15:25 2013 (r245402) @@ -201,10 +201,8 @@ f_dialog_input_hostname() f_show_msg "$msg_activate_hostname_x11warning" \ "$( hostname )" "$hostname" else - f_dialog_yesno "$( - printf "$msg_activate_hostname" \ - "$( hostname )" "$hostname" \ - )" \ + f_yesno "$msg_activate_hostname" \ + "$( hostname )" "$hostname" \ && hostname "$hostname" fi fi Modified: head/usr.sbin/bsdconfig/networking/share/routing.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/routing.subr Mon Jan 14 01:09:23 2013 (r245401) +++ head/usr.sbin/bsdconfig/networking/share/routing.subr Mon Jan 14 01:15:25 2013 (r245402) @@ -129,11 +129,8 @@ f_dialog_input_defaultrouter() # if [ "$( f_route_get_default )" != "$defaultrouter" ]; then f_dialog_clear - f_dialog_yesno "$( - printf "$msg_activate_default_router" \ - "$( f_route_get_default )" "$defaultrouter" - )" - + f_yesno "$msg_activate_default_router" \ + "$( f_route_get_default )" "$defaultrouter" if [ $? -eq $SUCCESS ]; then local err Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Mon Jan 14 01:09:23 2013 (r245401) +++ head/usr.sbin/bsdconfig/share/common.subr Mon Jan 14 01:15:25 2013 (r245402) @@ -214,6 +214,50 @@ f_show_msg() fi } + +# f_yesno $fmt [ $opts ... ] +# +# Display a message in a dialog yes/no box using printf(1) syntax. +# +f_yesno() +{ + local msg + msg=$( printf "$@" ) + + # + # Use f_dialog_yesno from dialog.subr if possible, otherwise fall + # back to dialog(1) (without options, making it obvious when using + # un-aided system dialog). + # + if f_have f_dialog_yesno; then + f_dialog_yesno "$msg" + else + dialog --yesno "$msg" 0 0 + fi +} + +# f_noyes $fmt [ $opts ... ] +# +# Display a message in a dialog yes/no box using printf(1) syntax. +# NOTE: THis is just like the f_yesno function except "No" is default. +# +f_noyes() +{ + local msg + msg=$( printf "$@" ) + + # + # Use f_dialog_noyes from dialog.subr if possible, otherwise fall + # back to dialog(1) (without options, making it obvious when using + # un-aided system dialog). + # + if f_have f_dialog_noyes; then + f_dialog_noyes "$msg" + else + dialog --defaultno --yesno "$msg" 0 0 + fi +} + # f_show_help $file # # Display a language help-file. Automatically takes $LANG and $LC_ALL into Modified: head/usr.sbin/bsdconfig/startup/rcdelete ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcdelete Mon Jan 14 01:09:23 2013 (r245401) +++ head/usr.sbin/bsdconfig/startup/rcdelete Mon Jan 14 01:15:25 2013 (r245402) @@ -210,9 +210,7 @@ dialog_menu_delete() [ $# -ge 1 ] || return $FAILURE if [ $# -eq 1 ]; then - msg=$( printf "$msg_are_you_sure_you_want_to_delete" \ - "$delete_vars" ) - f_dialog_noyes "$msg" + f_noyes "$msg_are_you_sure_you_want_to_delete" "$delete_vars" return $? fi From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:40:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DFFBC418; Mon, 14 Jan 2013 05:40:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AE6A8279; Mon, 14 Jan 2013 05:40:22 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E5eMZ3049064; Mon, 14 Jan 2013 05:40:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E5eMw1049063; Mon, 14 Jan 2013 05:40:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301140540.r0E5eMw1049063@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jan 2013 05:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245405 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:40:22 -0000 Author: kib Date: Mon Jan 14 05:40:21 2013 New Revision: 245405 URL: http://svnweb.freebsd.org/changeset/base/245405 Log: Rename vfs_hash_index() to vfs_hash_bucket(). Reviewed by: peter Tested by: peter, pho Sponsored by: The FreeBSD Foundation MFC after: 5 days Modified: head/sys/kern/vfs_hash.c Modified: head/sys/kern/vfs_hash.c ============================================================================== --- head/sys/kern/vfs_hash.c Mon Jan 14 04:31:54 2013 (r245404) +++ head/sys/kern/vfs_hash.c Mon Jan 14 05:40:21 2013 (r245405) @@ -55,10 +55,10 @@ vfs_hashinit(void *dummy __unused) SYSINIT(vfs_hash, SI_SUB_VFS, SI_ORDER_SECOND, vfs_hashinit, NULL); static struct vfs_hash_head * -vfs_hash_index(const struct mount *mp, u_int hash) +vfs_hash_bucket(const struct mount *mp, u_int hash) { - return(&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]); + return (&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]); } int @@ -69,7 +69,7 @@ vfs_hash_get(const struct mount *mp, u_i while (1) { mtx_lock(&vfs_hash_mtx); - LIST_FOREACH(vp, vfs_hash_index(mp, hash), v_hashlist) { + LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { if (vp->v_hash != hash) continue; if (vp->v_mount != mp) @@ -113,7 +113,7 @@ vfs_hash_insert(struct vnode *vp, u_int while (1) { mtx_lock(&vfs_hash_mtx); LIST_FOREACH(vp2, - vfs_hash_index(vp->v_mount, hash), v_hashlist) { + vfs_hash_bucket(vp->v_mount, hash), v_hashlist) { if (vp2->v_hash != hash) continue; if (vp2->v_mount != vp->v_mount) @@ -138,7 +138,7 @@ vfs_hash_insert(struct vnode *vp, u_int } vp->v_hash = hash; - LIST_INSERT_HEAD(vfs_hash_index(vp->v_mount, hash), vp, v_hashlist); + LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist); mtx_unlock(&vfs_hash_mtx); return (0); } @@ -149,7 +149,7 @@ vfs_hash_rehash(struct vnode *vp, u_int mtx_lock(&vfs_hash_mtx); LIST_REMOVE(vp, v_hashlist); - LIST_INSERT_HEAD(vfs_hash_index(vp->v_mount, hash), vp, v_hashlist); + LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist); vp->v_hash = hash; mtx_unlock(&vfs_hash_mtx); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:41:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D099E5A6; Mon, 14 Jan 2013 05:41:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B09AF288; Mon, 14 Jan 2013 05:41:41 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E5ffXt050677; Mon, 14 Jan 2013 05:41:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E5ffTP050675; Mon, 14 Jan 2013 05:41:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301140541.r0E5ffTP050675@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jan 2013 05:41:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245406 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:41:41 -0000 Author: kib Date: Mon Jan 14 05:41:40 2013 New Revision: 245406 URL: http://svnweb.freebsd.org/changeset/base/245406 Log: Add exported vfs_hash_index() function, which calculates the canonical pre-masked hash for the given vnode. The function assumes that vp->v_hash is initialized by the filesystem vnode instantiation function. At the moment, it is only done if filesystem uses vfs_hash_insert(). Reviewed by: peter Tested by: peter, pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 5 days Modified: head/sys/kern/vfs_hash.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_hash.c ============================================================================== --- head/sys/kern/vfs_hash.c Mon Jan 14 05:40:21 2013 (r245405) +++ head/sys/kern/vfs_hash.c Mon Jan 14 05:41:40 2013 (r245406) @@ -54,6 +54,13 @@ vfs_hashinit(void *dummy __unused) /* Must be SI_ORDER_SECOND so desiredvnodes is available */ SYSINIT(vfs_hash, SI_SUB_VFS, SI_ORDER_SECOND, vfs_hashinit, NULL); +u_int +vfs_hash_index(struct vnode *vp) +{ + + return (vp->v_hash + vp->v_mount->mnt_hashseed); +} + static struct vfs_hash_head * vfs_hash_bucket(const struct mount *mp, u_int hash) { Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Jan 14 05:40:21 2013 (r245405) +++ head/sys/sys/vnode.h Mon Jan 14 05:41:40 2013 (r245406) @@ -812,6 +812,7 @@ int fifo_printinfo(struct vnode *); typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg); int vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); +u_int vfs_hash_index(struct vnode *vp); int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); void vfs_hash_rehash(struct vnode *vp, u_int hash); void vfs_hash_remove(struct vnode *vp); From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:42:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C5F6771D; Mon, 14 Jan 2013 05:42:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6C2293; Mon, 14 Jan 2013 05:42:54 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E5gsWg050871; Mon, 14 Jan 2013 05:42:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E5gsK0050870; Mon, 14 Jan 2013 05:42:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301140542.r0E5gsK0050870@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jan 2013 05:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245407 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:42:54 -0000 Author: kib Date: Mon Jan 14 05:42:54 2013 New Revision: 245407 URL: http://svnweb.freebsd.org/changeset/base/245407 Log: diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7c243b6..0bdaf36 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -279,6 +279,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt) +static int vnsz2log; /* * Initialize the vnode management data structures. @@ -293,6 +294,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, static void vntblinit(void *dummy __unused) { + u_int i; int physvnodes, virtvnodes; /* @@ -332,6 +334,9 @@ vntblinit(void *dummy __unused) syncer_maxdelay = syncer_mask + 1; mtx_init(&sync_mtx, "Syncer mtx", NULL, MTX_DEF); cv_init(&sync_wakeup, "syncer"); + for (i = 1; i <= sizeof(struct vnode); i <<= 1) + vnsz2log++; + vnsz2log--; } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vntblinit, NULL); @@ -1067,6 +1072,14 @@ alloc: } rangelock_init(&vp->v_rl); + /* + * For the filesystems which do not use vfs_hash_insert(), + * still initialize v_hash to have vfs_hash_index() useful. + * E.g., nullfs uses vfs_hash_index() on the lower vnode for + * its own hashing. + */ + vp->v_hash = (uintptr_t)vp >> vnsz2log; + *vpp = vp; return (0); } Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Jan 14 05:41:40 2013 (r245406) +++ head/sys/kern/vfs_subr.c Mon Jan 14 05:42:54 2013 (r245407) @@ -279,6 +279,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt) +static int vnsz2log; /* * Initialize the vnode management data structures. @@ -293,6 +294,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe static void vntblinit(void *dummy __unused) { + u_int i; int physvnodes, virtvnodes; /* @@ -332,6 +334,9 @@ vntblinit(void *dummy __unused) syncer_maxdelay = syncer_mask + 1; mtx_init(&sync_mtx, "Syncer mtx", NULL, MTX_DEF); cv_init(&sync_wakeup, "syncer"); + for (i = 1; i <= sizeof(struct vnode); i <<= 1) + vnsz2log++; + vnsz2log--; } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vntblinit, NULL); @@ -1067,6 +1072,14 @@ alloc: } rangelock_init(&vp->v_rl); + /* + * For the filesystems which do not use vfs_hash_insert(), + * still initialize v_hash to have vfs_hash_index() useful. + * E.g., nullfs uses vfs_hash_index() on the lower vnode for + * its own hashing. + */ + vp->v_hash = (uintptr_t)vp >> vnsz2log; + *vpp = vp; return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:44:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4A6E58B1; Mon, 14 Jan 2013 05:44:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 24BF22AA; Mon, 14 Jan 2013 05:44:48 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E5imom051171; Mon, 14 Jan 2013 05:44:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E5imKI051170; Mon, 14 Jan 2013 05:44:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301140544.r0E5imKI051170@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jan 2013 05:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245408 - head/sys/fs/nullfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:44:48 -0000 Author: kib Date: Mon Jan 14 05:44:47 2013 New Revision: 245408 URL: http://svnweb.freebsd.org/changeset/base/245408 Log: The current default size of the nullfs hash table used to lookup the existing nullfs vnode by the lower vnode is only 16 slots. Since the default mode for the nullfs is to cache the vnodes, hash has extremely huge chains. Size the nullfs hashtbl based on the current value of desiredvnodes. Use vfs_hash_index() to calculate the hash bucket for a given vnode. Pointy hat to: kib Diagnosed and reviewed by: peter Tested by: peter, pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 5 days Modified: head/sys/fs/nullfs/null_subr.c Modified: head/sys/fs/nullfs/null_subr.c ============================================================================== --- head/sys/fs/nullfs/null_subr.c Mon Jan 14 05:42:54 2013 (r245407) +++ head/sys/fs/nullfs/null_subr.c Mon Jan 14 05:44:47 2013 (r245408) @@ -46,9 +46,6 @@ #include -#define LOG2_SIZEVNODE 8 /* log2(sizeof struct vnode) */ -#define NNULLNODECACHE 16 - /* * Null layer cache: * Each cache entry holds a reference to the lower vnode @@ -57,12 +54,11 @@ * alias is removed the lower vnode is vrele'd. */ -#define NULL_NHASH(vp) \ - (&null_node_hashtbl[(((uintptr_t)vp)>>LOG2_SIZEVNODE) & null_node_hash]) +#define NULL_NHASH(vp) (&null_node_hashtbl[vfs_hash_index(vp) & null_hash_mask]) static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl; -static u_long null_node_hash; -struct mtx null_hashmtx; +static struct mtx null_hashmtx; +static u_long null_hash_mask; static MALLOC_DEFINE(M_NULLFSHASH, "nullfs_hash", "NULLFS hash table"); MALLOC_DEFINE(M_NULLFSNODE, "nullfs_node", "NULLFS vnode private part"); @@ -77,8 +73,8 @@ nullfs_init(vfsp) struct vfsconf *vfsp; { - NULLFSDEBUG("nullfs_init\n"); /* printed during system boot */ - null_node_hashtbl = hashinit(NNULLNODECACHE, M_NULLFSHASH, &null_node_hash); + null_node_hashtbl = hashinit(desiredvnodes, M_NULLFSHASH, + &null_hash_mask); mtx_init(&null_hashmtx, "nullhs", NULL, MTX_DEF); return (0); } @@ -89,7 +85,7 @@ nullfs_uninit(vfsp) { mtx_destroy(&null_hashmtx); - hashdestroy(null_node_hashtbl, M_NULLFSHASH, null_node_hash); + hashdestroy(null_node_hashtbl, M_NULLFSHASH, null_hash_mask); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:45:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1F16FA32; Mon, 14 Jan 2013 05:45:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0FFBE2BA; Mon, 14 Jan 2013 05:45:34 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E5jXTg051325; Mon, 14 Jan 2013 05:45:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E5jXC3051324; Mon, 14 Jan 2013 05:45:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301140545.r0E5jXC3051324@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jan 2013 05:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245409 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:45:34 -0000 Author: kib Date: Mon Jan 14 05:45:33 2013 New Revision: 245409 URL: http://svnweb.freebsd.org/changeset/base/245409 Log: For zfs vnodes, use the standard inode number based hash algorithm. Reviewed and tested by: peter Sponsored by: The FreeBSD Foundation MFC after: 5 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 14 05:44:47 2013 (r245408) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 14 05:45:33 2013 (r245409) @@ -2025,6 +2025,8 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla err = zfs_vnode_lock(*vpp, flags); if (err != 0) *vpp = NULL; + else + (*vpp)->v_hash = ino; return (err); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:46:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 15FB3BB9; Mon, 14 Jan 2013 05:46:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 03F4D2D0; Mon, 14 Jan 2013 05:46:50 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E5kngV051538; Mon, 14 Jan 2013 05:46:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E5kn6G051536; Mon, 14 Jan 2013 05:46:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301140546.r0E5kn6G051536@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jan 2013 05:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245410 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:46:50 -0000 Author: kib Date: Mon Jan 14 05:46:49 2013 New Revision: 245410 URL: http://svnweb.freebsd.org/changeset/base/245410 Log: Rearrange the struct bufobj and struct vnode layouts to reduce padding. On the amd64 kernel with INVARIANTS turned off, size of the struct vnode is reduced from 496 to 472 bytes, saving 24 bytes of memory and KVA per vnode. Noted and reviewed by: peter Tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/bufobj.h head/sys/sys/vnode.h Modified: head/sys/sys/bufobj.h ============================================================================== --- head/sys/sys/bufobj.h Mon Jan 14 05:45:33 2013 (r245409) +++ head/sys/sys/bufobj.h Mon Jan 14 05:46:49 2013 (r245410) @@ -89,12 +89,7 @@ struct buf_ops { struct bufobj { struct mtx bo_mtx; /* Mutex which protects "i" things */ - struct bufv bo_clean; /* i Clean buffers */ - struct bufv bo_dirty; /* i Dirty buffers */ - long bo_numoutput; /* i Writes in progress */ - u_int bo_flag; /* i Flags */ struct buf_ops *bo_ops; /* - Buffer operations */ - int bo_bsize; /* - Block size for i/o */ struct vm_object *bo_object; /* v Place to store VM object */ LIST_ENTRY(bufobj) bo_synclist; /* S dirty vnode list */ void *bo_private; /* private pointer */ @@ -103,6 +98,11 @@ struct bufobj { * XXX: only to keep the syncer working * XXX: for now. */ + struct bufv bo_clean; /* i Clean buffers */ + struct bufv bo_dirty; /* i Dirty buffers */ + long bo_numoutput; /* i Writes in progress */ + u_int bo_flag; /* i Flags */ + int bo_bsize; /* - Block size for i/o */ }; /* Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Jan 14 05:45:33 2013 (r245409) +++ head/sys/sys/vnode.h Mon Jan 14 05:46:49 2013 (r245410) @@ -99,7 +99,6 @@ struct vnode { * Fields which define the identity of the vnode. These fields are * owned by the filesystem (XXX: and vgone() ?) */ - enum vtype v_type; /* u vnode type */ const char *v_tag; /* u type of underlying data */ struct vop_vector *v_op; /* u vnode operations vector */ void *v_data; /* u private data for fs */ @@ -122,10 +121,10 @@ struct vnode { } v_un; /* - * vfs_hash: (mount + inode) -> vnode hash. + * vfs_hash: (mount + inode) -> vnode hash. The hash value + * itself is grouped with other int fields, to avoid padding. */ LIST_ENTRY(vnode) v_hashlist; - u_int v_hash; /* * VFS_namecache stuff @@ -135,24 +134,11 @@ struct vnode { struct namecache *v_cache_dd; /* c Cache entry for .. vnode */ /* - * clustering stuff - */ - daddr_t v_cstart; /* v start block of cluster */ - daddr_t v_lasta; /* v last allocation */ - daddr_t v_lastw; /* v last write */ - int v_clen; /* v length of cur. cluster */ - - /* * Locking */ struct lock v_lock; /* u (if fs don't have one) */ struct mtx v_interlock; /* lock for "i" things */ struct lock *v_vnlock; /* u pointer to vnode lock */ - int v_holdcnt; /* i prevents recycling. */ - int v_usecount; /* i ref count of users */ - u_int v_iflag; /* i vnode flags (see below) */ - u_int v_vflag; /* v vnode flags */ - int v_writecount; /* v ref count of writers */ /* * The machinery of being a vnode @@ -167,6 +153,22 @@ struct vnode { struct label *v_label; /* MAC label for vnode */ struct lockf *v_lockf; /* Byte-level advisory lock list */ struct rangelock v_rl; /* Byte-range lock */ + + /* + * clustering stuff + */ + daddr_t v_cstart; /* v start block of cluster */ + daddr_t v_lasta; /* v last allocation */ + daddr_t v_lastw; /* v last write */ + int v_clen; /* v length of cur. cluster */ + + int v_holdcnt; /* i prevents recycling. */ + int v_usecount; /* i ref count of users */ + u_int v_iflag; /* i vnode flags (see below) */ + u_int v_vflag; /* v vnode flags */ + int v_writecount; /* v ref count of writers */ + u_int v_hash; + enum vtype v_type; /* u vnode type */ }; #endif /* defined(_KERNEL) || defined(_KVM_VNODE) */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:46:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 06668BBA; Mon, 14 Jan 2013 05:46:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id C825B2D2; Mon, 14 Jan 2013 05:46:53 +0000 (UTC) Received: from glenbarber.us (kaos.glenbarber.us [71.224.221.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 1DA5023F763; Mon, 14 Jan 2013 00:46:52 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.7.1 onyx.glenbarber.us 1DA5023F763 Authentication-Results: onyx.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none (insecure policy) Date: Mon, 14 Jan 2013 00:46:50 -0500 From: Glen Barber To: Konstantin Belousov Subject: Re: svn commit: r245407 - head/sys/kern Message-ID: <20130114054650.GA1359@glenbarber.us> References: <201301140542.r0E5gsK0050870@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CxIGHgfcyU0Ip7+W" Content-Disposition: inline In-Reply-To: <201301140542.r0E5gsK0050870@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:46:54 -0000 --CxIGHgfcyU0Ip7+W Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 14, 2013 at 05:42:54AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Jan 14 05:42:54 2013 > New Revision: 245407 > URL: http://svnweb.freebsd.org/changeset/base/245407 >=20 > Log: > diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c > index 7c243b6..0bdaf36 100644 > --- a/sys/kern/vfs_subr.c > +++ b/sys/kern/vfs_subr.c > @@ -279,6 +279,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG= _RW, > #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcn= t) > #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt) > =20 > +static int vnsz2log; Is this accidental log? Glen --CxIGHgfcyU0Ip7+W Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQ85vKAAoJEFJPDDeguUajIvYH/ilTHF0RcTANjJfk5VECeO93 bNWXPFKtF8QveJluwYNDqCe127FQtVFdSSv7PhNp8De5ZljFS0gACxG35Zfj2cuS 0Q7Fj3jDquAiJdAxiGWUG1WYPQRHblAYeRO00H9i1R2ksyUcksqkY7kobmBWypeM rRKbf3m9ZoKgHM4g9LA0mZSHbjFDBDP/XdHkM74MXJUy3KEIQnlwDKHoElASRUDw 1vVfQL4kl/RujErY22w+9Oj5wJRDmUCDKTsbhbCTptoTT/P/iS6J6flxsQON9hW1 trDcq2b6WxzPRM/kEi1lb201FGah6RmA16J0y7E9SNih1iIxsguH55sikQNdne4= =xYap -----END PGP SIGNATURE----- --CxIGHgfcyU0Ip7+W-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:52:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 48863EBF; Mon, 14 Jan 2013 05:52:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4272FA; Mon, 14 Jan 2013 05:52:24 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E5qOIY053850; Mon, 14 Jan 2013 05:52:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E5qOKn053849; Mon, 14 Jan 2013 05:52:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301140552.r0E5qOKn053849@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jan 2013 05:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245411 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:52:24 -0000 Author: kib Date: Mon Jan 14 05:52:23 2013 New Revision: 245411 URL: http://svnweb.freebsd.org/changeset/base/245411 Log: Add a trivial comment to record the proper commit log for r245407: Set the v_hash for a new vnode in the getnewvnode() to the value calculated based on the vnode structure address. Filesystems using vfs_hash_insert() override the v_hash using the standard formula of (inode_number + mnt_hashseed). For other filesystems, the initialization allows the vfs_hash_index() to provide useful hash too. Suggested, reviewed and tested by: peter Sponsored by: The FreeBSD Foundation MFC after: 5 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Jan 14 05:46:49 2013 (r245410) +++ head/sys/kern/vfs_subr.c Mon Jan 14 05:52:23 2013 (r245411) @@ -279,6 +279,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt) +/* Shift count for (uintptr_t)vp to initialize vp->v_hash. */ static int vnsz2log; /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:57:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 85C27112; Mon, 14 Jan 2013 05:57:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id F2E40330; Mon, 14 Jan 2013 05:57:48 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0E5vi95078587; Mon, 14 Jan 2013 07:57:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0E5vi95078587 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0E5vibF078586; Mon, 14 Jan 2013 07:57:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 14 Jan 2013 07:57:44 +0200 From: Konstantin Belousov To: Glen Barber Subject: Re: svn commit: r245407 - head/sys/kern Message-ID: <20130114055744.GG2561@kib.kiev.ua> References: <201301140542.r0E5gsK0050870@svn.freebsd.org> <20130114054650.GA1359@glenbarber.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dGMqxDINbOsorC0c" Content-Disposition: inline In-Reply-To: <20130114054650.GA1359@glenbarber.us> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:57:49 -0000 --dGMqxDINbOsorC0c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 14, 2013 at 12:46:50AM -0500, Glen Barber wrote: > On Mon, Jan 14, 2013 at 05:42:54AM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Mon Jan 14 05:42:54 2013 > > New Revision: 245407 > > URL: http://svnweb.freebsd.org/changeset/base/245407 > >=20 > > Log: > > diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c > > index 7c243b6..0bdaf36 100644 > > --- a/sys/kern/vfs_subr.c > > +++ b/sys/kern/vfs_subr.c > > @@ -279,6 +279,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFL= AG_RW, > > #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_hold= cnt) > > #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcn= t) > > =20 > > +static int vnsz2log; >=20 > Is this accidental log? Yes, I mistakenly used patch file name instead of the log file name for ci = -F. Proper commit message recorded in r245411. --dGMqxDINbOsorC0c Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ855XAAoJEJDCuSvBvK1BxaIP/1nMY/bFIx1L8thEiMZZ0fz4 uuoP2xnMvnrnnhK49jUplVjKO+1EIX3iClMw9YS2fRHUNMr3+043qSHBUDIqsNS8 Gk3hrzuwk82A53uwFJ0P7ZCsNEx47kwsfnsIzbqaxRUSkxi0RWhFqlsHK0f/4QG3 55VB8ztMcDlxgjbBy0MEPp5eAcO9Yebn0ewJ0myyZHy3zKSjC7Oi48H/PXJC7Vdv cqYkolfqlYQirras8DQmJnKWyb11tDeRdcBGfzFun4PFrFLUo8hm6ecLkqHcGE3M BXMZVz7URz+LnBe6ApMTLfYDIZrw4bp1Dlw5eM7n8y2B2PiVXaxdHRmgm18dWXJL KRZYlxleV2kBgHQiZrc+/1i2W5ybektDSr1RVm2v1eAFiS73815WsnvtU+yD263D 3sio6aw4dDrJ0b7/JVu7hRy7qOxy68t5bgh2AW5qBSbbRZTihtZ123jay3svbsnr KKb0nceTF3g1LdEc2Azb4Yq8tDXgeBHNkvTrF4Px38AgoOJrN22ia3GvawQQgMQ+ W7xQMetNruQpffA9+RHyLEHsYfg270I7/ap2RpAf4aPAf/cUO3bb2TDoPWsLNHFp Wv9HZM9nNQQihLJ/raLdnUFIKoJ/i0dQDnPCnH/yhxu0EAkzg02ZntKGfBGy/20Z 9CWbXLQg/Oyqh4cAbFcx =ktXG -----END PGP SIGNATURE----- --dGMqxDINbOsorC0c-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 05:59:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B9A1F293; Mon, 14 Jan 2013 05:59:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 7F55133F; Mon, 14 Jan 2013 05:59:14 +0000 (UTC) Received: from glenbarber.us (kaos.glenbarber.us [71.224.221.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 28F1723F763; Mon, 14 Jan 2013 00:59:13 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.7.1 onyx.glenbarber.us 28F1723F763 Authentication-Results: onyx.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none (insecure policy) Date: Mon, 14 Jan 2013 00:59:11 -0500 From: Glen Barber To: Konstantin Belousov Subject: Re: svn commit: r245407 - head/sys/kern Message-ID: <20130114055911.GB1359@glenbarber.us> References: <201301140542.r0E5gsK0050870@svn.freebsd.org> <20130114054650.GA1359@glenbarber.us> <20130114055744.GG2561@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HO3Ykb1C9doWAHv0" Content-Disposition: inline In-Reply-To: <20130114055744.GG2561@kib.kiev.ua> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 05:59:14 -0000 --HO3Ykb1C9doWAHv0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 14, 2013 at 07:57:44AM +0200, Konstantin Belousov wrote: > On Mon, Jan 14, 2013 at 12:46:50AM -0500, Glen Barber wrote: > > On Mon, Jan 14, 2013 at 05:42:54AM +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Mon Jan 14 05:42:54 2013 > > > New Revision: 245407 > > > URL: http://svnweb.freebsd.org/changeset/base/245407 > > >=20 > > > Log: > > > diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c > > > index 7c243b6..0bdaf36 100644 > > > --- a/sys/kern/vfs_subr.c > > > +++ b/sys/kern/vfs_subr.c > > > @@ -279,6 +279,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTL= FLAG_RW, > > > #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_ho= ldcnt) > > > #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_hold= cnt) > > > =20 > > > +static int vnsz2log; > >=20 > > Is this accidental log? >=20 > Yes, I mistakenly used patch file name instead of the log file name for c= i -F. > Proper commit message recorded in r245411. Ah. Thanks. Glen --HO3Ykb1C9doWAHv0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQ856vAAoJEFJPDDeguUajcHYIAIjE34so9NHjFuNBbeWSL0uZ SsM2ABerT+R1BOgtu6/RqBF5TgVaaBGYcxs5kABzneGEwakNXB3s1tvpx4WZ90D1 FOgxyeGDDMvdzoF3lLLy8/LvJzib6ndd8Uh8mzmxcgTaaPwRaHpjtw+oU/yeWtXL ApZH+dYkoDmJKDHLHLZydP2pp6fUCK4PAQUsyyK3zMTPkXeljS+nHd5ffkWFdgiW yWyJLnNq6xfKnh1YAy50yzi5+MEZg/tcS0HdzAr++Whhz24y9dgZl3BlBSi8hJpE AOegpa1tegjewvuyCCSTHB9EZlE/seET+wSeaNEwFcPyAQEuZNLUBUjaRjpzvwc= =JG1G -----END PGP SIGNATURE----- --HO3Ykb1C9doWAHv0-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 07:17:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8BE8DE95; Mon, 14 Jan 2013 07:17:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7EF4D7C1; Mon, 14 Jan 2013 07:17:39 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E7HdHZ078632; Mon, 14 Jan 2013 07:17:39 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E7HdEs078630; Mon, 14 Jan 2013 07:17:39 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201301140717.r0E7HdEs078630@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 14 Jan 2013 07:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245412 - head/usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 07:17:39 -0000 Author: bapt Date: Mon Jan 14 07:17:38 2013 New Revision: 245412 URL: http://svnweb.freebsd.org/changeset/base/245412 Log: Directly uses calloc(3) instread of malloc(3) + memset(3) Reported by: Jeremy Chadwick MFC after: 3 days Modified: head/usr.sbin/pkg/dns_utils.c Modified: head/usr.sbin/pkg/dns_utils.c ============================================================================== --- head/usr.sbin/pkg/dns_utils.c Mon Jan 14 05:52:23 2013 (r245411) +++ head/usr.sbin/pkg/dns_utils.c Mon Jan 14 07:17:38 2013 (r245412) @@ -66,10 +66,9 @@ dns_getsrvinfo(const char *zone) p += len + NS_QFIXEDSZ; } - res = malloc(sizeof(struct dns_srvinfo) * ancount); + res = calloc(ancount, sizeof(struct dns_srvinfo)); if (res == NULL) return (NULL); - memset(res, 0, sizeof(struct dns_srvinfo) * ancount); n = 0; while (ancount > 0 && p < end) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 08:39:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ED02FECE; Mon, 14 Jan 2013 08:39:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DE4EFCD1; Mon, 14 Jan 2013 08:39:48 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E8dmJG002759; Mon, 14 Jan 2013 08:39:48 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E8dmpt002758; Mon, 14 Jan 2013 08:39:48 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301140839.r0E8dmpt002758@svn.freebsd.org> From: Andrew Turner Date: Mon, 14 Jan 2013 08:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245413 - head/contrib/gcc/config/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 08:39:49 -0000 Author: andrew Date: Mon Jan 14 08:39:48 2013 New Revision: 245413 URL: http://svnweb.freebsd.org/changeset/base/245413 Log: Switch the default CPU to an arm9. This removes compiler support for the unsupported 26-bit addressing mode. This change is required for moving to the ARM EABI. Modified: head/contrib/gcc/config/arm/freebsd.h Modified: head/contrib/gcc/config/arm/freebsd.h ============================================================================== --- head/contrib/gcc/config/arm/freebsd.h Mon Jan 14 07:17:38 2013 (r245412) +++ head/contrib/gcc/config/arm/freebsd.h Mon Jan 14 08:39:48 2013 (r245413) @@ -97,7 +97,7 @@ #define TARGET_VERSION fprintf (stderr, " (FreeBSD/armv6 ELF)"); #else #undef SUBTARGET_CPU_DEFAULT -#define SUBTARGET_CPU_DEFAULT TARGET_CPU_strongarm +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9 #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)"); #endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 09:11:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F23007A6; Mon, 14 Jan 2013 09:11:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CD12CE30; Mon, 14 Jan 2013 09:11:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0E9BIdr013862; Mon, 14 Jan 2013 09:11:18 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0E9BIeC013861; Mon, 14 Jan 2013 09:11:18 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301140911.r0E9BIeC013861@svn.freebsd.org> From: Andrew Turner Date: Mon, 14 Jan 2013 09:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245414 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 09:11:19 -0000 Author: andrew Date: Mon Jan 14 09:11:18 2013 New Revision: 245414 URL: http://svnweb.freebsd.org/changeset/base/245414 Log: Update sigcode to use both the current ABI and FreeBSD's version of the ARM EABI syscall calling convention. The current ABI encodes the syscall number in the instruction. This causes issues with the thumb mode as it only has 8 bits to encode this value and we have too many system calls and by using a register will simplify the code to get the syscall number in the kernel. With the ARM EABI we reuse the Linux calling convention by storing the value in r7. Because of this we use both methods to encode the syscall number in this function. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Mon Jan 14 08:39:48 2013 (r245413) +++ head/sys/arm/arm/locore.S Mon Jan 14 09:11:18 2013 (r245414) @@ -484,12 +484,29 @@ ENTRY_NP(abort) ENTRY_NP(sigcode) mov r0, sp + + /* + * Call the sigreturn system call. + * + * We have to load r7 manually rather than using + * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is + * correct. Using the alternative places esigcode at the address + * of the data rather than the address one past the data. + */ + + ldr r7, [pc, #12] /* Load SYS_sigreturn */ swi SYS_sigreturn /* Well if that failed we better exit quick ! */ + ldr r7, [pc, #8] /* Load SYS_exit */ swi SYS_exit - b . - 8 + + /* Branch back to retry SYS_sigreturn */ + b . - 16 + + .word SYS_sigreturn + .word SYS_exit .align 0 .global _C_LABEL(esigcode) From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 10:58:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DC01DA09; Mon, 14 Jan 2013 10:58:20 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CE345300; Mon, 14 Jan 2013 10:58:20 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EAwKhw044424; Mon, 14 Jan 2013 10:58:20 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EAwK4q044423; Mon, 14 Jan 2013 10:58:20 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201301141058.r0EAwK4q044423@svn.freebsd.org> From: Andrey Zonov Date: Mon, 14 Jan 2013 10:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245415 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 10:58:20 -0000 Author: zont Date: Mon Jan 14 10:58:20 2013 New Revision: 245415 URL: http://svnweb.freebsd.org/changeset/base/245415 Log: MFC r244383: - Set memorylocked limit to 64Kb for default login class. This prevents unprivileged users to lock too much memory. - Set memorylocked limit to 64Mb for daemon login class. Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on startup, they are run from init(8) which uses daemon login class. - Set memorylocked limit to unlimited for root login class. Approved by: kib (mentor) Modified: stable/9/etc/login.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/login.conf ============================================================================== --- stable/9/etc/login.conf Mon Jan 14 09:11:18 2013 (r245414) +++ stable/9/etc/login.conf Mon Jan 14 10:58:20 2013 (r245415) @@ -32,7 +32,7 @@ default:\ :cputime=unlimited:\ :datasize=unlimited:\ :stacksize=unlimited:\ - :memorylocked=unlimited:\ + :memorylocked=64K:\ :memoryuse=unlimited:\ :filesize=unlimited:\ :coredumpsize=unlimited:\ @@ -59,6 +59,7 @@ xuser:\ staff:\ :tc=default: daemon:\ + :memorylocked=64M:\ :tc=default: news:\ :tc=default: @@ -72,6 +73,7 @@ dialer:\ # in preference to 'default'. root:\ :ignorenologin:\ + :memorylocked=unlimited:\ :tc=default: # From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 10:58:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C8ACDBE3; Mon, 14 Jan 2013 10:58:56 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AB34830F; Mon, 14 Jan 2013 10:58:56 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EAwu7S044536; Mon, 14 Jan 2013 10:58:56 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EAwtsA044527; Mon, 14 Jan 2013 10:58:55 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201301141058.r0EAwtsA044527@svn.freebsd.org> From: Andrey Zonov Date: Mon, 14 Jan 2013 10:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245416 - in stable/9/sys: kern vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 10:58:56 -0000 Author: zont Date: Mon Jan 14 10:58:55 2013 New Revision: 245416 URL: http://svnweb.freebsd.org/changeset/base/245416 Log: MFC r244384: - Fix locked memory accounting for maps with MAP_WIREFUTURE flag. - Add sysctl vm.old_mlock which may turn such accounting off. MFC r244385: - Add sysctl to allow unprivileged users to call mlock(2)-family system calls and turn it off for compatibility. - Do not allow to call them inside jail. Approved by: kib (mentor) Modified: stable/9/sys/kern/kern_priv.c stable/9/sys/vm/vm.h stable/9/sys/vm/vm_map.c stable/9/sys/vm/vm_mmap.c stable/9/sys/vm/vm_unix.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_priv.c ============================================================================== --- stable/9/sys/kern/kern_priv.c Mon Jan 14 10:58:20 2013 (r245415) +++ stable/9/sys/kern/kern_priv.c Mon Jan 14 10:58:55 2013 (r245416) @@ -59,6 +59,11 @@ SYSCTL_INT(_security_bsd, OID_AUTO, suse &suser_enabled, 0, "processes with uid 0 have privilege"); TUNABLE_INT("security.bsd.suser_enabled", &suser_enabled); +static int unprivileged_mlock = 1; +SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_mlock, CTLFLAG_RW|CTLFLAG_TUN, + &unprivileged_mlock, 0, "Allow non-root users to call mlock(2)"); +TUNABLE_INT("security.bsd.unprivileged_mlock", &unprivileged_mlock); + SDT_PROVIDER_DEFINE(priv); SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_ok, priv-ok, "int"); SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_err, priv-err, "int"); @@ -93,6 +98,19 @@ priv_check_cred(struct ucred *cred, int if (error) goto out; + if (unprivileged_mlock) { + /* + * Allow unprivileged users to call mlock(2)/munlock(2) and + * mlockall(2)/munlockall(2). + */ + switch (priv) { + case PRIV_VM_MLOCK: + case PRIV_VM_MUNLOCK: + error = 0; + goto out; + } + } + /* * Having determined if privilege is restricted by various policies, * now determine if privilege is granted. At this point, any policy Modified: stable/9/sys/vm/vm.h ============================================================================== --- stable/9/sys/vm/vm.h Mon Jan 14 10:58:20 2013 (r245415) +++ stable/9/sys/vm/vm.h Mon Jan 14 10:58:55 2013 (r245416) @@ -141,6 +141,8 @@ struct kva_md_info { extern struct kva_md_info kmi; extern void vm_ksubmap_init(struct kva_md_info *); +extern int old_mlock; + struct ucred; int swap_reserve(vm_ooffset_t incr); int swap_reserve_by_cred(vm_ooffset_t incr, struct ucred *cred); Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Mon Jan 14 10:58:20 2013 (r245415) +++ stable/9/sys/vm/vm_map.c Mon Jan 14 10:58:55 2013 (r245416) @@ -3247,7 +3247,7 @@ vm_map_stack(vm_map_t map, vm_offset_t a vm_offset_t bot, top; vm_size_t growsize, init_ssize; int orient, rv; - rlim_t vmemlim; + rlim_t lmemlim, vmemlim; /* * The stack orientation is piggybacked with the cow argument. @@ -3267,9 +3267,10 @@ vm_map_stack(vm_map_t map, vm_offset_t a growsize = sgrowsiz; init_ssize = (max_ssize < growsize) ? max_ssize : growsize; - PROC_LOCK(curthread->td_proc); - vmemlim = lim_cur(curthread->td_proc, RLIMIT_VMEM); - PROC_UNLOCK(curthread->td_proc); + PROC_LOCK(curproc); + lmemlim = lim_cur(curproc, RLIMIT_MEMLOCK); + vmemlim = lim_cur(curproc, RLIMIT_VMEM); + PROC_UNLOCK(curproc); vm_map_lock(map); @@ -3279,6 +3280,14 @@ vm_map_stack(vm_map_t map, vm_offset_t a return (KERN_NO_SPACE); } + if (!old_mlock && map->flags & MAP_WIREFUTURE) { + if (ptoa(vmspace_wired_count(curproc->p_vmspace)) + + init_ssize > lmemlim) { + vm_map_unlock(map); + return (KERN_NO_SPACE); + } + } + /* If we would blow our VMEM resource limit, no go */ if (map->size + init_ssize > vmemlim) { vm_map_unlock(map); @@ -3360,7 +3369,7 @@ vm_map_growstack(struct proc *p, vm_offs vm_offset_t end; vm_size_t growsize; size_t grow_amount, max_grow; - rlim_t stacklim, vmemlim; + rlim_t lmemlim, stacklim, vmemlim; int is_procstack, rv; struct ucred *cred; #ifdef notyet @@ -3372,6 +3381,7 @@ vm_map_growstack(struct proc *p, vm_offs Retry: PROC_LOCK(p); + lmemlim = lim_cur(p, RLIMIT_MEMLOCK); stacklim = lim_cur(p, RLIMIT_STACK); vmemlim = lim_cur(p, RLIMIT_VMEM); PROC_UNLOCK(p); @@ -3494,7 +3504,25 @@ Retry: if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > limit)) grow_amount = limit - ctob(vm->vm_ssize); #endif - + if (!old_mlock && map->flags & MAP_WIREFUTURE) { + if (ptoa(vmspace_wired_count(p->p_vmspace)) + grow_amount > + lmemlim) { + vm_map_unlock_read(map); + rv = KERN_NO_SPACE; + goto out; + } +#ifdef RACCT + PROC_LOCK(p); + if (racct_set(p, RACCT_MEMLOCK, + ptoa(vmspace_wired_count(p->p_vmspace)) + grow_amount)) { + PROC_UNLOCK(p); + vm_map_unlock_read(map); + rv = KERN_NO_SPACE; + goto out; + } + PROC_UNLOCK(p); +#endif + } /* If we would blow our VMEM resource limit, no go */ if (map->size + grow_amount > vmemlim) { vm_map_unlock_read(map); @@ -3615,6 +3643,11 @@ out: PROC_LOCK(p); error = racct_set(p, RACCT_VMEM, map->size); KASSERT(error == 0, ("decreasing RACCT_VMEM failed")); + if (!old_mlock) { + error = racct_set(p, RACCT_MEMLOCK, + ptoa(vmspace_wired_count(p->p_vmspace))); + KASSERT(error == 0, ("decreasing RACCT_MEMLOCK failed")); + } error = racct_set(p, RACCT_STACK, ctob(vm->vm_ssize)); KASSERT(error == 0, ("decreasing RACCT_STACK failed")); PROC_UNLOCK(p); Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Mon Jan 14 10:58:20 2013 (r245415) +++ stable/9/sys/vm/vm_mmap.c Mon Jan 14 10:58:55 2013 (r245416) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -87,6 +88,11 @@ __FBSDID("$FreeBSD$"); #include #endif +int old_mlock = 0; +SYSCTL_INT(_vm, OID_AUTO, old_mlock, CTLFLAG_RW | CTLFLAG_TUN, &old_mlock, 0, + "Do not apply RLIMIT_MEMLOCK on mlockall"); +TUNABLE_INT("vm.old_mlock", &old_mlock); + #ifndef _SYS_SYSPROTO_H_ struct sbrk_args { int incr; @@ -1100,27 +1106,25 @@ sys_mlockall(td, uap) int error; map = &td->td_proc->p_vmspace->vm_map; - error = 0; + error = priv_check(td, PRIV_VM_MLOCK); + if (error) + return (error); if ((uap->how == 0) || ((uap->how & ~(MCL_CURRENT|MCL_FUTURE)) != 0)) return (EINVAL); -#if 0 /* * If wiring all pages in the process would cause it to exceed * a hard resource limit, return ENOMEM. */ - PROC_LOCK(td->td_proc); - if (map->size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) { + if (!old_mlock && uap->how & MCL_CURRENT) { + PROC_LOCK(td->td_proc); + if (map->size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) { + PROC_UNLOCK(td->td_proc); + return (ENOMEM); + } PROC_UNLOCK(td->td_proc); - return (ENOMEM); } - PROC_UNLOCK(td->td_proc); -#else - error = priv_check(td, PRIV_VM_MLOCK); - if (error) - return (error); -#endif #ifdef RACCT PROC_LOCK(td->td_proc); error = racct_set(td->td_proc, RACCT_MEMLOCK, map->size); @@ -1483,6 +1487,24 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, PROC_LOCK(td->td_proc); if (td->td_proc->p_vmspace->vm_map.size + size > lim_cur(td->td_proc, RLIMIT_VMEM)) { + if (!old_mlock && map->flags & MAP_WIREFUTURE) { + if (ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) + + size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) { + racct_set_force(td->td_proc, RACCT_VMEM, + map->size); + PROC_UNLOCK(td->td_proc); + return (ENOMEM); + } + error = racct_set(td->td_proc, RACCT_MEMLOCK, + ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) + + size); + if (error != 0) { + racct_set_force(td->td_proc, RACCT_VMEM, + map->size); + PROC_UNLOCK(td->td_proc); + return (error); + } + } PROC_UNLOCK(td->td_proc); return (ENOMEM); } Modified: stable/9/sys/vm/vm_unix.c ============================================================================== --- stable/9/sys/vm/vm_unix.c Mon Jan 14 10:58:20 2013 (r245415) +++ stable/9/sys/vm/vm_unix.c Mon Jan 14 10:58:55 2013 (r245416) @@ -77,13 +77,14 @@ sys_obreak(td, uap) { struct vmspace *vm = td->td_proc->p_vmspace; vm_offset_t new, old, base; - rlim_t datalim, vmemlim; + rlim_t datalim, lmemlim, vmemlim; int prot, rv; int error = 0; boolean_t do_map_wirefuture; PROC_LOCK(td->td_proc); datalim = lim_cur(td->td_proc, RLIMIT_DATA); + lmemlim = lim_cur(td->td_proc, RLIMIT_MEMLOCK); vmemlim = lim_cur(td->td_proc, RLIMIT_VMEM); PROC_UNLOCK(td->td_proc); @@ -116,6 +117,13 @@ sys_obreak(td, uap) goto done; } if (new > old) { + if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) { + if (ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) + + (new - old) > lmemlim) { + error = ENOMEM; + goto done; + } + } if (vm->vm_map.size + (new - old) > vmemlim) { error = ENOMEM; goto done; @@ -136,6 +144,20 @@ sys_obreak(td, uap) error = ENOMEM; goto done; } + if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) { + error = racct_set(td->td_proc, RACCT_MEMLOCK, + ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) + + (new - old)); + if (error != 0) { + racct_set_force(td->td_proc, RACCT_DATA, + old - base); + racct_set_force(td->td_proc, RACCT_VMEM, + vm->vm_map.size); + PROC_UNLOCK(td->td_proc); + error = ENOMEM; + goto done; + } + } PROC_UNLOCK(td->td_proc); #endif prot = VM_PROT_RW; @@ -152,6 +174,11 @@ sys_obreak(td, uap) PROC_LOCK(td->td_proc); racct_set_force(td->td_proc, RACCT_DATA, old - base); racct_set_force(td->td_proc, RACCT_VMEM, vm->vm_map.size); + if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) { + racct_set_force(td->td_proc, RACCT_MEMLOCK, + ptoa(vmspace_wired_count( + td->td_proc->p_vmspace))); + } PROC_UNLOCK(td->td_proc); #endif error = ENOMEM; @@ -183,6 +210,10 @@ sys_obreak(td, uap) PROC_LOCK(td->td_proc); racct_set_force(td->td_proc, RACCT_DATA, new - base); racct_set_force(td->td_proc, RACCT_VMEM, vm->vm_map.size); + if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) { + racct_set_force(td->td_proc, RACCT_MEMLOCK, + ptoa(vmspace_wired_count(td->td_proc->p_vmspace))); + } PROC_UNLOCK(td->td_proc); #endif } From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 11:00:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B333CD62; Mon, 14 Jan 2013 11:00:07 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 577ED32A; Mon, 14 Jan 2013 11:00:07 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EB070S044830; Mon, 14 Jan 2013 11:00:07 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EB06gd044826; Mon, 14 Jan 2013 11:00:06 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201301141100.r0EB06gd044826@svn.freebsd.org> From: Andrey Zonov Date: Mon, 14 Jan 2013 11:00:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245417 - stable/9/lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 11:00:07 -0000 Author: zont Date: Mon Jan 14 11:00:06 2013 New Revision: 245417 URL: http://svnweb.freebsd.org/changeset/base/245417 Log: MFC r244679: - Update manual pages accordingly to r244384 and r244385. Approved by: kib (mentor) Modified: stable/9/lib/libc/sys/mlock.2 stable/9/lib/libc/sys/mlockall.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/mlock.2 ============================================================================== --- stable/9/lib/libc/sys/mlock.2 Mon Jan 14 10:58:55 2013 (r245416) +++ stable/9/lib/libc/sys/mlock.2 Mon Jan 14 11:00:06 2013 (r245417) @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd July 27, 2010 +.Dd December 25, 2012 .Dt MLOCK 2 .Os .Sh NAME @@ -94,12 +94,15 @@ limited in how much they can lock down. A single process can .Fn mlock the minimum of -a system-wide ``wired pages'' limit and -the per-process +a system-wide ``wired pages'' limit +.Va vm.max_wired +and the per-process .Li RLIMIT_MEMLOCK resource limit. .Pp -These calls are only available to the super-user. +If +.Va security.bsd.unprivileged_mlock +is set to 0 these calls are only available to the super-user. .Sh RETURN VALUES .Rv -std .Pp @@ -112,7 +115,8 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EPERM -The caller is not the super-user. +.Va security.bsd.unprivileged_mlock +is set to 0 and the caller is not the super-user. .It Bq Er EINVAL The address given is not page aligned or the length is negative. .It Bq Er EAGAIN @@ -129,7 +133,8 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EPERM -The caller is not the super-user. +.Va security.bsd.unprivileged_mlock +is set to 0 and the caller is not the super-user. .It Bq Er EINVAL The address given is not page aligned or the length is negative. .It Bq Er ENOMEM Modified: stable/9/lib/libc/sys/mlockall.2 ============================================================================== --- stable/9/lib/libc/sys/mlockall.2 Mon Jan 14 10:58:55 2013 (r245416) +++ stable/9/lib/libc/sys/mlockall.2 Mon Jan 14 11:00:06 2013 (r245417) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 27, 2010 +.Dd December 25, 2012 .Dt MLOCKALL 2 .Os .Sh NAME @@ -68,11 +68,22 @@ Since physical memory is a potentially s limited in how much they can lock down. A single process can lock the minimum of a system-wide .Dq wired pages -limit and the per-process +limit +.Va vm.max_wired +and the per-process .Dv RLIMIT_MEMLOCK resource limit. .Pp -These calls are only available to the super-user. +If +.Va security.bsd.unprivileged_mlock +is set to 0 these calls are only available to the super-user. +If +.Va vm.old_mlock +is set to 1 the per-process +.Dv RLIMIT_MEMLOCK +resource limit will not be applied for +.Fn mlockall +calls. .Pp The .Fn munlockall From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 11:03:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3FCDFB9; Mon, 14 Jan 2013 11:03:14 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2037036B; Mon, 14 Jan 2013 11:03:14 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EB3D4c046989; Mon, 14 Jan 2013 11:03:13 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EB3DBN046987; Mon, 14 Jan 2013 11:03:13 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201301141103.r0EB3DBN046987@svn.freebsd.org> From: Jeremie Le Hen Date: Mon, 14 Jan 2013 11:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245418 - head/usr.bin/stdbuf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 11:03:14 -0000 Author: jlh Date: Mon Jan 14 11:03:13 2013 New Revision: 245418 URL: http://svnweb.freebsd.org/changeset/base/245418 Log: Allow commands without any additional arguments, as stated in the manpage. While here, exit early when there is nothing to do. PR: 168415 Submitted by: Zhihao Yuan (initial version) MFC after: 1 week Approved by: kib (mentor) Modified: head/usr.bin/stdbuf/stdbuf.c Modified: head/usr.bin/stdbuf/stdbuf.c ============================================================================== --- head/usr.bin/stdbuf/stdbuf.c Mon Jan 14 11:00:06 2013 (r245417) +++ head/usr.bin/stdbuf/stdbuf.c Mon Jan 14 11:03:13 2013 (r245418) @@ -72,8 +72,8 @@ main(int argc, char *argv[]) } argc -= optind; argv += optind; - if (argc < 2) - usage(0); + if (argc == 0) + exit(0); if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1) warn("Failed to set environment variable: %s=%s", From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 11:06:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 19C644D8; Mon, 14 Jan 2013 11:06:51 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CBB3651; Mon, 14 Jan 2013 11:06:51 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EB6ovu047701; Mon, 14 Jan 2013 11:06:50 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EB6oFa047700; Mon, 14 Jan 2013 11:06:50 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201301141106.r0EB6oFa047700@svn.freebsd.org> From: Jeremie Le Hen Date: Mon, 14 Jan 2013 11:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245419 - head/usr.bin/stdbuf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 11:06:51 -0000 Author: jlh Date: Mon Jan 14 11:06:50 2013 New Revision: 245419 URL: http://svnweb.freebsd.org/changeset/base/245419 Log: Remove stray tabs. Submitted by: kib Approved by: kib (mentor) MFC after: 1 week Modified: head/usr.bin/stdbuf/stdbuf.c Modified: head/usr.bin/stdbuf/stdbuf.c ============================================================================== --- head/usr.bin/stdbuf/stdbuf.c Mon Jan 14 11:03:13 2013 (r245418) +++ head/usr.bin/stdbuf/stdbuf.c Mon Jan 14 11:06:50 2013 (r245419) @@ -39,7 +39,7 @@ extern char *__progname; static void usage(int s) { - + fprintf(stderr, "Usage: %s [-e 0|L|] [-i 0|L|] [-o 0|L|] " " [args ...]\n", __progname); exit(s); @@ -94,7 +94,7 @@ main(int argc, char *argv[]) if (i < 0 || putenv(preload1) == -1) warn("Failed to set environment variable: LD_PRELOAD"); - + preload0 = getenv("LD_32_PRELOAD"); if (preload0 == NULL) i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 11:13:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A92751FF; Mon, 14 Jan 2013 11:13:32 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2C8884; Mon, 14 Jan 2013 11:13:32 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EBDWSZ050430; Mon, 14 Jan 2013 11:13:32 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EBDW5q050428; Mon, 14 Jan 2013 11:13:32 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201301141113.r0EBDW5q050428@svn.freebsd.org> From: Andrey Zonov Date: Mon, 14 Jan 2013 11:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245420 - in stable/9/sys: kern vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 11:13:32 -0000 Author: zont Date: Mon Jan 14 11:13:31 2013 New Revision: 245420 URL: http://svnweb.freebsd.org/changeset/base/245420 Log: - Fix r245416. Turn unprivileged mlock off for compatibility. Exactly this behaviour was approved by kib (mentor). This is a direct commit. Approved by: kib (mentor) Modified: stable/9/sys/kern/kern_priv.c stable/9/sys/vm/vm_mmap.c Modified: stable/9/sys/kern/kern_priv.c ============================================================================== --- stable/9/sys/kern/kern_priv.c Mon Jan 14 11:06:50 2013 (r245419) +++ stable/9/sys/kern/kern_priv.c Mon Jan 14 11:13:31 2013 (r245420) @@ -59,7 +59,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, suse &suser_enabled, 0, "processes with uid 0 have privilege"); TUNABLE_INT("security.bsd.suser_enabled", &suser_enabled); -static int unprivileged_mlock = 1; +static int unprivileged_mlock = 0; SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_mlock, CTLFLAG_RW|CTLFLAG_TUN, &unprivileged_mlock, 0, "Allow non-root users to call mlock(2)"); TUNABLE_INT("security.bsd.unprivileged_mlock", &unprivileged_mlock); Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Mon Jan 14 11:06:50 2013 (r245419) +++ stable/9/sys/vm/vm_mmap.c Mon Jan 14 11:13:31 2013 (r245420) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #include #endif -int old_mlock = 0; +int old_mlock = 1; SYSCTL_INT(_vm, OID_AUTO, old_mlock, CTLFLAG_RW | CTLFLAG_TUN, &old_mlock, 0, "Do not apply RLIMIT_MEMLOCK on mlockall"); TUNABLE_INT("vm.old_mlock", &old_mlock); From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 11:35:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C08576DD; Mon, 14 Jan 2013 11:35:27 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.18.14]) by mx1.freebsd.org (Postfix) with ESMTP id 7BF9EA59; Mon, 14 Jan 2013 11:35:27 +0000 (UTC) Received: from [87.79.250.249] (helo=fabiankeil.de) by smtprelay02.ispgateway.de with esmtpsa (SSLv3:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1TuiDL-0001Ze-IH; Mon, 14 Jan 2013 12:28:27 +0100 Date: Mon, 14 Jan 2013 12:26:40 +0100 From: Fabian Keil To: Andrey Zonov Subject: Re: svn commit: r245415 - stable/9/etc Message-ID: <20130114122640.152cb041@fabiankeil.de> In-Reply-To: <201301141058.r0EAwK4q044423@svn.freebsd.org> References: <201301141058.r0EAwK4q044423@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/V48rY0aQF3js1Nid/AjrMB="; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 11:35:27 -0000 --Sig_/V48rY0aQF3js1Nid/AjrMB= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andrey Zonov wrote: > Author: zont > Date: Mon Jan 14 10:58:20 2013 > New Revision: 245415 > URL: http://svnweb.freebsd.org/changeset/base/245415 >=20 > Log: > MFC r244383: > - Set memorylocked limit to 64Kb for default login class. > This prevents unprivileged users to lock too much memory. Note that this causes geli segfaults when using sudo: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174831 Fabian --Sig_/V48rY0aQF3js1Nid/AjrMB= Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlDz63YACgkQBYqIVf93VJ258QCdGIZijUuxpDGczrxZ/FI8y486 SU0AoKnjNMymLu/TJbT4UoB0ClDLr90q =/EzJ -----END PGP SIGNATURE----- --Sig_/V48rY0aQF3js1Nid/AjrMB=-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 12:12:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1AA3E6F6; Mon, 14 Jan 2013 12:12:57 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0DB25E8B; Mon, 14 Jan 2013 12:12:57 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0ECCudL068804; Mon, 14 Jan 2013 12:12:56 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0ECCujt068802; Mon, 14 Jan 2013 12:12:56 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201301141212.r0ECCujt068802@svn.freebsd.org> From: Andrey Zonov Date: Mon, 14 Jan 2013 12:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245421 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 12:12:57 -0000 Author: zont Date: Mon Jan 14 12:12:56 2013 New Revision: 245421 URL: http://svnweb.freebsd.org/changeset/base/245421 Log: - Get rid of unused function vmspace_wired_count(). Reviewed by: alc Approved by: kib (mentor) MFC after: 1 week Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Jan 14 11:13:31 2013 (r245420) +++ head/sys/vm/vm_map.c Mon Jan 14 12:12:56 2013 (r245421) @@ -726,12 +726,6 @@ vmspace_resident_count(struct vmspace *v return pmap_resident_count(vmspace_pmap(vmspace)); } -long -vmspace_wired_count(struct vmspace *vmspace) -{ - return pmap_wired_count(vmspace_pmap(vmspace)); -} - /* * vm_map_create: * Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Mon Jan 14 11:13:31 2013 (r245420) +++ head/sys/vm/vm_map.h Mon Jan 14 12:12:56 2013 (r245421) @@ -298,7 +298,6 @@ void vm_map_wait_busy(vm_map_t map); _vm_map_lock_downgrade(map, LOCK_FILE, LOCK_LINE) long vmspace_resident_count(struct vmspace *vmspace); -long vmspace_wired_count(struct vmspace *vmspace); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 12:20:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5A812907; Mon, 14 Jan 2013 12:20:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4B653ED0; Mon, 14 Jan 2013 12:20:56 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0ECKuqd071484; Mon, 14 Jan 2013 12:20:56 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0ECKtY4071480; Mon, 14 Jan 2013 12:20:55 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301141220.r0ECKtY4071480@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 14 Jan 2013 12:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245422 - in head: bin/sh tools/regression/bin/sh/expansion X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 12:20:56 -0000 Author: jilles Date: Mon Jan 14 12:20:55 2013 New Revision: 245422 URL: http://svnweb.freebsd.org/changeset/base/245422 Log: sh: Pass $? to command substitution containing compound/multiple commands. Example: false; echo $(echo $?; :) Added: head/tools/regression/bin/sh/expansion/cmdsubst17.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Mon Jan 14 12:12:56 2013 (r245421) +++ head/bin/sh/eval.c Mon Jan 14 12:20:55 2013 (r245422) @@ -624,8 +624,8 @@ evalbackcmd(union node *n, struct backcm exitstatus = 0; goto out; } + exitstatus = oexitstatus; if (is_valid_fast_cmdsubst(n)) { - exitstatus = oexitstatus; savelocalvars = localvars; localvars = NULL; forcelocal++; @@ -649,7 +649,6 @@ evalbackcmd(union node *n, struct backcm poplocalvars(); localvars = savelocalvars; } else { - exitstatus = 0; if (pipe(pip) < 0) error("Pipe call failed: %s", strerror(errno)); jp = makejob(n, 1); Added: head/tools/regression/bin/sh/expansion/cmdsubst17.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst17.0 Mon Jan 14 12:20:55 2013 (r245422) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +f() { return 3; } +f +[ `echo $?; :` = 3 ] From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 13:06:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E8D79147; Mon, 14 Jan 2013 13:06:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B74B67C1; Mon, 14 Jan 2013 13:06:35 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0ED6ZsZ084619; Mon, 14 Jan 2013 13:06:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0ED6ZCB084618; Mon, 14 Jan 2013 13:06:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301141306.r0ED6ZCB084618@svn.freebsd.org> From: Alexander Motin Date: Mon, 14 Jan 2013 13:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245423 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 13:06:36 -0000 Author: mav Date: Mon Jan 14 13:06:35 2013 New Revision: 245423 URL: http://svnweb.freebsd.org/changeset/base/245423 Log: Print some more metadata fields. Modified: head/sys/geom/raid/md_intel.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Mon Jan 14 12:20:55 2013 (r245422) +++ head/sys/geom/raid/md_intel.c Mon Jan 14 13:06:35 2013 (r245423) @@ -179,7 +179,7 @@ struct intel_raid_conf { uint8_t error_log_pos; uint8_t dummy_2[1]; uint32_t cache_size; - uint32_t orig_family_num; + uint32_t orig_config_id; uint32_t pwr_cycle_count; uint32_t bbm_log_size; uint32_t filler_0[35]; @@ -385,14 +385,17 @@ g_raid_md_intel_print(struct intel_raid_ printf("attributes 0x%08x\n", meta->attributes); printf("total_disks %u\n", meta->total_disks); printf("total_volumes %u\n", meta->total_volumes); - printf("orig_family_num 0x%08x\n", meta->orig_family_num); + printf("error_log_pos %u\n", meta->error_log_pos); + printf("cache_size %u\n", meta->cache_size); + printf("orig_config_id 0x%08x\n", meta->orig_config_id); + printf("pwr_cycle_count %u\n", meta->pwr_cycle_count); printf("bbm_log_size %u\n", meta->bbm_log_size); - printf("DISK# serial disk_sectors disk_sectors_hi disk_id flags\n"); + printf("DISK# serial disk_sectors disk_sectors_hi disk_id flags owner\n"); for (i = 0; i < meta->total_disks; i++ ) { - printf(" %d <%.16s> %u %u 0x%08x 0x%08x\n", i, + printf(" %d <%.16s> %u %u 0x%08x 0x%08x %08x\n", i, meta->disk[i].serial, meta->disk[i].sectors, - meta->disk[i].sectors_hi, - meta->disk[i].id, meta->disk[i].flags); + meta->disk[i].sectors_hi, meta->disk[i].id, + meta->disk[i].flags, meta->disk[i].owner_cfg_num); } for (i = 0; i < meta->total_volumes; i++) { mvol = intel_get_volume(meta, i); @@ -414,6 +417,9 @@ g_raid_md_intel_print(struct intel_raid_ printf(" migr_state %u\n", mvol->migr_state); printf(" migr_type %u\n", mvol->migr_type); printf(" dirty %u\n", mvol->dirty); + printf(" fs_state %u\n", mvol->fs_state); + printf(" verify_errors %u\n", mvol->verify_errors); + printf(" bad_blocks %u\n", mvol->bad_blocks); for (j = 0; j < (mvol->migr_state ? 2 : 1); j++) { printf(" *** Map %d ***\n", j); From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 15:00:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 73183926 for ; Mon, 14 Jan 2013 15:00:54 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id C0F4EE02 for ; Mon, 14 Jan 2013 15:00:53 +0000 (UTC) Received: (qmail 61599 invoked from network); 14 Jan 2013 16:23:47 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 14 Jan 2013 16:23:47 -0000 Message-ID: <50F41DA3.8060300@freebsd.org> Date: Mon, 14 Jan 2013 16:00:51 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Alan Cox Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50F28806.10505@rice.edu> In-Reply-To: <50F28806.10505@rice.edu> Content-Type: multipart/mixed; boundary="------------060703050804030003000002" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Oleksandr Tymoshenko X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 15:00:54 -0000 This is a multi-part message in MIME format. --------------060703050804030003000002 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit On 13.01.2013 11:10, Alan Cox wrote: > On 01/07/2013 12:47, Oleksandr Tymoshenko wrote: >> On 12/27/2012 6:46 PM, Oleksandr Tymoshenko wrote: >>> On 12/18/2012 1:59 AM, Alan Cox wrote: >>>> On 12/17/2012 23:40, Oleksandr Tymoshenko wrote: >>>>> On 2012-12-08, at 1:21 PM, Alan Cox wrote: >>>> That makes sense. However, "virtual_avail" isn't the start of the >>>> kernel address space. The kernel map always starts at >>>> VM_MIN_KERNEL_ADDRESS. (See kmem_init().) "virtual_avail" represents >>>> the next unallocated virtual address in the kernel address space at an >>>> early point in initialization. "virtual_avail" and "virtual_end" >>>> aren't >>>> used after that, or outside the VM system. Please use >>>> vm_map_min(kernel_map) and vm_map_max(kernel_map) instead. >>> >>> I checked: kernel_map is not available (NULL) at this point. So we >>> can't use it to >>> determine real KVA size. Closest thing we can get is >>> virtual_avail/virtual_end pair. >>> >>> Andre, could you approve attached patch for commit or suggest better >>> solution? >> >> Any update on this one? Can I proceed with commit? >> > > Yes, I've now spent a little bit of time looking at this, and I don't > see why these calculations and tunable_mbinit() need to be performed > before the kernel map is initialized. > > Let me summarize what I found: > > 1. The function tunable_mbinit() now has a dependency on the global > variable maxmbufmem. tunable_mbinit() is executed under > SI_SUB_TUNABLES. tunable_mbinit() defines the global variable > nmbclusters. The statements made in the comment at the head of > tunable_mbinit() all appear to be false: > > /* > * tunable_mbinit() has to be run before init_maxsockets() thus > * the SYSINIT order below is SI_ORDER_MIDDLE while init_maxsockets() > * runs at SI_ORDER_ANY. > * > * NB: This has to be done before VM init. > */ > > I don't see anything in init_maxsockets() that depends on > tunable_mbinit(). Moreover, the statement about "VM init" is only > correct if you regard the initialization of the kernel's malloc as "VM > init". This seems to be historic cruft. The dependency on maxsockets was removed recently with the autotuning improvements. A patch moving the maxmbufmem calculation into tunable_mbinit() and changing it to SI_SUB_KMEM which comes after the VM initialization is attached. > 2. The function kmeminit() in kern/kern_malloc.c has a dependency on the > global variable nmbclusters. kmeminit() is executed under SI_SUB_KMEM, > which comes after the initialization of the virtual memory system, > including the kernel map. The use of nmbclusters in kmeminit seems to be bogus. I think it comes from the times when the mbuf allocator was directly layered on top of the VM, that is before UMA. kmeminit() should not use nmbclusters. The computations done in kmeminit() do not make a whole lot of sense to me. But I'm no expert in that area. > 3. The function vm_ksubmap_init() has a dependency on the global > variable maxpipekva. vm_ksubmap_init() is executed under SI_SUB_CPU, > which comes after SI_SUB_KMEM. > > Am I missing anything? > > I'm attaching a patch that defers the calculation of maxpipekva until we > actually need it in vm_ksubmap_init(). Any comments on this patch are > welcome. Looks good to me. Perhaps the whole calculation and setup of the pipe_map could be moved to kern/sys_pipe.c:pipeinit() to have it all together. -- Andre --------------060703050804030003000002 Content-Type: text/plain; charset=windows-1252; name="maxmbufmem.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="maxmbufmem.diff" Index: sys/mbuf.h =================================================================== --- sys/mbuf.h (revision 245423) +++ sys/mbuf.h (working copy) @@ -384,7 +384,6 @@ * * The rest of it is defined in kern/kern_mbuf.c */ -extern quad_t maxmbufmem; extern uma_zone_t zone_mbuf; extern uma_zone_t zone_clust; extern uma_zone_t zone_pack; Index: kern/kern_mbuf.c =================================================================== --- kern/kern_mbuf.c (revision 245423) +++ kern/kern_mbuf.c (working copy) @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -104,16 +105,25 @@ struct mbstat mbstat; /* - * tunable_mbinit() has to be run before init_maxsockets() thus - * the SYSINIT order below is SI_ORDER_MIDDLE while init_maxsockets() - * runs at SI_ORDER_ANY. - * - * NB: This has to be done before VM init. + * tunable_mbinit() has to be run before any mbuf allocations are done. */ static void tunable_mbinit(void *dummy) { + quad_t realmem, maxmbufmem; + /* + * The default limit for all mbuf related memory is 1/2 of all + * available kernel memory (physical or kmem). + * At most it can be 3/4 of available kernel memory. + */ + realmem = qmin((quad_t)physmem * PAGE_SIZE, + vm_map_max(kernel_map) - vm_map_min(kernel_map)); + maxmbufmem = realmem / 2; + TUNABLE_QUAD_FETCH("kern.maxmbufmem", &maxmbufmem); + if (maxmbufmem > realmem / 4 * 3) + maxmbufmem = realmem / 4 * 3; + TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); if (nmbclusters == 0) nmbclusters = maxmbufmem / MCLBYTES / 4; @@ -139,7 +149,7 @@ nmbufs = lmax(maxmbufmem / MSIZE / 5, nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16); } -SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL); +SYSINIT(tunable_mbinit, SI_SUB_KMEM, SI_ORDER_MIDDLE, tunable_mbinit, NULL); static int sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) @@ -279,16 +289,14 @@ static void mb_zfini_pack(void *, int); static void mb_reclaim(void *); -static void mbuf_init(void *); static void *mbuf_jumbo_alloc(uma_zone_t, int, uint8_t *, int); -/* Ensure that MSIZE must be a power of 2. */ +/* Ensure that MSIZE is a power of 2. */ CTASSERT((((MSIZE - 1) ^ MSIZE) + 1) >> 1 == MSIZE); /* * Initialize FreeBSD Network buffer allocation. */ -SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); static void mbuf_init(void *dummy) { @@ -396,6 +404,7 @@ mbstat.sf_iocnt = 0; mbstat.sf_allocwait = mbstat.sf_allocfail = 0; } +SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); /* * UMA backend page allocator for the jumbo frame zones. Index: kern/subr_param.c =================================================================== --- kern/subr_param.c (revision 245423) +++ kern/subr_param.c (working copy) @@ -93,7 +93,6 @@ int nbuf; int ngroups_max; /* max # groups per process */ int nswbuf; -quad_t maxmbufmem; /* max mbuf memory */ pid_t pid_max = PID_MAX; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ @@ -272,7 +271,6 @@ void init_param2(long physpages) { - quad_t realmem; /* Base parameters */ maxusers = MAXUSERS; @@ -329,18 +327,6 @@ TUNABLE_INT_FETCH("kern.ncallout", &ncallout); /* - * The default limit for all mbuf related memory is 1/2 of all - * available kernel memory (physical or kmem). - * At most it can be 3/4 of available kernel memory. - */ - realmem = qmin((quad_t)physpages * PAGE_SIZE, - VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS); - maxmbufmem = realmem / 2; - TUNABLE_QUAD_FETCH("kern.maxmbufmem", &maxmbufmem); - if (maxmbufmem > (realmem / 4) * 3) - maxmbufmem = (realmem / 4) * 3; - - /* * The default for maxpipekva is min(1/64 of the kernel address space, * max(1/64 of main memory, 512KB)). See sys_pipe.c for more details. */ --------------060703050804030003000002-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 15:05:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D1743AE8; Mon, 14 Jan 2013 15:05:23 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A6A19E38; Mon, 14 Jan 2013 15:05:23 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EF5N69021258; Mon, 14 Jan 2013 15:05:23 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EF5N18021253; Mon, 14 Jan 2013 15:05:23 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201301141505.r0EF5N18021253@svn.freebsd.org> From: Sean Bruno Date: Mon, 14 Jan 2013 15:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245424 - head/sys/boot/i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 15:05:23 -0000 Author: sbruno Date: Mon Jan 14 15:05:22 2013 New Revision: 245424 URL: http://svnweb.freebsd.org/changeset/base/245424 Log: Quiesce some clang warnings while we're here doing stuff. Submitted by: Hiren Panchasara Obtained from: Yahoo! Inc Modified: head/sys/boot/i386/libi386/bootinfo64.c head/sys/boot/i386/libi386/devicename.c head/sys/boot/i386/libi386/pxe.c Modified: head/sys/boot/i386/libi386/bootinfo64.c ============================================================================== --- head/sys/boot/i386/libi386/bootinfo64.c Mon Jan 14 13:06:35 2013 (r245423) +++ head/sys/boot/i386/libi386/bootinfo64.c Mon Jan 14 15:05:22 2013 (r245424) @@ -134,7 +134,8 @@ bi_checkcpu(void) { char *cpu_vendor; int vendor[3]; - int eflags, regs[4]; + int eflags; + unsigned int regs[4]; /* Check for presence of "cpuid". */ eflags = read_eflags(); Modified: head/sys/boot/i386/libi386/devicename.c ============================================================================== --- head/sys/boot/i386/libi386/devicename.c Mon Jan 14 13:06:35 2013 (r245423) +++ head/sys/boot/i386/libi386/devicename.c Mon Jan 14 15:05:22 2013 (r245424) @@ -128,7 +128,7 @@ i386_parsedev(struct i386_devdesc **dev, goto fail; } } else { - cp = np; + cp = (char *)np; } if (*cp && (*cp != ':')) { err = EINVAL; Modified: head/sys/boot/i386/libi386/pxe.c ============================================================================== --- head/sys/boot/i386/libi386/pxe.c Mon Jan 14 13:06:35 2013 (r245423) +++ head/sys/boot/i386/libi386/pxe.c Mon Jan 14 15:05:22 2013 (r245424) @@ -88,6 +88,12 @@ static int pxe_netif_get(struct iodesc * static int pxe_netif_put(struct iodesc *desc, void *pkt, size_t len); static void pxe_netif_end(struct netif *nif); +#ifdef OLD_NFSV2 +int nfs_getrootfh(struct iodesc*, char*, u_char*); +#else +int nfs_getrootfh(struct iodesc*, char*, uint32_t*, u_char*); +#endif + extern struct netif_stats pxe_st[]; extern u_int16_t __bangpxeseg; extern u_int16_t __bangpxeoff; From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 15:09:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C0512CCF for ; Mon, 14 Jan 2013 15:09:02 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 14857E77 for ; Mon, 14 Jan 2013 15:09:01 +0000 (UTC) Received: (qmail 61629 invoked from network); 14 Jan 2013 16:31:55 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 14 Jan 2013 16:31:55 -0000 Message-ID: <50F41F8C.5030900@freebsd.org> Date: Mon, 14 Jan 2013 16:09:00 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Alfred Perlstein Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> <50F2F79C.7040109@mu.org> In-Reply-To: <50F2F79C.7040109@mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , src-committers@freebsd.org, Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 15:09:02 -0000 On 13.01.2013 19:06, Alfred Perlstein wrote: > On 1/12/13 10:32 PM, Adrian Chadd wrote: >> On 12 January 2013 11:45, Alfred Perlstein wrote: >> >>> I'm not sure if regressing to the waterfall method of development is a good >>> idea at this point. >>> >>> I see a light at the end of the tunnel and we to continue to just handle >>> these minor corner cases as we progress. >>> >>> If we move to a model where a minor bug is grounds to completely remove >>> helpful code then nothing will ever get done. >>> >> Allocating 512MB worth of callwheels on a 16GB MIPS machine is a >> little silly, don't you think? >> >> That suggests to me that the extent of which maxfiles/maxusers/etc >> percolates the codebase wasn't totally understood by those who wish to >> change it. >> >> I'd rather see some more investigative work into outlining things that >> need fixing and start fixing those, rather than "just change stuff and >> fix whatever issues creep up." >> >> I kinda hope we all understand what we're working on in the kernel a >> little better than that. > > Cool! I'm glad people are now aware of the callwheel allocation being insane with large maxusers. > > I saw this about a month ago (if not longer), but since there were half a dozen people calling me an > imbecile who hadn't really yet read the code I didn't want to inflame them more by fixing that with > "a hack". (actually a simple fix). > > A simple fix is to clamp callwheel size to the previous result of a maxusers of 384 and call it a day. > > However the simplicity of that approach would probably inflame too many feelings so I am unsure as > how to proceed. > > Any ideas? I noticed the callwheel dependency as well and asked mav@ about it in a short email exchange. He said it has only little use and goes away with the calloutng import. While that is outstanding we need to clamp it to a sane value. However I don't know what a sane value would be and why its size is directly derived from maxproc and maxfiles. If there can be one callout per process and open file descriptor in the system, then it probably has to be so big. If it can deal with 'collisions' in the wheel it can be much smaller. -- Andre From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 15:14:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8FCD3F75; Mon, 14 Jan 2013 15:14:32 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx1.freebsd.org (Postfix) with ESMTP id 4A816EBB; Mon, 14 Jan 2013 15:14:32 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id bg2so2267831pad.4 for ; Mon, 14 Jan 2013 07:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=QVTJtgiPvpr4DyN8mmHj3qWNe0wC2ZY4qlU6qoVknbY=; b=R7Fajh1L7Yd+4zxvqK+Tt9WNILM0szNN7oRQWRe1zQX4sLVEAaQltkMNSgOiXpcmQn ZZUBDiTuw9le1MjfvAoih4R7apppH53R3F53UkkPVQjt1QkiT/R0BXVz2OlV1mcg/bz1 vqGZZ06IdwbO4CS0emhlqULOjFOAuK9Kj85IiKq1DXoIDwJ5LZZFt4zSGgSPdLOCqhOG D9K6w/G0KAmYqGmqTVyjUrEeQWWgp5PMV7RPKU3aZHFGak1Asp9JX542Nw7O2VmnevE5 jdp39STHdZ9avkQR11jPsGGskpJZrF7uiPbKsBcVJZf+gjuppIyh6aogrrk/Ldiwzyq+ jTkg== X-Received: by 10.68.241.65 with SMTP id wg1mr259388004pbc.141.1358176466092; Mon, 14 Jan 2013 07:14:26 -0800 (PST) Received: from [10.175.95.150] (mobile-166-137-218-105.mycingular.net. [166.137.218.105]) by mx.google.com with ESMTPS id im4sm8360021pbc.13.2013.01.14.07.14.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jan 2013 07:14:25 -0800 (PST) References: <201301141505.r0EF5N18021253@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201301141505.r0EF5N18021253@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <45AA9DA0-E3F9-4AE7-A7E4-B9504B916038@gmail.com> X-Mailer: iPhone Mail (10A523) From: Garrett Cooper Subject: Re: svn commit: r245424 - head/sys/boot/i386/libi386 Date: Mon, 14 Jan 2013 07:14:19 -0800 To: Sean Bruno Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 15:14:32 -0000 Thanks for taking care of these. I have a pr open to handle more issues, but= this took care of a chunk of them. Thanks, -Garrett Sent from my iPhone On Jan 14, 2013, at 7:05 AM, Sean Bruno wrote: > Author: sbruno > Date: Mon Jan 14 15:05:22 2013 > New Revision: 245424 > URL: http://svnweb.freebsd.org/changeset/base/245424 >=20 > Log: > Quiesce some clang warnings while we're here doing stuff. >=20 > Submitted by: Hiren Panchasara > Obtained from: Yahoo! Inc >=20 > Modified: > head/sys/boot/i386/libi386/bootinfo64.c > head/sys/boot/i386/libi386/devicename.c > head/sys/boot/i386/libi386/pxe.c >=20 > Modified: head/sys/boot/i386/libi386/bootinfo64.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/i386/libi386/bootinfo64.c Mon Jan 14 13:06:35 2013 = (r245423) > +++ head/sys/boot/i386/libi386/bootinfo64.c Mon Jan 14 15:05:22 2013 = (r245424) > @@ -134,7 +134,8 @@ bi_checkcpu(void) > { > char *cpu_vendor; > int vendor[3]; > - int eflags, regs[4]; > + int eflags; > + unsigned int regs[4]; >=20 > /* Check for presence of "cpuid". */ > eflags =3D read_eflags(); >=20 > Modified: head/sys/boot/i386/libi386/devicename.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/i386/libi386/devicename.c Mon Jan 14 13:06:35 2013 = (r245423) > +++ head/sys/boot/i386/libi386/devicename.c Mon Jan 14 15:05:22 2013 = (r245424) > @@ -128,7 +128,7 @@ i386_parsedev(struct i386_devdesc **dev, > goto fail; > } > } else { > - cp =3D np; > + cp =3D (char *)np; > } > if (*cp && (*cp !=3D ':')) { > err =3D EINVAL; >=20 > Modified: head/sys/boot/i386/libi386/pxe.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/i386/libi386/pxe.c Mon Jan 14 13:06:35 2013 (r2454= 23) > +++ head/sys/boot/i386/libi386/pxe.c Mon Jan 14 15:05:22 2013 (r2454= 24) > @@ -88,6 +88,12 @@ static int pxe_netif_get(struct iodesc * > static int pxe_netif_put(struct iodesc *desc, void *pkt, size_t len); > static void pxe_netif_end(struct netif *nif); >=20 > +#ifdef OLD_NFSV2 > +int nfs_getrootfh(struct iodesc*, char*, u_char*); > +#else > +int nfs_getrootfh(struct iodesc*, char*, uint32_t*, u_char*); > +#endif > + > extern struct netif_stats pxe_st[]; > extern u_int16_t __bangpxeseg; > extern u_int16_t __bangpxeoff; > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 15:18:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 4F3A11BA; Mon, 14 Jan 2013 15:18:11 +0000 (UTC) Date: Mon, 14 Jan 2013 15:18:11 +0000 From: Alexey Dokuchaev To: Kevin Lo Subject: Re: svn commit: r245149 - stable/9/sys/libkern Message-ID: <20130114151811.GA99739@FreeBSD.org> References: <201301080443.r084hKsp017952@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201301080443.r084hKsp017952@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 15:18:11 -0000 On Tue, Jan 08, 2013 at 04:43:20AM +0000, Kevin Lo wrote: > New Revision: 245149 > URL: http://svnweb.freebsd.org/changeset/base/245149 > > Log: > MFC r236899: > > Fix unloading of libiconv module. Do you plan to MFC this to stable/8 as well? ./danfe From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 16:16:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D8DF95E6; Mon, 14 Jan 2013 16:16:13 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id B1E43254; Mon, 14 Jan 2013 16:16:13 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (unknown [64.25.27.130]) by elvis.mu.org (Postfix) with ESMTPSA id 0FA2A1A3C24; Mon, 14 Jan 2013 08:16:11 -0800 (PST) Message-ID: <50F42F4B.303@mu.org> Date: Mon, 14 Jan 2013 11:16:11 -0500 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> <50F2F79C.7040109@mu.org> <50F41F8C.5030900@freebsd.org> In-Reply-To: <50F41F8C.5030900@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , src-committers@freebsd.org, Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 16:16:13 -0000 On 1/14/13 10:09 AM, Andre Oppermann wrote: > On 13.01.2013 19:06, Alfred Perlstein wrote: >> On 1/12/13 10:32 PM, Adrian Chadd wrote: >>> On 12 January 2013 11:45, Alfred Perlstein wrote: >>> >>>> I'm not sure if regressing to the waterfall method of development >>>> is a good >>>> idea at this point. >>>> >>>> I see a light at the end of the tunnel and we to continue to just >>>> handle >>>> these minor corner cases as we progress. >>>> >>>> If we move to a model where a minor bug is grounds to completely >>>> remove >>>> helpful code then nothing will ever get done. >>>> >>> Allocating 512MB worth of callwheels on a 16GB MIPS machine is a >>> little silly, don't you think? >>> >>> That suggests to me that the extent of which maxfiles/maxusers/etc >>> percolates the codebase wasn't totally understood by those who wish to >>> change it. >>> >>> I'd rather see some more investigative work into outlining things that >>> need fixing and start fixing those, rather than "just change stuff and >>> fix whatever issues creep up." >>> >>> I kinda hope we all understand what we're working on in the kernel a >>> little better than that. >> >> Cool! I'm glad people are now aware of the callwheel allocation >> being insane with large maxusers. >> >> I saw this about a month ago (if not longer), but since there were >> half a dozen people calling me an >> imbecile who hadn't really yet read the code I didn't want to inflame >> them more by fixing that with >> "a hack". (actually a simple fix). >> >> A simple fix is to clamp callwheel size to the previous result of a >> maxusers of 384 and call it a day. >> >> However the simplicity of that approach would probably inflame too >> many feelings so I am unsure as >> how to proceed. >> >> Any ideas? > > I noticed the callwheel dependency as well and asked mav@ about it > in a short email exchange. He said it has only little use and goes > away with the calloutng import. While that is outstanding we need > to clamp it to a sane value. > > However I don't know what a sane value would be and why its size is > directly derived from maxproc and maxfiles. If there can be one > callout per process and open file descriptor in the system, then > it probably has to be so big. If it can deal with 'collisions' > in the wheel it can be much smaller. > If it really goes away with calloutng, then we should probably leave it be in -current. As far as clipping it when/if we push maxusers fixes in -stable (which we must do) then my impression (although maybe wrong) is that the callwheels (cc_callwheel) are just arrays of hash buckets based on what tick will be fired next MOD callwheelmask. This means that if cc_callwheel is way too small, then we will wind up with collisions, however if it's enormous then we wind up with a window that is so large it can accommodate something like hundreds of ticks into the future. Example: > Loaded symbols for /boot/kernel/profile.ko > #0 sched_switch (td=0xffffffff81373e40, newtd=0xfffffe001aab5960, > flags=) at ../../../kern/sched_ule.c:1954 > 1954 cpuid = PCPU_GET(cpuid); > (kgdb) p callwheelsize > $1 = 2097152 > Current language: auto; currently minimal > (kgdb) # .(16:06:31)(root@dan) > /usr/home/alfred # sysctl -a | grep hz > kern.clockrate: { hz = 1000, tick = 1000, profhz = 8128, stathz = 127 } > kern.dcons.poll_hz: 25 > kern.hz: 1000 > debug.psm.hz: 20 > .(16:06:37)(root@dan) > /usr/home/alfred # 2097152 > .(16:06:40)(root@dan) > /usr/home/alfred # bc > 2097152 / 1000 > 2097 > ^D# .(16:06:56)(root@dan) > /usr/home/alfred # sysctl kern.maxusers > kern.maxusers: 3406 So basically on this box there are enough callwheel slots for something like 2097 seconds, or 34 minutes into the future. I would assume that a machine that was capped at 384 maxusers would wind up with something that could handle callouts up to ~3 minutes in the future without wraparound and collisions. As far as the ncallout, that is for timeout(9) support. At a glance I'm not aware of any users of timeout(9) that are not "per device" so there's unlikely to be a need for a timeout(9) supporting pre-allocated timeout per prorcess/file, more likely something like N-devices*4, which is fine at something way lower than the max allocated at 384 maxusers from before all the changes we have made. I could be wrong.. but I still believe that it would be quite the system that would need more than callout=get_callout_from_maxusers(min(maxusers, 384)); Functions calling this function: timeout Functions calling this function: timeout File Function Line 0 si.c si_start 1439 pp->lstart_ch = timeout(si_lstart, (caddr_t)pp, time); 1 sio.c siobusycheck 1269 timeout(siobusycheck, com, hz / 100); 2 sio.c siopoll 1744 timeout(siobusycheck, com, hz / 100); 3 sio.c siosettimeout 2203 sio_timeout_handle = timeout(comwakeup, (void *)NULL, 4 sio.c comwakeup 2220 sio_timeout_handle = timeout(comwakeup, (void *)NULL, sio_timeout); 5 syscons.c scrn_timer 1834 timeout(scrn_timer, sc, hz / 10); 6 syscons.c scrn_timer 1884 timeout(scrn_timer, sc, hz / 10); 7 syscons.c scrn_timer 1902 timeout(scrn_timer, sc, hz / 25); 8 syscons.c blink_screen 3847 timeout(blink_screen, scp, hz / 10); 9 trm.c trm_ExecuteSRB 478 ccb->ccb_h.timeout_ch = timeout(trmtimeout, (caddr_t)srb, (ccb->ccb_h.timeout * hz) / 1000); a tws_cam.c tws_execute_scsi 782 ccb_h->timeout_ch = timeout(tws_timeout, req, (ccb_h->timeout * hz)/1000); b tws_cam.c tws_send_scsi_cmd 820 req->thandle = timeout(tws_timeout, req, (TWS_IO_TIMEOUT * hz)); c tws_cam.c tws_set_param 867 req->thandle = timeout(tws_timeout, req, (TWS_IOCTL_TIMEOUT * hz)); d tws_services.c tws_print_stats 398 timeout(tws_print_stats, sc, 300*hz); e if_wl.c wlstart 1022 sc->watchdog_ch = timeout(wlwatchdog, sc, 10); f spic.c spictimeout 429 sc->sc_timeout_ch = timeout(spictimeout, sc, spic_pollrate); g spic.c spictimeout 442 sc->sc_timeout_ch = timeout(spictimeout, sc, spic_pollrate); h spic.c spicopen 459 timeout(spictimeout, sc, spic_pollrate); i kern_cons.c sysbeep 624 timeout(sysbeepstop, (void *)NULL, period); j kern_fail.c fail_point_sleep 133 timeout(fp->fp_sleep_fn, fp->fp_sleep_arg, timo); k aarp.c aarptimer 128 aarptimer_ch = timeout(aarptimer, NULL, AARPT_AGE * hz); l aarp.c aarptnew 580 aarptimer_ch = timeout(aarptimer, (caddr_t)0, hz); m ng_btsocket_l2cap.c ng_btsocket_l2cap_timeout 2663 pcb->timo = timeout(ng_btsocket_l2cap_process_timeout, pcb, n ng_btsocket_rfcomm.c ng_btsocket_rfcomm_timeou 3449 pcb->timo = timeout(ng_btsocket_rfcomm_process_timeout, pcb, o ng_fec.c ng_fec_init 642 priv->fec_ch = timeout(ng_fec_tick, priv, hz); p ng_fec.c ng_fec_tick 717 priv->fec_ch = timeout(ng_fec_tick, priv, hz); q key.c key_timehandler 4551 (void )timeout((void *)key_timehandler, (void *)0, hz); r key.c key_init 7776 timeout((void *)key_timehandler, (void *)0, hz); s ncp_subr.c ncp_init 107 ncp_timer_handle = timeout(ncp_timer, NULL, NCP_TIMER_TICK); t fdc.c fd_turnon 1186 timeout(fd_motor_on, fd, hz); u fdc.c fdstate 1786 fd->toffhandle = timeout(fd_turnoff, fd, 4 * hz); v fdc.c fdstate 1877 timeout(fd_pseudointr, fdc, hz / 16); w fdc.c fdstate 2092 fd->tohandle = timeout(fd_iotimeout, fdc, hz); x fdc.c fdstate 2101 fd->tohandle = timeout(fd_iotimeout, fdc, hz); y fdc.c fdstate 2218 timeout(fd_pseudointr, fdc, hz / 8); * Lines 71-106 of 115, 10 more - press the space bar to display more * Functions calling this function: timeout File Function Line 0 olpt.c lptopen 421 timeout (lptout, (caddr_t)sc, 1 olpt.c lptout 440 timeout (lptout, (caddr_t)sc, sc->sc_backoff); 2 pckbd.c pckbd_timeout 260 timeout(pckbd_timeout, arg, hz/10); 3 sio.c sioattach 2012 timeout(siobusycheck, com, hz / 100); 4 sio.c sioattach 2696 timeout(siobusycheck, com, hz / 100); 5 sio.c sioattach 3330 sio_timeout_handle = timeout(comwakeup, (void *)NULL, 6 sio.c sioattach 3347 sio_timeout_handle = timeout(comwakeup, (void *)NULL, sio_timeout); 7 sio.c sioattach 3933 timeout(pc98_check_msr, (caddr_t)dev, 8 sio.c sioattach 3951 timeout(pc98_check_msr, (caddr_t)dev, 9 ncr.c ncr_timeout 5171 timeout (ncr_timeout, (caddr_t) np, step ? step : 1); * Press the space bar to display the first lines again * -Alfred From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 16:38:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 27378212; Mon, 14 Jan 2013 16:38:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 199F5380; Mon, 14 Jan 2013 16:38:44 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EGchiS048739; Mon, 14 Jan 2013 16:38:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EGchik048738; Mon, 14 Jan 2013 16:38:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301141638.r0EGchik048738@svn.freebsd.org> From: Alexander Motin Date: Mon, 14 Jan 2013 16:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245425 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 16:38:44 -0000 Author: mav Date: Mon Jan 14 16:38:43 2013 New Revision: 245425 URL: http://svnweb.freebsd.org/changeset/base/245425 Log: Small cosmetic tuning of the IRRT status constants. Modified: head/sys/geom/raid/md_intel.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Mon Jan 14 15:05:22 2013 (r245424) +++ head/sys/geom/raid/md_intel.c Mon Jan 14 16:38:43 2013 (r245425) @@ -98,8 +98,9 @@ struct intel_raid_vol { uint8_t cng_master_disk; uint16_t cache_policy; uint8_t cng_state; -#define INTEL_SNGST_NEEDS_UPDATE 1 -#define INTEL_SNGST_MASTER_MISSING 2 +#define INTEL_CNGST_UPDATED 0 +#define INTEL_CNGST_NEEDS_UPDATE 1 +#define INTEL_CNGST_MASTER_MISSING 2 uint8_t cng_sub_state; uint32_t filler_0[10]; @@ -2366,9 +2367,11 @@ g_raid_md_write_intel(struct g_raid_md_o mvol->cng_master_disk = pv->pv_cng_master_disk; if (vol->v_subdisks[pv->pv_cng_master_disk].sd_state == G_RAID_SUBDISK_S_NONE) - mvol->cng_state = INTEL_SNGST_MASTER_MISSING; + mvol->cng_state = INTEL_CNGST_MASTER_MISSING; else if (vol->v_state != G_RAID_VOLUME_S_OPTIMAL) - mvol->cng_state = INTEL_SNGST_NEEDS_UPDATE; + mvol->cng_state = INTEL_CNGST_NEEDS_UPDATE; + else + mvol->cng_state = INTEL_CNGST_UPDATED; } /* Check for any recovery in progress. */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 15:51:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1CD24B3F; Mon, 14 Jan 2013 15:51:40 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) by mx1.freebsd.org (Postfix) with ESMTP id 8B50D112; Mon, 14 Jan 2013 15:51:38 +0000 (UTC) Received: by mail-bk0-f43.google.com with SMTP id jf20so2095752bkc.30 for ; Mon, 14 Jan 2013 07:51:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=8dWv/Q4R3Sd3oz0GATFy77UA0UR87LtTzChQ6qO+U9c=; b=yrxy1X5hRA3NKHii/S4oUGd8mq13rpSA5Xvp3iZhkx9254Sufov+dzvqaUQyJGlqXA i4JZfAQLlywYI9vPAZnvbUUpHzbMmTsNsHYFPCI7KNfSpf9ke0waBv8r8FWjUETwYy1Q /r+UWMYUlwnYjlA2zdiSp/xGWPLRjunev11I3tE+H6EG3Ef4IzVlJOUAtyIRQ+Gp2seo nNOA1k391n+L4n9RnS+KlfpiumEHqmxELRe4SRRgzexkeWwU4b0WetW0WqBh6Rynd4Dc d4Kbks4+K0PuXHhVjcMetazuQMYd0vPP2CpLWZgLagb0LQZeoNzbI5qT8MOVxVyc/XNd 5f8A== X-Received: by 10.204.147.143 with SMTP id l15mr40422061bkv.28.1358178691948; Mon, 14 Jan 2013 07:51:31 -0800 (PST) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id m20sm10183415bkw.4.2013.01.14.07.51.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jan 2013 07:51:31 -0800 (PST) Sender: Alexander Motin Message-ID: <50F4297F.8050708@FreeBSD.org> Date: Mon, 14 Jan 2013 17:51:27 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> <50F2F79C.7040109@mu.org> <50F41F8C.5030900@freebsd.org> In-Reply-To: <50F41F8C.5030900@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 14 Jan 2013 16:40:10 +0000 Cc: Adrian Chadd , src-committers@freebsd.org, Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Alfred Perlstein , Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 15:51:40 -0000 On 14.01.2013 17:09, Andre Oppermann wrote: > On 13.01.2013 19:06, Alfred Perlstein wrote: >> On 1/12/13 10:32 PM, Adrian Chadd wrote: >>> On 12 January 2013 11:45, Alfred Perlstein wrote: >>> >>>> I'm not sure if regressing to the waterfall method of development is >>>> a good >>>> idea at this point. >>>> >>>> I see a light at the end of the tunnel and we to continue to just >>>> handle >>>> these minor corner cases as we progress. >>>> >>>> If we move to a model where a minor bug is grounds to completely remove >>>> helpful code then nothing will ever get done. >>>> >>> Allocating 512MB worth of callwheels on a 16GB MIPS machine is a >>> little silly, don't you think? >>> >>> That suggests to me that the extent of which maxfiles/maxusers/etc >>> percolates the codebase wasn't totally understood by those who wish to >>> change it. >>> >>> I'd rather see some more investigative work into outlining things that >>> need fixing and start fixing those, rather than "just change stuff and >>> fix whatever issues creep up." >>> >>> I kinda hope we all understand what we're working on in the kernel a >>> little better than that. >> >> Cool! I'm glad people are now aware of the callwheel allocation >> being insane with large maxusers. >> >> I saw this about a month ago (if not longer), but since there were >> half a dozen people calling me an >> imbecile who hadn't really yet read the code I didn't want to inflame >> them more by fixing that with >> "a hack". (actually a simple fix). >> >> A simple fix is to clamp callwheel size to the previous result of a >> maxusers of 384 and call it a day. >> >> However the simplicity of that approach would probably inflame too >> many feelings so I am unsure as >> how to proceed. >> >> Any ideas? > > I noticed the callwheel dependency as well and asked mav@ about it > in a short email exchange. He said it has only little use and goes > away with the calloutng import. While that is outstanding we need > to clamp it to a sane value. > > However I don't know what a sane value would be and why its size is > directly derived from maxproc and maxfiles. If there can be one > callout per process and open file descriptor in the system, then > it probably has to be so big. If it can deal with 'collisions' > in the wheel it can be much smaller. As I've actually written, there are two different things: ncallout -- number of preallocated callout structures for purposes of timeout() calls. That is a legacy API that is probably not very much used now, so that value don't need to be too big. But that allocation is static and if it will ever be exhausted system will panic. That is why it was set quite high. The right way now would be to analyze where that API is still used and estimate the really required number. callwheelsize -- number of slots in the callwheel. That is purely optimizational value. If set too low, it will just increase number of hash collisions without effects other then some slowdown. Optimal value here does depend on number of callouts in system, but not only. Since array index there is not really a hash, it is practically useless to set array size it higher then median callout interval divided by hz (or by 1ms in calloutng). The problem is to estimate that median value, that completely depends on workload. Each one ncallout cost 32-52 bytes, while one callwheelsize only 8-16 and could probably be reduced to 4-8 by replacing TAILQ with LIST. So that is ncallout and respective timeout() API what should be managed in first order. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 16:40:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 74330513; Mon, 14 Jan 2013 16:40:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 578B43CF; Mon, 14 Jan 2013 16:40:51 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EGepwl050630; Mon, 14 Jan 2013 16:40:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EGepLc050623; Mon, 14 Jan 2013 16:40:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301141640.r0EGepLc050623@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 14 Jan 2013 16:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245426 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 16:40:51 -0000 Author: jilles Date: Mon Jan 14 16:40:50 2013 New Revision: 245426 URL: http://svnweb.freebsd.org/changeset/base/245426 Log: sh: Simplify cd-hash interaction. Instead of rechecking relative paths for all hashed utilities after a cd, track if any utility in cmdtable depends on a relative path in PATH. If there is such a utility, cd clears the entire table. As a result, the '*' in hash no longer happens. Modified: head/bin/sh/exec.c head/bin/sh/sh.1 Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Mon Jan 14 16:38:43 2013 (r245425) +++ head/bin/sh/exec.c Mon Jan 14 16:40:50 2013 (r245426) @@ -86,12 +86,12 @@ struct tblentry { union param param; /* definition of builtin function */ int special; /* flag for special builtin commands */ signed char cmdtype; /* index identifying command */ - char rehash; /* if set, cd done since entry created */ char cmdname[]; /* name of command */ }; static struct tblentry *cmdtable[CMDTABLESIZE]; +static int cmdtable_cd = 0; /* cmdtable contains cd-dependent entries */ int exerrno = 0; /* Last exec error */ @@ -305,8 +305,6 @@ printentry(struct tblentry *cmdp, int ve error("internal error: cmdtype %d", cmdp->cmdtype); #endif } - if (cmdp->rehash) - out1c('*'); out1c('\n'); } @@ -323,12 +321,12 @@ find_command(const char *name, struct cm { struct tblentry *cmdp, loc_cmd; int idx; - int prev; char *fullname; struct stat statb; int e; int i; int spec; + int cd; /* If name contains a slash, don't use the hash table */ if (strchr(name, '/') != NULL) { @@ -337,8 +335,10 @@ find_command(const char *name, struct cm return; } + cd = 0; + /* If name is in the table, and not invalidated by cd, we're done */ - if ((cmdp = cmdlookup(name, 0)) != NULL && cmdp->rehash == 0) { + if ((cmdp = cmdlookup(name, 0)) != NULL) { if (cmdp->cmdtype == CMDFUNCTION && act & DO_NOFUNC) cmdp = NULL; else @@ -359,13 +359,6 @@ find_command(const char *name, struct cm } /* We have to search path. */ - prev = -1; /* where to start */ - if (cmdp) { /* doing a rehash */ - if (cmdp->cmdtype == CMDBUILTIN) - prev = -1; - else - prev = cmdp->param.index; - } e = ENOENT; idx = -1; @@ -380,13 +373,8 @@ loop: goto loop; /* ignore unimplemented options */ } } - /* if rehash, don't redo absolute path names */ - if (fullname[0] == '/' && idx <= prev) { - if (idx < prev) - goto loop; - TRACE(("searchexec \"%s\": no change\n", name)); - goto success; - } + if (fullname[0] != '/') + cd = 1; if (stat(fullname, &statb) < 0) { if (errno != ENOENT && errno != ENOTDIR) e = errno; @@ -426,9 +414,6 @@ loop: goto success; } - /* We failed. If there was an entry for this command, delete it */ - if (cmdp && cmdp->cmdtype != CMDFUNCTION) - delete_cmd_entry(); if (act & DO_ERR) { if (e == ENOENT || e == ENOTDIR) outfmt(out2, "%s: not found\n", name); @@ -440,7 +425,8 @@ loop: return; success: - cmdp->rehash = 0; + if (cd) + cmdtable_cd = 1; entry->cmdtype = cmdp->cmdtype; entry->u = cmdp->param; entry->special = cmdp->special; @@ -469,22 +455,15 @@ find_builtin(const char *name, int *spec /* - * Called when a cd is done. Marks all commands so the next time they - * are executed they will be rehashed. + * Called when a cd is done. If any entry in cmdtable depends on the current + * directory, simply clear cmdtable completely. */ void hashcd(void) { - struct tblentry **pp; - struct tblentry *cmdp; - - for (pp = cmdtable ; pp < &cmdtable[CMDTABLESIZE] ; pp++) { - for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) { - if (cmdp->cmdtype == CMDNORMAL) - cmdp->rehash = 1; - } - } + if (cmdtable_cd) + clearcmdentry(); } @@ -526,6 +505,7 @@ clearcmdentry(void) } } } + cmdtable_cd = 0; INTON; } @@ -566,7 +546,6 @@ cmdlookup(const char *name, int add) + strlen(name) + 1); cmdp->next = NULL; cmdp->cmdtype = CMDUNKNOWN; - cmdp->rehash = 0; strcpy(cmdp->cmdname, name); INTON; } Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Mon Jan 14 16:38:43 2013 (r245425) +++ head/bin/sh/sh.1 Mon Jan 14 16:40:50 2013 (r245426) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd July 15, 2012 +.Dd January 14, 2013 .Dt SH 1 .Os .Sh NAME @@ -2219,10 +2219,6 @@ The shell maintains a hash table which r With no arguments whatsoever, the .Ic hash command prints out the contents of this table. -Entries which have not been looked at since the last -.Ic cd -command are marked with an asterisk; -it is possible for these entries to be invalid. .Pp With arguments, the .Ic hash From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 17:41:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C1761244; Mon, 14 Jan 2013 17:41:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B31A18B4; Mon, 14 Jan 2013 17:41:05 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EHf5O0068742; Mon, 14 Jan 2013 17:41:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EHf5dl068738; Mon, 14 Jan 2013 17:41:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201301141741.r0EHf5dl068738@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 14 Jan 2013 17:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245427 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 17:41:05 -0000 Author: hselasky Date: Mon Jan 14 17:41:04 2013 New Revision: 245427 URL: http://svnweb.freebsd.org/changeset/base/245427 Log: Add new u3g device quirk. Submitted by: Lowell Gilbert MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Jan 14 16:40:50 2013 (r245426) +++ head/sys/dev/usb/serial/u3g.c Mon Jan 14 17:41:04 2013 (r245427) @@ -356,6 +356,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(NOVATEL, V740, 0), U3G_DEV(NOVATEL, X950D, 0), U3G_DEV(NOVATEL, XU870, 0), + U3G_DEV(MOTOROLA2, MB886, U3GINIT_SCSIEJECT), U3G_DEV(OPTION, E6500, 0), U3G_DEV(OPTION, E6501, 0), U3G_DEV(OPTION, E6601, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Jan 14 16:40:50 2013 (r245426) +++ head/sys/dev/usb/usbdevs Mon Jan 14 17:41:04 2013 (r245427) @@ -2939,6 +2939,7 @@ product MOTOROLA2 A41XV32X 0x2a22 A41x/V product MOTOROLA2 E398 0x4810 E398 Mobile Phone product MOTOROLA2 USBLAN 0x600c USBLAN product MOTOROLA2 USBLAN2 0x6027 USBLAN +product MOTOROLA2 MB886 0x710f MB886 Mobile Phone (Atria HD) product MOTOROLA4 RT2770 0x9031 RT2770 product MOTOROLA4 RT3070 0x9032 RT3070 From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 17:54:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 87A6A7BC for ; Mon, 14 Jan 2013 17:54:33 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com [209.85.215.48]) by mx1.freebsd.org (Postfix) with ESMTP id ED10F943 for ; Mon, 14 Jan 2013 17:54:32 +0000 (UTC) Received: by mail-la0-f48.google.com with SMTP id ej20so4202673lab.35 for ; Mon, 14 Jan 2013 09:54:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=Lny8Xfpb37wOCgvtttbwXSaNemhW1YJGJKdKFYJ6Afo=; b=XSt1MYB7mBx3571ilsBDhJ+YIemV2rzS+5+pO5+7t46Kb9eWf5B/iPTg0AJfANDoVh oTETSM/R46ou3tdPmtX9FhKO1L90CIbwKBMNF28hsOzdXaJRNXI8EkKs37SEWEOzTkfC ib+wqfR1ta2k4RfECqXWIzcay71Ld6jaovsmOM0iyFlIZlvRGiTvKzKxZeb3Hr+PLqkt FhoVp7cUd7CQ2pazqtbuTQLDYbtB4pPEWIbg7lq6OPzlKFnlZM0gefBJRaazx0HnpD+n 4znfx4VBsMB3XApGNq1HYlu8In8zx2Q7h1n7IGcZcYpW1YLcYj8oDkwbZ8Fr+JTPBilw CJUA== X-Received: by 10.112.98.232 with SMTP id el8mr22894704lbb.121.1358186066012; Mon, 14 Jan 2013 09:54:26 -0800 (PST) Received: from zont-osx.local (ppp95-165-128-93.pppoe.spdop.ru. [95.165.128.93]) by mx.google.com with ESMTPS id hc20sm5693883lab.11.2013.01.14.09.54.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jan 2013 09:54:25 -0800 (PST) Sender: Andrey Zonov Message-ID: <50F4464A.7000903@FreeBSD.org> Date: Mon, 14 Jan 2013 21:54:18 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Fabian Keil Subject: Re: svn commit: r245415 - stable/9/etc References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> In-Reply-To: <20130114122640.152cb041@fabiankeil.de> X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2VEHJCUEBHXHILFGAWWAI" X-Gm-Message-State: ALoCoQmsaKdG3fWqxcerVqHsZQfUiApVCKE4S5LR25FzQC+UMzuukycJGYnOsujGvJHM8Wi6hO4q Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 17:54:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VEHJCUEBHXHILFGAWWAI Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 1/14/13 3:26 PM, Fabian Keil wrote: > Andrey Zonov wrote: >=20 >> Author: zont >> Date: Mon Jan 14 10:58:20 2013 >> New Revision: 245415 >> URL: http://svnweb.freebsd.org/changeset/base/245415 >> >> Log: >> MFC r244383: >> - Set memorylocked limit to 64Kb for default login class. >> This prevents unprivileged users to lock too much memory. >=20 > Note that this causes geli segfaults when using sudo: > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174831 >=20 The change should not affect stable, because new behavior was turned off in stable. --=20 Andrey Zonov ------enig2VEHJCUEBHXHILFGAWWAI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQ9EZOAAoJEBWLemxX/CvTRuwH/2KUJ+fhP4LdmbUJhIUNKsBx pVD8W6J+IIkflT5hd4WfHgi1hgcFVu2sk7sjO8Nit/mRIWlI1bWmttGpoDU+ZW5Y RK5mUXtMqzaD6bej+hixArdG7RxAgYUfn4TCk1g1xtzcsatpeXiNbdNO7x8c4/FD /HLpv86mWr4AU8y9Em02CfhKF4S2gIEBwqJ/pbSvx96abw7vKycn4ChM8h1VCcRC I/14LlpOcSYrsRdrYSTAb7EV2ui88AjX38YX2m4E+oV1Wj5rA2VehqVDGc18bjwE SQC93feZ4ujLcvGLBqDOhD2giPDxxQ05rQh79RxMQHr/JGDu+mzpIE2iXjR0Rj0= =WULj -----END PGP SIGNATURE----- ------enig2VEHJCUEBHXHILFGAWWAI-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 18:01:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 50A38D94; Mon, 14 Jan 2013 18:01:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 387A59BD; Mon, 14 Jan 2013 18:01:20 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EI1KLu074854; Mon, 14 Jan 2013 18:01:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EI1Kvp074853; Mon, 14 Jan 2013 18:01:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201301141801.r0EI1Kvp074853@svn.freebsd.org> From: Dimitry Andric Date: Mon, 14 Jan 2013 18:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245428 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 18:01:20 -0000 Author: dim Date: Mon Jan 14 18:01:19 2013 New Revision: 245428 URL: http://svnweb.freebsd.org/changeset/base/245428 Log: Add CLOCK_PROCESS_CPUTIME_ID to , to synchronize the CLOCK_* values with those in . Otherwise, if a program includes before , the CLOCK_PROCESS_CPUTIME_ID macro never gets defined. Reviewed by: davidxu X-MFC-With: 239347 Modified: head/include/time.h Modified: head/include/time.h ============================================================================== --- head/include/time.h Mon Jan 14 17:41:04 2013 (r245427) +++ head/include/time.h Mon Jan 14 18:01:19 2013 (r245428) @@ -112,6 +112,7 @@ typedef __pid_t pid_t; #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 +#define CLOCK_PROCESS_CPUTIME_ID 15 #endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ #if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 16:05:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BFA0F10F for ; Mon, 14 Jan 2013 16:05:45 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1F60C1AD for ; Mon, 14 Jan 2013 16:05:44 +0000 (UTC) Received: (qmail 61937 invoked from network); 14 Jan 2013 17:28:38 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 14 Jan 2013 17:28:38 -0000 Message-ID: <50F42CD7.6020400@freebsd.org> Date: Mon, 14 Jan 2013 17:05:43 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Alexander Motin Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> <50F2F79C.7040109@mu.org> <50F41F8C.5030900@freebsd.org> <50F4297F.8050708@FreeBSD.org> In-Reply-To: <50F4297F.8050708@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 14 Jan 2013 18:17:34 +0000 Cc: Adrian Chadd , src-committers@freebsd.org, Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Alfred Perlstein , Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 16:05:45 -0000 On 14.01.2013 16:51, Alexander Motin wrote: > On 14.01.2013 17:09, Andre Oppermann wrote: >> On 13.01.2013 19:06, Alfred Perlstein wrote: >>> On 1/12/13 10:32 PM, Adrian Chadd wrote: >>>> On 12 January 2013 11:45, Alfred Perlstein wrote: >>>> >>>>> I'm not sure if regressing to the waterfall method of development is >>>>> a good >>>>> idea at this point. >>>>> >>>>> I see a light at the end of the tunnel and we to continue to just >>>>> handle >>>>> these minor corner cases as we progress. >>>>> >>>>> If we move to a model where a minor bug is grounds to completely remove >>>>> helpful code then nothing will ever get done. >>>>> >>>> Allocating 512MB worth of callwheels on a 16GB MIPS machine is a >>>> little silly, don't you think? >>>> >>>> That suggests to me that the extent of which maxfiles/maxusers/etc >>>> percolates the codebase wasn't totally understood by those who wish to >>>> change it. >>>> >>>> I'd rather see some more investigative work into outlining things that >>>> need fixing and start fixing those, rather than "just change stuff and >>>> fix whatever issues creep up." >>>> >>>> I kinda hope we all understand what we're working on in the kernel a >>>> little better than that. >>> >>> Cool! I'm glad people are now aware of the callwheel allocation >>> being insane with large maxusers. >>> >>> I saw this about a month ago (if not longer), but since there were >>> half a dozen people calling me an >>> imbecile who hadn't really yet read the code I didn't want to inflame >>> them more by fixing that with >>> "a hack". (actually a simple fix). >>> >>> A simple fix is to clamp callwheel size to the previous result of a >>> maxusers of 384 and call it a day. >>> >>> However the simplicity of that approach would probably inflame too >>> many feelings so I am unsure as >>> how to proceed. >>> >>> Any ideas? >> >> I noticed the callwheel dependency as well and asked mav@ about it >> in a short email exchange. He said it has only little use and goes >> away with the calloutng import. While that is outstanding we need >> to clamp it to a sane value. >> >> However I don't know what a sane value would be and why its size is >> directly derived from maxproc and maxfiles. If there can be one >> callout per process and open file descriptor in the system, then >> it probably has to be so big. If it can deal with 'collisions' >> in the wheel it can be much smaller. > > As I've actually written, there are two different things: > ncallout -- number of preallocated callout structures for purposes of > timeout() calls. That is a legacy API that is probably not very much > used now, so that value don't need to be too big. But that allocation is > static and if it will ever be exhausted system will panic. That is why > it was set quite high. The right way now would be to analyze where that > API is still used and estimate the really required number. Can timeout() be emulated on top of another API so we can do away with it? > callwheelsize -- number of slots in the callwheel. That is purely > optimizational value. If set too low, it will just increase number of > hash collisions without effects other then some slowdown. Optimal value > here does depend on number of callouts in system, but not only. Since > array index there is not really a hash, it is practically useless to set > array size it higher then median callout interval divided by hz (or by > 1ms in calloutng). The problem is to estimate that median value, that > completely depends on workload. OK. So for example a large number of TCP connection would use up a large number of slots in the callwheel. I'll try to come up with a reasonable sane scaling value. > Each one ncallout cost 32-52 bytes, while one callwheelsize only 8-16 > and could probably be reduced to 4-8 by replacing TAILQ with LIST. So > that is ncallout and respective timeout() API what should be managed in > first order. I'll give it a try. -- Andre From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 16:17:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 54EA78AC; Mon, 14 Jan 2013 16:17:56 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2C37627D; Mon, 14 Jan 2013 16:17:55 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (unknown [64.25.27.130]) by elvis.mu.org (Postfix) with ESMTPSA id F18111A3C1D; Mon, 14 Jan 2013 08:17:53 -0800 (PST) Message-ID: <50F42FB1.6020401@mu.org> Date: Mon, 14 Jan 2013 11:17:53 -0500 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> <50F2F79C.7040109@mu.org> <50F41F8C.5030900@freebsd.org> <50F4297F.8050708@FreeBSD.org> <50F42CD7.6020400@freebsd.org> In-Reply-To: <50F42CD7.6020400@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 14 Jan 2013 18:17:40 +0000 Cc: Adrian Chadd , src-committers@freebsd.org, Alan Cox , "Jayachandran C." , Alexander Motin , Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 16:17:56 -0000 On 1/14/13 11:05 AM, Andre Oppermann wrote: > > Can timeout() be emulated on top of another API so we can do away with > it? yes, this is what callout(9) is for. there are a few consumers left (see the email I just sent out). those consumers would just have to allocate their own callout handle/struct and pass that to callout instead of using timeout(9). -Alfred From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 16:23:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3779ECAE; Mon, 14 Jan 2013 16:23:12 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by mx1.freebsd.org (Postfix) with ESMTP id AB42D2D9; Mon, 14 Jan 2013 16:23:10 +0000 (UTC) Received: by mail-bk0-f41.google.com with SMTP id jg9so2111134bkc.0 for ; Mon, 14 Jan 2013 08:23:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MJwK5QiJyaS9fWNMo/yaZFKa7uX/AO53ObUmDIIqHjw=; b=o5YdDbyo1DzArLT9o9PtYVdpCS+nZf8T4NlsRxoj1HKLt/dStMr0R9eiFJHplK0Uh4 a3rYEGMfBqYsagPGJaEizOAWvm36w86dVWXoXeUkbT1v5mvFOsBH3mL03ohvv9qwojyG NmquN4JKxoPuMNjy1c+fkX3pKzDGOC7iKv1vqviTtWSwZ9pl5xEum3SaD+ljKO8RtNkg uufj1s+94QEAKrKf9UTajaMuDGsXXvWRDdfjIE5Pk57GtCTSnnDlpI76xA/mfBYhbeet U/djTpAIBEsm48M+ymkL03gaYaZggwM8KpxEu0m0B10pqWNrHwfy97e9na5ukQEAF8ep UjrQ== X-Received: by 10.204.3.206 with SMTP id 14mr39244118bko.120.1358180583687; Mon, 14 Jan 2013 08:23:03 -0800 (PST) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id e22sm10318424bke.14.2013.01.14.08.23.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jan 2013 08:23:02 -0800 (PST) Sender: Alexander Motin Message-ID: <50F430E3.70501@FreeBSD.org> Date: Mon, 14 Jan 2013 18:22:59 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> <50F1BD69.4060104@mu.org> <50F2F79C.7040109@mu.org> <50F41F8C.5030900@freebsd.org> <50F4297F.8050708@FreeBSD.org> <50F42CD7.6020400@freebsd.org> In-Reply-To: <50F42CD7.6020400@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 14 Jan 2013 18:17:50 +0000 Cc: Adrian Chadd , src-committers@freebsd.org, Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Alfred Perlstein , Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 16:23:12 -0000 On 14.01.2013 18:05, Andre Oppermann wrote: > On 14.01.2013 16:51, Alexander Motin wrote: >> As I've actually written, there are two different things: >> ncallout -- number of preallocated callout structures for purposes of >> timeout() calls. That is a legacy API that is probably not very much >> used now, so that value don't need to be too big. But that allocation is >> static and if it will ever be exhausted system will panic. That is why >> it was set quite high. The right way now would be to analyze where that >> API is still used and estimate the really required number. > > Can timeout() be emulated on top of another API so we can do away with it? It is already emulated on top of callout_init()/callout_reset(). The problem is that callout_init()/callout_reset() assume storage memory to be allocated by consumer, while timeout() assumes it to be allocated by subsystem. The only way to solve it is to rewrite remaining timeout() consumers to use callout_init()/callout_reset() API directly. >> callwheelsize -- number of slots in the callwheel. That is purely >> optimizational value. If set too low, it will just increase number of >> hash collisions without effects other then some slowdown. Optimal value >> here does depend on number of callouts in system, but not only. Since >> array index there is not really a hash, it is practically useless to set >> array size it higher then median callout interval divided by hz (or by >> 1ms in calloutng). The problem is to estimate that median value, that >> completely depends on workload. > > OK. So for example a large number of TCP connection would use up a > large number of slots in the callwheel. I'll try to come up with a > reasonable sane scaling value. Yes, it _may_ use, but that also depends on time intervals. If most of these TCP timeouts will be few seconds long for ACK timeout, there will be no any performance difference between having callwheelsize of 100*hz and 10000*hz. Same time, if periods are measured in hours, like for keep-alives, increasing callwheelsize may be effective. >> Each one ncallout cost 32-52 bytes, while one callwheelsize only 8-16 >> and could probably be reduced to 4-8 by replacing TAILQ with LIST. So >> that is ncallout and respective timeout() API what should be managed in >> first order. > > I'll give it a try. Thanks. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 18:03:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9BB56F55; Mon, 14 Jan 2013 18:03:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 749829DC; Mon, 14 Jan 2013 18:03:20 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E88E7B948; Mon, 14 Jan 2013 13:03:19 -0500 (EST) From: John Baldwin To: Alexander Motin Subject: Re: svn commit: r243631 - in head/sys: kern sys Date: Mon, 14 Jan 2013 12:55:46 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50F41F8C.5030900@freebsd.org> <50F4297F.8050708@FreeBSD.org> In-Reply-To: <50F4297F.8050708@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201301141255.46994.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 14 Jan 2013 13:03:20 -0500 (EST) X-Mailman-Approved-At: Mon, 14 Jan 2013 18:36:04 +0000 Cc: Adrian Chadd , src-committers@freebsd.org, Andre Oppermann , Alan Cox , "Jayachandran C." , svn-src-all@freebsd.org, Alfred Perlstein , Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 18:03:20 -0000 On Monday, January 14, 2013 10:51:27 am Alexander Motin wrote: > As I've actually written, there are two different things: > ncallout -- number of preallocated callout structures for purposes of > timeout() calls. That is a legacy API that is probably not very much > used now, so that value don't need to be too big. But that allocation is > static and if it will ever be exhausted system will panic. That is why > it was set quite high. The right way now would be to analyze where that > API is still used and estimate the really required number. FYI, I have slowly been working through the tree fixing users of timeout() to use callout_*() instead. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 18:39:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F2FB9AAE for ; Mon, 14 Jan 2013 18:39:22 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx1.freebsd.org (Postfix) with ESMTP id 72AFEC3E for ; Mon, 14 Jan 2013 18:39:22 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id fq13so4250006lab.33 for ; Mon, 14 Jan 2013 10:39:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=aUhMdx9q31QqxzIdNj7k76DlNk119t2OtFoHzuCcOCA=; b=PCWqvvnIFX5MCvSyUGkA+yyPG/CWmm2RabAsnZx1F0vJJU3GkILTA/pt93tgehuyVb fo9TMlnZoEqdLODDLrBMpCueBPJIL5NLdMapdp4FLen3YRaXLvVl2kMeiAAdpV12iIVh 4gTZXslpNmgR/W21eM29D6PD3AlveLrURVGS0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=aUhMdx9q31QqxzIdNj7k76DlNk119t2OtFoHzuCcOCA=; b=ejFijsmsw6lTirsHJsuEYIijMvhHoM6QIF4bzHxPBB1utzlk+GibTE7iL027RQXcki /pRE/NAK44Gs1u9IgvcEL6CUNVsFFiMSxaUE4FehRoOiK6Em6ArVQk9y5BVhtKLAcpZV xFTAxCtDPx9gpoYxUyJ9sU0h8m0eNUmvp2vEmkFXqUn8jGR7yc3dUj0tJAGc0V7CgJ2X rbMvpjNBK1kVAmaS61MsfJWKx8cRX8ZeVcsv0kq4eblpmhPKEVmQ9ecY3ZA8CliYQo5p /xkg062kaqDooteuI/yd5YMKesNXDX4zGB1eq6IkGPCTbjpyISOlsGs7CY9UOE5v1NKy 1r/Q== Received: by 10.112.82.136 with SMTP id i8mr707403lby.74.1358188761301; Mon, 14 Jan 2013 10:39:21 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.151.36 with HTTP; Mon, 14 Jan 2013 10:38:51 -0800 (PST) In-Reply-To: <201301141640.r0EGepLc050623@svn.freebsd.org> References: <201301141640.r0EGepLc050623@svn.freebsd.org> From: Eitan Adler Date: Mon, 14 Jan 2013 13:38:51 -0500 X-Google-Sender-Auth: J9gKXsoxHyd8VB2dsjRnnKL5M7k Message-ID: Subject: Re: svn commit: r245426 - head/bin/sh To: Jilles Tjoelker Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmdE8MxU+PlY1BddPSWn5DttQGQXgEz6bzAJBBYiYc/ERui+eitoyeQ0pGjFUQnIk3lCnV9 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 18:39:23 -0000 On 14 January 2013 11:40, Jilles Tjoelker wrote: > Author: jilles > Date: Mon Jan 14 16:40:50 2013 > New Revision: 245426 > URL: http://svnweb.freebsd.org/changeset/base/245426 > > Log: > sh: Simplify cd-hash interaction. > > Instead of rechecking relative paths for all hashed utilities after a cd, > track if any utility in cmdtable depends on a relative path in PATH. > If there is such a utility, cd clears the entire table. Why not clear just these entries instead of the entire table? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 19:11:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EA2A2C63; Mon, 14 Jan 2013 19:11:12 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay06.ispgateway.de (smtprelay06.ispgateway.de [80.67.31.95]) by mx1.freebsd.org (Postfix) with ESMTP id 99BE514D; Mon, 14 Jan 2013 19:11:12 +0000 (UTC) Received: from [87.79.192.43] (helo=fabiankeil.de) by smtprelay06.ispgateway.de with esmtpsa (SSLv3:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1TupPT-00073k-JZ; Mon, 14 Jan 2013 20:09:27 +0100 Date: Mon, 14 Jan 2013 20:09:14 +0100 From: Fabian Keil To: Andrey Zonov Subject: Re: svn commit: r245415 - stable/9/etc Message-ID: <20130114200914.7f3272d2@fabiankeil.de> In-Reply-To: <50F4464A.7000903@FreeBSD.org> References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/XqYU5TjwEKXTqscxfQ7f+Yl"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 19:11:13 -0000 --Sig_/XqYU5TjwEKXTqscxfQ7f+Yl Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andrey Zonov wrote: > On 1/14/13 3:26 PM, Fabian Keil wrote: > > Andrey Zonov wrote: > >=20 > >> Author: zont > >> Date: Mon Jan 14 10:58:20 2013 > >> New Revision: 245415 > >> URL: http://svnweb.freebsd.org/changeset/base/245415 > >> > >> Log: > >> MFC r244383: > >> - Set memorylocked limit to 64Kb for default login class. > >> This prevents unprivileged users to lock too much memory. > >=20 > > Note that this causes geli segfaults when using sudo: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174831 > >=20 >=20 > The change should not affect stable, because new behavior was turned off > in stable. It's not exactly obvious, but by "this" I was referring to the change in CURRENT. Fabian --Sig_/XqYU5TjwEKXTqscxfQ7f+Yl Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlD0V+MACgkQBYqIVf93VJ2OlwCaAxp2qu38Dh9ujXhWBVsyxeAk YEoAoJG3Meye3yF67gUCXeqIiRoeZc9l =PIyN -----END PGP SIGNATURE----- --Sig_/XqYU5TjwEKXTqscxfQ7f+Yl-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 19:31:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B1782233; Mon, 14 Jan 2013 19:31:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 887FA28F; Mon, 14 Jan 2013 19:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EJVj9s001937; Mon, 14 Jan 2013 19:31:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EJVjMp001935; Mon, 14 Jan 2013 19:31:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201301141931.r0EJVjMp001935@svn.freebsd.org> From: Dimitry Andric Date: Mon, 14 Jan 2013 19:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245429 - in stable/9/sys/dev/ath/ath_hal: . ar9002 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 19:31:45 -0000 Author: dim Date: Mon Jan 14 19:31:44 2013 New Revision: 245429 URL: http://svnweb.freebsd.org/changeset/base/245429 Log: Partial MFC of r234508 (by adrian): "Upgrade" the AR9285 code to support PCI/ART EEPROM on flash. I've just verified that this boots on an Atheros AP91. I haven't verified it with traffic though, so YMMV. (This is a prerequisite for the coming clang 3.2 upgrade.) Modified: stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c ============================================================================== --- stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c Mon Jan 14 18:01:19 2013 (r245428) +++ stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c Mon Jan 14 19:31:44 2013 (r245429) @@ -298,12 +298,12 @@ ath_hal_v4kEepromAttach(struct ath_hal * "%s Error reading Eeprom MAGIC\n", __func__); return HAL_EEREAD; } - } - HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n", - __func__, magic); - if (magic != AR5416_EEPROM_MAGIC) { - HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n"); - return HAL_EEMAGIC; + HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n", + __func__, magic); + if (magic != AR5416_EEPROM_MAGIC) { + HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n"); + return HAL_EEMAGIC; + } } ee = ath_hal_malloc(sizeof(HAL_EEPROM_v4k)); Modified: stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Mon Jan 14 18:01:19 2013 (r245428) +++ stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Mon Jan 14 19:31:44 2013 (r245429) @@ -134,6 +134,18 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s ar5416InitState(AH5416(ah), devid, sc, st, sh, status); + /* + * Use the "local" EEPROM data given to us by the higher layers. + * This is a private copy out of system flash. The Linux ath9k + * commit for the initial AR9130 support mentions MMIO flash + * access is "unreliable." -adrian + */ + if (eepromdata != AH_NULL) { + AH_PRIVATE(ah)->ah_eepromRead = ath_hal_EepromDataRead; + AH_PRIVATE(ah)->ah_eepromWrite = NULL; + ah->ah_eepromdata = eepromdata; + } + /* XXX override with 9285 specific state */ /* override 5416 methods for our needs */ AH5416(ah)->ah_initPLL = ar9280InitPLL; From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 19:33:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7E74D3CE; Mon, 14 Jan 2013 19:33:12 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 666DD2B4; Mon, 14 Jan 2013 19:33:12 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (unknown [64.25.27.130]) by elvis.mu.org (Postfix) with ESMTPSA id 26D281A3CE7; Mon, 14 Jan 2013 11:33:10 -0800 (PST) Message-ID: <50F45D74.7000309@mu.org> Date: Mon, 14 Jan 2013 14:33:08 -0500 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50F41F8C.5030900@freebsd.org> <50F4297F.8050708@FreeBSD.org> <201301141255.46994.jhb@freebsd.org> In-Reply-To: <201301141255.46994.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 14 Jan 2013 19:42:20 +0000 Cc: Adrian Chadd , src-committers@freebsd.org, Andre Oppermann , Alan Cox , "Jayachandran C." , Alexander Motin , Oleksandr Tymoshenko , freebsd-arch@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 19:33:12 -0000 On 1/14/13 12:55 PM, John Baldwin wrote: > On Monday, January 14, 2013 10:51:27 am Alexander Motin wrote: >> As I've actually written, there are two different things: >> ncallout -- number of preallocated callout structures for purposes of >> timeout() calls. That is a legacy API that is probably not very much >> used now, so that value don't need to be too big. But that allocation is >> static and if it will ever be exhausted system will panic. That is why >> it was set quite high. The right way now would be to analyze where that >> API is still used and estimate the really required number. > FYI, I have slowly been working through the tree fixing users of timeout() > to use callout_*() instead. > We would surely be in a bad place had you not taken so much time to fix nearly all those instances. It is very much appreciated. -Alfred From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 19:51:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E4DF4F8A; Mon, 14 Jan 2013 19:51:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CB40E6F6; Mon, 14 Jan 2013 19:51:30 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EJpU2N007759; Mon, 14 Jan 2013 19:51:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EJpSIX007745; Mon, 14 Jan 2013 19:51:28 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201301141951.r0EJpSIX007745@svn.freebsd.org> From: Dimitry Andric Date: Mon, 14 Jan 2013 19:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245431 - in stable/9: . 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 co... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 19:51:31 -0000 Author: dim Date: Mon Jan 14 19:51:26 2013 New Revision: 245431 URL: http://svnweb.freebsd.org/changeset/base/245431 Log: MFC r244628: Upgrade our copy of llvm/clang to 3.2 release. Release notes for llvm: http://llvm.org/releases/3.2/docs/ReleaseNotes.html Release notes for clang: http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html Added: stable/9/contrib/llvm/include/llvm-c/Linker.h - copied unchanged from r239462, head/contrib/llvm/include/llvm-c/Linker.h stable/9/contrib/llvm/include/llvm/ADT/MapVector.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/ADT/MapVector.h stable/9/contrib/llvm/include/llvm/AddressingMode.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/AddressingMode.h stable/9/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h stable/9/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h - copied, changed from r239462, head/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileDataLoader.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Analysis/ProfileDataLoader.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileDataTypes.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Analysis/ProfileDataTypes.h stable/9/contrib/llvm/include/llvm/CodeGen/CommandFlags.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/CodeGen/CommandFlags.h stable/9/contrib/llvm/include/llvm/CodeGen/MachinePostDominators.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/CodeGen/MachinePostDominators.h stable/9/contrib/llvm/include/llvm/CodeGen/RegisterClassInfo.h - copied, changed from r239462, head/contrib/llvm/include/llvm/CodeGen/RegisterClassInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h - copied, changed from r239462, head/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleDAGILP.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGILP.h stable/9/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h stable/9/contrib/llvm/include/llvm/DIBuilder.h - copied, changed from r239462, head/contrib/llvm/include/llvm/DIBuilder.h stable/9/contrib/llvm/include/llvm/DataLayout.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/DataLayout.h stable/9/contrib/llvm/include/llvm/DebugInfo.h - copied, changed from r239462, head/contrib/llvm/include/llvm/DebugInfo.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ObjectBuffer.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/ExecutionEngine/ObjectBuffer.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ObjectImage.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/ExecutionEngine/ObjectImage.h stable/9/contrib/llvm/include/llvm/IRBuilder.h - copied, changed from r239462, head/contrib/llvm/include/llvm/IRBuilder.h stable/9/contrib/llvm/include/llvm/IntrinsicsMips.td - copied, changed from r239462, head/contrib/llvm/include/llvm/IntrinsicsMips.td stable/9/contrib/llvm/include/llvm/IntrinsicsNVVM.td - copied unchanged from r239462, head/contrib/llvm/include/llvm/IntrinsicsNVVM.td stable/9/contrib/llvm/include/llvm/MC/MCFixedLenDisassembler.h - copied unchanged from r239462, head/contrib/llvm/include/llvm/MC/MCFixedLenDisassembler.h stable/9/contrib/llvm/include/llvm/MC/MCSchedule.h - copied, changed from r239462, head/contrib/llvm/include/llvm/MC/MCSchedule.h stable/9/contrib/llvm/include/llvm/MDBuilder.h - copied, changed from r239462, head/contrib/llvm/include/llvm/MDBuilder.h stable/9/contrib/llvm/include/llvm/Object/RelocVisitor.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Object/RelocVisitor.h stable/9/contrib/llvm/include/llvm/Support/FileOutputBuffer.h - copied, changed from r239462, head/contrib/llvm/include/llvm/Support/FileOutputBuffer.h stable/9/contrib/llvm/include/llvm/Support/IntegersSubset.h - copied, changed from r239462, head/contrib/llvm/include/llvm/Support/IntegersSubset.h stable/9/contrib/llvm/include/llvm/Support/IntegersSubsetMapping.h - copied, changed from r239462, head/contrib/llvm/include/llvm/Support/IntegersSubsetMapping.h stable/9/contrib/llvm/include/llvm/Support/LEB128.h - copied, changed from r239462, head/contrib/llvm/include/llvm/Support/LEB128.h stable/9/contrib/llvm/include/llvm/TableGen/StringMatcher.h - copied unchanged from r239462, head/contrib/llvm/include/llvm/TableGen/StringMatcher.h stable/9/contrib/llvm/include/llvm/Target/TargetItinerary.td - copied unchanged from r239462, head/contrib/llvm/include/llvm/Target/TargetItinerary.td stable/9/contrib/llvm/include/llvm/Target/TargetTransformImpl.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Target/TargetTransformImpl.h stable/9/contrib/llvm/include/llvm/TargetTransformInfo.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/TargetTransformInfo.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/BypassSlowDivision.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Transforms/Utils/BypassSlowDivision.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/CodeExtractor.h - copied unchanged from r239462, head/contrib/llvm/include/llvm/Transforms/Utils/CodeExtractor.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/IntegerDivision.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Transforms/Utils/IntegerDivision.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h - copied unchanged from r243830, head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h stable/9/contrib/llvm/include/llvm/TypeBuilder.h - copied unchanged from r239462, head/contrib/llvm/include/llvm/TypeBuilder.h stable/9/contrib/llvm/include/llvm/TypeFinder.h - copied unchanged from r239462, head/contrib/llvm/include/llvm/TypeFinder.h stable/9/contrib/llvm/lib/Analysis/CostModel.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Analysis/CostModel.cpp stable/9/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/ProfileDataLoader.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Analysis/ProfileDataLoader.cpp stable/9/contrib/llvm/lib/Analysis/ProfileDataLoaderPass.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Analysis/ProfileDataLoaderPass.cpp stable/9/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp - copied, changed from r239462, head/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp stable/9/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp - copied, changed from r239462, head/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp stable/9/contrib/llvm/lib/CodeGen/LiveRegMatrix.h - copied, changed from r239462, head/contrib/llvm/lib/CodeGen/LiveRegMatrix.h stable/9/contrib/llvm/lib/CodeGen/MachinePostDominators.cpp - copied unchanged from r243830, head/contrib/llvm/lib/CodeGen/MachinePostDominators.cpp stable/9/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp - copied, changed from r239462, head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp stable/9/contrib/llvm/lib/CodeGen/MachineTraceMetrics.h - copied, changed from r239462, head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.h stable/9/contrib/llvm/lib/CodeGen/RegisterPressure.cpp - copied, changed from r239462, head/contrib/llvm/lib/CodeGen/RegisterPressure.cpp stable/9/contrib/llvm/lib/CodeGen/StackColoring.cpp - copied unchanged from r243830, head/contrib/llvm/lib/CodeGen/StackColoring.cpp stable/9/contrib/llvm/lib/CodeGen/TargetSchedule.cpp - copied unchanged from r243830, head/contrib/llvm/lib/CodeGen/TargetSchedule.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugRangeList.cpp - copied unchanged from r243830, head/contrib/llvm/lib/DebugInfo/DWARFDebugRangeList.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugRangeList.h - copied unchanged from r243830, head/contrib/llvm/lib/DebugInfo/DWARFDebugRangeList.h stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventsWrapper.h - copied unchanged from r243830, head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventsWrapper.h stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/ittnotify_config.h - copied unchanged from r243830, head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/ittnotify_config.h stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/ittnotify_types.h - copied unchanged from r243830, head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/ittnotify_types.h stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c - copied unchanged from r243830, head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.h - copied unchanged from r243830, head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h - copied unchanged from r243830, head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h stable/9/contrib/llvm/lib/MC/MCRegisterInfo.cpp - copied, changed from r239462, head/contrib/llvm/lib/MC/MCRegisterInfo.cpp stable/9/contrib/llvm/lib/Support/FileOutputBuffer.cpp - copied unchanged from r239462, head/contrib/llvm/lib/Support/FileOutputBuffer.cpp stable/9/contrib/llvm/lib/TableGen/StringMatcher.cpp - copied unchanged from r239462, head/contrib/llvm/lib/TableGen/StringMatcher.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleSwift.td - copied unchanged from r243830, head/contrib/llvm/lib/Target/ARM/ARMScheduleSwift.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV5.td - copied unchanged from r239462, head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV5.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV5.td - copied unchanged from r239462, head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV5.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMCInst.h - copied unchanged from r239462, head/contrib/llvm/lib/Target/Hexagon/HexagonMCInst.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h - copied unchanged from r243830, head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h - copied unchanged from r243830, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h stable/9/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.h - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.h stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrFormats.td - copied unchanged from r239462, head/contrib/llvm/lib/Target/Mips/Mips16InstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h stable/9/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.h - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsDSPInstrFormats.td - copied unchanged from r243830, head/contrib/llvm/lib/Target/Mips/MipsDSPInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td - copied unchanged from r243830, head/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h - copied unchanged from r239462, head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.h - copied, changed from r239462, head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.h stable/9/contrib/llvm/lib/Target/NVPTX/ - copied from r239462, head/contrib/llvm/lib/Target/NVPTX/ stable/9/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp - copied unchanged from r239462, head/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td - copied unchanged from r243830, head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleE5500.td - copied unchanged from r243830, head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE5500.td stable/9/contrib/llvm/lib/Target/TargetTransformImpl.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Target/TargetTransformImpl.cpp stable/9/contrib/llvm/lib/Target/X86/X86InstrTSX.td - copied unchanged from r243830, head/contrib/llvm/lib/Target/X86/X86InstrTSX.td stable/9/contrib/llvm/lib/Transforms/IPO/BarrierNoopPass.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/IPO/BarrierNoopPass.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/BlackList.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/Instrumentation/BlackList.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/BlackList.h - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/Instrumentation/BlackList.h stable/9/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp - copied, changed from r239462, head/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SROA.cpp - copied, changed from r243830, head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp stable/9/contrib/llvm/lib/Transforms/Utils/IntegerDivision.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/Utils/IntegerDivision.cpp stable/9/contrib/llvm/lib/Transforms/Utils/MetaRenamer.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/Utils/MetaRenamer.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp - copied unchanged from r243830, head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp stable/9/contrib/llvm/lib/VMCore/AttributesImpl.h - copied unchanged from r243830, head/contrib/llvm/lib/VMCore/AttributesImpl.h stable/9/contrib/llvm/lib/VMCore/DIBuilder.cpp - copied, changed from r239462, head/contrib/llvm/lib/VMCore/DIBuilder.cpp stable/9/contrib/llvm/lib/VMCore/DataLayout.cpp - copied unchanged from r243830, head/contrib/llvm/lib/VMCore/DataLayout.cpp stable/9/contrib/llvm/lib/VMCore/DebugInfo.cpp - copied, changed from r239462, head/contrib/llvm/lib/VMCore/DebugInfo.cpp stable/9/contrib/llvm/lib/VMCore/TargetTransformInfo.cpp - copied unchanged from r243830, head/contrib/llvm/lib/VMCore/TargetTransformInfo.cpp stable/9/contrib/llvm/lib/VMCore/TypeFinder.cpp - copied unchanged from r239462, head/contrib/llvm/lib/VMCore/TypeFinder.cpp stable/9/contrib/llvm/tools/clang/include/clang-c/CXCompilationDatabase.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang-c/CXCompilationDatabase.h stable/9/contrib/llvm/tools/clang/include/clang-c/CXString.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang-c/CXString.h stable/9/contrib/llvm/tools/clang/include/clang-c/Platform.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang-c/Platform.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Comment.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/AST/Comment.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentBriefParser.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/AST/CommentBriefParser.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentCommands.td - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/AST/CommentCommands.td stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentDiagnostic.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang/AST/CommentDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentHTMLTags.td - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/AST/CommentHTMLTags.td stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentLexer.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/AST/CommentLexer.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentParser.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/AST/CommentParser.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CommentVisitor.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang/AST/CommentVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RawCommentList.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/AST/RawCommentList.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ - copied from r239462, head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTTypeTraits.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTTypeTraits.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsMips.def - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsMips.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/CommentNodes.td - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang/Basic/CommentNodes.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommentKinds.td - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommentKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PPMutationListener.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Lex/PPMutationListener.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Core/ - copied from r243830, head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/ stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/ - copied from r243830, head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/ stable/9/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteOptions.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/FileMatchTrie.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Tooling/FileMatchTrie.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/JSONCompilationDatabase.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/include/clang/Tooling/JSONCompilationDatabase.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h - copied, changed from r239462, head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/RefactoringCallbacks.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/include/clang/Tooling/RefactoringCallbacks.h stable/9/contrib/llvm/tools/clang/lib/AST/Comment.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/Comment.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentBriefParser.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/CommentBriefParser.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentCommandTraits.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/CommentCommandTraits.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentDumper.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/CommentDumper.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentParser.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/CommentParser.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RawCommentList.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/AST/RawCommentList.cpp stable/9/contrib/llvm/tools/clang/lib/ASTMatchers/ - copied from r239462, head/contrib/llvm/tools/clang/lib/ASTMatchers/ stable/9/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.h stable/9/contrib/llvm/tools/clang/lib/Analysis/ObjCNoReturn.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Analysis/ObjCNoReturn.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/ConvertUTFWrapper.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/Basic/ConvertUTFWrapper.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/ObjCRuntime.cpp - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/Basic/ObjCRuntime.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.h stable/9/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h stable/9/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h stable/9/contrib/llvm/tools/clang/lib/Headers/ammintrin.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/Headers/ammintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/xopintrin.h - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/Headers/xopintrin.h stable/9/contrib/llvm/tools/clang/lib/Rewrite/Core/ - copied from r243830, head/contrib/llvm/tools/clang/lib/Rewrite/Core/ stable/9/contrib/llvm/tools/clang/lib/Rewrite/Frontend/ - copied from r243830, head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/ stable/9/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/APSIntType.cpp - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/APSIntType.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/FileMatchTrie.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Tooling/FileMatchTrie.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp - copied, changed from r239462, head/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/RefactoringCallbacks.cpp - copied unchanged from r239462, head/contrib/llvm/tools/clang/lib/Tooling/RefactoringCallbacks.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp - copied unchanged from r243830, head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h - copied, changed from r239462, head/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h stable/9/contrib/llvm/tools/lli/RecordingMemoryManager.cpp - copied unchanged from r243830, head/contrib/llvm/tools/lli/RecordingMemoryManager.cpp stable/9/contrib/llvm/tools/lli/RecordingMemoryManager.h - copied unchanged from r243830, head/contrib/llvm/tools/lli/RecordingMemoryManager.h stable/9/contrib/llvm/tools/lli/RemoteTarget.cpp - copied unchanged from r243830, head/contrib/llvm/tools/lli/RemoteTarget.cpp stable/9/contrib/llvm/tools/lli/RemoteTarget.h - copied unchanged from r243830, head/contrib/llvm/tools/lli/RemoteTarget.h stable/9/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp - copied unchanged from r243830, head/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp - copied, changed from r239462, head/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenSchedule.h - copied, changed from r239462, head/contrib/llvm/utils/TableGen/CodeGenSchedule.h stable/9/contrib/llvm/utils/TableGen/TableGenBackends.h - copied, changed from r239462, head/contrib/llvm/utils/TableGen/TableGenBackends.h stable/9/lib/clang/include/MipsGenAsmMatcher.inc - copied unchanged from r243830, head/lib/clang/include/MipsGenAsmMatcher.inc stable/9/lib/clang/include/MipsGenDisassemblerTables.inc - copied unchanged from r239462, head/lib/clang/include/MipsGenDisassemblerTables.inc stable/9/lib/clang/include/MipsGenEDInfo.inc - copied unchanged from r239462, head/lib/clang/include/MipsGenEDInfo.inc stable/9/lib/clang/include/MipsGenMCPseudoLowering.inc - copied unchanged from r243830, head/lib/clang/include/MipsGenMCPseudoLowering.inc stable/9/lib/clang/include/clang/AST/CommentCommandInfo.inc - copied unchanged from r243830, head/lib/clang/include/clang/AST/CommentCommandInfo.inc stable/9/lib/clang/include/clang/AST/CommentHTMLTags.inc - copied unchanged from r243830, head/lib/clang/include/clang/AST/CommentHTMLTags.inc stable/9/lib/clang/include/clang/AST/CommentHTMLTagsProperties.inc - copied unchanged from r243830, head/lib/clang/include/clang/AST/CommentHTMLTagsProperties.inc stable/9/lib/clang/include/clang/AST/CommentNodes.inc - copied unchanged from r239462, head/lib/clang/include/clang/AST/CommentNodes.inc stable/9/lib/clang/include/clang/Basic/DiagnosticCommentKinds.inc - copied unchanged from r239462, head/lib/clang/include/clang/Basic/DiagnosticCommentKinds.inc stable/9/lib/clang/libclangrewritecore/ - copied from r243830, head/lib/clang/libclangrewritecore/ stable/9/lib/clang/libclangrewritefrontend/ - copied from r243830, head/lib/clang/libclangrewritefrontend/ stable/9/lib/clang/libllvmmipsdisassembler/ - copied from r239462, head/lib/clang/libllvmmipsdisassembler/ Deleted: stable/9/contrib/llvm/include/llvm/ADT/Trie.h stable/9/contrib/llvm/include/llvm/Analysis/DIBuilder.h stable/9/contrib/llvm/include/llvm/Analysis/DebugInfo.h stable/9/contrib/llvm/include/llvm/Analysis/LoopDependenceAnalysis.h stable/9/contrib/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/IntelJITEventsWrapper.h stable/9/contrib/llvm/include/llvm/IntrinsicsPTX.td stable/9/contrib/llvm/include/llvm/Support/IRBuilder.h stable/9/contrib/llvm/include/llvm/Support/MDBuilder.h stable/9/contrib/llvm/include/llvm/Support/TypeBuilder.h stable/9/contrib/llvm/include/llvm/TableGen/TableGenAction.h stable/9/contrib/llvm/include/llvm/Target/TargetData.h stable/9/contrib/llvm/include/llvm/Target/TargetELFWriterInfo.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/FunctionUtils.h stable/9/contrib/llvm/lib/Analysis/DIBuilder.cpp stable/9/contrib/llvm/lib/Analysis/DebugInfo.cpp stable/9/contrib/llvm/lib/Analysis/LoopDependenceAnalysis.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterClassInfo.h stable/9/contrib/llvm/lib/CodeGen/RenderMachineFunction.cpp stable/9/contrib/llvm/lib/CodeGen/RenderMachineFunction.h stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImage.h stable/9/contrib/llvm/lib/TableGen/TableGenAction.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMELFWriterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMELFWriterInfo.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeELFWriterInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsExpandPseudo.cpp stable/9/contrib/llvm/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp stable/9/contrib/llvm/lib/Target/PTX/InstPrinter/PTXInstPrinter.h stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.h stable/9/contrib/llvm/lib/Target/PTX/PTX.h stable/9/contrib/llvm/lib/Target/PTX/PTX.td stable/9/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.h stable/9/contrib/llvm/lib/Target/PTX/PTXFPRoundingModePass.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXFrameLowering.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXFrameLowering.h stable/9/contrib/llvm/lib/Target/PTX/PTXISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXISelLowering.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXISelLowering.h stable/9/contrib/llvm/lib/Target/PTX/PTXInstrFormats.td stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.h stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.td stable/9/contrib/llvm/lib/Target/PTX/PTXInstrLoadStore.td stable/9/contrib/llvm/lib/Target/PTX/PTXIntrinsicInstrInfo.td stable/9/contrib/llvm/lib/Target/PTX/PTXMCAsmStreamer.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXMCInstLower.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXMFInfoExtract.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/PTX/PTXParamManager.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXParamManager.h stable/9/contrib/llvm/lib/Target/PTX/PTXRegAlloc.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.h stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.td stable/9/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.h stable/9/contrib/llvm/lib/Target/PTX/PTXSubtarget.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXSubtarget.h stable/9/contrib/llvm/lib/Target/PTX/PTXTargetMachine.cpp stable/9/contrib/llvm/lib/Target/PTX/PTXTargetMachine.h stable/9/contrib/llvm/lib/Target/PTX/TargetInfo/PTXTargetInfo.cpp stable/9/contrib/llvm/lib/Target/TargetData.cpp stable/9/contrib/llvm/lib/Target/TargetELFWriterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86ELFWriterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86ELFWriterInfo.h stable/9/contrib/llvm/lib/Target/X86/X86MCInstLower.h stable/9/contrib/llvm/lib/Transforms/Instrumentation/FunctionBlackList.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/FunctionBlackList.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPTX.def stable/9/contrib/llvm/tools/clang/include/clang/Driver/ObjCRuntime.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/Analyses.def stable/9/contrib/llvm/tools/clang/include/clang/Frontend/AnalyzerOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/ASTConsumers.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/DeltaTree.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/FixItRewriter.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/FrontendActions.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/HTMLRewrite.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/RewriteRope.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriter.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriters.h stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/TokenRewriter.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/DereferenceChecker.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h stable/9/contrib/llvm/tools/clang/lib/Driver/CC1Options.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/DeltaTree.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/FixItRewriter.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/FrontendActions.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/HTMLPrint.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteModernObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteTest.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp stable/9/contrib/llvm/tools/clang/lib/Rewrite/TokenRewriter.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AdjustedReturnValueChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ObjCMessage.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangASTNodesEmitter.h stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.h stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.h stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangSACheckersEmitter.h stable/9/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.h stable/9/contrib/llvm/tools/clang/utils/TableGen/OptParserEmitter.h stable/9/contrib/llvm/tools/llvm-ld/ stable/9/contrib/llvm/tools/llvm-stub/llvm-stub.c stable/9/contrib/llvm/utils/TableGen/AsmMatcherEmitter.h stable/9/contrib/llvm/utils/TableGen/AsmWriterEmitter.h stable/9/contrib/llvm/utils/TableGen/CallingConvEmitter.h stable/9/contrib/llvm/utils/TableGen/CodeEmitterGen.h stable/9/contrib/llvm/utils/TableGen/DAGISelEmitter.h stable/9/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.h stable/9/contrib/llvm/utils/TableGen/DisassemblerEmitter.h stable/9/contrib/llvm/utils/TableGen/EDEmitter.h stable/9/contrib/llvm/utils/TableGen/FastISelEmitter.h stable/9/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.h stable/9/contrib/llvm/utils/TableGen/InstrInfoEmitter.h stable/9/contrib/llvm/utils/TableGen/IntrinsicEmitter.h stable/9/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.h stable/9/contrib/llvm/utils/TableGen/RegisterInfoEmitter.h stable/9/contrib/llvm/utils/TableGen/StringMatcher.cpp stable/9/contrib/llvm/utils/TableGen/StringMatcher.h stable/9/contrib/llvm/utils/TableGen/SubtargetEmitter.h stable/9/lib/clang/include/clang/Driver/CC1Options.inc stable/9/lib/clang/libclangrewrite/ stable/9/usr.bin/clang/llvm-ld/ stable/9/usr.bin/clang/llvm-stub/ Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/contrib/llvm/include/llvm-c/Core.h stable/9/contrib/llvm/include/llvm-c/Disassembler.h stable/9/contrib/llvm/include/llvm-c/Target.h stable/9/contrib/llvm/include/llvm-c/TargetMachine.h stable/9/contrib/llvm/include/llvm-c/Transforms/Vectorize.h stable/9/contrib/llvm/include/llvm/ADT/APFloat.h stable/9/contrib/llvm/include/llvm/ADT/APInt.h stable/9/contrib/llvm/include/llvm/ADT/APSInt.h stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h stable/9/contrib/llvm/include/llvm/ADT/BitVector.h stable/9/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h stable/9/contrib/llvm/include/llvm/ADT/DeltaAlgorithm.h stable/9/contrib/llvm/include/llvm/ADT/DenseMap.h stable/9/contrib/llvm/include/llvm/ADT/DenseMapInfo.h stable/9/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h stable/9/contrib/llvm/include/llvm/ADT/EquivalenceClasses.h stable/9/contrib/llvm/include/llvm/ADT/FoldingSet.h stable/9/contrib/llvm/include/llvm/ADT/Hashing.h stable/9/contrib/llvm/include/llvm/ADT/ImmutableList.h stable/9/contrib/llvm/include/llvm/ADT/ImmutableMap.h stable/9/contrib/llvm/include/llvm/ADT/ImmutableSet.h stable/9/contrib/llvm/include/llvm/ADT/IndexedMap.h stable/9/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h stable/9/contrib/llvm/include/llvm/ADT/Optional.h stable/9/contrib/llvm/include/llvm/ADT/OwningPtr.h stable/9/contrib/llvm/include/llvm/ADT/PackedVector.h stable/9/contrib/llvm/include/llvm/ADT/PointerIntPair.h stable/9/contrib/llvm/include/llvm/ADT/PointerUnion.h stable/9/contrib/llvm/include/llvm/ADT/PostOrderIterator.h stable/9/contrib/llvm/include/llvm/ADT/STLExtras.h stable/9/contrib/llvm/include/llvm/ADT/ScopedHashTable.h stable/9/contrib/llvm/include/llvm/ADT/SetVector.h stable/9/contrib/llvm/include/llvm/ADT/SmallBitVector.h stable/9/contrib/llvm/include/llvm/ADT/SmallPtrSet.h stable/9/contrib/llvm/include/llvm/ADT/SmallString.h stable/9/contrib/llvm/include/llvm/ADT/SmallVector.h stable/9/contrib/llvm/include/llvm/ADT/SparseBitVector.h stable/9/contrib/llvm/include/llvm/ADT/SparseSet.h stable/9/contrib/llvm/include/llvm/ADT/StringExtras.h stable/9/contrib/llvm/include/llvm/ADT/StringRef.h stable/9/contrib/llvm/include/llvm/ADT/StringSet.h stable/9/contrib/llvm/include/llvm/ADT/StringSwitch.h stable/9/contrib/llvm/include/llvm/ADT/TinyPtrVector.h stable/9/contrib/llvm/include/llvm/ADT/Triple.h stable/9/contrib/llvm/include/llvm/ADT/Twine.h stable/9/contrib/llvm/include/llvm/ADT/ValueMap.h stable/9/contrib/llvm/include/llvm/ADT/VariadicFunction.h stable/9/contrib/llvm/include/llvm/ADT/ilist.h stable/9/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h stable/9/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequencyImpl.h stable/9/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h stable/9/contrib/llvm/include/llvm/Analysis/CallGraph.h stable/9/contrib/llvm/include/llvm/Analysis/CaptureTracking.h stable/9/contrib/llvm/include/llvm/Analysis/CodeMetrics.h stable/9/contrib/llvm/include/llvm/Analysis/ConstantFolding.h stable/9/contrib/llvm/include/llvm/Analysis/Dominators.h stable/9/contrib/llvm/include/llvm/Analysis/IVUsers.h stable/9/contrib/llvm/include/llvm/Analysis/InlineCost.h stable/9/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h stable/9/contrib/llvm/include/llvm/Analysis/IntervalPartition.h stable/9/contrib/llvm/include/llvm/Analysis/LazyValueInfo.h stable/9/contrib/llvm/include/llvm/Analysis/Loads.h stable/9/contrib/llvm/include/llvm/Analysis/LoopInfo.h stable/9/contrib/llvm/include/llvm/Analysis/LoopIterator.h stable/9/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h stable/9/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h stable/9/contrib/llvm/include/llvm/Analysis/PHITransAddr.h stable/9/contrib/llvm/include/llvm/Analysis/Passes.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileInfoLoader.h stable/9/contrib/llvm/include/llvm/Analysis/ProfileInfoTypes.h stable/9/contrib/llvm/include/llvm/Analysis/RegionInfo.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h stable/9/contrib/llvm/include/llvm/Analysis/SparsePropagation.h stable/9/contrib/llvm/include/llvm/Analysis/ValueTracking.h stable/9/contrib/llvm/include/llvm/Argument.h stable/9/contrib/llvm/include/llvm/Attributes.h stable/9/contrib/llvm/include/llvm/BasicBlock.h stable/9/contrib/llvm/include/llvm/Bitcode/Archive.h stable/9/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h stable/9/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h stable/9/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h stable/9/contrib/llvm/include/llvm/Bitcode/ReaderWriter.h stable/9/contrib/llvm/include/llvm/CallingConv.h stable/9/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h stable/9/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h stable/9/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h stable/9/contrib/llvm/include/llvm/CodeGen/EdgeBundles.h stable/9/contrib/llvm/include/llvm/CodeGen/FastISel.h stable/9/contrib/llvm/include/llvm/CodeGen/GCMetadata.h stable/9/contrib/llvm/include/llvm/CodeGen/GCMetadataPrinter.h stable/9/contrib/llvm/include/llvm/CodeGen/GCStrategy.h stable/9/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h stable/9/contrib/llvm/include/llvm/CodeGen/IntrinsicLowering.h stable/9/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveInterval.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h stable/9/contrib/llvm/include/llvm/CodeGen/LiveVariables.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineFunction.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstr.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstrBundle.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineJumpTableInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineLoopInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineMemOperand.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineOperand.h stable/9/contrib/llvm/include/llvm/CodeGen/MachinePassRegistry.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineSSAUpdater.h stable/9/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h stable/9/contrib/llvm/include/llvm/CodeGen/PBQP/HeuristicBase.h stable/9/contrib/llvm/include/llvm/CodeGen/Passes.h stable/9/contrib/llvm/include/llvm/CodeGen/PseudoSourceValue.h stable/9/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h stable/9/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h stable/9/contrib/llvm/include/llvm/CodeGen/ScheduleHazardRecognizer.h stable/9/contrib/llvm/include/llvm/CodeGen/SchedulerRegistry.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h stable/9/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h stable/9/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h stable/9/contrib/llvm/include/llvm/CodeGen/ValueTypes.h stable/9/contrib/llvm/include/llvm/CodeGen/ValueTypes.td stable/9/contrib/llvm/include/llvm/Constant.h stable/9/contrib/llvm/include/llvm/Constants.h stable/9/contrib/llvm/include/llvm/DebugInfo/DIContext.h stable/9/contrib/llvm/include/llvm/DefaultPasses.h stable/9/contrib/llvm/include/llvm/DerivedTypes.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/Interpreter.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/JIT.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/JITEventListener.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/JITMemoryManager.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/MCJIT.h stable/9/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h stable/9/contrib/llvm/include/llvm/Function.h stable/9/contrib/llvm/include/llvm/GlobalAlias.h stable/9/contrib/llvm/include/llvm/GlobalValue.h stable/9/contrib/llvm/include/llvm/GlobalVariable.h stable/9/contrib/llvm/include/llvm/InitializePasses.h stable/9/contrib/llvm/include/llvm/InlineAsm.h stable/9/contrib/llvm/include/llvm/InstrTypes.h stable/9/contrib/llvm/include/llvm/Instruction.h stable/9/contrib/llvm/include/llvm/Instructions.h stable/9/contrib/llvm/include/llvm/IntrinsicInst.h stable/9/contrib/llvm/include/llvm/Intrinsics.h stable/9/contrib/llvm/include/llvm/Intrinsics.td stable/9/contrib/llvm/include/llvm/IntrinsicsARM.td stable/9/contrib/llvm/include/llvm/IntrinsicsHexagon.td stable/9/contrib/llvm/include/llvm/IntrinsicsX86.td stable/9/contrib/llvm/include/llvm/LLVMContext.h stable/9/contrib/llvm/include/llvm/LinkAllPasses.h stable/9/contrib/llvm/include/llvm/MC/EDInstInfo.h stable/9/contrib/llvm/include/llvm/MC/MCAsmBackend.h stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h stable/9/contrib/llvm/include/llvm/MC/MCAssembler.h stable/9/contrib/llvm/include/llvm/MC/MCCodeEmitter.h stable/9/contrib/llvm/include/llvm/MC/MCContext.h stable/9/contrib/llvm/include/llvm/MC/MCDirectives.h stable/9/contrib/llvm/include/llvm/MC/MCDisassembler.h stable/9/contrib/llvm/include/llvm/MC/MCDwarf.h stable/9/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MCExpr.h stable/9/contrib/llvm/include/llvm/MC/MCFixupKindInfo.h stable/9/contrib/llvm/include/llvm/MC/MCInst.h stable/9/contrib/llvm/include/llvm/MC/MCInstPrinter.h stable/9/contrib/llvm/include/llvm/MC/MCInstrDesc.h stable/9/contrib/llvm/include/llvm/MC/MCInstrItineraries.h stable/9/contrib/llvm/include/llvm/MC/MCLabel.h stable/9/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h stable/9/contrib/llvm/include/llvm/MC/MCObjectStreamer.h stable/9/contrib/llvm/include/llvm/MC/MCObjectWriter.h stable/9/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h stable/9/contrib/llvm/include/llvm/MC/MCParser/MCParsedAsmOperand.h stable/9/contrib/llvm/include/llvm/MC/MCRegisterInfo.h stable/9/contrib/llvm/include/llvm/MC/MCSection.h stable/9/contrib/llvm/include/llvm/MC/MCSectionCOFF.h stable/9/contrib/llvm/include/llvm/MC/MCSectionELF.h stable/9/contrib/llvm/include/llvm/MC/MCSectionMachO.h stable/9/contrib/llvm/include/llvm/MC/MCStreamer.h stable/9/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h stable/9/contrib/llvm/include/llvm/MC/MCSymbol.h stable/9/contrib/llvm/include/llvm/MC/MCTargetAsmLexer.h stable/9/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h stable/9/contrib/llvm/include/llvm/MC/MCValue.h stable/9/contrib/llvm/include/llvm/MC/MachineLocation.h stable/9/contrib/llvm/include/llvm/MC/SubtargetFeature.h stable/9/contrib/llvm/include/llvm/Metadata.h stable/9/contrib/llvm/include/llvm/Module.h stable/9/contrib/llvm/include/llvm/Object/Archive.h stable/9/contrib/llvm/include/llvm/Object/Binary.h stable/9/contrib/llvm/include/llvm/Object/COFF.h stable/9/contrib/llvm/include/llvm/Object/ELF.h stable/9/contrib/llvm/include/llvm/Object/MachO.h stable/9/contrib/llvm/include/llvm/Object/MachOFormat.h stable/9/contrib/llvm/include/llvm/Object/MachOObject.h stable/9/contrib/llvm/include/llvm/Object/ObjectFile.h stable/9/contrib/llvm/include/llvm/Operator.h stable/9/contrib/llvm/include/llvm/Pass.h stable/9/contrib/llvm/include/llvm/PassAnalysisSupport.h stable/9/contrib/llvm/include/llvm/PassManagers.h stable/9/contrib/llvm/include/llvm/PassSupport.h stable/9/contrib/llvm/include/llvm/Support/AlignOf.h stable/9/contrib/llvm/include/llvm/Support/Allocator.h stable/9/contrib/llvm/include/llvm/Support/COFF.h stable/9/contrib/llvm/include/llvm/Support/CallSite.h stable/9/contrib/llvm/include/llvm/Support/Casting.h stable/9/contrib/llvm/include/llvm/Support/CommandLine.h stable/9/contrib/llvm/include/llvm/Support/Compiler.h stable/9/contrib/llvm/include/llvm/Support/ConstantRange.h stable/9/contrib/llvm/include/llvm/Support/DataExtractor.h stable/9/contrib/llvm/include/llvm/Support/DataTypes.h.in stable/9/contrib/llvm/include/llvm/Support/Debug.h stable/9/contrib/llvm/include/llvm/Support/DebugLoc.h stable/9/contrib/llvm/include/llvm/Support/ELF.h stable/9/contrib/llvm/include/llvm/Support/Endian.h stable/9/contrib/llvm/include/llvm/Support/FileSystem.h stable/9/contrib/llvm/include/llvm/Support/Format.h stable/9/contrib/llvm/include/llvm/Support/FormattedStream.h stable/9/contrib/llvm/include/llvm/Support/GCOV.h stable/9/contrib/llvm/include/llvm/Support/GraphWriter.h stable/9/contrib/llvm/include/llvm/Support/InstVisitor.h stable/9/contrib/llvm/include/llvm/Support/LockFileManager.h stable/9/contrib/llvm/include/llvm/Support/MachO.h stable/9/contrib/llvm/include/llvm/Support/MathExtras.h stable/9/contrib/llvm/include/llvm/Support/Memory.h stable/9/contrib/llvm/include/llvm/Support/MemoryBuffer.h stable/9/contrib/llvm/include/llvm/Support/Mutex.h stable/9/contrib/llvm/include/llvm/Support/MutexGuard.h stable/9/contrib/llvm/include/llvm/Support/NoFolder.h stable/9/contrib/llvm/include/llvm/Support/PathV1.h stable/9/contrib/llvm/include/llvm/Support/PathV2.h stable/9/contrib/llvm/include/llvm/Support/PrettyStackTrace.h stable/9/contrib/llvm/include/llvm/Support/Process.h stable/9/contrib/llvm/include/llvm/Support/Program.h stable/9/contrib/llvm/include/llvm/Support/RWMutex.h stable/9/contrib/llvm/include/llvm/Support/Regex.h stable/9/contrib/llvm/include/llvm/Support/Registry.h stable/9/contrib/llvm/include/llvm/Support/SMLoc.h stable/9/contrib/llvm/include/llvm/Support/SourceMgr.h stable/9/contrib/llvm/include/llvm/Support/StreamableMemoryObject.h stable/9/contrib/llvm/include/llvm/Support/TargetFolder.h stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h stable/9/contrib/llvm/include/llvm/Support/ThreadLocal.h stable/9/contrib/llvm/include/llvm/Support/Threading.h stable/9/contrib/llvm/include/llvm/Support/TimeValue.h stable/9/contrib/llvm/include/llvm/Support/Timer.h stable/9/contrib/llvm/include/llvm/Support/ValueHandle.h stable/9/contrib/llvm/include/llvm/Support/YAMLParser.h stable/9/contrib/llvm/include/llvm/Support/circular_raw_ostream.h stable/9/contrib/llvm/include/llvm/Support/raw_os_ostream.h stable/9/contrib/llvm/include/llvm/Support/raw_ostream.h stable/9/contrib/llvm/include/llvm/Support/system_error.h stable/9/contrib/llvm/include/llvm/Support/type_traits.h stable/9/contrib/llvm/include/llvm/SymbolTableListTraits.h stable/9/contrib/llvm/include/llvm/TableGen/Error.h stable/9/contrib/llvm/include/llvm/TableGen/Main.h stable/9/contrib/llvm/include/llvm/TableGen/Record.h stable/9/contrib/llvm/include/llvm/TableGen/TableGenBackend.h stable/9/contrib/llvm/include/llvm/Target/Mangler.h stable/9/contrib/llvm/include/llvm/Target/Target.td stable/9/contrib/llvm/include/llvm/Target/TargetCallingConv.h stable/9/contrib/llvm/include/llvm/Target/TargetInstrInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetIntrinsicInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetLowering.h stable/9/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h stable/9/contrib/llvm/include/llvm/Target/TargetMachine.h stable/9/contrib/llvm/include/llvm/Target/TargetOpcodes.h stable/9/contrib/llvm/include/llvm/Target/TargetOptions.h stable/9/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetSchedule.td stable/9/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td stable/9/contrib/llvm/include/llvm/Target/TargetSelectionDAGInfo.h stable/9/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h stable/9/contrib/llvm/include/llvm/Transforms/IPO.h stable/9/contrib/llvm/include/llvm/Transforms/IPO/InlinerPass.h stable/9/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h stable/9/contrib/llvm/include/llvm/Transforms/Instrumentation.h stable/9/contrib/llvm/include/llvm/Transforms/Scalar.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/AddrModeMatcher.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/Local.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h stable/9/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h stable/9/contrib/llvm/include/llvm/Transforms/Vectorize.h stable/9/contrib/llvm/include/llvm/Type.h stable/9/contrib/llvm/include/llvm/Use.h stable/9/contrib/llvm/include/llvm/User.h stable/9/contrib/llvm/include/llvm/Value.h stable/9/contrib/llvm/lib/Analysis/AliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/AliasSetTracker.cpp stable/9/contrib/llvm/lib/Analysis/Analysis.cpp stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp stable/9/contrib/llvm/lib/Analysis/CaptureTracking.cpp stable/9/contrib/llvm/lib/Analysis/CodeMetrics.cpp stable/9/contrib/llvm/lib/Analysis/ConstantFolding.cpp stable/9/contrib/llvm/lib/Analysis/DbgInfoPrinter.cpp stable/9/contrib/llvm/lib/Analysis/DominanceFrontier.cpp stable/9/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp stable/9/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp stable/9/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp stable/9/contrib/llvm/lib/Analysis/IVUsers.cpp stable/9/contrib/llvm/lib/Analysis/InlineCost.cpp stable/9/contrib/llvm/lib/Analysis/InstructionSimplify.cpp stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp stable/9/contrib/llvm/lib/Analysis/Lint.cpp stable/9/contrib/llvm/lib/Analysis/Loads.cpp stable/9/contrib/llvm/lib/Analysis/LoopInfo.cpp stable/9/contrib/llvm/lib/Analysis/LoopPass.cpp stable/9/contrib/llvm/lib/Analysis/MemDepPrinter.cpp stable/9/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp stable/9/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp stable/9/contrib/llvm/lib/Analysis/NoAliasAnalysis.cpp stable/9/contrib/llvm/lib/Analysis/PHITransAddr.cpp stable/9/contrib/llvm/lib/Analysis/PathNumbering.cpp stable/9/contrib/llvm/lib/Analysis/ProfileEstimatorPass.cpp stable/9/contrib/llvm/lib/Analysis/ProfileInfo.cpp stable/9/contrib/llvm/lib/Analysis/ProfileInfoLoader.cpp stable/9/contrib/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp stable/9/contrib/llvm/lib/Analysis/RegionInfo.cpp stable/9/contrib/llvm/lib/Analysis/RegionPass.cpp stable/9/contrib/llvm/lib/Analysis/RegionPrinter.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/9/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp stable/9/contrib/llvm/lib/Analysis/Trace.cpp stable/9/contrib/llvm/lib/Analysis/ValueTracking.cpp stable/9/contrib/llvm/lib/Archive/ArchiveInternals.h stable/9/contrib/llvm/lib/Archive/ArchiveReader.cpp stable/9/contrib/llvm/lib/Archive/ArchiveWriter.cpp stable/9/contrib/llvm/lib/AsmParser/LLLexer.cpp stable/9/contrib/llvm/lib/AsmParser/LLParser.cpp stable/9/contrib/llvm/lib/AsmParser/LLParser.h stable/9/contrib/llvm/lib/AsmParser/LLToken.h stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h stable/9/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp stable/9/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h stable/9/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp stable/9/contrib/llvm/lib/CodeGen/AllocationOrder.cpp stable/9/contrib/llvm/lib/CodeGen/Analysis.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp stable/9/contrib/llvm/lib/CodeGen/BranchFolding.cpp stable/9/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp stable/9/contrib/llvm/lib/CodeGen/CallingConvLower.cpp stable/9/contrib/llvm/lib/CodeGen/CodeGen.cpp stable/9/contrib/llvm/lib/CodeGen/CodePlacementOpt.cpp stable/9/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp stable/9/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h stable/9/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp stable/9/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp stable/9/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp stable/9/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp stable/9/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp stable/9/contrib/llvm/lib/CodeGen/GCStrategy.cpp stable/9/contrib/llvm/lib/CodeGen/IfConversion.cpp stable/9/contrib/llvm/lib/CodeGen/InlineSpiller.cpp stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.cpp stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.h stable/9/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/9/contrib/llvm/lib/CodeGen/LexicalScopes.cpp stable/9/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp stable/9/contrib/llvm/lib/CodeGen/LiveInterval.cpp stable/9/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp stable/9/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp stable/9/contrib/llvm/lib/CodeGen/LiveIntervalUnion.h stable/9/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp stable/9/contrib/llvm/lib/CodeGen/LiveRangeCalc.h stable/9/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp stable/9/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp stable/9/contrib/llvm/lib/CodeGen/LiveVariables.cpp stable/9/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp stable/9/contrib/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineCSE.cpp stable/9/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/9/contrib/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp stable/9/contrib/llvm/lib/CodeGen/MachineInstr.cpp stable/9/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp stable/9/contrib/llvm/lib/CodeGen/MachineLICM.cpp stable/9/contrib/llvm/lib/CodeGen/MachineLoopInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp stable/9/contrib/llvm/lib/CodeGen/MachinePassRegistry.cpp stable/9/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp stable/9/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp stable/9/contrib/llvm/lib/CodeGen/MachineScheduler.cpp stable/9/contrib/llvm/lib/CodeGen/MachineSink.cpp stable/9/contrib/llvm/lib/CodeGen/MachineVerifier.cpp stable/9/contrib/llvm/lib/CodeGen/PHIElimination.cpp stable/9/contrib/llvm/lib/CodeGen/Passes.cpp stable/9/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp stable/9/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp stable/9/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp stable/9/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocBase.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocBase.h stable/9/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocFast.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp stable/9/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp stable/9/contrib/llvm/lib/CodeGen/RegisterCoalescer.h stable/9/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeOrdering.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp stable/9/contrib/llvm/lib/CodeGen/ShrinkWrapping.cpp stable/9/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp stable/9/contrib/llvm/lib/CodeGen/SlotIndexes.cpp stable/9/contrib/llvm/lib/CodeGen/SpillPlacement.cpp stable/9/contrib/llvm/lib/CodeGen/SplitKit.cpp stable/9/contrib/llvm/lib/CodeGen/StackProtector.cpp stable/9/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp stable/9/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp stable/9/contrib/llvm/lib/CodeGen/TailDuplication.cpp stable/9/contrib/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp stable/9/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp stable/9/contrib/llvm/lib/CodeGen/VirtRegMap.cpp stable/9/contrib/llvm/lib/CodeGen/VirtRegMap.h stable/9/contrib/llvm/lib/DebugInfo/DIContext.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.h stable/9/contrib/llvm/lib/DebugInfo/DWARFContext.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFContext.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.h stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugLine.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFDebugLine.h stable/9/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp stable/9/contrib/llvm/lib/DebugInfo/DWARFFormValue.h stable/9/contrib/llvm/lib/ExecutionEngine/EventListenerCommon.h stable/9/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp stable/9/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp stable/9/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.h stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h stable/9/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h stable/9/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp stable/9/contrib/llvm/lib/Linker/LinkModules.cpp stable/9/contrib/llvm/lib/MC/ELFObjectWriter.cpp stable/9/contrib/llvm/lib/MC/MCAsmBackend.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp stable/9/contrib/llvm/lib/MC/MCAsmStreamer.cpp stable/9/contrib/llvm/lib/MC/MCAssembler.cpp stable/9/contrib/llvm/lib/MC/MCContext.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h stable/9/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp stable/9/contrib/llvm/lib/MC/MCDisassembler/EDMain.cpp stable/9/contrib/llvm/lib/MC/MCDwarf.cpp stable/9/contrib/llvm/lib/MC/MCELFObjectTargetWriter.cpp stable/9/contrib/llvm/lib/MC/MCELFStreamer.cpp stable/9/contrib/llvm/lib/MC/MCExpr.cpp stable/9/contrib/llvm/lib/MC/MCInst.cpp stable/9/contrib/llvm/lib/MC/MCInstPrinter.cpp stable/9/contrib/llvm/lib/MC/MCLabel.cpp stable/9/contrib/llvm/lib/MC/MCMachOStreamer.cpp stable/9/contrib/llvm/lib/MC/MCNullStreamer.cpp stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp stable/9/contrib/llvm/lib/MC/MCObjectStreamer.cpp stable/9/contrib/llvm/lib/MC/MCObjectWriter.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp stable/9/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp stable/9/contrib/llvm/lib/MC/MCPureStreamer.cpp stable/9/contrib/llvm/lib/MC/MCSectionCOFF.cpp stable/9/contrib/llvm/lib/MC/MCSectionELF.cpp stable/9/contrib/llvm/lib/MC/MCStreamer.cpp stable/9/contrib/llvm/lib/MC/MCSubtargetInfo.cpp stable/9/contrib/llvm/lib/MC/MCSymbol.cpp stable/9/contrib/llvm/lib/MC/MCValue.cpp stable/9/contrib/llvm/lib/MC/MCWin64EH.cpp stable/9/contrib/llvm/lib/MC/MachObjectWriter.cpp stable/9/contrib/llvm/lib/MC/SubtargetFeature.cpp stable/9/contrib/llvm/lib/MC/WinCOFFStreamer.cpp stable/9/contrib/llvm/lib/Object/Archive.cpp stable/9/contrib/llvm/lib/Object/COFFObjectFile.cpp stable/9/contrib/llvm/lib/Object/MachOObject.cpp stable/9/contrib/llvm/lib/Object/MachOObjectFile.cpp stable/9/contrib/llvm/lib/Support/APFloat.cpp stable/9/contrib/llvm/lib/Support/APInt.cpp stable/9/contrib/llvm/lib/Support/Atomic.cpp stable/9/contrib/llvm/lib/Support/CommandLine.cpp stable/9/contrib/llvm/lib/Support/ConstantRange.cpp stable/9/contrib/llvm/lib/Support/CrashRecoveryContext.cpp stable/9/contrib/llvm/lib/Support/DAGDeltaAlgorithm.cpp stable/9/contrib/llvm/lib/Support/DataExtractor.cpp stable/9/contrib/llvm/lib/Support/DataStream.cpp stable/9/contrib/llvm/lib/Support/Debug.cpp stable/9/contrib/llvm/lib/Support/DynamicLibrary.cpp stable/9/contrib/llvm/lib/Support/Errno.cpp stable/9/contrib/llvm/lib/Support/FoldingSet.cpp stable/9/contrib/llvm/lib/Support/GraphWriter.cpp stable/9/contrib/llvm/lib/Support/Host.cpp stable/9/contrib/llvm/lib/Support/LockFileManager.cpp stable/9/contrib/llvm/lib/Support/Memory.cpp stable/9/contrib/llvm/lib/Support/MemoryBuffer.cpp stable/9/contrib/llvm/lib/Support/Mutex.cpp stable/9/contrib/llvm/lib/Support/Path.cpp stable/9/contrib/llvm/lib/Support/PathV2.cpp stable/9/contrib/llvm/lib/Support/SmallVector.cpp stable/9/contrib/llvm/lib/Support/SourceMgr.cpp stable/9/contrib/llvm/lib/Support/StreamableMemoryObject.cpp stable/9/contrib/llvm/lib/Support/StringMap.cpp stable/9/contrib/llvm/lib/Support/StringRef.cpp stable/9/contrib/llvm/lib/Support/TargetRegistry.cpp stable/9/contrib/llvm/lib/Support/ThreadLocal.cpp stable/9/contrib/llvm/lib/Support/Triple.cpp stable/9/contrib/llvm/lib/Support/Unix/Memory.inc stable/9/contrib/llvm/lib/Support/Unix/Path.inc stable/9/contrib/llvm/lib/Support/Unix/PathV2.inc stable/9/contrib/llvm/lib/Support/Unix/Process.inc stable/9/contrib/llvm/lib/Support/Unix/Signals.inc stable/9/contrib/llvm/lib/Support/Unix/Unix.h stable/9/contrib/llvm/lib/Support/Windows/Memory.inc stable/9/contrib/llvm/lib/Support/Windows/Path.inc stable/9/contrib/llvm/lib/Support/Windows/PathV2.inc stable/9/contrib/llvm/lib/Support/Windows/Process.inc stable/9/contrib/llvm/lib/Support/Windows/RWMutex.inc stable/9/contrib/llvm/lib/Support/Windows/ThreadLocal.inc stable/9/contrib/llvm/lib/Support/YAMLParser.cpp stable/9/contrib/llvm/lib/Support/raw_ostream.cpp stable/9/contrib/llvm/lib/Support/regexec.c stable/9/contrib/llvm/lib/Support/system_error.cpp stable/9/contrib/llvm/lib/TableGen/Error.cpp stable/9/contrib/llvm/lib/TableGen/Main.cpp stable/9/contrib/llvm/lib/TableGen/Record.cpp stable/9/contrib/llvm/lib/TableGen/TGParser.cpp stable/9/contrib/llvm/lib/TableGen/TGParser.h stable/9/contrib/llvm/lib/TableGen/TableGenBackend.cpp stable/9/contrib/llvm/lib/Target/ARM/ARM.h stable/9/contrib/llvm/lib/Target/ARM/ARM.td stable/9/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td stable/9/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.h stable/9/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td stable/9/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td stable/9/contrib/llvm/lib/Target/ARM/ARMJITInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td stable/9/contrib/llvm/lib/Target/ARM/ARMSchedule.td stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleA8.td stable/9/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td stable/9/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.h stable/9/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h stable/9/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.h stable/9/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp stable/9/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h stable/9/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.h stable/9/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUFrameLowering.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUHazardRecognizers.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUHazardRecognizers.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.td stable/9/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUSubtarget.h stable/9/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.cpp stable/9/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.h stable/9/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp stable/9/contrib/llvm/lib/Target/CppBackend/CPPTargetMachine.h stable/9/contrib/llvm/lib/Target/Hexagon/Hexagon.h stable/9/contrib/llvm/lib/Target/Hexagon/Hexagon.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonCallingConv.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonImmediates.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV3.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsics.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsDerived.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonPeephole.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSchedule.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV4.td stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.h stable/9/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/Hexagon/HexagonVarargsCallingConvention.h stable/9/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp stable/9/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.h stable/9/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h stable/9/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlaze.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeFrameLowering.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeMCInstLower.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSchedule.td stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.h stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.td stable/9/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp stable/9/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h stable/9/contrib/llvm/lib/Target/Mangler.cpp stable/9/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp stable/9/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h stable/9/contrib/llvm/lib/Target/Mips/Mips.h stable/9/contrib/llvm/lib/Target/Mips/Mips.td stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h stable/9/contrib/llvm/lib/Target/Mips/MipsCallingConv.td stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsCondMov.td stable/9/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.h stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h stable/9/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.h stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h stable/9/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTX.td stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp stable/9/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h stable/9/contrib/llvm/lib/Target/PowerPC/PPC.h stable/9/contrib/llvm/lib/Target/PowerPC/PPC.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCSchedule440.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG3.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG4.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG4Plus.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCScheduleG5.td stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h stable/9/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h stable/9/contrib/llvm/lib/Target/Target.cpp stable/9/contrib/llvm/lib/Target/TargetInstrInfo.cpp stable/9/contrib/llvm/lib/Target/TargetLibraryInfo.cpp stable/9/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp stable/9/contrib/llvm/lib/Target/TargetMachine.cpp stable/9/contrib/llvm/lib/Target/TargetMachineC.cpp stable/9/contrib/llvm/lib/Target/TargetRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmLexer.cpp stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.h stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp stable/9/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp stable/9/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h stable/9/contrib/llvm/lib/Target/X86/X86.h stable/9/contrib/llvm/lib/Target/X86/X86.td stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.h stable/9/contrib/llvm/lib/Target/X86/X86COFFMachineModuleInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86COFFMachineModuleInfo.h stable/9/contrib/llvm/lib/Target/X86/X86CallingConv.td stable/9/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp stable/9/contrib/llvm/lib/Target/X86/X86FastISel.cpp stable/9/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.h stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.h stable/9/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td stable/9/contrib/llvm/lib/Target/X86/X86InstrBuilder.h stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td stable/9/contrib/llvm/lib/Target/X86/X86InstrControl.td stable/9/contrib/llvm/lib/Target/X86/X86InstrExtension.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFMA.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFPStack.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFormats.td stable/9/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.h stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.td stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td stable/9/contrib/llvm/lib/Target/X86/X86InstrSSE.td stable/9/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td stable/9/contrib/llvm/lib/Target/X86/X86InstrSystem.td stable/9/contrib/llvm/lib/Target/X86/X86InstrVMX.td stable/9/contrib/llvm/lib/Target/X86/X86InstrXOP.td stable/9/contrib/llvm/lib/Target/X86/X86JITInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86JITInfo.h stable/9/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp stable/9/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.h stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.td stable/9/contrib/llvm/lib/Target/X86/X86Relocations.h stable/9/contrib/llvm/lib/Target/X86/X86Schedule.td stable/9/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td stable/9/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.cpp stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.h stable/9/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp stable/9/contrib/llvm/lib/Target/X86/X86TargetMachine.h stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h stable/9/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h stable/9/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp stable/9/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp stable/9/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp stable/9/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp stable/9/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp stable/9/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp stable/9/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp stable/9/contrib/llvm/lib/Transforms/IPO/IPO.cpp stable/9/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp stable/9/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp stable/9/contrib/llvm/lib/Transforms/IPO/Inliner.cpp stable/9/contrib/llvm/lib/Transforms/IPO/Internalize.cpp stable/9/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp stable/9/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp stable/9/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp stable/9/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp stable/9/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp stable/9/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h stable/9/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/MaximumSpanningTree.h stable/9/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp stable/9/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ConstantProp.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/DCE.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/GVN.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/GlobalMerge.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LICM.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/LowerAtomic.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ObjCARC.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Reg2Mem.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/Sink.cpp stable/9/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp stable/9/contrib/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp stable/9/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp stable/9/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp stable/9/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp stable/9/contrib/llvm/lib/Transforms/Utils/Local.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp stable/9/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp stable/9/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp stable/9/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp stable/9/contrib/llvm/lib/Transforms/Utils/Utils.cpp stable/9/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp stable/9/contrib/llvm/lib/Transforms/Vectorize/Vectorize.cpp stable/9/contrib/llvm/lib/VMCore/AsmWriter.cpp stable/9/contrib/llvm/lib/VMCore/Attributes.cpp stable/9/contrib/llvm/lib/VMCore/AutoUpgrade.cpp stable/9/contrib/llvm/lib/VMCore/ConstantFold.cpp stable/9/contrib/llvm/lib/VMCore/Constants.cpp stable/9/contrib/llvm/lib/VMCore/ConstantsContext.h stable/9/contrib/llvm/lib/VMCore/Core.cpp stable/9/contrib/llvm/lib/VMCore/DebugLoc.cpp stable/9/contrib/llvm/lib/VMCore/Dominators.cpp stable/9/contrib/llvm/lib/VMCore/Function.cpp stable/9/contrib/llvm/lib/VMCore/GCOV.cpp stable/9/contrib/llvm/lib/VMCore/Globals.cpp stable/9/contrib/llvm/lib/VMCore/IRBuilder.cpp stable/9/contrib/llvm/lib/VMCore/InlineAsm.cpp stable/9/contrib/llvm/lib/VMCore/Instruction.cpp stable/9/contrib/llvm/lib/VMCore/Instructions.cpp stable/9/contrib/llvm/lib/VMCore/LLVMContext.cpp stable/9/contrib/llvm/lib/VMCore/LLVMContextImpl.cpp stable/9/contrib/llvm/lib/VMCore/LLVMContextImpl.h stable/9/contrib/llvm/lib/VMCore/Metadata.cpp stable/9/contrib/llvm/lib/VMCore/Module.cpp stable/9/contrib/llvm/lib/VMCore/PassManager.cpp stable/9/contrib/llvm/lib/VMCore/Type.cpp stable/9/contrib/llvm/lib/VMCore/User.cpp stable/9/contrib/llvm/lib/VMCore/Value.cpp stable/9/contrib/llvm/lib/VMCore/ValueTypes.cpp stable/9/contrib/llvm/lib/VMCore/Verifier.cpp stable/9/contrib/llvm/tools/bugpoint/BugDriver.cpp stable/9/contrib/llvm/tools/bugpoint/ExtractFunction.cpp stable/9/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp stable/9/contrib/llvm/tools/clang/include/clang-c/Index.h stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTVector.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Attr.h stable/9/contrib/llvm/tools/clang/include/clang/AST/BaseSubobject.h stable/9/contrib/llvm/tools/clang/include/clang/AST/BuiltinTypes.def stable/9/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h stable/9/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Decl.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclGroup.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h stable/9/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Expr.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Mangle.h stable/9/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h stable/9/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h stable/9/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h stable/9/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h stable/9/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Redeclarable.h stable/9/contrib/llvm/tools/clang/include/clang/AST/SelectorLocationsKind.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Stmt.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h stable/9/contrib/llvm/tools/clang/include/clang/AST/Type.h stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h stable/9/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h stable/9/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h stable/9/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/ABI.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/AddressSpaces.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/AllDiagnostics.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Attr.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsHexagon.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/ConvertUTF.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/ExceptionSpecificationType.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/ExpressionTraits.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileSystemOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Linkage.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/MacroBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Module.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/OnDiskHashTable.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/OpenCL.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/OperatorKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/PrettyStackTrace.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceManagerInternals.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TemplateKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Version.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Visibility.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenAction.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Action.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Arg.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Driver.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Job.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/OptParser.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/OptTable.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Option.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/Tool.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Types.def stable/9/contrib/llvm/tools/clang/include/clang/Driver/Types.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticRenderer.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LangStandard.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LogDiagnosticPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOutputOptions.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/CodeCompletionHandler.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/ExternalPreprocessorSource.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/MultipleIncludeOpt.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/Token.h stable/9/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h stable/9/contrib/llvm/tools/clang/include/clang/Parse/Parser.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Designator.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/LocInfoType.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Overload.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Scope.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Sema.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaConsumer.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Template.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h stable/9/contrib/llvm/tools/clang/include/clang/Sema/Weak.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/Module.h stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h stable/9/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Internals.h stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransAPIUses.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransARCAssign.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransBlockObjCVariable.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCCalls.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransProperties.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h stable/9/contrib/llvm/tools/clang/lib/AST/APValue.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/CXXABI.h stable/9/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Decl.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclFriend.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp stable/9/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Expr.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/LambdaMangleContext.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Mangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp stable/9/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp stable/9/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp stable/9/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Stmt.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtDumper.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp stable/9/contrib/llvm/tools/clang/lib/AST/Type.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp stable/9/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp stable/9/contrib/llvm/tools/clang/lib/AST/VTTBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp stable/9/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ProgramPoint.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp stable/9/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/ConvertUTF.c stable/9/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Module.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/9/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBuilder.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Arg.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/CC1AsOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Driver.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/DriverOptions.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Option.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h stable/9/contrib/llvm/tools/clang/lib/Driver/Types.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/WindowsToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Edit/Commit.cpp stable/9/contrib/llvm/tools/clang/lib/Edit/EditedSource.cpp stable/9/contrib/llvm/tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ChainedDiagnosticConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/LayoutOverrideSource.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/Warnings.cpp stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Headers/altivec.h stable/9/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/float.h stable/9/contrib/llvm/tools/clang/lib/Headers/immintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/module.map stable/9/contrib/llvm/tools/clang/lib/Headers/stddef.h stable/9/contrib/llvm/tools/clang/lib/Headers/unwind.h stable/9/contrib/llvm/tools/clang/lib/Headers/wmmintrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/x86intrin.h stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp stable/9/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParsePragma.h stable/9/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/Parser.cpp stable/9/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h stable/9/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/DelayedDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/Sema.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/Module.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.h stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp stable/9/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp stable/9/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/OptParserEmitter.cpp stable/9/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp stable/9/contrib/llvm/tools/llc/llc.cpp stable/9/contrib/llvm/tools/lli/lli.cpp stable/9/contrib/llvm/tools/llvm-ar/llvm-ar.cpp stable/9/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp stable/9/contrib/llvm/tools/llvm-diff/DiffConsumer.cpp stable/9/contrib/llvm/tools/llvm-diff/DiffConsumer.h stable/9/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp stable/9/contrib/llvm/tools/llvm-diff/DifferenceEngine.h stable/9/contrib/llvm/tools/llvm-diff/llvm-diff.cpp stable/9/contrib/llvm/tools/llvm-dis/llvm-dis.cpp stable/9/contrib/llvm/tools/llvm-extract/llvm-extract.cpp stable/9/contrib/llvm/tools/llvm-mc/llvm-mc.cpp stable/9/contrib/llvm/tools/llvm-nm/llvm-nm.cpp stable/9/contrib/llvm/tools/llvm-objdump/MachODump.cpp stable/9/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp stable/9/contrib/llvm/tools/llvm-prof/llvm-prof.cpp stable/9/contrib/llvm/tools/llvm-ranlib/llvm-ranlib.cpp stable/9/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp stable/9/contrib/llvm/tools/llvm-stress/llvm-stress.cpp stable/9/contrib/llvm/tools/macho-dump/macho-dump.cpp stable/9/contrib/llvm/tools/opt/opt.cpp stable/9/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp stable/9/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp stable/9/contrib/llvm/utils/TableGen/AsmWriterInst.cpp stable/9/contrib/llvm/utils/TableGen/CallingConvEmitter.cpp stable/9/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h stable/9/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenInstruction.h stable/9/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.h stable/9/contrib/llvm/utils/TableGen/CodeGenTarget.cpp stable/9/contrib/llvm/utils/TableGen/CodeGenTarget.h stable/9/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelMatcher.h stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp stable/9/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.cpp stable/9/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp stable/9/contrib/llvm/utils/TableGen/EDEmitter.cpp stable/9/contrib/llvm/utils/TableGen/FastISelEmitter.cpp stable/9/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp stable/9/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp stable/9/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp stable/9/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp stable/9/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp stable/9/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h stable/9/contrib/llvm/utils/TableGen/SetTheory.cpp stable/9/contrib/llvm/utils/TableGen/SetTheory.h stable/9/contrib/llvm/utils/TableGen/StringToOffsetTable.h stable/9/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp stable/9/contrib/llvm/utils/TableGen/TGValueTypes.cpp stable/9/contrib/llvm/utils/TableGen/TableGen.cpp stable/9/contrib/llvm/utils/TableGen/X86DisassemblerShared.h stable/9/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp stable/9/contrib/llvm/utils/TableGen/X86DisassemblerTables.h stable/9/contrib/llvm/utils/TableGen/X86ModRMFilters.h stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.h stable/9/etc/mtree/BSD.include.dist stable/9/lib/clang/Makefile stable/9/lib/clang/clang.build.mk stable/9/lib/clang/include/Makefile stable/9/lib/clang/include/clang/Basic/Version.inc stable/9/lib/clang/include/llvm/Config/AsmParsers.def stable/9/lib/clang/include/llvm/Config/Disassemblers.def stable/9/lib/clang/include/llvm/Config/config.h stable/9/lib/clang/include/llvm/Config/llvm-config.h stable/9/lib/clang/libclanganalysis/Makefile stable/9/lib/clang/libclangarcmigrate/Makefile stable/9/lib/clang/libclangast/Makefile stable/9/lib/clang/libclangbasic/Makefile stable/9/lib/clang/libclangcodegen/Makefile stable/9/lib/clang/libclangdriver/Makefile stable/9/lib/clang/libclangedit/Makefile stable/9/lib/clang/libclangfrontend/Makefile stable/9/lib/clang/libclangfrontendtool/Makefile stable/9/lib/clang/libclangparse/Makefile stable/9/lib/clang/libclangsema/Makefile stable/9/lib/clang/libclangserialization/Makefile stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile stable/9/lib/clang/libclangstaticanalyzercore/Makefile stable/9/lib/clang/libclangstaticanalyzerfrontend/Makefile stable/9/lib/clang/libllvmanalysis/Makefile stable/9/lib/clang/libllvmarmcodegen/Makefile stable/9/lib/clang/libllvmcodegen/Makefile stable/9/lib/clang/libllvmcore/Makefile stable/9/lib/clang/libllvmdebuginfo/Makefile stable/9/lib/clang/libllvminstrumentation/Makefile stable/9/lib/clang/libllvmipo/Makefile stable/9/lib/clang/libllvmmc/Makefile stable/9/lib/clang/libllvmmcjit/Makefile stable/9/lib/clang/libllvmmipsasmparser/Makefile stable/9/lib/clang/libllvmmipscodegen/Makefile stable/9/lib/clang/libllvmmipsdesc/Makefile stable/9/lib/clang/libllvmmipsinstprinter/Makefile stable/9/lib/clang/libllvmpowerpccodegen/Makefile stable/9/lib/clang/libllvmscalaropts/Makefile stable/9/lib/clang/libllvmtablegen/Makefile stable/9/lib/clang/libllvmtarget/Makefile stable/9/lib/clang/libllvmtransformutils/Makefile stable/9/lib/clang/libllvmvectorize/Makefile stable/9/lib/clang/libllvmx86codegen/Makefile stable/9/sys/conf/files stable/9/sys/conf/kern.mk stable/9/sys/modules/ath/Makefile stable/9/sys/modules/bwn/Makefile stable/9/sys/modules/ips/Makefile stable/9/sys/modules/mps/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.bin/clang/Makefile stable/9/usr.bin/clang/bugpoint/bugpoint.1 stable/9/usr.bin/clang/clang-tblgen/Makefile stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/clang/clang.1 stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llc/llc.1 stable/9/usr.bin/clang/lli/Makefile stable/9/usr.bin/clang/lli/lli.1 stable/9/usr.bin/clang/llvm-ar/llvm-ar.1 stable/9/usr.bin/clang/llvm-as/llvm-as.1 stable/9/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 stable/9/usr.bin/clang/llvm-diff/llvm-diff.1 stable/9/usr.bin/clang/llvm-dis/Makefile stable/9/usr.bin/clang/llvm-dis/llvm-dis.1 stable/9/usr.bin/clang/llvm-extract/Makefile stable/9/usr.bin/clang/llvm-extract/llvm-extract.1 stable/9/usr.bin/clang/llvm-link/Makefile stable/9/usr.bin/clang/llvm-link/llvm-link.1 stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-nm/llvm-nm.1 stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-prof/Makefile stable/9/usr.bin/clang/llvm-prof/llvm-prof.1 stable/9/usr.bin/clang/llvm-ranlib/llvm-ranlib.1 stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile stable/9/usr.bin/clang/opt/opt.1 stable/9/usr.bin/clang/tblgen/Makefile stable/9/usr.bin/clang/tblgen/tblgen.1 stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) stable/9/etc/ (props changed) stable/9/lib/clang/ (props changed) stable/9/lib/clang/include/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/modules/ (props changed) stable/9/tools/build/ (props changed) stable/9/usr.bin/clang/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/ObsoleteFiles.inc Mon Jan 14 19:51:26 2013 (r245431) @@ -41,8 +41,34 @@ # 20121230: remove wrongly created directories for auditdistd OLD_DIRS+=var/dist OLD_DIRS+=var/remote -# 20121015: remove incomplete unwind.h +# 20120816: new clang import which bumps version from 3.1 to 3.2 +OLD_FILES+=usr/bin/llvm-ld +OLD_FILES+=usr/bin/llvm-stub +OLD_FILES+=usr/include/clang/3.1/altivec.h +OLD_FILES+=usr/include/clang/3.1/avx2intrin.h +OLD_FILES+=usr/include/clang/3.1/avxintrin.h +OLD_FILES+=usr/include/clang/3.1/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.1/bmiintrin.h +OLD_FILES+=usr/include/clang/3.1/cpuid.h +OLD_FILES+=usr/include/clang/3.1/emmintrin.h +OLD_FILES+=usr/include/clang/3.1/fma4intrin.h +OLD_FILES+=usr/include/clang/3.1/immintrin.h +OLD_FILES+=usr/include/clang/3.1/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.1/mm3dnow.h +OLD_FILES+=usr/include/clang/3.1/mm_malloc.h +OLD_FILES+=usr/include/clang/3.1/mmintrin.h +OLD_FILES+=usr/include/clang/3.1/module.map +OLD_FILES+=usr/include/clang/3.1/nmmintrin.h +OLD_FILES+=usr/include/clang/3.1/pmmintrin.h +OLD_FILES+=usr/include/clang/3.1/popcntintrin.h +OLD_FILES+=usr/include/clang/3.1/smmintrin.h +OLD_FILES+=usr/include/clang/3.1/tmmintrin.h OLD_FILES+=usr/include/clang/3.1/unwind.h +OLD_FILES+=usr/include/clang/3.1/wmmintrin.h +OLD_FILES+=usr/include/clang/3.1/x86intrin.h +OLD_FILES+=usr/include/clang/3.1/xmmintrin.h +OLD_DIRS+=usr/include/clang/3.1 +OLD_FILES+=usr/share/man/man1/llvm-ld.1.gz # 20120713: auth.conf removed OLD_FILES+=etc/auth.conf OLD_FILES+=usr/share/examples/etc/auth.conf Modified: stable/9/contrib/llvm/include/llvm-c/Core.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Core.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm-c/Core.h Mon Jan 14 19:51:26 2013 (r245431) @@ -21,9 +21,9 @@ /* Need these includes to support the LLVM 'cast' template for the C++ 'wrap' and 'unwrap' conversion functions. */ +#include "llvm/IRBuilder.h" #include "llvm/Module.h" #include "llvm/PassRegistry.h" -#include "llvm/Support/IRBuilder.h" extern "C" { #endif @@ -53,7 +53,7 @@ extern "C" { * The declared parameter names are descriptive and specify which type is * required. Additionally, each type hierarchy is documented along with the * functions that operate upon it. For more detail, refer to LLVM's C++ code. - * If in doubt, refer to Core.cpp, which performs paramter downcasts in the + * If in doubt, refer to Core.cpp, which performs parameter downcasts in the * form unwrap(Param). * * Many exotic languages can interoperate with C code but have a harder time @@ -106,7 +106,7 @@ typedef struct LLVMOpaqueType *LLVMTypeR typedef struct LLVMOpaqueValue *LLVMValueRef; /** - * Represents a basic block of instruction in LLVM IR. + * Represents a basic block of instructions in LLVM IR. * * This models llvm::BasicBlock. */ @@ -173,10 +173,11 @@ typedef enum { LLVMUWTable = 1 << 30, LLVMNonLazyBind = 1 << 31 - // FIXME: This attribute is currently not included in the C API as - // a temporary measure until the API/ABI impact to the C API is understood - // and the path forward agreed upon. - //LLVMAddressSafety = 1ULL << 32 + /* FIXME: This attribute is currently not included in the C API as + a temporary measure until the API/ABI impact to the C API is understood + and the path forward agreed upon. + LLVMAddressSafety = 1ULL << 32 + */ } LLVMAttribute; typedef enum { @@ -282,6 +283,7 @@ typedef enum { LLVMLinkOnceAnyLinkage, /**< Keep one copy of function when linking (inline)*/ LLVMLinkOnceODRLinkage, /**< Same, but only replaced by something equivalent. */ + LLVMLinkOnceODRAutoHideLinkage, /**< Like LinkOnceODR, but possibly hidden. */ LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */ LLVMWeakODRLinkage, /**< Same, but only replaced by something equivalent. */ @@ -295,9 +297,7 @@ typedef enum { LLVMGhostLinkage, /**< Obsolete */ LLVMCommonLinkage, /**< Tentative definitions */ LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */ - LLVMLinkerPrivateWeakLinkage, /**< Like LinkerPrivate, but is weak. */ - LLVMLinkerPrivateWeakDefAutoLinkage /**< Like LinkerPrivateWeak, but possibly - hidden. */ + LLVMLinkerPrivateWeakLinkage /**< Like LinkerPrivate, but is weak. */ } LLVMLinkage; typedef enum { @@ -478,6 +478,15 @@ void LLVMSetTarget(LLVMModuleRef M, cons void LLVMDumpModule(LLVMModuleRef M); /** + * Print a representation of a module to a file. The ErrorMessage needs to be + * disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise. + * + * @see Module::print() + */ +LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename, + char **ErrorMessage); + +/** * Set inline assembly for a module. * * @see Module::setModuleInlineAsm() @@ -977,7 +986,7 @@ LLVMTypeRef LLVMX86MMXType(void); * * LLVMValueRef essentially represents llvm::Value. There is a rich * hierarchy of classes within this type. Depending on the instance - * obtain, not all APIs are available. + * obtained, not all APIs are available. * * Callers can determine the type of a LLVMValueRef by calling the * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These @@ -1153,7 +1162,7 @@ LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLAR * * Uses are obtained in an iterator fashion. First, call this function * to obtain a reference to the first use. Then, call LLVMGetNextUse() - * on that instance and all subsequently obtained instances untl + * on that instance and all subsequently obtained instances until * LLVMGetNextUse() returns NULL. * * @see llvm::Value::use_begin() @@ -1794,7 +1803,7 @@ LLVMAttribute LLVMGetAttribute(LLVMValue * Set the alignment for a function parameter. * * @see llvm::Argument::addAttr() - * @see llvm::Attribute::constructAlignmentFromInt() + * @see llvm::AttrBuilder::addAlignmentAttr() */ void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align); @@ -1860,6 +1869,27 @@ LLVMValueRef LLVMMDNode(LLVMValueRef *Va const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len); /** + * Obtain the number of operands from an MDNode value. + * + * @param V MDNode to get number of operands from. + * @return Number of operands of the MDNode. + */ +unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V); + +/** + * Obtain the given MDNode's operands. + * + * The passed LLVMValueRef pointer should point to enough memory to hold all of + * the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as + * LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the + * MDNode's operands. + * + * @param V MDNode to get the operands from. + * @param Dest Destination array for operands. + */ +void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest); + +/** * @} */ @@ -2106,7 +2136,7 @@ LLVMBasicBlockRef LLVMGetInstructionPare LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst); /** - * Obtain the instruction that occured before this one. + * Obtain the instruction that occurred before this one. * * If the instruction is the first instruction in a basic block, NULL * will be returned. @@ -2679,7 +2709,7 @@ namespace llvm { template inline T **unwrap(LLVMValueRef *Vals, unsigned Length) { - #if DEBUG + #ifdef DEBUG for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I) cast(*I); #endif Modified: stable/9/contrib/llvm/include/llvm-c/Disassembler.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Disassembler.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm-c/Disassembler.h Mon Jan 14 19:51:26 2013 (r245431) @@ -109,9 +109,9 @@ struct LLVMOpInfo1 { */ typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, - uint64_t *ReferenceType, - uint64_t ReferencePC, - const char **ReferenceName); + uint64_t *ReferenceType, + uint64_t ReferencePC, + const char **ReferenceName); /** * The reference types on input and output. */ @@ -146,6 +146,15 @@ LLVMDisasmContextRef LLVMCreateDisasm(co LLVMSymbolLookupCallback SymbolLookUp); /** + * Set the disassembler's options. Returns 1 if it can set the Options and 0 + * otherwise. + */ +int LLVMSetDisasmOptions(LLVMDisasmContextRef DC, uint64_t Options); + +/* The option to produce marked up assembly. */ +#define LLVMDisassembler_Option_UseMarkup 1 + +/** * Dispose of a disassembler context. */ void LLVMDisasmDispose(LLVMDisasmContextRef DC); Copied: stable/9/contrib/llvm/include/llvm-c/Linker.h (from r239462, head/contrib/llvm/include/llvm-c/Linker.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/include/llvm-c/Linker.h Mon Jan 14 19:51:26 2013 (r245431, copy of r239462, head/contrib/llvm/include/llvm-c/Linker.h) @@ -0,0 +1,42 @@ +/*===-- llvm-c/Linker.h - Module Linker 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 file defines the C interface to the module/file/archive linker. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_LINKER_H +#define LLVM_C_LINKER_H + +#include "llvm-c/Core.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef enum { + LLVMLinkerDestroySource = 0, /* Allow source module to be destroyed. */ + LLVMLinkerPreserveSource = 1 /* Preserve the source module. */ +} LLVMLinkerMode; + + +/* Links the source module into the destination module, taking ownership + * of the source module away from the caller. Optionally returns a + * human-readable description of any errors that occurred in linking. + * OutMessage must be disposed with LLVMDisposeMessage. The return value + * is true if an error occurred, false otherwise. */ +LLVMBool LLVMLinkModules(LLVMModuleRef Dest, LLVMModuleRef Src, + LLVMLinkerMode Mode, char **OutMessage); + +#ifdef __cplusplus +} +#endif + +#endif Modified: stable/9/contrib/llvm/include/llvm-c/Target.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Target.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm-c/Target.h Mon Jan 14 19:51:26 2013 (r245431) @@ -56,19 +56,19 @@ typedef struct LLVMStructLayout *LLVMStr /* Declare all of the available assembly printer initialization functions. */ #define LLVM_ASM_PRINTER(TargetName) \ - void LLVMInitialize##TargetName##AsmPrinter(); + void LLVMInitialize##TargetName##AsmPrinter(void); #include "llvm/Config/AsmPrinters.def" #undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ /* Declare all of the available assembly parser initialization functions. */ #define LLVM_ASM_PARSER(TargetName) \ - void LLVMInitialize##TargetName##AsmParser(); + void LLVMInitialize##TargetName##AsmParser(void); #include "llvm/Config/AsmParsers.def" #undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ /* Declare all of the available disassembler initialization functions. */ #define LLVM_DISASSEMBLER(TargetName) \ - void LLVMInitialize##TargetName##Disassembler(); + void LLVMInitialize##TargetName##Disassembler(void); #include "llvm/Config/Disassemblers.def" #undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ @@ -102,7 +102,7 @@ static inline void LLVMInitializeAllTarg /** LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry. */ -static inline void LLVMInitializeAllAsmPrinters() { +static inline void LLVMInitializeAllAsmPrinters(void) { #define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter(); #include "llvm/Config/AsmPrinters.def" #undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ @@ -111,7 +111,7 @@ static inline void LLVMInitializeAllAsmP /** LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry. */ -static inline void LLVMInitializeAllAsmParsers() { +static inline void LLVMInitializeAllAsmParsers(void) { #define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser(); #include "llvm/Config/AsmParsers.def" #undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ @@ -120,7 +120,7 @@ static inline void LLVMInitializeAllAsmP /** LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry. */ -static inline void LLVMInitializeAllDisassemblers() { +static inline void LLVMInitializeAllDisassemblers(void) { #define LLVM_DISASSEMBLER(TargetName) \ LLVMInitialize##TargetName##Disassembler(); #include "llvm/Config/Disassemblers.def" @@ -145,7 +145,7 @@ static inline LLVMBool LLVMInitializeNat /*===-- Target Data -------------------------------------------------------===*/ /** Creates target data from a target layout string. - See the constructor llvm::TargetData::TargetData. */ + See the constructor llvm::DataLayout::DataLayout. */ LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep); /** Adds target data information to a pass manager. This does not take ownership @@ -160,48 +160,58 @@ void LLVMAddTargetLibraryInfo(LLVMTarget /** Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. - See the constructor llvm::TargetData::TargetData. */ + See the constructor llvm::DataLayout::DataLayout. */ char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef); /** Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. - See the method llvm::TargetData::isLittleEndian. */ + See the method llvm::DataLayout::isLittleEndian. */ enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef); /** Returns the pointer size in bytes for a target. - See the method llvm::TargetData::getPointerSize. */ + See the method llvm::DataLayout::getPointerSize. */ unsigned LLVMPointerSize(LLVMTargetDataRef); +/** Returns the pointer size in bytes for a target for a specified + address space. + See the method llvm::DataLayout::getPointerSize. */ +unsigned LLVMPointerSizeForAS(LLVMTargetDataRef, unsigned AS); + /** Returns the integer type that is the same size as a pointer on a target. - See the method llvm::TargetData::getIntPtrType. */ + See the method llvm::DataLayout::getIntPtrType. */ LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef); +/** Returns the integer type that is the same size as a pointer on a target. + This version allows the address space to be specified. + See the method llvm::DataLayout::getIntPtrType. */ +LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef, unsigned AS); + /** Computes the size of a type in bytes for a target. - See the method llvm::TargetData::getTypeSizeInBits. */ + See the method llvm::DataLayout::getTypeSizeInBits. */ unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef, LLVMTypeRef); /** Computes the storage size of a type in bytes for a target. - See the method llvm::TargetData::getTypeStoreSize. */ + See the method llvm::DataLayout::getTypeStoreSize. */ unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef, LLVMTypeRef); /** Computes the ABI size of a type in bytes for a target. - See the method llvm::TargetData::getTypeAllocSize. */ + See the method llvm::DataLayout::getTypeAllocSize. */ unsigned long long LLVMABISizeOfType(LLVMTargetDataRef, LLVMTypeRef); /** Computes the ABI alignment of a type in bytes for a target. - See the method llvm::TargetData::getTypeABISize. */ + See the method llvm::DataLayout::getTypeABISize. */ unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); /** Computes the call frame alignment of a type in bytes for a target. - See the method llvm::TargetData::getTypeABISize. */ + See the method llvm::DataLayout::getTypeABISize. */ unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); /** Computes the preferred alignment of a type in bytes for a target. - See the method llvm::TargetData::getTypeABISize. */ + See the method llvm::DataLayout::getTypeABISize. */ unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef, LLVMTypeRef); /** Computes the preferred alignment of a global variable in bytes for a target. - See the method llvm::TargetData::getPreferredAlignment. */ + See the method llvm::DataLayout::getPreferredAlignment. */ unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef, LLVMValueRef GlobalVar); @@ -216,7 +226,7 @@ unsigned long long LLVMOffsetOfElement(L unsigned Element); /** Deallocates a TargetData. - See the destructor llvm::TargetData::~TargetData. */ + See the destructor llvm::DataLayout::~DataLayout. */ void LLVMDisposeTargetData(LLVMTargetDataRef); /** @@ -227,15 +237,15 @@ void LLVMDisposeTargetData(LLVMTargetDat } namespace llvm { - class TargetData; + class DataLayout; class TargetLibraryInfo; - inline TargetData *unwrap(LLVMTargetDataRef P) { - return reinterpret_cast(P); + inline DataLayout *unwrap(LLVMTargetDataRef P) { + return reinterpret_cast(P); } - inline LLVMTargetDataRef wrap(const TargetData *P) { - return reinterpret_cast(const_cast(P)); + inline LLVMTargetDataRef wrap(const DataLayout *P) { + return reinterpret_cast(const_cast(P)); } inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) { Modified: stable/9/contrib/llvm/include/llvm-c/TargetMachine.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/TargetMachine.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm-c/TargetMachine.h Mon Jan 14 19:51:26 2013 (r245431) @@ -104,7 +104,7 @@ char *LLVMGetTargetMachineCPU(LLVMTarget LLVMDisposeMessage. */ char *LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T); -/** Returns the llvm::TargetData used for this llvm:TargetMachine. */ +/** Returns the llvm::DataLayout used for this llvm:TargetMachine. */ LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T); /** Emits an asm or object file for the given module to the filename. This Modified: stable/9/contrib/llvm/include/llvm-c/Transforms/Vectorize.h ============================================================================== --- stable/9/contrib/llvm/include/llvm-c/Transforms/Vectorize.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm-c/Transforms/Vectorize.h Mon Jan 14 19:51:26 2013 (r245431) @@ -36,6 +36,9 @@ extern "C" { /** See llvm::createBBVectorizePass function. */ void LLVMAddBBVectorizePass(LLVMPassManagerRef PM); +/** See llvm::createLoopVectorizePass function. */ +void LLVMAddLoopVectorizePass(LLVMPassManagerRef PM); + /** * @} */ Modified: stable/9/contrib/llvm/include/llvm/ADT/APFloat.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/ADT/APFloat.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm/ADT/APFloat.h Mon Jan 14 19:51:26 2013 (r245431) @@ -274,6 +274,7 @@ namespace llvm { /* C fmod, or llvm frem. */ opStatus mod(const APFloat &, roundingMode); opStatus fusedMultiplyAdd(const APFloat &, const APFloat &, roundingMode); + opStatus roundToIntegral(roundingMode); /* Sign operations. */ void changeSign(); @@ -454,14 +455,11 @@ namespace llvm { /* The sign bit of this number. */ unsigned int sign: 1; - - /* For PPCDoubleDouble, we have a second exponent and sign (the second - significand is appended to the first one, although it would be wrong to - regard these as a single number for arithmetic purposes). These fields - are not meaningful for any other type. */ - exponent_t exponent2 : 11; - unsigned int sign2: 1; }; + + // See friend declaration above. This additional declaration is required in + // order to compile LLVM with IBM xlC compiler. + hash_code hash_value(const APFloat &Arg); } /* namespace llvm */ #endif /* LLVM_FLOAT_H */ Modified: stable/9/contrib/llvm/include/llvm/ADT/APInt.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/ADT/APInt.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm/ADT/APInt.h Mon Jan 14 19:51:26 2013 (r245431) @@ -16,6 +16,7 @@ #define LLVM_APINT_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/MathExtras.h" #include #include @@ -250,7 +251,7 @@ public: /// constructor. APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); - /// This constructor interprets the string \arg str in the given radix. The + /// This constructor interprets the string \p str in the given radix. The /// interpretation stops when the first character that is not suitable for the /// radix is encountered, or the end of the string. Acceptable radix values /// are 2, 8, 10, 16, and 36. It is an error for the value implied by the @@ -273,6 +274,13 @@ public: initSlowCase(that); } +#if LLVM_USE_RVALUE_REFERENCES + /// @brief Move Constructor. + APInt(APInt&& that) : BitWidth(that.BitWidth), VAL(that.VAL) { + that.BitWidth = 0; + } +#endif + /// @brief Destructor. ~APInt() { if (!isSingleWord()) @@ -349,13 +357,7 @@ public: /// @brief Check if this APInt has an N-bits unsigned integer value. bool isIntN(unsigned N) const { assert(N && "N == 0 ???"); - if (N >= getBitWidth()) - return true; - - if (isSingleWord()) - return isUIntN(N, VAL); - return APInt(N, makeArrayRef(pVal, getNumWords())).zext(getBitWidth()) - == (*this); + return getActiveBits() <= N; } /// @brief Check if this APInt has an N-bits signed integer value. @@ -503,6 +505,18 @@ public: return getAllOnesValue(numBits).lshr(numBits - loBitsSet); } + /// \brief Determine if two APInts have the same value, after zero-extending + /// one of them (if needed!) to ensure that the bit-widths match. + static bool isSameValue(const APInt &I1, const APInt &I2) { + if (I1.getBitWidth() == I2.getBitWidth()) + return I1 == I2; + + if (I1.getBitWidth() > I2.getBitWidth()) + return I1 == I2.zext(I1.getBitWidth()); + + return I1.zext(I2.getBitWidth()) == I2; + } + /// \brief Overload to compute a hash_code for an APInt value. friend hash_code hash_value(const APInt &Arg); @@ -587,6 +601,21 @@ public: return AssignSlowCase(RHS); } +#if LLVM_USE_RVALUE_REFERENCES + /// @brief Move assignment operator. + APInt& operator=(APInt&& that) { + if (!isSingleWord()) + delete [] pVal; + + BitWidth = that.BitWidth; + VAL = that.VAL; + + that.BitWidth = 0; + + return *this; + } +#endif + /// The RHS value is assigned to *this. If the significant bits in RHS exceed /// the bit width, the excess bits are truncated. If the bit width is larger /// than 64, the value is zero filled in the unspecified high order bits. @@ -731,7 +760,7 @@ public: APInt shl(unsigned shiftAmt) const { assert(shiftAmt <= BitWidth && "Invalid shift amount"); if (isSingleWord()) { - if (shiftAmt == BitWidth) + if (shiftAmt >= BitWidth) return APInt(BitWidth, 0); // avoid undefined shift results return APInt(BitWidth, VAL << shiftAmt); } @@ -817,9 +846,10 @@ public: if (LHS.isNegative()) { if (RHS.isNegative()) APInt::udivrem(-LHS, -RHS, Quotient, Remainder); - else + else { APInt::udivrem(-LHS, RHS, Quotient, Remainder); - Quotient = -Quotient; + Quotient = -Quotient; + } Remainder = -Remainder; } else if (RHS.isNegative()) { APInt::udivrem(LHS, -RHS, Quotient, Remainder); @@ -1087,7 +1117,7 @@ public: else { // Set all the bits in all the words. for (unsigned i = 0; i < getNumWords(); ++i) - pVal[i] = -1ULL; + pVal[i] = -1ULL; } // Clear the unused ones clearUnusedBits(); @@ -1201,15 +1231,15 @@ public: } /// This method determines how many bits are required to hold the APInt - /// equivalent of the string given by \arg str. + /// equivalent of the string given by \p str. /// @brief Get bits required for string value. static unsigned getBitsNeeded(StringRef str, uint8_t radix); /// countLeadingZeros - This function is an APInt version of the /// countLeadingZeros_{32,64} functions in MathExtras.h. It counts the number /// of zeros from the most significant bit to the first one bit. - /// @returns BitWidth if the value is zero. - /// @returns the number of zeros from the most significant bit to the first + /// @returns BitWidth if the value is zero, otherwise + /// returns the number of zeros from the most significant bit to the first /// one bits. unsigned countLeadingZeros() const { if (isSingleWord()) { @@ -1222,8 +1252,8 @@ public: /// countLeadingOnes - This function is an APInt version of the /// countLeadingOnes_{32,64} functions in MathExtras.h. It counts the number /// of ones from the most significant bit to the first zero bit. - /// @returns 0 if the high order bit is not set - /// @returns the number of 1 bits from the most significant to the least + /// @returns 0 if the high order bit is not set, otherwise + /// returns the number of 1 bits from the most significant to the least /// @brief Count the number of leading one bits. unsigned countLeadingOnes() const; @@ -1236,8 +1266,8 @@ public: /// countTrailingZeros - This function is an APInt version of the /// countTrailingZeros_{32,64} functions in MathExtras.h. It counts /// the number of zeros from the least significant bit to the first set bit. - /// @returns BitWidth if the value is zero. - /// @returns the number of zeros from the least significant bit to the first + /// @returns BitWidth if the value is zero, otherwise + /// returns the number of zeros from the least significant bit to the first /// one bit. /// @brief Count the number of trailing zero bits. unsigned countTrailingZeros() const; @@ -1245,8 +1275,8 @@ public: /// countTrailingOnes - This function is an APInt version of the /// countTrailingOnes_{32,64} functions in MathExtras.h. It counts /// the number of ones from the least significant bit to the first zero bit. - /// @returns BitWidth if the value is all ones. - /// @returns the number of ones from the least significant bit to the first + /// @returns BitWidth if the value is all ones, otherwise + /// returns the number of ones from the least significant bit to the first /// zero bit. /// @brief Count the number of trailing one bits. unsigned countTrailingOnes() const { @@ -1258,8 +1288,8 @@ public: /// countPopulation - This function is an APInt version of the /// countPopulation_{32,64} functions in MathExtras.h. It counts the number /// of 1 bits in the APInt value. - /// @returns 0 if the value is zero. - /// @returns the number of set bits. + /// @returns 0 if the value is zero, otherwise returns the number of set + /// bits. /// @brief Count the number of bits set. unsigned countPopulation() const { if (isSingleWord()) @@ -1750,6 +1780,9 @@ inline APInt Not(const APInt& APIVal) { } // End of APIntOps namespace + // See friend declaration above. This additional declaration is required in + // order to compile LLVM with IBM xlC compiler. + hash_code hash_value(const APInt &Arg); } // End of llvm namespace #endif Modified: stable/9/contrib/llvm/include/llvm/ADT/APSInt.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/ADT/APSInt.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm/ADT/APSInt.h Mon Jan 14 19:51:26 2013 (r245431) @@ -135,6 +135,19 @@ public: assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); return IsUnsigned ? uge(RHS) : sge(RHS); } + inline bool operator==(const APSInt& RHS) const { + assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); + return eq(RHS); + } + inline bool operator==(int64_t RHS) const { + return isSameValue(*this, APSInt(APInt(64, RHS), true)); + } + inline bool operator!=(const APSInt& RHS) const { + return !((*this) == RHS); + } + inline bool operator!=(int64_t RHS) const { + return !((*this) == RHS); + } // The remaining operators just wrap the logic of APInt, but retain the // signedness information. @@ -250,17 +263,50 @@ public: : APInt::getSignedMinValue(numBits), Unsigned); } + /// \brief Determine if two APSInts have the same value, zero- or + /// sign-extending as needed. + static bool isSameValue(const APSInt &I1, const APSInt &I2) { + if (I1.getBitWidth() == I2.getBitWidth() && I1.isSigned() == I2.isSigned()) + return I1 == I2; + + // Check for a bit-width mismatch. + if (I1.getBitWidth() > I2.getBitWidth()) + return isSameValue(I1, I2.extend(I1.getBitWidth())); + else if (I2.getBitWidth() > I1.getBitWidth()) + return isSameValue(I1.extend(I2.getBitWidth()), I2); + + // We have a signedness mismatch. Turn the signed value into an unsigned + // value. + if (I1.isSigned()) { + if (I1.isNegative()) + return false; + + return APSInt(I1, true) == I2; + } + + if (I2.isNegative()) + return false; + + return I1 == APSInt(I2, true); + } + /// Profile - Used to insert APSInt objects, or objects that contain APSInt /// objects, into FoldingSets. void Profile(FoldingSetNodeID& ID) const; }; +inline bool operator==(int64_t V1, const APSInt& V2) { + return V2 == V1; +} +inline bool operator!=(int64_t V1, const APSInt& V2) { + return V2 != V1; +} + inline raw_ostream &operator<<(raw_ostream &OS, const APSInt &I) { I.print(OS, I.isSigned()); return OS; } - } // end namespace llvm #endif Modified: stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h Mon Jan 14 19:51:26 2013 (r245431) @@ -59,12 +59,17 @@ namespace llvm { ArrayRef(const T *begin, const T *end) : Data(begin), Length(end - begin) {} - /// Construct an ArrayRef from a SmallVector. - /*implicit*/ ArrayRef(const SmallVectorImpl &Vec) - : Data(Vec.data()), Length(Vec.size()) {} + /// Construct an ArrayRef from a SmallVector. This is templated in order to + /// avoid instantiating SmallVectorTemplateCommon whenever we + /// copy-construct an ArrayRef. + template + /*implicit*/ ArrayRef(const SmallVectorTemplateCommon &Vec) + : Data(Vec.data()), Length(Vec.size()) { + } /// Construct an ArrayRef from a std::vector. - /*implicit*/ ArrayRef(const std::vector &Vec) + template + /*implicit*/ ArrayRef(const std::vector &Vec) : Data(Vec.empty() ? (T*)0 : &Vec[0]), Length(Vec.size()) {} /// Construct an ArrayRef from a C array. Modified: stable/9/contrib/llvm/include/llvm/ADT/BitVector.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/ADT/BitVector.h Mon Jan 14 19:47:38 2013 (r245430) +++ stable/9/contrib/llvm/include/llvm/ADT/BitVector.h Mon Jan 14 19:51:26 2013 (r245431) @@ -14,6 +14,7 @@ #ifndef LLVM_ADT_BITVECTOR_H #define LLVM_ADT_BITVECTOR_H +#include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include @@ -97,6 +98,13 @@ public: std::memcpy(Bits, RHS.Bits, Capacity * sizeof(BitWord)); } +#if LLVM_USE_RVALUE_REFERENCES + BitVector(BitVector &&RHS) + : Bits(RHS.Bits), Size(RHS.Size), Capacity(RHS.Capacity) { + RHS.Bits = 0; + } +#endif + ~BitVector() { std::free(Bits); } @@ -164,7 +172,7 @@ public: unsigned BitPos = Prev % BITWORD_SIZE; BitWord Copy = Bits[WordPos]; // Mask off previous bits. - Copy &= ~0L << BitPos; + Copy &= ~0UL << BitPos; if (Copy != 0) { if (sizeof(BitWord) == 4) @@ -229,6 +237,34 @@ public: return *this; } + /// set - Efficiently set a range of bits in [I, E) + BitVector &set(unsigned I, unsigned E) { + assert(I <= E && "Attempted to set backwards range!"); + assert(E <= size() && "Attempted to set out-of-bounds range!"); + + if (I == E) return *this; + + if (I / BITWORD_SIZE == E / BITWORD_SIZE) { + BitWord EMask = 1UL << (E % BITWORD_SIZE); + BitWord IMask = 1UL << (I % BITWORD_SIZE); + BitWord Mask = EMask - IMask; + Bits[I / BITWORD_SIZE] |= Mask; + return *this; + } + + BitWord PrefixMask = ~0UL << (I % BITWORD_SIZE); + Bits[I / BITWORD_SIZE] |= PrefixMask; + I = RoundUpToAlignment(I, BITWORD_SIZE); + + for (; I + BITWORD_SIZE <= E; I += BITWORD_SIZE) + Bits[I / BITWORD_SIZE] = ~0UL; + + BitWord PostfixMask = (1UL << (E % BITWORD_SIZE)) - 1; + Bits[I / BITWORD_SIZE] |= PostfixMask; + + return *this; + } + BitVector &reset() { init_words(Bits, Capacity, false); return *this; @@ -239,6 +275,34 @@ public: return *this; } + /// reset - Efficiently reset a range of bits in [I, E) + BitVector &reset(unsigned I, unsigned E) { + assert(I <= E && "Attempted to reset backwards range!"); + assert(E <= size() && "Attempted to reset out-of-bounds range!"); + + if (I == E) return *this; + + if (I / BITWORD_SIZE == E / BITWORD_SIZE) { + BitWord EMask = 1UL << (E % BITWORD_SIZE); + BitWord IMask = 1UL << (I % BITWORD_SIZE); + BitWord Mask = EMask - IMask; + Bits[I / BITWORD_SIZE] &= ~Mask; + return *this; + } + + BitWord PrefixMask = ~0UL << (I % BITWORD_SIZE); + Bits[I / BITWORD_SIZE] &= ~PrefixMask; + I = RoundUpToAlignment(I, BITWORD_SIZE); + + for (; I + BITWORD_SIZE <= E; I += BITWORD_SIZE) + Bits[I / BITWORD_SIZE] = 0UL; + + BitWord PostfixMask = (1UL << (E % BITWORD_SIZE)) - 1; + Bits[I / BITWORD_SIZE] &= ~PostfixMask; + + return *this; + } + BitVector &flip() { for (unsigned i = 0; i < NumBitWords(size()); ++i) Bits[i] = ~Bits[i]; @@ -251,11 +315,6 @@ public: return *this; } - // No argument flip. - BitVector operator~() const { - return BitVector(*this).flip(); - } - // Indexing. reference operator[](unsigned Idx) { assert (Idx < Size && "Out-of-bounds Bit access."); @@ -272,6 +331,16 @@ public: return (*this)[Idx]; } + /// Test if any common bits are set. + bool anyCommon(const BitVector &RHS) const { + unsigned ThisWords = NumBitWords(size()); + unsigned RHSWords = NumBitWords(RHS.size()); + for (unsigned i = 0, e = std::min(ThisWords, RHSWords); i != e; ++i) + if (Bits[i] & RHS.Bits[i]) + return true; + return false; + } + // Comparison operators. bool operator==(const BitVector &RHS) const { unsigned ThisWords = NumBitWords(size()); @@ -298,7 +367,7 @@ public: return !(*this == RHS); } - // Intersection, union, disjoint union. + /// Intersection, union, disjoint union. BitVector &operator&=(const BitVector &RHS) { unsigned ThisWords = NumBitWords(size()); unsigned RHSWords = NumBitWords(RHS.size()); @@ -315,7 +384,7 @@ public: return *this; } - // reset - Reset bits that are set in RHS. Same as *this &= ~RHS. + /// reset - Reset bits that are set in RHS. Same as *this &= ~RHS. BitVector &reset(const BitVector &RHS) { unsigned ThisWords = NumBitWords(size()); unsigned RHSWords = NumBitWords(RHS.size()); @@ -325,6 +394,23 @@ public: return *this; } + /// test - Check if (This - RHS) is zero. + /// This is the same as reset(RHS) and any(). + bool test(const BitVector &RHS) const { + unsigned ThisWords = NumBitWords(size()); + unsigned RHSWords = NumBitWords(RHS.size()); + unsigned i; + for (i = 0; i != std::min(ThisWords, RHSWords); ++i) + if ((Bits[i] & ~RHS.Bits[i]) != 0) + return true; + + for (; i != ThisWords ; ++i) + if (Bits[i] != 0) + return true; + + return false; + } + BitVector &operator|=(const BitVector &RHS) { if (size() < RHS.size()) resize(RHS.size()); @@ -366,6 +452,21 @@ public: return *this; } +#if LLVM_USE_RVALUE_REFERENCES + const BitVector &operator=(BitVector &&RHS) { + if (this == &RHS) return *this; + + std::free(Bits); + Bits = RHS.Bits; + Size = RHS.Size; + Capacity = RHS.Capacity; + + RHS.Bits = 0; + + return *this; + } +#endif + void swap(BitVector &RHS) { std::swap(Bits, RHS.Bits); std::swap(Size, RHS.Size); @@ -423,8 +524,11 @@ private: // Then set any stray high bits of the last used word. unsigned ExtraBits = Size % BITWORD_SIZE; if (ExtraBits) { - Bits[UsedWords-1] &= ~(~0L << ExtraBits); - Bits[UsedWords-1] |= (0 - (BitWord)t) << ExtraBits; + BitWord ExtraBitMask = ~0UL << ExtraBits; + if (t) + Bits[UsedWords-1] |= ExtraBitMask; + else + Bits[UsedWords-1] &= ~ExtraBitMask; } } @@ -472,24 +576,6 @@ private: } }; -inline BitVector operator&(const BitVector &LHS, const BitVector &RHS) { - BitVector Result(LHS); - Result &= RHS; - return Result; -} - -inline BitVector operator|(const BitVector &LHS, const BitVector &RHS) { - BitVector Result(LHS); - Result |= RHS; - return Result; -} - -inline BitVector operator^(const BitVector &LHS, const BitVector &RHS) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 20:26:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BDD03941; Mon, 14 Jan 2013 20:26:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A459F889; Mon, 14 Jan 2013 20:26:50 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EKQoN8017773; Mon, 14 Jan 2013 20:26:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EKQoXG017771; Mon, 14 Jan 2013 20:26:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201301142026.r0EKQoXG017771@svn.freebsd.org> From: Dimitry Andric Date: Mon, 14 Jan 2013 20:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245432 - stable/9/lib/clang X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 20:26:50 -0000 Author: dim Date: Mon Jan 14 20:26:50 2013 New Revision: 245432 URL: http://svnweb.freebsd.org/changeset/base/245432 Log: Use a direct commit to fix a minor mistake in r245431, before it spreads too far: use the correct FreeBSD version in clang's target triple. That is, $ARCH-unknown-freebsd9.1 instead of $ARCH-unknown-freebsd9.2. This will be bumped again for the 9.2 release, when it branches off. Modified: stable/9/lib/clang/clang.build.mk Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Mon Jan 14 19:51:26 2013 (r245431) +++ stable/9/lib/clang/clang.build.mk Mon Jan 14 20:26:50 2013 (r245432) @@ -13,8 +13,8 @@ CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.2 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd9.2 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.1 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd9.1 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOSTTRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 20:31:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B3278BDE; Mon, 14 Jan 2013 20:31:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4B98CB; Mon, 14 Jan 2013 20:31:46 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EKVk0P020046; Mon, 14 Jan 2013 20:31:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EKVkhq020045; Mon, 14 Jan 2013 20:31:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301142031.r0EKVkhq020045@svn.freebsd.org> From: Alexander Motin Date: Mon, 14 Jan 2013 20:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245433 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 20:31:46 -0000 Author: mav Date: Mon Jan 14 20:31:45 2013 New Revision: 245433 URL: http://svnweb.freebsd.org/changeset/base/245433 Log: Keep value of orig_config_id metadata field. Windows driver writes there previous value of config_id when it is changed in some cases. I guess it may be used do avoid some split-brain conditions. Modified: head/sys/geom/raid/md_intel.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Mon Jan 14 20:26:50 2013 (r245432) +++ head/sys/geom/raid/md_intel.c Mon Jan 14 20:31:45 2013 (r245433) @@ -216,6 +216,7 @@ struct g_raid_md_intel_pervolume { struct g_raid_md_intel_object { struct g_raid_md_object mdio_base; uint32_t mdio_config_id; + uint32_t mdio_orig_config_id; uint32_t mdio_generation; struct intel_raid_conf *mdio_meta; struct callout mdio_start_co; /* STARTING state timer. */ @@ -717,7 +718,7 @@ intel_meta_write_spare(struct g_consumer memcpy(&meta->version[0], INTEL_VERSION_1000, sizeof(INTEL_VERSION_1000) - 1); meta->config_size = INTEL_MAX_MD_SIZE(1); - meta->config_id = arc4random(); + meta->config_id = meta->orig_config_id = arc4random(); meta->generation = 1; meta->total_disks = 1; meta->disk[0] = *d; @@ -1318,7 +1319,7 @@ g_raid_md_create_intel(struct g_raid_md_ char name[16]; mdi = (struct g_raid_md_intel_object *)md; - mdi->mdio_config_id = arc4random(); + mdi->mdio_config_id = mdi->mdio_orig_config_id = arc4random(); mdi->mdio_generation = 0; snprintf(name, sizeof(name), "Intel-%08x", mdi->mdio_config_id); sc = g_raid_create_node(mp, name, md); @@ -1463,6 +1464,7 @@ search: } else { /* Not found matching node -- create one. */ result = G_RAID_MD_TASTE_NEW; mdi->mdio_config_id = meta->config_id; + mdi->mdio_orig_config_id = meta->orig_config_id; snprintf(name, sizeof(name), "Intel-%08x", meta->config_id); sc = g_raid_create_node(mp, name, md); md->mdo_softc = sc; @@ -2292,6 +2294,7 @@ g_raid_md_write_intel(struct g_raid_md_o memcpy(&meta->intel_id[0], INTEL_MAGIC, sizeof(INTEL_MAGIC) - 1); meta->config_size = INTEL_MAX_MD_SIZE(numdisks); meta->config_id = mdi->mdio_config_id; + meta->orig_config_id = mdi->mdio_orig_config_id; meta->generation = mdi->mdio_generation; meta->attributes = INTEL_ATTR_CHECKSUM; meta->total_disks = numdisks; From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 20:36:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3F00ADA6; Mon, 14 Jan 2013 20:36:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 21CD78F8; Mon, 14 Jan 2013 20:36:24 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EKaO2g020698; Mon, 14 Jan 2013 20:36:24 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EKaNB5020689; Mon, 14 Jan 2013 20:36:23 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301142036.r0EKaNB5020689@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 14 Jan 2013 20:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245434 - in head/sys: dev/cxgbe dev/cxgbe/common dev/cxgbe/tom modules/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 20:36:24 -0000 Author: np Date: Mon Jan 14 20:36:22 2013 New Revision: 245434 URL: http://svnweb.freebsd.org/changeset/base/245434 Log: cxgbe(4): Updates to the hardware L2 table management code. - Add full support for IPv6 addresses. - Read the size of the L2 table during attach. Do not assume that PCIe physical function 4 of the card has all of the table to itself. - Use FNV instead of Jenkins to hash L3 addresses and drop the private copy of jhash.h from the driver. MFC after: 1 week Deleted: head/sys/dev/cxgbe/common/jhash.h Modified: head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_l2t.c head/sys/dev/cxgbe/t4_l2t.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_tom_l2t.c head/sys/modules/cxgbe/tom/Makefile Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Mon Jan 14 20:31:45 2013 (r245433) +++ head/sys/dev/cxgbe/offload.h Mon Jan 14 20:36:22 2013 (r245434) @@ -104,8 +104,8 @@ struct tid_info { }; struct t4_range { - unsigned int start; - unsigned int size; + u_int start; + u_int size; }; struct t4_virt_res { /* virtualized HW resources */ @@ -117,6 +117,7 @@ struct t4_virt_res { struct t4_range qp; struct t4_range cq; struct t4_range ocq; + struct t4_range l2t; }; #ifdef TCP_OFFLOAD Modified: head/sys/dev/cxgbe/t4_l2t.c ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.c Mon Jan 14 20:31:45 2013 (r245433) +++ head/sys/dev/cxgbe/t4_l2t.c Mon Jan 14 20:36:22 2013 (r245434) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include "common/common.h" -#include "common/jhash.h" #include "common/t4_msg.h" #include "t4_l2t.h" @@ -78,7 +77,7 @@ t4_alloc_l2e(struct l2t_data *d) return (NULL); /* there's definitely a free entry */ - for (e = d->rover, end = &d->l2tab[L2T_SIZE]; e != end; ++e) + for (e = d->rover, end = &d->l2tab[d->l2t_size]; e != end; ++e) if (atomic_load_acq_int(&e->refcnt) == 0) goto found; @@ -115,6 +114,7 @@ t4_write_l2e(struct adapter *sc, struct { struct wrqe *wr; struct cpl_l2t_write_req *req; + int idx = e->idx + sc->vres.l2t.start; mtx_assert(&e->lock, MA_OWNED); @@ -124,10 +124,10 @@ t4_write_l2e(struct adapter *sc, struct req = wrtod(wr); INIT_TP_WR(req, 0); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, e->idx | + OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | V_SYNC_WR(sync) | V_TID_QID(sc->sge.fwq.abs_id))); req->params = htons(V_L2T_W_PORT(e->lport) | V_L2T_W_NOREPLY(!sync)); - req->l2t_idx = htons(e->idx); + req->l2t_idx = htons(idx); req->vlan = htons(e->vlan); memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); @@ -183,18 +183,24 @@ t4_l2t_set_switching(struct adapter *sc, int t4_init_l2t(struct adapter *sc, int flags) { - int i; + int i, l2t_size; struct l2t_data *d; - d = malloc(sizeof(*d), M_CXGBE, M_ZERO | flags); + l2t_size = sc->vres.l2t.size; + if (l2t_size < 2) /* At least 1 bucket for IP and 1 for IPv6 */ + return (EINVAL); + + d = malloc(sizeof(*d) + l2t_size * sizeof (struct l2t_entry), M_CXGBE, + M_ZERO | flags); if (!d) return (ENOMEM); + d->l2t_size = l2t_size; d->rover = d->l2tab; - atomic_store_rel_int(&d->nfree, L2T_SIZE); + atomic_store_rel_int(&d->nfree, l2t_size); rw_init(&d->lock, "L2T"); - for (i = 0; i < L2T_SIZE; i++) { + for (i = 0; i < l2t_size; i++) { struct l2t_entry *e = &d->l2tab[i]; e->idx = i; @@ -215,7 +221,7 @@ t4_free_l2t(struct l2t_data *d) { int i; - for (i = 0; i < L2T_SIZE; i++) + for (i = 0; i < d->l2t_size; i++) mtx_destroy(&d->l2tab[i].lock); rw_destroy(&d->lock); free(d, M_CXGBE); @@ -229,11 +235,11 @@ do_l2t_write_rpl(struct sge_iq *iq, cons { const struct cpl_l2t_write_rpl *rpl = (const void *)(rss + 1); unsigned int tid = GET_TID(rpl); - unsigned int idx = tid & (L2T_SIZE - 1); + unsigned int idx = tid % L2T_SIZE; if (__predict_false(rpl->status != CPL_ERR_NONE)) { log(LOG_ERR, - "Unexpected L2T_WRITE_RPL status %u for entry %u\n", + "Unexpected L2T_WRITE_RPL (%u) for entry at hw_idx %u\n", rpl->status, idx); return (EINVAL); } @@ -269,7 +275,7 @@ sysctl_l2t(SYSCTL_HANDLER_ARGS) struct l2t_entry *e; struct sbuf *sb; int rc, i, header = 0; - char ip[60]; + char ip[INET6_ADDRSTRLEN]; if (l2t == NULL) return (ENXIO); @@ -283,7 +289,7 @@ sysctl_l2t(SYSCTL_HANDLER_ARGS) return (ENOMEM); e = &l2t->l2tab[0]; - for (i = 0; i < L2T_SIZE; i++, e++) { + for (i = 0; i < l2t->l2t_size; i++, e++) { mtx_lock(&e->lock); if (e->state == L2T_STATE_UNUSED) goto skip; @@ -295,11 +301,15 @@ sysctl_l2t(SYSCTL_HANDLER_ARGS) } if (e->state == L2T_STATE_SWITCHING) ip[0] = 0; - else - snprintf(ip, sizeof(ip), "%s", - inet_ntoa(*(struct in_addr *)&e->addr)); + else { + inet_ntop(e->ipv6 ? AF_INET6 : AF_INET, &e->addr[0], + &ip[0], sizeof(ip)); + } - /* XXX: e->ifp may not be around */ + /* + * XXX: e->ifp may not be around. + * XXX: IPv6 addresses may not align properly in the output. + */ sbuf_printf(sb, "\n%4u %-15s %02x:%02x:%02x:%02x:%02x:%02x %4d" " %u %2u %c %5u %s", e->idx, ip, e->dmac[0], e->dmac[1], e->dmac[2], Modified: head/sys/dev/cxgbe/t4_l2t.h ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.h Mon Jan 14 20:31:45 2013 (r245433) +++ head/sys/dev/cxgbe/t4_l2t.h Mon Jan 14 20:36:22 2013 (r245434) @@ -60,7 +60,7 @@ enum { struct l2t_entry { uint16_t state; /* entry state */ uint16_t idx; /* entry index */ - uint32_t addr; /* next hop IP address */ + uint32_t addr[4]; /* next hop IP or IPv6 address */ struct ifnet *ifp; /* outgoing interface */ uint16_t smt_idx; /* SMT index */ uint16_t vlan; /* VLAN TCI (id: 0-11, prio: 13-15) */ @@ -70,15 +70,17 @@ struct l2t_entry { struct mtx lock; volatile int refcnt; /* entry reference count */ uint16_t hash; /* hash bucket the entry is on */ + uint8_t ipv6; /* entry is for an IPv6 address */ uint8_t lport; /* associated offload logical port */ uint8_t dmac[ETHER_ADDR_LEN]; /* next hop's MAC address */ }; struct l2t_data { struct rwlock lock; + u_int l2t_size; volatile int nfree; /* number of free entries */ struct l2t_entry *rover;/* starting point for next allocation */ - struct l2t_entry l2tab[L2T_SIZE]; + struct l2t_entry l2tab[]; }; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Jan 14 20:31:45 2013 (r245433) +++ head/sys/dev/cxgbe/t4_main.c Mon Jan 14 20:36:22 2013 (r245434) @@ -1866,7 +1866,9 @@ get_params__post_init(struct adapter *sc param[1] = FW_PARAM_PFVF(EQ_START); param[2] = FW_PARAM_PFVF(FILTER_START); param[3] = FW_PARAM_PFVF(FILTER_END); - rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + param[4] = FW_PARAM_PFVF(L2T_START); + param[5] = FW_PARAM_PFVF(L2T_END); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); if (rc != 0) { device_printf(sc->dev, "failed to query parameters (post_init): %d.\n", rc); @@ -1877,6 +1879,11 @@ get_params__post_init(struct adapter *sc sc->sge.eq_start = val[1]; sc->tids.ftid_base = val[2]; sc->tids.nftids = val[3] - val[2] + 1; + sc->vres.l2t.start = val[4]; + sc->vres.l2t.size = val[5] - val[4] + 1; + KASSERT(sc->vres.l2t.size <= L2T_SIZE, + ("%s: L2 table size (%u) larger than expected (%u)", + __func__, sc->vres.l2t.size, L2T_SIZE)); /* get capabilites */ bzero(&caps, sizeof(caps)); Modified: head/sys/dev/cxgbe/tom/t4_tom_l2t.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom_l2t.c Mon Jan 14 20:31:45 2013 (r245433) +++ head/sys/dev/cxgbe/tom/t4_tom_l2t.c Mon Jan 14 20:36:22 2013 (r245434) @@ -27,6 +27,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #ifdef TCP_OFFLOAD #include @@ -34,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -48,28 +50,89 @@ __FBSDID("$FreeBSD$"); #include #include "common/common.h" -#include "common/jhash.h" #include "common/t4_msg.h" #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" #define VLAN_NONE 0xfff -#define SA(x) ((struct sockaddr *)(x)) -#define SIN(x) ((struct sockaddr_in *)(x)) -#define SINADDR(x) (SIN(x)->sin_addr.s_addr) - static inline void l2t_hold(struct l2t_data *d, struct l2t_entry *e) { + if (atomic_fetchadd_int(&e->refcnt, 1) == 0) /* 0 -> 1 transition */ atomic_subtract_int(&d->nfree, 1); } -static inline unsigned int -arp_hash(const uint32_t key, int ifindex) +static inline u_int +l2_hash(struct l2t_data *d, const struct sockaddr *sa, int ifindex) +{ + u_int hash, half = d->l2t_size / 2, start = 0; + const void *key; + size_t len; + + KASSERT(sa->sa_family == AF_INET || sa->sa_family == AF_INET6, + ("%s: sa %p has unexpected sa_family %d", __func__, sa, + sa->sa_family)); + + if (sa->sa_family == AF_INET) { + const struct sockaddr_in *sin = (const void *)sa; + + key = &sin->sin_addr; + len = sizeof(sin->sin_addr); + } else { + const struct sockaddr_in6 *sin6 = (const void *)sa; + + key = &sin6->sin6_addr; + len = sizeof(sin6->sin6_addr); + start = half; + } + + hash = fnv_32_buf(key, len, FNV1_32_INIT); + hash = fnv_32_buf(&ifindex, sizeof(ifindex), hash); + hash %= half; + + return (hash + start); +} + +static inline int +l2_cmp(const struct sockaddr *sa, struct l2t_entry *e) +{ + + KASSERT(sa->sa_family == AF_INET || sa->sa_family == AF_INET6, + ("%s: sa %p has unexpected sa_family %d", __func__, sa, + sa->sa_family)); + + if (sa->sa_family == AF_INET) { + const struct sockaddr_in *sin = (const void *)sa; + + return (e->addr[0] != sin->sin_addr.s_addr); + } else { + const struct sockaddr_in6 *sin6 = (const void *)sa; + + return (memcmp(&e->addr[0], &sin6->sin6_addr, sizeof(e->addr))); + } +} + +static inline void +l2_store(const struct sockaddr *sa, struct l2t_entry *e) { - return jhash_2words(key, ifindex, 0) & (L2T_SIZE - 1); + + KASSERT(sa->sa_family == AF_INET || sa->sa_family == AF_INET6, + ("%s: sa %p has unexpected sa_family %d", __func__, sa, + sa->sa_family)); + + if (sa->sa_family == AF_INET) { + const struct sockaddr_in *sin = (const void *)sa; + + e->addr[0] = sin->sin_addr.s_addr; + e->ipv6 = 0; + } else { + const struct sockaddr_in6 *sin6 = (const void *)sa; + + memcpy(&e->addr[0], &sin6->sin6_addr, sizeof(e->addr)); + e->ipv6 = 1; + } } /* @@ -100,7 +163,7 @@ send_pending(struct adapter *sc, struct static void resolution_failed_for_wr(struct wrqe *wr) { - log(LOG_ERR, "%s: leaked work request %p, wr_len %d", __func__, wr, + log(LOG_ERR, "%s: leaked work request %p, wr_len %d\n", __func__, wr, wr->wr_len); /* free(wr, M_CXGBE); */ @@ -175,15 +238,25 @@ resolve_entry(struct adapter *sc, struct struct tom_data *td = sc->tom_softc; struct toedev *tod = &td->tod; struct sockaddr_in sin = {0}; + struct sockaddr_in6 sin6 = {0}; + struct sockaddr *sa; uint8_t dmac[ETHER_ADDR_LEN]; uint16_t vtag = VLAN_NONE; int rc; - sin.sin_family = AF_INET; - sin.sin_len = sizeof(struct sockaddr_in); - SINADDR(&sin) = e->addr; + if (e->ipv6 == 0) { + sin.sin_family = AF_INET; + sin.sin_len = sizeof(struct sockaddr_in); + sin.sin_addr.s_addr = e->addr[0]; + sa = (void *)&sin; + } else { + sin6.sin6_family = AF_INET6; + sin6.sin6_len = sizeof(struct sockaddr_in6); + memcpy(&sin6.sin6_addr, &e->addr[0], sizeof(e->addr)); + sa = (void *)&sin6; + } - rc = toe_l2_resolve(tod, e->ifp, SA(&sin), dmac, &vtag); + rc = toe_l2_resolve(tod, e->ifp, sa, dmac, &vtag); if (rc == EWOULDBLOCK) return (rc); @@ -263,7 +336,7 @@ do_l2t_write_rpl2(struct sge_iq *iq, con struct adapter *sc = iq->adapter; const struct cpl_l2t_write_rpl *rpl = (const void *)(rss + 1); unsigned int tid = GET_TID(rpl); - unsigned int idx = tid & (L2T_SIZE - 1); + unsigned int idx = tid % L2T_SIZE; int rc; rc = do_l2t_write_rpl(iq, rss, m); @@ -271,7 +344,7 @@ do_l2t_write_rpl2(struct sge_iq *iq, con return (rc); if (tid & F_SYNC_WR) { - struct l2t_entry *e = &sc->l2t->l2tab[idx]; + struct l2t_entry *e = &sc->l2t->l2tab[idx - sc->vres.l2t.start]; mtx_lock(&e->lock); if (e->state != L2T_STATE_SWITCHING) { @@ -310,21 +383,22 @@ t4_l2t_get(struct port_info *pi, struct { struct l2t_entry *e; struct l2t_data *d = pi->adapter->l2t; - uint32_t addr = SINADDR(sa); - int hash = arp_hash(addr, ifp->if_index); - unsigned int smt_idx = pi->port_id; + u_int hash, smt_idx = pi->port_id; - if (sa->sa_family != AF_INET) - return (NULL); /* XXX: no IPv6 support right now */ + KASSERT(sa->sa_family == AF_INET || sa->sa_family == AF_INET6, + ("%s: sa %p has unexpected sa_family %d", __func__, sa, + sa->sa_family)); #ifndef VLAN_TAG if (ifp->if_type == IFT_L2VLAN) return (NULL); #endif + hash = l2_hash(d, sa, ifp->if_index); rw_wlock(&d->lock); for (e = d->l2tab[hash].first; e; e = e->next) { - if (e->addr == addr && e->ifp == ifp && e->smt_idx == smt_idx) { + if (l2_cmp(sa, e) == 0 && e->ifp == ifp && + e->smt_idx == smt_idx) { l2t_hold(d, e); goto done; } @@ -338,7 +412,7 @@ t4_l2t_get(struct port_info *pi, struct d->l2tab[hash].first = e; e->state = L2T_STATE_RESOLVING; - e->addr = addr; + l2_store(sa, e); e->ifp = ifp; e->smt_idx = smt_idx; e->hash = hash; @@ -368,14 +442,14 @@ t4_l2_update(struct toedev *tod, struct struct adapter *sc = tod->tod_softc; struct l2t_entry *e; struct l2t_data *d = sc->l2t; - uint32_t addr = SINADDR(sa); - int hash = arp_hash(addr, ifp->if_index); + u_int hash; KASSERT(d != NULL, ("%s: no L2 table", __func__)); + hash = l2_hash(d, sa, ifp->if_index); rw_rlock(&d->lock); for (e = d->l2tab[hash].first; e; e = e->next) { - if (e->addr == addr && e->ifp == ifp) { + if (l2_cmp(sa, e) == 0 && e->ifp == ifp) { mtx_lock(&e->lock); if (atomic_load_acq_int(&e->refcnt)) goto found; Modified: head/sys/modules/cxgbe/tom/Makefile ============================================================================== --- head/sys/modules/cxgbe/tom/Makefile Mon Jan 14 20:31:45 2013 (r245433) +++ head/sys/modules/cxgbe/tom/Makefile Mon Jan 14 20:36:22 2013 (r245434) @@ -10,15 +10,20 @@ CXGBE = ${.CURDIR}/../../../dev/cxgbe KMOD = t4_tom SRCS = t4_tom.c t4_connect.c t4_listen.c t4_cpl_io.c t4_tom_l2t.c t4_ddp.c SRCS+= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${CXGBE} .if !defined(KERNBUILDDIR) .if ${MK_INET_SUPPORT} != "no" opt_inet.h: - echo "#define INET 1" > ${.TARGET} - echo "#define TCP_OFFLOAD 1" >> ${.TARGET} + @echo "#define INET 1" > ${.TARGET} + @echo "#define TCP_OFFLOAD 1" >> ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} .endif .endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 20:38:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A1DC4F36; Mon, 14 Jan 2013 20:38:33 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 93742916; Mon, 14 Jan 2013 20:38:33 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EKcXvr021016; Mon, 14 Jan 2013 20:38:33 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EKcXIQ021013; Mon, 14 Jan 2013 20:38:33 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301142038.r0EKcXIQ021013@svn.freebsd.org> From: Brooks Davis Date: Mon, 14 Jan 2013 20:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245435 - in head: share/man/man5 tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 20:38:33 -0000 Author: brooks Date: Mon Jan 14 20:38:32 2013 New Revision: 245435 URL: http://svnweb.freebsd.org/changeset/base/245435 Log: Remember the . in .\" in the WITH_NMTREE file and regenerate the output. Reported by: joeld Modified: head/share/man/man5/src.conf.5 head/tools/build/options/WITH_NMTREE Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Jan 14 20:36:22 2013 (r245434) +++ head/share/man/man5/src.conf.5 Mon Jan 14 20:38:32 2013 (r245435) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd January 9, 2013 +.Dd January 14, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -805,7 +805,7 @@ Set to not build NLS catalogs. Set to not build NLS catalog support for .Xr csh 1 . .It Va WITH_NMTREE -\" $FreeBSD$ +.\" from FreeBSD: head/tools/build/options/WITH_NMTREE 245241 2013-01-09 21:07:08Z brooks Set to install .Xr nmtree 8 as Modified: head/tools/build/options/WITH_NMTREE ============================================================================== --- head/tools/build/options/WITH_NMTREE Mon Jan 14 20:36:22 2013 (r245434) +++ head/tools/build/options/WITH_NMTREE Mon Jan 14 20:38:32 2013 (r245435) @@ -1,4 +1,4 @@ -\" $FreeBSD$ +.\" $FreeBSD$ Set to install .Xr nmtree 8 as From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 20:49:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5CECD375; Mon, 14 Jan 2013 20:49:38 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 430EB975; Mon, 14 Jan 2013 20:49:38 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EKncfw024159; Mon, 14 Jan 2013 20:49:38 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EKnbjk024156; Mon, 14 Jan 2013 20:49:37 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201301142049.r0EKnbjk024156@svn.freebsd.org> From: Jim Harris Date: Mon, 14 Jan 2013 20:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r245436 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 20:49:38 -0000 Author: jimharris Date: Mon Jan 14 20:49:37 2013 New Revision: 245436 URL: http://svnweb.freebsd.org/changeset/base/245436 Log: Please welcome Carl Delsey (carl@) as a new src committer. Carl will be primarily working on storage-related drivers for Intel CPUs and chipsets. I will serve as Carl's mentor. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Jan 14 20:38:32 2013 (r245435) +++ svnadmin/conf/access Mon Jan 14 20:49:37 2013 (r245436) @@ -48,6 +48,7 @@ bruno bryanv bschmidt bz +carl charnier cherry cognet Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Jan 14 20:38:32 2013 (r245435) +++ svnadmin/conf/mentors Mon Jan 14 20:49:37 2013 (r245436) @@ -15,6 +15,7 @@ art avg Co-mentor: marcel benl philip Co-mentor: simon bgray cognet bryanv grehan +carl jimharris davidcs gnn eadler cperciva eri mlaier Co-mentor: thompsa From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 21:03:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2F436A74; Mon, 14 Jan 2013 21:03:38 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 121B4A3C; Mon, 14 Jan 2013 21:03:38 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EL3cCU029380; Mon, 14 Jan 2013 21:03:38 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EL3ZhZ029362; Mon, 14 Jan 2013 21:03:35 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201301142103.r0EL3ZhZ029362@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Jan 2013 21:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245437 - in head/usr.sbin/bsdconfig: console password password/share share startup startup/share usermgmt usermgmt/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 21:03:38 -0000 Author: dteske Date: Mon Jan 14 21:03:34 2013 New Revision: 245437 URL: http://svnweb.freebsd.org/changeset/base/245437 Log: Don't use f_show_msg() unless printf(1) syntax is required (this reduces the number of unnecessary forks). Modified: head/usr.sbin/bsdconfig/console/ttys head/usr.sbin/bsdconfig/password/password head/usr.sbin/bsdconfig/password/share/password.subr head/usr.sbin/bsdconfig/share/mustberoot.subr head/usr.sbin/bsdconfig/share/variable.subr head/usr.sbin/bsdconfig/startup/misc head/usr.sbin/bsdconfig/startup/rcdelete head/usr.sbin/bsdconfig/startup/rcvar head/usr.sbin/bsdconfig/startup/share/rcconf.subr head/usr.sbin/bsdconfig/startup/share/rcedit.subr head/usr.sbin/bsdconfig/usermgmt/groupinput head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr head/usr.sbin/bsdconfig/usermgmt/userinput Modified: head/usr.sbin/bsdconfig/console/ttys ============================================================================== --- head/usr.sbin/bsdconfig/console/ttys Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/console/ttys Mon Jan 14 21:03:34 2013 (r245437) @@ -192,7 +192,7 @@ while :; do err=$( ttys_set_type "$consterm" 2>&1 ) [ "$err" ] || break - f_show_msg "%s" "$err" + f_dialog_msgbox "$err" done exit $SUCCESS Modified: head/usr.sbin/bsdconfig/password/password ============================================================================== --- head/usr.sbin/bsdconfig/password/password Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/password/password Mon Jan 14 21:03:34 2013 (r245437) @@ -72,7 +72,7 @@ f_mustberoot_init if f_dialog_input_password; then err=$( echo "$pw_password" | pw usermod $USER_ROOT -h 0 2>&1 ) || f_die $? "%s" "$err" - f_show_msg "$msg_password_changed" + f_dialog_msgbox "$msg_password_changed" fi return $SUCCESS Modified: head/usr.sbin/bsdconfig/password/share/password.subr ============================================================================== --- head/usr.sbin/bsdconfig/password/share/password.subr Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/password/share/password.subr Mon Jan 14 21:03:34 2013 (r245437) @@ -108,13 +108,13 @@ f_dialog_input_password() # Check for NULL entry if ! [ "$_password1" -o "$_password2" ]; then - f_show_msg "$msg_password_is_empty" + f_dialog_msgbox "$msg_password_is_empty" continue fi # Check for password mismatch if [ "$_password1" != "$_password2" ]; then - f_show_msg "$msg_passwords_do_not_match" + f_dialog_msgbox "$msg_passwords_do_not_match" continue fi Modified: head/usr.sbin/bsdconfig/share/mustberoot.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/mustberoot.subr Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/share/mustberoot.subr Mon Jan 14 21:03:34 2013 (r245437) @@ -128,7 +128,7 @@ f_become_root_via_sudo() 1) # Always try sudo(8) when run as $user local err if ! err=$( touch "$checkpath" 2>&1 ); then - f_show_msg "%s" "$err" + f_dialog_msgbox "$err" else f_show_msg "$msg_created_path" "$checkpath" fi Modified: head/usr.sbin/bsdconfig/share/variable.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/variable.subr Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/share/variable.subr Mon Jan 14 21:03:34 2013 (r245437) @@ -118,7 +118,7 @@ f_variable_set_defaults() # # Dump a list of registered/advertised variables and their respective values to # $VARIABLE_DUMPFILE. Returns success unless the file couldn't be written. If -# an error occurs, it is displayed using f_show_msg() (from common.subr). +# an error occurs, it is displayed using f_dialog_msgbox() (from dialog.subr). # f_dump_variables() { @@ -131,7 +131,7 @@ f_dump_variables() printf "%s='%s'\n" "$var" "$value" done > "$VARIABLE_DUMPFILE" ) 2>&1 ); then - f_show_msg "%s" "$err" + f_dialog_msgbox "$err" return $FAILURE fi } Modified: head/usr.sbin/bsdconfig/startup/misc ============================================================================== --- head/usr.sbin/bsdconfig/startup/misc Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/startup/misc Mon Jan 14 21:03:34 2013 (r245437) @@ -307,14 +307,14 @@ while :; do ?" [X] "*) err=$( f_sysrc_set apm_enable NO 2>&1 ) ;; ?" [ ] "*) err=$( f_sysrc_set apm_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; ?" ["?"] $msg_startup_dirs") dialog_input_value \ "$msg_startup_dirs_desc" \ "$( f_sysrc_get local_startup )" if [ $? -eq $SUCCESS ]; then err=$( f_sysrc_set local_startup "$value" ) || - f_show_msg "%s\n" "$err" + f_dialog_msgbox "$err\n" fi ;; ?" ["?"] $msg_named") @@ -322,14 +322,14 @@ while :; do ?" [X] "*) err=$( f_sysrc_set named_enable NO 2>&1 ) ;; ?" [ ] "*) err=$( f_sysrc_set named_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; ?" ["?"] $msg_named_flags") dialog_input_value \ "$msg_named_flags_desc" \ "$( f_sysrc_get named_flags )" if [ $? -eq $SUCCESS ]; then err=$( f_sysrc_set named_flags "$value" ) || - f_show_msg "%s\n" "$err" + f_dialog_msgbox "$err\n" fi ;; ?" ["?"] $msg_nis_client") @@ -339,14 +339,14 @@ while :; do err=$( f_sysrc_set nis_client_enable YES 2>&1 ) \ && err=$( f_sysrc_set rpcbind_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; ?" ["?"] $msg_nis_domainname") dialog_input_value \ "$msg_nis_domainname_desc" \ "$( f_sysrc_get nisdomainname )" if [ $? -eq $SUCCESS ]; then err=$( f_sysrc_set nisdomainname "$value" ) || - f_show_msg "%s\n" "$err" + f_dialog_msgbox "$err\n" fi ;; ?" ["?"] $msg_nis_server") @@ -356,31 +356,31 @@ while :; do err=$( f_sysrc_set nis_server_enable YES 2>&1 ) \ && err=$( f_sysrc_set rpcbind_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; ?" ["?"] $msg_accounting") case "$mtag" in ?" [X] "*) err=$( f_sysrc_set accounting_enable NO 2>&1 ) ;; ?" [ ] "*) err=$( f_sysrc_set accounting_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; ?" ["?"] $msg_lpd") case "$mtag" in ?" [X] "*) err=$( f_sysrc_set lpd_enable NO 2>&1 ) ;; ?" [ ] "*) err=$( f_sysrc_set lpd_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; ?" ["?"] $msg_sco") case "$mtag" in ?" [X] "*) err=$( f_sysrc_set ibcs2_enable NO 2>&1 ) ;; ?" [ ] "*) err=$( f_sysrc_set ibcs2_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; ?" ["?"] $msg_svr4") case "$mtag" in ?" [X] "*) err=$( f_sysrc_set svr4_enable NO 2>&1 ) ;; ?" [ ] "*) err=$( f_sysrc_set svr4_enable YES 2>&1 ) ;; esac - [ $? -eq $SUCCESS ] || f_show_msg "%s\n" "$err" ;; + [ $? -eq $SUCCESS ] || f_dialog_msgbox "$err\n" ;; esac done Modified: head/usr.sbin/bsdconfig/startup/rcdelete ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcdelete Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/startup/rcdelete Mon Jan 14 21:03:34 2013 (r245437) @@ -318,7 +318,7 @@ while :; do for var in $delete_vars; do err=$( f_sysrc_delete $var 2>&1 ) if [ $? -ne $SUCCESS ]; then - f_show_msg "%s\n" "$err" + f_dialog_msgbox "$err\n" break fi done Modified: head/usr.sbin/bsdconfig/startup/rcvar ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcvar Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/startup/rcvar Mon Jan 14 21:03:34 2013 (r245437) @@ -194,7 +194,7 @@ while :; do esac err=$( f_sysrc_set "$rcvar" "$value" 2>&1 ) || - f_show_msg "$err" + f_dialog_msgbox "$err" esac done Modified: head/usr.sbin/bsdconfig/startup/share/rcconf.subr ============================================================================== --- head/usr.sbin/bsdconfig/startup/share/rcconf.subr Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/startup/share/rcconf.subr Mon Jan 14 21:03:34 2013 (r245437) @@ -432,14 +432,14 @@ f_dialog_input_rcvar() # Check for invalid entry (1of2) if ! echo "$_input" | grep -q "^[[:alpha:]_]"; then - f_show_msg "$msg_rcvar_must_start_with" + f_dialog_msgbox "$msg_rcvar_must_start_with" continue fi # Check for invalid entry (2of2) if ! echo "$_input" | grep -q "^[[:alpha:]_][[:alnum:]_]*$" then - f_show_msg "$msg_rcvar_contains_invalid_chars" + f_dialog_msgbox "$msg_rcvar_contains_invalid_chars" continue fi Modified: head/usr.sbin/bsdconfig/startup/share/rcedit.subr ============================================================================== --- head/usr.sbin/bsdconfig/startup/share/rcedit.subr Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/startup/share/rcedit.subr Mon Jan 14 21:03:34 2013 (r245437) @@ -78,8 +78,7 @@ f_dialog_rcedit() f_dprintf "%s: [%s]->[%s]" "$var" "$cur_val" "$_input" - err=$( f_sysrc_set "$var" "$_input" 2>&1 ) || - f_show_msg "$err" + err=$( f_sysrc_set "$var" "$_input" 2>&1 ) || f_dialog_msgbox "$err" } ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/usermgmt/groupinput ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupinput Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/usermgmt/groupinput Mon Jan 14 21:03:34 2013 (r245437) @@ -63,10 +63,10 @@ save_changes() err=$( pw groupdel "$group_name" 2>&1 ) retval=$? if [ $retval -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_error" "$err" + f_dialog_msgbox "$msg_error $err\n" return $retval fi - f_show_msg "$msg_group_deleted" + f_dialog_msgbox "$msg_group_deleted" ;; Add) local cmd="pw groupadd -n '$group_name'" @@ -82,10 +82,10 @@ save_changes() err=$( eval $cmd 2>&1 ) retval=$? if [ $retval -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_error" "$err" + f_dialog_msgbox "$msg_error $err\n" return $retval fi - f_show_msg "$msg_group_added" + f_dialog_msgbox "$msg_group_added" ;; Edit/View) local cmd="pw groupmod -n '$group_name'" @@ -101,10 +101,10 @@ save_changes() err=$( eval $cmd 2>&1 ) retval=$? if [ $retval -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_error" "$err" + f_dialog_msgbox "$msg_error $err\n" return $retval fi - f_show_msg "$msg_group_updated" + f_dialog_msgbox "$msg_group_updated" ;; esac Modified: head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr Mon Jan 14 21:03:34 2013 (r245437) @@ -134,13 +134,13 @@ f_dialog_input_group_name() # Check for NULL entry if [ ! "$_input" ]; then - f_show_msg "$msg_group_is_empty" + f_dialog_msgbox "$msg_group_is_empty" continue fi # Check for invalid entry if ! echo "$_input" | grep -q "^[[:alpha:]]"; then - f_show_msg "$msg_group_must_start_with_letter" + f_dialog_msgbox "$msg_group_must_start_with_letter" continue fi @@ -229,7 +229,7 @@ f_dialog_input_group_password() # Check for password mismatch if [ "$_password1" != "$_password2" ]; then - f_show_msg "$msg_group_passwords_do_not_match" + f_dialog_msgbox "$msg_group_passwords_do_not_match" continue fi Modified: head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Mon Jan 14 21:03:34 2013 (r245437) @@ -239,13 +239,13 @@ f_dialog_input_name() # Check for NULL entry if [ ! "$_input" ]; then - f_show_msg "$msg_login_is_empty" + f_dialog_msgbox "$msg_login_is_empty" continue fi # Check for invalid entry if ! echo "$_input" | grep -q "^[[:alpha:]]"; then - f_show_msg "$msg_login_must_start_with_letter" + f_dialog_msgbox "$msg_login_must_start_with_letter" continue fi @@ -334,7 +334,7 @@ f_dialog_input_password() # Check for password mismatch if [ "$_password1" != "$_password2" ]; then - f_show_msg "$msg_passwords_do_not_match" + f_dialog_msgbox "$msg_passwords_do_not_match" continue fi @@ -589,7 +589,7 @@ f_dialog_input_change() # Taint-check the user's input if ! f_isinteger "$ret_days"; then - f_show_msg "$msg_invalid_number_of_days" + f_dialog_msgbox "$msg_invalid_number_of_days" continue fi @@ -616,7 +616,8 @@ f_dialog_input_change() # Taint-check the user's input if ! f_isinteger "${_input:-0}"; then - f_show_msg "$msg_invalid_number_of_seconds" + f_dialog_msgbox \ + "$msg_invalid_number_of_seconds" continue fi @@ -773,7 +774,7 @@ f_dialog_input_expire() # Taint-check the user's input if ! f_isinteger "$ret_days"; then - f_show_msg "$msg_invalid_number_of_days" + f_dialog_msgbox "$msg_invalid_number_of_days" continue fi @@ -800,7 +801,8 @@ f_dialog_input_expire() # Taint-check the user's input if ! f_isinteger "${_input:-0}"; then - f_show_msg "$msg_invalid_number_of_seconds" + f_dialog_msgbox \ + "$msg_invalid_number_of_seconds" continue fi Modified: head/usr.sbin/bsdconfig/usermgmt/userinput ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/userinput Mon Jan 14 20:49:37 2013 (r245436) +++ head/usr.sbin/bsdconfig/usermgmt/userinput Mon Jan 14 21:03:34 2013 (r245437) @@ -81,22 +81,22 @@ save_changes() err=$( pw userdel -u "$pw_uid" 2>&1 ) retval=$? if [ $retval -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_error" "$err" + f_dialog_msgbox "$msg_error $err\n" return $retval fi - f_show_msg "$msg_login_deleted" + f_dialog_msgbox "$msg_login_deleted" if [ "$pw_group_delete" = "$msg_yes" ] && f_quietly pw groupshow -g "$pw_gid" then err=$( pw groupdel -g "$pw_gid" 2>&1 ) || - f_show_msg "%s %s\n" "$msg_warning" "$err" + f_dialog_msgbox "$msg_warning $err\n" fi if [ "$pw_home_delete" = "$msg_yes" ]; then f_dialog_info "$msg_deleting_home_directory" err=$( rm -Rf "$pw_home_dir" 2>&1 ) || - f_show_msg "%s %s\n" "$msg_warning" "$err" + f_dialog_msgbox "$msg_warning $err\n" fi ;; Add) @@ -119,26 +119,26 @@ save_changes() err=$( eval $cmd 2>&1 ) retval=$? if [ $retval -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_error" "$err" + f_dialog_msgbox "$msg_error $err\n" return $retval fi - f_show_msg "$msg_login_added" + f_dialog_msgbox "$msg_login_added" if [ "$pw_home_create" = "$msg_yes" ]; then err=$( mkdir -p "$pw_home_dir" 2>&1 ) if [ $? -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_warning" "$err" + f_dialog_msgbox "$msg_warning $err\n" elif [ -e "$pw_home_dir" ]; then err=$( chown -R "$pw_uid:$pw_gid" \ "$pw_home_dir" 2>&1 ) - [ $? -eq $SUCCESS ] || f_show_msg \ - "%s %s\n" "$msg_warning" "$err" + [ $? -eq $SUCCESS ] || + f_dialog_msgbox "$msg_warning $err\n" fi fi if [ "$pw_dotfiles_create" = "$msg_yes" ]; then err=$( copy_dotfiles 2>&1 ) || - f_show_msg "%s %s\n" "$msg_warning" "$err" + f_dialog_msgbox "$msg_warning $err\n" fi user="$pw_name" @@ -165,26 +165,26 @@ save_changes() err=$( eval $cmd 2>&1 ) retval=$? if [ $retval -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_error" "$err" + f_dialog_msgbox "$msg_error $err\n" return $retval fi - f_show_msg "$msg_login_updated" + f_dialog_msgbox "$msg_login_updated" if [ "$pw_home_create" = "$msg_yes" ]; then err=$( mkdir -p "$pw_home_dir" ) if [ $? -ne $SUCCESS ]; then - f_show_msg "%s %s\n" "$msg_warning" "$err" + f_dialog_msgbox "$msg_warning $err\n" elif [ -e "$pw_home_dir" ]; then err=$( chown -R "$pw_uid:$pw_gid" \ "$pw_home_dir" 2>&1 ) - [ $? -eq $SUCCESS ] || f_show_msg \ - "%s %s\n" "$msg_warning" "$err" + [ $? -eq $SUCCESS ] || + f_dialog_msgbox "$msg_warning $err\n" fi fi if [ "$pw_dotfiles_create" = "$msg_yes" ]; then err=$( copy_dotfiles 2>&1 ) || - f_show_msg "%s %s\n" "$msg_warning" "$err" + f_dialog_msgbox "$msg_warning $err\n" fi ;; esac From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 21:31:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AB08B693; Mon, 14 Jan 2013 21:31:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9BC75BF2; Mon, 14 Jan 2013 21:31:27 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0ELVRkr038530; Mon, 14 Jan 2013 21:31:27 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0ELVR1S038529; Mon, 14 Jan 2013 21:31:27 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201301142131.r0ELVR1S038529@svn.freebsd.org> From: Devin Teske Date: Mon, 14 Jan 2013 21:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245438 - stable/9/usr.sbin/sysinstall/help X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 21:31:27 -0000 Author: dteske Date: Mon Jan 14 21:31:27 2013 New Revision: 245438 URL: http://svnweb.freebsd.org/changeset/base/245438 Log: Oops, r186202 (4 years ago) forgot to remove Tape from the F1 Help file. Modified: stable/9/usr.sbin/sysinstall/help/media.hlp Modified: stable/9/usr.sbin/sysinstall/help/media.hlp ============================================================================== --- stable/9/usr.sbin/sysinstall/help/media.hlp Mon Jan 14 21:03:34 2013 (r245437) +++ stable/9/usr.sbin/sysinstall/help/media.hlp Mon Jan 14 21:31:27 2013 (r245438) @@ -46,9 +46,3 @@ You can install from the following types If this install method hangs on you or refuses to work properly, you may need to set some special options for your NFS server. See the Options screen for more details. - - - Tape Extract distribution files from tape into a temporary - directory and install from there. If the tape was created - with blocksize other than 20, you may wish to change this - in the Options screen. From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 22:00:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 333B26C0; Mon, 14 Jan 2013 22:00:45 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 15934E1F; Mon, 14 Jan 2013 22:00:45 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0EM0igs047405; Mon, 14 Jan 2013 22:00:44 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0EM0i3Y047401; Mon, 14 Jan 2013 22:00:44 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301142200.r0EM0i3Y047401@svn.freebsd.org> From: Brooks Davis Date: Mon, 14 Jan 2013 22:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245439 - in stable/9: include lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 22:00:45 -0000 Author: brooks Date: Mon Jan 14 22:00:43 2013 New Revision: 245439 URL: http://svnweb.freebsd.org/changeset/base/245439 Log: MFC r244401,245305,245308: Replace our implementation of the vis(3) and unvis(3) APIs with NetBSD's. This output size limited versions of vis and unvis functions as well as a set of vis variants that allow arbitrary characters to be specified for encoding. Finally, MIME Quoted-Printable encoding as described in RFC 2045 is supported. Added: - copied from r245267, head/contrib/libc-vis/ stable/9/lib/libc/gen/unvis-compat.c - copied unchanged from r244401, head/lib/libc/gen/unvis-compat.c Directory Properties: stable/9/contrib/libc-vis/ (props changed) Deleted: stable/9/include/vis.h stable/9/lib/libc/gen/unvis.3 stable/9/lib/libc/gen/unvis.c stable/9/lib/libc/gen/vis.3 stable/9/lib/libc/gen/vis.c Modified: stable/9/include/Makefile stable/9/lib/libc/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map Directory Properties: stable/9/include/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/include/Makefile ============================================================================== --- stable/9/include/Makefile Mon Jan 14 21:31:27 2013 (r245438) +++ stable/9/include/Makefile Mon Jan 14 22:00:43 2013 (r245439) @@ -23,9 +23,12 @@ INCS= a.out.h ar.h assert.h bitstring.h stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ - ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \ + ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ wchar.h wctype.h wordexp.h xlocale.h +.PATH: ${.CURDIR}/../contrib/libc-vis +INCS+= vis.h + MHDRS= float.h floatingpoint.h stdarg.h PHDRS= sched.h _semaphore.h Modified: stable/9/lib/libc/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/gen/Makefile.inc Mon Jan 14 21:31:27 2013 (r245438) +++ stable/9/lib/libc/gen/Makefile.inc Mon Jan 14 22:00:43 2013 (r245439) @@ -32,13 +32,17 @@ SRCS+= __getosreldate.c __xuname.c \ sigsetops.c sleep.c srand48.c statvfs.c stringlist.c strtofflags.c \ sysconf.c sysctl.c sysctlbyname.c sysctlnametomib.c \ syslog.c telldir.c termios.c time.c times.c timezone.c tls.c \ - ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis.c \ - usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \ + ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis-compat.c \ + usleep.c utime.c utxdb.c valloc.c wait.c wait3.c waitpid.c \ waitid.c wordexp.c .PATH: ${.CURDIR}/../../contrib/libc-pwcache SRCS+= pwcache.c pwcache.h +.PATH: ${.CURDIR}/../../contrib/libc-vis +CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis +SRCS+= unvis.c vis.c + CANCELPOINTS_SRCS=sem.c sem_new.c .for src in ${CANCELPOINTS_SRCS} SRCS+=cancelpoints_${src} Modified: stable/9/lib/libc/gen/Symbol.map ============================================================================== --- stable/9/lib/libc/gen/Symbol.map Mon Jan 14 21:31:27 2013 (r245438) +++ stable/9/lib/libc/gen/Symbol.map Mon Jan 14 22:00:43 2013 (r245439) @@ -297,7 +297,6 @@ FBSD_1.0 { ualarm; ulimit; uname; - unvis; strunvis; strunvisx; usleep; @@ -385,9 +384,21 @@ FBSD_1.3 { __FreeBSD_libc_enter_restricted_mode; getcontextx; gid_from_group; + nvis; pwcache_userdb; pwcache_groupdb; + snvis; + strnunvis; + strnunvisx; + strnvis; + strnvisx; + strsnvis; + strsnvisx; + strsvis; + strsvisx; + svis; uid_from_user; + unvis; waitid; }; Copied: stable/9/lib/libc/gen/unvis-compat.c (from r244401, head/lib/libc/gen/unvis-compat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/gen/unvis-compat.c Mon Jan 14 22:00:43 2013 (r245439, copy of r244401, head/lib/libc/gen/unvis-compat.c) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2012 SRI International + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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 + +#define _UNVIS_END 1 + +int +__unvis_44bsd(char *cp, int c, int *astate, int flag) +{ + + if (flag & _UNVIS_END) + flag = (flag & ~_UNVIS_END) ^ UNVIS_END; + return unvis(cp, c, astate, flag); +} + +__sym_compat(unvis, __vis_44bsd, FBSD_1.0); From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 22:43:34 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F1BE9588; Mon, 14 Jan 2013 22:43:33 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id D557CA8; Mon, 14 Jan 2013 22:43:33 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id r0EMhRLI072352; Mon, 14 Jan 2013 14:43:27 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id r0EMhRWa072351; Mon, 14 Jan 2013 14:43:27 -0800 (PST) (envelope-from sgk) Date: Mon, 14 Jan 2013 14:43:27 -0800 From: Steve Kargl To: Dag-Erling =?iso-8859-1?B?U23DuHJncmF2?= Subject: Re: svn commit: r245269 - head/share/mk Message-ID: <20130114224326.GA72312@troutmask.apl.washington.edu> References: <201301102244.r0AMiJ1k059594@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201301102244.r0AMiJ1k059594@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 22:43:34 -0000 On Thu, Jan 10, 2013 at 10:44:19PM +0000, Dag-Erling Smørgrav wrote: > Author: des > Date: Thu Jan 10 22:44:19 2013 > New Revision: 245269 > URL: http://svnweb.freebsd.org/changeset/base/245269 > > Log: > Remove all support for legacy NOFOO and NO_FOO build options. > This commit caused ===> kerberos5/doc (buildincludes) ===> kerberos5/lib (buildincludes) ===> kerberos5/lib/libasn1 (buildincludes) compile_et /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/asn1/asn1_err.et compile_et: No such file or directory *** [asn1_err.h] Error code 1 Stop in /usr/src/kerberos5/lib/libasn1. *** [buildincludes] Error code 1 Stop in /usr/src/kerberos5/lib. *** [buildincludes] Error code 1 because I had forgotten that several years ago I added NO_KERBEROS to my /etc/make.conf. After wasting a day trying to figure out how and who broke world, including reading the top of src/UPDATING, I recalled this commit and checked my /etc/make.conf. Setting WITHOUT_KERBEROS="YES" in /etc/make.conf allowed buildworld to complete. I suggest adding a blurb to src/UPDATING to help others with memory loss issues. Index: UPDATING =================================================================== --- UPDATING (revision 245426) +++ UPDATING (working copy) @@ -26,6 +26,13 @@ disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) + +20130110: + Revision 245269 removed the legacy support for NOFOO and NO_FOO + build options. Individuals should review their /etc/make.conf + and /etc/src.conf for (long forgotten) NOFOO and NO_FOO, and + changes these to WITHOUT_FOO. + 20121223: After switching to Clang as the default compiler some users of ZFS on i386 systems started to experience stack overflow kernel panics. -- Steve From owner-svn-src-all@FreeBSD.ORG Mon Jan 14 22:57:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EABF2E33; Mon, 14 Jan 2013 22:57:03 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id B1C81175; Mon, 14 Jan 2013 22:57:03 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 00FDD3592EF; Mon, 14 Jan 2013 23:57:01 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id E0A762848C; Mon, 14 Jan 2013 23:57:00 +0100 (CET) Date: Mon, 14 Jan 2013 23:57:00 +0100 From: Jilles Tjoelker To: Eitan Adler Subject: Re: svn commit: r245426 - head/bin/sh Message-ID: <20130114225700.GA93645@stack.nl> References: <201301141640.r0EGepLc050623@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 14 Jan 2013 22:57:04 -0000 On Mon, Jan 14, 2013 at 01:38:51PM -0500, Eitan Adler wrote: > On 14 January 2013 11:40, Jilles Tjoelker wrote: > > Author: jilles > > Date: Mon Jan 14 16:40:50 2013 > > New Revision: 245426 > > URL: http://svnweb.freebsd.org/changeset/base/245426 > > Log: > > sh: Simplify cd-hash interaction. > > Instead of rechecking relative paths for all hashed utilities after a cd, > > track if any utility in cmdtable depends on a relative path in PATH. > > If there is such a utility, cd clears the entire table. > Why not clear just these entries instead of the entire table? Clearing too much might affect performance but not correctness. The utilities will be looked up again if necessary. Because it is uncommon nowadays to include a relative pathname in PATH, I handle this case in a very simple manner. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 00:12:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0005CF3C; Tue, 15 Jan 2013 00:12:34 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E62B76FF; Tue, 15 Jan 2013 00:12:34 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F0CYrH087248; Tue, 15 Jan 2013 00:12:34 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F0CYU5087246; Tue, 15 Jan 2013 00:12:34 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301150012.r0F0CYU5087246@svn.freebsd.org> From: Brooks Davis Date: Tue, 15 Jan 2013 00:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245440 - in head: . etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 00:12:35 -0000 Author: brooks Date: Tue Jan 15 00:12:34 2013 New Revision: 245440 URL: http://svnweb.freebsd.org/changeset/base/245440 Log: Add an option DB_FROM_SRC to use src/etc's user/group databases when installing. This allows things like running installworld for 10-CURRENT on a 9.0-RELEASE system without adding extra users and groups to the passwd and group files. To prevent potentially risky uid/gid mismatches on systems with non-standard local values, require that DESTDIR be set if DB_FROM_SRC is set. Sponsored by: DARPA, AFRL Reviewed by: peter Modified: head/Makefile.inc1 head/etc/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jan 14 22:00:43 2013 (r245439) +++ head/Makefile.inc1 Tue Jan 15 00:12:34 2013 (r245440) @@ -13,6 +13,8 @@ # -DNO_PORTSUPDATE do not update ports in ${MAKE} update # -DNO_DOCUPDATE do not update doc in ${MAKE} update # -DNO_WWWUPDATE do not update www in ${MAKE} update +# -DDB_FROM_SRC use the user/group databases in src/etc instead of +# the system database when installing. # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target @@ -340,12 +342,13 @@ LIB32WMAKEFLAGS+= \ LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML -LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS +LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \ + ${IMAKE_INSTALL} .endif -# install stage IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*} -IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 +IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \ + ${IMAKE_INSTALL} ${IMAKE_MTREE} .if empty(.MAKEFLAGS:M-n) IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ LD_LIBRARY_PATH=${INSTALLTMP} \ @@ -354,6 +357,10 @@ IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh .else IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} .endif +.if defined(DB_FROM_SRC) +IMAKE_INSTALL= INSTALL="install -N ${.CURDIR}/etc" +IMAKE_MTREE= MTREE_CMD="nmtree -N ${.CURDIR}/etc" +.endif # kernel stage KMAKEENV= ${WMAKEENV} @@ -595,9 +602,11 @@ kernel-toolchain: ${TOOLCHAIN_TGTS:N_inc installcheck: # -# Require DESTDIR to be set if installing for a different architecture. +# Require DESTDIR to be set if installing for a different architecture or +# using the user/group database in the source tree. # -.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} +.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \ + defined(DB_FROM_SRC) .if !make(distributeworld) installcheck: installcheck_DESTDIR installcheck_DESTDIR: @@ -608,6 +617,7 @@ installcheck_DESTDIR: .endif .endif +.if !defined(DB_FROM_SRC) # # Check for missing UIDs/GIDs. # @@ -635,6 +645,7 @@ installcheck_UGID: false; \ fi .endfor +.endif # # Required install tools to be saved in a scratch dir for safety. @@ -692,6 +703,7 @@ distributeworld installworld: installche done); \ cp $$libs $$progs ${INSTALLTMP} cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale + rm -f ${METALOG} .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} -mkdir ${DESTDIR}/${DISTDIR}/${dist} @@ -753,7 +765,8 @@ redistribute: .endif distrib-dirs distribution: - cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET} + cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${IMAKE_INSTALL} ${.TARGET} # # buildkernel and installkernel @@ -1059,6 +1072,11 @@ _lex= usr.bin/lex _yacc= usr.bin/yacc .endif +.if defined(DB_FROM_SRC) && ${BOOTSTRAPPING} < 1000026 +_nmtree= lib/libnetbsd \ + usr.sbin/nmtree +.endif + .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 _awk= usr.bin/awk .endif @@ -1120,7 +1138,8 @@ bootstrap-tools: ${_lex} \ usr.bin/xinstall \ ${_gensnmptree} \ - usr.sbin/config + usr.sbin/config \ + ${_nmtree} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Jan 14 22:00:43 2013 (r245439) +++ head/etc/Makefile Tue Jan 15 00:12:34 2013 (r245440) @@ -291,25 +291,27 @@ distribution: ${DESTDIR}/etc/nsswitch.conf .endif +MTREE_CMD?= mtree + distrib-dirs: - mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ - mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var - mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr - mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ + ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ + ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var + ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr + ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ -p ${DESTDIR}/usr/include .if ${MK_BIND_LIBS} != "no" - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ + ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ -p ${DESTDIR}/usr/include .endif .if ${MK_BIND_MTREE} != "no" - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ + ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ -p ${DESTDIR}/var/named .endif .if ${MK_GROFF} != "no" - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr + ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr .endif .if ${MK_SENDMAIL} != "no" - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ + ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ .endif cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 00:24:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 231C46A8; Tue, 15 Jan 2013 00:24:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 072C67A6; Tue, 15 Jan 2013 00:24:02 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F0O1gj090431; Tue, 15 Jan 2013 00:24:01 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F0O1xK090429; Tue, 15 Jan 2013 00:24:01 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301150024.r0F0O1xK090429@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 15 Jan 2013 00:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245441 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 00:24:02 -0000 Author: np Date: Tue Jan 15 00:24:01 2013 New Revision: 245441 URL: http://svnweb.freebsd.org/changeset/base/245441 Log: cxgbe/tom: Miscellaneous updates for TOE+IPv6 support (more to follow). - Teach find_best_mtu_idx() to deal with IPv6 endpoints. - Install correct protosw in offloaded TCP/IPv6 sockets when DDP is enabled. - Move set_tcp_ddp_ulp_mode to t4_tom.c so that t4_tom.h can be included without having to drag in t4_msg.h too. This was bothering the iWARP driver for some reason. MFC after: 1 week Modified: head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Tue Jan 15 00:12:34 2013 (r245440) +++ head/sys/dev/cxgbe/tom/t4_tom.c Tue Jan 15 00:24:01 2013 (r245441) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #include #include @@ -43,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define TCPSTATES #include @@ -58,6 +60,9 @@ __FBSDID("$FreeBSD$"); static struct protosw ddp_protosw; static struct pr_usrreqs ddp_usrreqs; +static struct protosw ddp6_protosw; +static struct pr_usrreqs ddp6_usrreqs; + /* Module ops */ static int t4_tom_mod_load(void); static int t4_tom_mod_unload(void); @@ -170,8 +175,12 @@ offload_socket(struct socket *so, struct sb = &so->so_rcv; SOCKBUF_LOCK(sb); sb->sb_flags |= SB_NOCOALESCE; - if (toep->ulp_mode == ULP_MODE_TCPDDP) - so->so_proto = &ddp_protosw; + if (toep->ulp_mode == ULP_MODE_TCPDDP) { + if (inp->inp_vflag & INP_IPV6) + so->so_proto = &ddp6_protosw; + else + so->so_proto = &ddp_protosw; + } SOCKBUF_UNLOCK(sb); /* Update TCP PCB */ @@ -394,7 +403,7 @@ int find_best_mtu_idx(struct adapter *sc, struct in_conninfo *inc, int pmss) { unsigned short *mtus = &sc->params.mtus[0]; - int i = 0, mss; + int i, mss, n; KASSERT(inc != NULL || pmss > 0, ("%s: at least one of inc/pmss must be specified", __func__)); @@ -403,8 +412,13 @@ find_best_mtu_idx(struct adapter *sc, st if (pmss > 0 && mss > pmss) mss = pmss; - while (i < NMTUS - 1 && mtus[i + 1] <= mss + 40) - ++i; + if (inc->inc_flags & INC_ISIPV6) + n = sizeof(struct ip6_hdr) + sizeof(struct tcphdr); + else + n = sizeof(struct ip) + sizeof(struct tcphdr); + + for (i = 0; i < NMTUS - 1 && mtus[i + 1] <= mss + n; i++) + continue; return (i); } @@ -513,6 +527,15 @@ select_ntuple(struct port_info *pi, stru return (htobe32(ntuple)); } +void +set_tcpddp_ulp_mode(struct toepcb *toep) +{ + + toep->ulp_mode = ULP_MODE_TCPDDP; + toep->ddp_flags = DDP_OK; + toep->ddp_score = DDP_LOW_SCORE; +} + static int alloc_tid_tabs(struct tid_info *t) { @@ -698,17 +721,24 @@ static int t4_tom_mod_load(void) { int rc; - struct protosw *tcp_protosw; + struct protosw *tcp_protosw, *tcp6_protosw; tcp_protosw = pffindproto(PF_INET, IPPROTO_TCP, SOCK_STREAM); if (tcp_protosw == NULL) return (ENOPROTOOPT); - bcopy(tcp_protosw, &ddp_protosw, sizeof(ddp_protosw)); bcopy(tcp_protosw->pr_usrreqs, &ddp_usrreqs, sizeof(ddp_usrreqs)); ddp_usrreqs.pru_soreceive = t4_soreceive_ddp; ddp_protosw.pr_usrreqs = &ddp_usrreqs; + tcp6_protosw = pffindproto(PF_INET6, IPPROTO_TCP, SOCK_STREAM); + if (tcp6_protosw == NULL) + return (ENOPROTOOPT); + bcopy(tcp6_protosw, &ddp6_protosw, sizeof(ddp6_protosw)); + bcopy(tcp6_protosw->pr_usrreqs, &ddp6_usrreqs, sizeof(ddp6_usrreqs)); + ddp6_usrreqs.pru_soreceive = t4_soreceive_ddp; + ddp6_protosw.pr_usrreqs = &ddp6_usrreqs; + rc = t4_register_uld(&tom_uld_info); if (rc != 0) t4_tom_mod_unload(); Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Tue Jan 15 00:12:34 2013 (r245440) +++ head/sys/dev/cxgbe/tom/t4_tom.h Tue Jan 15 00:24:01 2013 (r245441) @@ -140,15 +140,6 @@ struct flowc_tx_params { #define DDP_LOW_SCORE 1 #define DDP_HIGH_SCORE 3 -static inline void -set_tcpddp_ulp_mode(struct toepcb *toep) -{ - - toep->ulp_mode = ULP_MODE_TCPDDP; - toep->ddp_flags = DDP_OK; - toep->ddp_score = DDP_LOW_SCORE; -} - /* * Compressed state for embryonic connections for a listener. Barely fits in * 64B, try not to grow it further. @@ -234,6 +225,7 @@ int select_rcv_wscale(void); uint64_t calc_opt0(struct socket *, struct port_info *, struct l2t_entry *, int, int, int, int); uint32_t select_ntuple(struct port_info *, struct l2t_entry *, uint32_t); +void set_tcpddp_ulp_mode(struct toepcb *); /* t4_connect.c */ void t4_init_connect_cpl_handlers(struct adapter *); From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 01:13:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 04F09330; Tue, 15 Jan 2013 01:13:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DDAF497F; Tue, 15 Jan 2013 01:13:55 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F1DtQP005920; Tue, 15 Jan 2013 01:13:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F1DtXa005919; Tue, 15 Jan 2013 01:13:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301150113.r0F1DtXa005919@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jan 2013 01:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245443 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 01:13:56 -0000 Author: mav Date: Tue Jan 15 01:13:55 2013 New Revision: 245443 URL: http://svnweb.freebsd.org/changeset/base/245443 Log: Alike to r242314 for GRAID make GMIRROR more aggressive in marking volumes as clean on shutdown and move that action from shutdown_pre_sync stage to shutdown_post_sync to avoid extra flapping. ZFS tends to not close devices on shutdown, that doesn't allow GEOM RAID to shutdown gracefully. To handle that, mark volume as clean just when shutdown time comes and there are no active writes. PR: kern/113957 MFC after: 2 weeks Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Jan 15 00:39:15 2013 (r245442) +++ head/sys/geom/mirror/g_mirror.c Tue Jan 15 01:13:55 2013 (r245443) @@ -81,7 +81,8 @@ SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, G_MIRROR_DEBUG(4, "%s: Woken up %p.", __func__, (ident)); \ } while (0) -static eventhandler_tag g_mirror_pre_sync = NULL; +static eventhandler_tag g_mirror_post_sync = NULL; +static int g_mirror_shutdown = 0; static int g_mirror_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp); @@ -815,7 +816,7 @@ g_mirror_idle(struct g_mirror_softc *sc, return (0); if (acw > 0 || (acw == -1 && sc->sc_provider->acw > 0)) { timeout = g_mirror_idletime - (time_uptime - sc->sc_last_write); - if (timeout > 0) + if (!g_mirror_shutdown && timeout > 0) return (timeout); } sc->sc_idle = 1; @@ -2821,7 +2822,7 @@ g_mirror_access(struct g_provider *pp, i error = ENXIO; goto end; } - if (dcw == 0 && !sc->sc_idle) + if (dcw == 0) g_mirror_idle(sc, dcw); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0) { if (acr > 0 || acw > 0 || ace > 0) { @@ -3232,7 +3233,7 @@ g_mirror_dumpconf(struct sbuf *sb, const } static void -g_mirror_shutdown_pre_sync(void *arg, int howto) +g_mirror_shutdown_post_sync(void *arg, int howto) { struct g_class *mp; struct g_geom *gp, *gp2; @@ -3242,6 +3243,7 @@ g_mirror_shutdown_pre_sync(void *arg, in mp = arg; DROP_GIANT(); g_topology_lock(); + g_mirror_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { if ((sc = gp->softc) == NULL) continue; @@ -3250,6 +3252,7 @@ g_mirror_shutdown_pre_sync(void *arg, in continue; g_topology_unlock(); sx_xlock(&sc->sc_lock); + g_mirror_idle(sc, -1); g_cancel_event(sc); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_DELAYED); if (error != 0) @@ -3264,9 +3267,9 @@ static void g_mirror_init(struct g_class *mp) { - g_mirror_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync, - g_mirror_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST); - if (g_mirror_pre_sync == NULL) + g_mirror_post_sync = EVENTHANDLER_REGISTER(shutdown_post_sync, + g_mirror_shutdown_post_sync, mp, SHUTDOWN_PRI_FIRST); + if (g_mirror_post_sync == NULL) G_MIRROR_DEBUG(0, "Warning! Cannot register shutdown event."); } @@ -3274,8 +3277,8 @@ static void g_mirror_fini(struct g_class *mp) { - if (g_mirror_pre_sync != NULL) - EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_mirror_pre_sync); + if (g_mirror_post_sync != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, g_mirror_post_sync); } DECLARE_GEOM_CLASS(g_mirror_class, g_mirror); From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 01:27:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7C63B67E; Tue, 15 Jan 2013 01:27:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB259EE; Tue, 15 Jan 2013 01:27:05 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F1R5fR009271; Tue, 15 Jan 2013 01:27:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F1R5hF009270; Tue, 15 Jan 2013 01:27:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301150127.r0F1R5hF009270@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jan 2013 01:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245444 - head/sys/geom/raid3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 01:27:05 -0000 Author: mav Date: Tue Jan 15 01:27:04 2013 New Revision: 245444 URL: http://svnweb.freebsd.org/changeset/base/245444 Log: Alike to r242314 for GRAID make GRAID3 more aggressive in marking volumes as clean on shutdown and move that action from shutdown_pre_sync stage to shutdown_post_sync to avoid extra flapping. ZFS tends to not close devices on shutdown, that doesn't allow GEOM RAID to shutdown gracefully. To handle that, mark volume as clean just when shutdown time comes and there are no active writes. MFC after: 2 weeks Modified: head/sys/geom/raid3/g_raid3.c Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Tue Jan 15 01:13:55 2013 (r245443) +++ head/sys/geom/raid3/g_raid3.c Tue Jan 15 01:27:04 2013 (r245444) @@ -104,7 +104,8 @@ SYSCTL_UINT(_kern_geom_raid3_stat, OID_A G_RAID3_DEBUG(4, "%s: Woken up %p.", __func__, (ident)); \ } while (0) -static eventhandler_tag g_raid3_pre_sync = NULL; +static eventhandler_tag g_raid3_post_sync = NULL; +static int g_raid3_shutdown = 0; static int g_raid3_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp); @@ -876,7 +877,7 @@ g_raid3_idle(struct g_raid3_softc *sc, i return (0); if (acw > 0 || (acw == -1 && sc->sc_provider->acw > 0)) { timeout = g_raid3_idletime - (time_uptime - sc->sc_last_write); - if (timeout > 0) + if (!g_raid3_shutdown && timeout > 0) return (timeout); } sc->sc_idle = 1; @@ -3098,7 +3099,7 @@ g_raid3_access(struct g_provider *pp, in error = ENXIO; goto end; } - if (dcw == 0 && !sc->sc_idle) + if (dcw == 0) g_raid3_idle(sc, dcw); if ((sc->sc_flags & G_RAID3_DEVICE_FLAG_DESTROYING) != 0) { if (acr > 0 || acw > 0 || ace > 0) { @@ -3544,7 +3545,7 @@ g_raid3_dumpconf(struct sbuf *sb, const } static void -g_raid3_shutdown_pre_sync(void *arg, int howto) +g_raid3_shutdown_post_sync(void *arg, int howto) { struct g_class *mp; struct g_geom *gp, *gp2; @@ -3554,6 +3555,7 @@ g_raid3_shutdown_pre_sync(void *arg, int mp = arg; DROP_GIANT(); g_topology_lock(); + g_raid3_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { if ((sc = gp->softc) == NULL) continue; @@ -3562,6 +3564,7 @@ g_raid3_shutdown_pre_sync(void *arg, int continue; g_topology_unlock(); sx_xlock(&sc->sc_lock); + g_raid3_idle(sc, -1); g_cancel_event(sc); error = g_raid3_destroy(sc, G_RAID3_DESTROY_DELAYED); if (error != 0) @@ -3576,9 +3579,9 @@ static void g_raid3_init(struct g_class *mp) { - g_raid3_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync, - g_raid3_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST); - if (g_raid3_pre_sync == NULL) + g_raid3_post_sync = EVENTHANDLER_REGISTER(shutdown_post_sync, + g_raid3_shutdown_post_sync, mp, SHUTDOWN_PRI_FIRST); + if (g_raid3_post_sync == NULL) G_RAID3_DEBUG(0, "Warning! Cannot register shutdown event."); } @@ -3586,8 +3589,8 @@ static void g_raid3_fini(struct g_class *mp) { - if (g_raid3_pre_sync != NULL) - EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_raid3_pre_sync); + if (g_raid3_post_sync != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, g_raid3_post_sync); } DECLARE_GEOM_CLASS(g_raid3_class, g_raid3); From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 02:18:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 62E15FA8; Tue, 15 Jan 2013 02:18:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8DABE6; Tue, 15 Jan 2013 02:18:05 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F2I5dK024942; Tue, 15 Jan 2013 02:18:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F2I5Sb024940; Tue, 15 Jan 2013 02:18:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301150218.r0F2I5Sb024940@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jan 2013 02:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245446 - head/sys/dev/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 02:18:05 -0000 Author: mav Date: Tue Jan 15 02:18:04 2013 New Revision: 245446 URL: http://svnweb.freebsd.org/changeset/base/245446 Log: In case somebody still use it, fix legacy ataraid(4) to work on combined PATA+AHCI controllers, such as JMicron JMB363. PR: kern/159271 MFC after: 1 week Modified: head/sys/dev/ata/ata-raid.c Modified: head/sys/dev/ata/ata-raid.c ============================================================================== --- head/sys/dev/ata/ata-raid.c Tue Jan 15 01:33:19 2013 (r245445) +++ head/sys/dev/ata/ata-raid.c Tue Jan 15 02:18:04 2013 (r245446) @@ -1351,10 +1351,11 @@ static int ata_raid_read_metadata(device_t subdisk) { devclass_t pci_devclass = devclass_find("pci"); + devclass_t atapci_devclass = devclass_find("atapci"); devclass_t devclass=device_get_devclass(GRANDPARENT(GRANDPARENT(subdisk))); /* prioritize vendor native metadata layout if possible */ - if (devclass == pci_devclass) { + if (devclass == pci_devclass || devclass == atapci_devclass) { switch (pci_get_vendor(GRANDPARENT(device_get_parent(subdisk)))) { case ATA_HIGHPOINT_ID: if (ata_raid_hptv3_read_meta(subdisk, ata_raid_arrays)) From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 03:03:41 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DD0B4EEF; Tue, 15 Jan 2013 03:03:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id 7566EF05; Tue, 15 Jan 2013 03:03:40 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0F33PuS002157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Jan 2013 14:03:27 +1100 Date: Tue, 15 Jan 2013 14:03:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r243631 - in head/sys: kern sys In-Reply-To: <201301141255.46994.jhb@freebsd.org> Message-ID: <20130115125138.P1099@besplex.bde.org> References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50F41F8C.5030900@freebsd.org> <50F4297F.8050708@FreeBSD.org> <201301141255.46994.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=MscKcBme c=1 sm=1 a=PcN1GEuqyV8A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Y5AXMyR2jB0A:10 a=hIoxf_-hmCfl0XhHhqEA:9 a=CjuIK1q_8ugA:10 a=Lytp-BlQWYeEZU7Z:21 a=AhQzpKN3FgPaxGeD:21 a=TEtd8y5WR3g2ypngnwZWYw==:117 X-Mailman-Approved-At: Tue, 15 Jan 2013 03:14:08 +0000 Cc: Adrian Chadd , src-committers@FreeBSD.org, Andre Oppermann , Alan Cox , "Jayachandran C." , Alexander Motin , Alfred Perlstein , Oleksandr Tymoshenko , freebsd-arch@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 03:03:42 -0000 On Mon, 14 Jan 2013, John Baldwin wrote: > On Monday, January 14, 2013 10:51:27 am Alexander Motin wrote: >> As I've actually written, there are two different things: >> ncallout -- number of preallocated callout structures for purposes of >> timeout() calls. That is a legacy API that is probably not very much >> used now, so that value don't need to be too big. But that allocation is >> static and if it will ever be exhausted system will panic. That is why >> it was set quite high. The right way now would be to analyze where that >> API is still used and estimate the really required number. > > FYI, I have slowly been working through the tree fixing users of timeout() > to use callout_*() instead. But timeout() is a better API, starting with its name, for the simple cases that it handles. It is easier to use since the storage allocation for it is handled automatically. Since it returns a handle, the automatic storage allocation for it doesn't need to be static. (The allocation is not quite static, since ncallout is variable, but I will describe it as static.) The static allocation is just a minor optimization for efficiency and simplicity (the callout API gives further minor optimizations by allocating even more statically in callers, so that no linked list management is needed and there is better locality). It can be replaced by a malloc() on every call to timeout(), or maybe a buffer pool. The static allocation is equivalent to a buffer pool that is never expanded and has no fallback to malloc() when it is too small. Since there is no fallback, the pool has to be very large (but not 512MB) to prevent panics. Since use of timeout() has rotted, there aren't many callers of it left, so if there was a fallback then a very small buffer pool of size say 16 entries would suffice. Larger systems and newer ones that start using the better timeout() API might need as many as 256 entries. However, buffer pools are what you use when the system's malloc() is too slow to use. Since malloc(9) or at least uma_zalloc(9) is not all that slow, it is probably efficient enough to just use it, at least while timeout() is just a compatibility wrapper. There are already some minor efficiencies from using the wrapper. By using the system's malloc() and not using a buffer pool, timeout() becomes even simpler than before: delete ncallout and all associated code, and replace the linked list by malloc()'s internal management: % struct callout_handle % timeout(ftn, arg, to_ticks) % timeout_t *ftn; % void *arg; % int to_ticks; % { % struct callout_cpu *cc; % struct callout *new; % struct callout_handle handle; % % cc = CC_CPU(timeout_cpu); % CC_LOCK(cc); All the locking becomes unnecessary too. The locking might be just as slow as dynamic allocation, especially if the lock is contended. % /* Fill in the next free callout structure. */ % new = SLIST_FIRST(&cc->cc_callfree); This would have to be malloc()ed. There seems to be a problem with waiting being impossible in some contexts, so malloc() might fail, but this function can't fail. So a large buffer pool might be needed after all to handle cases where malloc() fails :-(. Also, it must be checked that there are no caller's of timeout() before malloc() is initialized, or else the current early initialization of the buffer pool is still needed for these early callers. % if (new == NULL) % /* XXX Attempt to malloc first */ % panic("timeout table full"); This code always knew that it shouldn't panic. % SLIST_REMOVE_HEAD(&cc->cc_callfree, c_links.sle); % callout_reset(new, to_ticks, ftn, arg); % handle.callout = new; % CC_UNLOCK(cc); % % return (handle); % } Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 05:11:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F14D67E4; Tue, 15 Jan 2013 05:11:29 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by mx1.freebsd.org (Postfix) with ESMTP id 0007A8AB; Tue, 15 Jan 2013 05:11:28 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id 15so2430313wgd.4 for ; Mon, 14 Jan 2013 21:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=RZRC4bynF/R8BeWlMRKjzehxP770ixMCB6ZP+9QgIC4=; b=a59G4HtvL6TKbWmCu0UanqBMFFh78tVqk2t0xBi1SkHYeB9ullBDQ9WRPDx8RNGY/4 rEaIklW5Jut2w3uAN/6qqPXoYPZPDnvXcLx8ajaFcc7m2Y9C7yZbOpo3vd4jqHZIv62Q vzs7tkmCx2fhleh6dFzqV+zE59XAwc+69l6OkhGvvjzx9m4bGkFXYie8IuMwaQ7bmwof PiZGdexVIV68DXLOyDP08y2ACdEOEQfJEaTRIHRG6JW5z8i/abwsz0Q57DM0Qux3UuL3 yCw/3wHfmXkDBzUykLQFf9DEgmi5zhPm8+UbTfCeByNKI6uHXKuNIVIJyrFHHYhTTLCl AOlA== MIME-Version: 1.0 Received: by 10.180.8.130 with SMTP id r2mr1258053wia.28.1358226687698; Mon, 14 Jan 2013 21:11:27 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Mon, 14 Jan 2013 21:11:27 -0800 (PST) In-Reply-To: <201301141931.r0EJVjMp001935@svn.freebsd.org> References: <201301141931.r0EJVjMp001935@svn.freebsd.org> Date: Mon, 14 Jan 2013 21:11:27 -0800 X-Google-Sender-Auth: gRHHfR28jvG7bRIKYlmrCxkgs9Q Message-ID: Subject: Re: svn commit: r245429 - in stable/9/sys/dev/ath/ath_hal: . ar9002 From: Adrian Chadd To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 05:11:30 -0000 .. I think this may have broken STABLE-9? Have you test built it? Adrian On 14 January 2013 11:31, Dimitry Andric wrote: > Author: dim > Date: Mon Jan 14 19:31:44 2013 > New Revision: 245429 > URL: http://svnweb.freebsd.org/changeset/base/245429 > > Log: > Partial MFC of r234508 (by adrian): > > "Upgrade" the AR9285 code to support PCI/ART EEPROM on flash. > > I've just verified that this boots on an Atheros AP91. I haven't verified > it with traffic though, so YMMV. > > (This is a prerequisite for the coming clang 3.2 upgrade.) > > Modified: > stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c > stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c > Directory Properties: > stable/9/sys/ (props changed) > stable/9/sys/dev/ (props changed) > > Modified: stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c > ============================================================================== > --- stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c Mon Jan 14 18:01:19 2013 (r245428) > +++ stable/9/sys/dev/ath/ath_hal/ah_eeprom_v4k.c Mon Jan 14 19:31:44 2013 (r245429) > @@ -298,12 +298,12 @@ ath_hal_v4kEepromAttach(struct ath_hal * > "%s Error reading Eeprom MAGIC\n", __func__); > return HAL_EEREAD; > } > - } > - HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n", > - __func__, magic); > - if (magic != AR5416_EEPROM_MAGIC) { > - HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n"); > - return HAL_EEMAGIC; > + HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n", > + __func__, magic); > + if (magic != AR5416_EEPROM_MAGIC) { > + HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n"); > + return HAL_EEMAGIC; > + } > } > > ee = ath_hal_malloc(sizeof(HAL_EEPROM_v4k)); > > Modified: stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c > ============================================================================== > --- stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Mon Jan 14 18:01:19 2013 (r245428) > +++ stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Mon Jan 14 19:31:44 2013 (r245429) > @@ -134,6 +134,18 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s > > ar5416InitState(AH5416(ah), devid, sc, st, sh, status); > > + /* > + * Use the "local" EEPROM data given to us by the higher layers. > + * This is a private copy out of system flash. The Linux ath9k > + * commit for the initial AR9130 support mentions MMIO flash > + * access is "unreliable." -adrian > + */ > + if (eepromdata != AH_NULL) { > + AH_PRIVATE(ah)->ah_eepromRead = ath_hal_EepromDataRead; > + AH_PRIVATE(ah)->ah_eepromWrite = NULL; > + ah->ah_eepromdata = eepromdata; > + } > + > /* XXX override with 9285 specific state */ > /* override 5416 methods for our needs */ > AH5416(ah)->ah_initPLL = ar9280InitPLL; From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 05:33:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B93DD257; Tue, 15 Jan 2013 05:33:41 +0000 (UTC) (envelope-from dbn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 884A6A44; Tue, 15 Jan 2013 05:33:41 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F5XfmJ090576; Tue, 15 Jan 2013 05:33:41 GMT (envelope-from dbn@svn.freebsd.org) Received: (from dbn@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F5XfeV090574; Tue, 15 Jan 2013 05:33:41 GMT (envelope-from dbn@svn.freebsd.org) Message-Id: <201301150533.r0F5XfeV090574@svn.freebsd.org> From: David Naylor Date: Tue, 15 Jan 2013 05:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245447 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 05:33:41 -0000 Author: dbn (ports committer) Date: Tue Jan 15 05:33:40 2013 New Revision: 245447 URL: http://svnweb.freebsd.org/changeset/base/245447 Log: Add myself as a port committer (with eadler@ and bdrewery@ as mentors). While in the repository, add myself to calendar.freebsd. Approved by: eadler/bdrewery (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Jan 15 02:18:04 2013 (r245446) +++ head/share/misc/committers-ports.dot Tue Jan 15 05:33:40 2013 (r245447) @@ -77,6 +77,7 @@ culot [label="Frederic Culot\nculot@Free daichi [label="Daichi Goto\ndaichi@FreeBSD.org\n2002/10/17"] danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] db [label="Diane Bruce\ndb@FreeBSD.org\n2007/01/18"] +dbn [label="David Naylor\ndbn@FreeBSD.org\n2013/01/14"] decke [label="Bernhard Froehlich\ndecke@FreeBSD.org\n2010/03/21"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/01"] demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] @@ -233,6 +234,8 @@ asami -> obrien avilla -> jhale avilla -> rakuco +bdrewery -> dbn + bapt -> bdrewery bapt -> eadler bapt -> jlaffaye @@ -274,6 +277,7 @@ delphij -> rafan demon -> mat eadler -> ak +eadler -> dbn eadler -> bdrewery eadler -> gjb eadler -> tj Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Jan 15 02:18:04 2013 (r245446) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Jan 15 05:33:40 2013 (r245447) @@ -165,6 +165,7 @@ 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 05/22 Rui Paulo born in Evora, Portugal, 1986 +05/22 David Naylor born in Johannesburg, South Africa, 1988 05/23 Munechika Sumikawa born in Osaka, Osaka, Japan, 1972 05/24 Duncan McLennan Barclay born in London, Middlesex, United Kingdom, 1970 05/24 Oliver Lehmann born in Karlsburg, Germany, 1981 From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 07:07:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DA464D17; Tue, 15 Jan 2013 07:07:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B352D81; Tue, 15 Jan 2013 07:07:30 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F77UUK020589; Tue, 15 Jan 2013 07:07:30 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F77UxB020587; Tue, 15 Jan 2013 07:07:30 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301150707.r0F77UxB020587@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 15 Jan 2013 07:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245448 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 07:07:30 -0000 Author: np Date: Tue Jan 15 07:07:29 2013 New Revision: 245448 URL: http://svnweb.freebsd.org/changeset/base/245448 Log: cxgbe/tom: Basic CLIP table management. This is the Compressed Local IPv6 table on the chip. To save space, the chip uses an index into this table instead of a full IPv6 address in some of its hardware data structures. For now the driver fills this table with all the local IPv6 addresses that it sees at the time the table is initialized. I'll improve this later so that the table is updated whenever new IPv6 addresses are configured or existing ones deleted. MFC after: 1 week Modified: head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Tue Jan 15 05:33:40 2013 (r245447) +++ head/sys/dev/cxgbe/tom/t4_tom.c Tue Jan 15 07:07:29 2013 (r245448) @@ -41,11 +41,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include +#include #define TCPSTATES #include #include @@ -82,6 +85,11 @@ static void queue_tid_release(struct ada static void release_offload_resources(struct toepcb *); static int alloc_tid_tabs(struct tid_info *); static void free_tid_tabs(struct tid_info *); +static int add_lip(struct adapter *, struct in6_addr *); +static int delete_lip(struct adapter *, struct in6_addr *); +static struct clip_entry *search_lip(struct tom_data *, struct in6_addr *); +static void init_clip_table(struct adapter *, struct tom_data *); +static void destroy_clip_table(struct adapter *, struct tom_data *); static void free_tom_data(struct adapter *, struct tom_data *); struct toepcb * @@ -246,8 +254,8 @@ release_offload_resources(struct toepcb KASSERT(!(toep->flags & TPF_ATTACHED), ("%s: %p is still attached.", __func__, toep)); - CTR4(KTR_CXGBE, "%s: toep %p (tid %d, l2te %p)", - __func__, toep, tid, toep->l2te); + CTR5(KTR_CXGBE, "%s: toep %p (tid %d, l2te %p, ce %p)", + __func__, toep, tid, toep->l2te, toep->ce); if (toep->ulp_mode == ULP_MODE_TCPDDP) release_ddp_resources(toep); @@ -260,6 +268,9 @@ release_offload_resources(struct toepcb release_tid(sc, tid, toep->ctrlq); } + if (toep->ce) + release_lip(td, toep->ce); + mtx_lock(&td->toep_list_lock); TAILQ_REMOVE(&td->toep_list, toep, link); mtx_unlock(&td->toep_list_lock); @@ -588,9 +599,157 @@ free_tid_tabs(struct tid_info *t) mtx_destroy(&t->stid_lock); } +static int +add_lip(struct adapter *sc, struct in6_addr *lip) +{ + struct fw_clip_cmd c; + + ASSERT_SYNCHRONIZED_OP(sc); + /* mtx_assert(&td->clip_table_lock, MA_OWNED); */ + + memset(&c, 0, sizeof(c)); + c.op_to_write = htonl(V_FW_CMD_OP(FW_CLIP_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_ALLOC | FW_LEN16(c)); + c.ip_hi = *(uint64_t *)&lip->s6_addr[0]; + c.ip_lo = *(uint64_t *)&lip->s6_addr[8]; + + return (t4_wr_mbox_ns(sc, sc->mbox, &c, sizeof(c), &c)); +} + +static int +delete_lip(struct adapter *sc, struct in6_addr *lip) +{ + struct fw_clip_cmd c; + + ASSERT_SYNCHRONIZED_OP(sc); + /* mtx_assert(&td->clip_table_lock, MA_OWNED); */ + + memset(&c, 0, sizeof(c)); + c.op_to_write = htonl(V_FW_CMD_OP(FW_CLIP_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_READ); + c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_FREE | FW_LEN16(c)); + c.ip_hi = *(uint64_t *)&lip->s6_addr[0]; + c.ip_lo = *(uint64_t *)&lip->s6_addr[8]; + + return (t4_wr_mbox_ns(sc, sc->mbox, &c, sizeof(c), &c)); +} + +static struct clip_entry * +search_lip(struct tom_data *td, struct in6_addr *lip) +{ + struct clip_entry *ce; + + mtx_assert(&td->clip_table_lock, MA_OWNED); + + TAILQ_FOREACH(ce, &td->clip_table, link) { + if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) + return (ce); + } + + return (NULL); +} + +struct clip_entry * +hold_lip(struct tom_data *td, struct in6_addr *lip) +{ + struct clip_entry *ce; + + mtx_lock(&td->clip_table_lock); + ce = search_lip(td, lip); + if (ce != NULL) + ce->refcount++; + mtx_unlock(&td->clip_table_lock); + + return (ce); +} + +void +release_lip(struct tom_data *td, struct clip_entry *ce) +{ + + mtx_lock(&td->clip_table_lock); + KASSERT(search_lip(td, &ce->lip) == ce, + ("%s: CLIP entry %p p not in CLIP table.", __func__, ce)); + KASSERT(ce->refcount > 0, + ("%s: CLIP entry %p has refcount 0", __func__, ce)); + --ce->refcount; + mtx_unlock(&td->clip_table_lock); +} + +static void +init_clip_table(struct adapter *sc, struct tom_data *td) +{ + struct in6_ifaddr *ia; + struct in6_addr *lip, tlip; + struct clip_entry *ce; + + ASSERT_SYNCHRONIZED_OP(sc); + + mtx_init(&td->clip_table_lock, "CLIP table lock", NULL, MTX_DEF); + TAILQ_INIT(&td->clip_table); + + IN6_IFADDR_RLOCK(); + TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { + lip = &ia->ia_addr.sin6_addr; + + KASSERT(!IN6_IS_ADDR_MULTICAST(lip), + ("%s: mcast address in in6_ifaddr list", __func__)); + + if (IN6_IS_ADDR_LOOPBACK(lip)) + continue; + if (IN6_IS_SCOPE_EMBED(lip)) { + /* Remove the embedded scope */ + tlip = *lip; + lip = &tlip; + in6_clearscope(lip); + } + /* + * XXX: how to weed out the link local address for the loopback + * interface? It's fe80::1 usually (always?). + */ + + mtx_lock(&td->clip_table_lock); + if (search_lip(td, lip) == NULL) { + ce = malloc(sizeof(*ce), M_CXGBE, M_NOWAIT); + memcpy(&ce->lip, lip, sizeof(ce->lip)); + ce->refcount = 0; + if (add_lip(sc, lip) == 0) + TAILQ_INSERT_TAIL(&td->clip_table, ce, link); + else + free(ce, M_CXGBE); + } + mtx_unlock(&td->clip_table_lock); + } + IN6_IFADDR_RUNLOCK(); +} + +static void +destroy_clip_table(struct adapter *sc, struct tom_data *td) +{ + struct clip_entry *ce, *ce_temp; + + if (mtx_initialized(&td->clip_table_lock)) { + mtx_lock(&td->clip_table_lock); + TAILQ_FOREACH_SAFE(ce, &td->clip_table, link, ce_temp) { + KASSERT(ce->refcount == 0, + ("%s: CLIP entry %p still in use (%d)", __func__, + ce, ce->refcount)); + TAILQ_REMOVE(&td->clip_table, ce, link); + delete_lip(sc, &ce->lip); + free(ce, M_CXGBE); + } + mtx_unlock(&td->clip_table_lock); + mtx_destroy(&td->clip_table_lock); + } +} + static void free_tom_data(struct adapter *sc, struct tom_data *td) { + + ASSERT_SYNCHRONIZED_OP(sc); + KASSERT(TAILQ_EMPTY(&td->toep_list), ("%s: TOE PCB list is not empty.", __func__)); KASSERT(td->lctx_count == 0, @@ -599,6 +758,7 @@ free_tom_data(struct adapter *sc, struct t4_uninit_l2t_cpl_handlers(sc); t4_uninit_cpl_io_handlers(sc); t4_uninit_ddp(sc, td); + destroy_clip_table(sc, td); if (td->listen_mask != 0) hashdestroy(td->listen_hash, M_CXGBE, td->listen_mask); @@ -644,8 +804,12 @@ t4_tom_activate(struct adapter *sc) if (rc != 0) goto done; + /* DDP page pods and CPL handlers */ t4_init_ddp(sc, td); + /* CLIP table for IPv6 offload */ + init_clip_table(sc, td); + /* CPL handlers */ t4_init_connect_cpl_handlers(sc); t4_init_l2t_cpl_handlers(sc); Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Tue Jan 15 05:33:40 2013 (r245447) +++ head/sys/dev/cxgbe/tom/t4_tom.h Tue Jan 15 07:07:29 2013 (r245448) @@ -109,6 +109,7 @@ struct toepcb { struct sge_ofld_rxq *ofld_rxq; struct sge_wrq *ctrlq; struct l2t_entry *l2te; /* L2 table entry used by this connection */ + struct clip_entry *ce; /* CLIP table entry used by this tid */ int tid; /* Connection identifier */ unsigned int tx_credits;/* tx WR credits (in 16 byte units) remaining */ unsigned int sb_cc; /* last noted value of so_rcv->sb_cc */ @@ -175,6 +176,12 @@ struct listen_ctx { TAILQ_HEAD(ppod_head, ppod_region); +struct clip_entry { + TAILQ_ENTRY(clip_entry) link; + struct in6_addr lip; /* local IPv6 address */ + u_int refcount; +}; + struct tom_data { struct toedev tod; @@ -192,6 +199,9 @@ struct tom_data { int nppods_free; /* # of available ppods */ int nppods_free_head; /* # of available ppods at the begining */ struct ppod_head ppods; + + struct mtx clip_table_lock; + TAILQ_HEAD(, clip_entry) clip_table; }; static inline struct tom_data * @@ -226,6 +236,8 @@ uint64_t calc_opt0(struct socket *, stru int, int, int, int); uint32_t select_ntuple(struct port_info *, struct l2t_entry *, uint32_t); void set_tcpddp_ulp_mode(struct toepcb *); +struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); +void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ void t4_init_connect_cpl_handlers(struct adapter *); From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 07:41:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 168DD2B4; Tue, 15 Jan 2013 07:41:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 082B51AB; Tue, 15 Jan 2013 07:41:51 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F7fo0d031688; Tue, 15 Jan 2013 07:41:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F7fo86031687; Tue, 15 Jan 2013 07:41:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201301150741.r0F7fo86031687@svn.freebsd.org> From: Dimitry Andric Date: Tue, 15 Jan 2013 07:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245449 - stable/9/sys/dev/ath/ath_hal/ar9002 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 07:41:51 -0000 Author: dim Date: Tue Jan 15 07:41:50 2013 New Revision: 245449 URL: http://svnweb.freebsd.org/changeset/base/245449 Log: Revert the MFC to sys/dev/ath/ath_hal/ar9002/ar9285_attach.c again, since it does not compile on stable/9. During testing, I had a different local fix, so I failed to notice this did not work. Apologies for the breakage. Pointy hat to: dim Modified: stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Jan 15 07:07:29 2013 (r245448) +++ stable/9/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Jan 15 07:41:50 2013 (r245449) @@ -134,18 +134,6 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s ar5416InitState(AH5416(ah), devid, sc, st, sh, status); - /* - * Use the "local" EEPROM data given to us by the higher layers. - * This is a private copy out of system flash. The Linux ath9k - * commit for the initial AR9130 support mentions MMIO flash - * access is "unreliable." -adrian - */ - if (eepromdata != AH_NULL) { - AH_PRIVATE(ah)->ah_eepromRead = ath_hal_EepromDataRead; - AH_PRIVATE(ah)->ah_eepromWrite = NULL; - ah->ah_eepromdata = eepromdata; - } - /* XXX override with 9285 specific state */ /* override 5416 methods for our needs */ AH5416(ah)->ah_initPLL = ar9280InitPLL; From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 08:26:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 85B84E80; Tue, 15 Jan 2013 08:26:18 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5DCF136B; Tue, 15 Jan 2013 08:26:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F8QIpm044612; Tue, 15 Jan 2013 08:26:18 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F8QGJr044600; Tue, 15 Jan 2013 08:26:16 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201301150826.r0F8QGJr044600@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Tue, 15 Jan 2013 08:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 08:26:18 -0000 Author: ganbold (doc committer) Date: Tue Jan 15 08:26:16 2013 New Revision: 245450 URL: http://svnweb.freebsd.org/changeset/base/245450 Log: Initial support for Allwinner A10 SoC (Cubieboard) Add simple console driver Add interrupt handling and timer codes Add kernel config file Add dts file Approved by: gonzo Added: head/sys/arm/allwinner/ head/sys/arm/allwinner/a10_machdep.c (contents, props changed) head/sys/arm/allwinner/aintc.c (contents, props changed) head/sys/arm/allwinner/bus_space.c (contents, props changed) head/sys/arm/allwinner/common.c (contents, props changed) head/sys/arm/allwinner/console.c (contents, props changed) head/sys/arm/allwinner/files.a10 (contents, props changed) head/sys/arm/allwinner/std.a10 (contents, props changed) head/sys/arm/allwinner/timer.c (contents, props changed) head/sys/arm/conf/CUBIEBOARD (contents, props changed) head/sys/boot/fdt/dts/cubieboard.dts (contents, props changed) Added: head/sys/arm/allwinner/a10_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,122 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu. + * All rights reserved. + * + * This code is derived from software written for Brini by Mark Brinicombe + * + * 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. + * + * from: FreeBSD: //depot/projects/arm/src/sys/arm/ti/ti_machdep.c + */ + +#include "opt_ddb.h" +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include + +#include +#include + +#include +#include /* For trapframe_t, used in */ +#include +#include + +#include + +/* Start of address space used for bootstrap map */ +#define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 + +void (*a10_cpu_reset)(void); + +vm_offset_t +initarm_lastaddr(void) +{ + + a10_cpu_reset = NULL; + return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE); +} + +void +initarm_gpio_init(void) +{ +} + +void +initarm_late_init(void) +{ +} + +#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) +static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { + { 0, 0, 0, 0, 0, } +}; + +/* + * Construct pmap_devmap[] with DT-derived config data. + */ +int +platform_devmap_init(void) +{ + int i = 0; + + fdt_devmap[i].pd_va = 0xE1C00000; + fdt_devmap[i].pd_pa = 0x01C00000; + fdt_devmap[i].pd_size = 0x00400000; /* 4 MB */ + fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; + fdt_devmap[i].pd_cache = PTE_DEVICE; + + i++; + + pmap_devmap_bootstrap_table = &fdt_devmap[0]; + + return (0); +} + +struct arm32_dma_range * +bus_dma_get_range(void) +{ + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + return (0); +} + +void +cpu_reset() +{ + if (a10_cpu_reset) + (*a10_cpu_reset)(); + else + printf("no cpu_reset implementation\n"); + printf("Reset failed!\n"); + while (1); +} Added: head/sys/arm/allwinner/aintc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/aintc.c Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/** + * Interrupt controller registers + * + */ +#define SW_INT_VECTOR_REG 0x00 +#define SW_INT_BASE_ADR_REG 0x04 +#define SW_INT_PROTECTION_REG 0x08 +#define SW_INT_NMI_CTRL_REG 0x0c + +#define SW_INT_IRQ_PENDING_REG0 0x10 +#define SW_INT_IRQ_PENDING_REG1 0x14 +#define SW_INT_IRQ_PENDING_REG2 0x18 + +#define SW_INT_FIQ_PENDING_REG0 0x20 +#define SW_INT_FIQ_PENDING_REG1 0x24 +#define SW_INT_FIQ_PENDING_REG2 0x28 + +#define SW_INT_SELECT_REG0 0x30 +#define SW_INT_SELECT_REG1 0x34 +#define SW_INT_SELECT_REG2 0x38 + +#define SW_INT_ENABLE_REG0 0x40 +#define SW_INT_ENABLE_REG1 0x44 +#define SW_INT_ENABLE_REG2 0x48 + +#define SW_INT_MASK_REG0 0x50 +#define SW_INT_MASK_REG1 0x54 +#define SW_INT_MASK_REG2 0x58 + +#define SW_INT_IRQNO_ENMI 0 + +#define SW_INT_IRQ_PENDING_REG(_b) (0x10 + ((_b) * 4)) +#define SW_INT_FIQ_PENDING_REG(_b) (0x20 + ((_b) * 4)) +#define SW_INT_SELECT_REG(_b) (0x30 + ((_b) * 4)) +#define SW_INT_ENABLE_REG(_b) (0x40 + ((_b) * 4)) +#define SW_INT_MASK_REG(_b) (0x50 + ((_b) * 4)) + +struct a10_aintc_softc { + device_t sc_dev; + struct resource * aintc_res; + bus_space_tag_t aintc_bst; + bus_space_handle_t aintc_bsh; + uint8_t ver; +}; + +static struct a10_aintc_softc *a10_aintc_sc = NULL; + +#define aintc_read_4(reg) \ + bus_space_read_4(a10_aintc_sc->aintc_bst, a10_aintc_sc->aintc_bsh, reg) +#define aintc_write_4(reg, val) \ + bus_space_write_4(a10_aintc_sc->aintc_bst, a10_aintc_sc->aintc_bsh, reg, val) + +static int +a10_aintc_probe(device_t dev) +{ + if (!ofw_bus_is_compatible(dev, "a10,aintc")) + return (ENXIO); + device_set_desc(dev, "A10 AINTC Interrupt Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +a10_aintc_attach(device_t dev) +{ + struct a10_aintc_softc *sc = device_get_softc(dev); + int rid = 0; + int i; + + sc->sc_dev = dev; + + if (a10_aintc_sc) + return (ENXIO); + + sc->aintc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (!sc->aintc_res) { + device_printf(dev, "could not allocate resource\n"); + return (ENXIO); + } + + sc->aintc_bst = rman_get_bustag(sc->aintc_res); + sc->aintc_bsh = rman_get_bushandle(sc->aintc_res); + + a10_aintc_sc = sc; + + /* Disable & clear all interrupts */ + for (i = 0; i < 3; i++) { + aintc_write_4(SW_INT_ENABLE_REG(i), 0); + aintc_write_4(SW_INT_MASK_REG(i), 0xffffffff); + } + /* enable protection mode*/ + aintc_write_4(SW_INT_PROTECTION_REG, 0x01); + + /* config the external interrupt source type*/ + aintc_write_4(SW_INT_NMI_CTRL_REG, 0x00); + + return (0); +} + +static device_method_t a10_aintc_methods[] = { + DEVMETHOD(device_probe, a10_aintc_probe), + DEVMETHOD(device_attach, a10_aintc_attach), + { 0, 0 } +}; + +static driver_t a10_aintc_driver = { + "aintc", + a10_aintc_methods, + sizeof(struct a10_aintc_softc), +}; + +static devclass_t a10_aintc_devclass; + +DRIVER_MODULE(aintc, simplebus, a10_aintc_driver, a10_aintc_devclass, 0, 0); + +int +arm_get_next_irq(int last_irq) +{ + uint32_t value; + int i, b; + + for (i = 0; i < 3; i++) { + value = aintc_read_4(SW_INT_IRQ_PENDING_REG(i)); + for (b = 0; b < 32; b++) + if (value & (1 << b)) { + return (i * 32 + b); + } + } + + return (-1); +} + +void +arm_mask_irq(uintptr_t nb) +{ + uint32_t bit, block, value; + + bit = (nb % 32); + block = (nb / 32); + + value = aintc_read_4(SW_INT_ENABLE_REG(block)); + value &= ~(1 << bit); + aintc_write_4(SW_INT_ENABLE_REG(block), value); + + value = aintc_read_4(SW_INT_MASK_REG(block)); + value |= (1 << bit); + aintc_write_4(SW_INT_MASK_REG(block), value); +} + +void +arm_unmask_irq(uintptr_t nb) +{ + uint32_t bit, block, value; + + bit = (nb % 32); + block = (nb / 32); + + value = aintc_read_4(SW_INT_ENABLE_REG(block)); + value |= (1 << bit); + aintc_write_4(SW_INT_ENABLE_REG(block), value); + + value = aintc_read_4(SW_INT_MASK_REG(block)); + value &= ~(1 << bit); + aintc_write_4(SW_INT_MASK_REG(block), value); + + if(nb == SW_INT_IRQNO_ENMI) /* must clear pending bit when enabled */ + aintc_write_4(SW_INT_IRQ_PENDING_REG(0), (1 << SW_INT_IRQNO_ENMI)); +} Added: head/sys/arm/allwinner/bus_space.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/bus_space.c Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,113 @@ +/*- + * Copyright (C) 2012 Ganbold Tsagaankhuu + * 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 MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +/* Prototypes for all the bus_space structure functions */ +bs_protos(generic); +bs_protos(generic_armv4); + +struct bus_space _base_tag = { + /* cookie */ + .bs_cookie = (void *) 0, + + /* mapping/unmapping */ + .bs_map = generic_bs_map, + .bs_unmap = generic_bs_unmap, + .bs_subregion = generic_bs_subregion, + + /* allocation/deallocation */ + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, + + /* barrier */ + .bs_barrier = generic_bs_barrier, + + /* read (single) */ + .bs_r_1 = generic_bs_r_1, + .bs_r_2 = generic_armv4_bs_r_2, + .bs_r_4 = generic_bs_r_4, + .bs_r_8 = NULL, + + /* read multiple */ + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = generic_armv4_bs_rm_2, + .bs_rm_4 = generic_bs_rm_4, + .bs_rm_8 = NULL, + + /* read region */ + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = generic_armv4_bs_rr_2, + .bs_rr_4 = generic_bs_rr_4, + .bs_rr_8 = NULL, + + /* write (single) */ + .bs_w_1 = generic_bs_w_1, + .bs_w_2 = generic_armv4_bs_w_2, + .bs_w_4 = generic_bs_w_4, + .bs_w_8 = NULL, + + /* write multiple */ + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = generic_armv4_bs_wm_2, + .bs_wm_4 = generic_bs_wm_4, + .bs_wm_8 = NULL, + + /* write region */ + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = generic_armv4_bs_wr_2, + .bs_wr_4 = generic_bs_wr_4, + .bs_wr_8 = NULL, + + /* set multiple */ + /* XXX not implemented */ + + /* set region */ + .bs_sr_1 = NULL, + .bs_sr_2 = generic_armv4_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = NULL, + + /* copy */ + .bs_c_1 = NULL, + .bs_c_2 = generic_armv4_bs_c_2, + .bs_c_4 = NULL, + .bs_c_8 = NULL, +}; + +bus_space_tag_t fdtbus_bs_tag = &_base_tag; Added: head/sys/arm/allwinner/common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/common.c Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * All rights reserved. + * + * Developed by Ganbold Tsagaankhuu + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct fdt_fixup_entry fdt_fixup_table[] = { + { NULL, NULL } +}; + +static int +fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + if (!fdt_is_compatible(node, "a10,aintc")) + return (ENXIO); + + *interrupt = fdt32_to_cpu(intr[0]); + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + + return (0); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &fdt_aintc_decode_ic, + NULL +}; Added: head/sys/arm/allwinner/console.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/console.c Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,146 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * 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. + */ + +/* Simple UART console driver for Allwinner A10 */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#ifndef A10_UART_BASE +#define A10_UART_BASE 0xe1c28000 /* UART0 */ +#endif + +int reg_shift = 2; + +#define UART_DLL 0 /* Out: Divisor Latch Low */ +#define UART_DLM 1 /* Out: Divisor Latch High */ +#define UART_FCR 2 /* Out: FIFO Control Register */ +#define UART_LCR 3 /* Out: Line Control Register */ +#define UART_MCR 4 /* Out: Modem Control Register */ +#define UART_LSR 5 /* In: Line Status Register */ +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ +#define UART_LSR_DR 0x01 /* Receiver data ready */ +#define UART_MSR 6 /* In: Modem Status Register */ +#define UART_SCR 7 /* I/O: Scratch Register */ + + +/* + * uart related funcs + */ +static u_int32_t +uart_getreg(u_int32_t *bas) +{ + return *((volatile u_int32_t *)(bas)) & 0xff; +} + +static void +uart_setreg(u_int32_t *bas, u_int32_t val) +{ + *((volatile u_int32_t *)(bas)) = (u_int32_t)val; +} + +static int +ub_getc(void) +{ + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + + (UART_LSR << reg_shift))) & UART_LSR_DR) == 0); + __asm __volatile("nop"); + + return (uart_getreg((u_int32_t *)A10_UART_BASE) & 0xff); +} + +static void +ub_putc(unsigned char c) +{ + if (c == '\n') + ub_putc('\r'); + + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + + (UART_LSR << reg_shift))) & UART_LSR_THRE) == 0) + __asm __volatile("nop"); + + uart_setreg((u_int32_t *)A10_UART_BASE, c); +} + +static cn_probe_t uart_cnprobe; +static cn_init_t uart_cninit; +static cn_term_t uart_cnterm; +static cn_getc_t uart_cngetc; +static cn_putc_t uart_cnputc; +static cn_grab_t uart_cngrab; +static cn_ungrab_t uart_cnungrab; + +static void +uart_cngrab(struct consdev *cp) +{ +} + +static void +uart_cnungrab(struct consdev *cp) +{ +} + + +static void +uart_cnprobe(struct consdev *cp) +{ + sprintf(cp->cn_name, "uart"); + cp->cn_pri = CN_NORMAL; +} + +static void +uart_cninit(struct consdev *cp) +{ + uart_setreg((u_int32_t *)(A10_UART_BASE + + (UART_FCR << reg_shift)), 0x06); +} + +void +uart_cnputc(struct consdev *cp, int c) +{ + ub_putc(c); +} + +int +uart_cngetc(struct consdev * cp) +{ + return ub_getc(); +} + +static void +uart_cnterm(struct consdev * cp) +{ +} + +CONSOLE_DRIVER(uart); + Added: head/sys/arm/allwinner/files.a10 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/files.a10 Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,17 @@ +# $FreeBSD$ +kern/kern_clocksource.c standard + +arm/arm/bus_space_asm_generic.S standard +arm/arm/bus_space_generic.c standard +arm/arm/cpufunc_asm_armv5.S standard +arm/arm/cpufunc_asm_arm10.S standard +arm/arm/cpufunc_asm_arm11.S standard +arm/arm/cpufunc_asm_armv7.S standard +arm/arm/irq_dispatch.S standard + +arm/allwinner/timer.c standard +arm/allwinner/aintc.c standard +arm/allwinner/bus_space.c standard +arm/allwinner/common.c standard +arm/allwinner/console.c standard +arm/allwinner/a10_machdep.c standard Added: head/sys/arm/allwinner/std.a10 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/std.a10 Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,21 @@ +# Allwinner A10 common options +#$FreeBSD$ + +cpu CPU_CORTEXA +machine arm armv6 +makeoption ARM_LITTLE_ENDIAN + +# Physical memory starts at 0x40200000. We assume images are loaded at +# 0x40200000, e.g. from u-boot with 'fatload mmc 0 0x40200000 kernel' +# +# +options PHYSADDR=0x40000000 + +makeoptions KERNPHYSADDR=0x40200000 +options KERNPHYSADDR=0x40200000 +makeoptions KERNVIRTADDR=0xc0200000 +options KERNVIRTADDR=0xc0200000 + +options STARTUP_PAGETABLE_ADDR=0x48000000 + +files "../allwinner/files.a10" Added: head/sys/arm/allwinner/timer.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/timer.c Tue Jan 15 08:26:16 2013 (r245450) @@ -0,0 +1,341 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include + +/** + * Timer registers addr + * + */ +#define SW_TIMER_IRQ_EN_REG 0x00 +#define SW_TIMER_IRQ_STA_REG 0x04 +#define SW_TIMER0_CTRL_REG 0x10 +#define SW_TIMER0_INT_VALUE_REG 0x14 +#define SW_TIMER0_CUR_VALUE_REG 0x18 + +#define SYS_TIMER_SCAL 16 /* timer clock source pre-divsion */ +#define SYS_TIMER_CLKSRC 24000000 /* timer clock source */ +#define TMR_INTER_VAL SYS_TIMER_CLKSRC/(SYS_TIMER_SCAL * 1000) + +#define CLOCK_TICK_RATE TMR_INTER_VAL +#define INITIAL_TIMECOUNTER (0xffffffff) + +struct a10_timer_softc { + device_t sc_dev; + struct resource *res[2]; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + void *sc_ih; /* interrupt handler */ + uint32_t sc_period; + uint32_t clkfreq; + struct eventtimer et; +}; + +int a10_timer_get_timerfreq(struct a10_timer_softc *); + +#define timer_read_4(sc, reg) \ + bus_space_read_4(sc->sc_bst, sc->sc_bsh, reg) +#define timer_write_4(sc, reg, val) \ + bus_space_write_4(sc->sc_bst, sc->sc_bsh, reg, val) + +static u_int a10_timer_get_timecount(struct timecounter *); +static int a10_timer_timer_start(struct eventtimer *, + struct bintime *, struct bintime *); +static int a10_timer_timer_stop(struct eventtimer *); + +static int a10_timer_initialized = 0; +static int a10_timer_intr(void *); +static int a10_timer_probe(device_t); +static int a10_timer_attach(device_t); + +static struct timecounter a10_timer_timecounter = { + .tc_name = "a10_timer timer0", + .tc_get_timecount = a10_timer_get_timecount, + .tc_counter_mask = ~0u, + .tc_frequency = 0, + .tc_quality = 1000, +}; + +struct a10_timer_softc *a10_timer_sc = NULL; + +static struct resource_spec a10_timer_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +a10_timer_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "a10,timers")) + return (ENXIO); + + device_set_desc(dev, "Allwinner A10 timer"); + return (BUS_PROBE_DEFAULT); +} + +static int +a10_timer_attach(device_t dev) +{ + struct a10_timer_softc *sc; + int err; + uint32_t val; + uint32_t freq; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, a10_timer_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + sc->sc_dev = dev; + sc->sc_bst = rman_get_bustag(sc->res[0]); + sc->sc_bsh = rman_get_bushandle(sc->res[0]); + + /* set interval */ + timer_write_4(sc, SW_TIMER0_INT_VALUE_REG, TMR_INTER_VAL); + + /* set clock source to HOSC, 16 pre-division */ + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + val &= ~(0x07<<4); + val &= ~(0x03<<2); + val |= (4<<4) | (1<<2); + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + /* set mode to auto reload */ + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + val |= (1<<1); + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + /* Enable timer0 */ + val = timer_read_4(sc, SW_TIMER_IRQ_EN_REG); + val |= (1<<0); + timer_write_4(sc, SW_TIMER_IRQ_EN_REG, val); + + /* Setup and enable the timer interrupt */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_CLK, a10_timer_intr, + NULL, sc, &sc->sc_ih); + if (err != 0) { + bus_release_resources(dev, a10_timer_spec, sc->res); + device_printf(dev, "Unable to setup the clock irq handler, " + "err = %d\n", err); + return (ENXIO); + } + freq = SYS_TIMER_CLKSRC; + + /* Set desired frequency in event timer and timecounter */ + sc->et.et_frequency = (uint64_t)freq; + sc->clkfreq = (uint64_t)freq; + sc->et.et_name = "a10_timer Eventtimer"; + sc->et.et_flags = ET_FLAGS_ONESHOT | ET_FLAGS_PERIODIC; + sc->et.et_quality = 1000; + sc->et.et_min_period.sec = 0; + sc->et.et_min_period.frac = + ((0x00000002LLU << 32) / sc->et.et_frequency) << 32; + sc->et.et_max_period.sec = 0xfffffff0U / sc->et.et_frequency; + sc->et.et_max_period.frac = + ((0xfffffffeLLU << 32) / sc->et.et_frequency) << 32; + sc->et.et_start = a10_timer_timer_start; + sc->et.et_stop = a10_timer_timer_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + + if (device_get_unit(dev) == 0) + a10_timer_sc = sc; + + a10_timer_timecounter.tc_frequency = (uint64_t)freq; + tc_init(&a10_timer_timecounter); + + printf("clock: hz=%d stathz = %d\n", hz, stathz); + + device_printf(sc->sc_dev, "timer clock frequency %d\n", sc->clkfreq); + + a10_timer_initialized = 1; + + return (0); +} + +static int +a10_timer_timer_start(struct eventtimer *et, struct bintime *first, + struct bintime *period) +{ + struct a10_timer_softc *sc; + uint32_t clo, count; + + sc = (struct a10_timer_softc *)et->et_priv; + + if (first != NULL) { + count = (sc->et.et_frequency * (first->frac >> 32)) >> 32; + if (first->sec != 0) + count += sc->et.et_frequency * first->sec; + + /* clear */ + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, 0); + clo = timer_read_4(sc, SW_TIMER0_CUR_VALUE_REG); + clo += count; + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, clo); + + return (0); + } + + return (EINVAL); +} + +static int +a10_timer_timer_stop(struct eventtimer *et) +{ + struct a10_timer_softc *sc; + uint32_t val; + + sc = (struct a10_timer_softc *)et->et_priv; + + /* clear */ + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, 0); + + /* disable */ + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + val &= ~(1<<0); /* Disable timer0 */ + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + sc->sc_period = 0; + + return (0); +} + +int +a10_timer_get_timerfreq(struct a10_timer_softc *sc) +{ + + return (sc->clkfreq); +} + +void +cpu_initclocks(void) +{ + cpu_initclocks_bsp(); +} + +static int +a10_timer_intr(void *arg) +{ + struct a10_timer_softc *sc; + + sc = (struct a10_timer_softc *)arg; + + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + + /* pending */ + timer_write_4(sc, SW_TIMER_IRQ_STA_REG, 0x1); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 09:14:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 16FEC77A; Tue, 15 Jan 2013 09:14:19 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 09D23748; Tue, 15 Jan 2013 09:14:19 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F9EI73059551; Tue, 15 Jan 2013 09:14:18 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F9EI7c059550; Tue, 15 Jan 2013 09:14:18 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201301150914.r0F9EI7c059550@svn.freebsd.org> From: Baptiste Daroussin Date: Tue, 15 Jan 2013 09:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245451 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 09:14:19 -0000 Author: bapt Date: Tue Jan 15 09:14:18 2013 New Revision: 245451 URL: http://svnweb.freebsd.org/changeset/base/245451 Log: MFC r244553,244594,244608,244639 In preparation for making 'pkg -N' the one true method of determining whether a system has been configured to use pkgng, cause /usr/sbin/pkg recognise a -n option and exit with a failure code when the pkg port is not installed Submitted by: matthew Modified: stable/9/usr.sbin/pkg/pkg.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/pkg.c ============================================================================== --- stable/9/usr.sbin/pkg/pkg.c Tue Jan 15 08:26:16 2013 (r245450) +++ stable/9/usr.sbin/pkg/pkg.c Tue Jan 15 09:14:18 2013 (r245451) @@ -452,6 +452,14 @@ main(__unused int argc, char *argv[]) getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); if (access(pkgpath, X_OK) == -1) { + /* + * To allow 'pkg -N' to be used as a reliable test for whether + * a system is configured to use pkg, don't bootstrap pkg + * when that argument is given as argv[1]. + */ + if (argv[1] != NULL && strcmp(argv[1], "-N") == 0) + errx(EXIT_FAILURE, "pkg is not installed"); + /* * Do not ask for confirmation if either of stdin or stdout is * not tty. Check the environment to see if user has answer From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 09:17:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4F091900; Tue, 15 Jan 2013 09:17:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4051775E; Tue, 15 Jan 2013 09:17:08 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F9H8FD060019; Tue, 15 Jan 2013 09:17:08 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F9H8Og060018; Tue, 15 Jan 2013 09:17:08 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201301150917.r0F9H8Og060018@svn.freebsd.org> From: Baptiste Daroussin Date: Tue, 15 Jan 2013 09:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245452 - stable/8/usr.sbin/pkg X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 09:17:08 -0000 Author: bapt Date: Tue Jan 15 09:17:07 2013 New Revision: 245452 URL: http://svnweb.freebsd.org/changeset/base/245452 Log: MFC r244553,244594,244608,244639 In preparation for making 'pkg -N' the one true method of determining whether a system has been configured to use pkgng, cause /usr/sbin/pkg recognise a -N option and exit with a failure code when the pkg port is not installed Submitted by: matthew Modified: stable/8/usr.sbin/pkg/pkg.c Directory Properties: stable/8/usr.sbin/pkg/ (props changed) Modified: stable/8/usr.sbin/pkg/pkg.c ============================================================================== --- stable/8/usr.sbin/pkg/pkg.c Tue Jan 15 09:14:18 2013 (r245451) +++ stable/8/usr.sbin/pkg/pkg.c Tue Jan 15 09:17:07 2013 (r245452) @@ -452,6 +452,14 @@ main(__unused int argc, char *argv[]) getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); if (access(pkgpath, X_OK) == -1) { + /* + * To allow 'pkg -N' to be used as a reliable test for whether + * a system is configured to use pkg, don't bootstrap pkg + * when that argument is given as argv[1]. + */ + if (argv[1] != NULL && strcmp(argv[1], "-N") == 0) + errx(EXIT_FAILURE, "pkg is not installed"); + /* * Do not ask for confirmation if either of stdin or stdout is * not tty. Check the environment to see if user has answer From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 09:23:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BEDCCC08; Tue, 15 Jan 2013 09:23:18 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by mx1.freebsd.org (Postfix) with ESMTP id D575C7A5; Tue, 15 Jan 2013 09:23:17 +0000 (UTC) Received: by mail-bk0-f41.google.com with SMTP id jg9so2452560bkc.14 for ; Tue, 15 Jan 2013 01:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=8N2y76YqpoNIGJKCHtvpXFB4rfg8aLoI9mqiz3zmkhA=; b=F93cWBOXLLSZJ9Tmhh6Pq7gkrv6SPTScXlW+6WU9ZkrEs0suirjRMRzE1J63yV94JV bPNjJG2Xl6faS7TyFjszS9WHVl9NmVNbULIA7hoAZNtmWoAZQqe0EdgD3D/fnb9Cs7+I cACtr3wfRHI7z9tCIRcXsLBpJLsIJuqtDft7sTGhZm+4+6KRXXmy7DeHHSHNerKPmA2r vZDK0bBdQZJiuRA/ON6aWp6vW6b+a235M1gJRogG8x8C4PM5bKwtYHTdAoRVWqEZnajX +mOUJ0i8aQwJ0nuESXb2m9bW/NQexr+AVepQdvzYULe5nHghe6RuSGRmtKJ+55cR02hQ jMbQ== X-Received: by 10.204.129.214 with SMTP id p22mr39910255bks.47.1358241796627; Tue, 15 Jan 2013 01:23:16 -0800 (PST) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id l17sm11990658bkw.12.2013.01.15.01.23.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 01:23:15 -0800 (PST) Sender: Alexander Motin Message-ID: <50F52000.30009@FreeBSD.org> Date: Tue, 15 Jan 2013 11:23:12 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Ganbold Tsagaankhuu Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts References: <201301150826.r0F8QGJr044600@svn.freebsd.org> In-Reply-To: <201301150826.r0F8QGJr044600@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 09:23:18 -0000 On 15.01.2013 10:26, Ganbold Tsagaankhuu wrote: > Author: ganbold (doc committer) > Date: Tue Jan 15 08:26:16 2013 > New Revision: 245450 > URL: http://svnweb.freebsd.org/changeset/base/245450 > > Log: > Initial support for Allwinner A10 SoC (Cubieboard) > Add simple console driver > Add interrupt handling and timer codes > Add kernel config file > Add dts file > Approved by: gonzo > + /* Set desired frequency in event timer and timecounter */ > + sc->et.et_frequency = (uint64_t)freq; > + sc->clkfreq = (uint64_t)freq; > + sc->et.et_name = "a10_timer Eventtimer"; > + sc->et.et_flags = ET_FLAGS_ONESHOT | ET_FLAGS_PERIODIC; > + sc->et.et_quality = 1000; > + sc->et.et_min_period.sec = 0; > + sc->et.et_min_period.frac = > + ((0x00000002LLU << 32) / sc->et.et_frequency) << 32; > + sc->et.et_max_period.sec = 0xfffffff0U / sc->et.et_frequency; > + sc->et.et_max_period.frac = > + ((0xfffffffeLLU << 32) / sc->et.et_frequency) << 32; > + sc->et.et_start = a10_timer_timer_start; > + sc->et.et_stop = a10_timer_timer_stop; > + sc->et.et_priv = sc; > + et_register(&sc->et); > +static int > +a10_timer_timer_start(struct eventtimer *et, struct bintime *first, > + struct bintime *period) > +{ > + struct a10_timer_softc *sc; > + uint32_t clo, count; > + > + sc = (struct a10_timer_softc *)et->et_priv; > + > + if (first != NULL) { > + count = (sc->et.et_frequency * (first->frac >> 32)) >> 32; > + if (first->sec != 0) > + count += sc->et.et_frequency * first->sec; > + > + /* clear */ > + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, 0); > + clo = timer_read_4(sc, SW_TIMER0_CUR_VALUE_REG); > + clo += count; > + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, clo); > + > + return (0); > + } > + > + return (EINVAL); > +} It seems like you've announced periodic mode support above, but haven't implemented it here. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 09:31:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5D92EEAE; Tue, 15 Jan 2013 09:31:15 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 40C747FD; Tue, 15 Jan 2013 09:31:15 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F9VFN9065165; Tue, 15 Jan 2013 09:31:15 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F9VEBA065160; Tue, 15 Jan 2013 09:31:14 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201301150931.r0F9VEBA065160@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Tue, 15 Jan 2013 09:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245453 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 09:31:15 -0000 Author: ganbold (doc committer) Date: Tue Jan 15 09:31:13 2013 New Revision: 245453 URL: http://svnweb.freebsd.org/changeset/base/245453 Log: Fix license to follow standard license template Reviewed by: joel Modified: head/sys/arm/allwinner/a10_machdep.c head/sys/arm/allwinner/bus_space.c head/sys/arm/allwinner/common.c head/sys/arm/allwinner/console.c head/sys/arm/allwinner/timer.c Modified: head/sys/arm/allwinner/a10_machdep.c ============================================================================== --- head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 09:17:07 2013 (r245452) +++ head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 09:31:13 2013 (r245453) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu. + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * This code is derived from software written for Brini by Mark Brinicombe Modified: head/sys/arm/allwinner/bus_space.c ============================================================================== --- head/sys/arm/allwinner/bus_space.c Tue Jan 15 09:17:07 2013 (r245452) +++ head/sys/arm/allwinner/bus_space.c Tue Jan 15 09:31:13 2013 (r245453) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,14 +10,11 @@ * 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 MARVELL nor the names of contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * 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) Modified: head/sys/arm/allwinner/common.c ============================================================================== --- head/sys/arm/allwinner/common.c Tue Jan 15 09:17:07 2013 (r245452) +++ head/sys/arm/allwinner/common.c Tue Jan 15 09:31:13 2013 (r245453) @@ -1,9 +1,7 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (c) 2012 Ganbold Tsagaankhuu * All rights reserved. * - * Developed by Ganbold Tsagaankhuu - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: head/sys/arm/allwinner/console.c ============================================================================== --- head/sys/arm/allwinner/console.c Tue Jan 15 09:17:07 2013 (r245452) +++ head/sys/arm/allwinner/console.c Tue Jan 15 09:31:13 2013 (r245453) @@ -5,11 +5,11 @@ * 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. + * 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 Modified: head/sys/arm/allwinner/timer.c ============================================================================== --- head/sys/arm/allwinner/timer.c Tue Jan 15 09:17:07 2013 (r245452) +++ head/sys/arm/allwinner/timer.c Tue Jan 15 09:31:13 2013 (r245453) @@ -5,11 +5,11 @@ * 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. + * 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 From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 09:39:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1FD1C303; Tue, 15 Jan 2013 09:39:13 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0374E872; Tue, 15 Jan 2013 09:39:13 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F9dCs8066341; Tue, 15 Jan 2013 09:39:12 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F9dCYn066336; Tue, 15 Jan 2013 09:39:12 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201301150939.r0F9dCYn066336@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Tue, 15 Jan 2013 09:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245454 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 09:39:13 -0000 Author: ganbold (doc committer) Date: Tue Jan 15 09:39:11 2013 New Revision: 245454 URL: http://svnweb.freebsd.org/changeset/base/245454 Log: Fix formatting of license according to share/examples/etc/bsd-style-copyright Reviewed by: joel Modified: head/sys/arm/allwinner/a10_machdep.c head/sys/arm/allwinner/bus_space.c head/sys/arm/allwinner/common.c head/sys/arm/allwinner/console.c head/sys/arm/allwinner/timer.c Modified: head/sys/arm/allwinner/a10_machdep.c ============================================================================== --- head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 09:31:13 2013 (r245453) +++ head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 09:39:11 2013 (r245454) @@ -16,7 +16,7 @@ * 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 + * 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) Modified: head/sys/arm/allwinner/bus_space.c ============================================================================== --- head/sys/arm/allwinner/bus_space.c Tue Jan 15 09:31:13 2013 (r245453) +++ head/sys/arm/allwinner/bus_space.c Tue Jan 15 09:39:11 2013 (r245454) @@ -14,7 +14,7 @@ * 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 + * 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) Modified: head/sys/arm/allwinner/common.c ============================================================================== --- head/sys/arm/allwinner/common.c Tue Jan 15 09:31:13 2013 (r245453) +++ head/sys/arm/allwinner/common.c Tue Jan 15 09:39:11 2013 (r245454) @@ -14,7 +14,7 @@ * 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 + * 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) Modified: head/sys/arm/allwinner/console.c ============================================================================== --- head/sys/arm/allwinner/console.c Tue Jan 15 09:31:13 2013 (r245453) +++ head/sys/arm/allwinner/console.c Tue Jan 15 09:39:11 2013 (r245454) @@ -14,7 +14,7 @@ * 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 + * 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) Modified: head/sys/arm/allwinner/timer.c ============================================================================== --- head/sys/arm/allwinner/timer.c Tue Jan 15 09:31:13 2013 (r245453) +++ head/sys/arm/allwinner/timer.c Tue Jan 15 09:39:11 2013 (r245454) @@ -14,7 +14,7 @@ * 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 + * 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) From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 09:56:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 37ED25C5; Tue, 15 Jan 2013 09:56:21 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1ECDB901; Tue, 15 Jan 2013 09:56:21 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0F9uL2I071786; Tue, 15 Jan 2013 09:56:21 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0F9uKTD071785; Tue, 15 Jan 2013 09:56:20 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201301150956.r0F9uKTD071785@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Tue, 15 Jan 2013 09:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245455 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 09:56:21 -0000 Author: ganbold (doc committer) Date: Tue Jan 15 09:56:20 2013 New Revision: 245455 URL: http://svnweb.freebsd.org/changeset/base/245455 Log: Add mistakenly removed third clause to license Reviewed by: joel Modified: head/sys/arm/allwinner/bus_space.c Modified: head/sys/arm/allwinner/bus_space.c ============================================================================== --- head/sys/arm/allwinner/bus_space.c Tue Jan 15 09:39:11 2013 (r245454) +++ head/sys/arm/allwinner/bus_space.c Tue Jan 15 09:56:20 2013 (r245455) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu + * Copyright (C) 2012 FreeBSD Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,11 +10,14 @@ * 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 MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY 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 + * ARE DISCLAIMED. IN NO EVENT SHALL 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) From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 10:06:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 410BEA43; Tue, 15 Jan 2013 10:06:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2E32A97D; Tue, 15 Jan 2013 10:06:36 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FA6aQZ075111; Tue, 15 Jan 2013 10:06:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FA6ZnV075107; Tue, 15 Jan 2013 10:06:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301151006.r0FA6ZnV075107@svn.freebsd.org> From: Alexander Motin Date: Tue, 15 Jan 2013 10:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245456 - in head: sbin/geom/class/raid3 sys/geom/raid3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 10:06:36 -0000 Author: mav Date: Tue Jan 15 10:06:35 2013 New Revision: 245456 URL: http://svnweb.freebsd.org/changeset/base/245456 Log: Allow to insert new component to geom_raid3 without specifying number. PR: kern/160562 MFC after: 2 weeks Modified: head/sbin/geom/class/raid3/geom_raid3.c head/sbin/geom/class/raid3/graid3.8 head/sys/geom/raid3/g_raid3_ctl.c Modified: head/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- head/sbin/geom/class/raid3/geom_raid3.c Tue Jan 15 09:56:20 2013 (r245455) +++ head/sbin/geom/class/raid3/geom_raid3.c Tue Jan 15 10:06:35 2013 (r245456) @@ -76,7 +76,7 @@ struct g_command class_commands[] = { { "insert", G_FLAG_VERBOSE, NULL, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, - { 'n', "number", NULL, G_TYPE_NUMBER }, + { 'n', "number", G_VAL_OPTIONAL, G_TYPE_NUMBER }, G_OPT_SENTINEL }, "[-hv] <-n number> name prov" Modified: head/sbin/geom/class/raid3/graid3.8 ============================================================================== --- head/sbin/geom/class/raid3/graid3.8 Tue Jan 15 09:56:20 2013 (r245455) +++ head/sbin/geom/class/raid3/graid3.8 Tue Jan 15 10:06:35 2013 (r245456) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2010 +.Dd January 15, 2012 .Dt GRAID3 8 .Os .Sh NAME @@ -53,7 +53,7 @@ .Nm .Cm insert .Op Fl hv -.Fl n Ar number +.Op Fl n Ar number .Ar name .Ar prov .Nm @@ -171,6 +171,8 @@ Add the given component to the existing removed previously with the .Cm remove command or if one component is missing and will not be connected again. +If no number is given, new component will be added instead of first missed +component. .Pp Additional options include: .Bl -tag -width ".Fl h" Modified: head/sys/geom/raid3/g_raid3_ctl.c ============================================================================== --- head/sys/geom/raid3/g_raid3_ctl.c Tue Jan 15 09:56:20 2013 (r245455) +++ head/sys/geom/raid3/g_raid3_ctl.c Tue Jan 15 10:06:35 2013 (r245456) @@ -404,7 +404,7 @@ g_raid3_ctl_insert(struct gctl_req *req, u_char *sector; off_t compsize; intmax_t *no; - int *hardcode, *nargs, error; + int *hardcode, *nargs, error, autono; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -425,11 +425,10 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No 'arg%u' argument.", 1); return; } - no = gctl_get_paraml(req, "number", sizeof(*no)); - if (no == NULL) { - gctl_error(req, "No '%s' argument.", "no"); - return; - } + if (gctl_get_param(req, "number", NULL) != NULL) + no = gctl_get_paraml(req, "number", sizeof(*no)); + else + no = NULL; if (strncmp(name, "/dev/", 5) == 0) name += 5; g_topology_lock(); @@ -465,16 +464,30 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No such device: %s.", name); goto end; } - if (*no >= sc->sc_ndisks) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Invalid component number."); - goto end; - } - disk = &sc->sc_disks[*no]; - if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Component %jd is already connected.", *no); - goto end; + if (no != NULL) { + if (*no < 0 || *no >= sc->sc_ndisks) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Invalid component number."); + goto end; + } + disk = &sc->sc_disks[*no]; + if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Component %jd is already connected.", + *no); + goto end; + } + } else { + disk = NULL; + for (autono = 0; autono < sc->sc_ndisks && disk == NULL; autono++) + if (sc->sc_disks[autono].d_state == + G_RAID3_DISK_STATE_NODISK) + disk = &sc->sc_disks[autono]; + if (disk == NULL) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "No disconnected components."); + goto end; + } } if (((sc->sc_sectorsize / (sc->sc_ndisks - 1)) % pp->sectorsize) != 0) { sx_xunlock(&sc->sc_lock); From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 10:42:57 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ECE653E0; Tue, 15 Jan 2013 10:42:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3E3D0B41; Tue, 15 Jan 2013 10:42:56 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id r0FAgnPM089544; Tue, 15 Jan 2013 14:42:49 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id r0FAgmto089543; Tue, 15 Jan 2013 14:42:48 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 15 Jan 2013 14:42:48 +0400 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r245222 - head/sys/sys Message-ID: <20130115104248.GI79056@FreeBSD.org> References: <201301090909.r09999kV013794@svn.freebsd.org> <20130109091217.GL66284@FreeBSD.org> <20130110081336.L967@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20130110081336.L967@besplex.bde.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, Hans Petter Selasky X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 10:42:58 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Thu, Jan 10, 2013 at 09:31:28AM +1100, Bruce Evans wrote: B> > On Wed, Jan 09, 2013 at 09:09:09AM +0000, Hans Petter Selasky wrote: B> > H> Log: B> > H> Fix compile warning when using GCC: B> > H> Comparison between signed and unsigned. B> B> o Add 3 style bugs: B> 2 sets of excessive parentheses B> 1 line longer than 80 columns Bruce, can you please look at attached patch, that fixes problems you describe? It - fixes mentioned style bugs in param.h - adds int casts to MHLEN and MLEN - removes extra casts from (void *) to (struct mbuf *) - removes extra declarations of inlined functions - uninlines and moves m_get2() and m_getjcl() to uipc_mbuf.c - size argument of m_get2() swicthed back to int -- Totus tuus, Glebius. --LQksG6bCIzRHxTLp Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="mbuf.diff" Index: sys/param.h =================================================================== --- sys/param.h (revision 245450) +++ sys/param.h (working copy) @@ -156,8 +156,8 @@ * MCLBYTES must be no larger than PAGE_SIZE. */ #ifndef MSIZE -#define MSIZE 256 /* size of an mbuf */ -#endif /* MSIZE */ +#define MSIZE 256 /* size of an mbuf */ +#endif #ifndef MCLSHIFT #define MCLSHIFT 11 /* convert bytes to mbuf clusters */ Index: sys/mbuf.h =================================================================== --- sys/mbuf.h (revision 245450) +++ sys/mbuf.h (working copy) @@ -52,11 +52,14 @@ * stored. Additionally, it is possible to allocate a separate buffer * externally and attach it to the mbuf in a way similar to that of mbuf * clusters. + * + * MLEN is data length in a normal mbuf. + * MHLEN is data length in an mbuf with pktheader. + * MINCLSIZE is a smallest amount of data that should be put into cluster. */ -#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ -#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ -#define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */ -#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ +#define MLEN ((int)(MSIZE - sizeof(struct m_hdr))) +#define MHLEN ((int)(MLEN - sizeof(struct pkthdr))) +#define MINCLSIZE (MHLEN + 1) #ifdef _KERNEL /*- @@ -393,23 +396,10 @@ extern uma_zone_t zone_jumbo16; extern uma_zone_t zone_ext_refcnt; -static __inline struct mbuf *m_getcl(int how, short type, int flags); -static __inline struct mbuf *m_get(int how, short type); -static __inline struct mbuf *m_get2(int how, short type, int flags, - u_int size); -static __inline struct mbuf *m_gethdr(int how, short type); -static __inline struct mbuf *m_getjcl(int how, short type, int flags, - int size); -static __inline struct mbuf *m_getclr(int how, short type); /* XXX */ -static __inline int m_init(struct mbuf *m, uma_zone_t zone, - int size, int how, short type, int flags); -static __inline struct mbuf *m_free(struct mbuf *m); -static __inline void m_clget(struct mbuf *m, int how); -static __inline void *m_cljget(struct mbuf *m, int how, int size); -static __inline void m_chtype(struct mbuf *m, short new_type); -void mb_free_ext(struct mbuf *); -static __inline struct mbuf *m_last(struct mbuf *m); -int m_pkthdr_init(struct mbuf *m, int how); +struct mbuf *m_get2(int how, short type, int flags, int size); +struct mbuf *m_getjcl(int how, short type, int flags, int size); +void mb_free_ext(struct mbuf *); +int m_pkthdr_init(struct mbuf *m, int how); static __inline int m_gettype(int size) @@ -502,7 +492,7 @@ args.flags = 0; args.type = type; - return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how))); + return (uma_zalloc_arg(zone_mbuf, &args, how)); } /* @@ -529,7 +519,7 @@ args.flags = M_PKTHDR; args.type = type; - return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how))); + return (uma_zalloc_arg(zone_mbuf, &args, how)); } static __inline struct mbuf * @@ -539,87 +529,9 @@ args.flags = flags; args.type = type; - return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how))); + return (uma_zalloc_arg(zone_pack, &args, how)); } -/* - * m_get2() allocates minimum mbuf that would fit "size" argument. - * - * XXX: This is rather large, should be real function maybe. - */ -static __inline struct mbuf * -m_get2(int how, short type, int flags, u_int size) -{ - struct mb_args args; - struct mbuf *m, *n; - uma_zone_t zone; - - args.flags = flags; - args.type = type; - - if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) - return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how))); - if (size <= MCLBYTES) - return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how))); - - if (size > MJUM16BYTES) - return (NULL); - - m = uma_zalloc_arg(zone_mbuf, &args, how); - if (m == NULL) - return (NULL); - -#if MJUMPAGESIZE != MCLBYTES - if (size <= MJUMPAGESIZE) - zone = zone_jumbop; - else -#endif - if (size <= MJUM9BYTES) - zone = zone_jumbo9; - else - zone = zone_jumbo16; - - n = uma_zalloc_arg(zone, m, how); - if (n == NULL) { - uma_zfree(zone_mbuf, m); - return (NULL); - } - - return (m); -} - -/* - * m_getjcl() returns an mbuf with a cluster of the specified size attached. - * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. - * - * XXX: This is rather large, should be real function maybe. - */ -static __inline struct mbuf * -m_getjcl(int how, short type, int flags, int size) -{ - struct mb_args args; - struct mbuf *m, *n; - uma_zone_t zone; - - if (size == MCLBYTES) - return m_getcl(how, type, flags); - - args.flags = flags; - args.type = type; - - m = uma_zalloc_arg(zone_mbuf, &args, how); - if (m == NULL) - return (NULL); - - zone = m_getzone(size); - n = uma_zalloc_arg(zone, m, how); - if (n == NULL) { - uma_zfree(zone_mbuf, m); - return (NULL); - } - return (m); -} - static __inline void m_free_fast(struct mbuf *m) { Index: kern/uipc_mbuf.c =================================================================== --- kern/uipc_mbuf.c (revision 245450) +++ kern/uipc_mbuf.c (working copy) @@ -85,6 +85,79 @@ #endif /* + * m_get2() allocates minimum mbuf that would fit "size" argument. + */ +struct mbuf * +m_get2(int how, short type, int flags, int size) +{ + struct mb_args args; + struct mbuf *m, *n; + uma_zone_t zone; + + args.flags = flags; + args.type = type; + + if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) + return (uma_zalloc_arg(zone_mbuf, &args, how)); + if (size <= MCLBYTES) + return (uma_zalloc_arg(zone_pack, &args, how)); + if (size > MJUM16BYTES) + return (NULL); + + m = uma_zalloc_arg(zone_mbuf, &args, how); + if (m == NULL) + return (NULL); + +#if MJUMPAGESIZE != MCLBYTES + if (size <= MJUMPAGESIZE) + zone = zone_jumbop; + else +#endif + if (size <= MJUM9BYTES) + zone = zone_jumbo9; + else + zone = zone_jumbo16; + + n = uma_zalloc_arg(zone, m, how); + if (n == NULL) { + uma_zfree(zone_mbuf, m); + return (NULL); + } + + return (m); +} + +/* + * m_getjcl() returns an mbuf with a cluster of the specified size attached. + * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. + */ +struct mbuf * +m_getjcl(int how, short type, int flags, int size) +{ + struct mb_args args; + struct mbuf *m, *n; + uma_zone_t zone; + + if (size == MCLBYTES) + return m_getcl(how, type, flags); + + args.flags = flags; + args.type = type; + + m = uma_zalloc_arg(zone_mbuf, &args, how); + if (m == NULL) + return (NULL); + + zone = m_getzone(size); + n = uma_zalloc_arg(zone, m, how); + if (n == NULL) { + uma_zfree(zone_mbuf, m); + return (NULL); + } + return (m); +} + +/* * Allocate a given length worth of mbufs and/or clusters (whatever fits * best) and return a pointer to the top of the allocated chain. If an * existing mbuf chain is provided, then we will append the new chain --LQksG6bCIzRHxTLp-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 12:13:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D7AF9FC1; Tue, 15 Jan 2013 12:13:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 45891220; Tue, 15 Jan 2013 12:13:46 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0FCDaBe025423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Jan 2013 23:13:38 +1100 Date: Tue, 15 Jan 2013 23:13:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r245222 - head/sys/sys In-Reply-To: <20130115104248.GI79056@FreeBSD.org> Message-ID: <20130115220100.G977@besplex.bde.org> References: <201301090909.r09999kV013794@svn.freebsd.org> <20130109091217.GL66284@FreeBSD.org> <20130110081336.L967@besplex.bde.org> <20130115104248.GI79056@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Zty1sKHG c=1 sm=1 a=5ctC8jQGzeMA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=FSHVhTTuonsA:10 a=XPZFlgyBuagG_ouHMVoA:9 a=CjuIK1q_8ugA:10 a=BXU8iOwLmnkijF0M:21 a=gnC4dsayiF7WZ4Gn:21 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hans Petter Selasky X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 12:13:48 -0000 On Tue, 15 Jan 2013, Gleb Smirnoff wrote: > On Thu, Jan 10, 2013 at 09:31:28AM +1100, Bruce Evans wrote: > B> > On Wed, Jan 09, 2013 at 09:09:09AM +0000, Hans Petter Selasky wrote: > B> > H> Log: > B> > H> Fix compile warning when using GCC: > B> > H> Comparison between signed and unsigned. > B> > B> o Add 3 style bugs: > B> 2 sets of excessive parentheses > B> 1 line longer than 80 columns > > Bruce, > > can you please look at attached patch, that fixes problems you > describe? It > > - fixes mentioned style bugs in param.h > - adds int casts to MHLEN and MLEN > - removes extra casts from (void *) to (struct mbuf *) > - removes extra declarations of inlined functions > - uninlines and moves m_get2() and m_getjcl() to uipc_mbuf.c > - size argument of m_get2() swicthed back to int Looks mostly good. % ... % Index: sys/mbuf.h % =================================================================== % --- sys/mbuf.h (revision 245450) % +++ sys/mbuf.h (working copy) % @@ -52,11 +52,14 @@ % * stored. Additionally, it is possible to allocate a separate buffer % * externally and attach it to the mbuf in a way similar to that of mbuf % * clusters. % + * % + * MLEN is data length in a normal mbuf. % + * MHLEN is data length in an mbuf with pktheader. % + * MINCLSIZE is a smallest amount of data that should be put into cluster. % */ The comment needs indent protection if you want to preserve the line structure of the new comments. I don't see any better way to format these lines as bullet points. A separate paragraph for each would be too verbose. % -#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ % -#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ % -#define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */ % -#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ % +#define MLEN ((int)(MSIZE - sizeof(struct m_hdr))) % +#define MHLEN ((int)(MLEN - sizeof(struct pkthdr))) % +#define MINCLSIZE (MHLEN + 1) These never needed to be sorted non-alphabetically. I hope this doesn't cause any problems. MHLEN, etc., are used just a few times outside of mbuf.h where we can't control this, mostly in specialized code. One interesting use in non-specialized code is in tcp_output(): if (len <= MHLEN - hdrlen - max_linkhdr) { Here len has type long, MHLEN has type size_t (before this change) and type int (after this change), hdrlen has type unsigned (misspelled as that instead of u_int), and max_linkhdr has type int. So the type combinations are nonsense, and there is a good chance of getting different compiler warnings about this before and after the change. Having just one unsigned type in the mix tends to promote everything to unsigned, except on 64-bit systems with one u_int but no size_t, the long has highest rank so everything gets promoted to long. % ... % @@ -393,23 +396,10 @@ % extern uma_zone_t zone_jumbo16; % extern uma_zone_t zone_ext_refcnt; % % -static __inline struct mbuf *m_getcl(int how, short type, int flags); % ... % -static __inline void *m_cljget(struct mbuf *m, int how, int size); % -static __inline void m_chtype(struct mbuf *m, short new_type); % -void mb_free_ext(struct mbuf *); % -static __inline struct mbuf *m_last(struct mbuf *m); % -int m_pkthdr_init(struct mbuf *m, int how); % +struct mbuf *m_get2(int how, short type, int flags, int size); % +struct mbuf *m_getjcl(int how, short type, int flags, int size); % +void mb_free_ext(struct mbuf *); This one is still missing a parameter name, unlike all (?) the others. % +int m_pkthdr_init(struct mbuf *m, int how); The 2 new non-inline prototypes should be moved to the general section for non-inline prototypes. The 2 old ones must remain early since they are used in the inlines. After moving the 2 new ones, also remove their parameter names to match the (worse) nearby style. This leaves only 1 nearby other for mb_free_ext() to be mismatched with. The general prototype section has a fairly uniform style, with the only obvious bugs being: - m_copyup() has parameter names - m_sanity() is misindented by 1 space - m_unshare() has 1 parameter name but 2 parameters. There is another section for non-inline prototypes for packet tag routines. This has the same style as the general section, except it is unsorted at the end. It is placed _before_ the packet tag inlines instead of after them. This has the technical advantage that you don't have to split up the non-inline prototypes. There is another section for non-inline prototypes and other things for MBUF_PROFILING. This has about 3 style bugs per line. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 13:56:20 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9EC073DB; Tue, 15 Jan 2013 13:56:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id C8E2C99C; Tue, 15 Jan 2013 13:56:18 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id r0FDuHxA090730; Tue, 15 Jan 2013 17:56:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id r0FDuH0c090729; Tue, 15 Jan 2013 17:56:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 15 Jan 2013 17:56:17 +0400 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r245222 - head/sys/sys Message-ID: <20130115135617.GJ79056@FreeBSD.org> References: <201301090909.r09999kV013794@svn.freebsd.org> <20130109091217.GL66284@FreeBSD.org> <20130110081336.L967@besplex.bde.org> <20130115104248.GI79056@FreeBSD.org> <20130115220100.G977@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: <20130115220100.G977@besplex.bde.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, Hans Petter Selasky X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 13:56:20 -0000 --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Bruce, On Tue, Jan 15, 2013 at 11:13:36PM +1100, Bruce Evans wrote: B> > can you please look at attached patch, that fixes problems you B> > describe? It B> > B> > - fixes mentioned style bugs in param.h B> > - adds int casts to MHLEN and MLEN B> > - removes extra casts from (void *) to (struct mbuf *) B> > - removes extra declarations of inlined functions B> > - uninlines and moves m_get2() and m_getjcl() to uipc_mbuf.c B> > - size argument of m_get2() swicthed back to int B> B> Looks mostly good. B> B> % ... B> % Index: sys/mbuf.h B> % =================================================================== B> % --- sys/mbuf.h (revision 245450) B> % +++ sys/mbuf.h (working copy) B> % @@ -52,11 +52,14 @@ B> % * stored. Additionally, it is possible to allocate a separate buffer B> % * externally and attach it to the mbuf in a way similar to that of mbuf B> % * clusters. B> % + * B> % + * MLEN is data length in a normal mbuf. B> % + * MHLEN is data length in an mbuf with pktheader. B> % + * MINCLSIZE is a smallest amount of data that should be put into cluster. B> % */ B> B> The comment needs indent protection if you want to preserve the line B> structure of the new comments. I don't see any better way to format these B> lines as bullet points. A separate paragraph for each would be too verbose. B> B> % -#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ B> % -#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ B> % -#define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */ B> % -#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ B> % +#define MLEN ((int)(MSIZE - sizeof(struct m_hdr))) B> % +#define MHLEN ((int)(MLEN - sizeof(struct pkthdr))) B> % +#define MINCLSIZE (MHLEN + 1) B> B> These never needed to be sorted non-alphabetically. Sorting alphabetically moves MLEN to the bottom, but the above macros are defined via MLEN. IMO, it is more easy to read when we move from most simple macro to ones that are derived from it, not in alphabetical order. B> I hope this doesn't cause any problems. MHLEN, etc., are used just a few B> times outside of mbuf.h where we can't control this, mostly in specialized B> code. One interesting use in non-specialized code is in tcp_output(): B> B> if (len <= MHLEN - hdrlen - max_linkhdr) { B> B> Here len has type long, MHLEN has type size_t (before this change) and type B> int (after this change), hdrlen has type unsigned (misspelled as that instead B> of u_int), and max_linkhdr has type int. So the type combinations are B> nonsense, and there is a good chance of getting different compiler warnings B> about this before and after the change. Having just one unsigned type in B> the mix tends to promote everything to unsigned, except on 64-bit systems B> with one u_int but no size_t, the long has highest rank so everything B> gets promoted to long. I think here we can do: - unsigned ipoptlen, optlen, hdrlen; + int ipoptlen, optlen, hdrlen; These three take their values from: - ip6_optlen() - m_len (from mbuf header) - tcp_addoptions() ... , which all are ints. - sizeof(), which can be casted. I left the ipsec_optlen unsigned. Its type originates from ipsec_hdrsiz_internal(), which returns result of sizeof(). Patch attached. This leads to (len <= MHLEN - hdrlen - max_linkhdr) comparing long and (int - int - int). This also fixes many other places in tcp_output, where values od ipoptlen, optlen, hdrlen are assigned to int variables or supplied as int arguments. B> % ... B> % @@ -393,23 +396,10 @@ B> % extern uma_zone_t zone_jumbo16; B> % extern uma_zone_t zone_ext_refcnt; B> % B> % -static __inline struct mbuf *m_getcl(int how, short type, int flags); B> % ... B> % -static __inline void *m_cljget(struct mbuf *m, int how, int size); B> % -static __inline void m_chtype(struct mbuf *m, short new_type); B> % -void mb_free_ext(struct mbuf *); B> % -static __inline struct mbuf *m_last(struct mbuf *m); B> % -int m_pkthdr_init(struct mbuf *m, int how); B> % +struct mbuf *m_get2(int how, short type, int flags, int size); B> % +struct mbuf *m_getjcl(int how, short type, int flags, int size); B> % +void mb_free_ext(struct mbuf *); B> B> This one is still missing a parameter name, unlike all (?) the others. B> B> % +int m_pkthdr_init(struct mbuf *m, int how); B> B> The 2 new non-inline prototypes should be moved to the general section B> for non-inline prototypes. The 2 old ones must remain early since B> they are used in the inlines. B> B> After moving the 2 new ones, also remove their parameter names to match B> the (worse) nearby style. This leaves only 1 nearby other for mb_free_ext() B> to be mismatched with. B> B> The general prototype section has a fairly uniform style, with the only B> obvious bugs being: B> - m_copyup() has parameter names B> - m_sanity() is misindented by 1 space B> - m_unshare() has 1 parameter name but 2 parameters. Applied, patch attached. -- Totus tuus, Glebius. --BwCQnh7xodEAoBMC Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="tcp_output.diff" Index: netinet/tcp_output.c =================================================================== --- netinet/tcp_output.c (revision 245450) +++ netinet/tcp_output.c (working copy) @@ -173,7 +173,7 @@ struct ipovly *ipov = NULL; struct tcphdr *th; u_char opt[TCP_MAXOLEN]; - unsigned ipoptlen, optlen, hdrlen; + int ipoptlen, optlen, hdrlen; #ifdef IPSEC unsigned ipsec_optlen = 0; #endif @@ -684,10 +684,10 @@ optlen = 0; #ifdef INET6 if (isipv6) - hdrlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr); + hdrlen = (int)(sizeof(struct ip6_hdr) + sizeof(struct tcphdr)); else #endif - hdrlen = sizeof (struct tcpiphdr); + hdrlen = (int)sizeof(struct tcpiphdr); /* * Compute options for segment. --BwCQnh7xodEAoBMC Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="mbuf.diff" Index: netinet/tcp_output.c =================================================================== --- netinet/tcp_output.c (revision 245450) +++ netinet/tcp_output.c (working copy) @@ -173,7 +173,7 @@ struct ipovly *ipov = NULL; struct tcphdr *th; u_char opt[TCP_MAXOLEN]; - unsigned ipoptlen, optlen, hdrlen; + int ipoptlen, optlen, hdrlen; #ifdef IPSEC unsigned ipsec_optlen = 0; #endif @@ -684,10 +684,10 @@ optlen = 0; #ifdef INET6 if (isipv6) - hdrlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr); + hdrlen = (int)(sizeof(struct ip6_hdr) + sizeof(struct tcphdr)); else #endif - hdrlen = sizeof (struct tcpiphdr); + hdrlen = (int)sizeof(struct tcpiphdr); /* * Compute options for segment. Index: sys/param.h =================================================================== --- sys/param.h (revision 245450) +++ sys/param.h (working copy) @@ -156,8 +156,8 @@ * MCLBYTES must be no larger than PAGE_SIZE. */ #ifndef MSIZE -#define MSIZE 256 /* size of an mbuf */ -#endif /* MSIZE */ +#define MSIZE 256 /* size of an mbuf */ +#endif #ifndef MCLSHIFT #define MCLSHIFT 11 /* convert bytes to mbuf clusters */ Index: sys/mbuf.h =================================================================== --- sys/mbuf.h (revision 245450) +++ sys/mbuf.h (working copy) @@ -52,11 +52,14 @@ * stored. Additionally, it is possible to allocate a separate buffer * externally and attach it to the mbuf in a way similar to that of mbuf * clusters. + * + * MLEN is data length in a normal mbuf. + * MHLEN is data length in an mbuf with pktheader. + * MINCLSIZE is a smallest amount of data that should be put into cluster. */ -#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ -#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ -#define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */ -#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ +#define MLEN ((int)(MSIZE - sizeof(struct m_hdr))) +#define MHLEN ((int)(MLEN - sizeof(struct pkthdr))) +#define MINCLSIZE (MHLEN + 1) #ifdef _KERNEL /*- @@ -393,23 +396,8 @@ extern uma_zone_t zone_jumbo16; extern uma_zone_t zone_ext_refcnt; -static __inline struct mbuf *m_getcl(int how, short type, int flags); -static __inline struct mbuf *m_get(int how, short type); -static __inline struct mbuf *m_get2(int how, short type, int flags, - u_int size); -static __inline struct mbuf *m_gethdr(int how, short type); -static __inline struct mbuf *m_getjcl(int how, short type, int flags, - int size); -static __inline struct mbuf *m_getclr(int how, short type); /* XXX */ -static __inline int m_init(struct mbuf *m, uma_zone_t zone, - int size, int how, short type, int flags); -static __inline struct mbuf *m_free(struct mbuf *m); -static __inline void m_clget(struct mbuf *m, int how); -static __inline void *m_cljget(struct mbuf *m, int how, int size); -static __inline void m_chtype(struct mbuf *m, short new_type); -void mb_free_ext(struct mbuf *); -static __inline struct mbuf *m_last(struct mbuf *m); -int m_pkthdr_init(struct mbuf *m, int how); +void mb_free_ext(struct mbuf *); +int m_pkthdr_init(struct mbuf *, int); static __inline int m_gettype(int size) @@ -502,7 +490,7 @@ args.flags = 0; args.type = type; - return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how))); + return (uma_zalloc_arg(zone_mbuf, &args, how)); } /* @@ -529,7 +517,7 @@ args.flags = M_PKTHDR; args.type = type; - return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how))); + return (uma_zalloc_arg(zone_mbuf, &args, how)); } static __inline struct mbuf * @@ -539,87 +527,9 @@ args.flags = flags; args.type = type; - return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how))); + return (uma_zalloc_arg(zone_pack, &args, how)); } -/* - * m_get2() allocates minimum mbuf that would fit "size" argument. - * - * XXX: This is rather large, should be real function maybe. - */ -static __inline struct mbuf * -m_get2(int how, short type, int flags, u_int size) -{ - struct mb_args args; - struct mbuf *m, *n; - uma_zone_t zone; - - args.flags = flags; - args.type = type; - - if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) - return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how))); - if (size <= MCLBYTES) - return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how))); - - if (size > MJUM16BYTES) - return (NULL); - - m = uma_zalloc_arg(zone_mbuf, &args, how); - if (m == NULL) - return (NULL); - -#if MJUMPAGESIZE != MCLBYTES - if (size <= MJUMPAGESIZE) - zone = zone_jumbop; - else -#endif - if (size <= MJUM9BYTES) - zone = zone_jumbo9; - else - zone = zone_jumbo16; - - n = uma_zalloc_arg(zone, m, how); - if (n == NULL) { - uma_zfree(zone_mbuf, m); - return (NULL); - } - - return (m); -} - -/* - * m_getjcl() returns an mbuf with a cluster of the specified size attached. - * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. - * - * XXX: This is rather large, should be real function maybe. - */ -static __inline struct mbuf * -m_getjcl(int how, short type, int flags, int size) -{ - struct mb_args args; - struct mbuf *m, *n; - uma_zone_t zone; - - if (size == MCLBYTES) - return m_getcl(how, type, flags); - - args.flags = flags; - args.type = type; - - m = uma_zalloc_arg(zone_mbuf, &args, how); - if (m == NULL) - return (NULL); - - zone = m_getzone(size); - n = uma_zalloc_arg(zone, m, how); - if (n == NULL) { - uma_zfree(zone_mbuf, m); - return (NULL); - } - return (m); -} - static __inline void m_free_fast(struct mbuf *m) { @@ -881,7 +791,7 @@ int, int, int, int); struct mbuf *m_copypacket(struct mbuf *, int); void m_copy_pkthdr(struct mbuf *, struct mbuf *); -struct mbuf *m_copyup(struct mbuf *n, int len, int dstoff); +struct mbuf *m_copyup(struct mbuf *, int, int); struct mbuf *m_defrag(struct mbuf *, int); void m_demote(struct mbuf *, int); struct mbuf *m_devget(char *, int, int, struct ifnet *, @@ -891,6 +801,8 @@ u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); +struct mbuf *m_get2(int, short, int, int); +struct mbuf *m_getjcl(int, short, int, int); struct mbuf *m_getm2(struct mbuf *, int, int, short, int); struct mbuf *m_getptr(struct mbuf *, int, int *); u_int m_length(struct mbuf *, struct mbuf **); @@ -900,10 +812,10 @@ void m_print(const struct mbuf *, int); struct mbuf *m_pulldown(struct mbuf *, int, int, int *); struct mbuf *m_pullup(struct mbuf *, int); -int m_sanity(struct mbuf *, int); +int m_sanity(struct mbuf *, int); struct mbuf *m_split(struct mbuf *, int, int); struct mbuf *m_uiotombuf(struct uio *, int, int, int, int); -struct mbuf *m_unshare(struct mbuf *, int how); +struct mbuf *m_unshare(struct mbuf *, int); /*- * Network packets may have annotations attached by affixing a list of Index: kern/uipc_mbuf.c =================================================================== --- kern/uipc_mbuf.c (revision 245450) +++ kern/uipc_mbuf.c (working copy) @@ -85,6 +85,79 @@ #endif /* + * m_get2() allocates minimum mbuf that would fit "size" argument. + */ +struct mbuf * +m_get2(int how, short type, int flags, int size) +{ + struct mb_args args; + struct mbuf *m, *n; + uma_zone_t zone; + + args.flags = flags; + args.type = type; + + if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) + return (uma_zalloc_arg(zone_mbuf, &args, how)); + if (size <= MCLBYTES) + return (uma_zalloc_arg(zone_pack, &args, how)); + if (size > MJUM16BYTES) + return (NULL); + + m = uma_zalloc_arg(zone_mbuf, &args, how); + if (m == NULL) + return (NULL); + +#if MJUMPAGESIZE != MCLBYTES + if (size <= MJUMPAGESIZE) + zone = zone_jumbop; + else +#endif + if (size <= MJUM9BYTES) + zone = zone_jumbo9; + else + zone = zone_jumbo16; + + n = uma_zalloc_arg(zone, m, how); + if (n == NULL) { + uma_zfree(zone_mbuf, m); + return (NULL); + } + + return (m); +} + +/* + * m_getjcl() returns an mbuf with a cluster of the specified size attached. + * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. + */ +struct mbuf * +m_getjcl(int how, short type, int flags, int size) +{ + struct mb_args args; + struct mbuf *m, *n; + uma_zone_t zone; + + if (size == MCLBYTES) + return m_getcl(how, type, flags); + + args.flags = flags; + args.type = type; + + m = uma_zalloc_arg(zone_mbuf, &args, how); + if (m == NULL) + return (NULL); + + zone = m_getzone(size); + n = uma_zalloc_arg(zone, m, how); + if (n == NULL) { + uma_zfree(zone_mbuf, m); + return (NULL); + } + return (m); +} + +/* * Allocate a given length worth of mbufs and/or clusters (whatever fits * best) and return a pointer to the top of the allocated chain. If an * existing mbuf chain is provided, then we will append the new chain --BwCQnh7xodEAoBMC-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 14:06:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AF2D9811; Tue, 15 Jan 2013 14:06:00 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 898FAA0C; Tue, 15 Jan 2013 14:06:00 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FE60eH049747; Tue, 15 Jan 2013 14:06:00 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FE60cS049746; Tue, 15 Jan 2013 14:06:00 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201301151406.r0FE60cS049746@svn.freebsd.org> From: Andrey Zonov Date: Tue, 15 Jan 2013 14:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245457 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 14:06:00 -0000 Author: zont Date: Tue Jan 15 14:05:59 2013 New Revision: 245457 URL: http://svnweb.freebsd.org/changeset/base/245457 Log: - Detect when we are in KVM. Silence on: emulation Approved by: kib (mentor) MFC after: 1 week Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Tue Jan 15 10:06:35 2013 (r245456) +++ head/sys/kern/subr_param.c Tue Jan 15 14:05:59 2013 (r245457) @@ -161,6 +161,7 @@ static const char *const vm_bnames[] = { "Bochs", /* Bochs */ "Xen", /* Xen */ "BHYVE", /* bhyve */ + "Seabios", /* KVM */ NULL }; @@ -169,6 +170,7 @@ static const char *const vm_pnames[] = { "Virtual Machine", /* Microsoft VirtualPC */ "VirtualBox", /* Sun xVM VirtualBox */ "Parallels Virtual Platform", /* Parallels VM */ + "KVM", /* KVM */ NULL }; From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 14:09:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DA2BEAA0; Tue, 15 Jan 2013 14:09:08 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C3567A3B; Tue, 15 Jan 2013 14:09:08 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FE983j050316; Tue, 15 Jan 2013 14:09:08 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FE98HB050315; Tue, 15 Jan 2013 14:09:08 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201301151409.r0FE98HB050315@svn.freebsd.org> From: Andrey Zonov Date: Tue, 15 Jan 2013 14:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245458 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 14:09:08 -0000 Author: zont Date: Tue Jan 15 14:09:08 2013 New Revision: 245458 URL: http://svnweb.freebsd.org/changeset/base/245458 Log: - Use standard RETURN VALUES section. Approved by: kib (mentor) MFC after: 1 week Modified: head/lib/libc/sys/chroot.2 Modified: head/lib/libc/sys/chroot.2 ============================================================================== --- head/lib/libc/sys/chroot.2 Tue Jan 15 14:05:59 2013 (r245457) +++ head/lib/libc/sys/chroot.2 Tue Jan 15 14:09:08 2013 (r245458) @@ -92,12 +92,8 @@ system call. Any other value for .Ql kern.chroot_allow_open_directories will bypass the check for open directories -.Pp -Upon successful completion, a value of 0 is returned. -Otherwise, -a value of -1 is returned and -.Va errno -is set to indicate an error. +.Sh RETURN VALUES +.Rv -std .Sh ERRORS The .Fn chroot From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 14:35:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B525273; Tue, 15 Jan 2013 14:35:36 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 98C79CDA; Tue, 15 Jan 2013 14:35:36 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FEZati058782; Tue, 15 Jan 2013 14:35:36 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FEZa0F058779; Tue, 15 Jan 2013 14:35:36 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201301151435.r0FEZa0F058779@svn.freebsd.org> From: Sean Bruno Date: Tue, 15 Jan 2013 14:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245459 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 14:35:36 -0000 Author: sbruno Date: Tue Jan 15 14:35:35 2013 New Revision: 245459 URL: http://svnweb.freebsd.org/changeset/base/245459 Log: Satisfy the intent of kern/151564: [ciss] ciss(4) should increase CISS_MAX_LOGICAL to 107 Submitter wanted to increase the number of logical disks supported by ciss(4) by simply raising the CISS_MAX_LOGICAL value even higher. Instead, consult the documentation for the raid controller (OPENCISS) and poke the controller bits to ask it for how many logical/physical disks it can handle. Revert svn R242089 that raised CISS_MAX_LOGICAL to 64 for all controllers. For older controllers that don't support this mechanism, fallback to the old value of 16 logical disks. Tested on P420, P410, P400 and 6i model ciss(4) controllers. This should will be MFC'd back to stable/9 stable/8 and stable/7 after the MFC period. PR: kern/151564 Reviewed by: scottl@freebsd.org MFC after: 2 weeks Modified: head/sys/dev/ciss/ciss.c head/sys/dev/ciss/cissreg.h head/sys/dev/ciss/cissvar.h Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Tue Jan 15 14:09:08 2013 (r245458) +++ head/sys/dev/ciss/ciss.c Tue Jan 15 14:35:35 2013 (r245459) @@ -1203,13 +1203,21 @@ ciss_identify_adapter(struct ciss_softc /* XXX only really required for old 5300 adapters? */ sc->ciss_flags |= CISS_FLAG_BMIC_ABORT; + /* + * Earlier controller specs do not contain these config + * entries, so assume that a 0 means its old and assign + * these values to the defaults that were established + * when this driver was developed for them + */ + if (sc->ciss_cfg->max_logical_supported == 0) + sc->ciss_cfg->max_logical_supported = CISS_MAX_LOGICAL; + if (sc->ciss_cfg->max_physical_supported == 0) + sc->ciss_cfg->max_physical_supported = CISS_MAX_PHYSICAL; /* print information */ if (bootverbose) { -#if 0 /* XXX proxy volumes??? */ ciss_printf(sc, " %d logical drive%s configured\n", sc->ciss_id->configured_logical_drives, (sc->ciss_id->configured_logical_drives == 1) ? "" : "s"); -#endif ciss_printf(sc, " firmware %4.4s\n", sc->ciss_id->running_firmware_revision); ciss_printf(sc, " %d SCSI channels\n", sc->ciss_id->scsi_bus_count); @@ -1232,6 +1240,9 @@ ciss_identify_adapter(struct ciss_softc "\20\1ultra2\2ultra3\10fibre1\11fibre2\n"); ciss_printf(sc, " server name '%.16s'\n", sc->ciss_cfg->server_name); ciss_printf(sc, " heartbeat 0x%x\n", sc->ciss_cfg->heartbeat); + ciss_printf(sc, " max logical logical volumes: %d\n", sc->ciss_cfg->max_logical_supported); + ciss_printf(sc, " max physical disks supported: %d\n", sc->ciss_cfg->max_physical_supported); + ciss_printf(sc, " max physical disks per logical volume: %d\n", sc->ciss_cfg->max_physical_per_logical); } out: @@ -1319,7 +1330,7 @@ ciss_report_luns(struct ciss_softc *sc, break; case CISS_CMD_STATUS_DATA_OVERRUN: ciss_printf(sc, "WARNING: more units than driver limit (%d)\n", - CISS_MAX_LOGICAL); + sc->ciss_cfg->max_logical_supported); break; default: ciss_printf(sc, "error detecting logical drive configuration (%s)\n", @@ -1353,7 +1364,7 @@ ciss_init_logical(struct ciss_softc *sc) debug_called(1); cll = ciss_report_luns(sc, CISS_OPCODE_REPORT_LOGICAL_LUNS, - CISS_MAX_LOGICAL); + sc->ciss_cfg->max_logical_supported); if (cll == NULL) { error = ENXIO; goto out; @@ -1361,9 +1372,9 @@ ciss_init_logical(struct ciss_softc *sc) /* sanity-check reply */ ndrives = (ntohl(cll->list_size) / sizeof(union ciss_device_address)); - if ((ndrives < 0) || (ndrives > CISS_MAX_LOGICAL)) { + if ((ndrives < 0) || (ndrives > sc->ciss_cfg->max_logical_supported)) { ciss_printf(sc, "adapter claims to report absurd number of logical drives (%d > %d)\n", - ndrives, CISS_MAX_LOGICAL); + ndrives, sc->ciss_cfg->max_logical_supported); error = ENXIO; goto out; } @@ -1386,19 +1397,20 @@ ciss_init_logical(struct ciss_softc *sc) for (i = 0; i <= sc->ciss_max_logical_bus; i++) { sc->ciss_logical[i] = - malloc(CISS_MAX_LOGICAL * sizeof(struct ciss_ldrive), + malloc(sc->ciss_cfg->max_logical_supported * + sizeof(struct ciss_ldrive), CISS_MALLOC_CLASS, M_NOWAIT | M_ZERO); if (sc->ciss_logical[i] == NULL) { error = ENXIO; goto out; } - for (j = 0; j < CISS_MAX_LOGICAL; j++) + for (j = 0; j < sc->ciss_cfg->max_logical_supported; j++) sc->ciss_logical[i][j].cl_status = CISS_LD_NONEXISTENT; } - for (i = 0; i < CISS_MAX_LOGICAL; i++) { + for (i = 0; i < sc->ciss_cfg->max_logical_supported; i++) { if (i < ndrives) { struct ciss_ldrive *ld; int bus, target; @@ -1440,7 +1452,7 @@ ciss_init_physical(struct ciss_softc *sc target = 0; cll = ciss_report_luns(sc, CISS_OPCODE_REPORT_PHYSICAL_LUNS, - CISS_MAX_PHYSICAL); + sc->ciss_cfg->max_physical_supported); if (cll == NULL) { error = ENXIO; goto out; @@ -1983,7 +1995,7 @@ ciss_free(struct ciss_softc *sc) bus_dma_tag_destroy(sc->ciss_parent_dmat); if (sc->ciss_logical) { for (i = 0; i <= sc->ciss_max_logical_bus; i++) { - for (j = 0; j < CISS_MAX_LOGICAL; j++) { + for (j = 0; j < sc->ciss_cfg->max_logical_supported; j++) { if (sc->ciss_logical[i][j].cl_ldrive) free(sc->ciss_logical[i][j].cl_ldrive, CISS_MALLOC_CLASS); if (sc->ciss_logical[i][j].cl_lstatus) @@ -2966,9 +2978,9 @@ ciss_cam_action(struct cam_sim *sim, uni cpi->hba_inquiry = PI_TAG_ABLE; /* XXX is this correct? */ cpi->target_sprt = 0; cpi->hba_misc = 0; - cpi->max_target = CISS_MAX_LOGICAL; + cpi->max_target = sc->ciss_cfg->max_logical_supported; cpi->max_lun = 0; /* 'logical drive' channel only */ - cpi->initiator_id = CISS_MAX_LOGICAL; + cpi->initiator_id = sc->ciss_cfg->max_logical_supported; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strncpy(cpi->hba_vid, "msmith@freebsd.org", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); @@ -3879,7 +3891,7 @@ ciss_notify_rescan_logical(struct ciss_s * drive address. */ cll = ciss_report_luns(sc, CISS_OPCODE_REPORT_LOGICAL_LUNS, - CISS_MAX_LOGICAL); + sc->ciss_cfg->max_logical_supported); if (cll == NULL) return; @@ -3890,7 +3902,7 @@ ciss_notify_rescan_logical(struct ciss_s * firmware. */ for (i = 0; i < sc->ciss_max_logical_bus; i++) { - for (j = 0; j < CISS_MAX_LOGICAL; j++) { + for (j = 0; j < sc->ciss_cfg->max_logical_supported; j++) { ld = &sc->ciss_logical[i][j]; if (ld->cl_update == 0) @@ -4059,7 +4071,7 @@ ciss_notify_hotplug(struct ciss_softc *s * Rescan the physical lun list for new items */ cll = ciss_report_luns(sc, CISS_OPCODE_REPORT_PHYSICAL_LUNS, - CISS_MAX_PHYSICAL); + sc->ciss_cfg->max_physical_supported); if (cll == NULL) { ciss_printf(sc, "Warning, cannot get physical lun list\n"); break; @@ -4307,7 +4319,7 @@ ciss_print_adapter(struct ciss_softc *sc "\20\1notify_ok\2control_open\3aborting\4running\21fake_synch\22bmic_abort\n"); for (i = 0; i < sc->ciss_max_logical_bus; i++) { - for (j = 0; j < CISS_MAX_LOGICAL; j++) { + for (j = 0; j < sc->ciss_cfg->max_logical_supported; j++) { ciss_printf(sc, "LOGICAL DRIVE %d: ", i); ciss_print_ldrive(sc, &sc->ciss_logical[i][j]); } Modified: head/sys/dev/ciss/cissreg.h ============================================================================== --- head/sys/dev/ciss/cissreg.h Tue Jan 15 14:09:08 2013 (r245458) +++ head/sys/dev/ciss/cissreg.h Tue Jan 15 14:35:35 2013 (r245459) @@ -425,6 +425,15 @@ struct ciss_config_table #define CISS_DRIVER_DAUGHTER_ATTACHED (1<<8) #define CISS_DRIVER_SCSI_PREFETCH (1<<9) u_int32_t max_sg_length; /* 31 in older firmware */ +/* + * these fields appear in OpenCISS Spec 1.06 + * http://cciss.sourceforge.net/#docs + */ + u_int32_t max_logical_supported; + u_int32_t max_physical_supported; + u_int32_t max_physical_per_logical; + u_int32_t max_perfomant_mode_cmds; + u_int32_t max_block_fetch_count; } __packed; /* Modified: head/sys/dev/ciss/cissvar.h ============================================================================== --- head/sys/dev/ciss/cissvar.h Tue Jan 15 14:09:08 2013 (r245458) +++ head/sys/dev/ciss/cissvar.h Tue Jan 15 14:35:35 2013 (r245459) @@ -45,8 +45,11 @@ typedef STAILQ_HEAD(, ciss_request) cr_q /* * Maximum number of logical drives we support. + * If the controller does not indicate a maximum + * value. This is a compatibiliy value to support + * older ciss controllers (e.g. model 6i) */ -#define CISS_MAX_LOGICAL 63 +#define CISS_MAX_LOGICAL 16 /* * Maximum number of physical devices we support. From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 15:29:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B6A5D26C; Tue, 15 Jan 2013 15:29:29 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E582F87; Tue, 15 Jan 2013 15:29:29 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FFTTTi074433; Tue, 15 Jan 2013 15:29:29 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FFTT8P074432; Tue, 15 Jan 2013 15:29:29 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201301151529.r0FFTT8P074432@svn.freebsd.org> From: Kevin Lo Date: Tue, 15 Jan 2013 15:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245460 - stable/8/sys/libkern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 15:29:29 -0000 Author: kevlo Date: Tue Jan 15 15:29:28 2013 New Revision: 245460 URL: http://svnweb.freebsd.org/changeset/base/245460 Log: MFC r236899: Fix unloading of libiconv module. Previously it would either loop infinitely or exit with error leaking a lock. Modified: stable/8/sys/libkern/iconv.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/libkern/ (props changed) Modified: stable/8/sys/libkern/iconv.c ============================================================================== --- stable/8/sys/libkern/iconv.c Tue Jan 15 14:35:35 2013 (r245459) +++ stable/8/sys/libkern/iconv.c Tue Jan 15 15:29:28 2013 (r245460) @@ -90,9 +90,11 @@ iconv_mod_unload(void) struct iconv_cspair *csp; sx_xlock(&iconv_lock); - while ((csp = TAILQ_FIRST(&iconv_cslist)) != NULL) { - if (csp->cp_refcount) + TAILQ_FOREACH(csp, &iconv_cslist, cp_link) { + if (csp->cp_refcount) { + sx_xunlock(&iconv_lock); return EBUSY; + } } while ((csp = TAILQ_FIRST(&iconv_cslist)) != NULL) From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 15:33:18 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 67ABB5F3; Tue, 15 Jan 2013 15:33:18 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id E5717FD0; Tue, 15 Jan 2013 15:33:11 +0000 (UTC) Received: from srg.kevlo.org (git.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.5/8.14.5) with ESMTP id r0FFUAs1035244; Tue, 15 Jan 2013 23:30:10 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <50F57623.9090004@FreeBSD.org> Date: Tue, 15 Jan 2013 23:30:43 +0800 From: Kevin Lo User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Alexey Dokuchaev Subject: Re: svn commit: r245149 - stable/9/sys/libkern References: <201301080443.r084hKsp017952@svn.freebsd.org> <20130114151811.GA99739@FreeBSD.org> In-Reply-To: <20130114151811.GA99739@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 15:33:18 -0000 On 2013/01/14 23:18, Alexey Dokuchaev wrote: > On Tue, Jan 08, 2013 at 04:43:20AM +0000, Kevin Lo wrote: >> New Revision: 245149 >> URL: http://svnweb.freebsd.org/changeset/base/245149 >> >> Log: >> MFC r236899: >> >> Fix unloading of libiconv module. > Do you plan to MFC this to stable/8 as well? Done. > > ./danfe > Kevin From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 15:48:22 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 8CC2EB2F; Tue, 15 Jan 2013 15:48:22 +0000 (UTC) Date: Tue, 15 Jan 2013 15:48:22 +0000 From: Alexey Dokuchaev To: Kevin Lo Subject: Re: svn commit: r245149 - stable/9/sys/libkern Message-ID: <20130115154822.GA55137@FreeBSD.org> References: <201301080443.r084hKsp017952@svn.freebsd.org> <20130114151811.GA99739@FreeBSD.org> <50F57623.9090004@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <50F57623.9090004@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 15:48:22 -0000 On Tue, Jan 15, 2013 at 11:30:43PM +0800, Kevin Lo wrote: > On 2013/01/14 23:18, Alexey Dokuchaev wrote: > >>Log: > >> MFC r236899: > >> Fix unloading of libiconv module. > >Do you plan to MFC this to stable/8 as well? > > Done. Awesome, thanks! ./danfe From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 16:33:38 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3648AD82; Tue, 15 Jan 2013 16:33:38 +0000 (UTC) (envelope-from wkoszek@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [212.87.224.105]) by mx1.freebsd.org (Postfix) with ESMTP id B726C639; Tue, 15 Jan 2013 16:33:37 +0000 (UTC) Received-SPF: pass (freebsd.czest.pl: domain of wkoszek@freebsd.czest.pl designates 212.87.224.105 as permitted sender) receiver=freebsd.czest.pl; client-ip=212.87.224.105; helo=freebsd.czest.pl; envelope-from=wkoszek@freebsd.czest.pl; x-software=spfmilter 0.97 http://www.acme.com/software/spfmilter/ with libspf-unknown; Received: from freebsd.czest.pl (freebsd.czest.pl [212.87.224.105]) by freebsd.czest.pl (8.14.5/8.14.5) with ESMTP id r0FGLGba050848; Tue, 15 Jan 2013 16:21:16 GMT (envelope-from wkoszek@freebsd.czest.pl) Received: (from wkoszek@localhost) by freebsd.czest.pl (8.14.5/8.14.5/Submit) id r0FGLG3W050847; Tue, 15 Jan 2013 16:21:16 GMT (envelope-from wkoszek) Date: Tue, 15 Jan 2013 16:21:16 +0000 From: "Wojciech A. Koszek" To: Ganbold Tsagaankhuu Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts Message-ID: <20130115162116.GI20538@FreeBSD.org> References: <201301150826.r0F8QGJr044600@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <201301150826.r0F8QGJr044600@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on freebsd.czest.pl X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (freebsd.czest.pl [212.87.224.105]); Tue, 15 Jan 2013 16:21:18 +0000 (UTC) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 16:33:38 -0000 On Tue, Jan 15, 2013 at 08:26:16AM +0000, Ganbold Tsagaankhuu wrote: > Author: ganbold (doc committer) > Date: Tue Jan 15 08:26:16 2013 > New Revision: 245450 > URL: http://svnweb.freebsd.org/changeset/base/245450 > > Log: > Initial support for Allwinner A10 SoC (Cubieboard) > Add simple console driver > Add interrupt handling and timer codes > Add kernel config file > Add dts file > Approved by: gonzo Ganbold, Thanks for this commit. Comments below. > > Added: head/sys/arm/allwinner/a10_machdep.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 08:26:16 2013 (r245450) > @@ -0,0 +1,122 @@ > +/*- > + * Copyright (c) 2012 Ganbold Tsagaankhuu. Dot '.' after name isn't necessary. I'd really appreciate having PDF filename of the documentation from which the code was derived in the comments, e.g.: "This file is derived from X.PDF, ver1.0, date 2012/Y/Z" > + * > + * from: FreeBSD: //depot/projects/arm/src/sys/arm/ti/ti_machdep.c > + */ > + [..] > +int > +platform_devmap_init(void) > +{ > + int i = 0; > + > + fdt_devmap[i].pd_va = 0xE1C00000; > + fdt_devmap[i].pd_pa = 0x01C00000; > + fdt_devmap[i].pd_size = 0x00400000; /* 4 MB */ Do you think you could comment on what these mean (or pages in the PDF where can I find them) next to these variables? > > Added: head/sys/arm/allwinner/console.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/arm/allwinner/console.c Tue Jan 15 08:26:16 2013 (r245450) > @@ -0,0 +1,146 @@ [..] > +#ifndef A10_UART_BASE > +#define A10_UART_BASE 0xe1c28000 /* UART0 */ > +#endif > + > +int reg_shift = 2; Could you make it static and move it below defines? > +#define UART_DLL 0 /* Out: Divisor Latch Low */ > +#define UART_DLM 1 /* Out: Divisor Latch High */ > +#define UART_FCR 2 /* Out: FIFO Control Register */ > +#define UART_LCR 3 /* Out: Line Control Register */ > +#define UART_MCR 4 /* Out: Modem Control Register */ > +#define UART_LSR 5 /* In: Line Status Register */ > +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ > +#define UART_LSR_DR 0x01 /* Receiver data ready */ > +#define UART_MSR 6 /* In: Modem Status Register */ > +#define UART_SCR 7 /* I/O: Scratch Register */ > + > + > +/* > + * uart related funcs > + */ > +static u_int32_t > +uart_getreg(u_int32_t *bas) > +{ > + return *((volatile u_int32_t *)(bas)) & 0xff; > +} > + > +static void > +uart_setreg(u_int32_t *bas, u_int32_t val) > +{ > + *((volatile u_int32_t *)(bas)) = (u_int32_t)val; > +} > + > +static int > +ub_getc(void) > +{ > + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + > + (UART_LSR << reg_shift))) & UART_LSR_DR) == 0); > + __asm __volatile("nop"); > + > + return (uart_getreg((u_int32_t *)A10_UART_BASE) & 0xff); > +} > + > +static void > +ub_putc(unsigned char c) > +{ > + if (c == '\n') > + ub_putc('\r'); > + > + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + > + (UART_LSR << reg_shift))) & UART_LSR_THRE) == 0) > + __asm __volatile("nop"); > + > + uart_setreg((u_int32_t *)A10_UART_BASE, c); > +} Why aren't bus_* methods used here for accessing memory? > +# > +# > +options PHYSADDR=0x40000000 > + > +makeoptions KERNPHYSADDR=0x40200000 Two tabs? > +options KERNPHYSADDR=0x40200000 > +makeoptions KERNVIRTADDR=0xc0200000 > +options KERNVIRTADDR=0xc0200000 > + > +options STARTUP_PAGETABLE_ADDR=0x48000000 > + > +files "../allwinner/files.a10" > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** -- Wojciech A. Koszek wkoszek@FreeBSD.czest.pl http://FreeBSD.czest.pl/~wkoszek/ From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 16:41:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1D82111; Tue, 15 Jan 2013 16:41:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D43436AC; Tue, 15 Jan 2013 16:41:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FGfqwq097654; Tue, 15 Jan 2013 16:41:52 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FGfq3S097653; Tue, 15 Jan 2013 16:41:52 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301151641.r0FGfq3S097653@svn.freebsd.org> From: Brooks Davis Date: Tue, 15 Jan 2013 16:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245461 - stable/9/lib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 16:41:53 -0000 Author: brooks Date: Tue Jan 15 16:41:52 2013 New Revision: 245461 URL: http://svnweb.freebsd.org/changeset/base/245461 Log: MFC r244557: Add libnetbsd, a thin compatibility layer intended to allow a limited set of NetBSD software to compile as part of the FreeBSD build with little or no modification. It is built as a static library and not installed for general use. Likewise, its header files are not installed. Sponsored by: DARPA, AFRL Added: - copied from r245440, head/lib/libnetbsd/ Directory Properties: stable/9/lib/libnetbsd/ (props changed) Modified: stable/9/lib/Makefile (contents, props changed) Modified: stable/9/lib/Makefile ============================================================================== --- stable/9/lib/Makefile Tue Jan 15 15:29:28 2013 (r245460) +++ stable/9/lib/Makefile Tue Jan 15 16:41:52 2013 (r245461) @@ -87,6 +87,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libmilter} \ ${_libmp} \ ${_libncp} \ + libnetbsd \ ${_libngatm} \ libopie \ libpam \ From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 16:46:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 06EF73CF; Tue, 15 Jan 2013 16:46:53 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E6E226EE; Tue, 15 Jan 2013 16:46:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FGkqbO098505; Tue, 15 Jan 2013 16:46:52 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FGkqax098500; Tue, 15 Jan 2013 16:46:52 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301151646.r0FGkqax098500@svn.freebsd.org> From: Brooks Davis Date: Tue, 15 Jan 2013 16:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245462 - in stable/9: share/man/man5 share/mk tools/build/options usr.sbin usr.sbin/mtree X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 16:46:53 -0000 Author: brooks Date: Tue Jan 15 16:46:51 2013 New Revision: 245462 URL: http://svnweb.freebsd.org/changeset/base/245462 Log: MFC r244562,245241,245435 Add NetBSD's mtree to the tree and install it as nmtree. Always install our mtree as /usr/sbin/fmtree and link it as /usr/sbin/mtree by default. Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked as /usr/sbin/mtree as well as /usr/sbin/nmtree. Sponsored by: DARPA, AFRL Added: - copied from r245460, head/contrib/mknod/ - copied from r245442, head/contrib/mtree/ stable/9/tools/build/options/WITH_NMTREE - copied, changed from r245241, head/tools/build/options/WITH_NMTREE - copied from r245442, head/usr.sbin/nmtree/ Directory Properties: stable/9/contrib/mknod/ (props changed) stable/9/contrib/mtree/ (props changed) stable/9/usr.sbin/nmtree/ (props changed) Modified: stable/9/share/man/man5/src.conf.5 stable/9/share/mk/bsd.own.mk stable/9/usr.sbin/Makefile (contents, props changed) stable/9/usr.sbin/mtree/Makefile Directory Properties: stable/9/share/man/man5/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.sbin/mtree/ (props changed) Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Tue Jan 15 16:41:52 2013 (r245461) +++ stable/9/share/man/man5/src.conf.5 Tue Jan 15 16:46:51 2013 (r245462) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/9/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd May 13, 2012 +.Dd January 14, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -740,6 +740,16 @@ Set to not build NLS catalogs. .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . +.It Va WITH_NMTREE +.\" from FreeBSD: head/tools/build/options/WITH_NMTREE 245241 2013-01-09 21:07:08Z brooks +Set to install +.Xr nmtree 8 +as +.Xr mtree 8 . +By default +.Xr fmtree 8 +is installed as +.Xr mtree 8 . .It Va WITHOUT_NS_CACHING .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Tue Jan 15 16:41:52 2013 (r245461) +++ stable/9/share/mk/bsd.own.mk Tue Jan 15 16:46:51 2013 (r245462) @@ -428,6 +428,7 @@ __DEFAULT_NO_OPTIONS = \ ICONV \ IDEA \ LIBCPLUSPLUS \ + NMTREE \ OFED \ SHARED_TOOLCHAIN Copied and modified: stable/9/tools/build/options/WITH_NMTREE (from r245241, head/tools/build/options/WITH_NMTREE) ============================================================================== --- head/tools/build/options/WITH_NMTREE Wed Jan 9 21:07:08 2013 (r245241, copy source) +++ stable/9/tools/build/options/WITH_NMTREE Tue Jan 15 16:46:51 2013 (r245462) @@ -1,4 +1,4 @@ -\" $FreeBSD$ +.\" $FreeBSD$ Set to install .Xr nmtree 8 as Modified: stable/9/usr.sbin/Makefile ============================================================================== --- stable/9/usr.sbin/Makefile Tue Jan 15 16:41:52 2013 (r245461) +++ stable/9/usr.sbin/Makefile Tue Jan 15 16:46:51 2013 (r245462) @@ -54,6 +54,7 @@ SUBDIR= adduser \ nfsdumpstate \ nfsrevoke \ nfsuserd \ + nmtree \ nologin \ pc-sysinstall \ pciconf \ Modified: stable/9/usr.sbin/mtree/Makefile ============================================================================== --- stable/9/usr.sbin/mtree/Makefile Tue Jan 15 16:41:52 2013 (r245461) +++ stable/9/usr.sbin/mtree/Makefile Tue Jan 15 16:46:51 2013 (r245462) @@ -1,10 +1,12 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + .PATH: ${.CURDIR}/../../usr.bin/cksum -PROG= mtree -MAN= mtree.8 mtree.5 +PROG= fmtree +MAN= fmtree.8 mtree.5 SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c SRCS+= specspec.c @@ -12,4 +14,14 @@ CFLAGS+= -DMD5 -DSHA1 -DRMD160 -DSHA256 DPADD= ${LIBMD} LDADD= -lmd +.if ${MK_NMTREE} == "no" +LINKS= ${BINDIR}/fmtree ${BINDIR}/mtree +MLINKS= fmtree.8 mtree.8 +.endif + +CLEANFILES+= fmtree.8 + +fmtree.8: mtree.8 + cp ${.ALLSRC} ${.TARGET} + .include From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 17:08:45 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2509A1D5; Tue, 15 Jan 2013 17:08:45 +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 D3B0085A; Tue, 15 Jan 2013 17:08:44 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id C2CD4885C; Tue, 15 Jan 2013 18:08:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on smtp.des.no X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham version=3.3.2 Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id BFD7F885B; Tue, 15 Jan 2013 18:08:36 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 8DB319BE8; Tue, 15 Jan 2013 18:08:36 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Steve Kargl Subject: Re: svn commit: r245269 - head/share/mk References: <201301102244.r0AMiJ1k059594@svn.freebsd.org> <20130114224326.GA72312@troutmask.apl.washington.edu> Date: Tue, 15 Jan 2013 18:08:36 +0100 In-Reply-To: <20130114224326.GA72312@troutmask.apl.washington.edu> (Steve Kargl's message of "Mon, 14 Jan 2013 14:43:27 -0800") Message-ID: <86mwwaml0r.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 17:08:45 -0000 Steve Kargl writes: > I suggest adding a blurb to src/UPDATING to help others with memory > loss issues. Thanks, can you commit that patch? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 17:17:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8CE0945D; Tue, 15 Jan 2013 17:17:55 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6688C1; Tue, 15 Jan 2013 17:17:55 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FHHtoP009656; Tue, 15 Jan 2013 17:17:55 GMT (envelope-from rene@svn.freebsd.org) Received: (from rene@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FHHtgj009655; Tue, 15 Jan 2013 17:17:55 GMT (envelope-from rene@svn.freebsd.org) Message-Id: <201301151717.r0FHHtgj009655@svn.freebsd.org> From: Rene Ladan Date: Tue, 15 Jan 2013 17:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245463 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 17:17:55 -0000 Author: rene (doc,ports committer) Date: Tue Jan 15 17:17:54 2013 New Revision: 245463 URL: http://svnweb.freebsd.org/changeset/base/245463 Log: Add gjb as my co-mentor now that I have a full doc/www bit. Approved by: remko (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Tue Jan 15 16:46:51 2013 (r245462) +++ head/share/misc/committers-doc.dot Tue Jan 15 17:17:54 2013 (r245463) @@ -116,6 +116,7 @@ gabor -> issyl0 gabor -> ebrandi gjb -> wblock +gjb -> rene hrs -> ryusuke From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 17:50:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7AE7ACFE; Tue, 15 Jan 2013 17:50:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5D95DB27; Tue, 15 Jan 2013 17:50:08 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FHo89A019667; Tue, 15 Jan 2013 17:50:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FHo88B019659; Tue, 15 Jan 2013 17:50:08 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301151750.r0FHo88B019659@svn.freebsd.org> From: Adrian Chadd Date: Tue, 15 Jan 2013 17:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245464 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 17:50:08 -0000 Author: adrian Date: Tue Jan 15 17:50:07 2013 New Revision: 245464 URL: http://svnweb.freebsd.org/changeset/base/245464 Log: Remove the use of the ifnet send queue and if_start() in the power save queue code. Instead, use if_transmit() directly - and handle the cases where frame transmission fails. I don't necessarily like this and I think at this point the M_ENCAP check, node freeing upon fail and the actual if_transmit() call should be done in methods in ieee80211_freebsd.c, but I digress slightly.. This removes one of the last few uses of if_start() and the ifnet if_snd queue. The last major offender is ieee80211_output.c, where ieee80211_start() implements if_start() and uses the ifnet queue directly. (There's a couple of gotchas here, where the if_start pointer is compared to ieee80211_start(), but that's a later problem.) Modified: head/sys/net80211/ieee80211_power.c Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Tue Jan 15 17:17:54 2013 (r245463) +++ head/sys/net80211/ieee80211_power.c Tue Jan 15 17:50:07 2013 (r245464) @@ -416,6 +416,8 @@ pwrsave_flushq(struct ieee80211_node *ni struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_psq_head *qhead; struct ifnet *parent, *ifp; + struct mbuf *parent_q = NULL, *ifp_q = NULL; + struct mbuf *m; IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, "flush ps queue, %u packets queued", psq->psq_len); @@ -427,8 +429,7 @@ pwrsave_flushq(struct ieee80211_node *ni parent = vap->iv_ic->ic_ifp; /* XXX need different driver interface */ /* XXX bypasses q max and OACTIVE */ - IF_PREPEND_LIST(&parent->if_snd, qhead->head, qhead->tail, - qhead->len); + parent_q = qhead->head; qhead->head = qhead->tail = NULL; qhead->len = 0; } else @@ -439,8 +440,7 @@ pwrsave_flushq(struct ieee80211_node *ni ifp = vap->iv_ifp; /* XXX need different driver interface */ /* XXX bypasses q max and OACTIVE */ - IF_PREPEND_LIST(&ifp->if_snd, qhead->head, qhead->tail, - qhead->len); + ifp_q = qhead->head; qhead->head = qhead->tail = NULL; qhead->len = 0; } else @@ -450,10 +450,34 @@ pwrsave_flushq(struct ieee80211_node *ni /* NB: do this outside the psq lock */ /* XXX packets might get reordered if parent is OACTIVE */ - if (parent != NULL) - if_start(parent); - if (ifp != NULL) - if_start(ifp); + /* parent frames, should be encapsulated */ + if (parent != NULL) { + while (parent_q != NULL) { + m = parent_q; + parent_q = m->m_nextpkt; + /* must be encapsulated */ + KASSERT((m->m_flags & M_ENCAP), + ("%s: parentq with non-M_ENCAP frame!\n", + __func__)); + /* + * For encaped frames, we need to free the node + * reference upon failure. + */ + if (parent->if_transmit(parent, m) != 0) + ieee80211_free_node(ni); + } + } + + /* VAP frames, aren't encapsulated */ + if (ifp != NULL) { + while (ifp_q != NULL) { + m = ifp_q; + ifp_q = m->m_nextpkt; + KASSERT((!(m->m_flags & M_ENCAP)), + ("%s: vapq with M_ENCAP frame!\n", __func__)); + (void) ifp->if_transmit(ifp, m); + } + } } /* From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 17:59:44 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6C049FDA; Tue, 15 Jan 2013 17:59:44 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 40D31BF6; Tue, 15 Jan 2013 17:59:44 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id r0FHxfjB077061; Tue, 15 Jan 2013 09:59:41 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id r0FHxfg0077060; Tue, 15 Jan 2013 09:59:41 -0800 (PST) (envelope-from sgk) Date: Tue, 15 Jan 2013 09:59:41 -0800 From: Steve Kargl To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r245269 - head/share/mk Message-ID: <20130115175941.GA77018@troutmask.apl.washington.edu> References: <201301102244.r0AMiJ1k059594@svn.freebsd.org> <20130114224326.GA72312@troutmask.apl.washington.edu> <86mwwaml0r.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86mwwaml0r.fsf@ds4.des.no> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 17:59:44 -0000 On Tue, Jan 15, 2013 at 06:08:36PM +0100, Dag-Erling Smørgrav wrote: > Steve Kargl writes: > > I suggest adding a blurb to src/UPDATING to help others with memory > > loss issues. > > Thanks, can you commit that patch? > Yes. But, I found that your commit only indirectly caused the problem. The system that showed the problem with NO_KERBEROS in /etc/make.conf never had kerberos installed, so your change actually caused my buildworld to try to build kerberos. It appears that usr.bin/compile_et is needed to bootstrap kerberos. compile_et is not installed as a bootstrap-tool, so it must be picking up a previously installed compile_et. At the moment, I'm stumped as how to compile_et. -- Steve From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 18:01:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 520611E6; Tue, 15 Jan 2013 18:01:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 351BEC06; Tue, 15 Jan 2013 18:01:25 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FI1OlF023475; Tue, 15 Jan 2013 18:01:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FI1NYQ023469; Tue, 15 Jan 2013 18:01:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301151801.r0FI1NYQ023469@svn.freebsd.org> From: Adrian Chadd Date: Tue, 15 Jan 2013 18:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245465 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 18:01:25 -0000 Author: adrian Date: Tue Jan 15 18:01:23 2013 New Revision: 245465 URL: http://svnweb.freebsd.org/changeset/base/245465 Log: Implement frame (data) transmission using if_transmit(), rather than if_start(). This removes the overlapping data path TX from occuring, which solves quite a number of the potential TX queue races in ath(4). It doesn't fix the net80211 layer TX queue races and it doesn't fix the raw TX path yet, but it's an important step towards this. This hasn't dropped the TX performance in my testing; primarily because now the TX path can quickly queue frames and continue along processing. This involves a few rather deep changes: * Use the ath_buf as a queue placeholder for now, as we need to be able to support queuing a list of mbufs (ie, when transmitting fragments) and m_nextpkt can't be used here (because it's what is joining the fragments together) * if_transmit() now simply allocates the ath_buf and queues it to a driver TX staging queue. * TX is now moved into a taskqueue function. * The TX taskqueue function now dequeues and transmits frames. * Fragments are handled correctly here - as the current API passes the fragment list as one mbuf list (joined with m_nextpkt) through to the driver if_transmit(). * For the couple of places where ath_start() may be called (mostly from net80211 when starting the VAP up again), just reimplement it using the new enqueue and taskqueue methods. What I don't like (about this work and the TX code in general): * I'm using the same lock for the staging TX queue management and the actual TX. This isn't required; I'm just being slack. * I haven't yet moved TX to a separate taskqueue (but the taskqueue is created); it's easy enough to do this later if necessary. I just need to make sure it's a higher priority queue, so TX has the same behaviour as it used to (where it would preempt existing RX..) * I need to re-review the TX path a little more and make sure that ieee80211_node_*() functions aren't called within the TX lock. When queueing, I should just push failed frames into a queue and when I'm wrapping up the TX code, unlock the TX lock and call ieee80211_node_free() on each. * It would be nice if I could hold the TX lock for the entire TX and TX completion, rather than this release/re-acquire behaviour. But that requires that I shuffle around the TX completion code to handle actual ath_buf free and net80211 callback/free outside of the TX lock. That's one of my next projects. * the ic_raw_xmit() path doesn't use this yet - so it still has sequencing problems with parallel, overlapping calls to the data path. I'll fix this later. Tested: * Hostap - AR9280, AR9220 * STA - AR5212, AR9280, AR5416 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_misc.h head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Jan 15 17:50:07 2013 (r245464) +++ head/sys/dev/ath/if_ath.c Tue Jan 15 18:01:23 2013 (r245465) @@ -152,7 +152,6 @@ static void ath_init(void *); static void ath_stop_locked(struct ifnet *); static void ath_stop(struct ifnet *); static int ath_reset_vap(struct ieee80211vap *, u_long); -static void ath_start_queue(struct ifnet *ifp); static int ath_media_change(struct ifnet *); static void ath_watchdog(void *); static int ath_ioctl(struct ifnet *, u_long, caddr_t); @@ -213,6 +212,14 @@ static void ath_dfs_tasklet(void *, int) static void ath_node_powersave(struct ieee80211_node *, int); static int ath_node_set_tim(struct ieee80211_node *, int); +static int ath_transmit(struct ifnet *ifp, struct mbuf *m); +static void ath_qflush(struct ifnet *ifp); + +static void ath_txq_qinit(struct ifnet *ifp); +static void ath_txq_qflush(struct ifnet *ifp); +static int ath_txq_qadd(struct ifnet *ifp, struct mbuf *m0); +static void ath_txq_qrun(struct ifnet *ifp); + #ifdef IEEE80211_SUPPORT_TDMA #include #endif @@ -429,12 +436,20 @@ ath_attach(u_int16_t devid, struct ath_s taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", ifp->if_xname); + sc->sc_tx_tq = taskqueue_create("ath_tx_taskq", M_NOWAIT, + taskqueue_thread_enqueue, &sc->sc_tx_tq); + taskqueue_start_threads(&sc->sc_tx_tq, 1, PI_NET, + "%s TX taskq", ifp->if_xname); + TASK_INIT(&sc->sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc); TASK_INIT(&sc->sc_bstucktask,0, ath_bstuck_proc, sc); TASK_INIT(&sc->sc_resettask,0, ath_reset_proc, sc); - TASK_INIT(&sc->sc_txqtask,0, ath_txq_sched_tasklet, sc); - TASK_INIT(&sc->sc_fataltask,0, ath_fatal_proc, sc); + TASK_INIT(&sc->sc_txqtask, 0, ath_txq_sched_tasklet, sc); + TASK_INIT(&sc->sc_fataltask, 0, ath_fatal_proc, sc); + + /* XXX make this a higher priority taskqueue? */ + TASK_INIT(&sc->sc_txpkttask, 0, ath_start_task, sc); /* * Allocate hardware transmit queues: one queue for @@ -554,13 +569,18 @@ ath_attach(u_int16_t devid, struct ath_s ifp->if_softc = sc; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; - ifp->if_start = ath_start_queue; + /* XXX net80211 uses if_start to re-start ifnet processing */ + ifp->if_start = ath_start; + ifp->if_transmit = ath_transmit; + ifp->if_qflush = ath_qflush; ifp->if_ioctl = ath_ioctl; ifp->if_init = ath_init; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); + ath_txq_qinit(ifp); + ic->ic_ifp = ifp; /* XXX not right but it's not used anywhere important */ ic->ic_phytype = IEEE80211_T_OFDM; @@ -966,16 +986,16 @@ ath_detach(struct ath_softc *sc) ath_stop(ifp); ieee80211_ifdetach(ifp->if_l2com); taskqueue_free(sc->sc_tq); + taskqueue_free(sc->sc_tx_tq); #ifdef ATH_TX99_DIAG if (sc->sc_tx99 != NULL) sc->sc_tx99->detach(sc->sc_tx99); #endif ath_rate_detach(sc->sc_rc); - #ifdef ATH_DEBUG_ALQ if_ath_alq_tidyup(&sc->sc_alq); #endif - + ath_txq_qflush(ifp); ath_spectral_detach(sc); ath_dfs_detach(sc); ath_desc_free(sc); @@ -2454,6 +2474,14 @@ ath_buf_clone(struct ath_softc *sc, cons tbf->bf_flags = bf->bf_flags & ~ATH_BUF_BUSY; tbf->bf_status = bf->bf_status; tbf->bf_m = bf->bf_m; + /* + * XXX Copy the node reference, the caller is responsible + * for deleting the node reference before it frees its + * buffer. + * + * XXX It's done like this so we don't call the net80211 + * code whilst having active TX queue locks held. + */ tbf->bf_node = bf->bf_node; /* will be setup by the chain/setup function */ tbf->bf_lastds = NULL; @@ -2498,13 +2526,70 @@ ath_getbuf(struct ath_softc *sc, ath_buf } static void -ath_start_queue(struct ifnet *ifp) +ath_qflush(struct ifnet *ifp) { - struct ath_softc *sc = ifp->if_softc; - ATH_KTR(sc, ATH_KTR_TX, 0, "ath_start_queue: start"); + /* XXX complete/suspend TX */ + ath_txq_qflush(ifp); + + /* Unsuspend TX? */ +} + +/* + * Transmit a frame from net80211. + */ +static int +ath_transmit(struct ifnet *ifp, struct mbuf *m) +{ + struct ieee80211_node *ni; + struct ath_softc *sc = (struct ath_softc *) ifp->if_softc; + + ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; + + if (ath_txq_qadd(ifp, m) < 0) { + /* + * If queuing fails, the if_transmit() API makes the + * callee responsible for freeing the mbuf (rather than + * the caller, who just assumes the mbuf has been dealt + * with somehow). + * + * BUT, net80211 will free node references if if_transmit() + * fails _on encapsulated buffers_. Since drivers + * only get fully encapsulated frames from net80211 (via + * raw or otherwise APIs), we must be absolutely careful + * to not free the node ref or things will get loopy + * down the track. + * + * For tx fragments, the TX code must free whatever + * new references it created, but NOT the original + * TX node ref that was passed in. + */ + ath_freetx(m); + return (ENOBUFS); + } + + /* + * Unconditionally kick the taskqueue. + * + * Now, there's a subtle race condition possible here if we + * went down the path of only kicking the taskqueue if it + * wasn't running. If we're not absolutely, positively + * careful, we could have a small race window between + * finishing the taskqueue and clearing the TX flag, which + * would be interpreted in _this_ context as "we don't need + * to kick the TX taskqueue, as said taskqueue is already + * running." + * + * It's a problem in some of the 1GE/10GE NIC drivers. + * So until a _correct_ method for implementing this is + * drafted up and written, which avoids (potentially) + * large amounts of locking contention per-frame, let's + * just do the inefficient "kick taskqueue each time" + * method. + */ ath_tx_kick(sc); - ATH_KTR(sc, ATH_KTR_TX, 0, "ath_start_queue: finished"); + + return (0); } void @@ -2531,9 +2616,7 @@ ath_start_task(void *arg, int npending) sc->sc_txstart_cnt++; ATH_PCU_UNLOCK(sc); - ATH_TX_LOCK(sc); - ath_start(sc->sc_ifp); - ATH_TX_UNLOCK(sc); + ath_txq_qrun(ifp); ATH_PCU_LOCK(sc); sc->sc_txstart_cnt--; @@ -2541,91 +2624,298 @@ ath_start_task(void *arg, int npending) ATH_KTR(sc, ATH_KTR_TX, 0, "ath_start_task: finished"); } -void -ath_start(struct ifnet *ifp) +/* + * Pending TX buffer chain management routines. + */ + + +/* + * Initialise the TX queue! + */ +static void +ath_txq_qinit(struct ifnet *ifp) +{ + struct ath_softc *sc = ifp->if_softc; + + TAILQ_INIT(&sc->sc_txbuf_list); +} + +/* + * Add this mbuf to the TX buffer chain. + * + * This allocates an ath_buf, links the mbuf into it, and + * appends it to the end of the TX buffer chain. + * It doesn't fill out the ath_buf in any way besides + * that. + * + * Since the mbuf may be a list of mbufs representing + * 802.11 fragments, handle allocating ath_bufs for each + * of the mbuf fragments. + * + * If we queued it, 0 is returned. Else, < 0 is returned. + * + * If <0 is returned, the sender is responsible for + * freeing the mbuf if appropriate. + */ +static int +ath_txq_qadd(struct ifnet *ifp, struct mbuf *m0) { struct ath_softc *sc = ifp->if_softc; - struct ieee80211_node *ni; struct ath_buf *bf; - struct mbuf *m, *next; ath_bufhead frags; - int npkts = 0; + struct ieee80211_node *ni; + struct mbuf *m; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) - return; + /* XXX recursive TX completion -> TX? */ + ATH_TX_UNLOCK_ASSERT(sc); - ATH_TX_LOCK_ASSERT(sc); + /* + * We grab the node pointer, but we don't deref + * the node. The caller must be responsible for + * freeing the node reference if it decides to + * free the mbuf. + */ + ni = (struct ieee80211_node *) m0->m_pkthdr.rcvif; - ATH_KTR(sc, ATH_KTR_TX, 0, "ath_start: called"); + ATH_TXBUF_LOCK(sc); + if (sc->sc_txbuf_cnt <= sc->sc_txq_data_minfree) { + /* XXX increment counter? */ + ATH_TXBUF_UNLOCK(sc); + IF_LOCK(&ifp->if_snd); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); + return (-1); + } + ATH_TXBUF_UNLOCK(sc); - for (;;) { + /* + * Grab a TX buffer and associated resources. + */ + bf = ath_getbuf(sc, ATH_BUFTYPE_NORMAL); + if (bf == NULL) { + device_printf(sc->sc_dev, + "%s: couldn't allocate a buffer\n", + __func__); + return (-1); + } + + /* Setup the initial buffer node contents */ + bf->bf_m = m0; + bf->bf_node = ni; + + /* + * Check for fragmentation. If this frame + * has been broken up verify we have enough + * buffers to send all the fragments so all + * go out or none... + */ + TAILQ_INIT(&frags); + if (m0->m_flags & M_FRAG) + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: txfrag\n", __func__); + if ((m0->m_flags & M_FRAG) && + !ath_txfrag_setup(sc, &frags, m0, ni)) { + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: out of txfrag buffers\n", __func__); + sc->sc_stats.ast_tx_nofrag++; + ifp->if_oerrors++; + goto bad; + } + + /* + * Don't stuff the non-fragment frame onto the fragment + * queue. ath_txfrag_cleanup() should only be called on fragments - + * ie, the _extra_ ieee80211_node references - and not the single + * node reference already done as part of the net08211 TX call + * into the driver. + */ + + ATH_TX_LOCK(sc); + + /* + * Throw the single frame onto the queue. + */ + TAILQ_INSERT_TAIL(&sc->sc_txbuf_list, bf, bf_list); + + /* + * Update next packet duration length if it's a fragment. + * It's needed for accurate NAV calculations (which for + * fragments include the length of the NEXT fragment.) + */ + if (m0->m_nextpkt != NULL) + bf->bf_state.bfs_nextpktlen = + m0->m_nextpkt->m_pkthdr.len; + + /* + * Append the fragments. We have to populate bf and node + * references here as although the txfrag setup code does + * create buffers and increment the node ref, it doesn't + * populate the fields for us. + */ + m = m0->m_nextpkt; + while ( (bf = TAILQ_FIRST(&frags)) != NULL) { + bf->bf_m = m; + bf->bf_node = ni; + device_printf(sc->sc_dev, "%s: adding bf=%p, m=%p, ni=%p\n", + __func__, + bf, + bf->bf_m, + bf->bf_node); + TAILQ_REMOVE(&frags, bf, bf_list); + TAILQ_INSERT_TAIL(&sc->sc_txbuf_list, bf, bf_list); + + /* + * For duration (NAV) calculations, we need + * to know the next fragment size. + * + * XXX This isn't entirely accurate as it doesn't + * take pad bytes and such into account, but it'll do + * for fragment length / NAV calculations. + */ + if (m->m_nextpkt != NULL) + bf->bf_state.bfs_nextpktlen = + m->m_nextpkt->m_pkthdr.len; + + m = m->m_nextpkt; + } + ATH_TX_UNLOCK(sc); + + return (0); +bad: + device_printf(sc->sc_dev, "%s: bad?!\n", __func__); + bf->bf_m = NULL; + bf->bf_node = NULL; + ATH_TXBUF_LOCK(sc); + ath_returnbuf_head(sc, bf); + ath_txfrag_cleanup(sc, &frags, ni); + ATH_TXBUF_UNLOCK(sc); + return (-1); +} + +/* + * Flush the pending TX buffer chain. + */ +static void +ath_txq_qflush(struct ifnet *ifp) +{ + struct ath_softc *sc = ifp->if_softc; + ath_bufhead txlist; + struct ath_buf *bf; + + device_printf(sc->sc_dev, "%s: called\n", __func__); + TAILQ_INIT(&txlist); + + /* Grab lock */ + ATH_TX_LOCK(sc); + + /* Copy everything out of sc_txbuf_list into txlist */ + TAILQ_CONCAT(&txlist, &sc->sc_txbuf_list, bf_list); + + /* Unlock */ + ATH_TX_UNLOCK(sc); + + /* Now, walk the list, freeing things */ + while ((bf = TAILQ_FIRST(&txlist)) != NULL) { + TAILQ_REMOVE(&txlist, bf, bf_list); + + if (bf->bf_node) + ieee80211_free_node(bf->bf_node); + + m_free(bf->bf_m); + + /* XXX paranoia! */ + bf->bf_m = NULL; + bf->bf_node = NULL; + + /* + * XXX Perhaps do a second pass with the TXBUF lock + * held and free them all at once? + */ ATH_TXBUF_LOCK(sc); - if (sc->sc_txbuf_cnt <= sc->sc_txq_data_minfree) { - /* XXX increment counter? */ - ATH_TXBUF_UNLOCK(sc); - IF_LOCK(&ifp->if_snd); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IF_UNLOCK(&ifp->if_snd); - break; - } + ath_returnbuf_head(sc, bf); ATH_TXBUF_UNLOCK(sc); - + } +} + +/* + * Walk the TX buffer queue and call ath_tx_start() on each + * of them. + */ +static void +ath_txq_qrun(struct ifnet *ifp) +{ + struct ath_softc *sc = ifp->if_softc; + ath_bufhead txlist; + struct ath_buf *bf, *bf_next; + struct ieee80211_node *ni; + struct mbuf *m; + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) + return; + + TAILQ_INIT(&txlist); + + /* + * Grab the frames to transmit from the tx queue + */ + + /* Copy everything out of sc_txbuf_list into txlist */ + ATH_TX_LOCK(sc); + TAILQ_CONCAT(&txlist, &sc->sc_txbuf_list, bf_list); + ATH_TX_UNLOCK(sc); + + /* + * For now, the ath_tx_start() code sits behind the same lock; + * worry about serialising this in a taskqueue later. + */ + + ATH_TX_LOCK(sc); + + /* + * Attempt to transmit each frame. + * + * In the old code path - if a TX fragment fails, subsequent + * fragments in that group would be aborted. + * + * It would be nice to chain together TX fragments in this + * way so they can be aborted together. + */ + TAILQ_FOREACH_SAFE(bf, &txlist, bf_list, bf_next) { /* - * Grab a TX buffer and associated resources. + * Clear, because we're going to reuse this + * as a real ath_buf now */ - bf = ath_getbuf(sc, ATH_BUFTYPE_NORMAL); - if (bf == NULL) - break; + ni = bf->bf_node; + m = bf->bf_m; + + bf->bf_node = NULL; + bf->bf_m = NULL; - IFQ_DEQUEUE(&ifp->if_snd, m); - if (m == NULL) { - ATH_TXBUF_LOCK(sc); - ath_returnbuf_head(sc, bf); - ATH_TXBUF_UNLOCK(sc); - break; - } - ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; - npkts ++; /* - * Check for fragmentation. If this frame - * has been broken up verify we have enough - * buffers to send all the fragments so all - * go out or none... - */ - TAILQ_INIT(&frags); - if ((m->m_flags & M_FRAG) && - !ath_txfrag_setup(sc, &frags, m, ni)) { - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: out of txfrag buffers\n", __func__); - sc->sc_stats.ast_tx_nofrag++; - ifp->if_oerrors++; - ath_freetx(m); - goto bad; - } - ifp->if_opackets++; - nextfrag: + * Remove it from the list. + */ + TAILQ_REMOVE(&txlist, bf, bf_list); + /* - * Pass the frame to the h/w for transmission. - * Fragmented frames have each frag chained together - * with m_nextpkt. We know there are sufficient ath_buf's - * to send all the frags because of work done by - * ath_txfrag_setup. We leave m_nextpkt set while - * calling ath_tx_start so it can use it to extend the - * the tx duration to cover the subsequent frag and - * so it can reclaim all the mbufs in case of an error; - * ath_tx_start clears m_nextpkt once it commits to - * handing the frame to the hardware. + * If we fail, free this buffer and go to the next one; + * ath_tx_start() frees the mbuf but not the node + * reference. */ - next = m->m_nextpkt; if (ath_tx_start(sc, ni, bf, m)) { - bad: + /* + * XXX m is freed by ath_tx_start(); node reference + * is not! + */ + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: failed; bf=%p, ni=%p, m=%p\n", + __func__, + bf, + ni, + m); ifp->if_oerrors++; - reclaim: bf->bf_m = NULL; bf->bf_node = NULL; ATH_TXBUF_LOCK(sc); ath_returnbuf_head(sc, bf); - ath_txfrag_cleanup(sc, &frags, ni); ATH_TXBUF_UNLOCK(sc); /* * XXX todo, free the node outside of @@ -2633,37 +2923,84 @@ ath_start(struct ifnet *ifp) */ if (ni != NULL) ieee80211_free_node(ni); - continue; + } else { + /* + * Check here if the node is in power save state. + * XXX we should hold a node ref here, and release + * it after the TX has completed. + */ + ath_tx_update_tim(sc, ni, 1); + ifp->if_opackets++; } /* - * Check here if the node is in power save state. + * XXX should check for state change and flip out + * if needed. */ - ath_tx_update_tim(sc, ni, 1); + } + ATH_TX_UNLOCK(sc); - if (next != NULL) { - /* - * Beware of state changing between frags. - * XXX check sta power-save state? - */ - if (ni->ni_vap->iv_state != IEEE80211_S_RUN) { - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: flush fragmented packet, state %s\n", - __func__, - ieee80211_state_name[ni->ni_vap->iv_state]); - ath_freetx(next); - goto reclaim; - } - m = next; - bf = TAILQ_FIRST(&frags); - KASSERT(bf != NULL, ("no buf for txfrag")); - TAILQ_REMOVE(&frags, bf, bf_list); - goto nextfrag; + /* + * If we break out early (eg a state change) we should prepend these + * frames onto the TX queue. + */ +} + +/* + * This is now primarily used by the net80211 layer to kick-start + * queue processing. + */ +void +ath_start(struct ifnet *ifp) +{ + struct mbuf *m; + struct ath_softc *sc = ifp->if_softc; + struct ieee80211_node *ni; + int npkts = 0; + + ATH_TX_UNLOCK_ASSERT(sc); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) + return; + + /* + * If we're below the free buffer limit, don't dequeue anything. + * The original code would not dequeue anything from the queue + * if allocating an ath_buf failed. + * + * For if_transmit, we have to either queue or drop the frame. + * So we have to try and queue it _somewhere_. + */ + for (;;) { + IFQ_DEQUEUE(&ifp->if_snd, m); + if (m == NULL) { + break; } - sc->sc_wd_timer = 5; + /* + * If we do fail here, just break out for now + * and wait until we've transmitted something + * before we attempt again? + */ + if (ath_txq_qadd(ifp, m) < 0) { + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: ath_txq_qadd failed\n", + __func__); + ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; + if (ni != NULL) + ieee80211_free_node(ni); + ath_freetx(m); + break; + } + npkts++; } - ATH_KTR(sc, ATH_KTR_TX, 1, "ath_start: finished; npkts=%d", npkts); + + /* + * Kick the taskqueue into activity, but only if we + * queued something. + */ + if (npkts > 0) + ath_tx_kick(sc); } static int Modified: head/sys/dev/ath/if_ath_misc.h ============================================================================== --- head/sys/dev/ath/if_ath_misc.h Tue Jan 15 17:50:07 2013 (r245464) +++ head/sys/dev/ath/if_ath_misc.h Tue Jan 15 18:01:23 2013 (r245465) @@ -124,9 +124,8 @@ static inline void ath_tx_kick(struct ath_softc *sc) { - ATH_TX_LOCK(sc); - ath_start(sc->sc_ifp); - ATH_TX_UNLOCK(sc); + /* XXX eventually try sc_tx_tq? */ + taskqueue_enqueue(sc->sc_tq, &sc->sc_txpkttask); } #endif Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Tue Jan 15 17:50:07 2013 (r245464) +++ head/sys/dev/ath/if_ath_sysctl.c Tue Jan 15 18:01:23 2013 (r245465) @@ -505,6 +505,33 @@ ath_sysctl_forcebstuck(SYSCTL_HANDLER_AR return 0; } +static int +ath_sysctl_hangcheck(SYSCTL_HANDLER_ARGS) +{ + struct ath_softc *sc = arg1; + int val = 0; + int error; + uint32_t mask = 0xffffffff; + uint32_t *sp; + uint32_t rsize; + struct ath_hal *ah = sc->sc_ah; + + error = sysctl_handle_int(oidp, &val, 0, req); + if (error || !req->newptr) + return error; + if (val == 0) + return 0; + + /* Do a hang check */ + if (!ath_hal_getdiagstate(ah, HAL_DIAG_CHECK_HANGS, + &mask, sizeof(mask), + (void *) &sp, &rsize)) + return (0); + device_printf(sc->sc_dev, "%s: sp=0x%08x\n", __func__, *sp); + + val = 0; + return 0; +} #ifdef ATH_DEBUG_ALQ static int @@ -661,6 +688,10 @@ ath_sysctlattach(struct ath_softc *sc) "forcebstuck", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_forcebstuck, "I", ""); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "hangcheck", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + ath_sysctl_hangcheck, "I", ""); + if (ath_hal_hasintmit(ah)) { SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "intmit", CTLTYPE_INT | CTLFLAG_RW, sc, 0, Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Jan 15 17:50:07 2013 (r245464) +++ head/sys/dev/ath/if_ath_tx.c Tue Jan 15 18:01:23 2013 (r245465) @@ -1124,7 +1124,11 @@ ath_tx_calc_duration(struct ath_softc *s dur = rt->info[rix].lpAckDuration; if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) { dur += dur; /* additional SIFS+ACK */ - KASSERT(bf->bf_m->m_nextpkt != NULL, ("no fragment")); + if (bf->bf_state.bfs_nextpktlen == 0) { + device_printf(sc->sc_dev, + "%s: next txfrag len=0?\n", + __func__); + } /* * Include the size of next fragment so NAV is * updated properly. The last fragment uses only @@ -1135,7 +1139,7 @@ ath_tx_calc_duration(struct ath_softc *s * first fragment! */ dur += ath_hal_computetxtime(ah, rt, - bf->bf_m->m_nextpkt->m_pkthdr.len, + bf->bf_state.bfs_nextpktlen, rix, shortPreamble); } if (isfrag) { Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Jan 15 17:50:07 2013 (r245464) +++ head/sys/dev/ath/if_athvar.h Tue Jan 15 18:01:23 2013 (r245465) @@ -279,6 +279,8 @@ struct ath_buf { int32_t bfs_keyix; /* crypto key index */ int32_t bfs_txantenna; /* TX antenna config */ + uint16_t bfs_nextpktlen; /* length of next frag pkt */ + /* Make this an 8 bit value? */ enum ieee80211_protmode bfs_protmode; @@ -494,6 +496,13 @@ struct ath_softc { struct ath_tx_methods sc_tx; struct ath_tx_edma_fifo sc_txedma[HAL_NUM_TX_QUEUES]; + /* + * This is (currently) protected by the TX queue lock; + * it should migrate to a separate lock later + * so as to minimise contention. + */ + ath_bufhead sc_txbuf_list; + int sc_rx_statuslen; int sc_tx_desclen; int sc_tx_statuslen; @@ -514,6 +523,7 @@ struct ath_softc { struct mtx sc_tx_mtx; /* TX access mutex */ char sc_tx_mtx_name[32]; struct taskqueue *sc_tq; /* private task queue */ + struct taskqueue *sc_tx_tq; /* private TX task queue */ struct ath_hal *sc_ah; /* Atheros HAL */ struct ath_ratectrl *sc_rc; /* tx rate control support */ struct ath_tx99 *sc_tx99; /* tx99 adjunct state */ @@ -660,6 +670,7 @@ struct ath_softc { struct ath_txq *sc_ac2q[5]; /* WME AC -> h/w q map */ struct task sc_txtask; /* tx int processing */ struct task sc_txqtask; /* tx proc processing */ + struct task sc_txpkttask; /* tx frame processing */ struct ath_descdma sc_txcompdma; /* TX EDMA completion */ struct mtx sc_txcomplock; /* TX EDMA completion lock */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 18:04:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B66AA382; Tue, 15 Jan 2013 18:04:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9DD2CC2B; Tue, 15 Jan 2013 18:04:15 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FI4Frj024003; Tue, 15 Jan 2013 18:04:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FI4FPt024002; Tue, 15 Jan 2013 18:04:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301151804.r0FI4FPt024002@svn.freebsd.org> From: Adrian Chadd Date: Tue, 15 Jan 2013 18:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245466 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 18:04:15 -0000 Author: adrian Date: Tue Jan 15 18:04:15 2013 New Revision: 245466 URL: http://svnweb.freebsd.org/changeset/base/245466 Log: Add some new debugging options for the ath(4) and ath_hal(4) drivers. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Jan 15 18:01:23 2013 (r245465) +++ head/sys/conf/options Tue Jan 15 18:04:15 2013 (r245466) @@ -775,6 +775,8 @@ ATH_ENABLE_11N opt_ath.h ATH_ENABLE_DFS opt_ath.h ATH_EEPROM_FIRMWARE opt_ath.h ATH_ENABLE_RADIOTAP_VENDOR_EXT opt_ath.h +ATH_DEBUG_ALQ opt_ath.h +ATH_KTR_INTR_DEBUG opt_ath.h # options for the Atheros hal AH_SUPPORT_AR5416 opt_ah.h @@ -794,7 +796,7 @@ AH_NEED_DESC_SWAP opt_ah.h AH_USE_INIPDGAIN opt_ah.h AH_MAXCHAN opt_ah.h AH_RXCFG_SDMAMW_4BYTES opt_ah.h - +AH_INTERRUPT_DEBUGGING opt_ah.h # AR5416 and later interrupt mitigation # XXX do not use this for AR9130 AH_AR5416_INTERRUPT_MITIGATION opt_ah.h From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 18:09:57 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 23B8C59A; Tue, 15 Jan 2013 18:09:57 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id D436FCC8; Tue, 15 Jan 2013 18:09:56 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id r0FI9sGC077210; Tue, 15 Jan 2013 10:09:54 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id r0FI9r2l077209; Tue, 15 Jan 2013 10:09:53 -0800 (PST) (envelope-from sgk) Date: Tue, 15 Jan 2013 10:09:53 -0800 From: Steve Kargl To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r245269 - head/share/mk Message-ID: <20130115180953.GA77200@troutmask.apl.washington.edu> References: <201301102244.r0AMiJ1k059594@svn.freebsd.org> <20130114224326.GA72312@troutmask.apl.washington.edu> <86mwwaml0r.fsf@ds4.des.no> <20130115175941.GA77018@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130115175941.GA77018@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 18:09:57 -0000 On Tue, Jan 15, 2013 at 09:59:41AM -0800, Steve Kargl wrote: > On Tue, Jan 15, 2013 at 06:08:36PM +0100, Dag-Erling Smørgrav wrote: > > Steve Kargl writes: > > > I suggest adding a blurb to src/UPDATING to help others with memory > > > loss issues. > > > > Thanks, can you commit that patch? > > > > Yes. > > But, I found that your commit only indirectly caused the > problem. The system that showed the problem with NO_KERBEROS > in /etc/make.conf never had kerberos installed, so your change > actually caused my buildworld to try to build kerberos. It > appears that usr.bin/compile_et is needed to bootstrap kerberos. > compile_et is not installed as a bootstrap-tool, so it must be > picking up a previously installed compile_et. At the moment, > I'm stumped as how to compile_et. On a system with kerberos installed and after a buildworld, I find % cd /usr/src % make buildenv Entering world for amd64:amd64 # which compile_et /usr/bin/compile_et # exit -- Steve From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 18:38:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CA5E4F6F; Tue, 15 Jan 2013 18:38:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BB903E7C; Tue, 15 Jan 2013 18:38:51 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FIcpUF033781; Tue, 15 Jan 2013 18:38:51 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FIcpUd033780; Tue, 15 Jan 2013 18:38:51 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301151838.r0FIcpUd033780@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 15 Jan 2013 18:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245467 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 18:38:51 -0000 Author: np Date: Tue Jan 15 18:38:51 2013 New Revision: 245467 URL: http://svnweb.freebsd.org/changeset/base/245467 Log: cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (active open). MFC after: 1 week Modified: head/sys/dev/cxgbe/tom/t4_connect.c Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Tue Jan 15 18:04:15 2013 (r245466) +++ head/sys/dev/cxgbe/tom/t4_connect.c Tue Jan 15 18:38:51 2013 (r245467) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #ifdef TCP_OFFLOAD #include @@ -220,10 +221,9 @@ do_act_open_rpl(struct sge_iq *iq, const * Options2 for active open. */ static uint32_t -calc_opt2a(struct socket *so) +calc_opt2a(struct socket *so, struct toepcb *toep) { struct tcpcb *tp = so_sototcpcb(so); - struct toepcb *toep = tp->t_toe; struct port_info *pi = toep->port; struct adapter *sc = pi->adapter; uint32_t opt2 = 0; @@ -260,6 +260,12 @@ t4_init_connect_cpl_handlers(struct adap t4_register_cpl_handler(sc, CPL_ACT_OPEN_RPL, do_act_open_rpl); } +#define DONT_OFFLOAD_ACTIVE_OPEN(x) do { \ + reason = __LINE__; \ + rc = (x); \ + goto failed; \ +} while (0) + /* * active open (soconnect). * @@ -275,20 +281,19 @@ t4_connect(struct toedev *tod, struct so struct sockaddr *nam) { struct adapter *sc = tod->tod_softc; + struct tom_data *td = tod_td(tod); struct toepcb *toep = NULL; struct wrqe *wr = NULL; - struct cpl_act_open_req *cpl; - struct l2t_entry *e = NULL; struct ifnet *rt_ifp = rt->rt_ifp; struct port_info *pi; - int atid = -1, mtu_idx, rscale, qid_atid, rc = ENOMEM; + int mtu_idx, rscale, qid_atid, rc, isipv6; struct inpcb *inp = sotoinpcb(so); struct tcpcb *tp = intotcpcb(inp); + int reason; INP_WLOCK_ASSERT(inp); - - if (nam->sa_family != AF_INET) - CXGBE_UNIMPLEMENTED("IPv6 connect"); + KASSERT(nam->sa_family == AF_INET || nam->sa_family == AF_INET6, + ("%s: dest addr %p has family %u", __func__, nam, nam->sa_family)); if (rt_ifp->if_type == IFT_ETHER) pi = rt_ifp->if_softc; @@ -297,30 +302,29 @@ t4_connect(struct toedev *tod, struct so pi = ifp->if_softc; } else if (rt_ifp->if_type == IFT_IEEE8023ADLAG) - return (ENOSYS); /* XXX: implement lagg support */ + DONT_OFFLOAD_ACTIVE_OPEN(ENOSYS); /* XXX: implement lagg+TOE */ else - return (ENOTSUP); + DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); toep = alloc_toepcb(pi, -1, -1, M_NOWAIT); if (toep == NULL) - goto failed; + DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); - atid = alloc_atid(sc, toep); - if (atid < 0) - goto failed; + toep->tid = alloc_atid(sc, toep); + if (toep->tid < 0) + DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); - e = t4_l2t_get(pi, rt_ifp, + toep->l2te = t4_l2t_get(pi, rt_ifp, rt->rt_flags & RTF_GATEWAY ? rt->rt_gateway : nam); - if (e == NULL) - goto failed; + if (toep->l2te == NULL) + DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); - wr = alloc_wrqe(sizeof(*cpl), toep->ctrlq); + isipv6 = nam->sa_family == AF_INET6; + wr = alloc_wrqe(isipv6 ? sizeof(struct cpl_act_open_req6) : + sizeof(struct cpl_act_open_req), toep->ctrlq); if (wr == NULL) - goto failed; - cpl = wrtod(wr); + DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); - toep->tid = atid; - toep->l2te = e; if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) set_tcpddp_ulp_mode(toep); else @@ -330,8 +334,6 @@ t4_connect(struct toedev *tod, struct so toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); SOCKBUF_UNLOCK(&so->so_rcv); - offload_socket(so, toep); - /* * The kernel sets request_r_scale based on sb_max whereas we need to * take hardware's MAX_RCV_WND into account too. This is normally a @@ -342,39 +344,78 @@ t4_connect(struct toedev *tod, struct so else rscale = 0; mtu_idx = find_best_mtu_idx(sc, &inp->inp_inc, 0); - qid_atid = (toep->ofld_rxq->iq.abs_id << 14) | atid; + qid_atid = (toep->ofld_rxq->iq.abs_id << 14) | toep->tid; - INIT_TP_WR(cpl, 0); - OPCODE_TID(cpl) = htobe32(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, qid_atid)); - inp_4tuple_get(inp, &cpl->local_ip, &cpl->local_port, &cpl->peer_ip, - &cpl->peer_port); - cpl->opt0 = calc_opt0(so, pi, e, mtu_idx, rscale, toep->rx_credits, - toep->ulp_mode); - cpl->params = select_ntuple(pi, e, sc->filter_mode); - cpl->opt2 = calc_opt2a(so); + if (isipv6) { + struct cpl_act_open_req6 *cpl = wrtod(wr); + + if ((inp->inp_vflag & INP_IPV6) == 0) { + /* XXX think about this a bit more */ + log(LOG_ERR, + "%s: time to think about AF_INET6 + vflag 0x%x.\n", + __func__, inp->inp_vflag); + DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); + } + + toep->ce = hold_lip(td, &inp->in6p_laddr); + if (toep->ce == NULL) + DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); + + INIT_TP_WR(cpl, 0); + OPCODE_TID(cpl) = htobe32(MK_OPCODE_TID(CPL_ACT_OPEN_REQ6, + qid_atid)); + + cpl->local_port = inp->inp_lport; + cpl->local_ip_hi = *(uint64_t *)&inp->in6p_laddr.s6_addr[0]; + cpl->local_ip_lo = *(uint64_t *)&inp->in6p_laddr.s6_addr[8]; + cpl->peer_port = inp->inp_fport; + cpl->peer_ip_hi = *(uint64_t *)&inp->in6p_faddr.s6_addr[0]; + cpl->peer_ip_lo = *(uint64_t *)&inp->in6p_faddr.s6_addr[8]; + cpl->opt0 = calc_opt0(so, pi, toep->l2te, mtu_idx, rscale, + toep->rx_credits, toep->ulp_mode); + cpl->params = select_ntuple(pi, toep->l2te, sc->filter_mode); + cpl->opt2 = calc_opt2a(so, toep); + } else { + struct cpl_act_open_req *cpl = wrtod(wr); + + INIT_TP_WR(cpl, 0); + OPCODE_TID(cpl) = htobe32(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, + qid_atid)); + inp_4tuple_get(inp, &cpl->local_ip, &cpl->local_port, + &cpl->peer_ip, &cpl->peer_port); + cpl->opt0 = calc_opt0(so, pi, toep->l2te, mtu_idx, rscale, + toep->rx_credits, toep->ulp_mode); + cpl->params = select_ntuple(pi, toep->l2te, sc->filter_mode); + cpl->opt2 = calc_opt2a(so, toep); + } CTR5(KTR_CXGBE, "%s: atid %u (%s), toep %p, inp %p", __func__, toep->tid, tcpstates[tp->t_state], toep, inp); - rc = t4_l2t_send(sc, wr, e); + offload_socket(so, toep); + rc = t4_l2t_send(sc, wr, toep->l2te); if (rc == 0) { toep->flags |= TPF_CPL_PENDING; return (0); } undo_offload_socket(so); + reason = __LINE__; failed: - CTR5(KTR_CXGBE, "%s: FAILED, atid %d, toep %p, l2te %p, wr %p", - __func__, atid, toep, e, wr); + CTR3(KTR_CXGBE, "%s: not offloading (%d), rc %d", __func__, reason, rc); - if (e) - t4_l2t_release(e); if (wr) free_wrqe(wr); - if (atid >= 0) - free_atid(sc, atid); - if (toep) + + if (toep) { + if (toep->tid >= 0) + free_atid(sc, toep->tid); + if (toep->l2te) + t4_l2t_release(toep->l2te); + if (toep->ce) + release_lip(td, toep->ce); free_toepcb(toep); + } return (rc); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 18:50:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 81887332; Tue, 15 Jan 2013 18:50:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 72018EFF; Tue, 15 Jan 2013 18:50:41 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FIofpG038536; Tue, 15 Jan 2013 18:50:41 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FIoftY038535; Tue, 15 Jan 2013 18:50:41 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301151850.r0FIoftY038535@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 15 Jan 2013 18:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245468 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 18:50:41 -0000 Author: np Date: Tue Jan 15 18:50:40 2013 New Revision: 245468 URL: http://svnweb.freebsd.org/changeset/base/245468 Log: cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (passive open). MFC after: 1 week Modified: head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Tue Jan 15 18:38:51 2013 (r245467) +++ head/sys/dev/cxgbe/tom/t4_listen.c Tue Jan 15 18:50:40 2013 (r245468) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #ifdef TCP_OFFLOAD #include @@ -50,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #define TCPSTATES @@ -194,7 +197,7 @@ alloc_lctx(struct adapter *sc, struct in if (lctx == NULL) return (NULL); - lctx->stid = alloc_stid(sc, lctx, inp->inp_inc.inc_flags & INC_ISIPV6); + lctx->stid = alloc_stid(sc, lctx, inp->inp_vflag & INP_IPV6); if (lctx->stid < 0) { free(lctx, M_CXGBE); return (NULL); @@ -399,7 +402,7 @@ create_server(struct adapter *sc, struct { struct wrqe *wr; struct cpl_pass_open_req *req; - struct in_conninfo *inc = &lctx->inp->inp_inc; + struct inpcb *inp = lctx->inp; wr = alloc_wrqe(sizeof(*req), lctx->ctrlq); if (wr == NULL) { @@ -410,9 +413,9 @@ create_server(struct adapter *sc, struct INIT_TP_WR(req, 0); OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_PASS_OPEN_REQ, lctx->stid)); - req->local_port = inc->inc_lport; + req->local_port = inp->inp_lport; req->peer_port = 0; - req->local_ip = inc->inc_laddr.s_addr; + req->local_ip = inp->inp_laddr.s_addr; req->peer_ip = 0; req->opt0 = htobe64(V_TX_CHAN(lctx->ctrlq->eq.tx_chan)); req->opt1 = htobe64(V_CONN_POLICY(CPL_CONN_POLICY_ASK) | @@ -423,6 +426,36 @@ create_server(struct adapter *sc, struct } static int +create_server6(struct adapter *sc, struct listen_ctx *lctx) +{ + struct wrqe *wr; + struct cpl_pass_open_req6 *req; + struct inpcb *inp = lctx->inp; + + wr = alloc_wrqe(sizeof(*req), lctx->ctrlq); + if (wr == NULL) { + log(LOG_ERR, "%s: allocation failure", __func__); + return (ENOMEM); + } + req = wrtod(wr); + + INIT_TP_WR(req, 0); + OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_PASS_OPEN_REQ6, lctx->stid)); + req->local_port = inp->inp_lport; + req->peer_port = 0; + req->local_ip_hi = *(uint64_t *)&inp->in6p_laddr.s6_addr[0]; + req->local_ip_lo = *(uint64_t *)&inp->in6p_laddr.s6_addr[8]; + req->peer_ip_hi = 0; + req->peer_ip_lo = 0; + req->opt0 = htobe64(V_TX_CHAN(lctx->ctrlq->eq.tx_chan)); + req->opt1 = htobe64(V_CONN_POLICY(CPL_CONN_POLICY_ASK) | + F_SYN_RSS_ENABLE | V_SYN_RSS_QUEUE(lctx->ofld_rxq->iq.abs_id)); + + t4_wrq_tx(sc, wr); + return (0); +} + +static int destroy_server(struct adapter *sc, struct listen_ctx *lctx) { struct wrqe *wr; @@ -458,13 +491,10 @@ t4_listen_start(struct toedev *tod, stru struct port_info *pi; struct inpcb *inp = tp->t_inpcb; struct listen_ctx *lctx; - int i; + int i, rc; INP_WLOCK_ASSERT(inp); - if ((inp->inp_vflag & INP_IPV4) == 0) - return (0); - #if 0 ADAPTER_LOCK(sc); if (IS_BUSY(sc)) { @@ -481,8 +511,9 @@ t4_listen_start(struct toedev *tod, stru goto done; /* no port that's UP with IFCAP_TOE enabled */ /* - * Find a running port with IFCAP_TOE4. We'll use the first such port's - * queues to send the passive open and receive the reply to it. + * Find a running port with IFCAP_TOE (4 or 6). We'll use the first + * such port's queues to send the passive open and receive the reply to + * it. * * XXX: need a way to mark a port in use by offload. if_cxgbe should * then reject any attempt to bring down such a port (and maybe reject @@ -490,7 +521,7 @@ t4_listen_start(struct toedev *tod, stru */ for_each_port(sc, i) { if (isset(&sc->open_device_map, i) && - sc->port[i]->ifp->if_capenable & IFCAP_TOE4) + sc->port[i]->ifp->if_capenable & IFCAP_TOE) break; } KASSERT(i < sc->params.nports, @@ -509,12 +540,17 @@ t4_listen_start(struct toedev *tod, stru } listen_hash_add(sc, lctx); - CTR5(KTR_CXGBE, "%s: stid %u (%s), lctx %p, inp %p", __func__, - lctx->stid, tcpstates[tp->t_state], lctx, inp); + CTR6(KTR_CXGBE, "%s: stid %u (%s), lctx %p, inp %p vflag 0x%x", + __func__, lctx->stid, tcpstates[tp->t_state], lctx, inp, + inp->inp_vflag); - if (create_server(sc, lctx) != 0) { - log(LOG_ERR, "%s: %s failed to create hw listener.\n", __func__, - device_get_nameunit(sc->dev)); + if (inp->inp_vflag & INP_IPV6) + rc = create_server6(sc, lctx); + else + rc = create_server(sc, lctx); + if (rc != 0) { + log(LOG_ERR, "%s: %s failed to create hw listener: %d.\n", + __func__, device_get_nameunit(sc->dev), rc); (void) listen_hash_del(sc, inp); inp = release_lctx(sc, lctx); /* can't be freed, host stack has a reference */ @@ -618,7 +654,7 @@ t4_syncache_respond(struct toedev *tod, struct l2t_entry *e; struct tcpopt to; struct ip *ip = mtod(m, struct ip *); - struct tcphdr *th = (void *)(ip + 1); + struct tcphdr *th; wr = (struct wrqe *)atomic_readandclear_ptr(&synqe->wr); if (wr == NULL) { @@ -626,6 +662,10 @@ t4_syncache_respond(struct toedev *tod, return (EALREADY); } + if (ip->ip_v == IPVERSION) + th = (void *)(ip + 1); + else + th = (void *)((struct ip6_hdr *)ip + 1); bzero(&to, sizeof(to)); tcp_dooptions(&to, (void *)(th + 1), (th->th_off << 2) - sizeof(*th), TO_SYN); @@ -668,7 +708,7 @@ do_pass_open_rpl(struct sge_iq *iq, cons lctx->flags &= ~LCTX_RPL_PENDING; if (status != CPL_ERR_NONE) - log(LOG_ERR, "listener with stid %u failed: %d", stid, status); + log(LOG_ERR, "listener (stid %u) failed: %d\n", stid, status); #ifdef INVARIANTS /* @@ -738,7 +778,7 @@ do_close_server_rpl(struct sge_iq *iq, c CTR3(KTR_CXGBE, "%s: stid %u, status %u", __func__, stid, status); if (status != CPL_ERR_NONE) { - log(LOG_ERR, "%s: failed (%u) to close listener for stid %u", + log(LOG_ERR, "%s: failed (%u) to close listener for stid %u\n", __func__, status, stid); return (status); } @@ -996,21 +1036,29 @@ pass_accept_req_to_protohdrs(const struc const struct cpl_pass_accept_req *cpl = mtod(m, const void *); const struct ether_header *eh; unsigned int hlen = be32toh(cpl->hdr_len); - const struct ip *ip; + uintptr_t l3hdr; const struct tcphdr *tcp; eh = (const void *)(cpl + 1); - ip = (const void *)((uintptr_t)eh + G_ETH_HDR_LEN(hlen)); - tcp = (const void *)((uintptr_t)ip + G_IP_HDR_LEN(hlen)); + l3hdr = ((uintptr_t)eh + G_ETH_HDR_LEN(hlen)); + tcp = (const void *)(l3hdr + G_IP_HDR_LEN(hlen)); if (inc) { bzero(inc, sizeof(*inc)); - inc->inc_faddr = ip->ip_src; - inc->inc_laddr = ip->ip_dst; inc->inc_fport = tcp->th_sport; inc->inc_lport = tcp->th_dport; - if (ip->ip_v == 6) + if (((struct ip *)l3hdr)->ip_v == IPVERSION) { + const struct ip *ip = (const void *)l3hdr; + + inc->inc_faddr = ip->ip_src; + inc->inc_laddr = ip->ip_dst; + } else { + const struct ip6_hdr *ip6 = (const void *)l3hdr; + inc->inc_flags |= INC_ISIPV6; + inc->inc6_faddr = ip6->ip6_src; + inc->inc6_laddr = ip6->ip6_dst; + } } if (th) { @@ -1019,6 +1067,105 @@ pass_accept_req_to_protohdrs(const struc } } +static int +ifnet_has_ip6(struct ifnet *ifp, struct in6_addr *ip6) +{ + struct ifaddr *ifa; + struct sockaddr_in6 *sin6; + int found = 0; + struct in6_addr in6 = *ip6; + + /* Just as in ip6_input */ + if (in6_clearscope(&in6) || in6_clearscope(&in6)) + return (0); + in6_setscope(&in6, ifp, NULL); + + if_addr_rlock(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + sin6 = (void *)ifa->ifa_addr; + if (sin6->sin6_family != AF_INET6) + continue; + + if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &in6)) { + found = 1; + break; + } + } + if_addr_runlock(ifp); + + return (found); +} + +static struct l2t_entry * +get_l2te_for_nexthop(struct port_info *pi, struct ifnet *ifp, + struct in_conninfo *inc) +{ + struct rtentry *rt; + struct l2t_entry *e; + struct sockaddr_in6 sin6; + struct sockaddr *dst = (void *)&sin6; + + if (inc->inc_flags & INC_ISIPV6) { + dst->sa_len = sizeof(struct sockaddr_in6); + dst->sa_family = AF_INET6; + ((struct sockaddr_in6 *)dst)->sin6_addr = inc->inc6_faddr; + + if (IN6_IS_ADDR_LINKLOCAL(&inc->inc6_laddr)) { + /* no need for route lookup */ + e = t4_l2t_get(pi, ifp, dst); + return (e); + } + } else { + dst->sa_len = sizeof(struct sockaddr_in); + dst->sa_family = AF_INET; + ((struct sockaddr_in *)dst)->sin_addr = inc->inc_faddr; + } + + rt = rtalloc1(dst, 0, 0); + if (rt == NULL) + return (NULL); + else { + struct sockaddr *nexthop; + + RT_UNLOCK(rt); + if (rt->rt_ifp != ifp) + e = NULL; + else { + if (rt->rt_flags & RTF_GATEWAY) + nexthop = rt->rt_gateway; + else + nexthop = dst; + e = t4_l2t_get(pi, ifp, nexthop); + } + RTFREE(rt); + } + + return (e); +} + +static int +ifnet_has_ip(struct ifnet *ifp, struct in_addr in) +{ + struct ifaddr *ifa; + struct sockaddr_in *sin; + int found = 0; + + if_addr_rlock(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + sin = (void *)ifa->ifa_addr; + if (sin->sin_family != AF_INET) + continue; + + if (sin->sin_addr.s_addr == in.s_addr) { + found = 1; + break; + } + } + if_addr_runlock(ifp); + + return (found); +} + #define REJECT_PASS_ACCEPT() do { \ reject_reason = __LINE__; \ goto reject; \ @@ -1054,10 +1201,8 @@ do_pass_accept_req(struct sge_iq *iq, co struct tcphdr th; struct tcpopt to; struct port_info *pi; - struct ifnet *ifp, *ifp_vlan = NULL; + struct ifnet *hw_ifp, *ifp; struct l2t_entry *e = NULL; - struct rtentry *rt; - struct sockaddr_in nam; int rscale, mtu_idx, rx_credits, rxqid, ulp_mode; struct synq_entry *synqe = NULL; int reject_reason; @@ -1077,31 +1222,24 @@ do_pass_accept_req(struct sge_iq *iq, co t4opt_to_tcpopt(&cpl->tcpopt, &to); pi = sc->port[G_SYN_INTF(be16toh(cpl->l2info))]; - ifp = pi->ifp; - m->m_pkthdr.rcvif = ifp; - tod = TOEDEV(ifp); - - /* - * Don't offload if the interface that received the SYN doesn't have - * IFCAP_TOE enabled. - */ - if ((ifp->if_capenable & IFCAP_TOE4) == 0) - REJECT_PASS_ACCEPT(); - - /* Don't offload IPv6 connections. XXX: add IPv6 support */ - if (inc.inc_flags & INC_ISIPV6) - REJECT_PASS_ACCEPT(); + hw_ifp = pi->ifp; /* the cxgbeX ifnet */ + m->m_pkthdr.rcvif = hw_ifp; + tod = TOEDEV(hw_ifp); /* - * Don't offload if the SYN had a VLAN tag and the vid doesn't match - * anything on this interface. + * Figure out if there is a pseudo interface (vlan, lagg, etc.) + * involved. Don't offload if the SYN had a VLAN tag and the vid + * doesn't match anything on this interface. + * + * XXX: lagg support, lagg + vlan support. */ vid = EVL_VLANOFTAG(be16toh(cpl->vlan)); if (vid != 0xfff) { - ifp_vlan = VLAN_DEVAT(ifp, vid); - if (ifp_vlan == NULL) + ifp = VLAN_DEVAT(hw_ifp, vid); + if (ifp == NULL) REJECT_PASS_ACCEPT(); - } + } else + ifp = hw_ifp; /* * Don't offload if the peer requested a TCP option that's not known to @@ -1110,31 +1248,36 @@ do_pass_accept_req(struct sge_iq *iq, co if (cpl->tcpopt.unknown) REJECT_PASS_ACCEPT(); - /* - * Don't offload if the outgoing interface for the route back to the - * peer is not the same as the interface that received the SYN. - * XXX: too restrictive. - */ - nam.sin_len = sizeof(nam); - nam.sin_family = AF_INET; - nam.sin_addr = inc.inc_faddr; - rt = rtalloc1((struct sockaddr *)&nam, 0, 0); - if (rt == NULL) - REJECT_PASS_ACCEPT(); - else { - struct sockaddr *nexthop; + if (inc.inc_flags & INC_ISIPV6) { - RT_UNLOCK(rt); - nexthop = rt->rt_flags & RTF_GATEWAY ? rt->rt_gateway : - (struct sockaddr *)&nam; - if (rt->rt_ifp == ifp || - (ifp_vlan != NULL && rt->rt_ifp == ifp_vlan)) - e = t4_l2t_get(pi, rt->rt_ifp, nexthop); - RTFREE(rt); - if (e == NULL) - REJECT_PASS_ACCEPT(); /* no l2te, or ifp mismatch */ + /* Don't offload if the ifcap isn't enabled */ + if ((ifp->if_capenable & IFCAP_TOE6) == 0) + REJECT_PASS_ACCEPT(); + + /* + * SYN must be directed to an IP6 address on this ifnet. This + * is more restrictive than in6_localip. + */ + if (!ifnet_has_ip6(ifp, &inc.inc6_laddr)) + REJECT_PASS_ACCEPT(); + } else { + + /* Don't offload if the ifcap isn't enabled */ + if ((ifp->if_capenable & IFCAP_TOE4) == 0) + REJECT_PASS_ACCEPT(); + + /* + * SYN must be directed to an IP address on this ifnet. This + * is more restrictive than in_localip. + */ + if (!ifnet_has_ip(ifp, inc.inc_laddr)) + REJECT_PASS_ACCEPT(); } + e = get_l2te_for_nexthop(pi, ifp, &inc); + if (e == NULL) + REJECT_PASS_ACCEPT(); + synqe = mbuf_to_synqe(m); if (synqe == NULL) REJECT_PASS_ACCEPT(); @@ -1226,7 +1369,7 @@ do_pass_accept_req(struct sge_iq *iq, co */ m = m_dup(synqe->syn, M_NOWAIT); if (m) - m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.rcvif = hw_ifp; remove_tid(sc, synqe->tid); free(wr, M_CXGBE); @@ -1276,7 +1419,7 @@ reject: m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); m->m_pkthdr.csum_data = 0xffff; - ifp->if_input(ifp, m); + hw_ifp->if_input(hw_ifp, m); } return (reject_reason); From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 19:00:56 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D70598B9; Tue, 15 Jan 2013 19:00:56 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) by mx1.freebsd.org (Postfix) with ESMTP id A183BF8C; Tue, 15 Jan 2013 19:00:56 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r0FJ0tk8043486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Jan 2013 11:00:55 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r0FJ0tAp043485; Tue, 15 Jan 2013 11:00:55 -0800 (PST) (envelope-from jmg) Date: Tue, 15 Jan 2013 11:00:55 -0800 From: John-Mark Gurney To: Ganbold Tsagaankhuu Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts Message-ID: <20130115190055.GA1410@funkthat.com> References: <201301150826.r0F8QGJr044600@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201301150826.r0F8QGJr044600@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 15 Jan 2013 11:00:55 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 19:00:56 -0000 Ganbold Tsagaankhuu wrote this message on Tue, Jan 15, 2013 at 08:26 +0000: > + * Copyright (c) 2012 Ganbold Tsagaankhuu. Also, (c) doesn't add anything. It needs to be either Copyright (which you have) or a c in a circle, the parens around a c have not been given legal force... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 19:18:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A2879B80 for ; Tue, 15 Jan 2013 19:18:28 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx1.freebsd.org (Postfix) with ESMTP id 2A50491 for ; Tue, 15 Jan 2013 19:18:27 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id c1so425041lbg.32 for ; Tue, 15 Jan 2013 11:18:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=P+yEFtQ6i+sijofo7a1avZTOTMnGsciYwojE/iam34w=; b=LF87TZmf7D1Dpr2jTxpTLKinMe400WDUl/NPu16+lTR8x85qqfUKRT7UIVODfHd0rG LxrxN3wugJ6If1NAIvXSb70on8MKQRiVeauTLXYOZ/+1dYR0NR1/dmY3XHDEtYjw5gxK BOHmk4tUc4KSWRA46ip+1NRRe3eGSVx9LVLPOKEuisJ6O8Y8EIv9j5Rd+p/o44DKqchu ylI217ea2rqSfP9p4VD73V/hZwqGSkb58QN4dhQQVAivxP62MCRXa35DK5jmibw2sVjw EOKNruqWudakdQtToJPXDLQaoeydyfeNQW29Ex5ApC7Zt2H7gwRvspwQ7VJchHneqlXg rmYw== X-Received: by 10.112.26.169 with SMTP id m9mr30150355lbg.116.1358277506578; Tue, 15 Jan 2013 11:18:26 -0800 (PST) Received: from zont-osx.local (ppp95-165-128-93.pppoe.spdop.ru. [95.165.128.93]) by mx.google.com with ESMTPS id ew10sm7146213lbb.10.2013.01.15.11.18.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 11:18:25 -0800 (PST) Sender: Andrey Zonov Message-ID: <50F5AB7B.6090903@FreeBSD.org> Date: Tue, 15 Jan 2013 23:18:19 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Fabian Keil Subject: Re: svn commit: r245415 - stable/9/etc References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> In-Reply-To: <20130114200914.7f3272d2@fabiankeil.de> X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2VEDDFETTLLHHDVKJSJPD" X-Gm-Message-State: ALoCoQml7e8WOKN/E1zVUUbtmvfMwet7/uSFSvpvc9F1rvxVoEgw+Uh5viUvk9LzDlVjSghpghRG Cc: svn-src-all@freebsd.org, Konstantin Belousov , Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 19:18:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VEDDFETTLLHHDVKJSJPD Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 1/14/13 11:09 PM, Fabian Keil wrote: > Andrey Zonov wrote: >=20 >> On 1/14/13 3:26 PM, Fabian Keil wrote: >>> Andrey Zonov wrote: >>> >>>> Author: zont >>>> Date: Mon Jan 14 10:58:20 2013 >>>> New Revision: 245415 >>>> URL: http://svnweb.freebsd.org/changeset/base/245415 >>>> >>>> Log: >>>> MFC r244383: >>>> - Set memorylocked limit to 64Kb for default login class. >>>> This prevents unprivileged users to lock too much memory. >>> >>> Note that this causes geli segfaults when using sudo: >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174831 >>> >> >> The change should not affect stable, because new behavior was turned o= ff >> in stable. >=20 > It's not exactly obvious, but by "this" I was referring to the change > in CURRENT. >=20 The solution which you proposed was refused by kib@ (add to CC) when I proposed it earlier. I also wanted to set memory-locked limit to 8Mb, but avg@ (add to CC) recommended to set it to something smaller. Any suggestions? --=20 Andrey Zonov ------enig2VEDDFETTLLHHDVKJSJPD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQ9at/AAoJEBWLemxX/CvTTZUIAJDfJgEpKcbmJ2GqwiPdgw5O 3ZG5YJbA6qCqec2/ERNw1q+GkQJDCB8AbqEoVEjDhVOUnf6Gjtpwesk75GeClz+z +Jf8DfaFl4wOqjjYrn0W3B5M3uLm+WR9GY5O8I+MOUtZNVT5gWXXGJg2TsKldPrm iVrmXxCunyeFSe9umGn/Psm2JQDK3hhtlRIJFu0jAM+8u/4bA4jnwPjZaVtYJeXA e1T8ZbHzBUTEQnTiPu+8CboH2OYgQvIheNhlRFUhXJv8pxo9r0bvEQNs89ZDMooR o16c/ZPgWwjA8dUizsTCENeOMjPtjn7R3DZziaIoIzmYbBZty3lPNh+iaA47Swk= =91hz -----END PGP SIGNATURE----- ------enig2VEDDFETTLLHHDVKJSJPD-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 19:26:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3E58BC69; Tue, 15 Jan 2013 19:26:18 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2C094DD; Tue, 15 Jan 2013 19:26:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FJQI6D007238; Tue, 15 Jan 2013 19:26:18 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FJQHGK007215; Tue, 15 Jan 2013 19:26:18 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201301151926.r0FJQHGK007215@svn.freebsd.org> From: Alfred Perlstein Date: Tue, 15 Jan 2013 19:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245469 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 19:26:18 -0000 Author: alfred Date: Tue Jan 15 19:26:17 2013 New Revision: 245469 URL: http://svnweb.freebsd.org/changeset/base/245469 Log: Do not autotune ncallout to be greater than 18508. When maxusers was unrestricted and maxfiles was allowed to autotune much higher the result was that ncallout which was based on maxfiles and maxproc grew much higher than was needed. To fix this clip autotuning to the same number we would get with the old maxusers algorithm which would stop scaling at 384 maxusers. Growing ncalout higher is not likely to be needed since most consumers of timeout(9) are gone and any higher value for ncallout causes the callwheel hashes to be much larger than will even be needed for most applications. MFC after: 1 month Reviewed by: mav Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Tue Jan 15 18:50:40 2013 (r245468) +++ head/sys/kern/subr_param.c Tue Jan 15 19:26:17 2013 (r245469) @@ -326,8 +326,11 @@ init_param2(long physpages) /* * XXX: Does the callout wheel have to be so big? + * + * Clip callout to result of previous function of maxusers maximum + * 384. This is still huge, but acceptable. */ - ncallout = 16 + maxproc + maxfiles; + ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); /* From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 20:13:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 67EC41F7; Tue, 15 Jan 2013 20:13:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5A64C34F; Tue, 15 Jan 2013 20:13:26 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FKDQgT025545; Tue, 15 Jan 2013 20:13:26 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FKDQBm025543; Tue, 15 Jan 2013 20:13:26 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301152013.r0FKDQBm025543@svn.freebsd.org> From: John Baldwin Date: Tue, 15 Jan 2013 20:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245471 - head/sys/dev/puc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 20:13:26 -0000 Author: jhb Date: Tue Jan 15 20:13:25 2013 New Revision: 245471 URL: http://svnweb.freebsd.org/changeset/base/245471 Log: Do not require a filter-only interrupt handler for puc ports that are not serial devices (such as printer ports). This allows ppc devices attached to puc to correctly setup an interrupt handler and work. Tested by: Andre Albsmeier Andre.Albsmeier@siemens.com MFC after: 1 week Modified: head/sys/dev/puc/puc.c Modified: head/sys/dev/puc/puc.c ============================================================================== --- head/sys/dev/puc/puc.c Tue Jan 15 20:10:49 2013 (r245470) +++ head/sys/dev/puc/puc.c Tue Jan 15 20:13:25 2013 (r245471) @@ -622,7 +622,7 @@ puc_bus_setup_intr(device_t dev, device_ if (cookiep == NULL || res != port->p_ires) return (EINVAL); /* We demand that serdev devices use filter_only interrupts. */ - if (ihand != NULL) + if (port->p_type == PUC_TYPE_SERIAL && ihand != NULL) return (ENXIO); if (rman_get_device(port->p_ires) != originator) return (ENXIO); From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 20:25:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EC8516F0; Tue, 15 Jan 2013 20:25:16 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D2DAB61C; Tue, 15 Jan 2013 20:25:16 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FKPGSC028846; Tue, 15 Jan 2013 20:25:16 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FKPGw5028845; Tue, 15 Jan 2013 20:25:16 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201301152025.r0FKPGw5028845@svn.freebsd.org> From: Ken Smith Date: Tue, 15 Jan 2013 20:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r245473 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 20:25:17 -0000 Author: kensmith Date: Tue Jan 15 20:25:16 2013 New Revision: 245473 URL: http://svnweb.freebsd.org/changeset/base/245473 Log: Turn releng/9.1 over to secteam. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Tue Jan 15 20:23:10 2013 (r245472) +++ svnadmin/conf/approvers Tue Jan 15 20:25:16 2013 (r245473) @@ -20,8 +20,7 @@ #^stable/9/ re #^stable/8/ re #^stable/7/ re -^releng/9.1/ (re) -^releng/9.0/ (security-officer|so) +^releng/9.[0-1]/ (security-officer|so) ^releng/8.[0-3]/ (security-officer|so) ^releng/7.[0-4]/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 21:20:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 239B5CC3; Tue, 15 Jan 2013 21:20:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id B8C168E2; Tue, 15 Jan 2013 21:20:18 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0FLKErB086966; Tue, 15 Jan 2013 23:20:14 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0FLKErB086966 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0FLKEfB086963; Tue, 15 Jan 2013 23:20:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 Jan 2013 23:20:14 +0200 From: Konstantin Belousov To: Andrey Zonov Subject: Re: svn commit: r245415 - stable/9/etc Message-ID: <20130115212014.GD2522@kib.kiev.ua> References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WChQLJJJfbwij+9x" Content-Disposition: inline In-Reply-To: <50F5AB7B.6090903@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-all@freebsd.org, Andriy Gapon , Fabian Keil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 21:20:19 -0000 --WChQLJJJfbwij+9x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 15, 2013 at 11:18:19PM +0400, Andrey Zonov wrote: > On 1/14/13 11:09 PM, Fabian Keil wrote: > > Andrey Zonov wrote: > >=20 > >> On 1/14/13 3:26 PM, Fabian Keil wrote: > >>> Andrey Zonov wrote: > >>> > >>>> Author: zont > >>>> Date: Mon Jan 14 10:58:20 2013 > >>>> New Revision: 245415 > >>>> URL: http://svnweb.freebsd.org/changeset/base/245415 > >>>> > >>>> Log: > >>>> MFC r244383: > >>>> - Set memorylocked limit to 64Kb for default login class. > >>>> This prevents unprivileged users to lock too much memory. > >>> > >>> Note that this causes geli segfaults when using sudo: > >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174831 > >>> > >> > >> The change should not affect stable, because new behavior was turned o= ff > >> in stable. > >=20 > > It's not exactly obvious, but by "this" I was referring to the change > > in CURRENT. > >=20 >=20 > The solution which you proposed was refused by kib@ (add to CC) when I > proposed it earlier. The limits purpose is to limit some resource usage. Having applications that override the limits contradicts the user intent of keeping the limits working. As a workaround, you could set the limit for your user account. As a solution, change the offending application to only mlock() the sensitive pages. E.g. gnupg already does this, probably because it is portable. >=20 > I also wanted to set memory-locked limit to 8Mb, but avg@ (add to CC) > recommended to set it to something smaller. >=20 > Any suggestions? >=20 > --=20 > Andrey Zonov >=20 --WChQLJJJfbwij+9x Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ9cgNAAoJEJDCuSvBvK1BqP0QAKM+a4a2pikQm61Rnyj0myPC 5rnnOs5JsoK9yXonVDMuyrnB8earLYCVQkpMGcyfJftI6TymbH+AmiyUJJbAmKIu taeIcP5oZ37mSHrlP6+sY5R9FkRvsZ2X3uBxubJUykS0JYh5thu8xKfF5LLZlsar mRq3OKEW61MAMUC1z0YXgz9ZcAjkVcY2SjlVzCWs5uOohgz4c/0Wwn0XWUr0rGYf onIApayjbRtnBTjXiHyHOcJjyHZKCPsNlNzSWEnnJizQqHBqKXUCmUmeSRfNT4J8 7mkKuG3Z2pmBdpmV7XtS3uF+iTtwkR7F2oIBfKUQhzNJlPRu8oBZAyg8DKZoXUNv oKCAKiFCt3Tuk/Wuxld+G9lyspnzdYenBV5rKmNOBMz0r/N37TWV47EIM9UKlRRM XrhMzWOUoteJ0h0V1Q9/bEJIt0Xjr5tGHlRVHHeUhHuMUTyXYuq9oYS83NC9Vexn B1evb2uU845KZKV/0iX1ViOPkOgGBSrkGDF/tDmfHmGVw2Mqa1p82wd/Nw6NmnD2 lzuHlHnUFZcrFwG1DJ9kDMbSjdSSjejgYfbi13YkGHm36NDMMHHHwS7jvrBH0jhK rAAnRIArgr4CLFdvR50eLnbOb6zNAWI5HDpJc19o1DSzcXMhNclqdR9EdBK7o/rI xEnqO3YUvlP10POiDae1 =RPzC -----END PGP SIGNATURE----- --WChQLJJJfbwij+9x-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 21:30:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 941FE11F for ; Tue, 15 Jan 2013 21:30:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx1.freebsd.org (Postfix) with ESMTP id 1F2B8952 for ; Tue, 15 Jan 2013 21:30:35 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id y2so522789lbk.17 for ; Tue, 15 Jan 2013 13:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Dhpdv3d2hIESTrmqeoXEmoBpTj9wtaG7NOasiEP94Iw=; b=OWebU3yIeVHDFwpoSBctaseFvpqyytf3LvHY732x8QFGycWsciOxfzG9cy8TLtka9e qXC/ec60Z1enyesggOz5/T2KlLfAjKaGqXoDyh/a1upMji50MfMrabEhGC8ajPnpunMl RDCuaWPkZbDCv5gpQ9pPyUpggLLM4aoZpBnG8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=Dhpdv3d2hIESTrmqeoXEmoBpTj9wtaG7NOasiEP94Iw=; b=K0j89jUf1RYhf9FhSDH7/0irwaOkE6Mw8KoH44LH54fSvulnOtAcTPvrW73xQZMSy+ FAKXftaq2LdRU7ONkgeD3MYW/QtwJ5TfuAD+VPwnTzW0kU4Qo749x1mZS0Ry/K/26JbR y7KclR9xZ37SbWjraM5Q4M8OiixtArrpdg97nhnZPOHJkFQpbCqVDfwu6Bgd0Z8imLWw 7xQcmCwENnPVwmfjum5rAuOFiYLGExmwuAgsz4EA1KBhBrHi2Ee1MhJySd2zVRknrHWI Yt2E9J6gJCx5sjDka3GoEEGyakVxRnWNgPKK+IUBsN3qv4zdWP/X7492e6iZ5SzdFvpw NbCA== Received: by 10.152.110.228 with SMTP id id4mr1502322lab.34.1358285428767; Tue, 15 Jan 2013 13:30:28 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Tue, 15 Jan 2013 13:29:58 -0800 (PST) In-Reply-To: <20130115190055.GA1410@funkthat.com> References: <201301150826.r0F8QGJr044600@svn.freebsd.org> <20130115190055.GA1410@funkthat.com> From: Eitan Adler Date: Tue, 15 Jan 2013 16:29:58 -0500 X-Google-Sender-Auth: SxKwQ-_k_HMF7fM0hZYRDXcEWRw Message-ID: Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts To: John-Mark Gurney Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQl/2Ellmrjv8LYPuuQlOzg4r36HxGd6c424BtMCbD8mAoAkaGh9mly4xbQPnfCASIaQw/oI Cc: svn-src-head@freebsd.org, Ganbold Tsagaankhuu , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 21:30:36 -0000 On 15 January 2013 14:00, John-Mark Gurney wrote: > Ganbold Tsagaankhuu wrote this message on Tue, Jan 15, 2013 at 08:26 +0000: >> + * Copyright (c) 2012 Ganbold Tsagaankhuu. > > Also, (c) doesn't add anything. It needs to be either Copyright (which > you have) or a c in a circle, the parens around a c have not been given > legal force... I am not a lawyer however I do not believe your statement has been true since the Berne Convention. Nothing is required to assert copyright. A c in a circle, p in a circle, "(c)", and "copyright" are *all* optional. That said (c) is widely recognized is a copyright symbol (imho) and may serve to increase damages from "willful infringement". That said, this being BSD licensed code the damages are likely to be minimal anyways. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 22:08:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6822F11A; Tue, 15 Jan 2013 22:08:04 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 34E12B4B; Tue, 15 Jan 2013 22:08:04 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FM84H7059675; Tue, 15 Jan 2013 22:08:04 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FM840l059674; Tue, 15 Jan 2013 22:08:04 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201301152208.r0FM840l059674@svn.freebsd.org> From: Olivier Houchard Date: Tue, 15 Jan 2013 22:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245475 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 22:08:04 -0000 Author: cognet Date: Tue Jan 15 22:08:03 2013 New Revision: 245475 URL: http://svnweb.freebsd.org/changeset/base/245475 Log: Don't define rel/acq variants of some atomic operations as the regular version for armv6. Modified: head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Tue Jan 15 21:25:01 2013 (r245474) +++ head/sys/arm/include/atomic.h Tue Jan 15 22:08:03 2013 (r245475) @@ -677,6 +677,17 @@ atomic_readandclear_32(volatile u_int32_ #define atomic_store_rel_long atomic_store_long #define atomic_load_acq_32 atomic_load_32 #define atomic_load_acq_long atomic_load_long +#define atomic_add_acq_long atomic_add_long +#define atomic_add_rel_long atomic_add_long +#define atomic_subtract_acq_long atomic_subtract_long +#define atomic_subtract_rel_long atomic_subtract_long +#define atomic_clear_acq_long atomic_clear_long +#define atomic_clear_rel_long atomic_clear_long +#define atomic_set_acq_long atomic_set_long +#define atomic_set_rel_long atomic_set_long +#define atomic_cmpset_acq_long atomic_cmpset_long +#define atomic_cmpset_rel_long atomic_cmpset_long +#define atomic_load_acq_long atomic_load_long #undef __with_interrupts_disabled static __inline void @@ -758,25 +769,13 @@ atomic_store_long(volatile u_long *dst, *dst = src; } -#define atomic_add_acq_long atomic_add_long -#define atomic_add_rel_long atomic_add_long -#define atomic_subtract_acq_long atomic_subtract_long -#define atomic_subtract_rel_long atomic_subtract_long -#define atomic_clear_acq_long atomic_clear_long -#define atomic_clear_rel_long atomic_clear_long -#define atomic_set_acq_long atomic_set_long -#define atomic_set_rel_long atomic_set_long -#define atomic_cmpset_acq_long atomic_cmpset_long -#define atomic_cmpset_rel_long atomic_cmpset_long -#define atomic_load_acq_long atomic_load_long - #define atomic_clear_ptr atomic_clear_32 #define atomic_set_ptr atomic_set_32 #define atomic_cmpset_ptr atomic_cmpset_32 #define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_32 #define atomic_store_ptr atomic_store_32 -#define atomic_store_rel_ptr atomic_store_ptr +#define atomic_store_rel_ptr atomic_store_rel_32 #define atomic_add_int atomic_add_32 #define atomic_add_acq_int atomic_add_acq_32 From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 22:08:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 54F43287; Tue, 15 Jan 2013 22:08:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2C353B50; Tue, 15 Jan 2013 22:08:18 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FM8IcI059748; Tue, 15 Jan 2013 22:08:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FM8HJZ059746; Tue, 15 Jan 2013 22:08:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301152208.r0FM8HJZ059746@svn.freebsd.org> From: John Baldwin Date: Tue, 15 Jan 2013 22:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245476 - in head/sys: fs/nfs nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 22:08:18 -0000 Author: jhb Date: Tue Jan 15 22:08:17 2013 New Revision: 245476 URL: http://svnweb.freebsd.org/changeset/base/245476 Log: - More properly handle interrupted NFS requests on an interruptible mount by returning an error of EINTR rather than EACCES. - While here, bring back some (but not all) of the NFS RPC statistics lost when krpc was committed. Reviewed by: rmacklem MFC after: 1 week Modified: head/sys/fs/nfs/nfs_commonkrpc.c head/sys/nfsclient/nfs_krpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Tue Jan 15 22:08:03 2013 (r245475) +++ head/sys/fs/nfs/nfs_commonkrpc.c Tue Jan 15 22:08:17 2013 (r245476) @@ -767,12 +767,18 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { + NFSINCRGLOBAL(newnfsstats.rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EPROTONOSUPPORT; + } else if (stat == RPC_INTR) { + error = EINTR; } else { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EACCES; } if (error) { Modified: head/sys/nfsclient/nfs_krpc.c ============================================================================== --- head/sys/nfsclient/nfs_krpc.c Tue Jan 15 22:08:03 2013 (r245475) +++ head/sys/nfsclient/nfs_krpc.c Tue Jan 15 22:08:17 2013 (r245476) @@ -549,14 +549,21 @@ tryagain: */ if (stat == RPC_SUCCESS) error = 0; - else if (stat == RPC_TIMEDOUT) + else if (stat == RPC_TIMEDOUT) { + nfsstats.rpctimeouts++; error = ETIMEDOUT; - else if (stat == RPC_VERSMISMATCH) + } else if (stat == RPC_VERSMISMATCH) { + nfsstats.rpcinvalid++; error = EOPNOTSUPP; - else if (stat == RPC_PROGVERSMISMATCH) + } else if (stat == RPC_PROGVERSMISMATCH) { + nfsstats.rpcinvalid++; error = EPROTONOSUPPORT; - else + } else if (stat == RPC_INTR) { + error = EINTR; + } else { + nfsstats.rpcinvalid++; error = EACCES; + } if (error) goto nfsmout; @@ -572,6 +579,7 @@ tryagain: if (error == ENOMEM) { m_freem(mrep); AUTH_DESTROY(auth); + nfsstats.rpcinvalid++; return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 22:09:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EDA0C468; Tue, 15 Jan 2013 22:09:11 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DC645BE6; Tue, 15 Jan 2013 22:09:11 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FM9BOb059999; Tue, 15 Jan 2013 22:09:11 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FM9B7s059998; Tue, 15 Jan 2013 22:09:11 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201301152209.r0FM9B7s059998@svn.freebsd.org> From: Olivier Houchard Date: Tue, 15 Jan 2013 22:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245477 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 22:09:12 -0000 Author: cognet Date: Tue Jan 15 22:09:11 2013 New Revision: 245477 URL: http://svnweb.freebsd.org/changeset/base/245477 Log: Only spin on the blocked_lock for SCHED_ULE+SMP, as it's done on the other arches. Modified: head/sys/arm/arm/swtch.S Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Tue Jan 15 22:08:17 2013 (r245476) +++ head/sys/arm/arm/swtch.S Tue Jan 15 22:09:11 2013 (r245477) @@ -79,6 +79,7 @@ */ #include "assym.s" +#include "opt_sched.h" #include #include @@ -428,6 +429,7 @@ ENTRY(cpu_switch) /* Release the old thread */ str r6, [r4, #TD_LOCK] +#if defined(SCHED_ULE) && defined(SMP) ldr r6, .Lblocked_lock GET_CURTHREAD_PTR(r3) @@ -435,6 +437,7 @@ ENTRY(cpu_switch) ldr r4, [r3, #TD_LOCK] cmp r4, r6 beq 1b +#endif /* XXXSCW: Safe to re-enable FIQs here */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 22:11:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18398619; Tue, 15 Jan 2013 22:11:29 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 00235C0F; Tue, 15 Jan 2013 22:11:28 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FMBSYI062229; Tue, 15 Jan 2013 22:11:28 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FMBSf8062228; Tue, 15 Jan 2013 22:11:28 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201301152211.r0FMBSf8062228@svn.freebsd.org> From: Olivier Houchard Date: Tue, 15 Jan 2013 22:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245478 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 22:11:29 -0000 Author: cognet Date: Tue Jan 15 22:11:28 2013 New Revision: 245478 URL: http://svnweb.freebsd.org/changeset/base/245478 Log: Use armv7_drain_writebuf() and armv7_context_switch, instead of the arm11 variants. Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Jan 15 22:09:11 2013 (r245477) +++ head/sys/arm/arm/cpufunc.c Tue Jan 15 22:11:28 2013 (r245478) @@ -1146,7 +1146,7 @@ struct cpu_functions cortexa_cpufuncs = /* Other functions */ cpufunc_nullop, /* flush_prefetchbuf */ - arm11_drain_writebuf, /* drain_writebuf */ + armv7_drain_writebuf, /* drain_writebuf */ cpufunc_nullop, /* flush_brnchtgt_C */ (void *)cpufunc_nullop, /* flush_brnchtgt_E */ @@ -1157,7 +1157,7 @@ struct cpu_functions cortexa_cpufuncs = cpufunc_null_fixup, /* dataabt_fixup */ cpufunc_null_fixup, /* prefetchabt_fixup */ - arm11_context_switch, /* context_switch */ + armv7_context_switch, /* context_switch */ cortexa_setup /* cpu setup */ }; From owner-svn-src-all@FreeBSD.ORG Tue Jan 15 23:34:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5F47A4A6; Tue, 15 Jan 2013 23:34:25 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 46C352A5; Tue, 15 Jan 2013 23:34:25 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FNYPWf086432; Tue, 15 Jan 2013 23:34:25 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FNYPtf086431; Tue, 15 Jan 2013 23:34:25 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201301152334.r0FNYPtf086431@svn.freebsd.org> From: Steven Hartland Date: Tue, 15 Jan 2013 23:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245479 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 15 Jan 2013 23:34:25 -0000 Author: smh Date: Tue Jan 15 23:34:24 2013 New Revision: 245479 URL: http://svnweb.freebsd.org/changeset/base/245479 Log: Reports pools which have a removed l2cache disk under -x as this is what happens when a cache device is dropped for any reason. Reviewed by: pjd Approved by: pjd (mentor) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c Tue Jan 15 22:11:28 2013 (r245478) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c Tue Jan 15 23:34:24 2013 (r245479) @@ -150,6 +150,16 @@ find_vdev_problem(nvlist_t *vdev, int (* return (B_TRUE); } + /* + * Check any L2 cache devs + */ + if (nvlist_lookup_nvlist_array(vdev, ZPOOL_CONFIG_L2CACHE, &child, + &children) == 0) { + for (c = 0; c < children; c++) + if (find_vdev_problem(child[c], func)) + return (B_TRUE); + } + return (B_FALSE); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 00:42:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 48240E55; Wed, 16 Jan 2013 00:42:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 390A093E; Wed, 16 Jan 2013 00:42:26 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G0gQOL007439; Wed, 16 Jan 2013 00:42:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G0gQcq007437; Wed, 16 Jan 2013 00:42:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301160042.r0G0gQcq007437@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 00:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245481 - stable/9/crypto/openssl/crypto/bn X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 00:42:26 -0000 Author: delphij Date: Wed Jan 16 00:42:25 2013 New Revision: 245481 URL: http://svnweb.freebsd.org/changeset/base/245481 Log: MFC r244973: Integrate OpenSSL changeset 22950 (appro): bn_word.c: fix overflow bug in BN_add_word. Modified: stable/9/crypto/openssl/crypto/bn/bn_word.c Directory Properties: stable/9/crypto/openssl/ (props changed) Modified: stable/9/crypto/openssl/crypto/bn/bn_word.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_word.c Wed Jan 16 00:17:47 2013 (r245480) +++ stable/9/crypto/openssl/crypto/bn/bn_word.c Wed Jan 16 00:42:25 2013 (r245481) @@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w) a->neg=!(a->neg); return(i); } - /* Only expand (and risk failing) if it's possibly necessary */ - if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) && - (bn_wexpand(a,a->top+1) == NULL)) - return(0); - i=0; - for (;;) + for (i=0;w!=0 && itop;i++) { - if (i >= a->top) - l=w; - else - l=(a->d[i]+w)&BN_MASK2; - a->d[i]=l; - if (w > l) - w=1; - else - break; - i++; + a->d[i] = l = (a->d[i]+w)&BN_MASK2; + w = (w>l)?1:0; } - if (i >= a->top) + if (w && i==a->top) + { + if (bn_wexpand(a,a->top+1) == NULL) return 0; a->top++; + a->d[i]=w; + } bn_check_top(a); return(1); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 00:45:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3414C161; Wed, 16 Jan 2013 00:45:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 23CD596E; Wed, 16 Jan 2013 00:45:06 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G0j6vp007870; Wed, 16 Jan 2013 00:45:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G0j6X4007869; Wed, 16 Jan 2013 00:45:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301160045.r0G0j6X4007869@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 00:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245482 - stable/9/crypto/openssl/crypto X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 00:45:06 -0000 Author: delphij Date: Wed Jan 16 00:45:05 2013 New Revision: 245482 URL: http://svnweb.freebsd.org/changeset/base/245482 Log: MFC r244975: Indicate that we are using OpenSSL with some local modifications. Modified: stable/9/crypto/openssl/crypto/opensslv.h Directory Properties: stable/9/crypto/openssl/ (props changed) Modified: stable/9/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/9/crypto/openssl/crypto/opensslv.h Wed Jan 16 00:42:25 2013 (r245481) +++ stable/9/crypto/openssl/crypto/opensslv.h Wed Jan 16 00:45:05 2013 (r245482) @@ -29,7 +29,7 @@ #ifdef OPENSSL_FIPS #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x-fips 10 May 2012" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x 10 May 2012" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x-freebsd 10 May 2012" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 00:52:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8895649B; Wed, 16 Jan 2013 00:52:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6FE8C9CE; Wed, 16 Jan 2013 00:52:37 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G0qbxc010490; Wed, 16 Jan 2013 00:52:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G0qbSv010489; Wed, 16 Jan 2013 00:52:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301160052.r0G0qbSv010489@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 00:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245483 - stable/8/crypto/openssl/crypto/bn X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 00:52:37 -0000 Author: delphij Date: Wed Jan 16 00:52:36 2013 New Revision: 245483 URL: http://svnweb.freebsd.org/changeset/base/245483 Log: MFC r244974: MFV r244973: Integrate OpenSSL changeset 22950 (appro): bn_word.c: fix overflow bug in BN_add_word. Modified: stable/8/crypto/openssl/crypto/bn/bn_word.c Directory Properties: stable/8/crypto/openssl/ (props changed) Modified: stable/8/crypto/openssl/crypto/bn/bn_word.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_word.c Wed Jan 16 00:45:05 2013 (r245482) +++ stable/8/crypto/openssl/crypto/bn/bn_word.c Wed Jan 16 00:52:36 2013 (r245483) @@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w) a->neg=!(a->neg); return(i); } - /* Only expand (and risk failing) if it's possibly necessary */ - if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) && - (bn_wexpand(a,a->top+1) == NULL)) - return(0); - i=0; - for (;;) + for (i=0;w!=0 && itop;i++) { - if (i >= a->top) - l=w; - else - l=(a->d[i]+w)&BN_MASK2; - a->d[i]=l; - if (w > l) - w=1; - else - break; - i++; + a->d[i] = l = (a->d[i]+w)&BN_MASK2; + w = (w>l)?1:0; } - if (i >= a->top) + if (w && i==a->top) + { + if (bn_wexpand(a,a->top+1) == NULL) return 0; a->top++; + a->d[i]=w; + } bn_check_top(a); return(1); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 00:54:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 24C1E62A; Wed, 16 Jan 2013 00:54:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 16F8B9EC; Wed, 16 Jan 2013 00:54:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G0speT010816; Wed, 16 Jan 2013 00:54:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G0spNc010815; Wed, 16 Jan 2013 00:54:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301160054.r0G0spNc010815@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 00:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245484 - stable/8/crypto/openssl/crypto X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 00:54:52 -0000 Author: delphij Date: Wed Jan 16 00:54:51 2013 New Revision: 245484 URL: http://svnweb.freebsd.org/changeset/base/245484 Log: MFC r244975: Indicate that we are using OpenSSL with some local modifications. Modified: stable/8/crypto/openssl/crypto/opensslv.h Directory Properties: stable/8/crypto/openssl/ (props changed) Modified: stable/8/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/8/crypto/openssl/crypto/opensslv.h Wed Jan 16 00:52:36 2013 (r245483) +++ stable/8/crypto/openssl/crypto/opensslv.h Wed Jan 16 00:54:51 2013 (r245484) @@ -29,7 +29,7 @@ #ifdef OPENSSL_FIPS #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x-fips 10 May 2012" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x 10 May 2012" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x-freebsd 10 May 2012" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 01:22:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 270F4E0F; Wed, 16 Jan 2013 01:22:28 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by mx1.freebsd.org (Postfix) with ESMTP id C2B39B5B; Wed, 16 Jan 2013 01:22:27 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1471665ieb.39 for ; Tue, 15 Jan 2013 17:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZQsGLsbaJMPl0tl+aFHYTmH2oeH8wzeM6XqHYVTAtro=; b=YALYiorRwVnxws/zY9dqCAkOEkmwTQI58fCwy2D9t7Wfs6zjT4606bqNZYIEjbuIzj T09RD33qqOu+PEH/tz9ucqZsH4lyBSBPI2nQK0NJdthYuoa1VLsGjIoyBZcnRiv5ND1T ilfZ7gLbvNFDbtQa+0PkuZ1Ti+WjO5EZDZ7ltZavdjhK6xQAyEnUvqxVvmOBkAEYT+Tg nu1H0Z/hbjTdacKbuDtArVBg+LtM62u5PnH1ijZIPAGxiFDYZw0tWj+fiQ8hjB3dDzcI MoBYEwkpuqFPFIDdywJcqeDUceKsr5x0auDsqm0Kyy00NXlzYVUex+GPoat6BC0j2IOS 2Q6A== MIME-Version: 1.0 Received: by 10.43.114.4 with SMTP id ey4mr94747icc.27.1358299347026; Tue, 15 Jan 2013 17:22:27 -0800 (PST) Received: by 10.64.170.167 with HTTP; Tue, 15 Jan 2013 17:22:26 -0800 (PST) In-Reply-To: <20130115162116.GI20538@FreeBSD.org> References: <201301150826.r0F8QGJr044600@svn.freebsd.org> <20130115162116.GI20538@FreeBSD.org> Date: Wed, 16 Jan 2013 09:22:26 +0800 Message-ID: Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts From: Ganbold Tsagaankhuu To: "Wojciech A. Koszek" Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Ganbold Tsagaankhuu , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 01:22:28 -0000 On Wed, Jan 16, 2013 at 12:21 AM, Wojciech A. Koszek wrote: > On Tue, Jan 15, 2013 at 08:26:16AM +0000, Ganbold Tsagaankhuu wrote: >> Author: ganbold (doc committer) >> Date: Tue Jan 15 08:26:16 2013 >> New Revision: 245450 >> URL: http://svnweb.freebsd.org/changeset/base/245450 >> >> Log: >> Initial support for Allwinner A10 SoC (Cubieboard) >> Add simple console driver >> Add interrupt handling and timer codes >> Add kernel config file >> Add dts file >> Approved by: gonzo > > Ganbold, > > Thanks for this commit. Comments below. > >> >> Added: head/sys/arm/allwinner/a10_machdep.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 08:26:16 2013 (r245450) >> @@ -0,0 +1,122 @@ >> +/*- >> + * Copyright (c) 2012 Ganbold Tsagaankhuu. > > Dot '.' after name isn't necessary. > > I'd really appreciate having PDF filename of the documentation from which > the code was derived in the comments, e.g.: > > "This file is derived from X.PDF, ver1.0, date 2012/Y/Z" > >> + * >> + * from: FreeBSD: //depot/projects/arm/src/sys/arm/ti/ti_machdep.c >> + */ >> + > > [..] > >> +int >> +platform_devmap_init(void) >> +{ >> + int i = 0; >> + >> + fdt_devmap[i].pd_va = 0xE1C00000; >> + fdt_devmap[i].pd_pa = 0x01C00000; >> + fdt_devmap[i].pd_size = 0x00400000; /* 4 MB */ > > Do you think you could comment on what these mean (or pages in the PDF where > can I find them) next to these variables? > >> >> Added: head/sys/arm/allwinner/console.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/arm/allwinner/console.c Tue Jan 15 08:26:16 2013 (r245450) >> @@ -0,0 +1,146 @@ > [..] >> +#ifndef A10_UART_BASE >> +#define A10_UART_BASE 0xe1c28000 /* UART0 */ >> +#endif >> + >> +int reg_shift = 2; > > Could you make it static and move it below defines? > >> +#define UART_DLL 0 /* Out: Divisor Latch Low */ >> +#define UART_DLM 1 /* Out: Divisor Latch High */ >> +#define UART_FCR 2 /* Out: FIFO Control Register */ >> +#define UART_LCR 3 /* Out: Line Control Register */ >> +#define UART_MCR 4 /* Out: Modem Control Register */ >> +#define UART_LSR 5 /* In: Line Status Register */ >> +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ >> +#define UART_LSR_DR 0x01 /* Receiver data ready */ >> +#define UART_MSR 6 /* In: Modem Status Register */ >> +#define UART_SCR 7 /* I/O: Scratch Register */ >> + >> + >> +/* >> + * uart related funcs >> + */ >> +static u_int32_t >> +uart_getreg(u_int32_t *bas) >> +{ >> + return *((volatile u_int32_t *)(bas)) & 0xff; >> +} >> + >> +static void >> +uart_setreg(u_int32_t *bas, u_int32_t val) >> +{ >> + *((volatile u_int32_t *)(bas)) = (u_int32_t)val; >> +} >> + >> +static int >> +ub_getc(void) >> +{ >> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + >> + (UART_LSR << reg_shift))) & UART_LSR_DR) == 0); >> + __asm __volatile("nop"); >> + >> + return (uart_getreg((u_int32_t *)A10_UART_BASE) & 0xff); >> +} >> + >> +static void >> +ub_putc(unsigned char c) >> +{ >> + if (c == '\n') >> + ub_putc('\r'); >> + >> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + >> + (UART_LSR << reg_shift))) & UART_LSR_THRE) == 0) >> + __asm __volatile("nop"); >> + >> + uart_setreg((u_int32_t *)A10_UART_BASE, c); >> +} > > Why aren't bus_* methods used here for accessing memory? This is just initial support of the SoC so eventually I hope it will be improved. sorry for the noise and thanks for the comments, Ganbold > >> +# >> +# >> +options PHYSADDR=0x40000000 >> + >> +makeoptions KERNPHYSADDR=0x40200000 > > Two tabs? > >> +options KERNPHYSADDR=0x40200000 >> +makeoptions KERNVIRTADDR=0xc0200000 >> +options KERNVIRTADDR=0xc0200000 >> + >> +options STARTUP_PAGETABLE_ADDR=0x48000000 >> + >> +files "../allwinner/files.a10" > > > >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > -- > Wojciech A. Koszek > wkoszek@FreeBSD.czest.pl > http://FreeBSD.czest.pl/~wkoszek/ From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 01:30:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B2B27140; Wed, 16 Jan 2013 01:30:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A58D7C1A; Wed, 16 Jan 2013 01:30:47 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G1UlYx022564; Wed, 16 Jan 2013 01:30:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G1UlEp022562; Wed, 16 Jan 2013 01:30:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201301160130.r0G1UlEp022562@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 16 Jan 2013 01:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245485 - head/sys/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 01:30:47 -0000 Author: yongari Date: Wed Jan 16 01:30:46 2013 New Revision: 245485 URL: http://svnweb.freebsd.org/changeset/base/245485 Log: Add D-Link DFE-520TX rev C1. Tested by: Ruslan Makhmatkhanov < cvs-src <> yandex dot ru > MFC After: 1 week Modified: head/sys/pci/if_rl.c head/sys/pci/if_rlreg.h Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Wed Jan 16 00:54:51 2013 (r245484) +++ head/sys/pci/if_rl.c Wed Jan 16 01:30:46 2013 (r245485) @@ -148,6 +148,8 @@ static const struct rl_type rl_devs[] = "Delta Electronics 8139 10/100BaseTX" }, { ADDTRON_VENDORID, ADDTRON_DEVICEID_8139, RL_8139, "Addtron Technology 8139 10/100BaseTX" }, + { DLINK_VENDORID, DLINK_DEVICEID_520TX_REVC1, RL_8139, + "D-Link DFE-520TX (rev. C1) 10/100BaseTX" }, { DLINK_VENDORID, DLINK_DEVICEID_530TXPLUS, RL_8139, "D-Link DFE-530TX+ 10/100BaseTX" }, { DLINK_VENDORID, DLINK_DEVICEID_690TXD, RL_8139, Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Wed Jan 16 00:54:51 2013 (r245484) +++ head/sys/pci/if_rlreg.h Wed Jan 16 01:30:46 2013 (r245485) @@ -1048,6 +1048,11 @@ struct rl_softc { #define DLINK_DEVICEID_530TXPLUS 0x1300 /* + * D-Link DFE-520TX rev. C1 device ID + */ +#define DLINK_DEVICEID_520TX_REVC1 0x4200 + +/* * D-Link DFE-5280T device ID */ #define DLINK_DEVICEID_528T 0x4300 From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 01:51:44 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 25EBB5E0; Wed, 16 Jan 2013 01:51:44 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id E60EFD6E; Wed, 16 Jan 2013 01:51:43 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id r0G1pfPm064517; Tue, 15 Jan 2013 18:51:41 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r0G1pd3D004149; Tue, 15 Jan 2013 18:51:39 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts From: Ian Lepore To: Ganbold Tsagaankhuu In-Reply-To: References: <201301150826.r0F8QGJr044600@svn.freebsd.org> <20130115162116.GI20538@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Tue, 15 Jan 2013 18:51:38 -0700 Message-ID: <1358301098.32417.138.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Ganbold Tsagaankhuu , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "Wojciech A. Koszek" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 01:51:44 -0000 On Wed, 2013-01-16 at 09:22 +0800, Ganbold Tsagaankhuu wrote: > On Wed, Jan 16, 2013 at 12:21 AM, Wojciech A. Koszek > wrote: > > On Tue, Jan 15, 2013 at 08:26:16AM +0000, Ganbold Tsagaankhuu wrote: > >> Author: ganbold (doc committer) > >> Date: Tue Jan 15 08:26:16 2013 > >> New Revision: 245450 > >> URL: http://svnweb.freebsd.org/changeset/base/245450 > >> > >> Log: > >> Initial support for Allwinner A10 SoC (Cubieboard) > >> Add simple console driver > >> Add interrupt handling and timer codes > >> Add kernel config file > >> Add dts file > >> Approved by: gonzo > > > > Ganbold, > > > > Thanks for this commit. Comments below. > > > >> > >> Added: head/sys/arm/allwinner/a10_machdep.c > >> ============================================================================== > >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >> +++ head/sys/arm/allwinner/a10_machdep.c Tue Jan 15 08:26:16 2013 (r245450) > >> @@ -0,0 +1,122 @@ > >> +/*- > >> + * Copyright (c) 2012 Ganbold Tsagaankhuu. > > > > Dot '.' after name isn't necessary. > > > > I'd really appreciate having PDF filename of the documentation from which > > the code was derived in the comments, e.g.: > > > > "This file is derived from X.PDF, ver1.0, date 2012/Y/Z" > > > >> + * > >> + * from: FreeBSD: //depot/projects/arm/src/sys/arm/ti/ti_machdep.c > >> + */ > >> + > > > > [..] > > > >> +int > >> +platform_devmap_init(void) > >> +{ > >> + int i = 0; > >> + > >> + fdt_devmap[i].pd_va = 0xE1C00000; > >> + fdt_devmap[i].pd_pa = 0x01C00000; > >> + fdt_devmap[i].pd_size = 0x00400000; /* 4 MB */ > > > > Do you think you could comment on what these mean (or pages in the PDF where > > can I find them) next to these variables? > > > >> > >> Added: head/sys/arm/allwinner/console.c > >> ============================================================================== > >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >> +++ head/sys/arm/allwinner/console.c Tue Jan 15 08:26:16 2013 (r245450) > >> @@ -0,0 +1,146 @@ > > [..] > >> +#ifndef A10_UART_BASE > >> +#define A10_UART_BASE 0xe1c28000 /* UART0 */ > >> +#endif > >> + > >> +int reg_shift = 2; > > > > Could you make it static and move it below defines? > > > >> +#define UART_DLL 0 /* Out: Divisor Latch Low */ > >> +#define UART_DLM 1 /* Out: Divisor Latch High */ > >> +#define UART_FCR 2 /* Out: FIFO Control Register */ > >> +#define UART_LCR 3 /* Out: Line Control Register */ > >> +#define UART_MCR 4 /* Out: Modem Control Register */ > >> +#define UART_LSR 5 /* In: Line Status Register */ > >> +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ > >> +#define UART_LSR_DR 0x01 /* Receiver data ready */ > >> +#define UART_MSR 6 /* In: Modem Status Register */ > >> +#define UART_SCR 7 /* I/O: Scratch Register */ > >> + > >> + > >> +/* > >> + * uart related funcs > >> + */ > >> +static u_int32_t > >> +uart_getreg(u_int32_t *bas) > >> +{ > >> + return *((volatile u_int32_t *)(bas)) & 0xff; > >> +} > >> + > >> +static void > >> +uart_setreg(u_int32_t *bas, u_int32_t val) > >> +{ > >> + *((volatile u_int32_t *)(bas)) = (u_int32_t)val; > >> +} > >> + > >> +static int > >> +ub_getc(void) > >> +{ > >> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + > >> + (UART_LSR << reg_shift))) & UART_LSR_DR) == 0); > >> + __asm __volatile("nop"); > >> + > >> + return (uart_getreg((u_int32_t *)A10_UART_BASE) & 0xff); > >> +} > >> + > >> +static void > >> +ub_putc(unsigned char c) > >> +{ > >> + if (c == '\n') > >> + ub_putc('\r'); > >> + > >> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + > >> + (UART_LSR << reg_shift))) & UART_LSR_THRE) == 0) > >> + __asm __volatile("nop"); > >> + > >> + uart_setreg((u_int32_t *)A10_UART_BASE, c); > >> +} > > > > Why aren't bus_* methods used here for accessing memory? > > This is just initial support of the SoC so eventually I hope it will > be improved. > > sorry for the noise and thanks for the comments, > > Ganbold > Actually these are console uart routines, which have to work before the bus_space system is available, hence the direct hardware access. -- Ian > > > >> +# > >> +# > >> +options PHYSADDR=0x40000000 > >> + > >> +makeoptions KERNPHYSADDR=0x40200000 > > > > Two tabs? > > > >> +options KERNPHYSADDR=0x40200000 > >> +makeoptions KERNVIRTADDR=0xc0200000 > >> +options KERNVIRTADDR=0xc0200000 > >> + > >> +options STARTUP_PAGETABLE_ADDR=0x48000000 > >> + > >> +files "../allwinner/files.a10" > > > > > > > >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > > > -- > > Wojciech A. Koszek > > wkoszek@FreeBSD.czest.pl > > http://FreeBSD.czest.pl/~wkoszek/ From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 02:22:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AD4B3C6E; Wed, 16 Jan 2013 02:22:56 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5DCE8F; Wed, 16 Jan 2013 02:22:56 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G2MuST038102; Wed, 16 Jan 2013 02:22:56 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G2Mu9p038101; Wed, 16 Jan 2013 02:22:56 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201301160222.r0G2Mu9p038101@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 16 Jan 2013 02:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245487 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 02:22:56 -0000 Author: yongari Date: Wed Jan 16 02:22:56 2013 New Revision: 245487 URL: http://svnweb.freebsd.org/changeset/base/245487 Log: Add D-Link DFE-520TX (rev. C1) to HARDWARE section. MFC After: 1 week Modified: head/share/man/man4/rl.4 Modified: head/share/man/man4/rl.4 ============================================================================== --- head/share/man/man4/rl.4 Wed Jan 16 01:49:07 2013 (r245486) +++ head/share/man/man4/rl.4 Wed Jan 16 02:22:56 2013 (r245487) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 22, 2010 +.Dd January 16, 2013 .Dt RL 4 .Os .Sh NAME @@ -155,6 +155,8 @@ Corega FEther CB-TXD .It Corega FEtherII CB-TXD .It +D-Link DFE-520TX (rev. C1) +.It D-Link DFE-528TX .It D-Link DFE-530TX+ From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 05:00:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 452E9F8E; Wed, 16 Jan 2013 05:00:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8AF7EF; Wed, 16 Jan 2013 05:00:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G50qPn086484; Wed, 16 Jan 2013 05:00:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G50pWE086481; Wed, 16 Jan 2013 05:00:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301160500.r0G50pWE086481@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Jan 2013 05:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245491 - head/usr.sbin/cpucontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 05:00:52 -0000 Author: eadler Date: Wed Jan 16 05:00:51 2013 New Revision: 245491 URL: http://svnweb.freebsd.org/changeset/base/245491 Log: Avoid clobbering errno with a call to fprintf PR: bin/173923 Submitted by: Garrett Cooper Approved by: cperciva MFC After: 3 days Modified: head/usr.sbin/cpucontrol/intel.c head/usr.sbin/cpucontrol/via.c Modified: head/usr.sbin/cpucontrol/intel.c ============================================================================== --- head/usr.sbin/cpucontrol/intel.c Wed Jan 16 04:45:45 2013 (r245490) +++ head/usr.sbin/cpucontrol/intel.c Wed Jan 16 05:00:51 2013 (r245491) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -266,7 +267,9 @@ matched: args.size = data_size; error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { + error = errno; fprintf(stderr, "failed.\n"); + errno = error; WARN(0, "ioctl()"); goto fail; } Modified: head/usr.sbin/cpucontrol/via.c ============================================================================== --- head/usr.sbin/cpucontrol/via.c Wed Jan 16 04:45:45 2013 (r245490) +++ head/usr.sbin/cpucontrol/via.c Wed Jan 16 05:00:51 2013 (r245491) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -203,7 +204,9 @@ via_update(const char *dev, const char * args.size = data_size; error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { + error = errno; fprintf(stderr, "failed.\n"); + errno = error; WARN(0, "ioctl()"); goto fail; } From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 05:03:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 80FFD1B5; Wed, 16 Jan 2013 05:03:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6FB5880A; Wed, 16 Jan 2013 05:03:47 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G53lUI087076; Wed, 16 Jan 2013 05:03:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G53lFL087075; Wed, 16 Jan 2013 05:03:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301160503.r0G53lFL087075@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Jan 2013 05:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245492 - head/sbin/setkey X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 05:03:47 -0000 Author: eadler Date: Wed Jan 16 05:03:46 2013 New Revision: 245492 URL: http://svnweb.freebsd.org/changeset/base/245492 Log: Correct prefix for "locally installed things" Approved by: cperciva MFC After: 3 days Modified: head/sbin/setkey/Makefile Modified: head/sbin/setkey/Makefile ============================================================================== --- head/sbin/setkey/Makefile Wed Jan 16 05:00:51 2013 (r245491) +++ head/sbin/setkey/Makefile Wed Jan 16 05:03:46 2013 (r245492) @@ -61,7 +61,7 @@ CLEANFILES+= scriptdump y.tab.h #SCRIPTS= scriptdump -LOCALPREFIX= /usr +LOCALPREFIX= /usr/local scriptdump: scriptdump.pl sed -e 's#@LOCALPREFIX@#${LOCALPREFIX}#' < $> > scriptdump From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 05:03:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 76E851B6; Wed, 16 Jan 2013 05:03:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9BC80C; Wed, 16 Jan 2013 05:03:50 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G53oFK087118; Wed, 16 Jan 2013 05:03:50 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G53oNB087117; Wed, 16 Jan 2013 05:03:50 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301160503.r0G53oNB087117@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Jan 2013 05:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245493 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 05:03:50 -0000 Author: eadler Date: Wed Jan 16 05:03:49 2013 New Revision: 245493 URL: http://svnweb.freebsd.org/changeset/base/245493 Log: Remove unused variables Approved by: cperciva MFC After: 3 days Modified: head/usr.sbin/pw/pw_log.c Modified: head/usr.sbin/pw/pw_log.c ============================================================================== --- head/usr.sbin/pw/pw_log.c Wed Jan 16 05:03:46 2013 (r245492) +++ head/usr.sbin/pw/pw_log.c Wed Jan 16 05:03:49 2013 (r245493) @@ -47,7 +47,6 @@ pw_log(struct userconf * cnf, int mode, } if (logfile != NULL) { va_list argp; - int l; time_t now = time(NULL); struct tm *t = localtime(&now); char nfmt[256]; @@ -57,7 +56,6 @@ pw_log(struct userconf * cnf, int mode, name = "unknown"; /* ISO 8601 International Standard Date format */ strftime(nfmt, sizeof nfmt, "%Y-%m-%d %T ", t); - l = strlen(nfmt); sprintf(nfmt + strlen(nfmt), "[%s:%s%s] %s\n", name, Which[which], Modes[mode], fmt); va_start(argp, fmt); vfprintf(logfile, nfmt, argp); From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 05:03:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E493C1B7; Wed, 16 Jan 2013 05:03:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D7ECD80D; Wed, 16 Jan 2013 05:03:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G53q5X087156; Wed, 16 Jan 2013 05:03:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G53qie087155; Wed, 16 Jan 2013 05:03:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301160503.r0G53qie087155@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Jan 2013 05:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245494 - head/bin/pwait X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 05:03:53 -0000 Author: eadler Date: Wed Jan 16 05:03:52 2013 New Revision: 245494 URL: http://svnweb.freebsd.org/changeset/base/245494 Log: Free memory before exiting in order to silence a warning from the clang static analyzer Approved by: cperciva MFC after: 3 days Modified: head/bin/pwait/pwait.c Modified: head/bin/pwait/pwait.c ============================================================================== --- head/bin/pwait/pwait.c Wed Jan 16 05:03:49 2013 (r245493) +++ head/bin/pwait/pwait.c Wed Jan 16 05:03:52 2013 (r245494) @@ -141,5 +141,6 @@ main(int argc, char *argv[]) nleft -= n; } + free(e); return 0; } From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 05:32:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4E1C6B18; Wed, 16 Jan 2013 05:32:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3FBE6918; Wed, 16 Jan 2013 05:32:50 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G5WnPs096026; Wed, 16 Jan 2013 05:32:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G5Wn7k096025; Wed, 16 Jan 2013 05:32:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301160532.r0G5Wn7k096025@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 16 Jan 2013 05:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245495 - head/sys/fs/nullfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 05:32:50 -0000 Author: kib Date: Wed Jan 16 05:32:49 2013 New Revision: 245495 URL: http://svnweb.freebsd.org/changeset/base/245495 Log: Remove the filtering of the acceptable mount options for nullfs, added in r245004. Although the report was for noatime option which is non-functional for the nullfs, other standard options like nosuid or noexec are useful with it. Reported by: Dewayne Geraghty MFC after: 3 days Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Wed Jan 16 05:03:52 2013 (r245494) +++ head/sys/fs/nullfs/null_vfsops.c Wed Jan 16 05:32:49 2013 (r245495) @@ -67,15 +67,6 @@ static vfs_vget_t nullfs_vget; static vfs_extattrctl_t nullfs_extattrctl; static vfs_reclaim_lowervp_t nullfs_reclaim_lowervp; -/* Mount options that we support. */ -static const char *nullfs_opts[] = { - "cache", - "export", - "from", - "target", - NULL -}; - /* * Mount null layer */ @@ -97,8 +88,6 @@ nullfs_mount(struct mount *mp) return (EPERM); if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); - if (vfs_filteropt(mp->mnt_optnew, nullfs_opts)) - return (EINVAL); /* * Update is a no-op From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 06:43:19 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D2E35C63; Wed, 16 Jan 2013 06:43:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 71F7ACD7; Wed, 16 Jan 2013 06:43:18 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0G6h98N031494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jan 2013 17:43:10 +1100 Date: Wed, 16 Jan 2013 17:43:09 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Wojciech A. Koszek" Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts In-Reply-To: <20130115162116.GI20538@FreeBSD.org> Message-ID: <20130116170419.G1725@besplex.bde.org> References: <201301150826.r0F8QGJr044600@svn.freebsd.org> <20130115162116.GI20538@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=R7tbgqtX c=1 sm=1 a=T_vc9_tLY8QA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=0w7YBWHZSsMA:10 a=rSZ73qvps9zlUWiUUE0A:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@FreeBSD.org, Ganbold Tsagaankhuu , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 06:43:19 -0000 On Tue, 15 Jan 2013, Wojciech A. Koszek wrote: > On Tue, Jan 15, 2013 at 08:26:16AM +0000, Ganbold Tsagaankhuu wrote: >> ... >> Added: head/sys/arm/allwinner/console.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/arm/allwinner/console.c Tue Jan 15 08:26:16 2013 (r245450) >> @@ -0,0 +1,146 @@ > [..] >> +#ifndef A10_UART_BASE >> +#define A10_UART_BASE 0xe1c28000 /* UART0 */ >> +#endif >> + >> +int reg_shift = 2; > > Could you make it static and move it below defines? > >> +#define UART_DLL 0 /* Out: Divisor Latch Low */ >> +#define UART_DLM 1 /* Out: Divisor Latch High */ >> +#define UART_FCR 2 /* Out: FIFO Control Register */ >> +#define UART_LCR 3 /* Out: Line Control Register */ >> +#define UART_MCR 4 /* Out: Modem Control Register */ >> +#define UART_LSR 5 /* In: Line Status Register */ >> +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ >> +#define UART_LSR_DR 0x01 /* Receiver data ready */ >> +#define UART_MSR 6 /* In: Modem Status Register */ >> +#define UART_SCR 7 /* I/O: Scratch Register */ These are ordinary 16450 values which are defined in . This is misformatted with a space instead of a tab after #define. Since it's a 16450, uart(4) can probably handle the entire console driver, with fewer bugs (some locking is required in a general console driver). Of course, it's easier to write a primitive console driver by hacking on the raw registers than to interface with uart. >> + >> + >> +/* >> + * uart related funcs >> + */ Style bugs (extra and missing blank lines, and comment punctuation). >> +static u_int32_t >> +uart_getreg(u_int32_t *bas) >> +{ >> + return *((volatile u_int32_t *)(bas)) & 0xff; >> +} It's better to put the reg_shift complications at the lowest level. reg_shift could probably be const or #defined so that all the calculations with it can be done at runtime. >> + >> +static void >> +uart_setreg(u_int32_t *bas, u_int32_t val) >> +{ >> + *((volatile u_int32_t *)(bas)) = (u_int32_t)val; >> +} Bogus cast. val already has type u_int32_t. u_int32_t should be spelled uint32_t in new code. >> + >> +static int >> +ub_getc(void) >> +{ >> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + >> + (UART_LSR << reg_shift))) & UART_LSR_DR) == 0); >> + __asm __volatile("nop"); >> + >> + return (uart_getreg((u_int32_t *)A10_UART_BASE) & 0xff); >> +} >> + >> +static void >> +ub_putc(unsigned char c) >> +{ >> + if (c == '\n') >> + ub_putc('\r'); The normal console driver does this in upper layers. Is this driver only for a very specialized console driver for use at boot time? I'm not sure if uart(4) works then. >> + >> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + >> + (UART_LSR << reg_shift))) & UART_LSR_THRE) == 0) >> + __asm __volatile("nop"); >> + >> + uart_setreg((u_int32_t *)A10_UART_BASE, c); >> +} > > Why aren't bus_* methods used here for accessing memory? They don't support reg_shift, but should work otherwise. You do the shifting somewhere and then use bus-space at the level of uart_getreg() above. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 06:49:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AD958E5A; Wed, 16 Jan 2013 06:49:48 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-qa0-f50.google.com (mail-qa0-f50.google.com [209.85.216.50]) by mx1.freebsd.org (Postfix) with ESMTP id 45A93D29; Wed, 16 Jan 2013 06:49:47 +0000 (UTC) Received: by mail-qa0-f50.google.com with SMTP id cr7so909067qab.9 for ; Tue, 15 Jan 2013 22:49:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=kzoNGIDzNKP0BE90ji8Hh9VwV+X0ymv2QSGqJI6WBUw=; b=pC4Ua6IlApoSQ7ShFUGpcFMzOpwp+eEz+8acYwMYvOR22Zt3X9xcuXsQfQ2hmFGQdS +0CwmZJMi2RE8tRcU/TpwSNM+SiSf27XuS09Rsv0E/KItHxVlSeNFcw71FJ00cyt44Vt stNeGl7Zy+iqxgNdO+aAZB8RGyZrlDwUNpethSCOXfvSPg0iUR9lG7eJaOQFBHyIQsTy 5t04kYXOCsg9rxQbUgFjM3Qtkd75FlDEik4qXgoR1uV4IhLlnsfxDoUeHbglTWr9A8Ak Zct33Czb9rEC+ShqauzWkLHruXCA5/CguVGITNSk1jbeHuR3dyYsvoEWUqwfSiVcIDG+ 6Tbg== MIME-Version: 1.0 X-Received: by 10.229.102.79 with SMTP id f15mr25719qco.1.1358318980980; Tue, 15 Jan 2013 22:49:40 -0800 (PST) Received: by 10.49.12.178 with HTTP; Tue, 15 Jan 2013 22:49:40 -0800 (PST) In-Reply-To: <201301160503.r0G53qie087155@svn.freebsd.org> References: <201301160503.r0G53qie087155@svn.freebsd.org> Date: Tue, 15 Jan 2013 22:49:40 -0800 Message-ID: Subject: Re: svn commit: r245494 - head/bin/pwait From: Xin LI To: Eitan Adler Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 06:49:48 -0000 This doesn't seem right -- you should never release memory before exit, especially for memory allocated in main(), unless this "main" is intended for different purpose like a monolithic shell that wants to avoid exec(). Note that pwait(1) have multiple exit points I don't think it's practical. Would you mind if I commit this changeset instead? I have the return -> exit change in my queue long ago but only noticed it today... Index: pwait.c =================================================================== --- pwait.c (revision 245497) +++ pwait.c (working copy) @@ -141,6 +141,5 @@ main(int argc, char *argv[]) nleft -= n; } - free(e); - return 0; + exit(EX_OK); } Cheers, On Tue, Jan 15, 2013 at 9:03 PM, Eitan Adler wrote: > Author: eadler > Date: Wed Jan 16 05:03:52 2013 > New Revision: 245494 > URL: http://svnweb.freebsd.org/changeset/base/245494 > > Log: > Free memory before exiting in order to silence a warning from the clang > static analyzer > > Approved by: cperciva > MFC after: 3 days > > Modified: > head/bin/pwait/pwait.c > > Modified: head/bin/pwait/pwait.c > > ============================================================================== > --- head/bin/pwait/pwait.c Wed Jan 16 05:03:49 2013 (r245493) > +++ head/bin/pwait/pwait.c Wed Jan 16 05:03:52 2013 (r245494) > @@ -141,5 +141,6 @@ main(int argc, char *argv[]) > nleft -= n; > } > > + free(e); > return 0; > } > -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 08:04:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9191F426; Wed, 16 Jan 2013 08:04:56 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80BFB171; Wed, 16 Jan 2013 08:04:56 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0G84uE9041709; Wed, 16 Jan 2013 08:04:56 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0G84u9m041708; Wed, 16 Jan 2013 08:04:56 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201301160804.r0G84u9m041708@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Wed, 16 Jan 2013 08:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245500 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 08:04:56 -0000 Author: ganbold (doc committer) Date: Wed Jan 16 08:04:55 2013 New Revision: 245500 URL: http://svnweb.freebsd.org/changeset/base/245500 Log: Fix style bugs Use defined constant instead of variable for reg_shift Change u_int32_t to uint32_t Approved by: gonzo Suggested by: bde, wkoszek Modified: head/sys/arm/allwinner/console.c Modified: head/sys/arm/allwinner/console.c ============================================================================== --- head/sys/arm/allwinner/console.c Wed Jan 16 07:39:20 2013 (r245499) +++ head/sys/arm/allwinner/console.c Wed Jan 16 08:04:55 2013 (r245500) @@ -40,43 +40,39 @@ __FBSDID("$FreeBSD$"); #define A10_UART_BASE 0xe1c28000 /* UART0 */ #endif -int reg_shift = 2; +#define REG_SHIFT 2 -#define UART_DLL 0 /* Out: Divisor Latch Low */ -#define UART_DLM 1 /* Out: Divisor Latch High */ -#define UART_FCR 2 /* Out: FIFO Control Register */ -#define UART_LCR 3 /* Out: Line Control Register */ -#define UART_MCR 4 /* Out: Modem Control Register */ -#define UART_LSR 5 /* In: Line Status Register */ -#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ -#define UART_LSR_DR 0x01 /* Receiver data ready */ -#define UART_MSR 6 /* In: Modem Status Register */ -#define UART_SCR 7 /* I/O: Scratch Register */ +#define UART_DLL 0 /* Out: Divisor Latch Low */ +#define UART_DLM 1 /* Out: Divisor Latch High */ +#define UART_FCR 2 /* Out: FIFO Control Register */ +#define UART_LCR 3 /* Out: Line Control Register */ +#define UART_MCR 4 /* Out: Modem Control Register */ +#define UART_LSR 5 /* In: Line Status Register */ +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ +#define UART_LSR_DR 0x01 /* Receiver data ready */ +#define UART_MSR 6 /* In: Modem Status Register */ +#define UART_SCR 7 /* I/O: Scratch Register */ - -/* - * uart related funcs - */ -static u_int32_t -uart_getreg(u_int32_t *bas) +static uint32_t +uart_getreg(uint32_t *bas) { - return *((volatile u_int32_t *)(bas)) & 0xff; + return *((volatile uint32_t *)(bas)) & 0xff; } static void -uart_setreg(u_int32_t *bas, u_int32_t val) +uart_setreg(uint32_t *bas, uint32_t val) { - *((volatile u_int32_t *)(bas)) = (u_int32_t)val; + *((volatile uint32_t *)(bas)) = val; } static int ub_getc(void) { - while ((uart_getreg((u_int32_t *)(A10_UART_BASE + - (UART_LSR << reg_shift))) & UART_LSR_DR) == 0); + while ((uart_getreg((uint32_t *)(A10_UART_BASE + + (UART_LSR << REG_SHIFT))) & UART_LSR_DR) == 0); __asm __volatile("nop"); - return (uart_getreg((u_int32_t *)A10_UART_BASE) & 0xff); + return (uart_getreg((uint32_t *)A10_UART_BASE) & 0xff); } static void @@ -85,11 +81,11 @@ ub_putc(unsigned char c) if (c == '\n') ub_putc('\r'); - while ((uart_getreg((u_int32_t *)(A10_UART_BASE + - (UART_LSR << reg_shift))) & UART_LSR_THRE) == 0) + while ((uart_getreg((uint32_t *)(A10_UART_BASE + + (UART_LSR << REG_SHIFT))) & UART_LSR_THRE) == 0) __asm __volatile("nop"); - uart_setreg((u_int32_t *)A10_UART_BASE, c); + uart_setreg((uint32_t *)A10_UART_BASE, c); } static cn_probe_t uart_cnprobe; @@ -121,8 +117,8 @@ uart_cnprobe(struct consdev *cp) static void uart_cninit(struct consdev *cp) { - uart_setreg((u_int32_t *)(A10_UART_BASE + - (UART_FCR << reg_shift)), 0x06); + uart_setreg((uint32_t *)(A10_UART_BASE + + (UART_FCR << REG_SHIFT)), 0x06); } void From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 08:22:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F03E5CDC; Wed, 16 Jan 2013 08:22:07 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8C55525D; Wed, 16 Jan 2013 08:22:07 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id s9so1941148iec.27 for ; Wed, 16 Jan 2013 00:22:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=o6bSh3hbs+tVvlBtmeeMW6KKQjVc/170b7xu670t498=; b=OGkoTlhbOGUTaHxc3ZXyuxaU5gPbu+ohOiVKx8xhGnngN4LQ/GmrGqBYziq8SN5rtG pqNWyRHSJZUgDeKxLyrur/S8wH5O57TlQmAtjKu2JKqupZCaTOhmZVe9qmFrFZhKxFs8 YG5GdzJx2KNLyvI4W9jmXR0WjTupkuZTLgcrzmLlIUKqwzxlvE8hsPYUhjrNLxAGr4yJ pdBJ4V6/SZuDeLEofQzkVAYJwi8UnxiC78q4tav921Fxbon69LD0HW26GgZEC+GvwD0R tmusQcHO7Y6XHpzstP77iExjh4/y5a3RqbJb2o1b8z2vsWip2JtnoM4G9MC3/OdDDok0 kVqg== MIME-Version: 1.0 X-Received: by 10.50.5.133 with SMTP id s5mr212011igs.14.1358324527221; Wed, 16 Jan 2013 00:22:07 -0800 (PST) Received: by 10.64.170.167 with HTTP; Wed, 16 Jan 2013 00:22:07 -0800 (PST) In-Reply-To: <20130116170419.G1725@besplex.bde.org> References: <201301150826.r0F8QGJr044600@svn.freebsd.org> <20130115162116.GI20538@FreeBSD.org> <20130116170419.G1725@besplex.bde.org> Date: Wed, 16 Jan 2013 16:22:07 +0800 Message-ID: Subject: Re: svn commit: r245450 - in head/sys: arm/allwinner arm/conf boot/fdt/dts From: Ganbold Tsagaankhuu To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Ganbold Tsagaankhuu , svn-src-all@freebsd.org, src-committers@freebsd.org, "Wojciech A. Koszek" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 08:22:08 -0000 On Wed, Jan 16, 2013 at 2:43 PM, Bruce Evans wrote: > On Tue, 15 Jan 2013, Wojciech A. Koszek wrote: > >> On Tue, Jan 15, 2013 at 08:26:16AM +0000, Ganbold Tsagaankhuu wrote: >>> >>> ... >>> >>> Added: head/sys/arm/allwinner/console.c >>> >>> ============================================================================== >>> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >>> +++ head/sys/arm/allwinner/console.c Tue Jan 15 08:26:16 2013 >>> (r245450) >>> @@ -0,0 +1,146 @@ >> >> [..] >>> >>> +#ifndef A10_UART_BASE >>> +#define A10_UART_BASE 0xe1c28000 /* UART0 */ >>> +#endif >>> + >>> +int reg_shift = 2; >> >> >> Could you make it static and move it below defines? >> >>> +#define UART_DLL 0 /* Out: Divisor Latch Low */ >>> +#define UART_DLM 1 /* Out: Divisor Latch High */ >>> +#define UART_FCR 2 /* Out: FIFO Control Register */ >>> +#define UART_LCR 3 /* Out: Line Control Register */ >>> +#define UART_MCR 4 /* Out: Modem Control Register */ >>> +#define UART_LSR 5 /* In: Line Status Register */ >>> +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ >>> +#define UART_LSR_DR 0x01 /* Receiver data ready */ >>> +#define UART_MSR 6 /* In: Modem Status Register */ >>> +#define UART_SCR 7 /* I/O: Scratch Register */ > > > These are ordinary 16450 values which are defined in . > > This is misformatted with a space instead of a tab after #define. > > Since it's a 16450, uart(4) can probably handle the entire console driver, > with fewer bugs (some locking is required in a general console driver). > Of course, it's easier to write a primitive console driver by hacking on > the raw registers than to interface with uart. > > >>> + >>> + >>> +/* >>> + * uart related funcs >>> + */ > > > Style bugs (extra and missing blank lines, and comment punctuation). > > >>> +static u_int32_t >>> +uart_getreg(u_int32_t *bas) >>> +{ >>> + return *((volatile u_int32_t *)(bas)) & 0xff; >>> +} > > > It's better to put the reg_shift complications at the lowest level. > > reg_shift could probably be const or #defined so that all the calculations > with it can be done at runtime. > > >>> + >>> +static void >>> +uart_setreg(u_int32_t *bas, u_int32_t val) >>> +{ >>> + *((volatile u_int32_t *)(bas)) = (u_int32_t)val; >>> +} > > > Bogus cast. val already has type u_int32_t. u_int32_t should be spelled > uint32_t in new code. > > >>> + >>> +static int >>> +ub_getc(void) >>> +{ >>> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + >>> + (UART_LSR << reg_shift))) & UART_LSR_DR) == 0); >>> + __asm __volatile("nop"); >>> + >>> + return (uart_getreg((u_int32_t *)A10_UART_BASE) & 0xff); >>> +} >>> + >>> +static void >>> +ub_putc(unsigned char c) >>> +{ >>> + if (c == '\n') >>> + ub_putc('\r'); > > > The normal console driver does this in upper layers. Is this driver > only for a very specialized console driver for use at boot time? > I'm not sure if uart(4) works then. Current ns16550 driver doesn't work yet at boot time for A10. Ganbold > > >>> + >>> + while ((uart_getreg((u_int32_t *)(A10_UART_BASE + >>> + (UART_LSR << reg_shift))) & UART_LSR_THRE) == 0) >>> + __asm __volatile("nop"); >>> + >>> + uart_setreg((u_int32_t *)A10_UART_BASE, c); >>> +} >> >> >> Why aren't bus_* methods used here for accessing memory? > > > They don't support reg_shift, but should work otherwise. You do the > shifting somewhere and then use bus-space at the level of uart_getreg() > above. > > Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 17:48:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1FFD1BC4 for ; Wed, 16 Jan 2013 17:48:24 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mx1.freebsd.org (Postfix) with ESMTP id 9E549DD4 for ; Wed, 16 Jan 2013 17:48:23 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id fj20so1691280lab.24 for ; Wed, 16 Jan 2013 09:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=kjEH5x/zIp3U6wOR+d2W8zqX44EDt75L0hz8m9fUcKk=; b=DJAYmILR6wbgQvpH9I/5edSAER/mttcyhGn2TJVA0Yz7dirBlh4xG4yJT+7fBiPHRV WAnGzzN3150aS90VCZwUGcSUyvDrY9QuC5kKA1oLwHAj7peyAzQN47UEAFU64Fv6xVY4 wTtt8rZTgGnJjzLxZp+ylZuJdHLVmuW1sio7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=kjEH5x/zIp3U6wOR+d2W8zqX44EDt75L0hz8m9fUcKk=; b=Rtn8uygK3fK4J6CBgPzp1BPeMqesxgHdiV+2uam6Z4Xup7qiedsBq1u1Gn3SO94opX YMIQbImR+8DfqHcCE1XGVxWJM18wXVEudaGrF/9ZmTWxGccdUp1TdFMejmE9arUhtiL9 kFRjAWDYXG728PvxLpFm1c17xLsWttQRS9CDD2MB3dtDXwvxQ3DY5yU1YSKHM9xeb77i khiPftwEA7c9UfP8qCY9KuFnGgi/R3bDAFm5r9/UvqIaeHTIXrbZiskjLISBMka/rKcC 8y+poZI2I24jdeuYSOFGh3PrI8oH4T8L8LPCYXHWCR5LenGP+cgppkl8binEKEplStz7 xvyw== X-Received: by 10.112.23.34 with SMTP id j2mr983712lbf.118.1358358502201; Wed, 16 Jan 2013 09:48:22 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Wed, 16 Jan 2013 09:47:52 -0800 (PST) In-Reply-To: References: <201301160503.r0G53qie087155@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Jan 2013 12:47:52 -0500 X-Google-Sender-Auth: nZcsX6vBtiXI6dGkt3yM4KjVrpk Message-ID: Subject: Re: svn commit: r245494 - head/bin/pwait To: Xin LI Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlHA5jl8E0arEEjqEULq0catJXnZRt6fzDjTgkp/M5FdETqTxaL3r59VLeEEHCbk7sASFP1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 17:48:24 -0000 On 16 January 2013 01:49, Xin LI wrote: > This doesn't seem right -- you should never release memory before exit, > especially for memory allocated in main(), unless this "main" is intended > for different purpose like a monolithic shell that wants to avoid exec(). > Note that pwait(1) have multiple exit points I don't think it's practical. ... There have been multiple conversations about this: on hackers, on the commit lists, and on the clang analyzer lists. I don't care much how the final code looks: with either free or return but please make sure that scan-build finds no warnings. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 18:11:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A3124734; Wed, 16 Jan 2013 18:11:54 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) by mx1.freebsd.org (Postfix) with ESMTP id 37710F68; Wed, 16 Jan 2013 18:11:54 +0000 (UTC) Received: from epsilon.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 40B0612987; Wed, 16 Jan 2013 10:11:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1358359913; bh=sv6PTpPTMAoIoIqmImR+T76eGxU/hiAGaY/8mf8COhc=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=cJRIAqEzfhuXB4OOQog/aH7rfQ1L+SPQhMqCMaoMA1US8bdZkyAKl0MJNCTwNx0mP od2IRPKN5c3Jox1ty1iu6ib4H1VCBWvhrNyg4hWPKHDbCv19ZySKLtfZX6GTJvyP+I vTBmXD/rPwaaBwAUpcqJYCCZ6OOaKWOOSDdqCVBQ= Message-ID: <50F6ED68.50602@delphij.net> Date: Wed, 16 Jan 2013 10:11:52 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r245494 - head/bin/pwait References: <201301160503.r0G53qie087155@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages 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, 16 Jan 2013 18:11:54 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/16/13 09:47, Eitan Adler wrote: > On 16 January 2013 01:49, Xin LI wrote: >> This doesn't seem right -- you should never release memory before >> exit, especially for memory allocated in main(), unless this >> "main" is intended for different purpose like a monolithic shell >> that wants to avoid exec(). Note that pwait(1) have multiple exit >> points I don't think it's practical. > > ... > > There have been multiple conversations about this: on hackers, on > the commit lists, and on the clang analyzer lists. > > I don't care much how the final code looks: with either free or > return but please make sure that scan-build finds no warnings. Yes I did. Using exit(3) tells clang that this is the final exit and thus eliminates the warning. It sounds like a bug (or arguably a feature) that clang does not recognize return in main()s... Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJQ9u1oAAoJEG80Jeu8UPuzNF8IAIuLlVRawKYSgvW0Qqf01Pt3 l6UvBc/6U0LBVTgRUVNVDqlvjyP93pcnMpDGiGqGf/1TbizWhahIayB7NxPQoiqE 8iFRYxhMXJL+pMgckgB3twGOrXkSCCaWhudmNlx9pPXac2dqCFF4PXugVAV1xVVx JfdkCHhSMH+MVhzxkPN4XtZTvH288UiaeWRsCLEzVwylYOvMqslW0WhJYRCpn6ee XXeBBN8D/aYOPehHZ7/UhzatxIUOQMaW509rituOZ6IKF5PAHhPQsXwIRiG85mIb tbppR2Pwm0wg/mOFcr44P/zhdeiR4+JW1Tk65mmleoLsq8aufzT/OjJnVcD6860= =nsUL -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 18:15:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B6E10A34; Wed, 16 Jan 2013 18:15:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A983EFB9; Wed, 16 Jan 2013 18:15:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GIFQDb007554; Wed, 16 Jan 2013 18:15:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GIFQPk007553; Wed, 16 Jan 2013 18:15:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301161815.r0GIFQPk007553@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 18:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245506 - head/bin/pwait X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 18:15:26 -0000 Author: delphij Date: Wed Jan 16 18:15:25 2013 New Revision: 245506 URL: http://svnweb.freebsd.org/changeset/base/245506 Log: Use a different way to silence clang analyzer as done in r245494 by explicitly telling the compiler that we are on the exit route. X-MFC: together with r245494 Modified: head/bin/pwait/pwait.c Modified: head/bin/pwait/pwait.c ============================================================================== --- head/bin/pwait/pwait.c Wed Jan 16 09:07:49 2013 (r245505) +++ head/bin/pwait/pwait.c Wed Jan 16 18:15:25 2013 (r245506) @@ -141,6 +141,5 @@ main(int argc, char *argv[]) nleft -= n; } - free(e); - return 0; + exit(EX_OK); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 18:17:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9A495D8C; Wed, 16 Jan 2013 18:17:37 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-da0-f46.google.com (mail-da0-f46.google.com [209.85.210.46]) by mx1.freebsd.org (Postfix) with ESMTP id 5695AFE2; Wed, 16 Jan 2013 18:17:37 +0000 (UTC) Received: by mail-da0-f46.google.com with SMTP id p5so679556dak.19 for ; Wed, 16 Jan 2013 10:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=lvTz44N7Xi/SHCNNs51EzDyIiLnjQ6mSw+IgBVkpIII=; b=W7ZQWlrIzr9ofgE5jmZv4RwrsbbmA71bcEjet3ZZpFMoBXJbOsbHY7KWE2/SU3LmKE RGVsUPN3ycUSWVXMvSp8TLmcWr0ukQfcWDhyGPX63g5KcAEFTB0zJonkTrWCm+tsNdZW WxWbLvx0oi7H8FSf7rjaGj9Cw9OWuQKXVNpopyYWK/YrIe8tTE7AWtgkWg4pwZSN0Sgy RxhRdij2iFAPXMTk/4vL3ElU1Svs95brJEzwAXxsJeoJLsenHYjBY6lHEWb7gKJ4KkSU c0rFjQlO/l4RGCRjFC9m/X63a0XnXsG9qeqAk6sAn3glBW5zkG0rltEN9ludDekpPsB+ 2qQQ== X-Received: by 10.66.88.198 with SMTP id bi6mr5832831pab.54.1358360251540; Wed, 16 Jan 2013 10:17:31 -0800 (PST) Received: from [10.0.14.181] (mobile-166-137-216-036.mycingular.net. [166.137.216.36]) by mx.google.com with ESMTPS id qo10sm11985075pbc.58.2013.01.16.10.17.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jan 2013 10:17:30 -0800 (PST) References: <201301160503.r0G53qie087155@svn.freebsd.org> <50F6ED68.50602@delphij.net> Mime-Version: 1.0 (1.0) In-Reply-To: <50F6ED68.50602@delphij.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <0928E58E-F510-47CD-957F-8C321B1210CC@gmail.com> X-Mailer: iPhone Mail (10A523) From: Garrett Cooper Subject: Re: svn commit: r245494 - head/bin/pwait Date: Wed, 16 Jan 2013 10:17:20 -0800 To: "d@delphij.net" Cc: "svn-src-head@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 18:17:37 -0000 On Jan 16, 2013, at 10:11 AM, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 >=20 > On 01/16/13 09:47, Eitan Adler wrote: >> On 16 January 2013 01:49, Xin LI wrote: >>> This doesn't seem right -- you should never release memory before >>> exit, especially for memory allocated in main(), unless this >>> "main" is intended for different purpose like a monolithic shell >>> that wants to avoid exec(). Note that pwait(1) have multiple exit >>> points I don't think it's practical. >>=20 >> ... >>=20 >> There have been multiple conversations about this: on hackers, on >> the commit lists, and on the clang analyzer lists. >>=20 >> I don't care much how the final code looks: with either free or >> return but please make sure that scan-build finds no warnings. >=20 > Yes I did. Using exit(3) tells clang that this is the final exit and > thus eliminates the warning. >=20 > It sounds like a bug (or arguably a feature) that clang does not > recognize return in main()s... I would consider it a bug, but it's better to use exit(3) anyhow as it p= revents bugs from occurring in other OSes (like windows when you use atexit a= nd posix-compliant signal handlers). Thanks, -Garrett= From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 18:41:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F38BF6C7; Wed, 16 Jan 2013 18:41:21 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id C74EF1E9; Wed, 16 Jan 2013 18:41:21 +0000 (UTC) Received: from epsilon.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 6230D12B12; Wed, 16 Jan 2013 10:41:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1358361681; bh=X5PTNL2A2h+rC9GwDeI3GgcqIIQSEae7sFDKqakWCCA=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=vWA1oG4ghvX6EqylpdOxQ7SwuYne+ci12TC2JoKHnp8+QigjW7dbkpN4MjQltP/di SZNpiOjPNFHShg0NgcMyIr9XC9qJ/PjFvAXtyall3z5528ScGpMXafH8TIszrM2W4T tZkq2zFVCzId6shpbq8RI7TcwFaCQAnIs41H3Pxc= Message-ID: <50F6F450.50102@delphij.net> Date: Wed, 16 Jan 2013 10:41:20 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Garrett Cooper Subject: Re: svn commit: r245494 - head/bin/pwait References: <201301160503.r0G53qie087155@svn.freebsd.org> <50F6ED68.50602@delphij.net> <0928E58E-F510-47CD-957F-8C321B1210CC@gmail.com> In-Reply-To: <0928E58E-F510-47CD-957F-8C321B1210CC@gmail.com> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "src-committers@freebsd.org" , Eitan Adler , Xin LI , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "d@delphij.net" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages 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, 16 Jan 2013 18:41:22 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/16/13 10:17, Garrett Cooper wrote: > On Jan 16, 2013, at 10:11 AM, Xin Li wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 >> >> On 01/16/13 09:47, Eitan Adler wrote: >>> On 16 January 2013 01:49, Xin LI wrote: >>>> This doesn't seem right -- you should never release memory >>>> before exit, especially for memory allocated in main(), >>>> unless this "main" is intended for different purpose like a >>>> monolithic shell that wants to avoid exec(). Note that >>>> pwait(1) have multiple exit points I don't think it's >>>> practical. >>> >>> ... >>> >>> There have been multiple conversations about this: on hackers, >>> on the commit lists, and on the clang analyzer lists. >>> >>> I don't care much how the final code looks: with either free >>> or return but please make sure that scan-build finds no >>> warnings. >> >> Yes I did. Using exit(3) tells clang that this is the final exit >> and thus eliminates the warning. >> >> It sounds like a bug (or arguably a feature) that clang does not >> recognize return in main()s... > > I would consider it a bug, but it's better to use exit(3) anyhow as > it prevents bugs from occurring in other OSes (like windows when > you use atexit and posix-compliant signal handlers). Well, calling exit(3) actually do less on C++ (dtor's are not called in this case, if any local object is declared on stack, which is done when the code say 'return') but the difference is less on C. In style(9) there is no explicit mention of using exit(3) but the example do use exit() instead of return() for main(). By the way speaking for exit(3) preventing bugs on other OSes, do you have reference to these issue? It sounds weird as I would see these as serious leakage which are normally fixed very quickly and we shouldn't be the first people who seeing them... Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJQ9vRQAAoJEG80Jeu8UPuz5KEH/RP2XYZvg2kB7vraWe08uIcs gcwYH4GVbxKbLWWjdSpBHLXVoPqOy7/n3UcKKt27vPzxo+VAiWZJUXPk9PZo0ePb WYqLEzjtfsYWbbIzdHzaB0pUQZ/QuzyFWICj7mkgJQwdTcejlsLAjZ4kqxfuj0wB kPPZ0zKPDT2CR7v/DgHkMMHshuuEw7xm1gij4y6ggVP/Hi4laJVmhJq1+h99Jrtu CrzUDRerXGwPg0qWP9xDylrHGOwAERgUWNgO6gJ1BP+LkAnltCcojFQZd3gs2epb HSS3ejrrR2IRM5jmBFW1L+SyKZHhDOvFtNHAoeAnAOp6Ay4R9U3hy+sVRtO6Oe8= =6JOJ -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 18:43:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6F8BC8F6; Wed, 16 Jan 2013 18:43:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4BA81213; Wed, 16 Jan 2013 18:43:04 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 97F39B91A; Wed, 16 Jan 2013 13:43:03 -0500 (EST) From: John Baldwin To: Xin LI Subject: Re: svn commit: r245494 - head/bin/pwait Date: Wed, 16 Jan 2013 11:11:49 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301160503.r0G53qie087155@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201301161111.49580.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 16 Jan 2013 13:43:03 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 18:43:04 -0000 On Wednesday, January 16, 2013 1:49:40 am Xin LI wrote: > This doesn't seem right -- you should never release memory before exit, > especially for memory allocated in main(), unless this "main" is intended > for different purpose like a monolithic shell that wants to avoid exec(). > Note that pwait(1) have multiple exit points I don't think it's practical. > > Would you mind if I commit this changeset instead? I have the return -> > exit change in my queue long ago but only noticed it today... I think the free shouldn't be there as well, but I think requiring an exit() instead of return to "fix" it is bogus as well. The static analyzer is just broken in this case. main() is special and returns from it should be treated like exit() and not cause false warnings about memory leaks. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 19:05:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4E650730; Wed, 16 Jan 2013 19:05:50 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 40F1C379; Wed, 16 Jan 2013 19:05:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GJ5oAu022705; Wed, 16 Jan 2013 19:05:50 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GJ5oAW022704; Wed, 16 Jan 2013 19:05:50 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201301161905.r0GJ5oAW022704@svn.freebsd.org> From: Carl Delsey Date: Wed, 16 Jan 2013 19:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245507 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 19:05:50 -0000 Author: carl Date: Wed Jan 16 19:05:49 2013 New Revision: 245507 URL: http://svnweb.freebsd.org/changeset/base/245507 Log: Add myself and my mentor relationship. Approved by: jimharris (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Jan 16 18:15:25 2013 (r245506) +++ head/share/misc/committers-src.dot Wed Jan 16 19:05:49 2013 (r245507) @@ -117,6 +117,7 @@ bruno [label="Bruno Ducrot\nbruno@FreeBS bryanv [label="Bryan Venteicher\nbryanv@FreeBSD.org\n2012/11/03"] bschmidt [label="Bernhard Schmidt\nbschmidt@FreeBSD.org\n2010/02/06"] bz [label="Bjoern A. Zeeb\nbz@FreeBSD.org\n2004/07/27"] +carl [label="Carl Delsey\ncarl@FreeBSD.org\n2013/01/14"] cognet [label="Olivier Houchard\ncognet@FreeBSD.org\n2002/10/09"] cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] cperciva [label="Colin Percival\ncperciva@FreeBSD.org\n2004/01/20"] @@ -454,6 +455,8 @@ jhb -> peterj jhb -> pfg jhb -> rnoland +jimharris -> carl + jkh -> grog jkh -> imp jkh -> jlemon From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 19:15:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C31A5BD2 for ; Wed, 16 Jan 2013 19:15:33 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 48730676 for ; Wed, 16 Jan 2013 19:15:33 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id gw10so1007268lab.27 for ; Wed, 16 Jan 2013 11:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=SzDi2cl3GSxaB2SDUbkXmasQM8r/YXhd5Ok3qjhHOCM=; b=GeG731Hn2tMnSg8OFV7PRPppezJThHaui6ObEOUGbEAlHhXbHCIuKheyJ//bTrMTF4 A/cSfexe+dojx29kQAnbl3wozOdYSebcG3arWXslcj0e9j3Qfhfspuaz8ZCJYB2QybmN g7Vq2sN2TOIMCzdQ6fiAvlAjPBweXAuIizv1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=SzDi2cl3GSxaB2SDUbkXmasQM8r/YXhd5Ok3qjhHOCM=; b=Cw+Lz91HdxFfz2wyDBhlx7wnsOLX2RyUSoM5e6yKizBWnpFf0xtHGGsvILptfHxv/N 8fG9/Ll7ys62Xxk30H6DxmFR+u95m1YzT3LgsI6VLF8BNDmPuoJkq6KLKkGvhOGUlqpX j48sYiZWL74lKtbtD3r6DOYdKyGo61wnMB7eneymvkj+4vshrQlk8eCLo8DO595XmA33 pKkmz+ZOwEqXFuWpiOIvj4VMdDelTUV+BKpM8K5TYcU6lA/bmsh65FQ858W+tnH9LqLx jlBZcw2WI/Zp3WkZF1H/xFLZu5agHvhe5J7Mi0s/OSgHluL+zEm/+gw0MD5T/3ihE5DD yUbA== X-Received: by 10.112.38.66 with SMTP id e2mr1066797lbk.90.1358363731968; Wed, 16 Jan 2013 11:15:31 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Wed, 16 Jan 2013 11:15:00 -0800 (PST) In-Reply-To: <50F6ED68.50602@delphij.net> References: <201301160503.r0G53qie087155@svn.freebsd.org> <50F6ED68.50602@delphij.net> From: Eitan Adler Date: Wed, 16 Jan 2013 14:15:00 -0500 X-Google-Sender-Auth: kvSEce2MwmLaj-gh-x2-M5opgko Message-ID: Subject: Re: svn commit: r245494 - head/bin/pwait To: d@delphij.net Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmDBI3ChYiSpRVtY3wL11OvqaBV5wH5sWNH6chBMDbeP1iGXNsHmQTwj6ACxsPZgE9cwsew Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 19:15:33 -0000 On 16 January 2013 13:11, Xin Li wrote: > Yes I did. Using exit(3) tells clang that this is the final exit and > thus eliminates the warning. > > It sounds like a bug (or arguably a feature) that clang does not > recognize return in main()s... It is not a bug: see http://clang-developers.42468.n3.nabble.com/Static-analyzer-possible-memory-leak-false-positive-td4026706.html -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 19:16:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B52B4E29; Wed, 16 Jan 2013 19:16:29 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f43.google.com (mail-oa0-f43.google.com [209.85.219.43]) by mx1.freebsd.org (Postfix) with ESMTP id 482C4696; Wed, 16 Jan 2013 19:16:29 +0000 (UTC) Received: by mail-oa0-f43.google.com with SMTP id k1so1794625oag.16 for ; Wed, 16 Jan 2013 11:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=PfE5plrmjIScF6K2NEHNjfra4MtNR+xedh3tJbL4oHg=; b=ovdVXxtJ/Ps+eRutqGZtwcEXgm24BhQFs3pzrM/QfbUYDf65Or8wGKAF1O5ujkycp6 NlypO5lZySX4YmS3hiyWRHcfyNfRLgbfr0S/ncluR/jPVEZEzheK0yY8ng/YuikN+XOO JS5V++dYdG8PHCoY05cTKkUGI9vNx1t5vBEaXGYkEzxW9xkGcjiE99IyCg4DTz4NgSlC FtngHxb9O0yfS8hvZlESTCEFxg9QonJEwZZsIeDSp2p1GCFoVGVrSe/5dSRHfmZzhXBO aL0VmmVL1NolnaRTHihuWOmdeqRxQLq0z9cJGkMwtd1AhflSnOrc3X3y9okF46aGva5/ ti5Q== MIME-Version: 1.0 X-Received: by 10.60.0.165 with SMTP id 5mr1766712oef.128.1358363783274; Wed, 16 Jan 2013 11:16:23 -0800 (PST) Received: by 10.76.107.241 with HTTP; Wed, 16 Jan 2013 11:16:23 -0800 (PST) In-Reply-To: <50F6F450.50102@delphij.net> References: <201301160503.r0G53qie087155@svn.freebsd.org> <50F6ED68.50602@delphij.net> <0928E58E-F510-47CD-957F-8C321B1210CC@gmail.com> <50F6F450.50102@delphij.net> Date: Wed, 16 Jan 2013 11:16:23 -0800 Message-ID: Subject: Re: svn commit: r245494 - head/bin/pwait From: Garrett Cooper To: d@delphij.net Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 19:16:29 -0000 On Wed, Jan 16, 2013 at 10:41 AM, Xin Li wrote: ... > Well, calling exit(3) actually do less on C++ (dtor's are not called > in this case, if any local object is declared on stack, which is done > when the code say 'return') but the difference is less on C. Good to know -- thanks! > In style(9) there is no explicit mention of using exit(3) but the > example do use exit() instead of return() for main(). There's a fair amount of subtlety in style(9) ;)... > By the way speaking for exit(3) preventing bugs on other OSes, do you > have reference to these issue? It sounds weird as I would see these > as serious leakage which are normally fixed very quickly and we > shouldn't be the first people who seeing them... It wasn't really leakage, and it was only Windows (AFAICT) which is its own special case. MSVC++ has copious warnings about using POSIX APIs anyhow, so I figure it's a bad idea to depend on POSIX on Windows :(... There's a program that we have at $work that does dd equivalent logic for writing/verifying files and what was happening is that whenever the atexit handler was entered (basically whenever the terminating condition was met) it would segfault on Windows. It might have been a bug in terms of it entering the atexit(3) handler recursively (which didn't occur on other OSes, e.g. FreeBSD, Linux, and OSX), but I didn't take the time to track down the exact culprit (my goal was to only stop the bleeding ;)..). Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 21:36:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2B9DE347; Wed, 16 Jan 2013 21:36:32 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id E019BF86; Wed, 16 Jan 2013 21:36:31 +0000 (UTC) Received: from epsilon.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 612461E4EA; Wed, 16 Jan 2013 13:36:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1358372191; bh=FxUsqW0y+o66sNfGQKxJ4gPwcBLNKnNnV7iGV3CLLV8=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=3FpuSYpWS1I8Ti4/c2iDG5MQ1OKA61Vnc+BUTZyT2+yg4aK2qodl0dQHQ2rAt6WC1 QBPiUWM/Wl31d3yTSbUEzZr0QsdOB2v51YdcWeMlsmhl9vQzhWgt1J0rsJGIgr901z cCxr1UfA7V+1FjoMK7qMFDzvG2JPxcdwXIeAUA8E= Message-ID: <50F71D5E.60604@delphij.net> Date: Wed, 16 Jan 2013 13:36:30 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r245494 - head/bin/pwait References: <201301160503.r0G53qie087155@svn.freebsd.org> <201301161111.49580.jhb@freebsd.org> In-Reply-To: <201301161111.49580.jhb@freebsd.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Eitan Adler , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages 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, 16 Jan 2013 21:36:32 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/16/13 08:11, John Baldwin wrote: > On Wednesday, January 16, 2013 1:49:40 am Xin LI wrote: >> This doesn't seem right -- you should never release memory before >> exit, especially for memory allocated in main(), unless this >> "main" is intended for different purpose like a monolithic shell >> that wants to avoid exec(). Note that pwait(1) have multiple exit >> points I don't think it's practical. >> >> Would you mind if I commit this changeset instead? I have the >> return -> exit change in my queue long ago but only noticed it >> today... > > I think the free shouldn't be there as well, but I think requiring > an exit() instead of return to "fix" it is bogus as well. The > static analyzer is just broken in this case. main() is special and > returns from it should be treated like exit() and not cause false > warnings about memory leaks. Well, being a horrible idea itself to redefine main() to something else and expect the module to do no harm to its caller, I think Eitan still have a valid point that it could be a bad idea to ban this in wholesale within compiler, as the C standard don't ban using return's in main(). In style(9) the examples do use exit() for main() by the way. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJQ9x1eAAoJEG80Jeu8UPuzIGsH/ia5cFVA2Uo6w1tEvbbAVMUi +A580EYdQNdCFYVVGCIr6ZoCuZYsYqJdU0wT+xKjpE5qwaCfWVkESWbUGFVKUmFt F1bFZfVu1TgntopYFj5goRyUVvsEutUgh/D8khZSKn9Mnu6ijbeq2CKJi0SyhySw FcmGzp2YNk1B5BW8N8c4oRpLGvwtXPO4QBf5VAEoPU4ItY8bTukH2u09jOKaoh+7 J5eMU8KqWmxcuj6v5/8mb5iUN0oMprbdhVrpb0UpvIfM+TMQ3ISEbyJ5KeHW6dkV 5FLiu3arMe1p3k2yLrGYLB19lZfwtz3gM8QyorqAGK64uNY5oqwsA3UlIo01w48= =V4kG -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 21:52:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8946F642; Wed, 16 Jan 2013 21:52:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 704FC9E; Wed, 16 Jan 2013 21:52:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GLqW5x073909; Wed, 16 Jan 2013 21:52:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GLqVQM073905; Wed, 16 Jan 2013 21:52:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301162152.r0GLqVQM073905@svn.freebsd.org> From: John Baldwin Date: Wed, 16 Jan 2013 21:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245508 - in head/sys: fs/nfs fs/nfsclient nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 21:52:32 -0000 Author: jhb Date: Wed Jan 16 21:52:31 2013 New Revision: 245508 URL: http://svnweb.freebsd.org/changeset/base/245508 Log: Use the VA_UTIMES_NULL flag to detect when NULL was passed to utimes() instead of comparing the desired time against the current time as a heuristic. Reviewed by: rmacklem MFC after: 1 week Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfsclient/nfs_clport.c head/sys/nfsclient/nfs_subs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Wed Jan 16 19:05:49 2013 (r245507) +++ head/sys/fs/nfs/nfs_commonsubs.c Wed Jan 16 21:52:31 2013 (r245508) @@ -1998,7 +1998,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd struct statfs fs; struct nfsfsinfo fsinf; struct timespec temptime; - struct timeval curtime; NFSACL_T *aclp, *naclp = NULL; #ifdef QUOTA struct dqblk dqb; @@ -2412,8 +2411,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd retnum += NFSX_V4TIME; break; case NFSATTRBIT_TIMEACCESSSET: - NFSGETTIME(&curtime); - if (vap->va_atime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_V4SETTIME); *tl++ = txdr_unsigned(NFSV4SATTRTIME_TOCLIENT); txdr_nfsv4time(&vap->va_atime, tl); @@ -2442,8 +2440,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd retnum += NFSX_V4TIME; break; case NFSATTRBIT_TIMEMODIFYSET: - NFSGETTIME(&curtime); - if (vap->va_mtime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_V4SETTIME); *tl++ = txdr_unsigned(NFSV4SATTRTIME_TOCLIENT); txdr_nfsv4time(&vap->va_mtime, tl); Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Wed Jan 16 19:05:49 2013 (r245507) +++ head/sys/fs/nfsclient/nfs_clport.c Wed Jan 16 21:52:31 2013 (r245508) @@ -789,7 +789,7 @@ nfscl_fillsattr(struct nfsrv_descript *n *tl = newnfs_false; } if (vap->va_atime.tv_sec != VNOVAL) { - if (vap->va_atime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&vap->va_atime, tl); @@ -802,7 +802,7 @@ nfscl_fillsattr(struct nfsrv_descript *n *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE); } if (vap->va_mtime.tv_sec != VNOVAL) { - if (vap->va_mtime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&vap->va_mtime, tl); Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Wed Jan 16 19:05:49 2013 (r245507) +++ head/sys/nfsclient/nfs_subs.c Wed Jan 16 21:52:31 2013 (r245508) @@ -1110,7 +1110,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, in *tl = nfs_false; } if (va->va_atime.tv_sec != VNOVAL) { - if (va->va_atime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_atime, tl); @@ -1123,7 +1123,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, in *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE); } if (va->va_mtime.tv_sec != VNOVAL) { - if (va->va_mtime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_mtime, tl); From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 22:44:26 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C7D6A217; Wed, 16 Jan 2013 22:44:26 +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 704D52C9; Wed, 16 Jan 2013 22:44:26 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:84a:f2c4:59a0:2557] (unknown [IPv6:2001:7b8:3a7:0:84a:f2c4:59a0:2557]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id F0C945C37; Wed, 16 Jan 2013 23:44:24 +0100 (CET) Message-ID: <50F72D46.2090707@FreeBSD.org> Date: Wed, 16 Jan 2013 23:44:22 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20121128 Thunderbird/18.0 MIME-Version: 1.0 To: Brooks Davis Subject: Re: svn commit: r244401 - in head: contrib/libc-vis include lib/libc/gen References: <201212181637.qBIGbP7e084145@svn.freebsd.org> <50D65630.8010901@FreeBSD.org> <20130110234108.GB79810@lor.one-eyed-alien.net> In-Reply-To: <20130110234108.GB79810@lor.one-eyed-alien.net> 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 22:44:26 -0000 On 2013-01-11 00:41, Brooks Davis wrote: > On Sun, Dec 23, 2012 at 01:54:08AM +0100, Dimitry Andric wrote: >> On 2012-12-18 17:37, Brooks Davis wrote: >>> Author: brooks >>> Date: Tue Dec 18 16:37:24 2012 >>> New Revision: 244401 >>> URL: http://svnweb.freebsd.org/changeset/base/244401 >>> >>> Log: >>> Replace our implementation of the vis(3) and unvis(3) APIs with >>> NetBSD's. This output size limited versions of vis and unvis functions >>> as well as a set of vis variants that allow arbitrary characters to be >>> specified for encoding. >> >> This seems to break bootstrapping in some scenarios, in "stage 4.2: >> building libraries"; for example, with a test run with gcc on >> ref10-amd64.f.o I got this: >> >> gcc -O2 -pipe -I/scratch2/tmp/dim/head/lib/libc/include -I/scratch2/tmp/dim/head/lib/libc/../../include -I/scratch2/tmp/dim/head/lib/libc/amd64 -DNLS -D__DBINTERFACE_PRIVATE -I/scratch2/tmp/dim/head/lib/libc/../../contrib/gdtoa -DINET6 -I/scratch2/tmp/dim/obj/scratch2/tmp/dim/head/lib/libc -I/scratch2/tmp/dim/head/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/scratch2/tmp/dim/head/lib/libc/../../contrib/jemalloc/include -I/scratch2/tmp/dim/head/lib/libc/../../contrib/tzcode/stdtime -I/scratch2/tmp/dim/head/lib/libc/stdtime -I/scratch2/tmp/dim/head/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/scratch2/tmp/dim/head/lib/libc/rpc -DYP -DNS_CACHING -D_FREEFALL_CONFIG -DSYMBOL_VERSIONING -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/vis.c -o vis.o >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c: In function 'unvis': >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:237: error: 'VIS_NOESCAPE' undeclared (first use in this function) >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:237: error: (Each undeclared identifier is reported only once >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:237: error: for each function it appears in.) >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:241: error: 'VIS_HTTP1808' undeclared (first use in this function) >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:245: error: 'VIS_HTTP1866' undeclared (first use in this function) >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:249: error: 'VIS_MIMESTYLE' undeclared (first use in this function) >> >> There should most likely be an explicit -I option to point the compiler >> at the correct vis.h header during the early stages, otherwise it will >> pick up /usr/include/vis.h, which does not have several of these new >> VIS_XXX defines. > > Sorry for not following up on this sooner. I've not seen this at all > and most of my builds are done on an 9.0-STABLE box so vis.h isn't > updated. Adding > > CFLAGS+= -I${CURDIR}/../../contrib/libc-vis > > to lib/libc/gen/Makefile.inc seems like it should fix this, but I'm > surprised not to have bumped into this or broken tinderbox. Is there > anything odd about your buildworld command? Not really, the environment was just this: 1) Building on ref10-amd64.f.o 2) CC=gcc, CXX=g++, CPP=gcpp Did you manage to reproduce the failure? From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 22:50:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 39B0843E; Wed, 16 Jan 2013 22:50:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11AE6323; Wed, 16 Jan 2013 22:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GMoeH8090236; Wed, 16 Jan 2013 22:50:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GMoesZ090235; Wed, 16 Jan 2013 22:50:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301162250.r0GMoesZ090235@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 22:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245510 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 22:50:41 -0000 Author: delphij Date: Wed Jan 16 22:50:40 2013 New Revision: 245510 URL: http://svnweb.freebsd.org/changeset/base/245510 Log: Update and vendor-sys/illumos/dist to illumos-gate 13910:f3454e0a097c (illumos zfs issue #3447: improve the comment in txg.c) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Wed Jan 16 22:06:00 2013 (r245509) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Wed Jan 16 22:50:40 2013 (r245510) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -33,7 +33,76 @@ #include /* - * Pool-wide transaction groups. + * ZFS Transaction Groups + * ---------------------- + * + * ZFS transaction groups are, as the name implies, groups of transactions + * that act on persistent state. ZFS asserts consistency at the granularity of + * these transaction groups. Each successive transaction group (txg) is + * assigned a 64-bit consecutive identifier. There are three active + * transaction group states: open, quiescing, or syncing. At any given time, + * there may be an active txg associated with each state; each active txg may + * either be processing, or blocked waiting to enter the next state. There may + * be up to three active txgs, and there is always a txg in the open state + * (though it may be blocked waiting to enter the quiescing state). In broad + * strokes, transactions — operations that change in-memory structures — are + * accepted into the txg in the open state, and are completed while the txg is + * in the open or quiescing states. The accumulated changes are written to + * disk in the syncing state. + * + * Open + * + * When a new txg becomes active, it first enters the open state. New + * transactions — updates to in-memory structures — are assigned to the + * currently open txg. There is always a txg in the open state so that ZFS can + * accept new changes (though the txg may refuse new changes if it has hit + * some limit). ZFS advances the open txg to the next state for a variety of + * reasons such as it hitting a time or size threshold, or the execution of an + * administrative action that must be completed in the syncing state. + * + * Quiescing + * + * After a txg exits the open state, it enters the quiescing state. The + * quiescing state is intended to provide a buffer between accepting new + * transactions in the open state and writing them out to stable storage in + * the syncing state. While quiescing, transactions can continue their + * operation without delaying either of the other states. Typically, a txg is + * in the quiescing state very briefly since the operations are bounded by + * software latencies rather than, say, slower I/O latencies. After all + * transactions complete, the txg is ready to enter the next state. + * + * Syncing + * + * In the syncing state, the in-memory state built up during the open and (to + * a lesser degree) the quiescing states is written to stable storage. The + * process of writing out modified data can, in turn modify more data. For + * example when we write new blocks, we need to allocate space for them; those + * allocations modify metadata (space maps)... which themselves must be + * written to stable storage. During the sync state, ZFS iterates, writing out + * data until it converges and all in-memory changes have been written out. + * The first such pass is the largest as it encompasses all the modified user + * data (as opposed to filesystem metadata). Subsequent passes typically have + * far less data to write as they consist exclusively of filesystem metadata. + * + * To ensure convergence, after a certain number of passes ZFS begins + * overwriting locations on stable storage that had been allocated earlier in + * the syncing state (and subsequently freed). ZFS usually allocates new + * blocks to optimize for large, continuous, writes. For the syncing state to + * converge however it must complete a pass where no new blocks are allocated + * since each allocation requires a modification of persistent metadata. + * Further, to hasten convergence, after a prescribed number of passes, ZFS + * also defers frees, and stops compressing. + * + * In addition to writing out user data, we must also execute synctasks during + * the syncing context. A synctask is the mechanism by which some + * administrative activities work such as creating and destroying snapshots or + * datasets. Note that when a synctask is initiated it enters the open txg, + * and ZFS then pushes that txg as quickly as possible to completion of the + * syncing state in order to reduce the latency of the administrative + * activity. To complete the syncing state, ZFS writes out a new uberblock, + * the root of the tree of blocks that comprise all state stored on the ZFS + * pool. Finally, if there is a quiesced txg waiting, we signal that it can + * now transition to the syncing state. */ static void txg_sync_thread(dsl_pool_t *dp); From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 22:54:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 458C75F6 for ; Wed, 16 Jan 2013 22:54:58 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by mx1.freebsd.org (Postfix) with ESMTP id ADD6A356 for ; Wed, 16 Jan 2013 22:54:57 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id eb20so874681lab.31 for ; Wed, 16 Jan 2013 14:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=yuWHtbqyZ6mDGFQcfvhdY8sk1uPxP1ojebATdErwRDs=; b=o8bgXHBx9DBZUMj42ceDTN8ayiYMWotEYrTkotuCsbXLJdcoCMH6Y2fB3umuXmDnEk 5rHtR7NLi6VUUM1NDmRC9WFQ9pGy/1BC5igra6QtDCqEHEU/3mJVrYwzmUWxSMsIdBRH fUxUI/07H2z8Yw4ZUwX3rV5uxUNEyx3k33u68= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=yuWHtbqyZ6mDGFQcfvhdY8sk1uPxP1ojebATdErwRDs=; b=YjrYsZ4xQuNraiBEVqoBlDpcJ1PxSn/rIwWP/TDxsGm+KLK0/wU7Vwu/v4XeZuIx0o LIjWEjaPcOCDoZRnUMNXKNTqL/cdJfyMOSXJ8cXyS2n2DZ8zGTSNd7Hd7vu3wY4zaaTB zTWlfU5WmoZWtzb9+DxnxVQqF7iS2MLUajhMhl06RddkF0EyaECxWug87O6OHOf+gYxH 2zJAokQz9ztTE8xJYeaGYG2kmYuwNWi9idL+vkrUSaA7BQYmbesqITyHLPTqPMBn8Fnq vS4fDGzr2KCTRFJHMYOVDGd/e0aWSnguTG1GmxND3SmUfsYWC9smq9riCR+3uv4tN10W RphA== X-Received: by 10.152.125.136 with SMTP id mq8mr2752375lab.41.1358376896432; Wed, 16 Jan 2013 14:54:56 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Wed, 16 Jan 2013 14:54:25 -0800 (PST) In-Reply-To: <201301151409.r0FE98HB050315@svn.freebsd.org> References: <201301151409.r0FE98HB050315@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Jan 2013 17:54:25 -0500 X-Google-Sender-Auth: g3Ts1RGaSMu0EyYdjcAlBqPqM7A Message-ID: Subject: Re: svn commit: r245458 - head/lib/libc/sys To: Andrey Zonov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkXypcN9wEay/MZB0M04OQp1SQYXLKD1v9jJ7rYhx3j6a2N+/PiUCSRjPFc6rm+DqzW2pt4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 22:54:58 -0000 On 15 January 2013 09:09, Andrey Zonov wrote: > -.Va errno > -is set to indicate an error. ISTR that this is not shown in the -std text. Can this be retained? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 22:59:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DF12E7D3; Wed, 16 Jan 2013 22:59:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C0B5E394; Wed, 16 Jan 2013 22:59:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GMxoqJ092930; Wed, 16 Jan 2013 22:59:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GMxocD092929; Wed, 16 Jan 2013 22:59:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301162259.r0GMxocD092929@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 22:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245511 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 22:59:50 -0000 Author: delphij Date: Wed Jan 16 22:59:50 2013 New Revision: 245511 URL: http://svnweb.freebsd.org/changeset/base/245511 Log: MFV r245510: improve the comment in txg.c Obtained from: Illumos (13910:f3454e0a097c) MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed Jan 16 22:50:40 2013 (r245510) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed Jan 16 22:59:50 2013 (r245511) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -33,7 +33,76 @@ #include /* - * Pool-wide transaction groups. + * ZFS Transaction Groups + * ---------------------- + * + * ZFS transaction groups are, as the name implies, groups of transactions + * that act on persistent state. ZFS asserts consistency at the granularity of + * these transaction groups. Each successive transaction group (txg) is + * assigned a 64-bit consecutive identifier. There are three active + * transaction group states: open, quiescing, or syncing. At any given time, + * there may be an active txg associated with each state; each active txg may + * either be processing, or blocked waiting to enter the next state. There may + * be up to three active txgs, and there is always a txg in the open state + * (though it may be blocked waiting to enter the quiescing state). In broad + * strokes, transactions — operations that change in-memory structures — are + * accepted into the txg in the open state, and are completed while the txg is + * in the open or quiescing states. The accumulated changes are written to + * disk in the syncing state. + * + * Open + * + * When a new txg becomes active, it first enters the open state. New + * transactions — updates to in-memory structures — are assigned to the + * currently open txg. There is always a txg in the open state so that ZFS can + * accept new changes (though the txg may refuse new changes if it has hit + * some limit). ZFS advances the open txg to the next state for a variety of + * reasons such as it hitting a time or size threshold, or the execution of an + * administrative action that must be completed in the syncing state. + * + * Quiescing + * + * After a txg exits the open state, it enters the quiescing state. The + * quiescing state is intended to provide a buffer between accepting new + * transactions in the open state and writing them out to stable storage in + * the syncing state. While quiescing, transactions can continue their + * operation without delaying either of the other states. Typically, a txg is + * in the quiescing state very briefly since the operations are bounded by + * software latencies rather than, say, slower I/O latencies. After all + * transactions complete, the txg is ready to enter the next state. + * + * Syncing + * + * In the syncing state, the in-memory state built up during the open and (to + * a lesser degree) the quiescing states is written to stable storage. The + * process of writing out modified data can, in turn modify more data. For + * example when we write new blocks, we need to allocate space for them; those + * allocations modify metadata (space maps)... which themselves must be + * written to stable storage. During the sync state, ZFS iterates, writing out + * data until it converges and all in-memory changes have been written out. + * The first such pass is the largest as it encompasses all the modified user + * data (as opposed to filesystem metadata). Subsequent passes typically have + * far less data to write as they consist exclusively of filesystem metadata. + * + * To ensure convergence, after a certain number of passes ZFS begins + * overwriting locations on stable storage that had been allocated earlier in + * the syncing state (and subsequently freed). ZFS usually allocates new + * blocks to optimize for large, continuous, writes. For the syncing state to + * converge however it must complete a pass where no new blocks are allocated + * since each allocation requires a modification of persistent metadata. + * Further, to hasten convergence, after a prescribed number of passes, ZFS + * also defers frees, and stops compressing. + * + * In addition to writing out user data, we must also execute synctasks during + * the syncing context. A synctask is the mechanism by which some + * administrative activities work such as creating and destroying snapshots or + * datasets. Note that when a synctask is initiated it enters the open txg, + * and ZFS then pushes that txg as quickly as possible to completion of the + * syncing state in order to reduce the latency of the administrative + * activity. To complete the syncing state, ZFS writes out a new uberblock, + * the root of the tree of blocks that comprise all state stored on the ZFS + * pool. Finally, if there is a quiesced txg waiting, we signal that it can + * now transition to the syncing state. */ static void txg_sync_thread(void *arg); From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:11:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C7229C3E; Wed, 16 Jan 2013 23:11:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AA60F65D; Wed, 16 Jan 2013 23:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNBE9N098078; Wed, 16 Jan 2013 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNBEZa098074; Wed, 16 Jan 2013 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301162311.r0GNBEZa098074@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 23:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245512 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/di... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:11:14 -0000 Author: delphij Date: Wed Jan 16 23:11:13 2013 New Revision: 245512 URL: http://svnweb.freebsd.org/changeset/base/245512 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 13921:9d721847e469 (illumos zfs issue #3035 LZ4 compression support in ZFS and GRUB) Modified: vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/man/man5/zpool-features.5 Changes in other areas also in this revision: Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_compress.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_compress.c Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Wed Jan 16 22:59:50 2013 (r245511) +++ vendor/illumos/dist/man/man1m/zfs.1m Wed Jan 16 23:11:13 2013 (r245512) @@ -25,6 +25,7 @@ .\" Copyright (c) 2012 by Delphix. All rights reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright 2012 Nexenta Systems, Inc. All Rights Reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .TH ZFS 1M "Sep 16, 2012" .SH NAME @@ -912,7 +913,7 @@ Changing this property affects only newl .ne 2 .na \fB\fBcompression\fR=\fBon\fR | \fBoff\fR | \fBlzjb\fR | \fBgzip\fR | -\fBgzip-\fR\fIN\fR | \fBzle\fR\fR +\fBgzip-\fR\fIN\fR | \fBzle\fR\fR | \fBlz4\fR .ad .sp .6 .RS 4n @@ -926,6 +927,14 @@ value \fBgzip-\fR\fIN\fR where \fIN\fR i (which is also the default for \fBgzip\fR(1)). The \fBzle\fR compression algorithm compresses runs of zeros. .sp +The \fBlz4\fR compression algorithm is a high-performance replacement +for the \fBlzjb\fR algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than \fBlzjb\fR, but can only be used on pools with +the \fBlz4_compress\fR feature set to \fIenabled\fR. See +\fBzpool-features\fR(5) for details on ZFS feature flags and the +\fBlz4_compress\fR feature. +.sp This property can also be referred to by its shortened column name \fBcompress\fR. Changing this property affects only newly-written data. .RE Modified: vendor/illumos/dist/man/man5/zpool-features.5 ============================================================================== --- vendor/illumos/dist/man/man5/zpool-features.5 Wed Jan 16 22:59:50 2013 (r245511) +++ vendor/illumos/dist/man/man5/zpool-features.5 Wed Jan 16 23:11:13 2013 (r245512) @@ -1,5 +1,6 @@ '\" te .\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" The contents of this file are subject to the terms of the Common Development .\" and Distribution License (the "License"). You may not use this file except .\" in compliance with the License. You can obtain a copy of the license at @@ -197,5 +198,38 @@ This feature is \fBactive\fR while there or snapshots which were created after enabling this feature. .RE +.sp +.ne 2 +.na +\fB\fBlz4_compress\fR\fR +.ad +.RS 4n +.TS +l l . +GUID org.illumos:lz4_compress +READ\-ONLY COMPATIBLE no +DEPENDENCIES none +.TE + +\fBlz4\fR is a high-performance real-time compression algorithm that +features significantly faster compression and decompression as well as a +higher compression ratio than the older \fBlzjb\fR compression. +Typically, \fBlz4\fR compression is approximately 50% faster on +compressible data and 200% faster on incompressible data than +\fBlzjb\fR. It is also approximately 80% faster on decompression, while +giving approximately 10% better compression ratio. + +When the \fBlz4_compress\fR feature is set to \fBenabled\fR, the +administrator can turn on \fBlz4\fR compression on any dataset on the +pool using the \fBzfs\fR(1M) command. Please note that doing so will +immediately activate the \fBlz4_compress\fR feature on the underlying +pool (even before any data is written). Since this feature is not +read-only compatible, this operation will render the pool unimportable +on systems without support for the \fBlz4_compress\fR feature. At the +moment, this operation cannot be reversed. Booting off of +\fBlz4\fR-compressed root pools is supported. + +.RE + .SH "SEE ALSO" \fBzpool\fR(1M) From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:11:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 41DFCC41; Wed, 16 Jan 2013 23:11:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2578D65E; Wed, 16 Jan 2013 23:11:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNBGIq098092; Wed, 16 Jan 2013 23:11:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNBE3u098083; Wed, 16 Jan 2013 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301162311.r0GNBE3u098083@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 23:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245512 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/di... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:11:16 -0000 Author: delphij Date: Wed Jan 16 23:11:13 2013 New Revision: 245512 URL: http://svnweb.freebsd.org/changeset/base/245512 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 13921:9d721847e469 (illumos zfs issue #3035 LZ4 compression support in ZFS and GRUB) Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_compress.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_compress.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/man/man5/zpool-features.5 Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.c Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.c Wed Jan 16 23:11:13 2013 (r245512) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifdef _KERNEL @@ -156,4 +157,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_EMPTY_BPOBJ, "com.delphix:empty_bpobj", "empty_bpobj", "Snapshots use less space.", B_TRUE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_LZ4_COMPRESS, + "org.illumos:lz4_compress", "lz4_compress", + "LZ4 compression algorithm support.", B_FALSE, B_FALSE, NULL); } Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.h ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.h Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.h Wed Jan 16 23:11:13 2013 (r245512) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifndef _ZFEATURE_COMMON_H @@ -52,6 +53,7 @@ typedef int (zfeature_func_t)(zfeature_i enum spa_feature { SPA_FEATURE_ASYNC_DESTROY, SPA_FEATURE_EMPTY_BPOBJ, + SPA_FEATURE_LZ4_COMPRESS, SPA_FEATURES } spa_feature_t; Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Jan 16 23:11:13 2013 (r245512) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -96,6 +97,7 @@ zfs_prop_init(void) { "gzip-8", ZIO_COMPRESS_GZIP_8 }, { "gzip-9", ZIO_COMPRESS_GZIP_9 }, { "zle", ZIO_COMPRESS_ZLE }, + { "lz4", ZIO_COMPRESS_LZ4 }, { NULL } }; @@ -211,8 +213,8 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_COMPRESSION, "compression", ZIO_COMPRESS_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | lzjb | gzip | gzip-[1-9] | zle", "COMPRESS", - compress_table); + "on | off | lzjb | gzip | gzip-[1-9] | zle | lz4", + "COMPRESS", compress_table); zprop_register_index(ZFS_PROP_SNAPDIR, "snapdir", ZFS_SNAPDIR_HIDDEN, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "hidden | visible", "SNAPDIR", snapdir_table); Modified: vendor-sys/illumos/dist/uts/common/Makefile.files ============================================================================== --- vendor-sys/illumos/dist/uts/common/Makefile.files Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/uts/common/Makefile.files Wed Jan 16 23:11:13 2013 (r245512) @@ -23,6 +23,7 @@ # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2013 by Saso Kiselkov. All rights reserved. # # @@ -1353,6 +1354,7 @@ ZFS_COMMON_OBJS += \ dsl_scan.o \ zfeature.o \ gzip.o \ + lz4.o \ lzjb.o \ metaslab.o \ refcount.o \ Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 Wed Jan 16 23:11:13 2013 (r245512) @@ -0,0 +1,30 @@ +LZ4 - Fast LZ compression algorithm +Copyright (C) 2011-2013, Yann Collet. +BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * 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 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. + +You can contact the author at : +- LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html +- LZ4 source repository : http://code.google.com/p/lz4/ Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip Wed Jan 16 23:11:13 2013 (r245512) @@ -0,0 +1 @@ +LZ4 COMPRESSION FUNCTIONALITY IN ZFS Added: vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Wed Jan 16 23:11:13 2013 (r245512) @@ -0,0 +1,1173 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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 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. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + */ + +#include + +static int real_LZ4_compress(const char *source, char *dest, int isize, + int osize); +static int real_LZ4_uncompress(const char *source, char *dest, int osize); +static int LZ4_compressBound(int isize); +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); +static int LZ4_compressCtx(void *ctx, const char *source, char *dest, + int isize, int osize); +static int LZ4_compress64kCtx(void *ctx, const char *source, char *dest, + int isize, int osize); + +/*ARGSUSED*/ +size_t +lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + uint32_t bufsiz; + char *dest = d_start; + + ASSERT(d_len >= sizeof (bufsiz)); + + bufsiz = real_LZ4_compress(s_start, &dest[sizeof (bufsiz)], s_len, + d_len - sizeof (bufsiz)); + + /* Signal an error if the compression routine returned zero. */ + if (bufsiz == 0) + return (s_len); + + /* + * Encode the compresed buffer size at the start. We'll need this in + * decompression to counter the effects of padding which might be + * added to the compressed buffer and which, if unhandled, would + * confuse the hell out of our decompression function. + */ + *(uint32_t *)dest = BE_32(bufsiz); + + return (bufsiz + sizeof (bufsiz)); +} + +/*ARGSUSED*/ +int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + const char *src = s_start; + uint32_t bufsiz = BE_IN32(src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + sizeof (bufsiz) > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative. + */ + return (LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], + d_start, bufsiz, d_len) < 0); +} + +/* + * LZ4 API Description: + * + * Simple Functions: + * real_LZ4_compress() : + * isize : is the input size. Max supported value is ~1.9GB + * return : the number of bytes written in buffer dest + * or 0 if the compression fails (if LZ4_COMPRESSMIN is set). + * note : destination buffer must be already allocated. + * destination buffer must be sized to handle worst cases + * situations (input data not compressible) worst case size + * evaluation is provided by function LZ4_compressBound(). + * + * real_LZ4_uncompress() : + * osize : is the output size, therefore the original size + * return : the number of bytes read in the source buffer. + * If the source stream is malformed, the function will stop + * decoding and return a negative result, indicating the byte + * position of the faulty instruction. This function never + * writes beyond dest + osize, and is therefore protected + * against malicious data packets. + * note : destination buffer must be already allocated + * + * Advanced Functions + * + * LZ4_compressBound() : + * Provides the maximum size that LZ4 may output in a "worst case" + * scenario (input data not compressible) primarily useful for memory + * allocation of output buffer. + * + * isize : is the input size. Max supported value is ~1.9GB + * return : maximum output size in a "worst case" scenario + * note : this function is limited by "int" range (2^31-1) + * + * LZ4_uncompress_unknownOutputSize() : + * isize : is the input size, therefore the compressed size + * maxOutputSize : is the size of the destination buffer (which must be + * already allocated) + * return : the number of bytes decoded in the destination buffer + * (necessarily <= maxOutputSize). If the source stream is + * malformed, the function will stop decoding and return a + * negative result, indicating the byte position of the faulty + * instruction. This function never writes beyond dest + + * maxOutputSize, and is therefore protected against malicious + * data packets. + * note : Destination buffer must be already allocated. + * This version is slightly slower than real_LZ4_uncompress() + * + * LZ4_compressCtx() : + * This function explicitly handles the CTX memory structure. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + * + * LZ4_compress64kCtx() : + * Same as LZ4_compressCtx(), but specific to small inputs (<64KB). + * isize *Must* be <64KB, otherwise the output will be corrupted. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + */ + +/* + * Tuning parameters + */ + +/* + * COMPRESSIONLEVEL: Increasing this value improves compression ratio + * Lowering this value reduces memory usage. Reduced memory usage + * typically improves speed, due to cache effect (ex: L1 32KB for Intel, + * L1 64KB for AMD). Memory usage formula : N->2^(N+2) Bytes + * (examples : 12 -> 16KB ; 17 -> 512KB) + */ +#define COMPRESSIONLEVEL 12 + +/* + * NOTCOMPRESSIBLE_CONFIRMATION: Decreasing this value will make the + * algorithm skip faster data segments considered "incompressible". + * This may decrease compression ratio dramatically, but will be + * faster on incompressible data. Increasing this value will make + * the algorithm search more before declaring a segment "incompressible". + * This could improve compression a bit, but will be slower on + * incompressible data. The default value (6) is recommended. + */ +#define NOTCOMPRESSIBLE_CONFIRMATION 6 + +/* + * BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE: This will provide a boost to + * performance for big endian cpu, but the resulting compressed stream + * will be incompatible with little-endian CPU. You can set this option + * to 1 in situations where data will stay within closed environment. + * This option is useless on Little_Endian CPU (such as x86). + */ +/* #define BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE 1 */ + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +/* + * Illumos: On amd64 we have 20k of stack and 24k on sun4u and sun4v, so we + * can spend 16k on the algorithm + */ +#define STACKLIMIT 12 +#else +#define LZ4_ARCH64 0 +/* + * Illumos: On i386 we only have 12k of stack, so in order to maintain the + * same COMPRESSIONLEVEL we have to use heap allocation. Performance will + * suck, but alas, it's ZFS on 32-bit we're talking about, so... + */ +#define STACKLIMIT 11 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if (defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || \ + defined(_BIG_ENDIAN) || defined(_ARCH_PPC) || defined(__PPC__) || \ + defined(__PPC) || defined(PPC) || defined(__powerpc__) || \ + defined(__powerpc) || defined(powerpc) || \ + ((defined(__BYTE_ORDER__)&&(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)))) +#define LZ4_BIG_ENDIAN 1 +#else +/* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* + * Illumos: we can't use GCC's __builtin_ctz family of builtins in the + * kernel + */ +#define LZ4_FORCE_SW_BITCOUNT + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#ifdef _MSC_VER +/* Visual Studio */ +/* Visual is not C99, but supports some kind of inline */ +#define inline __forceinline +#if LZ4_ARCH64 +/* For Visual 2005 */ +#pragma intrinsic(_BitScanForward64) +#pragma intrinsic(_BitScanReverse64) +#else /* !LZ4_ARCH64 */ +/* For Visual 2005 */ +#pragma intrinsic(_BitScanForward) +#pragma intrinsic(_BitScanReverse) +#endif /* !LZ4_ARCH64 */ +#endif /* _MSC_VER */ + +#ifdef _MSC_VER +#define lz4_bswap16(x) _byteswap_ushort(x) +#else /* !_MSC_VER */ +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \ + (((x) & 0xffu) << 8))) +#endif /* !_MSC_VER */ + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#define expect(expr, value) (__builtin_expect((expr), (value))) +#else +#define expect(expr, value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#if defined(_MSC_VER) +/* Visual Studio does not support 'stdint' natively */ +#define BYTE unsigned __int8 +#define U16 unsigned __int16 +#define U32 unsigned __int32 +#define S32 __int32 +#define U64 unsigned __int64 +#else /* !defined(_MSC_VER) */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t +#endif /* !defined(_MSC_VER) */ + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define HASH_LOG COMPRESSIONLEVEL +#define HASHTABLESIZE (1 << HASH_LOG) +#define HASH_MASK (HASHTABLESIZE - 1) + +#define SKIPSTRENGTH (NOTCOMPRESSIBLE_CONFIRMATION > 2 ? \ + NOTCOMPRESSIBLE_CONFIRMATION : 2) + +/* + * Defines if memory is allocated into the stack (local variable), + * or into the heap (kmem_alloc()). + */ +#define HEAPMODE (HASH_LOG > STACKLIMIT) +#define COPYLENGTH 8 +#define LASTLITERALS 5 +#define MFLIMIT (COPYLENGTH + MINMATCH) +#define MINLENGTH (MFLIMIT + 1) + +#define MAXD_LOG 16 +#define MAX_DISTANCE ((1 << MAXD_LOG) - 1) + +#define ML_BITS 4 +#define ML_MASK ((1U<> ((MINMATCH * 8) - \ + HASH_LOG)) +#define LZ4_HASH_VALUE(p) LZ4_HASH_FUNCTION(A32(p)) +#define LZ4_WILDCOPY(s, d, e) do { LZ4_COPYPACKET(s, d) } while (d < e); +#define LZ4_BLINDCOPY(s, d, l) { BYTE* e = (d) + l; LZ4_WILDCOPY(s, d, e); \ + d = e; } + + +/* Private functions */ +#if LZ4_ARCH64 + +static inline int +LZ4_NbCommonBytes(register U64 val) +{ +#if defined(LZ4_BIG_ENDIAN) +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanReverse64(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clzll(val) >> 3); +#else + int r; + if (!(val >> 32)) { + r = 4; + } else { + r = 0; + val >>= 32; + } + if (!(val >> 16)) { + r += 2; + val >>= 8; + } else { + val >>= 24; + } + r += (!val); + return (r); +#endif +#else +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanForward64(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctzll(val) >> 3); +#else + static const int DeBruijnBytePos[64] = + { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, + 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, + 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, + 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 + }; + return DeBruijnBytePos[((U64) ((val & -val) * 0x0218A392CDABBD3F)) >> + 58]; +#endif +#endif +} + +#else + +static inline int +LZ4_NbCommonBytes(register U32 val) +{ +#if defined(LZ4_BIG_ENDIAN) +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanReverse(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clz(val) >> 3); +#else + int r; + if (!(val >> 16)) { + r = 2; + val >>= 8; + } else { + r = 0; + val >>= 24; + } + r += (!val); + return (r); +#endif +#else +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanForward(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctz(val) >> 3); +#else + static const int DeBruijnBytePos[32] = { + 0, 0, 3, 0, 3, 1, 3, 0, + 3, 2, 2, 1, 3, 2, 0, 1, + 3, 3, 1, 2, 2, 2, 2, 0, + 3, 1, 2, 0, 1, 0, 1, 1 + }; + return DeBruijnBytePos[((U32) ((val & -(S32) val) * 0x077CB531U)) >> + 27]; +#endif +#endif +} + +#endif + +/* Public functions */ + +static int +LZ4_compressBound(int isize) +{ + return (isize + (isize / 255) + 16); +} + +/* Compression functions */ + +/*ARGSUSED*/ +static int +LZ4_compressCtx(void *ctx, const char *source, char *dest, int isize, + int osize) +{ +#if HEAPMODE + struct refTables *srt = (struct refTables *)ctx; + HTYPE *HashTable = (HTYPE *) (srt->hashTable); +#else + HTYPE HashTable[HASHTABLESIZE] = { 0 }; +#endif + + const BYTE *ip = (BYTE *) source; + INITBASE(base); + const BYTE *anchor = ip; + const BYTE *const iend = ip + isize; + const BYTE *const oend = (BYTE *) dest + osize; + const BYTE *const mflimit = iend - MFLIMIT; +#define matchlimit (iend - LASTLITERALS) + + BYTE *op = (BYTE *) dest; + + int len, length; + const int skipStrength = SKIPSTRENGTH; + U32 forwardH; + + + /* Init */ + if (isize < MINLENGTH) + goto _last_literals; + + /* First Byte */ + HashTable[LZ4_HASH_VALUE(ip)] = ip - base; + ip++; + forwardH = LZ4_HASH_VALUE(ip); + + /* Main Loop */ + for (;;) { + int findMatchAttempts = (1U << skipStrength) + 3; + const BYTE *forwardIp = ip; + const BYTE *ref; + BYTE *token; + + /* Find a match */ + do { + U32 h = forwardH; + int step = findMatchAttempts++ >> skipStrength; + ip = forwardIp; + forwardIp = ip + step; + + if unlikely(forwardIp > mflimit) { + goto _last_literals; + } + + forwardH = LZ4_HASH_VALUE(forwardIp); + ref = base + HashTable[h]; + HashTable[h] = ip - base; + + } while ((ref < ip - MAX_DISTANCE) || (A32(ref) != A32(ip))); + + /* Catch up */ + while ((ip > anchor) && (ref > (BYTE *) source) && + unlikely(ip[-1] == ref[-1])) { + ip--; + ref--; + } + + /* Encode Literal length */ + length = ip - anchor; + token = op++; + + /* Check output limit */ + if unlikely(op + length + (2 + 1 + LASTLITERALS) + + (length >> 8) > oend) + return (0); + + if (length >= (int)RUN_MASK) { + *token = (RUN_MASK << ML_BITS); + len = length - RUN_MASK; + for (; len > 254; len -= 255) + *op++ = 255; + *op++ = (BYTE)len; + } else + *token = (length << ML_BITS); + + /* Copy Literals */ + LZ4_BLINDCOPY(anchor, op, length); + + _next_match: + /* Encode Offset */ + LZ4_WRITE_LITTLEENDIAN_16(op, ip - ref); + + /* Start Counting */ + ip += MINMATCH; + ref += MINMATCH; /* MinMatch verified */ + anchor = ip; + while likely(ip < matchlimit - (STEPSIZE - 1)) { + UARCH diff = AARCH(ref) ^ AARCH(ip); + if (!diff) { + ip += STEPSIZE; + ref += STEPSIZE; + continue; + } + ip += LZ4_NbCommonBytes(diff); + goto _endCount; + } +#if LZ4_ARCH64 + if ((ip < (matchlimit - 3)) && (A32(ref) == A32(ip))) { + ip += 4; + ref += 4; + } +#endif + if ((ip < (matchlimit - 1)) && (A16(ref) == A16(ip))) { + ip += 2; + ref += 2; + } + if ((ip < matchlimit) && (*ref == *ip)) + ip++; + _endCount: + + /* Encode MatchLength */ + len = (ip - anchor); + /* Check output limit */ + if unlikely(op + (1 + LASTLITERALS) + (len >> 8) > oend) + return (0); + if (len >= (int)ML_MASK) { + *token += ML_MASK; + len -= ML_MASK; + for (; len > 509; len -= 510) { + *op++ = 255; + *op++ = 255; + } + if (len > 254) { + len -= 255; + *op++ = 255; + } + *op++ = (BYTE)len; + } else + *token += len; + + /* Test end of chunk */ + if (ip > mflimit) { + anchor = ip; + break; + } + /* Fill table */ + HashTable[LZ4_HASH_VALUE(ip - 2)] = ip - 2 - base; + + /* Test next position */ + ref = base + HashTable[LZ4_HASH_VALUE(ip)]; + HashTable[LZ4_HASH_VALUE(ip)] = ip - base; + if ((ref > ip - (MAX_DISTANCE + 1)) && (A32(ref) == A32(ip))) { + token = op++; + *token = 0; + goto _next_match; + } + /* Prepare next loop */ + anchor = ip++; + forwardH = LZ4_HASH_VALUE(ip); + } + + _last_literals: + /* Encode Last Literals */ + { + int lastRun = iend - anchor; + if (op + lastRun + 1 + ((lastRun + 255 - RUN_MASK) / 255) > + oend) + return (0); + if (lastRun >= (int)RUN_MASK) { + *op++ = (RUN_MASK << ML_BITS); + lastRun -= RUN_MASK; + for (; lastRun > 254; lastRun -= 255) { + *op++ = 255; + } + *op++ = (BYTE)lastRun; + } else + *op++ = (lastRun << ML_BITS); + (void) memcpy(op, anchor, iend - anchor); + op += iend - anchor; + } + + /* End */ + return (int)(((char *)op) - dest); +} + + + +/* Note : this function is valid only if isize < LZ4_64KLIMIT */ +#define LZ4_64KLIMIT ((1 << 16) + (MFLIMIT - 1)) +#define HASHLOG64K (HASH_LOG + 1) +#define HASH64KTABLESIZE (1U << HASHLOG64K) +#define LZ4_HASH64K_FUNCTION(i) (((i) * 2654435761U) >> ((MINMATCH*8) - \ + HASHLOG64K)) +#define LZ4_HASH64K_VALUE(p) LZ4_HASH64K_FUNCTION(A32(p)) + +/*ARGSUSED*/ +static int +LZ4_compress64kCtx(void *ctx, const char *source, char *dest, int isize, + int osize) +{ +#if HEAPMODE + struct refTables *srt = (struct refTables *)ctx; + U16 *HashTable = (U16 *) (srt->hashTable); +#else + U16 HashTable[HASH64KTABLESIZE] = { 0 }; +#endif + + const BYTE *ip = (BYTE *) source; + const BYTE *anchor = ip; + const BYTE *const base = ip; + const BYTE *const iend = ip + isize; + const BYTE *const oend = (BYTE *) dest + osize; + const BYTE *const mflimit = iend - MFLIMIT; +#define matchlimit (iend - LASTLITERALS) + + BYTE *op = (BYTE *) dest; + + int len, length; + const int skipStrength = SKIPSTRENGTH; + U32 forwardH; + + /* Init */ + if (isize < MINLENGTH) + goto _last_literals; + + /* First Byte */ + ip++; + forwardH = LZ4_HASH64K_VALUE(ip); + + /* Main Loop */ + for (;;) { + int findMatchAttempts = (1U << skipStrength) + 3; + const BYTE *forwardIp = ip; + const BYTE *ref; + BYTE *token; + + /* Find a match */ + do { + U32 h = forwardH; + int step = findMatchAttempts++ >> skipStrength; + ip = forwardIp; + forwardIp = ip + step; + + if (forwardIp > mflimit) { + goto _last_literals; + } + + forwardH = LZ4_HASH64K_VALUE(forwardIp); + ref = base + HashTable[h]; + HashTable[h] = ip - base; + + } while (A32(ref) != A32(ip)); + + /* Catch up */ + while ((ip > anchor) && (ref > (BYTE *) source) && + (ip[-1] == ref[-1])) { + ip--; + ref--; + } + + /* Encode Literal length */ + length = ip - anchor; + token = op++; + + /* Check output limit */ + if unlikely(op + length + (2 + 1 + LASTLITERALS) + + (length >> 8) > oend) + return (0); + + if (length >= (int)RUN_MASK) { + *token = (RUN_MASK << ML_BITS); + len = length - RUN_MASK; + for (; len > 254; len -= 255) + *op++ = 255; + *op++ = (BYTE)len; + } else + *token = (length << ML_BITS); + + /* Copy Literals */ + LZ4_BLINDCOPY(anchor, op, length); + + _next_match: + /* Encode Offset */ + LZ4_WRITE_LITTLEENDIAN_16(op, ip - ref); + + /* Start Counting */ + ip += MINMATCH; + ref += MINMATCH; /* MinMatch verified */ + anchor = ip; + while (ip < matchlimit - (STEPSIZE - 1)) { + UARCH diff = AARCH(ref) ^ AARCH(ip); + if (!diff) { + ip += STEPSIZE; + ref += STEPSIZE; + continue; + } + ip += LZ4_NbCommonBytes(diff); + goto _endCount; + } +#if LZ4_ARCH64 + if ((ip < (matchlimit - 3)) && (A32(ref) == A32(ip))) { + ip += 4; + ref += 4; + } +#endif + if ((ip < (matchlimit - 1)) && (A16(ref) == A16(ip))) { + ip += 2; + ref += 2; + } + if ((ip < matchlimit) && (*ref == *ip)) + ip++; + _endCount: + + /* Encode MatchLength */ + len = (ip - anchor); + /* Check output limit */ + if unlikely(op + (1 + LASTLITERALS) + (len >> 8) > oend) + return (0); + if (len >= (int)ML_MASK) { + *token += ML_MASK; + len -= ML_MASK; + for (; len > 509; len -= 510) { + *op++ = 255; + *op++ = 255; + } + if (len > 254) { + len -= 255; + *op++ = 255; + } + *op++ = (BYTE)len; + } else + *token += len; + + /* Test end of chunk */ + if (ip > mflimit) { + anchor = ip; + break; + } + /* Fill table */ + HashTable[LZ4_HASH64K_VALUE(ip - 2)] = ip - 2 - base; + + /* Test next position */ + ref = base + HashTable[LZ4_HASH64K_VALUE(ip)]; + HashTable[LZ4_HASH64K_VALUE(ip)] = ip - base; + if (A32(ref) == A32(ip)) { + token = op++; + *token = 0; + goto _next_match; + } + /* Prepare next loop */ + anchor = ip++; + forwardH = LZ4_HASH64K_VALUE(ip); + } + + _last_literals: + /* Encode Last Literals */ + { + int lastRun = iend - anchor; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:16:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 94006F7B; Wed, 16 Jan 2013 23:16:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6C1AC6B8; Wed, 16 Jan 2013 23:16:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNGg46098953; Wed, 16 Jan 2013 23:16:42 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNGgju098951; Wed, 16 Jan 2013 23:16:42 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301162316.r0GNGgju098951@svn.freebsd.org> From: Brooks Davis Date: Wed, 16 Jan 2013 23:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245513 - in head: . etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:16:42 -0000 Author: brooks Date: Wed Jan 16 23:16:41 2013 New Revision: 245513 URL: http://svnweb.freebsd.org/changeset/base/245513 Log: According to the notes in ObsoleteFiles.inc we last installed section 1aout manpages in 2002. Stop making the directories and links to them. Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jan 16 23:11:13 2013 (r245512) +++ head/ObsoleteFiles.inc Wed Jan 16 23:16:41 2013 (r245513) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20130116: removed long unused directories for .1aout section manpages +OLD_FILES+=usr/share/man/en.ISO8859-1/man1aout +OLD_FILES+=usr/share/man/en.UTF-8/man1aout +OLD_DIRS+=usr/share/man/man1aout +OLD_DIRS+=usr/share/man/cat1aout +OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1aout +OLD_DIRS+=usr/share/man/en.UTF-8/cat1aout # 20121230: libdisk removed OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Wed Jan 16 23:11:13 2013 (r245512) +++ head/etc/mtree/BSD.usr.dist Wed Jan 16 23:16:41 2013 (r245513) @@ -756,8 +756,6 @@ /set uname=man cat1 .. - cat1aout - .. cat2 .. cat3 @@ -795,8 +793,6 @@ en.ISO8859-1 uname=root cat1 .. - cat1aout - .. cat2 .. cat3 @@ -835,8 +831,6 @@ en.UTF-8 uname=root cat1 .. - cat1aout - .. cat2 .. cat3 @@ -913,8 +907,6 @@ .. man1 .. - man1aout - .. man2 .. man3 From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:20:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1D269279; Wed, 16 Jan 2013 23:20:25 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1FC6FB; Wed, 16 Jan 2013 23:20:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNKON0000977; Wed, 16 Jan 2013 23:20:24 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNKORP000975; Wed, 16 Jan 2013 23:20:24 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301162320.r0GNKORP000975@svn.freebsd.org> From: Brooks Davis Date: Wed, 16 Jan 2013 23:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245514 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:20:25 -0000 Author: brooks Date: Wed Jan 16 23:20:24 2013 New Revision: 245514 URL: http://svnweb.freebsd.org/changeset/base/245514 Log: Remove default support for 1aout section manpages. There haven't been any since at least July 2002. Modified: head/usr.bin/man/man.1 head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.1 ============================================================================== --- head/usr.bin/man/man.1 Wed Jan 16 23:16:41 2013 (r245513) +++ head/usr.bin/man/man.1 Wed Jan 16 23:20:24 2013 (r245514) @@ -84,7 +84,7 @@ environment variable. .It Fl S Ar mansect Restricts manual sections searched to the specified colon delimited list. Defaults to -.Dq Li 1:1aout:8:2:3:n:4:5:6:7:9:l . +.Dq Li 1:8:2:3:n:4:5:6:7:9:l . Overrides the .Ev MANSECT environment variable. Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Wed Jan 16 23:16:41 2013 (r245513) +++ head/usr.bin/man/man.sh Wed Jan 16 23:20:24 2013 (r245514) @@ -945,7 +945,7 @@ STTY=/bin/stty SYSCTL=/sbin/sysctl debug=0 -man_default_sections='1:1aout:8:2:3:n:4:5:6:7:9:l' +man_default_sections='1:8:2:3:n:4:5:6:7:9:l' man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/man' cattool='/usr/bin/zcat -f' From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:21:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 96ACA566; Wed, 16 Jan 2013 23:21:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 84C03703; Wed, 16 Jan 2013 23:21:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNL5YE001261; Wed, 16 Jan 2013 23:21:05 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNL55G001259; Wed, 16 Jan 2013 23:21:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301162321.r0GNL55G001259@svn.freebsd.org> From: Brooks Davis Date: Wed, 16 Jan 2013 23:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245515 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:21:05 -0000 Author: brooks Date: Wed Jan 16 23:21:04 2013 New Revision: 245515 URL: http://svnweb.freebsd.org/changeset/base/245515 Log: Remove support for installing 1aout section manpages. Modified: head/share/mk/bsd.man.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Wed Jan 16 23:20:24 2013 (r245514) +++ head/share/mk/bsd.man.mk Wed Jan 16 23:21:04 2013 (r245515) @@ -62,7 +62,7 @@ MROFF_CMD?= groff -Tascii -mtty-char -ma MCOMPRESS_CMD?= ${COMPRESS_CMD} MCOMPRESS_EXT?= ${COMPRESS_EXT} -SECTIONS= 1 1aout 2 3 4 5 6 7 8 9 +SECTIONS= 1 2 3 4 5 6 7 8 9 .SUFFIXES: ${SECTIONS:S/^/./g} # Backwards compatibility. Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Wed Jan 16 23:20:24 2013 (r245514) +++ head/share/mk/bsd.prog.mk Wed Jan 16 23:21:04 2013 (r245515) @@ -95,8 +95,7 @@ ${PROG}: ${OBJS} .if ${MK_MAN} != "no" && !defined(MAN) && \ !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \ !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \ - !defined(MAN7) && !defined(MAN8) && !defined(MAN9) && \ - !defined(MAN1aout) + !defined(MAN7) && !defined(MAN8) && !defined(MAN9) MAN= ${PROG}.1 MAN1= ${MAN} .endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:25:15 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5A0997E1; Wed, 16 Jan 2013 23:25:15 +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 95863756; Wed, 16 Jan 2013 23:25:14 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id r0GNP94R043530; Wed, 16 Jan 2013 17:25:09 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id r0GNP9YC043529; Wed, 16 Jan 2013 17:25:09 -0600 (CST) (envelope-from brooks) Date: Wed, 16 Jan 2013 17:25:09 -0600 From: Brooks Davis To: Dimitry Andric Subject: Re: svn commit: r244401 - in head: contrib/libc-vis include lib/libc/gen Message-ID: <20130116232509.GB29437@lor.one-eyed-alien.net> References: <201212181637.qBIGbP7e084145@svn.freebsd.org> <50D65630.8010901@FreeBSD.org> <20130110234108.GB79810@lor.one-eyed-alien.net> <50F72D46.2090707@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5I6of5zJg18YgZEa" Content-Disposition: inline In-Reply-To: <50F72D46.2090707@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Brooks Davis , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:25:15 -0000 --5I6of5zJg18YgZEa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 16, 2013 at 11:44:22PM +0100, Dimitry Andric wrote: > On 2013-01-11 00:41, Brooks Davis wrote: > > On Sun, Dec 23, 2012 at 01:54:08AM +0100, Dimitry Andric wrote: > >> On 2012-12-18 17:37, Brooks Davis wrote: > >>> Author: brooks > >>> Date: Tue Dec 18 16:37:24 2012 > >>> New Revision: 244401 > >>> URL: http://svnweb.freebsd.org/changeset/base/244401 > >>> > >>> Log: > >>> Replace our implementation of the vis(3) and unvis(3) APIs with > >>> NetBSD's. This output size limited versions of vis and unvis fun= ctions > >>> as well as a set of vis variants that allow arbitrary characters = to be > >>> specified for encoding. > >> > >> This seems to break bootstrapping in some scenarios, in "stage 4.2: > >> building libraries"; for example, with a test run with gcc on > >> ref10-amd64.f.o I got this: > >> > >> gcc -O2 -pipe -I/scratch2/tmp/dim/head/lib/libc/include -I/scratch2/= tmp/dim/head/lib/libc/../../include -I/scratch2/tmp/dim/head/lib/libc/amd64= -DNLS -D__DBINTERFACE_PRIVATE -I/scratch2/tmp/dim/head/lib/libc/../../con= trib/gdtoa -DINET6 -I/scratch2/tmp/dim/obj/scratch2/tmp/dim/head/lib/libc -= I/scratch2/tmp/dim/head/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/s= cratch2/tmp/dim/head/lib/libc/../../contrib/jemalloc/include -I/scratch2/tm= p/dim/head/lib/libc/../../contrib/tzcode/stdtime -I/scratch2/tmp/dim/head/l= ib/libc/stdtime -I/scratch2/tmp/dim/head/lib/libc/locale -DBROKEN_DES -DPOR= TMAP -DDES_BUILTIN -I/scratch2/tmp/dim/head/lib/libc/rpc -DYP -DNS_CACHING = -D_FREEFALL_CONFIG -DSYMBOL_VERSIONING -std=3Dgnu99 -fstack-protector -Wsys= tem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-s= ign -c /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/vis.c -o vis.o > >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c: In fun= ction 'unvis': > >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:237: er= ror: 'VIS_NOESCAPE' undeclared (first use in this function) > >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:237: er= ror: (Each undeclared identifier is reported only once > >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:237: er= ror: for each function it appears in.) > >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:241: er= ror: 'VIS_HTTP1808' undeclared (first use in this function) > >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:245: er= ror: 'VIS_HTTP1866' undeclared (first use in this function) > >> /scratch2/tmp/dim/head/lib/libc/../../contrib/libc-vis/unvis.c:249: er= ror: 'VIS_MIMESTYLE' undeclared (first use in this function) > >> > >> There should most likely be an explicit -I option to point the compiler > >> at the correct vis.h header during the early stages, otherwise it will > >> pick up /usr/include/vis.h, which does not have several of these new > >> VIS_XXX defines. > > > > Sorry for not following up on this sooner. I've not seen this at all > > and most of my builds are done on an 9.0-STABLE box so vis.h isn't > > updated. Adding > > > > CFLAGS+=3D -I${CURDIR}/../../contrib/libc-vis > > > > to lib/libc/gen/Makefile.inc seems like it should fix this, but I'm > > surprised not to have bumped into this or broken tinderbox. Is there > > anything odd about your buildworld command? >=20 > Not really, the environment was just this: >=20 > 1) Building on ref10-amd64.f.o > 2) CC=3Dgcc, CXX=3Dg++, CPP=3Dgcpp >=20 > Did you manage to reproduce the failure? I never did with a buildworld. I could if I tried to build by hand after touching unvis.c so I added an entry to CFLAGS. I think it's more correct. -- Brooks --5I6of5zJg18YgZEa Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQ9zbVXY6L6fI4GtQRAnaiAKC0/93L5TRXqaglRv9Tqy+SW9XQQACfTHl4 WqYnE1g2+Z/wDHJSTKYLLNk= =gKJ9 -----END PGP SIGNATURE----- --5I6of5zJg18YgZEa-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:48:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 24CA8D0F; Wed, 16 Jan 2013 23:48:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0C71B872; Wed, 16 Jan 2013 23:48:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNmtBN008024; Wed, 16 Jan 2013 23:48:55 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNmtek008023; Wed, 16 Jan 2013 23:48:55 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301162348.r0GNmtek008023@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 16 Jan 2013 23:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245517 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:48:56 -0000 Author: np Date: Wed Jan 16 23:48:55 2013 New Revision: 245517 URL: http://svnweb.freebsd.org/changeset/base/245517 Log: cxgbe: Fix the for_each_foo macros -- the last argument should not share its name with any member of struct sge. MFC after: 3 days Modified: head/sys/dev/cxgbe/adapter.h Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Jan 16 23:41:20 2013 (r245516) +++ head/sys/dev/cxgbe/adapter.h Wed Jan 16 23:48:55 2013 (r245517) @@ -647,18 +647,18 @@ struct adapter { #define TXQ_LOCK_ASSERT_OWNED(txq) EQ_LOCK_ASSERT_OWNED(&(txq)->eq) #define TXQ_LOCK_ASSERT_NOTOWNED(txq) EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) -#define for_each_txq(pi, iter, txq) \ - txq = &pi->adapter->sge.txq[pi->first_txq]; \ - for (iter = 0; iter < pi->ntxq; ++iter, ++txq) -#define for_each_rxq(pi, iter, rxq) \ - rxq = &pi->adapter->sge.rxq[pi->first_rxq]; \ - for (iter = 0; iter < pi->nrxq; ++iter, ++rxq) -#define for_each_ofld_txq(pi, iter, ofld_txq) \ - ofld_txq = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \ - for (iter = 0; iter < pi->nofldtxq; ++iter, ++ofld_txq) -#define for_each_ofld_rxq(pi, iter, ofld_rxq) \ - ofld_rxq = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \ - for (iter = 0; iter < pi->nofldrxq; ++iter, ++ofld_rxq) +#define for_each_txq(pi, iter, q) \ + q = &pi->adapter->sge.txq[pi->first_txq]; \ + for (iter = 0; iter < pi->ntxq; ++iter, ++q) +#define for_each_rxq(pi, iter, q) \ + q = &pi->adapter->sge.rxq[pi->first_rxq]; \ + for (iter = 0; iter < pi->nrxq; ++iter, ++q) +#define for_each_ofld_txq(pi, iter, q) \ + q = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \ + for (iter = 0; iter < pi->nofldtxq; ++iter, ++q) +#define for_each_ofld_rxq(pi, iter, q) \ + q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \ + for (iter = 0; iter < pi->nofldrxq; ++iter, ++q) /* One for errors, one for firmware events */ #define T4_EXTRA_INTR 2 From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 23:49:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9B294E91; Wed, 16 Jan 2013 23:49:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 82F14889; Wed, 16 Jan 2013 23:49:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNnubH008191; Wed, 16 Jan 2013 23:49:56 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNnuhi008190; Wed, 16 Jan 2013 23:49:56 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301162349.r0GNnuhi008190@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 16 Jan 2013 23:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245518 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 16 Jan 2013 23:49:56 -0000 Author: np Date: Wed Jan 16 23:49:55 2013 New Revision: 245518 URL: http://svnweb.freebsd.org/changeset/base/245518 Log: cxgbe: Do a more thorough job in the CLEAR_STATS ioctl. 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 Wed Jan 16 23:48:55 2013 (r245517) +++ head/sys/dev/cxgbe/t4_main.c Wed Jan 16 23:49:55 2013 (r245518) @@ -5492,12 +5492,56 @@ t4_ioctl(struct cdev *dev, unsigned long rc = read_i2c(sc, (struct t4_i2c_data *)data); break; case CHELSIO_T4_CLEAR_STATS: { + int i; u_int port_id = *(uint32_t *)data; + struct port_info *pi; if (port_id >= sc->params.nports) return (EINVAL); + /* MAC stats */ t4_clr_port_stats(sc, port_id); + + pi = sc->port[port_id]; + if (pi->flags & PORT_INIT_DONE) { + struct sge_rxq *rxq; + struct sge_txq *txq; + struct sge_wrq *wrq; + + for_each_rxq(pi, i, rxq) { +#if defined(INET) || defined(INET6) + rxq->lro.lro_queued = 0; + rxq->lro.lro_flushed = 0; +#endif + rxq->rxcsum = 0; + rxq->vlan_extraction = 0; + } + + for_each_txq(pi, i, txq) { + txq->txcsum = 0; + txq->tso_wrs = 0; + txq->vlan_insertion = 0; + txq->imm_wrs = 0; + txq->sgl_wrs = 0; + txq->txpkt_wrs = 0; + txq->txpkts_wrs = 0; + txq->txpkts_pkts = 0; + txq->no_dmamap = 0; + txq->no_desc = 0; + } + +#ifdef TCP_OFFLOAD + /* nothing to clear for each ofld_rxq */ + + for_each_ofld_txq(pi, i, wrq) { + wrq->tx_wrs = 0; + wrq->no_desc = 0; + } +#endif + wrq = &sc->sge.ctrlq[pi->port_id]; + wrq->tx_wrs = 0; + wrq->no_desc = 0; + } break; } default: From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 00:09:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 49759348; Thu, 17 Jan 2013 00:09:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3B17B960; Thu, 17 Jan 2013 00:09:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H09p9C014392; Thu, 17 Jan 2013 00:09:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H09pC6014391; Thu, 17 Jan 2013 00:09:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301170009.r0H09pC6014391@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 Jan 2013 00:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245519 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 00:09:51 -0000 Author: mav Date: Thu Jan 17 00:09:50 2013 New Revision: 245519 URL: http://svnweb.freebsd.org/changeset/base/245519 Log: Recalculate volume size only for real CONCATs. For SINGLE trust volume size given by metadata, as it should be correct and in some cases can be smaller then subdisk size. Modified: head/sys/geom/raid/tr_concat.c Modified: head/sys/geom/raid/tr_concat.c ============================================================================== --- head/sys/geom/raid/tr_concat.c Wed Jan 16 23:49:55 2013 (r245518) +++ head/sys/geom/raid/tr_concat.c Thu Jan 17 00:09:50 2013 (r245519) @@ -124,7 +124,8 @@ g_raid_tr_update_state_concat(struct g_r * Some metadata modules may not know CONCAT volume * mediasize until all disks connected. Recalculate. */ - if (G_RAID_VOLUME_S_ALIVE(s) && + if (vol->v_raid_level == G_RAID_VOLUME_RL_CONCAT && + G_RAID_VOLUME_S_ALIVE(s) && !G_RAID_VOLUME_S_ALIVE(vol->v_state)) { size = 0; for (i = 0; i < vol->v_disks_count; i++) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 00:21:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 26A7CA38; Thu, 17 Jan 2013 00:21:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 18855A4C; Thu, 17 Jan 2013 00:21:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H0LjKq019219; Thu, 17 Jan 2013 00:21:45 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H0Lj1M019218; Thu, 17 Jan 2013 00:21:45 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301170021.r0H0Lj1M019218@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 17 Jan 2013 00:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245520 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 00:21:46 -0000 Author: np Date: Thu Jan 17 00:21:45 2013 New Revision: 245520 URL: http://svnweb.freebsd.org/changeset/base/245520 Log: Allow "ivlan" (inner VLAN) to be used as an alias for "vlan" when specifying match criteria. "vlan" continues to be valid here, and it continues to be valid when deleting, rewriting, inserting, or stacking an 802.1q tag to a matching packet. MFC after: 3 days Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Thu Jan 17 00:09:50 2013 (r245519) +++ head/tools/tools/cxgbetool/cxgbetool.c Thu Jan 17 00:21:45 2013 (r245520) @@ -955,7 +955,7 @@ set_filter(uint32_t idx, int argc, const t.fs.mask.vnic = mask; t.fs.val.vnic_vld = 1; t.fs.mask.vnic_vld = 1; - } else if (!parse_val_mask("vlan", args, &val, &mask)) { + } else if (!parse_val_mask("ivlan", args, &val, &mask)) { t.fs.val.vlan = val; t.fs.mask.vlan = mask; t.fs.val.vlan_vld = 1; @@ -1047,10 +1047,17 @@ set_filter(uint32_t idx, int argc, const t.fs.newvlan = VLAN_REWRITE; } else if (argv[start_arg + 1][0] == '+') { t.fs.newvlan = VLAN_INSERT; + } else if (isdigit(argv[start_arg + 1][0]) && + !parse_val_mask("vlan", args, &val, &mask)) { + t.fs.val.vlan = val; + t.fs.mask.vlan = mask; + t.fs.val.vlan_vld = 1; + t.fs.mask.vlan_vld = 1; } else { warnx("unknown vlan parameter \"%s\"; must" - " be one of \"none\", \"=\" or" - " \"+\"", argv[start_arg + 1]); + " be one of \"none\", \"=\", " + " \"+\", or \"\"", + argv[start_arg + 1]); return (EINVAL); } if (t.fs.newvlan == VLAN_REWRITE || From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 00:42:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A406FEA1; Thu, 17 Jan 2013 00:42:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7B9ADB1D; Thu, 17 Jan 2013 00:42:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H0gVpt025261; Thu, 17 Jan 2013 00:42:31 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H0gVvv025260; Thu, 17 Jan 2013 00:42:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301170042.r0H0gVvv025260@svn.freebsd.org> From: Xin LI Date: Thu, 17 Jan 2013 00:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245521 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 00:42:31 -0000 Author: delphij Date: Thu Jan 17 00:42:30 2013 New Revision: 245521 URL: http://svnweb.freebsd.org/changeset/base/245521 Log: MFC r245006: Sync with driver. Modified: stable/9/share/man/man4/mps.4 Modified: stable/9/share/man/man4/mps.4 ============================================================================== --- stable/9/share/man/man4/mps.4 Thu Jan 17 00:21:45 2013 (r245520) +++ stable/9/share/man/man4/mps.4 Thu Jan 17 00:42:30 2013 (r245521) @@ -34,7 +34,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd June 30, 2012 +.Dd January 3, 2013 .Dt MPS 4 .Os .Sh NAME @@ -62,7 +62,7 @@ controllers and WarpDrive solid state st .Sh HARDWARE The .Nm -driver supports the following controllers: +driver supports the following hardware: .Pp .Bl -bullet -compact .It @@ -80,6 +80,19 @@ LSI Logic SAS2116 (16 Port .It LSI Logic SAS2208 (8 Port .Tn SAS ) +.It +LSI Logic SAS2308 (8 Port +.Tn SAS ) +.It +LSI Logic SSS6200 Solid State Storage +.It +Intel Integrated RAID Module RMS25JB040 +.It +Intel Integrated RAID Module RMS25JB080 +.It +Intel Integrated RAID Module RMS25KB040 +.It +Intel Integrated RAID Module RMS25KB080 .El .Sh CONFIGURATION To disable MSI interrupts for all From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 00:50:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4B2A0191; Thu, 17 Jan 2013 00:50:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3A7ACB75; Thu, 17 Jan 2013 00:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H0oQjD027010; Thu, 17 Jan 2013 00:50:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H0oPMF026959; Thu, 17 Jan 2013 00:50:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301170050.r0H0oPMF026959@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 Jan 2013 00:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245522 - in head: sbin/geom/class/raid sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 00:50:26 -0000 Author: mav Date: Thu Jan 17 00:50:25 2013 New Revision: 245522 URL: http://svnweb.freebsd.org/changeset/base/245522 Log: For Promise/AMD metadata add support for disks with capacity above 2TiB and for volumes with sector size above 512 bytes. Modified: head/sbin/geom/class/raid/graid.8 head/sys/geom/raid/md_promise.c Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Thu Jan 17 00:42:30 2013 (r245521) +++ head/sbin/geom/class/raid/graid.8 Thu Jan 17 00:50:25 2013 (r245522) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2012 +.Dd January 16, 2013 .Dt GRAID 8 .Os .Sh NAME @@ -274,7 +274,6 @@ complete it there. Do not run GEOM RAID class on migrating volumes under pain of possible data corruption! .Sh 2TiB BARRIERS -Promise metadata format does not support disks above 2TiB. NVIDIA metadata format does not support volumes above 2TiB. .Sh SYSCTL VARIABLES The following Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Thu Jan 17 00:42:30 2013 (r245521) +++ head/sys/geom/raid/md_promise.c Thu Jan 17 00:50:25 2013 (r245522) @@ -84,7 +84,7 @@ struct promise_raid_conf { struct promise_raid_disk disk; /* This subdisk info. */ uint32_t disk_offset; /* Subdisk offset. */ uint32_t disk_sectors; /* Subdisk size */ - uint32_t rebuild_lba; /* Rebuild position. */ + uint32_t disk_rebuild; /* Rebuild position. */ uint16_t generation; /* Generation number. */ uint8_t status; /* Volume status. */ #define PROMISE_S_VALID 0x01 @@ -123,7 +123,17 @@ struct promise_raid_conf { uint32_t magic_4; uint32_t magic_5; uint32_t total_sectors_high; - uint32_t filler3[324]; + uint8_t magic_6; + uint8_t sector_size; + uint16_t magic_7; + uint32_t magic_8[32]; + uint16_t magic_9; + uint32_t disk_offset_high; + uint32_t disk_sectors_high; + uint32_t disk_rebuild_high; + uint16_t magic_10; + uint32_t magic_11[3]; + uint32_t filler3[284]; uint32_t checksum; } __packed; @@ -191,7 +201,7 @@ g_raid_md_promise_print(struct promise_r meta->disk.device, meta->disk.id); printf("disk_offset %u\n", meta->disk_offset); printf("disk_sectors %u\n", meta->disk_sectors); - printf("rebuild_lba %u\n", meta->rebuild_lba); + printf("disk_rebuild %u\n", meta->disk_rebuild); printf("generation %u\n", meta->generation); printf("status 0x%02x\n", meta->status); printf("type %u\n", meta->type); @@ -217,6 +227,10 @@ g_raid_md_promise_print(struct promise_r printf("magic_4 0x%08x\n", meta->magic_4); printf("magic_5 0x%08x\n", meta->magic_5); printf("total_sectors_high 0x%08x\n", meta->total_sectors_high); + printf("sector_size %u\n", meta->sector_size); + printf("disk_offset_high 0x%08x\n", meta->disk_offset_high); + printf("disk_sectors_high 0x%08x\n", meta->disk_sectors_high); + printf("disk_rebuild_high 0x%08x\n", meta->disk_rebuild_high); printf("=================================================\n"); } @@ -244,9 +258,9 @@ promise_meta_find_disk(struct promise_ra static int promise_meta_unused_range(struct promise_raid_conf **metaarr, int nsd, - uint32_t sectors, uint32_t *off, uint32_t *size) + off_t sectors, off_t *off, off_t *size) { - uint32_t coff, csize; + off_t coff, csize, tmp; int i, j; sectors -= 131072; @@ -257,10 +271,10 @@ promise_meta_unused_range(struct promise i = 0; while (1) { for (j = 0; j < nsd; j++) { - if (metaarr[j]->disk_offset >= coff) { - csize = MIN(csize, - metaarr[j]->disk_offset - coff); - } + tmp = ((off_t)metaarr[j]->disk_offset_high << 32) + + metaarr[j]->disk_offset; + if (tmp >= coff) + csize = MIN(csize, tmp - coff); } if (csize > *size) { *off = coff; @@ -268,7 +282,10 @@ promise_meta_unused_range(struct promise } if (i >= nsd) break; - coff = metaarr[i]->disk_offset + metaarr[i]->disk_sectors; + coff = ((off_t)metaarr[i]->disk_offset_high << 32) + + metaarr[i]->disk_offset + + ((off_t)metaarr[i]->disk_sectors_high << 32) + + metaarr[i]->disk_sectors; csize = sectors - coff; i++; }; @@ -369,6 +386,25 @@ next: return (subdisks); } + /* Remove filler garbage from fields used in newer metadata. */ + if (meta->disk_offset_high == 0x8b8c8d8e && + meta->disk_sectors_high == 0x8788898a && + meta->disk_rebuild_high == 0x83848586) { + meta->disk_offset_high = 0; + meta->disk_sectors_high = 0; + if (meta->disk_rebuild == UINT32_MAX) + meta->disk_rebuild_high = UINT32_MAX; + else + meta->disk_rebuild_high = 0; + if (meta->total_sectors_high == 0x15161718) { + meta->total_sectors_high = 0; + if (meta->rebuild_lba64 == 0x2122232425262728) + meta->rebuild_lba64 = UINT64_MAX; + } + } + if (meta->sector_size < 1 || meta->sector_size > 8) + meta->sector_size = 1; + /* Save this part and look for next. */ *metaarr = meta; metaarr++; @@ -386,8 +422,9 @@ promise_meta_write(struct g_consumer *cp struct g_provider *pp; struct promise_raid_conf *meta; char *buf; + off_t off, size; int error, i, subdisk, fake; - uint32_t checksum, *ptr, off, size; + uint32_t checksum, *ptr; pp = cp->provider; subdisk = 0; @@ -409,9 +446,12 @@ next: meta->disk.flags = PROMISE_F_ONLINE | PROMISE_F_VALID; meta->disk.number = 0xff; arc4rand(&meta->disk.id, sizeof(meta->disk.id), 0); - meta->disk_offset = off; - meta->disk_sectors = size; - meta->rebuild_lba = UINT32_MAX; + meta->disk_offset_high = off >> 32; + meta->disk_offset = (uint32_t)off; + meta->disk_sectors_high = size >> 32; + meta->disk_sectors = (uint32_t)size; + meta->disk_rebuild_high = UINT32_MAX; + meta->disk_rebuild = UINT32_MAX; fake = 1; } if (meta != NULL) { @@ -464,6 +504,7 @@ static int promise_meta_write_spare(struct g_consumer *cp) { struct promise_raid_conf *meta; + off_t tmp; int error; meta = malloc(sizeof(*meta), M_MD_PROMISE, M_WAITOK | M_ZERO); @@ -473,9 +514,11 @@ promise_meta_write_spare(struct g_consum meta->disk.flags = PROMISE_F_SPARE | PROMISE_F_ONLINE | PROMISE_F_VALID; meta->disk.number = 0xff; arc4rand(&meta->disk.id, sizeof(meta->disk.id), 0); - meta->disk_sectors = cp->provider->mediasize / cp->provider->sectorsize; - meta->disk_sectors -= 131072; - meta->rebuild_lba = UINT32_MAX; + tmp = cp->provider->mediasize / cp->provider->sectorsize - 131072; + meta->disk_sectors_high = tmp >> 32; + meta->disk_sectors = (uint32_t)tmp; + meta->disk_rebuild_high = UINT32_MAX; + meta->disk_rebuild = UINT32_MAX; error = promise_meta_write(cp, &meta, 1); free(meta, M_MD_PROMISE); return (error); @@ -617,9 +660,8 @@ g_raid_md_promise_start_disk(struct g_ra struct g_raid_md_promise_perdisk *pd; struct g_raid_md_promise_pervolume *pv; struct promise_raid_conf *meta; - off_t size; + off_t eoff, esize, size; int disk_pos, md_disk_pos, i, resurrection = 0; - uint32_t eoff, esize; sc = disk->d_softc; pd = (struct g_raid_md_promise_perdisk *)disk->d_md_data; @@ -729,8 +771,10 @@ nofit: sd->sd_offset = (off_t)eoff * 512; sd->sd_size = (off_t)esize * 512; } else { - sd->sd_offset = (off_t)pd->pd_meta[sdn]->disk_offset * 512; - sd->sd_size = (off_t)pd->pd_meta[sdn]->disk_sectors * 512; + sd->sd_offset = (((off_t)pd->pd_meta[sdn]->disk_offset_high + << 32) + pd->pd_meta[sdn]->disk_offset) * 512; + sd->sd_size = (((off_t)pd->pd_meta[sdn]->disk_sectors_high + << 32) + pd->pd_meta[sdn]->disk_sectors) * 512; } if (resurrection) { @@ -749,7 +793,8 @@ nofit: sd->sd_rebuild_pos = 0; else { sd->sd_rebuild_pos = - (off_t)pd->pd_meta[sdn]->rebuild_lba * 512; + (((off_t)pd->pd_meta[sdn]->disk_rebuild << 32) + + pd->pd_meta[sdn]->disk_rebuild) * 512; } } else if (!(meta->disks[md_disk_pos].flags & PROMISE_F_ONLINE)) { /* Rebuilding disk. */ @@ -875,13 +920,15 @@ g_raid_md_promise_start(struct g_raid_vo vol->v_disks_count = meta->total_disks; vol->v_mediasize = (off_t)meta->total_sectors * 512; //ZZZ if (meta->total_sectors_high < 256) /* If value looks sane. */ - vol->v_mediasize |= + vol->v_mediasize += ((off_t)meta->total_sectors_high << 32) * 512; //ZZZ - vol->v_sectorsize = 512; //ZZZ + vol->v_sectorsize = 512 * meta->sector_size; for (i = 0; i < vol->v_disks_count; i++) { sd = &vol->v_subdisks[i]; - sd->sd_offset = (off_t)meta->disk_offset * 512; //ZZZ - sd->sd_size = (off_t)meta->disk_sectors * 512; //ZZZ + sd->sd_offset = (((off_t)meta->disk_offset_high << 32) + + meta->disk_offset) * 512; + sd->sd_size = (((off_t)meta->disk_sectors_high << 32) + + meta->disk_sectors) * 512; } g_raid_start_volume(vol); @@ -1213,9 +1260,8 @@ g_raid_md_ctl_promise(struct g_raid_md_o const char *nodename, *verb, *volname, *levelname, *diskname; char *tmp; int *nargs, *force; - off_t size, sectorsize, strip; + off_t esize, offs[PROMISE_MAX_DISKS], size, sectorsize, strip; intmax_t *sizearg, *striparg; - uint32_t offs[PROMISE_MAX_DISKS], esize; int numdisks, i, len, level, qual; int error; @@ -1323,13 +1369,6 @@ g_raid_md_ctl_promise(struct g_raid_md_o cp->private = disk; g_topology_unlock(); - if (pp->mediasize / pp->sectorsize > UINT32_MAX) { - gctl_error(req, - "Disk '%s' is too big.", diskname); - error = -8; - break; - } - g_raid_get_disk_info(disk); /* Reserve some space for metadata. */ @@ -1394,10 +1433,6 @@ g_raid_md_ctl_promise(struct g_raid_md_o gctl_error(req, "Size too small."); return (-13); } - if (size > 0xffffffffllu * sectorsize) { - gctl_error(req, "Size too big."); - return (-14); - } /* We have all we need, create things: volume, ... */ pv = malloc(sizeof(*pv), M_MD_PROMISE, M_WAITOK | M_ZERO); @@ -1629,14 +1664,6 @@ g_raid_md_ctl_promise(struct g_raid_md_o pp = cp->provider; g_topology_unlock(); - if (pp->mediasize / pp->sectorsize > UINT32_MAX) { - gctl_error(req, - "Disk '%s' is too big.", diskname); - g_raid_kill_consumer(sc, cp); - error = -8; - break; - } - pd = malloc(sizeof(*pd), M_MD_PROMISE, M_WAITOK | M_ZERO); disk = g_raid_create_disk(sc); @@ -1733,9 +1760,9 @@ g_raid_md_write_promise(struct g_raid_md vol->v_raid_level == G_RAID_VOLUME_RL_RAID1E) meta->array_width /= 2; meta->array_number = vol->v_global_id; - meta->total_sectors = vol->v_mediasize / vol->v_sectorsize; - meta->total_sectors_high = - (vol->v_mediasize / vol->v_sectorsize) >> 32; + meta->total_sectors = vol->v_mediasize / 512; + meta->total_sectors_high = (vol->v_mediasize / 512) >> 32; + meta->sector_size = vol->v_sectorsize / 512; meta->cylinders = meta->total_sectors / (255 * 63) - 1; meta->heads = 254; meta->sectors = 63; @@ -1828,15 +1855,24 @@ g_raid_md_write_promise(struct g_raid_md pd->pd_meta[j] = promise_meta_copy(meta); pd->pd_meta[j]->disk = meta->disks[pos]; pd->pd_meta[j]->disk.number = pos; + pd->pd_meta[j]->disk_offset_high = + (sd->sd_offset / 512) >> 32; pd->pd_meta[j]->disk_offset = sd->sd_offset / 512; + pd->pd_meta[j]->disk_sectors_high = + (sd->sd_size / 512) >> 32; pd->pd_meta[j]->disk_sectors = sd->sd_size / 512; if (sd->sd_state == G_RAID_SUBDISK_S_REBUILD) { - pd->pd_meta[j]->rebuild_lba = + pd->pd_meta[j]->disk_rebuild_high = + (sd->sd_rebuild_pos / 512) >> 32; + pd->pd_meta[j]->disk_rebuild = sd->sd_rebuild_pos / 512; - } else if (sd->sd_state < G_RAID_SUBDISK_S_REBUILD) - pd->pd_meta[j]->rebuild_lba = 0; - else - pd->pd_meta[j]->rebuild_lba = UINT32_MAX; + } else if (sd->sd_state < G_RAID_SUBDISK_S_REBUILD) { + pd->pd_meta[j]->disk_rebuild_high = 0; + pd->pd_meta[j]->disk_rebuild = 0; + } else { + pd->pd_meta[j]->disk_rebuild_high = UINT32_MAX; + pd->pd_meta[j]->disk_rebuild = UINT32_MAX; + } pd->pd_updated = 1; } } From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 01:27:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 82BF0F9F; Thu, 17 Jan 2013 01:27:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6B1DF0; Thu, 17 Jan 2013 01:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H1Rel1038118; Thu, 17 Jan 2013 01:27:40 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H1Re6Y038117; Thu, 17 Jan 2013 01:27:40 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201301170127.r0H1Re6Y038117@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 17 Jan 2013 01:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245525 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 01:27:40 -0000 Author: bz Date: Thu Jan 17 01:27:39 2013 New Revision: 245525 URL: http://svnweb.freebsd.org/changeset/base/245525 Log: Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. Do this per jail started, not per address. This will allow DAD to complete and services to properly start. Before we have seen problems with services trying to start before the IPv6 address was available to use and thus erroring and failing to start. MFC after: 3 days Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Thu Jan 17 01:19:14 2013 (r245524) +++ head/etc/rc.d/jail Thu Jan 17 01:27:39 2013 (r245525) @@ -509,7 +509,7 @@ jail_handle_ips_option() esac case "${_type}" in inet) ;; - inet6) ;; + inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;; *) warn "Could not determine address family. Not going" \ "to ${_action} address '${_addr}' for ${_jail}." continue @@ -546,6 +546,7 @@ jail_ips() esac # Handle addresses. + ipv6_address_count=0 jail_handle_ips_option ${_action} "${_ip}" # Handle jail_xxx_ip_multi alias=0 @@ -558,6 +559,12 @@ jail_ips() ;; esac done + case ${ipv6_address_count} in + 0) ;; + *) # Sleep 1 second to let DAD complete before starting services. + sleep 1 + ;; + esac } jail_prestart() From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 01:28:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BE7091B6; Thu, 17 Jan 2013 01:28:56 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AFB88E05; Thu, 17 Jan 2013 01:28:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H1Su7x038318; Thu, 17 Jan 2013 01:28:56 GMT (envelope-from pgj@svn.freebsd.org) Received: (from pgj@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H1SuOC038317; Thu, 17 Jan 2013 01:28:56 GMT (envelope-from pgj@svn.freebsd.org) Message-Id: <201301170128.r0H1SuOC038317@svn.freebsd.org> From: Gabor Pali Date: Thu, 17 Jan 2013 01:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r245526 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 01:28:56 -0000 Author: pgj (ports committer) Date: Thu Jan 17 01:28:55 2013 New Revision: 245526 URL: http://svnweb.freebsd.org/changeset/base/245526 Log: Take wilko's commit bit into safekeeping per his request. Wilko, thank you for all the hard work on FreeBSD in the past! Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Thu Jan 17 01:27:39 2013 (r245525) +++ svnadmin/conf/access Thu Jan 17 01:28:55 2013 (r245526) @@ -263,7 +263,6 @@ vanhu versus weongyo wes -wilko wkbcommt@xs4all.nl will wkoszek wollman From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 01:29:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6475631D; Thu, 17 Jan 2013 01:29:42 +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 226F1E11; Thu, 17 Jan 2013 01:29:42 +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 9CEC525D38A5; Thu, 17 Jan 2013 01:29:39 +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 CE268BE84A1; Thu, 17 Jan 2013 01:29:38 +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 Kro1Wee88leK; Thu, 17 Jan 2013 01:29:37 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 5BE83BE84A0; Thu, 17 Jan 2013 01:29:37 +0000 (UTC) Date: Thu, 17 Jan 2013 01:29:36 +0000 (UTC) From: "Bjoern A. Zeeb" To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r245525 - head/etc/rc.d In-Reply-To: <201301170127.r0H1Re6Y038117@svn.freebsd.org> Message-ID: References: <201301170127.r0H1Re6Y038117@svn.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 01:29:42 -0000 On Thu, 17 Jan 2013, Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Jan 17 01:27:39 2013 > New Revision: 245525 > URL: http://svnweb.freebsd.org/changeset/base/245525 > > Log: > Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. > Do this per jail started, not per address. This will allow DAD to complete > and services to properly start. Before we have seen problems with services > trying to start before the IPv6 address was available to use and thus > erroring and failing to start. > > MFC after: 3 days Reviewed by: simon Reported by: clusterad Seen before by: myself (but never fixed it properly) Samples of services seen starting up really fast and failing included openldap's slapd and I think even apache. > > Modified: > head/etc/rc.d/jail > > Modified: head/etc/rc.d/jail > ============================================================================== > --- head/etc/rc.d/jail Thu Jan 17 01:19:14 2013 (r245524) > +++ head/etc/rc.d/jail Thu Jan 17 01:27:39 2013 (r245525) > @@ -509,7 +509,7 @@ jail_handle_ips_option() > esac > case "${_type}" in > inet) ;; > - inet6) ;; > + inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;; > *) warn "Could not determine address family. Not going" \ > "to ${_action} address '${_addr}' for ${_jail}." > continue > @@ -546,6 +546,7 @@ jail_ips() > esac > > # Handle addresses. > + ipv6_address_count=0 > jail_handle_ips_option ${_action} "${_ip}" > # Handle jail_xxx_ip_multi > alias=0 > @@ -558,6 +559,12 @@ jail_ips() > ;; > esac > done > + case ${ipv6_address_count} in > + 0) ;; > + *) # Sleep 1 second to let DAD complete before starting services. > + sleep 1 > + ;; > + esac > } > > jail_prestart() > -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 01:51:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CA51C861; Thu, 17 Jan 2013 01:51:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A766EF45; Thu, 17 Jan 2013 01:51:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H1p5VB045984; Thu, 17 Jan 2013 01:51:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H1p42P045979; Thu, 17 Jan 2013 01:51:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201301170151.r0H1p42P045979@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 17 Jan 2013 01:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245527 - in head: secure/lib/libssh secure/usr.bin/ssh secure/usr.sbin/sshd share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 01:51:05 -0000 Author: bz Date: Thu Jan 17 01:51:04 2013 New Revision: 245527 URL: http://svnweb.freebsd.org/changeset/base/245527 Log: Add a src.conf(5) option to allow users to compile in the "NONE cipher", which, only after authentication, disables crypto, and only for sessions without a terminal. Submitted by: Jeremy Chadwick (freebsd jdc.parodius.com) PR: bin/163095 MFC after: 10 days Added: head/tools/build/options/WITH_OPENSSH_NONE_CIPHER (contents, props changed) Modified: head/secure/lib/libssh/Makefile head/secure/usr.bin/ssh/Makefile head/secure/usr.sbin/sshd/Makefile head/share/mk/bsd.own.mk Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Thu Jan 17 01:28:55 2013 (r245526) +++ head/secure/lib/libssh/Makefile Thu Jan 17 01:51:04 2013 (r245527) @@ -38,6 +38,10 @@ DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX5 LDADD+= -lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken .endif +.if ${MK_OPENSSH_NONE_CIPHER} != "no" +CFLAGS+= -DNONE_CIPHER_ENABLED +.endif + NO_LINT= DPADD+= ${LIBCRYPTO} ${LIBCRYPT} Modified: head/secure/usr.bin/ssh/Makefile ============================================================================== --- head/secure/usr.bin/ssh/Makefile Thu Jan 17 01:28:55 2013 (r245526) +++ head/secure/usr.bin/ssh/Makefile Thu Jan 17 01:51:04 2013 (r245527) @@ -25,6 +25,10 @@ DPADD+= ${LIBGSSAPI} LDADD+= -lgssapi .endif +.if ${MK_OPENSSH_NONE_CIPHER} != "no" +CFLAGS+= -DNONE_CIPHER_ENABLED +.endif + DPADD+= ${LIBCRYPT} ${LIBCRYPTO} LDADD+= -lcrypt -lcrypto Modified: head/secure/usr.sbin/sshd/Makefile ============================================================================== --- head/secure/usr.sbin/sshd/Makefile Thu Jan 17 01:28:55 2013 (r245526) +++ head/secure/usr.sbin/sshd/Makefile Thu Jan 17 01:51:04 2013 (r245527) @@ -40,6 +40,10 @@ DPADD+= ${LIBGSSAPI_KRB5} ${LIBGSSAPI} LDADD+= -lgssapi_krb5 -lgssapi -lkrb5 -lasn1 .endif +.if ${MK_OPENSSH_NONE_CIPHER} != "no" +CFLAGS+= -DNONE_CIPHER_ENABLED +.endif + DPADD+= ${LIBCRYPTO} ${LIBCRYPT} LDADD+= -lcrypto -lcrypt Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Thu Jan 17 01:28:55 2013 (r245526) +++ head/share/mk/bsd.own.mk Thu Jan 17 01:51:04 2013 (r245527) @@ -360,6 +360,7 @@ __DEFAULT_NO_OPTIONS = \ NMTREE \ NAND \ OFED \ + OPENSSH_NONE_CIPHER \ SHARED_TOOLCHAIN # Added: head/tools/build/options/WITH_OPENSSH_NONE_CIPHER ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_OPENSSH_NONE_CIPHER Thu Jan 17 01:51:04 2013 (r245527) @@ -0,0 +1,9 @@ +.\" $FreeBSD$ +Set to include the "None" cipher support in OpenSSH and its libraries. +Additional adjustments may need to be done to system configuration +files, such as +.Xr sshd_config 5 , +to enable this cipher. +Please see +.Pa /usr/src/crypto/openssh/README.hpn +for full details. From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 02:07:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3D854FFD; Thu, 17 Jan 2013 02:07:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx07.syd.optusnet.com.au (fallbackmx07.syd.optusnet.com.au [211.29.132.9]) by mx1.freebsd.org (Postfix) with ESMTP id 5854A6B; Thu, 17 Jan 2013 02:07:56 +0000 (UTC) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by fallbackmx07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0H27ndK004029; Thu, 17 Jan 2013 13:07:49 +1100 Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0H27V75017594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jan 2013 13:07:33 +1100 Date: Thu, 17 Jan 2013 13:07:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler Subject: Re: svn commit: r245494 - head/bin/pwait In-Reply-To: Message-ID: <20130117125124.T1066@besplex.bde.org> References: <201301160503.r0G53qie087155@svn.freebsd.org> <50F6ED68.50602@delphij.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Auu2R5BP c=1 sm=1 a=FCoFQeHV-_kA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=0Iti9RnyFakA:10 a=SWg00rOMAAAA:8 a=9I5xiGouAAAA:8 a=d02al9D6jb9SjW1LqP8A:9 a=CjuIK1q_8ugA:10 a=0yGDDesplhsA:10 a=3_5TX_vZOqAA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: "svn-src-head@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , d@delphij.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 02:07:57 -0000 On Wed, 16 Jan 2013, Eitan Adler wrote: > On 16 January 2013 13:11, Xin Li wrote: > >> Yes I did. Using exit(3) tells clang that this is the final exit and >> thus eliminates the warning. >> >> It sounds like a bug (or arguably a feature) that clang does not >> recognize return in main()s... > > It is not a bug: see Of course it is a bug. > http://clang-developers.42468.n3.nabble.com/Static-analyzer-possible-memory-leak-false-positive-td4026706.html Not much signal there. C99 requires main() to be handled specially in hosted environments. (In freestanding environments(), neither main() nor malloc() is special. Now the compiler could warn about main(), but it cannot know what malloc() does so it cannot warn about not freeing memory on return from main().) It requires that, if the return type of main() is compatible with int (and thus not void), then a return from the _initial_ call to main() is equivalent to calling exit() with an arg equal to the return value (and that if main() doesn't explicitly return or exit, but falls through to the closing brace, then this is equivalent to 'return (0);'. It seems to be permitted to call malloc() recursively (otherwise C99 w. The warning is useful if main() is called recursively. But few programs call main() recursively. pwait(1) obviously doesn't. The the bug is quality of implementation one. The static analyzer is too stupid to see that main() isn't called recursively. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 02:09:10 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4C9E6369; Thu, 17 Jan 2013 02:09:10 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id CA5C099; Thu, 17 Jan 2013 02:09:09 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r0H28ps0009420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jan 2013 11:09:02 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id r0H28naM008894; Thu, 17 Jan 2013 11:08:51 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 17 Jan 2013 11:07:23 +0900 (JST) Message-Id: <20130117.110723.1450987474949438621.hrs@allbsd.org> To: bz@FreeBSD.org Subject: Re: svn commit: r245525 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <201301170127.r0H1Re6Y038117@svn.freebsd.org> References: <201301170127.r0H1Re6Y038117@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Jan_17_11_07_23_2013_045)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 17 Jan 2013 11:09:02 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 02:09:10 -0000 ----Security_Multipart(Thu_Jan_17_11_07_23_2013_045)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Bjoern A. Zeeb" wrote in <201301170127.r0H1Re6Y038117@svn.freebsd.org>: bz> Author: bz bz> Date: Thu Jan 17 01:27:39 2013 bz> New Revision: 245525 bz> URL: http://svnweb.freebsd.org/changeset/base/245525 bz> bz> Log: bz> Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. bz> Do this per jail started, not per address. This will allow DAD to complete bz> and services to properly start. Before we have seen problems with services bz> trying to start before the IPv6 address was available to use and thus bz> erroring and failing to start. bz> bz> MFC after: 3 days This may be too pedantic, but I think this delay should use DupAddrDetectTransmits (net.inet6.ip6.dad_count). The default value of RETRANS_TIMER and MAX_RTR_SOLICITATION_DELAY in RFC 4861 is 1 sec, so the theoretical delay value is (DupAddrDetectTransmits * RETRANS_TIMER + MAX_RTR_SOLICITATION_DELAY). The rc.d/netif script uses this value (typically 2 seconds) for DAD. I understand a simple 1 second delay works in practice, though. -- Hiroki ----Security_Multipart(Thu_Jan_17_11_07_23_2013_045)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlD3XNsACgkQTyzT2CeTzy1GYQCg1lYMEWM8mGxzRr0SHzhiEJcB F78An1Nwwpymirv3IG6vzpvBczstMBl8 =CG8S -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Jan_17_11_07_23_2013_045)---- From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 02:25:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 89BB8719; Thu, 17 Jan 2013 02:25:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 16681134; Thu, 17 Jan 2013 02:25:22 +0000 (UTC) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0H2PLkc005686; Thu, 17 Jan 2013 13:25:21 +1100 Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0H2PCRf006526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jan 2013 13:25:13 +1100 Date: Thu, 17 Jan 2013 13:25:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI Subject: Re: svn commit: r245506 - head/bin/pwait In-Reply-To: <201301161815.r0GIFQPk007553@svn.freebsd.org> Message-ID: <20130117130740.I1066@besplex.bde.org> References: <201301161815.r0GIFQPk007553@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=P/xiHV8u c=1 sm=1 a=jy4U5xBK6Z8A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=0Iti9RnyFakA:10 a=TPjh7SLijXKq6PV6sMgA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 02:25:23 -0000 On Wed, 16 Jan 2013, Xin LI wrote: > Log: > Use a different way to silence clang analyzer as done in r245494 by > explicitly telling the compiler that we are on the exit route. > > X-MFC: together with r245494 > > Modified: > head/bin/pwait/pwait.c > > Modified: head/bin/pwait/pwait.c > ============================================================================== > --- head/bin/pwait/pwait.c Wed Jan 16 09:07:49 2013 (r245505) > +++ head/bin/pwait/pwait.c Wed Jan 16 18:15:25 2013 (r245506) > @@ -141,6 +141,5 @@ main(int argc, char *argv[]) > nleft -= n; > } > > - free(e); > - return 0; > + exit(EX_OK); > } This uses the sysexits mistake. style(9) was fixed to not give an example of this mistake. Before this, sysexits was used a whole once in pwait(1) (for EX_USAGE) in usage(). EX_USAGE happens to be 64. As usual when the mistake is used, this is useless for humans (the usage message gives more info) and unusable for programs, especially since it is undocmented (pwait(1)'s man page just says ">0 if an error occurs". It doesn't even use '.Std' for this, but hard-codes it. The related utilities for kill(1) and pkill(1) and their man pages are better. kill(1) doesn't use the mistake, and its man page uses '.Std'. pkill(1) doesn't use the mistake; it uses small integers for exit statuses, and its man page seems to document these correctly (it cannot use .Std since the exit status isn't standard). Bruce From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 02:42:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2216BBD8; Thu, 17 Jan 2013 02:42:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0EABF1EB; Thu, 17 Jan 2013 02:42:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H2g86D061445; Thu, 17 Jan 2013 02:42:08 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H2g8J6061444; Thu, 17 Jan 2013 02:42:08 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201301170242.r0H2g8J6061444@svn.freebsd.org> From: Mateusz Guzik Date: Thu, 17 Jan 2013 02:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245530 - stable/9/usr.bin/procstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 02:42:09 -0000 Author: mjg Date: Thu Jan 17 02:42:08 2013 New Revision: 245530 URL: http://svnweb.freebsd.org/changeset/base/245530 Log: MFC r245345: procstat: only one mode flag can be specified, but required check for 'i' and 'j' modes was missing. Fix that. Modified: stable/9/usr.bin/procstat/procstat.c Directory Properties: stable/9/usr.bin/procstat/ (props changed) Modified: stable/9/usr.bin/procstat/procstat.c ============================================================================== --- stable/9/usr.bin/procstat/procstat.c Thu Jan 17 02:30:32 2013 (r245529) +++ stable/9/usr.bin/procstat/procstat.c Thu Jan 17 02:42:08 2013 (r245530) @@ -216,8 +216,8 @@ main(int argc, char *argv[]) argv += optind; /* We require that either 0 or 1 mode flags be set. */ - tmp = bflag + cflag + eflag + fflag + (kflag ? 1 : 0) + lflag + sflag + - tflag + vflag + xflag; + tmp = bflag + cflag + eflag + fflag + iflag + jflag + (kflag ? 1 : 0) + + lflag + sflag + tflag + vflag + xflag; if (!(tmp == 0 || tmp == 1)) usage(); From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 03:27:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EF4B6B9F; Thu, 17 Jan 2013 03:27:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E21026FB; Thu, 17 Jan 2013 03:27:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H3R8Zq075325; Thu, 17 Jan 2013 03:27:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H3R8pf075324; Thu, 17 Jan 2013 03:27:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201301170327.r0H3R8pf075324@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 Jan 2013 03:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245533 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 03:27:09 -0000 Author: mav Date: Thu Jan 17 03:27:08 2013 New Revision: 245533 URL: http://svnweb.freebsd.org/changeset/base/245533 Log: - Fix rebuild position broken at r245522. - Identify one more metadata field. Modified: head/sys/geom/raid/md_promise.c Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Thu Jan 17 03:25:31 2013 (r245532) +++ head/sys/geom/raid/md_promise.c Thu Jan 17 03:27:08 2013 (r245533) @@ -126,7 +126,8 @@ struct promise_raid_conf { uint8_t magic_6; uint8_t sector_size; uint16_t magic_7; - uint32_t magic_8[32]; + uint32_t magic_8[31]; + uint32_t backup_time; uint16_t magic_9; uint32_t disk_offset_high; uint32_t disk_sectors_high; @@ -228,6 +229,7 @@ g_raid_md_promise_print(struct promise_r printf("magic_5 0x%08x\n", meta->magic_5); printf("total_sectors_high 0x%08x\n", meta->total_sectors_high); printf("sector_size %u\n", meta->sector_size); + printf("backup_time %d\n", meta->backup_time); printf("disk_offset_high 0x%08x\n", meta->disk_offset_high); printf("disk_sectors_high 0x%08x\n", meta->disk_sectors_high); printf("disk_rebuild_high 0x%08x\n", meta->disk_rebuild_high); @@ -398,6 +400,7 @@ next: meta->disk_rebuild_high = 0; if (meta->total_sectors_high == 0x15161718) { meta->total_sectors_high = 0; + meta->backup_time = 0; if (meta->rebuild_lba64 == 0x2122232425262728) meta->rebuild_lba64 = UINT64_MAX; } @@ -793,7 +796,7 @@ nofit: sd->sd_rebuild_pos = 0; else { sd->sd_rebuild_pos = - (((off_t)pd->pd_meta[sdn]->disk_rebuild << 32) + + (((off_t)pd->pd_meta[sdn]->disk_rebuild_high << 32) + pd->pd_meta[sdn]->disk_rebuild) * 512; } } else if (!(meta->disks[md_disk_pos].flags & PROMISE_F_ONLINE)) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 03:41:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9079D32E for ; Thu, 17 Jan 2013 03:41:23 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by mx1.freebsd.org (Postfix) with ESMTP id 02FA6799 for ; Thu, 17 Jan 2013 03:41:22 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id eb20so1018401lab.31 for ; Wed, 16 Jan 2013 19:41:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=teeKrHj9lJDjzm17y09JVV6TCs9lMPkl+GjnDlFmRAo=; b=No3hWx1G/aG4/ygIunsEJYWmv2QF/pG4tD4buqH/tlXQe7PG1QBBG203rOENc0+Mr7 M1Amt2czeKr8DT9vjAMAh9HJW6pHTgE1I/NAhXLH51pjPBTdwOZvVbw9Mp0yXnyRf9bc je9IDV8Q9A+hqg+tj4BG4WD6vUIRMOBXqrJL0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=teeKrHj9lJDjzm17y09JVV6TCs9lMPkl+GjnDlFmRAo=; b=l7oBsBdMav2hYEvXbjT0QTb/QtxBw3kMceUKKYDJzskY6hxnLcVdkXhz4IigH6r6Y1 gjhK3+5yrHBspGXZQWgxl0vXg/RSZ9l3nc6cYyFDJMFsSyXDNREdUuqfBGp6ZD5i2APA xVZhFV4Rpk77UjRx/eE1g2S3E7wlAIrhU0iHDrCMEJOHUCHP33BCIx6wgQ++zKPEyE9I pn/1riG1n3NLh+1dFb3GmQMfL5qLivNVbcQpgMSUkPfjY0R19KaaBdHwgBaEk5IZboP9 ck0SzZY0r3GjB4W89JjH6hGRBA1rZVdy0LFSrEZ92Wl5goCP/QTKI0v2fxBbstmurnaQ Y7Aw== X-Received: by 10.152.125.136 with SMTP id mq8mr3286904lab.41.1358394081599; Wed, 16 Jan 2013 19:41:21 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Wed, 16 Jan 2013 19:40:51 -0800 (PST) In-Reply-To: <20130117130740.I1066@besplex.bde.org> References: <201301161815.r0GIFQPk007553@svn.freebsd.org> <20130117130740.I1066@besplex.bde.org> From: Eitan Adler Date: Wed, 16 Jan 2013 22:40:51 -0500 X-Google-Sender-Auth: MvjbaOfpgIqbw6yjJMROFwC1Rfs Message-ID: Subject: Re: svn commit: r245506 - head/bin/pwait To: Bruce Evans Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmsze5+PJd2YFLs28HhygPSC/wYtvp1jrBLla5qolmbzFLSq6LVDfHzvO9KFyYNfB7LbSAc Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 03:41:23 -0000 On 16 January 2013 21:25, Bruce Evans wrote: > This uses the sysexits mistake. style(9) was fixed to not give an example > of this mistake. Before this, sysexits was used a whole once in pwait(1) > (for EX_USAGE) in usage(). EX_USAGE happens to be 64. As usual when the > mistake is used, this is useless for humans (the usage message gives more > info) and unusable for programs, especially since it is undocmented > (pwait(1)'s man page just says ">0 if an error occurs". It doesn't even > use '.Std' for this, but hard-codes it. IMHO using sysexits gives more signal than using a binary 0 or 1. It is a mistake to have changed style(9) to avoid using sysexits. Instead the man page should detail the specific error that occurs directly, or by reference to sysexit. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 04:20:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 22A87327; Thu, 17 Jan 2013 04:20:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 15A9484E; Thu, 17 Jan 2013 04:20:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H4KVkB092614; Thu, 17 Jan 2013 04:20:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H4KVOb092613; Thu, 17 Jan 2013 04:20:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301170420.r0H4KVOb092613@svn.freebsd.org> From: Eitan Adler Date: Thu, 17 Jan 2013 04:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245535 - head/bin/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 04:20:32 -0000 Author: eadler Date: Thu Jan 17 04:20:31 2013 New Revision: 245535 URL: http://svnweb.freebsd.org/changeset/base/245535 Log: Remove useless variable 'Pflag': -P is an alternative to -H and -L, and it is implemented using the Hflag and Lflag variables. Approved by: cperciva MFC after: 3 days Modified: head/bin/cp/cp.c Modified: head/bin/cp/cp.c ============================================================================== --- head/bin/cp/cp.c Thu Jan 17 03:27:53 2013 (r245534) +++ head/bin/cp/cp.c Thu Jan 17 04:20:31 2013 (r245535) @@ -98,30 +98,28 @@ main(int argc, char *argv[]) { struct stat to_stat, tmp_stat; enum op type; - int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash; + int Hflag, Lflag, ch, fts_options, r, have_trailing_slash; char *target; fts_options = FTS_NOCHDIR | FTS_PHYSICAL; - Hflag = Lflag = Pflag = 0; + Hflag = Lflag = 0; while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) switch (ch) { case 'H': Hflag = 1; - Lflag = Pflag = 0; + Lflag = 0; break; case 'L': Lflag = 1; - Hflag = Pflag = 0; + Hflag = 0; break; case 'P': - Pflag = 1; Hflag = Lflag = 0; break; case 'R': Rflag = 1; break; case 'a': - Pflag = 1; pflag = 1; Rflag = 1; Hflag = Lflag = 0; @@ -146,7 +144,7 @@ main(int argc, char *argv[]) break; case 'r': rflag = Lflag = 1; - Hflag = Pflag = 0; + Hflag = 0; break; case 'v': vflag = 1; From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 04:20:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7180D554; Thu, 17 Jan 2013 04:20:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 55BD88B3; Thu, 17 Jan 2013 04:20:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H4Ks8m092838; Thu, 17 Jan 2013 04:20:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H4Ks7N092837; Thu, 17 Jan 2013 04:20:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301170420.r0H4Ks7N092837@svn.freebsd.org> From: Eitan Adler Date: Thu, 17 Jan 2013 04:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245536 - head/tools/tools/notescheck X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 04:20:54 -0000 Author: eadler Date: Thu Jan 17 04:20:53 2013 New Revision: 245536 URL: http://svnweb.freebsd.org/changeset/base/245536 Log: Convert to Python 3 Approved by: cperciva Modified: head/tools/tools/notescheck/notescheck.py Modified: head/tools/tools/notescheck/notescheck.py ============================================================================== --- head/tools/tools/notescheck/notescheck.py Thu Jan 17 04:20:31 2013 (r245535) +++ head/tools/tools/notescheck/notescheck.py Thu Jan 17 04:20:53 2013 (r245536) @@ -12,9 +12,9 @@ import os.path import sys def usage(): - print >>sys.stderr, "notescheck " - print >>sys.stderr - print >>sys.stderr, "Where 'path' is a path to a kernel source tree." + print("notescheck ", file=sys.stderr) + print(file=sys.stderr) + print("Where 'path' is a path to a kernel source tree.", file=sys.stderr) # These files are used to determine if a path is a valid kernel source tree. requiredfiles = ['conf/files', 'conf/options', 'conf/NOTES'] @@ -62,9 +62,9 @@ class Option: self.type = type self.type_location = location elif self.type != type: - print "WARN: Attempt to change type of %s from %s to %s%s" % \ - (self.name, self.type, type, location) - print " Previous type set%s" % (self.type_location) + print("WARN: Attempt to change type of %s from %s to %s%s" % \ + (self.name, self.type, type, location)) + print(" Previous type set%s" % (self.type_location)) def add_define(self, platform): self.defines.add(platform) @@ -93,8 +93,8 @@ class Option: if global_platform in self.defines: # If the device is defined globally ans is never tested, whine. if len(self.tests) == 0: - print 'WARN: %s is defined globally but never tested' % \ - (self.title()) + print('WARN: %s is defined globally but never tested' % \ + (self.title())) return # If the device is defined globally and is tested on @@ -106,25 +106,25 @@ class Option: # If a device is defined globally but is only tested on a # single MD platform, then whine about this. - print 'WARN: %s is defined globally but only tested in %s NOTES' % \ - (self.title(), format_set(self.tests)) + print('WARN: %s is defined globally but only tested in %s NOTES' % \ + (self.title(), format_set(self.tests))) return # If an option or device is never tested, whine. if len(self.tests) == 0: - print 'WARN: %s is defined in %s but never tested' % \ - (self.title(), format_set(self.defines)) + print('WARN: %s is defined in %s but never tested' % \ + (self.title(), format_set(self.defines))) return # The set of MD platforms where this option is defined, but not tested. notest = self.defines - self.tests if len(notest) != 0: - print 'WARN: %s is not tested in %s NOTES' % \ - (self.title(), format_set(notest)) + print('WARN: %s is not tested in %s NOTES' % \ + (self.title(), format_set(notest))) return - print 'ERROR: bad state for %s: defined in %s, tested in %s' % \ - (self.title(), format_set(self.defines), format_set(self.tests)) + print('ERROR: bad state for %s: defined in %s, tested in %s' % \ + (self.title(), format_set(self.defines), format_set(self.tests))) # This class maintains a dictionary of options keyed by name. class Options: @@ -143,7 +143,7 @@ class Options: # Warn about inconsistencies def warn(self): - keys = self.options.keys() + keys = list(self.options.keys()) keys.sort() for key in keys: option = self.options[key] @@ -158,11 +158,11 @@ def find_platforms(tree): platforms = [] for file in glob.glob(tree + '*/conf/NOTES'): if not file.startswith(tree): - print >>sys.stderr, "Bad MD NOTES file %s" %(file) + print("Bad MD NOTES file %s" %(file), file=sys.stderr) sys.exit(1) platforms.append(file[len(tree):].split('/')[0]) if global_platform in platforms: - print >>sys.stderr, "Found MD NOTES file for global platform" + print("Found MD NOTES file for global platform", file=sys.stderr) sys.exit(1) return platforms @@ -224,7 +224,7 @@ def tokenize(line): # will contain 'number of quotes' + 1 entries, so it should have # an odd number of entries. if len(groups) % 2 == 0: - print >>sys.stderr, "Failed to tokenize: %s%s" (line, location) + print("Failed to tokenize: %s%s" (line, location), file=sys.stderr) return [] # String split all the "odd" groups since they are not quoted strings. @@ -256,7 +256,7 @@ def parse_files_line(line, platform): # Remaining lines better be optional or mandatory lines. if words[1] != 'optional' and words[1] != 'mandatory': - print >>sys.stderr, "Invalid files line: %s%s" % (line, location) + print("Invalid files line: %s%s" % (line, location), file=sys.stderr) # Drop the first two words and begin parsing keywords and devices. skip = False @@ -334,7 +334,7 @@ def main(argv=None): tree = tree + '/' for file in requiredfiles: if not os.path.exists(tree + file): - print>> sys.stderr, "Kernel source tree missing %s" % (file) + print("Kernel source tree missing %s" % (file), file=sys.stderr) return 1 platforms = find_platforms(tree) From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 05:56:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 573528BA; Thu, 17 Jan 2013 05:56:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6596D8; Thu, 17 Jan 2013 05:56:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H5uXJV020027; Thu, 17 Jan 2013 05:56:33 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H5uTw0020003; Thu, 17 Jan 2013 05:56:29 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301170556.r0H5uTw0020003@svn.freebsd.org> From: Andrew Turner Date: Thu, 17 Jan 2013 05:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245539 - in head: contrib/gcc/config/arm gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov gnu/lib/libstdc++ gnu/usr.bin/cc gnu/usr.bin/cc/c++filt gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gn... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 05:56:33 -0000 Author: andrew Date: Thu Jan 17 05:56:28 2013 New Revision: 245539 URL: http://svnweb.freebsd.org/changeset/base/245539 Log: Add compiler support for the ARM EABI. ARM EABI support is disabled by default and can be enabled by setting WITH_ARM_EABI when building, however only the kernel-toolchain target will work with this flag until the rest of the support is added. Added: head/tools/build/options/WITH_ARM_EABI (contents, props changed) Modified: head/contrib/gcc/config/arm/freebsd.h head/gnu/lib/csu/Makefile head/gnu/lib/libgcc/Makefile head/gnu/lib/libgcov/Makefile head/gnu/lib/libstdc++/Makefile head/gnu/usr.bin/cc/Makefile.inc head/gnu/usr.bin/cc/c++filt/Makefile head/gnu/usr.bin/cc/cc1/Makefile head/gnu/usr.bin/cc/cc1plus/Makefile head/gnu/usr.bin/cc/cc_int/Makefile head/gnu/usr.bin/cc/cc_tools/Makefile head/gnu/usr.bin/cc/doc/Makefile head/gnu/usr.bin/cc/gcov/Makefile head/gnu/usr.bin/cc/include/Makefile head/gnu/usr.bin/cc/libcpp/Makefile head/gnu/usr.bin/cc/libdecnumber/Makefile head/gnu/usr.bin/cc/libiberty/Makefile head/share/mk/bsd.own.mk Modified: head/contrib/gcc/config/arm/freebsd.h ============================================================================== --- head/contrib/gcc/config/arm/freebsd.h Thu Jan 17 05:55:53 2013 (r245538) +++ head/contrib/gcc/config/arm/freebsd.h Thu Jan 17 05:56:28 2013 (r245539) @@ -29,8 +29,13 @@ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } #undef SUBTARGET_EXTRA_ASM_SPEC +#ifdef TARGET_ARM_EABI +#define SUBTARGET_EXTRA_ASM_SPEC \ + "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4} %{fpic|fpie:-k} %{fPIC|fPIE:-k}" +#else #define SUBTARGET_EXTRA_ASM_SPEC \ "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}" +#endif /* Default to full FPA if -mhard-float is specified. */ #undef SUBTARGET_ASM_FLOAT_SPEC @@ -61,8 +66,25 @@ #define TARGET_ENDIAN_DEFAULT 0 #endif +#ifdef TARGET_ARM_EABI +/* We default to a soft-float ABI so that binaries can run on all + target hardware. */ +#undef TARGET_DEFAULT_FLOAT_ABI +#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT + +#undef ARM_DEFAULT_ABI +#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX + +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + FBSD_TARGET_OS_CPP_BUILTINS(); \ + TARGET_BPABI_CPP_BUILTINS(); \ + } \ + while (false) +#else /* Default it to use ATPCS with soft-VFP. */ -#undef TARGET_DEFAULT #define TARGET_DEFAULT \ (MASK_APCS_FRAME \ | TARGET_ENDIAN_DEFAULT) @@ -70,6 +92,10 @@ #undef ARM_DEFAULT_ABI #define ARM_DEFAULT_ABI ARM_ABI_ATPCS +#undef FPUTYPE_DEFAULT +#define FPUTYPE_DEFAULT FPUTYPE_VFP +#endif + /* Define the actual types of some ANSI-mandated types. Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ @@ -134,5 +160,3 @@ do \ } \ while (0) -#undef FPUTYPE_DEFAULT -#define FPUTYPE_DEFAULT FPUTYPE_VFP Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/lib/csu/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -24,6 +24,10 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${MACHINE_CPUARCH} == "ia64" BEGINSRC= crtbegin.asm ENDSRC= crtend.asm Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/lib/libgcc/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -15,6 +15,10 @@ MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${TARGET_CPUARCH} == "mips" LIB= gcc .endif @@ -55,10 +59,13 @@ LIB2FUNCS+= _fixuns${mode}si .endfor # Likewise double-word routines. +.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no" +# These are implemented in an ARM specific file but will not be filtered out .for mode in sf df xf tf LIB2FUNCS+= _fix${mode}di _fixuns${mode}di LIB2FUNCS+= _floatdi${mode} _floatundi${mode} .endfor +.endif LIB2ADD = $(LIB2FUNCS_EXTRA) LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) @@ -115,15 +122,14 @@ CFLAGS+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func -LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c +.if ${MK_ARM_EABI} != "no" +LIB1ASMFUNCS+= _addsubdf3 _addsubsf3 _cmpdf2 _cmpsf2 _fixdfsi _fixsfsi \ + _fixunsdfsi _fixunsdfsi _muldivdf3 _muldivsf3 _udivsi3 -# Not now -#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func -#LIB1ASMFUNCS+= _call_via_rX _interwork_call_via_rX \ -# _lshrdi3 _ashrdi3 _ashldi3 \ -# _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ -# _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -# _fixsfsi _fixunssfsi _floatdidf _floatdisf +LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c +.else +LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c +.endif .endif .if ${TARGET_CPUARCH} == mips @@ -329,6 +335,9 @@ CLEANFILES += cs-*.h option* SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk SHLIB_MKMAP_OPTS = SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver +.endif VERSION_MAP = libgcc.map libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/} Modified: head/gnu/lib/libgcov/Makefile ============================================================================== --- head/gnu/lib/libgcov/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/lib/libgcov/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -15,6 +15,11 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. + +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + # # Library members defined in libgcov.c. # Defined in libgcov.c, included only in gcov library Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/lib/libstdc++/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + GCCVER= 4.2 GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -14,7 +16,7 @@ LIB= stdc++ SHLIB_MAJOR= 6 CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 .endif CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include @@ -594,7 +596,13 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h CLEANFILES+= ${THRHDRS} +.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +unwind.h: ${GCCDIR}/config/arm/unwind-arm.h +.else unwind.h: ${GCCDIR}/unwind-generic.h +.endif + +unwind.h: ln -sf ${.ALLSRC} ${.TARGET} SRCS+= unwind.h Modified: head/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- head/gnu/usr.bin/cc/Makefile.inc Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/Makefile.inc Thu Jan 17 05:56:28 2013 (r245539) @@ -26,6 +26,10 @@ CSTD?= gnu89 CFLAGS+= -DCROSS_COMPILE .endif +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif Modified: head/gnu/usr.bin/cc/c++filt/Makefile ============================================================================== --- head/gnu/usr.bin/cc/c++filt/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/c++filt/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,8 @@ # $FreeBSD$ +NO_MAN= +.include + .include "../Makefile.inc" .include "../Makefile.fe" @@ -7,7 +10,6 @@ PROG= c++filt SRCS= cp-demangle.c -NO_MAN= CFLAGS+= -DSTANDALONE_DEMANGLER -DVERSION=\"$(GCC_VERSION)\" Modified: head/gnu/usr.bin/cc/cc1/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc1/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/cc1/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,9 +1,10 @@ # $FreeBSD$ -.include "../Makefile.inc" NO_MAN= .include +.include "../Makefile.inc" + .PATH: ${GCCDIR} PROG= cc1 Modified: head/gnu/usr.bin/cc/cc1plus/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc1plus/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/cc1plus/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,9 +1,10 @@ # $FreeBSD$ -.include "../Makefile.inc" NO_MAN= .include +.include "../Makefile.inc" + .PATH: ${GCCDIR}/cp ${GCCDIR} PROG= cc1plus Modified: head/gnu/usr.bin/cc/cc_int/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_int/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/cc_int/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.ver" Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -51,6 +51,9 @@ TARGET_INC+= ${GCC_CPU}/elf.h .endif .if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/aout.h +.if ${MK_ARM_EABI} != "no" +TARGET_INC+= ${GCC_CPU}/bpabi.h +.endif .endif .if ${TARGET_ARCH} == "powerpc64" TARGET_INC+= ${GCC_CPU}/biarch64.h @@ -349,7 +352,13 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h GENSRCS+= gthr-default.h +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +unwind.h: ${GCCDIR}/config/arm/unwind-arm.h +.else unwind.h: ${GCCDIR}/unwind-generic.h +.endif + +unwind.h: ln -sf ${.ALLSRC} ${.TARGET} GENSRCS+= unwind.h Modified: head/gnu/usr.bin/cc/doc/Makefile ============================================================================== --- head/gnu/usr.bin/cc/doc/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/doc/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.ver" Modified: head/gnu/usr.bin/cc/gcov/Makefile ============================================================================== --- head/gnu/usr.bin/cc/gcov/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/gcov/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.ver" Modified: head/gnu/usr.bin/cc/include/Makefile ============================================================================== --- head/gnu/usr.bin/cc/include/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/include/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" INCSDIR=${INCLUDEDIR}/gcc/${GCCVER} Modified: head/gnu/usr.bin/cc/libcpp/Makefile ============================================================================== --- head/gnu/usr.bin/cc/libcpp/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/libcpp/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # Use our headers in preference to ones from ../cc_tools. CFLAGS+= -I${.CURDIR} -I. Modified: head/gnu/usr.bin/cc/libdecnumber/Makefile ============================================================================== --- head/gnu/usr.bin/cc/libdecnumber/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/libdecnumber/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # Use our headers in preference to ones from ../cc_tools. CFLAGS+= -I${.CURDIR} -I. Modified: head/gnu/usr.bin/cc/libiberty/Makefile ============================================================================== --- head/gnu/usr.bin/cc/libiberty/Makefile Thu Jan 17 05:55:53 2013 (r245538) +++ head/gnu/usr.bin/cc/libiberty/Makefile Thu Jan 17 05:56:28 2013 (r245539) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # # Make sure we will pick up our config.h file first, not the one from # cc_tools. Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Thu Jan 17 05:55:53 2013 (r245538) +++ head/share/mk/bsd.own.mk Thu Jan 17 05:56:28 2013 (r245539) @@ -343,6 +343,7 @@ __DEFAULT_YES_OPTIONS = \ ZONEINFO __DEFAULT_NO_OPTIONS = \ + ARM_EABI \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ Added: head/tools/build/options/WITH_ARM_EABI ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_ARM_EABI Thu Jan 17 05:56:28 2013 (r245539) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set the ARM ABI to EABI. From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 09:34:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C188081D; Thu, 17 Jan 2013 09:34:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9DD96F43; Thu, 17 Jan 2013 09:34:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H9Y0xN085144; Thu, 17 Jan 2013 09:34:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H9Y0jZ085143; Thu, 17 Jan 2013 09:34:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201301170934.r0H9Y0jZ085143@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 17 Jan 2013 09:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245547 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 09:34:00 -0000 Author: bz Date: Thu Jan 17 09:34:00 2013 New Revision: 245547 URL: http://svnweb.freebsd.org/changeset/base/245547 Log: Regen after adding WITH_OPENSSH_NONE_CIPHER in r245527. PR: bin/163095 MFC after: 10 days Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Jan 17 08:59:11 2013 (r245546) +++ head/share/man/man5/src.conf.5 Thu Jan 17 09:34:00 2013 (r245547) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd January 14, 2013 +.Dd January 17, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -805,7 +805,7 @@ Set to not build NLS catalogs. Set to not build NLS catalog support for .Xr csh 1 . .It Va WITH_NMTREE -.\" from FreeBSD: head/tools/build/options/WITH_NMTREE 245241 2013-01-09 21:07:08Z brooks +.\" from FreeBSD: head/tools/build/options/WITH_NMTREE 245435 2013-01-14 20:38:32Z brooks Set to install .Xr nmtree 8 as @@ -835,6 +835,16 @@ Infiniband software stack. .It Va WITHOUT_OPENSSH .\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. +.It Va WITH_OPENSSH_NONE_CIPHER +.\" from FreeBSD: head/tools/build/options/WITH_OPENSSH_NONE_CIPHER 245527 2013-01-17 01:51:04Z bz +Set to include the "None" cipher support in OpenSSH and its libraries. +Additional adjustments may need to be done to system configuration +files, such as +.Xr sshd_config 5 , +to enable this cipher. +Please see +.Pa /usr/src/crypto/openssh/README.hpn +for full details. .It Va WITHOUT_OPENSSL .\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 09:37:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D603D9CF; Thu, 17 Jan 2013 09:37:43 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C85F9F6C; Thu, 17 Jan 2013 09:37:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H9bhHs085652; Thu, 17 Jan 2013 09:37:43 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H9bh4B085646; Thu, 17 Jan 2013 09:37:43 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301170937.r0H9bh4B085646@svn.freebsd.org> From: Andrew Turner Date: Thu, 17 Jan 2013 09:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245548 - in head/sys: conf libkern/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 09:37:43 -0000 Author: andrew Date: Thu Jan 17 09:37:42 2013 New Revision: 245548 URL: http://svnweb.freebsd.org/changeset/base/245548 Log: Add the required __aeabi_* functions the kernel uses when built for ARM EABI Added: head/sys/libkern/arm/ldivmod.S (contents, props changed) head/sys/libkern/arm/ldivmod_helper.c (contents, props changed) Modified: head/sys/conf/files.arm head/sys/libkern/arm/divsi3.S Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Jan 17 09:34:00 2013 (r245547) +++ head/sys/conf/files.arm Thu Jan 17 09:37:42 2013 (r245548) @@ -74,6 +74,8 @@ kern/subr_busdma_bufalloc.c standard kern/subr_dummy_vdso_tc.c standard libkern/arm/divsi3.S standard libkern/arm/ffs.S standard +libkern/arm/ldivmod.S standard +libkern/arm/ldivmod_helper.c standard libkern/arm/muldi3.c standard libkern/ashldi3.c standard libkern/ashrdi3.c standard Modified: head/sys/libkern/arm/divsi3.S ============================================================================== --- head/sys/libkern/arm/divsi3.S Thu Jan 17 09:34:00 2013 (r245547) +++ head/sys/libkern/arm/divsi3.S Thu Jan 17 09:37:42 2013 (r245548) @@ -49,6 +49,10 @@ ENTRY_NP(__modsi3) #endif RET +#ifdef __ARM_EABI__ +ENTRY_NP(__aeabi_uidiv) +ENTRY_NP(__aeabi_uidivmod) +#endif ENTRY_NP(__udivsi3) .L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */ eor r0, r1, r0 @@ -71,6 +75,10 @@ ENTRY_NP(__udivsi3) mov r1, #0 RET +#ifdef __ARM_EABI__ +ENTRY_NP(__aeabi_idiv) +ENTRY_NP(__aeabi_idivmod) +#endif ENTRY_NP(__divsi3) .L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */ eor r0, r1, r0 Added: head/sys/libkern/arm/ldivmod.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm/ldivmod.S Thu Jan 17 09:37:42 2013 (r245548) @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2012 Andrew Turner + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifdef __ARM_EABI__ + +/* + * These calculate: + * q = n / m + * With a remainer r. + * + * They take n in {r0, r1} and m in {r2, r3} then pass them into the + * helper function. The hepler functions return q in {r0, r1} as + * required by the API spec however r is returned on the stack. The + * ABI required us to return r in {r2, r3}. + * + * We need to allocate 8 bytes on the stack to store r, the link + * register, and a pointer to the space where the helper function + * will write r to. After returning from the helper fuinction we load + * the old link register and r from the stack and return. + */ +ENTRY_NP(__aeabi_ldivmod) + sub sp, sp, #8 /* Space for the remainder */ + stmfd sp!, {sp, lr} /* Save a pointer to the above space and lr */ + bl PIC_SYM(_C_LABEL(__kern_ldivmod), PLT) + ldr lr, [sp, #4] /* Restore lr */ + add sp, sp, #8 /* Move sp to the remainder value */ + ldmfd sp!, {r2, r3} /* Load the remainder */ + RET + +ENTRY_NP(__aeabi_uldivmod) + sub sp, sp, #8 /* Space for the remainder */ + stmfd sp!, {sp, lr} /* Save a pointer to the above space and lr */ + bl PIC_SYM(_C_LABEL(__qdivrem), PLT) + ldr lr, [sp, #4] /* Restore lr */ + add sp, sp, #8 /* Move sp to the remainder value */ + ldmfd sp!, {r2, r3} /* Load the remainder */ + RET + +#endif + Added: head/sys/libkern/arm/ldivmod_helper.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm/ldivmod_helper.c Thu Jan 17 09:37:42 2013 (r245548) @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2012 Andrew Turner + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifdef __ARM_EABI__ +#include + +/* + * Helper for __aeabi_ldivmod. + * TODO: __divdi3 calls __qdivrem. We should do the same and use the + * remainder value rather than re-calculating it. + */ +long long __kern_ldivmod(long long, long long, long long *); + +long long +__kern_ldivmod(long long n, long long m, long long *rem) +{ + long long q; + + q = __divdi3(n, m); /* q = n / m */ + *rem = n - m * q; + + return q; +} + +#endif + From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 09:38:13 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6585AB49; Thu, 17 Jan 2013 09:38:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id E2AC8F79; Thu, 17 Jan 2013 09:38:12 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id r0H9cBBN001589; Thu, 17 Jan 2013 13:38:11 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id r0H9cBM2001588; Thu, 17 Jan 2013 13:38:11 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 17 Jan 2013 13:38:11 +0400 From: Gleb Smirnoff To: Hiroki Sato Subject: Re: svn commit: r245525 - head/etc/rc.d Message-ID: <20130117093811.GJ96599@FreeBSD.org> References: <201301170127.r0H1Re6Y038117@svn.freebsd.org> <20130117.110723.1450987474949438621.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130117.110723.1450987474949438621.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 09:38:13 -0000 On Thu, Jan 17, 2013 at 11:07:23AM +0900, Hiroki Sato wrote: H> bz> Author: bz H> bz> Date: Thu Jan 17 01:27:39 2013 H> bz> New Revision: 245525 H> bz> URL: http://svnweb.freebsd.org/changeset/base/245525 H> bz> H> bz> Log: H> bz> Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. H> bz> Do this per jail started, not per address. This will allow DAD to complete H> bz> and services to properly start. Before we have seen problems with services H> bz> trying to start before the IPv6 address was available to use and thus H> bz> erroring and failing to start. H> bz> H> bz> MFC after: 3 days H> H> This may be too pedantic, but I think this delay should use H> DupAddrDetectTransmits (net.inet6.ip6.dad_count). The default value H> of RETRANS_TIMER and MAX_RTR_SOLICITATION_DELAY in RFC 4861 is 1 sec, H> so the theoretical delay value is (DupAddrDetectTransmits * H> RETRANS_TIMER + MAX_RTR_SOLICITATION_DELAY). The rc.d/netif script H> uses this value (typically 2 seconds) for DAD. H> H> I understand a simple 1 second delay works in practice, though. I'd prefer even a sleep loop that exits once address is avaialable. An example is in ports/net/zebra/files/zebra.sh.in. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 09:47:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A7ED4E64; Thu, 17 Jan 2013 09:47:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8267EFCA; Thu, 17 Jan 2013 09:47:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H9lvZu088576; Thu, 17 Jan 2013 09:47:57 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H9lvRG088575; Thu, 17 Jan 2013 09:47:57 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301170947.r0H9lvRG088575@svn.freebsd.org> From: Andrew Turner Date: Thu, 17 Jan 2013 09:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245549 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 09:47:57 -0000 Author: andrew Date: Thu Jan 17 09:47:56 2013 New Revision: 245549 URL: http://svnweb.freebsd.org/changeset/base/245549 Log: Implement stack unwinding based on section 9 of the "Exception handling ABI for the ARM architecture" documentation. The unwind tables are currently not stored in the kernel but will be added later. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Thu Jan 17 09:37:42 2013 (r245548) +++ head/sys/arm/arm/db_trace.c Thu Jan 17 09:47:56 2013 (r245549) @@ -50,6 +50,395 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __ARM_EABI__ +/* + * Definitions for the instruction interpreter. + * + * The ARM EABI specifies how to perform the frame unwinding in the + * Exception Handling ABI for the ARM Architecture document. To perform + * the unwind we need to know the initial frame pointer, stack pointer, + * link register and program counter. We then find the entry within the + * index table that points to the function the program counter is within. + * This gives us either a list of three instructions to process, a 31-bit + * relative offset to a table of instructions, or a value telling us + * we can't unwind any further. + * + * When we have the instructions to process we need to decode them + * following table 4 in section 9.3. This describes a collection of bit + * patterns to encode that steps to take to update the stack pointer and + * link register to the correct values at the start of the function. + */ + +/* A special case when we are unable to unwind past this function */ +#define EXIDX_CANTUNWIND 1 + +/* The register names */ +#define FP 11 +#define SP 13 +#define LR 14 +#define PC 15 + +/* + * These are set in the linker script. Their addresses will be + * either the start or end of the exception table or index. + */ +extern int extab_start, extab_end, exidx_start, exidx_end; + +/* + * Entry types. + * These are the only entry types that have been seen in the kernel. + */ +#define ENTRY_MASK 0xff000000 +#define ENTRY_ARM_SU16 0x80000000 +#define ENTRY_ARM_LU16 0x81000000 + +/* Instruction masks. */ +#define INSN_VSP_MASK 0xc0 +#define INSN_VSP_SIZE_MASK 0x3f +#define INSN_STD_MASK 0xf0 +#define INSN_STD_DATA_MASK 0x0f +#define INSN_POP_TYPE_MASK 0x08 +#define INSN_POP_COUNT_MASK 0x07 +#define INSN_VSP_LARGE_INC_MASK 0xff + +/* Instruction definitions */ +#define INSN_VSP_INC 0x00 +#define INSN_VSP_DEC 0x40 +#define INSN_POP_MASKED 0x80 +#define INSN_VSP_REG 0x90 +#define INSN_POP_COUNT 0xa0 +#define INSN_FINISH 0xb0 +#define INSN_VSP_LARGE_INC 0xb2 + +/* An item in the exception index table */ +struct unwind_idx { + uint32_t offset; + uint32_t insn; +}; + +/* The state of the unwind process */ +struct unwind_state { + uint32_t registers[16]; + uint32_t start_pc; + uint32_t *insn; + u_int entries; + u_int byte; + uint16_t update_mask; +}; + +/* We need to provide these but never use them */ +void __aeabi_unwind_cpp_pr0(void); +void __aeabi_unwind_cpp_pr1(void); +void __aeabi_unwind_cpp_pr2(void); + +void +__aeabi_unwind_cpp_pr0(void) +{ + panic("__aeabi_unwind_cpp_pr0"); +} + +void +__aeabi_unwind_cpp_pr1(void) +{ + panic("__aeabi_unwind_cpp_pr1"); +} + +void +__aeabi_unwind_cpp_pr2(void) +{ + panic("__aeabi_unwind_cpp_pr2"); +} + +/* Expand a 31-bit signed value to a 32-bit signed value */ +static __inline int32_t +db_expand_prel31(uint32_t prel31) +{ + + return ((int32_t)(prel31 & 0x7fffffffu) << 1) / 2; +} + +/* + * Perform a binary search of the index table to find the function + * with the largest address that doesn't exceed addr. + */ +static struct unwind_idx * +db_find_index(uint32_t addr) +{ + unsigned int min, mid, max; + struct unwind_idx *start; + struct unwind_idx *item; + int32_t prel31_addr; + uint32_t func_addr; + + start = (struct unwind_idx *)&exidx_start; + + min = 0; + max = (&exidx_end - &exidx_start) / 2; + + while (min != max) { + mid = min + (max - min + 1) / 2; + + item = &start[mid]; + + prel31_addr = db_expand_prel31(item->offset); + func_addr = (uint32_t)&item->offset + prel31_addr; + + if (func_addr <= addr) { + min = mid; + } else { + max = mid - 1; + } + } + + return &start[min]; +} + +/* Reads the next byte from the instruction list */ +static uint8_t +db_unwind_exec_read_byte(struct unwind_state *state) +{ + uint8_t insn; + + /* Read the unwind instruction */ + insn = (*state->insn) >> (state->byte * 8); + + /* Update the location of the next instruction */ + if (state->byte == 0) { + state->byte = 3; + state->insn++; + state->entries--; + } else + state->byte--; + + return insn; +} + +/* Executes the next instruction on the list */ +static int +db_unwind_exec_insn(struct unwind_state *state) +{ + unsigned int insn; + uint32_t *vsp = (uint32_t *)state->registers[SP]; + int update_vsp = 0; + + /* This should never happen */ + if (state->entries == 0) + return 1; + + /* Read the next instruction */ + insn = db_unwind_exec_read_byte(state); + + if ((insn & INSN_VSP_MASK) == INSN_VSP_INC) { + state->registers[SP] += ((insn & INSN_VSP_SIZE_MASK) << 2) + 4; + + } else if ((insn & INSN_VSP_MASK) == INSN_VSP_DEC) { + state->registers[SP] -= ((insn & INSN_VSP_SIZE_MASK) << 2) + 4; + + } else if ((insn & INSN_STD_MASK) == INSN_POP_MASKED) { + unsigned int mask, reg; + + /* Load the mask */ + mask = db_unwind_exec_read_byte(state); + mask |= (insn & INSN_STD_DATA_MASK) << 8; + + /* We have a refuse to unwind instruction */ + if (mask == 0) + return 1; + + /* Update SP */ + update_vsp = 1; + + /* Load the registers */ + for (reg = 4; mask && reg < 16; mask >>= 1, reg++) { + if (mask & 1) { + state->registers[reg] = *vsp++; + state->update_mask |= 1 << reg; + + /* If we have updated SP kep its value */ + if (reg == SP) + update_vsp = 0; + } + } + + } else if ((insn & INSN_STD_MASK) == INSN_VSP_REG && + ((insn & INSN_STD_DATA_MASK) != 13) && + ((insn & INSN_STD_DATA_MASK) != 15)) { + /* sp = register */ + state->registers[SP] = + state->registers[insn & INSN_STD_DATA_MASK]; + + } else if ((insn & INSN_STD_MASK) == INSN_POP_COUNT) { + unsigned int count, reg; + + /* Read how many registers to load */ + count = insn & INSN_POP_COUNT_MASK; + + /* Update sp */ + update_vsp = 1; + + /* Pop the registers */ + for (reg = 4; reg <= 4 + count; reg++) { + state->registers[reg] = *vsp++; + state->update_mask |= 1 << reg; + } + + /* Check if we are in the pop r14 version */ + if ((insn & INSN_POP_TYPE_MASK) != 0) { + state->registers[14] = *vsp++; + } + + } else if (insn == INSN_FINISH) { + /* Stop processing */ + state->entries = 0; + + } else if ((insn & INSN_VSP_LARGE_INC_MASK) == INSN_VSP_LARGE_INC) { + unsigned int uleb128; + + /* Read the increment value */ + uleb128 = db_unwind_exec_read_byte(state); + + state->registers[SP] += 0x204 + (uleb128 << 2); + + } else { + /* We hit a new instruction that needs to be implemented */ + db_printf("Unhandled instruction %.2x\n", insn); + return 1; + } + + if (update_vsp) { + state->registers[SP] = (uint32_t)vsp; + } + +#if 0 + db_printf("fp = %08x, sp = %08x, lr = %08x, pc = %08x\n", + state->registers[FP], state->registers[SP], state->registers[LR], + state->registers[PC]); +#endif + + return 0; +} + +/* Performs the unwind of a function */ +static int +db_unwind_tab(struct unwind_state *state) +{ + uint32_t entry; + + /* Set PC to a known value */ + state->registers[PC] = 0; + + /* Read the personality */ + entry = *state->insn & ENTRY_MASK; + + if (entry == ENTRY_ARM_SU16) { + state->byte = 2; + state->entries = 1; + } else if (entry == ENTRY_ARM_LU16) { + state->byte = 1; + state->entries = ((*state->insn >> 16) & 0xFF) + 1; + } else { + db_printf("Unknown entry: %x\n", entry); + return 1; + } + + while (state->entries > 0) { + if (db_unwind_exec_insn(state) != 0) + return 1; + } + + /* + * The program counter was not updated, load it from the link register. + */ + if (state->registers[PC] == 0) + state->registers[PC] = state->registers[LR]; + + return 0; +} + +static void +db_stack_trace_cmd(struct unwind_state *state) +{ + struct unwind_idx *index; + const char *name; + db_expr_t value; + db_expr_t offset; + c_db_sym_t sym; + u_int reg, i; + char *sep; + + while (1) { + /* Reset the mask of updated registers */ + state->update_mask = 0; + + /* The pc value is correct and will be overwritten, save it */ + state->start_pc = state->registers[PC]; + + /* Find the item to run */ + index = db_find_index(state->start_pc); + + if (index->insn == EXIDX_CANTUNWIND) { + printf("Unable to unwind\n"); + break; + } else if (index->insn & (1 << 31)) { + /* The data is within the instruction */ + state->insn = &index->insn; + } else { + /* We have a prel31 offset to the unwind table */ + uint32_t prel31_tbl = db_expand_prel31(index->insn); + + state->insn = (uint32_t *)((uintptr_t)&index->insn + + prel31_tbl); + } + + /* Run the unwind function */ + if (db_unwind_tab(state) != 0) + break; + + /* This is not a kernel address, stop processing */ + if (state->registers[PC] < VM_MIN_KERNEL_ADDRESS) + break; + + /* Print the frame details */ + sym = db_search_symbol(state->start_pc, DB_STGY_ANY, &offset); + if (sym == C_DB_SYM_NULL) { + value = 0; + name = "(null)"; + } else + db_symbol_values(sym, &name, &value); + db_printf("%s() at ", name); + db_printsym(state->start_pc, DB_STGY_PROC); + db_printf("\n"); + db_printf("\t pc = 0x%08x lr = 0x%08x (", state->start_pc, + state->registers[LR]); + db_printsym(state->registers[LR], DB_STGY_PROC); + db_printf(")\n"); + db_printf("\t sp = 0x%08x fp = 0x%08x", + state->registers[SP], state->registers[FP]); + + /* Don't print the registers we have already printed */ + state->update_mask &= ~((1 << SP) | (1 << FP) | (1 << LR) | + (1 << PC)); + sep = "\n\t"; + for (i = 0, reg = 0; state->update_mask != 0; + state->update_mask >>= 1, reg++) { + if ((state->update_mask & 1) != 0) { + db_printf("%s%sr%d = 0x%08x", sep, + (reg < 10) ? " " : "", reg, + state->registers[reg]); + i++; + if (i == 2) { + sep = "\n\t"; + i = 0; + } else + sep = " "; + + } + } + db_printf("\n"); + } +} +#endif + /* * APCS stack frames are awkward beasts, so I don't think even trying to use * a structure to represent them is a good idea. @@ -78,6 +467,7 @@ __FBSDID("$FreeBSD$"); * fields are actually present. */ +#ifndef __ARM_EABI__ /* The frame format is differend in AAPCS */ static void db_stack_trace_cmd(db_expr_t addr, db_expr_t count, boolean_t kernel_only) { @@ -171,6 +561,7 @@ db_stack_trace_cmd(db_expr_t addr, db_ex } } } +#endif /* XXX stubs */ void @@ -193,11 +584,24 @@ db_md_set_watchpoint(db_expr_t addr, db_ int db_trace_thread(struct thread *thr, int count) { +#ifdef __ARM_EABI__ + struct unwind_state state; +#endif struct pcb *ctx; if (thr != curthread) { ctx = kdb_thr_ctx(thr); + +#ifdef __ARM_EABI__ + state.registers[FP] = ctx->un_32.pcb32_r11; + state.registers[SP] = ctx->un_32.pcb32_sp; + state.registers[LR] = ctx->un_32.pcb32_lr; + state.registers[PC] = ctx->un_32.pcb32_pc; + + db_stack_trace_cmd(&state); +#else db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1, TRUE); +#endif } else db_trace_self(); return (0); @@ -206,8 +610,20 @@ db_trace_thread(struct thread *thr, int void db_trace_self(void) { +#ifdef __ARM_EABI__ + struct unwind_state state; + register uint32_t sp __asm__ ("sp"); + + state.registers[FP] = (uint32_t)__builtin_frame_address(0); + state.registers[SP] = (uint32_t)sp; + state.registers[LR] = (uint32_t)__builtin_return_address(0); + state.registers[PC] = (uint32_t)db_trace_self; + + db_stack_trace_cmd(&state); +#else db_addr_t addr; addr = (db_addr_t)__builtin_frame_address(0); db_stack_trace_cmd(addr, -1, FALSE); +#endif } From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 09:52:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AA6151C1; Thu, 17 Jan 2013 09:52:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2DCFFA; Thu, 17 Jan 2013 09:52:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H9qalx090834; Thu, 17 Jan 2013 09:52:36 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H9qaEA090832; Thu, 17 Jan 2013 09:52:36 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301170952.r0H9qaEA090832@svn.freebsd.org> From: Andrew Turner Date: Thu, 17 Jan 2013 09:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245551 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 09:52:36 -0000 Author: andrew Date: Thu Jan 17 09:52:35 2013 New Revision: 245551 URL: http://svnweb.freebsd.org/changeset/base/245551 Log: * Correct KINFO_PROC_SIZE for ARM EABI. * Update the syscall interface to pass in the syscall value in register r7. Modified: head/sys/arm/arm/trap.c head/sys/arm/include/proc.h Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Thu Jan 17 09:50:18 2013 (r245550) +++ head/sys/arm/arm/trap.c Thu Jan 17 09:52:35 2013 (r245551) @@ -866,7 +866,11 @@ cpu_fetch_syscall_args(struct thread *td register_t *ap; int error; +#ifdef __ARM_EABI__ + sa->code = td->td_frame->tf_r7; +#else sa->code = sa->insn & 0x000fffff; +#endif ap = &td->td_frame->tf_r0; if (sa->code == SYS_syscall) { sa->code = *ap++; @@ -905,16 +909,18 @@ syscall(struct thread *td, trapframe_t * struct syscall_args sa; int error; +#ifndef __ARM_EABI__ sa.insn = *(uint32_t *)(frame->tf_pc - INSN_SIZE); switch (sa.insn & SWI_OS_MASK) { case 0: /* XXX: we need our own one. */ - sa.nap = 4; break; default: call_trapsignal(td, SIGILL, 0); userret(td, frame); return; } +#endif + sa.nap = 4; error = syscallenter(td, &sa); KASSERT(error != 0 || td->td_ar == NULL, Modified: head/sys/arm/include/proc.h ============================================================================== --- head/sys/arm/include/proc.h Thu Jan 17 09:50:18 2013 (r245550) +++ head/sys/arm/include/proc.h Thu Jan 17 09:52:35 2013 (r245551) @@ -60,7 +60,11 @@ struct mdproc { void *md_sigtramp; }; +#ifdef __ARM_EABI__ +#define KINFO_PROC_SIZE 816 +#else #define KINFO_PROC_SIZE 792 +#endif #define MAXARGS 8 struct syscall_args { @@ -69,7 +73,9 @@ struct syscall_args { register_t args[MAXARGS]; int narg; u_int nap; +#ifndef __ARM_EABI__ u_int32_t insn; +#endif }; #endif /* !_MACHINE_PROC_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 09:57:43 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6FF0038B; Thu, 17 Jan 2013 09:57:43 +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 F1FC799; Thu, 17 Jan 2013 09:57:42 +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 0473925D388E; Thu, 17 Jan 2013 09:57:42 +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 4F6A3BE84A0; Thu, 17 Jan 2013 09:57:41 +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 Gw1JnwO0C8UA; Thu, 17 Jan 2013 09:57:38 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 9B69FBE8466; Thu, 17 Jan 2013 09:57:38 +0000 (UTC) Date: Thu, 17 Jan 2013 09:57:37 +0000 (UTC) From: "Bjoern A. Zeeb" To: Gleb Smirnoff Subject: Re: svn commit: r245525 - head/etc/rc.d In-Reply-To: <20130117093811.GJ96599@FreeBSD.org> Message-ID: References: <201301170127.r0H1Re6Y038117@svn.freebsd.org> <20130117.110723.1450987474949438621.hrs@allbsd.org> <20130117093811.GJ96599@FreeBSD.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Hiroki Sato , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 09:57:43 -0000 On Thu, 17 Jan 2013, Gleb Smirnoff wrote: > On Thu, Jan 17, 2013 at 11:07:23AM +0900, Hiroki Sato wrote: > H> bz> Author: bz > H> bz> Date: Thu Jan 17 01:27:39 2013 > H> bz> New Revision: 245525 > H> bz> URL: http://svnweb.freebsd.org/changeset/base/245525 > H> bz> > H> bz> Log: > H> bz> Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. > H> bz> Do this per jail started, not per address. This will allow DAD to complete > H> bz> and services to properly start. Before we have seen problems with services > H> bz> trying to start before the IPv6 address was available to use and thus > H> bz> erroring and failing to start. > H> bz> > H> bz> MFC after: 3 days > H> > H> This may be too pedantic, but I think this delay should use > H> DupAddrDetectTransmits (net.inet6.ip6.dad_count). The default value > H> of RETRANS_TIMER and MAX_RTR_SOLICITATION_DELAY in RFC 4861 is 1 sec, > H> so the theoretical delay value is (DupAddrDetectTransmits * > H> RETRANS_TIMER + MAX_RTR_SOLICITATION_DELAY). The rc.d/netif script > H> uses this value (typically 2 seconds) for DAD. > H> > H> I understand a simple 1 second delay works in practice, though. > > I'd prefer even a sleep loop that exits once address is avaialable. An > example is in ports/net/zebra/files/zebra.sh.in. That file doesn't seem to exist but a sleep loop is even worse unless it's bound by the maximum time allowed possibly. So we'd be down to an extra second again. The problem is that a) the second is too long already if you'd be starting 300 jails, it's an extra 5 minutes of startup time. b) the shell script is supposed to go away as-is anyway, and c) in case of duplicate address we are not failing either, so this is just "bandaid for best effort and stop annoyance". If you'd want to fix it perfectly you'd probably start adding all IP addresses for all jails to start in one go, do the max wait time as hrs explained or optimize that polling the interfaces and break out if all are good (which will most likely take longer actually than sleep 2 for a larger number of jails), and then start all the jails. /bz -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 13:24:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A9CAB781 for ; Thu, 17 Jan 2013 13:24:20 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 33322DAA for ; Thu, 17 Jan 2013 13:24:18 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg6so1258830lbb.13 for ; Thu, 17 Jan 2013 05:24:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=GQai17YZpx6xMM11S/3nsVg4oQPUuNuGvY+kzVT9v+Y=; b=VwcUQu9/gjEzwHHXgLHnBBhqcjj7MyR2EeOrC9UYs9fC42dvGIrpaWPh+6QlB7L1p6 k2UIqxcBFa8g5RppFdZBFqZrxhmbpO4qCxUsr5Ko9tSjaK1Qb+FbeGwDuJOqUaOm82sx 9py/YSEKxfkLUVKx5CF/dOpO9GI87s/piQ0ZHR57o1EjGsMaI8PlPyglV5x+zveZObuy 8/Mt/WkQt5nbKsDr8ny4dCSaG7Bmm52Bhm9j9XVvPc+EbXUKa2SD+fwQGF8U0LU14SgM km9k57fOjdwtnLzJ0gmn93+olzQSLZDiZaBnUNDtZ73sfboeeqrn6JMvLxCcWbZb8PSS fgBg== X-Received: by 10.152.132.137 with SMTP id ou9mr4928353lab.7.1358429057686; Thu, 17 Jan 2013 05:24:17 -0800 (PST) Received: from dhcp170-82-red.yandex.net (dhcp170-82-red.yandex.net. [95.108.170.82]) by mx.google.com with ESMTPS id gi3sm306188lab.7.2013.01.17.05.24.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 05:24:16 -0800 (PST) Sender: Andrey Zonov Message-ID: <50F7FB74.2030507@FreeBSD.org> Date: Thu, 17 Jan 2013 17:24:04 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r245458 - head/lib/libc/sys References: <201301151409.r0FE98HB050315@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2KLEHUGIKJHBPLMTDOUBI" X-Gm-Message-State: ALoCoQkBhl7IBm/t9Fh0qCrbhmisWldbuJ781qI07S71R0LYJA0QfX9Et9cpoxGWhInzmJxg2o5a Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 13:24:20 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2KLEHUGIKJHBPLMTDOUBI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 1/17/13 2:54 AM, Eitan Adler wrote: > On 15 January 2013 09:09, Andrey Zonov wrote: >> -.Va errno >> -is set to indicate an error. >=20 > ISTR that this is not shown in the -std text. Can this be retained? >=20 This is what I see on my machine for man 2 chroot: RETURN VALUES Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. --=20 Andrey Zonov ------enig2KLEHUGIKJHBPLMTDOUBI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQ9/t9AAoJEBWLemxX/CvTuZkIALdlGMB+ijkDOtauMZyQcwaj R2cTKgzADGs4QnMngAST2vLB+mZRwh+VYz8R+T6c1dXbSX9J8LG+0Hm8PSaCgers BI9TPQ4MmIXs45mz1ewTSl7P27qC1ePbV31d7+pcba7vTXE+WjZS7jwaMd3UKtfg 8WMcAQGSMZkbgwrrcxnlXJcHGjbSHc9m9S1t33/w034UZxFrs1Ih8wg4jT2mxi4K LfnYYw3hTsEG1syijLYC1OG8eKbZeqO25FZZ8ZGpOxpcgnbDTothje9L8fKQdx8u bN/ONjDIPu0GFmE9lrZRo7LUrhLL629Ndx/ntaZmmeU2JWifMM1ZztAPpT0Rd3s= =UkYh -----END PGP SIGNATURE----- ------enig2KLEHUGIKJHBPLMTDOUBI-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 14:00:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 89578A12; Thu, 17 Jan 2013 14:00:41 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.31.31]) by mx1.freebsd.org (Postfix) with ESMTP id 99F69FA5; Thu, 17 Jan 2013 14:00:40 +0000 (UTC) Received: from [84.44.155.222] (helo=fabiankeil.de) by smtprelay04.ispgateway.de with esmtpsa (SSLv3:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Tvq1C-000346-7J; Thu, 17 Jan 2013 15:00:34 +0100 Date: Thu, 17 Jan 2013 15:00:22 +0100 From: Fabian Keil To: Konstantin Belousov Subject: bin/174831: geli segfaults with the new locked memory limit default (was: svn commit: r245415 - stable/9/etc) Message-ID: <20130117150022.24373166@fabiankeil.de> In-Reply-To: <20130115212014.GD2522@kib.kiev.ua> References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> <20130115212014.GD2522@kib.kiev.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/7Vrf98vwCKV1FbgNXG+feJf"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: Andrey Zonov , svn-src-all@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 14:00:41 -0000 --Sig_/7Vrf98vwCKV1FbgNXG+feJf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Konstantin Belousov wrote: > On Tue, Jan 15, 2013 at 11:18:19PM +0400, Andrey Zonov wrote: > > On 1/14/13 11:09 PM, Fabian Keil wrote: > > > Andrey Zonov wrote: > > >=20 > > >> On 1/14/13 3:26 PM, Fabian Keil wrote: > > >>> Andrey Zonov wrote: > > >>> > > >>>> Author: zont > > >>>> Date: Mon Jan 14 10:58:20 2013 > > >>>> New Revision: 245415 > > >>>> URL: http://svnweb.freebsd.org/changeset/base/245415 > > >>>> > > >>>> Log: > > >>>> MFC r244383: > > >>>> - Set memorylocked limit to 64Kb for default login class. > > >>>> This prevents unprivileged users to lock too much memory. > > >>> > > >>> Note that this causes geli segfaults when using sudo: > > >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174831 > > >>> > > >> > > >> The change should not affect stable, because new behavior was turned= off > > >> in stable. > > >=20 > > > It's not exactly obvious, but by "this" I was referring to the change > > > in CURRENT. > > >=20 > >=20 > > The solution which you proposed was refused by kib@ (add to CC) when I > > proposed it earlier. > The limits purpose is to limit some resource usage. Having applications > that override the limits contradicts the user intent of keeping the > limits working. My "user intent" when running applications with sudo is that they do whatever is necessary to get the job done. geli usually only runs for a couple of seconds, there usually aren't lots of parallel geli executions and the limit will only be increased if geli is running with root privileges. I agree that applications shouldn't blindly increase limits without reason, but in this case I think a good reason exists. > As a workaround, you could set the limit for your user account. Or I could continue to use the patch ... The main problem I see here is that the user has to figure out the cause of the problem before a workaround can be applied. "pid 3521 (geli), uid 0: exited on signal 11" looks like a common application bug and gdb isn't particular useful to diagnose the problem either. > As a solution, change the offending application to only mlock() > the sensitive pages. E.g. gnupg already does this, probably because > it is portable. I agree that only mlock()ing the sensitive pages is a nice idea in theory. gnupg is an interesting example because it isn't able to lock the memory either: fk@r500 ~ $echo blafasel | gpg --encrypt -o /dev/null gpg: WARNING: using insecure memory! gpg: please see http://www.gnupg.org/documentation/faqs.html for more infor= mation The excerpt from gnupg-1.4.13/util/secmem.c's lock_pool(): if( uid ) { errno =3D EPERM; err =3D errno; } else { err =3D mlock( p, n ); if( err && errno ) err =3D errno; } n is 32768 here, but if I disable the now-bogus uid check or run gpg with sudo, mlock() returns -1 anyway and errno is ENOENT (like before the mlock() call). Apparently the mlock()ing even fails when gpg's s-bit is set now, although I'm reasonably sure that this used to work in the past (at least it suppressed the warning). Fabian --Sig_/7Vrf98vwCKV1FbgNXG+feJf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlD4BAEACgkQBYqIVf93VJ09CwCgvBbwHzSsDBe8YllERYJPIicr qJIAoMcdKvkbnkadPTOW8OXlQ0E7XRJr =zlj8 -----END PGP SIGNATURE----- --Sig_/7Vrf98vwCKV1FbgNXG+feJf-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 14:29:52 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E770B56F; Thu, 17 Jan 2013 14:29:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AC2A8245; Thu, 17 Jan 2013 14:29:51 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA13484; Thu, 17 Jan 2013 16:29:49 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TvqTV-00004L-B4; Thu, 17 Jan 2013 16:29:49 +0200 Message-ID: <50F80ADC.5050102@FreeBSD.org> Date: Thu, 17 Jan 2013 16:29:48 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andrey Zonov , Fabian Keil Subject: Re: svn commit: r245415 - stable/9/etc References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> In-Reply-To: <50F5AB7B.6090903@FreeBSD.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-all@FreeBSD.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 14:29:53 -0000 on 15/01/2013 21:18 Andrey Zonov said the following: > On 1/14/13 11:09 PM, Fabian Keil wrote: >> Andrey Zonov wrote: >> >>> On 1/14/13 3:26 PM, Fabian Keil wrote: >>>> Andrey Zonov wrote: >>>> >>>>> Author: zont >>>>> Date: Mon Jan 14 10:58:20 2013 >>>>> New Revision: 245415 >>>>> URL: http://svnweb.freebsd.org/changeset/base/245415 >>>>> >>>>> Log: >>>>> MFC r244383: >>>>> - Set memorylocked limit to 64Kb for default login class. >>>>> This prevents unprivileged users to lock too much memory. >>>> >>>> Note that this causes geli segfaults when using sudo: >>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=174831 >>>> >>> >>> The change should not affect stable, because new behavior was turned off >>> in stable. >> >> It's not exactly obvious, but by "this" I was referring to the change >> in CURRENT. >> > > The solution which you proposed was refused by kib@ (add to CC) when I > proposed it earlier. > > I also wanted to set memory-locked limit to 8Mb, but avg@ (add to CC) > recommended to set it to something smaller. > > Any suggestions? > sudo -c - /sbin/geli attach /dev/label/test Perhaps it would make sense to make the behavior of '-c -' the default, but I am far from sure. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 14:57:34 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2F01FD72; Thu, 17 Jan 2013 14:57:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 158493DD; Thu, 17 Jan 2013 14:57:32 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA13675; Thu, 17 Jan 2013 16:57:31 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TvquJ-00006z-4f; Thu, 17 Jan 2013 16:57:31 +0200 Message-ID: <50F8115A.40602@FreeBSD.org> Date: Thu, 17 Jan 2013 16:57:30 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andrey Zonov , Fabian Keil Subject: Re: svn commit: r245415 - stable/9/etc References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> <50F80ADC.5050102@FreeBSD.org> In-Reply-To: <50F80ADC.5050102@FreeBSD.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-all@FreeBSD.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 14:57:34 -0000 on 17/01/2013 16:29 Andriy Gapon said the following: > sudo -c - /sbin/geli attach /dev/label/test > > Perhaps it would make sense to make the behavior of '-c -' the default, but I am > far from sure. And a side note. I think that pam_limits + limits.conf as found on Linuxes is more natural than the limits tied to login classes. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 15:15:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9055E590 for ; Thu, 17 Jan 2013 15:15:50 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1B52274A for ; Thu, 17 Jan 2013 15:15:49 +0000 (UTC) Received: by mail-la0-f41.google.com with SMTP id em20so2783361lab.28 for ; Thu, 17 Jan 2013 07:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=whG+j4ZkGGKp20vH6Z8R/VunK4e4NyBi6jh27WjF+w4=; b=SE43W/997QomTuNXiiQ3cKpKMwr/cXmiR1GHPhyBylbuNKuC3XBSGsl96dKGf7u9K7 Z4s/ipdJ5e61woPuQ8MfL9Q6xH6Q+4HpkS0wUkOeADx3e5pJjbeHbKiX6b+qKZVTGuRy TGWt0NwStgJOmmpmxx6eHtQ2IU3adldOEHTDY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=whG+j4ZkGGKp20vH6Z8R/VunK4e4NyBi6jh27WjF+w4=; b=e1N3B/kQnY+x1As72x7pXM3MWsQHfrNQHJZ3fJcwUdAKgYhbRUvIvaNMbyHFRmPchw hPlgq0Hd3jzsPf/bGszcQG1RW/sRC5FwW+O8cuNrMTleAsGoJyPuwCL01ov3fiXiYtkS EmCAeDL5zqkOgMC5Z3O0kV4EDaS6jDUjtFcJ24RFEpAb+9tebjxoxzDFx+HjsHgutSn5 /HLg/NO7aW98lTuqWO35t1sob0xsn6npD1/Y0gL5q+aDA2iAs4zxsohj0HjpOjf0yONi W7r/lB8q7f8Z+PQOxiOHqzzH1CTWRG1/lpsImNvkpOfvcyRSQH6FatENHcftwV2kuL7G sW1A== X-Received: by 10.112.13.162 with SMTP id i2mr2300420lbc.76.1358435748778; Thu, 17 Jan 2013 07:15:48 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Thu, 17 Jan 2013 07:15:18 -0800 (PST) In-Reply-To: <50F7FB74.2030507@FreeBSD.org> References: <201301151409.r0FE98HB050315@svn.freebsd.org> <50F7FB74.2030507@FreeBSD.org> From: Eitan Adler Date: Thu, 17 Jan 2013 10:15:18 -0500 X-Google-Sender-Auth: BihPlPGgrqxfgQUTdHcDOgjAvOw Message-ID: Subject: Re: svn commit: r245458 - head/lib/libc/sys To: Andrey Zonov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnGtvV+UQBl/hkfwjbzd9NHqzHOHGuztsj03N6TZPmzB0E6a9Dba+mC0ikoXur/cnAnxJQv Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 15:15:50 -0000 On 17 January 2013 08:24, Andrey Zonov wrote: > On 1/17/13 2:54 AM, Eitan Adler wrote: >> On 15 January 2013 09:09, Andrey Zonov wrote: >>> -.Va errno >>> -is set to indicate an error. >> >> ISTR that this is not shown in the -std text. Can this be retained? >> > > This is what I see on my machine for man 2 chroot: > > RETURN VALUES > Upon successful completion, the value 0 is returned; otherwise the > value -1 is returned and the global variable errno is set to > indicate the > error. My memory was wrong. Thanks for the correction. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 16:11:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2844D10D; Thu, 17 Jan 2013 16:11:39 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 19D8CAF0; Thu, 17 Jan 2013 16:11:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HGBcks004385; Thu, 17 Jan 2013 16:11:38 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HGBciH004383; Thu, 17 Jan 2013 16:11:38 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201301171611.r0HGBciH004383@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 17 Jan 2013 16:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245553 - stable/9/lib/libc/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 16:11:39 -0000 Author: ume Date: Thu Jan 17 16:11:38 2013 New Revision: 245553 URL: http://svnweb.freebsd.org/changeset/base/245553 Log: MFC r245225, r245256: Restrict use of source address selection of getipnodebyname(1) only to IPv6 address. Modified: stable/9/lib/libc/net/name6.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/name6.c ============================================================================== --- stable/9/lib/libc/net/name6.c Thu Jan 17 15:45:45 2013 (r245552) +++ stable/9/lib/libc/net/name6.c Thu Jan 17 16:11:38 2013 (r245553) @@ -200,6 +200,7 @@ static struct hostent *_hpmapv6(struct #endif static struct hostent *_hpsort(struct hostent *, res_state); +#ifdef INET6 static struct hostent *_hpreorder(struct hostent *); static int get_addrselectpolicy(struct policyhead *); static void free_addrselectpolicy(struct policyhead *); @@ -209,6 +210,7 @@ static void set_source(struct hp_order static int matchlen(struct sockaddr *, struct sockaddr *); static int comp_dst(const void *, const void *); static int gai_addr2scopetype(struct sockaddr *); +#endif /* * Functions defined in RFC2553 @@ -285,8 +287,10 @@ getipnodebyname(const char *name, int af hp = gethostbyname2(name, af); hp = _hpcopy(hp, errp); - #ifdef INET6 + if (af == AF_INET6) + hp = _hpreorder(hp); + if (af == AF_INET6 && ((flags & AI_ALL) || hp == NULL) && MAPADDRENABLED(flags)) { struct hostent *hp2 = gethostbyname2(name, AF_INET); @@ -309,7 +313,7 @@ getipnodebyname(const char *name, int af *errp = statp->res_h_errno; statp->options = options; - return _hpreorder(_hpsort(hp, statp)); + return _hpsort(hp, statp); } struct hostent * @@ -632,6 +636,7 @@ _hpsort(struct hostent *hp, res_state st return hp; } +#ifdef INET6 /* * _hpreorder: sort address by default address selection */ @@ -1109,3 +1114,4 @@ gai_addr2scopetype(struct sockaddr *sa) return(-1); } } +#endif From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 16:26:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AA4976D5; Thu, 17 Jan 2013 16:26:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9C759CD8; Thu, 17 Jan 2013 16:26:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HGQexr008087; Thu, 17 Jan 2013 16:26:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HGQe1Q008086; Thu, 17 Jan 2013 16:26:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301171626.r0HGQe1Q008086@svn.freebsd.org> From: Adrian Chadd Date: Thu, 17 Jan 2013 16:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245554 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 16:26:40 -0000 Author: adrian Date: Thu Jan 17 16:26:40 2013 New Revision: 245554 URL: http://svnweb.freebsd.org/changeset/base/245554 Log: Add a quick work-around if ath_beacon_config() to not die if it's called when an interface is going down. Right now it's quite possible (but very unlikely!) that ath_reset() or similar is called, leading to a beacon config call, in parallel with the last VAP being destroyed. This likely should be fixed by making sure the bmiss/bstuck/watchdog taskqueues are canceled whenever the last VAP is destroyed. Modified: head/sys/dev/ath/if_ath_beacon.c Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Thu Jan 17 16:11:38 2013 (r245553) +++ head/sys/dev/ath/if_ath_beacon.c Thu Jan 17 16:26:40 2013 (r245554) @@ -705,6 +705,16 @@ ath_beacon_config(struct ath_softc *sc, if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */ + /* + * Just ensure that we aren't being called when the last + * VAP is destroyed. + */ + if (vap == NULL) { + device_printf(sc->sc_dev, "%s: called with no VAPs\n", + __func__); + return; + } + ni = ieee80211_ref_node(vap->iv_bss); /* extract tstamp from last beacon and convert to TU */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 16:39:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1F67B39; Thu, 17 Jan 2013 16:39:23 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BA293DDA; Thu, 17 Jan 2013 16:39:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HGdNk8012160; Thu, 17 Jan 2013 16:39:23 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HGdMJK012150; Thu, 17 Jan 2013 16:39:22 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201301171639.r0HGdMJK012150@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 17 Jan 2013 16:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245555 - in stable/9: sbin/ifconfig sys/netinet6 usr.sbin/ndp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 16:39:24 -0000 Author: ume Date: Thu Jan 17 16:39:21 2013 New Revision: 245555 URL: http://svnweb.freebsd.org/changeset/base/245555 Log: MFC r245230: Add no_prefer_iface option. It stops treating the address on the interface as special by source address selection rule even when the interface is outgoing interface. This is desired in some situation. Modified: stable/9/sbin/ifconfig/af_inet6.c stable/9/sbin/ifconfig/af_nd6.c stable/9/sbin/ifconfig/ifconfig.8 stable/9/sys/netinet6/in6_src.c stable/9/sys/netinet6/nd6.h stable/9/usr.sbin/ndp/ndp.8 stable/9/usr.sbin/ndp/ndp.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) stable/9/sys/ (props changed) stable/9/usr.sbin/ndp/ (props changed) Modified: stable/9/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/9/sbin/ifconfig/af_inet6.c Thu Jan 17 16:26:40 2013 (r245554) +++ stable/9/sbin/ifconfig/af_inet6.c Thu Jan 17 16:39:21 2013 (r245555) @@ -511,6 +511,8 @@ static struct cmd inet6_cmds[] = { DEF_CMD("-prefer_source",-ND6_IFF_PREFER_SOURCE,setnd6flags), DEF_CMD("auto_linklocal",ND6_IFF_AUTO_LINKLOCAL,setnd6flags), DEF_CMD("-auto_linklocal",-ND6_IFF_AUTO_LINKLOCAL,setnd6flags), + DEF_CMD("no_prefer_iface",ND6_IFF_NO_PREFER_IFACE,setnd6flags), + DEF_CMD("-no_prefer_iface",-ND6_IFF_NO_PREFER_IFACE,setnd6flags), DEF_CMD_ARG("pltime", setip6pltime), DEF_CMD_ARG("vltime", setip6vltime), DEF_CMD("eui64", 0, setip6eui64), Modified: stable/9/sbin/ifconfig/af_nd6.c ============================================================================== --- stable/9/sbin/ifconfig/af_nd6.c Thu Jan 17 16:26:40 2013 (r245554) +++ stable/9/sbin/ifconfig/af_nd6.c Thu Jan 17 16:39:21 2013 (r245555) @@ -58,7 +58,7 @@ static const char rcsid[] = #define MAX_SYSCTL_TRY 5 #define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \ "\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \ - "\007NO_RADR\020DEFAULTIF" + "\007NO_RADR\010NO_PREFER_IFACE\020DEFAULTIF" static int isnd6defif(int); void setnd6flags(const char *, int, int, const struct afswtch *); Modified: stable/9/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/9/sbin/ifconfig/ifconfig.8 Thu Jan 17 16:26:40 2013 (r245554) +++ stable/9/sbin/ifconfig/ifconfig.8 Thu Jan 17 16:39:21 2013 (r245555) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd November 7, 2012 +.Dd January 10, 2013 .Dt IFCONFIG 8 .Os .Sh NAME @@ -722,6 +722,13 @@ source address for outgoing packets. .It Cm -prefer_source Clear a flag .Cm prefer_source . +.It Cm no_prefer_iface +Set a flag to not prefer address on the interface as candidates of the +source address for outgoing packets, even when the interface is +outgoing interface. +.It Cm -no_prefer_iface +Clear a flag +.Cm no_prefer_iface . .El .Pp The following parameters are specific to cloning Modified: stable/9/sys/netinet6/in6_src.c ============================================================================== --- stable/9/sys/netinet6/in6_src.c Thu Jan 17 16:26:40 2013 (r245554) +++ stable/9/sys/netinet6/in6_src.c Thu Jan 17 16:39:21 2013 (r245555) @@ -383,10 +383,12 @@ in6_selectsrc(struct sockaddr_in6 *dstso */ /* Rule 5: Prefer outgoing interface */ - if (ia_best->ia_ifp == ifp && ia->ia_ifp != ifp) - NEXT(5); - if (ia_best->ia_ifp != ifp && ia->ia_ifp == ifp) - REPLACE(5); + if (!(ND_IFINFO(ifp)->flags & ND6_IFF_NO_PREFER_IFACE)) { + if (ia_best->ia_ifp == ifp && ia->ia_ifp != ifp) + NEXT(5); + if (ia_best->ia_ifp != ifp && ia->ia_ifp == ifp) + REPLACE(5); + } /* * Rule 6: Prefer matching label Modified: stable/9/sys/netinet6/nd6.h ============================================================================== --- stable/9/sys/netinet6/nd6.h Thu Jan 17 16:26:40 2013 (r245554) +++ stable/9/sys/netinet6/nd6.h Thu Jan 17 16:39:21 2013 (r245555) @@ -86,6 +86,7 @@ struct nd_ifinfo { #define ND6_IFF_DONT_SET_IFROUTE 0x10 #define ND6_IFF_AUTO_LINKLOCAL 0x20 #define ND6_IFF_NO_RADR 0x40 +#define ND6_IFF_NO_PREFER_IFACE 0x80 /* XXX: not related to ND. */ #define ND6_CREATE LLE_CREATE #define ND6_EXCLUSIVE LLE_EXCLUSIVE Modified: stable/9/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/9/usr.sbin/ndp/ndp.8 Thu Jan 17 16:26:40 2013 (r245554) +++ stable/9/usr.sbin/ndp/ndp.8 Thu Jan 17 16:39:21 2013 (r245555) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2009 +.Dd Jan 10, 2013 .Dt NDP 8 .Os .\" @@ -201,6 +201,15 @@ For more details about the entire algori selection, see the .Pa IMPLEMENTATION file supplied with the KAME kit. +.It Ic no_prefer_iface +The address on the outgoing interface is preferred by source addess +selection rule. +If this flag is set, stop treating the address on the +.Ar interface +as special even when the +.Ar interface +is outgoing interface. +The default value of this flag is off. .It Ic disabled Disable IPv6 operation on the interface. When disabled, the interface discards any IPv6 packets Modified: stable/9/usr.sbin/ndp/ndp.c ============================================================================== --- stable/9/usr.sbin/ndp/ndp.c Thu Jan 17 16:26:40 2013 (r245554) +++ stable/9/usr.sbin/ndp/ndp.c Thu Jan 17 16:39:21 2013 (r245555) @@ -1011,6 +1011,9 @@ ifinfo(ifname, argc, argv) #ifdef ND6_IFF_PREFER_SOURCE SETFLAG("prefer_source", ND6_IFF_PREFER_SOURCE); #endif +#ifdef ND6_IFF_NO_PREFER_IFACE + SETFLAG("no_prefer_iface", ND6_IFF_NO_PREFER_IFACE); +#endif SETVALUE("basereachable", ND.basereachable); SETVALUE("retrans", ND.retrans); SETVALUE("curhlim", ND.chlim); @@ -1088,6 +1091,10 @@ ifinfo(ifname, argc, argv) if ((ND.flags & ND6_IFF_PREFER_SOURCE)) printf("prefer_source "); #endif +#ifdef ND6_IFF_NO_PREFER_IFACE + if ((ND.flags & ND6_IFF_NO_PREFER_IFACE)) + printf("no_prefer_iface "); +#endif } putc('\n', stdout); #undef ND From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 16:43:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D322DE64; Thu, 17 Jan 2013 16:43:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AE318E26; Thu, 17 Jan 2013 16:43:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HGhxxU014490; Thu, 17 Jan 2013 16:43:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HGhxUN014489; Thu, 17 Jan 2013 16:43:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301171643.r0HGhxUN014489@svn.freebsd.org> From: Adrian Chadd Date: Thu, 17 Jan 2013 16:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245556 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 16:43:59 -0000 Author: adrian Date: Thu Jan 17 16:43:59 2013 New Revision: 245556 URL: http://svnweb.freebsd.org/changeset/base/245556 Log: Fix hangs (exposed by spectral scan activity) in STA mode when the chip hangs. * Always do a reset in ath_bmiss_proc(), regardless of whether the hardware is "hung" or not. Specifically, for spectral scan, there's likely a whole bunch of potential hangs that we don't (yet) recognise in the HAL. So to avoid staying RX deaf persisting until the station disassociates, just do a no-loss reset. * Set sc_beacons=1 in STA mode. During a reset, the beacon programming isn't done. (It's likely I need to set sc_syncbeacons during a hang reset, but I digress.) Thus after a reset, there's no beacon timer programming to send a BMISS interrupt if beacons aren't heard .. thus if the AP disappears, you won't get notified and you'll have to reset your interface. This hasn't yet fixed all of the hangs that I've seen when debugging spectral scan, but it's certainly reduced the hang frequency and it should improve general STA stability in very noisy environments. Tested: * AR9280, STA mode, spectral scan off/on PR: kern/175227 Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Jan 17 16:39:21 2013 (r245555) +++ head/sys/dev/ath/if_ath.c Thu Jan 17 16:43:59 2013 (r245556) @@ -1883,11 +1883,19 @@ ath_bmiss_proc(void *arg, int pending) DPRINTF(sc, ATH_DEBUG_ANY, "%s: pending %u\n", __func__, pending); + /* + * Do a reset upon any becaon miss event. + * + * It may be a non-recognised RX clear hang which needs a reset + * to clear. + */ if (ath_hal_gethangstate(sc->sc_ah, 0xff, &hangs) && hangs != 0) { + ath_reset(ifp, ATH_RESET_NOLOSS); if_printf(ifp, "bb hang detected (0x%x), resetting\n", hangs); + } else { ath_reset(ifp, ATH_RESET_NOLOSS); - } else ieee80211_beacon_miss(ifp->if_l2com); + } } /* @@ -5056,6 +5064,7 @@ ath_newstate(struct ieee80211vap *vap, e int i, error, stamode; u_int32_t rfilt; int csa_run_transition = 0; + static const HAL_LED_STATE leds[] = { HAL_LED_INIT, /* IEEE80211_S_INIT */ HAL_LED_SCAN, /* IEEE80211_S_SCAN */ @@ -5200,10 +5209,32 @@ ath_newstate(struct ieee80211vap *vap, e * force a beacon update so we pick up a lack of * beacons from an AP in CAC and thus force a * scan. + * + * And, there's also corner cases here where + * after a scan, the AP may have disappeared. + * In that case, we may not receive an actual + * beacon to update the beacon timer and thus we + * won't get notified of the missing beacons. */ sc->sc_syncbeacon = 1; +#if 0 if (csa_run_transition) +#endif ath_beacon_config(sc, vap); + + /* + * PR: kern/175227 + * + * Reconfigure beacons during reset; as otherwise + * we won't get the beacon timers reprogrammed + * after a reset and thus we won't pick up a + * beacon miss interrupt. + * + * Hopefully we'll see a beacon before the BMISS + * timer fires (too often), leading to a STA + * disassociation. + */ + sc->sc_beacons = 1; break; case IEEE80211_M_MONITOR: /* From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 17:05:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 63E8A83D; Thu, 17 Jan 2013 17:05:55 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 55DF0F5C; Thu, 17 Jan 2013 17:05:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HH5tDx020864; Thu, 17 Jan 2013 17:05:55 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HH5tfe020863; Thu, 17 Jan 2013 17:05:55 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201301171705.r0HH5tfe020863@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 17 Jan 2013 17:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245557 - stable/8/lib/libc/net X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 17:05:55 -0000 Author: ume Date: Thu Jan 17 17:05:54 2013 New Revision: 245557 URL: http://svnweb.freebsd.org/changeset/base/245557 Log: MFC r245225, r245256: Restrict use of source address selection of getipnodebyname(1) only to IPv6 address. Modified: stable/8/lib/libc/net/name6.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/net/name6.c ============================================================================== --- stable/8/lib/libc/net/name6.c Thu Jan 17 16:43:59 2013 (r245556) +++ stable/8/lib/libc/net/name6.c Thu Jan 17 17:05:54 2013 (r245557) @@ -200,6 +200,7 @@ static struct hostent *_hpmapv6(struct #endif static struct hostent *_hpsort(struct hostent *, res_state); +#ifdef INET6 static struct hostent *_hpreorder(struct hostent *); static int get_addrselectpolicy(struct policyhead *); static void free_addrselectpolicy(struct policyhead *); @@ -209,6 +210,7 @@ static void set_source(struct hp_order static int matchlen(struct sockaddr *, struct sockaddr *); static int comp_dst(const void *, const void *); static int gai_addr2scopetype(struct sockaddr *); +#endif /* * Functions defined in RFC2553 @@ -285,8 +287,10 @@ getipnodebyname(const char *name, int af hp = gethostbyname2(name, af); hp = _hpcopy(hp, errp); - #ifdef INET6 + if (af == AF_INET6) + hp = _hpreorder(hp); + if (af == AF_INET6 && ((flags & AI_ALL) || hp == NULL) && MAPADDRENABLED(flags)) { struct hostent *hp2 = gethostbyname2(name, AF_INET); @@ -309,7 +313,7 @@ getipnodebyname(const char *name, int af *errp = statp->res_h_errno; statp->options = options; - return _hpreorder(_hpsort(hp, statp)); + return _hpsort(hp, statp); } struct hostent * @@ -632,6 +636,7 @@ _hpsort(struct hostent *hp, res_state st return hp; } +#ifdef INET6 /* * _hpreorder: sort address by default address selection */ @@ -1109,3 +1114,4 @@ gai_addr2scopetype(struct sockaddr *sa) return(-1); } } +#endif From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 17:08:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C6220AEC; Thu, 17 Jan 2013 17:08:10 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B8A99F80; Thu, 17 Jan 2013 17:08:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HH8AJT021372; Thu, 17 Jan 2013 17:08:10 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HH8AIU021371; Thu, 17 Jan 2013 17:08:10 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201301171708.r0HH8AIU021371@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 17 Jan 2013 17:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r245559 - stable/7/lib/libc/net X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 17:08:10 -0000 Author: ume Date: Thu Jan 17 17:08:10 2013 New Revision: 245559 URL: http://svnweb.freebsd.org/changeset/base/245559 Log: MFC r245225, r245256: Restrict use of source address selection of getipnodebyname(1) only to IPv6 address. Modified: stable/7/lib/libc/net/name6.c Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/net/name6.c ============================================================================== --- stable/7/lib/libc/net/name6.c Thu Jan 17 17:07:54 2013 (r245558) +++ stable/7/lib/libc/net/name6.c Thu Jan 17 17:08:10 2013 (r245559) @@ -200,6 +200,7 @@ static struct hostent *_hpmapv6(struct #endif static struct hostent *_hpsort(struct hostent *, res_state); +#ifdef INET6 static struct hostent *_hpreorder(struct hostent *); static int get_addrselectpolicy(struct policyhead *); static void free_addrselectpolicy(struct policyhead *); @@ -209,6 +210,7 @@ static void set_source(struct hp_order static int matchlen(struct sockaddr *, struct sockaddr *); static int comp_dst(const void *, const void *); static int gai_addr2scopetype(struct sockaddr *); +#endif /* * Functions defined in RFC2553 @@ -285,8 +287,10 @@ getipnodebyname(const char *name, int af hp = gethostbyname2(name, af); hp = _hpcopy(hp, errp); - #ifdef INET6 + if (af == AF_INET6) + hp = _hpreorder(hp); + if (af == AF_INET6 && ((flags & AI_ALL) || hp == NULL) && MAPADDRENABLED(flags)) { struct hostent *hp2 = gethostbyname2(name, AF_INET); @@ -309,7 +313,7 @@ getipnodebyname(const char *name, int af *errp = statp->res_h_errno; statp->options = options; - return _hpreorder(_hpsort(hp, statp)); + return _hpsort(hp, statp); } struct hostent * @@ -632,6 +636,7 @@ _hpsort(struct hostent *hp, res_state st return hp; } +#ifdef INET6 /* * _hpreorder: sort address by default address selection */ @@ -1111,3 +1116,4 @@ gai_addr2scopetype(struct sockaddr *sa) return(-1); } } +#endif From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 17:12:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B868FDF3; Thu, 17 Jan 2013 17:12:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9C869EE; Thu, 17 Jan 2013 17:12:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HHCj8L023767; Thu, 17 Jan 2013 17:12:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HHCj7r023765; Thu, 17 Jan 2013 17:12:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301171712.r0HHCj7r023765@svn.freebsd.org> From: Adrian Chadd Date: Thu, 17 Jan 2013 17:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245560 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 17:12:45 -0000 Author: adrian Date: Thu Jan 17 17:12:44 2013 New Revision: 245560 URL: http://svnweb.freebsd.org/changeset/base/245560 Log: Add extra debugging fields. Modified: head/tools/tools/ath/athalq/ar5212_ds.c head/tools/tools/ath/athalq/ar5416_ds.c Modified: head/tools/tools/ath/athalq/ar5212_ds.c ============================================================================== --- head/tools/tools/ath/athalq/ar5212_ds.c Thu Jan 17 17:08:10 2013 (r245559) +++ head/tools/tools/ath/athalq/ar5212_ds.c Thu Jan 17 17:12:44 2013 (r245560) @@ -45,9 +45,11 @@ ar5212_decode_txstatus(struct if_ath_alq /* XXX assumes txs is smaller than PAYLOAD_LEN! */ memcpy(&txs, &a->payload, sizeof(struct ar5212_desc)); - printf("[%u] [%llu] TXSTATUS\n", + printf("[%u] [%llu] TXSTATUS: TxDone=%d, TS=0x%08x\n\n", (unsigned int) be32toh(a->hdr.tstamp), - (unsigned long long) be64toh(a->hdr.threadid)); + (unsigned long long) be64toh(a->hdr.threadid), + MF(txs.u.tx.status1, AR_Done), + MS(txs.u.tx.status0, AR_SendTimestamp)); /* ds_txstatus0 */ printf(" Frmok=%d, xretries=%d, fifounderrun=%d, filt=%d\n", @@ -147,9 +149,11 @@ ar5212_decode_rxstatus(struct if_ath_alq /* XXX assumes rxs is smaller than PAYLOAD_LEN! */ memcpy(&rxs, &a->payload, sizeof(struct ar5212_desc)); - printf("[%u] [%llu] RXSTATUS\n", + printf("[%u] [%llu] RXSTATUS: RxOK=%d TS=0x%08x\n", (unsigned int) be32toh(a->hdr.tstamp), - (unsigned long long) be64toh(a->hdr.threadid)); + (unsigned long long) be64toh(a->hdr.threadid), + MF(rxs.ds_rxstatus1, AR_Done), + MS(rxs.ds_rxstatus1, AR_RcvTimestamp)); printf(" link=0x%08x, data=0x%08x, ctl0=0x%08x, ctl2=0x%08x\n", rxs.ds_link, Modified: head/tools/tools/ath/athalq/ar5416_ds.c ============================================================================== --- head/tools/tools/ath/athalq/ar5416_ds.c Thu Jan 17 17:08:10 2013 (r245559) +++ head/tools/tools/ath/athalq/ar5416_ds.c Thu Jan 17 17:12:44 2013 (r245560) @@ -45,9 +45,11 @@ ar5416_decode_txstatus(struct if_ath_alq /* XXX assumes txs is smaller than PAYLOAD_LEN! */ memcpy(&txs, &a->payload, sizeof(struct ar5416_desc)); - printf("[%u] [%llu] TXSTATUS\n", + printf("[%u] [%llu] TXSTATUS: TxDone=%d, TS=0x%08x\n", (unsigned int) be32toh(a->hdr.tstamp), - (unsigned long long) be64toh(a->hdr.threadid)); + (unsigned long long) be64toh(a->hdr.threadid), + MF(txs.u.tx.status[9], AR_TxDone), + txs.u.tx.status[2]); /* ds_txstatus0 */ printf(" RX RSSI 0 [%d %d %d]\n", @@ -250,9 +252,11 @@ ar5416_decode_rxstatus(struct if_ath_alq /* XXX assumes rxs is smaller than PAYLOAD_LEN! */ memcpy(&rxs, &a->payload, sizeof(struct ar5416_desc)); - printf("[%u] [%llu] RXSTATUS\n", + printf("[%u] [%llu] RXSTATUS: RxDone=%d, TS=0x%08x\n", (unsigned int) be32toh(a->hdr.tstamp), - (unsigned long long) be64toh(a->hdr.threadid)); + (unsigned long long) be64toh(a->hdr.threadid), + MF(rxs.ds_rxstatus8, AR_RxDone), + rxs.ds_rxstatus2); printf(" link=0x%08x, data=0x%08x, ctl0=0x%08x, ctl2=0x%08x\n", rxs.ds_link, From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 17:27:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D71056A8; Thu, 17 Jan 2013 17:27:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B0FCC34C; Thu, 17 Jan 2013 17:27:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HHRBpW028184; Thu, 17 Jan 2013 17:27:11 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HHRBEs028180; Thu, 17 Jan 2013 17:27:11 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301171727.r0HHRBEs028180@svn.freebsd.org> From: Brooks Davis Date: Thu, 17 Jan 2013 17:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245561 - in head: . cddl/lib/libdtrace share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 17:27:11 -0000 Author: brooks Date: Thu Jan 17 17:27:10 2013 New Revision: 245561 URL: http://svnweb.freebsd.org/changeset/base/245561 Log: Add a new LIBRARIES_ONLY make variable to disable the build and install of files other than the actual libraries. Use LIBRARIES_ONLY to supress the inclusion of files in the lib32 distribution that are duplicates of files in base. Sponsored by: DARPA, AFRL Reviewed by: emaste Modified: head/Makefile.inc1 head/cddl/lib/libdtrace/Makefile head/share/mk/bsd.README head/share/mk/bsd.lib.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jan 17 17:12:44 2013 (r245560) +++ head/Makefile.inc1 Thu Jan 17 17:27:10 2013 (r245561) @@ -336,6 +336,7 @@ LIB32WMAKEFLAGS+= \ CXX="${CXX} ${LIB32FLAGS}" \ DESTDIR=${LIB32TMP} \ -DCOMPAT_32BIT \ + -DLIBRARIES_ONLY \ -DNO_CPU_CFLAGS \ -DNO_CTF \ -DNO_LINT Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Thu Jan 17 17:12:44 2013 (r245560) +++ head/cddl/lib/libdtrace/Makefile Thu Jan 17 17:27:10 2013 (r245561) @@ -103,7 +103,7 @@ dt_names.c: beforedepend: dt_errtags.c dt_names.c beforeinstall: -.if exists(${DESTDIR}/usr/lib/dtrace) +.if !defined(LIBRARIES_ONLY) && exists(${DESTDIR}/usr/lib/dtrace) .for file in ${DSRCS} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace .endfor Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Thu Jan 17 17:12:44 2013 (r245560) +++ head/share/mk/bsd.README Thu Jan 17 17:27:10 2013 (r245561) @@ -356,6 +356,8 @@ SHLIB_LDSCRIPT Template file to generate Unless used, a simple symlink is created to the real shared object. +LIBRARIES_ONLY Do not build or install files other than the library. + The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Thu Jan 17 17:12:44 2013 (r245560) +++ head/share/mk/bsd.lib.mk Thu Jan 17 17:27:10 2013 (r245561) @@ -331,9 +331,12 @@ _libinstall: .endif .endif # !defined(INTERNALLIB) +.if !defined(LIBRARIES_ONLY) .include .include .include +.endif + .include .if ${MK_MAN} != "no" @@ -348,7 +351,7 @@ lint: ${SRCS:M*.c} ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} .endif -.if ${MK_MAN} != "no" +.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) .include .endif From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:00:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 12C5B3E0; Thu, 17 Jan 2013 18:00:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 017C5749; Thu, 17 Jan 2013 18:00:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HI0Jeu038814; Thu, 17 Jan 2013 18:00:19 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HI0JR0038813; Thu, 17 Jan 2013 18:00:19 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201301171800.r0HI0JR0038813@svn.freebsd.org> From: Ian Lepore Date: Thu, 17 Jan 2013 18:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245562 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:00:20 -0000 Author: ian Date: Thu Jan 17 18:00:19 2013 New Revision: 245562 URL: http://svnweb.freebsd.org/changeset/base/245562 Log: Add myself as a committer, and my mentor relationship. Approved by: cognet (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Jan 17 17:27:10 2013 (r245561) +++ head/share/misc/committers-src.dot Thu Jan 17 18:00:19 2013 (r245562) @@ -160,6 +160,7 @@ grog [label="Greg Lehey\ngrog@FreeBSD.or gshapiro [label="Gregory Shapiro\ngshapiro@FreeBSD.org\n2000/07/12"] harti [label="Hartmut Brandt\nharti@FreeBSD.org\n2003/01/29"] hmp [label="Hiten Pandya\nhmp@FreeBSD.org\n2004/03/23"] +ian [label="Ian Lepore\nian@FreeBSD.org\n2013/01/07"] iedowse [label="Ian Dowse\niedowse@FreeBSD.org\n2000/12/01"] imp [label="Warner Losh\nimp@FreeBSD.org\n1996/09/20"] ivoras [label="Ivan Voras\nivoras@FreeBSD.org\n2008/06/10"] @@ -339,6 +340,7 @@ bz -> syrinx cognet -> jceel cognet -> kevlo +cognet -> ian cperciva -> eadler cperciva -> flz From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:26:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 574449E6; Thu, 17 Jan 2013 18:26:57 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 44785873; Thu, 17 Jan 2013 18:26:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HIQvm6045886; Thu, 17 Jan 2013 18:26:57 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HIQvv7045885; Thu, 17 Jan 2013 18:26:57 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301171826.r0HIQvv7045885@svn.freebsd.org> From: Brooks Davis Date: Thu, 17 Jan 2013 18:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245563 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:26:57 -0000 Author: brooks Date: Thu Jan 17 18:26:56 2013 New Revision: 245563 URL: http://svnweb.freebsd.org/changeset/base/245563 Log: Correct the distrib-dirs target in the -DDB_FROM_SRC case. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jan 17 18:00:19 2013 (r245562) +++ head/Makefile.inc1 Thu Jan 17 18:26:56 2013 (r245563) @@ -767,7 +767,7 @@ redistribute: distrib-dirs distribution: cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ - ${IMAKE_INSTALL} ${.TARGET} + ${IMAKE_INSTALL} ${IMAKE_MTREE} ${.TARGET} # # buildkernel and installkernel From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:32:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AFDB3FB6; Thu, 17 Jan 2013 18:32:31 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3768C7; Thu, 17 Jan 2013 18:32:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HIWVf0048280; Thu, 17 Jan 2013 18:32:31 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HIWVuW048278; Thu, 17 Jan 2013 18:32:31 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301171832.r0HIWVuW048278@svn.freebsd.org> From: Brooks Davis Date: Thu, 17 Jan 2013 18:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245565 - in head: . etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:32:31 -0000 Author: brooks Date: Thu Jan 17 18:32:30 2013 New Revision: 245565 URL: http://svnweb.freebsd.org/changeset/base/245565 Log: Rework the mtree portion of etc/Makefile's distrib-dirs target to run mtree in a shell loop so there is only one mtree commandline. Move the implementation of LOCAL_MTREE into etc/Makefile. Sponsored by: DARPA, AFRL Reviewed by: mtree :) Modified: head/Makefile.inc1 head/etc/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jan 17 18:28:26 2013 (r245564) +++ head/Makefile.inc1 Thu Jan 17 18:32:30 2013 (r245565) @@ -717,7 +717,7 @@ distributeworld installworld: installche .endfor -mkdir ${DESTDIR}/${DISTDIR}/base ${_+_}cd ${.CURDIR}; ${IMAKE} distrib-dirs \ - DESTDIR=${DESTDIR}/${DISTDIR}/base + LOCAL_MTREE=${LOCAL_MTREE} DESTDIR=${DESTDIR}/${DISTDIR}/base .endif ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} @@ -1248,11 +1248,7 @@ cross-tools: # hierarchy - ensure that all the needed directories are present # hierarchy hier: - cd ${.CURDIR}/etc; ${MAKE} distrib-dirs -.for _mtree in ${LOCAL_MTREE} - mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/${_mtree} \ - -p ${DESTDIR}/ -.endfor + cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jan 17 18:28:26 2013 (r245564) +++ head/etc/Makefile Thu Jan 17 18:32:30 2013 (r245565) @@ -293,26 +293,37 @@ distribution: MTREE_CMD?= mtree -distrib-dirs: - ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ - ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var - ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr - ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ - -p ${DESTDIR}/usr/include +MTREES= mtree/BSD.root.dist / \ + mtree/BSD.var.dist /var \ + mtree/BSD.usr.dist /usr \ + mtree/BSD.include.dist /usr/include .if ${MK_BIND_LIBS} != "no" - ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ - -p ${DESTDIR}/usr/include +MTREES+= mtree/BIND.include.dist /usr/include .endif .if ${MK_BIND_MTREE} != "no" - ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ - -p ${DESTDIR}/var/named +MTREES+= mtree/BIND.chroot.dist /var/named .endif .if ${MK_GROFF} != "no" - ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr +MTREES+= mtree/BSD.groff.dist /usr .endif .if ${MK_SENDMAIL} != "no" - ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ +MTREES+= mtree/BSD.sendmail.dist / .endif +.for mtree in ${LOCAL_MTREE} +MTREES+= ../${mtree} / +.endfor + +distrib-dirs: + @set ${MTREES}; \ + while test $$# -ge 2; do \ + m=${.CURDIR}/$$1; \ + shift; \ + d=${DESTDIR}$$1; \ + shift; \ + ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \ + -f $$m -p $$d; \ + ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ + done; true cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:40:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 36FD13CE; Thu, 17 Jan 2013 18:40:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0DF16942; Thu, 17 Jan 2013 18:40:50 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 20A12B924; Thu, 17 Jan 2013 13:40:49 -0500 (EST) From: John Baldwin To: Eitan Adler Subject: Re: svn commit: r245494 - head/bin/pwait Date: Thu, 17 Jan 2013 10:35:14 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301160503.r0G53qie087155@svn.freebsd.org> <50F6ED68.50602@delphij.net> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201301171035.14799.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 17 Jan 2013 13:40:49 -0500 (EST) Cc: "svn-src-head@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , d@delphij.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:40:50 -0000 On Wednesday, January 16, 2013 2:15:00 pm Eitan Adler wrote: > On 16 January 2013 13:11, Xin Li wrote: > > > Yes I did. Using exit(3) tells clang that this is the final exit and > > thus eliminates the warning. > > > > It sounds like a bug (or arguably a feature) that clang does not > > recognize return in main()s... > > It is not a bug: see > http://clang-developers.42468.n3.nabble.com/Static-analyzer-possible-memory- leak-false-positive-td4026706.html No, it is clearly a bug. It is a waste of time and adds obfuscation (and runtime overhead) to go free a bunch of stuff just before a return() from main(). The vast, vast majority of time main() is used as main(), so it should clearly by the default behavior to treat a return() from main() the same as exit() and possibly have an option to toggle that setting. As to the last post in that thread, the same problem exists if you malloc something early in main() and later call exit(), so that has no bearing on whether or not a return() from main() should be treated as an exit(). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:40:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2779B3D3; Thu, 17 Jan 2013 18:40:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 03376944; Thu, 17 Jan 2013 18:40:53 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2CB7CB953; Thu, 17 Jan 2013 13:40:52 -0500 (EST) From: John Baldwin To: Eitan Adler Subject: Re: svn commit: r245506 - head/bin/pwait Date: Thu, 17 Jan 2013 10:50:07 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301161815.r0GIFQPk007553@svn.freebsd.org> <20130117130740.I1066@besplex.bde.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201301171050.07596.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 17 Jan 2013 13:40:52 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:40:53 -0000 On Wednesday, January 16, 2013 10:40:51 pm Eitan Adler wrote: > On 16 January 2013 21:25, Bruce Evans wrote: > > This uses the sysexits mistake. style(9) was fixed to not give an example > > of this mistake. Before this, sysexits was used a whole once in pwait(1) > > (for EX_USAGE) in usage(). EX_USAGE happens to be 64. As usual when the > > mistake is used, this is useless for humans (the usage message gives more > > info) and unusable for programs, especially since it is undocmented > > (pwait(1)'s man page just says ">0 if an error occurs". It doesn't even > > use '.Std' for this, but hard-codes it. > > IMHO using sysexits gives more signal than using a binary 0 or 1. It > is a mistake to have changed style(9) to avoid using sysexits. > Instead the man page should detail the specific error that occurs > directly, or by reference to sysexit. Eh, I think bde@ has quite a bit more experience with this than you. is not part of POSIX or any other standard. It's comments reference delivermail (the predecessor to sendmail). Looking at its history, it has never been changed in FreeBSD, and it's history in CSRG is rather spartan and mostly tied to delivermail/sendmail: http://svnweb.freebsd.org/csrg/include/sysexits.h?view=log In practice it's list of error value is limited and has not grown to handle new errors in over two decades (as opposed to, say, the list of errnos). OTOH, it seems the history section in sysexits(3) is slightly off as the CSRG history suggests it was present in at least 4.2BSD. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:41:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 277806E2; Thu, 17 Jan 2013 18:41:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 03DE094B; Thu, 17 Jan 2013 18:41:01 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5C99DB9B8; Thu, 17 Jan 2013 13:41:00 -0500 (EST) From: John Baldwin To: d@delphij.net Subject: Re: svn commit: r245494 - head/bin/pwait Date: Thu, 17 Jan 2013 13:40:35 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301160503.r0G53qie087155@svn.freebsd.org> <201301161111.49580.jhb@freebsd.org> <50F71D5E.60604@delphij.net> In-Reply-To: <50F71D5E.60604@delphij.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201301171340.35912.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 17 Jan 2013 13:41:00 -0500 (EST) Cc: "svn-src-head@freebsd.org" , Eitan Adler , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:41:01 -0000 On Wednesday, January 16, 2013 4:36:30 pm Xin Li wrote: > On 01/16/13 08:11, John Baldwin wrote: > > On Wednesday, January 16, 2013 1:49:40 am Xin LI wrote: > >> This doesn't seem right -- you should never release memory before > >> exit, especially for memory allocated in main(), unless this > >> "main" is intended for different purpose like a monolithic shell > >> that wants to avoid exec(). Note that pwait(1) have multiple exit > >> points I don't think it's practical. > >> > >> Would you mind if I commit this changeset instead? I have the > >> return -> exit change in my queue long ago but only noticed it > >> today... > > > > I think the free shouldn't be there as well, but I think requiring > > an exit() instead of return to "fix" it is bogus as well. The > > static analyzer is just broken in this case. main() is special and > > returns from it should be treated like exit() and not cause false > > warnings about memory leaks. > > Well, being a horrible idea itself to redefine main() to something > else and expect the module to do no harm to its caller, I think Eitan > still have a valid point that it could be a bad idea to ban this in > wholesale within compiler, as the C standard don't ban using return's > in main(). As I said in a later followup, I think there should be an option, but it should default to treating return from main as exit(). > In style(9) the examples do use exit() for main() by the way. Yes, but as other folks have pointed out, return() can be more suitable in other cases (specifically with C++ when you want objects in scope to be properly destroyed). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:45:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A70E6E18; Thu, 17 Jan 2013 18:45:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8FB5D9D3; Thu, 17 Jan 2013 18:45:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HIjKlT051540; Thu, 17 Jan 2013 18:45:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HIjKlJ051539; Thu, 17 Jan 2013 18:45:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301171845.r0HIjKlJ051539@svn.freebsd.org> From: John Baldwin Date: Thu, 17 Jan 2013 18:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245566 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:45:20 -0000 Author: jhb Date: Thu Jan 17 18:45:20 2013 New Revision: 245566 URL: http://svnweb.freebsd.org/changeset/base/245566 Log: Remove a no-longer-used variable after the previous change to use VA_UTIMES_NULL. Submitted by: bde, rmacklem MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Jan 17 18:32:30 2013 (r245565) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Jan 17 18:45:20 2013 (r245566) @@ -726,7 +726,6 @@ nfscl_fillsattr(struct nfsrv_descript *n u_int32_t *tl; struct nfsv2_sattr *sp; nfsattrbit_t attrbits; - struct timeval curtime; switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) { case ND_NFSV2: @@ -755,7 +754,6 @@ nfscl_fillsattr(struct nfsrv_descript *n txdr_nfsv2time(&vap->va_mtime, &sp->sa_mtime); break; case ND_NFSV3: - getmicrotime(&curtime); if (vap->va_mode != (mode_t)VNOVAL) { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = newnfs_true; From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:48:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A3DB4FC8 for ; Thu, 17 Jan 2013 18:48:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mx1.freebsd.org (Postfix) with ESMTP id 282CA9FB for ; Thu, 17 Jan 2013 18:48:35 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id fj20so2971762lab.24 for ; Thu, 17 Jan 2013 10:48:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=VpGCW59xd/0P2ah/JSqk3amLtTCepHTrH5mWzk3zh10=; b=JEPU3YJDyhwgbrgyl5FlDKouI4C8Pe7bNgIZEsOnrNmzGQO0XN7ZcVmMr6nTX5lj5h WC6Ih8bo8bGmI7eXll8Z+P9OOKbf336bO29JEJBHnAp+f4DX4DvqDmaHF8idvrUJpie+ 9b2SB20pgPb3duseObrmdLx43IgH92GgOSzOY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=VpGCW59xd/0P2ah/JSqk3amLtTCepHTrH5mWzk3zh10=; b=WLqHPgjt9zTaaxVL4iM37VmqupK7UO3ehcdUA405Zf7SSWnoUwMYQAGKfc53xauzPP wlDxJ3JWp/B0FcptxuULnvKTqebaRjgwE7YN5pY4rsk4+ufBr6MieFz9S68XAK7JXhZ4 acyICxuOtuza5I9PC06etEOMFz3+f+Dljpa8DV8ikzKeKr1wslHhr6TgLO1wV8eQpbPD CxcFBjwyU/8ZEfsM0YwJnAe6QhvIs0bPmceDyiBPM9LiEwJTrNYbjqTw98Xr6GKXuyQH deSouZEoIEswmkuDyHT5N4NAgfVps/4xMEJV4h9hlDA2+k53hiJNlx00mVxD8ygECLZO bLNg== X-Received: by 10.112.82.136 with SMTP id i8mr2597703lby.74.1358448514848; Thu, 17 Jan 2013 10:48:34 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Thu, 17 Jan 2013 10:48:04 -0800 (PST) In-Reply-To: <201301171035.14799.jhb@freebsd.org> References: <201301160503.r0G53qie087155@svn.freebsd.org> <50F6ED68.50602@delphij.net> <201301171035.14799.jhb@freebsd.org> From: Eitan Adler Date: Thu, 17 Jan 2013 13:48:04 -0500 X-Google-Sender-Auth: bE8b3inw3pLkIKVvkMJSxBd5CW0 Message-ID: Subject: Re: svn commit: r245494 - head/bin/pwait To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlA+N1luo/SG/W8MVuxY7diG2ppvio7Peb8a6MJzkvE2JG01Hzdhf/WZxiOGY4jIxtE9vTF Cc: "src-committers@freebsd.org" , Xin LI , Erik Cederstrand , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , d@delphij.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:48:36 -0000 On 17 January 2013 10:35, John Baldwin wrote: > No, it is clearly a bug. It is a waste of time and adds obfuscation (and > runtime overhead) to go free a bunch of stuff just before a return() from > main(). It is by-design according to the clang folks. They have expressed in interest in offering a knob to change this behavior, but I do not know the status of it. That said, I believe Xin's recent commit fixed the issue of adding an additional free. IMHO the compiler should also be able to optimize this case of free out. FWIW I have a very strong feeling of D=C3=A9j=C3=A0 vu here: we have discus= sed this exact type of change before. --=20 Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 18:52:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8453A30A; Thu, 17 Jan 2013 18:52:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 76E51A40; Thu, 17 Jan 2013 18:52:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HIqocC054075; Thu, 17 Jan 2013 18:52:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HIqocu054073; Thu, 17 Jan 2013 18:52:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301171852.r0HIqocu054073@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 17 Jan 2013 18:52:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245567 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 18:52:50 -0000 Author: np Date: Thu Jan 17 18:52:49 2013 New Revision: 245567 URL: http://svnweb.freebsd.org/changeset/base/245567 Log: cxgbe: Make the for_each macros safer to use by turning them into a single statement each. Submitted by: Christoph Mallon MFC after: 1 week Modified: head/sys/dev/cxgbe/adapter.h Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Jan 17 18:45:20 2013 (r245566) +++ head/sys/dev/cxgbe/adapter.h Thu Jan 17 18:52:49 2013 (r245567) @@ -648,17 +648,17 @@ struct adapter { #define TXQ_LOCK_ASSERT_NOTOWNED(txq) EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) #define for_each_txq(pi, iter, q) \ - q = &pi->adapter->sge.txq[pi->first_txq]; \ - for (iter = 0; iter < pi->ntxq; ++iter, ++q) + for (q = &pi->adapter->sge.txq[pi->first_txq], iter = 0; \ + iter < pi->ntxq; ++iter, ++q) #define for_each_rxq(pi, iter, q) \ - q = &pi->adapter->sge.rxq[pi->first_rxq]; \ - for (iter = 0; iter < pi->nrxq; ++iter, ++q) + for (q = &pi->adapter->sge.rxq[pi->first_rxq], iter = 0; \ + iter < pi->nrxq; ++iter, ++q) #define for_each_ofld_txq(pi, iter, q) \ - q = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \ - for (iter = 0; iter < pi->nofldtxq; ++iter, ++q) + for (q = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq], iter = 0; \ + iter < pi->nofldtxq; ++iter, ++q) #define for_each_ofld_rxq(pi, iter, q) \ - q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \ - for (iter = 0; iter < pi->nofldrxq; ++iter, ++q) + for (q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq], iter = 0; \ + iter < pi->nofldrxq; ++iter, ++q) /* One for errors, one for firmware events */ #define T4_EXTRA_INTR 2 From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 19:03:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4098D8BE; Thu, 17 Jan 2013 19:03:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2F37EAB3; Thu, 17 Jan 2013 19:03:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HJ3PQB057386; Thu, 17 Jan 2013 19:03:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HJ3OoS057384; Thu, 17 Jan 2013 19:03:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301171903.r0HJ3OoS057384@svn.freebsd.org> From: John Baldwin Date: Thu, 17 Jan 2013 19:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245568 - head/sys/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 19:03:25 -0000 Author: jhb Date: Thu Jan 17 19:03:24 2013 New Revision: 245568 URL: http://svnweb.freebsd.org/changeset/base/245568 Log: Remove the unused nfs_curusec(). Modified: head/sys/nfs/nfs_common.c head/sys/nfs/nfs_common.h Modified: head/sys/nfs/nfs_common.c ============================================================================== --- head/sys/nfs/nfs_common.c Thu Jan 17 18:52:49 2013 (r245567) +++ head/sys/nfs/nfs_common.c Thu Jan 17 19:03:24 2013 (r245568) @@ -90,15 +90,6 @@ static int nfs_realign_count; SYSCTL_INT(_vfs_nfs_common, OID_AUTO, realign_count, CTLFLAG_RD, &nfs_realign_count, 0, "Number of mbuf realignments done"); -u_quad_t -nfs_curusec(void) -{ - struct timeval tv; - - getmicrotime(&tv); - return ((u_quad_t)tv.tv_sec * 1000000 + (u_quad_t)tv.tv_usec); -} - /* * copies mbuf chain to the uio scatter/gather list */ Modified: head/sys/nfs/nfs_common.h ============================================================================== --- head/sys/nfs/nfs_common.h Thu Jan 17 18:52:49 2013 (r245567) +++ head/sys/nfs/nfs_common.h Thu Jan 17 19:03:24 2013 (r245568) @@ -46,7 +46,6 @@ extern nfstype nfsv3_type[]; #define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((int32_t)(a))]) int nfs_adv(struct mbuf **, caddr_t *, int, int); -u_quad_t nfs_curusec(void); void *nfsm_disct(struct mbuf **, caddr_t *, int, int, int); int nfs_realign(struct mbuf **, int); From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 19:27:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 12C263BD; Thu, 17 Jan 2013 19:27:13 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EEC9CC2F; Thu, 17 Jan 2013 19:27:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HJRCB7064375; Thu, 17 Jan 2013 19:27:12 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HJRCwh064374; Thu, 17 Jan 2013 19:27:12 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201301171927.r0HJRCwh064374@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 Jan 2013 19:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245570 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 19:27:13 -0000 Author: luigi Date: Thu Jan 17 19:27:12 2013 New Revision: 245570 URL: http://svnweb.freebsd.org/changeset/base/245570 Log: remove an incorrect comment and debugging code Modified: head/sys/dev/netmap/ixgbe_netmap.h Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Thu Jan 17 19:08:20 2013 (r245569) +++ head/sys/dev/netmap/ixgbe_netmap.h Thu Jan 17 19:27:12 2013 (r245570) @@ -63,9 +63,6 @@ * This is tricky, much better to use TDH for now. */ SYSCTL_DECL(_dev_netmap); -static int ix_write_len; -SYSCTL_INT(_dev_netmap, OID_AUTO, ix_write_len, - CTLFLAG_RW, &ix_write_len, 0, "write rx len"); static int ix_rx_miss, ix_rx_miss_bufs, ix_use_dd, ix_crcstrip; SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip, CTLFLAG_RW, &ix_crcstrip, 0, "strip CRC on rx frames"); @@ -485,12 +482,8 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u * rxr->next_to_check is set to 0 on a ring reinit */ if (netmap_no_pendintr || force_update) { - /* XXX apparently the length field in advanced descriptors - * does not include the CRC irrespective of the setting - * of CRCSTRIP. The data sheets say differently. - * Very strange. - */ int crclen = ix_crcstrip ? 0 : 4; + l = rxr->next_to_check; j = netmap_idx_n2k(kring, l); @@ -501,8 +494,6 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u if ((staterr & IXGBE_RXD_STAT_DD) == 0) break; ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen; - if (ix_write_len) - D("rx[%d] len %d", j, ring->slot[j].len); bus_dmamap_sync(rxr->ptag, rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); j = (j == lim) ? 0 : j + 1; From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 20:21:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7EA1167D; Thu, 17 Jan 2013 20:21:31 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 593ABEF9; Thu, 17 Jan 2013 20:21:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HKLVA7082421; Thu, 17 Jan 2013 20:21:31 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HKLVVK082420; Thu, 17 Jan 2013 20:21:31 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301172021.r0HKLVVK082420@svn.freebsd.org> From: Brooks Davis Date: Thu, 17 Jan 2013 20:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245571 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 20:21:31 -0000 Author: brooks Date: Thu Jan 17 20:21:30 2013 New Revision: 245571 URL: http://svnweb.freebsd.org/changeset/base/245571 Log: In preparation for logging metadata about each filesystem object refactor the link section of distrib-dirs to alwasy install to a full path (the link contents remain relative as they should). Eliminate the use of the "rm -r[f] ; ln -s " pattern in favor of "ln -sf ". None of these links could be directories on a system installed in the last decade. Sponsored by: DARPA, AFRL Reviewed by: mtree Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jan 17 19:27:12 2013 (r245570) +++ head/etc/Makefile Thu Jan 17 20:21:30 2013 (r245571) @@ -324,32 +324,26 @@ distrib-dirs: -f $$m -p $$d; \ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ done; true - cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys - cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . - cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . + ln -sf usr/src/sys ${DESTDIR}/sys cd ${DESTDIR}/usr/share/man; \ - set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ - while [ $$# -gt 0 ] ; \ - do \ - rm -rf "$$1"; \ - ln -s "$$2" "$$1"; \ - shift; shift; \ + for mandir in man*; do \ + ln -sf ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ + ln -sf ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \ done cd ${DESTDIR}/usr/share/openssl/man; \ + for mandir in man*; do \ + ln -sf ../$$mandir \ + ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ + done set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ - while [ $$# -gt 0 ] ; \ - do \ - rm -rf "$$1"; \ - ln -s "$$2" "$$1"; \ + while [ $$# -gt 0 ] ; do \ + ln -sf "$$2" "${DESTDIR}/usr/share/man/$$1"; \ + ln -sf "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \ shift; shift; \ done - cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . - cd ${DESTDIR}/usr/share/nls; \ set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ - while [ $$# -gt 0 ] ; \ - do \ - rm -rf "$$1"; \ - ln -s "$$2" "$$1"; \ + while [ $$# -gt 0 ] ; do \ + ln -sf "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ shift; shift; \ done From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 20:39:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BAA37AD4; Thu, 17 Jan 2013 20:39:33 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 1E68FF93; Thu, 17 Jan 2013 20:39:32 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id A46DDAFA; Thu, 17 Jan 2013 21:36:54 +0100 (CET) Date: Thu, 17 Jan 2013 21:39:55 +0100 From: Pawel Jakub Dawidek To: John Baldwin Subject: Re: svn commit: r245506 - head/bin/pwait Message-ID: <20130117203955.GA1679@garage.freebsd.pl> References: <201301161815.r0GIFQPk007553@svn.freebsd.org> <20130117130740.I1066@besplex.bde.org> <201301171050.07596.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <201301171050.07596.jhb@freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, Xin LI , Bruce Evans , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 20:39:33 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 17, 2013 at 10:50:07AM -0500, John Baldwin wrote: > On Wednesday, January 16, 2013 10:40:51 pm Eitan Adler wrote: > > On 16 January 2013 21:25, Bruce Evans wrote: > > > This uses the sysexits mistake. style(9) was fixed to not give an ex= ample > > > of this mistake. Before this, sysexits was used a whole once in pwai= t(1) > > > (for EX_USAGE) in usage(). EX_USAGE happens to be 64. As usual when= the > > > mistake is used, this is useless for humans (the usage message gives = more > > > info) and unusable for programs, especially since it is undocmented > > > (pwait(1)'s man page just says ">0 if an error occurs". It doesn't e= ven > > > use '.Std' for this, but hard-codes it. > >=20 > > IMHO using sysexits gives more signal than using a binary 0 or 1. It > > is a mistake to have changed style(9) to avoid using sysexits. > > Instead the man page should detail the specific error that occurs > > directly, or by reference to sysexit. >=20 > Eh, I think bde@ has quite a bit more experience with this than you. =20 > is not part of POSIX or any other standard. It's comments= =20 > reference delivermail (the predecessor to sendmail). Looking at its hist= ory,=20 > it has never been changed in FreeBSD, and it's history in CSRG is rather= =20 > spartan and mostly tied to delivermail/sendmail: >=20 > http://svnweb.freebsd.org/csrg/include/sysexits.h?view=3Dlog >=20 > In practice it's list of error value is limited and has not grown to hand= le=20 > new errors in over two decades (as opposed to, say, the list of errnos). = =20 > OTOH, it seems the history section in sysexits(3) is slightly off as the = CSRG=20 > history suggests it was present in at least 4.2BSD. Well, if we decide sysexits(3) are useless, then it would be nice to recommend against using it in sysexits(3) manual page. Currently it is rather seductive: According to style(9), it is not a good practice to call exit(3) with arbitrary values to indicate a failure condition when ending a program. Instead, the pre-defined exit codes from sysexits should be used, so the caller of the process can get a rough estimation about the failure class without looking up the source code. I, for one, used it pretty extensively in HAST:) % grep EX_ /usr/src/sbin/hastd/*.c | wc -l 67 In my humble opinion using sysexits(3) is better than just putting exit(1) everywhere. Actually HAST or some of my other projects was making decision about restarting a processes if the exit code was EX_TEMPFAIL (if the failure was temporary it is fine to restart, if it is not then better not to enter some infinite loop). I am fully aware that sysexits(3) doesn't cover many important cases, but those cases differ from application to application. The exact same problem exists for errno. For me those values represent sets of failure cases rather than allow to distinguish between every possible failure case. It would probably be the best to define exit codes for every application separately, but maybe selection of exit codes provided by sysexits(3) is good enough and definiately better than 0/1. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --5vNYLRcllDrimb99 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlD4YZsACgkQForvXbEpPzTVJwCgv7hEhx7XqKq959ILjHqsKkiq URMAnij4tkluaEFmgxIN8FkL7L6tvuoy =bJeC -----END PGP SIGNATURE----- --5vNYLRcllDrimb99-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 20:48:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 05112DB3 for ; Thu, 17 Jan 2013 20:48:22 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by mx1.freebsd.org (Postfix) with ESMTP id 83033FE8 for ; Thu, 17 Jan 2013 20:48:21 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id gi11so2216700lbb.19 for ; Thu, 17 Jan 2013 12:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=x+OCwqlTAxAiukznQs8My5LEcltLKmR0KtJcSO41rrU=; b=Oo1F+Ad1WPuBr/bd0I7P/u7qsi+B/mQBm7I9RTHXws3lN/joZXEMe5TKFZW0VYrO/4 8Si+sjrWhZrxEWgSBWQUE4h9oJT9M+EI2diUm2JDVidnBryzd4dXnqfp7dsPj5PibsOG K+jAbD88JFRZJLIoVK8gzB4YBfkLDdSR/to7Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=x+OCwqlTAxAiukznQs8My5LEcltLKmR0KtJcSO41rrU=; b=eyfIa6e4m3w5GLXt0Tr8EIk8d7HWKgIE7JXF2VzadyD8b2MyNKjYhhS+h0wKToRqWs pkC6hfTW2NjjiR9bdpRFzRvpR8l6Z0C1Ih/TvF8GFOYXBawPSmTi8WeZhRu6OuUujYwR /SuA0XUjoZ2/Cj5pGNQKcZcNFv6s1tCLDJaHoeduAK4X6AkH6DWpYE3dzYa2oXVzFE7U CNa+F47mKlyOcv7rw/4jAtYtNbX9o83ezmqcZ8/MKz/5BNEzjCTT9YbxQZzUG/fuLspj lKC2Hgav4XQ4yX20nioVPE761nbEXL6qYL8bu69wZVsuq3Yk1c5sE/cpsQs1HApkJUXs KDng== X-Received: by 10.152.144.4 with SMTP id si4mr6134243lab.10.1358455699812; Thu, 17 Jan 2013 12:48:19 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Thu, 17 Jan 2013 12:47:48 -0800 (PST) In-Reply-To: <201301171050.07596.jhb@freebsd.org> References: <201301161815.r0GIFQPk007553@svn.freebsd.org> <20130117130740.I1066@besplex.bde.org> <201301171050.07596.jhb@freebsd.org> From: Eitan Adler Date: Thu, 17 Jan 2013 15:47:48 -0500 X-Google-Sender-Auth: eqnyFpvTHc1EspiCLsv3oZBu1jM Message-ID: Subject: Re: svn commit: r245506 - head/bin/pwait To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmU3Yi8+kw7lxPhQGAjUxFij4YVhjGYwgCMUlFwVeK2TKiWEoorjMmhLyaE27s1FyXTElsE Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 20:48:22 -0000 On 17 January 2013 10:50, John Baldwin wrote: > Eh, I think bde@ has quite a bit more experience with this than you. No doubt. > is not part of POSIX or any other standard. It's comments > reference delivermail (the predecessor to sendmail). Looking at its history, ... Understood. I have found value in programs which output specific error returns instead of "1" or "0". The specific use of sysexits instead of each application choose their own is a nicety. > In practice it's list of error value is limited and has not grown to handle > new errors in over two decades (as opposed to, say, the list of errnos). Perhaps it is best to extend it instead of deprecating it? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 21:02:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EC54FDD; Thu, 17 Jan 2013 21:02:54 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DD3B6D7; Thu, 17 Jan 2013 21:02:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HL2s9w095158; Thu, 17 Jan 2013 21:02:54 GMT (envelope-from csjp@svn.freebsd.org) Received: (from csjp@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HL2sjL095155; Thu, 17 Jan 2013 21:02:54 GMT (envelope-from csjp@svn.freebsd.org) Message-Id: <201301172102.r0HL2sjL095155@svn.freebsd.org> From: "Christian S.J. Peron" Date: Thu, 17 Jan 2013 21:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245573 - head/sys/security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 21:02:55 -0000 Author: csjp Date: Thu Jan 17 21:02:53 2013 New Revision: 245573 URL: http://svnweb.freebsd.org/changeset/base/245573 Log: Implement the zonename token for jailed processes. If a process has an auditid/preselection masks specified, and is jailed, include the zonename (jailname) token as a part of the audit record. Reviewed by: pjd MFC after: 2 weeks Modified: head/sys/security/audit/audit.c head/sys/security/audit/audit_bsm.c head/sys/security/audit/audit_private.h Modified: head/sys/security/audit/audit.c ============================================================================== --- head/sys/security/audit/audit.c Thu Jan 17 20:21:56 2013 (r245572) +++ head/sys/security/audit/audit.c Thu Jan 17 21:02:53 2013 (r245573) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -211,6 +212,7 @@ audit_record_ctor(void *mem, int size, v struct kaudit_record *ar; struct thread *td; struct ucred *cred; + struct prison *pr; KASSERT(sizeof(*ar) == size, ("audit_record_ctor: wrong size")); @@ -233,6 +235,17 @@ audit_record_ctor(void *mem, int size, v ar->k_ar.ar_subj_pid = td->td_proc->p_pid; ar->k_ar.ar_subj_amask = cred->cr_audit.ai_mask; ar->k_ar.ar_subj_term_addr = cred->cr_audit.ai_termid; + /* + * If this process is jailed, make sure we capture the name of the + * jail so we can use it to generate a zonename token when we covert + * this record to BSM. + */ + if (jailed(cred)) { + pr = cred->cr_prison; + (void) strlcpy(ar->k_ar.ar_jailname, pr->pr_name, + sizeof(ar->k_ar.ar_jailname)); + } else + ar->k_ar.ar_jailname[0] = '\0'; return (0); } Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Thu Jan 17 20:21:56 2013 (r245572) +++ head/sys/security/audit/audit_bsm.c Thu Jan 17 21:02:53 2013 (r245573) @@ -462,7 +462,7 @@ audit_sys_auditon(struct audit_record *a int kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau) { - struct au_token *tok, *subj_tok; + struct au_token *tok, *subj_tok, *jail_tok; struct au_record *rec; au_tid_t tid; struct audit_record *ar; @@ -475,8 +475,13 @@ kaudit_to_bsm(struct kaudit_record *kar, rec = kau_open(); /* - * Create the subject token. + * Create the subject token. If this credential was jailed be sure to + * generate a zonename token. */ + if (ar->ar_jailname[0] != '\0') + jail_tok = au_to_zonename(ar->ar_jailname); + else + jail_tok = NULL; switch (ar->ar_subj_term_addr.at_type) { case AU_IPv4: tid.port = ar->ar_subj_term_addr.at_port; @@ -1623,11 +1628,15 @@ kaudit_to_bsm(struct kaudit_record *kar, /* * Write the subject token so it is properly freed here. */ + if (jail_tok != NULL) + kau_write(rec, jail_tok); kau_write(rec, subj_tok); kau_free(rec); return (BSM_NOAUDIT); } + if (jail_tok != NULL) + kau_write(rec, jail_tok); kau_write(rec, subj_tok); tok = au_to_return32(au_errno_to_bsm(ar->ar_errno), ar->ar_retval); kau_write(rec, tok); /* Every record gets a return token */ Modified: head/sys/security/audit/audit_private.h ============================================================================== --- head/sys/security/audit/audit_private.h Thu Jan 17 20:21:56 2013 (r245572) +++ head/sys/security/audit/audit_private.h Thu Jan 17 21:02:53 2013 (r245573) @@ -230,6 +230,7 @@ struct audit_record { int ar_arg_exitretval; struct sockaddr_storage ar_arg_sockaddr; cap_rights_t ar_arg_rights; + char ar_jailname[MAXHOSTNAMELEN]; }; /* From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 21:22:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A76925E8; Thu, 17 Jan 2013 21:22:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7B525186; Thu, 17 Jan 2013 21:22:11 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B7F5DB911; Thu, 17 Jan 2013 16:22:10 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r245568 - head/sys/nfs Date: Thu, 17 Jan 2013 14:59:00 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301171903.r0HJ3OoS057384@svn.freebsd.org> In-Reply-To: <201301171903.r0HJ3OoS057384@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201301171459.00463.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 17 Jan 2013 16:22:10 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 21:22:11 -0000 On Thursday, January 17, 2013 2:03:24 pm John Baldwin wrote: > Author: jhb > Date: Thu Jan 17 19:03:24 2013 > New Revision: 245568 > URL: http://svnweb.freebsd.org/changeset/base/245568 > > Log: > Remove the unused nfs_curusec(). > > Modified: > head/sys/nfs/nfs_common.c > head/sys/nfs/nfs_common.h 7.x used this in the old RPC code (pre-krpc) and in the write gathering code (which has not been reimplemented in 8.x+). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 21:28:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0AC218CE; Thu, 17 Jan 2013 21:28:33 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E29591D0; Thu, 17 Jan 2013 21:28:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HLSWIJ002402; Thu, 17 Jan 2013 21:28:32 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HLSWH8002398; Thu, 17 Jan 2013 21:28:32 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201301172128.r0HLSWH8002398@svn.freebsd.org> From: Andre Oppermann Date: Thu, 17 Jan 2013 21:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245575 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 21:28:33 -0000 Author: andre Date: Thu Jan 17 21:28:31 2013 New Revision: 245575 URL: http://svnweb.freebsd.org/changeset/base/245575 Log: Move the mbuf memory limit calculations from init_param2() to tunable_mbinit() where it is next to where it is used later. Change the sysinit level of tunable_mbinit() from SI_SUB_TUNABLES to SI_SUB_KMEM after the VM is running. This allows to use better methods to determine the effectively available physical and virtual memory available to the kernel. Update comments. In a second step it can be merged into mbuf_init(). Modified: head/sys/kern/kern_mbuf.c head/sys/kern/subr_param.c head/sys/sys/mbuf.h Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Thu Jan 17 21:20:15 2013 (r245574) +++ head/sys/kern/kern_mbuf.c Thu Jan 17 21:28:31 2013 (r245575) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -104,15 +105,24 @@ int nmbjumbo16; /* limits number of 16 struct mbstat mbstat; /* - * tunable_mbinit() has to be run before init_maxsockets() thus - * the SYSINIT order below is SI_ORDER_MIDDLE while init_maxsockets() - * runs at SI_ORDER_ANY. - * - * NB: This has to be done before VM init. + * tunable_mbinit() has to be run before any mbuf allocations are done. */ static void tunable_mbinit(void *dummy) { + quad_t realmem, maxmbufmem; + + /* + * The default limit for all mbuf related memory is 1/2 of all + * available kernel memory (physical or kmem). + * At most it can be 3/4 of available kernel memory. + */ + realmem = qmin((quad_t)physmem * PAGE_SIZE, + vm_map_max(kernel_map) - vm_map_min(kernel_map)); + maxmbufmem = realmem / 2; + TUNABLE_QUAD_FETCH("kern.maxmbufmem", &maxmbufmem); + if (maxmbufmem > realmem / 4 * 3) + maxmbufmem = realmem / 4 * 3; TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); if (nmbclusters == 0) @@ -139,7 +149,7 @@ tunable_mbinit(void *dummy) nmbufs = lmax(maxmbufmem / MSIZE / 5, nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16); } -SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL); +SYSINIT(tunable_mbinit, SI_SUB_KMEM, SI_ORDER_MIDDLE, tunable_mbinit, NULL); static int sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) @@ -279,16 +289,14 @@ static int mb_zinit_pack(void *, int, in static void mb_zfini_pack(void *, int); static void mb_reclaim(void *); -static void mbuf_init(void *); static void *mbuf_jumbo_alloc(uma_zone_t, int, uint8_t *, int); -/* Ensure that MSIZE must be a power of 2. */ +/* Ensure that MSIZE is a power of 2. */ CTASSERT((((MSIZE - 1) ^ MSIZE) + 1) >> 1 == MSIZE); /* * Initialize FreeBSD Network buffer allocation. */ -SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); static void mbuf_init(void *dummy) { @@ -396,6 +404,7 @@ mbuf_init(void *dummy) mbstat.sf_iocnt = 0; mbstat.sf_allocwait = mbstat.sf_allocfail = 0; } +SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); /* * UMA backend page allocator for the jumbo frame zones. Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Thu Jan 17 21:20:15 2013 (r245574) +++ head/sys/kern/subr_param.c Thu Jan 17 21:28:31 2013 (r245575) @@ -93,7 +93,6 @@ int ncallout; /* maximum # of timer ev int nbuf; int ngroups_max; /* max # groups per process */ int nswbuf; -quad_t maxmbufmem; /* max mbuf memory */ pid_t pid_max = PID_MAX; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ @@ -274,7 +273,6 @@ init_param1(void) void init_param2(long physpages) { - quad_t realmem; /* Base parameters */ maxusers = MAXUSERS; @@ -334,18 +332,6 @@ init_param2(long physpages) TUNABLE_INT_FETCH("kern.ncallout", &ncallout); /* - * The default limit for all mbuf related memory is 1/2 of all - * available kernel memory (physical or kmem). - * At most it can be 3/4 of available kernel memory. - */ - realmem = qmin((quad_t)physpages * PAGE_SIZE, - VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS); - maxmbufmem = realmem / 2; - TUNABLE_QUAD_FETCH("kern.maxmbufmem", &maxmbufmem); - if (maxmbufmem > (realmem / 4) * 3) - maxmbufmem = (realmem / 4) * 3; - - /* * The default for maxpipekva is min(1/64 of the kernel address space, * max(1/64 of main memory, 512KB)). See sys_pipe.c for more details. */ Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Thu Jan 17 21:20:15 2013 (r245574) +++ head/sys/sys/mbuf.h Thu Jan 17 21:28:31 2013 (r245575) @@ -384,7 +384,6 @@ struct mbstat { * * The rest of it is defined in kern/kern_mbuf.c */ -extern quad_t maxmbufmem; extern uma_zone_t zone_mbuf; extern uma_zone_t zone_clust; extern uma_zone_t zone_pack; From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 21:32:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 75CB1A87; Thu, 17 Jan 2013 21:32:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 47E9A1FA; Thu, 17 Jan 2013 21:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HLWIx7004779; Thu, 17 Jan 2013 21:32:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HLW4Wb004677; Thu, 17 Jan 2013 21:32:04 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301172132.r0HLW4Wb004677@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 17 Jan 2013 21:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245576 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events sour... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 21:32:18 -0000 Author: jkim Date: Thu Jan 17 21:32:03 2013 New Revision: 245576 URL: http://svnweb.freebsd.org/changeset/base/245576 Log: Import ACPICA 20130117. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/common/getopt.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslcompiler.y vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtexpress.c vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtparser.l vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prexpress.c vendor-sys/acpica/dist/source/compiler/prmacros.c vendor-sys/acpica/dist/source/compiler/prparser.l vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmobject.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswscope.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evglock.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exmutex.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/executer/exresnte.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exstorob.c vendor-sys/acpica/dist/source/components/executer/exsystem.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwesleep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsinfo.c vendor-sys/acpica/dist/source/components/resources/rsio.c vendor-sys/acpica/dist/source/components/resources/rsirq.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsmemory.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utcopy.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uteval.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/utids.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utlock.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acbuffer.h vendor-sys/acpica/dist/source/include/accommon.h vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acdispat.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/achware.h vendor-sys/acpica/dist/source/include/acinterp.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpi.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/include/platform/accygwin.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acfreebsd.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/achaiku.h vendor-sys/acpica/dist/source/include/platform/acintel.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/acmsvc.h vendor-sys/acpica/dist/source/include/platform/acnetbsd.h vendor-sys/acpica/dist/source/include/platform/acos2.h vendor-sys/acpica/dist/source/include/platform/acwin.h vendor-sys/acpica/dist/source/include/platform/acwin64.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpibin/acpibin.h vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.h vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpinames/acpinames.h vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/anstubs.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/source/tools/examples/examples.c vendor-sys/acpica/dist/tests/misc/grammar.asl Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/changes.txt Thu Jan 17 21:32:03 2013 (r245576) @@ -1,8 +1,70 @@ ---------------------------------------- -20 December 2012. Summary of changes for version 20121220: +17 January 2013. Summary of changes for version 20130117: + + +1) ACPICA Kernel-resident Subsystem: + +Updated the AcpiGetSleepTypeData interface: Allow the \_Sx methods to +return either 1 or 2 integers. Although the ACPI spec defines the \_Sx +objects to return a package containing one integer, most BIOS code returns +two integers and the previous code reflects that. However, we also need to +support BIOS code that actually implements to the ACPI spec, and this +change reflects this. + +Fixed two issues with the ACPI_DEBUG_PRINT macros: +1) Added the ACPI_DO_WHILE macro to the main DEBUG_PRINT helper macro for +C compilers that require this support. +2) Renamed the internal ACPI_DEBUG macro to ACPI_DO_DEBUG_PRINT since +ACPI_DEBUG is already used by many of the various hosts. + +Updated all ACPICA copyrights and signons to 2013. Added the 2013 +copyright to all module headers and signons, including the standard Linux +header. This affects virtually every file in the ACPICA core subsystem, +iASL compiler, all ACPICA utilities, and the test suites. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 94.5K Code, 25.5K Data, 120.0K Total + Debug Version: 182.2K Code, 74.9K Data, 257.1K Total + Current Release: + Non-Debug Version: 94.5K Code, 25.4K Data, 119.9K Total + Debug Version: 182.3K Code, 75.0K Data, 257.3K Total + -This release is available at https://www.acpica.org/downloads -The ACPI 5.0 specification is available at www.acpi.info +2) iASL Compiler/Disassembler and Tools: + +Generic Unix OSL: Use a buffer to eliminate multiple vfprintf()s and +prevent a possible fault on some hosts. Some C libraries modify the arg +pointer parameter to vfprintf making it difficult to call it twice in the +AcpiOsVprintf function. Use a local buffer to workaround this issue. This +does not affect the Windows OSL since the Win C library does not modify +the arg pointer. Chao Guan, Bob Moore. + +iASL: Fixed a possible infinite loop when the maximum error count is +reached. If an output file other than the .AML file is specified (such as +a listing file), and the maximum number of errors is reached, do not +attempt to flush data to the output file(s) as the compiler is aborting. +This can cause an infinite loop as the max error count code essentially +keeps calling itself. + +iASL/Disassembler: Added an option (-in) to ignore NOOP opcodes/operators. +Implemented for both the compiler and the disassembler. Often, the NOOP +opcode is used as padding for packages that are changed dynamically by the +BIOS. When disassembled and recompiled, these NOOPs will cause syntax +errors. This option causes the disassembler to ignore all NOOP opcodes +(0xA3), and it also causes the compiler to ignore all ASL source code NOOP +statements as well. + +Debugger: Enhanced the Sleep command to execute all sleep states. This +change allows Sleep to be invoked with no arguments and causes the +debugger to execute all of the sleep states, 0-5, automatically. + +---------------------------------------- +20 December 2012. Summary of changes for version 20121220: 1) ACPICA Kernel-resident Subsystem: @@ -88,9 +150,6 @@ been updated. ---------------------------------------- 14 November 2012. Summary of changes for version 20121114: -This release is available at https://www.acpica.org/downloads -The ACPI 5.0 specification is available at www.acpi.info - 1) ACPICA Kernel-resident Subsystem: Implemented a performance enhancement for ACPI/AML Package objects. This Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/adfile.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/adisasm.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/adwalk.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmextern.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmrestag.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmrestag.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmtable.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/getopt.c ============================================================================== --- vendor-sys/acpica/dist/source/common/getopt.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/getopt.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslbtypes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -201,7 +201,7 @@ NamePathTail [.]{NameSeg} "Mutex" { count (2); return (PARSEOP_MUTEX); } "Name" { count (2); return (PARSEOP_NAME); } "NAnd" { count (3); return (PARSEOP_NAND); } -"Noop" { count (3); return (PARSEOP_NOOP); } +"Noop" { if (!AcpiGbl_IgnoreNoopOperator) {count (3); return (PARSEOP_NOOP);} } "NOr" { count (3); return (PARSEOP_NOR); } "Not" { count (3); return (PARSEOP_NOT); } "Notify" { count (3); return (PARSEOP_NOTIFY); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.y Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.y Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -660,7 +660,6 @@ AslCommonError ( Gbl_SourceLine = 0; Gbl_NextError = Gbl_ErrorLog; - CmDoOutputFiles (); CmCleanupAndExit (); exit(1); } Modified: vendor-sys/acpica/dist/source/compiler/aslfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfileio.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslfileio.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslhex.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhex.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslhex.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllength.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asllength.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllisting.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asllisting.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -117,6 +117,8 @@ LsTreeWriteWalk ( UINT32 Level, void *Context); +#define ASL_LISTING_LINE_PREFIX ": " + /******************************************************************************* * @@ -665,7 +667,8 @@ LsWriteListingHexBytes ( { case ASL_FILE_LISTING_OUTPUT: - FlPrintFile (FileId, "%8.8X....", Gbl_CurrentAmlOffset); + FlPrintFile (FileId, "%8.8X%s", Gbl_CurrentAmlOffset, + ASL_LISTING_LINE_PREFIX); break; case ASL_FILE_ASM_SOURCE_OUTPUT: @@ -725,6 +728,24 @@ LsWriteOneSourceLine ( Gbl_SourceLine++; Gbl_ListingNode->LineNumber++; + /* Ignore lines that are completely blank (but count the line above) */ + + if (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) != AE_OK) + { + return (0); + } + if (FileByte == '\n') + { + return (1); + } + + /* + * This is a non-empty line, we will print the entire line with + * the line number and possibly other prefixes and transforms. + */ + + /* Line prefixes for special files, C and ASM output */ + if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { FlPrintFile (FileId, " *"); @@ -740,19 +761,21 @@ LsWriteOneSourceLine ( * This file contains "include" statements, print the current * filename and line number within the current file */ - FlPrintFile (FileId, "%12s %5d....", - Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber); + FlPrintFile (FileId, "%12s %5d%s", + Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber, + ASL_LISTING_LINE_PREFIX); } else { /* No include files, just print the line number */ - FlPrintFile (FileId, "%8d....", Gbl_SourceLine); + FlPrintFile (FileId, "%8u%s", Gbl_SourceLine, + ASL_LISTING_LINE_PREFIX); } - /* Read one line (up to a newline or EOF) */ + /* Read the rest of this line (up to a newline or EOF) */ - while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK) + do { if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { @@ -766,13 +789,15 @@ LsWriteOneSourceLine ( if (FileByte == '\n') { /* + * This line has been completed. * Check if an error occurred on this source line during the compile. * If so, we print the error message after the source line. */ LsCheckException (Gbl_SourceLine, FileId); return (1); } - } + + } while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK); /* EOF on the input file was reached */ Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllookup.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asllookup.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -153,6 +153,7 @@ Options ( ACPI_OPTION ("-oi", "Disable integer optimization to Zero/One/Ones"); ACPI_OPTION ("-on", "Disable named reference string optimization"); ACPI_OPTION ("-cr", "Disable Resource Descriptor error checking"); + ACPI_OPTION ("-in", "Ignore NoOp operators"); ACPI_OPTION ("-r ", "Override table header Revision (1-255)"); printf ("\nASL Listing Files:\n"); @@ -172,6 +173,7 @@ Options ( ACPI_OPTION ("", "(Obtain DSDT from current system if no input file)"); ACPI_OPTION ("-e [f1,f2]", "Include ACPI table(s) for external symbol resolution"); ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)"); + ACPI_OPTION ("-in", "Ignore NoOp opcodes"); ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); printf ("\nHelp:\n"); @@ -622,6 +624,13 @@ AslDoOptions ( Gbl_C_IncludeOutputFlag = TRUE; break; + case 'n': + + /* Compiler/Disassembler: Ignore the NOOP operator */ + + AcpiGbl_IgnoreNoopOperator = TRUE; + break; + default: printf ("Unknown option: -i%s\n", AcpiGbl_Optarg); return (-1); Modified: vendor-sys/acpica/dist/source/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmap.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmap.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmethod.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmethod.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslnamesp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslnamesp.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslnamesp.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopcodes.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslopcodes.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslopt.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopt.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslopt.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpredef.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslpredef.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,6 +66,7 @@ ApCheckForSpecialName ( static void ApCheckObjectType ( + const char *PredefinedName, ACPI_PARSE_OBJECT *Op, UINT32 ExpectedBtypes); @@ -383,7 +384,8 @@ ApCheckPredefinedReturnValue ( /* Static data return object - check against expected type */ - ApCheckObjectType (ReturnValueOp, + ApCheckObjectType (PredefinedNames[Index].Info.Name, + ReturnValueOp, PredefinedNames[Index].Info.ExpectedBtypes); break; @@ -482,7 +484,8 @@ ApCheckForPredefinedObject ( /* Typecheck the actual object, it is the next argument */ - ApCheckObjectType (Op->Asl.Child->Asl.Next, + ApCheckObjectType (PredefinedNames[Index].Info.Name, + Op->Asl.Child->Asl.Next, PredefinedNames[Index].Info.ExpectedBtypes); return; } @@ -640,7 +643,8 @@ ApCheckForSpecialName ( * * FUNCTION: ApCheckObjectType * - * PARAMETERS: Op - Current parse node + * PARAMETERS: PredefinedName - Name of the predefined object we are checking + * Op - Current parse node * ExpectedBtypes - Bitmap of expected return type(s) * * RETURN: None @@ -653,6 +657,7 @@ ApCheckForSpecialName ( static void ApCheckObjectType ( + const char *PredefinedName, ACPI_PARSE_OBJECT *Op, UINT32 ExpectedBtypes) { @@ -701,8 +706,8 @@ TypeErrorExit: ApGetExpectedTypes (StringBuffer, ExpectedBtypes); - sprintf (MsgBuffer, "found %s, requires %s", - UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); + sprintf (MsgBuffer, "%s: found %s, requires %s", + PredefinedName, UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer); Modified: vendor-sys/acpica/dist/source/compiler/aslresource.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslresource.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslresource.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype1.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype1.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype1.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype1i.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype1i.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype1i.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2d.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2d.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2d.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2e.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2e.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2e.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2q.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2q.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2q.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2s.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2s.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2s.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2w.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2w.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2w.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslstubs.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstubs.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslstubs.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslsupport.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslsupport.l Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslsupport.l Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asltransform.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltransform.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asltransform.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asltree.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltree.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asltree.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asltypes.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltypes.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asltypes.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslutils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslutils.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslutils.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asluuid.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asluuid.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asluuid.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslwalks.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslwalks.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslwalks.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslxref.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslxref.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslxref.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompile.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtcompile.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtexpress.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtexpress.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtexpress.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtfield.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtfield.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtfield.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtio.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtio.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtparser.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtparser.l Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtparser.l Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtparser.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtparser.y Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtparser.y Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtsubtable.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtsubtable.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtsubtable.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dttable.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dttable.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dttable.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dttemplate.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dttemplate.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dttemplate.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 21:32:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AEA9EA89; Thu, 17 Jan 2013 21:32:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 925121FB; Thu, 17 Jan 2013 21:32:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HLWQNv004839; Thu, 17 Jan 2013 21:32:26 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HLWQHD004835; Thu, 17 Jan 2013 21:32:26 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301172132.r0HLWQHD004835@svn.freebsd.org> From: John Baldwin Date: Thu, 17 Jan 2013 21:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245577 - in head/sys: amd64/amd64 i386/i386 x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 21:32:26 -0000 Author: jhb Date: Thu Jan 17 21:32:25 2013 New Revision: 245577 URL: http://svnweb.freebsd.org/changeset/base/245577 Log: Don't attempt to use clflush on the local APIC register window. Various CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on Pentium-M, and trashing of the local APIC registers on a VIA C7). The local APIC is implicitly mapped UC already via MTRRs, so the clflush isn't necessary anyway. MFC after: 2 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/x86/x86/local_apic.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jan 17 21:32:03 2013 (r245576) +++ head/sys/amd64/amd64/pmap.c Thu Jan 17 21:32:25 2013 (r245577) @@ -1150,6 +1150,15 @@ pmap_invalidate_cache_range(vm_offset_t eva - sva < PMAP_CLFLUSH_THRESHOLD) { /* + * XXX: Some CPUs fault, hang, or trash the local APIC + * registers if we use CLFLUSH on the local APIC + * range. The local APIC is always uncached, so we + * don't need to flush for that range anyway. + */ + if (pmap_kextract(sva) == lapic_paddr) + return; + + /* * Otherwise, do per-cache line flush. Use the mfence * instruction to insure that previous stores are * included in the write-back. The processor Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Jan 17 21:32:03 2013 (r245576) +++ head/sys/i386/i386/pmap.c Thu Jan 17 21:32:25 2013 (r245577) @@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$"); * and to when physical maps must be made correct. */ +#include "opt_apic.h" #include "opt_cpu.h" #include "opt_pmap.h" #include "opt_smp.h" @@ -1175,6 +1176,16 @@ pmap_invalidate_cache_range(vm_offset_t else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { +#ifdef DEV_APIC + /* + * XXX: Some CPUs fault, hang, or trash the local APIC + * registers if we use CLFLUSH on the local APIC + * range. The local APIC is always uncached, so we + * don't need to flush for that range anyway. + */ + if (pmap_kextract(sva) == lapic_paddr) + return; +#endif /* * Otherwise, do per-cache line flush. Use the mfence * instruction to insure that previous stores are Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Thu Jan 17 21:32:03 2013 (r245576) +++ head/sys/x86/x86/local_apic.c Thu Jan 17 21:32:25 2013 (r245577) @@ -227,8 +227,8 @@ lapic_init(vm_paddr_t addr) /* Map the local APIC and setup the spurious interrupt handler. */ KASSERT(trunc_page(addr) == addr, ("local APIC not aligned on a page boundary")); - lapic = pmap_mapdev(addr, sizeof(lapic_t)); lapic_paddr = addr; + lapic = pmap_mapdev(addr, sizeof(lapic_t)); setidt(APIC_SPURIOUS_INT, IDTVEC(spuriousint), SDT_APIC, SEL_KPL, GSEL_APIC); From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 21:32:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C4F2FD54; Thu, 17 Jan 2013 21:32:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A035D207; Thu, 17 Jan 2013 21:32:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HLWr6P004954; Thu, 17 Jan 2013 21:32:53 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HLWrJT004953; Thu, 17 Jan 2013 21:32:53 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301172132.r0HLWrJT004953@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 17 Jan 2013 21:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245578 - vendor-sys/acpica/20130117 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 21:32:53 -0000 Author: jkim Date: Thu Jan 17 21:32:53 2013 New Revision: 245578 URL: http://svnweb.freebsd.org/changeset/base/245578 Log: Tag ACPICA 20130117. Added: vendor-sys/acpica/20130117/ - copied from r245577, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 22:14:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AB710BFA; Thu, 17 Jan 2013 22:14:59 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 93D008A9; Thu, 17 Jan 2013 22:14:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HMExon019555; Thu, 17 Jan 2013 22:14:59 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HMEwN5019545; Thu, 17 Jan 2013 22:14:58 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201301172214.r0HMEwN5019545@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 Jan 2013 22:14:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245579 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 22:14:59 -0000 Author: luigi Date: Thu Jan 17 22:14:58 2013 New Revision: 245579 URL: http://svnweb.freebsd.org/changeset/base/245579 Log: add some definition and driver changes in preparation for two upcoming features: semi-transparent mode: when a device is opened in this mode, the user program will be able to mark slots that must be forwarded to the "other" side (i.e. from NIC to host stack, or viceversa), and the forwarding will occur automatically at the next netmap syscall. This saves the need to open another file descriptor and do the forwarding manually. direct-forwarding mode: when operating with a VALE port, the user can specify in the slot the actual destination port, overriding the forwarding decision made by a lookup of the destination MAC. This can be useful to implement packet dispatchers. No API changes will be introduced. No new functionality in this patch yet. Modified: head/sys/dev/netmap/if_em_netmap.h head/sys/dev/netmap/if_igb_netmap.h head/sys/dev/netmap/if_lem_netmap.h head/sys/dev/netmap/if_re_netmap.h head/sys/dev/netmap/ixgbe_netmap.h head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/if_em_netmap.h ============================================================================== --- head/sys/dev/netmap/if_em_netmap.h Thu Jan 17 21:32:53 2013 (r245578) +++ head/sys/dev/netmap/if_em_netmap.h Thu Jan 17 22:14:58 2013 (r245579) @@ -292,6 +292,8 @@ em_netmap_rxsync(struct ifnet *ifp, u_in l = rxr->next_to_check; j = netmap_idx_n2k(kring, l); if (netmap_no_pendintr || force_update) { + uint16_t slot_flags = kring->nkr_slot_flags; + for (n = 0; ; n++) { struct e1000_rx_desc *curr = &rxr->rx_base[l]; uint32_t staterr = le32toh(curr->status); @@ -299,6 +301,7 @@ em_netmap_rxsync(struct ifnet *ifp, u_in if ((staterr & E1000_RXD_STAT_DD) == 0) break; ring->slot[j].len = le16toh(curr->length); + ring->slot[j].flags = slot_flags; bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[l].map, BUS_DMASYNC_POSTREAD); j = (j == lim) ? 0 : j + 1; Modified: head/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- head/sys/dev/netmap/if_igb_netmap.h Thu Jan 17 21:32:53 2013 (r245578) +++ head/sys/dev/netmap/if_igb_netmap.h Thu Jan 17 22:14:58 2013 (r245579) @@ -263,6 +263,8 @@ igb_netmap_rxsync(struct ifnet *ifp, u_i l = rxr->next_to_check; j = netmap_idx_n2k(kring, l); if (netmap_no_pendintr || force_update) { + uint16_t slot_flags = kring->nkr_slot_flags; + for (n = 0; ; n++) { union e1000_adv_rx_desc *curr = &rxr->rx_base[l]; uint32_t staterr = le32toh(curr->wb.upper.status_error); @@ -270,6 +272,7 @@ igb_netmap_rxsync(struct ifnet *ifp, u_i if ((staterr & E1000_RXD_STAT_DD) == 0) break; ring->slot[j].len = le16toh(curr->wb.upper.length); + ring->slot[j].flags = slot_flags; bus_dmamap_sync(rxr->ptag, rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); j = (j == lim) ? 0 : j + 1; Modified: head/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- head/sys/dev/netmap/if_lem_netmap.h Thu Jan 17 21:32:53 2013 (r245578) +++ head/sys/dev/netmap/if_lem_netmap.h Thu Jan 17 22:14:58 2013 (r245579) @@ -253,6 +253,8 @@ lem_netmap_rxsync(struct ifnet *ifp, u_i l = adapter->next_rx_desc_to_check; j = netmap_idx_n2k(kring, l); if (netmap_no_pendintr || force_update) { + uint16_t slot_flags = kring->nkr_slot_flags; + for (n = 0; ; n++) { struct e1000_rx_desc *curr = &adapter->rx_desc_base[l]; uint32_t staterr = le32toh(curr->status); @@ -266,6 +268,7 @@ lem_netmap_rxsync(struct ifnet *ifp, u_i len = 0; } ring->slot[j].len = len; + ring->slot[j].flags = slot_flags; bus_dmamap_sync(adapter->rxtag, adapter->rx_buffer_area[l].map, BUS_DMASYNC_POSTREAD); Modified: head/sys/dev/netmap/if_re_netmap.h ============================================================================== --- head/sys/dev/netmap/if_re_netmap.h Thu Jan 17 21:32:53 2013 (r245578) +++ head/sys/dev/netmap/if_re_netmap.h Thu Jan 17 22:14:58 2013 (r245579) @@ -245,6 +245,8 @@ re_netmap_rxsync(struct ifnet *ifp, u_in l = sc->rl_ldata.rl_rx_prodidx; /* next pkt to check */ j = netmap_idx_n2k(kring, l); /* the kring index */ if (netmap_no_pendintr || force_update) { + uint16_t slot_flags = kring->nkr_slot_flags; + for (n = kring->nr_hwavail; n < lim ; n++) { struct rl_desc *cur_rx = &sc->rl_ldata.rl_rx_list[l]; uint32_t rxstat = le32toh(cur_rx->rl_cmdstat); @@ -256,6 +258,7 @@ re_netmap_rxsync(struct ifnet *ifp, u_in /* XXX subtract crc */ total_len = (total_len < 4) ? 0 : total_len - 4; kring->ring->slot[j].len = total_len; + kring->ring->slot[j].flags = slot_flags; /* sync was in re_newbuf() */ bus_dmamap_sync(sc->rl_ldata.rl_rx_mtag, rxd[l].rx_dmamap, BUS_DMASYNC_POSTREAD); Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Thu Jan 17 21:32:53 2013 (r245578) +++ head/sys/dev/netmap/ixgbe_netmap.h Thu Jan 17 22:14:58 2013 (r245579) @@ -483,6 +483,7 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u */ if (netmap_no_pendintr || force_update) { int crclen = ix_crcstrip ? 0 : 4; + uint16_t slot_flags = kring->nkr_slot_flags; l = rxr->next_to_check; j = netmap_idx_n2k(kring, l); @@ -494,6 +495,7 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u if ((staterr & IXGBE_RXD_STAT_DD) == 0) break; ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen; + ring->slot[j].flags = slot_flags; bus_dmamap_sync(rxr->ptag, rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); j = (j == lim) ? 0 : j + 1; Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Thu Jan 17 21:32:53 2013 (r245578) +++ head/sys/dev/netmap/netmap_kern.h Thu Jan 17 22:14:58 2013 (r245579) @@ -119,6 +119,10 @@ struct netmap_adapter; * RX rings: the next empty buffer (hwcur + hwavail + hwofs) coincides with * the next empty buffer as known by the hardware (next_to_check or so). * TX rings: hwcur + hwofs coincides with next_to_send + * + * For received packets, slot->flags is set to nkr_slot_flags + * so we can provide a proper initial value (e.g. set NS_FORWARD + * when operating in 'transparent' mode). */ struct netmap_kring { struct netmap_ring *ring; @@ -128,6 +132,7 @@ struct netmap_kring { #define NKR_PENDINTR 0x1 // Pending interrupt. u_int nkr_num_slots; + uint16_t nkr_slot_flags; /* initial value for flags */ int nkr_hwofs; /* offset between NIC and netmap ring */ struct netmap_adapter *na; NM_SELINFO_T si; /* poll/select wait queue */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 23:05:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 99E57D10; Thu, 17 Jan 2013 23:05:04 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8D879B00; Thu, 17 Jan 2013 23:05:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HN54Lq037020; Thu, 17 Jan 2013 23:05:04 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HN5434037019; Thu, 17 Jan 2013 23:05:04 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301172305.r0HN5434037019@svn.freebsd.org> From: Brooks Davis Date: Thu, 17 Jan 2013 23:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245580 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 23:05:04 -0000 Author: brooks Date: Thu Jan 17 23:05:03 2013 New Revision: 245580 URL: http://svnweb.freebsd.org/changeset/base/245580 Log: In r245571, "rm -rf ; ln -s " needed to be replaced with "ln -sfh " or the links would fail when a valid link to a directly was in place at . Reported by: peter Tested by: peter Pointy hat to: brooks Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jan 17 22:14:58 2013 (r245579) +++ head/etc/Makefile Thu Jan 17 23:05:03 2013 (r245580) @@ -324,26 +324,26 @@ distrib-dirs: -f $$m -p $$d; \ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ done; true - ln -sf usr/src/sys ${DESTDIR}/sys + ln -sfh usr/src/sys ${DESTDIR}/sys cd ${DESTDIR}/usr/share/man; \ for mandir in man*; do \ - ln -sf ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ - ln -sf ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \ + ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ + ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \ done cd ${DESTDIR}/usr/share/openssl/man; \ for mandir in man*; do \ - ln -sf ../$$mandir \ + ln -sfh ../$$mandir \ ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ done set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ while [ $$# -gt 0 ] ; do \ - ln -sf "$$2" "${DESTDIR}/usr/share/man/$$1"; \ - ln -sf "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \ + ln -sfh "$$2" "${DESTDIR}/usr/share/man/$$1"; \ + ln -sfh "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \ shift; shift; \ done set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ - ln -sf "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ + ln -sfh "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ shift; shift; \ done From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 23:14:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CE0653CC; Thu, 17 Jan 2013 23:14:17 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A8BCABE8; Thu, 17 Jan 2013 23:14:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HNEH5F040605; Thu, 17 Jan 2013 23:14:17 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HNEHsu040603; Thu, 17 Jan 2013 23:14:17 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201301172314.r0HNEHsu040603@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 17 Jan 2013 23:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245581 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 23:14:17 -0000 Author: luigi Date: Thu Jan 17 23:14:17 2013 New Revision: 245581 URL: http://svnweb.freebsd.org/changeset/base/245581 Log: remove the old memory allocator, not useful anymore Deleted: head/sys/dev/netmap/netmap_mem1.c From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 23:56:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DD0B4BAA; Thu, 17 Jan 2013 23:56:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CAF88E14; Thu, 17 Jan 2013 23:56:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HNumLu054220; Thu, 17 Jan 2013 23:56:48 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HNuiRE054187; Thu, 17 Jan 2013 23:56:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301172356.r0HNuiRE054187@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 17 Jan 2013 23:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245582 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 17 Jan 2013 23:56:48 -0000 Author: jkim Date: Thu Jan 17 23:56:43 2013 New Revision: 245582 URL: http://svnweb.freebsd.org/changeset/base/245582 Log: Merge ACPICA 20130117. Added: head/sys/contrib/dev/acpica/compiler/aslfileio.c - copied, changed from r244972, vendor-sys/acpica/dist/source/compiler/aslfileio.c head/sys/contrib/dev/acpica/compiler/aslhex.c - copied, changed from r244972, vendor-sys/acpica/dist/source/compiler/aslhex.c head/sys/contrib/dev/acpica/compiler/aslmethod.c - copied, changed from r244972, vendor-sys/acpica/dist/source/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslnamesp.c - copied, changed from r244972, vendor-sys/acpica/dist/source/compiler/aslnamesp.c head/sys/contrib/dev/acpica/compiler/aslxref.c - copied, changed from r244972, vendor-sys/acpica/dist/source/compiler/aslxref.c head/sys/contrib/dev/acpica/components/debugger/dbconvert.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/debugger/dbconvert.c head/sys/contrib/dev/acpica/components/events/evhandler.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/events/evhandler.c head/sys/contrib/dev/acpica/components/namespace/nsprepkg.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c head/sys/contrib/dev/acpica/components/parser/psobject.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/parser/psobject.c head/sys/contrib/dev/acpica/components/parser/psopinfo.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/parser/psopinfo.c head/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c head/sys/contrib/dev/acpica/components/utilities/utownerid.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/utilities/utownerid.c head/sys/contrib/dev/acpica/components/utilities/utstring.c - copied, changed from r244972, vendor-sys/acpica/dist/source/components/utilities/utstring.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/changes.txt (contents, props changed) head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslbtypes.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcompiler.y head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype1i.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslrestype2d.c head/sys/contrib/dev/acpica/compiler/aslrestype2e.c head/sys/contrib/dev/acpica/compiler/aslrestype2q.c head/sys/contrib/dev/acpica/compiler/aslrestype2s.c head/sys/contrib/dev/acpica/compiler/aslrestype2w.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/asluuid.c head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtexpress.c head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/dtparser.l head/sys/contrib/dev/acpica/compiler/dtparser.y head/sys/contrib/dev/acpica/compiler/dtsubtable.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttemplate.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prexpress.c head/sys/contrib/dev/acpica/compiler/prmacros.c head/sys/contrib/dev/acpica/compiler/prparser.l head/sys/contrib/dev/acpica/compiler/prparser.y head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/debugger/dbhistry.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c head/sys/contrib/dev/acpica/components/disassembler/dmnames.c head/sys/contrib/dev/acpica/components/disassembler/dmobject.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/components/disassembler/dmutils.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dsargs.c head/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/dispatcher/dswscope.c head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/events/evglock.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeblk.c head/sys/contrib/dev/acpica/components/events/evgpeinit.c head/sys/contrib/dev/acpica/components/events/evgpeutil.c head/sys/contrib/dev/acpica/components/events/evmisc.c head/sys/contrib/dev/acpica/components/events/evregion.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/events/evsci.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/events/evxfevnt.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/events/evxfregn.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/excreate.c head/sys/contrib/dev/acpica/components/executer/exdebug.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/executer/exfield.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/executer/exmisc.c head/sys/contrib/dev/acpica/components/executer/exmutex.c head/sys/contrib/dev/acpica/components/executer/exnames.c head/sys/contrib/dev/acpica/components/executer/exoparg1.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/executer/exoparg3.c head/sys/contrib/dev/acpica/components/executer/exoparg6.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/executer/exregion.c head/sys/contrib/dev/acpica/components/executer/exresnte.c head/sys/contrib/dev/acpica/components/executer/exresolv.c head/sys/contrib/dev/acpica/components/executer/exresop.c head/sys/contrib/dev/acpica/components/executer/exstore.c head/sys/contrib/dev/acpica/components/executer/exstoren.c head/sys/contrib/dev/acpica/components/executer/exstorob.c head/sys/contrib/dev/acpica/components/executer/exsystem.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/hardware/hwacpi.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwpci.c head/sys/contrib/dev/acpica/components/hardware/hwregs.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/hardware/hwtimer.c head/sys/contrib/dev/acpica/components/hardware/hwvalid.c head/sys/contrib/dev/acpica/components/hardware/hwxface.c head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nsalloc.c head/sys/contrib/dev/acpica/components/namespace/nsdump.c head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsobject.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nspredef.c head/sys/contrib/dev/acpica/components/namespace/nsrepair.c head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c head/sys/contrib/dev/acpica/components/namespace/nssearch.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/namespace/nswalk.c head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/namespace/nsxfobj.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psopcode.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psscope.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/parser/psutils.c head/sys/contrib/dev/acpica/components/parser/pswalk.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/resources/rsaddr.c head/sys/contrib/dev/acpica/components/resources/rscalc.c head/sys/contrib/dev/acpica/components/resources/rscreate.c head/sys/contrib/dev/acpica/components/resources/rsdump.c head/sys/contrib/dev/acpica/components/resources/rsinfo.c head/sys/contrib/dev/acpica/components/resources/rsio.c head/sys/contrib/dev/acpica/components/resources/rsirq.c head/sys/contrib/dev/acpica/components/resources/rslist.c head/sys/contrib/dev/acpica/components/resources/rsmemory.c head/sys/contrib/dev/acpica/components/resources/rsmisc.c head/sys/contrib/dev/acpica/components/resources/rsserial.c head/sys/contrib/dev/acpica/components/resources/rsutils.c head/sys/contrib/dev/acpica/components/resources/rsxface.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbfind.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utaddress.c head/sys/contrib/dev/acpica/components/utilities/utalloc.c head/sys/contrib/dev/acpica/components/utilities/utcache.c head/sys/contrib/dev/acpica/components/utilities/utcopy.c head/sys/contrib/dev/acpica/components/utilities/utdebug.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/uteval.c head/sys/contrib/dev/acpica/components/utilities/utexcep.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/utids.c head/sys/contrib/dev/acpica/components/utilities/utinit.c head/sys/contrib/dev/acpica/components/utilities/utlock.c head/sys/contrib/dev/acpica/components/utilities/utmath.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utobject.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/components/utilities/utstate.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/components/utilities/utxface.c head/sys/contrib/dev/acpica/components/utilities/utxferror.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/components/utilities/utxfmutex.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acbuffer.h head/sys/contrib/dev/acpica/include/accommon.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acdispat.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpi.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c head/sys/dev/acpica/acpi.c head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/dev/acpica/common/ (props changed) head/sys/contrib/dev/acpica/compiler/ (props changed) head/sys/contrib/dev/acpica/components/debugger/ (props changed) head/sys/contrib/dev/acpica/components/disassembler/ (props changed) head/sys/contrib/dev/acpica/components/dispatcher/ (props changed) head/sys/contrib/dev/acpica/components/events/ (props changed) head/sys/contrib/dev/acpica/components/executer/ (props changed) head/sys/contrib/dev/acpica/components/hardware/ (props changed) head/sys/contrib/dev/acpica/components/namespace/ (props changed) head/sys/contrib/dev/acpica/components/parser/ (props changed) head/sys/contrib/dev/acpica/components/resources/ (props changed) head/sys/contrib/dev/acpica/components/tables/ (props changed) head/sys/contrib/dev/acpica/components/utilities/ (props changed) head/sys/contrib/dev/acpica/include/ (props changed) head/sys/contrib/dev/acpica/os_specific/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/conf/files Thu Jan 17 23:56:43 2013 (r245582) @@ -283,6 +283,7 @@ contrib/altq/altq/altq_rio.c optional a contrib/altq/altq/altq_rmclass.c optional altq contrib/altq/altq/altq_subr.c optional altq contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbfileio.c optional acpi acpi_debug @@ -324,6 +325,7 @@ contrib/dev/acpica/components/events/evg contrib/dev/acpica/components/events/evgpeblk.c optional acpi contrib/dev/acpica/components/events/evgpeinit.c optional acpi contrib/dev/acpica/components/events/evgpeutil.c optional acpi +contrib/dev/acpica/components/events/evhandler.c optional acpi contrib/dev/acpica/components/events/evmisc.c optional acpi contrib/dev/acpica/components/events/evregion.c optional acpi contrib/dev/acpica/components/events/evrgnini.c optional acpi @@ -376,6 +378,7 @@ contrib/dev/acpica/components/namespace/ contrib/dev/acpica/components/namespace/nsobject.c optional acpi contrib/dev/acpica/components/namespace/nsparse.c optional acpi contrib/dev/acpica/components/namespace/nspredef.c optional acpi +contrib/dev/acpica/components/namespace/nsprepkg.c optional acpi contrib/dev/acpica/components/namespace/nsrepair.c optional acpi contrib/dev/acpica/components/namespace/nsrepair2.c optional acpi contrib/dev/acpica/components/namespace/nssearch.c optional acpi @@ -386,7 +389,9 @@ contrib/dev/acpica/components/namespace/ contrib/dev/acpica/components/namespace/nsxfobj.c optional acpi contrib/dev/acpica/components/parser/psargs.c optional acpi contrib/dev/acpica/components/parser/psloop.c optional acpi +contrib/dev/acpica/components/parser/psobject.c optional acpi contrib/dev/acpica/components/parser/psopcode.c optional acpi +contrib/dev/acpica/components/parser/psopinfo.c optional acpi contrib/dev/acpica/components/parser/psparse.c optional acpi contrib/dev/acpica/components/parser/psscope.c optional acpi contrib/dev/acpica/components/parser/pstree.c optional acpi @@ -397,6 +402,7 @@ contrib/dev/acpica/components/resources/ contrib/dev/acpica/components/resources/rscalc.c optional acpi contrib/dev/acpica/components/resources/rscreate.c optional acpi contrib/dev/acpica/components/resources/rsdump.c optional acpi +contrib/dev/acpica/components/resources/rsdumpinfo.c optional acpi contrib/dev/acpica/components/resources/rsinfo.c optional acpi contrib/dev/acpica/components/resources/rsio.c optional acpi contrib/dev/acpica/components/resources/rsirq.c optional acpi @@ -431,8 +437,10 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utmutex.c optional acpi contrib/dev/acpica/components/utilities/utobject.c optional acpi contrib/dev/acpica/components/utilities/utosi.c optional acpi +contrib/dev/acpica/components/utilities/utownerid.c optional acpi contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi +contrib/dev/acpica/components/utilities/utstring.c optional acpi contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.c optional acpi contrib/dev/acpica/components/utilities/utxfinit.c optional acpi Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/changes.txt Thu Jan 17 23:56:43 2013 (r245582) @@ -1,8 +1,154 @@ ---------------------------------------- -14 November 2012. Summary of changes for version 20121114: +17 January 2013. Summary of changes for version 20130117: + + +1) ACPICA Kernel-resident Subsystem: + +Updated the AcpiGetSleepTypeData interface: Allow the \_Sx methods to +return either 1 or 2 integers. Although the ACPI spec defines the \_Sx +objects to return a package containing one integer, most BIOS code returns +two integers and the previous code reflects that. However, we also need to +support BIOS code that actually implements to the ACPI spec, and this +change reflects this. + +Fixed two issues with the ACPI_DEBUG_PRINT macros: +1) Added the ACPI_DO_WHILE macro to the main DEBUG_PRINT helper macro for +C compilers that require this support. +2) Renamed the internal ACPI_DEBUG macro to ACPI_DO_DEBUG_PRINT since +ACPI_DEBUG is already used by many of the various hosts. + +Updated all ACPICA copyrights and signons to 2013. Added the 2013 +copyright to all module headers and signons, including the standard Linux +header. This affects virtually every file in the ACPICA core subsystem, +iASL compiler, all ACPICA utilities, and the test suites. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 94.5K Code, 25.5K Data, 120.0K Total + Debug Version: 182.2K Code, 74.9K Data, 257.1K Total + Current Release: + Non-Debug Version: 94.5K Code, 25.4K Data, 119.9K Total + Debug Version: 182.3K Code, 75.0K Data, 257.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +Generic Unix OSL: Use a buffer to eliminate multiple vfprintf()s and +prevent a possible fault on some hosts. Some C libraries modify the arg +pointer parameter to vfprintf making it difficult to call it twice in the +AcpiOsVprintf function. Use a local buffer to workaround this issue. This +does not affect the Windows OSL since the Win C library does not modify +the arg pointer. Chao Guan, Bob Moore. + +iASL: Fixed a possible infinite loop when the maximum error count is +reached. If an output file other than the .AML file is specified (such as +a listing file), and the maximum number of errors is reached, do not +attempt to flush data to the output file(s) as the compiler is aborting. +This can cause an infinite loop as the max error count code essentially +keeps calling itself. + +iASL/Disassembler: Added an option (-in) to ignore NOOP opcodes/operators. +Implemented for both the compiler and the disassembler. Often, the NOOP +opcode is used as padding for packages that are changed dynamically by the +BIOS. When disassembled and recompiled, these NOOPs will cause syntax +errors. This option causes the disassembler to ignore all NOOP opcodes +(0xA3), and it also causes the compiler to ignore all ASL source code NOOP +statements as well. + +Debugger: Enhanced the Sleep command to execute all sleep states. This +change allows Sleep to be invoked with no arguments and causes the +debugger to execute all of the sleep states, 0-5, automatically. + +---------------------------------------- +20 December 2012. Summary of changes for version 20121220: + +1) ACPICA Kernel-resident Subsystem: -This release is available at https://www.acpica.org/downloads -The ACPI 5.0 specification is available at www.acpi.info +Implemented a new interface, AcpiWalkResourceBuffer. This interface is an +alternate entry point for AcpiWalkResources and improves the usability of +the resource manager by accepting as input a buffer containing the output +of either a _CRS, _PRS, or _AEI method. The key functionality is that the +input buffer is not deleted by this interface so that it can be used by +the host later. See the ACPICA reference for details. + +Interpreter: Add a warning if a 64-bit constant appears in a 32-bit table +(DSDT version < 2). The constant will be truncated and this warning +reflects that behavior. + +Resource Manager: Add support for the new ACPI 5.0 wake bit in the IRQ, +ExtendedInterrupt, and GpioInt descriptors. This change adds support to +both get and set the new wake bit in these descriptors, separately from +the existing share bit. Reported by Aaron Lu. + +Interpreter: Fix Store() when an implicit conversion is not possible. For +example, in the cases such as a store of a string to an existing package +object, implement the store as a CopyObject(). This is a small departure +from the ACPI specification which states that the control method should be +aborted in this case. However, the ASLTS suite depends on this behavior. + +Performance improvement for the various FUNCTION_TRACE and DEBUG_PRINT +macros: check if debug output is currently enabled as soon as possible to +minimize performance impact if debug is in fact not enabled. + +Source code restructuring: Cleanup to improve modularity. The following +new files have been added: dbconvert.c, evhandler.c, nsprepkg.c, +psopinfo.c, psobject.c, rsdumpinfo.c, utstring.c, and utownerid.c. +Associated makefiles and project files have been updated. + +Changed an exception code for LoadTable operator. For the case where one +of the input strings is too long, change the returned exception code from +AE_BAD_PARAMETER to AE_AML_STRING_LIMIT. + +Fixed a possible memory leak in dispatcher error path. On error, delete +the mutex object created during method mutex creation. Reported by +tim.gardner@canonical.com. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 94.3K Code, 25.3K Data, 119.6K Total + Debug Version: 175.5K Code, 74.5K Data, 250.0K Total + Current Release: + Non-Debug Version: 94.5K Code, 25.5K Data, 120.0K Total + Debug Version: 182.2K Code, 74.9K Data, 257.1K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Disallow a method call as argument to the ObjectType ASL operator. +This change tracks an errata to the ACPI 5.0 document. The AML grammar +will not allow the interpreter to differentiate between a method and a +method invocation when these are used as an argument to the ObjectType +operator. The ACPI specification change is to disallow a method invocation +(UserTerm) for the ObjectType operator. + +Finish support for the TPM2 and CSRT tables in the headers, table +compiler, and disassembler. + +Unix user-space OSL: Fix a problem with WaitSemaphore where the timeout +always expires immediately if the semaphore is not available. The original +code was using a relative-time timeout, but sem_timedwait requires the use +of an absolute time. + +iASL: Added a remark if the Timer() operator is used within a 32-bit +table. This operator returns a 64-bit time value that will be truncated +within a 32-bit table. + +iASL Source code restructuring: Cleanup to improve modularity. The +following new files have been added: aslhex.c, aslxref.c, aslnamesp.c, +aslmethod.c, and aslfileio.c. Associated makefiles and project files have +been updated. + + +---------------------------------------- +14 November 2012. Summary of changes for version 20121114: 1) ACPICA Kernel-resident Subsystem: Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,11 +69,11 @@ extern int AslCompilerd #endif ACPI_STATUS -LsDisplayNamespace ( +NsDisplayNamespace ( void); void -LsSetupNsList ( +NsSetupNamespaceListing ( void *Handle); @@ -429,8 +429,8 @@ AdAmlDisassemble ( { AcpiOsPrintf ("/**** Before second load\n"); - LsSetupNsList (File); - LsDisplayNamespace (); + NsSetupNamespaceListing (File); + NsDisplayNamespace (); AcpiOsPrintf ("*****/\n"); } @@ -498,8 +498,8 @@ AdAmlDisassemble ( if (AslCompilerdebug) { AcpiOsPrintf ("/**** After second load and resource conversion\n"); - LsSetupNsList (File); - LsDisplayNamespace (); + NsSetupNamespaceListing (File); + NsDisplayNamespace (); AcpiOsPrintf ("*****/\n"); AcpiDmDumpTree (AcpiGbl_ParseOpRoot); @@ -549,8 +549,8 @@ Cleanup: { if (AslCompilerdebug) /* Display final namespace, with transforms */ { - LsSetupNsList (File); - LsDisplayNamespace (); + NsSetupNamespaceListing (File); + NsDisplayNamespace (); } fclose (File); Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -89,7 +89,7 @@ AcpiDmAddResourceToNamespace ( UINT32 Length, UINT32 Offset, UINT8 ResourceIndex, - void *Context); + void **Context); static void AcpiDmAddResourcesToNamespace ( @@ -993,7 +993,7 @@ AcpiDmAddResourcesToNamespace ( */ AcpiUtWalkAmlResources (NULL, (UINT8 *) NextOp->Named.Data, (ACPI_SIZE) NextOp->Common.Value.Integer, - AcpiDmAddResourceToNamespace, BufferNode); + AcpiDmAddResourceToNamespace, (void **) BufferNode); } @@ -1019,7 +1019,7 @@ AcpiDmAddResourceToNamespace ( UINT32 Length, UINT32 Offset, UINT8 ResourceIndex, - void *Context) + void **Context) { ACPI_STATUS Status; ACPI_GENERIC_STATE ScopeInfo; Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -281,7 +281,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt, "Boot Graphics Resource Table"}, {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot, "Simple Boot Flag Table"}, {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep, "Corrected Platform Error Polling table"}, - {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, NULL, NULL, "Core System Resource Table"}, + {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt, "Core System Resource Table"}, {ACPI_SIG_DBG2, NULL, AcpiDmDumpDbg2, NULL, NULL, "Debug Port table type 2"}, {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp, "Debug Port table"}, {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar, "DMA Remapping table"}, @@ -310,6 +310,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi, "Server Platform Management Interface table"}, {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat, "System Resource Affinity Table"}, {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, TemplateTcpa, "Trusted Computing Platform Alliance table"}, + {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, NULL, NULL, TemplateTpm2, "Trusted Platform Module hardware interface table"}, {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi, "UEFI Boot Optimization Table"}, {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet, "Windows ACPI Emulated Devices Table"}, {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat, "Watchdog Action Table"}, Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -614,6 +614,7 @@ AcpiDmDumpCsrt ( { ACPI_STATUS Status; ACPI_CSRT_GROUP *SubTable; + ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubTable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_CSRT); @@ -629,6 +630,8 @@ AcpiDmDumpCsrt ( SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); while (Offset < Table->Length) { + /* Resource group subtable */ + AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset, SubTable, SubTable->Length, AcpiDmTableInfoCsrt0); @@ -637,15 +640,23 @@ AcpiDmDumpCsrt ( return; } + /* Shared info subtable (One per resource group) */ + SubOffset = sizeof (ACPI_CSRT_GROUP); + SharedInfoTable = ACPI_ADD_PTR (ACPI_CSRT_SHARED_INFO, Table, + Offset + SubOffset); - /* Shared resource group info buffer */ + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Length, Offset + SubOffset, SharedInfoTable, + sizeof (ACPI_CSRT_SHARED_INFO), AcpiDmTableInfoCsrt1); + if (ACPI_FAILURE (Status)) + { + return; + } - AcpiDmDumpBuffer (SubTable, SubOffset, SubTable->InfoLength, - Offset+SubOffset, "Shared Data"); - SubOffset += SubTable->InfoLength; + SubOffset += SubTable->SharedInfoLength; - /* Sub-Sub-tables (Resource Descriptors) */ + /* Sub-Subtables (Resource Descriptors) */ SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table, Offset + SubOffset); @@ -655,7 +666,7 @@ AcpiDmDumpCsrt ( { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubTable, - SubSubTable->Length, AcpiDmTableInfoCsrt1); + SubSubTable->Length, AcpiDmTableInfoCsrt2); if (ACPI_FAILURE (Status)) { return; @@ -671,7 +682,7 @@ AcpiDmDumpCsrt ( Offset + SubOffset + SubSubOffset, "ResourceInfo"); SubSubOffset += InfoLength; - /* Point to next sub-sub-table */ + /* Point to next sub-subtable */ SubOffset += SubSubTable->Length; SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubTable, Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -111,6 +111,7 @@ #define ACPI_SPMI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f) #define ACPI_SRAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f) #define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA,f) +#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f) #define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f) #define ACPI_WAET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f) #define ACPI_WDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f) @@ -128,7 +129,8 @@ #define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f) #define ACPI_CPEP0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f) #define ACPI_CSRT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_GROUP,f) -#define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_DESCRIPTOR,f) +#define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_SHARED_INFO,f) +#define ACPI_CSRT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_DESCRIPTOR,f) #define ACPI_DBG20_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DBG2_DEVICE,f) #define ACPI_DMARS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f) #define ACPI_DMAR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f) @@ -662,18 +664,38 @@ ACPI_DMTABLE_INFO AcpiDmTableI {ACPI_DMT_UINT16, ACPI_CSRT0_OFFSET (SubdeviceId), "Subdevice ID", 0}, {ACPI_DMT_UINT16, ACPI_CSRT0_OFFSET (Revision), "Revision", 0}, {ACPI_DMT_UINT16, ACPI_CSRT0_OFFSET (Reserved), "Reserved", 0}, - {ACPI_DMT_UINT32, ACPI_CSRT0_OFFSET (InfoLength), "InfoLength", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT0_OFFSET (SharedInfoLength), "Shared Info Length", 0}, ACPI_DMT_TERMINATOR }; -/* Resource Descriptor subtable */ +/* Shared Info subtable */ ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt1[] = { - {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (Length), "Length", 0}, - {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (Type), "Type", 0}, - {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (Subtype), "Subtype", 0}, - {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (Uid), "UID", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (MajorVersion), "Major Version", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (MinorVersion), "Minor Version", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (MmioBaseLow), "MMIO Base Address Low", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (MmioBaseHigh), "MMIO Base Address High", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (GsiInterrupt), "GSI Interrupt", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (InterruptPolarity), "Interrupt Polarity", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (InterruptMode), "Interrupt Mode", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (NumChannels), "Num Channels", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (DmaAddressWidth), "DMA Address Width", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (BaseRequestLine), "Base Request Line", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (NumHandshakeSignals), "Num Handshake Signals", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (MaxBlockSize), "Max Block Size", 0}, + ACPI_DMT_TERMINATOR +}; + + +/* Resource Descriptor subtable */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt2[] = +{ + {ACPI_DMT_UINT32, ACPI_CSRT2_OFFSET (Length), "Length", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT2_OFFSET (Type), "Type", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT2_OFFSET (Subtype), "Subtype", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT2_OFFSET (Uid), "UID", 0}, ACPI_DMT_TERMINATOR }; @@ -1984,6 +2006,21 @@ ACPI_DMTABLE_INFO AcpiDmTableI /******************************************************************************* * + * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[] = +{ + {ACPI_DMT_UINT32, ACPI_TPM2_OFFSET (Flags), "Flags", 0}, + {ACPI_DMT_UINT64, ACPI_TPM2_OFFSET (ControlAddress), "Control Address", 0}, + {ACPI_DMT_UINT32, ACPI_TPM2_OFFSET (StartMethod), "Start Method", 0}, + ACPI_DMT_TERMINATOR +}; + + +/******************************************************************************* + * * UEFI - UEFI Boot optimization Table * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslbtypes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslbtypes.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslbtypes.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -617,7 +617,7 @@ CmDoCompile ( /* Namespace cross-reference */ AslGbl_NamespaceEvent = UtBeginEvent ("Cross reference parse tree and Namespace"); - Status = LkCrossReferenceNamespace (); + Status = XfCrossReferenceNamespace (); if (ACPI_FAILURE (Status)) { goto ErrorExit; @@ -639,8 +639,8 @@ CmDoCompile ( DbgPrint (ASL_DEBUG_OUTPUT, "\nSemantic analysis - Method analysis\n\n"); TrWalkParseTree (RootNode, ASL_WALK_VISIT_TWICE, - AnMethodAnalysisWalkBegin, - AnMethodAnalysisWalkEnd, &AnalysisWalkInfo); + MtMethodAnalysisWalkBegin, + MtMethodAnalysisWalkEnd, &AnalysisWalkInfo); UtEndEvent (Event); /* Semantic error checking part two - typing of method returns */ @@ -719,11 +719,11 @@ CmDoOutputFiles ( /* Create listings and hex files */ LsDoListings (); - LsDoHexOutput (); + HxDoHexOutput (); /* Dump the namespace to the .nsp file if requested */ - (void) LsDisplayNamespace (); + (void) NsDisplayNamespace (); } @@ -766,12 +766,12 @@ CmDumpAllEvents ( Delta = (UINT32) (Event->EndTime - Event->StartTime); - USec = Delta / 10; - MSec = Delta / 10000; + USec = Delta / ACPI_100NSEC_PER_USEC; + MSec = Delta / ACPI_100NSEC_PER_MSEC; /* Round milliseconds up */ - if ((USec - (MSec * 1000)) >= 500) + if ((USec - (MSec * ACPI_USEC_PER_MSEC)) >= 500) { MSec++; } Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -188,19 +188,23 @@ AnOperandTypecheckWalkEnd ( void *Context); ACPI_STATUS -AnMethodAnalysisWalkBegin ( +AnMethodTypingWalkEnd ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); + +/* + * aslmethod - Control method analysis walk + */ ACPI_STATUS -AnMethodAnalysisWalkEnd ( +MtMethodAnalysisWalkBegin ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); ACPI_STATUS -AnMethodTypingWalkEnd ( +MtMethodAnalysisWalkEnd ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); @@ -342,6 +346,12 @@ LsDoListings ( void); void +LsDumpAsciiInComment ( + UINT32 FileId, + UINT32 Count, + UINT8 *Buffer); + +void LsWriteNodeToAsmListing ( ACPI_PARSE_OBJECT *Op); @@ -351,13 +361,18 @@ LsWriteNode ( UINT32 FileId); void -LsDoHexOutput ( +LsDumpParseTree ( void); + +/* + * aslhex - generate all "hex" output files (C, ASM, ASL) + */ void -LsDumpParseTree ( +HxDoHexOutput ( void); + /* * aslfold - constant folding */ @@ -689,26 +704,34 @@ LdLoadNamespace ( /* - * asllookup - namespace cross reference + * asllookup - namespace lookup functions */ -ACPI_STATUS -LkCrossReferenceNamespace ( - void); - void LkFindUnreferencedObjects ( void); + +/* + * aslnamesp - namespace output file generation + */ ACPI_STATUS -LsDisplayNamespace ( +NsDisplayNamespace ( void); void -LsSetupNsList ( +NsSetupNamespaceListing ( void *Handle); /* + * aslxref - namespace cross reference + */ +ACPI_STATUS +XfCrossReferenceNamespace ( + void); + + +/* * aslutils - common compiler utilites */ void Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 17 23:56:43 2013 (r245582) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -201,7 +201,7 @@ NamePathTail [.]{NameSeg} "Mutex" { count (2); return (PARSEOP_MUTEX); } "Name" { count (2); return (PARSEOP_NAME); } "NAnd" { count (3); return (PARSEOP_NAND); } -"Noop" { count (3); return (PARSEOP_NOOP); } +"Noop" { if (!AcpiGbl_IgnoreNoopOperator) {count (3); return (PARSEOP_NOOP);} } "NOr" { count (3); return (PARSEOP_NOR); } "Not" { count (3); return (PARSEOP_NOT); } "Notify" { count (3); return (PARSEOP_NOTIFY); } Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.y Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.y Thu Jan 17 23:56:43 2013 (r245582) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -661,6 +661,7 @@ void * AslLocalAllo /* Types */ %type SuperName +%type ObjectTypeName %type ArgTerm %type LocalTerm %type DebugTerm @@ -1991,7 +1992,7 @@ NotTerm ObjectTypeTerm : PARSEOP_OBJECTTYPE '(' {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);} - SuperName + ObjectTypeName ')' {$$ = TrLinkChildren ($3,1,$4);} | PARSEOP_OBJECTTYPE '(' error ')' {$$ = AslDoError(); yyclearin;} @@ -2439,6 +2440,18 @@ SuperName | LocalTerm {} | DebugTerm {} | Type6Opcode {} + +/* For ObjectType: SuperName except for UserTerm (method invocation) */ + +ObjectTypeName + : NameString {} + | ArgTerm {} + | LocalTerm {} + | DebugTerm {} + | RefOfTerm {} + | DerefOfTerm {} + | IndexTerm {} + /* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */ ; Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -660,7 +660,6 @@ AslCommonError ( Gbl_SourceLine = 0; Gbl_NextError = Gbl_ErrorLog; - CmDoOutputFiles (); CmCleanupAndExit (); exit(1); } Copied and modified: head/sys/contrib/dev/acpica/compiler/aslfileio.c (from r244972, vendor-sys/acpica/dist/source/compiler/aslfileio.c) ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfileio.c Wed Jan 2 19:02:16 2013 (r244972, copy source) +++ head/sys/contrib/dev/acpica/compiler/aslfileio.c Thu Jan 17 23:56:43 2013 (r245582) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ * POSSIBILITY OF SUCH DAMAGES. */ -#include "aslcompiler.h" +#include #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslfileio") Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 17 23:14:17 2013 (r245581) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 17 23:56:43 2013 (r245582) @@ -1,11 +1,11 @@ /****************************************************************************** * - * Module Name: aslfiles - file I/O suppoert + * Module Name: aslfiles - File support functions * *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -64,352 +64,6 @@ FlParseInputPathname ( /******************************************************************************* * - * FUNCTION: AslAbort - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Dump the error log and abort the compiler. Used for serious - * I/O errors - * - ******************************************************************************/ - -void -AslAbort ( - void) -{ - - AePrintErrorLog (ASL_FILE_STDERR); - if (Gbl_DebugFlag) - { - /* Print error summary to stdout also */ - - AePrintErrorLog (ASL_FILE_STDOUT); - } - - exit (1); -} - - -/******************************************************************************* - * - * FUNCTION: FlFileError - * - * PARAMETERS: FileId - Index into file info array - * ErrorId - Index into error message array - * - * RETURN: None - * - * DESCRIPTION: Decode errno to an error message and add the entire error - * to the error log. - * - ******************************************************************************/ - -void -FlFileError ( - UINT32 FileId, - UINT8 ErrorId) -{ - - sprintf (MsgBuffer, "\"%s\" (%s)", Gbl_Files[FileId].Filename, - strerror (errno)); - AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, MsgBuffer); -} - - -/******************************************************************************* - * - * FUNCTION: FlOpenFile - * - * PARAMETERS: FileId - Index into file info array - * Filename - file pathname to open - * Mode - Open mode for fopen - * - * RETURN: None - * - * DESCRIPTION: Open a file. - * NOTE: Aborts compiler on any error. - * - ******************************************************************************/ - -void -FlOpenFile ( - UINT32 FileId, - char *Filename, - char *Mode) -{ - FILE *File; - - - File = fopen (Filename, Mode); - if (!File) - { - FlFileError (FileId, ASL_MSG_OPEN); - AslAbort (); - } - - Gbl_Files[FileId].Filename = Filename; - Gbl_Files[FileId].Handle = File; -} - - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 02:36:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6CECB933; Fri, 18 Jan 2013 02:36:07 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5ADFB6E0; Fri, 18 Jan 2013 02:36:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0I2a7ae007718; Fri, 18 Jan 2013 02:36:07 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0I2a7i9007717; Fri, 18 Jan 2013 02:36:07 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201301180236.r0I2a7i9007717@svn.freebsd.org> From: Alfred Perlstein Date: Fri, 18 Jan 2013 02:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245584 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 02:36:07 -0000 Author: alfred Date: Fri Jan 18 02:36:06 2013 New Revision: 245584 URL: http://svnweb.freebsd.org/changeset/base/245584 Log: Spelling: exitting -> exiting MFC after: 2 weeks Modified: head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Fri Jan 18 00:26:54 2013 (r245583) +++ head/usr.sbin/watchdogd/watchdogd.c Fri Jan 18 02:36:06 2013 (r245584) @@ -188,7 +188,7 @@ watchdog_loop(void) if (watchdog_onoff(0) == 0) { end_program = 2; } else { - warnx("Could not stop the watchdog, not exitting"); + warnx("Could not stop the watchdog, not exiting"); end_program = 0; } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 04:03:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5047890A; Fri, 18 Jan 2013 04:03:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id AACF1A52; Fri, 18 Jan 2013 04:03:43 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0I43WwW054686; Fri, 18 Jan 2013 06:03:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0I43WwW054686 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0I43WKx054685; Fri, 18 Jan 2013 06:03:32 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 18 Jan 2013 06:03:32 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r245577 - in head/sys: amd64/amd64 i386/i386 x86/x86 Message-ID: <20130118040332.GT2522@kib.kiev.ua> References: <201301172132.r0HLWQHD004835@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zpd1bWBxfrI+71+6" Content-Disposition: inline In-Reply-To: <201301172132.r0HLWQHD004835@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 04:03:44 -0000 --zpd1bWBxfrI+71+6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 17, 2013 at 09:32:26PM +0000, John Baldwin wrote: > Author: jhb > Date: Thu Jan 17 21:32:25 2013 > New Revision: 245577 > URL: http://svnweb.freebsd.org/changeset/base/245577 >=20 > Log: > Don't attempt to use clflush on the local APIC register window. Various > CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on > Pentium-M, and trashing of the local APIC registers on a VIA C7). The > local APIC is implicitly mapped UC already via MTRRs, so the clflush is= n't > necessary anyway. > =20 > MFC after: 2 weeks I am curious, was there a case where the clflush was really executed on the LAPIC register window with the pristine HEAD code ? I think that there is no Intel processors which support clflush instruction and do not have self-snoop. On the other hand, please note that the same change could be due for the pmap_invalidate_cache_pages(). Unlike pmap_invalidate_cache_range(), _pages() uses clflush unconditionally on purpose, since it is intended for devices which do not snoop. --zpd1bWBxfrI+71+6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ+MmTAAoJEJDCuSvBvK1BYCgQAJq2wMsms/Y/j8FjwWynSp0n LL+4XHq6fVH8wQEr27Y2poVmqjPGb38SprQDzzA/bk7/ihF1KX8UeYYRKo4J2PvI j9wErfFOpvoLh8RmXXHsjW0rnVmENnvKv3V7ylRSfVxCSolivIoTBfOLnPaW6ZCC GT8WrDmyWWMp5BLl+6uvLkCYSpowIPRA+TGEIqJ59iKFFpoM8X+00mi6lBe1jLH6 U5g1HPcFG+s+1K5P1gfNM5FARxq30rku2pZtbhP6xoGrNbIPYoEFynJNUXYz5wsM WfubWKhmqWrIAYdgLoMAdtV3Op9847LHo8k+QX+quUHM3sQpDc7EpUAHDl37dwgN vUp3KbiYNUpPO4Y15wPfTCtSJuYB5zletPHPSRkwB5wIsqtcBLZszUkEBHX4rE64 8FyyPei5F43RWv4VphMWRX+xCrAvYMkrUb81p4q24i5drmDUmrnEzUyKmnJHPmpO 8pbcEfrkog2WdmN512jeEg/0fHl7G2PQROpK6+cgad0U1I7sIt5mqbgrfg7nY8a0 bdLQL6KCCZP2hSkyUIiQ1S+RdPemYsknnq1vEc43z5ecBXEdw++pAzXp98DhEKWv cANU7sR5cDCTrdhkxPNV74T1VsgjMGXnkp/8g2usAdSCVFvHzGZWySwRXKFi+eV8 wlsg7NGTR2D9ZtbyHz8n =PmLn -----END PGP SIGNATURE----- --zpd1bWBxfrI+71+6-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 04:23:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A79BCF54; Fri, 18 Jan 2013 04:23:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8E22AAFE; Fri, 18 Jan 2013 04:23:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0I4NujA042901; Fri, 18 Jan 2013 04:23:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0I4NtGe042892; Fri, 18 Jan 2013 04:23:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301180423.r0I4NtGe042892@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 18 Jan 2013 04:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245587 - in stable/9/sys: amd64/conf i386/conf ia64/conf powerpc/conf sparc64/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 04:23:56 -0000 Author: kib Date: Fri Jan 18 04:23:54 2013 New Revision: 245587 URL: http://svnweb.freebsd.org/changeset/base/245587 Log: MFC r245003: Enable the UFS quotas for big-iron GENERIC kernels. Modified: stable/9/sys/amd64/conf/GENERIC stable/9/sys/i386/conf/GENERIC stable/9/sys/ia64/conf/GENERIC stable/9/sys/powerpc/conf/GENERIC stable/9/sys/powerpc/conf/GENERIC64 stable/9/sys/sparc64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Fri Jan 18 03:15:49 2013 (r245586) +++ stable/9/sys/amd64/conf/GENERIC Fri Jan 18 04:23:54 2013 (r245587) @@ -33,6 +33,7 @@ options SOFTUPDATES # Enable FFS soft options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client options NFSD # New Network Filesystem Server Modified: stable/9/sys/i386/conf/GENERIC ============================================================================== --- stable/9/sys/i386/conf/GENERIC Fri Jan 18 03:15:49 2013 (r245586) +++ stable/9/sys/i386/conf/GENERIC Fri Jan 18 04:23:54 2013 (r245587) @@ -35,6 +35,7 @@ options SOFTUPDATES # Enable FFS soft options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client options NFSD # New Network Filesystem Server Modified: stable/9/sys/ia64/conf/GENERIC ============================================================================== --- stable/9/sys/ia64/conf/GENERIC Fri Jan 18 03:15:49 2013 (r245586) +++ stable/9/sys/ia64/conf/GENERIC Fri Jan 18 04:23:54 2013 (r245587) @@ -58,6 +58,7 @@ options SYSVSHM # SYSV-style shared me options UFS_ACL # Support for access control lists options UFS_DIRHASH # Hash-based directory lookup scheme options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions options KDB # Kernel debugger related code options KDB_TRACE # Print a stack trace for a panic Modified: stable/9/sys/powerpc/conf/GENERIC ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC Fri Jan 18 03:15:49 2013 (r245586) +++ stable/9/sys/powerpc/conf/GENERIC Fri Jan 18 04:23:54 2013 (r245587) @@ -40,6 +40,7 @@ options SOFTUPDATES #Enable FFS soft u options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories options UFS_GJOURNAL #Enable gjournal-based UFS journaling +options QUOTA #Enable disk quotas for UFS options MD_ROOT #MD is a potential root device options NFSCL #New Network Filesystem Client options NFSD #New Network Filesystem Server Modified: stable/9/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC64 Fri Jan 18 03:15:49 2013 (r245586) +++ stable/9/sys/powerpc/conf/GENERIC64 Fri Jan 18 04:23:54 2013 (r245587) @@ -40,6 +40,7 @@ options SOFTUPDATES #Enable FFS soft u options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories options UFS_GJOURNAL #Enable gjournal-based UFS journaling +options QUOTA #Enable disk quotas for UFS options MD_ROOT #MD is a potential root device options NFSCL #New Network Filesystem Client options NFSD #New Network Filesystem Server Modified: stable/9/sys/sparc64/conf/GENERIC ============================================================================== --- stable/9/sys/sparc64/conf/GENERIC Fri Jan 18 03:15:49 2013 (r245586) +++ stable/9/sys/sparc64/conf/GENERIC Fri Jan 18 04:23:54 2013 (r245587) @@ -36,6 +36,7 @@ options SOFTUPDATES # Enable FFS soft options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client options NFSD # New Network Filesystem Server From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 07:18:49 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 083111A3; Fri, 18 Jan 2013 07:18:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 9288715E; Fri, 18 Jan 2013 07:18:48 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0I7Ib6v018069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jan 2013 18:18:38 +1100 Date: Fri, 18 Jan 2013 18:18:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pawel Jakub Dawidek Subject: Re: svn commit: r245506 - head/bin/pwait In-Reply-To: <20130117203955.GA1679@garage.freebsd.pl> Message-ID: <20130118174501.O1209@besplex.bde.org> References: <201301161815.r0GIFQPk007553@svn.freebsd.org> <20130117130740.I1066@besplex.bde.org> <201301171050.07596.jhb@freebsd.org> <20130117203955.GA1679@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Zty1sKHG c=1 sm=1 a=jy4U5xBK6Z8A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=0Iti9RnyFakA:10 a=6I5d2MoRAAAA:8 a=lWXf_K5OjqMkl9xFCKUA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: src-committers@FreeBSD.org, Eitan Adler , John Baldwin , svn-src-all@FreeBSD.org, Xin LI , Bruce Evans , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 07:18:49 -0000 On Thu, 17 Jan 2013, Pawel Jakub Dawidek wrote: > On Thu, Jan 17, 2013 at 10:50:07AM -0500, John Baldwin wrote: >> On Wednesday, January 16, 2013 10:40:51 pm Eitan Adler wrote: >>> On 16 January 2013 21:25, Bruce Evans wrote: >>>> This uses the sysexits mistake. style(9) was fixed to not give an example >>>> of this mistake. Before this, sysexits was used a whole once in pwait(1) >>>> (for EX_USAGE) in usage(). EX_USAGE happens to be 64. As usual when the >>>> mistake is used, this is useless for humans (the usage message gives more >>>> info) and unusable for programs, especially since it is undocmented >>>> (pwait(1)'s man page just says ">0 if an error occurs". It doesn't even >>>> use '.Std' for this, but hard-codes it. >>> >>> IMHO using sysexits gives more signal than using a binary 0 or 1. It >>> is a mistake to have changed style(9) to avoid using sysexits. >>> Instead the man page should detail the specific error that occurs >>> directly, or by reference to sysexit. >> >> Eh, I think bde@ has quite a bit more experience with this than you. >> is not part of POSIX or any other standard. It's comments >> reference delivermail (the predecessor to sendmail). Looking at its history, >> it has never been changed in FreeBSD, and it's history in CSRG is rather >> spartan and mostly tied to delivermail/sendmail: >> >> http://svnweb.freebsd.org/csrg/include/sysexits.h?view=log >> >> In practice it's list of error value is limited and has not grown to handle >> new errors in over two decades (as opposed to, say, the list of errnos). >> OTOH, it seems the history section in sysexits(3) is slightly off as the CSRG >> history suggests it was present in at least 4.2BSD. > > Well, if we decide sysexits(3) are useless, then it would be nice to > recommend against using it in sysexits(3) manual page. Currently it is > rather seductive: > > According to style(9), it is not a good practice to call exit(3) > with arbitrary values to indicate a failure condition when > ending a program. Instead, the pre-defined exit codes from > sysexits should be used, so the caller of the process can get a > rough estimation about the failure class without looking up the > source code. Oops, this wasn't changed when the mistake was fixed in style(9) :-). The orignal BSD style guide (/usr/src/admin/style/style) actually says not to use [non-arbitrary] sequential values to indicate all exit points: % /* % * Exits should be 0 on success, and 1 on failure. Don't denote % * all the possible exit points, using the integers 1 through 300. % */ % exit(0); /* Avoid obvious comments such as "Exit 0 on success." */ but was changed in FreeBSD to say something quite different: % Exits should be 0 on success, or according to the predefined values in % sysexits(3). % % exit(EX_OK); /* % * Avoid obvious comments such as % * "Exit 0 on success." % */ and then was changed to say something even further removed from the original: % Exits should be 0 on success, or 1 on failure. % % exit(0); /* % * Avoid obvious comments such as % * "Exit 0 on success." % */ % } I thought that it was changed to at least mention the Standard but not very useful EXIT_SUCCESS and EXIT_FAILURE. It should also not disallow an error code of 2 which is often used for more severe errors. > I, for one, used it pretty extensively in HAST:) > > % grep EX_ /usr/src/sbin/hastd/*.c | wc -l > 67 > > In my humble opinion using sysexits(3) is better than just putting > exit(1) everywhere. Actually HAST or some of my other projects was > making decision about restarting a processes if the exit code was > EX_TEMPFAIL (if the failure was temporary it is fine to restart, if it > is not then better not to enter some infinite loop). A set of programs like sendmail or hastd can reasonably communicate using the exit code. For humans, it is easier to read the message on stderr in in a log file that should accompany almost all exits. Non-sets of programs shouldn't be burdened by having to provide, document and maintain unique exit codes for programs outside the set which will almost never make decisions based on the uniqueness. The EX_TEMPFAIL retry seems to be the only useful use of sysexits even in hastd. It mostly logs the error with a message giving more detail. EX_USAGE is an especially useless exit status. From pwait.c: % static void % usage(void) % { % % fprintf(stderr, "usage: pwait [-v] pid ...\n"); % exit(EX_USAGE); % } Consider possible users of this program: - a human can read "usage: ". EX_USAGE adds nothing to this. - a program that doesn't know correct usage isn't going to be able to with correct usage after seeing the EX_USAGE. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 07:29:07 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 91E38479; Fri, 18 Jan 2013 07:29:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail36.syd.optusnet.com.au (mail36.syd.optusnet.com.au [211.29.133.76]) by mx1.freebsd.org (Postfix) with ESMTP id 147391A7; Fri, 18 Jan 2013 07:29:06 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0I7SwZr009082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jan 2013 18:28:59 +1100 Date: Fri, 18 Jan 2013 18:28:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r245506 - head/bin/pwait In-Reply-To: <20130118174501.O1209@besplex.bde.org> Message-ID: <20130118182035.R1209@besplex.bde.org> References: <201301161815.r0GIFQPk007553@svn.freebsd.org> <20130117130740.I1066@besplex.bde.org> <201301171050.07596.jhb@freebsd.org> <20130117203955.GA1679@garage.freebsd.pl> <20130118174501.O1209@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Zty1sKHG c=1 sm=1 a=jy4U5xBK6Z8A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=0Iti9RnyFakA:10 a=WHtsyqLFiwetzuXcfecA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: src-committers@FreeBSD.org, Eitan Adler , John Baldwin , svn-src-all@FreeBSD.org, Xin LI , svn-src-head@FreeBSD.org, Pawel Jakub Dawidek X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 07:29:07 -0000 On Fri, 18 Jan 2013, Bruce Evans wrote: > The orignal BSD style guide (/usr/src/admin/style/style) actually says > not to use [non-arbitrary] sequential values to indicate all exit points: > ... > but was changed in FreeBSD to say something quite different: > ... > and then was changed to say something even further removed from the original: > ... > I thought that it was changed to at least mention the Standard but not > very useful EXIT_SUCCESS and EXIT_FAILURE. It should also not disallow > an error code of 2 which is often used for more severe errors. PS: I forgot to mention the NetBSD style guide (/usr/src/share/misc/style). At least the 2005 version of it says: % /* % * Exits should be EXIT_SUCCESS on success, and EXIT_FAILURE on % * failure. Don't denote all the possible exit points, using the % * integers 1 through 127. Avoid obvious comments such as "Exit % * 0 on success.". Since main is a function that returns an int, % * prefer returning from it, than calling exit. % */ % return EXIT_SUCCESS; It's interesting that it covers another point in this thread (of whether to return or exit from main()). I like returning from main(), but don't like requiring it. This and other parts of the NetBSD version also remove the examples and the requirement of spaces around return values. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 08:10:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 31C60FF0; Fri, 18 Jan 2013 08:10:01 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0ACEB34B; Fri, 18 Jan 2013 08:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0I8A0gr009144; Fri, 18 Jan 2013 08:10:00 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0I8A0aS009143; Fri, 18 Jan 2013 08:10:00 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201301180810.r0I8A0aS009143@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 18 Jan 2013 08:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245590 - stable/9/sys/dev/md X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 08:10:01 -0000 Author: jh Date: Fri Jan 18 08:10:00 2013 New Revision: 245590 URL: http://svnweb.freebsd.org/changeset/base/245590 Log: MFC r243373: Print correct unit number when attaching preloaded memory disks. Retire now unused mdunits variable. Modified: stable/9/sys/dev/md/md.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/md/md.c ============================================================================== --- stable/9/sys/dev/md/md.c Fri Jan 18 05:58:02 2013 (r245589) +++ stable/9/sys/dev/md/md.c Fri Jan 18 08:10:00 2013 (r245590) @@ -131,7 +131,6 @@ static g_access_t g_md_access; static void g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp); -static int mdunits; static struct cdev *status_dev = 0; static struct sx md_sx; static struct unrhdr *md_uh; @@ -1243,7 +1242,7 @@ mdctlioctl(struct cdev *dev, u_long cmd, } static void -md_preloaded(u_char *image, size_t length) +md_preloaded(u_char *image, size_t length, const char *name) { struct md_s *sc; int error; @@ -1261,6 +1260,10 @@ md_preloaded(u_char *image, size_t lengt rootdevnames[0] = "ufs:/dev/md0"; #endif mdinit(sc); + if (name != NULL) { + printf("%s%d: Preloaded image <%s> %zd bytes at %p\n", + MD_NAME, sc->unit, name, length, image); + } } static void @@ -1281,7 +1284,7 @@ g_md_init(struct g_class *mp __unused) md_uh = new_unrhdr(0, INT_MAX, NULL); #ifdef MD_ROOT_SIZE sx_xlock(&md_sx); - md_preloaded(mfs_root.start, sizeof(mfs_root.start)); + md_preloaded(mfs_root.start, sizeof(mfs_root.start), NULL); sx_xunlock(&md_sx); #endif /* XXX: are preload_* static or do they need Giant ? */ @@ -1297,10 +1300,8 @@ g_md_init(struct g_class *mp __unused) ptr = preload_fetch_addr(mod); len = preload_fetch_size(mod); if (ptr != NULL && len != 0) { - printf("%s%d: Preloaded image <%s> %d bytes at %p\n", - MD_NAME, mdunits, name, len, ptr); sx_xlock(&md_sx); - md_preloaded(ptr, len); + md_preloaded(ptr, len, name); sx_xunlock(&md_sx); } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 08:27:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 222DAA38; Fri, 18 Jan 2013 08:27:13 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 092AB62F; Fri, 18 Jan 2013 08:27:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0I8RC02014810; Fri, 18 Jan 2013 08:27:12 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0I8RCZo014808; Fri, 18 Jan 2013 08:27:12 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201301180827.r0I8RCZo014808@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 18 Jan 2013 08:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245591 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 08:27:13 -0000 Author: pluknet Date: Fri Jan 18 08:27:12 2013 New Revision: 245591 URL: http://svnweb.freebsd.org/changeset/base/245591 Log: MFC r245268: The Giant lock is no longer used in the vm_map(9) part of the VM. While here, document that the process lock is acquired in vm_map_stack, too. Modified: stable/9/share/man/man9/vm_map_insert.9 stable/9/share/man/man9/vm_map_stack.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/vm_map_insert.9 ============================================================================== --- stable/9/share/man/man9/vm_map_insert.9 Fri Jan 18 08:10:00 2013 (r245590) +++ stable/9/share/man/man9/vm_map_insert.9 Fri Jan 18 08:27:12 2013 (r245591) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2003 +.Dd January 11, 2013 .Dt VM_MAP_INSERT 9 .Os .Sh NAME @@ -73,9 +73,6 @@ This function implicitly creates a new .Vt vm_map_entry by calling the internal function .Fn vm_map_entry_create . -This function may use the -.Va Giant -lock to ensure that only a single thread is present in the function. .Sh RETURN VALUES The .Fn vm_map_insert Modified: stable/9/share/man/man9/vm_map_stack.9 ============================================================================== --- stable/9/share/man/man9/vm_map_stack.9 Fri Jan 18 08:10:00 2013 (r245590) +++ stable/9/share/man/man9/vm_map_stack.9 Fri Jan 18 08:27:12 2013 (r245591) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2003 +.Dd January 11, 2013 .Dt VM_MAP_STACK 9 .Os .Sh NAME @@ -81,11 +81,11 @@ function calls to create its mappings. .Pp The +.Fn vm_map_stack +and .Fn vm_map_growstack -function acquires the -.Va Giant -lock, and the process lock on -.Fa p , +functions acquire the process lock on +.Fa p for the duration of the call. .Sh RETURN VALUES The From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 08:34:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 931A8D6D; Fri, 18 Jan 2013 08:34:22 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 858E4688; Fri, 18 Jan 2013 08:34:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0I8YMqZ017421; Fri, 18 Jan 2013 08:34:22 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0I8YMG6017420; Fri, 18 Jan 2013 08:34:22 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201301180834.r0I8YMG6017420@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 18 Jan 2013 08:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245592 - stable/8/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 08:34:22 -0000 Author: pluknet Date: Fri Jan 18 08:34:21 2013 New Revision: 245592 URL: http://svnweb.freebsd.org/changeset/base/245592 Log: MFC r243102: Sort SEE ALSO xrefs by the manual section number and add a missing comma. Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Jan 18 08:27:12 2013 (r245591) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Jan 18 08:34:21 2013 (r245592) @@ -1927,8 +1927,8 @@ Discarded approximately 29 seconds of tr .Ed .El .Sh SEE ALSO +.Xr zpool-features 7 , .Xr zfs 8 -.Xr zpool-features 7 .Sh AUTHORS This manual page is a .Xr mdoc 7 From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 08:34:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 61F45ED8; Fri, 18 Jan 2013 08:34:51 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 549B8694; Fri, 18 Jan 2013 08:34:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0I8YpG4017506; Fri, 18 Jan 2013 08:34:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0I8Ypk4017505; Fri, 18 Jan 2013 08:34:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201301180834.r0I8Ypk4017505@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 18 Jan 2013 08:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245593 - stable/9/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 08:34:51 -0000 Author: pluknet Date: Fri Jan 18 08:34:50 2013 New Revision: 245593 URL: http://svnweb.freebsd.org/changeset/base/245593 Log: MFC r243102: Sort SEE ALSO xrefs by the manual section number and add a missing comma. Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Jan 18 08:34:21 2013 (r245592) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Jan 18 08:34:50 2013 (r245593) @@ -1927,8 +1927,8 @@ Discarded approximately 29 seconds of tr .Ed .El .Sh SEE ALSO +.Xr zpool-features 7 , .Xr zfs 8 -.Xr zpool-features 7 .Sh AUTHORS This manual page is a .Xr mdoc 7 From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 09:51:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3444BDD0 for ; Fri, 18 Jan 2013 09:51:06 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id AFA02A94 for ; Fri, 18 Jan 2013 09:51:05 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg6so1953064lbb.13 for ; Fri, 18 Jan 2013 01:50:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=NvI6T9LMfLLUgcPpQJGvyFAJfstgPGzDkmRlSD8r6dA=; b=Y1HnegU2t105SwnxUax3cSWOFqwyKWoWXuUUiOH3PkAANXbq8oG5PM2/Gf/nHbI5Ts vYaAA651eLdYAjp9VavG4HGPFjd3C+sXAIzOiZaCPwqUBXnKkkvYHtCwniln0FXh2Vy1 lJGTDAr7fkXmDZzsN8u0v3ebelZ00JxUKX9qM0PFkhCIVBxfVWzEAXcWXQNsj7BYtkAv HXXFxNgDtN3WAWdMFhDMAKGJ+I5LgjQPstYNO3djAQ40rTDet1OFm75acqNQBkmfPlr5 ywk6o4U+imx0EfBshaQV2Ti6IUPfYFB2dFTJi2PDq7tHRrMQX+KWdFjDPpQOEggqhyYf +qxA== X-Received: by 10.152.109.146 with SMTP id hs18mr7891970lab.8.1358502659330; Fri, 18 Jan 2013 01:50:59 -0800 (PST) Received: from dhcp170-82-red.yandex.net (dhcp170-82-red.yandex.net. [95.108.170.82]) by mx.google.com with ESMTPS id ee5sm1820623lbb.14.2013.01.18.01.50.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jan 2013 01:50:58 -0800 (PST) Sender: Andrey Zonov Message-ID: <50F91AFC.2050904@FreeBSD.org> Date: Fri, 18 Jan 2013 13:50:52 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Fabian Keil Subject: Re: bin/174831: geli segfaults with the new locked memory limit default References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> <20130115212014.GD2522@kib.kiev.ua> <20130117150022.24373166@fabiankeil.de> In-Reply-To: <20130117150022.24373166@fabiankeil.de> X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2QUNHUMIKBGPOKNRGLQNX" X-Gm-Message-State: ALoCoQlih8temwVQHLcCEViqvGEHpn8/9Knv3fGvtJiOLqlU5VXG0guq5naOdXUNbxE/1o+/wOuI Cc: Konstantin Belousov , svn-src-all@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 09:51:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2QUNHUMIKBGPOKNRGLQNX Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 1/17/13 6:00 PM, Fabian Keil wrote: > Konstantin Belousov wrote: >=20 >> On Tue, Jan 15, 2013 at 11:18:19PM +0400, Andrey Zonov wrote: >>> On 1/14/13 11:09 PM, Fabian Keil wrote: >>>> Andrey Zonov wrote: >>>> >>>>> On 1/14/13 3:26 PM, Fabian Keil wrote: >>>>>> Andrey Zonov wrote: >>>>>> >>>>>>> Author: zont >>>>>>> Date: Mon Jan 14 10:58:20 2013 >>>>>>> New Revision: 245415 >>>>>>> URL: http://svnweb.freebsd.org/changeset/base/245415 >>>>>>> >>>>>>> Log: >>>>>>> MFC r244383: >>>>>>> - Set memorylocked limit to 64Kb for default login class. >>>>>>> This prevents unprivileged users to lock too much memory. >>>>>> >>>>>> Note that this causes geli segfaults when using sudo: >>>>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174831 >>>>>> >>>>> >>>>> The change should not affect stable, because new behavior was turne= d off >>>>> in stable. >>>> >>>> It's not exactly obvious, but by "this" I was referring to the chang= e >>>> in CURRENT. >>>> >>> >>> The solution which you proposed was refused by kib@ (add to CC) when = I >>> proposed it earlier. >> The limits purpose is to limit some resource usage. Having application= s >> that override the limits contradicts the user intent of keeping the >> limits working. >=20 > My "user intent" when running applications with sudo is that > they do whatever is necessary to get the job done. >=20 > geli usually only runs for a couple of seconds, there usually > aren't lots of parallel geli executions and the limit will > only be increased if geli is running with root privileges. >=20 > I agree that applications shouldn't blindly increase limits > without reason, but in this case I think a good reason exists. >=20 >> As a workaround, you could set the limit for your user account. >=20 > Or I could continue to use the patch ... >=20 > The main problem I see here is that the user has to figure out > the cause of the problem before a workaround can be applied. >=20 > "pid 3521 (geli), uid 0: exited on signal 11" looks like > a common application bug and gdb isn't particular useful > to diagnose the problem either. >=20 >> As a solution, change the offending application to only mlock() >> the sensitive pages. E.g. gnupg already does this, probably because >> it is portable. >=20 > I agree that only mlock()ing the sensitive pages is a nice idea > in theory. >=20 > gnupg is an interesting example because it isn't able to lock > the memory either: >=20 > fk@r500 ~ $echo blafasel | gpg --encrypt -o /dev/null > gpg: WARNING: using insecure memory! > gpg: please see http://www.gnupg.org/documentation/faqs.html for more i= nformation >=20 > The excerpt from gnupg-1.4.13/util/secmem.c's lock_pool(): >=20 > if( uid ) { > errno =3D EPERM; > err =3D errno; > } > else { > err =3D mlock( p, n ); > if( err && errno ) > err =3D errno; > } >=20 > n is 32768 here, but if I disable the now-bogus uid check or > run gpg with sudo, mlock() returns -1 anyway and errno is ENOENT > (like before the mlock() call). >=20 > Apparently the mlock()ing even fails when gpg's s-bit is set now, > although I'm reasonably sure that this used to work in the past > (at least it suppressed the warning). >=20 > Fabian >=20 The code that you copy/pasted is under HAVE_BROKEN_MLOCK. The code that is executed on my machine is: gnupg-1.4.13/util/secmem.c: 167 #else 168 err =3D mlock( p, n ); 169 if( err && errno ) 170 err =3D errno; 171 #endif and it works without errors. I do not have HAVE_BROKEN_MLOCK in my config.h: /usr/ports/security/gnupg1/work/gnupg-1.4.13/config.h:/* #undef HAVE_BROKEN_MLOCK */ Try to recompile gnupg and check whether HAVE_BROKEN_MLOCK is defined. --=20 Andrey Zonov ------enig2QUNHUMIKBGPOKNRGLQNX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQ+Rr/AAoJEBWLemxX/CvThQEIAJ55i5ZqFX3fu/2sqMTfiz4j MzsZzCVdu9bp4L+c0py2jxyCEhQytmf5hGyf9nWLmCUO3+kVATeWoLEDSA93aO+D /8E8rwsoGtwF18EXtTWU/oJXdospGnmVlcMercDCAcJcPjk5272pslXXtMQSzWI3 FvSUtlLnpBBdoAN0CL/7fSJZuX4WhL4XfIvmcX2dEag5PPJbOFY892vjfoYwXett fPRrtpaaARctAuaAcJwT9HWiXPNPDXVf0OgSvG60REaYfd+22v3zMYiSeVLd6l72 WaCRoTvokQ/YFcARrEjoKbGoMG2QlAskf5Yalop4qKZQSdMm+qW7fl825MoN1E4= =SFdD -----END PGP SIGNATURE----- ------enig2QUNHUMIKBGPOKNRGLQNX-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 09:51:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 34FAAE27 for ; Fri, 18 Jan 2013 09:51:49 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx1.freebsd.org (Postfix) with ESMTP id B288BA9E for ; Fri, 18 Jan 2013 09:51:48 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id n8so797440lbj.31 for ; Fri, 18 Jan 2013 01:51:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=7KMsdsis3PaWcfWkNdVBzqEVwfWMStQcTSMohKNOK/w=; b=L18JhR99d7g6topojeELNX09HBFSt9BmM8UnK4l4DwOjXh9rgUlFHK7bhzLVFXM8y0 0ZxhUPw+hRxq4l42ySulGV+Z/KilYP0xSZx734y8rIlrX7KOakUGPB7Qc3SWdUErQ9us 1kZLM3A13d6r6LJix/CSlc/1hPubWs1m9y3TE9M1M00Hfu7vGBEcafWS9Jktg9lhQMzm MZdY8igUI45fbn2iCP7bnW3KMvlFjhmpgn8dEOtKQPFWffEnNpLNPhpxBrD1EMwNwfcU DAGbi4xDhNaGGgqzBv7Sy2e7oVOrXtpKq/BxYRT/fAQJgELWZ/3mFHD/MCqHUE0LJkHG B2cg== X-Received: by 10.112.16.110 with SMTP id f14mr3476713lbd.126.1358502702067; Fri, 18 Jan 2013 01:51:42 -0800 (PST) Received: from dhcp170-82-red.yandex.net (dhcp170-82-red.yandex.net. [95.108.170.82]) by mx.google.com with ESMTPS id f8sm1828932lbg.2.2013.01.18.01.51.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jan 2013 01:51:41 -0800 (PST) Sender: Andrey Zonov Message-ID: <50F91B2A.4080707@FreeBSD.org> Date: Fri, 18 Jan 2013 13:51:38 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r245415 - stable/9/etc References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> <50F80ADC.5050102@FreeBSD.org> <50F8115A.40602@FreeBSD.org> In-Reply-To: <50F8115A.40602@FreeBSD.org> X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2ETATREXECJSEAOHXMPEM" X-Gm-Message-State: ALoCoQlZ4EwTCbQFfLXsx1dIg+lVbXdvHyIllX+1RT8eqzwRmSbSJWaBix+KvQyjZHYxFF1CqjqA Cc: svn-src-all@FreeBSD.org, Konstantin Belousov , Fabian Keil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 09:51:49 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ETATREXECJSEAOHXMPEM Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 1/17/13 6:57 PM, Andriy Gapon wrote: > on 17/01/2013 16:29 Andriy Gapon said the following: >> sudo -c - /sbin/geli attach /dev/label/test >> >> Perhaps it would make sense to make the behavior of '-c -' the default= , but I am >> far from sure. >=20 > And a side note. I think that pam_limits + limits.conf as found on Lin= uxes is > more natural than the limits tied to login classes. >=20 Totally agree. --=20 Andrey Zonov ------enig2ETATREXECJSEAOHXMPEM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQ+RsqAAoJEBWLemxX/CvT2x0H/iIpZOZ4pwYxgsvYga3VC+Ua VYMnfx7oa6xFvQdHiGyVz0mcujBzF+as2KojDfCn6CwAmYJ90vGnBWh9hh+U+AMO G8zyO5MSIcJaDUhra3BV7OCsuZSXQrf0jnVgqgPrn9Nd95CPbpkEuVJXBqWpZVob JeV3xtRBtl+TiZ1J8Uw9ZnWsbpRD6WVOY/C3zcu54RkZLKXgzJqL17GAIVIAzmIZ mY5YPE8FJUFi1hZH2G8Ff2UGQAOk4xN3rrV14NBx2zoqR9QdcYhb4YQe7h1aFODA FYUw9NIUlRBIxXEo+P80LSaE2FVk1B93cNo1VOO8bDay5wzydXlAYir6ezY8LwU= =ESth -----END PGP SIGNATURE----- ------enig2ETATREXECJSEAOHXMPEM-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 10:14:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 12BF5656; Fri, 18 Jan 2013 10:14:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 68F05C11; Fri, 18 Jan 2013 10:14:13 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0IAE8he003886; Fri, 18 Jan 2013 12:14:08 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0IAE8he003886 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0IAE88Q003885; Fri, 18 Jan 2013 12:14:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 18 Jan 2013 12:14:08 +0200 From: Konstantin Belousov To: Andrey Zonov Subject: Re: bin/174831: geli segfaults with the new locked memory limit default Message-ID: <20130118101408.GW2522@kib.kiev.ua> References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> <20130115212014.GD2522@kib.kiev.ua> <20130117150022.24373166@fabiankeil.de> <50F91AFC.2050904@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/Y6L//1es8ezVqBy" Content-Disposition: inline In-Reply-To: <50F91AFC.2050904@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-all@freebsd.org, Andriy Gapon , Fabian Keil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 10:14:14 -0000 --/Y6L//1es8ezVqBy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 18, 2013 at 01:50:52PM +0400, Andrey Zonov wrote: > The code that you copy/pasted is under HAVE_BROKEN_MLOCK. >=20 > The code that is executed on my machine is: >=20 > gnupg-1.4.13/util/secmem.c: > 167 #else > 168 err =3D mlock( p, n ); > 169 if( err && errno ) > 170 err =3D errno; > 171 #endif >=20 > and it works without errors. >=20 > I do not have HAVE_BROKEN_MLOCK in my config.h: >=20 > /usr/ports/security/gnupg1/work/gnupg-1.4.13/config.h:/* #undef > HAVE_BROKEN_MLOCK */ >=20 > Try to recompile gnupg and check whether HAVE_BROKEN_MLOCK is defined. FWIW, I use gnupg2 and it stopped complaining about 'using insecure memory' without recompilation. --/Y6L//1es8ezVqBy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ+SBvAAoJEJDCuSvBvK1Bb34QAIN64qHYAdRM885mxHIYC93A 31PCDc3TX7hzQwZdD6qT1tpyknjncqeYMtDTVA8KBDmJoLJJ5UbQ3uZ9tbe4IXsz EDorVqydK7Z+3eJIBAKID7aByyRxdHKmwrxqf7sTlcjC2/QXZe9snEiidXFne9r6 6fKPK8saoF66iH/4NgGD/wIGPop7kKwh5MPlJRhBN5+bynFP02M1EX0wPxtsnyXC PqMxSU7znrZw/edg9ASh63ICOJUo8OwD9gpd0QY0pynwTBBLXU6ejyrLSJDWuhZn bowQYHGGsF5uAhsh2/S6deIacGJ3lX+vC4sL6QNz/XyOjraeQX+AG6qe1r4Pvt78 tJsVJBHve6DfTr0vkB5XAXtvVHr+5aA9nTzpKwcVqFYzXU2RdTZ1mzpTSfhi5Muy xPVNntrz/SqWUzhEQZ3f0/OoMT4QxtrRXbo2B5UXNRTCgtH7YOGxIrkvwakA9ZdN t7IYN0Mg1DAImPerz1MFngjb7v9t2C8Qiw/WVCvMvm19tdiYu33gummq/ebapcHv TVCQUn5j8q7f8mxVrDKE6NVGg4gb6ziSXnUsrxJACFg6z3dSrWRJTFmnG936Cjat 9dn+nsKw+jngU+NNYDlFEy6oyq9shyky4KOpX+nYMKAE0J88wp+BJpdIhEYA3oLV UTUwOVno0BwvMNMoNQqL =CavL -----END PGP SIGNATURE----- --/Y6L//1es8ezVqBy-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 11:16:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 58CE63A0; Fri, 18 Jan 2013 11:16:03 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.31.36]) by mx1.freebsd.org (Postfix) with ESMTP id B8655F3E; Fri, 18 Jan 2013 11:16:02 +0000 (UTC) Received: from [78.35.163.76] (helo=fabiankeil.de) by smtprelay02.ispgateway.de with esmtpsa (SSLv3:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Tw9uS-0007AG-LP; Fri, 18 Jan 2013 12:14:56 +0100 Date: Fri, 18 Jan 2013 12:10:10 +0100 From: Fabian Keil To: Konstantin Belousov Subject: Re: bin/174831: geli segfaults with the new locked memory limit default Message-ID: <20130118121010.6ebba26e@fabiankeil.de> In-Reply-To: <20130118101408.GW2522@kib.kiev.ua> References: <201301141058.r0EAwK4q044423@svn.freebsd.org> <20130114122640.152cb041@fabiankeil.de> <50F4464A.7000903@FreeBSD.org> <20130114200914.7f3272d2@fabiankeil.de> <50F5AB7B.6090903@FreeBSD.org> <20130115212014.GD2522@kib.kiev.ua> <20130117150022.24373166@fabiankeil.de> <50F91AFC.2050904@FreeBSD.org> <20130118101408.GW2522@kib.kiev.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/zr1jihnNlxj/MPYmnC6UQVQ"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: Andrey Zonov , svn-src-all@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 11:16:03 -0000 --Sig_/zr1jihnNlxj/MPYmnC6UQVQ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Konstantin Belousov wrote: > On Fri, Jan 18, 2013 at 01:50:52PM +0400, Andrey Zonov wrote: > > The code that you copy/pasted is under HAVE_BROKEN_MLOCK. > >=20 > > The code that is executed on my machine is: > >=20 > > gnupg-1.4.13/util/secmem.c: > > 167 #else > > 168 err =3D mlock( p, n ); > > 169 if( err && errno ) > > 170 err =3D errno; > > 171 #endif > >=20 > > and it works without errors. > >=20 > > I do not have HAVE_BROKEN_MLOCK in my config.h: > >=20 > > /usr/ports/security/gnupg1/work/gnupg-1.4.13/config.h:/* #undef > > HAVE_BROKEN_MLOCK */ > >=20 > > Try to recompile gnupg and check whether HAVE_BROKEN_MLOCK is defined. I already tried that but still get the HAVE_BROKEN_MLOCK code path which makes sense given that mlock() currently doesn't seem to work on my system. > FWIW, I use gnupg2 and it stopped complaining about 'using insecure memor= y' > without recompilation. Interesting, I guess there's something wrong with my system then. I may try to track the problem down in the future, but as I don't really need mlock() for gpg it's not particular high on my list. Fabian --Sig_/zr1jihnNlxj/MPYmnC6UQVQ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlD5LZYACgkQBYqIVf93VJ3ZTwCgmj6AKo0jJDd/fLnjCVEpCBGu WzIAnRmIKRSiCBm+8y/vXg4DAaF3h9Xj =W32U -----END PGP SIGNATURE----- --Sig_/zr1jihnNlxj/MPYmnC6UQVQ-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 13:16:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1D972CCB; Fri, 18 Jan 2013 13:16:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF687B1; Fri, 18 Jan 2013 13:16:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IDG2mt002204; Fri, 18 Jan 2013 13:16:02 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IDG24L002203; Fri, 18 Jan 2013 13:16:02 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201301181316.r0IDG24L002203@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 18 Jan 2013 13:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245604 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 13:16:03 -0000 Author: glebius Date: Fri Jan 18 13:16:02 2013 New Revision: 245604 URL: http://svnweb.freebsd.org/changeset/base/245604 Log: Belatedly merge etc part of r229850. pfsync.ko is working. Noticed by: des Modified: stable/9/etc/rc.d/pfsync Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/pfsync ============================================================================== --- stable/9/etc/rc.d/pfsync Fri Jan 18 13:08:17 2013 (r245603) +++ stable/9/etc/rc.d/pfsync Fri Jan 18 13:16:02 2013 (r245604) @@ -18,13 +18,6 @@ required_modules="pf" pfsync_prestart() { - # XXX Currently pfsync cannot be a module as it must register - # a network protocol in a static kernel table. - if ! kldstat -q -m pfsync; then - warn "pfsync(4) must be statically compiled in the kernel." - return 1 - fi - case "$pfsync_syncdev" in '') warn "pfsync_syncdev is not set." From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 15:57:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E444B920; Fri, 18 Jan 2013 15:57:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D4AC61DB; Fri, 18 Jan 2013 15:57:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IFvAiv050320; Fri, 18 Jan 2013 15:57:10 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IFvAbt050315; Fri, 18 Jan 2013 15:57:10 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301181557.r0IFvAbt050315@svn.freebsd.org> From: Eitan Adler Date: Fri, 18 Jan 2013 15:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245606 - in head: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 15:57:11 -0000 Author: eadler Date: Fri Jan 18 15:57:09 2013 New Revision: 245606 URL: http://svnweb.freebsd.org/changeset/base/245606 Log: Add option to make pc-sysinstall optional Approved by: cperciva Added: head/tools/build/options/WITHOUT_PC_SYSINSTALL (contents, props changed) Modified: head/share/mk/bsd.own.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Jan 18 14:36:23 2013 (r245605) +++ head/share/mk/bsd.own.mk Fri Jan 18 15:57:09 2013 (r245606) @@ -309,6 +309,7 @@ __DEFAULT_YES_OPTIONS = \ OPENSSH \ OPENSSL \ PAM \ + PC_SYSINSTALL \ PF \ PKGBOOTSTRAP \ PKGTOOLS \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 18 14:36:23 2013 (r245605) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 18 15:57:09 2013 (r245606) @@ -3654,6 +3654,95 @@ OLD_FILES+=usr/share/man/man8/ntptime.8. # to be filled in #.endif +.if ${MK_PC_SYSINSTALL} == no +# backend-partmanager +OLD_FILES+=usr/share/pc-sysinstall/backend-partmanager/create-part.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-partmanager/delete-part.sh +# backend-query +OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-emulation.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-laptop.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-nics.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-info.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-list.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-part.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/enable-net.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/get-packages.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-components.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-config.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-mirrors.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-packages.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-rsync-backups.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-tzones.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/query-langs.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/send-logs.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/setup-ssh-keys.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/set-mirror.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/sys-mem.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/test-live.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/test-netup.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/update-part-list.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-layouts.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-models.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-variants.sh +# backend +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-bsdlabel.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-cleanup.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-disk.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-extractimage.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-ftp.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-installcomponents.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-installpackages.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-localize.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-mountdisk.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-mountoptical.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-networking.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-newfs.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-parse.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-packages.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-runcommands.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-unmount.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-upgrade.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions-users.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/functions.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/installimage.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/parseconfig.sh +OLD_FILES+=usr/share/pc-sysinstall/backend/startautoinstall.sh +# conf +OLD_FILES+=usr/share/pc-sysinstall/conf/avail-langs +OLD_FILES+=usr/share/pc-sysinstall/conf/exclude-from-upgrade +OLD_FILES+=usr/share/pc-sysinstall/conf/license/bsd-en.txt +OLD_FILES+=usr/share/pc-sysinstall/conf/license/intel-en.txt +OLD_FILES+=usr/share/pc-sysinstall/conf/license/nvidia-en.txt +OLD_FILES+=usr/share/pc-sysinstall/conf/pc-sysinstall.conf +# doc +OLD_FILES+=usr/share/pc-sysinstall/doc/help-disk-list +OLD_FILES+=usr/share/pc-sysinstall/doc/help-disk-size +OLD_FILES+=usr/share/pc-sysinstall/doc/help-index +OLD_FILES+=usr/share/pc-sysinstall/doc/help-start-autoinstall +# examples +OLD_FILES+=usr/share/examples/pc-sysinstall/README +OLD_FILES+=usr/share/examples/pc-sysinstall/pc-autoinstall.conf +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.fbsd-netinstall +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.geli +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.gmirror +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.netinstall +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.restore +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.rsync +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.upgrade +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.zfs +# pc-sysinstall +OLD_FILES+=usr/sbin/pc-sysinstall +OLD_FILES+=usr/share/man/man8/pc-sysinstall.8.gz +OLD_DIRS+=usr/share/pc-sysinstall/backend +OLD_DIRS+=usr/share/pc-sysinstall/backend-partmanager +OLD_DIRS+=usr/share/pc-sysinstall/backend-query +OLD_DIRS+=usr/share/pc-sysinstall/conf/license +OLD_DIRS+=usr/share/pc-sysinstall/conf +OLD_DIRS+=usr/share/pc-sysinstall/doc +OLD_DIRS+=usr/share/pc-sysinstall +OLD_DIRS+=usr/share/examples/pc-sysinstall +.endif + .if ${MK_PF} == no OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os Added: head/tools/build/options/WITHOUT_PC_SYSINSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_PC_SYSINSTALL Fri Jan 18 15:57:09 2013 (r245606) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr pc-sysinstall 8 +and related programs. Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Fri Jan 18 14:36:23 2013 (r245605) +++ head/usr.sbin/Makefile Fri Jan 18 15:57:09 2013 (r245606) @@ -57,7 +57,7 @@ SUBDIR= adduser \ nfsuserd \ nmtree \ nologin \ - pc-sysinstall \ + ${_pc_sysinstall} \ pciconf \ periodic \ powerd \ @@ -265,6 +265,10 @@ SUBDIR+= ntp SUBDIR+= keyserv .endif +.if ${MK_PC_SYSINSTALL} != "no" +_pc_sysinstall= pc-sysinstall +.endif + .if ${MK_PF} != "no" SUBDIR+= ftp-proxy .endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 17:13:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1DA69469; Fri, 18 Jan 2013 17:13:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D215C888; Fri, 18 Jan 2013 17:13:10 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 28696B986; Fri, 18 Jan 2013 12:13:10 -0500 (EST) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r245577 - in head/sys: amd64/amd64 i386/i386 x86/x86 Date: Fri, 18 Jan 2013 10:52:54 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301172132.r0HLWQHD004835@svn.freebsd.org> <20130118040332.GT2522@kib.kiev.ua> In-Reply-To: <20130118040332.GT2522@kib.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201301181052.54464.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 18 Jan 2013 12:13:10 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 17:13:11 -0000 On Thursday, January 17, 2013 11:03:32 pm Konstantin Belousov wrote: > On Thu, Jan 17, 2013 at 09:32:26PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Thu Jan 17 21:32:25 2013 > > New Revision: 245577 > > URL: http://svnweb.freebsd.org/changeset/base/245577 > > > > Log: > > Don't attempt to use clflush on the local APIC register window. Various > > CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on > > Pentium-M, and trashing of the local APIC registers on a VIA C7). The > > local APIC is implicitly mapped UC already via MTRRs, so the clflush isn't > > necessary anyway. > > > > MFC after: 2 weeks > I am curious, was there a case where the clflush was really executed > on the LAPIC register window with the pristine HEAD code ? I think > that there is no Intel processors which support clflush instruction > and do not have self-snoop. The VIA CPUs. I had a submitter report that a clflush against the local APIC range would sometimes cause the entire local APIC range to get overwritten with a single cacheline (repeated throughout the window). Also, in theory we could perhaps stop masking CLFLUSH in VM's when SS is masked. > On the other hand, please note that the same change could be due for the > pmap_invalidate_cache_pages(). Unlike pmap_invalidate_cache_range(), > _pages() uses clflush unconditionally on purpose, since it is intended > for devices which do not snoop. Hmm, maybe. I'm not sure that call is ever used on the local APIC since the relevant page should already be UC from the boot-time call? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 17:48:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8B74A9DA; Fri, 18 Jan 2013 17:48:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7D269C1C; Fri, 18 Jan 2013 17:48:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IHmBa3083261; Fri, 18 Jan 2013 17:48:11 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IHmBqI083260; Fri, 18 Jan 2013 17:48:11 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201301181748.r0IHmBqI083260@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 18 Jan 2013 17:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r245608 - stable/8/usr.sbin/pkg X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 17:48:11 -0000 Author: bapt Date: Fri Jan 18 17:48:10 2013 New Revision: 245608 URL: http://svnweb.freebsd.org/changeset/base/245608 Log: MFC: r245412 Directly uses calloc(3) instread of malloc(3) + memset(3) Reported by: Jeremy Chadwick Modified: stable/8/usr.sbin/pkg/dns_utils.c Directory Properties: stable/8/usr.sbin/pkg/ (props changed) Modified: stable/8/usr.sbin/pkg/dns_utils.c ============================================================================== --- stable/8/usr.sbin/pkg/dns_utils.c Fri Jan 18 16:32:33 2013 (r245607) +++ stable/8/usr.sbin/pkg/dns_utils.c Fri Jan 18 17:48:10 2013 (r245608) @@ -66,10 +66,9 @@ dns_getsrvinfo(const char *zone) p += len + NS_QFIXEDSZ; } - res = malloc(sizeof(struct dns_srvinfo) * ancount); + res = calloc(ancount, sizeof(struct dns_srvinfo)); if (res == NULL) return (NULL); - memset(res, 0, sizeof(struct dns_srvinfo) * ancount); n = 0; while (ancount > 0 && p < end) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 17:49:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 504D7BD8; Fri, 18 Jan 2013 17:49:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 41F35C32; Fri, 18 Jan 2013 17:49:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IHn1ZM083401; Fri, 18 Jan 2013 17:49:01 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IHn1rW083400; Fri, 18 Jan 2013 17:49:01 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201301181749.r0IHn1rW083400@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 18 Jan 2013 17:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245609 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 17:49:01 -0000 Author: bapt Date: Fri Jan 18 17:49:00 2013 New Revision: 245609 URL: http://svnweb.freebsd.org/changeset/base/245609 Log: MFC: r245412 Directly uses calloc(3) instread of malloc(3) + memset(3) Reported by: Jeremy Chadwick Modified: stable/9/usr.sbin/pkg/dns_utils.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/dns_utils.c ============================================================================== --- stable/9/usr.sbin/pkg/dns_utils.c Fri Jan 18 17:48:10 2013 (r245608) +++ stable/9/usr.sbin/pkg/dns_utils.c Fri Jan 18 17:49:00 2013 (r245609) @@ -66,10 +66,9 @@ dns_getsrvinfo(const char *zone) p += len + NS_QFIXEDSZ; } - res = malloc(sizeof(struct dns_srvinfo) * ancount); + res = calloc(ancount, sizeof(struct dns_srvinfo)); if (res == NULL) return (NULL); - memset(res, 0, sizeof(struct dns_srvinfo) * ancount); n = 0; while (ancount > 0 && p < end) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 18:24:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 14EA2EE5; Fri, 18 Jan 2013 18:24:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ED12DE40; Fri, 18 Jan 2013 18:24:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IIOfis094868; Fri, 18 Jan 2013 18:24:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IIOfxd094865; Fri, 18 Jan 2013 18:24:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301181824.r0IIOfxd094865@svn.freebsd.org> From: John Baldwin Date: Fri, 18 Jan 2013 18:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245610 - head/bin/ps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 18:24:42 -0000 Author: jhb Date: Fri Jan 18 18:24:40 2013 New Revision: 245610 URL: http://svnweb.freebsd.org/changeset/base/245610 Log: Include the thread name along with the command name when displaying the command name of a thread from a multi-threaded process that doesn't have an available argument list (such as kernel processes) and threads display is enabled via -H. Reviewed by: alfred, delphij, eric@vangyzen.net MFC after: 1 week Modified: head/bin/ps/extern.h head/bin/ps/fmt.c head/bin/ps/ps.c Modified: head/bin/ps/extern.h ============================================================================== --- head/bin/ps/extern.h Fri Jan 18 17:49:00 2013 (r245609) +++ head/bin/ps/extern.h Fri Jan 18 18:24:40 2013 (r245610) @@ -51,7 +51,7 @@ char *elapsed(KINFO *, VARENT *); char *elapseds(KINFO *, VARENT *); char *emulname(KINFO *, VARENT *); VARENT *find_varentry(VAR *); -const char *fmt_argv(char **, char *, size_t); +const char *fmt_argv(char **, char *, char *, size_t); double getpcpu(const KINFO *); char *kvar(KINFO *, VARENT *); char *label(KINFO *, VARENT *); Modified: head/bin/ps/fmt.c ============================================================================== --- head/bin/ps/fmt.c Fri Jan 18 17:49:00 2013 (r245609) +++ head/bin/ps/fmt.c Fri Jan 18 18:24:40 2013 (r245610) @@ -105,7 +105,7 @@ cmdpart(char *arg0) } const char * -fmt_argv(char **argv, char *cmd, size_t maxlen) +fmt_argv(char **argv, char *cmd, char *thread, size_t maxlen) { size_t len; char *ap, *cp; @@ -122,9 +122,14 @@ fmt_argv(char **argv, char *cmd, size_t cp = malloc(len); if (cp == NULL) errx(1, "malloc failed"); - if (ap == NULL) - sprintf(cp, "[%.*s]", (int)maxlen, cmd); - else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0) + if (ap == NULL) { + if (showthreads && thread != NULL) { + asprintf(&ap, "%s/%s", cmd, thread); + sprintf(cp, "[%.*s]", (int)maxlen, ap); + free(ap); + } else + sprintf(cp, "[%.*s]", (int)maxlen, cmd); + } else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0) sprintf(cp, "%s (%.*s)", ap, (int)maxlen, cmd); else strcpy(cp, ap); Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Fri Jan 18 17:49:00 2013 (r245609) +++ head/bin/ps/ps.c Fri Jan 18 18:24:40 2013 (r245610) @@ -141,7 +141,7 @@ static void format_output(KINFO *); static void *expand_list(struct listinfo *); static const char * fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int), - KINFO *, char *, int); + KINFO *, char *, char *, int); static void free_list(struct listinfo *); static void init_list(struct listinfo *, addelem_rtn, int, const char *); static char *kludge_oldps_options(const char *, char *, const char *); @@ -1163,11 +1163,12 @@ sizevars(void) static const char * fmt(char **(*fn)(kvm_t *, const struct kinfo_proc *, int), KINFO *ki, - char *comm, int maxlen) + char *comm, char *thread, int maxlen) { const char *s; - s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm, maxlen); + s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm, + ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen); return (s); } @@ -1195,7 +1196,7 @@ saveuser(KINFO *ki) ki->ki_args = strdup(""); else if (UREADOK(ki) || (ki->ki_p->ki_args != NULL)) ki->ki_args = strdup(fmt(kvm_getargv, ki, - ki->ki_p->ki_comm, MAXCOMLEN)); + ki->ki_p->ki_comm, ki->ki_p->ki_tdname, MAXCOMLEN)); else asprintf(&ki->ki_args, "(%s)", ki->ki_p->ki_comm); if (ki->ki_args == NULL) @@ -1206,7 +1207,7 @@ saveuser(KINFO *ki) if (needenv) { if (UREADOK(ki)) ki->ki_env = strdup(fmt(kvm_getenvv, ki, - (char *)NULL, 0)); + (char *)NULL, (char *)NULL, 0)); else ki->ki_env = strdup("()"); if (ki->ki_env == NULL) From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 18:43:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9274BCC1; Fri, 18 Jan 2013 18:43:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 757F9FAA; Fri, 18 Jan 2013 18:43:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IIhd7e000540; Fri, 18 Jan 2013 18:43:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IIhcwZ000536; Fri, 18 Jan 2013 18:43:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301181843.r0IIhcwZ000536@svn.freebsd.org> From: John Baldwin Date: Fri, 18 Jan 2013 18:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245611 - in head/sys: fs/nfsclient fs/nfsserver nfsclient nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 18:43:39 -0000 Author: jhb Date: Fri Jan 18 18:43:38 2013 New Revision: 245611 URL: http://svnweb.freebsd.org/changeset/base/245611 Log: Use vfs_timestamp() to set file timestamps rather than invoking getmicrotime() or getnanotime() directly in NFS. Reviewed by: rmacklem, bde MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsserver/nfs_srvsubs.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Fri Jan 18 18:24:40 2013 (r245610) +++ head/sys/fs/nfsclient/nfs_clvnops.c Fri Jan 18 18:43:38 2013 (r245611) @@ -3247,7 +3247,7 @@ nfsfifo_read(struct vop_read_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NACC; - getnanotime(&np->n_atim); + vfs_timestamp(&np->n_atim); mtx_unlock(&np->n_mtx); error = fifo_specops.vop_read(ap); return error; @@ -3266,7 +3266,7 @@ nfsfifo_write(struct vop_write_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NUPD; - getnanotime(&np->n_mtim); + vfs_timestamp(&np->n_mtim); mtx_unlock(&np->n_mtx); return(fifo_specops.vop_write(ap)); } @@ -3286,7 +3286,7 @@ nfsfifo_close(struct vop_close_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & (NACC | NUPD)) { - getnanotime(&ts); + vfs_timestamp(&ts); if (np->n_flag & NACC) np->n_atim = ts; if (np->n_flag & NUPD) Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Jan 18 18:24:40 2013 (r245610) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Jan 18 18:43:38 2013 (r245611) @@ -1476,7 +1476,7 @@ nfsvno_updfilerev(struct vnode *vp, stru struct vattr va; VATTR_NULL(&va); - getnanotime(&va.va_mtime); + vfs_timestamp(&va.va_mtime); (void) VOP_SETATTR(vp, &va, cred); (void) nfsvno_getattr(vp, nvap, cred, p, 1); } @@ -2248,7 +2248,6 @@ nfsrv_sattr(struct nfsrv_descript *nd, s { u_int32_t *tl; struct nfsv2_sattr *sp; - struct timeval curtime; int error = 0, toclient = 0; switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) { @@ -2307,9 +2306,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s toclient = 1; break; case NFSV3SATTRTIME_TOSERVER: - NFSGETTIME(&curtime); - nvap->na_atime.tv_sec = curtime.tv_sec; - nvap->na_atime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_atime); nvap->na_vaflags |= VA_UTIMES_NULL; break; }; @@ -2321,9 +2318,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s nvap->na_vaflags &= ~VA_UTIMES_NULL; break; case NFSV3SATTRTIME_TOSERVER: - NFSGETTIME(&curtime); - nvap->na_mtime.tv_sec = curtime.tv_sec; - nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_mtime); if (!toclient) nvap->na_vaflags |= VA_UTIMES_NULL; break; @@ -2353,7 +2348,6 @@ nfsv4_sattr(struct nfsrv_descript *nd, s u_char *cp, namestr[NFSV4_SMALLSTR + 1]; uid_t uid; gid_t gid; - struct timeval curtime; error = nfsrv_getattrbits(nd, attrbitp, NULL, &retnotsup); if (error) @@ -2488,9 +2482,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s toclient = 1; attrsum += NFSX_V4TIME; } else { - NFSGETTIME(&curtime); - nvap->na_atime.tv_sec = curtime.tv_sec; - nvap->na_atime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_atime); nvap->na_vaflags |= VA_UTIMES_NULL; } break; @@ -2515,9 +2507,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s nvap->na_vaflags &= ~VA_UTIMES_NULL; attrsum += NFSX_V4TIME; } else { - NFSGETTIME(&curtime); - nvap->na_mtime.tv_sec = curtime.tv_sec; - nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_mtime); if (!toclient) nvap->na_vaflags |= VA_UTIMES_NULL; } Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Fri Jan 18 18:24:40 2013 (r245610) +++ head/sys/nfsclient/nfs_vnops.c Fri Jan 18 18:43:38 2013 (r245611) @@ -3458,7 +3458,7 @@ nfsfifo_read(struct vop_read_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NACC; - getnanotime(&np->n_atim); + vfs_timestamp(&np->n_atim); mtx_unlock(&np->n_mtx); error = fifo_specops.vop_read(ap); return error; @@ -3477,7 +3477,7 @@ nfsfifo_write(struct vop_write_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NUPD; - getnanotime(&np->n_mtim); + vfs_timestamp(&np->n_mtim); mtx_unlock(&np->n_mtx); return(fifo_specops.vop_write(ap)); } @@ -3497,7 +3497,7 @@ nfsfifo_close(struct vop_close_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & (NACC | NUPD)) { - getnanotime(&ts); + vfs_timestamp(&ts); if (np->n_flag & NACC) np->n_atim = ts; if (np->n_flag & NUPD) Modified: head/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- head/sys/nfsserver/nfs_srvsubs.c Fri Jan 18 18:24:40 2013 (r245610) +++ head/sys/nfsserver/nfs_srvsubs.c Fri Jan 18 18:43:38 2013 (r245611) @@ -1393,7 +1393,7 @@ nfsm_srvsattr_xx(struct vattr *a, struct toclient = 1; break; case NFSV3SATTRTIME_TOSERVER: - getnanotime(&(a)->va_atime); + vfs_timestamp(&a->va_atime); a->va_vaflags |= VA_UTIMES_NULL; break; } @@ -1409,7 +1409,7 @@ nfsm_srvsattr_xx(struct vattr *a, struct a->va_vaflags &= ~VA_UTIMES_NULL; break; case NFSV3SATTRTIME_TOSERVER: - getnanotime(&(a)->va_mtime); + vfs_timestamp(&a->va_mtime); if (toclient == 0) a->va_vaflags |= VA_UTIMES_NULL; break; From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 19:11:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BE38A919; Fri, 18 Jan 2013 19:11:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AA99310D; Fri, 18 Jan 2013 19:11:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IJBHPg009359; Fri, 18 Jan 2013 19:11:17 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IJBHHu009358; Fri, 18 Jan 2013 19:11:17 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201301181911.r0IJBHHu009358@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 18 Jan 2013 19:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245612 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 19:11:17 -0000 Author: pfg Date: Fri Jan 18 19:11:17 2013 New Revision: 245612 URL: http://svnweb.freebsd.org/changeset/base/245612 Log: ext2fs: Add some DOINGASYNC check to match ffs. This is mostly cosmetical. Reviewed by: bde MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_inode.c Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Fri Jan 18 18:43:38 2013 (r245611) +++ head/sys/fs/ext2fs/ext2_inode.c Fri Jan 18 19:11:17 2013 (r245612) @@ -180,7 +180,7 @@ ext2_truncate(vp, length, flags, cred, t else bawrite(bp); oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (ext2_update(ovp, 1)); + return (ext2_update(ovp, !DOINGASYNC(ovp))); } /* * Shorten the size of the file. If the file is not being @@ -238,7 +238,7 @@ ext2_truncate(vp, length, flags, cred, t for (i = NDADDR - 1; i > lastblock; i--) oip->i_db[i] = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - allerror = ext2_update(ovp, 1); + allerror = ext2_update(ovp, !DOINGASYNC(ovp)); /* * Having written the new inode to disk, save its new configuration @@ -420,9 +420,13 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, le (u_int)(NINDIR(fs) - (last + 1)) * sizeof(int32_t)); if (last == -1) bp->b_flags |= B_INVAL; - error = bwrite(bp); - if (error) - allerror = error; + if (DOINGASYNC(vp)) { + bdwrite(bp); + } else { + error = bwrite(bp); + if (error) + allerror = error; + } bap = copy; /* From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 19:42:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8197717F; Fri, 18 Jan 2013 19:42:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6FE59223; Fri, 18 Jan 2013 19:42:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IJg9rK018073; Fri, 18 Jan 2013 19:42:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IJg9TK018072; Fri, 18 Jan 2013 19:42:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301181942.r0IJg9TK018072@svn.freebsd.org> From: Xin LI Date: Fri, 18 Jan 2013 19:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245613 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 19:42:09 -0000 Author: delphij Date: Fri Jan 18 19:42:08 2013 New Revision: 245613 URL: http://svnweb.freebsd.org/changeset/base/245613 Log: Make it possible to force async at server side on new NFS server, similar to the old one's nfs.nfsrv.async. Please note that by enabling this option (default is disabled), the system could potentionally have silent data corruption if the server crashes before write is committed to non-volatile storage, as the client side have no way to tell if the data is already written. Submitted by: rmacklem MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Jan 18 19:11:17 2013 (r245612) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Jan 18 19:42:08 2013 (r245613) @@ -55,6 +55,11 @@ extern int nfs_rootfhset; extern int nfsrv_enable_crossmntpt; #endif /* !APPLEKEXT */ +static int nfs_async = 0; +SYSCTL_DECL(_vfs_nfsd); +SYSCTL_INT(_vfs_nfsd, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, + "Tell client that writes were synced even though they were not"); + /* * This list defines the GSS mechanisms supported. * (Don't ask me how you get these strings from the RFC stuff like @@ -912,7 +917,13 @@ nfsrvd_write(struct nfsrv_descript *nd, goto out; NFSM_BUILD(tl, u_int32_t *, 4 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(retlen); - if (stable == NFSWRITE_UNSTABLE) + /* + * If nfs_async is set, then pretend the write was FILESYNC. + * Warning: Doing this violates RFC1813 and runs a risk + * of data written by a client being lost when the server + * crashes/reboots. + */ + if (stable == NFSWRITE_UNSTABLE && nfs_async == 0) *tl++ = txdr_unsigned(stable); else *tl++ = txdr_unsigned(NFSWRITE_FILESYNC); From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 19:57:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EB6394E2 for ; Fri, 18 Jan 2013 19:57:38 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 558F02B0 for ; Fri, 18 Jan 2013 19:57:37 +0000 (UTC) Received: (qmail 55687 invoked from network); 18 Jan 2013 21:19:46 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 18 Jan 2013 21:19:46 -0000 Message-ID: <50F9A92A.9040706@freebsd.org> Date: Fri, 18 Jan 2013 20:57:30 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Alan Cox Subject: Re: svn commit: r243631 - in head/sys: kern sys References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50F28806.10505@rice.edu> <50F41DA3.8060300@freebsd.org> In-Reply-To: <50F41DA3.8060300@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 19:57:39 -0000 On 14.01.2013 16:00, Andre Oppermann wrote: > On 13.01.2013 11:10, Alan Cox wrote: >> 3. The function vm_ksubmap_init() has a dependency on the global >> variable maxpipekva. vm_ksubmap_init() is executed under SI_SUB_CPU, >> which comes after SI_SUB_KMEM. >> >> Am I missing anything? >> >> I'm attaching a patch that defers the calculation of maxpipekva until we >> actually need it in vm_ksubmap_init(). Any comments on this patch are >> welcome. > > Looks good to me. Perhaps the whole calculation and setup of the pipe_map > could be moved to kern/sys_pipe.c:pipeinit() to have it all together. Attached is a patch moving the whole calculation and pipe_map creation to kern/sys_pipe.c. -- Andre Index: vm/vm_kern.c =================================================================== --- vm/vm_kern.c (revision 245601) +++ vm/vm_kern.c (working copy) @@ -88,7 +88,6 @@ vm_map_t kernel_map=0; vm_map_t kmem_map=0; vm_map_t exec_map=0; -vm_map_t pipe_map; vm_map_t buffer_map=0; const void *zero_region; Index: vm/vm_kern.h =================================================================== --- vm/vm_kern.h (revision 245601) +++ vm/vm_kern.h (working copy) @@ -68,7 +68,6 @@ extern vm_map_t kernel_map; extern vm_map_t kmem_map; extern vm_map_t exec_map; -extern vm_map_t pipe_map; extern u_long vm_kmem_size; #endif /* _VM_VM_KERN_H_ */ Index: vm/vm_init.c =================================================================== --- vm/vm_init.c (revision 245601) +++ vm/vm_init.c (working copy) @@ -73,7 +73,6 @@ #include #include #include -#include #include #include @@ -195,8 +194,6 @@ pager_map->system_map = 1; exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, exec_map_entries * round_page(PATH_MAX + ARG_MAX), FALSE); - pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, - FALSE); /* * XXX: Mbuf system machine-specific initializations should Index: sys/pipe.h =================================================================== --- sys/pipe.h (revision 245601) +++ sys/pipe.h (working copy) @@ -53,10 +53,6 @@ #define PIPENPAGES (BIG_PIPE_SIZE / PAGE_SIZE + 1) -/* - * See sys_pipe.c for info on what these limits mean. - */ -extern long maxpipekva; extern struct fileops pipeops; /* Index: kern/subr_param.c =================================================================== --- kern/subr_param.c (revision 245601) +++ kern/subr_param.c (working copy) @@ -96,7 +96,6 @@ pid_t pid_max = PID_MAX; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ -long maxpipekva; /* Limit on pipe KVA */ int vm_guest; /* Running as virtual machine guest? */ u_long maxtsiz; /* max text size */ u_long dfldsiz; /* initial data size limit */ @@ -330,18 +329,6 @@ */ ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); - - /* - * The default for maxpipekva is min(1/64 of the kernel address space, - * max(1/64 of main memory, 512KB)). See sys_pipe.c for more details. - */ - maxpipekva = (physpages / 64) * PAGE_SIZE; - TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva); - if (maxpipekva < 512 * 1024) - maxpipekva = 512 * 1024; - if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64) - maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / - 64; } /* Index: kern/sys_pipe.c =================================================================== --- kern/sys_pipe.c (revision 245601) +++ kern/sys_pipe.c (working copy) @@ -202,6 +202,7 @@ #define MAXPIPESIZE (2*PIPE_SIZE/3) static long amountpipekva; +static long maxpipekva; static int pipefragretry; static int pipeallocfail; static int piperesizefail; @@ -220,7 +221,6 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, piperesizeallowed, CTLFLAG_RW, &piperesizeallowed, 0, "Pipe resizing allowed"); -static void pipeinit(void *dummy __unused); static void pipeclose(struct pipe *cpipe); static void pipe_free_kmem(struct pipe *cpipe); static int pipe_create(struct pipe *pipe, int backing); @@ -244,12 +244,29 @@ static struct unrhdr *pipeino_unr; static dev_t pipedev_ino; -SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, pipeinit, NULL); +static vm_map_t pipe_map; +/* + * Set up the kmem suballocation and UMA zone for the pipe memory. + */ static void pipeinit(void *dummy __unused) { + quad_t realkmem; + vm_offset_t minaddr, maxaddr; + realkmem = qmin((quad_t)physmem * PAGE_SIZE, + vm_map_max(kernel_map) - vm_map_min(kernel_map)); + + maxpipekva = realkmem / 64; + TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva); + if (maxpipekva > realmem / 64) + maxpipekva = realkmem / 64; + if (maxpipekva < 512 * 1024) + maxpipekva = 512 * 1024; + pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, + FALSE); + pipe_zone = uma_zcreate("pipe", sizeof(struct pipepair), pipe_zone_ctor, NULL, pipe_zone_init, pipe_zone_fini, UMA_ALIGN_PTR, 0); @@ -259,6 +276,7 @@ pipedev_ino = devfs_alloc_cdp_inode(); KASSERT(pipedev_ino > 0, ("pipe dev inode not initialized")); } +SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, pipeinit, NULL); static int pipe_zone_ctor(void *mem, int size, void *arg, int flags) From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 20:06:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 34A836E0; Fri, 18 Jan 2013 20:06:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1E24A303; Fri, 18 Jan 2013 20:06:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IK6nqa024782; Fri, 18 Jan 2013 20:06:49 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IK6kkr024763; Fri, 18 Jan 2013 20:06:46 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301182006.r0IK6kkr024763@svn.freebsd.org> From: Andrew Turner Date: Fri, 18 Jan 2013 20:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245614 - in vendor/compiler-rt/dist: . SDKs/darwin/usr/include SDKs/linux/usr/include cmake/Modules include include/sanitizer lib lib/arm lib/asan lib/asan/dynamic lib/asan/lit_tests l... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 20:06:49 -0000 Author: andrew Date: Fri Jan 18 20:06:45 2013 New Revision: 245614 URL: http://svnweb.freebsd.org/changeset/base/245614 Log: Import compiler-rt r172839. Added: vendor/compiler-rt/dist/.arcconfig vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake vendor/compiler-rt/dist/include/ vendor/compiler-rt/dist/include/sanitizer/ vendor/compiler-rt/dist/include/sanitizer/asan_interface.h vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h vendor/compiler-rt/dist/include/sanitizer/msan_interface.h vendor/compiler-rt/dist/lib/asan/asan_allocator2.cc vendor/compiler-rt/dist/lib/asan/asan_fake_stack.cc vendor/compiler-rt/dist/lib/asan/asan_intercepted_functions.h vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/asan_report.h vendor/compiler-rt/dist/lib/asan/dynamic/ vendor/compiler-rt/dist/lib/asan/dynamic/Makefile.mk vendor/compiler-rt/dist/lib/asan/dynamic/asan_interceptors_dynamic.cc vendor/compiler-rt/dist/lib/asan/lit_tests/ vendor/compiler-rt/dist/lib/asan/lit_tests/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/ vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/blacklist-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-blacklist-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-blacklist.txt vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-bug-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-bug-extra2.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-nobug-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/lit.local.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/ vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/clone_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/interception_failure_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/interception_malloc_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/interception_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/lit.local.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/malloc-in-qsort.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/overflow-in-qsort.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/rlimit_mmap_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/swapcontext_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/ vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/dlclose-test-so.cc vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/lit.local.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Unit/ vendor/compiler-rt/dist/lib/asan/lit_tests/Unit/lit.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/Unit/lit.site.cfg.in vendor/compiler-rt/dist/lib/asan/lit_tests/blacklist.cc vendor/compiler-rt/dist/lib/asan/lit_tests/deep_stack_uaf.cc vendor/compiler-rt/dist/lib/asan/lit_tests/deep_tail_call.cc vendor/compiler-rt/dist/lib/asan/lit_tests/deep_thread_stack.cc vendor/compiler-rt/dist/lib/asan/lit_tests/default_options.cc vendor/compiler-rt/dist/lib/asan/lit_tests/dlclose-test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/force_inline_opt0.cc vendor/compiler-rt/dist/lib/asan/lit_tests/global-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/heap-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/initialization-blacklist.cc vendor/compiler-rt/dist/lib/asan/lit_tests/initialization-bug.cc vendor/compiler-rt/dist/lib/asan/lit_tests/initialization-nobug.cc vendor/compiler-rt/dist/lib/asan/lit_tests/interface_symbols.c vendor/compiler-rt/dist/lib/asan/lit_tests/large_func_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/lit.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/asan/lit_tests/log-path_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/log_path_fork_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/malloc_delete_mismatch.cc vendor/compiler-rt/dist/lib/asan/lit_tests/malloc_hook.cc vendor/compiler-rt/dist/lib/asan/lit_tests/memcmp_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/null_deref.cc vendor/compiler-rt/dist/lib/asan/lit_tests/on_error_callback.cc vendor/compiler-rt/dist/lib/asan/lit_tests/sanity_check_pure_c.c vendor/compiler-rt/dist/lib/asan/lit_tests/shared-lib-test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/sleep_before_dying.c vendor/compiler-rt/dist/lib/asan/lit_tests/stack-frame-demangle.cc vendor/compiler-rt/dist/lib/asan/lit_tests/stack-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/stack-use-after-return.cc vendor/compiler-rt/dist/lib/asan/lit_tests/strip_path_prefix.c vendor/compiler-rt/dist/lib/asan/lit_tests/strncpy-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/symbolize_callback.cc vendor/compiler-rt/dist/lib/asan/lit_tests/use-after-free.cc vendor/compiler-rt/dist/lib/asan/lit_tests/use-after-scope-inlined.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test_main.cc vendor/compiler-rt/dist/lib/lit.common.cfg vendor/compiler-rt/dist/lib/lit.common.unit.cfg vendor/compiler-rt/dist/lib/msan/ vendor/compiler-rt/dist/lib/msan/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/msan.cc vendor/compiler-rt/dist/lib/msan/msan.h vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_flags.h vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_linux.cc vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc vendor/compiler-rt/dist/lib/msan/msan_platform_limits_posix.cc vendor/compiler-rt/dist/lib/msan/msan_platform_limits_posix.h vendor/compiler-rt/dist/lib/msan/msan_report.cc vendor/compiler-rt/dist/lib/msan/tests/ vendor/compiler-rt/dist/lib/msan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/tests/lit.cfg vendor/compiler-rt/dist/lib/msan/tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/msan/tests/msandr_test_so.cc vendor/compiler-rt/dist/lib/msan/tests/msandr_test_so.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_lfstack.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_quarantine.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_report_decorator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_itanium.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/scripts/ vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.cfg vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_libc_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_mutex_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_printf_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_main.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/dist/lib/sanitizer_common/tests/standalone_malloc_test.cc vendor/compiler-rt/dist/lib/tsan/check_cmake.sh (contents, props changed) vendor/compiler-rt/dist/lib/tsan/lit_tests/ vendor/compiler-rt/dist/lib/tsan/lit_tests/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/lit_tests/Helpers/ vendor/compiler-rt/dist/lib/tsan/lit_tests/Helpers/blacklist.txt vendor/compiler-rt/dist/lib/tsan/lit_tests/Helpers/lit.local.cfg vendor/compiler-rt/dist/lib/tsan/lit_tests/Unit/ vendor/compiler-rt/dist/lib/tsan/lit_tests/Unit/lit.cfg vendor/compiler-rt/dist/lib/tsan/lit_tests/Unit/lit.site.cfg.in vendor/compiler-rt/dist/lib/tsan/lit_tests/blacklist.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_close_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_dup_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_location.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_pipe_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_pipe_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_socket_connect_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_socket_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_socketpair_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_stdout_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/free_race.c vendor/compiler-rt/dist/lib/tsan/lit_tests/free_race2.c vendor/compiler-rt/dist/lib/tsan/lit_tests/global_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/heap_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/ignore_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java.h vendor/compiler-rt/dist/lib/tsan/lit_tests/java_alloc.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_lock.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_lock_move.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_race_move.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_rwlock.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/lit.cfg vendor/compiler-rt/dist/lib/tsan/lit_tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/tsan/lit_tests/memcpy_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mop_with_offset.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mop_with_offset2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutex_destroy_locked.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset1.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset3.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset4.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset5.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset6.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset7.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_barrier.c vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_barrier2.c vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_heap.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_mutex.c vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_read.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/race_with_finished_thread.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/signal_errno.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/signal_malloc.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_race.c vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_stack.c vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_stack2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/sleep_sync.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/sleep_sync2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/stack_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/stack_race2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init1.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init3.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init4.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init5.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init6.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/suppress_same_address.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/suppress_same_stacks.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/test_output.sh (contents, props changed) vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_leak.c vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_leak2.c vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_leak3.c vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_name.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/tiny_race.c vendor/compiler-rt/dist/lib/tsan/lit_tests/tls_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/tls_race2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/user_fopen.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/user_malloc.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/virtual_inheritance_compile_bug.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/vptr_benign_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/vptr_harmful_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/write_in_reader_lock.cc vendor/compiler-rt/dist/lib/tsan/rtl/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_windows.cc vendor/compiler-rt/dist/lib/tsan/tests/ vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/rtl/ vendor/compiler-rt/dist/lib/tsan/tests/rtl/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_bench.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_mop.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_mutex.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_posix.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_string.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_test.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_test_util.h vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_test_util_linux.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_thread.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/ vendor/compiler-rt/dist/lib/tsan/tests/unit/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_clock_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_flags_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mman_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mutex_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mutexset_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_platform_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_shadow_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_stack_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_suppressions_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_sync_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_vector_test.cc vendor/compiler-rt/dist/lib/ubsan/ vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/Makefile.mk vendor/compiler-rt/dist/lib/ubsan/lit_tests/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/lit_tests/Float/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/Float/cast-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/add-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/div-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/div-zero.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/incdec-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/mul-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/negate-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/no-recover.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/shift.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/sub-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/uadd-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/uincdec-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/umul-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/usub-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/bool.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/deduplication.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/enum.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/missing_return.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/unreachable.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/vla.c vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/misaligned.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/null.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/vptr.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/lit.cfg vendor/compiler-rt/dist/lib/ubsan/lit_tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/ubsan/ubsan_diag.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_diag.h vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers_cxx.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers_cxx.h vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash.h vendor/compiler-rt/dist/lib/ubsan/ubsan_value.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_value.h vendor/compiler-rt/dist/make/platform/clang_linux_test_input.c Deleted: vendor/compiler-rt/dist/lib/asan/Makefile.old vendor/compiler-rt/dist/lib/asan/asan_interface.h vendor/compiler-rt/dist/lib/asan/asan_printf.cc vendor/compiler-rt/dist/lib/asan/output_tests/ vendor/compiler-rt/dist/lib/asan/tests/asan_break_optimization.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator64.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_interface_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator64_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc vendor/compiler-rt/dist/lib/tsan/output_tests/ vendor/compiler-rt/dist/lib/tsan/rtl/tsan_printf.cc vendor/compiler-rt/dist/lib/tsan/rtl_tests/ vendor/compiler-rt/dist/lib/tsan/unit_tests/ Modified: vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/dist/LICENSE.TXT vendor/compiler-rt/dist/Makefile vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h vendor/compiler-rt/dist/lib/CMakeLists.txt vendor/compiler-rt/dist/lib/Makefile.mk vendor/compiler-rt/dist/lib/arm/Makefile.mk vendor/compiler-rt/dist/lib/arm/divsi3.S vendor/compiler-rt/dist/lib/arm/udivsi3.S vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/Makefile.mk vendor/compiler-rt/dist/lib/asan/README.txt vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/dist/lib/asan/asan_flags.h vendor/compiler-rt/dist/lib/asan/asan_globals.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.h vendor/compiler-rt/dist/lib/asan/asan_internal.h vendor/compiler-rt/dist/lib/asan/asan_linux.cc vendor/compiler-rt/dist/lib/asan/asan_lock.h vendor/compiler-rt/dist/lib/asan/asan_mac.cc vendor/compiler-rt/dist/lib/asan/asan_mac.h vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_mac.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/dist/lib/asan/asan_posix.cc vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/dist/lib/asan/asan_stack.cc vendor/compiler-rt/dist/lib/asan/asan_stack.h vendor/compiler-rt/dist/lib/asan/asan_stats.cc vendor/compiler-rt/dist/lib/asan/asan_stats.h vendor/compiler-rt/dist/lib/asan/asan_thread.cc vendor/compiler-rt/dist/lib/asan/asan_thread.h vendor/compiler-rt/dist/lib/asan/asan_thread_registry.cc vendor/compiler-rt/dist/lib/asan/asan_thread_registry.h vendor/compiler-rt/dist/lib/asan/asan_win.cc vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/tests/asan_benchmarks_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_globals_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_mac_test.mm vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.ignore vendor/compiler-rt/dist/lib/asan/tests/asan_test_config.h vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h vendor/compiler-rt/dist/lib/cmpdi2.c vendor/compiler-rt/dist/lib/fixsfdi.c vendor/compiler-rt/dist/lib/int_endianness.h vendor/compiler-rt/dist/lib/interception/CMakeLists.txt vendor/compiler-rt/dist/lib/interception/interception.h vendor/compiler-rt/dist/lib/interception/interception_linux.cc vendor/compiler-rt/dist/lib/interception/interception_linux.h vendor/compiler-rt/dist/lib/interception/interception_mac.cc vendor/compiler-rt/dist/lib/interception/interception_mac.h vendor/compiler-rt/dist/lib/interception/interception_win.cc vendor/compiler-rt/dist/lib/interception/interception_win.h vendor/compiler-rt/dist/lib/interception/mach_override/mach_override.c vendor/compiler-rt/dist/lib/profile/GCDAProfiling.c vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_msvc.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_list.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mutex.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_placement_new.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_common_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_list_test.cc vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/Makefile.old vendor/compiler-rt/dist/lib/tsan/go/buildgo.sh vendor/compiler-rt/dist/lib/tsan/go/test.c vendor/compiler-rt/dist/lib/tsan/go/tsan_go.cc vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.mk vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.old vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_defs.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_inl.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_amd64.S vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_mutex.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_report.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_trace.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_update_shadow_word_inl.h vendor/compiler-rt/dist/lib/ucmpdi2.c vendor/compiler-rt/dist/make/AppleBI.mk vendor/compiler-rt/dist/make/config.mk vendor/compiler-rt/dist/make/lib_info.mk vendor/compiler-rt/dist/make/options.mk vendor/compiler-rt/dist/make/platform/clang_darwin.mk vendor/compiler-rt/dist/make/platform/clang_linux.mk vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/dist/test/Unit/endianness.h Added: vendor/compiler-rt/dist/.arcconfig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/.arcconfig Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,4 @@ +{ + "project_id" : "compiler-rt", + "conduit_uri" : "http://llvm-reviews.chandlerc.com/" +} Modified: vendor/compiler-rt/dist/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/CMakeLists.txt Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/CMakeLists.txt Fri Jan 18 20:06:45 2013 (r245614) @@ -15,49 +15,157 @@ include(LLVMParseArguments) # runtime libraries. cmake_minimum_required(VERSION 2.8.8) -# FIXME: Below we assume that the target build of LLVM/Clang is x86, which is -# not at all valid. Much of this can be fixed just by switching to use -# a just-built-clang binary for the compiles. +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" + ) +include(AddCompilerRT) + +set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # Detect whether the current target platform is 32-bit or 64-bit, and setup # the correct commandline flags needed to attempt to target 32-bit and 64-bit. -if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(TARGET_X86_64_CFLAGS "-m64") - set(TARGET_I386_CFLAGS "") +if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR LLVM_BUILD_32_BITS) + set(TARGET_64_BIT_CFLAGS "-m64") + set(TARGET_32_BIT_CFLAGS "") else() if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) message(FATAL_ERROR "Please use a sane architecture with 4 or 8 byte pointers.") endif() - set(TARGET_X86_64_CFLAGS "") - set(TARGET_I386_CFLAGS "-m32") + set(TARGET_64_BIT_CFLAGS "") + set(TARGET_32_BIT_CFLAGS "-m32") endif() +# FIXME: Below we assume that the target build of LLVM/Clang is x86, which is +# not at all valid. Much of this can be fixed just by switching to use +# a just-built-clang binary for the compiles. + +set(TARGET_x86_64_CFLAGS ${TARGET_64_BIT_CFLAGS}) +set(TARGET_i386_CFLAGS ${TARGET_32_BIT_CFLAGS}) + +set(COMPILER_RT_SUPPORTED_ARCH + x86_64 i386) + +function(get_target_flags_for_arch arch out_var) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(ARCH_INDEX EQUAL -1) + message(FATAL_ERROR "Unsupported architecture: ${arch}") + else() + set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) + endif() +endfunction() + # Try to compile a very simple source file to ensure we can target the given # platform. We use the results of these tests to build only the various target # runtime libraries supported by our current compilers cross-compiling # abilities. set(SIMPLE_SOURCE64 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple64.c) file(WRITE ${SIMPLE_SOURCE64} "#include \nint main() {}") -try_compile(CAN_TARGET_X86_64 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE64} - COMPILE_DEFINITIONS "${TARGET_X86_64_CFLAGS}" - CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_X86_64_CFLAGS}") +try_compile(CAN_TARGET_x86_64 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE64} + COMPILE_DEFINITIONS "${TARGET_x86_64_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_x86_64_CFLAGS}") set(SIMPLE_SOURCE32 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple32.c) file(WRITE ${SIMPLE_SOURCE32} "#include \nint main() {}") -try_compile(CAN_TARGET_I386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32} - COMPILE_DEFINITIONS "${TARGET_I386_CFLAGS}" - CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_I386_CFLAGS}") - -# Because compiler-rt spends a lot of time setting up custom compile flags, -# define a handy helper function for it. The compile flags setting in CMake -# has serious issues that make its syntax challenging at best. -function(set_target_compile_flags target) - foreach(arg ${ARGN}) - set(argstring "${argstring} ${arg}") +try_compile(CAN_TARGET_i386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32} + COMPILE_DEFINITIONS "${TARGET_i386_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_i386_CFLAGS}") + +# We only support running instrumented tests when we're not cross compiling +# and target a unix-like system. On Android we define the rules for building +# unit tests, but don't execute them. +if("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND UNIX AND NOT ANDROID) + set(COMPILER_RT_CAN_EXECUTE_TESTS TRUE) +else() + set(COMPILER_RT_CAN_EXECUTE_TESTS FALSE) +endif() + +function(filter_available_targets out_var) + set(archs) + foreach(arch ${ARGN}) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(NOT (ARCH_INDEX EQUAL -1) AND CAN_TARGET_${arch}) + list(APPEND archs ${arch}) + endif() endforeach() - set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") + set(${out_var} ${archs} PARENT_SCOPE) endfunction() +# Provide some common commmandline flags for Sanitizer runtimes. +set(SANITIZER_COMMON_CFLAGS + -fPIC + -fno-builtin + -fno-exceptions + -fomit-frame-pointer + -funwind-tables + -O3 + ) +if(NOT WIN32) + list(APPEND SANITIZER_COMMON_CFLAGS -fvisibility=hidden) +endif() +# Build sanitizer runtimes with debug info. +check_cxx_compiler_flag(-gline-tables-only SUPPORTS_GLINE_TABLES_ONLY_FLAG) +if(SUPPORTS_GLINE_TABLES_ONLY_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) +else() + list(APPEND SANITIZER_COMMON_CFLAGS -g) +endif() +# Warnings suppressions. +check_cxx_compiler_flag(-Wno-variadic-macros SUPPORTS_NO_VARIADIC_MACROS_FLAG) +if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-variadic-macros) +endif() +check_cxx_compiler_flag(-Wno-c99-extensions SUPPORTS_NO_C99_EXTENSIONS_FLAG) +if(SUPPORTS_NO_C99_EXTENSIONS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-c99-extensions) +endif() +if(APPLE) + list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5) +endif() + +# Architectures supported by Sanitizer runtimes. Specific sanitizers may +# support only subset of these (e.g. TSan works on x86_64 only). +filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH + x86_64 i386) + +# Compute the Clang version from the LLVM version. +# FIXME: We should be able to reuse CLANG_VERSION variable calculated +# in Clang cmake files, instead of copying the rules here. +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION + ${PACKAGE_VERSION}) +# Setup the paths where compiler-rt runtimes and headers should be stored. +set(LIBCLANG_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) +string(TOLOWER ${CMAKE_SYSTEM_NAME} LIBCLANG_OS_DIR) + +# Install compiler-rt headers. +install(DIRECTORY include/ + DESTINATION ${LIBCLANG_INSTALL_PATH}/include + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + ) + +# Call add_clang_compiler_rt_libraries to make sure that targets are built +# and installed in the directories where Clang driver expects to find them. +macro(add_clang_compiler_rt_libraries) + # Setup output directories so that clang in build tree works. + set_target_properties(${ARGN} PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + LIBRARY_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + ) + # Add installation command. + install(TARGETS ${ARGN} + ARCHIVE DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + LIBRARY DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + ) +endmacro(add_clang_compiler_rt_libraries) + +# Add the public header's directory to the includes for all of compiler-rt. +include_directories(include) + add_subdirectory(lib) if(LLVM_INCLUDE_TESTS) Modified: vendor/compiler-rt/dist/LICENSE.TXT ============================================================================== --- vendor/compiler-rt/dist/LICENSE.TXT Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/LICENSE.TXT Fri Jan 18 20:06:45 2013 (r245614) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: vendor/compiler-rt/dist/Makefile ============================================================================== --- vendor/compiler-rt/dist/Makefile Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/Makefile Fri Jan 18 20:06:45 2013 (r245614) @@ -92,7 +92,7 @@ test: %/.dir: $(Summary) " MKDIR: $*" $(Verb) $(MKDIR) $* > /dev/null - $(Verb) $(DATE) > $@ + $(Verb) echo 'Created.' > $@ # Remove directories %/.remove: @@ -117,7 +117,7 @@ $(call Set,Tmp.Configs,$($(Tmp.Key).Conf $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)) # Top-Level Platform Target -$(Tmp.Name):: $(Tmp.Configs:%=$(Tmp.ObjPath)/%/libcompiler_rt.a) +$(Tmp.Name):: $(Tmp.Configs:%=$(Tmp.Name)-%) .PHONY: $(Tmp.Name) clean:: @@ -131,6 +131,15 @@ endef define PerPlatformConfig_template $(call Set,Tmp.Config,$(1)) $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY_SUFFIX,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY_SUFFIX,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) # Compute the archs to build, depending on whether this is a universal build or # not. @@ -142,8 +151,8 @@ $(call Set,Tmp.ArchsToBuild,\ $(call VarOrDefault,$(Tmp.Key).Arch.$(Tmp.Config),$($(Tmp.Key).Arch)))) # Copy or lipo to create the per-config library. -$(call Set,Tmp.Inputs,$(Tmp.ArchsToBuild:%=$(Tmp.ObjPath)/%/libcompiler_rt.a)) -$(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir +$(call Set,Tmp.Inputs,$(Tmp.ArchsToBuild:%=$(Tmp.ObjPath)/%/libcompiler_rt.$(Tmp.LibrarySuffix))) +$(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix): $(Tmp.Inputs) $(Tmp.ObjPath)/.dir $(Summary) " FINAL-ARCHIVE: $(Tmp.Name)/$(Tmp.Config): $$@" -$(Verb) $(RM) $$@ $(if $(call streq,1,$(words $(Tmp.ArchsToBuild))), \ @@ -152,7 +161,7 @@ $(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.I .PRECIOUS: $(Tmp.ObjPath)/.dir # Per-Config Targets -$(Tmp.Name)-$(Tmp.Config):: $(Tmp.ObjPath)/libcompiler_rt.a +$(Tmp.Name)-$(Tmp.Config):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) .PHONY: $(Tmp.Name)-$(Tmp.Config) # Per-Config-Arch Libraries @@ -172,10 +181,21 @@ $(call Set,Tmp.AR,$(strip \ $(call GetCNAVar,AR,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.ARFLAGS,$(strip \ $(call GetCNAVar,ARFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.CC,$(strip \ + $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.LDFLAGS,$(strip \ + $(call GetCNAVar,LDFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.RANLIB,$(strip \ $(call GetCNAVar,RANLIB,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.RANLIBFLAGS,$(strip \ $(call GetCNAVar,RANLIBFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) # Compute the object inputs for this library. $(call Set,Tmp.Inputs,\ @@ -188,10 +208,18 @@ $(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.I -$(Verb) $(RM) $$@ $(Verb) $(Tmp.AR) $(Tmp.ARFLAGS) $$@ $(Tmp.Inputs) $(Verb) $(Tmp.RANLIB) $(Tmp.RANLIBFLAGS) $$@ +$(Tmp.ObjPath)/libcompiler_rt.dylib: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " DYLIB: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -arch $(Tmp.Arch) -dynamiclib -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) +$(Tmp.ObjPath)/libcompiler_rt.so: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " SO: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -shared -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) .PRECIOUS: $(Tmp.ObjPath)/.dir # Per-Config-Arch Targets -$(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch):: $(Tmp.ObjPath)/libcompiler_rt.a +$(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) .PHONY: $(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch) # Per-Config-Arch-SubDir Objects Modified: vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h ============================================================================== --- vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h Fri Jan 18 20:06:45 2013 (r245614) @@ -17,6 +17,10 @@ #ifndef __STDIO_H__ #define __STDIO_H__ +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct __sFILE FILE; typedef __SIZE_TYPE__ size_t; @@ -51,11 +55,30 @@ typedef __SIZE_TYPE__ size_t; # define stderr __stderrp extern FILE *__stderrp; +#ifndef SEEK_SET +#define SEEK_SET 0 /* set file offset to offset */ +#endif +#ifndef SEEK_CUR +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#endif +#ifndef SEEK_END +#define SEEK_END 2 /* set file offset to EOF plus offset */ +#endif + int fclose(FILE *); int fflush(FILE *); -FILE *fopen(const char * restrict, const char * restrict) __asm(__FOPEN_NAME); -int fprintf(FILE * restrict, const char * restrict, ...); -size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict) +FILE *fopen(const char * __restrict, const char * __restrict) __asm(__FOPEN_NAME); +int fprintf(FILE * __restrict, const char * __restrict, ...); +size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) __asm(__FWRITE_NAME); +size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); +long ftell(FILE *); +int fseek(FILE *, long, int); + +int snprintf(char * __restrict, size_t, const char * __restrict, ...); + +#if defined(__cplusplus) +} +#endif #endif /* __STDIO_H__ */ Modified: vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h ============================================================================== --- vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h Fri Jan 18 20:06:45 2013 (r245614) @@ -26,10 +26,17 @@ extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; +#define SEEK_SET 0 /* set file offset to offset */ +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#define SEEK_END 2 /* set file offset to EOF plus offset */ + extern int fclose(FILE *); extern int fflush(FILE *); extern FILE *fopen(const char * restrict, const char * restrict); extern int fprintf(FILE * restrict, const char * restrict, ...); extern size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict); +extern size_t fread(void * restrict, size_t, size_t, FILE * restrict); +extern long ftell(FILE *); +extern int fseek(FILE *, long, int); #endif /* __STDIO_H__ */ Added: vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,49 @@ +include(AddLLVM) +include(LLVMParseArguments) +include(CompilerRTUtils) + +# Tries to add "object library" target for a given architecture +# with name "." if architecture can be targeted. +# add_compiler_rt_object_library( +# SOURCES +# CFLAGS ) +macro(add_compiler_rt_object_library name arch) + if(CAN_TARGET_${arch}) + parse_arguments(LIB "SOURCES;CFLAGS" "" ${ARGN}) + add_library(${name}.${arch} OBJECT ${LIB_SOURCES}) + set_target_compile_flags(${name}.${arch} + ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) + else() + message(FATAL_ERROR "Archtecture ${arch} can't be targeted") + endif() +endmacro() + +# Unittests support. +set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest) +set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/gtest-all.cc) +set(COMPILER_RT_GTEST_INCLUDE_CFLAGS + -DGTEST_NO_LLVM_RAW_OSTREAM=1 + -I${COMPILER_RT_GTEST_PATH}/include +) + +# Use Clang to link objects into a single executable with just-built +# Clang, using specific link flags. Make executable a part of provided +# test_suite. +# add_compiler_rt_test( +# OBJECTS +# DEPS +# LINK_FLAGS ) +macro(add_compiler_rt_test test_suite test_name) + parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) + get_unittest_directory(OUTPUT_DIR) + file(MAKE_DIRECTORY ${OUTPUT_DIR}) + set(output_bin "${OUTPUT_DIR}/${test_name}") + add_custom_command( + OUTPUT ${output_bin} + COMMAND clang ${TEST_OBJECTS} -o "${output_bin}" + ${TEST_LINK_FLAGS} + DEPENDS clang ${TEST_DEPS}) + add_custom_target(${test_name} DEPENDS ${output_bin}) + # Make the test suite depend on the binary. + add_dependencies(${test_suite} ${test_name}) +endmacro() Added: vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,16 @@ +include(LLVMParseArguments) + +# Compile a source into an object file with just-built Clang using +# a provided compile flags and dependenices. +# clang_compile( +# CFLAGS +# DEPS ) +macro(clang_compile object_file source) + parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN}) + get_filename_component(source_rpath ${source} REALPATH) + add_custom_command( + OUTPUT ${object_file} + COMMAND clang ${SOURCE_CFLAGS} -c -o "${object_file}" ${source_rpath} + MAIN_DEPENDENCY ${source} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Added: vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,14 @@ +include(LLVMParseArguments) + +# Link a shared library with just-built Clang. +# clang_link_shared( +# OBJECTS +# LINKFLAGS +# DEPS ) +macro(clang_link_shared so_file) + parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN}) + add_custom_command( + OUTPUT ${so_file} + COMMAND clang -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Added: vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,17 @@ +# Because compiler-rt spends a lot of time setting up custom compile flags, +# define a handy helper function for it. The compile flags setting in CMake +# has serious issues that make its syntax challenging at best. +function(set_target_compile_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") +endfunction() + +function(set_target_link_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") +endfunction() + Added: vendor/compiler-rt/dist/include/sanitizer/asan_interface.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/asan_interface.h Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,212 @@ +//===-- sanitizer/asan_interface.h ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of AddressSanitizer, an address sanity checker. +// +// This header can be included by the instrumented program to fetch +// data (mostly allocator statistics) from ASan runtime library. +//===----------------------------------------------------------------------===// +#ifndef SANITIZER_ASAN_INTERFACE_H +#define SANITIZER_ASAN_INTERFACE_H + +#include + +// ----------- ATTENTION ------------- +// This header should NOT include any other headers from ASan runtime. +// All functions in this header are extern "C" and start with __asan_. + +using __sanitizer::uptr; + +extern "C" { + // This function should be called at the very beginning of the process, + // before any instrumented code is executed and before any call to malloc. + void __asan_init() SANITIZER_INTERFACE_ATTRIBUTE; + + // This structure describes an instrumented global variable. + struct __asan_global { + uptr beg; // The address of the global. + uptr size; // The original size of the global. + uptr size_with_redzone; // The size with the redzone. + const char *name; // Name as a C string. + uptr has_dynamic_init; // Non-zero if the global has dynamic initializer. + }; + + // These two functions should be called by the instrumented code. + // 'globals' is an array of structures describing 'n' globals. + void __asan_register_globals(__asan_global *globals, uptr n) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_unregister_globals(__asan_global *globals, uptr n) + SANITIZER_INTERFACE_ATTRIBUTE; + + // These two functions should be called before and after dynamic initializers + // run, respectively. They should be called with parameters describing all + // dynamically initialized globals defined in the calling TU. + void __asan_before_dynamic_init(uptr first_addr, uptr last_addr) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_after_dynamic_init() + SANITIZER_INTERFACE_ATTRIBUTE; + + // These two functions are used by the instrumented code in the + // use-after-return mode. __asan_stack_malloc allocates size bytes of + // fake stack and __asan_stack_free poisons it. real_stack is a pointer to + // the real stack region. + uptr __asan_stack_malloc(uptr size, uptr real_stack) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_stack_free(uptr ptr, uptr size, uptr real_stack) + SANITIZER_INTERFACE_ATTRIBUTE; + + // These two functions are used by instrumented code in the + // use-after-scope mode. They mark memory for local variables as + // unaddressable when they leave scope and addressable before the + // function exits. + void __asan_poison_stack_memory(uptr addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_unpoison_stack_memory(uptr addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Marks memory region [addr, addr+size) as unaddressable. + // This memory must be previously allocated by the user program. Accessing + // addresses in this region from instrumented code is forbidden until + // this region is unpoisoned. This function is not guaranteed to poison + // the whole region - it may poison only subregion of [addr, addr+size) due + // to ASan alignment restrictions. + // Method is NOT thread-safe in the sense that no two threads can + // (un)poison memory in the same memory region simultaneously. + void __asan_poison_memory_region(void const volatile *addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + // Marks memory region [addr, addr+size) as addressable. + // This memory must be previously allocated by the user program. Accessing + // addresses in this region is allowed until this region is poisoned again. + // This function may unpoison a superregion of [addr, addr+size) due to + // ASan alignment restrictions. + // Method is NOT thread-safe in the sense that no two threads can + // (un)poison memory in the same memory region simultaneously. + void __asan_unpoison_memory_region(void const volatile *addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Performs cleanup before a NoReturn function. Must be called before things + // like _exit and execl to avoid false positives on stack. + void __asan_handle_no_return() SANITIZER_INTERFACE_ATTRIBUTE; + +// User code should use macro instead of functions. +#if __has_feature(address_sanitizer) +#define ASAN_POISON_MEMORY_REGION(addr, size) \ + __asan_poison_memory_region((addr), (size)) +#define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ + __asan_unpoison_memory_region((addr), (size)) +#else +#define ASAN_POISON_MEMORY_REGION(addr, size) \ + ((void)(addr), (void)(size)) +#define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ + ((void)(addr), (void)(size)) +#endif + + // Returns true iff addr is poisoned (i.e. 1-byte read/write access to this + // address will result in error report from AddressSanitizer). + bool __asan_address_is_poisoned(void const volatile *addr) + SANITIZER_INTERFACE_ATTRIBUTE; + + // If at least on byte in [beg, beg+size) is poisoned, return the address + // of the first such byte. Otherwise return 0. + uptr __asan_region_is_poisoned(uptr beg, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Print the description of addr (useful when debugging in gdb). + void __asan_describe_address(uptr addr) + SANITIZER_INTERFACE_ATTRIBUTE; + + // This is an internal function that is called to report an error. + // However it is still a part of the interface because users may want to + // set a breakpoint on this function in a debugger. + void __asan_report_error(uptr pc, uptr bp, uptr sp, + uptr addr, bool is_write, uptr access_size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Sets the exit code to use when reporting an error. + // Returns the old value. + int __asan_set_error_exit_code(int exit_code) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Sets the callback to be called right before death on error. + // Passing 0 will unset the callback. + void __asan_set_death_callback(void (*callback)(void)) + SANITIZER_INTERFACE_ATTRIBUTE; + + void __asan_set_error_report_callback(void (*callback)(const char*)) + SANITIZER_INTERFACE_ATTRIBUTE; + + // User may provide function that would be called right when ASan detects + // an error. This can be used to notice cases when ASan detects an error, but + // the program crashes before ASan report is printed. + /* OPTIONAL */ void __asan_on_error() + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + + // User may provide its own implementation for symbolization function. + // It should print the description of instruction at address "pc" to + // "out_buffer". Description should be at most "out_size" bytes long. + // User-specified function should return true if symbolization was + // successful. + /* OPTIONAL */ bool __asan_symbolize(const void *pc, char *out_buffer, + int out_size) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + + // Returns the estimated number of bytes that will be reserved by allocator + // for request of "size" bytes. If ASan allocator can't allocate that much + // memory, returns the maximal possible allocation size, otherwise returns + // "size". + uptr __asan_get_estimated_allocated_size(uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + // Returns true if p was returned by the ASan allocator and + // is not yet freed. + bool __asan_get_ownership(const void *p) + SANITIZER_INTERFACE_ATTRIBUTE; + // Returns the number of bytes reserved for the pointer p. + // Requires (get_ownership(p) == true) or (p == 0). + uptr __asan_get_allocated_size(const void *p) + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes, allocated and not yet freed by the application. + uptr __asan_get_current_allocated_bytes() + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes, mmaped by asan allocator to fulfill allocation requests. + // Generally, for request of X bytes, allocator can reserve and add to free + // lists a large number of chunks of size X to use them for future requests. + // All these chunks count toward the heap size. Currently, allocator never + // releases memory to OS (instead, it just puts freed chunks to free lists). + uptr __asan_get_heap_size() + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes, mmaped by asan allocator, which can be used to fulfill + // allocation requests. When a user program frees memory chunk, it can first + // fall into quarantine and will count toward __asan_get_free_bytes() later. + uptr __asan_get_free_bytes() + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes in unmapped pages, that are released to OS. Currently, + // always returns 0. + uptr __asan_get_unmapped_bytes() + SANITIZER_INTERFACE_ATTRIBUTE; + // Prints accumulated stats to stderr. Used for debugging. + void __asan_print_accumulated_stats() + SANITIZER_INTERFACE_ATTRIBUTE; + + // This function may be optionally provided by user and should return + // a string containing ASan runtime options. See asan_flags.h for details. + /* OPTIONAL */ const char* __asan_default_options() + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + + // Malloc hooks that may be optionally provided by user. + // __asan_malloc_hook(ptr, size) is called immediately after + // allocation of "size" bytes, which returned "ptr". + // __asan_free_hook(ptr) is called immediately before + // deallocation of "ptr". + /* OPTIONAL */ void __asan_malloc_hook(void *ptr, uptr size) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + /* OPTIONAL */ void __asan_free_hook(void *ptr) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; +} // extern "C" + +#endif // SANITIZER_ASAN_INTERFACE_H Added: vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,92 @@ +//===-- sanitizer/common_interface_defs.h -----------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is shared between AddressSanitizer and ThreadSanitizer. +// It contains basic macro and types. +// NOTE: This file may be included into user code. +//===----------------------------------------------------------------------===// + +#ifndef SANITIZER_COMMON_INTERFACE_DEFS_H +#define SANITIZER_COMMON_INTERFACE_DEFS_H + +// ----------- ATTENTION ------------- +// This header should NOT include any other headers to avoid portability issues. + +#if defined(_WIN32) +// FIXME find out what we need on Windows. __declspec(dllexport) ? +# define SANITIZER_INTERFACE_ATTRIBUTE +# define SANITIZER_WEAK_ATTRIBUTE +#elif defined(SANITIZER_GO) +# define SANITIZER_INTERFACE_ATTRIBUTE +# define SANITIZER_WEAK_ATTRIBUTE +#else +# define SANITIZER_INTERFACE_ATTRIBUTE __attribute__((visibility("default"))) +# define SANITIZER_WEAK_ATTRIBUTE __attribute__((weak)) +#endif + +#ifdef __linux__ +# define SANITIZER_SUPPORTS_WEAK_HOOKS 1 +#else +# define SANITIZER_SUPPORTS_WEAK_HOOKS 0 +#endif + +// __has_feature +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif + +// For portability reasons we do not include stddef.h, stdint.h or any other +// system header, but we do need some basic types that are not defined +// in a portable way by the language itself. +namespace __sanitizer { + +#if defined(_WIN64) +// 64-bit Windows uses LLP64 data model. +typedef unsigned long long uptr; // NOLINT +typedef signed long long sptr; // NOLINT +#else +typedef unsigned long uptr; // NOLINT +typedef signed long sptr; // NOLINT +#endif // defined(_WIN64) +#if defined(__x86_64__) +// Since x32 uses ILP32 data model in 64-bit hardware mode, we must use +// 64-bit pointer to unwind stack frame. +typedef unsigned long long uhwptr; // NOLINT +#else +typedef uptr uhwptr; // NOLINT +#endif +typedef unsigned char u8; +typedef unsigned short u16; // NOLINT +typedef unsigned int u32; +typedef unsigned long long u64; // NOLINT +typedef signed char s8; +typedef signed short s16; // NOLINT +typedef signed int s32; +typedef signed long long s64; // NOLINT + +} // namespace __sanitizer + +extern "C" { + // Tell the tools to write their reports to "path." instead of stderr. + void __sanitizer_set_report_path(const char *path) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Tell the tools to write their reports to given file descriptor instead of + // stderr. + void __sanitizer_set_report_fd(int fd) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Notify the tools that the sandbox is going to be turned on. The reserved + // parameter will be used in the future to hold a structure with functions + // that the tools may call to bypass the sandbox. + void __sanitizer_sandbox_on_notify(void *reserved) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; +} // extern "C" + +#endif // SANITIZER_COMMON_INTERFACE_DEFS_H Added: vendor/compiler-rt/dist/include/sanitizer/msan_interface.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/msan_interface.h Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,124 @@ +//===-- msan_interface.h --------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of MemorySanitizer. +// +// Public interface header. +//===----------------------------------------------------------------------===// +#ifndef MSAN_INTERFACE_H +#define MSAN_INTERFACE_H + +#include + +using __sanitizer::uptr; +using __sanitizer::sptr; +using __sanitizer::u32; + +#ifdef __cplusplus +extern "C" { +#endif + +// FIXME: document all interface functions. + +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_get_track_origins(); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_init(); + +// Print a warning and maybe return. +// This function can die based on flags()->exit_code. +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_warning(); + +// Print a warning and die. +// Intrumentation inserts calls to this function when building in "fast" mode +// (i.e. -mllvm -msan-keep-going) +SANITIZER_INTERFACE_ATTRIBUTE __attribute__((noreturn)) +void __msan_warning_noreturn(); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_unpoison(void *a, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_clear_and_unpoison(void *a, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void* __msan_memcpy(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void* __msan_memset(void *s, int c, uptr n); +SANITIZER_INTERFACE_ATTRIBUTE +void* __msan_memmove(void* dest, const void* src, uptr n); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_copy_poison(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_copy_origin(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_move_poison(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_poison(void *a, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_poison_stack(void *a, uptr size); + +// Copy size bytes from src to dst and unpoison the result. +// Useful to implement unsafe loads. +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_load_unpoisoned(void *src, uptr size, void *dst); + +// Returns the offset of the first (at least partially) poisoned byte, +// or -1 if the whole range is good. +SANITIZER_INTERFACE_ATTRIBUTE +sptr __msan_test_shadow(const void *x, uptr size); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_origin(void *a, uptr size, u32 origin); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_alloca_origin(void *a, uptr size, const char *descr); +SANITIZER_INTERFACE_ATTRIBUTE +u32 __msan_get_origin(void *a); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_clear_on_return(); + +// Default: -1 (don't exit on error). +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_exit_code(int exit_code); + +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_set_poison_in_malloc(int do_poison); + +// For testing. +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_expect_umr(int expect_umr); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_break_optimization(void *x); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_print_shadow(const void *x, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_print_param_shadow(); +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_has_dynamic_component(); + +// Returns x such that %fs:x is the first byte of __msan_retval_tls. +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_get_retval_tls_offset(); +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_get_param_tls_offset(); + +// For testing. +SANITIZER_INTERFACE_ATTRIBUTE +u32 __msan_get_origin_tls(); +SANITIZER_INTERFACE_ATTRIBUTE +const char *__msan_get_origin_descr_if_stack(u32 id); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_partial_poison(void* data, void* shadow, uptr size); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif Modified: vendor/compiler-rt/dist/lib/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/CMakeLists.txt Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/lib/CMakeLists.txt Fri Jan 18 20:06:45 2013 (r245614) @@ -1,34 +1,23 @@ -# Compute the Clang version from the LLVM version. -# FIXME: We should be able to reuse CLANG_VERSION variable calculated -# in Clang cmake files, instead of copying the rules here. -string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION - ${PACKAGE_VERSION}) - -# Call add_clang_runtime_static_library() to make -# sure that static is built in the directory -# where Clang driver expects to find it. -if (APPLE) - set(CLANG_RUNTIME_LIB_DIR - ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/darwin) -elseif (UNIX) - # Assume Linux. - set(CLANG_RUNTIME_LIB_DIR - ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/linux) -endif() -function(add_clang_runtime_static_library target_name) - set_target_properties(${target_name} PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY ${CLANG_RUNTIME_LIB_DIR}) -endfunction() - # First, add the subdirectories which contain feature-based runtime libraries # and several convenience helper libraries. -add_subdirectory(asan) -add_subdirectory(interception) -add_subdirectory(sanitizer_common) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux") + # AddressSanitizer is supported on Linux and Mac OS X. + # Windows support is work in progress. + add_subdirectory(asan) + add_subdirectory(interception) + add_subdirectory(sanitizer_common) + if(NOT ANDROID) + add_subdirectory(ubsan) + endif() +endif() +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID) + # ThreadSanitizer and MemorySanitizer are supported on Linux only. + add_subdirectory(tsan) + add_subdirectory(msan) +endif() # FIXME: Add support for the profile library. - # The top-level lib directory contains a large amount of C code which provides # generic implementations of the core runtime library along with optimized # architecture-specific code in various subdirectories. @@ -163,7 +152,7 @@ set(GENERIC_SOURCES umodti3.c ) -if(CAN_TARGET_X86_64) +if(CAN_TARGET_x86_64) add_library(clang_rt.x86_64 STATIC x86_64/floatdidf.c x86_64/floatdisf.c @@ -173,9 +162,10 @@ if(CAN_TARGET_X86_64) x86_64/floatundixf.S ${GENERIC_SOURCES} ) - set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_X86_64_CFLAGS}") + set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_x86_64_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.x86_64) endif() -if(CAN_TARGET_I386) +if(CAN_TARGET_i386) add_library(clang_rt.i386 STATIC i386/ashldi3.S i386/ashrdi3.S @@ -193,5 +183,6 @@ if(CAN_TARGET_I386) i386/umoddi3.S ${GENERIC_SOURCES} ) - set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_I386_CFLAGS}") + set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_i386_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.i386) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 20:08:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 866B6A08; Fri, 18 Jan 2013 20:08:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 756A633D; Fri, 18 Jan 2013 20:08:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IK8NWK025113; Fri, 18 Jan 2013 20:08:23 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IK8Lka025094; Fri, 18 Jan 2013 20:08:21 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301182008.r0IK8Lka025094@svn.freebsd.org> From: Andrew Turner Date: Fri, 18 Jan 2013 20:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245615 - in vendor/compiler-rt/compiler-rt-r172839: . SDKs/darwin/usr/include SDKs/linux/usr/include cmake/Modules include lib lib/arm lib/asan lib/asan/dynamic lib/asan/lit_tests lib/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 20:08:23 -0000 Author: andrew Date: Fri Jan 18 20:08:20 2013 New Revision: 245615 URL: http://svnweb.freebsd.org/changeset/base/245615 Log: Tag compiler-rt r172839 Added: vendor/compiler-rt/compiler-rt-r172839/ - copied from r245613, vendor/compiler-rt/dist/ vendor/compiler-rt/compiler-rt-r172839/.arcconfig - copied unchanged from r245614, vendor/compiler-rt/dist/.arcconfig vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/AddCompilerRT.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTCompile.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTLink.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTUtils.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake vendor/compiler-rt/compiler-rt-r172839/include/ - copied from r245614, vendor/compiler-rt/dist/include/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_allocator2.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_allocator2.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_fake_stack.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_fake_stack.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_intercepted_functions.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_intercepted_functions.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_report.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_report.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_report.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/dynamic/ - copied from r245614, vendor/compiler-rt/dist/lib/asan/dynamic/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/lit_tests/ - copied from r245614, vendor/compiler-rt/dist/lib/asan/lit_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test_main.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test_main.cc vendor/compiler-rt/compiler-rt-r172839/lib/lit.common.cfg - copied unchanged from r245614, vendor/compiler-rt/dist/lib/lit.common.cfg vendor/compiler-rt/compiler-rt-r172839/lib/lit.common.unit.cfg - copied unchanged from r245614, vendor/compiler-rt/dist/lib/lit.common.unit.cfg vendor/compiler-rt/compiler-rt-r172839/lib/msan/ - copied from r245614, vendor/compiler-rt/dist/lib/msan/ vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_allocator.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common_interceptors.inc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_lfstack.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_lfstack.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_platform_interceptors.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_quarantine.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_quarantine.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_report_decorator.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_report_decorator.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stackdepot.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stackdepot.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stacktrace.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stacktrace.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_itanium.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_itanium.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/scripts/ - copied from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/scripts/ vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/lit.cfg - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.cfg vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/lit.site.cfg.in - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.site.cfg.in vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_libc_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_libc_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_mutex_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_mutex_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_printf_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_printf_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_test_main.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_main.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_test_utils.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/standalone_malloc_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/standalone_malloc_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/check_cmake.sh - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/check_cmake.sh vendor/compiler-rt/compiler-rt-r172839/lib/tsan/lit_tests/ - copied from r245614, vendor/compiler-rt/dist/lib/tsan/lit_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_fd.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_fd.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_java.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_java.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutexset.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutexset.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform_windows.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_windows.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/tests/ - copied from r245614, vendor/compiler-rt/dist/lib/tsan/tests/ vendor/compiler-rt/compiler-rt-r172839/lib/ubsan/ - copied from r245614, vendor/compiler-rt/dist/lib/ubsan/ vendor/compiler-rt/compiler-rt-r172839/make/platform/clang_linux_test_input.c - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/clang_linux_test_input.c Replaced: vendor/compiler-rt/compiler-rt-r172839/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/LICENSE.TXT - copied unchanged from r245614, vendor/compiler-rt/dist/LICENSE.TXT vendor/compiler-rt/compiler-rt-r172839/Makefile - copied unchanged from r245614, vendor/compiler-rt/dist/Makefile vendor/compiler-rt/compiler-rt-r172839/SDKs/darwin/usr/include/stdio.h - copied unchanged from r245614, vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h vendor/compiler-rt/compiler-rt-r172839/SDKs/linux/usr/include/stdio.h - copied unchanged from r245614, vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h vendor/compiler-rt/compiler-rt-r172839/lib/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/arm/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/arm/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/arm/divsi3.S - copied unchanged from r245614, vendor/compiler-rt/dist/lib/arm/divsi3.S vendor/compiler-rt/compiler-rt-r172839/lib/arm/udivsi3.S - copied unchanged from r245614, vendor/compiler-rt/dist/lib/arm/udivsi3.S vendor/compiler-rt/compiler-rt-r172839/lib/asan/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/asan/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/asan/README.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/README.txt vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_allocator.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_allocator.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_flags.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_flags.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_globals.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_globals.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_interceptors.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_interceptors.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_interceptors.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_internal.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_internal.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_lock.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_lock.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_mac.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_mac.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_malloc_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_malloc_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_malloc_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_malloc_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_mapping.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_new_delete.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_poisoning.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_posix.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_posix.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_rtl.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stack.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stack.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stack.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stack.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stats.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stats.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stats.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stats.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread_registry.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread_registry.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread_registry.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread_registry.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/scripts/asan_symbolize.py - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_benchmarks_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_benchmarks_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_globals_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_globals_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_mac_test.mm - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_mac_test.mm vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_noinst_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test.ignore - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test.ignore vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test_config.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test_config.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test_utils.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h vendor/compiler-rt/compiler-rt-r172839/lib/cmpdi2.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/cmpdi2.c vendor/compiler-rt/compiler-rt-r172839/lib/fixsfdi.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/fixsfdi.c vendor/compiler-rt/compiler-rt-r172839/lib/int_endianness.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/int_endianness.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_linux.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_linux.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_mac.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_mac.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_win.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_win.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/mach_override/mach_override.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/mach_override/mach_override.c vendor/compiler-rt/compiler-rt-r172839/lib/profile/GCDAProfiling.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/profile/GCDAProfiling.c vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_allocator.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_atomic_clang.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_atomic_msvc.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_msvc.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_flags.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_internal_defs.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_libc.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_libc.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_list.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_list.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_mutex.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mutex.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_placement_new.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_placement_new.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_posix.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_printf.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_procmaps.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_common_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_common_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_flags_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_list_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_list_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/tsan/Makefile.old - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/Makefile.old vendor/compiler-rt/compiler-rt-r172839/lib/tsan/go/buildgo.sh - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/go/buildgo.sh vendor/compiler-rt/compiler-rt-r172839/lib/tsan/go/test.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/go/test.c vendor/compiler-rt/compiler-rt-r172839/lib/tsan/go/tsan_go.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/go/tsan_go.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/Makefile.old - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.old vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_clock.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_clock.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_defs.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_defs.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_flags.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_flags.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interceptors.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_ann.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_ann.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_atomic.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_atomic.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_inl.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_inl.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mman.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mman.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutex.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutex.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_report.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_report.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_amd64.S - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_amd64.S vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_mutex.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_mutex.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_report.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_report.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_thread.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_stat.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_stat.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_suppressions.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_suppressions.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_symbolize.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_symbolize.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_sync.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_sync.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_trace.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_trace.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_update_shadow_word_inl.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_update_shadow_word_inl.h vendor/compiler-rt/compiler-rt-r172839/lib/ucmpdi2.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/ucmpdi2.c vendor/compiler-rt/compiler-rt-r172839/make/AppleBI.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/AppleBI.mk vendor/compiler-rt/compiler-rt-r172839/make/config.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/config.mk vendor/compiler-rt/compiler-rt-r172839/make/lib_info.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/lib_info.mk vendor/compiler-rt/compiler-rt-r172839/make/options.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/options.mk vendor/compiler-rt/compiler-rt-r172839/make/platform/clang_darwin.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/clang_darwin.mk vendor/compiler-rt/compiler-rt-r172839/make/platform/clang_linux.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/clang_linux.mk vendor/compiler-rt/compiler-rt-r172839/make/platform/darwin_bni.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/compiler-rt-r172839/test/Unit/endianness.h - copied unchanged from r245614, vendor/compiler-rt/dist/test/Unit/endianness.h Deleted: vendor/compiler-rt/compiler-rt-r172839/lib/asan/Makefile.old vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_interface.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_printf.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/output_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_break_optimization.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_allocator64.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_interface_defs.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator64_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/output_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_printf.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/tsan/unit_tests/ Copied: vendor/compiler-rt/compiler-rt-r172839/.arcconfig (from r245614, vendor/compiler-rt/dist/.arcconfig) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/.arcconfig Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/.arcconfig) @@ -0,0 +1,4 @@ +{ + "project_id" : "compiler-rt", + "conduit_uri" : "http://llvm-reviews.chandlerc.com/" +} Copied: vendor/compiler-rt/compiler-rt-r172839/CMakeLists.txt (from r245614, vendor/compiler-rt/dist/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/CMakeLists.txt Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/CMakeLists.txt) @@ -0,0 +1,176 @@ +# CMake build for CompilerRT. +# +# This build assumes that CompilerRT is checked out into the +# 'projects/compiler-rt' inside of an LLVM tree, it is not a stand-alone build +# system. +# +# An important constraint of the build is that it only produces libraries +# based on the ability of the host toolchain to target various platforms. + +include(LLVMParseArguments) + +# The CompilerRT build system requires CMake version 2.8.8 or higher in order +# to use its support for building convenience "libraries" as a collection of +# .o files. This is particularly useful in producing larger, more complex +# runtime libraries. +cmake_minimum_required(VERSION 2.8.8) + +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" + ) +include(AddCompilerRT) + +set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +# Detect whether the current target platform is 32-bit or 64-bit, and setup +# the correct commandline flags needed to attempt to target 32-bit and 64-bit. +if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR LLVM_BUILD_32_BITS) + set(TARGET_64_BIT_CFLAGS "-m64") + set(TARGET_32_BIT_CFLAGS "") +else() + if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + message(FATAL_ERROR "Please use a sane architecture with 4 or 8 byte pointers.") + endif() + set(TARGET_64_BIT_CFLAGS "") + set(TARGET_32_BIT_CFLAGS "-m32") +endif() + +# FIXME: Below we assume that the target build of LLVM/Clang is x86, which is +# not at all valid. Much of this can be fixed just by switching to use +# a just-built-clang binary for the compiles. + +set(TARGET_x86_64_CFLAGS ${TARGET_64_BIT_CFLAGS}) +set(TARGET_i386_CFLAGS ${TARGET_32_BIT_CFLAGS}) + +set(COMPILER_RT_SUPPORTED_ARCH + x86_64 i386) + +function(get_target_flags_for_arch arch out_var) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(ARCH_INDEX EQUAL -1) + message(FATAL_ERROR "Unsupported architecture: ${arch}") + else() + set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) + endif() +endfunction() + +# Try to compile a very simple source file to ensure we can target the given +# platform. We use the results of these tests to build only the various target +# runtime libraries supported by our current compilers cross-compiling +# abilities. +set(SIMPLE_SOURCE64 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple64.c) +file(WRITE ${SIMPLE_SOURCE64} "#include \nint main() {}") +try_compile(CAN_TARGET_x86_64 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE64} + COMPILE_DEFINITIONS "${TARGET_x86_64_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_x86_64_CFLAGS}") + +set(SIMPLE_SOURCE32 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple32.c) +file(WRITE ${SIMPLE_SOURCE32} "#include \nint main() {}") +try_compile(CAN_TARGET_i386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32} + COMPILE_DEFINITIONS "${TARGET_i386_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_i386_CFLAGS}") + +# We only support running instrumented tests when we're not cross compiling +# and target a unix-like system. On Android we define the rules for building +# unit tests, but don't execute them. +if("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND UNIX AND NOT ANDROID) + set(COMPILER_RT_CAN_EXECUTE_TESTS TRUE) +else() + set(COMPILER_RT_CAN_EXECUTE_TESTS FALSE) +endif() + +function(filter_available_targets out_var) + set(archs) + foreach(arch ${ARGN}) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(NOT (ARCH_INDEX EQUAL -1) AND CAN_TARGET_${arch}) + list(APPEND archs ${arch}) + endif() + endforeach() + set(${out_var} ${archs} PARENT_SCOPE) +endfunction() + +# Provide some common commmandline flags for Sanitizer runtimes. +set(SANITIZER_COMMON_CFLAGS + -fPIC + -fno-builtin + -fno-exceptions + -fomit-frame-pointer + -funwind-tables + -O3 + ) +if(NOT WIN32) + list(APPEND SANITIZER_COMMON_CFLAGS -fvisibility=hidden) +endif() +# Build sanitizer runtimes with debug info. +check_cxx_compiler_flag(-gline-tables-only SUPPORTS_GLINE_TABLES_ONLY_FLAG) +if(SUPPORTS_GLINE_TABLES_ONLY_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) +else() + list(APPEND SANITIZER_COMMON_CFLAGS -g) +endif() +# Warnings suppressions. +check_cxx_compiler_flag(-Wno-variadic-macros SUPPORTS_NO_VARIADIC_MACROS_FLAG) +if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-variadic-macros) +endif() +check_cxx_compiler_flag(-Wno-c99-extensions SUPPORTS_NO_C99_EXTENSIONS_FLAG) +if(SUPPORTS_NO_C99_EXTENSIONS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-c99-extensions) +endif() +if(APPLE) + list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5) +endif() + +# Architectures supported by Sanitizer runtimes. Specific sanitizers may +# support only subset of these (e.g. TSan works on x86_64 only). +filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH + x86_64 i386) + +# Compute the Clang version from the LLVM version. +# FIXME: We should be able to reuse CLANG_VERSION variable calculated +# in Clang cmake files, instead of copying the rules here. +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION + ${PACKAGE_VERSION}) +# Setup the paths where compiler-rt runtimes and headers should be stored. +set(LIBCLANG_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) +string(TOLOWER ${CMAKE_SYSTEM_NAME} LIBCLANG_OS_DIR) + +# Install compiler-rt headers. +install(DIRECTORY include/ + DESTINATION ${LIBCLANG_INSTALL_PATH}/include + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + ) + +# Call add_clang_compiler_rt_libraries to make sure that targets are built +# and installed in the directories where Clang driver expects to find them. +macro(add_clang_compiler_rt_libraries) + # Setup output directories so that clang in build tree works. + set_target_properties(${ARGN} PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + LIBRARY_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + ) + # Add installation command. + install(TARGETS ${ARGN} + ARCHIVE DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + LIBRARY DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + ) +endmacro(add_clang_compiler_rt_libraries) + +# Add the public header's directory to the includes for all of compiler-rt. +include_directories(include) + +add_subdirectory(lib) + +if(LLVM_INCLUDE_TESTS) + # Currently the tests have not been ported to CMake, so disable this + # directory. + # + #add_subdirectory(test) +endif() Copied: vendor/compiler-rt/compiler-rt-r172839/LICENSE.TXT (from r245614, vendor/compiler-rt/dist/LICENSE.TXT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/LICENSE.TXT Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/LICENSE.TXT) @@ -0,0 +1,97 @@ +============================================================================== +compiler_rt License +============================================================================== + +The compiler_rt library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +mach_override lib/interception/mach_override Copied: vendor/compiler-rt/compiler-rt-r172839/Makefile (from r245614, vendor/compiler-rt/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/Makefile Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/Makefile) @@ -0,0 +1,275 @@ +SubDirs := lib + +# Set default rule before anything else. +all: help + +include make/config.mk +include make/util.mk +# If SRCROOT is defined, assume we are doing an Apple style build. We should be +# able to use RC_XBS for this but that is unused during "make installsrc". +ifdef SRCROOT + include make/AppleBI.mk +endif + +# Make sure we don't build with a missing ProjObjRoot. +ifeq ($(ProjObjRoot),) +$(error Refusing to build with empty ProjObjRoot variable) +endif + +############## + +### +# Rules + +### +# Top level targets + +# FIXME: Document the available subtargets. +help: + @echo "usage: make [{VARIABLE=VALUE}*] target" + @echo + @echo "User variables:" + @echo " VERBOSE=1: Use to show all commands [default=0]" + @echo + @echo "Available targets:" + @echo " : build the libraries for 'platform'" + @echo " clean: clean all configurations" + @echo " test: run unit tests" + @echo + @echo " info-platforms: list available platforms" + @echo " help-devel: print additional help for developers" + @echo + +help-devel: help + @echo "Development targets:" + @echo " -:" + @echo " build the libraries for a single platform config" + @echo " --:" + @echo " build the libraries for a single config and arch" + @echo " info-functions: list available compiler-rt functions" + @echo " help-hidden: print help for Makefile debugging" + @echo + +help-hidden: help-devel + @echo "Debugging variables:" + @echo " DEBUGMAKE=1: enable some Makefile logging [default=]" + @echo " =2: enable more Makefile logging" + @echo + @echo "Debugging targets:" + @echo " make-print-FOO: print information on the variable 'FOO'" + @echo + +info-functions: + @echo "compiler-rt Available Functions" + @echo + @echo "All Functions: $(AvailableFunctions)" + @$(foreach fn,$(AvailableFunctions),\ + printf " %-20s - available in (%s)\n" $(fn)\ + "$(foreach key,$(AvailableIn.$(fn)),$($(key).Dir))";) + +info-platforms: + @echo "compiler-rt Available Platforms" + @echo + @echo "Platforms:" + @$(foreach key,$(PlatformKeys),\ + printf " %s - from '%s'\n" $($(key).Name) $($(key).Path);\ + printf " %s\n" "$($(key).Description)";\ + printf " Configurations: %s\n\n" "$($(key).Configs)";) + +# Provide default clean target which is extended by other templates. +.PHONY: clean +clean:: + +# Test +.PHONY: test +test: + cd test/Unit && ./test + +### +# Directory handling magic. + +# Create directories as needed, and timestamp their creation. +%/.dir: + $(Summary) " MKDIR: $*" + $(Verb) $(MKDIR) $* > /dev/null + $(Verb) echo 'Created.' > $@ + +# Remove directories +%/.remove: + $(Verb) $(RM) -r $* + +### +# Include child makefile fragments + +Dir := . +include make/subdir.mk +include make/lib_info.mk +include make/lib_util.mk +include make/lib_platforms.mk + +### +# Define Platform Rules + +define PerPlatform_template +$(call Set,Tmp.Key,$(1)) +$(call Set,Tmp.Name,$($(Tmp.Key).Name)) +$(call Set,Tmp.Configs,$($(Tmp.Key).Configs)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)) + +# Top-Level Platform Target +$(Tmp.Name):: $(Tmp.Configs:%=$(Tmp.Name)-%) +.PHONY: $(Tmp.Name) + +clean:: + $(Verb) rm -rf $(Tmp.ObjPath) + +# Per-Config Libraries +$(foreach config,$(Tmp.Configs),\ + $(call PerPlatformConfig_template,$(config))) +endef + +define PerPlatformConfig_template +$(call Set,Tmp.Config,$(1)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY_SUFFIX,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY_SUFFIX,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) + +# Compute the archs to build, depending on whether this is a universal build or +# not. +$(call Set,Tmp.ArchsToBuild,\ + $(if $(call IsDefined,$(Tmp.Key).UniversalArchs),\ + $(strip \ + $(or $($(Tmp.Key).UniversalArchs.$(Tmp.Config)),\ + $($(Tmp.Key).UniversalArchs))),\ + $(call VarOrDefault,$(Tmp.Key).Arch.$(Tmp.Config),$($(Tmp.Key).Arch)))) + +# Copy or lipo to create the per-config library. +$(call Set,Tmp.Inputs,$(Tmp.ArchsToBuild:%=$(Tmp.ObjPath)/%/libcompiler_rt.$(Tmp.LibrarySuffix))) +$(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix): $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " FINAL-ARCHIVE: $(Tmp.Name)/$(Tmp.Config): $$@" + -$(Verb) $(RM) $$@ + $(if $(call streq,1,$(words $(Tmp.ArchsToBuild))), \ + $(Verb) $(CP) $(Tmp.Inputs) $$@, \ + $(Verb) $(LIPO) -create -output $$@ $(Tmp.Inputs)) +.PRECIOUS: $(Tmp.ObjPath)/.dir + +# Per-Config Targets +$(Tmp.Name)-$(Tmp.Config):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) +.PHONY: $(Tmp.Name)-$(Tmp.Config) + +# Per-Config-Arch Libraries +$(foreach arch,$(Tmp.ArchsToBuild),\ + $(call PerPlatformConfigArch_template,$(arch))) +endef + +define PerPlatformConfigArch_template +$(call Set,Tmp.Arch,$(1)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch)) +$(call Set,Tmp.Functions,$(strip \ + $(AlwaysRequiredModules) \ + $(call GetCNAVar,FUNCTIONS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.Optimized,$(strip \ + $(call GetCNAVar,OPTIMIZED,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.AR,$(strip \ + $(call GetCNAVar,AR,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.ARFLAGS,$(strip \ + $(call GetCNAVar,ARFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.CC,$(strip \ + $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.LDFLAGS,$(strip \ + $(call GetCNAVar,LDFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.RANLIB,$(strip \ + $(call GetCNAVar,RANLIB,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.RANLIBFLAGS,$(strip \ + $(call GetCNAVar,RANLIBFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) + +# Compute the object inputs for this library. +$(call Set,Tmp.Inputs,\ + $(foreach fn,$(sort $(Tmp.Functions)),\ + $(call Set,Tmp.FnDir,\ + $(call SelectFunctionDir,$(Tmp.Config),$(Tmp.Arch),$(fn),$(Tmp.Optimized)))\ + $(Tmp.ObjPath)/$(Tmp.FnDir)/$(fn).o)) +$(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " ARCHIVE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + -$(Verb) $(RM) $$@ + $(Verb) $(Tmp.AR) $(Tmp.ARFLAGS) $$@ $(Tmp.Inputs) + $(Verb) $(Tmp.RANLIB) $(Tmp.RANLIBFLAGS) $$@ +$(Tmp.ObjPath)/libcompiler_rt.dylib: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " DYLIB: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -arch $(Tmp.Arch) -dynamiclib -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) +$(Tmp.ObjPath)/libcompiler_rt.so: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " SO: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -shared -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) +.PRECIOUS: $(Tmp.ObjPath)/.dir + +# Per-Config-Arch Targets +$(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) +.PHONY: $(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch) + +# Per-Config-Arch-SubDir Objects +$(foreach key,$(SubDirKeys),\ + $(call PerPlatformConfigArchSubDir_template,$(key))) +endef + +define PerPlatformConfigArchSubDir_template +$(call Set,Tmp.SubDirKey,$(1)) +$(call Set,Tmp.SubDir,$($(Tmp.SubDirKey).Dir)) +$(call Set,Tmp.SrcPath,$(ProjSrcRoot)/$(Tmp.SubDir)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch)/$(Tmp.SubDirKey)) +$(call Set,Tmp.Dependencies,$($(Tmp.SubDirKey).Dependencies)) +$(call Set,Tmp.CC,$(strip \ + $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.KERNEL_USE,$(strip \ + $(call GetCNAVar,KERNEL_USE,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.VISIBILITY_HIDDEN,$(strip \ + $(call GetCNAVar,VISIBILITY_HIDDEN,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.CFLAGS,$(strip \ + $(if $(call IsDefined,$(Tmp.Key).UniversalArchs),-arch $(Tmp.Arch),)\ + $(if $(call streq,$(Tmp.VISIBILITY_HIDDEN),1),\ + -fvisibility=hidden -DVISIBILITY_HIDDEN,)\ + $(if $(call streq,$(Tmp.KERNEL_USE),1),\ + -mkernel -DKERNEL_USE,)\ + $(call GetCNAVar,CFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.s $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$< +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.S $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$< +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.c $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CFLAGS) -o $$@ $$< +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.cc $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CXXFLAGS) -o $$@ $$< +.PRECIOUS: $(Tmp.ObjPath)/.dir + +endef + +# Run templates. +$(foreach key,$(PlatformKeys),\ + $(eval $(call PerPlatform_template,$(key)))) + +### + +ifneq ($(DEBUGMAKE),) + $(info MAKE: Done processing Makefile) + $(info ) +endif Copied: vendor/compiler-rt/compiler-rt-r172839/SDKs/darwin/usr/include/stdio.h (from r245614, vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/SDKs/darwin/usr/include/stdio.h Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h) @@ -0,0 +1,84 @@ +/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDIO_H__ +#define __STDIO_H__ + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef struct __sFILE FILE; +typedef __SIZE_TYPE__ size_t; + +/* Determine the appropriate fopen() and fwrite() functions. */ +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) +# if defined(__i386) +# define __FOPEN_NAME "_fopen$UNIX2003" +# define __FWRITE_NAME "_fwrite$UNIX2003" +# elif defined(__x86_64__) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# elif defined(__arm) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# else +# error "unrecognized architecture for targetting OS X" +# endif +#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) +# if defined(__i386) || defined (__x86_64) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# elif defined(__arm) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# else +# error "unrecognized architecture for targetting iOS" +# endif +#else +# error "unrecognized architecture for targetting Darwin" +#endif + +# define stderr __stderrp +extern FILE *__stderrp; + +#ifndef SEEK_SET +#define SEEK_SET 0 /* set file offset to offset */ +#endif +#ifndef SEEK_CUR +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#endif +#ifndef SEEK_END +#define SEEK_END 2 /* set file offset to EOF plus offset */ +#endif + +int fclose(FILE *); +int fflush(FILE *); +FILE *fopen(const char * __restrict, const char * __restrict) __asm(__FOPEN_NAME); +int fprintf(FILE * __restrict, const char * __restrict, ...); +size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) + __asm(__FWRITE_NAME); +size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); +long ftell(FILE *); +int fseek(FILE *, long, int); + +int snprintf(char * __restrict, size_t, const char * __restrict, ...); + +#if defined(__cplusplus) +} +#endif + +#endif /* __STDIO_H__ */ Copied: vendor/compiler-rt/compiler-rt-r172839/SDKs/linux/usr/include/stdio.h (from r245614, vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/SDKs/linux/usr/include/stdio.h Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h) @@ -0,0 +1,42 @@ +/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDIO_H__ +#define __STDIO_H__ + +typedef __SIZE_TYPE__ size_t; + +struct _IO_FILE; +typedef struct _IO_FILE FILE; + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + +#define SEEK_SET 0 /* set file offset to offset */ +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#define SEEK_END 2 /* set file offset to EOF plus offset */ + +extern int fclose(FILE *); +extern int fflush(FILE *); +extern FILE *fopen(const char * restrict, const char * restrict); +extern int fprintf(FILE * restrict, const char * restrict, ...); +extern size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict); +extern size_t fread(void * restrict, size_t, size_t, FILE * restrict); +extern long ftell(FILE *); +extern int fseek(FILE *, long, int); + +#endif /* __STDIO_H__ */ Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/AddCompilerRT.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/AddCompilerRT.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake) @@ -0,0 +1,49 @@ +include(AddLLVM) +include(LLVMParseArguments) +include(CompilerRTUtils) + +# Tries to add "object library" target for a given architecture +# with name "." if architecture can be targeted. +# add_compiler_rt_object_library( +# SOURCES +# CFLAGS ) +macro(add_compiler_rt_object_library name arch) + if(CAN_TARGET_${arch}) + parse_arguments(LIB "SOURCES;CFLAGS" "" ${ARGN}) + add_library(${name}.${arch} OBJECT ${LIB_SOURCES}) + set_target_compile_flags(${name}.${arch} + ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) + else() + message(FATAL_ERROR "Archtecture ${arch} can't be targeted") + endif() +endmacro() + +# Unittests support. +set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest) +set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/gtest-all.cc) +set(COMPILER_RT_GTEST_INCLUDE_CFLAGS + -DGTEST_NO_LLVM_RAW_OSTREAM=1 + -I${COMPILER_RT_GTEST_PATH}/include +) + +# Use Clang to link objects into a single executable with just-built +# Clang, using specific link flags. Make executable a part of provided +# test_suite. +# add_compiler_rt_test( +# OBJECTS +# DEPS +# LINK_FLAGS ) +macro(add_compiler_rt_test test_suite test_name) + parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) + get_unittest_directory(OUTPUT_DIR) + file(MAKE_DIRECTORY ${OUTPUT_DIR}) + set(output_bin "${OUTPUT_DIR}/${test_name}") + add_custom_command( + OUTPUT ${output_bin} + COMMAND clang ${TEST_OBJECTS} -o "${output_bin}" + ${TEST_LINK_FLAGS} + DEPENDS clang ${TEST_DEPS}) + add_custom_target(${test_name} DEPENDS ${output_bin}) + # Make the test suite depend on the binary. + add_dependencies(${test_suite} ${test_name}) +endmacro() Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTCompile.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTCompile.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake) @@ -0,0 +1,16 @@ +include(LLVMParseArguments) + +# Compile a source into an object file with just-built Clang using +# a provided compile flags and dependenices. +# clang_compile( +# CFLAGS +# DEPS ) +macro(clang_compile object_file source) + parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN}) + get_filename_component(source_rpath ${source} REALPATH) + add_custom_command( + OUTPUT ${object_file} + COMMAND clang ${SOURCE_CFLAGS} -c -o "${object_file}" ${source_rpath} + MAIN_DEPENDENCY ${source} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTLink.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTLink.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake) @@ -0,0 +1,14 @@ +include(LLVMParseArguments) + +# Link a shared library with just-built Clang. +# clang_link_shared( +# OBJECTS +# LINKFLAGS +# DEPS ) +macro(clang_link_shared so_file) + parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN}) + add_custom_command( + OUTPUT ${so_file} + COMMAND clang -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTUtils.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTUtils.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake) @@ -0,0 +1,17 @@ +# Because compiler-rt spends a lot of time setting up custom compile flags, +# define a handy helper function for it. The compile flags setting in CMake +# has serious issues that make its syntax challenging at best. +function(set_target_compile_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") +endfunction() + +function(set_target_link_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") +endfunction() + Copied: vendor/compiler-rt/compiler-rt-r172839/lib/CMakeLists.txt (from r245614, vendor/compiler-rt/dist/lib/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/lib/CMakeLists.txt Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/lib/CMakeLists.txt) @@ -0,0 +1,188 @@ +# First, add the subdirectories which contain feature-based runtime libraries +# and several convenience helper libraries. +if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux") + # AddressSanitizer is supported on Linux and Mac OS X. + # Windows support is work in progress. + add_subdirectory(asan) + add_subdirectory(interception) + add_subdirectory(sanitizer_common) + if(NOT ANDROID) + add_subdirectory(ubsan) + endif() +endif() +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID) + # ThreadSanitizer and MemorySanitizer are supported on Linux only. + add_subdirectory(tsan) + add_subdirectory(msan) +endif() + +# FIXME: Add support for the profile library. + +# The top-level lib directory contains a large amount of C code which provides +# generic implementations of the core runtime library along with optimized +# architecture-specific code in various subdirectories. + +set(GENERIC_SOURCES + absvdi2.c + absvsi2.c + absvti2.c + adddf3.c + addsf3.c + addvdi3.c + addvsi3.c + addvti3.c + apple_versioning.c + ashldi3.c + ashlti3.c + ashrdi3.c + ashrti3.c + clear_cache.c + clzdi2.c + clzsi2.c + clzti2.c + cmpdi2.c + cmpti2.c + comparedf2.c + comparesf2.c + ctzdi2.c + ctzsi2.c + ctzti2.c + divdc3.c + divdf3.c + divdi3.c + divmoddi4.c + divmodsi4.c + divsc3.c + divsf3.c + divsi3.c + divti3.c + divxc3.c + enable_execute_stack.c + eprintf.c + extendsfdf2.c + ffsdi2.c + ffsti2.c + fixdfdi.c + fixdfsi.c + fixdfti.c + fixsfdi.c + fixsfsi.c + fixsfti.c + fixunsdfdi.c + fixunsdfsi.c + fixunsdfti.c + fixunssfdi.c + fixunssfsi.c + fixunssfti.c + fixunsxfdi.c + fixunsxfsi.c + fixunsxfti.c + fixxfdi.c + fixxfti.c + floatdidf.c + floatdisf.c + floatdixf.c + floatsidf.c + floatsisf.c + floattidf.c + floattisf.c + floattixf.c + floatundidf.c + floatundisf.c + floatundixf.c + floatunsidf.c + floatunsisf.c + floatuntidf.c + floatuntisf.c + floatuntixf.c + gcc_personality_v0.c + int_util.c + lshrdi3.c + lshrti3.c + moddi3.c + modsi3.c + modti3.c + muldc3.c + muldf3.c + muldi3.c + mulodi4.c + mulosi4.c + muloti4.c + mulsc3.c + mulsf3.c + multi3.c + mulvdi3.c + mulvsi3.c + mulvti3.c + mulxc3.c + negdf2.c + negdi2.c + negsf2.c + negti2.c + negvdi2.c + negvsi2.c + negvti2.c + paritydi2.c + paritysi2.c + parityti2.c + popcountdi2.c + popcountsi2.c + popcountti2.c + powidf2.c + powisf2.c + powitf2.c + powixf2.c + subdf3.c + subsf3.c + subvdi3.c + subvsi3.c + subvti3.c + trampoline_setup.c + truncdfsf2.c + ucmpdi2.c + ucmpti2.c + udivdi3.c + udivmoddi4.c + udivmodsi4.c + udivmodti4.c + udivsi3.c + udivti3.c + umoddi3.c + umodsi3.c + umodti3.c + ) + +if(CAN_TARGET_x86_64) + add_library(clang_rt.x86_64 STATIC + x86_64/floatdidf.c + x86_64/floatdisf.c + x86_64/floatdixf.c + x86_64/floatundidf.S + x86_64/floatundisf.S + x86_64/floatundixf.S + ${GENERIC_SOURCES} + ) + set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_x86_64_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.x86_64) +endif() +if(CAN_TARGET_i386) + add_library(clang_rt.i386 STATIC + i386/ashldi3.S + i386/ashrdi3.S + i386/divdi3.S + i386/floatdidf.S + i386/floatdisf.S + i386/floatdixf.S + i386/floatundidf.S + i386/floatundisf.S + i386/floatundixf.S + i386/lshrdi3.S + i386/moddi3.S + i386/muldi3.S + i386/udivdi3.S + i386/umoddi3.S + ${GENERIC_SOURCES} + ) + set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_i386_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.i386) +endif() Copied: vendor/compiler-rt/compiler-rt-r172839/lib/Makefile.mk (from r245614, vendor/compiler-rt/dist/lib/Makefile.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/lib/Makefile.mk Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/lib/Makefile.mk) @@ -0,0 +1,35 @@ +#===- lib/Makefile.mk --------------------------------------*- Makefile -*--===# +# *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 20:57:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 32820F29; Fri, 18 Jan 2013 20:57:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 248927AF; Fri, 18 Jan 2013 20:57:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IKvpD8039825; Fri, 18 Jan 2013 20:57:51 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IKvoHB039818; Fri, 18 Jan 2013 20:57:50 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301182057.r0IKvoHB039818@svn.freebsd.org> From: Brooks Davis Date: Fri, 18 Jan 2013 20:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245617 - in head: . usr.bin/xinstall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 20:57:51 -0000 Author: brooks Date: Fri Jan 18 20:57:50 2013 New Revision: 245617 URL: http://svnweb.freebsd.org/changeset/base/245617 Log: Introduce six new options from NetBSD: * -M Log metadata in mtree format. * -D Log paths relative to . * -h Log digest of type . * -T Specify which mtree tags to log. * -l Create hard or symbolic links (allows logging). * -U Install without root privileges (owner, group, mode, and flags can be logged via -M NOTE: In the interest of compatibility with NetBSD and because it is the obvious letter, the nearly useless -M option (disable mmap) has been repurposed. Sponsored by: DARPA, AFRL Obtained from: NetBSD Reviewed by: bz Modified: head/UPDATING head/usr.bin/xinstall/Makefile head/usr.bin/xinstall/install.1 head/usr.bin/xinstall/xinstall.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jan 18 20:30:15 2013 (r245616) +++ head/UPDATING Fri Jan 18 20:57:50 2013 (r245617) @@ -26,6 +26,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130118: + The install(1) option -M has changed meaning and now takes an + argument that is a file or path to append logs to. In the + unlikely event that -M was the last option on the command line + and the command line contained at least two files and a target + directory the first file will have logs appended to it. The -M + option served little practical purpose in the last decade so it's + used expected to be extremely rare. + 20121223: After switching to Clang as the default compiler some users of ZFS on i386 systems started to experience stack overflow kernel panics. Modified: head/usr.bin/xinstall/Makefile ============================================================================== --- head/usr.bin/xinstall/Makefile Fri Jan 18 20:30:15 2013 (r245616) +++ head/usr.bin/xinstall/Makefile Fri Jan 18 20:57:50 2013 (r245617) @@ -10,7 +10,7 @@ MAN= install.1 CFLAGS+= -I${.CURDIR}/../../contrib/mtree CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd -DPADD+= ${LIBUTIL} -LDADD+= -lutil +DPADD+= ${LIBUTIL} ${LIBMD} +LDADD+= -lutil -lmd .include Modified: head/usr.bin/xinstall/install.1 ============================================================================== --- head/usr.bin/xinstall/install.1 Fri Jan 18 20:30:15 2013 (r245616) +++ head/usr.bin/xinstall/install.1 Fri Jan 18 20:57:50 2013 (r245617) @@ -28,7 +28,7 @@ .\" From: @(#)install.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 6, 2006 +.Dd January 18, 2013 .Dt INSTALL 1 .Os .Sh NAME @@ -36,34 +36,50 @@ .Nd install binaries .Sh SYNOPSIS .Nm -.Op Fl bCcMpSsv +.Op Fl bCcMpSsUv .Op Fl B Ar suffix +.Op Fl D Ar destdir .Op Fl f Ar flags .Op Fl g Ar group +.Op Fl h Ar hash +.Op Fl l Ar linkflags +.Op Fl M Ar metalog .Op Fl m Ar mode .Op Fl N Ar dbdir .Op Fl o Ar owner +.Op Fl T Ar tags .Ar file1 file2 .Nm -.Op Fl bCcMpSsv +.Op Fl bCcMpSsUv .Op Fl B Ar suffix +.Op Fl D Ar destdir .Op Fl f Ar flags .Op Fl g Ar group +.Op Fl h Ar hash +.Op Fl l Ar linkflags +.Op Fl M Ar metalog .Op Fl m Ar mode .Op Fl N Ar dbdir .Op Fl o Ar owner +.Op Fl T Ar tags .Ar file1 ... fileN directory .Nm .Fl d -.Op Fl v +.Op Fl Uv +.Op Fl D Ar destdir .Op Fl g Ar group +.Op Fl h Ar hash +.Op Fl M Ar metalog .Op Fl m Ar mode .Op Fl N Ar dbdir .Op Fl o Ar owner +.Op Fl T Ar tags .Ar directory ... .Sh DESCRIPTION The file(s) are copied -to the target file or directory. +(or linked if the +.Fl l +option is specified) to the target file or directory. If the destination is a directory, then the .Ar file is copied into @@ -108,6 +124,17 @@ This is actually the default. The .Fl c option is only included for backwards compatibility. +.It Fl D Ar destdir +Specify the +.Ev DESTDIR +(top of the file hierarchy) that the items are installed in to. +If +.Fl M Ar metalog +is in use, a leading string of +.Dq Ar destdir +will be removed from the file names logged to the +.Ar metalog . +This option does not affect where the actual files are installed. .It Fl d Create directories. Missing parent directories are created as required. @@ -118,9 +145,67 @@ for a list of possible flags and their m .It Fl g Specify a group. A numeric GID is allowed. +.It Fl h Ar hash +When copying, calculate the digest of the files with +.Ar hash +to store in the +.Fl M Ar metalog . +When +.Fl d +is given no hash is emitted. +Supported digests: +.Bl -tag -width rmd160 -offset indent +.It Sy none +No hash. +This is the default. +.It Sy md5 +The MD5 cryptographic message digest. +.It Sy rmd160 +The RMD-160 cryptographic message digest. +.It Sy sha1 +The SHA-1 cryptographic message digest. +.It Sy sha256 +The 256-bits +.Tn SHA-2 +cryptographic message digest of the file. +.It Sy sha512 +The 512-bits +.Tn SHA-2 +cryptographic message digest of the file. +.El +.It Fl l Ar linkflags +Instead of copying the file make a link to the source. +The type of the link is determined by the +.Ar linkflags +argument. +Valid +.Ar linkflags +are: +.Ar a +(absolute), +.Ar r +(relative), +.Ar h +(hard), +.Ar s +(symbolic), +.Ar m +(mixed). +Absolute and relative have effect only for symbolic links. +Mixed links +are hard links for files on the same filesystem, symbolic otherwise. .It Fl M Disable all use of .Xr mmap 2 . +.It Fl M Ar metalog +Write the metadata associated with each item installed to +.Ar metalog +in an +.Xr mtree 8 +.Dq full path +specification line. +The metadata includes: the file name and file type, and depending upon +other options, the owner, group, file flags, modification time, and tags. .It Fl m Specify an alternate mode. The default mode is set to rwxr-xr-x (0755). @@ -171,6 +256,17 @@ number of systems and binary types. See below for how .Nm can be instructed to use another program to strip binaries. +.It Fl T Ar tags +Specify the +.Xr mtree 8 +tags to write out for the file when using +.Fl M Ar metalog . +.It Fl U +Indicate that install is running unprivileged, and that it should not +try to change the owner, the group, or the file flags of the destination. +The information that would have been updated can be stored in a log +file with +.Fl M Ar metalog . .It Fl v Cause .Nm @@ -255,6 +351,16 @@ The utility appeared in .Bx 4.2 . .Sh BUGS +The meaning of the +.Fl M +option has changed as of +.Fx 10 +and it now takes an argument. +Command lines that used the old +.Fl M +will get an error or in rare cases will append logs to the first of +multiple source files rather than installing it. +.Pp Temporary files may be left in the target directory if .Nm exits abnormally. Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Fri Jan 18 20:30:15 2013 (r245616) +++ head/usr.bin/xinstall/xinstall.c Fri Jan 18 20:57:50 2013 (r245617) @@ -1,4 +1,5 @@ /* + * Copyright (c) 2012, 2013 SRI International * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * @@ -53,14 +54,21 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include +#include +#include +#include +#include #include #include #include #include #include #include +#include #include "mtree.h" @@ -71,24 +79,62 @@ __FBSDID("$FreeBSD$"); #define MAX_CMP_SIZE (16 * 1024 * 1024) +#define LN_ABSOLUTE 0x01 +#define LN_RELATIVE 0x02 +#define LN_HARD 0x04 +#define LN_SYMBOLIC 0x08 +#define LN_MIXED 0x10 + #define DIRECTORY 0x01 /* Tell install it's a directory. */ #define SETFLAGS 0x02 /* Tell install to set flags. */ #define NOCHANGEBITS (UF_IMMUTABLE | UF_APPEND | SF_IMMUTABLE | SF_APPEND) #define BACKUP_SUFFIX ".old" +typedef union { + MD5_CTX MD5; + RIPEMD160_CTX RIPEMD160; + SHA1_CTX SHA1; + SHA256_CTX SHA256; + SHA512_CTX SHA512; +} DIGEST_CTX; + +static enum { + DIGEST_NONE = 0, + DIGEST_MD5, + DIGEST_RIPEMD160, + DIGEST_SHA1, + DIGEST_SHA256, + DIGEST_SHA512, +} digesttype = DIGEST_NONE; + static gid_t gid; static uid_t uid; -static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, - verbose; +static int dobackup, docompare, dodir, dolink, dopreserve, dostrip, dounpriv, + safecopy, verbose; +static int haveopt_f, haveopt_g, haveopt_m, haveopt_o; static mode_t mode = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; +static FILE *metafp; +static const char *group, *owner; static const char *suffix = BACKUP_SUFFIX; +static char *destdir, *digest, *fflags, *metafile, *tags; -static int compare(int, const char *, size_t, int, const char *, size_t); -static void copy(int, const char *, int, const char *, off_t); +static int compare(int, const char *, size_t, int, const char *, size_t, + char **); +static char *copy(int, const char *, int, const char *, off_t); static int create_newfile(const char *, int, struct stat *); static int create_tempfile(const char *, char *, size_t); +static char *quiet_mktemp(char *template); +static char *digest_file(const char *); +static void digest_init(DIGEST_CTX *); +static void digest_update(DIGEST_CTX *, const unsigned char *, size_t); +static char *digest_end(DIGEST_CTX *, char *); +static int do_link(const char *, const char *, const struct stat *); +static void do_symlink(const char *, const char *, const struct stat *); +static void makelink(const char *, const char *, const struct stat *); static void install(const char *, const char *, u_long, u_int); static void install_dir(char *); +static void metadata_log(const char *, const char *, struct timeval *, + const char *, const char *, off_t); static int parseid(const char *, id_t *); static void strip(const char *); static int trymmap(int); @@ -102,12 +148,13 @@ main(int argc, char *argv[]) u_long fset; int ch, no_target; u_int iflags; - char *flags; - const char *group, *owner, *to_name; + char *p; + const char *to_name; iflags = 0; group = owner = NULL; - while ((ch = getopt(argc, argv, "B:bCcdf:g:Mm:N:o:pSsv")) != -1) + while ((ch = getopt(argc, argv, "B:bCcD:df:g:h:l:M:m:N:o:pSsT:Uv")) != + -1) switch((char)ch) { case 'B': suffix = optarg; @@ -121,22 +168,56 @@ main(int argc, char *argv[]) case 'c': /* For backwards compatibility. */ break; + case 'D': + destdir = optarg; + break; case 'd': dodir = 1; break; case 'f': - flags = optarg; - if (strtofflags(&flags, &fset, NULL)) - errx(EX_USAGE, "%s: invalid flag", flags); - iflags |= SETFLAGS; + haveopt_f = 1; + fflags = optarg; break; case 'g': + haveopt_g = 1; group = optarg; break; + case 'h': + digest = optarg; + break; + case 'l': + for (p = optarg; *p != '\0'; p++) + switch (*p) { + case 's': + dolink &= ~(LN_HARD|LN_MIXED); + dolink |= LN_SYMBOLIC; + break; + case 'h': + dolink &= ~(LN_SYMBOLIC|LN_MIXED); + dolink |= LN_HARD; + break; + case 'm': + dolink &= ~(LN_SYMBOLIC|LN_HARD); + dolink |= LN_MIXED; + break; + case 'a': + dolink &= ~LN_RELATIVE; + dolink |= LN_ABSOLUTE; + break; + case 'r': + dolink &= ~LN_ABSOLUTE; + dolink |= LN_RELATIVE; + break; + default: + errx(1, "%c: invalid link type", *p); + /* NOTREACHED */ + } + break; case 'M': - nommap = 1; + metafile = optarg; break; case 'm': + haveopt_m = 1; if (!(set = setmode(optarg))) errx(EX_USAGE, "invalid file mode: %s", optarg); @@ -145,10 +226,11 @@ main(int argc, char *argv[]) break; case 'N': if (!setup_getid(optarg)) - err(1, "Unable to use user and group " + err(EX_OSERR, "Unable to use user and group " "databases in `%s'", optarg); break; case 'o': + haveopt_o = 1; owner = optarg; break; case 'p': @@ -160,6 +242,12 @@ main(int argc, char *argv[]) case 's': dostrip = 1; break; + case 'T': + tags = optarg; + break; + case 'U': + dounpriv = 1; + break; case 'v': verbose = 1; break; @@ -185,14 +273,33 @@ main(int argc, char *argv[]) if (argc == 0 || (argc == 1 && !dodir)) usage(); + if (digest != NULL) { + if (strcmp(digest, "none") == 0) { + digesttype = DIGEST_NONE; + } else if (strcmp(digest, "md5") == 0) { + digesttype = DIGEST_MD5; + } else if (strcmp(digest, "rmd160") == 0) { + digesttype = DIGEST_RIPEMD160; + } else if (strcmp(digest, "sha1") == 0) { + digesttype = DIGEST_SHA1; + } else if (strcmp(digest, "sha256") == 0) { + digesttype = DIGEST_SHA256; + } else if (strcmp(digest, "sha512") == 0) { + digesttype = DIGEST_SHA512; + } else { + warnx("unknown digest `%s'", digest); + usage(); + } + } + /* need to make a temp copy so we can compare stripped version */ if (docompare && dostrip) safecopy = 1; /* get group and owner id's */ - if (group != NULL) { + if (group != NULL && !dounpriv) { if (gid_from_group(group, &gid) == -1) { - id_t id; + id_t id; if (!parseid(group, &id)) errx(1, "unknown group %s", group); gid = id; @@ -200,7 +307,7 @@ main(int argc, char *argv[]) } else gid = (gid_t)-1; - if (owner != NULL) { + if (owner != NULL && !dounpriv) { if (uid_from_user(owner, &uid) == -1) { id_t id; if (!parseid(owner, &id)) @@ -210,6 +317,18 @@ main(int argc, char *argv[]) } else uid = (uid_t)-1; + if (fflags != NULL && !dounpriv) { + if (strtofflags(&fflags, &fset, NULL)) + errx(EX_USAGE, "%s: invalid flag", fflags); + iflags |= SETFLAGS; + } + + if (metafile != NULL) { + if ((metafp = fopen(metafile, "a")) == NULL) + warn("open %s", metafile); + } else + digesttype = DIGEST_NONE; + if (dodir) { for (; *argv != NULL; ++argv) install_dir(*argv); @@ -236,7 +355,7 @@ main(int argc, char *argv[]) usage(); } - if (!no_target) { + if (!no_target && !dolink) { if (stat(*argv, &from_sb)) err(EX_OSERR, "%s", *argv); if (!S_ISREG(to_sb.st_mode)) { @@ -253,6 +372,96 @@ main(int argc, char *argv[]) /* NOTREACHED */ } +static char * +digest_file(const char *name) +{ + + switch (digesttype) { + case DIGEST_MD5: + return (MD5File(name, NULL)); + case DIGEST_RIPEMD160: + return (RIPEMD160_File(name, NULL)); + case DIGEST_SHA1: + return (SHA1_File(name, NULL)); + case DIGEST_SHA256: + return (SHA256_File(name, NULL)); + case DIGEST_SHA512: + return (SHA512_File(name, NULL)); + default: + return (NULL); + } +} + +static void +digest_init(DIGEST_CTX *c) +{ + + switch (digesttype) { + case DIGEST_NONE: + break; + case DIGEST_MD5: + MD5Init(&(c->MD5)); + break; + case DIGEST_RIPEMD160: + RIPEMD160_Init(&(c->RIPEMD160)); + break; + case DIGEST_SHA1: + SHA1_Init(&(c->SHA1)); + break; + case DIGEST_SHA256: + SHA256_Init(&(c->SHA256)); + break; + case DIGEST_SHA512: + SHA512_Init(&(c->SHA512)); + break; + } +} + +static void +digest_update(DIGEST_CTX *c, const unsigned char *data, size_t len) +{ + + switch (digesttype) { + case DIGEST_NONE: + break; + case DIGEST_MD5: + MD5Update(&(c->MD5), data, len); + break; + case DIGEST_RIPEMD160: + RIPEMD160_Update(&(c->RIPEMD160), data, len); + break; + case DIGEST_SHA1: + SHA1_Update(&(c->SHA1), data, len); + break; + case DIGEST_SHA256: + SHA256_Update(&(c->SHA256), data, len); + break; + case DIGEST_SHA512: + SHA512_Update(&(c->SHA512), data, len); + break; + } +} + +static char * +digest_end(DIGEST_CTX *c, char *buf) +{ + + switch (digesttype) { + case DIGEST_MD5: + return (MD5End(&(c->MD5), buf)); + case DIGEST_RIPEMD160: + return (RIPEMD160_End(&(c->RIPEMD160), buf)); + case DIGEST_SHA1: + return (SHA1_End(&(c->SHA1), buf)); + case DIGEST_SHA256: + return (SHA256_End(&(c->SHA256), buf)); + case DIGEST_SHA512: + return (SHA512_End(&(c->SHA512), buf)); + default: + return (NULL); + } +} + /* * parseid -- * parse uid or gid from arg into id, returning non-zero if successful @@ -269,6 +478,224 @@ parseid(const char *name, id_t *id) } /* + * quiet_mktemp -- + * mktemp implementation used mkstemp to avoid mktemp warnings. We + * really do need mktemp semantics here as we will be creating a link. + */ +static char * +quiet_mktemp(char *template) +{ + int fd; + + if ((fd = mkstemp(template)) == -1) + return (NULL); + close (fd); + if (unlink(template) == -1) + err(EX_OSERR, "unlink %s", template); + return (template); +} + +/* + * do_link -- + * make a hard link, obeying dorename if set + * return -1 on failure + */ +static int +do_link(const char *from_name, const char *to_name, + const struct stat *target_sb) +{ + char tmpl[MAXPATHLEN]; + int ret; + + if (safecopy && target_sb != NULL) { + (void)snprintf(tmpl, sizeof(tmpl), "%s.inst.XXXXXX", to_name); + /* This usage is safe. */ + if (quiet_mktemp(tmpl) == NULL) + err(EX_OSERR, "%s: mktemp", tmpl); + ret = link(from_name, tmpl); + if (ret == 0) { + if (target_sb->st_mode & S_IFDIR && rmdir(to_name) == + -1) { + unlink(tmpl); + err(EX_OSERR, "%s", to_name); + } + if (target_sb->st_flags & NOCHANGEBITS) + (void)chflags(to_name, target_sb->st_flags & + ~NOCHANGEBITS); + unlink(to_name); + ret = rename(tmpl, to_name); + /* + * If rename has posix semantics, then the temporary + * file may still exist when from_name and to_name point + * to the same file, so unlink it unconditionally. + */ + (void)unlink(tmpl); + } + return (ret); + } else + return (link(from_name, to_name)); +} + +/* + * do_symlink -- + * Make a symbolic link, obeying dorename if set. Exit on failure. + */ +static void +do_symlink(const char *from_name, const char *to_name, + const struct stat *target_sb) +{ + char tmpl[MAXPATHLEN]; + + if (safecopy && target_sb != NULL) { + (void)snprintf(tmpl, sizeof(tmpl), "%s.inst.XXXXXX", to_name); + /* This usage is safe. */ + if (quiet_mktemp(tmpl) == NULL) + err(EX_OSERR, "%s: mktemp", tmpl); + + if (symlink(from_name, tmpl) == -1) + err(EX_OSERR, "symlink %s -> %s", from_name, tmpl); + + if (target_sb->st_mode & S_IFDIR && rmdir(to_name) == -1) { + (void)unlink(tmpl); + err(EX_OSERR, "%s", to_name); + } + if (target_sb->st_flags & NOCHANGEBITS) + (void)chflags(to_name, target_sb->st_flags & + ~NOCHANGEBITS); + unlink(to_name); + + if (rename(tmpl, to_name) == -1) { + /* Remove temporary link before exiting. */ + (void)unlink(tmpl); + err(EX_OSERR, "%s: rename", to_name); + } + } else { + if (symlink(from_name, to_name) == -1) + err(EX_OSERR, "symlink %s -> %s", from_name, to_name); + } +} + +/* + * makelink -- + * make a link from source to destination + */ +static void +makelink(const char *from_name, const char *to_name, + const struct stat *target_sb) +{ + char src[MAXPATHLEN], dst[MAXPATHLEN], lnk[MAXPATHLEN]; + struct stat to_sb; + + /* Try hard links first. */ + if (dolink & (LN_HARD|LN_MIXED)) { + if (do_link(from_name, to_name, target_sb) == -1) { + if ((dolink & LN_HARD) || errno != EXDEV) + err(EX_OSERR, "link %s -> %s", from_name, to_name); + } else { + if (stat(to_name, &to_sb)) + err(EX_OSERR, "%s: stat", to_name); + if (S_ISREG(to_sb.st_mode)) { + /* + * XXX: hard links to anything other than + * plain files are not metalogged + */ + int omode; + const char *oowner, *ogroup; + char *offlags; + char *dres; + + /* + * XXX: use underlying perms, unless + * overridden on command line. + */ + omode = mode; + if (!haveopt_m) + mode = (to_sb.st_mode & 0777); + oowner = owner; + if (!haveopt_o) + owner = NULL; + ogroup = group; + if (!haveopt_g) + group = NULL; + offlags = fflags; + if (!haveopt_f) + fflags = NULL; + dres = digest_file(from_name); + metadata_log(to_name, "file", NULL, NULL, + dres, to_sb.st_size); + free(dres); + mode = omode; + owner = oowner; + group = ogroup; + fflags = offlags; + } + return; + } + } + + /* Symbolic links. */ + if (dolink & LN_ABSOLUTE) { + /* Convert source path to absolute. */ + if (realpath(from_name, src) == NULL) + err(EX_OSERR, "%s: realpath", from_name); + do_symlink(src, to_name, target_sb); + /* XXX: src may point outside of destdir */ + metadata_log(to_name, "link", NULL, src, NULL, 0); + return; + } + + if (dolink & LN_RELATIVE) { + char *cp, *d, *s; + + /* Resolve pathnames. */ + if (realpath(from_name, src) == NULL) + err(EX_OSERR, "%s: realpath", from_name); + + /* + * The last component of to_name may be a symlink, + * so use realpath to resolve only the directory. + */ + cp = dirname(to_name); + if (realpath(cp, dst) == NULL) + err(EX_OSERR, "%s: realpath", cp); + /* .. and add the last component. */ + if (strcmp(dst, "/") != 0) { + if (strlcat(dst, "/", sizeof(dst)) > sizeof(dst)) + errx(1, "resolved pathname too long"); + } + cp = basename(to_name); + if (strlcat(dst, cp, sizeof(dst)) > sizeof(dst)) + errx(1, "resolved pathname too long"); + + /* Trim common path components. */ + for (s = src, d = dst; *s == *d; s++, d++) + continue; + while (*s != '/') + s--, d--; + + /* Count the number of directories we need to backtrack. */ + for (++d, lnk[0] = '\0'; *d; d++) + if (*d == '/') + (void)strlcat(lnk, "../", sizeof(lnk)); + + (void)strlcat(lnk, ++s, sizeof(lnk)); + + do_symlink(lnk, to_name, target_sb); + /* XXX: Link may point outside of destdir. */ + metadata_log(to_name, "link", NULL, lnk, NULL, 0); + return; + } + + /* + * If absolute or relative was not specified, try the names the + * user provided. + */ + do_symlink(from_name, to_name, target_sb); + /* XXX: from_name may point outside of destdir. */ + metadata_log(to_name, "link", NULL, from_name, NULL, 0); +} + +/* * install -- * build a path name and install the file */ @@ -280,6 +707,7 @@ install(const char *from_name, const cha int devnull, files_match, from_fd, serrno, target; int tempcopy, temp_fd, to_fd; char backup[MAXPATHLEN], *p, pathbuf[MAXPATHLEN], tempfile[MAXPATHLEN]; + char *digestresult; files_match = 0; from_fd = -1; @@ -287,11 +715,13 @@ install(const char *from_name, const cha /* If try to install NULL file to a directory, fails. */ if (flags & DIRECTORY || strcmp(from_name, _PATH_DEVNULL)) { - if (stat(from_name, &from_sb)) - err(EX_OSERR, "%s", from_name); - if (!S_ISREG(from_sb.st_mode)) { - errno = EFTYPE; - err(EX_OSERR, "%s", from_name); + if (!dolink) { + if (stat(from_name, &from_sb)) + err(EX_OSERR, "%s", from_name); + if (!S_ISREG(from_sb.st_mode)) { + errno = EFTYPE; + err(EX_OSERR, "%s", from_name); + } } /* Build the target path. */ if (flags & DIRECTORY) { @@ -305,7 +735,23 @@ install(const char *from_name, const cha devnull = 1; } - target = stat(to_name, &to_sb) == 0; + if (!dolink) + target = (stat(to_name, &to_sb) == 0); + else + target = (lstat(to_name, &to_sb) == 0); + + if (dolink) { + if (target && !safecopy) { + if (to_sb.st_mode & S_IFDIR && rmdir(to_name) == -1) + err(EX_OSERR, "%s", to_name); + if (to_sb.st_flags & NOCHANGEBITS) + (void)chflags(to_name, + to_sb.st_flags & ~NOCHANGEBITS); + unlink(to_name); + } + makelink(from_name, to_name, target ? &to_sb : NULL); + return; + } /* Only install to regular files. */ if (target && !S_ISREG(to_sb.st_mode)) { @@ -329,7 +775,7 @@ install(const char *from_name, const cha else files_match = !(compare(from_fd, from_name, (size_t)from_sb.st_size, to_fd, - to_name, (size_t)to_sb.st_size)); + to_name, (size_t)to_sb.st_size, &digestresult)); /* Close "to" file unless we match. */ if (!files_match) @@ -351,8 +797,10 @@ install(const char *from_name, const cha from_name, to_name); } if (!devnull) - copy(from_fd, from_name, to_fd, + digestresult = copy(from_fd, from_name, to_fd, tempcopy ? tempfile : to_name, from_sb.st_size); + else + digestresult = NULL; } if (dostrip) { @@ -386,7 +834,8 @@ install(const char *from_name, const cha } if (compare(temp_fd, tempfile, (size_t)temp_sb.st_size, to_fd, - to_name, (size_t)to_sb.st_size) == 0) { + to_name, (size_t)to_sb.st_size, &digestresult) + == 0) { /* * If target has more than one link we need to * replace it in order to snap the extra links. @@ -406,6 +855,9 @@ install(const char *from_name, const cha } } + if (dostrip && (!docompare || !target)) + digestresult = digest_file(tempfile); + /* * Move the new file into place if doing a safe copy * and the files are different (or just not compared). @@ -469,15 +921,16 @@ install(const char *from_name, const cha * Set owner, group, mode for target; do the chown first, * chown may lose the setuid bits. */ - if ((gid != (gid_t)-1 && gid != to_sb.st_gid) || + if (!dounpriv && ((gid != (gid_t)-1 && gid != to_sb.st_gid) || (uid != (uid_t)-1 && uid != to_sb.st_uid) || - (mode != (to_sb.st_mode & ALLPERMS))) { + (mode != (to_sb.st_mode & ALLPERMS)))) { /* Try to turn off the immutable bits. */ if (to_sb.st_flags & NOCHANGEBITS) (void)fchflags(to_fd, to_sb.st_flags & ~NOCHANGEBITS); } - if ((gid != (gid_t)-1 && gid != to_sb.st_gid) || + if (!dounpriv & + (gid != (gid_t)-1 && gid != to_sb.st_gid) || (uid != (uid_t)-1 && uid != to_sb.st_uid)) if (fchown(to_fd, uid, gid) == -1) { serrno = errno; @@ -486,13 +939,16 @@ install(const char *from_name, const cha err(EX_OSERR,"%s: chown/chgrp", to_name); } - if (mode != (to_sb.st_mode & ALLPERMS)) + if (mode != (to_sb.st_mode & ALLPERMS)) { + if (dounpriv) + mode &= S_IRWXU|S_IRWXG|S_IRWXO; if (fchmod(to_fd, mode)) { serrno = errno; (void)unlink(to_name); errno = serrno; err(EX_OSERR, "%s: chmod", to_name); } + } /* * If provided a set of flags, set them, otherwise, preserve the @@ -501,7 +957,7 @@ install(const char *from_name, const cha * trying to turn off UF_NODUMP. If we're trying to set real flags, * then warn if the fs doesn't support it, otherwise fail. */ - if (!devnull && (flags & SETFLAGS || + if (!dounpriv & !devnull && (flags & SETFLAGS || (from_sb.st_flags & ~UF_NODUMP) != to_sb.st_flags) && fchflags(to_fd, flags & SETFLAGS ? fset : from_sb.st_flags & ~UF_NODUMP)) { @@ -520,6 +976,9 @@ install(const char *from_name, const cha (void)close(to_fd); if (!devnull) (void)close(from_fd); + + metadata_log(to_name, "file", tvb, NULL, digestresult, to_sb.st_size); + free(digestresult); } /* @@ -528,29 +987,37 @@ install(const char *from_name, const cha */ static int compare(int from_fd, const char *from_name __unused, size_t from_len, - int to_fd, const char *to_name __unused, size_t to_len) + int to_fd, const char *to_name __unused, size_t to_len, + char **dresp) { char *p, *q; int rv; int done_compare; + DIGEST_CTX ctx; rv = 0; if (from_len != to_len) return 1; if (from_len <= MAX_CMP_SIZE) { + if (dresp != NULL) + digest_init(&ctx); done_compare = 0; if (trymmap(from_fd) && trymmap(to_fd)) { - p = mmap(NULL, from_len, PROT_READ, MAP_SHARED, from_fd, (off_t)0); + p = mmap(NULL, from_len, PROT_READ, MAP_SHARED, + from_fd, (off_t)0); if (p == (char *)MAP_FAILED) goto out; - q = mmap(NULL, from_len, PROT_READ, MAP_SHARED, to_fd, (off_t)0); + q = mmap(NULL, from_len, PROT_READ, MAP_SHARED, + to_fd, (off_t)0); if (q == (char *)MAP_FAILED) { munmap(p, from_len); goto out; } rv = memcmp(p, q, from_len); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 22:17:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6EC4897D; Fri, 18 Jan 2013 22:17:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 62494A87; Fri, 18 Jan 2013 22:17:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IMHMke064008; Fri, 18 Jan 2013 22:17:22 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IMHMsw064007; Fri, 18 Jan 2013 22:17:22 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201301182217.r0IMHMsw064007@svn.freebsd.org> From: Brooks Davis Date: Fri, 18 Jan 2013 22:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245622 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 22:17:22 -0000 Author: brooks Date: Fri Jan 18 22:17:21 2013 New Revision: 245622 URL: http://svnweb.freebsd.org/changeset/base/245622 Log: Remove a harmless (somewhat to my surprise) bogon that crept into r245440. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jan 18 22:11:17 2013 (r245621) +++ head/Makefile.inc1 Fri Jan 18 22:17:21 2013 (r245622) @@ -704,7 +704,6 @@ distributeworld installworld: installche done); \ cp $$libs $$progs ${INSTALLTMP} cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale - rm -f ${METALOG} .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} -mkdir ${DESTDIR}/${DISTDIR}/${dist} From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 22:30:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E7CE5D62; Fri, 18 Jan 2013 22:30:09 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by mx1.freebsd.org (Postfix) with ESMTP id AB8B9ADF; Fri, 18 Jan 2013 22:30:09 +0000 (UTC) Received: from mxin2-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0MGU00K40EHXTI10@smtp3.clear.net.nz>; Sat, 19 Jan 2013 11:30:01 +1300 (NZDT) Received: from 202-0-48-19.paradise.net.nz (HELO localhost) ([202.0.48.19]) by smtpin2.paradise.net.nz with ESMTP; Sat, 19 Jan 2013 11:30:00 +1300 Date: Sat, 19 Jan 2013 11:29:53 +1300 From: Andrew Turner Subject: Re: svn commit: r245610 - head/bin/ps In-reply-to: <201301181824.r0IIOfxd094865@svn.freebsd.org> To: John Baldwin Message-id: <20130119112953.7a9aa66e@fubar.geek.nz> MIME-version: 1.0 X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.1) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Pirate: Arrrr References: <201301181824.r0IIOfxd094865@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 22:30:10 -0000 On Fri, 18 Jan 2013 18:24:41 +0000 (UTC) John Baldwin wrote: > Author: jhb > Date: Fri Jan 18 18:24:40 2013 > New Revision: 245610 > URL: http://svnweb.freebsd.org/changeset/base/245610 > > Log: > Include the thread name along with the command name when displaying > the command name of a thread from a multi-threaded process that > doesn't have an available argument list (such as kernel processes) > and threads display is enabled via -H. > > Reviewed by: alfred, delphij, eric@vangyzen.net > MFC after: 1 week This breaks usr.bin/w as it includes bin/ps/fmt.c in it's build but doesn't have the showthreads variable defined. Andrew From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 22:53:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 55902935; Fri, 18 Jan 2013 22:53:01 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 43231BFF; Fri, 18 Jan 2013 22:53:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IMr1cZ075115; Fri, 18 Jan 2013 22:53:01 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IMqxLT075099; Fri, 18 Jan 2013 22:52:59 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301182252.r0IMqxLT075099@svn.freebsd.org> From: Andrew Turner Date: Fri, 18 Jan 2013 22:52:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245628 - in head/contrib/compiler-rt: . lib lib/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 22:53:01 -0000 Author: andrew Date: Fri Jan 18 22:52:59 2013 New Revision: 245628 URL: http://svnweb.freebsd.org/changeset/base/245628 Log: Import compiler-rt r172839. This brings in __aeabi_lcmp and __aeabi_ulcmp. It also fixes the spelling of __aeabi_f2lz. Both changes originated on the arm_eabi project branch. Modified: head/contrib/compiler-rt/LICENSE.TXT head/contrib/compiler-rt/lib/arm/divsi3.S head/contrib/compiler-rt/lib/arm/udivsi3.S head/contrib/compiler-rt/lib/cmpdi2.c head/contrib/compiler-rt/lib/fixsfdi.c head/contrib/compiler-rt/lib/int_endianness.h head/contrib/compiler-rt/lib/ucmpdi2.c Directory Properties: head/contrib/compiler-rt/ (props changed) Modified: head/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- head/contrib/compiler-rt/LICENSE.TXT Fri Jan 18 22:50:29 2013 (r245627) +++ head/contrib/compiler-rt/LICENSE.TXT Fri Jan 18 22:52:59 2013 (r245628) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: head/contrib/compiler-rt/lib/arm/divsi3.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/divsi3.S Fri Jan 18 22:50:29 2013 (r245627) +++ head/contrib/compiler-rt/lib/arm/divsi3.S Fri Jan 18 22:52:59 2013 (r245628) @@ -25,7 +25,16 @@ // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine. DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3) DEFINE_COMPILERRT_FUNCTION(__divsi3) - ESTABLISH_FRAME +#if __ARM_ARCH_7S__ + tst r1,r1 + beq LOCAL_LABEL(divzero) + sdiv r0, r0, r1 + bx lr +LOCAL_LABEL(divzero): + mov r0,#0 + bx lr +#else +ESTABLISH_FRAME // Set aside the sign of the quotient. eor r4, r0, r1 // Take absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31). @@ -39,3 +48,4 @@ DEFINE_COMPILERRT_FUNCTION(__divsi3) eor r0, r0, r4, asr #31 sub r0, r0, r4, asr #31 CLEAR_FRAME_AND_RETURN +#endif Modified: head/contrib/compiler-rt/lib/arm/udivsi3.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/udivsi3.S Fri Jan 18 22:50:29 2013 (r245627) +++ head/contrib/compiler-rt/lib/arm/udivsi3.S Fri Jan 18 22:52:59 2013 (r245628) @@ -33,6 +33,15 @@ // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine. DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3) DEFINE_COMPILERRT_FUNCTION(__udivsi3) +#if __ARM_ARCH_7S__ + tst r1,r1 + beq LOCAL_LABEL(divzero) + udiv r0, r0, r1 + bx lr + LOCAL_LABEL(divzero): + mov r0,#0 + bx lr +#else // We use a simple digit by digit algorithm; before we get into the actual // divide loop, we must calculate the left-shift amount necessary to align // the MSB of the divisor with that of the dividend (If this shift is @@ -78,3 +87,4 @@ LOCAL_LABEL(return): // Move the quotient to r0 and return. mov r0, q CLEAR_FRAME_AND_RETURN +#endif Modified: head/contrib/compiler-rt/lib/cmpdi2.c ============================================================================== --- head/contrib/compiler-rt/lib/cmpdi2.c Fri Jan 18 22:50:29 2013 (r245627) +++ head/contrib/compiler-rt/lib/cmpdi2.c Fri Jan 18 22:52:59 2013 (r245628) @@ -36,3 +36,16 @@ __cmpdi2(di_int a, di_int b) return 2; return 1; } + +#ifdef __ARM_EABI__ +/* Returns: if (a < b) returns -1 +* if (a == b) returns 0 +* if (a > b) returns 1 +*/ +COMPILER_RT_ABI si_int +__aeabi_lcmp(di_int a, di_int b) +{ + return __cmpdi2(a, b) - 1; +} +#endif + Modified: head/contrib/compiler-rt/lib/fixsfdi.c ============================================================================== --- head/contrib/compiler-rt/lib/fixsfdi.c Fri Jan 18 22:50:29 2013 (r245627) +++ head/contrib/compiler-rt/lib/fixsfdi.c Fri Jan 18 22:52:59 2013 (r245628) @@ -23,7 +23,7 @@ /* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */ -ARM_EABI_FNALIAS(d2lz, fixsfdi) +ARM_EABI_FNALIAS(f2lz, fixsfdi) COMPILER_RT_ABI di_int __fixsfdi(float a) Modified: head/contrib/compiler-rt/lib/int_endianness.h ============================================================================== --- head/contrib/compiler-rt/lib/int_endianness.h Fri Jan 18 22:50:29 2013 (r245627) +++ head/contrib/compiler-rt/lib/int_endianness.h Fri Jan 18 22:52:59 2013 (r245628) @@ -31,7 +31,7 @@ /* .. */ -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__minix) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__minix) #include #if _BYTE_ORDER == _BIG_ENDIAN @@ -44,6 +44,19 @@ #endif /* *BSD */ +#if defined(__OpenBSD__) || defined(__Bitrig__) +#include + +#if _BYTE_ORDER == _BIG_ENDIAN +#define _YUGA_LITTLE_ENDIAN 0 +#define _YUGA_BIG_ENDIAN 1 +#elif _BYTE_ORDER == _LITTLE_ENDIAN +#define _YUGA_LITTLE_ENDIAN 1 +#define _YUGA_BIG_ENDIAN 0 +#endif /* _BYTE_ORDER */ + +#endif /* OpenBSD and Bitrig. */ + /* .. */ /* Mac OSX has __BIG_ENDIAN__ or __LITTLE_ENDIAN__ automatically set by the compiler (at least with GCC) */ Modified: head/contrib/compiler-rt/lib/ucmpdi2.c ============================================================================== --- head/contrib/compiler-rt/lib/ucmpdi2.c Fri Jan 18 22:50:29 2013 (r245627) +++ head/contrib/compiler-rt/lib/ucmpdi2.c Fri Jan 18 22:52:59 2013 (r245628) @@ -36,3 +36,16 @@ __ucmpdi2(du_int a, du_int b) return 2; return 1; } + +#ifdef __ARM_EABI__ +/* Returns: if (a < b) returns -1 +* if (a == b) returns 0 +* if (a > b) returns 1 +*/ +COMPILER_RT_ABI si_int +__aeabi_ulcmp(di_int a, di_int b) +{ + return __ucmpdi2(a, b) - 1; +} +#endif + From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 23:08:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 682AFE71; Fri, 18 Jan 2013 23:08:41 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 50D3ECFA; Fri, 18 Jan 2013 23:08:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IN8fmu079364; Fri, 18 Jan 2013 23:08:41 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IN8fFo079362; Fri, 18 Jan 2013 23:08:41 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301182308.r0IN8fFo079362@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 18 Jan 2013 23:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245630 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 23:08:41 -0000 Author: jilles Date: Fri Jan 18 23:08:40 2013 New Revision: 245630 URL: http://svnweb.freebsd.org/changeset/base/245630 Log: libthr: Always use the threaded rtld lock implementation. The threaded rtld lock implementation is faster even in the single-threaded case because it postpones signal handlers via THR_CRITICAL_ENTER and THR_CRITICAL_LEAVE instead of calling sigprocmask(2). As a result, exception handling becomes faster in single-threaded applications linked with libthr. Reviewed by: kib Modified: head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_kern.c Modified: head/lib/libthr/thread/thr_init.c ============================================================================== --- head/lib/libthr/thread/thr_init.c Fri Jan 18 23:04:05 2013 (r245629) +++ head/lib/libthr/thread/thr_init.c Fri Jan 18 23:08:40 2013 (r245630) @@ -363,6 +363,12 @@ _libpthread_init(struct pthread *curthre _thr_signal_init(); if (_thread_event_mask & TD_CREATE) _thr_report_creation(curthread, curthread); + /* + * Always use our rtld lock implementation. + * It is faster because it postpones signal handlers + * instead of calling sigprocmask(2). + */ + _thr_rtld_init(); } } Modified: head/lib/libthr/thread/thr_kern.c ============================================================================== --- head/lib/libthr/thread/thr_kern.c Fri Jan 18 23:04:05 2013 (r245629) +++ head/lib/libthr/thread/thr_kern.c Fri Jan 18 23:08:40 2013 (r245630) @@ -57,11 +57,6 @@ _thr_setthreaded(int threaded) return (0); __isthreaded = threaded; - if (threaded != 0) { - _thr_rtld_init(); - } else { - _thr_rtld_fini(); - } return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 18 23:54:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B167ABA5; Fri, 18 Jan 2013 23:54:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 98934E90; Fri, 18 Jan 2013 23:54:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0INsRlM093702; Fri, 18 Jan 2013 23:54:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0INsRAj093701; Fri, 18 Jan 2013 23:54:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301182354.r0INsRAj093701@svn.freebsd.org> From: Xin LI Date: Fri, 18 Jan 2013 23:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245633 - head/usr.bin/w X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 18 Jan 2013 23:54:27 -0000 Author: delphij Date: Fri Jan 18 23:54:27 2013 New Revision: 245633 URL: http://svnweb.freebsd.org/changeset/base/245633 Log: Set showthread = 0 for w(1). X-MFC: together with r245610 Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Fri Jan 18 23:24:00 2013 (r245632) +++ head/usr.bin/w/w.c Fri Jan 18 23:54:27 2013 (r245633) @@ -96,6 +96,7 @@ static int nflag; /* true if -n flag: d static int dflag; /* true if -d flag: output debug info */ static int sortidle; /* sort by idle time */ int use_ampm; /* use AM/PM time */ +int showthreads = 0;/* will threads be shown? */ static int use_comma; /* use comma as floats separator */ static char **sel_users; /* login array of particular users selected */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 00:05:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 01918F6F; Sat, 19 Jan 2013 00:05:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D29A4EF5; Sat, 19 Jan 2013 00:05:25 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1229CB94C; Fri, 18 Jan 2013 19:05:25 -0500 (EST) Message-ID: <50F9E354.1070709@FreeBSD.org> Date: Fri, 18 Jan 2013 19:05:40 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andrew Turner Subject: Re: svn commit: r245610 - head/bin/ps References: <201301181824.r0IIOfxd094865@svn.freebsd.org> <20130119112953.7a9aa66e@fubar.geek.nz> In-Reply-To: <20130119112953.7a9aa66e@fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 18 Jan 2013 19:05:25 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 00:05:26 -0000 On 1/18/13 5:29 PM, Andrew Turner wrote: > On Fri, 18 Jan 2013 18:24:41 +0000 (UTC) > John Baldwin wrote: > >> Author: jhb >> Date: Fri Jan 18 18:24:40 2013 >> New Revision: 245610 >> URL: http://svnweb.freebsd.org/changeset/base/245610 >> >> Log: >> Include the thread name along with the command name when displaying >> the command name of a thread from a multi-threaded process that >> doesn't have an available argument list (such as kernel processes) >> and threads display is enabled via -H. >> >> Reviewed by: alfred, delphij, eric@vangyzen.net >> MFC after: 1 week > > This breaks usr.bin/w as it includes bin/ps/fmt.c in it's build but > doesn't have the showthreads variable defined. Ugh. It requires a bit more fixing than that even since w uses fmt_argv() directly (and it had a stale prototype to boot). I have a fix to get both ps and w to build but am waiting for a full world to finish first in case some other place (ab)uses this. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 00:07:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9ADF6170; Sat, 19 Jan 2013 00:07:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5928BF04; Sat, 19 Jan 2013 00:07:01 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A9FD2B94C; Fri, 18 Jan 2013 19:07:00 -0500 (EST) Message-ID: <50F9E3B4.2090408@FreeBSD.org> Date: Fri, 18 Jan 2013 19:07:16 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Xin LI Subject: Re: svn commit: r245633 - head/usr.bin/w References: <201301182354.r0INsRAj093701@svn.freebsd.org> In-Reply-To: <201301182354.r0INsRAj093701@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 18 Jan 2013 19:07:00 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 00:07:01 -0000 On 1/18/13 6:54 PM, Xin LI wrote: > Author: delphij > Date: Fri Jan 18 23:54:27 2013 > New Revision: 245633 > URL: http://svnweb.freebsd.org/changeset/base/245633 > > Log: > Set showthread = 0 for w(1). > > X-MFC: together with r245610 Please no, this is not the correct fix. Note that w is now using the wrong function signature for fmt_argv() entirely. I will revert this with the correct fix. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 00:21:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3B6AF897; Sat, 19 Jan 2013 00:21:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F1EFEF93; Sat, 19 Jan 2013 00:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J0Lt3a002675; Sat, 19 Jan 2013 00:21:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J0Lt4j002672; Sat, 19 Jan 2013 00:21:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301190021.r0J0Lt4j002672@svn.freebsd.org> From: John Baldwin Date: Sat, 19 Jan 2013 00:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245635 - in head: bin/ps usr.bin/w X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 00:21:56 -0000 Author: jhb Date: Sat Jan 19 00:21:55 2013 New Revision: 245635 URL: http://svnweb.freebsd.org/changeset/base/245635 Log: - Move 'showthreads' check out of fmt.c. - Update shadow copy of fmt_argv() prototype in w.c and fix calls for additional parameter. Modified: head/bin/ps/fmt.c head/bin/ps/ps.c head/usr.bin/w/w.c Modified: head/bin/ps/fmt.c ============================================================================== --- head/bin/ps/fmt.c Fri Jan 18 23:59:22 2013 (r245634) +++ head/bin/ps/fmt.c Sat Jan 19 00:21:55 2013 (r245635) @@ -123,7 +123,7 @@ fmt_argv(char **argv, char *cmd, char *t if (cp == NULL) errx(1, "malloc failed"); if (ap == NULL) { - if (showthreads && thread != NULL) { + if (thread != NULL) { asprintf(&ap, "%s/%s", cmd, thread); sprintf(cp, "[%.*s]", (int)maxlen, ap); free(ap); Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Fri Jan 18 23:59:22 2013 (r245634) +++ head/bin/ps/ps.c Sat Jan 19 00:21:55 2013 (r245635) @@ -1168,7 +1168,7 @@ fmt(char **(*fn)(kvm_t *, const struct k const char *s; s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm, - ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen); + showthreads && ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen); return (s); } Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Fri Jan 18 23:59:22 2013 (r245634) +++ head/usr.bin/w/w.c Sat Jan 19 00:21:55 2013 (r245635) @@ -96,7 +96,6 @@ static int nflag; /* true if -n flag: d static int dflag; /* true if -d flag: output debug info */ static int sortidle; /* sort by idle time */ int use_ampm; /* use AM/PM time */ -int showthreads = 0;/* will threads be shown? */ static int use_comma; /* use comma as floats separator */ static char **sel_users; /* login array of particular users selected */ @@ -124,7 +123,7 @@ static struct stat *ttystat(char *); static void usage(int); static int this_is_uptime(const char *s); -char *fmt_argv(char **, char *, int); /* ../../bin/ps/fmt.c */ +char *fmt_argv(char **, char *, char *, size_t); /* ../../bin/ps/fmt.c */ int main(int argc, char *argv[]) @@ -321,7 +320,7 @@ main(int argc, char *argv[]) continue; } ep->args = fmt_argv(kvm_getargv(kd, ep->kp, argwidth), - ep->kp->ki_comm, MAXCOMLEN); + ep->kp->ki_comm, NULL, MAXCOMLEN); if (ep->args == NULL) err(1, NULL); } @@ -405,7 +404,7 @@ main(int argc, char *argv[]) const char *ptr; ptr = fmt_argv(kvm_getargv(kd, dkp, argwidth), - dkp->ki_comm, MAXCOMLEN); + dkp->ki_comm, NULL, MAXCOMLEN); if (ptr == NULL) ptr = "-"; (void)printf("\t\t%-9d %s\n", From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 00:37:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4D951CA4; Sat, 19 Jan 2013 00:37:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3F16781; Sat, 19 Jan 2013 00:37:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J0bIRo006496; Sat, 19 Jan 2013 00:37:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J0bI5u006495; Sat, 19 Jan 2013 00:37:18 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301190037.r0J0bI5u006495@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 19 Jan 2013 00:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245636 - head/sys/contrib/dev/acpica/components/disassembler X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 00:37:18 -0000 Author: jkim Date: Sat Jan 19 00:37:17 2013 New Revision: 245636 URL: http://svnweb.freebsd.org/changeset/base/245636 Log: Work around build breakage with GCC 4.2. Modified: head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c Modified: head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c ============================================================================== --- head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c Sat Jan 19 00:21:55 2013 (r245635) +++ head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c Sat Jan 19 00:37:17 2013 (r245636) @@ -416,7 +416,7 @@ AcpiDmIsResourceTemplate ( /* Walk the byte list, abort on any invalid descriptor type or length */ Status = AcpiUtWalkAmlResources (WalkState, Aml, Length, - NULL, (void **) &EndAml); + NULL, ACPI_CAST_INDIRECT_PTR (void, &EndAml)); if (ACPI_FAILURE (Status)) { return (AE_TYPE); From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 00:50:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 04BCE25A; Sat, 19 Jan 2013 00:50:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EB7E3FB; Sat, 19 Jan 2013 00:50:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J0oDjg009840; Sat, 19 Jan 2013 00:50:13 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J0oDmG009837; Sat, 19 Jan 2013 00:50:13 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201301190050.r0J0oDmG009837@svn.freebsd.org> From: Ian Lepore Date: Sat, 19 Jan 2013 00:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245637 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 00:50:14 -0000 Author: ian Date: Sat Jan 19 00:50:12 2013 New Revision: 245637 URL: http://svnweb.freebsd.org/changeset/base/245637 Log: Eliminate the need for an intermediate array of indices into the arrays of interrupt counts and names, by making the names into an array of fixed-length strings that can be directly indexed. This eliminates extra memory accesses on every interrupt to increment the counts. As a side effect, it also fixes a bug that would corrupt the names data if a name was longer than MAXCOMLEN, which led to incorrect vmstat -i output. Approved by: cognet (mentor) Modified: head/sys/arm/arm/intr.c head/sys/arm/arm/machdep.c head/sys/arm/include/intr.h Modified: head/sys/arm/arm/intr.c ============================================================================== --- head/sys/arm/arm/intr.c Sat Jan 19 00:37:17 2013 (r245636) +++ head/sys/arm/arm/intr.c Sat Jan 19 00:50:12 2013 (r245637) @@ -50,23 +50,40 @@ __FBSDID("$FreeBSD$"); #include #include +#define INTRNAME_LEN (MAXCOMLEN + 1) + typedef void (*mask_fn)(void *); static struct intr_event *intr_events[NIRQ]; -static int intrcnt_tab[NIRQ]; -static int intrcnt_index = 0; -static int last_printed = 0; void arm_handler_execute(struct trapframe *, int); void (*arm_post_filter)(void *) = NULL; +/* + * Pre-format intrnames into an array of fixed-size strings containing spaces. + * This allows us to avoid the need for an intermediate table of indices into + * the names and counts arrays, while still meeting the requirements and + * assumptions of vmstat(8) and the kdb "show intrcnt" command, the two + * consumers of this data. + */ +void +arm_intrnames_init() +{ + int i; + + memset(intrnames, ' ', NIRQ * INTRNAME_LEN); + for (i = 0; i < NIRQ; ++i) + intrnames[i * INTRNAME_LEN - 1] = 0; +} + void arm_setup_irqhandler(const char *name, driver_filter_t *filt, void (*hand)(void*), void *arg, int irq, int flags, void **cookiep) { struct intr_event *event; int error; + char namebuf[INTRNAME_LEN]; if (irq < 0 || irq >= NIRQ) return; @@ -78,14 +95,9 @@ arm_setup_irqhandler(const char *name, d if (error) return; intr_events[irq] = event; - last_printed += - snprintf(intrnames + last_printed, - MAXCOMLEN + 1, - "irq%d: %s", irq, name); - last_printed++; - intrcnt_tab[irq] = intrcnt_index; - intrcnt_index++; - + snprintf(namebuf, sizeof(namebuf), "irq%d: %s", irq, name); + sprintf(intrnames + INTRNAME_LEN * irq, "%-*s", + INTRNAME_LEN - 1, namebuf); } intr_event_add_handler(event, name, filt, hand, arg, intr_priority(flags), flags, cookiep); @@ -122,7 +134,7 @@ arm_handler_execute(struct trapframe *fr PCPU_INC(cnt.v_intr); i = -1; while ((i = arm_get_next_irq(i)) != -1) { - intrcnt[intrcnt_tab[i]]++; + intrcnt[i]++; event = intr_events[i]; if (intr_event_handle(event, frame) != 0) { /* XXX: Log stray IRQs */ Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sat Jan 19 00:37:17 2013 (r245636) +++ head/sys/arm/arm/machdep.c Sat Jan 19 00:50:12 2013 (r245637) @@ -1474,6 +1474,7 @@ initarm(struct arm_boot_params *abp) init_proc0(kernelstack.pv_va); + arm_intrnames_init(); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt); Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sat Jan 19 00:37:17 2013 (r245636) +++ head/sys/arm/include/intr.h Sat Jan 19 00:50:12 2013 (r245637) @@ -70,6 +70,7 @@ int arm_get_next_irq(int); void arm_mask_irq(uintptr_t); void arm_unmask_irq(uintptr_t); +void arm_intrnames_init(void); void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*), void *, int, int, void **); int arm_remove_irqhandler(int, void *); From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 01:18:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DB34F8EE; Sat, 19 Jan 2013 01:18:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CBF471DD; Sat, 19 Jan 2013 01:18:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J1IMxb018823; Sat, 19 Jan 2013 01:18:22 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J1IMdK018821; Sat, 19 Jan 2013 01:18:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201301190118.r0J1IMdK018821@svn.freebsd.org> From: John Baldwin Date: Sat, 19 Jan 2013 01:18:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245640 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 01:18:22 -0000 Author: jhb Date: Sat Jan 19 01:18:22 2013 New Revision: 245640 URL: http://svnweb.freebsd.org/changeset/base/245640 Log: Fix build with SMP disabled.` Reported by: bf Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jan 19 00:53:36 2013 (r245639) +++ head/sys/amd64/amd64/pmap.c Sat Jan 19 01:18:22 2013 (r245640) @@ -102,6 +102,7 @@ __FBSDID("$FreeBSD$"); #include "opt_vm.h" #include +#include #include #include #include @@ -133,6 +134,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jan 19 00:53:36 2013 (r245639) +++ head/sys/i386/i386/pmap.c Sat Jan 19 01:18:22 2013 (r245640) @@ -136,6 +136,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DEV_APIC +#include +#include +#include +#endif #include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 01:19:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E08A3A7A; Sat, 19 Jan 2013 01:19:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id AF4881F1; Sat, 19 Jan 2013 01:19:26 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 02F31B91E; Fri, 18 Jan 2013 20:19:25 -0500 (EST) Message-ID: <50F9F49D.5040000@FreeBSD.org> Date: Fri, 18 Jan 2013 20:19:25 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andrew Turner Subject: Re: svn commit: r245610 - head/bin/ps References: <201301181824.r0IIOfxd094865@svn.freebsd.org> <20130119112953.7a9aa66e@fubar.geek.nz> <50F9E354.1070709@FreeBSD.org> In-Reply-To: <50F9E354.1070709@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 18 Jan 2013 20:19:26 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 01:19:27 -0000 On 1/18/13 7:05 PM, John Baldwin wrote: > On 1/18/13 5:29 PM, Andrew Turner wrote: >> On Fri, 18 Jan 2013 18:24:41 +0000 (UTC) >> John Baldwin wrote: >> >>> Author: jhb >>> Date: Fri Jan 18 18:24:40 2013 >>> New Revision: 245610 >>> URL: http://svnweb.freebsd.org/changeset/base/245610 >>> >>> Log: >>> Include the thread name along with the command name when displaying >>> the command name of a thread from a multi-threaded process that >>> doesn't have an available argument list (such as kernel processes) >>> and threads display is enabled via -H. >>> >>> Reviewed by: alfred, delphij, eric@vangyzen.net >>> MFC after: 1 week >> >> This breaks usr.bin/w as it includes bin/ps/fmt.c in it's build but >> doesn't have the showthreads variable defined. > > Ugh. It requires a bit more fixing than that even since w uses > fmt_argv() directly (and it had a stale prototype to boot). I have > a fix to get both ps and w to build but am waiting for a full world > to finish first in case some other place (ab)uses this. This should be fixed, sorry for the breakage. :( -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 02:22:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EB72A46D; Sat, 19 Jan 2013 02:22:01 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DD806398; Sat, 19 Jan 2013 02:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J2M1pv039014; Sat, 19 Jan 2013 02:22:01 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J2M1no039012; Sat, 19 Jan 2013 02:22:01 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190222.r0J2M1no039012@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 02:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245641 - head/contrib/compiler-rt/lib/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 02:22:02 -0000 Author: andrew Date: Sat Jan 19 02:22:01 2013 New Revision: 245641 URL: http://svnweb.freebsd.org/changeset/base/245641 Log: Add a newline at the end of the file to stop gcc from complaining Modified: head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S Modified: head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S Sat Jan 19 01:18:22 2013 (r245640) +++ head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S Sat Jan 19 02:22:01 2013 (r245641) @@ -27,4 +27,5 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_uldiv ldr r2, [sp, #8] ldr r3, [sp, #12] add sp, sp, #16 - pop {r11, pc} \ No newline at end of file + pop {r11, pc} + From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 02:24:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 368265F7; Sat, 19 Jan 2013 02:24:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2865C3D2; Sat, 19 Jan 2013 02:24:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J2OFRB039335; Sat, 19 Jan 2013 02:24:15 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J2OFn6039334; Sat, 19 Jan 2013 02:24:15 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190224.r0J2OFn6039334@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 02:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245642 - head/contrib/compiler-rt/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 02:24:15 -0000 Author: andrew Date: Sat Jan 19 02:24:14 2013 New Revision: 245642 URL: http://svnweb.freebsd.org/changeset/base/245642 Log: Don't use the pcs attribute on compilers that don't support it. We can revert this when we stop supporting old versions of gcc. Modified: head/contrib/compiler-rt/lib/int_lib.h Modified: head/contrib/compiler-rt/lib/int_lib.h ============================================================================== --- head/contrib/compiler-rt/lib/int_lib.h Sat Jan 19 02:22:01 2013 (r245641) +++ head/contrib/compiler-rt/lib/int_lib.h Sat Jan 19 02:24:14 2013 (r245642) @@ -25,7 +25,15 @@ #if __ARM_EABI__ # define ARM_EABI_FNALIAS(aeabi_name, name) \ void __aeabi_##aeabi_name() __attribute__((alias("__" #name))); -# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) + +# if !defined(__clang__) && defined(__GNUC__) && \ + (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 5) +/* The pcs attribute was introduced in GCC 4.5.0 */ +# define COMPILER_RT_ABI +# else +# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) +# endif + #else # define ARM_EABI_FNALIAS(aeabi_name, name) # define COMPILER_RT_ABI From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 02:28:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 20CF0857; Sat, 19 Jan 2013 02:28:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 139273F6; Sat, 19 Jan 2013 02:28:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J2Si22040079; Sat, 19 Jan 2013 02:28:44 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J2Si4W040078; Sat, 19 Jan 2013 02:28:44 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190228.r0J2Si4W040078@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 02:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245643 - head/lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 02:28:45 -0000 Author: andrew Date: Sat Jan 19 02:28:44 2013 New Revision: 245643 URL: http://svnweb.freebsd.org/changeset/base/245643 Log: Add the __aeabi_*divmod functions to the compiler-rt build Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Sat Jan 19 02:24:14 2013 (r245642) +++ head/lib/libcompiler_rt/Makefile Sat Jan 19 02:28:44 2013 (r245643) @@ -181,6 +181,13 @@ SRCS+= ${file}.c . endif .endfor +.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +SRCS+= aeabi_idivmod.S \ + aeabi_ldivmod.S \ + aeabi_uidivmod.S \ + aeabi_uldivmod.S +.endif + .if ${MACHINE_CPUARCH} != "mips" . if ${MK_INSTALLLIB} != "no" SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 02:33:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CF8DEBDE; Sat, 19 Jan 2013 02:33:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C1A1563B; Sat, 19 Jan 2013 02:33:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J2Xvar042644; Sat, 19 Jan 2013 02:33:57 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J2Xvvn042643; Sat, 19 Jan 2013 02:33:57 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190233.r0J2Xvvn042643@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 02:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245644 - head/lib/libc/quad X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 02:33:57 -0000 Author: andrew Date: Sat Jan 19 02:33:57 2013 New Revision: 245644 URL: http://svnweb.freebsd.org/changeset/base/245644 Log: For ARM EABI we only need a subset of the quad functions, the rest are provided by libgcc. Modified: head/lib/libc/quad/Makefile.inc Modified: head/lib/libc/quad/Makefile.inc ============================================================================== --- head/lib/libc/quad/Makefile.inc Sat Jan 19 02:28:44 2013 (r245643) +++ head/lib/libc/quad/Makefile.inc Sat Jan 19 02:33:57 2013 (r245644) @@ -8,6 +8,10 @@ SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c +.elif ${LIBC_ARCH} == "arm" && ${MK_ARM_EABI} != "no" + +SRCS+= adddi3.c anddi3.c floatunsdidf.c iordi3.c lshldi3.c notdi2.c \ + qdivrem.c subdi3.c xordi3.c .else SRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c fixdfdi.c \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 03:19:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C3533976; Sat, 19 Jan 2013 03:19:40 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9294F81C; Sat, 19 Jan 2013 03:19:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J3Jeps056379; Sat, 19 Jan 2013 03:19:40 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J3Jeu0056377; Sat, 19 Jan 2013 03:19:40 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201301190319.r0J3Jeu0056377@svn.freebsd.org> From: Alexander Kabaev Date: Sat, 19 Jan 2013 03:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245647 - in head/sys: cam/scsi dev/usb/storage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 03:19:40 -0000 Author: kan Date: Sat Jan 19 03:19:39 2013 New Revision: 245647 URL: http://svnweb.freebsd.org/changeset/base/245647 Log: Do not pretend to have autosense data when no such data is available. Make umass return an error code if SCSI sense retrieval request has failed. Make sure scsi_error_action honors SF_NO_RETRY and SF_NO_RECOVERY in all cases, even if it cannot parse sense bytes. Reviewed by: hselasky (umass), scottl (cam) Modified: head/sys/cam/scsi/scsi_all.c head/sys/dev/usb/storage/umass.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Sat Jan 19 03:13:04 2013 (r245646) +++ head/sys/cam/scsi/scsi_all.c Sat Jan 19 03:19:39 2013 (r245647) @@ -3071,16 +3071,15 @@ scsi_error_action(struct ccb_scsiio *csi SSQ_PRINT_SENSE; } } - if ((action & SS_MASK) >= SS_START && - (sense_flags & SF_NO_RECOVERY)) { - action &= ~SS_MASK; - action |= SS_FAIL; - } else if ((action & SS_MASK) == SS_RETRY && - (sense_flags & SF_NO_RETRY)) { - action &= ~SS_MASK; - action |= SS_FAIL; - } - + } + if ((action & SS_MASK) >= SS_START && + (sense_flags & SF_NO_RECOVERY)) { + action &= ~SS_MASK; + action |= SS_FAIL; + } else if ((action & SS_MASK) == SS_RETRY && + (sense_flags & SF_NO_RETRY)) { + action &= ~SS_MASK; + action |= SS_FAIL; } if ((sense_flags & SF_PRINT_ALWAYS) != 0) action |= SSQ_PRINT_SENSE; Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Sat Jan 19 03:13:04 2013 (r245646) +++ head/sys/dev/usb/storage/umass.c Sat Jan 19 03:19:39 2013 (r245647) @@ -2602,9 +2602,13 @@ umass_cam_sense_cb(struct umass_softc *s } } else { xpt_freeze_devq(ccb->ccb_h.path, 1); - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR - | CAM_AUTOSNS_VALID | CAM_DEV_QFRZN; - ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + if (key >= 0) { + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR + | CAM_AUTOSNS_VALID | CAM_DEV_QFRZN; + ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + } else + ccb->ccb_h.status = CAM_AUTOSENSE_FAIL + | CAM_DEV_QFRZN; } xpt_done(ccb); break; From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 03:34:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DEF3CD5E; Sat, 19 Jan 2013 03:34:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D0D7E87C; Sat, 19 Jan 2013 03:34:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J3Y2A0061477; Sat, 19 Jan 2013 03:34:02 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J3Y2Hh061476; Sat, 19 Jan 2013 03:34:02 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201301190334.r0J3Y2Hh061476@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 19 Jan 2013 03:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245648 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 03:34:02 -0000 Author: pfg Date: Sat Jan 19 03:34:02 2013 New Revision: 245648 URL: http://svnweb.freebsd.org/changeset/base/245648 Log: newfs_msdos: cosmetical cleanups - Simplify diagnostic messages. - Adopt lowercase first letters to make the messages more canonical. PR: bin/175404 Submitted by: Christoph Mallon Reviewed by: bde MFC after: 3 days Modified: head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Sat Jan 19 03:19:39 2013 (r245647) +++ head/sbin/newfs_msdos/newfs_msdos.c Sat Jan 19 03:34:02 2013 (r245648) @@ -808,7 +808,7 @@ getdiskinfo(int fd, const char *fname, c struct stat st; if (fstat(fd, &st)) - err(1, "Cannot get disk size"); + err(1, "cannot get disk size"); /* create a fake geometry for a file image */ ms = st.st_size; dlp.d_secsize = 512; @@ -832,18 +832,18 @@ getdiskinfo(int fd, const char *fname, c if (ioctl(fd, DIOCGDINFO, &dlp) == -1) { if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) - errx(1, "Cannot get sector size, %s", strerror(errno)); + err(1, "cannot get sector size"); dlp.d_secperunit = ms / dlp.d_secsize; if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { - warnx("Cannot get number of sectors per track, %s", strerror(errno)); + warn("cannot get number of sectors per track"); dlp.d_nsectors = 63; } if (bpb->bpbHeads == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { - warnx("Cannot get number of heads, %s", strerror(errno)); + warn("cannot get number of heads"); if (dlp.d_secperunit <= 63*1*1024) dlp.d_ntracks = 1; else if (dlp.d_secperunit <= 63*16*1024) From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 03:47:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EECA7132; Sat, 19 Jan 2013 03:47:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D6E228CE; Sat, 19 Jan 2013 03:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J3lIaA064832; Sat, 19 Jan 2013 03:47:18 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J3lIBf064831; Sat, 19 Jan 2013 03:47:18 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190347.r0J3lIBf064831@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 03:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245649 - head/lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 03:47:19 -0000 Author: andrew Date: Sat Jan 19 03:47:18 2013 New Revision: 245649 URL: http://svnweb.freebsd.org/changeset/base/245649 Log: There should have been a tab after SRCS+= Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Sat Jan 19 03:34:02 2013 (r245648) +++ head/lib/libcompiler_rt/Makefile Sat Jan 19 03:47:18 2013 (r245649) @@ -182,7 +182,7 @@ SRCS+= ${file}.c .endfor .if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" -SRCS+= aeabi_idivmod.S \ +SRCS+= aeabi_idivmod.S \ aeabi_ldivmod.S \ aeabi_uidivmod.S \ aeabi_uldivmod.S From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 04:03:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A58A73DA; Sat, 19 Jan 2013 04:03:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8CCF190A; Sat, 19 Jan 2013 04:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J43J3N070272; Sat, 19 Jan 2013 04:03:19 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J43JpQ070271; Sat, 19 Jan 2013 04:03:19 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190403.r0J43JpQ070271@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 04:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245650 - head/lib/libc/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 04:03:19 -0000 Author: andrew Date: Sat Jan 19 04:03:18 2013 New Revision: 245650 URL: http://svnweb.freebsd.org/changeset/base/245650 Log: Update the syscall calling convention for ARM EABI. We store the syscall in r7 and use ip to store the old version of r7 as it is not guaranteed to be kept when calling a subroutine. The kernel will preserve the register across system calls. Modified: head/lib/libc/arm/SYS.h Modified: head/lib/libc/arm/SYS.h ============================================================================== --- head/lib/libc/arm/SYS.h Sat Jan 19 03:47:18 2013 (r245649) +++ head/lib/libc/arm/SYS.h Sat Jan 19 04:03:18 2013 (r245650) @@ -39,7 +39,15 @@ #include #include +#ifdef __ARM_EABI__ +#define SYSTRAP(x) \ + mov ip, r7; \ + ldr r7, =SYS_ ## x; \ + swi 0; \ + mov r7, ip +#else #define SYSTRAP(x) swi 0 | SYS_ ## x +#endif #define CERROR _C_LABEL(cerror) #define CURBRK _C_LABEL(curbrk) From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 04:11:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DC57967C; Sat, 19 Jan 2013 04:11:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B5FAA93D; Sat, 19 Jan 2013 04:11:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J4Bkld073396; Sat, 19 Jan 2013 04:11:46 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J4Bjm0073391; Sat, 19 Jan 2013 04:11:45 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190411.r0J4Bjm0073391@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 04:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245651 - in head/lib: libc/arm libc/arm/gen libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 04:11:46 -0000 Author: andrew Date: Sat Jan 19 04:11:45 2013 New Revision: 245651 URL: http://svnweb.freebsd.org/changeset/base/245651 Log: Use the compiler-rt version __{u,}divsi3 and __{u,}modsi3 on ARM EABI Added: head/lib/libc/arm/Symbol_oabi.map (contents, props changed) Modified: head/lib/libc/arm/Makefile.inc head/lib/libc/arm/Symbol.map head/lib/libc/arm/gen/Makefile.inc head/lib/libcompiler_rt/Makefile Modified: head/lib/libc/arm/Makefile.inc ============================================================================== --- head/lib/libc/arm/Makefile.inc Sat Jan 19 04:03:18 2013 (r245650) +++ head/lib/libc/arm/Makefile.inc Sat Jan 19 04:11:45 2013 (r245651) @@ -8,3 +8,9 @@ SOFTFLOAT_BITS=32 # Long double is just double precision. MDSRCS+=machdep_ldisd.c SYM_MAPS+=${.CURDIR}/arm/Symbol.map + +.if ${MK_ARM_EABI} == "no" +# This contains the symbols that were removed when moving to the ARM EABI +SYM_MAPS+=${.CURDIR}/arm/Symbol_oabi.map +.endif + Modified: head/lib/libc/arm/Symbol.map ============================================================================== --- head/lib/libc/arm/Symbol.map Sat Jan 19 04:03:18 2013 (r245650) +++ head/lib/libc/arm/Symbol.map Sat Jan 19 04:11:45 2013 (r245651) @@ -46,10 +46,6 @@ FBSDprivate_1.0 { _set_tp; __aeabi_read_tp; ___longjmp; - __umodsi3; - __modsi3; - __udivsi3; - __divsi3; __makecontext; __longjmp; signalcontext; Added: head/lib/libc/arm/Symbol_oabi.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/Symbol_oabi.map Sat Jan 19 04:11:45 2013 (r245651) @@ -0,0 +1,16 @@ +/* + * $FreeBSD$ + */ + +/* + * This only needs to contain symbols that are not listed in + * symbol maps from other parts of libc (i.e., not found in + * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...) + * and are not used in the ARM EABI. + */ +FBSDprivate_1.0 { + __umodsi3; + __modsi3; + __udivsi3; + __divsi3; +}; Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Sat Jan 19 04:03:18 2013 (r245650) +++ head/lib/libc/arm/gen/Makefile.inc Sat Jan 19 04:11:45 2013 (r245651) @@ -3,4 +3,8 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ getcontextx.c infinity.c ldexp.c makecontext.c \ - __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c + __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c + +.if ${MK_ARM_EABI} == "no" +SRCS+= divsi3.S +.endif Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Sat Jan 19 04:03:18 2013 (r245650) +++ head/lib/libcompiler_rt/Makefile Sat Jan 19 04:11:45 2013 (r245651) @@ -136,18 +136,22 @@ SRCF+= adddf3 \ addsf3 \ divdf3 \ divsf3 \ - divsi3 \ extendsfdf2 \ fixdfsi \ fixsfsi \ floatsidf \ floatsisf \ - modsi3 \ muldf3 \ mulsf3 \ subdf3 \ subsf3 \ - truncdfsf2 \ + truncdfsf2 +.endif + +.if ${MACHINE_CPUARCH} != "mips" && \ + (${MACHINE_CPUARCH} != "arm" || ${MK_ARM_EABI} != "no") +SRCF+= divsi3 \ + modsi3 \ udivsi3 \ umodsi3 .endif From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 04:18:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5062587D; Sat, 19 Jan 2013 04:18:54 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 40AF99A0; Sat, 19 Jan 2013 04:18:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J4Is7b074583; Sat, 19 Jan 2013 04:18:54 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J4IquZ074573; Sat, 19 Jan 2013 04:18:52 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201301190418.r0J4IquZ074573@svn.freebsd.org> From: Neel Natu Date: Sat, 19 Jan 2013 04:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245652 - in head: lib share/man/man4 share/mk sys/amd64/include sys/conf sys/modules usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 04:18:54 -0000 Author: neel Date: Sat Jan 19 04:18:52 2013 New Revision: 245652 URL: http://svnweb.freebsd.org/changeset/base/245652 Log: Merge projects/bhyve to head. 'bhyve' was developed by grehan@ and myself at NetApp (thanks!). Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their support and encouragement. Obtained from: NetApp Added: - copied from r245640, projects/bhyve/lib/libvmmapi/ - copied unchanged from r245640, projects/bhyve/share/man/man4/bhyve.4 - copied unchanged from r245640, projects/bhyve/sys/amd64/include/vmm.h - copied unchanged from r245640, projects/bhyve/sys/amd64/include/vmm_dev.h - copied unchanged from r245640, projects/bhyve/sys/amd64/include/vmm_instruction_emul.h - copied from r245640, projects/bhyve/sys/amd64/vmm/ - copied from r245640, projects/bhyve/sys/dev/blackhole/ - copied from r245640, projects/bhyve/sys/dev/bvm/ - copied from r245640, projects/bhyve/sys/modules/blackhole/ - copied from r245640, projects/bhyve/sys/modules/vmm/ - copied from r245640, projects/bhyve/usr.sbin/bhyve/ - copied from r245640, projects/bhyve/usr.sbin/bhyvectl/ - copied from r245640, projects/bhyve/usr.sbin/bhyveload/ Directory Properties: head/lib/libvmmapi/ (props changed) head/share/man/man4/bhyve.4 (props changed) head/sys/amd64/include/vmm.h (props changed) head/sys/amd64/include/vmm_dev.h (props changed) head/sys/amd64/include/vmm_instruction_emul.h (props changed) head/sys/amd64/vmm/ (props changed) head/sys/dev/blackhole/ (props changed) head/sys/dev/bvm/ (props changed) head/sys/modules/blackhole/ (props changed) head/sys/modules/vmm/ (props changed) head/usr.sbin/bhyve/ (props changed) head/usr.sbin/bhyvectl/ (props changed) head/usr.sbin/bhyveload/ (props changed) Modified: head/lib/Makefile head/share/mk/bsd.libnames.mk head/sys/conf/files.amd64 head/sys/modules/Makefile head/usr.sbin/Makefile.amd64 Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Jan 19 04:11:45 2013 (r245651) +++ head/lib/Makefile Sat Jan 19 04:18:52 2013 (r245652) @@ -115,6 +115,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libusbhid} \ ${_libusb} \ ${_libvgl} \ + ${_libvmmapi} \ libwrap \ liby \ libz \ @@ -198,6 +199,10 @@ _libproc= libproc _librtld_db= librtld_db .endif +.if ${MACHINE_CPUARCH} == "amd64" +_libvmmapi= libvmmapi +.endif + .if ${MACHINE_CPUARCH} == "ia64" _libefi= libefi .endif Copied: head/share/man/man4/bhyve.4 (from r245640, projects/bhyve/share/man/man4/bhyve.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bhyve.4 Sat Jan 19 04:18:52 2013 (r245652, copy of r245640, projects/bhyve/share/man/man4/bhyve.4) @@ -0,0 +1,68 @@ +.\" +.\" Copyright (c) 2012 NetApp 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 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 January 5, 2013 +.Dt BHYVE 4 +.Os +.Sh NAME +.Nm bhyve +.Nd virtual machine monitor +.Sh SYNOPSIS +.Cd "/usr/sbin/bhyve" +.Cd "/usr/sbin/bhyveload" +.Cd "/usr/sbin/bhyvectl" +.Cd "/boot/kernel/vmm.ko" +.Sh DESCRIPTION +.Nm +is a virtual machine monitor that is hosted by FreeBSD. It is used to host +unmodified guest operating systems on top of FreeBSD. +.Pp +.Nm +relies heavily on hardware assist provided by the CPU and chipset to virtualize +processor and memory resources. +.Sh SEE ALSO +.Xr bhyve 8 , +.Xr bhyveload 8 , +.Xr bhyvectl 8 , +.Xr vmm 4 +.Sh HISTORY +.Nm +first appeared in +.Fx 10.0 , +and was developed at NetApp Inc. +.Sh AUTHORS +.Nm +was developed by +.An -nosplit +.An "Peter Grehan" Aq grehan@FreeBSD.org +and +.An "Neel Natu" Aq neel@FreeBSD.org +at NetApp Inc. +.Sh BUGS +.Nm +is considered experimental in +.Fx . Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sat Jan 19 04:11:45 2013 (r245651) +++ head/share/mk/bsd.libnames.mk Sat Jan 19 04:18:52 2013 (r245652) @@ -162,6 +162,7 @@ LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a LIBUTIL?= ${DESTDIR}${LIBDIR}/libutil.a LIBUUTIL?= ${DESTDIR}${LIBDIR}/libuutil.a LIBVGL?= ${DESTDIR}${LIBDIR}/libvgl.a +LIBVMMAPI?= ${DESTDIR}${LIBDIR}/libvmmapi.a LIBWIND?= ${DESTDIR}${LIBDIR}/libwind.a LIBWRAP?= ${DESTDIR}${LIBDIR}/libwrap.a LIBXPG4?= ${DESTDIR}${LIBDIR}/libxpg4.a Copied: head/sys/amd64/include/vmm.h (from r245640, projects/bhyve/sys/amd64/include/vmm.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/vmm.h Sat Jan 19 04:18:52 2013 (r245652, copy of r245640, projects/bhyve/sys/amd64/include/vmm.h) @@ -0,0 +1,293 @@ +/*- + * Copyright (c) 2011 NetApp, 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 NETAPP, INC ``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 NETAPP, INC 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: vmm.h 482 2011-05-09 21:22:43Z grehan $ + */ + +#ifndef _VMM_H_ +#define _VMM_H_ + +#ifdef _KERNEL + +#define VM_MAX_NAMELEN 32 + +struct vm; +struct vm_memory_segment; +struct seg_desc; +struct vm_exit; +struct vm_run; +struct vlapic; + +enum x2apic_state; + +typedef int (*vmm_init_func_t)(void); +typedef int (*vmm_cleanup_func_t)(void); +typedef void * (*vmi_init_func_t)(struct vm *vm); /* instance specific apis */ +typedef int (*vmi_run_func_t)(void *vmi, int vcpu, register_t rip); +typedef void (*vmi_cleanup_func_t)(void *vmi); +typedef int (*vmi_mmap_set_func_t)(void *vmi, vm_paddr_t gpa, + vm_paddr_t hpa, size_t length, + vm_memattr_t attr, int prot, + boolean_t superpages_ok); +typedef vm_paddr_t (*vmi_mmap_get_func_t)(void *vmi, vm_paddr_t gpa); +typedef int (*vmi_get_register_t)(void *vmi, int vcpu, int num, + uint64_t *retval); +typedef int (*vmi_set_register_t)(void *vmi, int vcpu, int num, + uint64_t val); +typedef int (*vmi_get_desc_t)(void *vmi, int vcpu, int num, + struct seg_desc *desc); +typedef int (*vmi_set_desc_t)(void *vmi, int vcpu, int num, + struct seg_desc *desc); +typedef int (*vmi_inject_event_t)(void *vmi, int vcpu, + int type, int vector, + uint32_t code, int code_valid); +typedef int (*vmi_get_cap_t)(void *vmi, int vcpu, int num, int *retval); +typedef int (*vmi_set_cap_t)(void *vmi, int vcpu, int num, int val); + +struct vmm_ops { + vmm_init_func_t init; /* module wide initialization */ + vmm_cleanup_func_t cleanup; + + vmi_init_func_t vminit; /* vm-specific initialization */ + vmi_run_func_t vmrun; + vmi_cleanup_func_t vmcleanup; + vmi_mmap_set_func_t vmmmap_set; + vmi_mmap_get_func_t vmmmap_get; + vmi_get_register_t vmgetreg; + vmi_set_register_t vmsetreg; + vmi_get_desc_t vmgetdesc; + vmi_set_desc_t vmsetdesc; + vmi_inject_event_t vminject; + vmi_get_cap_t vmgetcap; + vmi_set_cap_t vmsetcap; +}; + +extern struct vmm_ops vmm_ops_intel; +extern struct vmm_ops vmm_ops_amd; + +struct vm *vm_create(const char *name); +void vm_destroy(struct vm *vm); +const char *vm_name(struct vm *vm); +int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len); +int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); +int vm_unmap_mmio(struct vm *vm, vm_paddr_t gpa, size_t len); +vm_paddr_t vm_gpa2hpa(struct vm *vm, vm_paddr_t gpa, size_t size); +int vm_gpabase2memseg(struct vm *vm, vm_paddr_t gpabase, + struct vm_memory_segment *seg); +int vm_get_register(struct vm *vm, int vcpu, int reg, uint64_t *retval); +int vm_set_register(struct vm *vm, int vcpu, int reg, uint64_t val); +int vm_get_seg_desc(struct vm *vm, int vcpu, int reg, + struct seg_desc *ret_desc); +int vm_set_seg_desc(struct vm *vm, int vcpu, int reg, + struct seg_desc *desc); +int vm_get_pinning(struct vm *vm, int vcpu, int *cpuid); +int vm_set_pinning(struct vm *vm, int vcpu, int cpuid); +int vm_run(struct vm *vm, struct vm_run *vmrun); +int vm_inject_event(struct vm *vm, int vcpu, int type, + int vector, uint32_t error_code, int error_code_valid); +int vm_inject_nmi(struct vm *vm, int vcpu); +int vm_nmi_pending(struct vm *vm, int vcpuid); +void vm_nmi_clear(struct vm *vm, int vcpuid); +uint64_t *vm_guest_msrs(struct vm *vm, int cpu); +struct vlapic *vm_lapic(struct vm *vm, int cpu); +int vm_get_capability(struct vm *vm, int vcpu, int type, int *val); +int vm_set_capability(struct vm *vm, int vcpu, int type, int val); +int vm_get_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state *state); +int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state); +void vm_activate_cpu(struct vm *vm, int vcpu); +cpuset_t vm_active_cpus(struct vm *vm); +struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid); + +/* + * Return 1 if device indicated by bus/slot/func is supposed to be a + * pci passthrough device. + * + * Return 0 otherwise. + */ +int vmm_is_pptdev(int bus, int slot, int func); + +void *vm_iommu_domain(struct vm *vm); + +enum vcpu_state { + VCPU_IDLE, + VCPU_RUNNING, + VCPU_CANNOT_RUN, +}; + +int vcpu_set_state(struct vm *vm, int vcpu, enum vcpu_state state); +enum vcpu_state vcpu_get_state(struct vm *vm, int vcpu); + +static int __inline +vcpu_is_running(struct vm *vm, int vcpu) +{ + return (vcpu_get_state(vm, vcpu) == VCPU_RUNNING); +} + +void *vcpu_stats(struct vm *vm, int vcpu); +void vm_interrupt_hostcpu(struct vm *vm, int vcpu); + +#endif /* KERNEL */ + +#include + +#define VM_MAXCPU 8 /* maximum virtual cpus */ + +/* + * Identifiers for events that can be injected into the VM + */ +enum vm_event_type { + VM_EVENT_NONE, + VM_HW_INTR, + VM_NMI, + VM_HW_EXCEPTION, + VM_SW_INTR, + VM_PRIV_SW_EXCEPTION, + VM_SW_EXCEPTION, + VM_EVENT_MAX +}; + +/* + * Identifiers for architecturally defined registers. + */ +enum vm_reg_name { + VM_REG_GUEST_RAX, + VM_REG_GUEST_RBX, + VM_REG_GUEST_RCX, + VM_REG_GUEST_RDX, + VM_REG_GUEST_RSI, + VM_REG_GUEST_RDI, + VM_REG_GUEST_RBP, + VM_REG_GUEST_R8, + VM_REG_GUEST_R9, + VM_REG_GUEST_R10, + VM_REG_GUEST_R11, + VM_REG_GUEST_R12, + VM_REG_GUEST_R13, + VM_REG_GUEST_R14, + VM_REG_GUEST_R15, + VM_REG_GUEST_CR0, + VM_REG_GUEST_CR3, + VM_REG_GUEST_CR4, + VM_REG_GUEST_DR7, + VM_REG_GUEST_RSP, + VM_REG_GUEST_RIP, + VM_REG_GUEST_RFLAGS, + VM_REG_GUEST_ES, + VM_REG_GUEST_CS, + VM_REG_GUEST_SS, + VM_REG_GUEST_DS, + VM_REG_GUEST_FS, + VM_REG_GUEST_GS, + VM_REG_GUEST_LDTR, + VM_REG_GUEST_TR, + VM_REG_GUEST_IDTR, + VM_REG_GUEST_GDTR, + VM_REG_GUEST_EFER, + VM_REG_LAST +}; + +/* + * Identifiers for optional vmm capabilities + */ +enum vm_cap_type { + VM_CAP_HALT_EXIT, + VM_CAP_MTRAP_EXIT, + VM_CAP_PAUSE_EXIT, + VM_CAP_UNRESTRICTED_GUEST, + VM_CAP_MAX +}; + +enum x2apic_state { + X2APIC_ENABLED, + X2APIC_AVAILABLE, + X2APIC_DISABLED, + X2APIC_STATE_LAST +}; + +/* + * The 'access' field has the format specified in Table 21-2 of the Intel + * Architecture Manual vol 3b. + * + * XXX The contents of the 'access' field are architecturally defined except + * bit 16 - Segment Unusable. + */ +struct seg_desc { + uint64_t base; + uint32_t limit; + uint32_t access; +}; + +enum vm_exitcode { + VM_EXITCODE_INOUT, + VM_EXITCODE_VMX, + VM_EXITCODE_BOGUS, + VM_EXITCODE_RDMSR, + VM_EXITCODE_WRMSR, + VM_EXITCODE_HLT, + VM_EXITCODE_MTRAP, + VM_EXITCODE_PAUSE, + VM_EXITCODE_PAGING, + VM_EXITCODE_SPINUP_AP, + VM_EXITCODE_MAX +}; + +struct vm_exit { + enum vm_exitcode exitcode; + int inst_length; /* 0 means unknown */ + uint64_t rip; + union { + struct { + uint16_t bytes:3; /* 1 or 2 or 4 */ + uint16_t in:1; /* out is 0, in is 1 */ + uint16_t string:1; + uint16_t rep:1; + uint16_t port; + uint32_t eax; /* valid for out */ + } inout; + struct { + uint64_t gpa; + struct vie vie; + } paging; + /* + * VMX specific payload. Used when there is no "better" + * exitcode to represent the VM-exit. + */ + struct { + int error; /* vmx inst error */ + uint32_t exit_reason; + uint64_t exit_qualification; + } vmx; + struct { + uint32_t code; /* ecx value */ + uint64_t wval; + } msr; + struct { + int vcpu; + uint64_t rip; + } spinup_ap; + } u; +}; + +#endif /* _VMM_H_ */ Copied: head/sys/amd64/include/vmm_dev.h (from r245640, projects/bhyve/sys/amd64/include/vmm_dev.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/vmm_dev.h Sat Jan 19 04:18:52 2013 (r245652, copy of r245640, projects/bhyve/sys/amd64/include/vmm_dev.h) @@ -0,0 +1,215 @@ +/*- + * Copyright (c) 2011 NetApp, 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 NETAPP, INC ``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 NETAPP, INC 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: vmm_dev.h 482 2011-05-09 21:22:43Z grehan $ + */ + +#ifndef _VMM_DEV_H_ +#define _VMM_DEV_H_ + +#ifdef _KERNEL +void vmmdev_init(void); +int vmmdev_cleanup(void); +#endif + +struct vm_memory_segment { + vm_paddr_t gpa; /* in */ + size_t len; /* in */ +}; + +struct vm_register { + int cpuid; + int regnum; /* enum vm_reg_name */ + uint64_t regval; +}; + +struct vm_seg_desc { /* data or code segment */ + int cpuid; + int regnum; /* enum vm_reg_name */ + struct seg_desc desc; +}; + +struct vm_pin { + int vm_cpuid; + int host_cpuid; /* -1 to unpin */ +}; + +struct vm_run { + int cpuid; + uint64_t rip; /* start running here */ + struct vm_exit vm_exit; +}; + +struct vm_event { + int cpuid; + enum vm_event_type type; + int vector; + uint32_t error_code; + int error_code_valid; +}; + +struct vm_lapic_irq { + int cpuid; + int vector; +}; + +struct vm_capability { + int cpuid; + enum vm_cap_type captype; + int capval; + int allcpus; +}; + +struct vm_pptdev { + int bus; + int slot; + int func; +}; + +struct vm_pptdev_mmio { + int bus; + int slot; + int func; + vm_paddr_t gpa; + vm_paddr_t hpa; + size_t len; +}; + +struct vm_pptdev_msi { + int vcpu; + int bus; + int slot; + int func; + int numvec; /* 0 means disabled */ + int vector; + int destcpu; +}; + +struct vm_pptdev_msix { + int vcpu; + int bus; + int slot; + int func; + int idx; + uint32_t msg; + uint32_t vector_control; + uint64_t addr; +}; + +struct vm_nmi { + int cpuid; +}; + +#define MAX_VM_STATS 64 +struct vm_stats { + int cpuid; /* in */ + int num_entries; /* out */ + struct timeval tv; + uint64_t statbuf[MAX_VM_STATS]; +}; + +struct vm_stat_desc { + int index; /* in */ + char desc[128]; /* out */ +}; + +struct vm_x2apic { + int cpuid; + enum x2apic_state state; +}; + +enum { + IOCNUM_RUN, + IOCNUM_SET_PINNING, + IOCNUM_GET_PINNING, + IOCNUM_MAP_MEMORY, + IOCNUM_GET_MEMORY_SEG, + IOCNUM_SET_REGISTER, + IOCNUM_GET_REGISTER, + IOCNUM_SET_SEGMENT_DESCRIPTOR, + IOCNUM_GET_SEGMENT_DESCRIPTOR, + IOCNUM_INJECT_EVENT, + IOCNUM_LAPIC_IRQ, + IOCNUM_SET_CAPABILITY, + IOCNUM_GET_CAPABILITY, + IOCNUM_BIND_PPTDEV, + IOCNUM_UNBIND_PPTDEV, + IOCNUM_MAP_PPTDEV_MMIO, + IOCNUM_PPTDEV_MSI, + IOCNUM_PPTDEV_MSIX, + IOCNUM_INJECT_NMI, + IOCNUM_VM_STATS, + IOCNUM_VM_STAT_DESC, + IOCNUM_SET_X2APIC_STATE, + IOCNUM_GET_X2APIC_STATE, +}; + +#define VM_RUN \ + _IOWR('v', IOCNUM_RUN, struct vm_run) +#define VM_SET_PINNING \ + _IOW('v', IOCNUM_SET_PINNING, struct vm_pin) +#define VM_GET_PINNING \ + _IOWR('v', IOCNUM_GET_PINNING, struct vm_pin) +#define VM_MAP_MEMORY \ + _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) +#define VM_GET_MEMORY_SEG \ + _IOWR('v', IOCNUM_GET_MEMORY_SEG, struct vm_memory_segment) +#define VM_SET_REGISTER \ + _IOW('v', IOCNUM_SET_REGISTER, struct vm_register) +#define VM_GET_REGISTER \ + _IOWR('v', IOCNUM_GET_REGISTER, struct vm_register) +#define VM_SET_SEGMENT_DESCRIPTOR \ + _IOW('v', IOCNUM_SET_SEGMENT_DESCRIPTOR, struct vm_seg_desc) +#define VM_GET_SEGMENT_DESCRIPTOR \ + _IOWR('v', IOCNUM_GET_SEGMENT_DESCRIPTOR, struct vm_seg_desc) +#define VM_INJECT_EVENT \ + _IOW('v', IOCNUM_INJECT_EVENT, struct vm_event) +#define VM_LAPIC_IRQ \ + _IOW('v', IOCNUM_LAPIC_IRQ, struct vm_lapic_irq) +#define VM_SET_CAPABILITY \ + _IOW('v', IOCNUM_SET_CAPABILITY, struct vm_capability) +#define VM_GET_CAPABILITY \ + _IOWR('v', IOCNUM_GET_CAPABILITY, struct vm_capability) +#define VM_BIND_PPTDEV \ + _IOW('v', IOCNUM_BIND_PPTDEV, struct vm_pptdev) +#define VM_UNBIND_PPTDEV \ + _IOW('v', IOCNUM_UNBIND_PPTDEV, struct vm_pptdev) +#define VM_MAP_PPTDEV_MMIO \ + _IOW('v', IOCNUM_MAP_PPTDEV_MMIO, struct vm_pptdev_mmio) +#define VM_PPTDEV_MSI \ + _IOW('v', IOCNUM_PPTDEV_MSI, struct vm_pptdev_msi) +#define VM_PPTDEV_MSIX \ + _IOW('v', IOCNUM_PPTDEV_MSIX, struct vm_pptdev_msix) +#define VM_INJECT_NMI \ + _IOW('v', IOCNUM_INJECT_NMI, struct vm_nmi) +#define VM_STATS \ + _IOWR('v', IOCNUM_VM_STATS, struct vm_stats) +#define VM_STAT_DESC \ + _IOWR('v', IOCNUM_VM_STAT_DESC, struct vm_stat_desc) +#define VM_SET_X2APIC_STATE \ + _IOW('v', IOCNUM_SET_X2APIC_STATE, struct vm_x2apic) +#define VM_GET_X2APIC_STATE \ + _IOWR('v', IOCNUM_GET_X2APIC_STATE, struct vm_x2apic) +#endif Copied: head/sys/amd64/include/vmm_instruction_emul.h (from r245640, projects/bhyve/sys/amd64/include/vmm_instruction_emul.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/vmm_instruction_emul.h Sat Jan 19 04:18:52 2013 (r245652, copy of r245640, projects/bhyve/sys/amd64/include/vmm_instruction_emul.h) @@ -0,0 +1,113 @@ +/*- + * Copyright (c) 2012 NetApp, 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 NETAPP, INC ``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 NETAPP, INC 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 _VMM_INSTRUCTION_EMUL_H_ +#define _VMM_INSTRUCTION_EMUL_H_ + +/* + * The data structures 'vie' and 'vie_op' are meant to be opaque to the + * consumers of instruction decoding. The only reason why their contents + * need to be exposed is because they are part of the 'vm_exit' structure. + */ +struct vie_op { + uint8_t op_byte; /* actual opcode byte */ + uint8_t op_type; /* type of operation (e.g. MOV) */ + uint16_t op_flags; +}; + +#define VIE_INST_SIZE 15 +struct vie { + uint8_t inst[VIE_INST_SIZE]; /* instruction bytes */ + uint8_t num_valid; /* size of the instruction */ + uint8_t num_processed; + + uint8_t rex_w:1, /* REX prefix */ + rex_r:1, + rex_x:1, + rex_b:1; + + uint8_t mod:2, /* ModRM byte */ + reg:4, + rm:4; + + uint8_t ss:2, /* SIB byte */ + index:4, + base:4; + + uint8_t disp_bytes; + uint8_t imm_bytes; + + uint8_t scale; + int base_register; /* VM_REG_GUEST_xyz */ + int index_register; /* VM_REG_GUEST_xyz */ + + int64_t displacement; /* optional addr displacement */ + int64_t immediate; /* optional immediate operand */ + + uint8_t decoded; /* set to 1 if successfully decoded */ + + struct vie_op op; /* opcode description */ +}; + +/* + * Callback functions to read and write memory regions. + */ +typedef int (*mem_region_read_t)(void *vm, int cpuid, uint64_t gpa, + uint64_t *rval, int rsize, void *arg); + +typedef int (*mem_region_write_t)(void *vm, int cpuid, uint64_t gpa, + uint64_t wval, int wsize, void *arg); + +/* + * Emulate the decoded 'vie' instruction. + * + * The callbacks 'mrr' and 'mrw' emulate reads and writes to the memory region + * containing 'gpa'. 'mrarg' is an opaque argument that is passed into the + * callback functions. + * + * 'void *vm' should be 'struct vm *' when called from kernel context and + * 'struct vmctx *' when called from user context. + * s + */ +int vmm_emulate_instruction(void *vm, int cpuid, uint64_t gpa, struct vie *vie, + mem_region_read_t mrr, mem_region_write_t mrw, + void *mrarg); + +#ifdef _KERNEL +/* + * APIs to fetch and decode the instruction from nested page fault handler. + */ +int vmm_fetch_instruction(struct vm *vm, int cpuid, + uint64_t rip, int inst_length, uint64_t cr3, + struct vie *vie); + +int vmm_decode_instruction(struct vm *vm, int cpuid, + uint64_t gla, struct vie *vie); +#endif /* _KERNEL */ + +#endif /* _VMM_INSTRUCTION_EMUL_H_ */ Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Sat Jan 19 04:11:45 2013 (r245651) +++ head/sys/conf/files.amd64 Sat Jan 19 04:18:52 2013 (r245652) @@ -464,6 +464,11 @@ libkern/memset.c standard compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa contrib/x86emu/x86emu.c optional x86bios | atkbd | dpms | vesa # +# bvm console +# +dev/bvm/bvm_console.c optional bvmconsole +dev/bvm/bvm_dbg.c optional bvmdebug +# # x86 shared code between IA32, AMD64 and PC98 architectures # x86/acpica/OsdEnvironment.c optional acpi Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jan 19 04:11:45 2013 (r245651) +++ head/sys/modules/Makefile Sat Jan 19 04:18:52 2013 (r245652) @@ -48,6 +48,7 @@ SUBDIR= \ ${_bxe} \ ${_bios} \ ${_bktr} \ + ${_blackhole} \ ${_bm} \ bridgestp \ bwi \ @@ -335,6 +336,7 @@ SUBDIR= \ vge \ ${_viawd} \ vkbd \ + ${_vmm} \ ${_vpo} \ vr \ vte \ @@ -624,6 +626,7 @@ _amdtemp= amdtemp _arcmsr= arcmsr _asmc= asmc _bktr= bktr +_blackhole= blackhole _bxe= bxe _cardbus= cardbus _cbb= cbb @@ -720,6 +723,7 @@ _twa= twa _vesa= vesa _viawd= viawd _virtio= virtio +_vmm= vmm _vxge= vxge _x86bios= x86bios _wbwd= wbwd Modified: head/usr.sbin/Makefile.amd64 ============================================================================== --- head/usr.sbin/Makefile.amd64 Sat Jan 19 04:11:45 2013 (r245651) +++ head/usr.sbin/Makefile.amd64 Sat Jan 19 04:18:52 2013 (r245652) @@ -10,6 +10,9 @@ SUBDIR+= acpi SUBDIR+= apm .endif SUBDIR+= asf +SUBDIR+= bhyve +SUBDIR+= bhyvectl +SUBDIR+= bhyveload SUBDIR+= boot0cfg .if ${MK_TOOLCHAIN} != "no" SUBDIR+= btxld From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 04:34:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 43DB8A8E; Sat, 19 Jan 2013 04:34:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1FC179F8; Sat, 19 Jan 2013 04:34:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J4YYXL081343; Sat, 19 Jan 2013 04:34:34 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J4YXQC081342; Sat, 19 Jan 2013 04:34:33 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190434.r0J4YXQC081342@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 04:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245653 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 04:34:34 -0000 Author: andrew Date: Sat Jan 19 04:34:33 2013 New Revision: 245653 URL: http://svnweb.freebsd.org/changeset/base/245653 Log: When building for ARM EABI link against libgcc for the __aeabi_* functions. Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Sat Jan 19 04:18:52 2013 (r245652) +++ head/libexec/rtld-elf/Makefile Sat Jan 19 04:34:33 2013 (r245653) @@ -42,6 +42,16 @@ LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} LDADD= -lc_pic +.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +# Some of the required math functions (div & mod) are implemented in libgcc +# on ARM. The library also needs to be placed first to be correctly linked. +# As some of the functions are used before we have shared libraries. +DPADD+= ${LIBGCC} +LDADD+= -lgcc +.endif + + + .if ${MK_SYMVER} == "yes" LIBCDIR= ${TOPSRCDIR}/lib/libc VERSION_DEF= ${LIBCDIR}/Versions.def From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 05:33:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B5E24297; Sat, 19 Jan 2013 05:33:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2ABAF9; Sat, 19 Jan 2013 05:33:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J5XvYR000347; Sat, 19 Jan 2013 05:33:57 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J5XuV0000337; Sat, 19 Jan 2013 05:33:56 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190533.r0J5XuV0000337@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 05:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245655 - in head/lib/libc/arm: . aeabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 05:33:57 -0000 Author: andrew Date: Sat Jan 19 05:33:55 2013 New Revision: 245655 URL: http://svnweb.freebsd.org/changeset/base/245655 Log: Add the required __aeabi_* functions to libc. The floating point functions are here rather than compiler-rt because the libc softfloat code allows us to set the rounding mode. Added: head/lib/libc/arm/aeabi/ head/lib/libc/arm/aeabi/Makefile.inc (contents, props changed) head/lib/libc/arm/aeabi/Symbol.map (contents, props changed) head/lib/libc/arm/aeabi/aeabi_atexit.c (contents, props changed) head/lib/libc/arm/aeabi/aeabi_double.c (contents, props changed) head/lib/libc/arm/aeabi/aeabi_float.c (contents, props changed) head/lib/libc/arm/aeabi/aeabi_unwind_cpp.c (contents, props changed) Modified: head/lib/libc/arm/Makefile.inc Modified: head/lib/libc/arm/Makefile.inc ============================================================================== --- head/lib/libc/arm/Makefile.inc Sat Jan 19 04:46:18 2013 (r245654) +++ head/lib/libc/arm/Makefile.inc Sat Jan 19 05:33:55 2013 (r245655) @@ -12,5 +12,7 @@ SYM_MAPS+=${.CURDIR}/arm/Symbol.map .if ${MK_ARM_EABI} == "no" # This contains the symbols that were removed when moving to the ARM EABI SYM_MAPS+=${.CURDIR}/arm/Symbol_oabi.map +.else +.include "${.CURDIR}/arm/aeabi/Makefile.inc" .endif Added: head/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/Makefile.inc Sat Jan 19 05:33:55 2013 (r245655) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/arm/aeabi + +SRCS+= aeabi_atexit.c \ + aeabi_double.c \ + aeabi_float.c \ + aeabi_unwind_cpp.c + +SYM_MAPS+=${.CURDIR}/arm/aeabi/Symbol.map + Added: head/lib/libc/arm/aeabi/Symbol.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/Symbol.map Sat Jan 19 05:33:55 2013 (r245655) @@ -0,0 +1,47 @@ +/* + * $FreeBSD$ + */ + +/* + * This only needs to contain AEABI symbols that are not listed in + * symbol maps from other parts of libc (i.e., not found in + * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). + */ +FBSDprivate_1.0 { + __aeabi_atexit; + + __aeabi_dcmpeq; + __aeabi_dcmplt; + __aeabi_dcmple; + __aeabi_dcmpge; + __aeabi_dcmpgt; + __aeabi_dcmpun; + + __aeabi_d2iz; + __aeabi_d2f; + + __aeabi_dadd; + __aeabi_ddiv; + __aeabi_dmul; + __aeabi_dsub; + + + __aeabi_fcmpeq; + __aeabi_fcmplt; + __aeabi_fcmple; + __aeabi_fcmpge; + __aeabi_fcmpgt; + __aeabi_fcmpun; + + __aeabi_f2iz; + __aeabi_f2d; + + __aeabi_fadd; + __aeabi_fdiv; + __aeabi_fmul; + __aeabi_fsub; + + + __aeabi_i2d; + __aeabi_i2f; +}; Added: head/lib/libc/arm/aeabi/aeabi_atexit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/aeabi_atexit.c Sat Jan 19 05:33:55 2013 (r245655) @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2012 Andrew Turner + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +int __cxa_atexit(void (*)(void *), void *, void *); + +int +__aeabi_atexit(void *object, void (*func)(void*), void *dso) +{ + return __cxa_atexit(func, object, dso); +} + Added: head/lib/libc/arm/aeabi/aeabi_double.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/aeabi_double.c Sat Jan 19 05:33:55 2013 (r245655) @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2012 Andrew Turner + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +flag __unorddf2(float64, float64); + +int __aeabi_dcmpeq(float64 a, float64 b) +{ + return float64_eq(a, b); +} + +int __aeabi_dcmplt(float64 a, float64 b) +{ + return float64_lt(a, b); +} + +int __aeabi_dcmple(float64 a, float64 b) +{ + return float64_le(a, b); +} + +int __aeabi_dcmpge(float64 a, float64 b) +{ + return float64_le(b, a); +} + +int __aeabi_dcmpgt(float64 a, float64 b) +{ + return float64_lt(b, a); +} + +int __aeabi_dcmpun(float64 a, float64 b) +{ + return __unorddf2(a, b); +} + +int __aeabi_d2iz(float64 a) +{ + return float64_to_int32_round_to_zero(a); +} + +float32 __aeabi_d2f(float64 a) +{ + return float64_to_float32(a); +} + +float64 __aeabi_i2d(int a) +{ + return int32_to_float64(a); +} + +float64 __aeabi_dadd(float64 a, float64 b) +{ + return float64_add(a, b); +} + +float64 __aeabi_ddiv(float64 a, float64 b) +{ + return float64_div(a, b); +} + +float64 __aeabi_dmul(float64 a, float64 b) +{ + return float64_mul(a, b); +} + +float64 __aeabi_dsub(float64 a, float64 b) +{ + return float64_sub(a, b); +} + Added: head/lib/libc/arm/aeabi/aeabi_float.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/aeabi_float.c Sat Jan 19 05:33:55 2013 (r245655) @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2012 Andrew Turner + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +flag __unordsf2(float32, float32); + +int __aeabi_fcmpeq(float32 a, float32 b) +{ + return float32_eq(a, b); +} + +int __aeabi_fcmplt(float32 a, float32 b) +{ + return float32_lt(a, b); +} + +int __aeabi_fcmple(float32 a, float32 b) +{ + return float32_le(a, b); +} + +int __aeabi_fcmpge(float32 a, float32 b) +{ + return float32_le(b, a); +} + +int __aeabi_fcmpgt(float32 a, float32 b) +{ + return float32_lt(b, a); +} + +int __aeabi_fcmpun(float32 a, float32 b) +{ + return __unordsf2(a, b); +} + +int __aeabi_f2iz(float32 a) +{ + return float32_to_int32_round_to_zero(a); +} + +float32 __aeabi_f2d(float32 a) +{ + return float32_to_float64(a); +} + +float32 __aeabi_i2f(int a) +{ + return int32_to_float32(a); +} + +float32 __aeabi_fadd(float32 a, float32 b) +{ + return float32_add(a, b); +} + +float32 __aeabi_fdiv(float32 a, float32 b) +{ + return float32_div(a, b); +} + +float32 __aeabi_fmul(float32 a, float32 b) +{ + return float32_mul(a, b); +} + +float32 __aeabi_fsub(float32 a, float32 b) +{ + return float32_sub(a, b); +} + Added: head/lib/libc/arm/aeabi/aeabi_unwind_cpp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/aeabi/aeabi_unwind_cpp.c Sat Jan 19 05:33:55 2013 (r245655) @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2011 Andrew Turner + * 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. + * + */ + +/* + * Provide an implementation of __aeabi_unwind_cpp_pr{0,1,2}. These are + * required by libc but are implemented in libgcc_eh.a which we don't link + * against. The libgcc_eh.a version will be called so we call abort to + * check this. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +void __aeabi_unwind_cpp_pr0(void) __hidden; +void __aeabi_unwind_cpp_pr1(void) __hidden; +void __aeabi_unwind_cpp_pr2(void) __hidden; + +void +__aeabi_unwind_cpp_pr0(void) +{ + abort(); +} + +void +__aeabi_unwind_cpp_pr1(void) +{ + abort(); +} + +void +__aeabi_unwind_cpp_pr2(void) +{ + abort(); +} + From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:07:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3ECA4A1B; Sat, 19 Jan 2013 06:07:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8F857C29; Sat, 19 Jan 2013 06:07:33 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0J67TMZ078114; Sat, 19 Jan 2013 08:07:29 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0J67TMZ078114 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0J67TEV078113; Sat, 19 Jan 2013 08:07:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 19 Jan 2013 08:07:29 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r245577 - in head/sys: amd64/amd64 i386/i386 x86/x86 Message-ID: <20130119060729.GB2522@kib.kiev.ua> References: <201301172132.r0HLWQHD004835@svn.freebsd.org> <20130118040332.GT2522@kib.kiev.ua> <201301181052.54464.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NctWKJLgDreUm1FS" Content-Disposition: inline In-Reply-To: <201301181052.54464.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:07:34 -0000 --NctWKJLgDreUm1FS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 18, 2013 at 10:52:54AM -0500, John Baldwin wrote: > On Thursday, January 17, 2013 11:03:32 pm Konstantin Belousov wrote: > > On Thu, Jan 17, 2013 at 09:32:26PM +0000, John Baldwin wrote: > > > Author: jhb > > > Date: Thu Jan 17 21:32:25 2013 > > > New Revision: 245577 > > > URL: http://svnweb.freebsd.org/changeset/base/245577 > > >=20 > > > Log: > > > Don't attempt to use clflush on the local APIC register window. Va= rious > > > CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs= on > > > Pentium-M, and trashing of the local APIC registers on a VIA C7). = The > > > local APIC is implicitly mapped UC already via MTRRs, so the clflus= h isn't > > > necessary anyway. > > > =20 > > > MFC after: 2 weeks > > I am curious, was there a case where the clflush was really executed > > on the LAPIC register window with the pristine HEAD code ? I think > > that there is no Intel processors which support clflush instruction > > and do not have self-snoop. >=20 > The VIA CPUs. I had a submitter report that a clflush against the local = APIC > range would sometimes cause the entire local APIC range to get overwritte= n with > a single cacheline (repeated throughout the window). Also, in theory we = could > perhaps stop masking CLFLUSH in VM's when SS is masked. So VIAs are bug-to-bug compatible with Intels ? Weird. Regarding reverting of the VM workaround, I am not sure. It could be tried, but as I remember, the cause of the workaround were AMD processors and some hypervisors. It was long time ago, it might indeed be that it worth a try. >=20 > > On the other hand, please note that the same change could be due for the > > pmap_invalidate_cache_pages(). Unlike pmap_invalidate_cache_range(), > > _pages() uses clflush unconditionally on purpose, since it is intended > > for devices which do not snoop. >=20 > Hmm, maybe. I'm not sure that call is ever used on the local APIC since = the > relevant page should already be UC from the boot-time call? I noted this for completeness. You did the change in the pmap_invalidate_cache_range(), and not in the pmap_mapdev*. The KPI becomes somewhat rough due to inequality of the two cache flush methods now. But I definitely do not insist, since the ony real user of _pages() right now is GEM, which only calls it on the real physical memory. --NctWKJLgDreUm1FS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ+jggAAoJEJDCuSvBvK1BmqoP/2BAK/anJZiO1yQ3aaFTi6Hp FK09zHXM8qQ5amiE4wZ+MiT2ZOtuUVZkQo8VccNU/H0YeBBbVNBq5S70mTXqsVVI 4ldskC5y9dNl/IipKMhddofD6SuBM0vLR2hezt6MN26NhgTaLYqGfnDokCy7TDBJ 1FBMQcERck21ktzMhlTBYVLk6rLkbj3S01un3H+fZPXPV+jdZr0J0ytt9ZL++eZC orsCtAZNM+Ztt8l+JWfZTjbpfEyZenR8yMqiLh/zUHWmx2cD9rX0t6AhnyfbnqeG m+mVggLG6nNoddrWhGGLsQZurp5jaY4wu1cRGiM23WRoVzqTEFhRW4awC16VKg0K P59qFrxeEBe15fX+wr4Rw7ConVyYr18uWwBCc8YB3N2anz74i9/88MrYZ8t+YVNW mzBM4f8W4RNUY6aWXcOuPH5HUeDAVPWV8vNqpzIpNL9XEWNhipNRrrIUzXgOPknk 4N2lDvJ1UdxT3H1KMv8B6NHNToXN+oa2NmD+VCnNe90BnZAJQqTM0/R1nPU35YAE lpeJY4wHvmfSwN9Y3a0BLJP0G+b4rrpFhyts7Vi2sKuZSF4V6UqSULD5q1wd7iHk jhLMTuQec/usg/0smu7VKqzrVKwuE/9kS7PcjmrPFy5xnja9F0OnmTy/5mFOiq/n iCNKuo5Lj8E8DNLn/40t =80tV -----END PGP SIGNATURE----- --NctWKJLgDreUm1FS-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:17:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BF883BF5; Sat, 19 Jan 2013 06:17:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B23FECD3; Sat, 19 Jan 2013 06:17:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J6HRL3012909; Sat, 19 Jan 2013 06:17:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J6HRGM012908; Sat, 19 Jan 2013 06:17:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301190617.r0J6HRGM012908@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Jan 2013 06:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245659 - stable/9/sbin/geom/class/journal X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:17:27 -0000 Author: kib Date: Sat Jan 19 06:17:27 2013 New Revision: 245659 URL: http://svnweb.freebsd.org/changeset/base/245659 Log: MFC r245072: Do not round up the size of the UFS filesystem to the fragment size when comparing its size with the size of the media, to determine if the last disk block is unused. MFC r245074: Use tabs for indentation. Modified: stable/9/sbin/geom/class/journal/geom_journal_ufs.c Directory Properties: stable/9/sbin/geom/ (props changed) Modified: stable/9/sbin/geom/class/journal/geom_journal_ufs.c ============================================================================== --- stable/9/sbin/geom/class/journal/geom_journal_ufs.c Sat Jan 19 06:04:26 2013 (r245658) +++ stable/9/sbin/geom/class/journal/geom_journal_ufs.c Sat Jan 19 06:17:27 2013 (r245659) @@ -73,6 +73,6 @@ g_journal_ufs_using_last_sector(const ch /* Provider size in 512 bytes blocks. */ psize = g_get_mediasize(prov) / DEV_BSIZE; /* File system size in 512 bytes blocks. */ - fssize = fsbtodb(fs, dbtofsb(fs, psize)); - return (psize == fssize); + fssize = fsbtodb(fs, fs->fs_size); + return (psize <= fssize); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:24:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DEEAEE60; Sat, 19 Jan 2013 06:24:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AF0B0D6C; Sat, 19 Jan 2013 06:24:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J6OHiU015379; Sat, 19 Jan 2013 06:24:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J6OH06015378; Sat, 19 Jan 2013 06:24:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301190624.r0J6OH06015378@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Jan 2013 06:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245660 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:24:18 -0000 Author: kib Date: Sat Jan 19 06:24:17 2013 New Revision: 245660 URL: http://svnweb.freebsd.org/changeset/base/245660 Log: MFC r245405: Rename vfs_hash_index() to vfs_hash_bucket(). Modified: stable/9/sys/kern/vfs_hash.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_hash.c ============================================================================== --- stable/9/sys/kern/vfs_hash.c Sat Jan 19 06:17:27 2013 (r245659) +++ stable/9/sys/kern/vfs_hash.c Sat Jan 19 06:24:17 2013 (r245660) @@ -55,10 +55,10 @@ vfs_hashinit(void *dummy __unused) SYSINIT(vfs_hash, SI_SUB_VFS, SI_ORDER_SECOND, vfs_hashinit, NULL); static struct vfs_hash_head * -vfs_hash_index(const struct mount *mp, u_int hash) +vfs_hash_bucket(const struct mount *mp, u_int hash) { - return(&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]); + return (&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]); } int @@ -69,7 +69,7 @@ vfs_hash_get(const struct mount *mp, u_i while (1) { mtx_lock(&vfs_hash_mtx); - LIST_FOREACH(vp, vfs_hash_index(mp, hash), v_hashlist) { + LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { if (vp->v_hash != hash) continue; if (vp->v_mount != mp) @@ -113,7 +113,7 @@ vfs_hash_insert(struct vnode *vp, u_int while (1) { mtx_lock(&vfs_hash_mtx); LIST_FOREACH(vp2, - vfs_hash_index(vp->v_mount, hash), v_hashlist) { + vfs_hash_bucket(vp->v_mount, hash), v_hashlist) { if (vp2->v_hash != hash) continue; if (vp2->v_mount != vp->v_mount) @@ -138,7 +138,7 @@ vfs_hash_insert(struct vnode *vp, u_int } vp->v_hash = hash; - LIST_INSERT_HEAD(vfs_hash_index(vp->v_mount, hash), vp, v_hashlist); + LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist); mtx_unlock(&vfs_hash_mtx); return (0); } @@ -149,7 +149,7 @@ vfs_hash_rehash(struct vnode *vp, u_int mtx_lock(&vfs_hash_mtx); LIST_REMOVE(vp, v_hashlist); - LIST_INSERT_HEAD(vfs_hash_index(vp->v_mount, hash), vp, v_hashlist); + LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist); vp->v_hash = hash; mtx_unlock(&vfs_hash_mtx); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:27:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A34E3D6; Sat, 19 Jan 2013 06:27:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7E351DB4; Sat, 19 Jan 2013 06:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J6Re90015840; Sat, 19 Jan 2013 06:27:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J6Re9R015838; Sat, 19 Jan 2013 06:27:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301190627.r0J6Re9R015838@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Jan 2013 06:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245661 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:27:40 -0000 Author: kib Date: Sat Jan 19 06:27:39 2013 New Revision: 245661 URL: http://svnweb.freebsd.org/changeset/base/245661 Log: MFC r245406: Add vfs_hash_index(). Modified: stable/9/sys/kern/vfs_hash.c stable/9/sys/sys/vnode.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_hash.c ============================================================================== --- stable/9/sys/kern/vfs_hash.c Sat Jan 19 06:24:17 2013 (r245660) +++ stable/9/sys/kern/vfs_hash.c Sat Jan 19 06:27:39 2013 (r245661) @@ -54,6 +54,13 @@ vfs_hashinit(void *dummy __unused) /* Must be SI_ORDER_SECOND so desiredvnodes is available */ SYSINIT(vfs_hash, SI_SUB_VFS, SI_ORDER_SECOND, vfs_hashinit, NULL); +u_int +vfs_hash_index(struct vnode *vp) +{ + + return (vp->v_hash + vp->v_mount->mnt_hashseed); +} + static struct vfs_hash_head * vfs_hash_bucket(const struct mount *mp, u_int hash) { Modified: stable/9/sys/sys/vnode.h ============================================================================== --- stable/9/sys/sys/vnode.h Sat Jan 19 06:24:17 2013 (r245660) +++ stable/9/sys/sys/vnode.h Sat Jan 19 06:27:39 2013 (r245661) @@ -810,6 +810,7 @@ extern struct vop_vector default_vnodeop typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg); int vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); +u_int vfs_hash_index(struct vnode *vp); int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); void vfs_hash_rehash(struct vnode *vp, u_int hash); void vfs_hash_remove(struct vnode *vp); From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:31:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BA8853D3; Sat, 19 Jan 2013 06:31:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A28DBDF5; Sat, 19 Jan 2013 06:31:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J6Vbtm017960; Sat, 19 Jan 2013 06:31:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J6VbuT017959; Sat, 19 Jan 2013 06:31:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301190631.r0J6VbuT017959@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Jan 2013 06:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245662 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:31:37 -0000 Author: kib Date: Sat Jan 19 06:31:37 2013 New Revision: 245662 URL: http://svnweb.freebsd.org/changeset/base/245662 Log: MFC r245407,245411: Set the v_hash for a new vnode in the getnewvnode() to the value calculated based on the vnode structure address. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Sat Jan 19 06:27:39 2013 (r245661) +++ stable/9/sys/kern/vfs_subr.c Sat Jan 19 06:31:37 2013 (r245662) @@ -282,6 +282,8 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe #define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) #define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt) +/* Shift count for (uintptr_t)vp to initialize vp->v_hash. */ +static int vnsz2log; /* * Initialize the vnode management data structures. @@ -296,6 +298,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe static void vntblinit(void *dummy __unused) { + u_int i; int physvnodes, virtvnodes; /* @@ -337,6 +340,9 @@ vntblinit(void *dummy __unused) syncer_maxdelay = syncer_mask + 1; mtx_init(&sync_mtx, "Syncer mtx", NULL, MTX_DEF); cv_init(&sync_wakeup, "syncer"); + for (i = 1; i <= sizeof(struct vnode); i <<= 1) + vnsz2log++; + vnsz2log--; } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vntblinit, NULL); @@ -1077,6 +1083,14 @@ alloc: } rangelock_init(&vp->v_rl); + /* + * For the filesystems which do not use vfs_hash_insert(), + * still initialize v_hash to have vfs_hash_index() useful. + * E.g., nullfs uses vfs_hash_index() on the lower vnode for + * its own hashing. + */ + vp->v_hash = (uintptr_t)vp >> vnsz2log; + *vpp = vp; return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:34:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CF89654E; Sat, 19 Jan 2013 06:34:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9F45CE06; Sat, 19 Jan 2013 06:34:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J6YfkW018415; Sat, 19 Jan 2013 06:34:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J6YfCL018414; Sat, 19 Jan 2013 06:34:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301190634.r0J6YfCL018414@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Jan 2013 06:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245663 - stable/9/sys/fs/nullfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:34:41 -0000 Author: kib Date: Sat Jan 19 06:34:41 2013 New Revision: 245663 URL: http://svnweb.freebsd.org/changeset/base/245663 Log: MFC r245408: Size the nullfs hashtbl based on the current value of desiredvnodes. Use vfs_hash_index() to calculate the hash bucket for a given vnode. Modified: stable/9/sys/fs/nullfs/null_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/9/sys/fs/nullfs/null_subr.c Sat Jan 19 06:31:37 2013 (r245662) +++ stable/9/sys/fs/nullfs/null_subr.c Sat Jan 19 06:34:41 2013 (r245663) @@ -46,9 +46,6 @@ #include -#define LOG2_SIZEVNODE 8 /* log2(sizeof struct vnode) */ -#define NNULLNODECACHE 16 - /* * Null layer cache: * Each cache entry holds a reference to the lower vnode @@ -57,12 +54,11 @@ * alias is removed the lower vnode is vrele'd. */ -#define NULL_NHASH(vp) \ - (&null_node_hashtbl[(((uintptr_t)vp)>>LOG2_SIZEVNODE) & null_node_hash]) +#define NULL_NHASH(vp) (&null_node_hashtbl[vfs_hash_index(vp) & null_hash_mask]) static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl; -static u_long null_node_hash; -struct mtx null_hashmtx; +static struct mtx null_hashmtx; +static u_long null_hash_mask; static MALLOC_DEFINE(M_NULLFSHASH, "nullfs_hash", "NULLFS hash table"); MALLOC_DEFINE(M_NULLFSNODE, "nullfs_node", "NULLFS vnode private part"); @@ -77,8 +73,8 @@ nullfs_init(vfsp) struct vfsconf *vfsp; { - NULLFSDEBUG("nullfs_init\n"); /* printed during system boot */ - null_node_hashtbl = hashinit(NNULLNODECACHE, M_NULLFSHASH, &null_node_hash); + null_node_hashtbl = hashinit(desiredvnodes, M_NULLFSHASH, + &null_hash_mask); mtx_init(&null_hashmtx, "nullhs", NULL, MTX_DEF); return (0); } @@ -89,7 +85,7 @@ nullfs_uninit(vfsp) { mtx_destroy(&null_hashmtx); - free(null_node_hashtbl, M_NULLFSHASH); + hashdestroy(null_node_hashtbl, M_NULLFSHASH, null_hash_mask); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:37:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 27BDF768; Sat, 19 Jan 2013 06:37:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1A662E27; Sat, 19 Jan 2013 06:37:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J6bC7A018783; Sat, 19 Jan 2013 06:37:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J6bCLc018782; Sat, 19 Jan 2013 06:37:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301190637.r0J6bCLc018782@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Jan 2013 06:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245664 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:37:13 -0000 Author: kib Date: Sat Jan 19 06:37:12 2013 New Revision: 245664 URL: http://svnweb.freebsd.org/changeset/base/245664 Log: MFC r245409: For zfs vnodes, use the standard inode number based hash algorithm. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Jan 19 06:34:41 2013 (r245663) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Jan 19 06:37:12 2013 (r245664) @@ -2026,6 +2026,8 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla err = zfs_vnode_lock(*vpp, flags); if (err != 0) *vpp = NULL; + else + (*vpp)->v_hash = ino; return (err); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 06:39:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5F3E68DF; Sat, 19 Jan 2013 06:39:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3A73DE35; Sat, 19 Jan 2013 06:39:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J6do2B019149; Sat, 19 Jan 2013 06:39:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J6do3E019148; Sat, 19 Jan 2013 06:39:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301190639.r0J6do3E019148@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Jan 2013 06:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245665 - stable/9/sys/fs/nullfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 06:39:50 -0000 Author: kib Date: Sat Jan 19 06:39:49 2013 New Revision: 245665 URL: http://svnweb.freebsd.org/changeset/base/245665 Log: MFC r245495: Remove the filtering of the acceptable mount options for nullfs, added in r245004. Modified: stable/9/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vfsops.c Sat Jan 19 06:37:12 2013 (r245664) +++ stable/9/sys/fs/nullfs/null_vfsops.c Sat Jan 19 06:39:49 2013 (r245665) @@ -67,15 +67,6 @@ static vfs_vget_t nullfs_vget; static vfs_extattrctl_t nullfs_extattrctl; static vfs_reclaim_lowervp_t nullfs_reclaim_lowervp; -/* Mount options that we support. */ -static const char *nullfs_opts[] = { - "cache", - "export", - "from", - "target", - NULL -}; - /* * Mount null layer */ @@ -97,8 +88,6 @@ nullfs_mount(struct mount *mp) return (EPERM); if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); - if (vfs_filteropt(mp->mnt_optnew, nullfs_opts)) - return (EINVAL); /* * Update is a no-op From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 07:04:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CE8C8B02; Sat, 19 Jan 2013 07:04:30 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AB2AFE9E; Sat, 19 Jan 2013 07:04:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J74U9H027342; Sat, 19 Jan 2013 07:04:30 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J74Um6027340; Sat, 19 Jan 2013 07:04:30 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201301190704.r0J74Um6027340@svn.freebsd.org> From: Joel Dahl Date: Sat, 19 Jan 2013 07:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245666 - head/usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 07:04:30 -0000 Author: joel (doc committer) Date: Sat Jan 19 07:04:30 2013 New Revision: 245666 URL: http://svnweb.freebsd.org/changeset/base/245666 Log: Minor mdoc fixes. Modified: head/usr.sbin/bhyveload/bhyveload.8 Modified: head/usr.sbin/bhyveload/bhyveload.8 ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 06:39:49 2013 (r245665) +++ head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 07:04:30 2013 (r245666) @@ -51,7 +51,7 @@ virtual machine. .Nm is based on .Xr loader 8 -and will present an interface identical to +and will present an interface identical to the .Fx loader on the user's terminal. .Pp @@ -85,36 +85,34 @@ is the pathname of the guest's boot disk The .Ar host-path is the directory at the top of the guest's boot filesystem. - +.El .Sh EXAMPLES To create a virtual machine named .Ar freebsd-vm that boots off the ISO image .Pa /freebsd/release.iso and has 1GB memory allocated to it: - -.Dl "bhyveload -m 256 -M 768 -d /freebsd/release.iso freebsd-vm - +.Pp +.Dl "bhyveload -m 256 -M 768 -d /freebsd/release.iso freebsd-vm" +.Pp In the example above the 1GB allocation is split in two segments: +.Pp .Bl -dash -compact .It 256MB below the 4GB boundary (0MB - 256MB) .It 768MB above the 4GB boundary (4096MB - 4864MB) .El - .Sh SEE ALSO .Xr bhyve 4 , .Xr bhyve 8 , .Xr loader 8 , .Xr vmm 4 - .Sh HISTORY .Nm first appeared in .Fx 10.0 , and was developed at NetApp Inc. - .Sh AUTHORS .Nm was developed by @@ -122,9 +120,8 @@ was developed by .An "Neel Natu" Aq neel@FreeBSD.org at NetApp Inc with a lot of help from .An Doug Rabson Aq dfr@FreeBSD.org - .Sh BUGS .Nm -can load only +can only load .Fx as a guest. From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 07:07:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0C0C3C80; Sat, 19 Jan 2013 07:07:06 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F3504EAC; Sat, 19 Jan 2013 07:07:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J775SR027879; Sat, 19 Jan 2013 07:07:05 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J775eK027877; Sat, 19 Jan 2013 07:07:05 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201301190707.r0J775eK027877@svn.freebsd.org> From: Joel Dahl Date: Sat, 19 Jan 2013 07:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245667 - in head: usr.bin/xinstall usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 07:07:06 -0000 Author: joel (doc committer) Date: Sat Jan 19 07:07:05 2013 New Revision: 245667 URL: http://svnweb.freebsd.org/changeset/base/245667 Log: Remove EOL whitespace. Modified: head/usr.bin/xinstall/install.1 head/usr.sbin/bhyveload/bhyveload.8 Modified: head/usr.bin/xinstall/install.1 ============================================================================== --- head/usr.bin/xinstall/install.1 Sat Jan 19 07:04:30 2013 (r245666) +++ head/usr.bin/xinstall/install.1 Sat Jan 19 07:07:05 2013 (r245667) @@ -145,7 +145,7 @@ for a list of possible flags and their m .It Fl g Specify a group. A numeric GID is allowed. -.It Fl h Ar hash +.It Fl h Ar hash When copying, calculate the digest of the files with .Ar hash to store in the @@ -199,7 +199,7 @@ Disable all use of .Xr mmap 2 . .It Fl M Ar metalog Write the metadata associated with each item installed to -.Ar metalog +.Ar metalog in an .Xr mtree 8 .Dq full path Modified: head/usr.sbin/bhyveload/bhyveload.8 ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 07:04:30 2013 (r245666) +++ head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 07:07:05 2013 (r245667) @@ -88,9 +88,9 @@ is the directory at the top of the guest .El .Sh EXAMPLES To create a virtual machine named -.Ar freebsd-vm +.Ar freebsd-vm that boots off the ISO image -.Pa /freebsd/release.iso +.Pa /freebsd/release.iso and has 1GB memory allocated to it: .Pp .Dl "bhyveload -m 256 -M 768 -d /freebsd/release.iso freebsd-vm" From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 16:39:25 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4FA8E7DE; Sat, 19 Jan 2013 16:39:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id CDD6C35F; Sat, 19 Jan 2013 16:39:24 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r0JGdHCH023846; Sat, 19 Jan 2013 20:39:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r0JGdHvM023845; Sat, 19 Jan 2013 20:39:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 19 Jan 2013 20:39:17 +0400 From: Gleb Smirnoff To: Neel Natu Subject: Re: svn commit: r245652 - in head: lib share/man/man4 share/mk sys/amd64/include sys/conf sys/modules usr.sbin Message-ID: <20130119163917.GD14114@FreeBSD.org> References: <201301190418.r0J4IquZ074573@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201301190418.r0J4IquZ074573@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 16:39:25 -0000 On Sat, Jan 19, 2013 at 04:18:52AM +0000, Neel Natu wrote: N> Author: neel N> Date: Sat Jan 19 04:18:52 2013 N> New Revision: 245652 N> URL: http://svnweb.freebsd.org/changeset/base/245652 N> N> Log: N> Merge projects/bhyve to head. N> N> 'bhyve' was developed by grehan@ and myself at NetApp (thanks!). N> N> Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their N> support and encouragement. N> N> Obtained from: NetApp Thank you, Neel and Peter! -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 17:12:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CDE2B41F; Sat, 19 Jan 2013 17:12:23 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B68088BC; Sat, 19 Jan 2013 17:12:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0JHCNUt018567; Sat, 19 Jan 2013 17:12:23 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0JHCNch018566; Sat, 19 Jan 2013 17:12:23 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201301191712.r0JHCNch018566@svn.freebsd.org> From: Tim Kientzle Date: Sat, 19 Jan 2013 17:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245672 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 17:12:23 -0000 Author: kientzle Date: Sat Jan 19 17:12:23 2013 New Revision: 245672 URL: http://svnweb.freebsd.org/changeset/base/245672 Log: Clarify the error messages for unrecognized pins and muxtypes. Modified: head/sys/arm/ti/ti_scm.c Modified: head/sys/arm/ti/ti_scm.c ============================================================================== --- head/sys/arm/ti/ti_scm.c Sat Jan 19 16:22:41 2013 (r245671) +++ head/sys/arm/ti/ti_scm.c Sat Jan 19 17:12:23 2013 (r245672) @@ -155,8 +155,10 @@ ti_scm_padconf_set_internal(struct ti_sc } /* couldn't find the mux mode */ - if (mode >= 8) + if (mode >= 8) { + printf("Invalid mode \"%s\"\n", muxmode); return (EINVAL); + } /* set the mux mode */ reg_val |= (uint16_t)(mode & ti_scm_dev.padconf_muxmode_mask); @@ -391,13 +393,16 @@ ti_scm_padconf_init_from_fdt(struct ti_s while (padstates->state != NULL) { if (strcmp(padstates->state, padstate) == 0) { err = ti_scm_padconf_set_internal(sc, - padconf, muxname, padstates->reg); + padconf, muxname, padstates->reg); } padstates++; } if (err) - device_printf(sc->sc_dev, "err: failed to configure" - "pin \"%s\"\n", padconf->ballname); + device_printf(sc->sc_dev, + "err: failed to configure " + "pin \"%s\" as \"%s\"\n", + padconf->ballname, + muxname); } padconf++; } From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 17:22:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9D20373F; Sat, 19 Jan 2013 17:22:13 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 85573952; Sat, 19 Jan 2013 17:22:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0JHMDwQ023054; Sat, 19 Jan 2013 17:22:13 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0JHMD3p023053; Sat, 19 Jan 2013 17:22:13 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201301191722.r0JHMD3p023053@svn.freebsd.org> From: Tim Kientzle Date: Sat, 19 Jan 2013 17:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245673 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 17:22:13 -0000 Author: kientzle Date: Sat Jan 19 17:22:12 2013 New Revision: 245673 URL: http://svnweb.freebsd.org/changeset/base/245673 Log: Use correct GPIO interrupt lines. Modified: head/sys/boot/fdt/dts/beaglebone.dts Modified: head/sys/boot/fdt/dts/beaglebone.dts ============================================================================== --- head/sys/boot/fdt/dts/beaglebone.dts Sat Jan 19 17:12:23 2013 (r245672) +++ head/sys/boot/fdt/dts/beaglebone.dts Sat Jan 19 17:22:12 2013 (r245673) @@ -125,7 +125,7 @@ 0x4804C000 0x1000 0x481AC000 0x1000 0x481AE000 0x1000 >; - interrupts = < 17 19 21 23 >; + interrupts = < 96 97 98 99 32 33 62 63 >; interrupt-parent = <&AINTC>; }; From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 22:08:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3EC09F54; Sat, 19 Jan 2013 22:08:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 315451D9; Sat, 19 Jan 2013 22:08:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0JM8HIJ006827; Sat, 19 Jan 2013 22:08:17 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0JM8GZa006825; Sat, 19 Jan 2013 22:08:16 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301192208.r0JM8GZa006825@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 22:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245675 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 22:08:17 -0000 Author: andrew Date: Sat Jan 19 22:08:16 2013 New Revision: 245675 URL: http://svnweb.freebsd.org/changeset/base/245675 Log: When DDB is enabled and we are building for the ARM EABI include the unwind tables in the kernel. Modified: head/sys/conf/Makefile.arm head/sys/conf/ldscript.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sat Jan 19 21:57:25 2013 (r245674) +++ head/sys/conf/Makefile.arm Sat Jan 19 22:08:16 2013 (r245675) @@ -41,6 +41,8 @@ STRIP_FLAGS = -S .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame +.elif defined(WITH_ARM_EABI) +CFLAGS += -funwind-tables .endif SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ Modified: head/sys/conf/ldscript.arm ============================================================================== --- head/sys/conf/ldscript.arm Sat Jan 19 21:57:25 2013 (r245674) +++ head/sys/conf/ldscript.arm Sat Jan 19 22:08:16 2013 (r245675) @@ -56,6 +56,18 @@ SECTIONS .init : { *(.init) } =0x9090 .plt : { *(.plt) } + _extab_start = .; + PROVIDE(extab_start = .); + .ARM.extab : { *(.ARM.extab) } + _extab.end = .; + PROVIDE(extab_end = .); + + _exidx_start = .; + PROVIDE(exidx_start = .); + .ARM.exidx : { *(.ARM.exidx) } + _exidx_end = .; + PROVIDE(exidx_end = .); + /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN(0x1000) + (. & (0x1000 - 1)) ; From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 22:12:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 69EE2166; Sat, 19 Jan 2013 22:12:09 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4472B1EF; Sat, 19 Jan 2013 22:12:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0JMC9xf009111; Sat, 19 Jan 2013 22:12:09 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0JMC96J009110; Sat, 19 Jan 2013 22:12:09 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201301192212.r0JMC96J009110@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 19 Jan 2013 22:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245676 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 22:12:09 -0000 Author: jilles Date: Sat Jan 19 22:12:08 2013 New Revision: 245676 URL: http://svnweb.freebsd.org/changeset/base/245676 Log: sh: Replace an mkinit use with an initialization. Modified: head/bin/sh/input.c Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Sat Jan 19 22:08:16 2013 (r245675) +++ head/bin/sh/input.c Sat Jan 19 22:12:08 2013 (r245676) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ -MKINIT struct strpush { struct strpush *prev; /* preceding string on stack */ char *prevstring; @@ -78,7 +77,6 @@ struct strpush { * contains information about the current file being read. */ -MKINIT struct parsefile { struct parsefile *prev; /* preceding file on stack */ int linno; /* current line */ @@ -96,8 +94,11 @@ int plinno = 1; /* input line number * int parsenleft; /* copy of parsefile->nleft */ MKINIT int parselleft; /* copy of parsefile->lleft */ char *parsenextc; /* copy of parsefile->nextc */ -MKINIT struct parsefile basepf; /* top level input file */ -char basebuf[BUFSIZ + 1]; /* buffer for top level input file */ +static char basebuf[BUFSIZ + 1];/* buffer for top level input file */ +static struct parsefile basepf = { /* top level input file */ + .nextc = basebuf, + .buf = basebuf +}; static struct parsefile *parsefile = &basepf; /* current input file */ int whichprompt; /* 1 == PS1, 2 == PS2 */ @@ -111,12 +112,6 @@ static void popstring(void); INCLUDE "input.h" INCLUDE "error.h" -MKINIT char basebuf[]; - -INIT { - basepf.nextc = basepf.buf = basebuf; -} - RESET { popallfiles(); parselleft = parsenleft = 0; /* clear input buffer */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 19 22:12:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C9B4A2D6; Sat, 19 Jan 2013 22:12:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B25141F7; Sat, 19 Jan 2013 22:12:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0JMCv1Z009264; Sat, 19 Jan 2013 22:12:57 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0JMCv5x009263; Sat, 19 Jan 2013 22:12:57 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301192212.r0JMCv5x009263@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 22:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245677 - head/sys/boot/arm/uboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 19 Jan 2013 22:12:57 -0000 Author: andrew Date: Sat Jan 19 22:12:57 2013 New Revision: 245677 URL: http://svnweb.freebsd.org/changeset/base/245677 Log: Link against compiler-rt to pull in the required __aeabi_* functions Modified: head/sys/boot/arm/uboot/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Sat Jan 19 22:12:08 2013 (r245676) +++ head/sys/boot/arm/uboot/Makefile Sat Jan 19 22:12:57 2013 (r245677) @@ -112,8 +112,8 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/li # clang doesn't understand %D as a specifier to printf NO_WERROR.clang= -DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand +DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} ${LIBGCC} +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand -lgcc vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}