From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 07:05:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 049CB106566C; Sun, 10 Oct 2010 07:05:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E55568FC0A; Sun, 10 Oct 2010 07:05:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9A75la7073561; Sun, 10 Oct 2010 07:05:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9A75lrf073546; Sun, 10 Oct 2010 07:05:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010100705.o9A75lrf073546@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 10 Oct 2010 07:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213664 - in head/sys: fs/cd9660 fs/hpfs fs/msdosfs fs/ntfs gnu/fs/reiserfs kern sys ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 07:05:48 -0000 Author: kib Date: Sun Oct 10 07:05:47 2010 New Revision: 213664 URL: http://svn.freebsd.org/changeset/base/213664 Log: The r184588 changed the layout of struct export_args, causing an ABI breakage for old mount(2) syscall, since most struct _args embed export_args. The mount(2) is supposed to provide ABI compatibility for pre-nmount mount(8) binaries, so restore ABI to pre-r184588. Requested and reviewed by: bde MFC after: 2 weeks Modified: head/sys/fs/cd9660/cd9660_mount.h head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/hpfs/hpfs_vfsops.c head/sys/fs/hpfs/hpfsmount.h head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/msdosfs/msdosfsmount.h head/sys/fs/ntfs/ntfs_vfsops.c head/sys/fs/ntfs/ntfsmount.h head/sys/gnu/fs/reiserfs/reiserfs_mount.h head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c head/sys/kern/vfs_mount.c head/sys/sys/mount.h head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/fs/cd9660/cd9660_mount.h ============================================================================== --- head/sys/fs/cd9660/cd9660_mount.h Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/cd9660/cd9660_mount.h Sun Oct 10 07:05:47 2010 (r213664) @@ -40,7 +40,7 @@ */ struct iso_args { char *fspec; /* block special device to mount */ - struct export_args export; /* network export info */ + struct oexport_args export; /* network export info */ int flags; /* mounting flags, see below */ int ssector; /* starting sector, 0 for 1st session */ char *cs_disk; /* disk charset for Joliet cs conversion */ Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/cd9660/cd9660_vfsops.c Sun Oct 10 07:05:47 2010 (r213664) @@ -98,14 +98,16 @@ static int cd9660_cmount(struct mntarg *ma, void *data, int flags) { struct iso_args args; + struct export_args exp; int error; error = copyin(data, &args, sizeof args); if (error) return (error); + vfs_oexport_conv(&args.export, &exp); ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); - ma = mount_arg(ma, "export", &args.export, sizeof args.export); + ma = mount_arg(ma, "export", &exp, sizeof(exp)); ma = mount_argsu(ma, "cs_disk", args.cs_disk, 64); ma = mount_argsu(ma, "cs_local", args.cs_local, 64); ma = mount_argf(ma, "ssector", "%u", args.ssector); Modified: head/sys/fs/hpfs/hpfs_vfsops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vfsops.c Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/hpfs/hpfs_vfsops.c Sun Oct 10 07:05:47 2010 (r213664) @@ -76,14 +76,16 @@ hpfs_cmount ( int flags) { struct hpfs_args args; + struct export_args exp; int error; error = copyin(data, (caddr_t)&args, sizeof (struct hpfs_args)); if (error) return (error); + vfs_oexport_conv(&args.export, &exp); ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); - ma = mount_arg(ma, "export", &args.export, sizeof args.export); + ma = mount_arg(ma, "export", &exp, sizeof(exp)); ma = mount_argf(ma, "uid", "%d", args.uid); ma = mount_argf(ma, "gid", "%d", args.gid); ma = mount_argf(ma, "mode", "%d", args.mode); Modified: head/sys/fs/hpfs/hpfsmount.h ============================================================================== --- head/sys/fs/hpfs/hpfsmount.h Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/hpfs/hpfsmount.h Sun Oct 10 07:05:47 2010 (r213664) @@ -29,7 +29,7 @@ #define HPFSMNT_TABLES 0x0001 struct hpfs_args { char *fspec; /* block special device to mount */ - struct export_args export; /* network export information */ + struct oexport_args export; /* network export information */ uid_t uid; /* uid that owns hpfs files */ gid_t gid; /* gid that owns hpfs files */ mode_t mode; /* mask to be applied for hpfs perms */ Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Oct 10 07:05:47 2010 (r213664) @@ -200,6 +200,7 @@ static int msdosfs_cmount(struct mntarg *ma, void *data, int flags) { struct msdosfs_args args; + struct export_args exp; int error; if (data == NULL) @@ -207,9 +208,10 @@ msdosfs_cmount(struct mntarg *ma, void * error = copyin(data, &args, sizeof args); if (error) return (error); + vfs_oexport_conv(&args.export, &exp); ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); - ma = mount_arg(ma, "export", &args.export, sizeof args.export); + ma = mount_arg(ma, "export", &exp, sizeof(exp)); ma = mount_argf(ma, "uid", "%d", args.uid); ma = mount_argf(ma, "gid", "%d", args.gid); ma = mount_argf(ma, "mask", "%d", args.mask); Modified: head/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- head/sys/fs/msdosfs/msdosfsmount.h Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/msdosfs/msdosfsmount.h Sun Oct 10 07:05:47 2010 (r213664) @@ -234,7 +234,7 @@ uint32_t msdosfs_fileno_map(struct mount */ struct msdosfs_args { char *fspec; /* blocks special holding the fs to mount */ - struct export_args export; /* network export information */ + struct oexport_args export; /* network export information */ uid_t uid; /* uid that owns msdosfs files */ gid_t gid; /* gid that owns msdosfs files */ mode_t mask; /* file mask to be applied for msdosfs perms */ Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/ntfs/ntfs_vfsops.c Sun Oct 10 07:05:47 2010 (r213664) @@ -119,14 +119,16 @@ ntfs_cmount ( void *data, int flags) { - int error; struct ntfs_args args; + struct export_args exp; + int error; - error = copyin(data, (caddr_t)&args, sizeof args); + error = copyin(data, &args, sizeof(args)); if (error) return (error); + vfs_oexport_conv(&args.export, &exp); ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); - ma = mount_arg(ma, "export", &args.export, sizeof args.export); + ma = mount_arg(ma, "export", &exp, sizeof(exp)); ma = mount_argf(ma, "uid", "%d", args.uid); ma = mount_argf(ma, "gid", "%d", args.gid); ma = mount_argf(ma, "mode", "%d", args.mode); Modified: head/sys/fs/ntfs/ntfsmount.h ============================================================================== --- head/sys/fs/ntfs/ntfsmount.h Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/fs/ntfs/ntfsmount.h Sun Oct 10 07:05:47 2010 (r213664) @@ -34,7 +34,7 @@ struct ntfs_args { char *fspec; /* block special device to mount */ - struct export_args export; /* network export information */ + struct oexport_args export; /* network export information */ uid_t uid; /* uid that owns ntfs files */ gid_t gid; /* gid that owns ntfs files */ mode_t mode; /* mask to be applied for ntfs perms */ Modified: head/sys/gnu/fs/reiserfs/reiserfs_mount.h ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_mount.h Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/gnu/fs/reiserfs/reiserfs_mount.h Sun Oct 10 07:05:47 2010 (r213664) @@ -39,7 +39,7 @@ struct reiserfs_mount { /* Arguments to mount ReiserFS filesystems. */ struct reiserfs_args { char *fspec; /* blocks special holding the fs to mount */ - struct export_args export; /* network export information */ + struct oexport_args export; /* network export information */ }; #endif /* !defined _GNU_REISERFS_REISERFS_MOUNT_H */ Modified: head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sun Oct 10 07:05:47 2010 (r213664) @@ -52,14 +52,16 @@ static int reiserfs_cmount(struct mntarg *ma, void *data, int flags) { struct reiserfs_args args; + struct export_args exp; int error; error = copyin(data, &args, sizeof(args)); if (error) return (error); + vfs_oexport_conv(&args.export, &exp); ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); - ma = mount_arg(ma, "export", &args.export, sizeof args.export); + ma = mount_arg(ma, "export", &exp, sizeof(exp)); error = kernel_mount(ma, flags); Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/kern/vfs_mount.c Sun Oct 10 07:05:47 2010 (r213664) @@ -1960,3 +1960,11 @@ kernel_vmount(int flags, ...) error = kernel_mount(ma, flags); return (error); } + +void +vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp) +{ + + bcopy(oexp, exp, sizeof(*oexp)); + exp->ex_numsecflavors = 0; +} Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/sys/mount.h Sun Oct 10 07:05:47 2010 (r213664) @@ -741,6 +741,8 @@ int vfs_modevent(module_t, int, void *); void vfs_mount_error(struct mount *, const char *, ...); void vfs_mountroot(void); /* mount our root filesystem */ void vfs_mountedfrom(struct mount *, const char *from); +void vfs_oexport_conv(const struct oexport_args *oexp, + struct export_args *exp); void vfs_ref(struct mount *); void vfs_rel(struct mount *); struct mount *vfs_mount_alloc(struct vnode *, struct vfsconf *, const char *, Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Oct 10 07:05:47 2010 (r213664) @@ -463,6 +463,7 @@ static int ffs_cmount(struct mntarg *ma, void *data, int flags) { struct ufs_args args; + struct export_args exp; int error; if (data == NULL) @@ -470,9 +471,10 @@ ffs_cmount(struct mntarg *ma, void *data error = copyin(data, &args, sizeof args); if (error) return (error); + vfs_oexport_conv(&args.export, &exp); ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); - ma = mount_arg(ma, "export", &args.export, sizeof args.export); + ma = mount_arg(ma, "export", &exp, sizeof(exp)); error = kernel_mount(ma, flags); return (error); Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Sat Oct 9 20:52:36 2010 (r213663) +++ head/sys/ufs/ufs/ufsmount.h Sun Oct 10 07:05:47 2010 (r213664) @@ -40,7 +40,7 @@ */ struct ufs_args { char *fspec; /* block special device to mount */ - struct export_args export; /* network export information */ + struct oexport_args export; /* network export information */ }; #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 07:07:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA0EB106564A; Sun, 10 Oct 2010 07:07:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98C928FC0C; Sun, 10 Oct 2010 07:07:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9A77LlN073626; Sun, 10 Oct 2010 07:07:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9A77LpV073624; Sun, 10 Oct 2010 07:07:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010100707.o9A77LpV073624@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 10 Oct 2010 07:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213665 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 07:07:21 -0000 Author: kib Date: Sun Oct 10 07:07:21 2010 New Revision: 213665 URL: http://svn.freebsd.org/changeset/base/213665 Log: MFC r213382: In makectx(), always use the tf_rsp from trap frame. %rsp is pushed unconditionally by hardware on the trap. PR: amd64/151167 Modified: stable/8/sys/amd64/amd64/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Sun Oct 10 07:05:47 2010 (r213664) +++ stable/8/sys/amd64/amd64/machdep.c Sun Oct 10 07:07:21 2010 (r213665) @@ -1795,7 +1795,7 @@ makectx(struct trapframe *tf, struct pcb pcb->pcb_rbp = tf->tf_rbp; pcb->pcb_rbx = tf->tf_rbx; pcb->pcb_rip = tf->tf_rip; - pcb->pcb_rsp = (ISPL(tf->tf_cs)) ? tf->tf_rsp : (long)(tf + 1) - 8; + pcb->pcb_rsp = tf->tf_rsp; } int From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 07:28:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D54D7106566B; Sun, 10 Oct 2010 07:28:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3F8E8FC14; Sun, 10 Oct 2010 07:28:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9A7SuPZ074099; Sun, 10 Oct 2010 07:28:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9A7Sur4074097; Sun, 10 Oct 2010 07:28:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010100728.o9A7Sur4074097@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 10 Oct 2010 07:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213666 - stable/7/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 07:28:57 -0000 Author: kib Date: Sun Oct 10 07:28:56 2010 New Revision: 213666 URL: http://svn.freebsd.org/changeset/base/213666 Log: MFC r213382: In makectx(), always use the tf_rsp from trap frame. %rsp is pushed unconditionally by hardware on the trap. PR: amd64/151167 Modified: stable/7/sys/amd64/amd64/machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/machdep.c Sun Oct 10 07:07:21 2010 (r213665) +++ stable/7/sys/amd64/amd64/machdep.c Sun Oct 10 07:28:56 2010 (r213666) @@ -1443,7 +1443,7 @@ makectx(struct trapframe *tf, struct pcb pcb->pcb_rbp = tf->tf_rbp; pcb->pcb_rbx = tf->tf_rbx; pcb->pcb_rip = tf->tf_rip; - pcb->pcb_rsp = (ISPL(tf->tf_cs)) ? tf->tf_rsp : (long)(tf + 1) - 8; + pcb->pcb_rsp = tf->tf_rsp; } int From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 08:19:38 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74FC106564A; Sun, 10 Oct 2010 08:19:38 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id 323F78FC16; Sun, 10 Oct 2010 08:19:37 +0000 (UTC) Received: from [192.168.10.202] (0x573b9942.cpe.ge-1-2-0-1101.ronqu1.customer.tele.dk [87.59.153.66]) by csmtp3.one.com (Postfix) with ESMTP id 0405D24639E0; Sun, 10 Oct 2010 08:19:36 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/signed; boundary=Apple-Mail-2031--846068754; protocol="application/pkcs7-signature"; micalg=sha1 From: Erik Cederstrand In-Reply-To: <20101010083725.S3587@besplex.bde.org> Date: Sun, 10 Oct 2010 10:19:36 +0200 Message-Id: <2A26ECE8-7713-49C4-8706-5AA5B232BE29@cederstrand.dk> References: <201010090531.o995V8n3026865@svn.freebsd.org> <8C667EA1-3012-4499-BCCE-58263165663B@cederstrand.dk> <20101010083725.S3587@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1081) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Tim Kientzle , Ben Kaduk , src-committers@FreeBSD.org Subject: Re: svn commit: r213643 - head/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2010 08:19:38 -0000 --Apple-Mail-2031--846068754 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Den 10/10/2010 kl. 00.11 skrev Bruce Evans: > On Sat, 9 Oct 2010, Erik Cederstrand wrote: >>>=20 >>> Thanks! Has anyone looked at the feasibility of setting AR?=3Dar -D = in >>> sys.mk? I will probably try this when I get my scratch box up = again. >=20 > I hope not. The default behaviour should not be changed by default. The reason I came up with this patch was that I wanted to do binary = diffs on FreeBSD distributions to, among other reasons, record witch = files are actually affected between commits. Except for a few edge-cases = like recording a build timestamp, it seems wrong in my view for FreeBSD = to not produce deterministic distributions on identical source code. >> I'm looking into this now, as I needed the patch to do binary diffs = on builds. One problem is that ARFLAGS is overridden a lot of places in = contrib/ code: >>=20 >> contrib/cvs/lib/Makefile.in:67:ARFLAGS=3Dcru >> contrib/cvs/diff/Makefile.in:45:ARFLAGS=3Dcru >> contrib/ntp/libntp/Makefile.in:55:ARFLAGS=3Dcru >> contrib/ntp/libparse/Makefile.in:55:ARFLAGS=3Dcru >> contrib/ntp/arlib/Makefile.in:54:ARFLAGS=3Dcru >> contrib/ntp/ntpd/Makefile.in:61:ARFLAGS=3Dcru >> contrib/tcp_wrappers/Makefile:95:ARFLAGS=3Drv >> contrib/tcp_wrappers/Makefile:101:ARFLAGS=3Drv >> [...] >> contrib/tcp_wrappers/Makefile:404:ARFLAGS=3Drv >> contrib/bind9/configure.in:73:ARFLAGS=3Dcruv >> contrib/gcclibs/libcpp/Makefile.in:30:ARFLAGS=3Dcru >> contrib/gcclibs/libdecnumber/Makefile.in:30:ARFLAGS=3Dcru >> contrib/dtc/Makefile:49:ARFLAGS=3Drc >> crypto/heimdal/appl/ftp/common/Makefile.in:93:ARFLAGS=3Dcru >> crypto/heimdal/appl/telnet/libtelnet/Makefile.in:93:ARFLAGS=3Dcru >> crypto/heimdal/lib/45/Makefile.in:101:ARFLAGS=3Dcru >> crypto/openssl/Makefile.org:66:ARFLAGS=3D >> crypto/openssl/Makefile:68:ARFLAGS=3D >=20 > Something like this seems to be needed, since the default flags in = sys.mk > of: >=20 >> share/mk/sys.mk:36:ARFLAGS?=3D-rv >> share/mk/sys.mk:38:ARFLAGS?=3Drl >> usr.bin/make/PSD.doc/tutorial.ms:2968:ARFLAGS?=3Dcrl >=20 > are almost as bad as -D there. -rv is for the %POSIX case. The -v > in it makes it wrong for most uses, especially when make output is > supposed to be quieted by -s. At least it uses the newfangled option > syntax (starting with a '-'). rl is for the usual case. The `l' flag > is bogus since it was documented as accepted but not used. Now it > seems to be undocumented, but still accepted but not used. The `r' > flag is normally wanted, but most places also want 'c' and possibly > 'u'. >=20 > Having anything in the default ARFLAGS is bad since (except in the > %POSIX case) its contents is undocumented so it is hard to tell what > precautions should be taken to avoid bad things in it. There seems > to be no way to cancel bad things in it by adding to it, so makefiles > wanting to use the default would have to use something like > substitutions in it. E.g.: >=20 > %%% > ARFLAGS:=3D ${ARFLAGS:S/l//} # remove nonsense flag 'l' > ARFLAGS:=3D ${ARFLAGS:S/D//} # remove unwanted flag 'v' > foo: > echo ${ARFLAGS} > %%% >=20 > But it is easier to blow away the garbage using ARFLAGS=3Dcru. There = were > few or no flags like -D that could reasonably set outside of sys.mk, > according to user or system preferences, so that no Makefile should = touch > them. Perhaps -v is another one -- setting this wouldn't change the > created archives, but might be useful for debugging. >=20 > The primary user of ${AR} for FreeBSD builds, namely bsd.lib.mk, = doesn't > even use ${ARFLAGS}, so it is missing from the above list. It uses = the > literal `cq' whenever it uses the non-literal ${AR}. Perhaps ar is = often > spelled `ar' too. I'm a real beginner here. As I read the manuals (GNU ar and BSD ar), the = only flags that really control archive contents on archive creation is = 'q' and 'r'. The 'l' is ignored, 'c' and 'v' control verbosity, and 'u' = and 's' are for performance purposes that are largely irrelevant today = (extracting every single *.a file and recreating it wit ar -rD takes = less than 10 secs on my slow machine). Is there any negative impact at = runtime from having all archives created with either -rD or -qD = (ignoring verbosity at build time for now)? Thanks, Erik= --Apple-Mail-2031--846068754-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 08:41:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A184910656C2; Sun, 10 Oct 2010 08:41:08 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85EF68FC1C; Sun, 10 Oct 2010 08:41:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9A8f87v075583; Sun, 10 Oct 2010 08:41:08 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9A8f8ZN075579; Sun, 10 Oct 2010 08:41:08 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010100841.o9A8f8ZN075579@svn.freebsd.org> From: Martin Matuska Date: Sun, 10 Oct 2010 08:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213667 - in stable/8: lib/libarchive usr.bin/ar usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 08:41:08 -0000 Author: mm Date: Sun Oct 10 08:41:08 2010 New Revision: 213667 URL: http://svn.freebsd.org/changeset/base/213667 Log: - Add liblzma support to libarchive and usr.bin/tar - Do not link usr.bin/ar to liblzma if building bootstrap-tools and the local system doesn't include liblzma (fixes world build on FreeBSD 7.x) This is a direct commit. Approved by: delphij (mentor) Modified: stable/8/lib/libarchive/Makefile stable/8/usr.bin/ar/Makefile stable/8/usr.bin/tar/Makefile Modified: stable/8/lib/libarchive/Makefile ============================================================================== --- stable/8/lib/libarchive/Makefile Sun Oct 10 07:28:56 2010 (r213666) +++ stable/8/lib/libarchive/Makefile Sun Oct 10 08:41:08 2010 (r213667) @@ -2,8 +2,16 @@ .include LIB= archive -DPADD= ${LIBBZ2} ${LIBZ} ${LIBMD} -LDADD= -lbz2 -lz -lmd +DPADD= ${LIBZ} ${LIBMD} +LDADD= -lz -lmd + +DPADD+= ${LIBBZ2} +LDADD+= -lbz2 +CFLAGS+= -DHAVE_BZLIB_H=1 + +DPADD+= ${LIBLZMA} +LDADD+= -llzma +CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. @@ -11,10 +19,6 @@ SHLIB_MAJOR= 5 CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" CFLAGS+= -I${.OBJDIR} -#Uncomment to build with full lzma/xz support via liblzma -#liblzma is not (yet?) part of the FreeBSD base system -#CFLAGS+= -I/usr/local/include -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -#LDADD+= -L/usr/local/lib -llzma .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_OPENSSL Modified: stable/8/usr.bin/ar/Makefile ============================================================================== --- stable/8/usr.bin/ar/Makefile Sun Oct 10 07:28:56 2010 (r213666) +++ stable/8/usr.bin/ar/Makefile Sun Oct 10 08:41:08 2010 (r213667) @@ -8,6 +8,13 @@ WARNS?= 5 DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF} LDADD= -larchive -lbz2 -lz -lelf +# Do not depend on liblzma if we are building the bootstrap-tools and +# the local system doesn't include liblzma +.if !defined(BOOTSTRAPPING) || ${BOOTSTRAPPING} >= 800505 +DPADD+= ${LIBLZMA} +LDADD+= -llzma +.endif + CFLAGS+=-I. -I${.CURDIR} NO_SHARED?= yes Modified: stable/8/usr.bin/tar/Makefile ============================================================================== --- stable/8/usr.bin/tar/Makefile Sun Oct 10 07:28:56 2010 (r213666) +++ stable/8/usr.bin/tar/Makefile Sun Oct 10 08:41:08 2010 (r213667) @@ -5,13 +5,14 @@ PROG= bsdtar BSDTAR_VERSION_STRING=2.7.0 SRCS= bsdtar.c cmdline.c getdate.c matching.c read.c siginfo.c subst.c tree.c util.c write.c WARNS?= 5 -DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} -LDADD= -larchive -lbz2 -lz -lmd +DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} +LDADD= -larchive -lbz2 -lz -lmd -llzma .if ${MK_OPENSSL} != "no" LDADD+= -lcrypto .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" +CFLAGS+= -DHAVE_LIBLZMA CFLAGS+= -I${.CURDIR} SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 08:55:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D09DD1065670; Sun, 10 Oct 2010 08:55:20 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 367ED8FC16; Sun, 10 Oct 2010 08:55:19 +0000 (UTC) Received: by qwe4 with SMTP id 4so934938qwe.13 for ; Sun, 10 Oct 2010 01:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=1juHwl7JvdUcGTCCDWxVXdHsYH9qvQ6LDyJFISLT+yA=; b=EiQpTySXFTCiA5e+LTwOgJlUuIu/KdoENK8KhfMJHpzyqQVJKzIFgdoQvsZVLYziwZ 8GVTDlCJGooaif33Cy70pPDmtccZP4vdNy8MI/8SBmBqcBnNg285JuUdIinx9p5PGe4a YfnFySZfh9IWeaNwMFbNBR0/swiUD0NZWRuVo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=apkPnYfs/OQWiXbcbIjCayMwx/2OvkLf+1fI5yTXpZau1eKo7VDe1LjxjHKQ5ItyRz MgrEL3OT4fyOzI3/LkgW+Ev2gwFQWxMgwRR1wha1OoEf9SflOe7cuXHU7D9rLkZJ1Gl4 xp8QHzU2nEl+MhVLFL/+rXdV3pu40D6tj9KBo= Received: by 10.229.89.75 with SMTP id d11mr3944821qcm.32.1286700918758; Sun, 10 Oct 2010 01:55:18 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.234.81 with HTTP; Sun, 10 Oct 2010 01:54:37 -0700 (PDT) In-Reply-To: <201010092020.o99KKSYW051470@svn.freebsd.org> References: <201010092020.o99KKSYW051470@svn.freebsd.org> From: Ivan Voras Date: Sun, 10 Oct 2010 10:54:37 +0200 X-Google-Sender-Auth: hYnKx8ESwepYZ3GRfhB5z7KJSTc Message-ID: To: "Andrey V. Elsukov" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r213662 - in head: sbin/geom/class/concat sbin/geom/class/eli sbin/geom/class/journal sbin/geom/class/mirror sbin/geom/class/part sbin/geom/class/raid3 sbin/geom/class/shsec sbin/geom/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 08:55:20 -0000 On 9 October 2010 22:20, Andrey V. Elsukov wrote: > Author: ae > Date: Sat Oct =C2=A09 20:20:27 2010 > New Revision: 213662 > URL: http://svn.freebsd.org/changeset/base/213662 > > Log: > =C2=A0Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1. Um, this looks like a pointless change and for the worse; Even at -O1 the compiler will reduce strlen(constant) to just its result and for code like printf("%d\n", sizeof("1234567")) produce code like: movl $7, %esi movl $.LC0, %edi movl $0, %eax call printf And (though tastes differ) I think the sizeof() variant is less readable. The strlen(_PATH_something) idiom is common in other parts of the kernel outside GEOM. In short - why was this done? From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 09:24:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A7C41065672; Sun, 10 Oct 2010 09:24:19 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6967E8FC12; Sun, 10 Oct 2010 09:24:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9A9OJqI076511; Sun, 10 Oct 2010 09:24:19 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9A9OJ6K076509; Sun, 10 Oct 2010 09:24:19 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201010100924.o9A9OJ6K076509@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 10 Oct 2010 09:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213668 - head/sbin/mksnap_ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 09:24:19 -0000 Author: jh Date: Sun Oct 10 09:24:19 2010 New Revision: 213668 URL: http://svn.freebsd.org/changeset/base/213668 Log: - Print the nmount(2) provided error message only when it is set. - Ensure that the error message is NUL-terminated before printing it. PR: bin/147482 MFC after: 2 weeks Modified: head/sbin/mksnap_ffs/mksnap_ffs.c Modified: head/sbin/mksnap_ffs/mksnap_ffs.c ============================================================================== --- head/sbin/mksnap_ffs/mksnap_ffs.c Sun Oct 10 08:41:08 2010 (r213667) +++ head/sbin/mksnap_ffs/mksnap_ffs.c Sun Oct 10 09:24:19 2010 (r213668) @@ -121,8 +121,12 @@ main(int argc, char **argv) build_iovec(&iov, &iovlen, "update", NULL, 0); build_iovec(&iov, &iovlen, "snapshot", NULL, 0); - if (nmount(iov, iovlen, stfsbuf.f_flags) < 0) - err(1, "Cannot create snapshot %s: %s", snapname, errmsg); + *errmsg = '\0'; + if (nmount(iov, iovlen, stfsbuf.f_flags) < 0) { + errmsg[sizeof(errmsg) - 1] = '\0'; + err(1, "Cannot create snapshot %s%s%s", snapname, + *errmsg != '\0' ? ": " : "", errmsg); + } if ((fd = open(snapname, O_RDONLY)) < 0) err(1, "Cannot open %s", snapname); if (fstat(fd, &stbuf) != 0) From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 09:35:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2497C106564A; Sun, 10 Oct 2010 09:35:32 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id C5D3F8FC08; Sun, 10 Oct 2010 09:35:31 +0000 (UTC) Received: from outgoing.leidinger.net (p5B32FD81.dip.t-dialin.net [91.50.253.129]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 97CED84400C; Sun, 10 Oct 2010 11:35:28 +0200 (CEST) Received: from unknown (IO.Leidinger.net [192.168.2.110]) by outgoing.leidinger.net (Postfix) with ESMTP id 9604A1C61; Sun, 10 Oct 2010 11:35:25 +0200 (CEST) Date: Sun, 10 Oct 2010 11:35:24 +0200 From: Alexander Leidinger To: Mark Murray Message-ID: <20101010113524.00004725@unknown> In-Reply-To: <201010081742.o98HgAbO001604@svn.freebsd.org> References: <201010081742.o98HgAbO001604@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 97CED84400C.A6E49 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.923, required 6, autolearn=disabled, ALL_TRUSTED -1.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1287308129.72048@deByo8jcouWD+KrPqrxNwQ X-EBL-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r213585 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 09:35:32 -0000 On Fri, 8 Oct 2010 17:42:10 +0000 (UTC) Mark Murray wrote: > Author: markm > Date: Fri Oct 8 17:42:09 2010 > New Revision: 213585 > URL: http://svn.freebsd.org/changeset/base/213585 > > Log: > Don't blow away /bin/rmail symlink if we are keeping mailwrapper. > Mailwrapper can provide a perfectly good rmail with other > mailers. Can you please point out where rmail is installed when MK_SENDMAIL=no and MK_MAILWRAPPER!=no? I can not find such a place. If not: your commit is wrong, it either 1) misses to add this functionality to build-/installworld or 2) needs to be reverted if you do not want to do 2), as the goal for delete-old is to remove files which are not not installed by installworld now, but where installed by installworld before. Bye, Alexander. From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 10:25:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AACC1065670 for ; Sun, 10 Oct 2010 10:25:08 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from gromit.grondar.org (unknown [IPv6:2001:ba8:0:1d5:216:d4ff:fe0d:d845]) by mx1.freebsd.org (Postfix) with ESMTP id 1F26E8FC1D for ; Sun, 10 Oct 2010 10:25:08 +0000 (UTC) Received: from uucp by gromit.grondar.org with UUCP (Exim 4.72) (envelope-from ) id 1P4t5W-0005Or-NI for svn-src-all@freebsd.org; Sun, 10 Oct 2010 11:25:06 +0100 Received: from localhost ([127.0.0.1] helo=groundzero.grondar.org) by groundzero.grondar.org with esmtp (Exim 4.72 (FreeBSD)) (envelope-from ) id 1P4t0x-0000h4-WA; Sun, 10 Oct 2010 11:20:23 +0100 Message-Id: To: Alexander Leidinger In-reply-to: <20101010113524.00004725@unknown> References: <201010081742.o98HgAbO001604@svn.freebsd.org> <20101010113524.00004725@unknown> From: Mark Murray Date: Sun, 10 Oct 2010 11:20:23 +0100 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r213585 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 10:25:08 -0000 Alexander Leidinger writes: > Can you please point out where rmail is installed when MK_SENDMAIL=no > and MK_MAILWRAPPER!=no? I can not find such a place. src/usr.sbin/mailwrapper/Makefile M -- Mark R V Murray Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open) Pi: 132511160 From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 12:18:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F4461065674; Sun, 10 Oct 2010 12:18:53 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DE928FC1A; Sun, 10 Oct 2010 12:18:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9ACIrNZ082301; Sun, 10 Oct 2010 12:18:53 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9ACIrl7082298; Sun, 10 Oct 2010 12:18:53 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010101218.o9ACIrl7082298@svn.freebsd.org> From: Martin Matuska Date: Sun, 10 Oct 2010 12:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213669 - stable/8/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 12:18:53 -0000 Author: mm Date: Sun Oct 10 12:18:53 2010 New Revision: 213669 URL: http://svn.freebsd.org/changeset/base/213669 Log: Move HAVE_LIBLZMA from Makefile to config_freebsd.h Approved by: delphij (mentor) Modified: stable/8/usr.bin/tar/Makefile stable/8/usr.bin/tar/config_freebsd.h Modified: stable/8/usr.bin/tar/Makefile ============================================================================== --- stable/8/usr.bin/tar/Makefile Sun Oct 10 09:24:19 2010 (r213668) +++ stable/8/usr.bin/tar/Makefile Sun Oct 10 12:18:53 2010 (r213669) @@ -12,7 +12,6 @@ LDADD+= -lcrypto .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -DHAVE_LIBLZMA CFLAGS+= -I${.CURDIR} SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 Modified: stable/8/usr.bin/tar/config_freebsd.h ============================================================================== --- stable/8/usr.bin/tar/config_freebsd.h Sun Oct 10 09:24:19 2010 (r213668) +++ stable/8/usr.bin/tar/config_freebsd.h Sun Oct 10 12:18:53 2010 (r213669) @@ -61,6 +61,9 @@ #define HAVE_LIBARCHIVE 1 #define HAVE_LIBBZ2 1 #define HAVE_LIBZ 1 +#if __FreeBSD_version >= 800505 /* liblzma introduced */ +#define HAVE_LIBLZMA 1 +#endif #define HAVE_LIMITS_H 1 #undef HAVE_LINUX_EXT2_FS_H #undef HAVE_LINUX_FS_H From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 12:20:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3611E10656BC; Sun, 10 Oct 2010 12:20:05 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A8208FC18; Sun, 10 Oct 2010 12:20:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9ACK4LB082373; Sun, 10 Oct 2010 12:20:05 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9ACK4xg082371; Sun, 10 Oct 2010 12:20:04 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201010101220.o9ACK4xg082371@svn.freebsd.org> From: Kai Wang Date: Sun, 10 Oct 2010 12:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213670 - stable/8/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2010 12:20:05 -0000 Author: kaiw Date: Sun Oct 10 12:20:04 2010 New Revision: 213670 URL: http://svn.freebsd.org/changeset/base/213670 Log: MFC r212373: libelf is overly strict about the type and alignment of Elf_Data objects inside one ELF section, which prevents the creation of a ELF section with mixed data types. For example, gcc LTO use libelf to create a .gnu_lto_XXX section that contains integers and a string table, which doesn't work with our libelf implementation. The changes made in this commit include: * Allow Elf_Data type to be different than section type. * Relax Elf_Data alignment check. * Align each Elf_Data by their own alignment instead of section alignment. Modified: stable/8/lib/libelf/elf_update.c Directory Properties: stable/8/lib/libelf/ (props changed) Modified: stable/8/lib/libelf/elf_update.c ============================================================================== --- stable/8/lib/libelf/elf_update.c Sun Oct 10 12:18:53 2010 (r213669) +++ stable/8/lib/libelf/elf_update.c Sun Oct 10 12:20:04 2010 (r213670) @@ -141,7 +141,7 @@ _libelf_compute_section_extents(Elf *e, /* Compute the section alignment. */ STAILQ_FOREACH(d, &s->s_data, d_next) { - if (d->d_type != elftype) { + if (d->d_type > ELF_T_LAST) { LIBELF_SET_ERROR(DATA, 0); return (0); } @@ -149,11 +149,7 @@ _libelf_compute_section_extents(Elf *e, LIBELF_SET_ERROR(VERSION, 0); return (0); } - if ((d_align = d->d_align) % sh_align) { - LIBELF_SET_ERROR(LAYOUT, 0); - return (0); - } - if (d_align == 0 || (d_align & (d_align - 1))) { + if ((d_align = d->d_align) == 0 || (d_align & (d_align - 1))) { LIBELF_SET_ERROR(DATA, 0); return (0); } @@ -168,7 +164,7 @@ _libelf_compute_section_extents(Elf *e, if ((uint64_t) d->d_off + d->d_size > scn_size) scn_size = d->d_off + d->d_size; } else { - scn_size = roundup2(scn_size, scn_alignment); + scn_size = roundup2(scn_size, d->d_align); d->d_off = scn_size; scn_size += d->d_size; } @@ -560,8 +556,6 @@ _libelf_write_scn(Elf *e, char *nf, Elf_ elftype = _libelf_xlate_shtype(sh_type); assert(elftype >= ELF_T_FIRST && elftype <= ELF_T_LAST); - msz = _libelf_msize(elftype, ec, e->e_version); - sh_off = s->s_offset; assert(sh_off % _libelf_falign(elftype, ec) == 0); @@ -608,6 +602,8 @@ _libelf_write_scn(Elf *e, char *nf, Elf_ STAILQ_FOREACH(d, &s->s_data, d_next) { + msz = _libelf_msize(d->d_type, ec, e->e_version); + if ((uint64_t) rc < sh_off + d->d_off) (void) memset(nf + rc, LIBELF_PRIVATE(fillchar), sh_off + d->d_off - rc); @@ -615,13 +611,12 @@ _libelf_write_scn(Elf *e, char *nf, Elf_ rc = sh_off + d->d_off; assert(d->d_buf != NULL); - assert(d->d_type == (Elf_Type) elftype); assert(d->d_version == e->e_version); assert(d->d_size % msz == 0); nobjects = d->d_size / msz; - fsz = _libelf_fsize(elftype, ec, e->e_version, nobjects); + fsz = _libelf_fsize(d->d_type, ec, e->e_version, nobjects); dst.d_buf = nf + rc; dst.d_size = fsz; From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 12:21:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5547D1065672; Sun, 10 Oct 2010 12:21:36 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35ED28FC08; Sun, 10 Oct 2010 12:21:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9ACLa7Q082449; Sun, 10 Oct 2010 12:21:36 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9ACLaDS082447; Sun, 10 Oct 2010 12:21:36 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201010101221.o9ACLaDS082447@svn.freebsd.org> From: Kai Wang Date: Sun, 10 Oct 2010 12:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213671 - stable/7/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2010 12:21:36 -0000 Author: kaiw Date: Sun Oct 10 12:21:35 2010 New Revision: 213671 URL: http://svn.freebsd.org/changeset/base/213671 Log: MFC r212373: libelf is overly strict about the type and alignment of Elf_Data objects inside one ELF section, which prevents the creation of a ELF section with mixed data types. For example, gcc LTO use libelf to create a .gnu_lto_XXX section that contains integers and a string table, which doesn't work with our libelf implementation. The changes made in this commit include: * Allow Elf_Data type to be different than section type. * Relax Elf_Data alignment check. * Align each Elf_Data by their own alignment instead of section alignment. Modified: stable/7/lib/libelf/elf_update.c Directory Properties: stable/7/lib/libelf/ (props changed) Modified: stable/7/lib/libelf/elf_update.c ============================================================================== --- stable/7/lib/libelf/elf_update.c Sun Oct 10 12:20:04 2010 (r213670) +++ stable/7/lib/libelf/elf_update.c Sun Oct 10 12:21:35 2010 (r213671) @@ -141,7 +141,7 @@ _libelf_compute_section_extents(Elf *e, /* Compute the section alignment. */ STAILQ_FOREACH(d, &s->s_data, d_next) { - if (d->d_type != elftype) { + if (d->d_type > ELF_T_LAST) { LIBELF_SET_ERROR(DATA, 0); return (0); } @@ -149,11 +149,7 @@ _libelf_compute_section_extents(Elf *e, LIBELF_SET_ERROR(VERSION, 0); return (0); } - if ((d_align = d->d_align) % sh_align) { - LIBELF_SET_ERROR(LAYOUT, 0); - return (0); - } - if (d_align == 0 || (d_align & (d_align - 1))) { + if ((d_align = d->d_align) == 0 || (d_align & (d_align - 1))) { LIBELF_SET_ERROR(DATA, 0); return (0); } @@ -168,7 +164,7 @@ _libelf_compute_section_extents(Elf *e, if ((uint64_t) d->d_off + d->d_size > scn_size) scn_size = d->d_off + d->d_size; } else { - scn_size = roundup2(scn_size, scn_alignment); + scn_size = roundup2(scn_size, d->d_align); d->d_off = scn_size; scn_size += d->d_size; } @@ -560,8 +556,6 @@ _libelf_write_scn(Elf *e, char *nf, Elf_ elftype = _libelf_xlate_shtype(sh_type); assert(elftype >= ELF_T_FIRST && elftype <= ELF_T_LAST); - msz = _libelf_msize(elftype, ec, e->e_version); - sh_off = s->s_offset; assert(sh_off % _libelf_falign(elftype, ec) == 0); @@ -608,6 +602,8 @@ _libelf_write_scn(Elf *e, char *nf, Elf_ STAILQ_FOREACH(d, &s->s_data, d_next) { + msz = _libelf_msize(d->d_type, ec, e->e_version); + if ((uint64_t) rc < sh_off + d->d_off) (void) memset(nf + rc, LIBELF_PRIVATE(fillchar), sh_off + d->d_off - rc); @@ -615,13 +611,12 @@ _libelf_write_scn(Elf *e, char *nf, Elf_ rc = sh_off + d->d_off; assert(d->d_buf != NULL); - assert(d->d_type == (Elf_Type) elftype); assert(d->d_version == e->e_version); assert(d->d_size % msz == 0); nobjects = d->d_size / msz; - fsz = _libelf_fsize(elftype, ec, e->e_version, nobjects); + fsz = _libelf_fsize(d->d_type, ec, e->e_version, nobjects); dst.d_buf = nf + rc; dst.d_size = fsz; From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 20:37:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEA2D1065674; Sun, 10 Oct 2010 20:37:38 +0000 (UTC) (envelope-from randi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDA4E8FC0C; Sun, 10 Oct 2010 20:37:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9AKbcL8092504; Sun, 10 Oct 2010 20:37:38 GMT (envelope-from randi@svn.freebsd.org) Received: (from randi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9AKbcFG092501; Sun, 10 Oct 2010 20:37:38 GMT (envelope-from randi@svn.freebsd.org) Message-Id: <201010102037.o9AKbcFG092501@svn.freebsd.org> From: Randi Harper Date: Sun, 10 Oct 2010 20:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213672 - in head/usr.sbin: mfiutil mptutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2010 20:37:38 -0000 Author: randi Date: Sun Oct 10 20:37:38 2010 New Revision: 213672 URL: http://svn.freebsd.org/changeset/base/213672 Log: Report subcommand handler errors in mfiutil/mptutil so that tools that invoke the utilities can robustly report errors. Submitted by: gcooper Reviewed by: jhb Approved by: cperciva (mentor) MFC after: 1 week Modified: head/usr.sbin/mfiutil/mfiutil.c head/usr.sbin/mptutil/mptutil.c Modified: head/usr.sbin/mfiutil/mfiutil.c ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.c Sun Oct 10 12:21:35 2010 (r213671) +++ head/usr.sbin/mfiutil/mfiutil.c Sun Oct 10 20:37:38 2010 (r213672) @@ -125,10 +125,12 @@ main(int ac, char **av) SET_FOREACH(cmd, MFI_DATASET(top)) { if (strcmp((*cmd)->name, av[0]) == 0) { - (*cmd)->handler(ac, av); - return (0); + if ((*cmd)->handler(ac, av)) + return (1); + else + return (0); } } warnx("Unknown command %s.", av[0]); - return (0); + return (1); } Modified: head/usr.sbin/mptutil/mptutil.c ============================================================================== --- head/usr.sbin/mptutil/mptutil.c Sun Oct 10 12:21:35 2010 (r213671) +++ head/usr.sbin/mptutil/mptutil.c Sun Oct 10 20:37:38 2010 (r213672) @@ -114,10 +114,12 @@ main(int ac, char **av) SET_FOREACH(cmd, MPT_DATASET(top)) { if (strcmp((*cmd)->name, av[0]) == 0) { - (*cmd)->handler(ac, av); - return (0); + if ((*cmd)->handler(ac, av)) + return (1); + else + return (0); } } warnx("Unknown command %s.", av[0]); - return (0); + return (1); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 20:49:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9EA4106564A; Sun, 10 Oct 2010 20:49:33 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6BD8FC14; Sun, 10 Oct 2010 20:49:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9AKnXKZ092777; Sun, 10 Oct 2010 20:49:33 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9AKnXZU092775; Sun, 10 Oct 2010 20:49:33 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010102049.o9AKnXZU092775@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 10 Oct 2010 20:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213673 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2010 20:49:33 -0000 Author: pjd Date: Sun Oct 10 20:49:33 2010 New Revision: 213673 URL: http://svn.freebsd.org/changeset/base/213673 Log: Provide internal ioflags() function that converts ioflag provided by FreeBSD's VFS to OpenSolaris-specific ioflag expected by ZFS. Use it for read and write operations. Reviewed by: mm MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Oct 10 20:37:38 2010 (r213672) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Oct 10 20:49:33 2010 (r213673) @@ -705,7 +705,7 @@ zfs_prefault_write(ssize_t n, struct uio * IN: vp - vnode of file to be written to. * uio - structure supplying write location, range info, * and data buffer. - * ioflag - IO_APPEND flag set if in append mode. + * ioflag - FAPPEND flag set if in append mode. * cr - credentials of caller. * ct - caller context (NFS/CIFS fem monitor only) * @@ -755,7 +755,7 @@ zfs_write(vnode_t *vp, uio_t *uio, int i */ pflags = zp->z_phys->zp_flags; if ((pflags & (ZFS_IMMUTABLE | ZFS_READONLY)) || - ((pflags & ZFS_APPENDONLY) && !(ioflag & IO_APPEND) && + ((pflags & ZFS_APPENDONLY) && !(ioflag & FAPPEND) && (uio->uio_loffset < zp->z_phys->zp_size))) { ZFS_EXIT(zfsvfs); return (EPERM); @@ -772,7 +772,7 @@ zfs_write(vnode_t *vp, uio_t *uio, int i /* * If in append mode, set the io offset pointer to eof. */ - if (ioflag & IO_APPEND) { + if (ioflag & FAPPEND) { /* * Range lock for a file append: * The value for the start of range will be determined by @@ -4181,6 +4181,21 @@ zfs_setsecattr(vnode_t *vp, vsecattr_t * } static int +ioflags(int ioflags) +{ + int flags = 0; + + if (ioflags & IO_APPEND) + flags |= FAPPEND; + if (ioflags & IO_NDELAY) + flags |= FNONBLOCK; + if (ioflags & IO_SYNC) + flags |= (FSYNC | FDSYNC | FRSYNC); + + return (flags); +} + +static int zfs_freebsd_open(ap) struct vop_open_args /* { struct vnode *a_vp; @@ -4238,7 +4253,8 @@ zfs_freebsd_read(ap) } */ *ap; { - return (zfs_read(ap->a_vp, ap->a_uio, ap->a_ioflag, ap->a_cred, NULL)); + return (zfs_read(ap->a_vp, ap->a_uio, ioflags(ap->a_ioflag), + ap->a_cred, NULL)); } static int @@ -4254,7 +4270,8 @@ zfs_freebsd_write(ap) if (vn_rlimit_fsize(ap->a_vp, ap->a_uio, ap->a_uio->uio_td)) return (EFBIG); - return (zfs_write(ap->a_vp, ap->a_uio, ap->a_ioflag, ap->a_cred, NULL)); + return (zfs_write(ap->a_vp, ap->a_uio, ioflags(ap->a_ioflag), + ap->a_cred, NULL)); } static int From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 20:54:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C8311065673; Sun, 10 Oct 2010 20:54:01 +0000 (UTC) (envelope-from randi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BEA98FC14; Sun, 10 Oct 2010 20:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9AKs1n0092895; Sun, 10 Oct 2010 20:54:01 GMT (envelope-from randi@svn.freebsd.org) Received: (from randi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9AKs1hO092893; Sun, 10 Oct 2010 20:54:01 GMT (envelope-from randi@svn.freebsd.org) Message-Id: <201010102054.o9AKs1hO092893@svn.freebsd.org> From: Randi Harper Date: Sun, 10 Oct 2010 20:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213674 - head/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2010 20:54:01 -0000 Author: randi Date: Sun Oct 10 20:54:01 2010 New Revision: 213674 URL: http://svn.freebsd.org/changeset/base/213674 Log: Fix compile with -DDEBUG by using the correct mfi_pd_ref union definition in mfireg.h. Submitted by: gcooper Reviewed by: jhb Approved by: cperciva (mentor) MFC after: 1 week Modified: head/usr.sbin/mfiutil/mfi_config.c Modified: head/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_config.c Sun Oct 10 20:49:33 2010 (r213673) +++ head/usr.sbin/mfiutil/mfi_config.c Sun Oct 10 20:54:01 2010 (r213674) @@ -1024,7 +1024,7 @@ dump_config(int fd, struct mfi_config_da ar->num_drives); printf(" size = %ju\n", (uintmax_t)ar->size); for (j = 0; j < ar->num_drives; j++) { - device_id = ar->pd[j].ref.device_id; + device_id = ar->pd[j].ref.v.device_id; if (device_id == 0xffff) printf(" drive MISSING\n"); else { @@ -1080,7 +1080,7 @@ dump_config(int fd, struct mfi_config_da sp = (struct mfi_spare *)p; printf(" %s spare %u ", sp->spare_type & MFI_SPARE_DEDICATED ? "dedicated" : - "global", sp->ref.device_id); + "global", sp->ref.v.device_id); printf("%s", mfi_pdstate(MFI_PD_STATE_HOT_SPARE)); printf(" backs:\n"); for (j = 0; j < sp->array_count; j++) From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 08:10:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B6011065673; Mon, 11 Oct 2010 08:10:12 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4438FC1C; Mon, 11 Oct 2010 08:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9B8ACbA006876; Mon, 11 Oct 2010 08:10:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9B8AC5O006874; Mon, 11 Oct 2010 08:10:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201010110810.o9B8AC5O006874@svn.freebsd.org> From: Rui Paulo Date: Mon, 11 Oct 2010 08:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213681 - head/contrib/llvm/tools/clang/lib/Analysis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 08:10:12 -0000 Author: rpaulo Date: Mon Oct 11 08:10:12 2010 New Revision: 213681 URL: http://svn.freebsd.org/changeset/base/213681 Log: Restore the support for the 'r' and the 'y' conversion specifiers, first added on r208987. These are undocumented but are part of printf(9). Modified: head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp Modified: head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp Mon Oct 11 01:05:42 2010 (r213680) +++ head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp Mon Oct 11 08:10:12 2010 (r213681) @@ -195,6 +195,8 @@ static PrintfSpecifierResult ParsePrintf case 'm': k = ConversionSpecifier::PrintErrno; break; // FreeBSD format extensions case 'b': if (FormatExtensions) k = ConversionSpecifier::bArg; break; /* check for int and then char * */ + case 'r': if (FormatExtensions) k = ConversionSpecifier::xArg; break; + case 'y': if (FormatExtensions) k = ConversionSpecifier::iArg; break; case 'D': if (FormatExtensions) k = ConversionSpecifier::DArg; break; /* check for u_char * pointer and a char * string */ } PrintfConversionSpecifier CS(conversionPosition, k); From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 08:28:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82A1A106564A; Mon, 11 Oct 2010 08:28:14 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 333E28FC0C; Mon, 11 Oct 2010 08:28:13 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3B433.dip.t-dialin.net [87.179.180.51]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id D6EFB84401F; Mon, 11 Oct 2010 10:28:09 +0200 (CEST) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id A69571D25; Mon, 11 Oct 2010 10:28:06 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o9B8S1Mk026317; Mon, 11 Oct 2010 10:28:01 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 11 Oct 2010 10:28:01 +0200 Message-ID: <20101011102801.10542rdhqicnige8@webmail.leidinger.net> Date: Mon, 11 Oct 2010 10:28:01 +0200 From: Alexander Leidinger To: Mark Murray References: <201010081742.o98HgAbO001604@svn.freebsd.org> <20101010113524.00004725@unknown> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: D6EFB84401F.A7B73 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.428, required 6, autolearn=disabled, RDNS_NONE 1.27, TW_SV 0.08, TW_VN 0.08) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1287390490.56085@4WAm83K8Ii5a0lgl6FFqkA X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r213585 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 08:28:14 -0000 Quoting Mark Murray (from Sun, 10 Oct 2010 11:20:23 +0100): > Alexander Leidinger writes: >> Can you please point out where rmail is installed when MK_SENDMAIL=no >> and MK_MAILWRAPPER!=no? I can not find such a place. > > src/usr.sbin/mailwrapper/Makefile What am I doing wrong? ---snip--- % grep rmail /usr/src/usr.sbin/mailwrapper % cd /usr/src/usr.sbin/mailwrapper % svnversion 213680 ---snip--- Bye, Alexander. > M > -- > Mark R V Murray > Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open) > Pi: 132511160 > > -- Whenever people agree with me I always feel I must be wrong. -- Oscar Wilde http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 08:29:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC7541065670; Mon, 11 Oct 2010 08:29:49 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 798E78FC18; Mon, 11 Oct 2010 08:29:49 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3B433.dip.t-dialin.net [87.179.180.51]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id C139384401F; Mon, 11 Oct 2010 10:29:46 +0200 (CEST) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id F3D501D26; Mon, 11 Oct 2010 10:29:43 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o9B8Thu8026654; Mon, 11 Oct 2010 10:29:43 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 11 Oct 2010 10:29:43 +0200 Message-ID: <20101011102943.57005on1chxhv44k@webmail.leidinger.net> Date: Mon, 11 Oct 2010 10:29:43 +0200 From: Alexander Leidinger To: Alexander Leidinger References: <201010081742.o98HgAbO001604@svn.freebsd.org> <20101010113524.00004725@unknown> <20101011102801.10542rdhqicnige8@webmail.leidinger.net> In-Reply-To: <20101011102801.10542rdhqicnige8@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: C139384401F.A8602 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.428, required 6, autolearn=disabled, RDNS_NONE 1.27, TW_SV 0.08, TW_VN 0.08) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1287390587.91006@/rbwANn+xpAFdzDgRaS63w X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Mark Murray Subject: Re: svn commit: r213585 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 08:29:49 -0000 Quoting Alexander Leidinger (from Mon, 11 Oct 2010 10:28:01 +0200): > Quoting Mark Murray (from Sun, 10 Oct 2010 > 11:20:23 +0100): > >> Alexander Leidinger writes: >>> Can you please point out where rmail is installed when MK_SENDMAIL=no >>> and MK_MAILWRAPPER!=no? I can not find such a place. >> >> src/usr.sbin/mailwrapper/Makefile > > What am I doing wrong? I did not do a correct copy&paste... put the result is the same. > ---snip--- > % grep rmail /usr/src/usr.sbin/mailwrapper % grep rmail /usr/src/usr.sbin/mailwrapper/Makefile Bye, Alexander. > > % cd /usr/src/usr.sbin/mailwrapper > > % svnversion > 213680 > ---snip--- > > Bye, > Alexander. > >> M >> -- >> Mark R V Murray >> Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open) >> Pi: 132511160 >> >> > > > > -- > Whenever people agree with me I always feel I must be wrong. > -- Oscar Wilde > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > -- How's the wife? Is she at home enjoying capitalism? http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 09:27:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8970106566C; Mon, 11 Oct 2010 09:27:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D721C8FC17; Mon, 11 Oct 2010 09:27:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9B9RbfJ008470; Mon, 11 Oct 2010 09:27:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9B9Rbqc008467; Mon, 11 Oct 2010 09:27:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010110927.o9B9Rbqc008467@svn.freebsd.org> From: Andriy Gapon Date: Mon, 11 Oct 2010 09:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213682 - head/lib/libcam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 09:27:38 -0000 Author: avg Date: Mon Oct 11 09:27:37 2010 New Revision: 213682 URL: http://svn.freebsd.org/changeset/base/213682 Log: cam_get_device, cam_open_device: make behavior simpler and more deterministic Remove or re-work support for the several features from the past: - remove incomplete support for trimming slice/partition names - remove mapping from old device names "sd" and "st" - remove whitespace trimming - remove unconditional skipping of leading 'r' in a device name - skip leading 'n' or 'e' only if the following device name matches a list of known devices that support no-rewind and eject-on-close features; currently this is only sa(4) - reflect the above changes in comments in code and in cam(3) - remove a note cautioning against use of cam_get_device and cam_open_device in cam(3) Reviewed by: mjacob Modified: head/lib/libcam/cam.3 head/lib/libcam/camlib.c Modified: head/lib/libcam/cam.3 ============================================================================== --- head/lib/libcam/cam.3 Mon Oct 11 08:10:12 2010 (r213681) +++ head/lib/libcam/cam.3 Mon Oct 11 09:27:37 2010 (r213682) @@ -190,12 +190,6 @@ into a device name and unit number. Once the device name and unit number are determined, a lookup is performed to determine the passthrough device that corresponds to the given device. -.Fn cam_open_device -is rather simple to use, but it is not really suitable for general use -because its behavior is not necessarily deterministic. -Programmers writing -new applications should make the extra effort to use one of the other open -routines documented below. .Pp .Fn cam_open_spec_device opens the @@ -354,19 +348,15 @@ respectively. can handle strings of the following forms, at least: .Pp .Bl -tag -width 1234 -compact -.It /dev/foo0a -.It /dev/foo1s2c +.It /dev/foo1 .It foo0 -.It foo0a -.It nfoo0 +.It nsa2 .El .Pp .Fn cam_get_device is provided as a convenience function for applications that need to provide functionality similar to .Fn cam_open_device . -Programmers are encouraged to use more deterministic methods of obtaining -device names and unit numbers if possible. .Sh RETURN VALUES .Fn cam_open_device , .Fn cam_open_spec_device , Modified: head/lib/libcam/camlib.c ============================================================================== --- head/lib/libcam/camlib.c Mon Oct 11 08:10:12 2010 (r213681) +++ head/lib/libcam/camlib.c Mon Oct 11 09:27:37 2010 (r213682) @@ -42,14 +42,9 @@ __FBSDID("$FreeBSD$"); #include #include "camlib.h" -struct cam_devequiv { - char *given_dev; - char *real_dev; -}; -struct cam_devequiv devmatchtable[] = { - {"sd", "da"}, - {"st", "sa"} +static const char *nonrewind_devs[] = { + "sa" }; char cam_errbuf[CAM_ERRBUF_SIZE]; @@ -103,19 +98,14 @@ cam_freeccb(union ccb *ccb) /* * Take a device name or path passed in by the user, and attempt to figure * out the device name and unit number. Some possible device name formats are: - * /dev/foo0a - * /dev/rfoo0a - * /dev/rfoos2c + * /dev/foo0 * foo0 - * foo0a - * rfoo0 - * rfoo0a - * nrfoo0 - * - * If the caller passes in an old style device name like 'sd' or 'st', - * it will be converted to the new style device name based upon devmatchtable - * above. + * nfoo0 * + * Some peripheral drivers create separate device nodes with 'n' prefix for + * non-rewind operations. Currently only sa(4) tape driver has this feature. + * We extract pure peripheral name as device name for this special case. + * * Input parameters: device name/path, length of devname string * Output: device name, unit number * Return values: returns 0 for success, -1 for failure @@ -127,7 +117,7 @@ cam_get_device(const char *path, char *d char *tmpstr, *tmpstr2; char *newpath; int unit_offset; - int i, found = 0; + int i; if (path == NULL) { @@ -142,10 +132,6 @@ cam_get_device(const char *path, char *d newpath = (char *)strdup(path); tmpstr = newpath; - /* Get rid of any leading white space */ - while (isspace(*tmpstr) && (*tmpstr != '\0')) - tmpstr++; - /* * Check to see whether we have an absolute pathname. */ @@ -166,54 +152,15 @@ cam_get_device(const char *path, char *d * Check to see whether the user has given us a nonrewound tape * device. */ - if (*tmpstr == 'n') - tmpstr++; - - if (*tmpstr == '\0') { - sprintf(cam_errbuf, "%s: no text after leading 'n'", func_name); - free(newpath); - return(-1); - } - - /* - * See if the user has given us a character device. - */ - if (*tmpstr == 'r') - tmpstr++; - - if (*tmpstr == '\0') { - sprintf(cam_errbuf, "%s: no text after leading 'r'", func_name); - free(newpath); - return(-1); - } - - /* - * Try to get rid of any trailing white space or partition letters. - */ - tmpstr2 = &tmpstr[strlen(tmpstr) - 1]; - - while ((*tmpstr2 != '\0') && (tmpstr2 > tmpstr) &&(!isdigit(*tmpstr2))){ - *tmpstr2 = '\0'; - tmpstr2--; - } - - /* - * Check to see whether we have been given a partition with a slice - * name. If so, get rid of the slice name/number. - */ - if (strlen(tmpstr) > 3) { - /* - * Basically, we're looking for a string that ends in the - * following general manner: 1s1 -- a number, the letter - * s, and then another number. This indicates that the - * user has given us a slice. We substitute nulls for the - * s and the slice number. - */ - if ((isdigit(tmpstr[strlen(tmpstr) - 1])) - && (tmpstr[strlen(tmpstr) - 2] == 's') - && (isdigit(tmpstr[strlen(tmpstr) - 3]))) { - tmpstr[strlen(tmpstr) - 1] = '\0'; - tmpstr[strlen(tmpstr) - 1] = '\0'; + if (*tmpstr == 'n' || *tmpstr == 'e') { + for (i = 0; i < sizeof(nonrewind_devs)/sizeof(char *); i++) { + int len = strlen(nonrewind_devs[i]); + if (strncmp(tmpstr + 1, nonrewind_devs[i], len) == 0) { + if (isdigit(tmpstr[len + 1])) { + tmpstr++; + break; + } + } } } @@ -281,20 +228,7 @@ cam_get_device(const char *path, char *d */ tmpstr[strlen(tmpstr) - unit_offset] = '\0'; - /* - * Look through our equivalency table and see if the device name - * the user gave us is an old style device name. If so, translate - * it to the new style device name. - */ - for (i = 0;i < (sizeof(devmatchtable)/sizeof(struct cam_devequiv));i++){ - if (strcmp(tmpstr, devmatchtable[i].given_dev) == 0) { - strlcpy(dev_name,devmatchtable[i].real_dev, devnamelen); - found = 1; - break; - } - } - if (found == 0) - strlcpy(dev_name, tmpstr, devnamelen); + strlcpy(dev_name, tmpstr, devnamelen); /* Clean up allocated memory */ free(newpath); From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 09:34:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 733B7106564A; Mon, 11 Oct 2010 09:34:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60D218FC1B; Mon, 11 Oct 2010 09:34:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9B9Yki2008687; Mon, 11 Oct 2010 09:34:46 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9B9YkIY008683; Mon, 11 Oct 2010 09:34:46 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010110934.o9B9YkIY008683@svn.freebsd.org> From: Martin Matuska Date: Mon, 11 Oct 2010 09:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213683 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 09:34:46 -0000 Author: mm Date: Mon Oct 11 09:34:46 2010 New Revision: 213683 URL: http://svn.freebsd.org/changeset/base/213683 Log: MFC r210470: Import two changesets from OpenSolaris to make future updates easier. The changes do not affect FreeBSD code because zfs_znode_move(), cleanlocks() and cleanshares() are not used. OpenSolaris onnv changeset: 9788:f660bc44f2e8, 9909:aa280f585a3e Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6843700, 6790232) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 11 09:27:37 2010 (r213682) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 11 09:34:46 2010 (r213683) @@ -955,11 +955,22 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t return (0); } +extern krwlock_t zfsvfs_lock; /* in zfs_znode.c */ + void zfsvfs_free(zfsvfs_t *zfsvfs) { int i; + /* + * This is a barrier to prevent the filesystem from going away in + * zfs_znode_move() until we can safely ensure that the filesystem is + * not unmounted. We consider the filesystem valid before the barrier + * and invalid after the barrier. + */ + rw_enter(&zfsvfs_lock, RW_READER); + rw_exit(&zfsvfs_lock); + zfs_fuid_destroy(zfsvfs); mutex_destroy(&zfsvfs->z_znodes_lock); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Oct 11 09:27:37 2010 (r213682) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Oct 11 09:34:46 2010 (r213683) @@ -200,6 +200,12 @@ zfs_close(vnode_t *vp, int flag, int cou znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; + /* + * Clean up any locks held by this process on the vp. + */ + cleanlocks(vp, ddi_get_pid(), 0); + cleanshares(vp, ddi_get_pid()); + ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zp); @@ -207,12 +213,6 @@ zfs_close(vnode_t *vp, int flag, int cou if ((flag & (FSYNC | FDSYNC)) && (count == 1)) atomic_dec_32(&zp->z_sync_cnt); - /* - * Clean up any locks held by this process on the vp. - */ - cleanlocks(vp, ddi_get_pid(), 0); - cleanshares(vp, ddi_get_pid()); - if (!zfs_has_ctldir(zp) && zp->z_zfsvfs->z_vscan && ZTOV(zp)->v_type == VREG && !(zp->z_phys->zp_flags & ZFS_AV_QUARANTINED) && Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Oct 11 09:27:37 2010 (r213682) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Oct 11 09:34:46 2010 (r213683) @@ -87,6 +87,12 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, znod * (such as VFS logic) that will not compile easily in userland. */ #ifdef _KERNEL +/* + * Needed to close a small window in zfs_znode_move() that allows the zfsvfs to + * be freed before it can be safely accessed. + */ +krwlock_t zfsvfs_lock; + static kmem_cache_t *znode_cache = NULL; /*ARGSUSED*/ @@ -200,8 +206,9 @@ zfs_znode_cache_destructor(void *buf, vo #ifdef ZNODE_STATS static struct { uint64_t zms_zfsvfs_invalid; + uint64_t zms_zfsvfs_recheck1; uint64_t zms_zfsvfs_unmounted; - uint64_t zms_zfsvfs_recheck_invalid; + uint64_t zms_zfsvfs_recheck2; uint64_t zms_obj_held; uint64_t zms_vnode_locked; uint64_t zms_not_only_dnlc; @@ -285,15 +292,32 @@ zfs_znode_move(void *buf, void *newbuf, } /* - * Ensure that the filesystem is not unmounted during the move. - * This is the equivalent to ZFS_ENTER(). + * Close a small window in which it's possible that the filesystem could + * be unmounted and freed, and zfsvfs, though valid in the previous + * statement, could point to unrelated memory by the time we try to + * prevent the filesystem from being unmounted. + */ + rw_enter(&zfsvfs_lock, RW_WRITER); + if (zfsvfs != ozp->z_zfsvfs) { + rw_exit(&zfsvfs_lock); + ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_recheck1); + return (KMEM_CBRC_DONT_KNOW); + } + + /* + * If the znode is still valid, then so is the file system. We know that + * no valid file system can be freed while we hold zfsvfs_lock, so we + * can safely ensure that the filesystem is not and will not be + * unmounted. The next statement is equivalent to ZFS_ENTER(). */ rrw_enter(&zfsvfs->z_teardown_lock, RW_READER, FTAG); if (zfsvfs->z_unmounted) { ZFS_EXIT(zfsvfs); + rw_exit(&zfsvfs_lock); ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_unmounted); return (KMEM_CBRC_DONT_KNOW); } + rw_exit(&zfsvfs_lock); mutex_enter(&zfsvfs->z_znodes_lock); /* @@ -303,7 +327,7 @@ zfs_znode_move(void *buf, void *newbuf, if (zfsvfs != ozp->z_zfsvfs) { mutex_exit(&zfsvfs->z_znodes_lock); ZFS_EXIT(zfsvfs); - ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_recheck_invalid); + ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_recheck2); return (KMEM_CBRC_DONT_KNOW); } @@ -360,6 +384,7 @@ zfs_znode_init(void) /* * Initialize zcache */ + rw_init(&zfsvfs_lock, NULL, RW_DEFAULT, NULL); ASSERT(znode_cache == NULL); znode_cache = kmem_cache_create("zfs_znode_cache", sizeof (znode_t), 0, /* zfs_znode_cache_constructor */ NULL, @@ -378,6 +403,7 @@ zfs_znode_fini(void) if (znode_cache) kmem_cache_destroy(znode_cache); znode_cache = NULL; + rw_destroy(&zfsvfs_lock); } int From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 09:39:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEFFD106566B; Mon, 11 Oct 2010 09:39:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC3928FC13; Mon, 11 Oct 2010 09:39:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9B9dWdc008827; Mon, 11 Oct 2010 09:39:32 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9B9dWFm008824; Mon, 11 Oct 2010 09:39:32 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201010110939.o9B9dWFm008824@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 11 Oct 2010 09:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213684 - in stable/8/sbin/geom/class: part sched X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 09:39:32 -0000 Author: ae Date: Mon Oct 11 09:39:32 2010 New Revision: 213684 URL: http://svn.freebsd.org/changeset/base/213684 Log: GPART's control interface between kernel and user space has been changed in r212614. Perform partial MFC of r213097 adapted to the stable ABI: Implement "force" (-F) option for gpart destroy verb. This option doesn't passed to kernel and handled in user-space. With -F option gpart creates new "delete" request for each partition in table. Each request has flags="X" that disables auto-commit feature. Last request is the original "destroy" request. It has own flags and can have disabled or enabled auto-commit feature. If error is occurred when deleting partitions, then new "undo" request is created and all changes will be rolled back. Approved by: kib (mentor) Modified: stable/8/sbin/geom/class/part/geom_part.c stable/8/sbin/geom/class/part/gpart.8 Directory Properties: stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/sched/gsched.8 (props changed) stable/8/sbin/geom/class/stripe/ (props changed) Modified: stable/8/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/8/sbin/geom/class/part/geom_part.c Mon Oct 11 09:34:46 2010 (r213683) +++ stable/8/sbin/geom/class/part/geom_part.c Mon Oct 11 09:39:32 2010 (r213684) @@ -68,6 +68,7 @@ static char ssize[32]; static const char const bootcode_param[] = "bootcode"; static const char const index_param[] = "index"; static const char const partcode_param[] = "partcode"; +static const char const force_param[] = "force"; static struct gclass *find_class(struct gmesh *, const char *); static struct ggeom * find_geom(struct gclass *, const char *); @@ -84,6 +85,8 @@ static void gpart_show_geom(struct ggeom static int gpart_show_hasopt(struct gctl_req *, const char *, const char *); static void gpart_write_partcode(struct ggeom *, int, void *, ssize_t); static void gpart_write_partcode_vtoc8(struct ggeom *, int, void *); +static void gpart_destroy(struct gctl_req *, unsigned int); +static void gpart_print_error(const char *); struct g_command PUBSYM(class_commands)[] = { { "add", 0, gpart_issue, { @@ -118,7 +121,8 @@ struct g_command PUBSYM(class_commands)[ G_OPT_SENTINEL }, "geom", NULL }, - { "destroy", 0, gpart_issue, { + { "destroy", 0, gpart_destroy, { + { 'F', force_param, NULL, G_TYPE_BOOL }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "geom", NULL }, @@ -853,10 +857,101 @@ gpart_bootcode(struct gctl_req *req, uns } static void +gpart_destroy(struct gctl_req *req, unsigned int fl) +{ + struct gmesh mesh; + struct gclass *classp; + struct gctl_req *req2; + struct ggeom *gp; + struct gprovider *pp; + const char *s; + int error, val; + + if (gctl_has_param(req, force_param)) { + val = gctl_get_int(req, force_param); + error = gctl_delete_param(req, force_param); + if (error) + errc(EXIT_FAILURE, error, "internal error"); + if (val == 0) + goto done; + s = gctl_get_ascii(req, "class"); + if (s == NULL) + abort(); + error = geom_gettree(&mesh); + if (error != 0) + errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + classp = find_class(&mesh, s); + if (classp == NULL) { + geom_deletetree(&mesh); + errx(EXIT_FAILURE, "Class %s not found.", s); + } + s = gctl_get_ascii(req, "geom"); + if (s == NULL) + abort(); + gp = find_geom(classp, s); + if (gp == NULL) + errx(EXIT_FAILURE, "No such geom: %s.", s); + val = 0; + LIST_FOREACH(pp, &gp->lg_provider, lg_provider){ + s = find_provcfg(pp, "index"); + if (s == NULL) + errx(EXIT_FAILURE, "Index not found for %s.", + pp->lg_name); + req2 = gctl_get_handle(); + gctl_ro_param(req2, "class", -1, classp->lg_name); + gctl_ro_param(req2, "geom", -1, gp->lg_name); + gctl_ro_param(req2, "verb", -1, "delete"); + gctl_ro_param(req2, index_param, -1, s); + gctl_ro_param(req2, "flags", -1, "X"); + s = gctl_issue(req2); + if (s != NULL && s[0] != '\0') { + gpart_print_error(s); + gctl_free(req2); + if (val) { /* try to undo changes */ + req2 = gctl_get_handle(); + gctl_ro_param(req2, "verb", -1, + "undo"); + gctl_ro_param(req2, "class", -1, + classp->lg_name); + gctl_ro_param(req2, "geom", -1, + gp->lg_name); + gctl_issue(req2); + gctl_free(req2); + } + geom_deletetree(&mesh); + exit(EXIT_FAILURE); + } + gctl_free(req2); + val = 1; + } + geom_deletetree(&mesh); + } +done: + gpart_issue(req, fl); +} + +static void +gpart_print_error(const char *errstr) +{ + char *errmsg; + int error; + + error = strtol(errstr, &errmsg, 0); + if (errmsg != errstr) { + while (errmsg[0] == ' ') + errmsg++; + if (errmsg[0] != '\0') + warnc(error, "%s", errmsg); + else + warnc(error, NULL); + } else + warnx("%s", errmsg); +} + +static void gpart_issue(struct gctl_req *req, unsigned int fl __unused) { char buf[4096]; - char *errmsg; const char *errstr; int error, status; @@ -878,17 +973,7 @@ gpart_issue(struct gctl_req *req, unsign goto done; } - error = strtol(errstr, &errmsg, 0); - if (errmsg != errstr) { - while (errmsg[0] == ' ') - errmsg++; - if (errmsg[0] != '\0') - warnc(error, "%s", errmsg); - else - warnc(error, NULL); - } else - warnx("%s", errmsg); - + gpart_print_error(errstr); status = EXIT_FAILURE; done: Modified: stable/8/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/8/sbin/geom/class/part/gpart.8 Mon Oct 11 09:34:46 2010 (r213683) +++ stable/8/sbin/geom/class/part/gpart.8 Mon Oct 11 09:39:32 2010 (r213684) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 27, 2010 +.Dd Sep 24, 2010 .Dt GPART 8 .Os .Sh NAME @@ -118,6 +118,7 @@ utility: .\" ==== DESTROY ==== .Nm .Cm destroy +.Op Fl F .Op Fl f Ar flags .Ar geom .\" ==== MODIFY ==== @@ -317,6 +318,8 @@ Destroy the partitioning scheme as imple .Pp Additional options include: .Bl -tag -width 10n +.It Fl F +Forced destroying of the partition table even if it is not empty. .It Fl f Ar flags Additional operational flags. See the section entitled From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 09:41:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 999E91065674; Mon, 11 Oct 2010 09:41:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87B6F8FC1C; Mon, 11 Oct 2010 09:41:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9B9fOWH008900; Mon, 11 Oct 2010 09:41:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9B9fObF008898; Mon, 11 Oct 2010 09:41:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010110941.o9B9fObF008898@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 11 Oct 2010 09:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213685 - stable/8/sys/amd64/linux32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 09:41:24 -0000 Author: kib Date: Mon Oct 11 09:41:24 2010 New Revision: 213685 URL: http://svn.freebsd.org/changeset/base/213685 Log: MFC r213544: Fix typo. Modified: stable/8/sys/amd64/linux32/syscalls.master Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/8/sys/amd64/linux32/syscalls.master Mon Oct 11 09:39:32 2010 (r213684) +++ stable/8/sys/amd64/linux32/syscalls.master Mon Oct 11 09:41:24 2010 (r213685) @@ -416,7 +416,7 @@ 245 AUE_NULL UNIMPL linux_io_setup 246 AUE_NULL UNIMPL linux_io_destroy 247 AUE_NULL UNIMPL linux_io_getevents -248 AUE_NULL UNIMPL inux_io_submit +248 AUE_NULL UNIMPL linux_io_submit 249 AUE_NULL UNIMPL linux_io_cancel 250 AUE_NULL STD { int linux_fadvise64(void); } 251 AUE_NULL UNIMPL From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 09:42:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 362CB106564A; Mon, 11 Oct 2010 09:42:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19C558FC21; Mon, 11 Oct 2010 09:42:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9B9gUwk008965; Mon, 11 Oct 2010 09:42:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9B9gUel008961; Mon, 11 Oct 2010 09:42:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010110942.o9B9gUel008961@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 11 Oct 2010 09:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213686 - stable/8/sys/amd64/linux32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 09:42:31 -0000 Author: kib Date: Mon Oct 11 09:42:30 2010 New Revision: 213686 URL: http://svn.freebsd.org/changeset/base/213686 Log: Regen. Modified: stable/8/sys/amd64/linux32/linux32_proto.h stable/8/sys/amd64/linux32/linux32_syscall.h stable/8/sys/amd64/linux32/linux32_sysent.c Modified: stable/8/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/8/sys/amd64/linux32/linux32_proto.h Mon Oct 11 09:41:24 2010 (r213685) +++ stable/8/sys/amd64/linux32/linux32_proto.h Mon Oct 11 09:42:30 2010 (r213686) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 185438 2008-11-29 14:55:24Z kib + * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 213685 2010-10-11 09:41:24Z kib */ #ifndef _LINUX_SYSPROTO_H_ @@ -1257,6 +1257,13 @@ int linux_vmsplice(struct thread *, stru #endif /* COMPAT_FREEBSD6 */ + +#ifdef COMPAT_FREEBSD7 + +#define nosys linux_nosys + +#endif /* COMPAT_FREEBSD7 */ + #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 Modified: stable/8/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/8/sys/amd64/linux32/linux32_syscall.h Mon Oct 11 09:41:24 2010 (r213685) +++ stable/8/sys/amd64/linux32/linux32_syscall.h Mon Oct 11 09:42:30 2010 (r213686) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 185438 2008-11-29 14:55:24Z kib + * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 213685 2010-10-11 09:41:24Z kib */ #define LINUX_SYS_exit 1 Modified: stable/8/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/8/sys/amd64/linux32/linux32_sysent.c Mon Oct 11 09:41:24 2010 (r213685) +++ stable/8/sys/amd64/linux32/linux32_sysent.c Mon Oct 11 09:42:30 2010 (r213686) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 185438 2008-11-29 14:55:24Z kib + * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 213685 2010-10-11 09:41:24Z kib */ #include "opt_compat.h" @@ -267,7 +267,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 245 = linux_io_setup */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 246 = linux_io_destroy */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 247 = linux_io_getevents */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 248 = inux_io_submit */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 248 = linux_io_submit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 249 = linux_io_cancel */ { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0 }, /* 250 = linux_fadvise64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 251 = */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 11:25:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF6A31065670; Mon, 11 Oct 2010 11:25:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A368C8FC15; Mon, 11 Oct 2010 11:25:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BBPbnv013634; Mon, 11 Oct 2010 11:25:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BBPbGd013631; Mon, 11 Oct 2010 11:25:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201010111125.o9BBPbGd013631@svn.freebsd.org> From: Xin LI Date: Mon, 11 Oct 2010 11:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213687 - in stable: 7/sys/netinet 7/sys/netinet6 8/sys/netinet 8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 11:25:38 -0000 Author: delphij Date: Mon Oct 11 11:25:37 2010 New Revision: 213687 URL: http://svn.freebsd.org/changeset/base/213687 Log: MFC r213225: Add a bandaid for a long-standing race condition during route entry un-expiring. The previous version of code have no locking when testing rt_refcnt. The result of the lack of locking may result in a condition where a routing entry have a reference count but at the same time have RTPRF_OURS bit set and an expiration timer. These would eventually lead to a panic: panic: rtqkill route really not free When the system have ICMP redirects accepted from local gateway in a moderate frequency, for instance. Commit this workaround for now until we have some better solution. PR: kern/149804 Reviewed by: bz Tested by: Zhao Xin, Pete French Modified: stable/8/sys/netinet/in_rmx.c stable/8/sys/netinet6/in6_rmx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Changes in other areas also in this revision: Modified: stable/7/sys/netinet/in_rmx.c stable/7/sys/netinet6/in6_rmx.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in_rmx.c ============================================================================== --- stable/8/sys/netinet/in_rmx.c Mon Oct 11 09:42:30 2010 (r213686) +++ stable/8/sys/netinet/in_rmx.c Mon Oct 11 11:25:37 2010 (r213687) @@ -121,12 +121,13 @@ in_matroute(void *v_arg, struct radix_no struct radix_node *rn = rn_match(v_arg, head); struct rtentry *rt = (struct rtentry *)rn; - /*XXX locking? */ - if (rt && rt->rt_refcnt == 0) { /* this is first reference */ + if (rt) { + RT_LOCK(rt); if (rt->rt_flags & RTPRF_OURS) { rt->rt_flags &= ~RTPRF_OURS; rt->rt_rmx.rmx_expire = 0; } + RT_UNLOCK(rt); } return rn; } Modified: stable/8/sys/netinet6/in6_rmx.c ============================================================================== --- stable/8/sys/netinet6/in6_rmx.c Mon Oct 11 09:42:30 2010 (r213686) +++ stable/8/sys/netinet6/in6_rmx.c Mon Oct 11 11:25:37 2010 (r213687) @@ -193,11 +193,13 @@ in6_matroute(void *v_arg, struct radix_n struct radix_node *rn = rn_match(v_arg, head); struct rtentry *rt = (struct rtentry *)rn; - if (rt && rt->rt_refcnt == 0) { /* this is first reference */ + if (rt) { + RT_LOCK(rt); if (rt->rt_flags & RTPRF_OURS) { rt->rt_flags &= ~RTPRF_OURS; rt->rt_rmx.rmx_expire = 0; } + RT_UNLOCK(rt); } return rn; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 11:25:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 078D01065672; Mon, 11 Oct 2010 11:25:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEA238FC20; Mon, 11 Oct 2010 11:25:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BBPbVA013641; Mon, 11 Oct 2010 11:25:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BBPbG9013638; Mon, 11 Oct 2010 11:25:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201010111125.o9BBPbG9013638@svn.freebsd.org> From: Xin LI Date: Mon, 11 Oct 2010 11:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213687 - in stable: 7/sys/netinet 7/sys/netinet6 8/sys/netinet 8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 11:25:38 -0000 Author: delphij Date: Mon Oct 11 11:25:37 2010 New Revision: 213687 URL: http://svn.freebsd.org/changeset/base/213687 Log: MFC r213225: Add a bandaid for a long-standing race condition during route entry un-expiring. The previous version of code have no locking when testing rt_refcnt. The result of the lack of locking may result in a condition where a routing entry have a reference count but at the same time have RTPRF_OURS bit set and an expiration timer. These would eventually lead to a panic: panic: rtqkill route really not free When the system have ICMP redirects accepted from local gateway in a moderate frequency, for instance. Commit this workaround for now until we have some better solution. PR: kern/149804 Reviewed by: bz Tested by: Zhao Xin, Pete French Modified: stable/7/sys/netinet/in_rmx.c stable/7/sys/netinet6/in6_rmx.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/netinet/in_rmx.c stable/8/sys/netinet6/in6_rmx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/7/sys/netinet/in_rmx.c ============================================================================== --- stable/7/sys/netinet/in_rmx.c Mon Oct 11 09:42:30 2010 (r213686) +++ stable/7/sys/netinet/in_rmx.c Mon Oct 11 11:25:37 2010 (r213687) @@ -140,12 +140,13 @@ in_matroute(void *v_arg, struct radix_no struct radix_node *rn = rn_match(v_arg, head); struct rtentry *rt = (struct rtentry *)rn; - /*XXX locking? */ - if (rt && rt->rt_refcnt == 0) { /* this is first reference */ + if (rt) { + RT_LOCK(rt); if (rt->rt_flags & RTPRF_OURS) { rt->rt_flags &= ~RTPRF_OURS; rt->rt_rmx.rmx_expire = 0; } + RT_UNLOCK(rt); } return rn; } Modified: stable/7/sys/netinet6/in6_rmx.c ============================================================================== --- stable/7/sys/netinet6/in6_rmx.c Mon Oct 11 09:42:30 2010 (r213686) +++ stable/7/sys/netinet6/in6_rmx.c Mon Oct 11 11:25:37 2010 (r213687) @@ -207,11 +207,13 @@ in6_matroute(void *v_arg, struct radix_n struct radix_node *rn = rn_match(v_arg, head); struct rtentry *rt = (struct rtentry *)rn; - if (rt && rt->rt_refcnt == 0) { /* this is first reference */ + if (rt) { + RT_LOCK(rt); if (rt->rt_flags & RTPRF_OURS) { rt->rt_flags &= ~RTPRF_OURS; rt->rt_rmx.rmx_expire = 0; } + RT_UNLOCK(rt); } return rn; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 12:43:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D344310656A6; Mon, 11 Oct 2010 12:43:51 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD5648FC2A; Mon, 11 Oct 2010 12:43:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BChphx015475; Mon, 11 Oct 2010 12:43:51 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BChpV5015469; Mon, 11 Oct 2010 12:43:51 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010111243.o9BChpV5015469@svn.freebsd.org> From: Martin Matuska Date: Mon, 11 Oct 2010 12:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213688 - in vendor/xz/dist: . po src/common src/liblzma/api src/liblzma/api/lzma src/liblzma/check src/liblzma/common src/liblzma/delta src/liblzma/lz src/liblzma/lzma src/liblzma/rang... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 12:43:51 -0000 Author: mm Date: Mon Oct 11 12:43:51 2010 New Revision: 213688 URL: http://svn.freebsd.org/changeset/base/213688 Log: Vendor import of xz (stripped) Git revision: d52b411716a614c202e89ba732492efb9916cd3f Approved by: delphij (mentor) Added: vendor/xz/dist/FREEBSD-Xlist (contents, props changed) vendor/xz/dist/FREEBSD-upgrade (contents, props changed) vendor/xz/dist/po/de.po (contents, props changed) vendor/xz/dist/po/it.po (contents, props changed) vendor/xz/dist/src/common/tuklib_mbstr.h (contents, props changed) vendor/xz/dist/src/common/tuklib_mbstr_fw.c (contents, props changed) vendor/xz/dist/src/common/tuklib_mbstr_width.c (contents, props changed) Deleted: vendor/xz/dist/src/liblzma/api/lzma/subblock.h vendor/xz/dist/src/liblzma/common/chunk_size.c vendor/xz/dist/src/liblzma/subblock/ Modified: vendor/xz/dist/ChangeLog (contents, props changed) vendor/xz/dist/README (contents, props changed) vendor/xz/dist/THANKS (contents, props changed) vendor/xz/dist/po/LINGUAS (contents, props changed) vendor/xz/dist/po/POTFILES.in (contents, props changed) vendor/xz/dist/po/cs.po (contents, props changed) vendor/xz/dist/src/common/sysdefs.h (contents, props changed) vendor/xz/dist/src/common/tuklib_cpucores.c (contents, props changed) vendor/xz/dist/src/common/tuklib_gettext.h (contents, props changed) vendor/xz/dist/src/common/tuklib_physmem.c (contents, props changed) vendor/xz/dist/src/liblzma/api/lzma.h (contents, props changed) vendor/xz/dist/src/liblzma/api/lzma/index.h (contents, props changed) vendor/xz/dist/src/liblzma/api/lzma/lzma.h (contents, props changed) vendor/xz/dist/src/liblzma/api/lzma/vli.h (contents, props changed) vendor/xz/dist/src/liblzma/common/block_buffer_encoder.c (contents, props changed) vendor/xz/dist/src/liblzma/common/block_util.c (contents, props changed) vendor/xz/dist/src/liblzma/common/common.c (contents, props changed) vendor/xz/dist/src/liblzma/common/common.h (contents, props changed) vendor/xz/dist/src/liblzma/common/filter_common.c (contents, props changed) vendor/xz/dist/src/liblzma/common/filter_decoder.c (contents, props changed) vendor/xz/dist/src/liblzma/common/filter_encoder.c (contents, props changed) vendor/xz/dist/src/liblzma/common/stream_buffer_encoder.c (contents, props changed) vendor/xz/dist/src/liblzma/delta/delta_encoder.c (contents, props changed) vendor/xz/dist/src/liblzma/lz/lz_decoder.c (contents, props changed) vendor/xz/dist/src/liblzma/lz/lz_decoder.h (contents, props changed) vendor/xz/dist/src/liblzma/lz/lz_encoder.c (contents, props changed) vendor/xz/dist/src/liblzma/lz/lz_encoder.h (contents, props changed) vendor/xz/dist/src/liblzma/lz/lz_encoder_mf.c (contents, props changed) vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.c (contents, props changed) vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_fast.c (contents, props changed) vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_normal.c (contents, props changed) vendor/xz/dist/src/liblzma/lzma/lzma_encoder_presets.c (contents, props changed) vendor/xz/dist/src/lzmainfo/lzmainfo.1 (contents, props changed) vendor/xz/dist/src/lzmainfo/lzmainfo.c (contents, props changed) vendor/xz/dist/src/xz/args.c (contents, props changed) vendor/xz/dist/src/xz/args.h (contents, props changed) vendor/xz/dist/src/xz/coder.c (contents, props changed) vendor/xz/dist/src/xz/coder.h (contents, props changed) vendor/xz/dist/src/xz/file_io.c (contents, props changed) vendor/xz/dist/src/xz/hardware.c (contents, props changed) vendor/xz/dist/src/xz/hardware.h (contents, props changed) vendor/xz/dist/src/xz/list.c (contents, props changed) vendor/xz/dist/src/xz/main.c (contents, props changed) vendor/xz/dist/src/xz/message.c (contents, props changed) vendor/xz/dist/src/xz/message.h (contents, props changed) vendor/xz/dist/src/xz/options.c (contents, props changed) vendor/xz/dist/src/xz/options.h (contents, props changed) vendor/xz/dist/src/xz/private.h (contents, props changed) vendor/xz/dist/src/xz/signals.c (contents, props changed) vendor/xz/dist/src/xz/signals.h (contents, props changed) vendor/xz/dist/src/xz/util.c (contents, props changed) vendor/xz/dist/src/xz/util.h (contents, props changed) vendor/xz/dist/src/xz/xz.1 (contents, props changed) vendor/xz/dist/src/xzdec/xzdec.1 (contents, props changed) vendor/xz/dist/src/xzdec/xzdec.c (contents, props changed) Directory Properties: vendor/xz/dist/AUTHORS (props changed) vendor/xz/dist/COPYING (props changed) vendor/xz/dist/TODO (props changed) vendor/xz/dist/po/Makevars (props changed) vendor/xz/dist/src/common/mythread.h (props changed) vendor/xz/dist/src/common/tuklib_common.h (props changed) vendor/xz/dist/src/common/tuklib_config.h (props changed) vendor/xz/dist/src/common/tuklib_cpucores.h (props changed) vendor/xz/dist/src/common/tuklib_exit.c (props changed) vendor/xz/dist/src/common/tuklib_exit.h (props changed) vendor/xz/dist/src/common/tuklib_integer.h (props changed) vendor/xz/dist/src/common/tuklib_open_stdxxx.c (props changed) vendor/xz/dist/src/common/tuklib_open_stdxxx.h (props changed) vendor/xz/dist/src/common/tuklib_physmem.h (props changed) vendor/xz/dist/src/common/tuklib_progname.c (props changed) vendor/xz/dist/src/common/tuklib_progname.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/base.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/bcj.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/block.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/check.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/container.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/delta.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/filter.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/hardware.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/index_hash.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/stream_flags.h (props changed) vendor/xz/dist/src/liblzma/api/lzma/version.h (props changed) vendor/xz/dist/src/liblzma/check/check.c (props changed) vendor/xz/dist/src/liblzma/check/check.h (props changed) vendor/xz/dist/src/liblzma/check/crc32_fast.c (props changed) vendor/xz/dist/src/liblzma/check/crc32_small.c (props changed) vendor/xz/dist/src/liblzma/check/crc32_table.c (props changed) vendor/xz/dist/src/liblzma/check/crc32_table_be.h (props changed) vendor/xz/dist/src/liblzma/check/crc32_table_le.h (props changed) vendor/xz/dist/src/liblzma/check/crc32_tablegen.c (props changed) vendor/xz/dist/src/liblzma/check/crc32_x86.S (props changed) vendor/xz/dist/src/liblzma/check/crc64_fast.c (props changed) vendor/xz/dist/src/liblzma/check/crc64_small.c (props changed) vendor/xz/dist/src/liblzma/check/crc64_table.c (props changed) vendor/xz/dist/src/liblzma/check/crc64_table_be.h (props changed) vendor/xz/dist/src/liblzma/check/crc64_table_le.h (props changed) vendor/xz/dist/src/liblzma/check/crc64_tablegen.c (props changed) vendor/xz/dist/src/liblzma/check/crc64_x86.S (props changed) vendor/xz/dist/src/liblzma/check/crc_macros.h (props changed) vendor/xz/dist/src/liblzma/check/sha256.c (props changed) vendor/xz/dist/src/liblzma/common/alone_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/alone_decoder.h (props changed) vendor/xz/dist/src/liblzma/common/alone_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/auto_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/block_buffer_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/block_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/block_decoder.h (props changed) vendor/xz/dist/src/liblzma/common/block_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/block_encoder.h (props changed) vendor/xz/dist/src/liblzma/common/block_header_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/block_header_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/easy_buffer_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/easy_decoder_memusage.c (props changed) vendor/xz/dist/src/liblzma/common/easy_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/easy_encoder_memusage.c (props changed) vendor/xz/dist/src/liblzma/common/easy_preset.c (props changed) vendor/xz/dist/src/liblzma/common/easy_preset.h (props changed) vendor/xz/dist/src/liblzma/common/filter_buffer_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/filter_buffer_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/filter_common.h (props changed) vendor/xz/dist/src/liblzma/common/filter_decoder.h (props changed) vendor/xz/dist/src/liblzma/common/filter_encoder.h (props changed) vendor/xz/dist/src/liblzma/common/filter_flags_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/filter_flags_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/hardware_physmem.c (props changed) vendor/xz/dist/src/liblzma/common/index.c (props changed) vendor/xz/dist/src/liblzma/common/index.h (props changed) vendor/xz/dist/src/liblzma/common/index_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/index_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/index_encoder.h (props changed) vendor/xz/dist/src/liblzma/common/index_hash.c (props changed) vendor/xz/dist/src/liblzma/common/stream_buffer_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/stream_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/stream_decoder.h (props changed) vendor/xz/dist/src/liblzma/common/stream_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/stream_encoder.h (props changed) vendor/xz/dist/src/liblzma/common/stream_flags_common.c (props changed) vendor/xz/dist/src/liblzma/common/stream_flags_common.h (props changed) vendor/xz/dist/src/liblzma/common/stream_flags_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/stream_flags_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/vli_decoder.c (props changed) vendor/xz/dist/src/liblzma/common/vli_encoder.c (props changed) vendor/xz/dist/src/liblzma/common/vli_size.c (props changed) vendor/xz/dist/src/liblzma/delta/delta_common.c (props changed) vendor/xz/dist/src/liblzma/delta/delta_common.h (props changed) vendor/xz/dist/src/liblzma/delta/delta_decoder.c (props changed) vendor/xz/dist/src/liblzma/delta/delta_decoder.h (props changed) vendor/xz/dist/src/liblzma/delta/delta_encoder.h (props changed) vendor/xz/dist/src/liblzma/delta/delta_private.h (props changed) vendor/xz/dist/src/liblzma/lz/lz_encoder_hash.h (props changed) vendor/xz/dist/src/liblzma/lz/lz_encoder_hash_table.h (props changed) vendor/xz/dist/src/liblzma/lzma/fastpos.h (props changed) vendor/xz/dist/src/liblzma/lzma/fastpos_table.c (props changed) vendor/xz/dist/src/liblzma/lzma/fastpos_tablegen.c (props changed) vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.c (props changed) vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.h (props changed) vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.h (props changed) vendor/xz/dist/src/liblzma/lzma/lzma_common.h (props changed) vendor/xz/dist/src/liblzma/lzma/lzma_decoder.c (props changed) vendor/xz/dist/src/liblzma/lzma/lzma_decoder.h (props changed) vendor/xz/dist/src/liblzma/lzma/lzma_encoder.c (props changed) vendor/xz/dist/src/liblzma/lzma/lzma_encoder.h (props changed) vendor/xz/dist/src/liblzma/lzma/lzma_encoder_private.h (props changed) vendor/xz/dist/src/liblzma/rangecoder/price.h (props changed) vendor/xz/dist/src/liblzma/rangecoder/price_table.c (props changed) vendor/xz/dist/src/liblzma/rangecoder/price_tablegen.c (props changed) vendor/xz/dist/src/liblzma/rangecoder/range_common.h (props changed) vendor/xz/dist/src/liblzma/rangecoder/range_decoder.h (props changed) vendor/xz/dist/src/liblzma/rangecoder/range_encoder.h (props changed) vendor/xz/dist/src/liblzma/simple/arm.c (props changed) vendor/xz/dist/src/liblzma/simple/armthumb.c (props changed) vendor/xz/dist/src/liblzma/simple/ia64.c (props changed) vendor/xz/dist/src/liblzma/simple/powerpc.c (props changed) vendor/xz/dist/src/liblzma/simple/simple_coder.c (props changed) vendor/xz/dist/src/liblzma/simple/simple_coder.h (props changed) vendor/xz/dist/src/liblzma/simple/simple_decoder.c (props changed) vendor/xz/dist/src/liblzma/simple/simple_decoder.h (props changed) vendor/xz/dist/src/liblzma/simple/simple_encoder.c (props changed) vendor/xz/dist/src/liblzma/simple/simple_encoder.h (props changed) vendor/xz/dist/src/liblzma/simple/simple_private.h (props changed) vendor/xz/dist/src/liblzma/simple/sparc.c (props changed) vendor/xz/dist/src/liblzma/simple/x86.c (props changed) vendor/xz/dist/src/xz/file_io.h (props changed) vendor/xz/dist/src/xz/list.h (props changed) vendor/xz/dist/src/xz/main.h (props changed) vendor/xz/dist/src/xz/suffix.c (props changed) vendor/xz/dist/src/xz/suffix.h (props changed) Modified: vendor/xz/dist/ChangeLog ============================================================================== --- vendor/xz/dist/ChangeLog Mon Oct 11 11:25:37 2010 (r213687) +++ vendor/xz/dist/ChangeLog Mon Oct 11 12:43:51 2010 (r213688) @@ -1,3 +1,817 @@ +commit d52b411716a614c202e89ba732492efb9916cd3f +Author: Lasse Collin +Date: Sun Oct 10 17:58:58 2010 +0300 + + xz: Use "%"PRIu32 instead of "%d" in a format string. + +commit ae74d1bdeb075c3beefe76e1136c5741804e7e91 +Author: Lasse Collin +Date: Sun Oct 10 17:43:26 2010 +0300 + + test_files.sh: Fix the first line. + + For some reason this prevented running the test only + on OS/2 and even on that it broke only recently. + + Thanks to Elbert Pol. + +commit d492b80ddd6f9a13419de6d102df7374d8f448e8 +Author: Lasse Collin +Date: Sun Oct 10 16:49:01 2010 +0300 + + lzmainfo: Use "%"PRIu32 instead of "%u" for uint32_t. + +commit 825e859a9054bd91202e5723c41a17e72f63040a +Author: Lasse Collin +Date: Sun Oct 10 16:47:01 2010 +0300 + + lzmainfo: Use fileno(stdin) instead of STDIN_FILENO. + +commit acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8 +Author: Lasse Collin +Date: Sat Oct 9 23:20:51 2010 +0300 + + lzmainfo: Use setmode() on DOS-like systems. + +commit ef364d3abc5647111c5424ea0d83a567e184a23b +Author: Lasse Collin +Date: Sat Oct 9 21:51:03 2010 +0300 + + OS/2 and DOS: Be less verbose on signals. + + Calling raise() to kill xz when user has pressed C-c + is a bit verbose on OS/2 and DOS/DJGPP. Instead of + calling raise(), set only the exit status to 1. + +commit 5629c4be07b6c67e79842b2569da1cedc9c0d69a +Author: Lasse Collin +Date: Sat Oct 9 19:28:49 2010 +0300 + + DOS: Update the Makefile, config.h and README. + + This is now simpler and builds only xz.exe. + +commit f25a77e6b9bc48a243ddfbbd755b7960eec7e0ac +Author: Lasse Collin +Date: Sat Oct 9 18:57:55 2010 +0300 + + Windows: Put some license info into README-Windows.txt. + +commit e75100f549f85d231df25c07aa94d63e78e2d668 +Author: Lasse Collin +Date: Sat Oct 9 18:57:04 2010 +0300 + + Windows: Fix a diagnostics bug in build.bash. + +commit efeb998a2b1025df1c1d202cc7d21d866cd1c336 +Author: Lasse Collin +Date: Sat Oct 9 13:02:15 2010 +0300 + + lzmainfo: Add Windows resource file. + +commit 389d418445f1623593dfdbba55d52fbb6d1205f5 +Author: Lasse Collin +Date: Sat Oct 9 12:57:25 2010 +0300 + + Add missing public domain notice to lzmadec_w32res.rc. + +commit 6389c773a4912dd9f111256d74ba1605230a7957 +Author: Lasse Collin +Date: Sat Oct 9 12:52:12 2010 +0300 + + Windows: Update common_w32res.rc. + +commit 71275457ca24c9b01721f5cfc3638cf094daf454 +Author: Lasse Collin +Date: Sat Oct 9 12:27:08 2010 +0300 + + Windows: Make build.bash prefer MinGW-w32 over MinGW. + + This is simply for licensing reasons. The 64-bit version + will be built with MinGW-w64 anyway (at least for now), + so using it also for 32-bit build allows using the same + copyright notice about the MinGW-w64/w32 runtime. + + Note that using MinGW would require a copyright notice too, + because its runtime is not in the public domain either even + though MinGW's home page claims that it is public domain. + See . + +commit 3ac35719d8433af937af6491383d4a50e343099b +Author: Lasse Collin +Date: Sat Oct 9 11:33:21 2010 +0300 + + Windows: Copy COPYING-Windows.txt (if it exists) to the package. + + Also, put README-Windows.txt to the doc directory like + the other documentation files. + +commit 7b5db576fd7a4a67813b8437a9ccd4dbc94bbaae +Author: Lasse Collin +Date: Fri Oct 8 21:42:37 2010 +0300 + + Windows: Fix build.bash again. + + 630a8beda34af0ac153c8051b1bf01230558e422 wasn't good. + +commit d3cd7abe85ec7c2f46cf198b15c00d5d119df3dd +Author: Lasse Collin +Date: Fri Oct 8 16:53:20 2010 +0300 + + Use LZMA_VERSION_STRING instead of PACKAGE_VERSION. + + Those are the same thing, and the former makes it a bit + easier to build the code with other build systems, because + one doesn't need to update the version number into custom + config.h. + + This change affects only lzmainfo. Other tools were already + using LZMA_VERSION_STRING. + +commit 084c60d318f2dbaef4078d9b100b4a373d0c3a7f +Author: Lasse Collin +Date: Fri Oct 8 15:59:25 2010 +0300 + + configure.ac: Remove two unused defines. + +commit 11f51b6714357cb67ec7e56ed9575c199b5581fe +Author: Lasse Collin +Date: Fri Oct 8 15:32:29 2010 +0300 + + Make tests accommodate missing xz or xzdec. + +commit b1c7368f95e93ccdefdd0748e04398c26766f47f +Author: Lasse Collin +Date: Fri Oct 8 15:25:45 2010 +0300 + + Build: Add options to disable individual command line tools. + +commit 630a8beda34af0ac153c8051b1bf01230558e422 +Author: Lasse Collin +Date: Thu Oct 7 00:44:53 2010 +0300 + + Windows: Make build.bash work without --enable-dynamic=no. + +commit f9907503f882a745dce9d84c2968f6c175ba966a +Author: Lasse Collin +Date: Tue Oct 5 14:13:16 2010 +0300 + + Build: Remove the static/dynamic tricks. + + Most distros want xz linked against shared liblzma, so + it doesn't help much to require --enable-dynamic for that. + Those who want to avoid PIC on x86-32 to get better + performance, can still do it e.g. by using --disable-shared + to compile xz and then another pass to compile shared liblzma. + + Part of these static/dynamic tricks were needed for Windows + in the past. Nowadays we rely on GCC and binutils to do the + right thing with auto-import. If the Autotooled build system + needs to support some other toolchain on Windows in the future, + this may need some rethinking. + +commit fda4724d8114fccfa31c1839c15479f350c2fb4c +Author: Lasse Collin +Date: Tue Oct 5 12:18:58 2010 +0300 + + configure.ac: Silence a warning from Autoconf 2.68. + +commit 80b5675fa62c87426fe86f8fcd20feeabc4361b9 +Author: Lasse Collin +Date: Mon Oct 4 19:43:01 2010 +0300 + + A few more languages files to the xz man page. + + Thanks to Jonathan Nieder. + +commit f9722dbeca4dc4c43cfd15d122dafaac50b0a0bb +Author: Lasse Collin +Date: Sat Oct 2 12:07:33 2010 +0300 + + Update the FAQ. + +commit 61ae593661e8dc402394e84d567ca2044a51572b +Author: Lasse Collin +Date: Sat Oct 2 11:38:20 2010 +0300 + + liblzma: Small fixes to comments in the API headers. + +commit 9166682dc601fd42c1b9510572e3f917d18de504 +Author: Lasse Collin +Date: Tue Sep 28 11:40:12 2010 +0300 + + Create the PDF versions of the man pages better. + +commit 17d3c61edd35de8fa884944fc70d1db86daa5dd8 +Author: Lasse Collin +Date: Tue Sep 28 10:59:53 2010 +0300 + + Move version.sh to build-aux. + +commit 84af9d8770451339a692e9b70f96cf56156a6069 +Author: Lasse Collin +Date: Tue Sep 28 10:53:02 2010 +0300 + + Update .gitignore. + +commit 31575a449ac64c523da3bab8d0c0b522cdc7c780 +Author: Lasse Collin +Date: Tue Sep 28 01:17:14 2010 +0300 + + Fix accomodate -> accommodate on the xz man page. + +commit cec0ddc8ec4ce81685a51998b978e22167e461f9 +Author: Lasse Collin +Date: Mon Sep 27 23:29:34 2010 +0300 + + Major man page updates. + + Lots of content was updated on the xz man page. + + Technical improvements: + - Start a new sentence on a new line. + - Use fairly short lines. + - Use constant-width font for examples (where supported). + - Some minor cleanups. + + Thanks to Jonathan Nieder for some language fixes. + +commit 075257ab0416a0603be930082e31a5703e4ba345 +Author: Lasse Collin +Date: Sun Sep 26 18:10:31 2010 +0300 + + Fix the preset -3e. + + depth=0 was missing. + +commit 2577da9ebdba13fbe99ae5ee8bde35f7ed60f6d1 +Author: Lasse Collin +Date: Thu Sep 23 14:03:10 2010 +0300 + + Add translations.bash and translation notes to README. + + translations.bash prints some messages from xz, which + hopefully makes it a bit easier to test translations. + +commit a3c5997c57e5b1a20aae6d1071b584b4f17d0b23 +Author: Lasse Collin +Date: Fri Sep 17 22:14:30 2010 +0300 + + xz: Update the Czech translation. + + Thanks to Marek Černocký. + +commit a1766af582dc23fddd9da1eeb4b9d61e3eb4c2e6 +Author: Lasse Collin +Date: Thu Sep 16 23:40:41 2010 +0300 + + xz: Add Italian translation. + + Thanks to Milo Casagrande and Lorenzo De Liso. + +commit 21088018554e2b0e02914205377ceb6e34a090bd +Author: Lasse Collin +Date: Wed Sep 15 00:34:13 2010 +0300 + + xz: Edit a translators comment. + +commit be16e28ece1b492b8f93382b7fa1cc4da23c6ff6 +Author: Lasse Collin +Date: Tue Sep 14 22:47:14 2010 +0300 + + xz: Add German translation. + + Thanks to Andre Noll. + +commit e23ea74f3240e6b69683f9e69d1716e0f9e9092b +Author: Lasse Collin +Date: Fri Sep 10 14:30:25 2010 +0300 + + Updated README. + +commit 8dad2fd69336985adb9f774fa96dc9c0efcb5a71 +Author: Lasse Collin +Date: Fri Sep 10 14:30:07 2010 +0300 + + Updated INSTALL. + +commit 0b5f07fe3728c27cce416ddc40f7e4803ae96ac2 +Author: Lasse Collin +Date: Fri Sep 10 14:26:20 2010 +0300 + + Updated the git repository address in ChangeLog. + +commit a8760203f93a69bc39fd14520a6e9e7b7d70be06 +Author: Lasse Collin +Date: Fri Sep 10 14:09:33 2010 +0300 + + xz: Add a comment to translators about "literal context bits". + +commit bb0b1004f83cdc4d309e1471c2ecaf9f95ce60c5 +Author: Lasse Collin +Date: Fri Sep 10 10:30:33 2010 +0300 + + xz: Multiple fixes. + + The code assumed that printing numbers with thousand separators + and decimal points would always produce only US-ASCII characters. + This was used for buffer sizes (with snprintf(), no overflows) + and aligning columns of the progress indicator and --list. That + assumption was wrong (e.g. LC_ALL=fi_FI.UTF-8 with glibc), so + multibyte character support was added in this commit. The old + way is used if the operating system doesn't have enough multibyte + support (e.g. lacks wcwidth()). + + The sizes of buffers were increased to accomodate multibyte + characters. I don't know how big they should be exactly, but + they aren't used for anything critical, so it's not too bad. + If they still aren't big enough, I hopefully get a bug report. + snprintf() takes care of avoiding buffer overflows. + + Some static buffers were replaced with buffers allocated on + stack. double_to_str() was removed. uint64_to_str() and + uint64_to_nicestr() now share the static buffer and test + for thousand separator support. + + Integrity check names "None" and "Unknown-N" (2 <= N <= 15) + were marked to be translated. I had forgot these, plus they + wouldn't have worked correctly anyway before this commit, + because printing tables with multibyte strings didn't work. + + Thanks to Marek Černocký for reporting the bug about + misaligned table columns in --list output. + +commit 639f8e2af33cf8a184d59ba56b6df7c098679d61 +Author: Lasse Collin +Date: Wed Sep 8 08:49:22 2010 +0300 + + Update the Czech translation. + + Thanks to Marek Černocký. + +commit 41bc9956ebfd7c86777d33676acf34c45e7ca7c7 +Author: Lasse Collin +Date: Tue Sep 7 12:31:40 2010 +0300 + + xz: Add a note to translators. + +commit 77a7746616e555fc08028e883a56d06bf0088b81 +Author: Lasse Collin +Date: Tue Sep 7 10:42:13 2010 +0300 + + Fix use of N_() and ngettext(). + + I had somehow thought that N_() is usually used + as shorthand for ngettext(). + + This also fixes a missing \n from a call to ngettext(). + +commit e6ad39335842343e622ab51207d1d3cb9caad801 +Author: Lasse Collin +Date: Mon Sep 6 19:43:12 2010 +0300 + + Add missing files to POTFILES.in. + +commit 58f55131820d2e08a1a6beb9ec0ee2378044eb30 +Author: Lasse Collin +Date: Mon Sep 6 10:16:24 2010 +0300 + + xz: Improve a comment. + +commit bcb1b898341f7073f51660d7052d7ed6c5461a66 +Author: Lasse Collin +Date: Sun Sep 5 21:34:29 2010 +0300 + + xz: Update the comment about NetBSD in file_io.c. + + Thanks to Joerg Sonnenberger. + +commit da014d55972f5addbf6b4360d3d8ed2ef4282170 +Author: Lasse Collin +Date: Sun Sep 5 21:11:33 2010 +0300 + + xz: Use an array instead of pointer for stdin_filename. + + Thanks Joerg Sonnenberger. + +commit 8c7d3d1a0781c296c6b6e2465becaffd2132f7ee +Author: Lasse Collin +Date: Sun Sep 5 12:16:17 2010 +0300 + + xz: Hopefully ease translating the messages in list.c. + +commit ef840950ad99cf2955c754875af0e01acf125079 +Author: Lasse Collin +Date: Sat Sep 4 23:14:44 2010 +0300 + + xz: Fix grammar. + +commit c46afd6edc04ea140db6c59e8486f5707c810c13 +Author: Lasse Collin +Date: Sat Sep 4 23:12:20 2010 +0300 + + xz: Use lzma_lzma_preset() to initialize the options structure. + +commit 8fd3ac046d0b1416a2094fecc456d9e0f4d5d065 +Author: Lasse Collin +Date: Sat Sep 4 22:16:28 2010 +0300 + + Don't set lc=4 with --extreme. + + This should reduce the cases where --extreme makes + compression worse. On the other hand, some other + files may now benefit slightly less from --extreme. + +commit 474bac0c33e94aeaca8ada17ab19972b1424bc2b +Author: Lasse Collin +Date: Sat Sep 4 22:10:32 2010 +0300 + + xz: Minor improvements to --help and --long-help. + +commit 373ee26f955617295c5c537b04a153a1969140d2 +Author: Jonathan Nieder +Date: Fri Sep 3 16:49:15 2010 -0500 + + Adjust memory limits in test_compress.sh + + Testing compression at level -4 now requires 48 MiB of free store at + compression time and 5 MiB at decompression time. + + Signed-off-by: Jonathan Nieder + +commit 2fce9312f36727ea82f3430cc5d3a7d243c5f087 +Author: Lasse Collin +Date: Fri Sep 3 15:54:40 2010 +0300 + + xz: Make -vv show also decompressor memory usage. + +commit b4b1cbcb53624ab832f8b3189c74450dc7ea29b6 +Author: Lasse Collin +Date: Fri Sep 3 15:13:12 2010 +0300 + + Tweak the compression presets -0 .. -5. + + "Extreme" mode might need some further tweaking still. + Docs were not updated yet. + +commit 77fe5954cd3d10fb1837372684cbc133b56b6a87 +Author: Lasse Collin +Date: Fri Sep 3 12:28:41 2010 +0300 + + liblzma: Adjust default depth calculation for HC3 and HC4. + + It was 8 + nice_len / 4, now it is 4 + nice_len / 4. + This allows faster settings at lower nice_len values, + even though it seems that I won't use automatic depth + calcuation with HC3 and HC4 in the presets. + +commit fce69059cf901ce8075a78c7607d591f144a3b5a +Author: Lasse Collin +Date: Fri Sep 3 11:11:25 2010 +0300 + + xz: Make --help two lines shorter. + + At least for now, the --help option doesn't list any + options that take arguments, so "Mandatory arguments to..." + can be omitted. + +commit a848e47ced6e5e2a564b5c454b2f5a19c2f40298 +Author: Lasse Collin +Date: Thu Sep 2 19:22:35 2010 +0300 + + xz: Make setting a preset override a custom filter chain. + + This is more logical behavior than ignoring preset level + options once a custom filter chain has been specified. + +commit b3ff7ba044eaeab3e424d7b51fe914daf681b1a3 +Author: Lasse Collin +Date: Thu Sep 2 19:09:57 2010 +0300 + + xz: Always warn if adjusting dictionary size due to memlimit. + +commit d5653ba8a1ea9c00de4fddc617aba3c51e18139d +Author: Lasse Collin +Date: Tue Aug 10 11:04:30 2010 +0300 + + Fix test_compress.sh. + + It broke when --memory option was removed from xzdec. + + Thanks to Jonathan Nieder. + +commit 792331bdee706aa852a78b171040ebf814c6f3ae +Author: Lasse Collin +Date: Sat Aug 7 20:45:18 2010 +0300 + + Disable the memory usage limiter by default. + + For several people, the limiter causes bigger problems that + it solves, so it is better to have it disabled by default. + Those who want to have a limiter by default need to enable + it via the environment variable XZ_DEFAULTS. + + Support for environment variable XZ_DEFAULTS was added. It is + parsed before XZ_OPT and technically identical with it. The + intended uses differ quite a bit though; see the man page. + + The memory usage limit can now be set separately for + compression and decompression using --memlimit-compress and + --memlimit-decompress. To set both at once, -M or --memlimit + can be used. --memory was retained as a legacy alias for + --memlimit for backwards compatibility. + + The semantics of --info-memory were changed in backwards + incompatible way. Compatibility wasn't meaningful due to + changes in the memory usage limiter functionality. + + The memory usage limiter info is no longer shown at the + bottom of xz --long -help. + + The memory usage limiter support for removed completely from xzdec. + + xz's man page was updated to match the above changes. Various + unrelated fixes were also made to the man page. + +commit 4a45dd4c39f75d25c7a37b6400cb24d4010ca801 +Author: Lasse Collin +Date: Fri Aug 6 20:22:16 2010 +0300 + + Add missing const to a global constant in xz. + +commit 01aa4869cb220b7fdad6d1acbabb2233045daa8f +Author: Lasse Collin +Date: Wed Jul 28 11:44:55 2010 +0300 + + Language fixes for man pages. + + Thanks to A. Costa and Jonathan Nieder. + +commit ce1f0deafe8504e1492bf1b1efb3e3ec950b1a2b +Author: Lasse Collin +Date: Tue Jul 27 20:47:12 2010 +0300 + + Windows: Add a note about building a Git repository snapshot + +commit 507a4a4dea1e5462f12f7ed4b076c34e02054a38 +Author: Lasse Collin +Date: Tue Jul 27 20:45:03 2010 +0300 + + Windows: build.sh is a bash script so name it correctly. + +commit b1cbfd40f049a646a639eb78a3e41e9e3ef73339 +Author: Lasse Collin +Date: Tue Jul 27 20:27:32 2010 +0300 + + Windows: Don't strip liblzma.a too much. + +commit a540198ffb25fad36380c5e92ac20c2d28eec46a +Author: Lasse Collin +Date: Tue Jul 13 20:07:26 2010 +0300 + + Updated THANKS. + +commit bab0f01ed931f606b4675aa9f9331a17cec09bad +Author: Lasse Collin +Date: Tue Jul 13 19:55:50 2010 +0300 + + Add two simple example programs. + + Hopefully these help a bit when learning the basics + of liblzma API. I plan to write detailed examples about + both basic and advanced features with lots of comments, + but these two examples are good have right now. + + The examples were written by Daniel Mealha Cabrita. Thanks. + +commit c15c42abb3c8c6e77c778ef06c97a4a10b8b5d00 +Author: Lasse Collin +Date: Tue Jun 15 14:06:29 2010 +0300 + + Add --no-adjust. + +commit 2130926dd1c839280358172dfadd8d3054bde2b4 +Author: Lasse Collin +Date: Fri Jun 11 21:51:32 2010 +0300 + + Updated THANKS. + +commit bc612d0e0c9e4504c59d49168e87a7ae3e458443 +Author: Lasse Collin +Date: Fri Jun 11 21:48:32 2010 +0300 + + Clarify the description of the default memlimit in the man page. + + Thanks to Denis Excoffier. + +commit e1b6935d60a00405e6b5b455a3426d2248cc926c +Author: Lasse Collin +Date: Fri Jun 11 21:43:28 2010 +0300 + + Fix string to uint64_t conversion. + + Thanks to Denis Excoffier for the bug report. + +commit 3e49c8acb0f5312948eddb2342dbb5802d4571d0 +Author: Lasse Collin +Date: Fri Jun 11 10:40:28 2010 +0300 + + Put the git commit to the filename in mydist rule. + +commit d8b41eedce486d400f701b757b7b5e4e32276618 +Author: Lasse Collin +Date: Wed Jun 2 23:13:55 2010 +0300 + + Fix compiling with -Werror. + +commit b5fbab6123a39c9a55cd5d7af410e9aae067d5f8 +Author: Lasse Collin +Date: Wed Jun 2 23:09:22 2010 +0300 + + Silence a bogus Valgrind warning. + + When using -O2 with GCC, it liked to swap two comparisons + in one "if" statement. It's otherwise fine except that + the latter part, which is seemingly never executed, got + executed (nothing wrong with that) and then triggered + warning in Valgrind about conditional jump depending on + uninitialized variable. A few people find this annoying + so do things a bit differently to avoid the warning. + +commit 29a7b250e685852f2f97615493ec49acaf528623 +Author: Lasse Collin +Date: Wed Jun 2 21:32:12 2010 +0300 + + Fix a Windows-specific FIXME in signal handling code. + +commit e89d987056cee7d4e279be3ef3a6cc690bfc0e6d +Author: Lasse Collin +Date: Wed Jun 2 17:46:58 2010 +0300 + + Adjust SA_RESTART workaround. + + I want to get a bug report if something else than + DJGPP lacks SA_RESTART. + +commit e243145c84ab5c3be8259fd486ead0de5235b3f0 +Author: Lasse Collin +Date: Tue Jun 1 16:02:30 2010 +0300 + + xz man page updates. + + - Concatenating .xz files and padding + - List mode + - Robot mode + - A few examples (but many more are needed) + +commit ce6dc3c0a891f23a862f80ec08d3b6f0beb2a562 +Author: Lasse Collin +Date: Tue Jun 1 15:51:44 2010 +0300 + + Major update to xz --list. + +commit 905e54804a899e4ad526d38fdba7e803ab9b71bd +Author: Lasse Collin +Date: Tue Jun 1 14:13:03 2010 +0300 + + Rename message_filters_get() to message_filters_to_str(). + +commit 4b346ae8af20045027ae5efb068c6d69da3324d2 +Author: Lasse Collin +Date: Tue Jun 1 14:09:12 2010 +0300 + + Fix a comment. + +commit 07dc34f6da45c9ab757dad7fd5eef522ad27d296 +Author: Lasse Collin +Date: Thu May 27 16:17:42 2010 +0300 + + Fix lzma_block_compressed_size(). + +commit 44d70cb154225e47eebf15a3cfbdf3794cbb4593 +Author: Lasse Collin +Date: Thu May 27 14:32:51 2010 +0300 + + Take Cygwin into account in some #if lines. + + This change is no-op, but good to have just in case + for the future. + +commit a334348dc02803241cf4e0a539eecdc0e7ad2cc7 +Author: Lasse Collin +Date: Thu May 27 13:42:44 2010 +0300 + + Remove references to the Subblock filter in xz and tests. + + Thanks to Jonathan Nieder. + +commit 70e5e2f6a7084e6af909deee88ceac2f6efa7893 +Author: Lasse Collin +Date: Thu May 27 13:35:36 2010 +0300 + + Remove unused chunk_size.c. + + Thanks to Jonathan Nieder for the reminder. + +commit 01a414eaf4be6352c06b48001b041b47e8202faa +Author: Jonathan Nieder +Date: Thu May 27 02:31:33 2010 -0500 + + Use my_min() instead of MIN() in src/xz/list.c + + This should have been done in + 920a69a8d8e4203c5edddd829d932130eac188ea. + +commit 920a69a8d8e4203c5edddd829d932130eac188ea +Author: Lasse Collin +Date: Wed May 26 10:36:46 2010 +0300 + + Rename MIN() and MAX() to my_min() and my_max(). + + This should avoid some minor portability issues. + +commit 019ae27c24d0c694545a6a46f8b9fb552198b015 +Author: Lasse Collin +Date: Wed May 26 10:30:20 2010 +0300 + + Fix compilation of debug/known_sizes.c. + +commit 98a4856a6ea84f79c790057a6eb89a25bc45b074 +Author: Lasse Collin +Date: Wed May 26 10:28:54 2010 +0300 + + Remove references to Subblock filter in debug/sync_flush.c. + +commit 703d2c33c095c41ae0693ee8c27c45e3847e4535 +Author: Lasse Collin +Date: Wed May 26 10:16:57 2010 +0300 + + Better #error message. + +commit d8a55c48b39703dd83f11089ad01e1ff2ac102e0 +Author: Lasse Collin +Date: Wed May 26 09:55:47 2010 +0300 + + Remove the Subblock filter code for now. + + The spec isn't finished and the code didn't compile anymore. + It won't be included in XZ Utils 5.0.0. It's easy to get it + back once the spec is done. + +commit b6377fc990f9b8651149cae0fecb8b9c5904e26d +Author: Lasse Collin +Date: Sun May 16 18:42:22 2010 +0300 + + Split message_filters(). + + message_filters_to_str() converts the filter chain to + a string. message_filters_show() replaces the original + message_filters(). + + uint32_to_optstr() was also added to show the dictionary + size in nicer format when possible. + +commit d9986db782d6cf0f314342127280519339378fa0 +Author: Lasse Collin +Date: Fri May 14 23:17:20 2010 +0300 + + Omit lzma_restrict from the API headers. + + It isn't really useful so omitting it makes things + shorter and slightly more readable. + +commit 0d3489efca0a723dca0394809fa3e6170843af4b +Author: Lasse Collin +Date: Mon May 10 19:57:24 2010 +0300 + + Updated INSTALL. + +commit 3fb3d594a2b53886adee161b6261e92277f05f7c +Author: Lasse Collin +Date: Mon May 10 19:54:52 2010 +0300 + + Updated THANKS. + +commit 6548e304657e77d3a972053db3c41c5daf591113 +Author: Lasse Collin +Date: Mon May 10 19:54:15 2010 +0300 + + Updates to tuklib_physmem and tuklib_cpucores. + + Don't use #error to generate compile error, because some + compilers actually don't take it as an error. This fixes + tuklib_physmem on IRIX. + + Fix incorrect error check for sysconf() return values. + + Add AIX, HP-UX, and Tru64 specific code to detect the + amount RAM. + + Add HP-UX specific code to detect the number of CPU cores. + + Thanks a lot to Peter O'Gorman for initial patches, + testing, and debugging these fixes. + commit a290cfee3e23f046889c022aa96b4eca2016fdda Author: Lasse Collin Date: Mon Apr 12 21:55:56 2010 +0300 Added: vendor/xz/dist/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz/dist/FREEBSD-Xlist Mon Oct 11 12:43:51 2010 (r213688) @@ -0,0 +1,37 @@ +$FreeBSD$ +*/*/*/Makefile.* +*/*/Makefile.* +*/.gitignore +*/Makefile.* +.git +.gitignore +ABOUT-NLS +COPYING.GPLv2 +COPYING.GPLv3 +COPYING.LGPLv2.1 +Doxyfile.in +INSTALL +INSTALL.generic +Makefile +Makefile.* +NEWS +PACKAGERS +aclocal.m4 +autogen.sh +build-aux/ +config.h.in +configure +configure.ac +debug/ +doc/ +dos/ +extra/ +lib/ +m4/ +makefile.am +src/*/*.rc +src/liblzma/liblzma.pc.in +src/scripts/ +tests/ +version.sh +windows/ Added: vendor/xz/dist/FREEBSD-upgrade ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz/dist/FREEBSD-upgrade Mon Oct 11 12:43:51 2010 (r213688) @@ -0,0 +1,28 @@ +$FreeBSD$ + +xz + +The source code is pulled with git: + + git clone git://ctrl.tukaani.org/xz.git xz + +ChangeLog is generated with: + + git log > ChangeLog + +For the import files and directories were pruned by: + +sh -c 'for F in `cat FREEBSD-Xlist | grep -v FreeBSD`; do rm -rf ./$F ; done' + +You may check if there are any new files that we don't need. + +The instructions for importing new release and merging to HEAD can be found +at FreeBSD wiki: + + http://wiki.freebsd.org/SubversionPrimer/VendorImports + +To make local changes to xz, simply patch and commit to the trunk +branch (aka HEAD). Never make local changes on the vendor branch. + +mm@FreeBSD.org +10-May-2010 Modified: vendor/xz/dist/README ============================================================================== --- vendor/xz/dist/README Mon Oct 11 11:25:37 2010 (r213687) +++ vendor/xz/dist/README Mon Oct 11 12:43:51 2010 (r213688) @@ -9,8 +9,9 @@ XZ Utils 1.3. Documentation for liblzma 2. Version numbering 3. Reporting bugs - 4. Other implementations of the .xz format - 5. Contact information + 4. Translating the xz tool + 5. Other implementations of the .xz format + 6. Contact information 0. Overview @@ -187,7 +188,94 @@ XZ Utils system. -4. Other implementations of the .xz format +4. Translating the xz tool +-------------------------- + + The messages from the xz tool have been translated into a few + languages. Before starting to translate into a new language, ask + the author that someone else hasn't already started working on it. + + Test your translation. Testing includes comparing the translated + output to the original English version by running the same commands + in both your target locale and with LC_ALL=C. Ask someone to + proof-read and test the translation. + + Testing can be done e.g. by installing xz into a temporary directory: + + ./configure --disable-shared --prefix=/tmp/xz-test + # + make -C po update-po + make install + bash debug/translations.bash | less + bash debug/translations.bash | less -S # For --list outputs + + Repeat the above as needed (no need to re-run configure though). + + Note especially the following: + + - The output of --help and --long-help must look nice on + a 80-column terminal. It's OK to add extra lines if needed. + + - In contrast, don't add extra lines to error messages and such. + They are often preceded with e.g. a filename on the same line, + so you have no way to predict where to put a \n. Let the terminal + do the wrapping even if it looks ugly. Adding new lines will be + even uglier in the generic case even if it looks nice in a few + limited examples. + + - Be careful with column alignment in tables and table-like output + (--list, --list --verbose --verbose, --info-memory, --help, and + --long-help): + + * All descriptions of options in --help should start in the + same column (but it doesn't need to be the same column as + in the English messages; just be consistent if you change it). + Check that both --help and --long-help look OK, since they + share several strings. + + * --list --verbose and --info-memory print lines that have + the format "Description: %s". If you need a longer + description, you can put extra space between the colon + and %s. Then you may need to add extra space to other + strings too so that the result as a whole looks good (all + values start at the same column). + + * The columns of the actual tables in --list --verbose --verbose + should be aligned properly. Abbreviate if necessary. It might + be good to keep at least 2 or 3 spaces between column headings + and avoid spaces in the headings so that the columns stand out + better, but this is a matter of opinion. Do what you think + looks best. + + - Be careful to put a period at the end of a sentence when the + original version has it, and don't put it when the original + doesn't have it. Similarly, be careful with \n characters + at the beginning and end of the strings. + + - Read the TRANSLATORS comments that have been extracted from the + source code and included in xz.pot. If they suggest testing the + translation with some type of command, do it. If testing needs + input files, use e.g. tests/files/good-*.xz. + + - When updating the translation, read the fuzzy (modified) strings + carefully, and don't mark them as updated before you actually + have updated them. Reading through the unchanged messages can be + good too; sometimes you may find a better wording for them. + + - If you find language problems in the original English strings, + feel free to suggest improvements. Ask if something is unclear. + + - The translated messages should be understandable (sometimes this + may be a problem with the original English messages too). Don't + make a direct word-by-word translation from English especially if + the result doesn't sound good in your language. + + In short, take your time and pay attention to the details. Making + a good translation is not a quick and trivial thing to do. The + translated xz should look as polished as the English version. + + +5. Other implementations of the .xz format ------------------------------------------ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 12:57:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A9ED1065696; Mon, 11 Oct 2010 12:57:42 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0109D8FC17; Mon, 11 Oct 2010 12:57:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BCvffx015880; Mon, 11 Oct 2010 12:57:41 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BCvfFZ015879; Mon, 11 Oct 2010 12:57:41 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010111257.o9BCvfFZ015879@svn.freebsd.org> From: Martin Matuska Date: Mon, 11 Oct 2010 12:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213689 - vendor/xz/20101010 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 12:57:42 -0000 Author: mm Date: Mon Oct 11 12:57:41 2010 New Revision: 213689 URL: http://svn.freebsd.org/changeset/base/213689 Log: Tag xz code as 20101010 Git revision: d52b411716a614c202e89ba732492efb9916cd3f Approved by: delphij (mentor) Added: vendor/xz/20101010/ - copied from r213688, vendor/xz/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 13:31:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 290F4106566B; Mon, 11 Oct 2010 13:31:10 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1780E8FC13; Mon, 11 Oct 2010 13:31:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BDV97H016727; Mon, 11 Oct 2010 13:31:09 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BDV9x1016725; Mon, 11 Oct 2010 13:31:09 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201010111331.o9BDV9x1016725@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 11 Oct 2010 13:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213690 - stable/7/usr.bin/truss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 13:31:10 -0000 Author: jh Date: Mon Oct 11 13:31:09 2010 New Revision: 213690 URL: http://svn.freebsd.org/changeset/base/213690 Log: MFC r200752: Avoid sharing the file descriptor of the output file with traced processes by setting the FD_CLOEXEC flag for the output file. PR: bin/140493 Modified: stable/7/usr.bin/truss/main.c Directory Properties: stable/7/usr.bin/truss/ (props changed) Modified: stable/7/usr.bin/truss/main.c ============================================================================== --- stable/7/usr.bin/truss/main.c Mon Oct 11 12:57:41 2010 (r213689) +++ stable/7/usr.bin/truss/main.c Mon Oct 11 13:31:09 2010 (r213690) @@ -231,6 +231,12 @@ main(int ac, char **av) if ((trussinfo->outfile = fopen(fname, "w")) == NULL) errx(1, "cannot open %s", fname); } + /* + * Set FD_CLOEXEC, so that the output file is not shared with + * the traced process. + */ + if (fcntl(fileno(trussinfo->outfile), F_SETFD, FD_CLOEXEC) == -1) + warn("fcntl()"); /* * If truss starts the process itself, it will ignore some signals -- From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 14:31:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFE3A106564A; Mon, 11 Oct 2010 14:31:24 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF3748FC14; Mon, 11 Oct 2010 14:31:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BEVOHE018187; Mon, 11 Oct 2010 14:31:24 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BEVO2i018185; Mon, 11 Oct 2010 14:31:24 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201010111431.o9BEVO2i018185@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 11 Oct 2010 14:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213691 - head/usr.sbin/pmccontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 14:31:25 -0000 Author: gnn Date: Mon Oct 11 14:31:24 2010 New Revision: 213691 URL: http://svn.freebsd.org/changeset/base/213691 Log: Add code to print the number and type of the CPU that is present in the system as well has how many PMCs there are per CPU. In this code CPU and core are equivalent. MFC after: 1 day Modified: head/usr.sbin/pmccontrol/pmccontrol.c Modified: head/usr.sbin/pmccontrol/pmccontrol.c ============================================================================== --- head/usr.sbin/pmccontrol/pmccontrol.c Mon Oct 11 13:31:09 2010 (r213690) +++ head/usr.sbin/pmccontrol/pmccontrol.c Mon Oct 11 14:31:24 2010 (r213691) @@ -243,6 +243,10 @@ pmcc_do_list_state(void) if (pmc_cpuinfo(&pc) != 0) err(EX_OSERR, "Unable to determine CPU information"); + printf("%d %s CPUs present, with %d PMCs per CPU\n", pc->pm_ncpu, + pmc_name_of_cputype(pc->pm_cputype), + pc->pm_npmc); + dummy = sizeof(logical_cpus_mask); if (sysctlbyname("machdep.logical_cpus_mask", &logical_cpus_mask, &dummy, NULL, 0) < 0) From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 15:43:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32F361065679; Mon, 11 Oct 2010 15:43:18 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 223448FC14; Mon, 11 Oct 2010 15:43:16 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=omSrwDgyMf70S47Fr5SNr0rQzcmIOo0IafWlB/wSLLo= c=1 sm=1 a=SuzkwCtJyaUA:10 a=N659UExz7-8A:10 a=Zf7CodC7etEA:10 a=A6tapMhSE0WbTaevTJclhA==:17 a=sMkt9YfjiB3btBwrrWsA:9 a=Zy5N_msr2s7x2ijnH9q-NuLqxA8A:4 a=pILNOxqGKmIA:10 a=A6tapMhSE0WbTaevTJclhA==:117 Received: from [188.126.198.168] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 34223242; Mon, 11 Oct 2010 17:33:13 +0200 From: Hans Petter Selasky To: Gleb Smirnoff Date: Mon, 11 Oct 2010 17:34:33 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201010061429.o96ET0RW006850@svn.freebsd.org> In-Reply-To: <201010061429.o96ET0RW006850@svn.freebsd.org> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201010111734.33836.hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r213480 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 15:43:18 -0000 On Wednesday 06 October 2010 16:29:00 Gleb Smirnoff wrote: > +static uint8_t scsi_tct_dummy[4]; Hi, struct bbb_transfer *sc; We already have a dummy receive buffer in sc->buffer. Use that instead of declaring a new one. --HPS From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 16:55:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 797191065679; Mon, 11 Oct 2010 16:55:17 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66AD48FC18; Mon, 11 Oct 2010 16:55:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BGtH7Z021177; Mon, 11 Oct 2010 16:55:17 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BGtHZs021174; Mon, 11 Oct 2010 16:55:17 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201010111655.o9BGtHZs021174@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 11 Oct 2010 16:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213692 - stable/8/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 16:55:17 -0000 Author: gnn Date: Mon Oct 11 16:55:17 2010 New Revision: 213692 URL: http://svn.freebsd.org/changeset/base/213692 Log: MFC 213402: Fix punctuation and grammar, mostly by ending sentences with a period. Modified: stable/8/lib/libpmc/pmc.westmere.3 stable/8/lib/libpmc/pmc.westmereuc.3 Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/8/lib/libpmc/pmc.westmere.3 Mon Oct 11 14:31:24 2010 (r213691) +++ stable/8/lib/libpmc/pmc.westmere.3 Mon Oct 11 16:55:17 2010 (r213692) @@ -388,7 +388,7 @@ requests include both L1D demand RFO mis .It Li L2_RQSTS.RFOS .Pq Event 24H , Umask 0CH Counts all L2 store RFO requests. L2 RFO requests include both L1D demand -RFO misses as well as L1D RFO prefetches.. +RFO misses as well as L1D RFO prefetches. .It Li L2_RQSTS.IFETCH_HIT .Pq Event 24H , Umask 10H Counts number of instruction fetches that hit the L2 cache. L2 instruction @@ -474,13 +474,13 @@ This is a demand RFO request .It Li L2_WRITE.RFO.S_STATE .Pq Event 27H , Umask 02H Counts number of L2 store RFO requests where the cache line to be loaded is -in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. -This is a demand RFO request +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request. .It Li L2_WRITE.RFO.M_STATE .Pq Event 27H , Umask 08H Counts number of L2 store RFO requests where the cache line to be loaded is in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. -This is a demand RFO request +This is a demand RFO request. .It Li L2_WRITE.RFO.HIT .Pq Event 27H , Umask 0EH Counts number of L2 store RFO requests where the cache line to be loaded is @@ -491,7 +491,7 @@ This is a demand RFO request .Pq Event 27H , Umask 0FH Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO prefetch. -This is a demand RFO request +This is a demand RFO request. .It Li L2_WRITE.LOCK.I_STATE .Pq Event 27H , Umask 10H Counts number of L2 demand lock RFO requests where the cache line to be @@ -539,13 +539,13 @@ Counts all L1 writebacks to the L2. Counts uncore Last Level Cache references. Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. -see Table A-1 +See Table A-1. .It Li L3_LAT_CACHE.MISS .Pq Event 2EH , Umask 01H Counts uncore Last Level Cache misses. Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. -see Table A-1 +See Table A-1. .It Li CPU_CLK_UNHALTED.THREAD_P .Pq Event 3CH , Umask 00H Counts the number of thread cycles while the thread is not in a halt state. @@ -601,16 +601,16 @@ Counts Extended Page walk cycles. .It Li L1D.REPL .Pq Event 51H , Umask 01H Counts the number of lines brought into the L1 data cache. -Counter 0, 1 only +Counter 0, 1 only. .It Li L1D.M_REPL .Pq Event 51H , Umask 02H Counts the number of modified lines brought into the L1 data cache. -Counter 0, 1 only +Counter 0, 1 only. .It Li L1D.M_EVICT .Pq Event 51H , Umask 04H Counts the number of modified lines evicted from the L1 data cache due to replacement. -Counter 0, 1 only +Counter 0, 1 only. .It Li L1D.M_SNOOP_EVICT .Pq Event 51H , Umask 08H Counts the number of modified lines evicted from the L1 data cache due to @@ -628,22 +628,22 @@ accepted into the fill buffer. .Pq Event 60H , Umask 01H Counts weighted cycles of offcore demand data read requests. Does not include L2 prefetch requests. -counter 0 +Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODE .Pq Event 60H , Umask 02H Counts weighted cycles of offcore demand code read requests. Does not include L2 prefetch requests. -counter 0 +Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFO .Pq Event 60H , Umask 04H Counts weighted cycles of offcore demand RFO requests. Does not include L2 prefetch requests. -counter 0 +Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.ANY.READ .Pq Event 60H , Umask 08H Counts weighted cycles of offcore read requests of any kind. Include L2 prefetch requests. -counter 0 +Ccounter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H Cycle count during which the L1D and L2 are locked. A lock is asserted when @@ -915,7 +915,7 @@ ports. This is a core count only and can .It Li UOPS_EXECUTED.PORT015 .Pq Event B1H , Umask 40H Counts number of Uops executed that where issued on port 0, 1, or 5. -use cmask=1, invert=1 to count stall cycles +Use cmask=1, invert=1 to count stall cycles. .It Li UOPS_EXECUTED.PORT234 .Pq Event B1H , Umask 80H Counts number of Uops executed that where issued on port 2, 3, or 4. @@ -928,18 +928,18 @@ Counts weighted cycles of snoopq request Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATE .Pq Event B3H , Umask 02H -Counts weighted cycles of snoopq invalidate requests. Counter 0 only +Counts weighted cycles of snoopq invalidate requests. Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.CODE .Pq Event B3H , Umask 04H -Counts weighted cycles of snoopq requests for code. Counter 0 only +Counts weighted cycles of snoopq requests for code. Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS.CODE .Pq Event B4H , Umask 01H -Counts the number of snoop code requests +Counts the number of snoop code requests. .It Li SNOOPQ_REQUESTS.DATA .Pq Event B4H , Umask 02H -Counts the number of snoop data requests +Counts the number of snoop data requests. .It Li SNOOPQ_REQUESTS.INVALIDATE .Pq Event B4H , Umask 04H Counts the number of snoop invalidate requests @@ -947,7 +947,7 @@ Counts the number of snoop invalidate re .Pq Event B7H , Umask 01H see Section 30.6.1.3, Off-core Response Performance Monitoring in the Processor Core. -Requires programming MSR 01A6H +Requires programming MSR 01A6H. .It Li SNOOP_RESPONSE.HIT .Pq Event B8H , Umask 01H Counts HIT snoop response sent by this thread in response to a snoop @@ -963,8 +963,8 @@ request. .It Li OFF_CORE_RESPONSE_1 .Pq Event BBH , Umask 01H see Section 30.6.1.3, Off-core Response Performance Monitoring in the -Processor Core -Use MSR 01A7H +Processor Core. +Use MSR 01A7H. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 01H See Table A-1 @@ -1007,21 +1007,21 @@ Counts the number of machine clears due Counts the number of times that a program writes to a code section. Self-modifying code causes a sever penalty in all Intel 64 and IA-32 processors. The modified cache line is written back to the L2 and L3caches. -.It Li BR_INST_RETIRED.ALL_BRANCHES +.It Li BR_INST_RETIRED.ANY_P .Pq Event C4H , Umask 00H -See Table A-1 +See Table A-1. .It Li BR_INST_RETIRED.CONDITIONAL .Pq Event C4H , Umask 01H Counts the number of conditional branch instructions retired. .It Li BR_INST_RETIRED.NEAR_CALL .Pq Event C4H , Umask 02H -Counts the number of direct & indirect near unconditional calls retired +Counts the number of direct & indirect near unconditional calls retired. .It Li BR_INST_RETIRED.ALL_BRANCHES .Pq Event C4H , Umask 04H -Counts the number of branch instructions retired -.It Li BR_MISP_RETIRED.ALL_BRANCHES +Counts the number of branch instructions retired. +.It Li BR_MISP_RETIRED.ANY_P .Pq Event C5H , Umask 00H -See Table A-1 +See Table A-1. .It Li BR_MISP_RETIRED.CONDITIONAL .Pq Event C5H , Umask 01H Counts mispredicted conditional retired calls. Modified: stable/8/lib/libpmc/pmc.westmereuc.3 ============================================================================== --- stable/8/lib/libpmc/pmc.westmereuc.3 Mon Oct 11 14:31:24 2010 (r213691) +++ stable/8/lib/libpmc/pmc.westmereuc.3 Mon Oct 11 16:55:17 2010 (r213692) @@ -267,10 +267,10 @@ Number of responses to code or data read has the referenced line cached in the M state. .It Li SNP_RESP_TO_REMOTE_HOME.HITM .Pq Event 07H , Umask 24H -Number of HITM snoop responses to a remote home +Number of HITM snoop responses to a remote home. .It Li L3_HITS.READ .Pq Event 08H , Umask 01H -Number of code read, data read and RFO requests that hit in the L3 +Number of code read, data read and RFO requests that hit in the L3. .It Li L3_HITS.WRITE .Pq Event 08H , Umask 02H Number of writeback requests that hit in the L3. Writebacks from the cores @@ -715,7 +715,7 @@ qualified by mask value written to MSR 3 supported: 0: NONE 40000000_00000000H:RSPFWDI 40001A00_00000000H:RSPFWDS 40001D00_00000000H:RSPIWB -Match opcode/addres s by writing MSR 396H with mask supported mask value +Match opcode/address by writing MSR 396H with mask supported mask value. .It Li ADDR_OPCODE_MATCH.REMOTE .Pq Event 35H , Umask 02H Counts number of requests from the remote socket, address/opcode of request @@ -723,7 +723,7 @@ is qualified by mask value written to MS are supported: 0: NONE 40000000_00000000H:RSPFWDI 40001A00_00000000H:RSPFWDS 40001D00_00000000H:RSPIWB -Match opcode/addres s by writing MSR 396H with mask supported mask value +Match opcode/address by writing MSR 396H with mask supported mask value. .It Li ADDR_OPCODE_MATCH.LOCAL .Pq Event 35H , Umask 04H Counts number of requests from the local socket, address/opcode of request @@ -731,7 +731,7 @@ is qualified by mask value written to MS are supported: 0: NONE 40000000_00000000H:RSPFWDI 40001A00_00000000H:RSPFWDS 40001D00_00000000H:RSPIWB -Match opcode/addres s by writing MSR 396H with mask supported mask value +Match opcode/address by writing MSR 396H with mask supported mask value. .It Li QPI_TX_STALLED_SINGLE_FLIT.HOME.LINK_0 .Pq Event 40H , Umask 01H Counts cycles the Quickpath outbound link 0 HOME virtual channel is stalled From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 16:57:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8BDD106564A; Mon, 11 Oct 2010 16:57:02 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B64588FC13; Mon, 11 Oct 2010 16:57:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BGv216021262; Mon, 11 Oct 2010 16:57:02 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BGv2ax021259; Mon, 11 Oct 2010 16:57:02 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201010111657.o9BGv2ax021259@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 11 Oct 2010 16:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213693 - stable/7/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 16:57:02 -0000 Author: gnn Date: Mon Oct 11 16:57:02 2010 New Revision: 213693 URL: http://svn.freebsd.org/changeset/base/213693 Log: MFC 213402: Fix punctuation and grammar, mostly by ending sentences with a period. Modified: stable/7/lib/libpmc/pmc.westmere.3 stable/7/lib/libpmc/pmc.westmereuc.3 Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/7/lib/libpmc/pmc.westmere.3 Mon Oct 11 16:55:17 2010 (r213692) +++ stable/7/lib/libpmc/pmc.westmere.3 Mon Oct 11 16:57:02 2010 (r213693) @@ -388,7 +388,7 @@ requests include both L1D demand RFO mis .It Li L2_RQSTS.RFOS .Pq Event 24H , Umask 0CH Counts all L2 store RFO requests. L2 RFO requests include both L1D demand -RFO misses as well as L1D RFO prefetches.. +RFO misses as well as L1D RFO prefetches. .It Li L2_RQSTS.IFETCH_HIT .Pq Event 24H , Umask 10H Counts number of instruction fetches that hit the L2 cache. L2 instruction @@ -474,13 +474,13 @@ This is a demand RFO request .It Li L2_WRITE.RFO.S_STATE .Pq Event 27H , Umask 02H Counts number of L2 store RFO requests where the cache line to be loaded is -in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. -This is a demand RFO request +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request. .It Li L2_WRITE.RFO.M_STATE .Pq Event 27H , Umask 08H Counts number of L2 store RFO requests where the cache line to be loaded is in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. -This is a demand RFO request +This is a demand RFO request. .It Li L2_WRITE.RFO.HIT .Pq Event 27H , Umask 0EH Counts number of L2 store RFO requests where the cache line to be loaded is @@ -491,7 +491,7 @@ This is a demand RFO request .Pq Event 27H , Umask 0FH Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO prefetch. -This is a demand RFO request +This is a demand RFO request. .It Li L2_WRITE.LOCK.I_STATE .Pq Event 27H , Umask 10H Counts number of L2 demand lock RFO requests where the cache line to be @@ -539,13 +539,13 @@ Counts all L1 writebacks to the L2. Counts uncore Last Level Cache references. Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. -see Table A-1 +See Table A-1. .It Li L3_LAT_CACHE.MISS .Pq Event 2EH , Umask 01H Counts uncore Last Level Cache misses. Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. -see Table A-1 +See Table A-1. .It Li CPU_CLK_UNHALTED.THREAD_P .Pq Event 3CH , Umask 00H Counts the number of thread cycles while the thread is not in a halt state. @@ -601,16 +601,16 @@ Counts Extended Page walk cycles. .It Li L1D.REPL .Pq Event 51H , Umask 01H Counts the number of lines brought into the L1 data cache. -Counter 0, 1 only +Counter 0, 1 only. .It Li L1D.M_REPL .Pq Event 51H , Umask 02H Counts the number of modified lines brought into the L1 data cache. -Counter 0, 1 only +Counter 0, 1 only. .It Li L1D.M_EVICT .Pq Event 51H , Umask 04H Counts the number of modified lines evicted from the L1 data cache due to replacement. -Counter 0, 1 only +Counter 0, 1 only. .It Li L1D.M_SNOOP_EVICT .Pq Event 51H , Umask 08H Counts the number of modified lines evicted from the L1 data cache due to @@ -628,22 +628,22 @@ accepted into the fill buffer. .Pq Event 60H , Umask 01H Counts weighted cycles of offcore demand data read requests. Does not include L2 prefetch requests. -counter 0 +Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODE .Pq Event 60H , Umask 02H Counts weighted cycles of offcore demand code read requests. Does not include L2 prefetch requests. -counter 0 +Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFO .Pq Event 60H , Umask 04H Counts weighted cycles of offcore demand RFO requests. Does not include L2 prefetch requests. -counter 0 +Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.ANY.READ .Pq Event 60H , Umask 08H Counts weighted cycles of offcore read requests of any kind. Include L2 prefetch requests. -counter 0 +Ccounter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H Cycle count during which the L1D and L2 are locked. A lock is asserted when @@ -915,7 +915,7 @@ ports. This is a core count only and can .It Li UOPS_EXECUTED.PORT015 .Pq Event B1H , Umask 40H Counts number of Uops executed that where issued on port 0, 1, or 5. -use cmask=1, invert=1 to count stall cycles +Use cmask=1, invert=1 to count stall cycles. .It Li UOPS_EXECUTED.PORT234 .Pq Event B1H , Umask 80H Counts number of Uops executed that where issued on port 2, 3, or 4. @@ -928,18 +928,18 @@ Counts weighted cycles of snoopq request Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATE .Pq Event B3H , Umask 02H -Counts weighted cycles of snoopq invalidate requests. Counter 0 only +Counts weighted cycles of snoopq invalidate requests. Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.CODE .Pq Event B3H , Umask 04H -Counts weighted cycles of snoopq requests for code. Counter 0 only +Counts weighted cycles of snoopq requests for code. Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS.CODE .Pq Event B4H , Umask 01H -Counts the number of snoop code requests +Counts the number of snoop code requests. .It Li SNOOPQ_REQUESTS.DATA .Pq Event B4H , Umask 02H -Counts the number of snoop data requests +Counts the number of snoop data requests. .It Li SNOOPQ_REQUESTS.INVALIDATE .Pq Event B4H , Umask 04H Counts the number of snoop invalidate requests @@ -947,7 +947,7 @@ Counts the number of snoop invalidate re .Pq Event B7H , Umask 01H see Section 30.6.1.3, Off-core Response Performance Monitoring in the Processor Core. -Requires programming MSR 01A6H +Requires programming MSR 01A6H. .It Li SNOOP_RESPONSE.HIT .Pq Event B8H , Umask 01H Counts HIT snoop response sent by this thread in response to a snoop @@ -963,8 +963,8 @@ request. .It Li OFF_CORE_RESPONSE_1 .Pq Event BBH , Umask 01H see Section 30.6.1.3, Off-core Response Performance Monitoring in the -Processor Core -Use MSR 01A7H +Processor Core. +Use MSR 01A7H. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 01H See Table A-1 @@ -1007,21 +1007,21 @@ Counts the number of machine clears due Counts the number of times that a program writes to a code section. Self-modifying code causes a sever penalty in all Intel 64 and IA-32 processors. The modified cache line is written back to the L2 and L3caches. -.It Li BR_INST_RETIRED.ALL_BRANCHES +.It Li BR_INST_RETIRED.ANY_P .Pq Event C4H , Umask 00H -See Table A-1 +See Table A-1. .It Li BR_INST_RETIRED.CONDITIONAL .Pq Event C4H , Umask 01H Counts the number of conditional branch instructions retired. .It Li BR_INST_RETIRED.NEAR_CALL .Pq Event C4H , Umask 02H -Counts the number of direct & indirect near unconditional calls retired +Counts the number of direct & indirect near unconditional calls retired. .It Li BR_INST_RETIRED.ALL_BRANCHES .Pq Event C4H , Umask 04H -Counts the number of branch instructions retired -.It Li BR_MISP_RETIRED.ALL_BRANCHES +Counts the number of branch instructions retired. +.It Li BR_MISP_RETIRED.ANY_P .Pq Event C5H , Umask 00H -See Table A-1 +See Table A-1. .It Li BR_MISP_RETIRED.CONDITIONAL .Pq Event C5H , Umask 01H Counts mispredicted conditional retired calls. Modified: stable/7/lib/libpmc/pmc.westmereuc.3 ============================================================================== --- stable/7/lib/libpmc/pmc.westmereuc.3 Mon Oct 11 16:55:17 2010 (r213692) +++ stable/7/lib/libpmc/pmc.westmereuc.3 Mon Oct 11 16:57:02 2010 (r213693) @@ -267,10 +267,10 @@ Number of responses to code or data read has the referenced line cached in the M state. .It Li SNP_RESP_TO_REMOTE_HOME.HITM .Pq Event 07H , Umask 24H -Number of HITM snoop responses to a remote home +Number of HITM snoop responses to a remote home. .It Li L3_HITS.READ .Pq Event 08H , Umask 01H -Number of code read, data read and RFO requests that hit in the L3 +Number of code read, data read and RFO requests that hit in the L3. .It Li L3_HITS.WRITE .Pq Event 08H , Umask 02H Number of writeback requests that hit in the L3. Writebacks from the cores From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 17:18:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7879B1065670; Mon, 11 Oct 2010 17:18:23 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 674578FC0A; Mon, 11 Oct 2010 17:18:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BHINtO021766; Mon, 11 Oct 2010 17:18:23 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BHINX6021762; Mon, 11 Oct 2010 17:18:23 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201010111718.o9BHINX6021762@svn.freebsd.org> From: Rui Paulo Date: Mon, 11 Oct 2010 17:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213694 - in head/contrib/llvm/tools/clang: include/clang/Analysis/Analyses lib/Analysis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 17:18:23 -0000 Author: rpaulo Date: Mon Oct 11 17:18:23 2010 New Revision: 213694 URL: http://svn.freebsd.org/changeset/base/213694 Log: Rework the analysis of the 'r' specifier. It turns out that we can't make it like xArg because they are different ('x' doesn't accept sign, but 'r' does). This fixes some warnings when building DDB with clang. With help from: rdivacky Modified: head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp Modified: head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h ============================================================================== --- head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h Mon Oct 11 16:57:02 2010 (r213693) +++ head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h Mon Oct 11 17:18:23 2010 (r213694) @@ -147,6 +147,7 @@ public: // FreeBSD specific specifiers bArg, DArg, + rArg, // GlibC specific specifiers. PrintErrno, // 'm' Modified: head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp Mon Oct 11 16:57:02 2010 (r213693) +++ head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp Mon Oct 11 17:18:23 2010 (r213694) @@ -423,6 +423,7 @@ bool FormatSpecifier::hasValidLengthModi case ConversionSpecifier::xArg: case ConversionSpecifier::XArg: case ConversionSpecifier::nArg: + case ConversionSpecifier::rArg: return true; default: return false; @@ -448,6 +449,7 @@ bool FormatSpecifier::hasValidLengthModi case ConversionSpecifier::nArg: case ConversionSpecifier::cArg: case ConversionSpecifier::sArg: + case ConversionSpecifier::rArg: return true; default: return false; Modified: head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp Mon Oct 11 16:57:02 2010 (r213693) +++ head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp Mon Oct 11 17:18:23 2010 (r213694) @@ -195,7 +195,7 @@ static PrintfSpecifierResult ParsePrintf case 'm': k = ConversionSpecifier::PrintErrno; break; // FreeBSD format extensions case 'b': if (FormatExtensions) k = ConversionSpecifier::bArg; break; /* check for int and then char * */ - case 'r': if (FormatExtensions) k = ConversionSpecifier::xArg; break; + case 'r': if (FormatExtensions) k = ConversionSpecifier::rArg; break; case 'y': if (FormatExtensions) k = ConversionSpecifier::iArg; break; case 'D': if (FormatExtensions) k = ConversionSpecifier::DArg; break; /* check for u_char * pointer and a char * string */ } @@ -279,6 +279,7 @@ const char *ConversionSpecifier::toStrin // FreeBSD specific specifiers. case bArg: return "b"; case DArg: return "D"; + case rArg: return "r"; // GlibC specific specifiers. case PrintErrno: return "m"; @@ -491,6 +492,7 @@ bool PrintfSpecifier::hasValidPlusPrefix case ConversionSpecifier::GArg: case ConversionSpecifier::aArg: case ConversionSpecifier::AArg: + case ConversionSpecifier::rArg: return true; default: @@ -514,6 +516,7 @@ bool PrintfSpecifier::hasValidAlternativ case ConversionSpecifier::FArg: case ConversionSpecifier::gArg: case ConversionSpecifier::GArg: + case ConversionSpecifier::rArg: return true; default: From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 17:22:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D7ED106564A; Mon, 11 Oct 2010 17:22:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDBC88FC12; Mon, 11 Oct 2010 17:22:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BHMGxN021902; Mon, 11 Oct 2010 17:22:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BHMGfV021901; Mon, 11 Oct 2010 17:22:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201010111722.o9BHMGfV021901@svn.freebsd.org> From: Dimitry Andric Date: Mon, 11 Oct 2010 17:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213695 - in head/contrib/llvm: . autoconf bindings include/llvm include/llvm/Config include/llvm/System lib lib/Analysis lib/Analysis/IPA lib/Archive lib/AsmParser lib/Bitcode lib/Bitc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 17:22:17 -0000 Author: dim Date: Mon Oct 11 17:22:16 2010 New Revision: 213695 URL: http://svn.freebsd.org/changeset/base/213695 Log: Remove more unneeded files and directories from contrib/llvm. This still allows us to build tblgen and clang, and further reduces the footprint in the tree. Approved by: rpaulo (mentor) Deleted: head/contrib/llvm/CMakeLists.txt head/contrib/llvm/CREDITS.TXT head/contrib/llvm/LICENSE.TXT head/contrib/llvm/Makefile head/contrib/llvm/Makefile.common head/contrib/llvm/Makefile.config.in head/contrib/llvm/Makefile.rules head/contrib/llvm/ModuleInfo.txt head/contrib/llvm/README.txt head/contrib/llvm/autoconf/ head/contrib/llvm/bindings/ head/contrib/llvm/build-for-llvm-top.sh head/contrib/llvm/configure head/contrib/llvm/include/llvm/CMakeLists.txt head/contrib/llvm/include/llvm/Config/ head/contrib/llvm/include/llvm/System/DataTypes.h.cmake head/contrib/llvm/include/llvm/System/DataTypes.h.in head/contrib/llvm/include/llvm/System/LICENSE.TXT head/contrib/llvm/lib/Analysis/CMakeLists.txt head/contrib/llvm/lib/Analysis/IPA/CMakeLists.txt head/contrib/llvm/lib/Analysis/IPA/Makefile head/contrib/llvm/lib/Analysis/Makefile head/contrib/llvm/lib/Analysis/README.txt head/contrib/llvm/lib/Archive/CMakeLists.txt head/contrib/llvm/lib/Archive/Makefile head/contrib/llvm/lib/AsmParser/CMakeLists.txt head/contrib/llvm/lib/AsmParser/Makefile head/contrib/llvm/lib/Bitcode/Makefile head/contrib/llvm/lib/Bitcode/Reader/CMakeLists.txt head/contrib/llvm/lib/Bitcode/Reader/Makefile head/contrib/llvm/lib/Bitcode/Writer/CMakeLists.txt head/contrib/llvm/lib/Bitcode/Writer/Makefile head/contrib/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/CodeGen/AsmPrinter/Makefile head/contrib/llvm/lib/CodeGen/CMakeLists.txt head/contrib/llvm/lib/CodeGen/Makefile head/contrib/llvm/lib/CodeGen/README.txt head/contrib/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt head/contrib/llvm/lib/CodeGen/SelectionDAG/Makefile head/contrib/llvm/lib/CompilerDriver/CMakeLists.txt head/contrib/llvm/lib/CompilerDriver/Makefile head/contrib/llvm/lib/ExecutionEngine/CMakeLists.txt head/contrib/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt head/contrib/llvm/lib/ExecutionEngine/Interpreter/Makefile head/contrib/llvm/lib/ExecutionEngine/JIT/CMakeLists.txt head/contrib/llvm/lib/ExecutionEngine/JIT/Makefile head/contrib/llvm/lib/ExecutionEngine/Makefile head/contrib/llvm/lib/Linker/CMakeLists.txt head/contrib/llvm/lib/Linker/Makefile head/contrib/llvm/lib/MC/CMakeLists.txt head/contrib/llvm/lib/MC/MCDisassembler/CMakeLists.txt head/contrib/llvm/lib/MC/MCDisassembler/Makefile head/contrib/llvm/lib/MC/MCParser/CMakeLists.txt head/contrib/llvm/lib/MC/MCParser/Makefile head/contrib/llvm/lib/MC/Makefile head/contrib/llvm/lib/Makefile head/contrib/llvm/lib/Support/CMakeLists.txt head/contrib/llvm/lib/Support/COPYRIGHT.regex head/contrib/llvm/lib/Support/Makefile head/contrib/llvm/lib/System/CMakeLists.txt head/contrib/llvm/lib/System/Makefile head/contrib/llvm/lib/System/README.txt head/contrib/llvm/lib/System/Unix/README.txt head/contrib/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt head/contrib/llvm/lib/Target/ARM/AsmParser/Makefile head/contrib/llvm/lib/Target/ARM/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/ARM/AsmPrinter/Makefile head/contrib/llvm/lib/Target/ARM/CMakeLists.txt head/contrib/llvm/lib/Target/ARM/Disassembler/Makefile head/contrib/llvm/lib/Target/ARM/Makefile head/contrib/llvm/lib/Target/ARM/README-Thumb.txt head/contrib/llvm/lib/Target/ARM/README-Thumb2.txt head/contrib/llvm/lib/Target/ARM/README.txt head/contrib/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/ARM/TargetInfo/Makefile head/contrib/llvm/lib/Target/Alpha/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/Alpha/AsmPrinter/Makefile head/contrib/llvm/lib/Target/Alpha/CMakeLists.txt head/contrib/llvm/lib/Target/Alpha/Makefile head/contrib/llvm/lib/Target/Alpha/README.txt head/contrib/llvm/lib/Target/Alpha/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/Alpha/TargetInfo/Makefile head/contrib/llvm/lib/Target/Blackfin/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/Blackfin/AsmPrinter/Makefile head/contrib/llvm/lib/Target/Blackfin/CMakeLists.txt head/contrib/llvm/lib/Target/Blackfin/Makefile head/contrib/llvm/lib/Target/Blackfin/README.txt head/contrib/llvm/lib/Target/Blackfin/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/Blackfin/TargetInfo/Makefile head/contrib/llvm/lib/Target/CBackend/CMakeLists.txt head/contrib/llvm/lib/Target/CBackend/Makefile head/contrib/llvm/lib/Target/CBackend/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/CBackend/TargetInfo/Makefile head/contrib/llvm/lib/Target/CMakeLists.txt head/contrib/llvm/lib/Target/CellSPU/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/CellSPU/AsmPrinter/Makefile head/contrib/llvm/lib/Target/CellSPU/CMakeLists.txt head/contrib/llvm/lib/Target/CellSPU/Makefile head/contrib/llvm/lib/Target/CellSPU/README.txt head/contrib/llvm/lib/Target/CellSPU/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/CellSPU/TargetInfo/Makefile head/contrib/llvm/lib/Target/CppBackend/CMakeLists.txt head/contrib/llvm/lib/Target/CppBackend/Makefile head/contrib/llvm/lib/Target/CppBackend/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/CppBackend/TargetInfo/Makefile head/contrib/llvm/lib/Target/MBlaze/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/MBlaze/AsmPrinter/Makefile head/contrib/llvm/lib/Target/MBlaze/CMakeLists.txt head/contrib/llvm/lib/Target/MBlaze/Makefile head/contrib/llvm/lib/Target/MBlaze/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/MBlaze/TargetInfo/Makefile head/contrib/llvm/lib/Target/MSP430/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/MSP430/AsmPrinter/Makefile head/contrib/llvm/lib/Target/MSP430/CMakeLists.txt head/contrib/llvm/lib/Target/MSP430/Makefile head/contrib/llvm/lib/Target/MSP430/README.txt head/contrib/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/MSP430/TargetInfo/Makefile head/contrib/llvm/lib/Target/Makefile head/contrib/llvm/lib/Target/Mips/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/Mips/AsmPrinter/Makefile head/contrib/llvm/lib/Target/Mips/CMakeLists.txt head/contrib/llvm/lib/Target/Mips/Makefile head/contrib/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/Mips/TargetInfo/Makefile head/contrib/llvm/lib/Target/PIC16/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/PIC16/AsmPrinter/Makefile head/contrib/llvm/lib/Target/PIC16/CMakeLists.txt head/contrib/llvm/lib/Target/PIC16/Makefile head/contrib/llvm/lib/Target/PIC16/PIC16Passes/Makefile head/contrib/llvm/lib/Target/PIC16/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/PIC16/TargetInfo/Makefile head/contrib/llvm/lib/Target/PowerPC/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/PowerPC/AsmPrinter/Makefile head/contrib/llvm/lib/Target/PowerPC/CMakeLists.txt head/contrib/llvm/lib/Target/PowerPC/Makefile head/contrib/llvm/lib/Target/PowerPC/README.txt head/contrib/llvm/lib/Target/PowerPC/README_ALTIVEC.txt head/contrib/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/PowerPC/TargetInfo/Makefile head/contrib/llvm/lib/Target/README.txt head/contrib/llvm/lib/Target/Sparc/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/Sparc/AsmPrinter/Makefile head/contrib/llvm/lib/Target/Sparc/CMakeLists.txt head/contrib/llvm/lib/Target/Sparc/Makefile head/contrib/llvm/lib/Target/Sparc/README.txt head/contrib/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/Sparc/TargetInfo/Makefile head/contrib/llvm/lib/Target/SystemZ/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/SystemZ/AsmPrinter/Makefile head/contrib/llvm/lib/Target/SystemZ/CMakeLists.txt head/contrib/llvm/lib/Target/SystemZ/Makefile head/contrib/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/SystemZ/TargetInfo/Makefile head/contrib/llvm/lib/Target/X86/AsmParser/CMakeLists.txt head/contrib/llvm/lib/Target/X86/AsmParser/Makefile head/contrib/llvm/lib/Target/X86/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/X86/AsmPrinter/Makefile head/contrib/llvm/lib/Target/X86/CMakeLists.txt head/contrib/llvm/lib/Target/X86/Disassembler/CMakeLists.txt head/contrib/llvm/lib/Target/X86/Disassembler/Makefile head/contrib/llvm/lib/Target/X86/Makefile head/contrib/llvm/lib/Target/X86/README-FPStack.txt head/contrib/llvm/lib/Target/X86/README-MMX.txt head/contrib/llvm/lib/Target/X86/README-SSE.txt head/contrib/llvm/lib/Target/X86/README-UNIMPLEMENTED.txt head/contrib/llvm/lib/Target/X86/README-X86-64.txt head/contrib/llvm/lib/Target/X86/README.txt head/contrib/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/X86/TargetInfo/Makefile head/contrib/llvm/lib/Target/X86/X86CompilationCallback_Win64.asm head/contrib/llvm/lib/Target/XCore/AsmPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/XCore/AsmPrinter/Makefile head/contrib/llvm/lib/Target/XCore/CMakeLists.txt head/contrib/llvm/lib/Target/XCore/Makefile head/contrib/llvm/lib/Target/XCore/README.txt head/contrib/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/XCore/TargetInfo/Makefile head/contrib/llvm/lib/Transforms/Hello/ head/contrib/llvm/lib/Transforms/IPO/CMakeLists.txt head/contrib/llvm/lib/Transforms/IPO/Makefile head/contrib/llvm/lib/Transforms/InstCombine/CMakeLists.txt head/contrib/llvm/lib/Transforms/InstCombine/Makefile head/contrib/llvm/lib/Transforms/Instrumentation/CMakeLists.txt head/contrib/llvm/lib/Transforms/Instrumentation/Makefile head/contrib/llvm/lib/Transforms/Makefile head/contrib/llvm/lib/Transforms/Scalar/CMakeLists.txt head/contrib/llvm/lib/Transforms/Scalar/Makefile head/contrib/llvm/lib/Transforms/Utils/CMakeLists.txt head/contrib/llvm/lib/Transforms/Utils/Makefile head/contrib/llvm/lib/VMCore/CMakeLists.txt head/contrib/llvm/lib/VMCore/Makefile head/contrib/llvm/llvm.spec.in head/contrib/llvm/runtime/ head/contrib/llvm/tools/CMakeLists.txt head/contrib/llvm/tools/Makefile head/contrib/llvm/tools/bugpoint/ head/contrib/llvm/tools/bugpoint-passes/ head/contrib/llvm/tools/clang/CMakeLists.txt head/contrib/llvm/tools/clang/INSTALL.txt head/contrib/llvm/tools/clang/LICENSE.TXT head/contrib/llvm/tools/clang/Makefile head/contrib/llvm/tools/clang/ModuleInfo.txt head/contrib/llvm/tools/clang/NOTES.txt head/contrib/llvm/tools/clang/README.txt head/contrib/llvm/tools/clang/TODO.txt head/contrib/llvm/tools/clang/bindings/ head/contrib/llvm/tools/clang/include/CMakeLists.txt head/contrib/llvm/tools/clang/include/Makefile head/contrib/llvm/tools/clang/include/clang-c/Makefile head/contrib/llvm/tools/clang/include/clang/AST/CMakeLists.txt head/contrib/llvm/tools/clang/include/clang/AST/Makefile head/contrib/llvm/tools/clang/include/clang/Basic/CMakeLists.txt head/contrib/llvm/tools/clang/include/clang/Basic/Makefile head/contrib/llvm/tools/clang/include/clang/Basic/Version.inc.in head/contrib/llvm/tools/clang/include/clang/CMakeLists.txt head/contrib/llvm/tools/clang/include/clang/Driver/CMakeLists.txt head/contrib/llvm/tools/clang/include/clang/Driver/Makefile head/contrib/llvm/tools/clang/include/clang/Makefile head/contrib/llvm/tools/clang/include/clang/Serialization/CMakeLists.txt head/contrib/llvm/tools/clang/include/clang/Serialization/Makefile head/contrib/llvm/tools/clang/lib/AST/CMakeLists.txt head/contrib/llvm/tools/clang/lib/AST/Makefile head/contrib/llvm/tools/clang/lib/Analysis/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Analysis/Makefile head/contrib/llvm/tools/clang/lib/Basic/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Basic/Makefile head/contrib/llvm/tools/clang/lib/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Checker/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Checker/Makefile head/contrib/llvm/tools/clang/lib/CodeGen/CMakeLists.txt head/contrib/llvm/tools/clang/lib/CodeGen/Makefile head/contrib/llvm/tools/clang/lib/CodeGen/README.txt head/contrib/llvm/tools/clang/lib/Driver/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Driver/Makefile head/contrib/llvm/tools/clang/lib/Frontend/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Frontend/Makefile head/contrib/llvm/tools/clang/lib/FrontendTool/CMakeLists.txt head/contrib/llvm/tools/clang/lib/FrontendTool/Makefile head/contrib/llvm/tools/clang/lib/Headers/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Headers/Makefile head/contrib/llvm/tools/clang/lib/Index/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Index/Makefile head/contrib/llvm/tools/clang/lib/Lex/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Lex/Makefile head/contrib/llvm/tools/clang/lib/Makefile head/contrib/llvm/tools/clang/lib/Parse/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Parse/Makefile head/contrib/llvm/tools/clang/lib/Rewrite/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Rewrite/Makefile head/contrib/llvm/tools/clang/lib/Sema/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Sema/Makefile head/contrib/llvm/tools/clang/lib/Serialization/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Serialization/Makefile head/contrib/llvm/tools/clang/runtime/ head/contrib/llvm/tools/clang/tools/CMakeLists.txt head/contrib/llvm/tools/clang/tools/Makefile head/contrib/llvm/tools/clang/tools/c-index-test/ head/contrib/llvm/tools/clang/tools/driver/CMakeLists.txt head/contrib/llvm/tools/clang/tools/driver/Info.plist.in head/contrib/llvm/tools/clang/tools/driver/Makefile head/contrib/llvm/tools/clang/tools/libclang/ head/contrib/llvm/tools/clang/tools/scan-build/ head/contrib/llvm/tools/clang/tools/scan-view/ head/contrib/llvm/tools/clang/utils/ head/contrib/llvm/tools/edis/ head/contrib/llvm/tools/gold/ head/contrib/llvm/tools/llc/ head/contrib/llvm/tools/lli/ head/contrib/llvm/tools/llvm-ar/ head/contrib/llvm/tools/llvm-as/ head/contrib/llvm/tools/llvm-bcanalyzer/ head/contrib/llvm/tools/llvm-config/ head/contrib/llvm/tools/llvm-diff/ head/contrib/llvm/tools/llvm-dis/ head/contrib/llvm/tools/llvm-extract/ head/contrib/llvm/tools/llvm-ld/ head/contrib/llvm/tools/llvm-link/ head/contrib/llvm/tools/llvm-mc/ head/contrib/llvm/tools/llvm-nm/ head/contrib/llvm/tools/llvm-prof/ head/contrib/llvm/tools/llvm-ranlib/ head/contrib/llvm/tools/llvm-shlib/ head/contrib/llvm/tools/llvm-stub/ head/contrib/llvm/tools/llvmc/ head/contrib/llvm/tools/lto/ head/contrib/llvm/tools/opt/ head/contrib/llvm/utils/DSAclean.py head/contrib/llvm/utils/DSAextract.py head/contrib/llvm/utils/FileCheck/ head/contrib/llvm/utils/FileUpdate/ head/contrib/llvm/utils/GenLibDeps.pl head/contrib/llvm/utils/GetSourceVersion head/contrib/llvm/utils/Makefile head/contrib/llvm/utils/Misc/ head/contrib/llvm/utils/NLT.schema head/contrib/llvm/utils/NewNightlyTest.pl head/contrib/llvm/utils/NightlyTest.gnuplot head/contrib/llvm/utils/NightlyTestTemplate.html head/contrib/llvm/utils/OldenDataRecover.pl head/contrib/llvm/utils/PerfectShuffle/ head/contrib/llvm/utils/TableGen/CMakeLists.txt head/contrib/llvm/utils/TableGen/Makefile head/contrib/llvm/utils/UpdateCMakeLists.pl head/contrib/llvm/utils/bugpoint/ head/contrib/llvm/utils/buildit/ head/contrib/llvm/utils/cgiplotNLT.pl head/contrib/llvm/utils/check-each-file head/contrib/llvm/utils/codegen-diff head/contrib/llvm/utils/count/ head/contrib/llvm/utils/countloc.sh head/contrib/llvm/utils/crosstool/ head/contrib/llvm/utils/emacs/ head/contrib/llvm/utils/findmisopt head/contrib/llvm/utils/findoptdiff head/contrib/llvm/utils/findsym.pl head/contrib/llvm/utils/fpcmp/ head/contrib/llvm/utils/getsrcs.sh head/contrib/llvm/utils/git/ head/contrib/llvm/utils/importNLT.pl head/contrib/llvm/utils/jedit/ head/contrib/llvm/utils/lint/ head/contrib/llvm/utils/lit/ head/contrib/llvm/utils/llvm-lit/ head/contrib/llvm/utils/llvm-native-gcc head/contrib/llvm/utils/llvm-native-gxx head/contrib/llvm/utils/llvm.grm head/contrib/llvm/utils/llvmdo head/contrib/llvm/utils/llvmgrep head/contrib/llvm/utils/makellvm head/contrib/llvm/utils/not/ head/contrib/llvm/utils/parseNLT.pl head/contrib/llvm/utils/plotNLT.pl head/contrib/llvm/utils/profile.pl head/contrib/llvm/utils/unittest/ head/contrib/llvm/utils/valgrind/ head/contrib/llvm/utils/vim/ head/contrib/llvm/utils/webNLT.pl From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 18:13:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19490106564A; Mon, 11 Oct 2010 18:13:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DC9988FC08; Mon, 11 Oct 2010 18:13:36 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 94C5346B0C; Mon, 11 Oct 2010 14:13:36 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AF3848A027; Mon, 11 Oct 2010 14:13:35 -0400 (EDT) From: John Baldwin To: Ivan Voras Date: Mon, 11 Oct 2010 10:23:26 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201010092020.o99KKSYW051470@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010111023.26220.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 11 Oct 2010 14:13:35 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.3 required=4.2 tests=BAYES_00,DATE_IN_PAST_03_06 autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, "Andrey V. Elsukov" , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r213662 - in head: sbin/geom/class/concat sbin/geom/class/eli sbin/geom/class/journal sbin/geom/class/mirror sbin/geom/class/part sbin/geom/class/raid3 sbin/geom/class/shsec sbin/geom/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 18:13:37 -0000 On Sunday, October 10, 2010 4:54:37 am Ivan Voras wrote: > On 9 October 2010 22:20, Andrey V. Elsukov wrote: > > Author: ae > > Date: Sat Oct 9 20:20:27 2010 > > New Revision: 213662 > > URL: http://svn.freebsd.org/changeset/base/213662 > > > > Log: > > Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1. > > Um, this looks like a pointless change and for the worse; Even at -O1 > the compiler will reduce strlen(constant) to just its result and for > code like printf("%d\n", sizeof("1234567")) produce code like: > > movl $7, %esi > movl $.LC0, %edi > movl $0, %eax > call printf > > And (though tastes differ) I think the sizeof() variant is less > readable. The strlen(_PATH_something) idiom is common in other parts > of the kernel outside GEOM. > > In short - why was this done? I agree, strlen("foo") is much clearer. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 18:32:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49823106566B; Mon, 11 Oct 2010 18:32:42 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9A16A8FC08; Mon, 11 Oct 2010 18:32:41 +0000 (UTC) Received: by qwe4 with SMTP id 4so1617423qwe.13 for ; Mon, 11 Oct 2010 11:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=cyHmBRSrCzlsawe+iQCWXAqRSHHeK3OBxUZkSXT26+M=; b=TrudmdffYQJZRY0pRMn7T/nzBUVqWxgc1z1e/xqdfBfQCNy1b+b4MVS3xjl+ozWh6t 38LydIWhMj8ilnwVzwS8osmdZFwzXnpaHd/cA/sByqTtW/GSAmw9lBnghy57mNu65Y38 cRlDkaFtTEyVzrGt5rlGYZGXaS/QnQbibmaEI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=c89QnIxB5nGOMDnRTAMSMbd598IJCwsEJpmEdz2K7kTFC5w1Yhm1PnG3tmohEYf/dT ddHhqXkNf3/0F6Im69L3gHnyTM69Ko/pMXWDyrhShaahwk44osAj1/yWhGHqQzzRnAU3 1n60/dWX3DwkGNS/XGvFmLN9GSlXMJFZ3mcU0= Received: by 10.224.209.6 with SMTP id ge6mr4747438qab.110.1286821960645; Mon, 11 Oct 2010 11:32:40 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.234.81 with HTTP; Mon, 11 Oct 2010 11:32:00 -0700 (PDT) In-Reply-To: References: <201010092020.o99KKSYW051470@svn.freebsd.org> From: Ivan Voras Date: Mon, 11 Oct 2010 20:32:00 +0200 X-Google-Sender-Auth: GBzyGdZJvfEIFqe6yGKLm5J-acY Message-ID: To: "Andrey V. Elsukov" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r213662 - in head: sbin/geom/class/concat sbin/geom/class/eli sbin/geom/class/journal sbin/geom/class/mirror sbin/geom/class/part sbin/geom/class/raid3 sbin/geom/class/shsec sbin/geom/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 18:32:42 -0000 On 10 October 2010 10:54, Ivan Voras wrote: > On 9 October 2010 22:20, Andrey V. Elsukov wrote: >> Author: ae >> Date: Sat Oct =C2=A09 20:20:27 2010 >> New Revision: 213662 >> URL: http://svn.freebsd.org/changeset/base/213662 >> >> Log: >> =C2=A0Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1. > > Um, this looks like a pointless change and for the worse; Even at -O1 > the compiler will reduce strlen(constant) to just its result and for > code like printf("%d\n", sizeof("1234567")) produce code like: ^^^^^ should be strlen(), of course :) From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 19:20:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BCB3106564A; Mon, 11 Oct 2010 19:20:54 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3F048FC17; Mon, 11 Oct 2010 19:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BJKrAX024716; Mon, 11 Oct 2010 19:20:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BJKrFk024713; Mon, 11 Oct 2010 19:20:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201010111920.o9BJKrFk024713@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 11 Oct 2010 19:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213696 - head/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 19:20:54 -0000 Author: yongari Date: Mon Oct 11 19:20:53 2010 New Revision: 213696 URL: http://svn.freebsd.org/changeset/base/213696 Log: Do not setup interrupt endpoint for axe(4). It seems axe(4) controllers support interrupt endpoint such that enabling interrupt endpoint generates about 1000 interrupts/sec. Controllers transfer 8 bytes data through interrupt endpoint and the data include link UP/DOWN state as well as some PHY related information. Previously axe(4) didn't use the transferred data and didn't even try to read the data. Because axe(4) counts on mii(4) to detect link state changes there is no need to use interrupt endpoint here. This change fixes generation of unnecessary interrupts which was seen when interface is brought to UP. No objections from: hselasky Modified: head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_axereg.h Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Mon Oct 11 17:22:16 2010 (r213695) +++ head/sys/dev/usb/net/if_axe.c Mon Oct 11 19:20:53 2010 (r213696) @@ -171,7 +171,6 @@ static device_probe_t axe_probe; static device_attach_t axe_attach; static device_detach_t axe_detach; -static usb_callback_t axe_intr_callback; static usb_callback_t axe_bulk_read_callback; static usb_callback_t axe_bulk_write_callback; @@ -215,15 +214,6 @@ static const struct usb_config axe_confi .callback = axe_bulk_read_callback, .timeout = 0, /* no timeout */ }, - - [AXE_INTR_DT_RD] = { - .type = UE_INTERRUPT, - .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, - .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .bufsize = 0, /* use wMaxPacketSize */ - .callback = axe_intr_callback, - }, }; static device_method_t axe_methods[] = { @@ -796,27 +786,6 @@ axe_detach(device_t dev) return (0); } -static void -axe_intr_callback(struct usb_xfer *xfer, usb_error_t error) -{ - switch (USB_GET_STATE(xfer)) { - case USB_ST_TRANSFERRED: - case USB_ST_SETUP: -tr_setup: - usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); - usbd_transfer_submit(xfer); - return; - - default: /* Error */ - if (error != USB_ERR_CANCELLED) { - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - goto tr_setup; - } - return; - } -} - #if (AXE_BULK_BUF_SIZE >= 0x10000) #error "Please update axe_bulk_read_callback()!" #endif @@ -1034,7 +1003,6 @@ axe_start(struct usb_ether *ue) /* * start the USB transfers, if not already started: */ - usbd_transfer_start(sc->sc_xfer[AXE_INTR_DT_RD]); usbd_transfer_start(sc->sc_xfer[AXE_BULK_DT_RD]); usbd_transfer_start(sc->sc_xfer[AXE_BULK_DT_WR]); } @@ -1139,7 +1107,6 @@ axe_stop(struct usb_ether *ue) */ usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_WR]); usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_RD]); - usbd_transfer_stop(sc->sc_xfer[AXE_INTR_DT_RD]); axe_reset(sc); } Modified: head/sys/dev/usb/net/if_axereg.h ============================================================================== --- head/sys/dev/usb/net/if_axereg.h Mon Oct 11 17:22:16 2010 (r213695) +++ head/sys/dev/usb/net/if_axereg.h Mon Oct 11 19:20:53 2010 (r213696) @@ -191,7 +191,6 @@ struct axe_sframe_hdr { enum { AXE_BULK_DT_WR, AXE_BULK_DT_RD, - AXE_INTR_DT_RD, AXE_N_TRANSFER, }; From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 20:17:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E39341065670; Mon, 11 Oct 2010 20:17:23 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D30E98FC1A; Mon, 11 Oct 2010 20:17:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BKHN2S026119; Mon, 11 Oct 2010 20:17:23 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BKHNKl026117; Mon, 11 Oct 2010 20:17:23 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201010112017.o9BKHNKl026117@svn.freebsd.org> From: Ed Schouten Date: Mon, 11 Oct 2010 20:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213697 - head/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 20:17:24 -0000 Author: ed Date: Mon Oct 11 20:17:23 2010 New Revision: 213697 URL: http://svn.freebsd.org/changeset/base/213697 Log: Remove stale reference to wtmp(5). Reported by: pluknet Modified: head/sbin/reboot/reboot.8 Modified: head/sbin/reboot/reboot.8 ============================================================================== --- head/sbin/reboot/reboot.8 Mon Oct 11 19:20:53 2010 (r213696) +++ head/sbin/reboot/reboot.8 Mon Oct 11 20:17:23 2010 (r213697) @@ -28,7 +28,7 @@ .\" @(#)reboot.8 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd October 11, 2010 .Dt REBOOT 8 .Os .Sh NAME @@ -129,7 +129,7 @@ utility is used when the system needs to users advance warning of their impending doom and cleanly terminating specific programs. .Sh SEE ALSO -.Xr wtmp 5 , +.Xr getutxent 3 , .Xr boot 8 , .Xr dumpon 8 , .Xr nextboot 8 , From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 20:30:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3139106564A; Mon, 11 Oct 2010 20:30:57 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 924088FC13; Mon, 11 Oct 2010 20:30:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BKUv6n026561; Mon, 11 Oct 2010 20:30:57 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BKUvgq026559; Mon, 11 Oct 2010 20:30:57 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201010112030.o9BKUvgq026559@svn.freebsd.org> From: Ed Schouten Date: Mon, 11 Oct 2010 20:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213698 - head/lib/libulog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 20:30:57 -0000 Author: ed Date: Mon Oct 11 20:30:57 2010 New Revision: 213698 URL: http://svn.freebsd.org/changeset/base/213698 Log: Fix reference to nonexistent manpage getuid(3). Submitted by: pluknet Modified: head/lib/libulog/ulog_login.3 Modified: head/lib/libulog/ulog_login.3 ============================================================================== --- head/lib/libulog/ulog_login.3 Mon Oct 11 20:17:23 2010 (r213697) +++ head/lib/libulog/ulog_login.3 Mon Oct 11 20:30:57 2010 (r213698) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 5, 2009 +.Dd October 11, 2010 .Dt ULOG_LOGIN 3 .Os .Sh NAME @@ -90,8 +90,8 @@ and .Fn ulog_logout_pseudo functions spawn a privileged process to perform the actual logging. .Sh SEE ALSO +.Xr getuid 2 , .Xr posix_openpt 2 , -.Xr getuid 3 , .Xr ptsname 3 , .Xr pututxline 3 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 20:34:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41EDD10656A3; Mon, 11 Oct 2010 20:34:36 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08DFD8FC2A; Mon, 11 Oct 2010 20:34:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BKYZVf026698; Mon, 11 Oct 2010 20:34:35 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BKYZIg026697; Mon, 11 Oct 2010 20:34:35 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010112034.o9BKYZIg026697@svn.freebsd.org> From: Martin Matuska Date: Mon, 11 Oct 2010 20:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213699 - vendor/xz/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 20:34:36 -0000 Author: mm Date: Mon Oct 11 20:34:35 2010 New Revision: 213699 URL: http://svn.freebsd.org/changeset/base/213699 Log: Remove two non-vendor files as recommended. Approved by: delphij (mentor) Deleted: vendor/xz/dist/FREEBSD-Xlist vendor/xz/dist/FREEBSD-upgrade From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 21:16:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6272710656C9; Mon, 11 Oct 2010 21:16:51 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2608FC23; Mon, 11 Oct 2010 21:16:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BLGp8t027657; Mon, 11 Oct 2010 21:16:51 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BLGpS4027649; Mon, 11 Oct 2010 21:16:51 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010112116.o9BLGpS4027649@svn.freebsd.org> From: Martin Matuska Date: Mon, 11 Oct 2010 21:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213700 - in head: . contrib/xz contrib/xz/po contrib/xz/src/common contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblzma/common... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 21:16:51 -0000 Author: mm Date: Mon Oct 11 21:16:50 2010 New Revision: 213700 URL: http://svn.freebsd.org/changeset/base/213700 Log: Upgrade xz to git snapshot as of 20101010 Approved by: delphij (mentor) MFC after: 1 month Added: head/contrib/xz/po/de.po - copied unchanged from r213699, vendor/xz/dist/po/de.po head/contrib/xz/po/it.po - copied unchanged from r213699, vendor/xz/dist/po/it.po head/contrib/xz/src/common/tuklib_mbstr.h - copied unchanged from r213699, vendor/xz/dist/src/common/tuklib_mbstr.h head/contrib/xz/src/common/tuklib_mbstr_fw.c - copied unchanged from r213699, vendor/xz/dist/src/common/tuklib_mbstr_fw.c head/contrib/xz/src/common/tuklib_mbstr_width.c - copied unchanged from r213699, vendor/xz/dist/src/common/tuklib_mbstr_width.c Deleted: head/contrib/xz/src/liblzma/api/lzma/subblock.h head/contrib/xz/src/liblzma/common/chunk_size.c head/contrib/xz/src/liblzma/subblock/ Modified: head/ObsoleteFiles.inc head/contrib/xz/ChangeLog (contents, props changed) head/contrib/xz/README (contents, props changed) head/contrib/xz/THANKS (contents, props changed) head/contrib/xz/po/LINGUAS (contents, props changed) head/contrib/xz/po/POTFILES.in (contents, props changed) head/contrib/xz/po/cs.po (contents, props changed) head/contrib/xz/src/common/sysdefs.h (contents, props changed) head/contrib/xz/src/common/tuklib_cpucores.c (contents, props changed) head/contrib/xz/src/common/tuklib_gettext.h (contents, props changed) head/contrib/xz/src/common/tuklib_physmem.c (contents, props changed) head/contrib/xz/src/liblzma/api/lzma.h (contents, props changed) head/contrib/xz/src/liblzma/api/lzma/index.h (contents, props changed) head/contrib/xz/src/liblzma/api/lzma/lzma.h (contents, props changed) head/contrib/xz/src/liblzma/api/lzma/vli.h (contents, props changed) head/contrib/xz/src/liblzma/common/block_buffer_encoder.c (contents, props changed) head/contrib/xz/src/liblzma/common/block_util.c (contents, props changed) head/contrib/xz/src/liblzma/common/common.c (contents, props changed) head/contrib/xz/src/liblzma/common/common.h (contents, props changed) head/contrib/xz/src/liblzma/common/filter_common.c (contents, props changed) head/contrib/xz/src/liblzma/common/filter_decoder.c (contents, props changed) head/contrib/xz/src/liblzma/common/filter_encoder.c (contents, props changed) head/contrib/xz/src/liblzma/common/stream_buffer_encoder.c (contents, props changed) head/contrib/xz/src/liblzma/delta/delta_encoder.c (contents, props changed) head/contrib/xz/src/liblzma/lz/lz_decoder.c (contents, props changed) head/contrib/xz/src/liblzma/lz/lz_decoder.h (contents, props changed) head/contrib/xz/src/liblzma/lz/lz_encoder.c (contents, props changed) head/contrib/xz/src/liblzma/lz/lz_encoder.h (contents, props changed) head/contrib/xz/src/liblzma/lz/lz_encoder_mf.c (contents, props changed) head/contrib/xz/src/liblzma/lzma/lzma2_encoder.c (contents, props changed) head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c (contents, props changed) head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c (contents, props changed) head/contrib/xz/src/liblzma/lzma/lzma_encoder_presets.c (contents, props changed) head/contrib/xz/src/lzmainfo/lzmainfo.1 (contents, props changed) head/contrib/xz/src/lzmainfo/lzmainfo.c (contents, props changed) head/contrib/xz/src/xz/args.c (contents, props changed) head/contrib/xz/src/xz/args.h (contents, props changed) head/contrib/xz/src/xz/coder.c (contents, props changed) head/contrib/xz/src/xz/coder.h (contents, props changed) head/contrib/xz/src/xz/file_io.c (contents, props changed) head/contrib/xz/src/xz/hardware.c (contents, props changed) head/contrib/xz/src/xz/hardware.h (contents, props changed) head/contrib/xz/src/xz/list.c (contents, props changed) head/contrib/xz/src/xz/main.c (contents, props changed) head/contrib/xz/src/xz/message.c (contents, props changed) head/contrib/xz/src/xz/message.h (contents, props changed) head/contrib/xz/src/xz/options.c (contents, props changed) head/contrib/xz/src/xz/options.h (contents, props changed) head/contrib/xz/src/xz/private.h (contents, props changed) head/contrib/xz/src/xz/signals.c (contents, props changed) head/contrib/xz/src/xz/signals.h (contents, props changed) head/contrib/xz/src/xz/util.c (contents, props changed) head/contrib/xz/src/xz/util.h (contents, props changed) head/contrib/xz/src/xz/xz.1 (contents, props changed) head/contrib/xz/src/xzdec/xzdec.1 (contents, props changed) head/contrib/xz/src/xzdec/xzdec.c (contents, props changed) head/lib/liblzma/Makefile head/lib/liblzma/config.h head/sys/sys/param.h head/usr.bin/xz/Makefile Directory Properties: head/contrib/xz/ (props changed) head/contrib/xz/AUTHORS (props changed) head/contrib/xz/COPYING (props changed) head/contrib/xz/TODO (props changed) head/contrib/xz/po/Makevars (props changed) head/contrib/xz/src/common/mythread.h (props changed) head/contrib/xz/src/common/tuklib_common.h (props changed) head/contrib/xz/src/common/tuklib_config.h (props changed) head/contrib/xz/src/common/tuklib_cpucores.h (props changed) head/contrib/xz/src/common/tuklib_exit.c (props changed) head/contrib/xz/src/common/tuklib_exit.h (props changed) head/contrib/xz/src/common/tuklib_integer.h (props changed) head/contrib/xz/src/common/tuklib_open_stdxxx.c (props changed) head/contrib/xz/src/common/tuklib_open_stdxxx.h (props changed) head/contrib/xz/src/common/tuklib_physmem.h (props changed) head/contrib/xz/src/common/tuklib_progname.c (props changed) head/contrib/xz/src/common/tuklib_progname.h (props changed) head/contrib/xz/src/liblzma/api/lzma/base.h (props changed) head/contrib/xz/src/liblzma/api/lzma/bcj.h (props changed) head/contrib/xz/src/liblzma/api/lzma/block.h (props changed) head/contrib/xz/src/liblzma/api/lzma/check.h (props changed) head/contrib/xz/src/liblzma/api/lzma/container.h (props changed) head/contrib/xz/src/liblzma/api/lzma/delta.h (props changed) head/contrib/xz/src/liblzma/api/lzma/filter.h (props changed) head/contrib/xz/src/liblzma/api/lzma/hardware.h (props changed) head/contrib/xz/src/liblzma/api/lzma/index_hash.h (props changed) head/contrib/xz/src/liblzma/api/lzma/stream_flags.h (props changed) head/contrib/xz/src/liblzma/api/lzma/version.h (props changed) head/contrib/xz/src/liblzma/check/check.c (props changed) head/contrib/xz/src/liblzma/check/check.h (props changed) head/contrib/xz/src/liblzma/check/crc32_fast.c (props changed) head/contrib/xz/src/liblzma/check/crc32_small.c (props changed) head/contrib/xz/src/liblzma/check/crc32_table.c (props changed) head/contrib/xz/src/liblzma/check/crc32_table_be.h (props changed) head/contrib/xz/src/liblzma/check/crc32_table_le.h (props changed) head/contrib/xz/src/liblzma/check/crc32_tablegen.c (props changed) head/contrib/xz/src/liblzma/check/crc32_x86.S (props changed) head/contrib/xz/src/liblzma/check/crc64_fast.c (props changed) head/contrib/xz/src/liblzma/check/crc64_small.c (props changed) head/contrib/xz/src/liblzma/check/crc64_table.c (props changed) head/contrib/xz/src/liblzma/check/crc64_table_be.h (props changed) head/contrib/xz/src/liblzma/check/crc64_table_le.h (props changed) head/contrib/xz/src/liblzma/check/crc64_tablegen.c (props changed) head/contrib/xz/src/liblzma/check/crc64_x86.S (props changed) head/contrib/xz/src/liblzma/check/crc_macros.h (props changed) head/contrib/xz/src/liblzma/check/sha256.c (props changed) head/contrib/xz/src/liblzma/common/alone_decoder.c (props changed) head/contrib/xz/src/liblzma/common/alone_decoder.h (props changed) head/contrib/xz/src/liblzma/common/alone_encoder.c (props changed) head/contrib/xz/src/liblzma/common/auto_decoder.c (props changed) head/contrib/xz/src/liblzma/common/block_buffer_decoder.c (props changed) head/contrib/xz/src/liblzma/common/block_decoder.c (props changed) head/contrib/xz/src/liblzma/common/block_decoder.h (props changed) head/contrib/xz/src/liblzma/common/block_encoder.c (props changed) head/contrib/xz/src/liblzma/common/block_encoder.h (props changed) head/contrib/xz/src/liblzma/common/block_header_decoder.c (props changed) head/contrib/xz/src/liblzma/common/block_header_encoder.c (props changed) head/contrib/xz/src/liblzma/common/easy_buffer_encoder.c (props changed) head/contrib/xz/src/liblzma/common/easy_decoder_memusage.c (props changed) head/contrib/xz/src/liblzma/common/easy_encoder.c (props changed) head/contrib/xz/src/liblzma/common/easy_encoder_memusage.c (props changed) head/contrib/xz/src/liblzma/common/easy_preset.c (props changed) head/contrib/xz/src/liblzma/common/easy_preset.h (props changed) head/contrib/xz/src/liblzma/common/filter_buffer_decoder.c (props changed) head/contrib/xz/src/liblzma/common/filter_buffer_encoder.c (props changed) head/contrib/xz/src/liblzma/common/filter_common.h (props changed) head/contrib/xz/src/liblzma/common/filter_decoder.h (props changed) head/contrib/xz/src/liblzma/common/filter_encoder.h (props changed) head/contrib/xz/src/liblzma/common/filter_flags_decoder.c (props changed) head/contrib/xz/src/liblzma/common/filter_flags_encoder.c (props changed) head/contrib/xz/src/liblzma/common/hardware_physmem.c (props changed) head/contrib/xz/src/liblzma/common/index.c (props changed) head/contrib/xz/src/liblzma/common/index.h (props changed) head/contrib/xz/src/liblzma/common/index_decoder.c (props changed) head/contrib/xz/src/liblzma/common/index_encoder.c (props changed) head/contrib/xz/src/liblzma/common/index_encoder.h (props changed) head/contrib/xz/src/liblzma/common/index_hash.c (props changed) head/contrib/xz/src/liblzma/common/stream_buffer_decoder.c (props changed) head/contrib/xz/src/liblzma/common/stream_decoder.c (props changed) head/contrib/xz/src/liblzma/common/stream_decoder.h (props changed) head/contrib/xz/src/liblzma/common/stream_encoder.c (props changed) head/contrib/xz/src/liblzma/common/stream_encoder.h (props changed) head/contrib/xz/src/liblzma/common/stream_flags_common.c (props changed) head/contrib/xz/src/liblzma/common/stream_flags_common.h (props changed) head/contrib/xz/src/liblzma/common/stream_flags_decoder.c (props changed) head/contrib/xz/src/liblzma/common/stream_flags_encoder.c (props changed) head/contrib/xz/src/liblzma/common/vli_decoder.c (props changed) head/contrib/xz/src/liblzma/common/vli_encoder.c (props changed) head/contrib/xz/src/liblzma/common/vli_size.c (props changed) head/contrib/xz/src/liblzma/delta/delta_common.c (props changed) head/contrib/xz/src/liblzma/delta/delta_common.h (props changed) head/contrib/xz/src/liblzma/delta/delta_decoder.c (props changed) head/contrib/xz/src/liblzma/delta/delta_decoder.h (props changed) head/contrib/xz/src/liblzma/delta/delta_encoder.h (props changed) head/contrib/xz/src/liblzma/delta/delta_private.h (props changed) head/contrib/xz/src/liblzma/lz/lz_encoder_hash.h (props changed) head/contrib/xz/src/liblzma/lz/lz_encoder_hash_table.h (props changed) head/contrib/xz/src/liblzma/lzma/fastpos.h (props changed) head/contrib/xz/src/liblzma/lzma/fastpos_table.c (props changed) head/contrib/xz/src/liblzma/lzma/fastpos_tablegen.c (props changed) head/contrib/xz/src/liblzma/lzma/lzma2_decoder.c (props changed) head/contrib/xz/src/liblzma/lzma/lzma2_decoder.h (props changed) head/contrib/xz/src/liblzma/lzma/lzma2_encoder.h (props changed) head/contrib/xz/src/liblzma/lzma/lzma_common.h (props changed) head/contrib/xz/src/liblzma/lzma/lzma_decoder.c (props changed) head/contrib/xz/src/liblzma/lzma/lzma_decoder.h (props changed) head/contrib/xz/src/liblzma/lzma/lzma_encoder.c (props changed) head/contrib/xz/src/liblzma/lzma/lzma_encoder.h (props changed) head/contrib/xz/src/liblzma/lzma/lzma_encoder_private.h (props changed) head/contrib/xz/src/liblzma/rangecoder/price.h (props changed) head/contrib/xz/src/liblzma/rangecoder/price_table.c (props changed) head/contrib/xz/src/liblzma/rangecoder/price_tablegen.c (props changed) head/contrib/xz/src/liblzma/rangecoder/range_common.h (props changed) head/contrib/xz/src/liblzma/rangecoder/range_decoder.h (props changed) head/contrib/xz/src/liblzma/rangecoder/range_encoder.h (props changed) head/contrib/xz/src/liblzma/simple/arm.c (props changed) head/contrib/xz/src/liblzma/simple/armthumb.c (props changed) head/contrib/xz/src/liblzma/simple/ia64.c (props changed) head/contrib/xz/src/liblzma/simple/powerpc.c (props changed) head/contrib/xz/src/liblzma/simple/simple_coder.c (props changed) head/contrib/xz/src/liblzma/simple/simple_coder.h (props changed) head/contrib/xz/src/liblzma/simple/simple_decoder.c (props changed) head/contrib/xz/src/liblzma/simple/simple_decoder.h (props changed) head/contrib/xz/src/liblzma/simple/simple_encoder.c (props changed) head/contrib/xz/src/liblzma/simple/simple_encoder.h (props changed) head/contrib/xz/src/liblzma/simple/simple_private.h (props changed) head/contrib/xz/src/liblzma/simple/sparc.c (props changed) head/contrib/xz/src/liblzma/simple/x86.c (props changed) head/contrib/xz/src/xz/file_io.h (props changed) head/contrib/xz/src/xz/list.h (props changed) head/contrib/xz/src/xz/main.h (props changed) head/contrib/xz/src/xz/suffix.c (props changed) head/contrib/xz/src/xz/suffix.h (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Oct 11 20:34:35 2010 (r213699) +++ head/ObsoleteFiles.inc Mon Oct 11 21:16:50 2010 (r213700) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20101011: removed subblock.h from liblzma +OLD_FILES+=usr/include/lzma/subblock.h # 20101002: removed manpath.config OLD_FILES+=etc/manpath.config OLD_FILES+=usr/share/examples/etc/manpath.config Modified: head/contrib/xz/ChangeLog ============================================================================== --- head/contrib/xz/ChangeLog Mon Oct 11 20:34:35 2010 (r213699) +++ head/contrib/xz/ChangeLog Mon Oct 11 21:16:50 2010 (r213700) @@ -1,3 +1,817 @@ +commit d52b411716a614c202e89ba732492efb9916cd3f +Author: Lasse Collin +Date: Sun Oct 10 17:58:58 2010 +0300 + + xz: Use "%"PRIu32 instead of "%d" in a format string. + +commit ae74d1bdeb075c3beefe76e1136c5741804e7e91 +Author: Lasse Collin +Date: Sun Oct 10 17:43:26 2010 +0300 + + test_files.sh: Fix the first line. + + For some reason this prevented running the test only + on OS/2 and even on that it broke only recently. + + Thanks to Elbert Pol. + +commit d492b80ddd6f9a13419de6d102df7374d8f448e8 +Author: Lasse Collin +Date: Sun Oct 10 16:49:01 2010 +0300 + + lzmainfo: Use "%"PRIu32 instead of "%u" for uint32_t. + +commit 825e859a9054bd91202e5723c41a17e72f63040a +Author: Lasse Collin +Date: Sun Oct 10 16:47:01 2010 +0300 + + lzmainfo: Use fileno(stdin) instead of STDIN_FILENO. + +commit acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8 +Author: Lasse Collin +Date: Sat Oct 9 23:20:51 2010 +0300 + + lzmainfo: Use setmode() on DOS-like systems. + +commit ef364d3abc5647111c5424ea0d83a567e184a23b +Author: Lasse Collin +Date: Sat Oct 9 21:51:03 2010 +0300 + + OS/2 and DOS: Be less verbose on signals. + + Calling raise() to kill xz when user has pressed C-c + is a bit verbose on OS/2 and DOS/DJGPP. Instead of + calling raise(), set only the exit status to 1. + +commit 5629c4be07b6c67e79842b2569da1cedc9c0d69a +Author: Lasse Collin +Date: Sat Oct 9 19:28:49 2010 +0300 + + DOS: Update the Makefile, config.h and README. + + This is now simpler and builds only xz.exe. + +commit f25a77e6b9bc48a243ddfbbd755b7960eec7e0ac +Author: Lasse Collin +Date: Sat Oct 9 18:57:55 2010 +0300 + + Windows: Put some license info into README-Windows.txt. + +commit e75100f549f85d231df25c07aa94d63e78e2d668 +Author: Lasse Collin +Date: Sat Oct 9 18:57:04 2010 +0300 + + Windows: Fix a diagnostics bug in build.bash. + +commit efeb998a2b1025df1c1d202cc7d21d866cd1c336 +Author: Lasse Collin +Date: Sat Oct 9 13:02:15 2010 +0300 + + lzmainfo: Add Windows resource file. + +commit 389d418445f1623593dfdbba55d52fbb6d1205f5 +Author: Lasse Collin +Date: Sat Oct 9 12:57:25 2010 +0300 + + Add missing public domain notice to lzmadec_w32res.rc. + +commit 6389c773a4912dd9f111256d74ba1605230a7957 +Author: Lasse Collin +Date: Sat Oct 9 12:52:12 2010 +0300 + + Windows: Update common_w32res.rc. + +commit 71275457ca24c9b01721f5cfc3638cf094daf454 +Author: Lasse Collin +Date: Sat Oct 9 12:27:08 2010 +0300 + + Windows: Make build.bash prefer MinGW-w32 over MinGW. + + This is simply for licensing reasons. The 64-bit version + will be built with MinGW-w64 anyway (at least for now), + so using it also for 32-bit build allows using the same + copyright notice about the MinGW-w64/w32 runtime. + + Note that using MinGW would require a copyright notice too, + because its runtime is not in the public domain either even + though MinGW's home page claims that it is public domain. + See . + +commit 3ac35719d8433af937af6491383d4a50e343099b +Author: Lasse Collin +Date: Sat Oct 9 11:33:21 2010 +0300 + + Windows: Copy COPYING-Windows.txt (if it exists) to the package. + + Also, put README-Windows.txt to the doc directory like + the other documentation files. + +commit 7b5db576fd7a4a67813b8437a9ccd4dbc94bbaae +Author: Lasse Collin +Date: Fri Oct 8 21:42:37 2010 +0300 + + Windows: Fix build.bash again. + + 630a8beda34af0ac153c8051b1bf01230558e422 wasn't good. + +commit d3cd7abe85ec7c2f46cf198b15c00d5d119df3dd +Author: Lasse Collin +Date: Fri Oct 8 16:53:20 2010 +0300 + + Use LZMA_VERSION_STRING instead of PACKAGE_VERSION. + + Those are the same thing, and the former makes it a bit + easier to build the code with other build systems, because + one doesn't need to update the version number into custom + config.h. + + This change affects only lzmainfo. Other tools were already + using LZMA_VERSION_STRING. + +commit 084c60d318f2dbaef4078d9b100b4a373d0c3a7f +Author: Lasse Collin +Date: Fri Oct 8 15:59:25 2010 +0300 + + configure.ac: Remove two unused defines. + +commit 11f51b6714357cb67ec7e56ed9575c199b5581fe +Author: Lasse Collin +Date: Fri Oct 8 15:32:29 2010 +0300 + + Make tests accommodate missing xz or xzdec. + +commit b1c7368f95e93ccdefdd0748e04398c26766f47f +Author: Lasse Collin +Date: Fri Oct 8 15:25:45 2010 +0300 + + Build: Add options to disable individual command line tools. + +commit 630a8beda34af0ac153c8051b1bf01230558e422 +Author: Lasse Collin +Date: Thu Oct 7 00:44:53 2010 +0300 + + Windows: Make build.bash work without --enable-dynamic=no. + +commit f9907503f882a745dce9d84c2968f6c175ba966a +Author: Lasse Collin +Date: Tue Oct 5 14:13:16 2010 +0300 + + Build: Remove the static/dynamic tricks. + + Most distros want xz linked against shared liblzma, so + it doesn't help much to require --enable-dynamic for that. + Those who want to avoid PIC on x86-32 to get better + performance, can still do it e.g. by using --disable-shared + to compile xz and then another pass to compile shared liblzma. + + Part of these static/dynamic tricks were needed for Windows + in the past. Nowadays we rely on GCC and binutils to do the + right thing with auto-import. If the Autotooled build system + needs to support some other toolchain on Windows in the future, + this may need some rethinking. + +commit fda4724d8114fccfa31c1839c15479f350c2fb4c +Author: Lasse Collin +Date: Tue Oct 5 12:18:58 2010 +0300 + + configure.ac: Silence a warning from Autoconf 2.68. + +commit 80b5675fa62c87426fe86f8fcd20feeabc4361b9 +Author: Lasse Collin +Date: Mon Oct 4 19:43:01 2010 +0300 + + A few more languages files to the xz man page. + + Thanks to Jonathan Nieder. + +commit f9722dbeca4dc4c43cfd15d122dafaac50b0a0bb +Author: Lasse Collin +Date: Sat Oct 2 12:07:33 2010 +0300 + + Update the FAQ. + +commit 61ae593661e8dc402394e84d567ca2044a51572b +Author: Lasse Collin +Date: Sat Oct 2 11:38:20 2010 +0300 + + liblzma: Small fixes to comments in the API headers. + +commit 9166682dc601fd42c1b9510572e3f917d18de504 +Author: Lasse Collin +Date: Tue Sep 28 11:40:12 2010 +0300 + + Create the PDF versions of the man pages better. + +commit 17d3c61edd35de8fa884944fc70d1db86daa5dd8 +Author: Lasse Collin +Date: Tue Sep 28 10:59:53 2010 +0300 + + Move version.sh to build-aux. + +commit 84af9d8770451339a692e9b70f96cf56156a6069 +Author: Lasse Collin +Date: Tue Sep 28 10:53:02 2010 +0300 + + Update .gitignore. + +commit 31575a449ac64c523da3bab8d0c0b522cdc7c780 +Author: Lasse Collin +Date: Tue Sep 28 01:17:14 2010 +0300 + + Fix accomodate -> accommodate on the xz man page. + +commit cec0ddc8ec4ce81685a51998b978e22167e461f9 +Author: Lasse Collin +Date: Mon Sep 27 23:29:34 2010 +0300 + + Major man page updates. + + Lots of content was updated on the xz man page. + + Technical improvements: + - Start a new sentence on a new line. + - Use fairly short lines. + - Use constant-width font for examples (where supported). + - Some minor cleanups. + + Thanks to Jonathan Nieder for some language fixes. + +commit 075257ab0416a0603be930082e31a5703e4ba345 +Author: Lasse Collin +Date: Sun Sep 26 18:10:31 2010 +0300 + + Fix the preset -3e. + + depth=0 was missing. + +commit 2577da9ebdba13fbe99ae5ee8bde35f7ed60f6d1 +Author: Lasse Collin +Date: Thu Sep 23 14:03:10 2010 +0300 + + Add translations.bash and translation notes to README. + + translations.bash prints some messages from xz, which + hopefully makes it a bit easier to test translations. + +commit a3c5997c57e5b1a20aae6d1071b584b4f17d0b23 +Author: Lasse Collin +Date: Fri Sep 17 22:14:30 2010 +0300 + + xz: Update the Czech translation. + + Thanks to Marek Černocký. + +commit a1766af582dc23fddd9da1eeb4b9d61e3eb4c2e6 +Author: Lasse Collin +Date: Thu Sep 16 23:40:41 2010 +0300 + + xz: Add Italian translation. + + Thanks to Milo Casagrande and Lorenzo De Liso. + +commit 21088018554e2b0e02914205377ceb6e34a090bd +Author: Lasse Collin +Date: Wed Sep 15 00:34:13 2010 +0300 + + xz: Edit a translators comment. + +commit be16e28ece1b492b8f93382b7fa1cc4da23c6ff6 +Author: Lasse Collin +Date: Tue Sep 14 22:47:14 2010 +0300 + + xz: Add German translation. + + Thanks to Andre Noll. + +commit e23ea74f3240e6b69683f9e69d1716e0f9e9092b +Author: Lasse Collin +Date: Fri Sep 10 14:30:25 2010 +0300 + + Updated README. + +commit 8dad2fd69336985adb9f774fa96dc9c0efcb5a71 +Author: Lasse Collin +Date: Fri Sep 10 14:30:07 2010 +0300 + + Updated INSTALL. + +commit 0b5f07fe3728c27cce416ddc40f7e4803ae96ac2 +Author: Lasse Collin +Date: Fri Sep 10 14:26:20 2010 +0300 + + Updated the git repository address in ChangeLog. + +commit a8760203f93a69bc39fd14520a6e9e7b7d70be06 +Author: Lasse Collin +Date: Fri Sep 10 14:09:33 2010 +0300 + + xz: Add a comment to translators about "literal context bits". + +commit bb0b1004f83cdc4d309e1471c2ecaf9f95ce60c5 +Author: Lasse Collin +Date: Fri Sep 10 10:30:33 2010 +0300 + + xz: Multiple fixes. + + The code assumed that printing numbers with thousand separators + and decimal points would always produce only US-ASCII characters. + This was used for buffer sizes (with snprintf(), no overflows) + and aligning columns of the progress indicator and --list. That + assumption was wrong (e.g. LC_ALL=fi_FI.UTF-8 with glibc), so + multibyte character support was added in this commit. The old + way is used if the operating system doesn't have enough multibyte + support (e.g. lacks wcwidth()). + + The sizes of buffers were increased to accomodate multibyte + characters. I don't know how big they should be exactly, but + they aren't used for anything critical, so it's not too bad. + If they still aren't big enough, I hopefully get a bug report. + snprintf() takes care of avoiding buffer overflows. + + Some static buffers were replaced with buffers allocated on + stack. double_to_str() was removed. uint64_to_str() and + uint64_to_nicestr() now share the static buffer and test + for thousand separator support. + + Integrity check names "None" and "Unknown-N" (2 <= N <= 15) + were marked to be translated. I had forgot these, plus they + wouldn't have worked correctly anyway before this commit, + because printing tables with multibyte strings didn't work. + + Thanks to Marek Černocký for reporting the bug about + misaligned table columns in --list output. + +commit 639f8e2af33cf8a184d59ba56b6df7c098679d61 +Author: Lasse Collin +Date: Wed Sep 8 08:49:22 2010 +0300 + + Update the Czech translation. + + Thanks to Marek Černocký. + +commit 41bc9956ebfd7c86777d33676acf34c45e7ca7c7 +Author: Lasse Collin +Date: Tue Sep 7 12:31:40 2010 +0300 + + xz: Add a note to translators. + +commit 77a7746616e555fc08028e883a56d06bf0088b81 +Author: Lasse Collin +Date: Tue Sep 7 10:42:13 2010 +0300 + + Fix use of N_() and ngettext(). + + I had somehow thought that N_() is usually used + as shorthand for ngettext(). + + This also fixes a missing \n from a call to ngettext(). + +commit e6ad39335842343e622ab51207d1d3cb9caad801 +Author: Lasse Collin +Date: Mon Sep 6 19:43:12 2010 +0300 + + Add missing files to POTFILES.in. + +commit 58f55131820d2e08a1a6beb9ec0ee2378044eb30 +Author: Lasse Collin +Date: Mon Sep 6 10:16:24 2010 +0300 + + xz: Improve a comment. + +commit bcb1b898341f7073f51660d7052d7ed6c5461a66 +Author: Lasse Collin +Date: Sun Sep 5 21:34:29 2010 +0300 + + xz: Update the comment about NetBSD in file_io.c. + + Thanks to Joerg Sonnenberger. + +commit da014d55972f5addbf6b4360d3d8ed2ef4282170 +Author: Lasse Collin +Date: Sun Sep 5 21:11:33 2010 +0300 + + xz: Use an array instead of pointer for stdin_filename. + + Thanks Joerg Sonnenberger. + +commit 8c7d3d1a0781c296c6b6e2465becaffd2132f7ee +Author: Lasse Collin +Date: Sun Sep 5 12:16:17 2010 +0300 + + xz: Hopefully ease translating the messages in list.c. + +commit ef840950ad99cf2955c754875af0e01acf125079 +Author: Lasse Collin +Date: Sat Sep 4 23:14:44 2010 +0300 + + xz: Fix grammar. + +commit c46afd6edc04ea140db6c59e8486f5707c810c13 +Author: Lasse Collin +Date: Sat Sep 4 23:12:20 2010 +0300 + + xz: Use lzma_lzma_preset() to initialize the options structure. + +commit 8fd3ac046d0b1416a2094fecc456d9e0f4d5d065 +Author: Lasse Collin +Date: Sat Sep 4 22:16:28 2010 +0300 + + Don't set lc=4 with --extreme. + + This should reduce the cases where --extreme makes + compression worse. On the other hand, some other + files may now benefit slightly less from --extreme. + +commit 474bac0c33e94aeaca8ada17ab19972b1424bc2b +Author: Lasse Collin +Date: Sat Sep 4 22:10:32 2010 +0300 + + xz: Minor improvements to --help and --long-help. + +commit 373ee26f955617295c5c537b04a153a1969140d2 +Author: Jonathan Nieder +Date: Fri Sep 3 16:49:15 2010 -0500 + + Adjust memory limits in test_compress.sh + + Testing compression at level -4 now requires 48 MiB of free store at + compression time and 5 MiB at decompression time. + + Signed-off-by: Jonathan Nieder + +commit 2fce9312f36727ea82f3430cc5d3a7d243c5f087 +Author: Lasse Collin +Date: Fri Sep 3 15:54:40 2010 +0300 + + xz: Make -vv show also decompressor memory usage. + +commit b4b1cbcb53624ab832f8b3189c74450dc7ea29b6 +Author: Lasse Collin +Date: Fri Sep 3 15:13:12 2010 +0300 + + Tweak the compression presets -0 .. -5. + + "Extreme" mode might need some further tweaking still. + Docs were not updated yet. + +commit 77fe5954cd3d10fb1837372684cbc133b56b6a87 +Author: Lasse Collin +Date: Fri Sep 3 12:28:41 2010 +0300 + + liblzma: Adjust default depth calculation for HC3 and HC4. + + It was 8 + nice_len / 4, now it is 4 + nice_len / 4. + This allows faster settings at lower nice_len values, + even though it seems that I won't use automatic depth + calcuation with HC3 and HC4 in the presets. + +commit fce69059cf901ce8075a78c7607d591f144a3b5a +Author: Lasse Collin +Date: Fri Sep 3 11:11:25 2010 +0300 + + xz: Make --help two lines shorter. + + At least for now, the --help option doesn't list any + options that take arguments, so "Mandatory arguments to..." + can be omitted. + +commit a848e47ced6e5e2a564b5c454b2f5a19c2f40298 +Author: Lasse Collin +Date: Thu Sep 2 19:22:35 2010 +0300 + + xz: Make setting a preset override a custom filter chain. + + This is more logical behavior than ignoring preset level + options once a custom filter chain has been specified. + +commit b3ff7ba044eaeab3e424d7b51fe914daf681b1a3 +Author: Lasse Collin +Date: Thu Sep 2 19:09:57 2010 +0300 + + xz: Always warn if adjusting dictionary size due to memlimit. + +commit d5653ba8a1ea9c00de4fddc617aba3c51e18139d +Author: Lasse Collin +Date: Tue Aug 10 11:04:30 2010 +0300 + + Fix test_compress.sh. + + It broke when --memory option was removed from xzdec. + + Thanks to Jonathan Nieder. + +commit 792331bdee706aa852a78b171040ebf814c6f3ae +Author: Lasse Collin +Date: Sat Aug 7 20:45:18 2010 +0300 + + Disable the memory usage limiter by default. + + For several people, the limiter causes bigger problems that + it solves, so it is better to have it disabled by default. + Those who want to have a limiter by default need to enable + it via the environment variable XZ_DEFAULTS. + + Support for environment variable XZ_DEFAULTS was added. It is + parsed before XZ_OPT and technically identical with it. The + intended uses differ quite a bit though; see the man page. + + The memory usage limit can now be set separately for + compression and decompression using --memlimit-compress and + --memlimit-decompress. To set both at once, -M or --memlimit + can be used. --memory was retained as a legacy alias for + --memlimit for backwards compatibility. + + The semantics of --info-memory were changed in backwards + incompatible way. Compatibility wasn't meaningful due to + changes in the memory usage limiter functionality. + + The memory usage limiter info is no longer shown at the + bottom of xz --long -help. + + The memory usage limiter support for removed completely from xzdec. + + xz's man page was updated to match the above changes. Various + unrelated fixes were also made to the man page. + +commit 4a45dd4c39f75d25c7a37b6400cb24d4010ca801 +Author: Lasse Collin +Date: Fri Aug 6 20:22:16 2010 +0300 + + Add missing const to a global constant in xz. + +commit 01aa4869cb220b7fdad6d1acbabb2233045daa8f +Author: Lasse Collin +Date: Wed Jul 28 11:44:55 2010 +0300 + + Language fixes for man pages. + + Thanks to A. Costa and Jonathan Nieder. + +commit ce1f0deafe8504e1492bf1b1efb3e3ec950b1a2b +Author: Lasse Collin +Date: Tue Jul 27 20:47:12 2010 +0300 + + Windows: Add a note about building a Git repository snapshot + +commit 507a4a4dea1e5462f12f7ed4b076c34e02054a38 +Author: Lasse Collin +Date: Tue Jul 27 20:45:03 2010 +0300 + + Windows: build.sh is a bash script so name it correctly. + +commit b1cbfd40f049a646a639eb78a3e41e9e3ef73339 +Author: Lasse Collin +Date: Tue Jul 27 20:27:32 2010 +0300 + + Windows: Don't strip liblzma.a too much. + +commit a540198ffb25fad36380c5e92ac20c2d28eec46a +Author: Lasse Collin +Date: Tue Jul 13 20:07:26 2010 +0300 + + Updated THANKS. + +commit bab0f01ed931f606b4675aa9f9331a17cec09bad +Author: Lasse Collin +Date: Tue Jul 13 19:55:50 2010 +0300 + + Add two simple example programs. + + Hopefully these help a bit when learning the basics + of liblzma API. I plan to write detailed examples about + both basic and advanced features with lots of comments, + but these two examples are good have right now. + + The examples were written by Daniel Mealha Cabrita. Thanks. + +commit c15c42abb3c8c6e77c778ef06c97a4a10b8b5d00 +Author: Lasse Collin +Date: Tue Jun 15 14:06:29 2010 +0300 + + Add --no-adjust. + +commit 2130926dd1c839280358172dfadd8d3054bde2b4 +Author: Lasse Collin +Date: Fri Jun 11 21:51:32 2010 +0300 + + Updated THANKS. + +commit bc612d0e0c9e4504c59d49168e87a7ae3e458443 +Author: Lasse Collin +Date: Fri Jun 11 21:48:32 2010 +0300 + + Clarify the description of the default memlimit in the man page. + + Thanks to Denis Excoffier. + +commit e1b6935d60a00405e6b5b455a3426d2248cc926c +Author: Lasse Collin +Date: Fri Jun 11 21:43:28 2010 +0300 + + Fix string to uint64_t conversion. + + Thanks to Denis Excoffier for the bug report. + +commit 3e49c8acb0f5312948eddb2342dbb5802d4571d0 +Author: Lasse Collin +Date: Fri Jun 11 10:40:28 2010 +0300 + + Put the git commit to the filename in mydist rule. + +commit d8b41eedce486d400f701b757b7b5e4e32276618 +Author: Lasse Collin +Date: Wed Jun 2 23:13:55 2010 +0300 + + Fix compiling with -Werror. + +commit b5fbab6123a39c9a55cd5d7af410e9aae067d5f8 +Author: Lasse Collin +Date: Wed Jun 2 23:09:22 2010 +0300 + + Silence a bogus Valgrind warning. + + When using -O2 with GCC, it liked to swap two comparisons + in one "if" statement. It's otherwise fine except that + the latter part, which is seemingly never executed, got + executed (nothing wrong with that) and then triggered + warning in Valgrind about conditional jump depending on + uninitialized variable. A few people find this annoying + so do things a bit differently to avoid the warning. + +commit 29a7b250e685852f2f97615493ec49acaf528623 +Author: Lasse Collin +Date: Wed Jun 2 21:32:12 2010 +0300 + + Fix a Windows-specific FIXME in signal handling code. + +commit e89d987056cee7d4e279be3ef3a6cc690bfc0e6d +Author: Lasse Collin +Date: Wed Jun 2 17:46:58 2010 +0300 + + Adjust SA_RESTART workaround. + + I want to get a bug report if something else than + DJGPP lacks SA_RESTART. + +commit e243145c84ab5c3be8259fd486ead0de5235b3f0 +Author: Lasse Collin +Date: Tue Jun 1 16:02:30 2010 +0300 + + xz man page updates. + + - Concatenating .xz files and padding + - List mode + - Robot mode + - A few examples (but many more are needed) + +commit ce6dc3c0a891f23a862f80ec08d3b6f0beb2a562 +Author: Lasse Collin +Date: Tue Jun 1 15:51:44 2010 +0300 + + Major update to xz --list. + +commit 905e54804a899e4ad526d38fdba7e803ab9b71bd +Author: Lasse Collin +Date: Tue Jun 1 14:13:03 2010 +0300 + + Rename message_filters_get() to message_filters_to_str(). + +commit 4b346ae8af20045027ae5efb068c6d69da3324d2 +Author: Lasse Collin +Date: Tue Jun 1 14:09:12 2010 +0300 + + Fix a comment. + +commit 07dc34f6da45c9ab757dad7fd5eef522ad27d296 +Author: Lasse Collin +Date: Thu May 27 16:17:42 2010 +0300 + + Fix lzma_block_compressed_size(). + +commit 44d70cb154225e47eebf15a3cfbdf3794cbb4593 +Author: Lasse Collin +Date: Thu May 27 14:32:51 2010 +0300 + + Take Cygwin into account in some #if lines. + + This change is no-op, but good to have just in case + for the future. + +commit a334348dc02803241cf4e0a539eecdc0e7ad2cc7 +Author: Lasse Collin +Date: Thu May 27 13:42:44 2010 +0300 + + Remove references to the Subblock filter in xz and tests. + + Thanks to Jonathan Nieder. + +commit 70e5e2f6a7084e6af909deee88ceac2f6efa7893 +Author: Lasse Collin +Date: Thu May 27 13:35:36 2010 +0300 + + Remove unused chunk_size.c. + + Thanks to Jonathan Nieder for the reminder. + +commit 01a414eaf4be6352c06b48001b041b47e8202faa +Author: Jonathan Nieder +Date: Thu May 27 02:31:33 2010 -0500 + + Use my_min() instead of MIN() in src/xz/list.c + + This should have been done in + 920a69a8d8e4203c5edddd829d932130eac188ea. + +commit 920a69a8d8e4203c5edddd829d932130eac188ea +Author: Lasse Collin +Date: Wed May 26 10:36:46 2010 +0300 + + Rename MIN() and MAX() to my_min() and my_max(). + + This should avoid some minor portability issues. + +commit 019ae27c24d0c694545a6a46f8b9fb552198b015 +Author: Lasse Collin +Date: Wed May 26 10:30:20 2010 +0300 + + Fix compilation of debug/known_sizes.c. + +commit 98a4856a6ea84f79c790057a6eb89a25bc45b074 +Author: Lasse Collin +Date: Wed May 26 10:28:54 2010 +0300 + + Remove references to Subblock filter in debug/sync_flush.c. + +commit 703d2c33c095c41ae0693ee8c27c45e3847e4535 +Author: Lasse Collin +Date: Wed May 26 10:16:57 2010 +0300 + + Better #error message. + +commit d8a55c48b39703dd83f11089ad01e1ff2ac102e0 +Author: Lasse Collin +Date: Wed May 26 09:55:47 2010 +0300 + + Remove the Subblock filter code for now. + + The spec isn't finished and the code didn't compile anymore. + It won't be included in XZ Utils 5.0.0. It's easy to get it + back once the spec is done. + +commit b6377fc990f9b8651149cae0fecb8b9c5904e26d +Author: Lasse Collin +Date: Sun May 16 18:42:22 2010 +0300 + + Split message_filters(). + + message_filters_to_str() converts the filter chain to + a string. message_filters_show() replaces the original + message_filters(). + + uint32_to_optstr() was also added to show the dictionary + size in nicer format when possible. + +commit d9986db782d6cf0f314342127280519339378fa0 +Author: Lasse Collin +Date: Fri May 14 23:17:20 2010 +0300 + + Omit lzma_restrict from the API headers. + + It isn't really useful so omitting it makes things + shorter and slightly more readable. + +commit 0d3489efca0a723dca0394809fa3e6170843af4b +Author: Lasse Collin +Date: Mon May 10 19:57:24 2010 +0300 + + Updated INSTALL. + +commit 3fb3d594a2b53886adee161b6261e92277f05f7c +Author: Lasse Collin +Date: Mon May 10 19:54:52 2010 +0300 + + Updated THANKS. + +commit 6548e304657e77d3a972053db3c41c5daf591113 +Author: Lasse Collin +Date: Mon May 10 19:54:15 2010 +0300 + + Updates to tuklib_physmem and tuklib_cpucores. + + Don't use #error to generate compile error, because some + compilers actually don't take it as an error. This fixes + tuklib_physmem on IRIX. + + Fix incorrect error check for sysconf() return values. + + Add AIX, HP-UX, and Tru64 specific code to detect the + amount RAM. + + Add HP-UX specific code to detect the number of CPU cores. + + Thanks a lot to Peter O'Gorman for initial patches, + testing, and debugging these fixes. + commit a290cfee3e23f046889c022aa96b4eca2016fdda Author: Lasse Collin Date: Mon Apr 12 21:55:56 2010 +0300 Modified: head/contrib/xz/README ============================================================================== --- head/contrib/xz/README Mon Oct 11 20:34:35 2010 (r213699) +++ head/contrib/xz/README Mon Oct 11 21:16:50 2010 (r213700) @@ -9,8 +9,9 @@ XZ Utils 1.3. Documentation for liblzma 2. Version numbering 3. Reporting bugs - 4. Other implementations of the .xz format - 5. Contact information + 4. Translating the xz tool + 5. Other implementations of the .xz format + 6. Contact information 0. Overview @@ -187,7 +188,94 @@ XZ Utils system. -4. Other implementations of the .xz format +4. Translating the xz tool +-------------------------- + + The messages from the xz tool have been translated into a few + languages. Before starting to translate into a new language, ask + the author that someone else hasn't already started working on it. + + Test your translation. Testing includes comparing the translated + output to the original English version by running the same commands + in both your target locale and with LC_ALL=C. Ask someone to + proof-read and test the translation. + + Testing can be done e.g. by installing xz into a temporary directory: + + ./configure --disable-shared --prefix=/tmp/xz-test + # + make -C po update-po + make install + bash debug/translations.bash | less + bash debug/translations.bash | less -S # For --list outputs + + Repeat the above as needed (no need to re-run configure though). + + Note especially the following: + + - The output of --help and --long-help must look nice on + a 80-column terminal. It's OK to add extra lines if needed. + + - In contrast, don't add extra lines to error messages and such. + They are often preceded with e.g. a filename on the same line, + so you have no way to predict where to put a \n. Let the terminal + do the wrapping even if it looks ugly. Adding new lines will be + even uglier in the generic case even if it looks nice in a few + limited examples. + + - Be careful with column alignment in tables and table-like output + (--list, --list --verbose --verbose, --info-memory, --help, and + --long-help): + + * All descriptions of options in --help should start in the + same column (but it doesn't need to be the same column as + in the English messages; just be consistent if you change it). + Check that both --help and --long-help look OK, since they + share several strings. + + * --list --verbose and --info-memory print lines that have + the format "Description: %s". If you need a longer + description, you can put extra space between the colon + and %s. Then you may need to add extra space to other + strings too so that the result as a whole looks good (all + values start at the same column). + + * The columns of the actual tables in --list --verbose --verbose + should be aligned properly. Abbreviate if necessary. It might + be good to keep at least 2 or 3 spaces between column headings + and avoid spaces in the headings so that the columns stand out + better, but this is a matter of opinion. Do what you think + looks best. + + - Be careful to put a period at the end of a sentence when the + original version has it, and don't put it when the original + doesn't have it. Similarly, be careful with \n characters + at the beginning and end of the strings. + + - Read the TRANSLATORS comments that have been extracted from the + source code and included in xz.pot. If they suggest testing the + translation with some type of command, do it. If testing needs + input files, use e.g. tests/files/good-*.xz. + + - When updating the translation, read the fuzzy (modified) strings + carefully, and don't mark them as updated before you actually + have updated them. Reading through the unchanged messages can be + good too; sometimes you may find a better wording for them. + + - If you find language problems in the original English strings, + feel free to suggest improvements. Ask if something is unclear. + + - The translated messages should be understandable (sometimes this + may be a problem with the original English messages too). Don't + make a direct word-by-word translation from English especially if + the result doesn't sound good in your language. + + In short, take your time and pay attention to the details. Making + a good translation is not a quick and trivial thing to do. The + translated xz should look as polished as the English version. + + +5. Other implementations of the .xz format ------------------------------------------ 7-Zip and the p7zip port of 7-Zip support the .xz format starting @@ -202,13 +290,11 @@ XZ Utils http://tukaani.org/xz/embedded.html -5. Contact information +6. Contact information ---------------------- If you have questions, bug reports, patches etc. related to XZ Utils, contact Lasse Collin (in Finnish or English). - tukaani.org uses greylisting to reduce spam, thus when you send your - first email, it may get delayed by a few hours. In addition to that, I'm sometimes slow at replying. If you haven't got a reply within two weeks, assume that your email has got lost and resend it or use IRC. Modified: head/contrib/xz/THANKS ============================================================================== --- head/contrib/xz/THANKS Mon Oct 11 20:34:35 2010 (r213699) +++ head/contrib/xz/THANKS Mon Oct 11 21:16:50 2010 (r213700) @@ -12,12 +12,15 @@ has been important. :-) In alphabetical - Emmanuel Blot - Trent W. Buck - David Burklund + - Daniel Mealha Cabrita + - Milo Casagrande - Marek Černocký - Andrew Dudman - Markus Duft - İsmail Dönmez - Robert Elz - Gilles Espinasse + - Denis Excoffier - Mike Frysinger - Joachim Henke - Peter Ivanov @@ -30,11 +33,14 @@ has been important. :-) In alphabetical - Peter Lawler - Hin-Tak Leung - Andraž 'ruskie' Levstik + - Lorenzo De Liso - Jim Meyering - Rafał Mużyło - Adrien Nader - Hongbo Ni - Jonathan Nieder + - Andre Noll + - Peter O'Gorman - Igor Pavlov - Elbert Pol - Mikko Pouru Modified: head/contrib/xz/po/LINGUAS ============================================================================== --- head/contrib/xz/po/LINGUAS Mon Oct 11 20:34:35 2010 (r213699) +++ head/contrib/xz/po/LINGUAS Mon Oct 11 21:16:50 2010 (r213700) @@ -1 +1,3 @@ cs +de +it Modified: head/contrib/xz/po/POTFILES.in ============================================================================== --- head/contrib/xz/po/POTFILES.in Mon Oct 11 20:34:35 2010 (r213699) +++ head/contrib/xz/po/POTFILES.in Mon Oct 11 21:16:50 2010 (r213700) @@ -3,8 +3,11 @@ src/xz/args.c src/xz/coder.c src/xz/file_io.c *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 21:23:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62E3A106564A; Mon, 11 Oct 2010 21:23:07 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 504928FC18; Mon, 11 Oct 2010 21:23:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BLN7tn027819; Mon, 11 Oct 2010 21:23:07 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BLN757027817; Mon, 11 Oct 2010 21:23:07 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201010112123.o9BLN757027817@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 11 Oct 2010 21:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213701 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 21:23:07 -0000 Author: gnn Date: Mon Oct 11 21:23:07 2010 New Revision: 213701 URL: http://svn.freebsd.org/changeset/base/213701 Log: MFC 213409: Fix two aliases that had the same name but were pointing to different events. These are now disamiguated. Modified: stable/8/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/8/sys/dev/hwpmc/pmc_events.h Mon Oct 11 21:16:50 2010 (r213700) +++ stable/8/sys/dev/hwpmc/pmc_events.h Mon Oct 11 21:23:07 2010 (r213701) @@ -2243,11 +2243,11 @@ __PMC_EV_ALIAS("UOPS_RETIRED.MACRO_FUSED __PMC_EV_ALIAS("MACHINE_CLEARS.CYCLES", IAP_EVENT_C3H_01H) \ __PMC_EV_ALIAS("MACHINE_CLEARS.MEM_ORDER", IAP_EVENT_C3H_02H) \ __PMC_EV_ALIAS("MACHINE_CLEARS.SMC", IAP_EVENT_C3H_04H) \ -__PMC_EV_ALIAS("BR_INST_RETIRED.ALL_BRANCHES", IAP_EVENT_C4H_00H) \ +__PMC_EV_ALIAS("BR_INST_RETIRED.ANY_P", IAP_EVENT_C4H_00H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.CONDITIONAL", IAP_EVENT_C4H_01H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.NEAR_CALL", IAP_EVENT_C4H_02H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.ALL_BRANCHES", IAP_EVENT_C4H_04H) \ -__PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES", IAP_EVENT_C5H_00H) \ +__PMC_EV_ALIAS("BR_MISP_RETIRED.ANY_P", IAP_EVENT_C5H_00H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.CONDITIONAL", IAP_EVENT_C5H_01H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.NEAR_CALL", IAP_EVENT_C5H_02H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES", IAP_EVENT_C5H_04H) \ From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 21:26:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C814106564A; Mon, 11 Oct 2010 21:26:24 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 596A38FC19; Mon, 11 Oct 2010 21:26:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BLQODo027956; Mon, 11 Oct 2010 21:26:24 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BLQO8F027953; Mon, 11 Oct 2010 21:26:24 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010112126.o9BLQO8F027953@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 11 Oct 2010 21:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213702 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 21:26:24 -0000 Author: mdf Date: Mon Oct 11 21:26:24 2010 New Revision: 213702 URL: http://svn.freebsd.org/changeset/base/213702 Log: Fix up the COMPAT_FREEBSD32 ioctl logic for mps(4). Reviewed by: ken Modified: head/sys/dev/mps/mps_ioctl.h head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mps/mps_ioctl.h ============================================================================== --- head/sys/dev/mps/mps_ioctl.h Mon Oct 11 21:23:07 2010 (r213701) +++ head/sys/dev/mps/mps_ioctl.h Mon Oct 11 21:26:24 2010 (r213702) @@ -103,44 +103,4 @@ struct mps_usr_command { #define MPSIO_RAID_ACTION _IOWR('M', 205, struct mps_raid_action) #define MPSIO_MPS_COMMAND _IOWR('M', 210, struct mps_usr_command) -#if defined(__amd64__) -struct mps_cfg_page_req32 { - MPI2_CONFIG_PAGE_HEADER header; - uint32_t page_address; - uint32_t buf; - int len; - uint16_t ioc_status; -}; - -struct mps_ext_cfg_page_req32 { - MPI2_CONFIG_EXTENDED_PAGE_HEADER header; - uint32_t page_address; - uint32_t buf; - int len; - uint16_t ioc_status; -}; - -struct mps_raid_action32 { - uint8_t action; - uint8_t volume_bus; - uint8_t volume_id; - uint8_t phys_disk_num; - uint32_t action_data_word; - uint32_t buf; - int len; - uint32_t volume_status; - uint32_t action_data[4]; - uint16_t action_status; - uint16_t ioc_status; - uint8_t write; -}; - -#define MPSIO_READ_CFG_HEADER32 _IOWR('M', 100, struct mps_cfg_page_req32) -#define MPSIO_READ_CFG_PAGE32 _IOWR('M', 101, struct mps_cfg_page_req32) -#define MPSIO_READ_EXT_CFG_HEADER32 _IOWR('M', 102, struct mps_ext_cfg_page_req32) -#define MPSIO_READ_EXT_CFG_PAGE32 _IOWR('M', 103, struct mps_ext_cfg_page_req32) -#define MPSIO_WRITE_CFG_PAGE32 _IOWR('M', 104, struct mps_cfg_page_req32) -#define MPSIO_RAID_ACTION32 _IOWR('M', 105, struct mps_raid_action32) -#endif - #endif /* !_MPS_IOCTL_H_ */ Modified: head/sys/dev/mps/mps_user.c ============================================================================== --- head/sys/dev/mps/mps_user.c Mon Oct 11 21:23:07 2010 (r213701) +++ head/sys/dev/mps/mps_user.c Mon Oct 11 21:26:24 2010 (r213702) @@ -33,6 +33,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -47,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -64,14 +68,14 @@ __FBSDID("$FreeBSD$"); static d_open_t mps_open; static d_close_t mps_close; -static d_ioctl_t mps_ioctl; +static d_ioctl_t mps_ioctl_devsw; static struct cdevsw mps_cdevsw = { .d_version = D_VERSION, .d_flags = 0, .d_open = mps_open, .d_close = mps_close, - .d_ioctl = mps_ioctl, + .d_ioctl = mps_ioctl_devsw, .d_name = "mps", }; @@ -424,25 +428,14 @@ Ret: return err; } -#ifdef __amd64__ -#define PTRIN(p) ((void *)(uintptr_t)(p)) -#define PTROUT(v) ((u_int32_t)(uintptr_t)(v)) -#endif - static int -mps_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, +mps_ioctl(struct cdev *dev, u_long cmd, void *arg, int flag, struct thread *td) { struct mps_softc *sc; struct mps_cfg_page_req *page_req; struct mps_ext_cfg_page_req *ext_page_req; void *mps_page; -#ifdef __amd64__ - struct mps_cfg_page_req32 *page_req32; - struct mps_cfg_page_req page_req_swab; - struct mps_ext_cfg_page_req32 *ext_page_req32; - struct mps_ext_cfg_page_req ext_page_req_swab; -#endif int error; mps_page = NULL; @@ -450,47 +443,12 @@ mps_ioctl(struct cdev *dev, u_long cmd, page_req = (void *)arg; ext_page_req = (void *)arg; -#ifdef __amd64__ - /* Convert 32-bit structs to native ones. */ - page_req32 = (void *)arg; - ext_page_req32 = (void *)arg; - switch (cmd) { - case MPSIO_READ_CFG_HEADER32: - case MPSIO_READ_CFG_PAGE32: - case MPSIO_WRITE_CFG_PAGE32: - page_req = &page_req_swab; - page_req->header = page_req32->header; - page_req->page_address = page_req32->page_address; - page_req->buf = PTRIN(page_req32->buf); - page_req->len = page_req32->len; - page_req->ioc_status = page_req32->ioc_status; - break; - case MPSIO_READ_EXT_CFG_HEADER32: - case MPSIO_READ_EXT_CFG_PAGE32: - ext_page_req = &ext_page_req_swab; - ext_page_req->header = ext_page_req32->header; - ext_page_req->page_address = ext_page_req32->page_address; - ext_page_req->buf = PTRIN(ext_page_req32->buf); - ext_page_req->len = ext_page_req32->len; - ext_page_req->ioc_status = ext_page_req32->ioc_status; - break; - default: - return (ENOIOCTL); - } -#endif - switch (cmd) { -#ifdef __amd64__ - case MPSIO_READ_CFG_HEADER32: -#endif case MPSIO_READ_CFG_HEADER: mps_lock(sc); error = mps_user_read_cfg_header(sc, page_req); mps_unlock(sc); break; -#ifdef __amd64__ - case MPSIO_READ_CFG_PAGE32: -#endif case MPSIO_READ_CFG_PAGE: mps_page = malloc(page_req->len, M_MPSUSER, M_WAITOK | M_ZERO); error = copyin(page_req->buf, mps_page, @@ -504,17 +462,11 @@ mps_ioctl(struct cdev *dev, u_long cmd, break; error = copyout(mps_page, page_req->buf, page_req->len); break; -#ifdef __amd64__ - case MPSIO_READ_EXT_CFG_HEADER32: -#endif case MPSIO_READ_EXT_CFG_HEADER: mps_lock(sc); error = mps_user_read_extcfg_header(sc, ext_page_req); mps_unlock(sc); break; -#ifdef __amd64__ - case MPSIO_READ_EXT_CFG_PAGE32: -#endif case MPSIO_READ_EXT_CFG_PAGE: mps_page = malloc(ext_page_req->len, M_MPSUSER, M_WAITOK|M_ZERO); error = copyin(ext_page_req->buf, mps_page, @@ -528,9 +480,6 @@ mps_ioctl(struct cdev *dev, u_long cmd, break; error = copyout(mps_page, ext_page_req->buf, ext_page_req->len); break; -#ifdef __amd64__ - case MPSIO_WRITE_CFG_PAGE32: -#endif case MPSIO_WRITE_CFG_PAGE: mps_page = malloc(page_req->len, M_MPSUSER, M_WAITOK|M_ZERO); error = copyin(page_req->buf, mps_page, page_req->len); @@ -551,33 +500,207 @@ mps_ioctl(struct cdev *dev, u_long cmd, if (mps_page != NULL) free(mps_page, M_MPSUSER); - if (error) - return (error); + return (error); +} + +#ifdef COMPAT_FREEBSD32 -#ifdef __amd64__ - /* Convert native structs to 32-bit ones. */ - switch (cmd) { +/* Macros from compat/freebsd32/freebsd32.h */ +#define PTRIN(v) (void *)(uintptr_t)(v) +#define PTROUT(v) (uint32_t)(uintptr_t)(v) + +#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0) +#define PTRIN_CP(src,dst,fld) \ + do { (dst).fld = PTRIN((src).fld); } while (0) +#define PTROUT_CP(src,dst,fld) \ + do { (dst).fld = PTROUT((src).fld); } while (0) + +struct mps_cfg_page_req32 { + MPI2_CONFIG_PAGE_HEADER header; + uint32_t page_address; + uint32_t buf; + int len; + uint16_t ioc_status; +}; + +struct mps_ext_cfg_page_req32 { + MPI2_CONFIG_EXTENDED_PAGE_HEADER header; + uint32_t page_address; + uint32_t buf; + int len; + uint16_t ioc_status; +}; + +struct mps_raid_action32 { + uint8_t action; + uint8_t volume_bus; + uint8_t volume_id; + uint8_t phys_disk_num; + uint32_t action_data_word; + uint32_t buf; + int len; + uint32_t volume_status; + uint32_t action_data[4]; + uint16_t action_status; + uint16_t ioc_status; + uint8_t write; +}; + +struct mps_usr_command32 { + uint32_t req; + uint32_t req_len; + uint32_t rpl; + uint32_t rpl_len; + uint32_t buf; + int len; + uint32_t flags; +}; + +#define MPSIO_READ_CFG_HEADER32 _IOWR('M', 200, struct mps_cfg_page_req32) +#define MPSIO_READ_CFG_PAGE32 _IOWR('M', 201, struct mps_cfg_page_req32) +#define MPSIO_READ_EXT_CFG_HEADER32 _IOWR('M', 202, struct mps_ext_cfg_page_req32) +#define MPSIO_READ_EXT_CFG_PAGE32 _IOWR('M', 203, struct mps_ext_cfg_page_req32) +#define MPSIO_WRITE_CFG_PAGE32 _IOWR('M', 204, struct mps_cfg_page_req32) +#define MPSIO_RAID_ACTION32 _IOWR('M', 205, struct mps_raid_action32) +#define MPSIO_MPS_COMMAND32 _IOWR('M', 210, struct mps_usr_command32) + +static int +mps_ioctl32(struct cdev *dev, u_long cmd32, void *_arg, int flag, + struct thread *td) +{ + struct mps_cfg_page_req32 *page32 = _arg; + struct mps_ext_cfg_page_req32 *ext32 = _arg; + struct mps_raid_action32 *raid32 = _arg; + struct mps_usr_command32 *user32 = _arg; + union { + struct mps_cfg_page_req page; + struct mps_ext_cfg_page_req ext; + struct mps_raid_action raid; + struct mps_usr_command user; + } arg; + u_long cmd; + int error; + + switch (cmd32) { case MPSIO_READ_CFG_HEADER32: case MPSIO_READ_CFG_PAGE32: case MPSIO_WRITE_CFG_PAGE32: - page_req32->header = page_req->header; - page_req32->page_address = page_req->page_address; - page_req32->buf = PTROUT(page_req->buf); - page_req32->len = page_req->len; - page_req32->ioc_status = page_req->ioc_status; + if (cmd32 == MPSIO_READ_CFG_HEADER32) + cmd = MPSIO_READ_CFG_HEADER; + else if (cmd32 == MPSIO_READ_CFG_PAGE32) + cmd = MPSIO_READ_CFG_PAGE; + else + cmd = MPSIO_WRITE_CFG_PAGE; + CP(*page32, arg.page, header); + CP(*page32, arg.page, page_address); + PTRIN_CP(*page32, arg.page, buf); + CP(*page32, arg.page, len); + CP(*page32, arg.page, ioc_status); break; + case MPSIO_READ_EXT_CFG_HEADER32: - case MPSIO_READ_EXT_CFG_PAGE32: - ext_page_req32->header = ext_page_req->header; - ext_page_req32->page_address = ext_page_req->page_address; - ext_page_req32->buf = PTROUT(ext_page_req->buf); - ext_page_req32->len = ext_page_req->len; - ext_page_req32->ioc_status = ext_page_req->ioc_status; + case MPSIO_READ_EXT_CFG_PAGE32: + if (cmd32 == MPSIO_READ_EXT_CFG_HEADER32) + cmd = MPSIO_READ_EXT_CFG_HEADER; + else + cmd = MPSIO_READ_EXT_CFG_PAGE; + CP(*ext32, arg.ext, header); + CP(*ext32, arg.ext, page_address); + PTRIN_CP(*ext32, arg.ext, buf); + CP(*ext32, arg.ext, len); + CP(*ext32, arg.ext, ioc_status); + break; + + case MPSIO_RAID_ACTION32: + cmd = MPSIO_RAID_ACTION; + CP(*raid32, arg.raid, action); + CP(*raid32, arg.raid, volume_bus); + CP(*raid32, arg.raid, volume_id); + CP(*raid32, arg.raid, phys_disk_num); + CP(*raid32, arg.raid, action_data_word); + PTRIN_CP(*raid32, arg.raid, buf); + CP(*raid32, arg.raid, len); + CP(*raid32, arg.raid, volume_status); + bcopy(raid32->action_data, arg.raid.action_data, + sizeof arg.raid.action_data); + CP(*raid32, arg.raid, ioc_status); + CP(*raid32, arg.raid, write); + break; + + case MPSIO_MPS_COMMAND32: + cmd = MPSIO_MPS_COMMAND; + PTRIN_CP(*user32, arg.user, req); + CP(*user32, arg.user, req_len); + PTRIN_CP(*user32, arg.user, rpl); + CP(*user32, arg.user, rpl_len); + PTRIN_CP(*user32, arg.user, buf); + CP(*user32, arg.user, len); + CP(*user32, arg.user, flags); break; default: return (ENOIOCTL); } -#endif - return (0); + error = mps_ioctl(dev, cmd, &arg, flag, td); + if (error == 0 && (cmd32 & IOC_OUT) != 0) { + switch (cmd32) { + case MPSIO_READ_CFG_HEADER32: + case MPSIO_READ_CFG_PAGE32: + case MPSIO_WRITE_CFG_PAGE32: + CP(arg.page, *page32, header); + CP(arg.page, *page32, page_address); + PTROUT_CP(arg.page, *page32, buf); + CP(arg.page, *page32, len); + CP(arg.page, *page32, ioc_status); + break; + + case MPSIO_READ_EXT_CFG_HEADER32: + case MPSIO_READ_EXT_CFG_PAGE32: + CP(arg.ext, *ext32, header); + CP(arg.ext, *ext32, page_address); + PTROUT_CP(arg.ext, *ext32, buf); + CP(arg.ext, *ext32, len); + CP(arg.ext, *ext32, ioc_status); + break; + + case MPSIO_RAID_ACTION32: + CP(arg.raid, *raid32, action); + CP(arg.raid, *raid32, volume_bus); + CP(arg.raid, *raid32, volume_id); + CP(arg.raid, *raid32, phys_disk_num); + CP(arg.raid, *raid32, action_data_word); + PTROUT_CP(arg.raid, *raid32, buf); + CP(arg.raid, *raid32, len); + CP(arg.raid, *raid32, volume_status); + bcopy(arg.raid.action_data, raid32->action_data, + sizeof arg.raid.action_data); + CP(arg.raid, *raid32, ioc_status); + CP(arg.raid, *raid32, write); + break; + + case MPSIO_MPS_COMMAND32: + PTROUT_CP(arg.user, *user32, req); + CP(arg.user, *user32, req_len); + PTROUT_CP(arg.user, *user32, rpl); + CP(arg.user, *user32, rpl_len); + PTROUT_CP(arg.user, *user32, buf); + CP(arg.user, *user32, len); + CP(arg.user, *user32, flags); + break; + } + } + + return (error); +} +#endif /* COMPAT_FREEBSD32 */ + +static int +mps_ioctl_devsw(struct cdev *dev, u_long com, caddr_t arg, int flag, + struct thread *td) +{ +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + return (mps_ioctl32(dev, com, arg, flag, td)); +#endif + return (mps_ioctl(dev, com, arg, flag, td)); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 21:34:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 020D510656A6; Mon, 11 Oct 2010 21:34:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4BF68FC0A; Mon, 11 Oct 2010 21:34:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BLYZFZ028151; Mon, 11 Oct 2010 21:34:35 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BLYZef028149; Mon, 11 Oct 2010 21:34:35 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010112134.o9BLYZef028149@svn.freebsd.org> From: Andriy Gapon Date: Mon, 11 Oct 2010 21:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213703 - head/lib/libcam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 21:34:36 -0000 Author: avg Date: Mon Oct 11 21:34:35 2010 New Revision: 213703 URL: http://svn.freebsd.org/changeset/base/213703 Log: camlib.c: update one overlooked comment Modified: head/lib/libcam/camlib.c Modified: head/lib/libcam/camlib.c ============================================================================== --- head/lib/libcam/camlib.c Mon Oct 11 21:26:24 2010 (r213702) +++ head/lib/libcam/camlib.c Mon Oct 11 21:34:35 2010 (r213703) @@ -165,9 +165,9 @@ cam_get_device(const char *path, char *d } /* - * After we nuke off the slice, we should have just a device name - * and unit number. That means there must be at least 2 - * characters. If we only have 1, we don't have a valid device name. + * We should now have just a device name and unit number. + * That means that there must be at least 2 characters. + * If we only have 1, we don't have a valid device name. */ if (strlen(tmpstr) < 2) { sprintf(cam_errbuf, From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 21:38:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E807106564A; Mon, 11 Oct 2010 21:38:32 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 128138FC12; Mon, 11 Oct 2010 21:38:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BLcVML028267; Mon, 11 Oct 2010 21:38:31 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BLcVIZ028265; Mon, 11 Oct 2010 21:38:31 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010112138.o9BLcVIZ028265@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 11 Oct 2010 21:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213704 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 21:38:32 -0000 Author: mdf Date: Mon Oct 11 21:38:31 2010 New Revision: 213704 URL: http://svn.freebsd.org/changeset/base/213704 Log: Fix a memory leak and locking inconsistency in mps(4) ioctl handling. Check copyin(9) for error and sanity check the length before copyin. Reviewed by: ken Modified: head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mps/mps_user.c ============================================================================== --- head/sys/dev/mps/mps_user.c Mon Oct 11 21:34:35 2010 (r213703) +++ head/sys/dev/mps/mps_user.c Mon Oct 11 21:38:31 2010 (r213704) @@ -343,7 +343,7 @@ mps_user_command(struct mps_softc *sc, s MPI2_REQUEST_HEADER *hdr; MPI2_DEFAULT_REPLY *rpl; MPI2_SGE_IO_UNION *sgl; - void *buf; + void *buf = NULL; struct mps_command *cm; int err = 0; int sz; @@ -363,7 +363,13 @@ mps_user_command(struct mps_softc *sc, s mps_dprint(sc, MPS_INFO, "mps_user_command: req %p %d rpl %p %d\n", cmd->req, cmd->req_len, cmd->rpl, cmd->rpl_len ); - copyin(cmd->req, hdr, cmd->req_len); + if (cmd->req_len > (int)sc->facts->IOCRequestFrameSize * 4) { + err = EINVAL; + goto RetFreeUnlocked; + } + err = copyin(cmd->req, hdr, cmd->req_len); + if (err != 0) + goto RetFreeUnlocked; mps_dprint(sc, MPS_INFO, "mps_user_command: Function %02X " "MsgFlags %02X\n", hdr->Function, hdr->MsgFlags ); @@ -372,7 +378,7 @@ mps_user_command(struct mps_softc *sc, s if (err != 0) { mps_printf(sc, "mps_user_command: unsupported function 0x%X\n", hdr->Function ); - goto RetFree; + goto RetFreeUnlocked; } if (cmd->len > 0) { @@ -380,7 +386,6 @@ mps_user_command(struct mps_softc *sc, s cm->cm_data = buf; cm->cm_length = cmd->len; } else { - buf = NULL; cm->cm_data = NULL; cm->cm_length = 0; } @@ -412,20 +417,27 @@ mps_user_command(struct mps_softc *sc, s mps_unlock(sc); copyout(rpl, cmd->rpl, sz); - if (buf != NULL) { + if (buf != NULL) copyout(buf, cmd->buf, cmd->len); - free(buf, M_MPSUSER); - } mps_lock(sc); mps_dprint(sc, MPS_INFO, "mps_user_command: reply size %d\n", sz ); -RetFree: mps_free_command(sc, cm); - Ret: mps_unlock(sc); - return err; + if (buf != NULL) + free(buf, M_MPSUSER); + return (err); + +RetFreeUnlocked: + mps_lock(sc); + mps_free_command(sc, cm); + mps_unlock(sc); + + if (buf != NULL) + free(buf, M_MPSUSER); + return (err); } static int From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 21:53:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA67D106564A; Mon, 11 Oct 2010 21:53:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8ADF8FC21; Mon, 11 Oct 2010 21:53:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BLr3XH028586; Mon, 11 Oct 2010 21:53:03 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BLr3lW028584; Mon, 11 Oct 2010 21:53:03 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201010112153.o9BLr3lW028584@svn.freebsd.org> From: Andrew Thompson Date: Mon, 11 Oct 2010 21:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213705 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 21:53:03 -0000 Author: thompsa Date: Mon Oct 11 21:53:03 2010 New Revision: 213705 URL: http://svn.freebsd.org/changeset/base/213705 Log: Add the XHCI USB controller to NOTES. Reviewed by: hselasky Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Oct 11 21:38:31 2010 (r213704) +++ head/sys/conf/NOTES Mon Oct 11 21:53:03 2010 (r213705) @@ -2609,6 +2609,8 @@ device uhci device ohci # EHCI controller device ehci +# XHCI controller +device xhci # SL811 Controller #device slhci # General USB code (mandatory for USB) From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 22:41:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CA54106566B; Mon, 11 Oct 2010 22:41:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 395C98FC0A; Mon, 11 Oct 2010 22:41:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BMf2v9029741; Mon, 11 Oct 2010 22:41:02 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BMf2OZ029739; Mon, 11 Oct 2010 22:41:02 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010112241.o9BMf2OZ029739@svn.freebsd.org> From: Andriy Gapon Date: Mon, 11 Oct 2010 22:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213706 - stable/8/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 22:41:02 -0000 Author: avg Date: Mon Oct 11 22:41:01 2010 New Revision: 213706 URL: http://svn.freebsd.org/changeset/base/213706 Log: MFC r208722: Remove unnecessary pointer type castings, shift operations and dead code. On behalf of: jkim Modified: stable/8/sys/dev/acpica/acpi_ec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_ec.c Mon Oct 11 21:53:03 2010 (r213705) +++ stable/8/sys/dev/acpica/acpi_ec.c Mon Oct 11 22:41:01 2010 (r213706) @@ -223,7 +223,7 @@ static ACPI_STATUS EcSpaceSetup(ACPI_HAN void *Context, void **return_Context); static ACPI_STATUS EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, - UINT32 width, UINT64 *Value, + UINT32 Width, UINT64 *Value, void *Context, void *RegionContext); static ACPI_STATUS EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event, u_int gen_count); @@ -231,7 +231,7 @@ static ACPI_STATUS EcCommand(struct acpi static ACPI_STATUS EcRead(struct acpi_ec_softc *sc, UINT8 Address, UINT8 *Data); static ACPI_STATUS EcWrite(struct acpi_ec_softc *sc, UINT8 Address, - UINT8 *Data); + UINT8 Data); static int acpi_ec_probe(device_t dev); static int acpi_ec_attach(device_t dev); static int acpi_ec_suspend(device_t dev); @@ -717,25 +717,27 @@ EcSpaceSetup(ACPI_HANDLE Region, UINT32 } static ACPI_STATUS -EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, +EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 Width, UINT64 *Value, void *Context, void *RegionContext) { struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; ACPI_STATUS Status; - UINT8 EcAddr, EcData; - int i; + UINT8 *EcData; + UINT8 EcAddr; + int bytes, i; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address); - if (width % 8 != 0 || Value == NULL || Context == NULL) + if (Width % 8 != 0 || Value == NULL || Context == NULL) return_ACPI_STATUS (AE_BAD_PARAMETER); - if (Address + (width / 8) - 1 > 0xFF) + bytes = Width / 8; + if (Address + bytes - 1 > 0xFF) return_ACPI_STATUS (AE_BAD_ADDRESS); if (Function == ACPI_READ) *Value = 0; EcAddr = Address; - Status = AE_ERROR; + EcData = (UINT8 *)Value; /* * If booting, check if we need to run the query handler. If so, we @@ -753,17 +755,14 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY if (ACPI_FAILURE(Status)) return_ACPI_STATUS (Status); - /* Perform the transaction(s), based on width. */ - for (i = 0; i < width; i += 8, EcAddr++) { + /* Perform the transaction(s), based on Width. */ + for (i = 0; i < bytes; i++, EcAddr++, EcData++) { switch (Function) { case ACPI_READ: - Status = EcRead(sc, EcAddr, &EcData); - if (ACPI_SUCCESS(Status)) - *Value |= ((UINT64)EcData) << i; + Status = EcRead(sc, EcAddr, EcData); break; case ACPI_WRITE: - EcData = (UINT8)((*Value) >> i); - Status = EcWrite(sc, EcAddr, &EcData); + Status = EcWrite(sc, EcAddr, *EcData); break; default: device_printf(sc->ec_dev, "invalid EcSpaceHandler function %d\n", @@ -986,14 +985,14 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A } static ACPI_STATUS -EcWrite(struct acpi_ec_softc *sc, UINT8 Address, UINT8 *Data) +EcWrite(struct acpi_ec_softc *sc, UINT8 Address, UINT8 Data) { ACPI_STATUS status; UINT8 data; u_int gen_count; ACPI_SERIAL_ASSERT(ec); - CTR2(KTR_ACPI, "ec write to %#x, data %#x", Address, *Data); + CTR2(KTR_ACPI, "ec write to %#x, data %#x", Address, Data); /* If we can't start burst mode, continue anyway. */ status = EcCommand(sc, EC_COMMAND_BURST_ENABLE); @@ -1018,7 +1017,7 @@ EcWrite(struct acpi_ec_softc *sc, UINT8 } gen_count = sc->ec_gencount; - EC_SET_DATA(sc, *Data); + EC_SET_DATA(sc, Data); status = EcWaitEvent(sc, EC_EVENT_INPUT_BUFFER_EMPTY, gen_count); if (ACPI_FAILURE(status)) { device_printf(sc->ec_dev, "EcWrite: failed waiting for sent data\n"); From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 22:44:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7A310656C3; Mon, 11 Oct 2010 22:44:05 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6CC8FC12; Mon, 11 Oct 2010 22:44:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BMi5k0029926; Mon, 11 Oct 2010 22:44:05 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BMi5qh029924; Mon, 11 Oct 2010 22:44:05 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010112244.o9BMi5qh029924@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 11 Oct 2010 22:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213707 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 22:44:05 -0000 Author: mdf Date: Mon Oct 11 22:44:05 2010 New Revision: 213707 URL: http://svn.freebsd.org/changeset/base/213707 Log: Add function prototypes for static functions. Requested by: ken Modified: head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mps/mps_user.c ============================================================================== --- head/sys/dev/mps/mps_user.c Mon Oct 11 22:41:01 2010 (r213706) +++ head/sys/dev/mps/mps_user.c Mon Oct 11 22:44:05 2010 (r213707) @@ -79,6 +79,19 @@ static struct cdevsw mps_cdevsw = { .d_name = "mps", }; +static int mps_user_read_cfg_header(struct mps_softc *, + struct mps_cfg_page_req *); +static int mps_user_read_cfg_page(struct mps_softc *, + struct mps_cfg_page_req *, void *); +static int mps_user_read_extcfg_header(struct mps_softc *, + struct mps_ext_cfg_page_req *); +static int mps_user_read_extcfg_page(struct mps_softc *, + struct mps_ext_cfg_page_req *, void *); +static int mps_user_write_cfg_page(struct mps_softc *, + struct mps_cfg_page_req *, void *); +static int mps_user_verify_request(MPI2_REQUEST_HEADER *, MPI2_SGE_IO_UNION **); +static int mps_user_command(struct mps_softc *, struct mps_usr_command *); + static MALLOC_DEFINE(M_MPSUSER, "mps_user", "Buffers for mps(4) ioctls"); int From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 22:44:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC3B1065698; Mon, 11 Oct 2010 22:44:15 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C85368FC1E; Mon, 11 Oct 2010 22:44:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BMiF15029969; Mon, 11 Oct 2010 22:44:15 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BMiFVb029967; Mon, 11 Oct 2010 22:44:15 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010112244.o9BMiFVb029967@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 11 Oct 2010 22:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213708 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 22:44:16 -0000 Author: mdf Date: Mon Oct 11 22:44:15 2010 New Revision: 213708 URL: http://svn.freebsd.org/changeset/base/213708 Log: Re-work the internal user ioctl command table, and support the FW_UPLOAD command. Reviewed by: ken (previous version) Modified: head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mps/mps_user.c ============================================================================== --- head/sys/dev/mps/mps_user.c Mon Oct 11 22:44:05 2010 (r213707) +++ head/sys/dev/mps/mps_user.c Mon Oct 11 22:44:15 2010 (r213708) @@ -79,6 +79,16 @@ static struct cdevsw mps_cdevsw = { .d_name = "mps", }; +typedef int (mps_user_f)(struct mps_command *, struct mps_usr_command *); +static mps_user_f mpi_pre_ioc_facts; +static mps_user_f mpi_pre_port_facts; +static mps_user_f mpi_pre_fw_download; +static mps_user_f mpi_pre_fw_upload; +static mps_user_f mpi_pre_sata_passthrough; +static mps_user_f mpi_pre_smp_passthrough; +static mps_user_f mpi_pre_config; +static mps_user_f mpi_pre_sas_io_unit_control; + static int mps_user_read_cfg_header(struct mps_softc *, struct mps_cfg_page_req *); static int mps_user_read_cfg_page(struct mps_softc *, @@ -89,7 +99,8 @@ static int mps_user_read_extcfg_page(str struct mps_ext_cfg_page_req *, void *); static int mps_user_write_cfg_page(struct mps_softc *, struct mps_cfg_page_req *, void *); -static int mps_user_verify_request(MPI2_REQUEST_HEADER *, MPI2_SGE_IO_UNION **); +static int mps_user_setup_request(struct mps_command *, + struct mps_usr_command *); static int mps_user_command(struct mps_softc *, struct mps_usr_command *); static MALLOC_DEFINE(M_MPSUSER, "mps_user", "Buffers for mps(4) ioctls"); @@ -311,43 +322,212 @@ mps_user_write_cfg_page(struct mps_softc return (0); } +/* + * Prepare the mps_command for an IOC_FACTS request. + */ +static int +mpi_pre_ioc_facts(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_IOC_FACTS_REQUEST *req = (void *)cm->cm_req; + MPI2_IOC_FACTS_REPLY *rpl; + + if (cmd->req_len != sizeof *req) + return (EINVAL); + if (cmd->rpl_len != sizeof *rpl) + return (EINVAL); + + cm->cm_sge = NULL; + cm->cm_sglsize = 0; + return (0); +} + +/* + * Prepare the mps_command for a PORT_FACTS request. + */ +static int +mpi_pre_port_facts(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_PORT_FACTS_REQUEST *req = (void *)cm->cm_req; + MPI2_PORT_FACTS_REPLY *rpl; + + if (cmd->req_len != sizeof *req) + return (EINVAL); + if (cmd->rpl_len != sizeof *rpl) + return (EINVAL); + + cm->cm_sge = NULL; + cm->cm_sglsize = 0; + return (0); +} + +/* + * Prepare the mps_command for a FW_DOWNLOAD request. + */ +static int +mpi_pre_fw_download(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_FW_DOWNLOAD_REQUEST *req = (void *)cm->cm_req; + MPI2_FW_DOWNLOAD_REPLY *rpl; + + if (cmd->req_len != sizeof *req) + return (EINVAL); + if (cmd->rpl_len != sizeof *rpl) + return (EINVAL); + + cm->cm_sge = (MPI2_SGE_IO_UNION *)&req->SGL; + cm->cm_sglsize = sizeof req->SGL; + return (0); +} + +/* + * Prepare the mps_command for a FW_UPLOAD request. + */ +static int +mpi_pre_fw_upload(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_FW_UPLOAD_REQUEST *req = (void *)cm->cm_req; + MPI2_FW_UPLOAD_REPLY *rpl; + MPI2_FW_UPLOAD_TCSGE *tc; + + /* + * This code assumes there is room in the request's SGL for + * the TransactionContext plus at least a SGL chain element. + */ + CTASSERT(sizeof req->SGL >= sizeof *tc + MPS_SGC_SIZE); + + if (cmd->req_len != sizeof *req) + return (EINVAL); + if (cmd->rpl_len != sizeof *rpl) + return (EINVAL); + + cm->cm_sglsize = sizeof req->SGL; + if (cmd->len == 0) { + /* Perhaps just asking what the size of the fw is? */ + cm->cm_sge = (MPI2_SGE_IO_UNION *)&req->SGL; + return (0); + } + + tc = (void *)&req->SGL; + bzero(tc, sizeof *tc); + + /* + * The value of the first two elements is specified in the + * Fusion-MPT Message Passing Interface document. + */ + tc->ContextSize = 0; + tc->DetailsLength = 12; + /* + * XXX Is there any reason to fetch a partial image? I.e. to + * set ImageOffset to something other than 0? + */ + tc->ImageOffset = 0; + tc->ImageSize = cmd->len; + cm->cm_sge = (MPI2_SGE_IO_UNION *)(tc + 1); + cm->cm_sglsize -= sizeof *tc; + + return (0); +} + +/* + * Prepare the mps_command for a SATA_PASSTHROUGH request. + */ +static int +mpi_pre_sata_passthrough(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_SATA_PASSTHROUGH_REQUEST *req = (void *)cm->cm_req; + MPI2_SATA_PASSTHROUGH_REPLY *rpl; + + if (cmd->req_len != sizeof *req) + return (EINVAL); + if (cmd->rpl_len != sizeof *rpl) + return (EINVAL); + + cm->cm_sge = (MPI2_SGE_IO_UNION *)&req->SGL; + cm->cm_sglsize = sizeof req->SGL; + return (0); +} + +/* + * Prepare the mps_command for a SMP_PASSTHROUGH request. + */ +static int +mpi_pre_smp_passthrough(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_SMP_PASSTHROUGH_REQUEST *req = (void *)cm->cm_req; + MPI2_SMP_PASSTHROUGH_REPLY *rpl; + + if (cmd->req_len != sizeof *req) + return (EINVAL); + if (cmd->rpl_len != sizeof *rpl) + return (EINVAL); + + cm->cm_sge = (MPI2_SGE_IO_UNION *)&req->SGL; + cm->cm_sglsize = sizeof req->SGL; + return (0); +} + +/* + * Prepare the mps_command for a CONFIG request. + */ +static int +mpi_pre_config(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_CONFIG_REQUEST *req = (void *)cm->cm_req; + MPI2_CONFIG_REPLY *rpl; + + if (cmd->req_len != sizeof *req) + return (EINVAL); + if (cmd->rpl_len != sizeof *rpl) + return (EINVAL); + + cm->cm_sge = (MPI2_SGE_IO_UNION *)&req->PageBufferSGE; + cm->cm_sglsize = sizeof req->PageBufferSGE; + return (0); +} + +/* + * Prepare the mps_command for a SAS_IO_UNIT_CONTROL request. + */ +static int +mpi_pre_sas_io_unit_control(struct mps_command *cm, + struct mps_usr_command *cmd) +{ + + cm->cm_sge = NULL; + cm->cm_sglsize = 0; + return (0); +} + +/* + * A set of functions to prepare an mps_command for the various + * supported requests. + */ struct mps_user_func { - U8 Func; - U8 SgOff; + U8 Function; + mps_user_f *f_pre; } mps_user_func_list[] = { - { MPI2_FUNCTION_IOC_FACTS, 0 }, - { MPI2_FUNCTION_PORT_FACTS, 0 }, - { MPI2_FUNCTION_FW_DOWNLOAD, offsetof(Mpi2FWDownloadRequest,SGL)}, - { MPI2_FUNCTION_FW_UPLOAD, offsetof(Mpi2FWUploadRequest_t,SGL)}, - { MPI2_FUNCTION_SATA_PASSTHROUGH,offsetof(Mpi2SataPassthroughRequest_t,SGL)}, - { MPI2_FUNCTION_SMP_PASSTHROUGH, offsetof(Mpi2SmpPassthroughRequest_t,SGL)}, - { MPI2_FUNCTION_CONFIG, offsetof(Mpi2ConfigRequest_t,PageBufferSGE)}, - { MPI2_FUNCTION_SAS_IO_UNIT_CONTROL, 0 }, -}; - -static int -mps_user_verify_request(MPI2_REQUEST_HEADER *hdr, MPI2_SGE_IO_UNION **psgl) -{ - int i, err = EINVAL; - - for (i = 0; i < sizeof(mps_user_func_list) / - sizeof(mps_user_func_list[0]); i++ ) { - struct mps_user_func *func = &mps_user_func_list[i]; - - if (hdr->Function == func->Func) { - if (psgl != NULL) { - if (func->SgOff != 0) - *psgl = (PTR_MPI2_SGE_IO_UNION) - ((char*)hdr + func->SgOff); - else - *psgl = NULL; - err = 0; - break; - } - } - } + { MPI2_FUNCTION_IOC_FACTS, mpi_pre_ioc_facts }, + { MPI2_FUNCTION_PORT_FACTS, mpi_pre_port_facts }, + { MPI2_FUNCTION_FW_DOWNLOAD, mpi_pre_fw_download }, + { MPI2_FUNCTION_FW_UPLOAD, mpi_pre_fw_upload }, + { MPI2_FUNCTION_SATA_PASSTHROUGH, mpi_pre_sata_passthrough }, + { MPI2_FUNCTION_SMP_PASSTHROUGH, mpi_pre_smp_passthrough}, + { MPI2_FUNCTION_CONFIG, mpi_pre_config}, + { MPI2_FUNCTION_SAS_IO_UNIT_CONTROL, mpi_pre_sas_io_unit_control }, + { 0xFF, NULL } /* list end */ +}; - return err; +static int +mps_user_setup_request(struct mps_command *cm, struct mps_usr_command *cmd) +{ + MPI2_REQUEST_HEADER *hdr = (MPI2_REQUEST_HEADER *)cm->cm_req; + struct mps_user_func *f; + + for (f = mps_user_func_list; f->f_pre != NULL; f++) { + if (hdr->Function == f->Function) + return (f->f_pre(cm, cmd)); + } + return (EINVAL); } static int @@ -355,7 +535,6 @@ mps_user_command(struct mps_softc *sc, s { MPI2_REQUEST_HEADER *hdr; MPI2_DEFAULT_REPLY *rpl; - MPI2_SGE_IO_UNION *sgl; void *buf = NULL; struct mps_command *cm; int err = 0; @@ -387,7 +566,7 @@ mps_user_command(struct mps_softc *sc, s mps_dprint(sc, MPS_INFO, "mps_user_command: Function %02X " "MsgFlags %02X\n", hdr->Function, hdr->MsgFlags ); - err = mps_user_verify_request(hdr, &sgl); + err = mps_user_setup_request(cm, cmd); if (err != 0) { mps_printf(sc, "mps_user_command: unsupported function 0x%X\n", hdr->Function ); @@ -403,8 +582,6 @@ mps_user_command(struct mps_softc *sc, s cm->cm_length = 0; } - cm->cm_sge = sgl; - cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_WAKEUP; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 22:46:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C254F106566B; Mon, 11 Oct 2010 22:46:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF21A8FC17; Mon, 11 Oct 2010 22:46:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BMkFxI030056; Mon, 11 Oct 2010 22:46:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BMkFKA030054; Mon, 11 Oct 2010 22:46:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010112246.o9BMkFKA030054@svn.freebsd.org> From: Andriy Gapon Date: Mon, 11 Oct 2010 22:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213709 - stable/8/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 22:46:15 -0000 Author: avg Date: Mon Oct 11 22:46:15 2010 New Revision: 213709 URL: http://svn.freebsd.org/changeset/base/213709 Log: MFC r210977: When EC burst mode is activated and multiple bytes are accessed, do not disable and enable repeatedly, just do it once per call. It also reduces code duplication. Check all parameters early and fail immediately. On behalf of: jkim Modified: stable/8/sys/dev/acpica/acpi_ec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_ec.c Mon Oct 11 22:44:15 2010 (r213708) +++ stable/8/sys/dev/acpica/acpi_ec.c Mon Oct 11 22:46:15 2010 (r213709) @@ -721,24 +721,19 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY UINT64 *Value, void *Context, void *RegionContext) { struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; - ACPI_STATUS Status; + ACPI_PHYSICAL_ADDRESS EcAddr; UINT8 *EcData; - UINT8 EcAddr; - int bytes, i; + ACPI_STATUS Status; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address); + if (Function != ACPI_READ && Function != ACPI_WRITE) + return_ACPI_STATUS (AE_BAD_PARAMETER); if (Width % 8 != 0 || Value == NULL || Context == NULL) return_ACPI_STATUS (AE_BAD_PARAMETER); - bytes = Width / 8; - if (Address + bytes - 1 > 0xFF) + if (Address + Width / 8 > 256) return_ACPI_STATUS (AE_BAD_ADDRESS); - if (Function == ACPI_READ) - *Value = 0; - EcAddr = Address; - EcData = (UINT8 *)Value; - /* * If booting, check if we need to run the query handler. If so, we * we call it directly here since our thread taskq is not active yet. @@ -755,8 +750,21 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY if (ACPI_FAILURE(Status)) return_ACPI_STATUS (Status); + /* If we can't start burst mode, continue anyway. */ + Status = EcCommand(sc, EC_COMMAND_BURST_ENABLE); + if (ACPI_SUCCESS(Status)) { + if (EC_GET_DATA(sc) == EC_BURST_ACK) { + CTR0(KTR_ACPI, "ec burst enabled"); + sc->ec_burstactive = TRUE; + } + } + /* Perform the transaction(s), based on Width. */ - for (i = 0; i < bytes; i++, EcAddr++, EcData++) { + EcAddr = Address; + EcData = (UINT8 *)Value; + if (Function == ACPI_READ) + *Value = 0; + do { switch (Function) { case ACPI_READ: Status = EcRead(sc, EcAddr, EcData); @@ -764,14 +772,17 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY case ACPI_WRITE: Status = EcWrite(sc, EcAddr, *EcData); break; - default: - device_printf(sc->ec_dev, "invalid EcSpaceHandler function %d\n", - Function); - Status = AE_BAD_PARAMETER; - break; } if (ACPI_FAILURE(Status)) break; + EcAddr++; + EcData++; + } while (EcAddr < Address + Width / 8); + + if (sc->ec_burstactive) { + sc->ec_burstactive = FALSE; + if (ACPI_SUCCESS(EcCommand(sc, EC_COMMAND_BURST_DISABLE))) + CTR0(KTR_ACPI, "ec disabled burst ok"); } EcUnlock(sc); @@ -944,22 +955,11 @@ static ACPI_STATUS EcRead(struct acpi_ec_softc *sc, UINT8 Address, UINT8 *Data) { ACPI_STATUS status; - UINT8 data; u_int gen_count; ACPI_SERIAL_ASSERT(ec); CTR1(KTR_ACPI, "ec read from %#x", Address); - /* If we can't start burst mode, continue anyway. */ - status = EcCommand(sc, EC_COMMAND_BURST_ENABLE); - if (status == AE_OK) { - data = EC_GET_DATA(sc); - if (data == EC_BURST_ACK) { - CTR0(KTR_ACPI, "ec burst enabled"); - sc->ec_burstactive = TRUE; - } - } - status = EcCommand(sc, EC_COMMAND_READ); if (ACPI_FAILURE(status)) return (status); @@ -973,14 +973,6 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A } *Data = EC_GET_DATA(sc); - if (sc->ec_burstactive) { - sc->ec_burstactive = FALSE; - status = EcCommand(sc, EC_COMMAND_BURST_DISABLE); - if (ACPI_FAILURE(status)) - return (status); - CTR0(KTR_ACPI, "ec disabled burst ok"); - } - return (AE_OK); } @@ -988,22 +980,11 @@ static ACPI_STATUS EcWrite(struct acpi_ec_softc *sc, UINT8 Address, UINT8 Data) { ACPI_STATUS status; - UINT8 data; u_int gen_count; ACPI_SERIAL_ASSERT(ec); CTR2(KTR_ACPI, "ec write to %#x, data %#x", Address, Data); - /* If we can't start burst mode, continue anyway. */ - status = EcCommand(sc, EC_COMMAND_BURST_ENABLE); - if (status == AE_OK) { - data = EC_GET_DATA(sc); - if (data == EC_BURST_ACK) { - CTR0(KTR_ACPI, "ec burst enabled"); - sc->ec_burstactive = TRUE; - } - } - status = EcCommand(sc, EC_COMMAND_WRITE); if (ACPI_FAILURE(status)) return (status); @@ -1024,13 +1005,5 @@ EcWrite(struct acpi_ec_softc *sc, UINT8 return (status); } - if (sc->ec_burstactive) { - sc->ec_burstactive = FALSE; - status = EcCommand(sc, EC_COMMAND_BURST_DISABLE); - if (ACPI_FAILURE(status)) - return (status); - CTR0(KTR_ACPI, "ec disabled burst ok"); - } - return (AE_OK); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 22:56:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 716A8106566B; Mon, 11 Oct 2010 22:56:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 449FC8FC0A; Mon, 11 Oct 2010 22:56:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BMuONA030310; Mon, 11 Oct 2010 22:56:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BMuOIN030308; Mon, 11 Oct 2010 22:56:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201010112256.o9BMuOIN030308@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 11 Oct 2010 22:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213710 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 22:56:24 -0000 Author: yongari Date: Mon Oct 11 22:56:23 2010 New Revision: 213710 URL: http://svn.freebsd.org/changeset/base/213710 Log: Remove one last reference of BGE_MI_MODE register for auto polling. Previously bge(4) always enabled auto polling for non-BGE_FLAG_TBI controllers. With this change, auto polling is not used anymore so polling through mii(4) was introduced. Reviewed by: davidch Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Oct 11 22:46:15 2010 (r213709) +++ head/sys/dev/bge/if_bge.c Mon Oct 11 22:56:23 2010 (r213710) @@ -1974,11 +1974,13 @@ bge_blockinit(struct bge_softc *sc) BGE_MACSTAT_LINK_CHANGED); CSR_WRITE_4(sc, BGE_MI_STS, 0); - /* Enable PHY auto polling (for MII/GMII only) */ + /* + * Enable attention when the link has changed state for + * devices that use auto polling. + */ if (sc->bge_flags & BGE_FLAG_TBI) { CSR_WRITE_4(sc, BGE_MI_STS, BGE_MISTS_LINK); } else { - BGE_SETBIT(sc, BGE_MI_MODE, BGE_MIMODE_AUTOPOLL | (10 << 16)); if (sc->bge_asicrev == BGE_ASICREV_BCM5700 && sc->bge_chipid != BGE_CHIPID_BCM5700_B2) CSR_WRITE_4(sc, BGE_MAC_EVT_ENB, @@ -5018,7 +5020,7 @@ bge_link_upd(struct bge_softc *sc) if_printf(sc->bge_ifp, "link DOWN\n"); if_link_state_change(sc->bge_ifp, LINK_STATE_DOWN); } - } else if (CSR_READ_4(sc, BGE_MI_MODE) & BGE_MIMODE_AUTOPOLL) { + } else if ((sc->bge_mi_mode & BGE_MIMODE_AUTOPOLL) != 0) { /* * Some broken BCM chips have BGE_STATFLAG_LINKSTATE_CHANGED bit * in status word always set. Workaround this bug by reading @@ -5046,9 +5048,17 @@ bge_link_upd(struct bge_softc *sc) } } else { /* - * Discard link events for MII/GMII controllers - * if MI auto-polling is disabled. + * For controllers that call mii_tick, we have to poll + * link status. */ + mii = device_get_softc(sc->bge_miibus); + mii_pollstat(mii); + if (!sc->bge_link && mii->mii_media_status & IFM_ACTIVE && + IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { + bge_miibus_statchg(sc->bge_dev); + sc->bge_link = 1; + } else + sc->bge_link = 0; } /* Clear the attention. */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 23:07:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B09B106564A; Mon, 11 Oct 2010 23:07:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4598FC08; Mon, 11 Oct 2010 23:07:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BN7DSG030566; Mon, 11 Oct 2010 23:07:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BN7DL4030564; Mon, 11 Oct 2010 23:07:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201010112307.o9BN7DL4030564@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 11 Oct 2010 23:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213711 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 23:07:13 -0000 Author: yongari Date: Mon Oct 11 23:07:12 2010 New Revision: 213711 URL: http://svn.freebsd.org/changeset/base/213711 Log: The IFF_DRV_RUNNING flag is set at the end of bge_init_locked. But before setting the flag, interrupt was already enabled such that interrupt handler could be run before setting IFF_DRV_RUNNING flag. This can lose initial link state change interrupt which in turn make bge(4) think that it still does not have valid link. Fix this race by protecting the taskqueue with a driver lock. While I'm here move reenabling interrupt code after handling of link state chage. Reviewed by: davidch Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Oct 11 22:56:23 2010 (r213710) +++ head/sys/dev/bge/if_bge.c Mon Oct 11 23:07:12 2010 (r213711) @@ -3629,8 +3629,11 @@ bge_intr_task(void *arg, int pending) sc = (struct bge_softc *)arg; ifp = sc->bge_ifp; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + BGE_LOCK(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + BGE_UNLOCK(sc); return; + } /* Get updated status block. */ bus_dmamap_sync(sc->bge_cdata.bge_status_tag, @@ -3645,26 +3648,27 @@ bge_intr_task(void *arg, int pending) bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + + if ((status & BGE_STATFLAG_LINKSTATE_CHANGED) != 0) + bge_link_upd(sc); + /* Let controller work. */ bge_writembx(sc, BGE_MBX_IRQ0_LO, 0); - if ((status & BGE_STATFLAG_LINKSTATE_CHANGED) != 0) { - BGE_LOCK(sc); - bge_link_upd(sc); - BGE_UNLOCK(sc); - } - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + sc->bge_rx_saved_considx != rx_prod) { /* Check RX return ring producer/consumer. */ + BGE_UNLOCK(sc); bge_rxeof(sc, rx_prod, 0); + BGE_LOCK(sc); } if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - BGE_LOCK(sc); /* Check TX ring producer/consumer. */ bge_txeof(sc, tx_cons); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) bge_start_locked(ifp); - BGE_UNLOCK(sc); } + BGE_UNLOCK(sc); } static void From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 23:15:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 657C9106564A; Mon, 11 Oct 2010 23:15:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48B3D8FC14; Mon, 11 Oct 2010 23:15:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BNFIhK030761; Mon, 11 Oct 2010 23:15:18 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BNFIWg030759; Mon, 11 Oct 2010 23:15:18 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201010112315.o9BNFIWg030759@svn.freebsd.org> From: Rick Macklem Date: Mon, 11 Oct 2010 23:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213712 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 23:15:18 -0000 Author: rmacklem Date: Mon Oct 11 23:15:18 2010 New Revision: 213712 URL: http://svn.freebsd.org/changeset/base/213712 Log: Try and make the nfsrv_localunlock() function in the experimental NFSv4 server more readable. Mostly changes to comments, but a case of >= is changed to >, since == can never happen. Also, I've added a couple of KASSERT()s and a slight optimization, since once the "else if" case happens, subsequent locks in the list can't have any effect. None of these changes fixes any known bug. MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Oct 11 23:07:12 2010 (r213711) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Oct 11 23:15:18 2010 (r213712) @@ -4957,31 +4957,56 @@ nfsrv_locallock(vnode_t vp, struct nfslo /* * Local lock unlock. Unlock all byte ranges that are no longer locked - * by NFSv4. + * by NFSv4. To do this, unlock any subranges of first-->end that + * do not overlap with the byte ranges of any lock in the lfp->lf_lock + * list. This list has all locks for the file held by other + * tuples. The list is ordered by increasing + * lo_first value, but may have entries that overlap each other, for + * the case of read locks. */ static void nfsrv_localunlock(vnode_t vp, struct nfslockfile *lfp, uint64_t init_first, uint64_t init_end, NFSPROC_T *p) { struct nfslock *lop; - - uint64_t first, end; + uint64_t first, end, prevfirst; first = init_first; end = init_end; while (first < init_end) { /* Loop through all nfs locks, adjusting first and end */ + prevfirst = 0; LIST_FOREACH(lop, &lfp->lf_lock, lo_lckfile) { + KASSERT(prevfirst <= lop->lo_first, + ("nfsv4 locks out of order")); + KASSERT(lop->lo_first < lop->lo_end, + ("nfsv4 bogus lock")); + prevfirst = lop->lo_first; if (first >= lop->lo_first && first < lop->lo_end) - /* Overlaps initial part */ + /* + * Overlaps with initial part, so trim + * off that initial part by moving first past + * it. + */ first = lop->lo_end; else if (end > lop->lo_first && - lop->lo_first >= first) - /* Begins before end and past first */ + lop->lo_first > first) { + /* + * This lock defines the end of the + * segment to unlock, so set end to the + * start of it and break out of the loop. + */ end = lop->lo_first; + break; + } if (first >= end) - /* shrunk to 0 so this iteration is done */ + /* + * There is no segment left to do, so + * break out of this loop and then exit + * the outer while() since first will be set + * to end, which must equal init_end here. + */ break; } if (first < end) { @@ -4991,7 +5016,10 @@ nfsrv_localunlock(vnode_t vp, struct nfs nfsrv_locallock_commit(lfp, NFSLCK_UNLOCK, first, end); } - /* and move on to the rest of the range */ + /* + * Now move past this segment and look for any further + * segment in the range, if there is one. + */ first = end; end = init_end; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 11 23:24:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D842C106566B; Mon, 11 Oct 2010 23:24:57 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C596B8FC0A; Mon, 11 Oct 2010 23:24:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BNOvme030979; Mon, 11 Oct 2010 23:24:57 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9BNOveI030977; Mon, 11 Oct 2010 23:24:57 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010112324.o9BNOveI030977@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 11 Oct 2010 23:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213713 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2010 23:24:58 -0000 Author: obrien Date: Mon Oct 11 23:24:57 2010 New Revision: 213713 URL: http://svn.freebsd.org/changeset/base/213713 Log: Correct regression test to not show a false positive when run as root. Modified: head/tools/regression/bin/sh/builtins/cd1.0 Modified: head/tools/regression/bin/sh/builtins/cd1.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/cd1.0 Mon Oct 11 23:15:18 2010 (r213712) +++ head/tools/regression/bin/sh/builtins/cd1.0 Mon Oct 11 23:24:57 2010 (r213713) @@ -6,12 +6,15 @@ cd $P T=$(mktemp -d sh-test.XXXXXX) chmod 0 $T -cd -L $T 2>/dev/null && exit 1 -[ "$PWD" = "$P" ] -[ "$(pwd)" = "$P" ] -cd -P $T 2>/dev/null && exit 1 -[ "$PWD" = "$P" ] -[ "$(pwd)" = "$P" ] +if [ `id -u` -ne 0 ]; then + # Root can always cd, irregardless of directory permissions. + cd -L $T 2>/dev/null && exit 1 + [ "$PWD" = "$P" ] + [ "$(pwd)" = "$P" ] + cd -P $T 2>/dev/null && exit 1 + [ "$PWD" = "$P" ] + [ "$(pwd)" = "$P" ] +fi chmod 755 $T cd $T From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 00:36:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 030BA106564A; Tue, 12 Oct 2010 00:36:57 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4A688FC3F; Tue, 12 Oct 2010 00:36:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9C0au0X032394; Tue, 12 Oct 2010 00:36:56 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9C0aueg032391; Tue, 12 Oct 2010 00:36:56 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201010120036.o9C0aueg032391@svn.freebsd.org> From: David Xu Date: Tue, 12 Oct 2010 00:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213714 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 00:36:57 -0000 Author: davidxu Date: Tue Oct 12 00:36:56 2010 New Revision: 213714 URL: http://svn.freebsd.org/changeset/base/213714 Log: Add a flag TDF_TIDHASH to prevent a thread from being added to or removed from thread hash table multiple times. Modified: head/sys/kern/kern_thread.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Mon Oct 11 23:24:57 2010 (r213713) +++ head/sys/kern/kern_thread.c Tue Oct 12 00:36:56 2010 (r213714) @@ -981,7 +981,12 @@ void tidhash_add(struct thread *td) { rw_wlock(&tidhash_lock); - LIST_INSERT_HEAD(TIDHASH(td->td_tid), td, td_hash); + thread_lock(td); + if ((td->td_flags & TDF_TIDHASH) == 0) { + LIST_INSERT_HEAD(TIDHASH(td->td_tid), td, td_hash); + td->td_flags |= TDF_TIDHASH; + } + thread_unlock(td); rw_wunlock(&tidhash_lock); } @@ -989,6 +994,11 @@ void tidhash_remove(struct thread *td) { rw_wlock(&tidhash_lock); - LIST_REMOVE(td, td_hash); + thread_lock(td); + if ((td->td_flags & TDF_TIDHASH) != 0) { + LIST_REMOVE(td, td_hash); + td->td_flags &= ~TDF_TIDHASH; + } + thread_unlock(td); rw_wunlock(&tidhash_lock); } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Mon Oct 11 23:24:57 2010 (r213713) +++ head/sys/sys/proc.h Tue Oct 12 00:36:56 2010 (r213714) @@ -353,7 +353,7 @@ do { \ #define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */ #define TDF_NEEDSIGCHK 0x00020000 /* Thread may need signal delivery. */ #define TDF_NOLOAD 0x00040000 /* Ignore during load avg calculations. */ -#define TDF_UNUSED19 0x00080000 /* Thread is sleeping on a umtx. */ +#define TDF_TIDHASH 0x00080000 /* Thread is on hash table. */ #define TDF_THRWAKEUP 0x00100000 /* Libthr thread must not suspend itself. */ #define TDF_UNUSED21 0x00200000 /* --available-- */ #define TDF_SWAPINREQ 0x00400000 /* Swapin request due to wakeup. */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 09:10:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C60901065679; Tue, 12 Oct 2010 09:10:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 988A58FC16; Tue, 12 Oct 2010 09:10:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9C9AOaM043093; Tue, 12 Oct 2010 09:10:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9C9AO4Q043088; Tue, 12 Oct 2010 09:10:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010120910.o9C9AO4Q043088@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 12 Oct 2010 09:10:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213715 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 09:10:24 -0000 Author: kib Date: Tue Oct 12 09:10:24 2010 New Revision: 213715 URL: http://svn.freebsd.org/changeset/base/213715 Log: MFC r213452: Display PCID capability of CPU and add CPUID define for it. Modified: stable/8/sys/amd64/amd64/identcpu.c stable/8/sys/amd64/include/specialreg.h stable/8/sys/i386/i386/identcpu.c stable/8/sys/i386/include/specialreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/identcpu.c Tue Oct 12 00:36:56 2010 (r213714) +++ stable/8/sys/amd64/amd64/identcpu.c Tue Oct 12 09:10:24 2010 (r213715) @@ -278,7 +278,7 @@ printcpuinfo(void) "\017xTPR" /* Send Task Priority Messages*/ "\020PDCM" /* Perf/Debug Capability MSR */ "\021" - "\022" + "\022PCID" /* Process-context Identifiers */ "\023DCA" /* Direct Cache Access */ "\024SSE4.1" "\025SSE4.2" Modified: stable/8/sys/amd64/include/specialreg.h ============================================================================== --- stable/8/sys/amd64/include/specialreg.h Tue Oct 12 00:36:56 2010 (r213714) +++ stable/8/sys/amd64/include/specialreg.h Tue Oct 12 09:10:24 2010 (r213715) @@ -126,6 +126,7 @@ #define CPUID2_CX16 0x00002000 #define CPUID2_XTPR 0x00004000 #define CPUID2_PDCM 0x00008000 +#define CPUID2_PCID 0x00020000 #define CPUID2_DCA 0x00040000 #define CPUID2_SSE41 0x00080000 #define CPUID2_SSE42 0x00100000 Modified: stable/8/sys/i386/i386/identcpu.c ============================================================================== --- stable/8/sys/i386/i386/identcpu.c Tue Oct 12 00:36:56 2010 (r213714) +++ stable/8/sys/i386/i386/identcpu.c Tue Oct 12 09:10:24 2010 (r213715) @@ -743,7 +743,7 @@ printcpuinfo(void) "\017xTPR" /* Send Task Priority Messages*/ "\020PDCM" /* Perf/Debug Capability MSR */ "\021" - "\022" + "\022PCID" /* Process-context Identifiers */ "\023DCA" /* Direct Cache Access */ "\024SSE4.1" "\025SSE4.2" Modified: stable/8/sys/i386/include/specialreg.h ============================================================================== --- stable/8/sys/i386/include/specialreg.h Tue Oct 12 00:36:56 2010 (r213714) +++ stable/8/sys/i386/include/specialreg.h Tue Oct 12 09:10:24 2010 (r213715) @@ -123,6 +123,7 @@ #define CPUID2_CX16 0x00002000 #define CPUID2_XTPR 0x00004000 #define CPUID2_PDCM 0x00008000 +#define CPUID2_PCID 0x00020000 #define CPUID2_DCA 0x00040000 #define CPUID2_SSE41 0x00080000 #define CPUID2_SSE42 0x00100000 From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 09:18:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04C8E1065672; Tue, 12 Oct 2010 09:18:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E61508FC08; Tue, 12 Oct 2010 09:18:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9C9IHj0043330; Tue, 12 Oct 2010 09:18:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9C9IHrQ043323; Tue, 12 Oct 2010 09:18:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010120918.o9C9IHrQ043323@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 12 Oct 2010 09:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213716 - in head/sys: amd64/linux32 compat/svr4 i386/ibcs2 i386/linux sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 09:18:18 -0000 Author: kib Date: Tue Oct 12 09:18:17 2010 New Revision: 213716 URL: http://svn.freebsd.org/changeset/base/213716 Log: Add macro DECLARE_MODULE_TIED to denote a module as requiring the kernel of exactly the same __FreeBSD_version as the headers module was compiled against. Mark our in-tree ABI emulators with DECLARE_MODULE_TIED. The modules use kernel interfaces that the Release Engineering Team feel are not stable enough to guarantee they will not change during the life cycle of a STABLE branch. In particular, the layout of struct sysentvec is declared to be not part of the STABLE KBI. Discussed with: bz, rwatson Approved by: re (bz, kensmith) MFC after: 2 weeks Modified: head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/svr4/svr4_sysvec.c head/sys/i386/ibcs2/ibcs2_sysvec.c head/sys/i386/linux/linux_sysvec.c head/sys/sys/exec.h head/sys/sys/module.h Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Tue Oct 12 09:10:24 2010 (r213715) +++ head/sys/amd64/linux32/linux32_sysvec.c Tue Oct 12 09:18:17 2010 (r213716) @@ -1210,4 +1210,4 @@ static moduledata_t linux_elf_mod = { 0 }; -DECLARE_MODULE(linuxelf, linux_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); +DECLARE_MODULE_TIED(linuxelf, linux_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); Modified: head/sys/compat/svr4/svr4_sysvec.c ============================================================================== --- head/sys/compat/svr4/svr4_sysvec.c Tue Oct 12 09:10:24 2010 (r213715) +++ head/sys/compat/svr4/svr4_sysvec.c Tue Oct 12 09:18:17 2010 (r213716) @@ -309,5 +309,5 @@ static moduledata_t svr4_elf_mod = { svr4_elf_modevent, 0 }; -DECLARE_MODULE(svr4elf, svr4_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); +DECLARE_MODULE_TIED(svr4elf, svr4_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); MODULE_DEPEND(svr4elf, streams, 1, 1, 1); Modified: head/sys/i386/ibcs2/ibcs2_sysvec.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_sysvec.c Tue Oct 12 09:10:24 2010 (r213715) +++ head/sys/i386/ibcs2/ibcs2_sysvec.c Tue Oct 12 09:18:17 2010 (r213716) @@ -134,4 +134,4 @@ static moduledata_t ibcs2_mod = { ibcs2_modevent, 0 }; -DECLARE_MODULE(ibcs2, ibcs2_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +DECLARE_MODULE_TIED(ibcs2, ibcs2_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Tue Oct 12 09:10:24 2010 (r213715) +++ head/sys/i386/linux/linux_sysvec.c Tue Oct 12 09:18:17 2010 (r213716) @@ -1179,4 +1179,4 @@ static moduledata_t linux_elf_mod = { 0 }; -DECLARE_MODULE(linuxelf, linux_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); +DECLARE_MODULE_TIED(linuxelf, linux_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); Modified: head/sys/sys/exec.h ============================================================================== --- head/sys/sys/exec.h Tue Oct 12 09:10:24 2010 (r213715) +++ head/sys/sys/exec.h Tue Oct 12 09:18:17 2010 (r213716) @@ -115,7 +115,8 @@ int exec_unregister(const struct execsw __CONCAT(name,_modevent), \ (void *)& execsw_arg \ }; \ - DECLARE_MODULE(name, __CONCAT(name,_mod), SI_SUB_EXEC, SI_ORDER_ANY) + DECLARE_MODULE_TIED(name, __CONCAT(name,_mod), SI_SUB_EXEC, \ + SI_ORDER_ANY) #endif #endif Modified: head/sys/sys/module.h ============================================================================== --- head/sys/sys/module.h Tue Oct 12 09:10:24 2010 (r213715) +++ head/sys/sys/module.h Tue Oct 12 09:18:17 2010 (r213716) @@ -125,13 +125,26 @@ struct mod_metadata { */ #define MODULE_KERNEL_MAXVER (roundup(__FreeBSD_version, 100000) - 1) -#define DECLARE_MODULE(name, data, sub, order) \ +#define DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, maxver) \ MODULE_DEPEND(name, kernel, __FreeBSD_version, \ - __FreeBSD_version, MODULE_KERNEL_MAXVER); \ + __FreeBSD_version, maxver); \ MODULE_METADATA(_md_##name, MDT_MODULE, &data, #name); \ SYSINIT(name##module, sub, order, module_register_init, &data); \ struct __hack +#define DECLARE_MODULE(name, data, sub, order) \ + DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, MODULE_KERNEL_MAXVER) + +/* + * The module declared with DECLARE_MODULE_TIED can only be loaded + * into the kernel with exactly the same __FreeBSD_version. + * + * Use it for modules that use kernel interfaces that are not stable + * even on STABLE/X branches. + */ +#define DECLARE_MODULE_TIED(name, data, sub, order) \ + DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, __FreeBSD_version) + #define MODULE_VERSION(module, version) \ static struct mod_version _##module##_version = { \ version \ From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 09:41:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7C2B106566B; Tue, 12 Oct 2010 09:41:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A61FF8FC08; Tue, 12 Oct 2010 09:41:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9C9fgIm043818; Tue, 12 Oct 2010 09:41:42 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9C9fgd8043816; Tue, 12 Oct 2010 09:41:42 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201010120941.o9C9fgd8043816@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Oct 2010 09:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213717 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 09:41:42 -0000 Author: glebius Date: Tue Oct 12 09:41:42 2010 New Revision: 213717 URL: http://svn.freebsd.org/changeset/base/213717 Log: We already have dummy receive buffer in sc->buffer. Suggested by: hselasky Modified: head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Tue Oct 12 09:18:17 2010 (r213716) +++ head/sys/dev/usb/usb_msctest.c Tue Oct 12 09:41:42 2010 (r213717) @@ -98,7 +98,6 @@ static uint8_t scsi_huawei_eject[] = { 0 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_tct_eject[] = { 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 }; -static uint8_t scsi_tct_dummy[4]; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -621,8 +620,12 @@ usb_msc_eject(struct usb_device *udev, u USB_MS_HZ); break; case MSC_EJECT_TCT: - err = bbb_command_start(sc, DIR_IN, 0, &scsi_tct_dummy, - sizeof(scsi_tct_dummy), &scsi_tct_eject, + /* + * TCTMobile needs DIR_IN flag. To get it, we + * supply a dummy data with the command. + */ + err = bbb_command_start(sc, DIR_IN, 0, &sc->buffer, + sizeof(sc->buffer), &scsi_tct_eject, sizeof(scsi_tct_eject), USB_MS_HZ); break; default: From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 10:04:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F0B8106566B; Tue, 12 Oct 2010 10:04:45 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C88C8FC0A; Tue, 12 Oct 2010 10:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CA4j4D044386; Tue, 12 Oct 2010 10:04:45 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CA4js4044379; Tue, 12 Oct 2010 10:04:45 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201010121004.o9CA4js4044379@svn.freebsd.org> From: Florent Thoumie Date: Tue, 12 Oct 2010 10:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213718 - in head/usr.sbin/pkg_install: . add create X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 10:04:45 -0000 Author: flz Date: Tue Oct 12 10:04:44 2010 New Revision: 213718 URL: http://svn.freebsd.org/changeset/base/213718 Log: - Add support for xz compression to pkg_create, bzip2 remains the default compression algorithm. - Bump PKG_INSTALL_VERSION to 20101012. Submitted by: mm MFC after: 1 month Modified: head/usr.sbin/pkg_install/Makefile.inc head/usr.sbin/pkg_install/add/main.c head/usr.sbin/pkg_install/create/create.h head/usr.sbin/pkg_install/create/main.c head/usr.sbin/pkg_install/create/perform.c head/usr.sbin/pkg_install/create/pkg_create.1 Modified: head/usr.sbin/pkg_install/Makefile.inc ============================================================================== --- head/usr.sbin/pkg_install/Makefile.inc Tue Oct 12 09:41:42 2010 (r213717) +++ head/usr.sbin/pkg_install/Makefile.inc Tue Oct 12 10:04:44 2010 (r213718) @@ -2,7 +2,7 @@ .include -CFLAGS+= -DPKG_INSTALL_VERSION=20100423 +CFLAGS+= -DPKG_INSTALL_VERSION=20101012 CFLAGS+= -DYES_I_KNOW_THE_API_IS_RUBBISH_AND_IS_DOOMED_TO_CHANGE DPADD+= ${LIBPKG} Modified: head/usr.sbin/pkg_install/add/main.c ============================================================================== --- head/usr.sbin/pkg_install/add/main.c Tue Oct 12 09:41:42 2010 (r213717) +++ head/usr.sbin/pkg_install/add/main.c Tue Oct 12 10:04:44 2010 (r213718) @@ -227,9 +227,9 @@ main(int argc, char **argv) >= sizeof(temppackageroot)) errx(1, "package name too long"); remotepkg = temppackageroot; - if (!((ptr = strrchr(remotepkg, '.')) && ptr[1] == 't' && - (ptr[2] == 'b' || ptr[2] == 'g') && ptr[3] == 'z' && - !ptr[4])) + if (!((ptr = strrchr(remotepkg, '.')) && ptr[1] == 't' && + (ptr[2] == 'b' || ptr[2] == 'g' || ptr[2] == 'x') && + ptr[3] == 'z' && !ptr[4])) if (strlcat(remotepkg, ".tbz", sizeof(temppackageroot)) >= sizeof(temppackageroot)) errx(1, "package name too long"); Modified: head/usr.sbin/pkg_install/create/create.h ============================================================================== --- head/usr.sbin/pkg_install/create/create.h Tue Oct 12 09:41:42 2010 (r213717) +++ head/usr.sbin/pkg_install/create/create.h Tue Oct 12 10:04:44 2010 (r213718) @@ -48,7 +48,7 @@ extern int PlistOnly; extern int Recursive; extern int Regenerate; -enum zipper {NONE, GZIP, BZIP, BZIP2 }; +enum zipper {NONE, GZIP, BZIP, BZIP2, XZ }; extern enum zipper Zipper; void add_cksum(Package *, PackingList, const char *); Modified: head/usr.sbin/pkg_install/create/main.c ============================================================================== --- head/usr.sbin/pkg_install/create/main.c Tue Oct 12 09:41:42 2010 (r213717) +++ head/usr.sbin/pkg_install/create/main.c Tue Oct 12 10:04:44 2010 (r213718) @@ -48,7 +48,7 @@ enum zipper Zipper = BZIP2; static void usage(void); -static char opts[] = "EGYNnORhjvxyzf:p:P:C:c:d:i:I:k:K:r:t:X:D:m:s:S:o:b:"; +static char opts[] = "EGYNnORhjJvxyzf:p:P:C:c:d:i:I:k:K:r:t:X:D:m:s:S:o:b:"; static struct option longopts[] = { { "backup", required_argument, NULL, 'b' }, { "extended", no_argument, NULL, 'E' }, @@ -190,6 +190,10 @@ main(int argc, char **argv) Zipper = GZIP; break; + case 'J': + Zipper = XZ; + break; + case 'b': InstalledPkg = optarg; while ((tmp = strrchr(optarg, (int)'/')) != NULL) { Modified: head/usr.sbin/pkg_install/create/perform.c ============================================================================== --- head/usr.sbin/pkg_install/create/perform.c Tue Oct 12 09:41:42 2010 (r213717) +++ head/usr.sbin/pkg_install/create/perform.c Tue Oct 12 10:04:44 2010 (r213718) @@ -67,6 +67,10 @@ pkg_perform(char **pkgs) Zipper = GZIP; pkg[len - 4] = '\0'; } + else if (!strcmp(&pkg[len - 4], ".txz")) { + Zipper = XZ; + pkg[len - 4] = '\0'; + } else if (!strcmp(&pkg[len - 4], ".tar")) { Zipper = NONE; pkg[len - 4] = '\0'; @@ -78,6 +82,8 @@ pkg_perform(char **pkgs) } else if (Zipper == GZIP) { suf = "tgz"; setenv("GZIP", "-9", 0); + } else if (Zipper == XZ) { + suf = "txz"; } else suf = "tar"; @@ -375,6 +381,10 @@ make_dist(const char *homedir, const cha args[nargs++] = "-j"; cname = "bzip'd "; } + else if (Zipper == XZ) { + args[nargs++] = "-J"; + cname = "xz'd "; + } else { args[nargs++] = "-z"; cname = "gzip'd "; Modified: head/usr.sbin/pkg_install/create/pkg_create.1 ============================================================================== --- head/usr.sbin/pkg_install/create/pkg_create.1 Tue Oct 12 09:41:42 2010 (r213717) +++ head/usr.sbin/pkg_install/create/pkg_create.1 Tue Oct 12 10:04:44 2010 (r213718) @@ -23,7 +23,7 @@ .\" [jkh] Took John's changes back and made some additional extensions for .\" better integration with FreeBSD's new ports collection. .\" -.Dd May 30, 2008 +.Dd Oct 12, 2010 .Dt PKG_CREATE 1 .Os .Sh NAME @@ -315,7 +315,7 @@ archive is explicitly specified by the r Currently .Nm recognizes the following suffixes: -.Pa .tbz , .tgz +.Pa .tbz , .tgz, .txz and .Pa .tar . .It Fl y @@ -325,6 +325,20 @@ Compatibility synonym for Use .Xr gzip 1 utility to compress package tarball. +.It Fl J +Use +.Xr xz 1 +utility to compress package tarball instead of +.Xr gzip 1 . +Please note that this option is a NO-OP if the format of the resulting +archive is explicitly specified by the recognizable suffix of +.Ar pkg-filename . +Currently +.Nm +recognizes the following suffixes: +.Pa .tbz , .tgz, .txz +and +.Pa .tar . .It Fl b , -backup Ar pkg-name Create package file from a locally installed package named .Ar pkg-name . From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 11:05:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBE9D106566B; Tue, 12 Oct 2010 11:05:32 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA4928FC0A; Tue, 12 Oct 2010 11:05:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CB5WLs045845; Tue, 12 Oct 2010 11:05:32 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CB5W6l045843; Tue, 12 Oct 2010 11:05:32 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201010121105.o9CB5W6l045843@svn.freebsd.org> From: Joel Dahl Date: Tue, 12 Oct 2010 11:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213719 - head/sys/dev/bwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 11:05:33 -0000 Author: joel (doc committer) Date: Tue Oct 12 11:05:32 2010 New Revision: 213719 URL: http://svn.freebsd.org/changeset/base/213719 Log: Small grammar nit in a printf message. Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Tue Oct 12 10:04:44 2010 (r213718) +++ head/sys/dev/bwn/if_bwn.c Tue Oct 12 11:05:32 2010 (r213719) @@ -2907,7 +2907,7 @@ bwn_set_channel(struct ieee80211com *ic) bwn_rf_turnon(mac); if (!(mac->mac_flags & BWN_MAC_FLAG_RADIO_ON)) device_printf(sc->sc_dev, - "please turns on the RF switch\n"); + "please turn on the RF switch\n"); } else bwn_rf_turnoff(mac); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 13:13:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA5E1065697; Tue, 12 Oct 2010 13:13:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B92F8FC2D; Tue, 12 Oct 2010 13:13:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CDDKve048600; Tue, 12 Oct 2010 13:13:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CDDKVw048587; Tue, 12 Oct 2010 13:13:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121313.o9CDDKVw048587@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 13:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213720 - stable/8/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 13:13:20 -0000 Author: jhb Date: Tue Oct 12 13:13:20 2010 New Revision: 213720 URL: http://svn.freebsd.org/changeset/base/213720 Log: MFC 205021: - Use an initializer macro to initialize fields in 'fake' FILE objects used by *sprintf(), etc. - Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE objects. This is currently a nop on FreeBSD, but is import for other platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply zero. Modified: stable/8/lib/libc/stdio/findfp.c stable/8/lib/libc/stdio/local.h stable/8/lib/libc/stdio/snprintf.c stable/8/lib/libc/stdio/vasprintf.c stable/8/lib/libc/stdio/vdprintf.c stable/8/lib/libc/stdio/vfprintf.c stable/8/lib/libc/stdio/vsnprintf.c stable/8/lib/libc/stdio/vsprintf.c stable/8/lib/libc/stdio/vsscanf.c stable/8/lib/libc/stdio/vswprintf.c stable/8/lib/libc/stdio/vswscanf.c stable/8/lib/libc/stdio/xprintf.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/stdio/findfp.c ============================================================================== --- stable/8/lib/libc/stdio/findfp.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/findfp.c Tue Oct 12 13:13:20 2010 (r213720) @@ -61,6 +61,7 @@ int __sdidinit; ._read = __sread, \ ._seek = __sseek, \ ._write = __swrite, \ + ._fl_mutex = PTHREAD_MUTEX_INITIALIZER, \ } /* the usual - (stdin + stdout + stderr) */ static FILE usual[FOPEN_MAX - 3]; @@ -96,7 +97,7 @@ moreglue(n) int n; { struct glue *g; - static FILE empty; + static FILE empty = { ._fl_mutex = PTHREAD_MUTEX_INITIALIZER }; FILE *p; g = (struct glue *)malloc(sizeof(*g) + ALIGNBYTES + n * sizeof(FILE)); @@ -154,7 +155,7 @@ found: fp->_ub._size = 0; fp->_lb._base = NULL; /* no line buffer */ fp->_lb._size = 0; -/* fp->_lock = NULL; */ /* once set always set (reused) */ +/* fp->_fl_mutex = NULL; */ /* once set always set (reused) */ fp->_orientation = 0; memset(&fp->_mbstate, 0, sizeof(mbstate_t)); return (fp); Modified: stable/8/lib/libc/stdio/local.h ============================================================================== --- stable/8/lib/libc/stdio/local.h Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/local.h Tue Oct 12 13:13:20 2010 (r213720) @@ -110,6 +110,14 @@ extern int __sdidinit; } /* + * Structure initializations for 'fake' FILE objects. + */ +#define FAKE_FILE { \ + ._file = -1, \ + ._fl_mutex = PTHREAD_MUTEX_INITIALIZER, \ +} + +/* * Set the orientation for a stream. If o > 0, the stream has wide- * orientation. If o < 0, the stream has byte-orientation. */ Modified: stable/8/lib/libc/stdio/snprintf.c ============================================================================== --- stable/8/lib/libc/stdio/snprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/snprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -48,7 +48,7 @@ snprintf(char * __restrict str, size_t n size_t on; int ret; va_list ap; - FILE f; + FILE f = FAKE_FILE; on = n; if (n != 0) @@ -56,12 +56,9 @@ snprintf(char * __restrict str, size_t n if (n > INT_MAX) n = INT_MAX; va_start(ap, fmt); - f._file = -1; f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); ret = __vfprintf(&f, fmt, ap); if (on > 0) *f._p = '\0'; Modified: stable/8/lib/libc/stdio/vasprintf.c ============================================================================== --- stable/8/lib/libc/stdio/vasprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vasprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -42,9 +42,8 @@ vasprintf(str, fmt, ap) __va_list ap; { int ret; - FILE f; + FILE f = FAKE_FILE; - f._file = -1; f._flags = __SWR | __SSTR | __SALC; f._bf._base = f._p = (unsigned char *)malloc(128); if (f._bf._base == NULL) { @@ -53,8 +52,6 @@ vasprintf(str, fmt, ap) return (-1); } f._bf._size = f._w = 127; /* Leave room for the NUL */ - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); ret = __vfprintf(&f, fmt, ap); if (ret < 0) { free(f._bf._base); Modified: stable/8/lib/libc/stdio/vdprintf.c ============================================================================== --- stable/8/lib/libc/stdio/vdprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vdprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); int vdprintf(int fd, const char * __restrict fmt, va_list ap) { - FILE f; + FILE f = FAKE_FILE; unsigned char buf[BUFSIZ]; int ret; @@ -56,8 +56,6 @@ vdprintf(int fd, const char * __restrict f._write = __swrite; f._bf._base = buf; f._bf._size = sizeof(buf); - f._orientation = 0; - bzero(&f._mbstate, sizeof(f._mbstate)); if ((ret = __vfprintf(&f, fmt, ap)) < 0) return (ret); Modified: stable/8/lib/libc/stdio/vfprintf.c ============================================================================== --- stable/8/lib/libc/stdio/vfprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vfprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -169,7 +169,7 @@ static int __sbprintf(FILE *fp, const char *fmt, va_list ap) { int ret; - FILE fake; + FILE fake = FAKE_FILE; unsigned char buf[BUFSIZ]; /* XXX This is probably not needed. */ Modified: stable/8/lib/libc/stdio/vsnprintf.c ============================================================================== --- stable/8/lib/libc/stdio/vsnprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vsnprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -47,7 +47,7 @@ vsnprintf(char * __restrict str, size_t size_t on; int ret; char dummy[2]; - FILE f; + FILE f = FAKE_FILE; on = n; if (n != 0) @@ -61,12 +61,9 @@ vsnprintf(char * __restrict str, size_t str = dummy; n = 1; } - f._file = -1; f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); ret = __vfprintf(&f, fmt, ap); if (on > 0) *f._p = '\0'; Modified: stable/8/lib/libc/stdio/vsprintf.c ============================================================================== --- stable/8/lib/libc/stdio/vsprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vsprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -44,14 +44,11 @@ int vsprintf(char * __restrict str, const char * __restrict fmt, __va_list ap) { int ret; - FILE f; + FILE f = FAKE_FILE; - f._file = -1; f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = INT_MAX; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); ret = __vfprintf(&f, fmt, ap); *f._p = 0; return (ret); Modified: stable/8/lib/libc/stdio/vsscanf.c ============================================================================== --- stable/8/lib/libc/stdio/vsscanf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vsscanf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -55,16 +55,11 @@ int vsscanf(const char * __restrict str, const char * __restrict fmt, __va_list ap) { - FILE f; + FILE f = FAKE_FILE; - f._file = -1; f._flags = __SRD; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._r = strlen(str); f._read = eofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); return (__svfscanf(&f, fmt, ap)); } Modified: stable/8/lib/libc/stdio/vswprintf.c ============================================================================== --- stable/8/lib/libc/stdio/vswprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vswprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -45,7 +45,7 @@ vswprintf(wchar_t * __restrict s, size_t { static const mbstate_t initial; mbstate_t mbs; - FILE f; + FILE f = FAKE_FILE; char *mbp; int ret, sverrno; size_t nwc; @@ -55,7 +55,6 @@ vswprintf(wchar_t * __restrict s, size_t return (-1); } - f._file = -1; f._flags = __SWR | __SSTR | __SALC; f._bf._base = f._p = (unsigned char *)malloc(128); if (f._bf._base == NULL) { @@ -63,8 +62,6 @@ vswprintf(wchar_t * __restrict s, size_t return (-1); } f._bf._size = f._w = 127; /* Leave room for the NUL */ - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); ret = __vfwprintf(&f, fmt, ap); if (ret < 0) { sverrno = errno; Modified: stable/8/lib/libc/stdio/vswscanf.c ============================================================================== --- stable/8/lib/libc/stdio/vswscanf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/vswscanf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -62,7 +62,7 @@ vswscanf(const wchar_t * __restrict str, { static const mbstate_t initial; mbstate_t mbs; - FILE f; + FILE f = FAKE_FILE; char *mbstr; size_t mlen; int r; @@ -80,15 +80,10 @@ vswscanf(const wchar_t * __restrict str, free(mbstr); return (EOF); } - f._file = -1; f._flags = __SRD; f._bf._base = f._p = (unsigned char *)mbstr; f._bf._size = f._r = mlen; f._read = eofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); r = __vfwscanf(&f, fmt, ap); free(mbstr); Modified: stable/8/lib/libc/stdio/xprintf.c ============================================================================== --- stable/8/lib/libc/stdio/xprintf.c Tue Oct 12 11:05:32 2010 (r213719) +++ stable/8/lib/libc/stdio/xprintf.c Tue Oct 12 13:13:20 2010 (r213720) @@ -48,6 +48,7 @@ #include #include "un-namespace.h" +#include "local.h" #include "printf.h" #include "fvwrite.h" @@ -575,7 +576,7 @@ static int __v3printf(FILE *fp, const char *fmt, int pct, va_list ap) { int ret; - FILE fake; + FILE fake = FAKE_FILE; unsigned char buf[BUFSIZ]; /* copy the important variables */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 15:26:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFB71106566B; Tue, 12 Oct 2010 15:26:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD7A68FC18; Tue, 12 Oct 2010 15:26:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CFQDP7051618; Tue, 12 Oct 2010 15:26:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CFQDJl051615; Tue, 12 Oct 2010 15:26:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121526.o9CFQDJl051615@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 15:26:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213721 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 15:26:14 -0000 Author: jhb Date: Tue Oct 12 15:26:13 2010 New Revision: 213721 URL: http://svn.freebsd.org/changeset/base/213721 Log: MFC 212974: Comment nit, set TDF_NEEDRESCHED after the comment describing why it is done rather than before. Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Tue Oct 12 13:13:20 2010 (r213720) +++ stable/8/sys/kern/sched_ule.c Tue Oct 12 15:26:13 2010 (r213721) @@ -2409,12 +2409,12 @@ sched_affinity(struct thread *td) } if (!TD_IS_RUNNING(td)) return; - td->td_flags |= TDF_NEEDRESCHED; /* * Force a switch before returning to userspace. If the * target thread is not running locally send an ipi to force * the issue. */ + td->td_flags |= TDF_NEEDRESCHED; if (td != curthread) ipi_selected(1 << ts->ts_cpu, IPI_PREEMPT); #endif From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 15:26:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D30FF1065674; Tue, 12 Oct 2010 15:26:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0EDF8FC16; Tue, 12 Oct 2010 15:26:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CFQb3B051660; Tue, 12 Oct 2010 15:26:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CFQbaj051658; Tue, 12 Oct 2010 15:26:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121526.o9CFQbaj051658@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 15:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213722 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 15:26:37 -0000 Author: jhb Date: Tue Oct 12 15:26:37 2010 New Revision: 213722 URL: http://svn.freebsd.org/changeset/base/213722 Log: MFC 212974: Comment nit, set TDF_NEEDRESCHED after the comment describing why it is done rather than before. Modified: stable/7/sys/kern/sched_ule.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/sched_ule.c ============================================================================== --- stable/7/sys/kern/sched_ule.c Tue Oct 12 15:26:13 2010 (r213721) +++ stable/7/sys/kern/sched_ule.c Tue Oct 12 15:26:37 2010 (r213722) @@ -2556,12 +2556,12 @@ sched_affinity(struct thread *td) } if (!TD_IS_RUNNING(td)) return; - td->td_flags |= TDF_NEEDRESCHED; /* * Force a switch before returning to userspace. If the * target thread is not running locally send an ipi to force * the issue. */ + td->td_flags |= TDF_NEEDRESCHED; if (td != curthread) ipi_selected(1 << ts->ts_cpu, IPI_PREEMPT); #endif From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 15:48:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B61210656C0; Tue, 12 Oct 2010 15:48:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 393128FC21; Tue, 12 Oct 2010 15:48:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CFmFv4052158; Tue, 12 Oct 2010 15:48:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CFmFw2052156; Tue, 12 Oct 2010 15:48:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121548.o9CFmFw2052156@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 15:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213723 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 15:48:15 -0000 Author: jhb Date: Tue Oct 12 15:48:14 2010 New Revision: 213723 URL: http://svn.freebsd.org/changeset/base/213723 Log: MFC 213271: Account for unlocking a spin mutex in the lock profiling code in the !SMP case. Modified: stable/8/sys/sys/mutex.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/mutex.h ============================================================================== --- stable/8/sys/sys/mutex.h Tue Oct 12 15:26:37 2010 (r213722) +++ stable/8/sys/sys/mutex.h Tue Oct 12 15:48:14 2010 (r213723) @@ -251,8 +251,11 @@ void _thread_lock_flags(struct thread *, #define _rel_spin_lock(mp) do { \ if (mtx_recursed((mp))) \ (mp)->mtx_recurse--; \ - else \ + else { \ + LOCKSTAT_PROFILE_RELEASE_LOCK(LS_MTX_SPIN_UNLOCK_RELEASE, \ + mp); \ (mp)->mtx_lock = MTX_UNOWNED; \ + } \ spinlock_exit(); \ } while (0) #endif /* SMP */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 15:48:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34541065698; Tue, 12 Oct 2010 15:48:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E105E8FC24; Tue, 12 Oct 2010 15:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CFmRZe052199; Tue, 12 Oct 2010 15:48:27 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CFmR7Q052197; Tue, 12 Oct 2010 15:48:27 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121548.o9CFmR7Q052197@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 15:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213724 - stable/7/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 15:48:28 -0000 Author: jhb Date: Tue Oct 12 15:48:27 2010 New Revision: 213724 URL: http://svn.freebsd.org/changeset/base/213724 Log: MFC 213271: Account for unlocking a spin mutex in the lock profiling code in the !SMP case. Modified: stable/7/sys/sys/mutex.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sys/mutex.h ============================================================================== --- stable/7/sys/sys/mutex.h Tue Oct 12 15:48:14 2010 (r213723) +++ stable/7/sys/sys/mutex.h Tue Oct 12 15:48:27 2010 (r213724) @@ -247,8 +247,10 @@ void _thread_lock_flags(struct thread *, #define _rel_spin_lock(mp) do { \ if (mtx_recursed((mp))) \ (mp)->mtx_recurse--; \ - else \ + else { \ + lock_profile_release_lock(&(mp)->lock_object); \ (mp)->mtx_lock = MTX_UNOWNED; \ + } \ spinlock_exit(); \ } while (0) #endif /* SMP */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 15:58:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01291106564A; Tue, 12 Oct 2010 15:58:53 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E379F8FC18; Tue, 12 Oct 2010 15:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CFwq5d052500; Tue, 12 Oct 2010 15:58:52 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CFwqJi052497; Tue, 12 Oct 2010 15:58:52 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201010121558.o9CFwqJi052497@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 12 Oct 2010 15:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213725 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 15:58:53 -0000 Author: jh Date: Tue Oct 12 15:58:52 2010 New Revision: 213725 URL: http://svn.freebsd.org/changeset/base/213725 Log: Format prototypes to follow style(9) more closely. Discussed with: kib, phk Modified: head/sys/fs/devfs/devfs.h head/sys/fs/devfs/devfs_int.h Modified: head/sys/fs/devfs/devfs.h ============================================================================== --- head/sys/fs/devfs/devfs.h Tue Oct 12 15:48:27 2010 (r213724) +++ head/sys/fs/devfs/devfs.h Tue Oct 12 15:58:52 2010 (r213725) @@ -178,22 +178,25 @@ extern unsigned devfs_rule_depth; #define DEVFS_DEL_VNLOCKED 0x01 #define DEVFS_DEL_NORECURSE 0x02 -void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de); -void devfs_rules_cleanup (struct devfs_mount *dm); -int devfs_rules_ioctl(struct devfs_mount *dm, u_long cmd, caddr_t data, struct thread *td); -int devfs_allocv(struct devfs_dirent *de, struct mount *mp, int lockmode, - struct vnode **vpp); -char *devfs_fqpn(char *, struct devfs_mount *, struct devfs_dirent *, - struct componentname *); -void devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int flags); -void devfs_dirent_free(struct devfs_dirent *de); -void devfs_populate (struct devfs_mount *dm); -void devfs_cleanup (struct devfs_mount *dm); -void devfs_unmount_final(struct devfs_mount *mp); -struct devfs_dirent *devfs_newdirent (char *name, int namelen); -struct devfs_dirent *devfs_parent_dirent(struct devfs_dirent *de); -struct devfs_dirent *devfs_vmkdir (struct devfs_mount *, char *name, int namelen, struct devfs_dirent *dotdot, u_int inode); -struct devfs_dirent *devfs_find(struct devfs_dirent *dd, const char *name, int namelen, int type); +void devfs_rules_apply(struct devfs_mount *, struct devfs_dirent *); +void devfs_rules_cleanup(struct devfs_mount *); +int devfs_rules_ioctl(struct devfs_mount *, u_long, caddr_t, + struct thread *); +int devfs_allocv(struct devfs_dirent *, struct mount *, int, + struct vnode **); +char *devfs_fqpn(char *, struct devfs_mount *, struct devfs_dirent *, + struct componentname *); +void devfs_delete(struct devfs_mount *, struct devfs_dirent *, int); +void devfs_dirent_free(struct devfs_dirent *); +void devfs_populate(struct devfs_mount *); +void devfs_cleanup(struct devfs_mount *); +void devfs_unmount_final(struct devfs_mount *); +struct devfs_dirent *devfs_newdirent(char *, int); +struct devfs_dirent *devfs_parent_dirent(struct devfs_dirent *); +struct devfs_dirent *devfs_vmkdir(struct devfs_mount *, char *, int, + struct devfs_dirent *, u_int); +struct devfs_dirent *devfs_find(struct devfs_dirent *, const char *, int, + int); #endif /* _KERNEL */ Modified: head/sys/fs/devfs/devfs_int.h ============================================================================== --- head/sys/fs/devfs/devfs_int.h Tue Oct 12 15:48:27 2010 (r213724) +++ head/sys/fs/devfs/devfs_int.h Tue Oct 12 15:58:52 2010 (r213725) @@ -71,12 +71,12 @@ struct cdev_priv { #define cdev2priv(c) member2struct(cdev_priv, cdp_c, c) -struct cdev *devfs_alloc(int); -int devfs_dev_exists(const char *); -void devfs_free(struct cdev *); -void devfs_create(struct cdev *dev); -void devfs_destroy(struct cdev *dev); -void devfs_destroy_cdevpriv(struct cdev_privdata *p); +struct cdev *devfs_alloc(int); +int devfs_dev_exists(const char *); +void devfs_free(struct cdev *); +void devfs_create(struct cdev *); +void devfs_destroy(struct cdev *); +void devfs_destroy_cdevpriv(struct cdev_privdata *); int devfs_dir_find(const char *); void devfs_dir_ref_de(struct devfs_mount *, struct devfs_dirent *); From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 16:08:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED44106566C; Tue, 12 Oct 2010 16:08:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B9FA8FC08; Tue, 12 Oct 2010 16:08:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CG8K3r052789; Tue, 12 Oct 2010 16:08:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CG8KWa052786; Tue, 12 Oct 2010 16:08:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121608.o9CG8KWa052786@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 16:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213726 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 16:08:20 -0000 Author: jhb Date: Tue Oct 12 16:08:20 2010 New Revision: 213726 URL: http://svn.freebsd.org/changeset/base/213726 Log: MFC 213028,213328: - Expand scope of tun/tap softc locks to cover more softc fields and driver-maintained ifnet fields (such as if_drv_flags). - Use soft locks as the mutex that protects each interface's knote list rather than using the global knote list lock. Also, use the softc for kn_hook instead of the cdev. - Use mtx_sleep() instead of tsleep() when blocking in the read routines. This fixes a lost wakeup race. - Remove D_NEEDGIANT now that the cdevsw routines use the softc lock where locking is needed. - Lock IFQ when calculating the result for FIONREAD in tap(4). tun(4) already did this. - Remove remaining spl calls. Modified: stable/8/sys/net/if_tap.c stable/8/sys/net/if_tun.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if_tap.c ============================================================================== --- stable/8/sys/net/if_tap.c Tue Oct 12 15:58:52 2010 (r213725) +++ stable/8/sys/net/if_tap.c Tue Oct 12 16:08:20 2010 (r213726) @@ -132,7 +132,7 @@ static struct filterops tap_write_filter static struct cdevsw tap_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDGIANT | D_NEEDMINOR, + .d_flags = D_PSEUDO | D_NEEDMINOR, .d_open = tapopen, .d_close = tapclose, .d_read = tapread, @@ -209,7 +209,6 @@ static void tap_destroy(struct tap_softc *tp) { struct ifnet *ifp = tp->tap_ifp; - int s; /* Unlocked read. */ KASSERT(!(tp->tap_flags & TAP_OPEN), @@ -217,10 +216,8 @@ tap_destroy(struct tap_softc *tp) knlist_destroy(&tp->tap_rsel.si_note); destroy_dev(tp->tap_dev); - s = splimp(); ether_ifdetach(ifp); if_free_type(ifp, IFT_ETHER); - splx(s); mtx_destroy(&tp->tap_mtx); free(tp, M_TAP); @@ -398,7 +395,7 @@ tapcreate(struct cdev *dev) struct tap_softc *tp = NULL; unsigned short macaddr_hi; uint32_t macaddr_mid; - int unit, s; + int unit; char *name = NULL; u_char eaddr[6]; @@ -442,22 +439,20 @@ tapcreate(struct cdev *dev) ifp->if_ioctl = tapifioctl; ifp->if_mtu = ETHERMTU; ifp->if_flags = (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST); - ifp->if_snd.ifq_maxlen = ifqmaxlen; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_capabilities |= IFCAP_LINKSTATE; ifp->if_capenable |= IFCAP_LINKSTATE; dev->si_drv1 = tp; tp->tap_dev = dev; - s = splimp(); ether_ifattach(ifp, eaddr); - splx(s); mtx_lock(&tp->tap_mtx); tp->tap_flags |= TAP_INITED; mtx_unlock(&tp->tap_mtx); - knlist_init_mtx(&tp->tap_rsel.si_note, NULL); + knlist_init_mtx(&tp->tap_rsel.si_note, &tp->tap_mtx); TAPDEBUG("interface %s is created. minor = %#x\n", ifp->if_xname, dev2unit(dev)); @@ -474,7 +469,7 @@ tapopen(struct cdev *dev, int flag, int { struct tap_softc *tp = NULL; struct ifnet *ifp = NULL; - int error, s; + int error; if (tapuopen == 0) { error = priv_check(td, PRIV_NET_TAP); @@ -497,15 +492,13 @@ tapopen(struct cdev *dev, int flag, int tp->tap_pid = td->td_proc->p_pid; tp->tap_flags |= TAP_OPEN; ifp = tp->tap_ifp; - mtx_unlock(&tp->tap_mtx); - s = splimp(); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (tapuponopen) ifp->if_flags |= IFF_UP; if_link_state_change(ifp, LINK_STATE_UP); - splx(s); + mtx_unlock(&tp->tap_mtx); TAPDEBUG("%s is open. minor = %#x\n", ifp->if_xname, dev2unit(dev)); @@ -524,9 +517,9 @@ tapclose(struct cdev *dev, int foo, int struct ifaddr *ifa; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; - int s; /* junk all pending output */ + mtx_lock(&tp->tap_mtx); IF_DRAIN(&ifp->if_snd); /* @@ -534,28 +527,26 @@ tapclose(struct cdev *dev, int foo, int * interface, if we are in VMnet mode. just close the device. */ - mtx_lock(&tp->tap_mtx); if (((tp->tap_flags & TAP_VMNET) == 0) && (ifp->if_flags & IFF_UP)) { mtx_unlock(&tp->tap_mtx); - s = splimp(); if_down(ifp); + mtx_lock(&tp->tap_mtx); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + mtx_unlock(&tp->tap_mtx); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { rtinit(ifa, (int)RTM_DELETE, 0); } if_purgeaddrs(ifp); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + mtx_lock(&tp->tap_mtx); } - splx(s); - } else - mtx_unlock(&tp->tap_mtx); + } if_link_state_change(ifp, LINK_STATE_DOWN); funsetown(&tp->tap_sigio); selwakeuppri(&tp->tap_rsel, PZERO+1); - KNOTE_UNLOCKED(&tp->tap_rsel.si_note, 0); + KNOTE_LOCKED(&tp->tap_rsel.si_note, 0); - mtx_lock(&tp->tap_mtx); tp->tap_flags &= ~TAP_OPEN; tp->tap_pid = 0; mtx_unlock(&tp->tap_mtx); @@ -580,8 +571,10 @@ tapifinit(void *xtp) TAPDEBUG("initializing %s\n", ifp->if_xname); + mtx_lock(&tp->tap_mtx); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + mtx_unlock(&tp->tap_mtx); /* attempt to start output */ tapifstart(ifp); @@ -599,7 +592,7 @@ tapifioctl(struct ifnet *ifp, u_long cmd struct tap_softc *tp = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; struct ifstat *ifs = NULL; - int s, dummy; + int dummy; switch (cmd) { case SIOCSIFFLAGS: /* XXX -- just like vmnet does */ @@ -612,7 +605,6 @@ tapifioctl(struct ifnet *ifp, u_long cmd break; case SIOCGIFSTATUS: - s = splimp(); ifs = (struct ifstat *)data; dummy = strlen(ifs->ascii); mtx_lock(&tp->tap_mtx); @@ -621,14 +613,10 @@ tapifioctl(struct ifnet *ifp, u_long cmd sizeof(ifs->ascii) - dummy, "\tOpened by PID %d\n", tp->tap_pid); mtx_unlock(&tp->tap_mtx); - splx(s); break; default: - s = splimp(); - dummy = ether_ioctl(ifp, cmd, data); - splx(s); - return (dummy); + return (ether_ioctl(ifp, cmd, data)); /* NOT REACHED */ } @@ -645,7 +633,6 @@ static void tapifstart(struct ifnet *ifp) { struct tap_softc *tp = ifp->if_softc; - int s; TAPDEBUG("%s starting\n", ifp->if_xname); @@ -657,32 +644,28 @@ tapifstart(struct ifnet *ifp) mtx_lock(&tp->tap_mtx); if (((tp->tap_flags & TAP_VMNET) == 0) && ((tp->tap_flags & TAP_READY) != TAP_READY)) { - struct mbuf *m = NULL; - - mtx_unlock(&tp->tap_mtx); + struct mbuf *m; /* Unlocked read. */ TAPDEBUG("%s not ready, tap_flags = 0x%x\n", ifp->if_xname, tp->tap_flags); - s = splimp(); - do { + for (;;) { IF_DEQUEUE(&ifp->if_snd, m); - if (m != NULL) + if (m != NULL) { m_freem(m); - ifp->if_oerrors ++; - } while (m != NULL); - splx(s); + ifp->if_oerrors++; + } else + break; + } + mtx_unlock(&tp->tap_mtx); return; } - mtx_unlock(&tp->tap_mtx); - s = splimp(); ifp->if_drv_flags |= IFF_DRV_OACTIVE; - if (ifp->if_snd.ifq_len != 0) { - mtx_lock(&tp->tap_mtx); + if (!IFQ_IS_EMPTY(&ifp->if_snd)) { if (tp->tap_flags & TAP_RWAIT) { tp->tap_flags &= ~TAP_RWAIT; wakeup(tp); @@ -691,16 +674,16 @@ tapifstart(struct ifnet *ifp) if ((tp->tap_flags & TAP_ASYNC) && (tp->tap_sigio != NULL)) { mtx_unlock(&tp->tap_mtx); pgsigio(&tp->tap_sigio, SIGIO, 0); - } else - mtx_unlock(&tp->tap_mtx); + mtx_lock(&tp->tap_mtx); + } selwakeuppri(&tp->tap_rsel, PZERO+1); - KNOTE_UNLOCKED(&tp->tap_rsel.si_note, 0); + KNOTE_LOCKED(&tp->tap_rsel.si_note, 0); ifp->if_opackets ++; /* obytes are counted in ether_output */ } ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - splx(s); + mtx_unlock(&tp->tap_mtx); } /* tapifstart */ @@ -715,7 +698,6 @@ tapioctl(struct cdev *dev, u_long cmd, c struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; struct tapinfo *tapp = NULL; - int s; int f; #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD4) @@ -724,19 +706,21 @@ tapioctl(struct cdev *dev, u_long cmd, c switch (cmd) { case TAPSIFINFO: - s = splimp(); tapp = (struct tapinfo *)data; + mtx_lock(&tp->tap_mtx); ifp->if_mtu = tapp->mtu; ifp->if_type = tapp->type; ifp->if_baudrate = tapp->baudrate; - splx(s); + mtx_unlock(&tp->tap_mtx); break; case TAPGIFINFO: tapp = (struct tapinfo *)data; + mtx_lock(&tp->tap_mtx); tapp->mtu = ifp->if_mtu; tapp->type = ifp->if_type; tapp->baudrate = ifp->if_baudrate; + mtx_unlock(&tp->tap_mtx); break; case TAPSDEBUG: @@ -757,26 +741,26 @@ tapioctl(struct cdev *dev, u_long cmd, c break; case FIOASYNC: - s = splimp(); mtx_lock(&tp->tap_mtx); if (*(int *)data) tp->tap_flags |= TAP_ASYNC; else tp->tap_flags &= ~TAP_ASYNC; mtx_unlock(&tp->tap_mtx); - splx(s); break; case FIONREAD: - s = splimp(); - if (ifp->if_snd.ifq_head) { - struct mbuf *mb = ifp->if_snd.ifq_head; + if (!IFQ_IS_EMPTY(&ifp->if_snd)) { + struct mbuf *mb; - for(*(int *)data = 0;mb != NULL;mb = mb->m_next) + IFQ_LOCK(&ifp->if_snd); + IFQ_POLL_NOLOCK(&ifp->if_snd, mb); + for (*(int *)data = 0; mb != NULL; + mb = mb->m_next) *(int *)data += mb->m_len; + IFQ_UNLOCK(&ifp->if_snd); } else *(int *)data = 0; - splx(s); break; case FIOSETOWN: @@ -797,10 +781,6 @@ tapioctl(struct cdev *dev, u_long cmd, c /* VMware/VMnet port ioctl's */ - case SIOCGIFFLAGS: /* get ifnet flags */ - bcopy(&ifp->if_flags, data, sizeof(ifp->if_flags)); - break; - #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD4) case _IO('V', 0): @@ -814,9 +794,9 @@ tapioctl(struct cdev *dev, u_long cmd, c f &= ~IFF_CANTCHANGE; f |= IFF_UP; - s = splimp(); + mtx_lock(&tp->tap_mtx); ifp->if_flags = f | (ifp->if_flags & IFF_CANTCHANGE); - splx(s); + mtx_unlock(&tp->tap_mtx); break; case OSIOCGIFADDR: /* get MAC address of the remote side */ @@ -851,7 +831,7 @@ tapread(struct cdev *dev, struct uio *ui struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; struct mbuf *m = NULL; - int error = 0, len, s; + int error = 0, len; TAPDEBUG("%s reading, minor = %#x\n", ifp->if_xname, dev2unit(dev)); @@ -867,26 +847,27 @@ tapread(struct cdev *dev, struct uio *ui } tp->tap_flags &= ~TAP_RWAIT; - mtx_unlock(&tp->tap_mtx); /* sleep until we get a packet */ do { - s = splimp(); IF_DEQUEUE(&ifp->if_snd, m); - splx(s); if (m == NULL) { - if (flag & O_NONBLOCK) + if (flag & O_NONBLOCK) { + mtx_unlock(&tp->tap_mtx); return (EWOULDBLOCK); + } - mtx_lock(&tp->tap_mtx); tp->tap_flags |= TAP_RWAIT; - mtx_unlock(&tp->tap_mtx); - error = tsleep(tp,PCATCH|(PZERO+1),"taprd",0); - if (error) + error = mtx_sleep(tp, &tp->tap_mtx, PCATCH | (PZERO + 1), + "taprd", 0); + if (error) { + mtx_unlock(&tp->tap_mtx); return (error); + } } } while (m == NULL); + mtx_unlock(&tp->tap_mtx); /* feed packet to bpf */ BPF_MTAP(ifp, m); @@ -982,14 +963,14 @@ tappoll(struct cdev *dev, int events, st { struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; - int s, revents = 0; + int revents = 0; TAPDEBUG("%s polling, minor = %#x\n", ifp->if_xname, dev2unit(dev)); - s = splimp(); if (events & (POLLIN | POLLRDNORM)) { - if (ifp->if_snd.ifq_len > 0) { + IFQ_LOCK(&ifp->if_snd); + if (!IFQ_IS_EMPTY(&ifp->if_snd)) { TAPDEBUG("%s have data in queue. len = %d, " \ "minor = %#x\n", ifp->if_xname, ifp->if_snd.ifq_len, dev2unit(dev)); @@ -1001,12 +982,12 @@ tappoll(struct cdev *dev, int events, st selrecord(td, &tp->tap_rsel); } + IFQ_UNLOCK(&ifp->if_snd); } if (events & (POLLOUT | POLLWRNORM)) revents |= (events & (POLLOUT | POLLWRNORM)); - splx(s); return (revents); } /* tappoll */ @@ -1019,11 +1000,9 @@ tappoll(struct cdev *dev, int events, st static int tapkqfilter(struct cdev *dev, struct knote *kn) { - int s; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; - s = splimp(); switch (kn->kn_filter) { case EVFILT_READ: TAPDEBUG("%s kqfilter: EVFILT_READ, minor = %#x\n", @@ -1040,13 +1019,11 @@ tapkqfilter(struct cdev *dev, struct kno default: TAPDEBUG("%s kqfilter: invalid filter, minor = %#x\n", ifp->if_xname, dev2unit(dev)); - splx(s); return (EINVAL); /* NOT REACHED */ } - splx(s); - kn->kn_hook = (caddr_t) dev; + kn->kn_hook = tp; knlist_add(&tp->tap_rsel.si_note, kn, 0); return (0); @@ -1061,12 +1038,11 @@ tapkqfilter(struct cdev *dev, struct kno static int tapkqread(struct knote *kn, long hint) { - int ret, s; - struct cdev *dev = (struct cdev *)(kn->kn_hook); - struct tap_softc *tp = dev->si_drv1; + int ret; + struct tap_softc *tp = kn->kn_hook; + struct cdev *dev = tp->tap_dev; struct ifnet *ifp = tp->tap_ifp; - s = splimp(); if ((kn->kn_data = ifp->if_snd.ifq_len) > 0) { TAPDEBUG("%s have data in queue. len = %d, minor = %#x\n", ifp->if_xname, ifp->if_snd.ifq_len, dev2unit(dev)); @@ -1076,7 +1052,6 @@ tapkqread(struct knote *kn, long hint) ifp->if_xname, dev2unit(dev)); ret = 0; } - splx(s); return (ret); } /* tapkqread */ @@ -1090,13 +1065,10 @@ tapkqread(struct knote *kn, long hint) static int tapkqwrite(struct knote *kn, long hint) { - int s; - struct tap_softc *tp = ((struct cdev *) kn->kn_hook)->si_drv1; + struct tap_softc *tp = kn->kn_hook; struct ifnet *ifp = tp->tap_ifp; - s = splimp(); kn->kn_data = ifp->if_mtu; - splx(s); return (1); } /* tapkqwrite */ @@ -1105,7 +1077,7 @@ tapkqwrite(struct knote *kn, long hint) static void tapkqdetach(struct knote *kn) { - struct tap_softc *tp = ((struct cdev *) kn->kn_hook)->si_drv1; + struct tap_softc *tp = kn->kn_hook; knlist_remove(&tp->tap_rsel.si_note, kn, 0); } /* tapkqdetach */ Modified: stable/8/sys/net/if_tun.c ============================================================================== --- stable/8/sys/net/if_tun.c Tue Oct 12 15:58:52 2010 (r213725) +++ stable/8/sys/net/if_tun.c Tue Oct 12 16:08:20 2010 (r213726) @@ -165,7 +165,7 @@ static struct filterops tun_write_filter static struct cdevsw tun_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDGIANT | D_NEEDMINOR, + .d_flags = D_PSEUDO | D_NEEDMINOR, .d_open = tunopen, .d_close = tunclose, .d_read = tunread, @@ -344,13 +344,13 @@ tunstart(struct ifnet *ifp) tp->tun_flags &= ~TUN_RWAIT; wakeup(tp); } + selwakeuppri(&tp->tun_rsel, PZERO + 1); + KNOTE_LOCKED(&tp->tun_rsel.si_note, 0); if (tp->tun_flags & TUN_ASYNC && tp->tun_sigio) { mtx_unlock(&tp->tun_mtx); pgsigio(&tp->tun_sigio, SIGIO, 0); } else mtx_unlock(&tp->tun_mtx); - selwakeuppri(&tp->tun_rsel, PZERO + 1); - KNOTE_UNLOCKED(&tp->tun_rsel.si_note, 0); } /* XXX: should return an error code so it can fail. */ @@ -385,7 +385,7 @@ tuncreate(const char *name, struct cdev IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = 0; IFQ_SET_READY(&ifp->if_snd); - knlist_init_mtx(&sc->tun_rsel.si_note, NULL); + knlist_init_mtx(&sc->tun_rsel.si_note, &sc->tun_mtx); ifp->if_capabilities |= IFCAP_LINKSTATE; ifp->if_capenable |= IFCAP_LINKSTATE; @@ -426,10 +426,10 @@ tunopen(struct cdev *dev, int flag, int tp->tun_pid = td->td_proc->p_pid; tp->tun_flags |= TUN_OPEN; - mtx_unlock(&tp->tun_mtx); ifp = TUN2IFP(tp); if_link_state_change(ifp, LINK_STATE_UP); TUNDEBUG(ifp, "open\n"); + mtx_unlock(&tp->tun_mtx); return (0); } @@ -443,7 +443,6 @@ tunclose(struct cdev *dev, int foo, int { struct tun_softc *tp; struct ifnet *ifp; - int s; tp = dev->si_drv1; ifp = TUN2IFP(tp); @@ -451,27 +450,25 @@ tunclose(struct cdev *dev, int foo, int mtx_lock(&tp->tun_mtx); tp->tun_flags &= ~TUN_OPEN; tp->tun_pid = 0; - mtx_unlock(&tp->tun_mtx); /* * junk all pending output */ CURVNET_SET(ifp->if_vnet); - s = splimp(); IFQ_PURGE(&ifp->if_snd); - splx(s); if (ifp->if_flags & IFF_UP) { - s = splimp(); + mtx_unlock(&tp->tun_mtx); if_down(ifp); - splx(s); + mtx_lock(&tp->tun_mtx); } /* Delete all addresses and routes which reference this interface. */ if (ifp->if_drv_flags & IFF_DRV_RUNNING) { struct ifaddr *ifa; - s = splimp(); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + mtx_unlock(&tp->tun_mtx); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { /* deal w/IPv4 PtP destination; unlocked read */ if (ifa->ifa_addr->sa_family == AF_INET) { @@ -482,16 +479,14 @@ tunclose(struct cdev *dev, int foo, int } } if_purgeaddrs(ifp); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - splx(s); + mtx_lock(&tp->tun_mtx); } if_link_state_change(ifp, LINK_STATE_DOWN); CURVNET_RESTORE(); - mtx_lock(&tp->tun_mtx); funsetown(&tp->tun_sigio); selwakeuppri(&tp->tun_rsel, PZERO + 1); - KNOTE_UNLOCKED(&tp->tun_rsel.si_note, 0); + KNOTE_LOCKED(&tp->tun_rsel.si_note, 0); TUNDEBUG (ifp, "closed\n"); cv_broadcast(&tp->tun_cv); @@ -502,14 +497,15 @@ tunclose(struct cdev *dev, int foo, int static int tuninit(struct ifnet *ifp) { -#ifdef INET struct tun_softc *tp = ifp->if_softc; +#ifdef INET struct ifaddr *ifa; #endif int error = 0; TUNDEBUG(ifp, "tuninit\n"); + mtx_lock(&tp->tun_mtx); ifp->if_flags |= IFF_UP; ifp->if_drv_flags |= IFF_DRV_RUNNING; getmicrotime(&ifp->if_lastchange); @@ -521,18 +517,17 @@ tuninit(struct ifnet *ifp) struct sockaddr_in *si; si = (struct sockaddr_in *)ifa->ifa_addr; - mtx_lock(&tp->tun_mtx); if (si->sin_addr.s_addr) tp->tun_flags |= TUN_IASET; si = (struct sockaddr_in *)ifa->ifa_dstaddr; if (si && si->sin_addr.s_addr) tp->tun_flags |= TUN_DSTADDR; - mtx_unlock(&tp->tun_mtx); } } if_addr_runlock(ifp); #endif + mtx_unlock(&tp->tun_mtx); return (error); } @@ -545,9 +540,8 @@ tunifioctl(struct ifnet *ifp, u_long cmd struct ifreq *ifr = (struct ifreq *)data; struct tun_softc *tp = ifp->if_softc; struct ifstat *ifs; - int error = 0, s; + int error = 0; - s = splimp(); switch(cmd) { case SIOCGIFSTATUS: ifs = (struct ifstat *)data; @@ -576,7 +570,6 @@ tunifioctl(struct ifnet *ifp, u_long cmd default: error = EINVAL; } - splx(s); return (error); } @@ -682,7 +675,6 @@ tunoutput( static int tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { - int s; int error; struct tun_softc *tp = dev->si_drv1; struct tuninfo *tunp; @@ -697,15 +689,19 @@ tunioctl(struct cdev *dev, u_long cmd, c if (error) return (error); } + mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_mtu = tunp->mtu; TUN2IFP(tp)->if_type = tunp->type; TUN2IFP(tp)->if_baudrate = tunp->baudrate; + mtx_unlock(&tp->tun_mtx); break; case TUNGIFINFO: tunp = (struct tuninfo *)data; + mtx_lock(&tp->tun_mtx); tunp->mtu = TUN2IFP(tp)->if_mtu; tunp->type = TUN2IFP(tp)->if_type; tunp->baudrate = TUN2IFP(tp)->if_baudrate; + mtx_unlock(&tp->tun_mtx); break; case TUNSDEBUG: tundebug = *(int *)data; @@ -732,7 +728,6 @@ tunioctl(struct cdev *dev, u_long cmd, c mtx_unlock(&tp->tun_mtx); break; case TUNGIFHEAD: - /* Could be unlocked read? */ mtx_lock(&tp->tun_mtx); *(int *)data = (tp->tun_flags & TUN_IFHEAD) ? 1 : 0; mtx_unlock(&tp->tun_mtx); @@ -745,9 +740,11 @@ tunioctl(struct cdev *dev, u_long cmd, c switch (*(int *)data & ~IFF_MULTICAST) { case IFF_POINTOPOINT: case IFF_BROADCAST: + mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_flags &= ~(IFF_BROADCAST|IFF_POINTOPOINT|IFF_MULTICAST); TUN2IFP(tp)->if_flags |= *(int *)data; + mtx_unlock(&tp->tun_mtx); break; default: return(EINVAL); @@ -769,17 +766,15 @@ tunioctl(struct cdev *dev, u_long cmd, c mtx_unlock(&tp->tun_mtx); break; case FIONREAD: - s = splimp(); if (!IFQ_IS_EMPTY(&TUN2IFP(tp)->if_snd)) { struct mbuf *mb; IFQ_LOCK(&TUN2IFP(tp)->if_snd); IFQ_POLL_NOLOCK(&TUN2IFP(tp)->if_snd, mb); - for( *(int *)data = 0; mb != 0; mb = mb->m_next) + for (*(int *)data = 0; mb != NULL; mb = mb->m_next) *(int *)data += mb->m_len; IFQ_UNLOCK(&TUN2IFP(tp)->if_snd); } else *(int *)data = 0; - splx(s); break; case FIOSETOWN: return (fsetown(*(int *)data, &tp->tun_sigio)); @@ -813,7 +808,7 @@ tunread(struct cdev *dev, struct uio *ui struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = TUN2IFP(tp); struct mbuf *m; - int error=0, len, s; + int error=0, len; TUNDEBUG (ifp, "read\n"); mtx_lock(&tp->tun_mtx); @@ -824,27 +819,24 @@ tunread(struct cdev *dev, struct uio *ui } tp->tun_flags &= ~TUN_RWAIT; - mtx_unlock(&tp->tun_mtx); - s = splimp(); do { IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) { if (flag & O_NONBLOCK) { - splx(s); + mtx_unlock(&tp->tun_mtx); return (EWOULDBLOCK); } - mtx_lock(&tp->tun_mtx); tp->tun_flags |= TUN_RWAIT; - mtx_unlock(&tp->tun_mtx); - if ((error = tsleep(tp, PCATCH | (PZERO + 1), - "tunread", 0)) != 0) { - splx(s); + error = mtx_sleep(tp, &tp->tun_mtx, PCATCH | (PZERO + 1), + "tunread", 0); + if (error != 0) { + mtx_unlock(&tp->tun_mtx); return (error); } } } while (m == NULL); - splx(s); + mtx_unlock(&tp->tun_mtx); while (m && uio->uio_resid > 0 && error == 0) { len = min(uio->uio_resid, m->m_len); @@ -957,13 +949,11 @@ tunwrite(struct cdev *dev, struct uio *u static int tunpoll(struct cdev *dev, int events, struct thread *td) { - int s; struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = TUN2IFP(tp); int revents = 0; struct mbuf *m; - s = splimp(); TUNDEBUG(ifp, "tunpoll\n"); if (events & (POLLIN | POLLRDNORM)) { @@ -981,7 +971,6 @@ tunpoll(struct cdev *dev, int events, st if (events & (POLLOUT | POLLWRNORM)) revents |= events & (POLLOUT | POLLWRNORM); - splx(s); return (revents); } @@ -991,11 +980,9 @@ tunpoll(struct cdev *dev, int events, st static int tunkqfilter(struct cdev *dev, struct knote *kn) { - int s; struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = TUN2IFP(tp); - s = splimp(); switch(kn->kn_filter) { case EVFILT_READ: TUNDEBUG(ifp, "%s kqfilter: EVFILT_READ, minor = %#x\n", @@ -1012,12 +999,10 @@ tunkqfilter(struct cdev *dev, struct kno default: TUNDEBUG(ifp, "%s kqfilter: invalid filter, minor = %#x\n", ifp->if_xname, dev2unit(dev)); - splx(s); return(EINVAL); } - splx(s); - kn->kn_hook = (caddr_t) dev; + kn->kn_hook = tp; knlist_add(&tp->tun_rsel.si_note, kn, 0); return (0); @@ -1029,12 +1014,11 @@ tunkqfilter(struct cdev *dev, struct kno static int tunkqread(struct knote *kn, long hint) { - int ret, s; - struct cdev *dev = (struct cdev *)(kn->kn_hook); - struct tun_softc *tp = dev->si_drv1; + int ret; + struct tun_softc *tp = kn->kn_hook; + struct cdev *dev = tp->tun_dev; struct ifnet *ifp = TUN2IFP(tp); - s = splimp(); if ((kn->kn_data = ifp->if_snd.ifq_len) > 0) { TUNDEBUG(ifp, "%s have data in the queue. Len = %d, minor = %#x\n", @@ -1046,7 +1030,6 @@ tunkqread(struct knote *kn, long hint) dev2unit(dev)); ret = 0; } - splx(s); return (ret); } @@ -1057,13 +1040,10 @@ tunkqread(struct knote *kn, long hint) static int tunkqwrite(struct knote *kn, long hint) { - int s; - struct tun_softc *tp = ((struct cdev *)kn->kn_hook)->si_drv1; + struct tun_softc *tp = kn->kn_hook; struct ifnet *ifp = TUN2IFP(tp); - s = splimp(); kn->kn_data = ifp->if_mtu; - splx(s); return (1); } @@ -1071,7 +1051,7 @@ tunkqwrite(struct knote *kn, long hint) static void tunkqdetach(struct knote *kn) { - struct tun_softc *tp = ((struct cdev *)kn->kn_hook)->si_drv1; + struct tun_softc *tp = kn->kn_hook; knlist_remove(&tp->tun_rsel.si_note, kn, 0); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 16:09:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F3801065675; Tue, 12 Oct 2010 16:09:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BE528FC08; Tue, 12 Oct 2010 16:09:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CG997L052845; Tue, 12 Oct 2010 16:09:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CG99aX052842; Tue, 12 Oct 2010 16:09:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121609.o9CG99aX052842@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 16:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213727 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 16:09:09 -0000 Author: jhb Date: Tue Oct 12 16:09:08 2010 New Revision: 213727 URL: http://svn.freebsd.org/changeset/base/213727 Log: MFC 213028,213328: - Expand scope of tun/tap softc locks to cover more softc fields and driver-maintained ifnet fields (such as if_drv_flags). - Use soft locks as the mutex that protects each interface's knote list rather than using the global knote list lock. Also, use the softc for kn_hook instead of the cdev. - Use mtx_sleep() instead of tsleep() when blocking in the read routines. This fixes a lost wakeup race. - Remove D_NEEDGIANT now that the cdevsw routines use the softc lock where locking is needed. - Lock IFQ when calculating the result for FIONREAD in tap(4). tun(4) already did this. - Remove remaining spl calls. Modified: stable/7/sys/net/if_tap.c stable/7/sys/net/if_tun.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/if_tap.c ============================================================================== --- stable/7/sys/net/if_tap.c Tue Oct 12 16:08:20 2010 (r213726) +++ stable/7/sys/net/if_tap.c Tue Oct 12 16:09:08 2010 (r213727) @@ -132,7 +132,7 @@ static struct filterops tap_write_filter static struct cdevsw tap_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDGIANT, + .d_flags = D_PSEUDO, .d_open = tapopen, .d_close = tapclose, .d_read = tapread, @@ -209,7 +209,6 @@ static void tap_destroy(struct tap_softc *tp) { struct ifnet *ifp = tp->tap_ifp; - int s; /* Unlocked read. */ KASSERT(!(tp->tap_flags & TAP_OPEN), @@ -217,10 +216,8 @@ tap_destroy(struct tap_softc *tp) knlist_destroy(&tp->tap_rsel.si_note); destroy_dev(tp->tap_dev); - s = splimp(); ether_ifdetach(ifp); if_free_type(ifp, IFT_ETHER); - splx(s); mtx_destroy(&tp->tap_mtx); free(tp, M_TAP); @@ -399,7 +396,7 @@ tapcreate(struct cdev *dev) struct tap_softc *tp = NULL; unsigned short macaddr_hi; uint32_t macaddr_mid; - int unit, s; + int unit; char *name = NULL; u_char eaddr[6]; @@ -443,20 +440,18 @@ tapcreate(struct cdev *dev) ifp->if_ioctl = tapifioctl; ifp->if_mtu = ETHERMTU; ifp->if_flags = (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST); - ifp->if_snd.ifq_maxlen = ifqmaxlen; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); dev->si_drv1 = tp; tp->tap_dev = dev; - s = splimp(); ether_ifattach(ifp, eaddr); - splx(s); mtx_lock(&tp->tap_mtx); tp->tap_flags |= TAP_INITED; mtx_unlock(&tp->tap_mtx); - knlist_init_mtx(&tp->tap_rsel.si_note, NULL); + knlist_init_mtx(&tp->tap_rsel.si_note, &tp->tap_mtx); TAPDEBUG("interface %s is created. minor = %#x\n", ifp->if_xname, minor(dev)); @@ -473,7 +468,7 @@ tapopen(struct cdev *dev, int flag, int { struct tap_softc *tp = NULL; struct ifnet *ifp = NULL; - int error, s; + int error; if (tapuopen == 0) { error = priv_check(td, PRIV_NET_TAP); @@ -496,14 +491,12 @@ tapopen(struct cdev *dev, int flag, int tp->tap_pid = td->td_proc->p_pid; tp->tap_flags |= TAP_OPEN; ifp = tp->tap_ifp; - mtx_unlock(&tp->tap_mtx); - s = splimp(); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (tapuponopen) ifp->if_flags |= IFF_UP; - splx(s); + mtx_unlock(&tp->tap_mtx); TAPDEBUG("%s is open. minor = %#x\n", ifp->if_xname, minor(dev)); @@ -522,9 +515,9 @@ tapclose(struct cdev *dev, int foo, int struct ifaddr *ifa; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; - int s; /* junk all pending output */ + mtx_lock(&tp->tap_mtx); IF_DRAIN(&ifp->if_snd); /* @@ -532,27 +525,25 @@ tapclose(struct cdev *dev, int foo, int * interface, if we are in VMnet mode. just close the device. */ - mtx_lock(&tp->tap_mtx); if (((tp->tap_flags & TAP_VMNET) == 0) && (ifp->if_flags & IFF_UP)) { mtx_unlock(&tp->tap_mtx); - s = splimp(); if_down(ifp); + mtx_lock(&tp->tap_mtx); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + mtx_unlock(&tp->tap_mtx); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { rtinit(ifa, (int)RTM_DELETE, 0); } if_purgeaddrs(ifp); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + mtx_lock(&tp->tap_mtx); } - splx(s); - } else - mtx_unlock(&tp->tap_mtx); + } funsetown(&tp->tap_sigio); selwakeuppri(&tp->tap_rsel, PZERO+1); - KNOTE_UNLOCKED(&tp->tap_rsel.si_note, 0); + KNOTE_LOCKED(&tp->tap_rsel.si_note, 0); - mtx_lock(&tp->tap_mtx); tp->tap_flags &= ~TAP_OPEN; tp->tap_pid = 0; mtx_unlock(&tp->tap_mtx); @@ -577,8 +568,10 @@ tapifinit(void *xtp) TAPDEBUG("initializing %s\n", ifp->if_xname); + mtx_lock(&tp->tap_mtx); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + mtx_unlock(&tp->tap_mtx); /* attempt to start output */ tapifstart(ifp); @@ -596,7 +589,7 @@ tapifioctl(struct ifnet *ifp, u_long cmd struct tap_softc *tp = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; struct ifstat *ifs = NULL; - int s, dummy; + int dummy; switch (cmd) { case SIOCSIFFLAGS: /* XXX -- just like vmnet does */ @@ -609,7 +602,6 @@ tapifioctl(struct ifnet *ifp, u_long cmd break; case SIOCGIFSTATUS: - s = splimp(); ifs = (struct ifstat *)data; dummy = strlen(ifs->ascii); mtx_lock(&tp->tap_mtx); @@ -618,14 +610,10 @@ tapifioctl(struct ifnet *ifp, u_long cmd sizeof(ifs->ascii) - dummy, "\tOpened by PID %d\n", tp->tap_pid); mtx_unlock(&tp->tap_mtx); - splx(s); break; default: - s = splimp(); - dummy = ether_ioctl(ifp, cmd, data); - splx(s); - return (dummy); + return (ether_ioctl(ifp, cmd, data)); /* NOT REACHED */ } @@ -642,7 +630,6 @@ static void tapifstart(struct ifnet *ifp) { struct tap_softc *tp = ifp->if_softc; - int s; TAPDEBUG("%s starting\n", ifp->if_xname); @@ -654,32 +641,28 @@ tapifstart(struct ifnet *ifp) mtx_lock(&tp->tap_mtx); if (((tp->tap_flags & TAP_VMNET) == 0) && ((tp->tap_flags & TAP_READY) != TAP_READY)) { - struct mbuf *m = NULL; - - mtx_unlock(&tp->tap_mtx); + struct mbuf *m; /* Unlocked read. */ TAPDEBUG("%s not ready, tap_flags = 0x%x\n", ifp->if_xname, tp->tap_flags); - s = splimp(); - do { + for (;;) { IF_DEQUEUE(&ifp->if_snd, m); - if (m != NULL) + if (m != NULL) { m_freem(m); - ifp->if_oerrors ++; - } while (m != NULL); - splx(s); + ifp->if_oerrors++; + } else + break; + } + mtx_unlock(&tp->tap_mtx); return; } - mtx_unlock(&tp->tap_mtx); - s = splimp(); ifp->if_drv_flags |= IFF_DRV_OACTIVE; - if (ifp->if_snd.ifq_len != 0) { - mtx_lock(&tp->tap_mtx); + if (!IFQ_IS_EMPTY(&ifp->if_snd)) { if (tp->tap_flags & TAP_RWAIT) { tp->tap_flags &= ~TAP_RWAIT; wakeup(tp); @@ -688,16 +671,16 @@ tapifstart(struct ifnet *ifp) if ((tp->tap_flags & TAP_ASYNC) && (tp->tap_sigio != NULL)) { mtx_unlock(&tp->tap_mtx); pgsigio(&tp->tap_sigio, SIGIO, 0); - } else - mtx_unlock(&tp->tap_mtx); + mtx_lock(&tp->tap_mtx); + } selwakeuppri(&tp->tap_rsel, PZERO+1); - KNOTE_UNLOCKED(&tp->tap_rsel.si_note, 0); + KNOTE_LOCKED(&tp->tap_rsel.si_note, 0); ifp->if_opackets ++; /* obytes are counted in ether_output */ } ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - splx(s); + mtx_unlock(&tp->tap_mtx); } /* tapifstart */ @@ -712,7 +695,6 @@ tapioctl(struct cdev *dev, u_long cmd, c struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; struct tapinfo *tapp = NULL; - int s; int f; #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD4) @@ -721,19 +703,21 @@ tapioctl(struct cdev *dev, u_long cmd, c switch (cmd) { case TAPSIFINFO: - s = splimp(); tapp = (struct tapinfo *)data; + mtx_lock(&tp->tap_mtx); ifp->if_mtu = tapp->mtu; ifp->if_type = tapp->type; ifp->if_baudrate = tapp->baudrate; - splx(s); + mtx_unlock(&tp->tap_mtx); break; case TAPGIFINFO: tapp = (struct tapinfo *)data; + mtx_lock(&tp->tap_mtx); tapp->mtu = ifp->if_mtu; tapp->type = ifp->if_type; tapp->baudrate = ifp->if_baudrate; + mtx_unlock(&tp->tap_mtx); break; case TAPSDEBUG: @@ -754,26 +738,26 @@ tapioctl(struct cdev *dev, u_long cmd, c break; case FIOASYNC: - s = splimp(); mtx_lock(&tp->tap_mtx); if (*(int *)data) tp->tap_flags |= TAP_ASYNC; else tp->tap_flags &= ~TAP_ASYNC; mtx_unlock(&tp->tap_mtx); - splx(s); break; case FIONREAD: - s = splimp(); - if (ifp->if_snd.ifq_head) { - struct mbuf *mb = ifp->if_snd.ifq_head; + if (!IFQ_IS_EMPTY(&ifp->if_snd)) { + struct mbuf *mb; - for(*(int *)data = 0;mb != NULL;mb = mb->m_next) + IFQ_LOCK(&ifp->if_snd); + IFQ_POLL_NOLOCK(&ifp->if_snd, mb); + for (*(int *)data = 0; mb != NULL; + mb = mb->m_next) *(int *)data += mb->m_len; + IFQ_UNLOCK(&ifp->if_snd); } else *(int *)data = 0; - splx(s); break; case FIOSETOWN: @@ -794,10 +778,6 @@ tapioctl(struct cdev *dev, u_long cmd, c /* VMware/VMnet port ioctl's */ - case SIOCGIFFLAGS: /* get ifnet flags */ - bcopy(&ifp->if_flags, data, sizeof(ifp->if_flags)); - break; - #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD4) case _IO('V', 0): @@ -811,9 +791,9 @@ tapioctl(struct cdev *dev, u_long cmd, c f &= ~IFF_CANTCHANGE; f |= IFF_UP; - s = splimp(); + mtx_lock(&tp->tap_mtx); ifp->if_flags = f | (ifp->if_flags & IFF_CANTCHANGE); - splx(s); + mtx_unlock(&tp->tap_mtx); break; case OSIOCGIFADDR: /* get MAC address of the remote side */ @@ -848,7 +828,7 @@ tapread(struct cdev *dev, struct uio *ui struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; struct mbuf *m = NULL; - int error = 0, len, s; + int error = 0, len; TAPDEBUG("%s reading, minor = %#x\n", ifp->if_xname, minor(dev)); @@ -864,26 +844,27 @@ tapread(struct cdev *dev, struct uio *ui } tp->tap_flags &= ~TAP_RWAIT; - mtx_unlock(&tp->tap_mtx); /* sleep until we get a packet */ do { - s = splimp(); IF_DEQUEUE(&ifp->if_snd, m); - splx(s); if (m == NULL) { - if (flag & O_NONBLOCK) + if (flag & O_NONBLOCK) { + mtx_unlock(&tp->tap_mtx); return (EWOULDBLOCK); + } - mtx_lock(&tp->tap_mtx); tp->tap_flags |= TAP_RWAIT; - mtx_unlock(&tp->tap_mtx); - error = tsleep(tp,PCATCH|(PZERO+1),"taprd",0); - if (error) + error = mtx_sleep(tp, &tp->tap_mtx, PCATCH | (PZERO + 1), + "taprd", 0); + if (error) { + mtx_unlock(&tp->tap_mtx); return (error); + } } } while (m == NULL); + mtx_unlock(&tp->tap_mtx); /* feed packet to bpf */ BPF_MTAP(ifp, m); @@ -979,14 +960,14 @@ tappoll(struct cdev *dev, int events, st { struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; - int s, revents = 0; + int revents = 0; TAPDEBUG("%s polling, minor = %#x\n", ifp->if_xname, minor(dev)); - s = splimp(); if (events & (POLLIN | POLLRDNORM)) { - if (ifp->if_snd.ifq_len > 0) { + IFQ_LOCK(&ifp->if_snd); + if (!IFQ_IS_EMPTY(&ifp->if_snd)) { TAPDEBUG("%s have data in queue. len = %d, " \ "minor = %#x\n", ifp->if_xname, ifp->if_snd.ifq_len, minor(dev)); @@ -998,12 +979,12 @@ tappoll(struct cdev *dev, int events, st selrecord(td, &tp->tap_rsel); } + IFQ_UNLOCK(&ifp->if_snd); } if (events & (POLLOUT | POLLWRNORM)) revents |= (events & (POLLOUT | POLLWRNORM)); - splx(s); return (revents); } /* tappoll */ @@ -1016,11 +997,9 @@ tappoll(struct cdev *dev, int events, st static int tapkqfilter(struct cdev *dev, struct knote *kn) { - int s; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; - s = splimp(); switch (kn->kn_filter) { case EVFILT_READ: TAPDEBUG("%s kqfilter: EVFILT_READ, minor = %#x\n", @@ -1037,13 +1016,11 @@ tapkqfilter(struct cdev *dev, struct kno default: TAPDEBUG("%s kqfilter: invalid filter, minor = %#x\n", ifp->if_xname, minor(dev)); - splx(s); return (EINVAL); /* NOT REACHED */ } - splx(s); - kn->kn_hook = (caddr_t) dev; + kn->kn_hook = tp; knlist_add(&tp->tap_rsel.si_note, kn, 0); return (0); @@ -1058,12 +1035,11 @@ tapkqfilter(struct cdev *dev, struct kno static int tapkqread(struct knote *kn, long hint) { - int ret, s; - struct cdev *dev = (struct cdev *)(kn->kn_hook); - struct tap_softc *tp = dev->si_drv1; + int ret; + struct tap_softc *tp = kn->kn_hook; + struct cdev *dev = tp->tap_dev; struct ifnet *ifp = tp->tap_ifp; - s = splimp(); if ((kn->kn_data = ifp->if_snd.ifq_len) > 0) { TAPDEBUG("%s have data in queue. len = %d, minor = %#x\n", ifp->if_xname, ifp->if_snd.ifq_len, minor(dev)); @@ -1073,7 +1049,6 @@ tapkqread(struct knote *kn, long hint) ifp->if_xname, minor(dev)); ret = 0; } - splx(s); return (ret); } /* tapkqread */ @@ -1087,13 +1062,10 @@ tapkqread(struct knote *kn, long hint) static int tapkqwrite(struct knote *kn, long hint) { - int s; - struct tap_softc *tp = ((struct cdev *) kn->kn_hook)->si_drv1; + struct tap_softc *tp = kn->kn_hook; struct ifnet *ifp = tp->tap_ifp; - s = splimp(); kn->kn_data = ifp->if_mtu; - splx(s); return (1); } /* tapkqwrite */ @@ -1102,7 +1074,7 @@ tapkqwrite(struct knote *kn, long hint) static void tapkqdetach(struct knote *kn) { - struct tap_softc *tp = ((struct cdev *) kn->kn_hook)->si_drv1; + struct tap_softc *tp = kn->kn_hook; knlist_remove(&tp->tap_rsel.si_note, kn, 0); } /* tapkqdetach */ Modified: stable/7/sys/net/if_tun.c ============================================================================== --- stable/7/sys/net/if_tun.c Tue Oct 12 16:08:20 2010 (r213726) +++ stable/7/sys/net/if_tun.c Tue Oct 12 16:09:08 2010 (r213727) @@ -162,7 +162,7 @@ static struct filterops tun_write_filter static struct cdevsw tun_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDGIANT, + .d_flags = D_PSEUDO, .d_open = tunopen, .d_close = tunclose, .d_read = tunread, @@ -333,13 +333,13 @@ tunstart(struct ifnet *ifp) tp->tun_flags &= ~TUN_RWAIT; wakeup(tp); } + selwakeuppri(&tp->tun_rsel, PZERO + 1); + KNOTE_LOCKED(&tp->tun_rsel.si_note, 0); if (tp->tun_flags & TUN_ASYNC && tp->tun_sigio) { mtx_unlock(&tp->tun_mtx); pgsigio(&tp->tun_sigio, SIGIO, 0); } else mtx_unlock(&tp->tun_mtx); - selwakeuppri(&tp->tun_rsel, PZERO + 1); - KNOTE_UNLOCKED(&tp->tun_rsel.si_note, 0); } /* XXX: should return an error code so it can fail. */ @@ -373,7 +373,7 @@ tuncreate(const char *name, struct cdev IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = 0; IFQ_SET_READY(&ifp->if_snd); - knlist_init_mtx(&sc->tun_rsel.si_note, NULL); + knlist_init_mtx(&sc->tun_rsel.si_note, &sc->tun_mtx); if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); @@ -412,9 +412,9 @@ tunopen(struct cdev *dev, int flag, int tp->tun_pid = td->td_proc->p_pid; tp->tun_flags |= TUN_OPEN; - mtx_unlock(&tp->tun_mtx); ifp = TUN2IFP(tp); TUNDEBUG(ifp, "open\n"); + mtx_unlock(&tp->tun_mtx); return (0); } @@ -428,7 +428,6 @@ tunclose(struct cdev *dev, int foo, int { struct tun_softc *tp; struct ifnet *ifp; - int s; tp = dev->si_drv1; ifp = TUN2IFP(tp); @@ -440,22 +439,20 @@ tunclose(struct cdev *dev, int foo, int /* * junk all pending output */ - s = splimp(); IFQ_PURGE(&ifp->if_snd); - splx(s); - mtx_unlock(&tp->tun_mtx); if (ifp->if_flags & IFF_UP) { - s = splimp(); + mtx_unlock(&tp->tun_mtx); if_down(ifp); - splx(s); + mtx_lock(&tp->tun_mtx); } /* Delete all addresses and routes which reference this interface. */ if (ifp->if_drv_flags & IFF_DRV_RUNNING) { struct ifaddr *ifa; - s = splimp(); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + mtx_unlock(&tp->tun_mtx); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { /* deal w/IPv4 PtP destination; unlocked read */ if (ifa->ifa_addr->sa_family == AF_INET) { @@ -466,14 +463,14 @@ tunclose(struct cdev *dev, int foo, int } } if_purgeaddrs(ifp); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - splx(s); + mtx_lock(&tp->tun_mtx); } funsetown(&tp->tun_sigio); selwakeuppri(&tp->tun_rsel, PZERO + 1); - KNOTE_UNLOCKED(&tp->tun_rsel.si_note, 0); + KNOTE_LOCKED(&tp->tun_rsel.si_note, 0); TUNDEBUG (ifp, "closed\n"); + mtx_unlock(&tp->tun_mtx); return (0); } @@ -481,11 +478,14 @@ static int tuninit(struct ifnet *ifp) { struct tun_softc *tp = ifp->if_softc; +#ifdef INET struct ifaddr *ifa; +#endif int error = 0; TUNDEBUG(ifp, "tuninit\n"); + mtx_lock(&tp->tun_mtx); ifp->if_flags |= IFF_UP; ifp->if_drv_flags |= IFF_DRV_RUNNING; getmicrotime(&ifp->if_lastchange); @@ -496,17 +496,16 @@ tuninit(struct ifnet *ifp) struct sockaddr_in *si; si = (struct sockaddr_in *)ifa->ifa_addr; - mtx_lock(&tp->tun_mtx); if (si->sin_addr.s_addr) tp->tun_flags |= TUN_IASET; si = (struct sockaddr_in *)ifa->ifa_dstaddr; if (si && si->sin_addr.s_addr) tp->tun_flags |= TUN_DSTADDR; - mtx_unlock(&tp->tun_mtx); } } #endif + mtx_unlock(&tp->tun_mtx); return (error); } @@ -519,9 +518,8 @@ tunifioctl(struct ifnet *ifp, u_long cmd struct ifreq *ifr = (struct ifreq *)data; struct tun_softc *tp = ifp->if_softc; struct ifstat *ifs; - int error = 0, s; + int error = 0; - s = splimp(); switch(cmd) { case SIOCGIFSTATUS: ifs = (struct ifstat *)data; @@ -550,7 +548,6 @@ tunifioctl(struct ifnet *ifp, u_long cmd default: error = EINVAL; } - splx(s); return (error); } @@ -656,7 +653,6 @@ tunoutput( static int tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { - int s; int error; struct tun_softc *tp = dev->si_drv1; struct tuninfo *tunp; @@ -671,15 +667,19 @@ tunioctl(struct cdev *dev, u_long cmd, c if (error) return (error); } + mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_mtu = tunp->mtu; TUN2IFP(tp)->if_type = tunp->type; TUN2IFP(tp)->if_baudrate = tunp->baudrate; + mtx_unlock(&tp->tun_mtx); break; case TUNGIFINFO: tunp = (struct tuninfo *)data; + mtx_lock(&tp->tun_mtx); tunp->mtu = TUN2IFP(tp)->if_mtu; tunp->type = TUN2IFP(tp)->if_type; tunp->baudrate = TUN2IFP(tp)->if_baudrate; + mtx_unlock(&tp->tun_mtx); break; case TUNSDEBUG: tundebug = *(int *)data; @@ -706,7 +706,6 @@ tunioctl(struct cdev *dev, u_long cmd, c mtx_unlock(&tp->tun_mtx); break; case TUNGIFHEAD: - /* Could be unlocked read? */ mtx_lock(&tp->tun_mtx); *(int *)data = (tp->tun_flags & TUN_IFHEAD) ? 1 : 0; mtx_unlock(&tp->tun_mtx); @@ -719,9 +718,11 @@ tunioctl(struct cdev *dev, u_long cmd, c switch (*(int *)data & ~IFF_MULTICAST) { case IFF_POINTOPOINT: case IFF_BROADCAST: + mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_flags &= ~(IFF_BROADCAST|IFF_POINTOPOINT|IFF_MULTICAST); TUN2IFP(tp)->if_flags |= *(int *)data; + mtx_unlock(&tp->tun_mtx); break; default: return(EINVAL); @@ -743,17 +744,15 @@ tunioctl(struct cdev *dev, u_long cmd, c mtx_unlock(&tp->tun_mtx); break; case FIONREAD: - s = splimp(); if (!IFQ_IS_EMPTY(&TUN2IFP(tp)->if_snd)) { struct mbuf *mb; IFQ_LOCK(&TUN2IFP(tp)->if_snd); IFQ_POLL_NOLOCK(&TUN2IFP(tp)->if_snd, mb); - for( *(int *)data = 0; mb != 0; mb = mb->m_next) + for (*(int *)data = 0; mb != NULL; mb = mb->m_next) *(int *)data += mb->m_len; IFQ_UNLOCK(&TUN2IFP(tp)->if_snd); } else *(int *)data = 0; - splx(s); break; case FIOSETOWN: return (fsetown(*(int *)data, &tp->tun_sigio)); @@ -787,7 +786,7 @@ tunread(struct cdev *dev, struct uio *ui struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = TUN2IFP(tp); struct mbuf *m; - int error=0, len, s; + int error=0, len; TUNDEBUG (ifp, "read\n"); mtx_lock(&tp->tun_mtx); @@ -798,27 +797,24 @@ tunread(struct cdev *dev, struct uio *ui } tp->tun_flags &= ~TUN_RWAIT; - mtx_unlock(&tp->tun_mtx); - s = splimp(); do { IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) { if (flag & O_NONBLOCK) { - splx(s); + mtx_unlock(&tp->tun_mtx); return (EWOULDBLOCK); } - mtx_lock(&tp->tun_mtx); tp->tun_flags |= TUN_RWAIT; - mtx_unlock(&tp->tun_mtx); - if ((error = tsleep(tp, PCATCH | (PZERO + 1), - "tunread", 0)) != 0) { - splx(s); + error = mtx_sleep(tp, &tp->tun_mtx, PCATCH | (PZERO + 1), + "tunread", 0); + if (error != 0) { + mtx_unlock(&tp->tun_mtx); return (error); } } } while (m == NULL); - splx(s); + mtx_unlock(&tp->tun_mtx); while (m && uio->uio_resid > 0 && error == 0) { len = min(uio->uio_resid, m->m_len); @@ -929,13 +925,11 @@ tunwrite(struct cdev *dev, struct uio *u static int tunpoll(struct cdev *dev, int events, struct thread *td) { - int s; struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = TUN2IFP(tp); int revents = 0; struct mbuf *m; - s = splimp(); TUNDEBUG(ifp, "tunpoll\n"); if (events & (POLLIN | POLLRDNORM)) { @@ -953,7 +947,6 @@ tunpoll(struct cdev *dev, int events, st if (events & (POLLOUT | POLLWRNORM)) revents |= events & (POLLOUT | POLLWRNORM); - splx(s); return (revents); } @@ -963,11 +956,9 @@ tunpoll(struct cdev *dev, int events, st static int tunkqfilter(struct cdev *dev, struct knote *kn) { - int s; struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = TUN2IFP(tp); - s = splimp(); switch(kn->kn_filter) { case EVFILT_READ: TUNDEBUG(ifp, "%s kqfilter: EVFILT_READ, minor = %#x\n", @@ -984,12 +975,10 @@ tunkqfilter(struct cdev *dev, struct kno default: TUNDEBUG(ifp, "%s kqfilter: invalid filter, minor = %#x\n", ifp->if_xname, minor(dev)); - splx(s); return(EINVAL); } - splx(s); - kn->kn_hook = (caddr_t) dev; + kn->kn_hook = tp; knlist_add(&tp->tun_rsel.si_note, kn, 0); return (0); @@ -1001,12 +990,11 @@ tunkqfilter(struct cdev *dev, struct kno static int tunkqread(struct knote *kn, long hint) { - int ret, s; - struct cdev *dev = (struct cdev *)(kn->kn_hook); - struct tun_softc *tp = dev->si_drv1; + int ret; + struct tun_softc *tp = kn->kn_hook; + struct cdev *dev = tp->tun_dev; struct ifnet *ifp = TUN2IFP(tp); - s = splimp(); if ((kn->kn_data = ifp->if_snd.ifq_len) > 0) { TUNDEBUG(ifp, "%s have data in the queue. Len = %d, minor = %#x\n", @@ -1018,7 +1006,6 @@ tunkqread(struct knote *kn, long hint) minor(dev)); ret = 0; } - splx(s); return (ret); } @@ -1029,13 +1016,10 @@ tunkqread(struct knote *kn, long hint) static int tunkqwrite(struct knote *kn, long hint) { - int s; - struct tun_softc *tp = ((struct cdev *)kn->kn_hook)->si_drv1; + struct tun_softc *tp = kn->kn_hook; struct ifnet *ifp = TUN2IFP(tp); - s = splimp(); kn->kn_data = ifp->if_mtu; - splx(s); return (1); } @@ -1043,7 +1027,7 @@ tunkqwrite(struct knote *kn, long hint) static void tunkqdetach(struct knote *kn) { - struct tun_softc *tp = ((struct cdev *)kn->kn_hook)->si_drv1; + struct tun_softc *tp = kn->kn_hook; knlist_remove(&tp->tun_rsel.si_note, kn, 0); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 16:23:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72CC910656A6; Tue, 12 Oct 2010 16:23:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60A748FC21; Tue, 12 Oct 2010 16:23:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CGNo0Q053330; Tue, 12 Oct 2010 16:23:50 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CGNooX053328; Tue, 12 Oct 2010 16:23:50 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121623.o9CGNooX053328@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 16:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213728 - stable/8/sys/dev/ral X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 16:23:50 -0000 Author: jhb Date: Tue Oct 12 16:23:50 2010 New Revision: 213728 URL: http://svn.freebsd.org/changeset/base/213728 Log: MFC 213268: If rt2560_bbp_init() fails, don't drop the lock as the callers of rt2560_init_locked() expect the lock to be held on return. Modified: stable/8/sys/dev/ral/rt2560.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ral/rt2560.c ============================================================================== --- stable/8/sys/dev/ral/rt2560.c Tue Oct 12 16:09:08 2010 (r213727) +++ stable/8/sys/dev/ral/rt2560.c Tue Oct 12 16:23:50 2010 (r213728) @@ -2667,8 +2667,7 @@ rt2560_init_locked(struct rt2560_softc * RAL_WRITE(sc, RT2560_CSR1, RT2560_HOST_READY); if (rt2560_bbp_init(sc) != 0) { - rt2560_stop(sc); - RAL_UNLOCK(sc); + rt2560_stop_locked(sc); return; } From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 16:52:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94939106564A; Tue, 12 Oct 2010 16:52:13 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 822528FC17; Tue, 12 Oct 2010 16:52:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CGqDjZ054009; Tue, 12 Oct 2010 16:52:13 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CGqDWd054006; Tue, 12 Oct 2010 16:52:13 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201010121652.o9CGqDWd054006@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 12 Oct 2010 16:52:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213729 - head/sys/dev/iwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 16:52:13 -0000 Author: bschmidt Date: Tue Oct 12 16:52:13 2010 New Revision: 213729 URL: http://svn.freebsd.org/changeset/base/213729 Log: Fix monitor mode which is implemented by doing a firmware scan. This is a port of stable/6, seems like the code got lost during the background scan changes in r170530. Pointed out by: danfe MFC after: 2 weeks Modified: head/sys/dev/iwi/if_iwi.c head/sys/dev/iwi/if_iwivar.h Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Tue Oct 12 16:23:50 2010 (r213728) +++ head/sys/dev/iwi/if_iwi.c Tue Oct 12 16:52:13 2010 (r213729) @@ -180,6 +180,7 @@ static void iwi_release_fw_dma(struct iw static int iwi_config(struct iwi_softc *); static int iwi_get_firmware(struct iwi_softc *, enum ieee80211_opmode); static void iwi_put_firmware(struct iwi_softc *); +static void iwi_monitor_scan(void *, int); static int iwi_scanchan(struct iwi_softc *, unsigned long, int); static void iwi_scan_start(struct ieee80211com *); static void iwi_scan_end(struct ieee80211com *); @@ -292,6 +293,7 @@ iwi_attach(device_t dev) TASK_INIT(&sc->sc_restarttask, 0, iwi_restart, sc); TASK_INIT(&sc->sc_disassoctask, 0, iwi_disassoc, sc); TASK_INIT(&sc->sc_wmetask, 0, iwi_update_wme, sc); + TASK_INIT(&sc->sc_monitortask, 0, iwi_monitor_scan, sc); callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_rftimer, &sc->sc_mtx, 0); @@ -460,6 +462,7 @@ iwi_detach(device_t dev) ieee80211_draintask(ic, &sc->sc_radiofftask); ieee80211_draintask(ic, &sc->sc_restarttask); ieee80211_draintask(ic, &sc->sc_disassoctask); + ieee80211_draintask(ic, &sc->sc_monitortask); iwi_stop(sc); @@ -988,7 +991,8 @@ iwi_newstate(struct ieee80211vap *vap, e * This is all totally bogus and needs to be redone. */ iwi_auth_and_assoc(sc, vap); - } + } else if (vap->iv_opmode == IEEE80211_M_MONITOR) + ieee80211_runtask(ic, &sc->sc_monitortask); break; case IEEE80211_S_ASSOC: /* @@ -1407,6 +1411,18 @@ iwi_notification_intr(struct iwi_softc * IWI_STATE_END(sc, IWI_FW_SCANNING); + /* + * Monitor mode works by doing a passive scan to set + * the channel and enable rx. Because we don't want + * to abort a scan lest the firmware crash we scan + * for a short period of time and automatically restart + * the scan when notified the sweep has completed. + */ + if (vap->iv_opmode == IEEE80211_M_MONITOR) { + ieee80211_runtask(ic, &sc->sc_monitortask); + break; + } + if (scan->status == IWI_SCAN_COMPLETED) { /* NB: don't need to defer, net80211 does it for us */ ieee80211_scan_next(vap); @@ -2557,6 +2573,11 @@ iwi_config(struct iwi_softc *sc) config.answer_pbreq = (ic->ic_opmode == IEEE80211_M_IBSS) ? 1 : 0; config.disable_unicast_decryption = 1; config.disable_multicast_decryption = 1; + if (ic->ic_opmode == IEEE80211_M_MONITOR) { + config.allow_invalid_frames = 1; + config.allow_beacon_and_probe_resp = 1; + config.allow_mgt = 1; + } DPRINTF(("Configuring adapter\n")); error = iwi_cmd(sc, IWI_CMD_SET_CONFIG, &config, sizeof config); if (error != 0) @@ -2642,6 +2663,17 @@ scan_band(const struct ieee80211_channel return IEEE80211_IS_CHAN_5GHZ(c) ? IWI_CHAN_5GHZ : IWI_CHAN_2GHZ; } +static void +iwi_monitor_scan(void *arg, int npending) +{ + struct iwi_softc *sc = arg; + IWI_LOCK_DECL; + + IWI_LOCK(sc); + (void) iwi_scanchan(sc, 2000, 0); + IWI_UNLOCK(sc); +} + /* * Start a scan on the current channel or all channels. */ Modified: head/sys/dev/iwi/if_iwivar.h ============================================================================== --- head/sys/dev/iwi/if_iwivar.h Tue Oct 12 16:23:50 2010 (r213728) +++ head/sys/dev/iwi/if_iwivar.h Tue Oct 12 16:52:13 2010 (r213729) @@ -193,6 +193,7 @@ struct iwi_softc { struct task sc_restarttask; /* restart adapter processing */ struct task sc_disassoctask; struct task sc_wmetask; /* set wme parameters */ + struct task sc_monitortask; unsigned int sc_softled : 1, /* enable LED gpio status */ sc_ledstate: 1, /* LED on/off state */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:04:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ADBA1065694; Tue, 12 Oct 2010 17:04:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9CD8FC0C; Tue, 12 Oct 2010 17:04:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CH4M73054349; Tue, 12 Oct 2010 17:04:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CH4Mde054347; Tue, 12 Oct 2010 17:04:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010121704.o9CH4Mde054347@svn.freebsd.org> From: Andriy Gapon Date: Tue, 12 Oct 2010 17:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213730 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 17:04:22 -0000 Author: avg Date: Tue Oct 12 17:04:21 2010 New Revision: 213730 URL: http://svn.freebsd.org/changeset/base/213730 Log: zfs + sendfile: do not produce partially valid pages for vnode's tail Since r212650 and before this change sendfile(2) could produce a partially valid page for a trailing portion of a ZFS vnode. vm_fault() always wants to see a fully valid page even if it's the last page that partially extends beyond vnode's end. Otherwise it calls vop_getpages() to bring in the page. In the case of ZFS this means that the data is read from the page into the same page and this breaks checks in ZFS mappedread() - a thread that set VPO_BUSY on the page in vm_fault() will get blocked forever waiting for it to be cleared. Many thanks to Kai and Jeremy for reproducing the issue and providing important debugging information and help. Reported by: Kai Gallasch , Jeremy Chadwick Tested by: Kai Gallasch , Jeremy Chadwick Reviewed by: kib MFC after: 3 days To-Do: apply the same treatment to tmpfs + sendfile Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 12 16:52:13 2010 (r213729) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 12 17:04:21 2010 (r213730) @@ -489,6 +489,8 @@ again: * but it pessimize performance of sendfile/UFS, that's * why I handle this special case in ZFS code. */ + KASSERT(off == 0, + ("unexpected offset in mappedread for sendfile")); if ((m->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and @@ -509,14 +511,15 @@ again: } if (error == 0) { va = zfs_map_page(m, &sf); - error = dmu_read(os, zp->z_id, start + off, - bytes, (void *)(va + off), + error = dmu_read(os, zp->z_id, start, bytes, va, DMU_READ_PREFETCH); + if (bytes != PAGE_SIZE) + bzero(va + bytes, PAGE_SIZE - bytes); zfs_unmap_page(sf); } VM_OBJECT_LOCK(obj); if (error == 0) - vm_page_set_valid(m, off, bytes); + m->valid = VM_PAGE_BITS_ALL; vm_page_wakeup(m); if (error == 0) { uio->uio_resid -= bytes; From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:09:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38DAE1065672; Tue, 12 Oct 2010 17:09:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26A1A8FC15; Tue, 12 Oct 2010 17:09:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CH9Y1r054514; Tue, 12 Oct 2010 17:09:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CH9YOf054512; Tue, 12 Oct 2010 17:09:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121709.o9CH9YOf054512@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 17:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213731 - stable/7/contrib/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 17:09:34 -0000 Author: jhb Date: Tue Oct 12 17:09:33 2010 New Revision: 213731 URL: http://svn.freebsd.org/changeset/base/213731 Log: MFC 194070: Remove semicolon that should not have been there. Modified: stable/7/contrib/csup/rcsfile.c Directory Properties: stable/7/contrib/csup/ (props changed) Modified: stable/7/contrib/csup/rcsfile.c ============================================================================== --- stable/7/contrib/csup/rcsfile.c Tue Oct 12 17:04:21 2010 (r213730) +++ stable/7/contrib/csup/rcsfile.c Tue Oct 12 17:09:33 2010 (r213731) @@ -730,7 +730,7 @@ rcsfile_print(struct rcsfile *rf) lprintf(1, "Strict!\n"); if (rf->comment != NULL) lprintf(1, "comment: '%s'\n", rf->comment); - if (rf->expand != EXPAND_DEFAULT); + if (rf->expand != EXPAND_DEFAULT) lprintf(1, "expand: '%s'\n", keyword_encode_expand(rf->expand)); /* Print all deltas. */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:12:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 575841065670; Tue, 12 Oct 2010 17:12:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451DD8FC1C; Tue, 12 Oct 2010 17:12:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CHCDrm054635; Tue, 12 Oct 2010 17:12:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CHCDV9054633; Tue, 12 Oct 2010 17:12:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121712.o9CHCDV9054633@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 17:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213732 - stable/8/contrib/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 17:12:13 -0000 Author: jhb Date: Tue Oct 12 17:12:13 2010 New Revision: 213732 URL: http://svn.freebsd.org/changeset/base/213732 Log: MFC 213300: If an RCS file is truncated, rcsfile_getdelta() will return NULL. Instead of faulting, check for NULL. However, returning an error would cause csup to just abort the entire update. Instead, break out of the loop and return ok. The attempts to update the file will trigger a MD5 failure which will cause csup to download the entire file as a fixup. Modified: stable/8/contrib/csup/rcsparse.c Directory Properties: stable/8/contrib/csup/ (props changed) Modified: stable/8/contrib/csup/rcsparse.c ============================================================================== --- stable/8/contrib/csup/rcsparse.c Tue Oct 12 17:09:33 2010 (r213731) +++ stable/8/contrib/csup/rcsparse.c Tue Oct 12 17:12:13 2010 (r213732) @@ -318,6 +318,14 @@ parse_deltatexts(struct rcsfile *rf, yys d = rcsfile_getdelta(rf, revnum); free(revnum); + /* + * XXX: The RCS file is corrupt, but lie and say it is ok. + * If it is actually broken, then the MD5 mismatch will + * trigger a fixup. + */ + if (d == NULL) + return (0); + /* log string */ asserttoken(sp, KEYWORD); asserttoken(sp, STRING); From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:12:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0C0510656A9; Tue, 12 Oct 2010 17:12:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEA308FC3F; Tue, 12 Oct 2010 17:12:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CHCMQD054674; Tue, 12 Oct 2010 17:12:22 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CHCMHs054672; Tue, 12 Oct 2010 17:12:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201010121712.o9CHCMHs054672@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Oct 2010 17:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213733 - stable/7/contrib/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 17:12:23 -0000 Author: jhb Date: Tue Oct 12 17:12:22 2010 New Revision: 213733 URL: http://svn.freebsd.org/changeset/base/213733 Log: MFC 213300: If an RCS file is truncated, rcsfile_getdelta() will return NULL. Instead of faulting, check for NULL. However, returning an error would cause csup to just abort the entire update. Instead, break out of the loop and return ok. The attempts to update the file will trigger a MD5 failure which will cause csup to download the entire file as a fixup. Modified: stable/7/contrib/csup/rcsparse.c Directory Properties: stable/7/contrib/csup/ (props changed) Modified: stable/7/contrib/csup/rcsparse.c ============================================================================== --- stable/7/contrib/csup/rcsparse.c Tue Oct 12 17:12:13 2010 (r213732) +++ stable/7/contrib/csup/rcsparse.c Tue Oct 12 17:12:22 2010 (r213733) @@ -318,6 +318,14 @@ parse_deltatexts(struct rcsfile *rf, yys d = rcsfile_getdelta(rf, revnum); free(revnum); + /* + * XXX: The RCS file is corrupt, but lie and say it is ok. + * If it is actually broken, then the MD5 mismatch will + * trigger a fixup. + */ + if (d == NULL) + return (0); + /* log string */ asserttoken(sp, KEYWORD); asserttoken(sp, STRING); From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:12:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B11C1065698; Tue, 12 Oct 2010 17:12:35 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88C938FC4D; Tue, 12 Oct 2010 17:12:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CHCZx2054715; Tue, 12 Oct 2010 17:12:35 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CHCZKK054713; Tue, 12 Oct 2010 17:12:35 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201010121712.o9CHCZKK054713@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 12 Oct 2010 17:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213734 - stable/7/sys/dev/iwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 17:12:35 -0000 Author: bschmidt Date: Tue Oct 12 17:12:35 2010 New Revision: 213734 URL: http://svn.freebsd.org/changeset/base/213734 Log: When bringing the interface down we clear the command queue but do not reset the sc_cmd_cur and sc_cmd_next indices. If there are still pending commands while clearing the queue those two indices are off by at least one. This leads to no commands being sent to the firmware until the queue overruns. Fix this by also resetting the indices. This is a direct commit as the code does not exist in head. Modified: stable/7/sys/dev/iwi/if_iwi.c Modified: stable/7/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/7/sys/dev/iwi/if_iwi.c Tue Oct 12 17:12:22 2010 (r213733) +++ stable/7/sys/dev/iwi/if_iwi.c Tue Oct 12 17:12:35 2010 (r213734) @@ -3267,6 +3267,7 @@ iwi_stop(void *priv) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); memset(sc->sc_cmd, 0, sizeof(sc->sc_cmd)); + sc->sc_cmd_cur = sc->sc_cmd_next = 0; sc->sc_tx_timer = 0; sc->sc_rfkill_timer = 0; sc->sc_state_timer = 0; From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:16:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BD9A106566C; Tue, 12 Oct 2010 17:16:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6648FC1B; Tue, 12 Oct 2010 17:16:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CHGpPe054835; Tue, 12 Oct 2010 17:16:51 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CHGp9W054833; Tue, 12 Oct 2010 17:16:51 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010121716.o9CHGp9W054833@svn.freebsd.org> From: Andriy Gapon Date: Tue, 12 Oct 2010 17:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213735 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 17:16:51 -0000 Author: avg Date: Tue Oct 12 17:16:51 2010 New Revision: 213735 URL: http://svn.freebsd.org/changeset/base/213735 Log: tmpfs + sendfile: do not produce partially valid pages for vnode's tail See r213730 for details of analogous change in ZFS. MFC after: 3 days Modified: head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Tue Oct 12 17:12:35 2010 (r213734) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Tue Oct 12 17:16:51 2010 (r213735) @@ -538,6 +538,8 @@ lookupvpg: VM_OBJECT_UNLOCK(vobj); return (error); } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) { + KASSERT(offset == 0, + ("unexpected offset in tmpfs_mappedread for sendfile")); if ((m->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and sleeping so @@ -553,9 +555,10 @@ lookupvpg: sched_pin(); sf = sf_buf_alloc(m, SFB_CPUPRIVATE); ma = (char *)sf_buf_kva(sf); - error = tmpfs_nocacheread_buf(tobj, idx, offset, tlen, - ma + offset); + error = tmpfs_nocacheread_buf(tobj, idx, 0, tlen, ma); if (error == 0) { + if (tlen != PAGE_SIZE) + bzero(ma + tlen, PAGE_SIZE - tlen); uio->uio_offset += tlen; uio->uio_resid -= tlen; } @@ -563,7 +566,7 @@ lookupvpg: sched_unpin(); VM_OBJECT_LOCK(vobj); if (error == 0) - vm_page_set_valid(m, offset, tlen); + m->valid = VM_PAGE_BITS_ALL; vm_page_wakeup(m); VM_OBJECT_UNLOCK(vobj); return (error); From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:40:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81EC2106564A; Tue, 12 Oct 2010 17:40:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64C508FC15; Tue, 12 Oct 2010 17:40:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CHejDA055342; Tue, 12 Oct 2010 17:40:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CHejUr055340; Tue, 12 Oct 2010 17:40:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010121740.o9CHejUr055340@svn.freebsd.org> From: Andriy Gapon Date: Tue, 12 Oct 2010 17:40:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213736 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 17:40:45 -0000 Author: avg Date: Tue Oct 12 17:40:45 2010 New Revision: 213736 URL: http://svn.freebsd.org/changeset/base/213736 Log: generic_stop_cpus: prevent parallel execution This is based on the same approach as used in panic(). In theory parallel execution of generic_stop_cpus() could lead to two CPUs stopping each other and everyone else, and thus a total system halt. Also, in theory, we should have some smarter locking here, because two (or more CPUs) could be stopping unrelated sets of CPUs. But in practice, it seems, this function is only used to stop "all other" CPUs. Additionally, I took this opportunity to make amd64-specific suspend_cpus() function use generic_stop_cpus() instead of rolling out essentially duplicate code. This code is based on code by Sandvine Incorporated. Suggested by: mdf Reviewed by: jhb, jkim (earlier version) MFC after: 2 weeks Modified: head/sys/kern/subr_smp.c Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Tue Oct 12 17:16:51 2010 (r213735) +++ head/sys/kern/subr_smp.c Tue Oct 12 17:40:45 2010 (r213736) @@ -198,22 +198,32 @@ forward_signal(struct thread *td) * 0: NA * 1: ok * - * XXX FIXME: this is not MP-safe, needs a lock to prevent multiple CPUs - * from executing at same time. */ static int generic_stop_cpus(cpumask_t map, u_int type) { + static volatile u_int stopping_cpu = NOCPU; int i; - KASSERT(type == IPI_STOP || type == IPI_STOP_HARD, + KASSERT( +#if defined(__amd64__) + type == IPI_STOP || type == IPI_STOP_HARD || type == IPI_SUSPEND, +#else + type == IPI_STOP || type == IPI_STOP_HARD, +#endif ("%s: invalid stop type", __func__)); if (!smp_started) - return 0; + return (0); CTR2(KTR_SMP, "stop_cpus(%x) with %u type", map, type); + if (stopping_cpu != PCPU_GET(cpuid)) + while (atomic_cmpset_int(&stopping_cpu, NOCPU, + PCPU_GET(cpuid)) == 0) + while (stopping_cpu != NOCPU) + cpu_spinwait(); /* spin */ + /* send the stop IPI to all CPUs in map */ ipi_selected(map, type); @@ -230,7 +240,8 @@ generic_stop_cpus(cpumask_t map, u_int t #endif } - return 1; + stopping_cpu = NOCPU; + return (1); } int @@ -248,50 +259,11 @@ stop_cpus_hard(cpumask_t map) } #if defined(__amd64__) -/* - * When called the executing CPU will send an IPI to all other CPUs - * requesting that they halt execution. - * - * Usually (but not necessarily) called with 'other_cpus' as its arg. - * - * - Signals all CPUs in map to suspend. - * - Waits for each to suspend. - * - * Returns: - * -1: error - * 0: NA - * 1: ok - * - * XXX FIXME: this is not MP-safe, needs a lock to prevent multiple CPUs - * from executing at same time. - */ int suspend_cpus(cpumask_t map) { - int i; - if (!smp_started) - return (0); - - CTR1(KTR_SMP, "suspend_cpus(%x)", map); - - /* send the suspend IPI to all CPUs in map */ - ipi_selected(map, IPI_SUSPEND); - - i = 0; - while ((stopped_cpus & map) != map) { - /* spin */ - cpu_spinwait(); - i++; -#ifdef DIAGNOSTIC - if (i == 100000) { - printf("timeout suspending cpus\n"); - break; - } -#endif - } - - return (1); + return (generic_stop_cpus(map, IPI_SUSPEND)); } #endif From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:53:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16AE4106566C; Tue, 12 Oct 2010 17:53:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 043738FC1C; Tue, 12 Oct 2010 17:53:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CHr1iD055609; Tue, 12 Oct 2010 17:53:01 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CHr1X3055607; Tue, 12 Oct 2010 17:53:01 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010121753.o9CHr1X3055607@svn.freebsd.org> From: Andriy Gapon Date: Tue, 12 Oct 2010 17:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213737 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 17:53:02 -0000 Author: avg Date: Tue Oct 12 17:53:01 2010 New Revision: 213737 URL: http://svn.freebsd.org/changeset/base/213737 Log: acpi_ec: changes in communication with hardware Short description of the changes: - attempt to retry some commands for which it is possible (read, query) - always make a short sleep before checking EC status in polled mode - periodically poll EC status in interrupt mode - change logic for detecting broken interrupt delivery and falling back to polled mode - check that EC is ready for input before starting a new command, wait if necessary This commit is based on the original patch by David Naylor. PR: kern/150517 Submitted by: David Naylor Reviewed by: jkim MFC after: 3 weeks Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Tue Oct 12 17:40:45 2010 (r213736) +++ head/sys/dev/acpica/acpi_ec.c Tue Oct 12 17:53:01 2010 (r213737) @@ -153,7 +153,7 @@ struct acpi_ec_softc { int ec_glkhandle; int ec_burstactive; int ec_sci_pend; - u_int ec_gencount; + volatile u_int ec_gencount; int ec_suspending; }; @@ -165,7 +165,7 @@ struct acpi_ec_softc { #define EC_LOCK_TIMEOUT 1000 /* Default delay in microseconds between each run of the status polling loop. */ -#define EC_POLL_DELAY 5 +#define EC_POLL_DELAY 50 /* Total time in ms spent waiting for a response from EC. */ #define EC_TIMEOUT 750 @@ -599,12 +599,32 @@ acpi_ec_write_method(device_t dev, u_int return (0); } +static ACPI_STATUS +EcCheckStatus(struct acpi_ec_softc *sc, const char *msg, EC_EVENT event) +{ + ACPI_STATUS status; + EC_STATUS ec_status; + + status = AE_NO_HARDWARE_RESPONSE; + ec_status = EC_GET_CSR(sc); + if (sc->ec_burstactive && !(ec_status & EC_FLAG_BURST_MODE)) { + CTR1(KTR_ACPI, "ec burst disabled in waitevent (%s)", msg); + sc->ec_burstactive = FALSE; + } + if (EVENT_READY(event, ec_status)) { + CTR2(KTR_ACPI, "ec %s wait ready, status %#x", msg, ec_status); + status = AE_OK; + } + return (status); +} + static void EcGpeQueryHandler(void *Context) { struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; UINT8 Data; ACPI_STATUS Status; + int retry; char qxx[5]; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -625,7 +645,16 @@ EcGpeQueryHandler(void *Context) * that may arise from running the query from causing another query * to be queued, we clear the pending flag only after running it. */ - Status = EcCommand(sc, EC_COMMAND_QUERY); + for (retry = 0; retry < 2; retry++) { + Status = EcCommand(sc, EC_COMMAND_QUERY); + if (ACPI_SUCCESS(Status)) + break; + if (EcCheckStatus(sc, "retr_check", + EC_EVENT_INPUT_BUFFER_EMPTY) == AE_OK) + continue; + else + break; + } sc->ec_sci_pend = FALSE; if (ACPI_FAILURE(Status)) { EcUnlock(sc); @@ -678,7 +707,7 @@ EcGpeHandler(void *Context) * address and then data values.) */ atomic_add_int(&sc->ec_gencount, 1); - wakeup(&sc->ec_gencount); + wakeup(&sc); /* * If the EC_SCI bit of the status register is set, queue a query handler. @@ -789,68 +818,27 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY } static ACPI_STATUS -EcCheckStatus(struct acpi_ec_softc *sc, const char *msg, EC_EVENT event) -{ - ACPI_STATUS status; - EC_STATUS ec_status; - - status = AE_NO_HARDWARE_RESPONSE; - ec_status = EC_GET_CSR(sc); - if (sc->ec_burstactive && !(ec_status & EC_FLAG_BURST_MODE)) { - CTR1(KTR_ACPI, "ec burst disabled in waitevent (%s)", msg); - sc->ec_burstactive = FALSE; - } - if (EVENT_READY(event, ec_status)) { - CTR2(KTR_ACPI, "ec %s wait ready, status %#x", msg, ec_status); - status = AE_OK; - } - return (status); -} - -static ACPI_STATUS EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event, u_int gen_count) { + static int no_intr = 0; ACPI_STATUS Status; - int count, i, slp_ival; + int count, i, need_poll, slp_ival; ACPI_SERIAL_ASSERT(ec); Status = AE_NO_HARDWARE_RESPONSE; - int need_poll = cold || rebooting || ec_polled_mode || sc->ec_suspending; - /* - * The main CPU should be much faster than the EC. So the status should - * be "not ready" when we start waiting. But if the main CPU is really - * slow, it's possible we see the current "ready" response. Since that - * can't be distinguished from the previous response in polled mode, - * this is a potential issue. We really should have interrupts enabled - * during boot so there is no ambiguity in polled mode. - * - * If this occurs, we add an additional delay before actually entering - * the status checking loop, hopefully to allow the EC to go to work - * and produce a non-stale status. - */ - if (need_poll) { - static int once; - - if (EcCheckStatus(sc, "pre-check", Event) == AE_OK) { - if (!once) { - device_printf(sc->ec_dev, - "warning: EC done before starting event wait\n"); - once = 1; - } - AcpiOsStall(10); - } - } + need_poll = cold || rebooting || ec_polled_mode || sc->ec_suspending; /* Wait for event by polling or GPE (interrupt). */ if (need_poll) { count = (ec_timeout * 1000) / EC_POLL_DELAY; if (count == 0) count = 1; + DELAY(10); for (i = 0; i < count; i++) { Status = EcCheckStatus(sc, "poll", Event); if (Status == AE_OK) break; - AcpiOsStall(EC_POLL_DELAY); + DELAY(EC_POLL_DELAY); } } else { slp_ival = hz / 1000; @@ -869,34 +857,37 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC * EC query). */ for (i = 0; i < count; i++) { - if (gen_count != sc->ec_gencount) { - /* - * Record new generation count. It's possible the GPE was - * just to notify us that a query is needed and we need to - * wait for a second GPE to signal the completion of the - * event we are actually waiting for. - */ - gen_count = sc->ec_gencount; - Status = EcCheckStatus(sc, "sleep", Event); - if (Status == AE_OK) - break; + if (gen_count == sc->ec_gencount) + tsleep(&sc, 0, "ecgpe", slp_ival); + /* + * Record new generation count. It's possible the GPE was + * just to notify us that a query is needed and we need to + * wait for a second GPE to signal the completion of the + * event we are actually waiting for. + */ + Status = EcCheckStatus(sc, "sleep", Event); + if (Status == AE_OK) { + if (gen_count == sc->ec_gencount) + no_intr++; + else + no_intr = 0; + break; } - tsleep(&sc->ec_gencount, PZERO, "ecgpe", slp_ival); + gen_count = sc->ec_gencount; } /* * We finished waiting for the GPE and it never arrived. Try to * read the register once and trust whatever value we got. This is - * the best we can do at this point. Then, force polled mode on - * since this system doesn't appear to generate GPEs. + * the best we can do at this point. */ - if (Status != AE_OK) { + if (Status != AE_OK) Status = EcCheckStatus(sc, "sleep_end", Event); - device_printf(sc->ec_dev, - "wait timed out (%sresponse), forcing polled mode\n", - Status == AE_OK ? "" : "no "); - ec_polled_mode = TRUE; - } + } + if (!need_poll && no_intr > 10) { + device_printf(sc->ec_dev, + "not getting interrupts, switched to polled mode\n"); + ec_polled_mode = 1; } if (Status != AE_OK) CTR0(KTR_ACPI, "error: ec wait timed out"); @@ -933,6 +924,14 @@ EcCommand(struct acpi_ec_softc *sc, EC_C return (AE_BAD_PARAMETER); } + /* + * Ensure empty input buffer before issuing command. + * Use generation count of zero to force a quick check. + */ + status = EcWaitEvent(sc, EC_EVENT_INPUT_BUFFER_EMPTY, 0); + if (ACPI_FAILURE(status)) + return (status); + /* Run the command and wait for the chosen event. */ CTR1(KTR_ACPI, "ec running command %#x", cmd); gen_count = sc->ec_gencount; @@ -955,24 +954,31 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A { ACPI_STATUS status; u_int gen_count; + int retry; ACPI_SERIAL_ASSERT(ec); CTR1(KTR_ACPI, "ec read from %#x", Address); - status = EcCommand(sc, EC_COMMAND_READ); - if (ACPI_FAILURE(status)) - return (status); + for (retry = 0; retry < 2; retry++) { + status = EcCommand(sc, EC_COMMAND_READ); + if (ACPI_FAILURE(status)) + return (status); - gen_count = sc->ec_gencount; - EC_SET_DATA(sc, Address); - status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count); - if (ACPI_FAILURE(status)) { - device_printf(sc->ec_dev, "EcRead: failed waiting to get data\n"); - return (status); + gen_count = sc->ec_gencount; + EC_SET_DATA(sc, Address); + status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count); + if (ACPI_FAILURE(status)) { + if (EcCheckStatus(sc, "retr_check", + EC_EVENT_INPUT_BUFFER_EMPTY) == AE_OK) + continue; + else + break; + } + *Data = EC_GET_DATA(sc); + return (AE_OK); } - *Data = EC_GET_DATA(sc); - - return (AE_OK); + device_printf(sc->ec_dev, "EcRead: failed waiting to get data\n"); + return (status); } static ACPI_STATUS @@ -992,7 +998,7 @@ EcWrite(struct acpi_ec_softc *sc, UINT8 EC_SET_DATA(sc, Address); status = EcWaitEvent(sc, EC_EVENT_INPUT_BUFFER_EMPTY, gen_count); if (ACPI_FAILURE(status)) { - device_printf(sc->ec_dev, "EcRead: failed waiting for sent address\n"); + device_printf(sc->ec_dev, "EcWrite: failed waiting for sent address\n"); return (status); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 17:56:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3A06106566B; Tue, 12 Oct 2010 17:56:58 +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 84CB08FC13; Tue, 12 Oct 2010 17:56:57 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA23734; Tue, 12 Oct 2010 20:56:56 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4CB4A167.5010105@freebsd.org> Date: Tue, 12 Oct 2010 20:56:55 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100920 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201010121753.o9CHr1X3055607@svn.freebsd.org> In-Reply-To: <201010121753.o9CHr1X3055607@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r213737 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 17:56:58 -0000 on 12/10/2010 20:53 Andriy Gapon said the following: > Author: avg > Date: Tue Oct 12 17:53:01 2010 > New Revision: 213737 > URL: http://svn.freebsd.org/changeset/base/213737 > > Log: > acpi_ec: changes in communication with hardware > > Short description of the changes: > - attempt to retry some commands for which it is possible (read, query) > - always make a short sleep before checking EC status in polled mode > - periodically poll EC status in interrupt mode > - change logic for detecting broken interrupt delivery and falling back > to polled mode > - check that EC is ready for input before starting a new command, wait > if necessary > > This commit is based on the original patch by David Naylor. > > PR: kern/150517 > Submitted by: David Naylor There also should have been: Tested by: David Naylor , kuba guzik , Nicolas > Reviewed by: jkim > MFC after: 3 weeks > > Modified: > head/sys/dev/acpica/acpi_ec.c > > Modified: head/sys/dev/acpica/acpi_ec.c > ============================================================================== > --- head/sys/dev/acpica/acpi_ec.c Tue Oct 12 17:40:45 2010 (r213736) > +++ head/sys/dev/acpica/acpi_ec.c Tue Oct 12 17:53:01 2010 (r213737) > @@ -153,7 +153,7 @@ struct acpi_ec_softc { > int ec_glkhandle; > int ec_burstactive; > int ec_sci_pend; > - u_int ec_gencount; > + volatile u_int ec_gencount; > int ec_suspending; > }; > > @@ -165,7 +165,7 @@ struct acpi_ec_softc { > #define EC_LOCK_TIMEOUT 1000 > > /* Default delay in microseconds between each run of the status polling loop. */ > -#define EC_POLL_DELAY 5 > +#define EC_POLL_DELAY 50 > > /* Total time in ms spent waiting for a response from EC. */ > #define EC_TIMEOUT 750 > @@ -599,12 +599,32 @@ acpi_ec_write_method(device_t dev, u_int > return (0); > } > > +static ACPI_STATUS > +EcCheckStatus(struct acpi_ec_softc *sc, const char *msg, EC_EVENT event) > +{ > + ACPI_STATUS status; > + EC_STATUS ec_status; > + > + status = AE_NO_HARDWARE_RESPONSE; > + ec_status = EC_GET_CSR(sc); > + if (sc->ec_burstactive && !(ec_status & EC_FLAG_BURST_MODE)) { > + CTR1(KTR_ACPI, "ec burst disabled in waitevent (%s)", msg); > + sc->ec_burstactive = FALSE; > + } > + if (EVENT_READY(event, ec_status)) { > + CTR2(KTR_ACPI, "ec %s wait ready, status %#x", msg, ec_status); > + status = AE_OK; > + } > + return (status); > +} > + > static void > EcGpeQueryHandler(void *Context) > { > struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; > UINT8 Data; > ACPI_STATUS Status; > + int retry; > char qxx[5]; > > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > @@ -625,7 +645,16 @@ EcGpeQueryHandler(void *Context) > * that may arise from running the query from causing another query > * to be queued, we clear the pending flag only after running it. > */ > - Status = EcCommand(sc, EC_COMMAND_QUERY); > + for (retry = 0; retry < 2; retry++) { > + Status = EcCommand(sc, EC_COMMAND_QUERY); > + if (ACPI_SUCCESS(Status)) > + break; > + if (EcCheckStatus(sc, "retr_check", > + EC_EVENT_INPUT_BUFFER_EMPTY) == AE_OK) > + continue; > + else > + break; > + } > sc->ec_sci_pend = FALSE; > if (ACPI_FAILURE(Status)) { > EcUnlock(sc); > @@ -678,7 +707,7 @@ EcGpeHandler(void *Context) > * address and then data values.) > */ > atomic_add_int(&sc->ec_gencount, 1); > - wakeup(&sc->ec_gencount); > + wakeup(&sc); > > /* > * If the EC_SCI bit of the status register is set, queue a query handler. > @@ -789,68 +818,27 @@ EcSpaceHandler(UINT32 Function, ACPI_PHY > } > > static ACPI_STATUS > -EcCheckStatus(struct acpi_ec_softc *sc, const char *msg, EC_EVENT event) > -{ > - ACPI_STATUS status; > - EC_STATUS ec_status; > - > - status = AE_NO_HARDWARE_RESPONSE; > - ec_status = EC_GET_CSR(sc); > - if (sc->ec_burstactive && !(ec_status & EC_FLAG_BURST_MODE)) { > - CTR1(KTR_ACPI, "ec burst disabled in waitevent (%s)", msg); > - sc->ec_burstactive = FALSE; > - } > - if (EVENT_READY(event, ec_status)) { > - CTR2(KTR_ACPI, "ec %s wait ready, status %#x", msg, ec_status); > - status = AE_OK; > - } > - return (status); > -} > - > -static ACPI_STATUS > EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event, u_int gen_count) > { > + static int no_intr = 0; > ACPI_STATUS Status; > - int count, i, slp_ival; > + int count, i, need_poll, slp_ival; > > ACPI_SERIAL_ASSERT(ec); > Status = AE_NO_HARDWARE_RESPONSE; > - int need_poll = cold || rebooting || ec_polled_mode || sc->ec_suspending; > - /* > - * The main CPU should be much faster than the EC. So the status should > - * be "not ready" when we start waiting. But if the main CPU is really > - * slow, it's possible we see the current "ready" response. Since that > - * can't be distinguished from the previous response in polled mode, > - * this is a potential issue. We really should have interrupts enabled > - * during boot so there is no ambiguity in polled mode. > - * > - * If this occurs, we add an additional delay before actually entering > - * the status checking loop, hopefully to allow the EC to go to work > - * and produce a non-stale status. > - */ > - if (need_poll) { > - static int once; > - > - if (EcCheckStatus(sc, "pre-check", Event) == AE_OK) { > - if (!once) { > - device_printf(sc->ec_dev, > - "warning: EC done before starting event wait\n"); > - once = 1; > - } > - AcpiOsStall(10); > - } > - } > + need_poll = cold || rebooting || ec_polled_mode || sc->ec_suspending; > > /* Wait for event by polling or GPE (interrupt). */ > if (need_poll) { > count = (ec_timeout * 1000) / EC_POLL_DELAY; > if (count == 0) > count = 1; > + DELAY(10); > for (i = 0; i < count; i++) { > Status = EcCheckStatus(sc, "poll", Event); > if (Status == AE_OK) > break; > - AcpiOsStall(EC_POLL_DELAY); > + DELAY(EC_POLL_DELAY); > } > } else { > slp_ival = hz / 1000; > @@ -869,34 +857,37 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC > * EC query). > */ > for (i = 0; i < count; i++) { > - if (gen_count != sc->ec_gencount) { > - /* > - * Record new generation count. It's possible the GPE was > - * just to notify us that a query is needed and we need to > - * wait for a second GPE to signal the completion of the > - * event we are actually waiting for. > - */ > - gen_count = sc->ec_gencount; > - Status = EcCheckStatus(sc, "sleep", Event); > - if (Status == AE_OK) > - break; > + if (gen_count == sc->ec_gencount) > + tsleep(&sc, 0, "ecgpe", slp_ival); > + /* > + * Record new generation count. It's possible the GPE was > + * just to notify us that a query is needed and we need to > + * wait for a second GPE to signal the completion of the > + * event we are actually waiting for. > + */ > + Status = EcCheckStatus(sc, "sleep", Event); > + if (Status == AE_OK) { > + if (gen_count == sc->ec_gencount) > + no_intr++; > + else > + no_intr = 0; > + break; > } > - tsleep(&sc->ec_gencount, PZERO, "ecgpe", slp_ival); > + gen_count = sc->ec_gencount; > } > > /* > * We finished waiting for the GPE and it never arrived. Try to > * read the register once and trust whatever value we got. This is > - * the best we can do at this point. Then, force polled mode on > - * since this system doesn't appear to generate GPEs. > + * the best we can do at this point. > */ > - if (Status != AE_OK) { > + if (Status != AE_OK) > Status = EcCheckStatus(sc, "sleep_end", Event); > - device_printf(sc->ec_dev, > - "wait timed out (%sresponse), forcing polled mode\n", > - Status == AE_OK ? "" : "no "); > - ec_polled_mode = TRUE; > - } > + } > + if (!need_poll && no_intr > 10) { > + device_printf(sc->ec_dev, > + "not getting interrupts, switched to polled mode\n"); > + ec_polled_mode = 1; > } > if (Status != AE_OK) > CTR0(KTR_ACPI, "error: ec wait timed out"); > @@ -933,6 +924,14 @@ EcCommand(struct acpi_ec_softc *sc, EC_C > return (AE_BAD_PARAMETER); > } > > + /* > + * Ensure empty input buffer before issuing command. > + * Use generation count of zero to force a quick check. > + */ > + status = EcWaitEvent(sc, EC_EVENT_INPUT_BUFFER_EMPTY, 0); > + if (ACPI_FAILURE(status)) > + return (status); > + > /* Run the command and wait for the chosen event. */ > CTR1(KTR_ACPI, "ec running command %#x", cmd); > gen_count = sc->ec_gencount; > @@ -955,24 +954,31 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A > { > ACPI_STATUS status; > u_int gen_count; > + int retry; > > ACPI_SERIAL_ASSERT(ec); > CTR1(KTR_ACPI, "ec read from %#x", Address); > > - status = EcCommand(sc, EC_COMMAND_READ); > - if (ACPI_FAILURE(status)) > - return (status); > + for (retry = 0; retry < 2; retry++) { > + status = EcCommand(sc, EC_COMMAND_READ); > + if (ACPI_FAILURE(status)) > + return (status); > > - gen_count = sc->ec_gencount; > - EC_SET_DATA(sc, Address); > - status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count); > - if (ACPI_FAILURE(status)) { > - device_printf(sc->ec_dev, "EcRead: failed waiting to get data\n"); > - return (status); > + gen_count = sc->ec_gencount; > + EC_SET_DATA(sc, Address); > + status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count); > + if (ACPI_FAILURE(status)) { > + if (EcCheckStatus(sc, "retr_check", > + EC_EVENT_INPUT_BUFFER_EMPTY) == AE_OK) > + continue; > + else > + break; > + } > + *Data = EC_GET_DATA(sc); > + return (AE_OK); > } > - *Data = EC_GET_DATA(sc); > - > - return (AE_OK); > + device_printf(sc->ec_dev, "EcRead: failed waiting to get data\n"); > + return (status); > } > > static ACPI_STATUS > @@ -992,7 +998,7 @@ EcWrite(struct acpi_ec_softc *sc, UINT8 > EC_SET_DATA(sc, Address); > status = EcWaitEvent(sc, EC_EVENT_INPUT_BUFFER_EMPTY, gen_count); > if (ACPI_FAILURE(status)) { > - device_printf(sc->ec_dev, "EcRead: failed waiting for sent address\n"); > + device_printf(sc->ec_dev, "EcWrite: failed waiting for sent address\n"); > return (status); > } > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 18:20:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29D90106564A; Tue, 12 Oct 2010 18:20:39 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 149BC8FC17; Tue, 12 Oct 2010 18:20:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CIKdmo056348; Tue, 12 Oct 2010 18:20:39 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CIKc0Y056317; Tue, 12 Oct 2010 18:20:38 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010121820.o9CIKc0Y056317@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 12 Oct 2010 18:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213738 - in head: bin/sh tools/regression/bin/sh tools/regression/bin/sh/builtins tools/regression/bin/sh/errors tools/regression/bin/sh/execution tools/regression/bin/sh/expansion too... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 18:20:39 -0000 Author: obrien Date: Tue Oct 12 18:20:38 2010 New Revision: 213738 URL: http://svn.freebsd.org/changeset/base/213738 Log: Allow one to regression test 'sh' changes without having to install a potentially bad /bin/sh first. Modified: head/bin/sh/Makefile head/tools/regression/bin/sh/Makefile head/tools/regression/bin/sh/builtins/command8.0 head/tools/regression/bin/sh/builtins/exec1.0 head/tools/regression/bin/sh/builtins/exec2.0 head/tools/regression/bin/sh/builtins/fc1.0 head/tools/regression/bin/sh/builtins/fc2.0 head/tools/regression/bin/sh/builtins/trap1.0 head/tools/regression/bin/sh/builtins/var-assign.0 head/tools/regression/bin/sh/builtins/var-assign2.0 head/tools/regression/bin/sh/errors/assignment-error1.0 head/tools/regression/bin/sh/errors/backquote-error1.0 head/tools/regression/bin/sh/errors/backquote-error2.0 head/tools/regression/bin/sh/errors/option-error.0 head/tools/regression/bin/sh/errors/redirection-error.0 head/tools/regression/bin/sh/errors/redirection-error2.2 head/tools/regression/bin/sh/errors/redirection-error3.0 head/tools/regression/bin/sh/execution/fork1.0 head/tools/regression/bin/sh/execution/fork2.0 head/tools/regression/bin/sh/execution/func1.0 head/tools/regression/bin/sh/execution/redir2.0 head/tools/regression/bin/sh/expansion/question1.0 head/tools/regression/bin/sh/expansion/set-u1.0 head/tools/regression/bin/sh/parameters/mail1.0 head/tools/regression/bin/sh/parameters/mail2.0 head/tools/regression/bin/sh/parameters/pwd1.0 head/tools/regression/bin/sh/parameters/pwd2.0 head/tools/regression/bin/sh/regress.sh head/tools/regression/bin/sh/regress.t Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Tue Oct 12 17:53:01 2010 (r213737) +++ head/bin/sh/Makefile Tue Oct 12 18:20:38 2010 (r213738) @@ -62,4 +62,7 @@ syntax.c syntax.h: mksyntax token.h: mktokens sh ${.CURDIR}/mktokens +regress: + cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh + .include Modified: head/tools/regression/bin/sh/Makefile ============================================================================== --- head/tools/regression/bin/sh/Makefile Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/Makefile Tue Oct 12 18:20:38 2010 (r213738) @@ -1,4 +1,7 @@ # $FreeBSD$ +# Allow one to specify the 'sh' to regress. +SH?= /bin/sh + all: - sh regress.sh + env SH=${SH} ${SH} regress.sh Modified: head/tools/regression/bin/sh/builtins/command8.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/command8.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/command8.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -22,7 +22,7 @@ set -e set -- ${SPECIAL} for cmd in "$@" do - sh -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null + ${SH} -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null done while :; do Modified: head/tools/regression/bin/sh/builtins/exec1.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/exec1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/exec1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -12,7 +12,7 @@ failure() { ) [ $? = 0 ] || failure $LINENO ( - exec sh -c 'exit 42' + exec ${SH} -c 'exit 42' echo bad ) [ $? = 42 ] || failure $LINENO Modified: head/tools/regression/bin/sh/builtins/exec2.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/exec2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/exec2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -12,7 +12,7 @@ failure() { ) [ $? = 0 ] || failure $LINENO ( - exec -- sh -c 'exit 42' + exec -- ${SH} -c 'exit 42' echo bad ) [ $? = 42 ] || failure $LINENO Modified: head/tools/regression/bin/sh/builtins/fc1.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/fc1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/fc1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -8,7 +8,7 @@ T=$(mktemp -d sh-test.XXXXXX) cd $T mkfifo input output error -HISTFILE=/dev/null sh +m -i output 2>error & +HISTFILE=/dev/null ${SH} +m -i output 2>error & { # Syntax error echo ')' >&3 Modified: head/tools/regression/bin/sh/builtins/fc2.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/fc2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/fc2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -8,7 +8,7 @@ T=$(mktemp -d sh-test.XXXXXX) cd $T mkfifo input output error -HISTFILE=/dev/null sh +m -i output 2>error & +HISTFILE=/dev/null ${SH} +m -i output 2>error & exec 3>input { # Command not found, containing slash Modified: head/tools/regression/bin/sh/builtins/trap1.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/trap1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/trap1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -4,11 +4,11 @@ test "$(trap 'echo trapped' EXIT; :)" = test "$(trap 'echo trapped' EXIT; /usr/bin/true)" = trapped || exit 1 -result=$(sh -c 'trap "echo trapped" EXIT; /usr/bin/false') +result=$(${SH} -c 'trap "echo trapped" EXIT; /usr/bin/false') test $? -eq 1 || exit 1 test "$result" = trapped || exit 1 -result=$(sh -c 'trap "echo trapped" EXIT; exec /usr/bin/false') +result=$(${SH} -c 'trap "echo trapped" EXIT; exec /usr/bin/false') test $? -eq 1 || exit 1 test -z "$result" || exit 1 Modified: head/tools/regression/bin/sh/builtins/var-assign.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/var-assign.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/var-assign.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -44,12 +44,12 @@ set -e set -- ${SPECIAL} for cmd in "$@" do - sh -c "VAR=1; VAR=0 ${cmd}; exit \${VAR}" >/dev/null 2>&1 + ${SH} -c "VAR=1; VAR=0 ${cmd}; exit \${VAR}" >/dev/null 2>&1 done # For other built-ins and utilites they do not. set -- ${UTILS} for cmd in "$@" do - sh -c "VAR=0; VAR=1 ${cmd}; exit \${VAR}" >/dev/null 2>&1 + ${SH} -c "VAR=0; VAR=1 ${cmd}; exit \${VAR}" >/dev/null 2>&1 done Modified: head/tools/regression/bin/sh/builtins/var-assign2.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/var-assign2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/builtins/var-assign2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -45,11 +45,11 @@ set -e set -- ${SPECIAL} for cmd in "$@" do - sh -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 + ${SH} -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 done set -- ${UTILS} for cmd in "$@" do - sh -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 + ${SH} -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1 done Modified: head/tools/regression/bin/sh/errors/assignment-error1.0 ============================================================================== --- head/tools/regression/bin/sh/errors/assignment-error1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/errors/assignment-error1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -16,15 +16,15 @@ SPECIAL="break,\ unset foo" # If there is no command word, the shell must abort on an assignment error. -sh -c "readonly a=0; a=2; exit 0" 2>/dev/null && exit 1 +${SH} -c "readonly a=0; a=2; exit 0" 2>/dev/null && exit 1 # Special built-in utilities must abort on an assignment error. set -- ${SPECIAL} for cmd in "$@" do - sh -c "readonly a=0; a=2 ${cmd}; exit 0" 2>/dev/null && exit 1 + ${SH} -c "readonly a=0; a=2 ${cmd}; exit 0" 2>/dev/null && exit 1 done # Other utilities must not abort; we currently still execute them. -sh -c 'readonly a=0; a=1 true; exit $a' 2>/dev/null || exit 1 -sh -c 'readonly a=0; a=1 command :; exit $a' 2>/dev/null || exit 1 +${SH} -c 'readonly a=0; a=1 true; exit $a' 2>/dev/null || exit 1 +${SH} -c 'readonly a=0; a=1 command :; exit $a' 2>/dev/null || exit 1 Modified: head/tools/regression/bin/sh/errors/backquote-error1.0 ============================================================================== --- head/tools/regression/bin/sh/errors/backquote-error1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/errors/backquote-error1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -1,4 +1,4 @@ # $FreeBSD$ -echo 'echo `for` echo ".BAD"CODE.' | sh +m -i 2>&1 | grep -q BADCODE && exit 1 +echo 'echo `for` echo ".BAD"CODE.' | ${SH} +m -i 2>&1 | grep -q BADCODE && exit 1 exit 0 Modified: head/tools/regression/bin/sh/errors/backquote-error2.0 ============================================================================== --- head/tools/regression/bin/sh/errors/backquote-error2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/errors/backquote-error2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -1,7 +1,7 @@ # $FreeBSD$ -sh -c 'echo `echo .BA"DCODE.` +${SH} -c 'echo `echo .BA"DCODE.` echo ".BAD"CODE.' 2>&1 | grep -q BADCODE && exit 1 -echo '`"`' | sh -n 2>/dev/null && exit 1 -echo '`'"'"'`' | sh -n 2>/dev/null && exit 1 +echo '`"`' | ${SH} -n 2>/dev/null && exit 1 +echo '`'"'"'`' | ${SH} -n 2>/dev/null && exit 1 exit 0 Modified: head/tools/regression/bin/sh/errors/option-error.0 ============================================================================== --- head/tools/regression/bin/sh/errors/option-error.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/errors/option-error.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -35,12 +35,12 @@ UTILS="alias -y,\ set -- ${SPECIAL} for cmd in "$@" do - sh -c "${cmd}; exit 0" 2>/dev/null && exit 1 + ${SH} -c "${cmd}; exit 0" 2>/dev/null && exit 1 done # Other utilities must not abort. set -- ${UTILS} for cmd in "$@" do - sh -c "${cmd}; exit 0" 2>/dev/null || exit 1 + ${SH} -c "${cmd}; exit 0" 2>/dev/null || exit 1 done Modified: head/tools/regression/bin/sh/errors/redirection-error.0 ============================================================================== --- head/tools/regression/bin/sh/errors/redirection-error.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/errors/redirection-error.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -42,12 +42,12 @@ UTILS="alias,\ set -- ${SPECIAL} for cmd in "$@" do - sh -c "${cmd} > /; exit 0" 2>/dev/null && exit 1 + ${SH} -c "${cmd} > /; exit 0" 2>/dev/null && exit 1 done # Other utilities must not abort. set -- ${UTILS} for cmd in "$@" do - sh -c "${cmd} > /; exit 0" 2>/dev/null || exit 1 + ${SH} -c "${cmd} > /; exit 0" 2>/dev/null || exit 1 done Modified: head/tools/regression/bin/sh/errors/redirection-error2.2 ============================================================================== --- head/tools/regression/bin/sh/errors/redirection-error2.2 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/errors/redirection-error2.2 Tue Oct 12 18:20:38 2010 (r213738) @@ -1,4 +1,4 @@ # $FreeBSD$ # sh should fail gracefully on this bad redirect -sh -c 'echo 1 >&$a' 2>/dev/null +${SH} -c 'echo 1 >&$a' 2>/dev/null Modified: head/tools/regression/bin/sh/errors/redirection-error3.0 ============================================================================== --- head/tools/regression/bin/sh/errors/redirection-error3.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/errors/redirection-error3.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -44,11 +44,11 @@ UTILS="alias,\ set -- ${SPECIAL} for cmd in "$@" do - sh -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 + ${SH} -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 done set -- ${UTILS} for cmd in "$@" do - sh -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 + ${SH} -c "command ${cmd} > /; exit 0" 2>/dev/null || exit 1 done Modified: head/tools/regression/bin/sh/execution/fork1.0 ============================================================================== --- head/tools/regression/bin/sh/execution/fork1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/execution/fork1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -1,7 +1,7 @@ # $FreeBSD$ -result=$(sh -c 'ps -p $$ -o comm=') +result=$(${SH} -c 'ps -p $$ -o comm=') test "$result" = "ps" || exit 1 -result=$(sh -c 'ps -p $$ -o comm=; :') +result=$(${SH} -c 'ps -p $$ -o comm=; :') test "$result" = "sh" || exit 1 Modified: head/tools/regression/bin/sh/execution/fork2.0 ============================================================================== --- head/tools/regression/bin/sh/execution/fork2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/execution/fork2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -1,9 +1,9 @@ # $FreeBSD$ -result=$(sh -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!') +result=$(${SH} -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!') test "$result" = sleep || exit 1 -result=$(sh -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait') +result=$(${SH} -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait') test "$result" = trapped || exit 1 exit 0 Modified: head/tools/regression/bin/sh/execution/func1.0 ============================================================================== --- head/tools/regression/bin/sh/execution/func1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/execution/func1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -1,4 +1,4 @@ # $FreeBSD$ -MALLOC_OPTIONS=J sh -c 'g() { g() { :; }; :; }; g' && -MALLOC_OPTIONS=J sh -c 'g() { unset -f g; :; }; g' +MALLOC_OPTIONS=J ${SH} -c 'g() { g() { :; }; :; }; g' && +MALLOC_OPTIONS=J ${SH} -c 'g() { unset -f g; :; }; g' Modified: head/tools/regression/bin/sh/execution/redir2.0 ============================================================================== --- head/tools/regression/bin/sh/execution/redir2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/execution/redir2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -10,7 +10,7 @@ brokenpipe=0 mkfifo fifo1 fifo2 { { - exec sh -c 'exec &1 | grep -q abcdefg || exit 1 -sh -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 1 -sh -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 1 -sh -c 'foo=; echo ${foo?}' >/dev/null || exit 1 -sh -c 'foo=1; echo ${foo:?}' >/dev/null || exit 1 -sh -c 'echo ${!?}' 2>/dev/null && exit 1 -sh -c ':& echo ${!?}' >/dev/null || exit 1 -sh -c 'echo ${#?}' >/dev/null || exit 1 -sh -c 'echo ${*?}' 2>/dev/null && exit 1 -sh -c 'echo ${*?}' sh x >/dev/null || exit 1 -sh -c 'echo ${1?}' 2>/dev/null && exit 1 -sh -c 'echo ${1?}' sh x >/dev/null || exit 1 -sh -c 'echo ${2?}' sh x 2>/dev/null && exit 1 -sh -c 'echo ${2?}' sh x y >/dev/null || exit 1 +${SH} -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 1 +${SH} -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 1 +${SH} -c 'foo=; echo ${foo?}' >/dev/null || exit 1 +${SH} -c 'foo=1; echo ${foo:?}' >/dev/null || exit 1 +${SH} -c 'echo ${!?}' 2>/dev/null && exit 1 +${SH} -c ':& echo ${!?}' >/dev/null || exit 1 +${SH} -c 'echo ${#?}' >/dev/null || exit 1 +${SH} -c 'echo ${*?}' 2>/dev/null && exit 1 +${SH} -c 'echo ${*?}' ${SH} x >/dev/null || exit 1 +${SH} -c 'echo ${1?}' 2>/dev/null && exit 1 +${SH} -c 'echo ${1?}' ${SH} x >/dev/null || exit 1 +${SH} -c 'echo ${2?}' ${SH} x 2>/dev/null && exit 1 +${SH} -c 'echo ${2?}' ${SH} x y >/dev/null || exit 1 exit 0 Modified: head/tools/regression/bin/sh/expansion/set-u1.0 ============================================================================== --- head/tools/regression/bin/sh/expansion/set-u1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/expansion/set-u1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -1,29 +1,29 @@ # $FreeBSD$ -sh -uc 'unset foo; echo $foo' 2>/dev/null && exit 1 -sh -uc 'foo=; echo $foo' >/dev/null || exit 1 -sh -uc 'foo=1; echo $foo' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo $foo' 2>/dev/null && exit 1 +${SH} -uc 'foo=; echo $foo' >/dev/null || exit 1 +${SH} -uc 'foo=1; echo $foo' >/dev/null || exit 1 # -/+/= are unaffected by set -u -sh -uc 'unset foo; echo ${foo-}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo+}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo=}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo-}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo+}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo=}' >/dev/null || exit 1 # length/trimming are affected -sh -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 1 -sh -uc 'foo=; echo ${#foo}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo##?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo##?}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo%?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo%?}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo%%?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo%%?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 1 +${SH} -uc 'foo=; echo ${#foo}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo##?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo##?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo%?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo%?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo%%?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo%%?}' >/dev/null || exit 1 -sh -uc 'echo $!' 2>/dev/null && exit 1 -sh -uc ':& echo $!' >/dev/null || exit 1 -sh -uc 'echo $#' >/dev/null || exit 1 -sh -uc 'echo $1' 2>/dev/null && exit 1 -sh -uc 'echo $1' sh x >/dev/null || exit 1 -sh -uc 'echo $2' sh x 2>/dev/null && exit 1 -sh -uc 'echo $2' sh x y >/dev/null || exit 1 +${SH} -uc 'echo $!' 2>/dev/null && exit 1 +${SH} -uc ':& echo $!' >/dev/null || exit 1 +${SH} -uc 'echo $#' >/dev/null || exit 1 +${SH} -uc 'echo $1' 2>/dev/null && exit 1 +${SH} -uc 'echo $1' ${SH} x >/dev/null || exit 1 +${SH} -uc 'echo $2' ${SH} x 2>/dev/null && exit 1 +${SH} -uc 'echo $2' ${SH} x y >/dev/null || exit 1 exit 0 Modified: head/tools/regression/bin/sh/parameters/mail1.0 ============================================================================== --- head/tools/regression/bin/sh/parameters/mail1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/parameters/mail1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -4,7 +4,7 @@ goodfile=/var/empty/sh-test-goodfile mailfile=/var/empty/sh-test-mailfile T=$(mktemp sh-test.XXXXXX) || exit -MAIL=$mailfile ktrace -i -f "$T" sh -c "[ -s $goodfile ]" 2>/dev/null +MAIL=$mailfile ktrace -i -f "$T" ${SH} -c "[ -s $goodfile ]" 2>/dev/null if ! grep -q $goodfile "$T"; then # ktrace problem rc=0 Modified: head/tools/regression/bin/sh/parameters/mail2.0 ============================================================================== --- head/tools/regression/bin/sh/parameters/mail2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/parameters/mail2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -4,7 +4,7 @@ goodfile=/var/empty/sh-test-goodfile mailfile=/var/empty/sh-test-mailfile T=$(mktemp sh-test.XXXXXX) || exit -ENV=$goodfile MAIL=$mailfile ktrace -i -f "$T" sh +m -i /dev/null 2>&1 +ENV=$goodfile MAIL=$mailfile ktrace -i -f "$T" ${SH} +m -i /dev/null 2>&1 if ! grep -q $goodfile "$T"; then # ktrace problem rc=0 Modified: head/tools/regression/bin/sh/parameters/pwd1.0 ============================================================================== --- head/tools/regression/bin/sh/parameters/pwd1.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/parameters/pwd1.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -3,9 +3,9 @@ cd / || exit 3 failures=0 -[ "$(PWD=foo sh -c 'pwd')" = / ] || : $((failures += 1)) -[ "$(PWD=/var/empty sh -c 'pwd')" = / ] || : $((failures += 1)) -[ "$(PWD=/var/empty/foo sh -c 'pwd')" = / ] || : $((failures += 1)) -[ "$(PWD=/bin/ls sh -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=foo ${SH} -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/var/empty ${SH} -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/var/empty/foo ${SH} -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/bin/ls ${SH} -c 'pwd')" = / ] || : $((failures += 1)) exit $((failures != 0)) Modified: head/tools/regression/bin/sh/parameters/pwd2.0 ============================================================================== --- head/tools/regression/bin/sh/parameters/pwd2.0 Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/parameters/pwd2.0 Tue Oct 12 18:20:38 2010 (r213738) @@ -12,13 +12,13 @@ cd link [ "$PWD" = "$TP/link" ] [ "$(pwd)" = "$TP/link" ] [ "$(pwd -P)" = "$TP/test1" ] -[ "$(sh -c pwd)" = "$TP/link" ] -[ "$(sh -c pwd\ -P)" = "$TP/test1" ] +[ "$(${SH} -c pwd)" = "$TP/link" ] +[ "$(${SH} -c pwd\ -P)" = "$TP/test1" ] cd .. [ "$(pwd)" = "$TP" ] cd -P link [ "$PWD" = "$TP/test1" ] [ "$(pwd)" = "$TP/test1" ] [ "$(pwd -P)" = "$TP/test1" ] -[ "$(sh -c pwd)" = "$TP/test1" ] -[ "$(sh -c pwd\ -P)" = "$TP/test1" ] +[ "$(${SH} -c pwd)" = "$TP/test1" ] +[ "$(${SH} -c pwd\ -P)" = "$TP/test1" ] Modified: head/tools/regression/bin/sh/regress.sh ============================================================================== --- head/tools/regression/bin/sh/regress.sh Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/regress.sh Tue Oct 12 18:20:38 2010 (r213738) @@ -1,12 +1,18 @@ # $FreeBSD$ +if [ -z "${SH}" ]; then + echo '${SH} is not set, please correct and re-run.' + exit 1 +fi +export SH=${SH} + COUNTER=1 do_test() { local c c=${COUNTER} COUNTER=$((COUNTER+1)) - sh $1 > tmp.stdout 2> tmp.stderr + ${SH} $1 > tmp.stdout 2> tmp.stderr if [ $? -ne $2 ]; then echo "not ok ${c} - ${1} # wrong exit status" rm tmp.stdout tmp.stderr Modified: head/tools/regression/bin/sh/regress.t ============================================================================== --- head/tools/regression/bin/sh/regress.t Tue Oct 12 17:53:01 2010 (r213737) +++ head/tools/regression/bin/sh/regress.t Tue Oct 12 18:20:38 2010 (r213738) @@ -1,6 +1,12 @@ #!/bin/sh # $FreeBSD$ +if [ -z "${SH}" ]; then + echo '${SH} is not set, please correct and re-run.' + exit 1 +fi +export SH=${SH} + cd `dirname $0` -sh regress.sh +${SH} regress.sh From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 18:36:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CB65106566B; Tue, 12 Oct 2010 18:36:04 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4C158FC1A; Tue, 12 Oct 2010 18:36:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CIa3fQ056852; Tue, 12 Oct 2010 18:36:03 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CIa356056848; Tue, 12 Oct 2010 18:36:03 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010121836.o9CIa356056848@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 12 Oct 2010 18:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213739 - in head: share/man/man9 sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 18:36:04 -0000 Author: mdf Date: Tue Oct 12 18:36:03 2010 New Revision: 213739 URL: http://svn.freebsd.org/changeset/base/213739 Log: Re-expose and briefly document taskqueue_run(9). The function is used in at least one 3rd party driver. Requested by: jhb Modified: head/share/man/man9/taskqueue.9 head/sys/kern/subr_taskqueue.c head/sys/sys/taskqueue.h Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Tue Oct 12 18:20:38 2010 (r213738) +++ head/share/man/man9/taskqueue.9 Tue Oct 12 18:36:03 2010 (r213739) @@ -67,6 +67,8 @@ struct task { .Fn taskqueue_drain "struct taskqueue *queue" "struct task *task" .Ft int .Fn taskqueue_member "struct taskqueue *queue" "struct thread *td" +.Ft void +.Fn taskqueue_run "struct taskqueue *queue" "struct task **tpp" .Fn TASK_INIT "struct task *task" "int priority" "task_fn_t *func" "void *context" .Fn TASKQUEUE_DECLARE "name" .Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" @@ -178,6 +180,19 @@ and .No 0 otherwise. .Pp +The +.Fn taskqueue_run +function will run all pending tasks in the specified +.Fa queue . +Normally this function is only used internally. +The +.Fa tpp +argument is a pointer to a +.Vt struct task * +that is used to record the currently running task. +The lifetime of this pointer must match that of the +.Fa queue . +.Pp A convenience macro, .Fn TASK_INIT "task" "priority" "func" "context" is provided to initialise a Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Tue Oct 12 18:20:38 2010 (r213738) +++ head/sys/kern/subr_taskqueue.c Tue Oct 12 18:36:03 2010 (r213739) @@ -63,8 +63,6 @@ struct taskqueue { #define TQ_FLAGS_BLOCKED (1 << 1) #define TQ_FLAGS_PENDING (1 << 2) -static void taskqueue_run(struct taskqueue *, struct task **); - static __inline void TQ_LOCK(struct taskqueue *tq) { @@ -216,7 +214,7 @@ taskqueue_unblock(struct taskqueue *queu TQ_UNLOCK(queue); } -static void +void taskqueue_run(struct taskqueue *queue, struct task **tpp) { struct task *task; Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Tue Oct 12 18:20:38 2010 (r213738) +++ head/sys/sys/taskqueue.h Tue Oct 12 18:36:03 2010 (r213739) @@ -56,6 +56,7 @@ int taskqueue_start_threads(struct taskq int taskqueue_enqueue(struct taskqueue *queue, struct task *task); void taskqueue_drain(struct taskqueue *queue, struct task *task); void taskqueue_free(struct taskqueue *queue); +void taskqueue_run(struct taskqueue *queue, struct task **tpp); void taskqueue_block(struct taskqueue *queue); void taskqueue_unblock(struct taskqueue *queue); int taskqueue_member(struct taskqueue *queue, struct thread *td); From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 19:00:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D18CB10656D5; Tue, 12 Oct 2010 19:00:18 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0ACB8FC22; Tue, 12 Oct 2010 19:00:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CJ0IDP058657; Tue, 12 Oct 2010 19:00:18 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CJ0IYJ058655; Tue, 12 Oct 2010 19:00:18 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201010121900.o9CJ0IYJ058655@svn.freebsd.org> From: Joel Dahl Date: Tue, 12 Oct 2010 19:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213740 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 19:00:19 -0000 Author: joel (doc committer) Date: Tue Oct 12 19:00:18 2010 New Revision: 213740 URL: http://svn.freebsd.org/changeset/base/213740 Log: Document the fact that bwn works really well on the laptop I'm using right now (HP 6715b). Modified: head/share/man/man4/bwn.4 Modified: head/share/man/man4/bwn.4 ============================================================================== --- head/share/man/man4/bwn.4 Tue Oct 12 18:36:03 2010 (r213739) +++ head/share/man/man4/bwn.4 Tue Oct 12 19:00:18 2010 (r213740) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2010 +.Dd October 12, 2010 .Dt BWN 4 .Os .Sh NAME @@ -83,6 +83,7 @@ driver supports Broadcom BCM43xx based w .It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" +.It "HP Compaq 6715b BCM4312 PCI b/g" .It "HP nx6125 BCM4319 PCI b/g" .It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g" .It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g" From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 19:07:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBF86106566B; Tue, 12 Oct 2010 19:07:36 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8A4D8FC18; Tue, 12 Oct 2010 19:07:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CJ7aNM058885; Tue, 12 Oct 2010 19:07:36 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CJ7a7H058882; Tue, 12 Oct 2010 19:07:36 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201010121907.o9CJ7a7H058882@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 12 Oct 2010 19:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213741 - in stable/8/tools/tools: ath/common mcgrab mctest termcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2010 19:07:36 -0000 Author: gnn Date: Tue Oct 12 19:07:36 2010 New Revision: 213741 URL: http://svn.freebsd.org/changeset/base/213741 Log: MFC 204310: Moved mcgrab(1) into a separate directory -- our .mk infrastructure doesn't currently have support for building multiple programs in a single makefile. While here, fixed manpages and makefiles (missing dependencies). Added: stable/8/tools/tools/mcgrab/ - copied from r204310, head/tools/tools/mcgrab/ Deleted: stable/8/tools/tools/mctest/mcgrab.1 stable/8/tools/tools/mctest/mcgrab.cc Modified: stable/8/tools/tools/mctest/Makefile stable/8/tools/tools/mctest/mctest.1 Directory Properties: stable/8/tools/tools/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/umastat/ (props changed) stable/8/tools/tools/vimage/ (props changed) Modified: stable/8/tools/tools/mctest/Makefile ============================================================================== --- stable/8/tools/tools/mctest/Makefile Tue Oct 12 19:00:18 2010 (r213740) +++ stable/8/tools/tools/mctest/Makefile Tue Oct 12 19:07:36 2010 (r213741) @@ -1,11 +1,7 @@ -# # $FreeBSD$ -# -# A Makefile that builds both the mctest program and its manual page. PROG_CXX= mctest -PROG_CXX= mcgrab - -LDADD+= -lpthread +DPADD= ${LIBPTHREAD} +LDADD= -lpthread .include Modified: stable/8/tools/tools/mctest/mctest.1 ============================================================================== --- stable/8/tools/tools/mctest/mctest.1 Tue Oct 12 19:00:18 2010 (r213740) +++ stable/8/tools/tools/mctest/mctest.1 Tue Oct 12 19:07:36 2010 (r213741) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd April 3, 2008 -.Dt mctest 1 +.Dt MCTEST 1 .Os .Sh NAME .Nm mctest @@ -40,29 +40,34 @@ .Op Fl t Ar inter-packet gap .Op Fl M Ar number of clients (source only) .Op Fl m Ar my client number (sink only) -.Op Fl r +.Op Fl r .Sh DESCRIPTION -The +The .Nm -command implements a multicast test which involved a source -and a sink. The source sends packets to a pre-configured -multicast address over the interface given as a command line -argument. The sink listens for multicast packets, records -the time at which they're received and then reflects them back -over unicast to the source. When the source has captured all +command implements a multicast test which involves a source +and a sink. +The source sends packets to a pre-configured +multicast address over the interface given as a command line +argument. +The sink listens for multicast packets, records +the time at which they are received and then reflects them back +over unicast to the source. +When the source has captured all the reflected packets it prints out the round trip time of each. .Pp The source prints out the round trip time of packets sent to the -sinks. The sink prints out the time between the packets received. +sinks. +The sink prints out the time between the packets received. .Pp The options are as follows: -.Bl -tag -width ".Fl d Ar argument" +.Bl -tag -width ".Fl i Ar interface" .It Fl i Ar interface -Network interface, which can be found with ifconfig(1). +Network interface, which can be found with +.Xr ifconfig 8 . .It Fl g Ar group -Multicast group +Multicast group. .It Fl b Ar base port -Port on which to listen +Port on which to listen. .It Fl s Ar size Packet size in bytes. .It Fl n Ar number @@ -70,14 +75,15 @@ Number of packets. .It Fl t Ar gap Inter-packet gap in nanoseconds. .It Fl M Ar clients -The number of clients that are listening +The number of clients that are listening. .It Fl m Ar my number The client's number 0, 1, etc. .It Fl r This version of .Nm -is the receiver aka the sink. This option MUST -only be used with one copy of the program at a time. +is the receiver aka the sink. +This option MUST +only be used with one copy of the program at a time. .El .Sh EXAMPLES The following is an example of a typical usage @@ -92,14 +98,15 @@ Sink .Pp Send 100 packets of 1024 bytes, with an inter-packet gap of 1 nanosecond. .Pp -Gaps are measured with +Gaps are measured with .Xr nanosleep 2 , and so are not accurate down to nanoseconds -but depend on the setting of kern.hz. +but depend on the setting of +.Va kern.hz . .Sh SEE ALSO -.Xr ifconfig 8 , .Xr netstat