From owner-svn-src-head@FreeBSD.ORG Sun May 22 01:07:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC41B106566C; Sun, 22 May 2011 01:07:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7FCC8FC0A; Sun, 22 May 2011 01:07:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4M17s6L052658; Sun, 22 May 2011 01:07:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4M17sW1052635; Sun, 22 May 2011 01:07:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105220107.p4M17sW1052635@svn.freebsd.org> From: Rick Macklem Date: Sun, 22 May 2011 01:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222167 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/ext2fs fs/hpfs fs/msdosfs fs/nfsserver fs/ntfs fs/nullfs fs/tmpfs fs/udf fs/unionfs gnu/fs/reiserfs gnu/fs... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 01:07:54 -0000 Author: rmacklem Date: Sun May 22 01:07:54 2011 New Revision: 222167 URL: http://svn.freebsd.org/changeset/base/222167 Log: Add a lock flags argument to the VFS_FHTOVP() file system method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed. Reviewed by: kib Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/hpfs/hpfs_vfsops.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/ntfs/ntfs_vfsops.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/fs/unionfs/union_vfsops.c head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c head/sys/kern/vfs_default.c head/sys/kern/vfs_syscalls.c head/sys/nfsserver/nfs_srvsubs.c head/sys/nlm/nlm_prot_impl.c head/sys/sys/mount.h head/sys/sys/param.h head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_extern.h head/sys/ufs/ufs/ufs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -93,7 +93,7 @@ static int zfs_vget(vfs_t *vfsp, ino_t i static int zfs_sync(vfs_t *vfsp, int waitfor); static int zfs_checkexp(vfs_t *vfsp, struct sockaddr *nam, int *extflagsp, struct ucred **credanonp, int *numsecflavors, int **secflavors); -static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp); +static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp); static void zfs_objset_close(zfsvfs_t *zfsvfs); static void zfs_freevfs(vfs_t *vfsp); @@ -2007,7 +2007,7 @@ CTASSERT(SHORT_FID_LEN <= sizeof(struct CTASSERT(LONG_FID_LEN <= sizeof(struct fid)); static int -zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) +zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp) { zfsvfs_t *zfsvfs = vfsp->vfs_data; znode_t *zp; Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/cd9660/cd9660_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -586,9 +586,10 @@ cd9660_statfs(mp, sbp) /* ARGSUSED */ static int -cd9660_fhtovp(mp, fhp, vpp) +cd9660_fhtovp(mp, fhp, flags, vpp) struct mount *mp; struct fid *fhp; + int flags; struct vnode **vpp; { struct ifid ifh; Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/ext2fs/ext2_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -973,7 +973,7 @@ ext2_vget(struct mount *mp, ino_t ino, i * those rights via. exflagsp and credanonp */ static int -ext2_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +ext2_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { struct inode *ip; struct ufid *ufhp; Modified: head/sys/fs/hpfs/hpfs_vfsops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/hpfs/hpfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -417,6 +417,7 @@ static int hpfs_fhtovp( struct mount *mp, struct fid *fhp, + int flags, struct vnode **vpp) { struct vnode *nvp; Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -963,7 +963,7 @@ loop: } static int -msdosfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +msdosfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); struct defid *defhp = (struct defid *) fhp; Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun May 22 01:07:54 2011 (r222167) @@ -2551,7 +2551,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_ if (VFS_NEEDSGIANT(mp)) error = ESTALE; else - error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); if (error != 0) /* Make sure the server replies ESTALE to the client. */ error = ESTALE; @@ -2834,7 +2834,7 @@ nfsvno_getvp(fhandle_t *fhp) mp = vfs_busyfs(&fhp->fh_fsid); if (mp == NULL) return (NULL); - error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); if (error) return (NULL); Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/ntfs/ntfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -616,6 +616,7 @@ static int ntfs_fhtovp( struct mount *mp, struct fid *fhp, + int flags, struct vnode **vpp) { struct vnode *nvp; Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/nullfs/null_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -321,13 +321,15 @@ nullfs_vget(mp, ino, flags, vpp) } static int -nullfs_fhtovp(mp, fidp, vpp) +nullfs_fhtovp(mp, fidp, flags, vpp) struct mount *mp; struct fid *fidp; + int flags; struct vnode **vpp; { int error; - error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, vpp); + error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, LK_EXCLUSIVE, + vpp); if (error) return (error); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -71,7 +71,8 @@ MALLOC_DEFINE(M_TMPFSNAME, "tmpfs name", static int tmpfs_mount(struct mount *); static int tmpfs_unmount(struct mount *, int); static int tmpfs_root(struct mount *, int flags, struct vnode **); -static int tmpfs_fhtovp(struct mount *, struct fid *, struct vnode **); +static int tmpfs_fhtovp(struct mount *, struct fid *, int, + struct vnode **); static int tmpfs_statfs(struct mount *, struct statfs *); /* --------------------------------------------------------------------- */ @@ -341,7 +342,8 @@ tmpfs_root(struct mount *mp, int flags, /* --------------------------------------------------------------------- */ static int -tmpfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +tmpfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, + struct vnode **vpp) { boolean_t found; struct tmpfs_fid *tfhp; Modified: head/sys/fs/udf/udf_vfsops.c ============================================================================== --- head/sys/fs/udf/udf_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/udf/udf_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -722,7 +722,7 @@ udf_vget(struct mount *mp, ino_t ino, in } static int -udf_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +udf_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { struct ifid *ifhp; struct vnode *nvp; Modified: head/sys/fs/unionfs/union_vfsops.c ============================================================================== --- head/sys/fs/unionfs/union_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/unionfs/union_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -454,7 +454,8 @@ unionfs_vget(struct mount *mp, ino_t ino } static int -unionfs_fhtovp(struct mount *mp, struct fid *fidp, struct vnode **vpp) +unionfs_fhtovp(struct mount *mp, struct fid *fidp, int flags, + struct vnode **vpp) { return (EOPNOTSUPP); } Modified: head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -335,7 +335,8 @@ reiserfs_statfs(struct mount *mp, struct * those rights via. exflagsp and credanonp */ static int -reiserfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +reiserfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, + struct vnode **vpp) { int error; struct rfid *rfhp; Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Sun May 22 01:07:54 2011 (r222167) @@ -370,9 +370,10 @@ _xfs_vget(mp, ino, flags, vpp) } static int -_xfs_fhtovp(mp, fidp, vpp) +_xfs_fhtovp(mp, fidp, flags, vpp) struct mount *mp; struct fid *fidp; + int flags; struct vnode **vpp; { printf("xfs_fhtovp\n"); Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/kern/vfs_default.c Sun May 22 01:07:54 2011 (r222167) @@ -1081,9 +1081,10 @@ vfs_stdvget (mp, ino, flags, vpp) } int -vfs_stdfhtovp (mp, fhp, vpp) +vfs_stdfhtovp (mp, fhp, flags, vpp) struct mount *mp; struct fid *fhp; + int flags; struct vnode **vpp; { Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/kern/vfs_syscalls.c Sun May 22 01:07:54 2011 (r222167) @@ -4405,7 +4405,7 @@ fhopen(td, uap) return (ESTALE); vfslocked = VFS_LOCK_GIANT(mp); /* now give me my vnode, it gets returned to me locked */ - error = VFS_FHTOVP(mp, &fhp.fh_fid, &vp); + error = VFS_FHTOVP(mp, &fhp.fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); if (error) goto out; @@ -4581,7 +4581,7 @@ fhstat(td, uap) if ((mp = vfs_busyfs(&fh.fh_fsid)) == NULL) return (ESTALE); vfslocked = VFS_LOCK_GIANT(mp); - error = VFS_FHTOVP(mp, &fh.fh_fid, &vp); + error = VFS_FHTOVP(mp, &fh.fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); if (error) { VFS_UNLOCK_GIANT(vfslocked); @@ -4641,7 +4641,7 @@ kern_fhstatfs(struct thread *td, fhandle if ((mp = vfs_busyfs(&fh.fh_fsid)) == NULL) return (ESTALE); vfslocked = VFS_LOCK_GIANT(mp); - error = VFS_FHTOVP(mp, &fh.fh_fid, &vp); + error = VFS_FHTOVP(mp, &fh.fh_fid, LK_EXCLUSIVE, &vp); if (error) { vfs_unbusy(mp); VFS_UNLOCK_GIANT(vfslocked); Modified: head/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- head/sys/nfsserver/nfs_srvsubs.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/nfsserver/nfs_srvsubs.c Sun May 22 01:07:54 2011 (r222167) @@ -1128,7 +1128,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int flags, goto out; } } - error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); if (error) { /* Make sure the server replies ESTALE to the client. */ error = ESTALE; Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/nlm/nlm_prot_impl.c Sun May 22 01:07:54 2011 (r222167) @@ -1797,7 +1797,7 @@ nlm_get_vfs_state(struct nlm_host *host, goto out; } - error = VFS_FHTOVP(vs->vs_mp, &fhp->fh_fid, &vs->vs_vp); + error = VFS_FHTOVP(vs->vs_mp, &fhp->fh_fid, LK_EXCLUSIVE, &vs->vs_vp); if (error) goto out; vs->vs_vnlocked = TRUE; Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sat May 21 22:53:56 2011 (r222166) +++ head/sys/sys/mount.h Sun May 22 01:07:54 2011 (r222167) @@ -566,7 +566,8 @@ typedef int vfs_statfs_t(struct mount *m typedef int vfs_sync_t(struct mount *mp, int waitfor); typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags, struct vnode **vpp); -typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, struct vnode **vpp); +typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, + int flags, struct vnode **vpp); typedef int vfs_checkexp_t(struct mount *mp, struct sockaddr *nam, int *extflagsp, struct ucred **credanonp, int *numsecflavors, int **secflavors); @@ -610,8 +611,8 @@ vfs_statfs_t __vfs_statfs; #define VFS_SYNC(MP, WAIT) (*(MP)->mnt_op->vfs_sync)(MP, WAIT) #define VFS_VGET(MP, INO, FLAGS, VPP) \ (*(MP)->mnt_op->vfs_vget)(MP, INO, FLAGS, VPP) -#define VFS_FHTOVP(MP, FIDP, VPP) \ - (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, VPP) +#define VFS_FHTOVP(MP, FIDP, FLAGS, VPP) \ + (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, FLAGS, VPP) #define VFS_CHECKEXP(MP, NAM, EXFLG, CRED, NUMSEC, SEC) \ (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED, NUMSEC, SEC) #define VFS_EXTATTRCTL(MP, C, FN, NS, N) \ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat May 21 22:53:56 2011 (r222166) +++ head/sys/sys/param.h Sun May 22 01:07:54 2011 (r222167) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900037 /* Master, propagated to newvers */ +#define __FreeBSD_version 900038 /* Master, propagated to newvers */ #ifdef _KERNEL #define P_OSREL_SIGSEGV 700004 Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -1640,9 +1640,10 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags * those rights via. exflagsp and credanonp */ static int -ffs_fhtovp(mp, fhp, vpp) +ffs_fhtovp(mp, fhp, flags, vpp) struct mount *mp; struct fid *fhp; + int flags; struct vnode **vpp; { struct ufid *ufhp; @@ -1653,7 +1654,7 @@ ffs_fhtovp(mp, fhp, vpp) if (ufhp->ufid_ino < ROOTINO || ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg) return (ESTALE); - return (ufs_fhtovp(mp, ufhp, vpp)); + return (ufs_fhtovp(mp, ufhp, flags, vpp)); } /* Modified: head/sys/ufs/ufs/ufs_extern.h ============================================================================== --- head/sys/ufs/ufs/ufs_extern.h Sat May 21 22:53:56 2011 (r222166) +++ head/sys/ufs/ufs/ufs_extern.h Sun May 22 01:07:54 2011 (r222167) @@ -56,7 +56,7 @@ extern struct vop_vector ufs_vnodeops; int ufs_bmap(struct vop_bmap_args *); int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, struct buf *, int *, int *); -int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **); +int ufs_fhtovp(struct mount *, struct ufid *, int, struct vnode **); int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *); void ufs_dirbad(struct inode *, doff_t, char *); int ufs_dirbadentry(struct vnode *, struct direct *, int); Modified: head/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/ufs/ufs/ufs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -208,9 +208,10 @@ ufs_uninit(vfsp) * Call the VFS_CHECKEXP beforehand to verify access. */ int -ufs_fhtovp(mp, ufhp, vpp) +ufs_fhtovp(mp, ufhp, flags, vpp) struct mount *mp; struct ufid *ufhp; + int flags; struct vnode **vpp; { struct inode *ip; From owner-svn-src-head@FreeBSD.ORG Sun May 22 04:38:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9292F106566B; Sun, 22 May 2011 04:38:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 18D808FC0C; Sun, 22 May 2011 04:38:34 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4M4a9pE085732 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sat, 21 May 2011 22:36:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DD80A22.3090300@FreeBSD.org> Date: Sat, 21 May 2011 22:36:09 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105201703.p4KH3NrR093036@svn.freebsd.org> <4DD80A22.3090300@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sat, 21 May 2011 22:36:11 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sergey Kandaurov , src-committers@freebsd.org Subject: Re: svn commit: r222136 - head/usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 04:38:34 -0000 On May 21, 2011, at 12:53 PM, Doug Barton wrote: > On 05/20/2011 10:09, Sergey Kandaurov wrote: >> There's still a lot of warnings but all of them reside in contrib = part. >=20 > That doesn't mean that they shouldn't be fixed. :) The great thing = about the way that the contrib sources are arranged in svn is that we = can fix things in src/contrib with no concern to any "costs" imposed by = the VCS. Except when they appear to break arm :( Remember people: make universe = (or make tinderbox) is *REQUIRED* to run cleanly when making warning = fixes. Warner From owner-svn-src-head@FreeBSD.ORG Sun May 22 08:58:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C971106566C; Sun, 22 May 2011 08:58:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 838EA8FC0A; Sun, 22 May 2011 08:58:13 +0000 (UTC) Received: by gyg13 with SMTP id 13so2248515gyg.13 for ; Sun, 22 May 2011 01:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1GdsAvkOe4OGNZQdb91YIIqMe2v+0nHvL/6pu/gjY7c=; b=kD6kurqzy+f7uSiiCLoq8rPJ/4aGoYghA1mwK72ftCmJPb7ZUodRJHVSdvZvqY9BV2 uLChT+B45jpXYd71vuE/jPPPO6dUn7uJykkthepIIvCyt/G7ycwwmxi8opFOg1LeEsAi pzgDONg50Cc+nHm8Yt3+qFh5Vf7Leh1lX1FSg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=qTQDvPS2wk1YRBvIOwpIMq+NJTJyKj7NJMTbP3X7Fqw261/HH0DEpw+qqd5jRBrNSN h9MMvPhSMQ6oCjH6SPD+b2pVZJI9SbGMFuc/VtT8KbIvPEvAaWhPRj8iHOJo0V9SkSEX gUhX6bMLorfuTIvbNIDyPuGIWA2qeWK1Hx2iA= MIME-Version: 1.0 Received: by 10.150.198.16 with SMTP id v16mr1690997ybf.190.1306054692679; Sun, 22 May 2011 01:58:12 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.91.12 with HTTP; Sun, 22 May 2011 01:58:12 -0700 (PDT) In-Reply-To: References: <201011121302.oACD2Qjt009385@svn.freebsd.org> Date: Sun, 22 May 2011 16:58:12 +0800 X-Google-Sender-Auth: gfTPKz9xgsAwKpud7gcGVyrOllM Message-ID: From: Adrian Chadd To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 08:58:14 -0000 On 15 November 2010 19:56, Ivan Voras wrote: > While at it, why not intptr_t? It would be marginally more useful and > almost free. Because it can lead to code choices that use the whole 64 bit space for something other than a single 32 bit integer (say, four 16 bit words all packed together) which suddenly finds itself breaking on 32 bit platforms. Not that any fine FreeBSD programmers would make such a mistake. :) I agree with Luigi. Adrian From owner-svn-src-head@FreeBSD.ORG Sun May 22 09:29:39 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 989B0106566C; Sun, 22 May 2011 09:29:39 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1ED8FC0C; Sun, 22 May 2011 09:29:39 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p4M9TbDY006445 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 May 2011 11:29:38 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1306056578; bh=46ZwIAKUCpzKV6aKqJrWJ14MyURWw+8qn9arX6iSW24=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=XYGxLKrtyPTCYmnTBqORcTctV1KMm+xjSSiLnLCaZTW5VZGH+KYp5KcXCRp1BeZLZ tsKq4Dte1TFHFWYP/oZ6SlqeCqpFr58uF5KRbQmgG3qX4TQgJMYDUMH4FAr/gVsDVq 4CBaN+fY9EU2qv7OpKF+/SRR8yApvc4cCfrjNXQU= Date: Sun, 22 May 2011 11:29:37 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Edwin Groothuis Message-ID: <20110522092937.GS31223@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Edwin Groothuis , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201105191309.p4JD9dXY038734@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105191309.p4JD9dXY038734@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222094 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:29:39 -0000 On Thu, 19.05.2011 at 13:09:39 +0000, Edwin Groothuis wrote: > Author: edwin > Date: Thu May 19 13:09:39 2011 > New Revision: 222094 > URL: http://svn.freebsd.org/changeset/base/222094 > > Log: > Put AN back after finding out that tzsetup(1) will complain that > it doesn't exist. It will be removed again once the tzdata distribution > files have been updated with the replacements for AN. Wouldn't it be better to have tzsetup use iso3166.tab from the tzdata distribution, which is mostly guaranteed to be in sync with zone.tab? Uli From owner-svn-src-head@FreeBSD.ORG Sun May 22 09:48:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F0F106566C; Sun, 22 May 2011 09:48:25 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5478FC0A; Sun, 22 May 2011 09:48:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4M9mPwv068193; Sun, 22 May 2011 09:48:25 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4M9mP2m068191; Sun, 22 May 2011 09:48:25 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105220948.p4M9mP2m068191@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 09:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222171 - head/tools/tools/iso X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:48:25 -0000 Author: uqs Date: Sun May 22 09:48:25 2011 New Revision: 222171 URL: http://svn.freebsd.org/changeset/base/222171 Log: Update URLs and fix regex to work with current version of the files. Modified: head/tools/tools/iso/check-iso3166.pl Modified: head/tools/tools/iso/check-iso3166.pl ============================================================================== --- head/tools/tools/iso/check-iso3166.pl Sun May 22 03:18:25 2011 (r222170) +++ head/tools/tools/iso/check-iso3166.pl Sun May 22 09:48:25 2011 (r222171) @@ -4,8 +4,8 @@ # $FreeBSD$ # # This script compares the file iso3166 (from head/share/misc) with the files -# list-en1-semic-2.txt (from -# http://www.iso.org/iso/list-en1-semic-2.txt) and iso3166-countrycodes.txt +# list-en1-semic-3.txt (from +# http://www.iso.org/iso/list-en1-semic-3.txt) and iso3166-countrycodes.txt # (from ftp://ftp.ripe.net/) to see if there any differences. # # Created by Edwin Groothuis for the FreeBSD project. @@ -41,7 +41,7 @@ my %old = (); my %new1 = (); { - open(FIN, "iso3166-countrycodes.txt") or die "Cannot open iso3166-countrycodes.txt, which can be retrieved from ftp://ftp.ripe.net/"; + open(FIN, "iso3166-countrycodes.txt") or die "Cannot open iso3166-countrycodes.txt, which can be retrieved from ftp://ftp.ripe.net/iso3166-countrycodes.txt"; my @lines = ; close(FIN); chomp(@lines); @@ -56,7 +56,7 @@ my %new1 = (); next if ($l eq ""); die "Invalid line: $l\n" - if ($l !~ /^(.+?)[\t ][\t ]+([A-Z]{2})[\t ]+([A-Z]{3})[\t ]+(\d+)[\t ]*$/); + if ($l !~ /^(.+?)[\t ]+([A-Z]{2})[\t ]+([A-Z]{3})[\t ]+(\d+)[\t ]*$/); my $two = $2; my $three = $3; my $number = $4; @@ -71,7 +71,7 @@ my %new1 = (); my %new2 = (); { - open(FIN, "list-en1-semic-2.txt") or die "Cannot open list-en1-semic-2.txt, which can be retrieved from http://www.iso.org/iso/list-en1-semic-2.txt"; + open(FIN, "list-en1-semic-3.txt") or die "Cannot open list-en1-semic-3.txt, which can be retrieved from http://www.iso.org/iso/list-en1-semic-3.txt"; my @lines = ; close(FIN); chomp(@lines); From owner-svn-src-head@FreeBSD.ORG Sun May 22 09:49:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C8951065670; Sun, 22 May 2011 09:49:43 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep24.mx.upcmail.net (fep24.mx.upcmail.net [62.179.121.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2B23C8FC14; Sun, 22 May 2011 09:49:41 +0000 (UTC) Received: from edge03.upcmail.net ([192.168.13.238]) by viefep16-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20110522093305.GNY29314.viefep16-int.chello.at@edge03.upcmail.net>; Sun, 22 May 2011 11:33:05 +0200 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge03.upcmail.net with edge id mZZ41g0130a5KZh03ZZ5r1; Sun, 22 May 2011 11:33:05 +0200 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 10AC26D41F; Sun, 22 May 2011 11:33:04 +0200 (CEST) Date: Sun, 22 May 2011 11:33:03 +0200 From: Stefan Farfeleder To: "Andrey V. Elsukov" Message-ID: <20110522093302.GA2638@mole.fafoe.narf.at> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105152003.p4FK3tnS050889@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Cloudmark-Analysis: v=1.1 cv=zlRBWuFCZaNL9+WHNm1pWLowY5Lx061w2zJBJiDkNAU= c=1 sm=0 a=wom5GMh1gUkA:10 a=E7XHod5se7kA:10 a=dBRESv0yCI8A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=NXWmQLDIsIibcRWPP7kA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:49:43 -0000 On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: > Author: ae > Date: Sun May 15 20:03:54 2011 > New Revision: 221972 > URL: http://svn.freebsd.org/changeset/base/221972 > > Log: > Add a sysctl kern.geom.part.check_integrity for those who has corrupt > partition tables and lost an ability to boot after r221788. > Also unhide an error message from bootverbose, this would help to > easier determine the problem. So, what's the point of this check? It breaks mounting of all my USB drives. Everyone now has to set this sysctl? da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) GEOM_PART: integrity check failed (da0, MBR) Stefan From owner-svn-src-head@FreeBSD.ORG Sun May 22 09:58:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABC6106566B; Sun, 22 May 2011 09:58:49 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AEF98FC0A; Sun, 22 May 2011 09:58:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4M9wn2Z068535; Sun, 22 May 2011 09:58:49 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4M9wnwf068533; Sun, 22 May 2011 09:58:49 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105220958.p4M9wnwf068533@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 09:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222172 - head/sys/gnu/fs/xfs/FreeBSD/support X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:58:49 -0000 Author: uqs Date: Sun May 22 09:58:48 2011 New Revision: 222172 URL: http://svn.freebsd.org/changeset/base/222172 Log: Fix typo in unused function name Submitted by: arundel Modified: head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c Modified: head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c Sun May 22 09:48:25 2011 (r222171) +++ head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c Sun May 22 09:58:48 2011 (r222172) @@ -56,7 +56,7 @@ kdb_getarea_size(void *res, unsigned lon } int -db_putarea_size(unsigned long addr, void *res, size_t size) +kdb_putarea_size(unsigned long addr, void *res, size_t size) { return 0; } From owner-svn-src-head@FreeBSD.ORG Sun May 22 10:41:38 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D7DA106566B; Sun, 22 May 2011 10:41:38 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail4out.barnet.com.au (mail4out.barnet.com.au [202.83.178.123]) by mx1.freebsd.org (Postfix) with ESMTP id 0891C8FC0C; Sun, 22 May 2011 10:41:37 +0000 (UTC) Received: by mail4out.barnet.com.au (Postfix, from userid 1001) id EFB1737BAD7; Sun, 22 May 2011 20:16:49 +1000 (EST) X-Viruscan-Id: <4DD8E291000141025A98A4@BarNet> Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.barnet.com.au", Issuer "Equifax" (verified OK)) by mail4.barnet.com.au (Postfix) with ESMTPS id 99DBB4222AE; Sun, 22 May 2011 20:16:49 +1000 (EST) Received: from [10.204.250.208] (ppp121-45-190-113.lns6.syd7.internode.on.net [121.45.190.113]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by mail4auth.barnet.com.au (Postfix) with ESMTPSA id 3F44237B984; Sun, 22 May 2011 20:16:49 +1000 (EST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Edwin Groothuis In-Reply-To: <20110522092937.GS31223@acme.spoerlein.net> Date: Sun, 22 May 2011 20:16:47 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: <3AA8EEBF-4C35-41A3-9516-09044CADAD0C@mavetju.org> References: <201105191309.p4JD9dXY038734@svn.freebsd.org> <20110522092937.GS31223@acme.spoerlein.net> To: =?iso-8859-1?Q?Ulrich_Sp=F6rlein?= X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222094 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 10:41:38 -0000 On 22/05/2011, at 7:29 PM, Ulrich Sp=F6rlein wrote: > On Thu, 19.05.2011 at 13:09:39 +0000, Edwin Groothuis wrote: >> Author: edwin >> Date: Thu May 19 13:09:39 2011 >> New Revision: 222094 >> URL: http://svn.freebsd.org/changeset/base/222094 >>=20 >> Log: >> Put AN back after finding out that tzsetup(1) will complain that >> it doesn't exist. It will be removed again once the tzdata = distribution >> files have been updated with the replacements for AN. >=20 > Wouldn't it be better to have tzsetup use iso3166.tab from the tzdata > distribution, which is mostly guaranteed to be in sync with zone.tab? Which opens a different can of worms. Duplicate file, with semi-similar contents. Whenever there are changes in the distribution of the tzdata iso3166.tab = equivalent file, I check if they are in the /usr/share/misc equivalent = file. A warning to that file should be added that tzsetup uses it and that = they always should check tzsetup functionality before commiting it. Edwin= From owner-svn-src-head@FreeBSD.ORG Sun May 22 12:12:28 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85A14106564A; Sun, 22 May 2011 12:12:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75D308FC08; Sun, 22 May 2011 12:12:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MCCSnh073814; Sun, 22 May 2011 12:12:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MCCSCn073812; Sun, 22 May 2011 12:12:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105221212.p4MCCSCn073812@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 May 2011 12:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222173 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 12:12:28 -0000 Author: jilles Date: Sun May 22 12:12:28 2011 New Revision: 222173 URL: http://svn.freebsd.org/changeset/base/222173 Log: sh: Fix bss-based buffer overflow in . builtin. If the length of a directory in PATH together with the given filename exceeded FILENAME_MAX (which may happen even for pathnames that work), a static buffer was overflown. The static buffer is unnecessary, we can use the stalloc() stack. Obtained from: NetBSD MFC after: 1 week Modified: head/bin/sh/main.c Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sun May 22 09:58:48 2011 (r222172) +++ head/bin/sh/main.c Sun May 22 12:12:28 2011 (r222173) @@ -281,7 +281,6 @@ readcmdfile(const char *name) static char * find_dot_file(char *basename) { - static char localname[FILENAME_MAX+1]; char *fullname; const char *path = pathval(); struct stat statb; @@ -291,10 +290,14 @@ find_dot_file(char *basename) return basename; while ((fullname = padvance(&path, basename)) != NULL) { - strcpy(localname, fullname); + if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) { + /* + * Don't bother freeing here, since it will + * be freed by the caller. + */ + return fullname; + } stunalloc(fullname); - if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) - return localname; } return basename; } From owner-svn-src-head@FreeBSD.ORG Sun May 22 12:15:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6814F106564A; Sun, 22 May 2011 12:15:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 582948FC08; Sun, 22 May 2011 12:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MCFE56073929; Sun, 22 May 2011 12:15:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MCFEXN073928; Sun, 22 May 2011 12:15:14 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105221215.p4MCFEXN073928@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 May 2011 12:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222174 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 12:15:14 -0000 Author: jilles Date: Sun May 22 12:15:14 2011 New Revision: 222174 URL: http://svn.freebsd.org/changeset/base/222174 Log: sh: Add test for r222173. Added: head/tools/regression/bin/sh/builtins/dot4.0 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/dot4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/dot4.0 Sun May 22 12:15:14 2011 (r222174) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +v=abcd +v=$v$v$v$v +v=$v$v$v$v +v=$v$v$v$v +v=$v$v$v$v +v=$v$v$v$v +r=$( ( + trap 'exit 0' 0 + . "$v" +) 2>&1 >/dev/null) && [ -n "$r" ] From owner-svn-src-head@FreeBSD.ORG Sun May 22 13:03:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4154A106564A; Sun, 22 May 2011 13:03:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C62C68FC12; Sun, 22 May 2011 13:03:40 +0000 (UTC) Received: by gxk28 with SMTP id 28so2295077gxk.13 for ; Sun, 22 May 2011 06:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lJMve+KAWDhSpIH8y+zJORRoG6CdKfyVxCNMiXszjNA=; b=dSXQVoqO8VV2UkC4IQ6kybo3ISb+gJhFepyBpRYL3YEbWZTrSS5Cqc9uZcH/YRWqH1 K9FCCkNDwk/A3QsDaYREhAn+W72SGTk6R7n3AbzVNllrY5hzY37jTT57p+kvBP38JTWS 3EbdLjo2vVxzABEmY+V7ywRqA4dLMlaUa8ViQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=TmDYasF6+15Ckq7gf6WWG4YOSXaVA7tZlNh7NjY8i6wyV23tnztkccauex3QyRTSWj iVDpYQaXgPtDuZDueZMTuYS8GwGVz21KYMlOO+ygadDEL4m5clHR4mrG51VWa+aVz2qg +qJuLp9CYfn9XuWRm8ScK8Ip2cAkrTthkH7P0= MIME-Version: 1.0 Received: by 10.150.198.16 with SMTP id v16mr1831764ybf.190.1306069419879; Sun, 22 May 2011 06:03:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.91.12 with HTTP; Sun, 22 May 2011 06:03:39 -0700 (PDT) In-Reply-To: <20110522093302.GA2638@mole.fafoe.narf.at> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> Date: Sun, 22 May 2011 21:03:39 +0800 X-Google-Sender-Auth: jqYuKZPprUoZHMIv3K5xUz1OMn0 Message-ID: From: Adrian Chadd To: Stefan Farfeleder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, "Andrey V. Elsukov" , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 13:03:41 -0000 This also bit me on embedded platform stuff. Is it possible to disable this by default for now and have it just warn lou= dly? And/or hide the default value behind a kernel configuration variable so we can disable it (but still get the warnings) for now? Thanks, Adrian On 22 May 2011 17:33, Stefan Farfeleder wrote: > On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >> Author: ae >> Date: Sun May 15 20:03:54 2011 >> New Revision: 221972 >> URL: http://svn.freebsd.org/changeset/base/221972 >> >> Log: >> =A0 Add a sysctl kern.geom.part.check_integrity for those who has corrup= t >> =A0 partition tables and lost an ability to boot after r221788. >> =A0 Also unhide an error message from bootverbose, this would help to >> =A0 easier determine the problem. > > So, what's the point of this check? It breaks mounting of all my USB > drives. =A0Everyone now has to set this sysctl? > > da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) > GEOM_PART: integrity check failed (da0, MBR) > > Stefan > From owner-svn-src-head@FreeBSD.ORG Sun May 22 14:03:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E03D1065675; Sun, 22 May 2011 14:03:21 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535118FC16; Sun, 22 May 2011 14:03:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3LPh077092; Sun, 22 May 2011 14:03:21 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3L91077090; Sun, 22 May 2011 14:03:21 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3L91077090@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222175 - head/share/examples/libvgl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:21 -0000 Author: uqs Date: Sun May 22 14:03:21 2011 New Revision: 222175 URL: http://svn.freebsd.org/changeset/base/222175 Log: Remove typos, tabs-after-spaces and EOL whitespace. Convert to UTF-8. Modified: head/share/examples/libvgl/demo.c Modified: head/share/examples/libvgl/demo.c ============================================================================== --- head/share/examples/libvgl/demo.c Sun May 22 12:15:14 2011 (r222174) +++ head/share/examples/libvgl/demo.c Sun May 22 14:03:21 2011 (r222175) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1991-1997 Søren Schmidt + * Copyright (c) 1991-1997 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,15 +42,15 @@ main(int argc, char **argv) // set graphics mode, here 320x240 256 colors // supported modes are (from ): - // SW_VGA_CG320: std VGA 320x200 256 colors - // SW_VGA_MODEX: Modex VGA 320x240 256 colors - // SW_VGA_VG640: std VGA 640x480 16 colors + // SW_VGA_CG320: std VGA 320x200 256 colors + // SW_VGA_MODEX: Modex VGA 320x240 256 colors + // SW_VGA_VG640: std VGA 640x480 16 colors VGLInit(SW_VGA_MODEX); // initialize mouse and show pointer VGLMouseInit(VGL_MOUSESHOW); - // VGLDisplay is a ptr to a struct Bitmap defined and initialized by + // VGLDisplay is a ptr to a struct Bitmap defined and initialized by // libvgl. The Bitmap points directly to screen memory etc. xsize=VGLDisplay->Xsize; ysize=VGLDisplay->Ysize; @@ -61,7 +61,7 @@ main(int argc, char **argv) VGLClear(tmp, 0); // fill the screen with colored lines - for (y=0; yBitmap[i+256*j] = i%16; @@ -106,12 +106,12 @@ main(int argc, char **argv) // loop around drawing and copying while (++i) { VGLBitmapCopy(VGLDisplay, rand()%xsize, rand()%ysize, - VGLDisplay, rand()%xsize, rand()%ysize, - rand()%xsize, rand()%ysize); + VGLDisplay, rand()%xsize, rand()%ysize, + rand()%xsize, rand()%ysize); VGLLine(VGLDisplay, rand()%xsize, rand()%ysize, rand()%xsize, rand()%ysize, rand()%256); VGLEllipse(VGLDisplay, rand()%xsize, rand()%ysize, - rand()%xsize/2, rand()%ysize/2, rand()%256); + rand()%xsize/2, rand()%ysize/2, rand()%256); rand(); if (i > 1000) break; } @@ -120,4 +120,3 @@ main(int argc, char **argv) VGLEnd(); return 0; } - From owner-svn-src-head@FreeBSD.ORG Sun May 22 14:03:30 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED60106564A; Sun, 22 May 2011 14:03:30 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC8E48FC0A; Sun, 22 May 2011 14:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3Udr077149; Sun, 22 May 2011 14:03:30 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3Uj2077132; Sun, 22 May 2011 14:03:30 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3Uj2077132@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222176 - in head: sbin/atacontrol sbin/mount_reiserfs share/man/man4 share/man/man5 share/man/man9 share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:31 -0000 Author: uqs Date: Sun May 22 14:03:30 2011 New Revision: 222176 URL: http://svn.freebsd.org/changeset/base/222176 Log: Re-encode files from ISO-8859-1 to UTF-8 Modified: head/sbin/atacontrol/atacontrol.8 head/sbin/atacontrol/atacontrol.c head/sbin/mount_reiserfs/mount_reiserfs.8 head/sbin/mount_reiserfs/mount_reiserfs.c head/share/man/man4/aio.4 head/share/man/man4/ata.4 head/share/man/man4/coretemp.4 head/share/man/man4/ichwd.4 head/share/man/man4/pst.4 head/share/man/man4/ucycom.4 head/share/man/man5/reiserfs.5 head/share/man/man9/LOCK_PROFILING.9 head/share/man/man9/pseudofs.9 head/share/man/man9/sbuf.9 head/share/man/man9/zone.9 head/share/misc/bsd-family-tree Modified: head/sbin/atacontrol/atacontrol.8 ============================================================================== --- head/sbin/atacontrol/atacontrol.8 Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/atacontrol/atacontrol.8 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2000,2001,2002 Søren Schmidt +.\" Copyright (c) 2000,2001,2002 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/sbin/atacontrol/atacontrol.c ============================================================================== --- head/sbin/atacontrol/atacontrol.c Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/atacontrol/atacontrol.c Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000 - 2006 Søren Schmidt + * Copyright (c) 2000 - 2006 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sbin/mount_reiserfs/mount_reiserfs.8 ============================================================================== --- head/sbin/mount_reiserfs/mount_reiserfs.8 Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/mount_reiserfs/mount_reiserfs.8 Sun May 22 14:03:30 2011 (r222176) @@ -1,7 +1,7 @@ .\" .\" Copyright (c) 1993,1994 Christopher G. Demetriou .\" Copyright (c) 1999 Semen Ustimenko -.\" Copyright (c) 2005 Jean-Sébastien Pédron +.\" Copyright (c) 2005 Jean-Sébastien Pédron .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/sbin/mount_reiserfs/mount_reiserfs.c ============================================================================== --- head/sbin/mount_reiserfs/mount_reiserfs.c Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/mount_reiserfs/mount_reiserfs.c Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 Jean-Sébastien Pédron + * Copyright (c) 2005 Jean-Sébastien Pédron * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/aio.4 ============================================================================== --- head/share/man/man4/aio.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/aio.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2002 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2002 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/ata.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2003 Søren Schmidt +.\" Copyright (c) 2003 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/coretemp.4 ============================================================================== --- head/share/man/man4/coretemp.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/coretemp.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/ichwd.4 ============================================================================== --- head/share/man/man4/ichwd.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/ichwd.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/pst.4 ============================================================================== --- head/share/man/man4/pst.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/pst.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2001,2002 Søren Schmidt +.\" Copyright (c) 2001,2002 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/ucycom.4 ============================================================================== --- head/share/man/man4/ucycom.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/ucycom.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man5/reiserfs.5 ============================================================================== --- head/share/man/man5/reiserfs.5 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man5/reiserfs.5 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2005 Jean-Sébastien Pédron +.\" Copyright (c) 2005 Jean-Sébastien Pédron .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man9/LOCK_PROFILING.9 ============================================================================== --- head/share/man/man9/LOCK_PROFILING.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/LOCK_PROFILING.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav .\" Copyright (c) 2005 Robert N. M. Watson .\" Copyright (c) 2006 Kip Macy .\" All rights reserved. Modified: head/share/man/man9/pseudofs.9 ============================================================================== --- head/share/man/man9/pseudofs.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/pseudofs.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/sbuf.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/zone.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sun May 22 14:03:21 2011 (r222175) +++ head/share/misc/bsd-family-tree Sun May 22 14:03:30 2011 (r222176) @@ -562,7 +562,7 @@ Australian Computer Society, Hobart, Aug Peter H. Salus. Unix at 25. Byte Magazine, October 1994. URL: http://www.byte.com/art/9410/sec8/art3.htm -Andreas Klemm, Lars Köller. If you're going to San Francisco ... +Andreas Klemm, Lars Köller. If you're going to San Francisco ... Die freien BSD-Varianten von Unix. c't April 1997, page 368ff. BSD Release Announcements collection. From owner-svn-src-head@FreeBSD.ORG Sun May 22 14:03:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC2A51065692; Sun, 22 May 2011 14:03:38 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB52C8FC0C; Sun, 22 May 2011 14:03:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3coN077200; Sun, 22 May 2011 14:03:38 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3cAR077187; Sun, 22 May 2011 14:03:38 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3cAR077187@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03: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: r222177 - head/bin/pax X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:39 -0000 Author: uqs Date: Sun May 22 14:03:38 2011 New Revision: 222177 URL: http://svn.freebsd.org/changeset/base/222177 Log: Fix a bunch of typos and a couple of whitespace nits. Helped by: codespell and vim's spellchecker Modified: head/bin/pax/ar_io.c head/bin/pax/ar_subs.c head/bin/pax/buf_subs.c head/bin/pax/cpio.c head/bin/pax/file_subs.c head/bin/pax/ftree.c head/bin/pax/options.c head/bin/pax/pat_rep.c head/bin/pax/pax.c head/bin/pax/sel_subs.c head/bin/pax/tables.c head/bin/pax/tar.c Modified: head/bin/pax/ar_io.c ============================================================================== --- head/bin/pax/ar_io.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/ar_io.c Sun May 22 14:03:38 2011 (r222177) @@ -204,7 +204,7 @@ ar_open(const char *name) /* * set default blksz on read. APPNDs writes rdblksz on the last volume * On all new archive volumes, we shift to wrblksz (if the user - * specified one, otherwize we will continue to use rdblksz). We + * specified one, otherwise we will continue to use rdblksz). We * must to set blocksize based on what kind of device the archive is * stored. */ @@ -381,7 +381,7 @@ ar_close(void) /* * If we have not determined the format yet, we just say how many bytes - * we have skipped over looking for a header to id. there is no way we + * we have skipped over looking for a header to id. There is no way we * could have written anything yet. */ if (frmt == NULL) { @@ -595,7 +595,7 @@ ar_read(char *buf, int cnt) * Return: * Number of bytes written. 0 indicates end of volume reached and with no * flaws (as best that can be detected). A -1 indicates an unrecoverable - * error in the archive occured. + * error in the archive occurred. */ int @@ -679,7 +679,7 @@ ar_write(char *buf, int bsz) * if this is a block aligned archive format, we may have a bad archive * if the format wants the header to start at a BLKMULT boundary. While * we can deal with the mis-aligned data, it violates spec and other - * archive readers will likely fail. if the format is not block + * archive readers will likely fail. If the format is not block * aligned, the user may be lucky (and the archive is ok). */ if (res >= 0) { @@ -794,7 +794,7 @@ ar_rdsync(void) /* * ar_fow() - * Move the I/O position within the archive foward the specified number of + * Move the I/O position within the archive forward the specified number of * bytes as supported by the device. If we cannot move the requested * number of bytes, return the actual number of bytes moved in skipped. * Return: @@ -813,7 +813,7 @@ ar_fow(off_t sksz, off_t *skipped) return(0); /* - * we cannot move foward at EOF or error + * we cannot move forward at EOF or error */ if (lstrval <= 0) return(lstrval); @@ -822,7 +822,7 @@ ar_fow(off_t sksz, off_t *skipped) * Safer to read forward on devices where it is hard to find the end of * the media without reading to it. With tapes we cannot be sure of the * number of physical blocks to skip (we do not know physical block - * size at this point), so we must only read foward on tapes! + * size at this point), so we must only read forward on tapes! */ if (artyp != ISREG) return(0); @@ -907,7 +907,7 @@ ar_rev(off_t sksz) /* * we may try to go backwards past the start when the archive - * is only a single record. If this hapens and we are on a + * is only a single record. If this happens and we are on a * multi volume archive, we need to go to the end of the * previous volume and continue our movement backwards from * there. @@ -1046,7 +1046,7 @@ get_phys(void) } /* - * read foward to the file mark, then back up in front of the filemark + * read forward to the file mark, then back up in front of the filemark * (this is a bit paranoid, but should be safe to do). */ while ((res = read(arfd, scbuf, sizeof(scbuf))) > 0) Modified: head/bin/pax/ar_subs.c ============================================================================== --- head/bin/pax/ar_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/ar_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -854,7 +854,7 @@ copy(void) } /* - * Non standard -Y and -Z flag. When the exisiting file is + * Non standard -Y and -Z flag. When the existing file is * same age or newer skip */ if ((Yflag || Zflag) && ((lstat(arcn->name, &sb) == 0))) { @@ -1096,7 +1096,7 @@ next_head(ARCHD *arcn) } /* - * ok got a valid header, check for trailer if format encodes it in the + * ok got a valid header, check for trailer if format encodes it in * the header. */ if (frmt->inhead && ((*frmt->trail_cpio)(arcn) == 0)) { Modified: head/bin/pax/buf_subs.c ============================================================================== --- head/bin/pax/buf_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/buf_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -145,7 +145,7 @@ rd_start(void) } if (wrblksz % BLKMULT) { paxwarn(1, "Write block size %d is not a %d byte multiple", - wrblksz, BLKMULT); + wrblksz, BLKMULT); return(-1); } } @@ -182,13 +182,13 @@ cp_start(void) * the start of the header of the first file added to the archive. The * format specific end read function tells us how many bytes to move * backwards in the archive to be positioned BEFORE the trailer. Two - * different postions have to be adjusted, the O.S. file offset (e.g. the + * different positions have to be adjusted, the O.S. file offset (e.g. the * position of the tape head) and the write point within the data we have * stored in the read (soon to become write) buffer. We may have to move * back several records (the number depends on the size of the archive * record and the size of the format trailer) to read up the record where * the first byte of the trailer is recorded. Trailers may span (and - * overlap) record boundries. + * overlap) record boundaries. * We first calculate which record has the first byte of the trailer. We * move the OS file offset back to the start of this record and read it * up. We set the buffer write pointer to be at this byte (the byte where @@ -196,10 +196,10 @@ cp_start(void) * start of this record so a flush of this buffer will replace the record * in the archive. * A major problem is rewriting this last record. For archives stored - * on disk files, this is trival. However, many devices are really picky + * on disk files, this is trivial. However, many devices are really picky * about the conditions under which they will allow a write to occur. * Often devices restrict the conditions where writes can be made writes, - * so it may not be feasable to append archives stored on all types of + * so it may not be feasible to append archives stored on all types of * devices. * Return: * 0 for success, -1 for failure @@ -365,7 +365,7 @@ rd_sync(void) * pback() * push the data used during the archive id phase back into the I/O * buffer. This is required as we cannot be sure that the header does NOT - * overlap a block boundry (as in the case we are trying to recover a + * overlap a block boundary (as in the case we are trying to recover a * flawed archived). This was not designed to be used for any other * purpose. (What software engineering, HA!) * WARNING: do not even THINK of pback greater than BLKMULT, unless the @@ -382,7 +382,7 @@ pback(char *pt, int cnt) /* * rd_skip() - * skip foward in the archive during an archive read. Used to get quickly + * skip forward in the archive during an archive read. Used to get quickly * past file data and padding for files the user did NOT select. * Return: * 0 if ok, -1 failure, and 1 when EOF on the archive volume was detected. @@ -396,7 +396,7 @@ rd_skip(off_t skcnt) off_t skipped = 0; /* - * consume what data we have in the buffer. If we have to move foward + * consume what data we have in the buffer. If we have to move forward * whole records, we call the low level skip function to see if we can * move within the archive without doing the expensive reads on data we * do not want. @@ -453,7 +453,7 @@ rd_skip(off_t skcnt) * wr_fin() * flush out any data (and pad if required) the last block. We always pad * with zero (even though we do not have to). Padding with 0 makes it a - * lot easier to recover if the archive is damaged. zero paddding SHOULD + * lot easier to recover if the archive is damaged. zero padding SHOULD * BE a requirement.... */ @@ -530,7 +530,7 @@ rd_wrbuf(char *in, int cpcnt) /* * read error, return what we got (or the error if * no data was copied). The caller must know that an - * error occured and has the best knowledge what to + * error occurred and has the best knowledge what to * do with it */ if ((res = cpcnt - incnt) > 0) @@ -584,7 +584,7 @@ wr_skip(off_t skcnt) /* * wr_rdfile() - * fill write buffer with the contents of a file. We are passed an open + * fill write buffer with the contents of a file. We are passed an open * file descriptor to the file and the archive structure that describes the * file we are storing. The variable "left" is modified to contain the * number of bytes of the file we were NOT able to write to the archive. @@ -671,7 +671,7 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *l int isem = 1; int rem; int sz = MINFBSZ; - struct stat sb; + struct stat sb; u_long crc = 0L; /* @@ -884,7 +884,7 @@ buf_flush(int bufcnt) /* * if we have reached the user specified byte count for each archive - * volume, prompt for the next volume. (The non-standrad -R flag). + * volume, prompt for the next volume. (The non-standard -R flag). * NOTE: If the wrlimit is smaller than wrcnt, we will always write * at least one record. We always round limit UP to next blocksize. */ @@ -944,7 +944,7 @@ buf_flush(int bufcnt) } else if (cnt > 0) { /* * Oh drat we got a partial write! - * if format doesnt care about alignment let it go, + * if format doesn't care about alignment let it go, * we warned the user in ar_write().... but this means * the last record on this volume violates pax spec.... */ Modified: head/bin/pax/cpio.c ============================================================================== --- head/bin/pax/cpio.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/cpio.c Sun May 22 14:03:38 2011 (r222177) @@ -627,7 +627,7 @@ vcpio_rd(ARCHD *arcn, char *buf) return(-1); /* - * skip padding. header + filename is aligned to 4 byte boundries + * skip padding. header + filename is aligned to 4 byte boundaries */ if (rd_skip((off_t)(VCPIO_PAD(sizeof(HD_VCPIO) + nsz))) < 0) return(-1); @@ -942,7 +942,7 @@ bcpio_rd(ARCHD *arcn, char *buf) return(-1); /* - * header + file name are aligned to 2 byte boundries, skip if needed + * header + file name are aligned to 2 byte boundaries, skip if needed */ if (rd_skip((off_t)(BCPIO_PAD(sizeof(HD_BCPIO) + nsz))) < 0) return(-1); @@ -989,8 +989,8 @@ bcpio_endrd(void) * bcpio_wr() * copy the data in the ARCHD to buffer in old binary cpio format * There is a real chance of field overflow with this critter. So we - * always check the conversion is ok. nobody in his their right mind - * should write an achive in this format... + * always check that the conversion is ok. nobody in their right mind + * should write an archive in this format... * Return * 0 if file has data to be written after the header, 1 if file has NO * data to write after the header, -1 if archive write failed Modified: head/bin/pax/file_subs.c ============================================================================== --- head/bin/pax/file_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/file_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -84,9 +84,9 @@ file_creat(ARCHD *arcn) * works. We have to take special handling when the file does exist. To * detect this, we use O_EXCL. For example when trying to create a * file and a character device or fifo exists with the same name, we - * can accidently open the device by mistake (or block waiting to open) - * If we find that the open has failed, then figure spend the effort to - * figure out why. This strategy was found to have better average + * can accidentally open the device by mistake (or block waiting to + * open). If we find that the open has failed, then spend the effort + * to figure out why. This strategy was found to have better average * performance in common use than checking the file (and the path) * first with lstat. */ @@ -559,7 +559,7 @@ chk_path( char *name, uid_t st_uid, gid_ for(;;) { /* - * work foward from the first / and check each part of the path + * work forward from the first / and check each part of the path */ spt = strchr(spt, '/'); if (spt == NULL) @@ -600,7 +600,7 @@ chk_path( char *name, uid_t st_uid, gid_ (void)set_ids(name, st_uid, st_gid); /* - * make sure the user doen't have some strange umask that + * make sure the user doesn't have some strange umask that * causes this newly created directory to be unusable. We fix * the modes and restore them back to the creation default at * the end of pax @@ -716,11 +716,11 @@ set_pmode(char *fnm, mode_t mode) * uses lseek whenever it detects the input data is all 0 within that * file block. In more detail, the strategy is as follows: * While the input is all zero keep doing an lseek. Keep track of when we - * pass over file block boundries. Only write when we hit a non zero + * pass over file block boundaries. Only write when we hit a non zero * input. once we have written a file block, we continue to write it to * the end (we stop looking at the input). When we reach the start of the * next file block, start checking for zero blocks again. Working on file - * block boundries significantly reduces the overhead when copying files + * block boundaries significantly reduces the overhead when copying files * that are NOT very sparse. This overhead (when compared to a write) is * almost below the measurement resolution on many systems. Without it, * files with holes cannot be safely copied. It does has a side effect as @@ -923,7 +923,7 @@ set_crc(ARCHD *arcn, int fd) /* * safety check. we want to avoid archiving files that are active as - * they can create inconsistant archive copies. + * they can create inconsistent archive copies. */ if (cpcnt != arcn->sb.st_size) paxwarn(1, "File changed size %s", arcn->org_name); Modified: head/bin/pax/ftree.c ============================================================================== --- head/bin/pax/ftree.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/ftree.c Sun May 22 14:03:38 2011 (r222177) @@ -101,8 +101,8 @@ ftree_start(void) /* * optional user flags that effect file traversal * -H command line symlink follow only (half follow) - * -L follow sylinks (logical) - * -P do not follow sylinks (physical). This is the default. + * -L follow symlinks (logical) + * -P do not follow symlinks (physical). This is the default. * -X do not cross over mount points * -t preserve access times on files read. * -n select only the first member of a file tree when a match is found Modified: head/bin/pax/options.c ============================================================================== --- head/bin/pax/options.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/options.c Sun May 22 14:03:38 2011 (r222177) @@ -887,7 +887,7 @@ tar_options(int argc, char **argv) sawpat = 1; } /* - * if patterns were added, we are doing chdir() + * if patterns were added, we are doing chdir() * on a file-by-file basis, else, just one * global chdir (if any) after opening input. */ Modified: head/bin/pax/pat_rep.c ============================================================================== --- head/bin/pax/pat_rep.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/pat_rep.c Sun May 22 14:03:38 2011 (r222177) @@ -397,7 +397,7 @@ pat_sel(ARCHD *arcn) /* * should never happen.... */ - paxwarn(1, "Pattern list inconsistant"); + paxwarn(1, "Pattern list inconsistent"); return(-1); } *ppt = pt->fow; Modified: head/bin/pax/pax.c ============================================================================== --- head/bin/pax/pax.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/pax.c Sun May 22 14:03:38 2011 (r222177) @@ -372,7 +372,7 @@ gen_init(void) /* * signal handling to reset stored directory times and modes. Since * we deal with broken pipes via failed writes we ignore it. We also - * deal with any file size limit thorugh failed writes. Cpu time + * deal with any file size limit thorough failed writes. Cpu time * limits are caught and a cleanup is forced. */ if ((sigemptyset(&s_mask) < 0) || (sigaddset(&s_mask, SIGTERM) < 0) || Modified: head/bin/pax/sel_subs.c ============================================================================== --- head/bin/pax/sel_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/sel_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -376,7 +376,7 @@ trng_add(char *str) } /* - * by default we only will check file mtime, but usee can specify + * by default we only will check file mtime, but the user can specify * mtime, ctime (inode change time) or both. */ if ((flgpt == NULL) || (*flgpt == '\0')) Modified: head/bin/pax/tables.c ============================================================================== --- head/bin/pax/tables.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/tables.c Sun May 22 14:03:38 2011 (r222177) @@ -209,7 +209,7 @@ chk_lnk(ARCHD *arcn) * purg_lnk * remove reference for a file that we may have added to the data base as * a potential source for hard links. We ended up not using the file, so - * we do not want to accidently point another file at it later on. + * we do not want to accidentally point another file at it later on. */ void @@ -306,14 +306,14 @@ lnk_end(void) * An append with an -u must read the archive and store the modification time * for every file on that archive before starting the write phase. It is clear * that this is one HUGE database. To save memory space, the actual file names - * are stored in a scatch file and indexed by an in memory hash table. The + * are stored in a scratch file and indexed by an in memory hash table. The * hash table is indexed by hashing the file path. The nodes in the table store * the length of the filename and the lseek offset within the scratch file * where the actual name is stored. Since there are never any deletions to this * table, fragmentation of the scratch file is never an issue. Lookups seem to * not exhibit any locality at all (files in the database are rarely * looked up more than once...). So caching is just a waste of memory. The - * only limitation is the amount of scatch file space available to store the + * only limitation is the amount of scratch file space available to store the * path names. */ Modified: head/bin/pax/tar.c ============================================================================== --- head/bin/pax/tar.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/tar.c Sun May 22 14:03:38 2011 (r222177) @@ -291,7 +291,7 @@ tar_chksm(char *blk, int len) /* * tar_id() * determine if a block given to us is a valid tar header (and not a USTAR - * header). We have to be on the lookout for those pesky blocks of all + * header). We have to be on the lookout for those pesky blocks of all * zero's. * Return: * 0 if a tar header, -1 otherwise From owner-svn-src-head@FreeBSD.ORG Sun May 22 14:03:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30CF310656D1; Sun, 22 May 2011 14:03:47 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 210D68FC13; Sun, 22 May 2011 14:03:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3lJZ077243; Sun, 22 May 2011 14:03:47 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3kqg077239; Sun, 22 May 2011 14:03:46 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3kqg077239@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222178 - in head/bin: ed ps sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:47 -0000 Author: uqs Date: Sun May 22 14:03:46 2011 New Revision: 222178 URL: http://svn.freebsd.org/changeset/base/222178 Log: Fix some typos under bin/ Found by: codespell Modified: head/bin/ed/POSIX head/bin/ps/ps.c head/bin/sh/mkinit.c Modified: head/bin/ed/POSIX ============================================================================== --- head/bin/ed/POSIX Sun May 22 14:03:38 2011 (r222177) +++ head/bin/ed/POSIX Sun May 22 14:03:46 2011 (r222178) @@ -75,7 +75,7 @@ DEVIATIONS 2) Since the behavior of `u' (undo) within a `g' (global) command list is not specified by POSIX, it follows the behavior of the SunOS ed: undo forces a global command list to be executed only once, rather than - for each line matching a global pattern. In addtion, each instance of + for each line matching a global pattern. In addition, each instance of `u' within a global command undoes all previous commands (including undo's) in the command list. This seems the best way, since the alternatives are either too complicated to implement or too confusing @@ -83,7 +83,7 @@ DEVIATIONS The global/undo combination is useful for masking errors that would otherwise cause a script to fail. For instance, an ed script - to remove any occurences of either `censor1' or `censor2' might be + to remove any occurrences of either `censor1' or `censor2' might be written as: ed - file < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8AC4106566B; Sun, 22 May 2011 14:23:48 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B77878FC1B; Sun, 22 May 2011 14:23:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MENmXI077918; Sun, 22 May 2011 14:23:48 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MENm0b077909; Sun, 22 May 2011 14:23:48 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221423.p4MENm0b077909@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222179 - in head/share/examples: diskless drivers netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:23:48 -0000 Author: uqs Date: Sun May 22 14:23:48 2011 New Revision: 222179 URL: http://svn.freebsd.org/changeset/base/222179 Log: Fix more typos to be a good example. Found by: codespell Modified: head/share/examples/diskless/README.TEMPLATING head/share/examples/drivers/make_device_driver.sh head/share/examples/netgraph/ether.bridge head/share/examples/netgraph/frame_relay head/share/examples/netgraph/ngctl head/share/examples/netgraph/raw head/share/examples/netgraph/virtual.chain head/share/examples/netgraph/virtual.lan Modified: head/share/examples/diskless/README.TEMPLATING ============================================================================== --- head/share/examples/diskless/README.TEMPLATING Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/diskless/README.TEMPLATING Sun May 22 14:23:48 2011 (r222179) @@ -136,7 +136,7 @@ be useful to set up clients and server f should never be overwritten by the templating copy. - TYPICAL CUSTOMIZED CONFIGRATION SOFTLINKS + TYPICAL CUSTOMIZED CONFIGURATION SOFTLINKS The following files typically need to be turned into softlinks to /conf/ME/: @@ -261,9 +261,9 @@ be useful to set up clients and server f identity.pub WHEN INITIALLY CONVERTING A TARGET MACHINE TO USE TEMPLATING, ALWAYS - MAKE A FULL BACKUP OF THE TARGET MACHINE FIRST! You may accidently delete - files on the target during the conversion due to forgetting to enter - items into appropriate .cpignore files on the source. + MAKE A FULL BACKUP OF THE TARGET MACHINE FIRST! You may accidentally + delete files on the target during the conversion due to forgetting to + enter items into appropriate .cpignore files on the source. SECURITY CONSIDERATIONS WITH NFS ROOT EXPORT FROM TEMPLATE MACHINE SECURITY CONSIDERATIONS WITH NFS USR EXPORT FROM TEMPLATE MACHINE Modified: head/share/examples/drivers/make_device_driver.sh ============================================================================== --- head/share/examples/drivers/make_device_driver.sh Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/drivers/make_device_driver.sh Sun May 22 14:23:48 2011 (r222179) @@ -485,7 +485,7 @@ ${1}_isa_probe (device_t device) /*rid*/0, membase, memsize); /* * We found one, return non-positive numbers.. - * Return -N if we cant handle it, but not well. + * Return -N if we can't handle it, but not well. * Return -2 if we would LIKE the device. * Return -1 if we want it a lot. * Return 0 if we MUST get the device. Modified: head/share/examples/netgraph/ether.bridge ============================================================================== --- head/share/examples/netgraph/ether.bridge Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/ether.bridge Sun May 22 14:23:48 2011 (r222179) @@ -40,7 +40,7 @@ BRIDGE_NAME="bnet0" # machine as well then set ${LOCAL_IFACES} as well (they may also be # listed in ${BRIDGE_IFACES}). Of course, any ${LOCAL_IFACE} must # be ifconfig(8)ured separately. If you don't want a ${LOCAL_IFACE} -# then assign it the emtpy string. +# then assign it the empty string. BRIDGE_IFACES="de0 fxp0 fxp1" LOCAL_IFACES="fxp0 fxp1" Modified: head/share/examples/netgraph/frame_relay ============================================================================== --- head/share/examples/netgraph/frame_relay Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/frame_relay Sun May 22 14:23:48 2011 (r222179) @@ -13,13 +13,13 @@ ngctl mkpeer ${CARD}: frame_relay rawdat # Link management protocol node. ngctl mkpeer ${CARD}:rawdata lmi dlci0 auto0 -# Also attach dlci 1023, as it needs both to try autoconfiguring. +# Also attach dlci 1023, as it needs both to try auto-configuring. # The Link management protocol is now alive and probing.. ngctl connect ${CARD}:rawdata ${CARD}:rawdata.dlci0 dlci1023 auto1023 # Attach the DLCI(channel) the Telco has assigned you to -# a node to hadle whatever protocol encapsulation your peer -# is using. In this case rfc1490 encapsulation. +# a node to handle whatever protocol encapsulation your peer +# is using. In this case RFC1490 encapsulation. ngctl mkpeer ${CARD}:rawdata rfc1490 dlci${DLCI} downstream @@ -34,8 +34,8 @@ ngctl mkpeer ${CARD}:rawdata.dlci${DLCI} # Then use ifconfig on interface ng0 as usual # A variant on this whole set might use the 'name' command to make it more -# readable. but it doesn't work if you have multiple lines or dlcis -# e.g. +# readable. But it doesn't work if you have multiple lines or dlcis +# e.g. # ngctl mkpeer ${CARD}: frame_relay rawdata downstream # ngctl name ${CARD}:rawdata mux # ngctl mkpeer mux: lmi dlci0 auto0 Modified: head/share/examples/netgraph/ngctl ============================================================================== --- head/share/examples/netgraph/ngctl Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/ngctl Sun May 22 14:23:48 2011 (r222179) @@ -46,7 +46,7 @@ # Note that we used ngctl's ``name'' command to do this. However, # the following manually constructed netgraph message would have -# acomplished the exact same thing: +# accomplished the exact same thing: + msg foo name { name="fred" } @@ -85,7 +85,7 @@ # As soon as we sent the message, we got back a response. Here # ngctl is telling us that it received a control message with the -# NGF_RESP (response) flag set, the reponse was to a prior ``getname'' +# NGF_RESP (response) flag set, the response was to a prior ``getname'' # control message, that the originator was the node addressable # as ``fred:''. The message arguments field is then displayed to # us in its ASCII form. In this case, what we get back is a struct Modified: head/share/examples/netgraph/raw ============================================================================== --- head/share/examples/netgraph/raw Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/raw Sun May 22 14:23:48 2011 (r222179) @@ -6,7 +6,7 @@ CARD=sr0 # create an interface "ng0" and attach it to the sync port. -# The packets had jolly well better be ip because we are not discriminating. +# The packets had jolly well better be IP because we are not discriminating. ngctl mkpeer ${CARD}: iface rawdata inet # if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g. Modified: head/share/examples/netgraph/virtual.chain ============================================================================== --- head/share/examples/netgraph/virtual.chain Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/virtual.chain Sun May 22 14:23:48 2011 (r222179) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010, Yavuz Gokirmak +# Copyright (c) 2010, Yavuz Gokirmak # # All rights reserved. # @@ -14,7 +14,6 @@ # # $FreeBSD$ # -# # This script creates and connects n router like nodes. Complex wide # area topologies can be created with the help of script. # @@ -25,9 +24,9 @@ # # 0. Make your own copy of this example script. # -# 1. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual +# 1. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual # nodes. Virtual topology definition includes node names and their -# IP address. Target top. sytax: ( name|ip<->name|ip ... ) +# IP address. Target top. syntax: ( name|ip<->name|ip ... ) # Example 1: ( n1|10.0.2.1/30<->n2|10.0.2.2/30 ...) # Example 2: ( n1|2001:b90::14a/125<->n1|2001:b90::14b/125 ...) # @@ -35,21 +34,21 @@ # # 3. Add necessary static route commands for each virtual node. For # example assume you have three virtual nodes connected each other -# llike a chain ( n1 is connected to n2, n2 is connecte to n3 ). -# In order to estabklish connectivity among these virtual nodes, +# like a chain (n1 is connected to n2, n2 is connected to n3). +# In order to establish connectivity among these virtual nodes, # you have to add default routes to node n1 and node n3. Example # static route command is: -# STATIC_ROUTE0="jexec n1 route add -inet default 10.0.2.2" -# STATIC_ROUTE1="jexec n3 route add -inet default 10.0.2.5" -# After defining default routes with above format you have to set +# STATIC_ROUTE0="jexec n1 route add -inet default 10.0.2.2" +# STATIC_ROUTE1="jexec n3 route add -inet default 10.0.2.5" +# After defining default routes with above format you have to set # the total number of static route commands as: # STATIC_ROUTE_CNT=2 # # 4. Stop bridging by running this script with "stop" as the # command line argument. -# -# 5. This cript uses a template file in order to carry information -# between start and stop calls. +# +# 5. This script uses a template file in order to carry information +# between start and stop calls. # In the start call, the netgraph interfaces and jails are created. # At the stop phase, all created objects should be removed. # DO NOT delete the temporary file between the start and stop phases. @@ -84,8 +83,8 @@ # # -# List the names of virtual nodes and their IP addresses. Use ':' -# character to seperate node name from node IP address and netmask. +# List the names of virtual nodes and their IP addresses. Use ':' +# character to separate node name from node IP address and netmask. TARGET_TOPOLOGY="n1|10.0.2.1/30<->n2|10.0.2.2/30 n2|10.0.2.5/30<->n3|10.0.2.6/30 n2|10.0.2.9/30<->n4|10.0.2.10/30" STATIC_ROUTE0="jexec n1 route add -inet default 10.0.2.2" @@ -93,10 +92,10 @@ STATIC_ROUTE1="jexec n3 route add -inet STATIC_ROUTE2="jexec n4 route add -inet default 10.0.2.9" STATIC_ROUTE_CNT=3 -# MAC manifacturer prefix. This can be modified according to needs. -MAC_PREFIX="00:1d:92" +# MAC manufacturer prefix. This can be modified according to needs. +MAC_PREFIX="00:1d:92" -# Temporary file is important for proper execution of script. +# Temporary file is important for proper execution of script. TEMP_FILE="/var/tmp/.virtual.chain.tmp" # Set root directory for jails to be created. @@ -112,7 +111,7 @@ JAIL_PATH="/usr/jails/router" virtual_chain_start() { # Load netgraph KLD's as necessary. - + for KLD in ng_ether ng_bridge ng_eiface; do if ! kldstat -v | grep -qw ${KLD}; then echo -n "Loading ${KLD}.ko... " @@ -122,21 +121,21 @@ virtual_chain_start() { done # Reset all interfaces and jails. If temporary file can not be found - # script assumes that there is no previous configuration. - + # script assumes that there is no previous configuration. + if [ ! -e ${TEMP_FILE} ]; then echo "No previous configuration(${TEMP_FILE}) found to clean-up." else echo -n "Cleaning previous configuration..." virtual_chain_stop echo "done" - fi + fi - # Create temporary file for usage. This file includes generated + # Create temporary file for usage. This file includes generated # interface names and jail names. All bridges, interfaces and jails - # are written to file while created. In clean-up process written - # objects are cleaned (i.e removed) from system. - + # are written to file while created. In clean-up process written + # objects are cleaned (i.e. removed) from system. + if [ -e ${TEMP_FILE} ]; then touch ${TEMP_FILE} fi @@ -144,40 +143,40 @@ virtual_chain_start() { # Attach other interfaces as well. for CONNECTION in ${TARGET_TOPOLOGY}; do - + # Virtual connections are defined in TARGET_TOPOLOGY variable. # They have the form of 'nodeName|IPaddr'. Below two lines split - + PEER1=`echo ${CONNECTION} | awk -F"<->" '{print $1}'` PEER1_NAME=`echo ${PEER1} | awk -F"|" '{print $1}'` PEER1_IP=`echo ${PEER1} | awk -F"|" '{print $2}'` - + PEER2=`echo ${CONNECTION} | awk -F"<->" '{print $2}'` PEER2_NAME=`echo ${PEER2} | awk -F"|" '{print $1}'` PEER2_IP=`echo ${PEER2} | awk -F"|" '{print $2}'` # !!! if not created already.. - # Create virtual node (jail) with given name and using + # Create virtual node (jail) with given name and using # JAIL_PATH as root directory for jail. virtual_chain_create_peer_if_necessary ${PEER1_NAME} virtual_chain_create_peer_if_necessary ${PEER2_NAME} # create an interface for peer with the given peer IP. Get interface - # for future use; you will connect this interface to the other + # for future use; you will connect this interface to the other # peers' (PEER2) interface. virtual_chain_create_interface_with_ip ${PEER1_NAME} ${PEER1_IP} PEER1_INTERFACE=${RET_INTERFACE} - + # create an interface for peer with the given peer IP. Get interface - # for future use; you will connect this interface to the other + # for future use; you will connect this interface to the other # peers' (PEER2) interface. virtual_chain_create_interface_with_ip ${PEER2_NAME} ${PEER2_IP} PEER2_INTERFACE=${RET_INTERFACE} # Connect virtual interface to other interface. Syntax is : # ngctl connect INTERFACE1: INTERFACE2: ether ether. - + echo -n "Connecting ${PEER1_INTERFACE}:ether to ${PEER2_INTERFACE}:ether..." ngctl connect ${PEER1_INTERFACE}: ${PEER2_INTERFACE}: ether ether \ || exit 1 @@ -193,7 +192,7 @@ virtual_chain_start() { i=`expr $i + 1` done - echo "Virtual WAN established succesfully!" + echo "Virtual WAN established successfully!" } virtual_chain_create_interface_with_ip() { @@ -201,35 +200,35 @@ virtual_chain_create_interface_with_ip() NODE_NAME=$1 NODE_IP=$2 - # Create a ng_eiface object for virtual node. ng_eiface + # Create a ng_eiface object for virtual node. ng_eiface # object has a hook that can be connected to one of bridge - # links. After creating interface get its automatically - # generated name for further usage. + # links. After creating interface get its automatically + # generated name for further usage. echo "Creating eiface interface for virtual node ${NODE_NAME}." ngctl mkpeer eiface ether ether EIFACE=`ngctl l | grep ngeth | tail -n 1| awk '{print $2}'` - echo "Interface ${EIFACE} is created." - + echo "Interface ${EIFACE} is created." + # Write name of the interface to temp file. Clean-up procedure # will use this name to shutdown interface. - + echo "interface ${EIFACE}" >> ${TEMP_FILE} - # Move virtual interface to virtual node. Note that Interface + # Move virtual interface to virtual node. Note that Interface # name will not be changed at the end of this movement. Moved # interface can be seen at the output of ifconfig command in # jail: 'jexec jailname ifconfig' - echo "Moving ${EIFACE} to ${NODE_NAME}" + echo "Moving ${EIFACE} to ${NODE_NAME}" ifconfig ${EIFACE} vnet ${NODE_NAME} - + # Make lo0 interface localhost. jexec ${NODE_NAME} ifconfig lo0 localhost # Generate a random mac address for virtual interface. First # three octets can be changed by user. Last three octets are - # generated randomly. + # generated randomly. M4=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ awk '{ print $1 % 256 }'` M5=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ @@ -244,16 +243,16 @@ virtual_chain_create_interface_with_ip() echo "Setting MAC address of ${EIFACE} to '${MAC}'" jexec ${NODE_NAME} ifconfig ${EIFACE} link $MAC - # Either IPv4 or IPv6 can be used in this script. Ifconfig + # Either IPv4 or IPv6 can be used in this script. Ifconfig # IP setting syntax differs slightly for two IP versions. # For version 4 'inet' keyword is used whereas for version 6 # 'inet6' is used. Below line tries to decide which IP version - # is given and sets IPVER to 'inet' or 'inet6'. + # is given and sets IPVER to 'inet' or 'inet6'. IPVER=`echo ${NODE_IP} | awk -F"." '{ split($4,last,"/"); \ if( NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && \ last[1]<256) print "inet"; else print "inet6"}'` - + # Set IP address of virtual interface in virtual node. echo "Setting IP address of ${EIFACE} to '${NODE_IP}'" jexec ${NODE_NAME} ifconfig ${EIFACE} ${IPVER} ${NODE_IP} @@ -264,23 +263,22 @@ virtual_chain_create_interface_with_ip() virtual_chain_create_peer_if_necessary() { if ! grep -q $1 ${TEMP_FILE} ; then - - echo -n "Creating virtual node (jail) ${1}..." + + echo -n "Creating virtual node (jail) ${1}..." jail -c vnet name=${1} host.hostname=${1} \ - path=${JAIL_PATH} persist + path=${JAIL_PATH} persist jexec ${1} sysctl -w net.inet.ip.forwarding=1 jexec ${1} sysctl -w net.inet6.ip6.forwarding=1 echo "done" - - # Write name of the jail to temp file. Clean-up + + # Write name of the jail to temp file. Clean-up # procedure will use this name to remove jail. - + echo "node ${1}" >> ${TEMP_FILE} fi } - # Stop routine. virtual_chain_stop() { @@ -288,31 +286,31 @@ virtual_chain_stop() { echo "Nothing to stop! ${TEMP_FILE}: temp file not found" else - echo -n "Shutdown bridge interface.." + echo -n "Shutdown bridge interface.." OBJECTS=`cat ${TEMP_FILE} | grep bridge | awk '{print $2}'` for BRIDGE in ${OBJECTS}; do ngctl shutdown ${BRIDGE}: >/dev/null 2>&1 done echo "done" - - echo -n "Shutdown all eiface interfaces..." + + echo -n "Shutdown all eiface interfaces..." OBJECTS=`cat ${TEMP_FILE} | grep interface | awk '{print $2}'` for INTERFACE in ${OBJECTS}; do ngctl shutdown ${INTERFACE}: >/dev/null 2>&1 done echo "done" - - echo -n "Removing all jails..." + + echo -n "Removing all jails..." OBJECTS=`cat ${TEMP_FILE} | grep node | awk '{print $2}'` for NODE in ${OBJECTS}; do jail -r ${NODE} done echo "done" - - echo "Removing tempfile ${TEMP_FILE}" + + echo "Removing tempfile ${TEMP_FILE}" rm ${TEMP_FILE} fi - echo "Virtual LAN objects removed succesfully!" + echo "Virtual LAN objects removed successfully!" } @@ -324,7 +322,6 @@ virtual_chain_usage() { # Main entry point. - case $# in 1) case $1 in @@ -340,7 +337,7 @@ case $# in echo " temp file not found" else virtual_chain_stop - fi + fi ;; help) virtual_chain_usage Modified: head/share/examples/netgraph/virtual.lan ============================================================================== --- head/share/examples/netgraph/virtual.lan Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/virtual.lan Sun May 22 14:23:48 2011 (r222179) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010, Yavuz Gokirmak +# Copyright (c) 2010, Yavuz Gokirmak # # All rights reserved. # @@ -13,13 +13,12 @@ # its use. # # $FreeBSD$ - # -# This script adds virtual nodes to one of the physical interfaces +# This script adds virtual nodes to one of the physical interfaces # visible on your local area network (LAN). Virtual nodes seems real -# to external observers. +# to external observers. # If traceroute is executed to one of virtual nodes, the IP -# address of the physical interface will not be seen in the output. +# address of the physical interface will not be seen in the output. # Virtual nodes are generated via jails and network connections are # established using ng_bridge(4) and ng_eiface(4) node types. # @@ -29,11 +28,11 @@ # # 1. Edit the definition of ${ETHER_INTF} as described below # to define your real interface connected to the LAN. Virtual nodes -# will placed on the same physical network as this interface. +# will placed on the same physical network as this interface. # -# 2. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual +# 2. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual # nodes. Virtual topology definition includes node names and their -# IP address. Target top. sytax: ( node1|ip1/24 node2|ip2/24 ... ) +# IP address. Target top. syntax: ( node1|ip1/24 node2|ip2/24 ... ) # Example 1: ( n1|122.122.122.12/24, n2|122.122.122.13/24 ...) # Example 2: ( n1|2001:b90::14a/125, n1|2001:b90::14b/125 ...) # @@ -41,9 +40,9 @@ # # 4. Stop bridging by running this script with "stop" as the # command line argument. -# -# 5. This cript uses a template file in order to carry information -# between start and stop calls. +# +# 5. This script uses a template file in order to carry information +# between start and stop calls. # In the start call, the netgraph interfaces and jails are created. # At the stop phase, all created objects should be removed. # DO NOT delete the temporary file between the start and stop phases. @@ -80,19 +79,19 @@ # # Give the name of ethernet interface. Virtual nodes will be seen as -# local neighbours of this interface. +# local neighbours of this interface. ETHER_INTF="em0" -# List the names of virtual nodes and their IP addresses. Use ':' -# character to seperate node name from node IP address and netmask. +# List the names of virtual nodes and their IP addresses. Use ':' +# character to separate node name from node IP address and netmask. TARGET_TOPOLOGY="c1|10.0.2.20/24 c2|10.0.2.21/24 c3|10.0.2.22/24" -# MAC manifacturer prefix. This can be modified according to needs. -MAC_PREFIX="00:1d:92" +# MAC manufacturer prefix. This can be modified according to needs. +MAC_PREFIX="00:1d:92" -# Temporary file is important for proper execution of script. +# Temporary file is important for proper execution of script. TEMP_FILE="/var/tmp/.virtual.lan.tmp" # Set root directory for jails to be created. @@ -108,7 +107,7 @@ JAIL_PATH="/usr/jails/node" virtual_lan_start() { # Load netgraph KLD's as necessary. - + for KLD in ng_ether ng_bridge ng_eiface; do if ! kldstat -v | grep -qw ${KLD}; then echo -n "Loading ${KLD}.ko... " @@ -118,21 +117,21 @@ virtual_lan_start() { done # Reset all interfaces and jails. If temporary file can not be found - # script assumes that there is no previous configuration. - + # script assumes that there is no previous configuration. + if [ ! -e ${TEMP_FILE} ]; then echo "No previous configuration(${TEMP_FILE}) found to clean-up." else echo -n "Cleaning previous configuration..." virtual_lan_stop echo "done" - fi + fi - # Create temporary file for usage. This file includes generated + # Create temporary file for usage. This file includes generated # interface names and jail names. All bridges, interfaces and jails - # are written to file while created. In clean-up process written - # objects are cleaned (i.e removed) from system. - + # are written to file while created. In clean-up process written + # objects are cleaned (i.e. removed) from system. + if [ -e ${TEMP_FILE} ]; then touch ${TEMP_FILE} fi @@ -150,20 +149,20 @@ virtual_lan_start() { # is used to create a name for new bridge. BRIDGE_COUNT=`ngctl l | grep bridge | wc -l | sed -e "s/ //g"` BRIDGE_NAME="bridge${BRIDGE_COUNT}" - + # Create new ng_bridge(4) node and attach it to the ethernet interface. # Connect ng_ether:lower hook to bridge:link0 when creating bridge and # connect ng_ether:upper hook to bridge:link1 after bridge name is set. - + echo "Creating bridge interface: ${BRIDGE_NAME}..." ngctl mkpeer ${ETHER_INTF}: bridge lower link0 || exit 1 ngctl name ${ETHER_INTF}:lower ${BRIDGE_NAME} || exit 1 ngctl connect ${ETHER_INTF}: ${BRIDGE_NAME}: upper link1 || exit 1 echo "Bridge ${BRIDGE_NAME} is created and ${ETHER_INTF} is connected." - + # In the above code block two hooks are connected to bridge interface, - # therefore LINKNUM is set to 2 indicating total number of connected - # hooks on the bridge interface. + # therefore LINKNUM is set to 2 indicating total number of connected + # hooks on the bridge interface. LINKNUM=2 # Write name of the bridge to temp file. Clean-up procedure will use @@ -173,7 +172,7 @@ virtual_lan_start() { # Attach other interfaces as well. for NODE in ${TARGET_TOPOLOGY}; do - + # Virtual nodes are defined in TARGET_TOPOLOGY variable. They # have the form of 'nodeName|IPaddr'. Below two lines split # node definition to get node name and node IP. @@ -181,48 +180,48 @@ virtual_lan_start() { NODE_NAME=`echo ${NODE} | awk -F"|" '{print $1}'` NODE_IP=`echo ${NODE} | awk -F"|" '{print $2}'` - # Create virtual node (jail) with given name and using + # Create virtual node (jail) with given name and using # JAIL_PATH as root directory for jail. - echo -n "Creating virtual node (jail) ${NODE_NAME}..." + echo -n "Creating virtual node (jail) ${NODE_NAME}..." jail -c vnet name=${NODE_NAME} host.hostname=${NODE_NAME} \ - path=${JAIL_PATH} persist + path=${JAIL_PATH} persist echo "done" - - # Write name of the jail to temp file. Clean-up procedure will + + # Write name of the jail to temp file. Clean-up procedure will # use this name to remove jail. - + echo "node ${NODE_NAME}" >> ${TEMP_FILE} - # Create a ng_eiface object for virtual node. ng_eiface + # Create a ng_eiface object for virtual node. ng_eiface # object has a hook that can be connected to one of bridge - # links. After creating interface get its automatically - # generated name for further usage. + # links. After creating interface get its automatically + # generated name for further usage. echo "Creating eiface interface for virtual node ${NODE_NAME}." ngctl mkpeer eiface ether ether EIFACE=`ngctl l | grep ngeth | tail -n 1| awk '{print $2}'` - echo "Interface ${EIFACE} is created." - + echo "Interface ${EIFACE} is created." + # Write name of the interface to temp file. Clean-up procedure # will use this name to shutdown interface. - + echo "interface ${EIFACE}" >> ${TEMP_FILE} - - # Move virtual interface to virtual node. Note that Interface + + # Move virtual interface to virtual node. Note that Interface # name will not be changed at the end of this movement. Moved # interface can be seen at the output of ifconfig command in # jail: 'jexec jailname ifconfig' - echo "Moving ${EIFACE} to ${NODE_NAME}" + echo "Moving ${EIFACE} to ${NODE_NAME}" ifconfig ${EIFACE} vnet ${NODE_NAME} - + # Make lo0 interface localhost. jexec ${NODE_NAME} ifconfig lo0 localhost # Generate a random mac address for virtual interface. First # three octets can be changed by user. Last three octets are - # generated randomly. + # generated randomly. M4=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ awk '{ print $1 % 256 }'` M5=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ @@ -237,35 +236,35 @@ virtual_lan_start() { echo "Setting MAC address of ${EIFACE} to '${MAC}'" jexec ${NODE_NAME} ifconfig ${EIFACE} link $MAC - # Either IPv4 or IPv6 can be used in this script. Ifconfig + # Either IPv4 or IPv6 can be used in this script. Ifconfig # IP setting syntax differs slightly for two IP versions. # For version 4 'inet' keyword is used whereas for version 6 # 'inet6' is used. Below line tries to decide which IP version - # is given and sets IPVER to 'inet' or 'inet6'. + # is given and sets IPVER to 'inet' or 'inet6'. IPVER=`echo ${NODE_IP} | awk -F"." '{ split($4,last,"/"); \ if( NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && \ last[1]<256) print "inet"; else print "inet6"}'` - + # Set IP address of virtual interface in virtual node. echo "Setting IP address of ${EIFACE} to '${NODE_IP}'" jexec ${NODE_NAME} ifconfig ${EIFACE} ${IPVER} ${NODE_IP} - + # Connect virtual interface to bridge interface. Syntax is : # ngctl connect INTERFACE: BRIDGE: INTERFACE_HOOK EMPTY_LINK. # Interface has one hook named 'ether' and below line connects - # ether hook to bridge's first unconnected link. - + # ether hook to bridge's first unconnected link. + echo -n "Connecting ${EIFACE}:ether to ${BRIDGE_NAME}:link${LINKNUM}..." ngctl connect ${EIFACE}: ${BRIDGE_NAME}: ether link${LINKNUM} \ || exit 1 echo "done" # Now, bridge has one more connected link thus link count is - # incremented. + # incremented. LINKNUM=`expr ${LINKNUM} + 1` done - echo "Virtual LAN established succesfully!" + echo "Virtual LAN established successfully!" } @@ -276,31 +275,31 @@ virtual_lan_stop() { echo "Nothing to stop! ${TEMP_FILE}: temp file not found" else - echo -n "Shutdown bridge interface.." + echo -n "Shutdown bridge interface.." OBJECTS=`cat ${TEMP_FILE} | grep bridge | awk '{print $2}'` for BRIDGE in ${OBJECTS}; do ngctl shutdown ${BRIDGE}: >/dev/null 2>&1 done echo "done" - - echo -n "Shutdown all eiface interfaces..." + + echo -n "Shutdown all eiface interfaces..." OBJECTS=`cat ${TEMP_FILE} | grep interface | awk '{print $2}'` for INTERFACE in ${OBJECTS}; do ngctl shutdown ${INTERFACE}: >/dev/null 2>&1 done echo "done" - - echo -n "Removing all jails..." + + echo -n "Removing all jails..." OBJECTS=`cat ${TEMP_FILE} | grep node | awk '{print $2}'` for NODE in ${OBJECTS}; do jail -r ${NODE} done echo "done" - - echo "Removing tempfile ${TEMP_FILE}" + + echo "Removing tempfile ${TEMP_FILE}" rm ${TEMP_FILE} fi - echo "Virtual LAN objects removed succesfully!" + echo "Virtual LAN objects removed successfully!" } @@ -327,7 +326,7 @@ case $# in echo " temp file not found" else virtual_lan_stop - fi + fi ;; help) virtual_lan_usage From owner-svn-src-head@FreeBSD.ORG Sun May 22 15:24:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 815B11065674; Sun, 22 May 2011 15:24:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 731F28FC1B; Sun, 22 May 2011 15:24:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MFOuMA079868; Sun, 22 May 2011 15:24:56 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MFOuKd079866; Sun, 22 May 2011 15:24:56 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105221524.p4MFOuKd079866@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 May 2011 15:24: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: r222182 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 15:24:56 -0000 Author: jilles Date: Sun May 22 15:24:56 2011 New Revision: 222182 URL: http://svn.freebsd.org/changeset/base/222182 Log: sh: Remove obsolete token type TENDBQUOTE. This token type was related to Almquist's original version of backquotes that could not nest and fell into disuse fairly soon. Modified: head/bin/sh/mktokens Modified: head/bin/sh/mktokens ============================================================================== --- head/bin/sh/mktokens Sun May 22 15:14:21 2011 (r222181) +++ head/bin/sh/mktokens Sun May 22 15:24:56 2011 (r222182) @@ -50,7 +50,6 @@ TPIPE 0 "|" TLP 0 "(" TRP 1 ")" TENDCASE 1 ";;" -TENDBQUOTE 1 "`" TREDIR 0 redirection TWORD 0 word TIF 0 "if" From owner-svn-src-head@FreeBSD.ORG Sun May 22 16:24:55 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C0CF106564A; Sun, 22 May 2011 16:24:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4996B8FC13; Sun, 22 May 2011 16:24:55 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MGOpXe091443 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 10:24:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110522093302.GA2638@mole.fafoe.narf.at> Date: Sun, 22 May 2011 10:24:51 -0600 Content-Transfer-Encoding: 7bit Message-Id: <03BABBB2-56C2-48DD-898A-B25A8E4040F2@bsdimp.com> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Stefan Farfeleder X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 10:24:53 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:24:55 -0000 On May 22, 2011, at 3:33 AM, Stefan Farfeleder wrote: > On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >> Author: ae >> Date: Sun May 15 20:03:54 2011 >> New Revision: 221972 >> URL: http://svn.freebsd.org/changeset/base/221972 >> >> Log: >> Add a sysctl kern.geom.part.check_integrity for those who has corrupt >> partition tables and lost an ability to boot after r221788. >> Also unhide an error message from bootverbose, this would help to >> easier determine the problem. > > So, what's the point of this check? It breaks mounting of all my USB > drives. Everyone now has to set this sysctl? Personally, I think it can be just deleted. I think it is wrong... Warner > da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) > GEOM_PART: integrity check failed (da0, MBR) > > Stefan > > From owner-svn-src-head@FreeBSD.ORG Sun May 22 16:31:02 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DC24106566B; Sun, 22 May 2011 16:31:02 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 08DEE8FC08; Sun, 22 May 2011 16:31:01 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MGQFjL091449 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 10:26:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 22 May 2011 10:26:14 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 10:26:15 -0600 (MDT) Cc: svn-src-head@FreeBSD.ORG, "Andrey V. Elsukov" , svn-src-all@FreeBSD.ORG, Stefan Farfeleder , src-committers@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:31:02 -0000 On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: > This also bit me on embedded platform stuff. >=20 > Is it possible to disable this by default for now and have it just = warn loudly? > And/or hide the default value behind a kernel configuration variable > so we can disable it > (but still get the warnings) for now? Or just delete it entirely as a bad idea? We had this with Marcel's = warning for a long time that turned out to be utterly bogus so we = removed it. Warner >=20 > Thanks, >=20 >=20 > Adrian >=20 > On 22 May 2011 17:33, Stefan Farfeleder wrote: >> On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >>> Author: ae >>> Date: Sun May 15 20:03:54 2011 >>> New Revision: 221972 >>> URL: http://svn.freebsd.org/changeset/base/221972 >>>=20 >>> Log: >>> Add a sysctl kern.geom.part.check_integrity for those who has = corrupt >>> partition tables and lost an ability to boot after r221788. >>> Also unhide an error message from bootverbose, this would help to >>> easier determine the problem. >>=20 >> So, what's the point of this check? It breaks mounting of all my USB >> drives. Everyone now has to set this sysctl? >>=20 >> da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 >> da0: Removable Direct Access SCSI-0 device >> da0: 40.000MB/s transfers >> da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) >> GEOM_PART: integrity check failed (da0, MBR) >>=20 >> Stefan >>=20 >=20 >=20 From owner-svn-src-head@FreeBSD.ORG Sun May 22 16:32:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44F29106566C; Sun, 22 May 2011 16:32:45 +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 36CCF8FC12; Sun, 22 May 2011 16:32:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MGWj9k081827; Sun, 22 May 2011 16:32:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MGWjUb081825; Sun, 22 May 2011 16:32:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105221632.p4MGWjUb081825@svn.freebsd.org> From: Dimitry Andric Date: Sun, 22 May 2011 16:32: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: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:32:45 -0000 Author: dim Date: Sun May 22 16:32:44 2011 New Revision: 222183 URL: http://svn.freebsd.org/changeset/base/222183 Log: On amd64, change clang's default triple to 'x86_64-unknown-freebsd9.0', similar to what we do for binutils. When clang's default triple starts with 'amd64-', it does not pass a proper -target-cpu option to its first stage. This can lead to problems, for example when structs are memcpy'd, and clang erroneously assumes they are 16-byte aligned. It will then use the 'movaps' SSE instruction to implement the copy, which results in a bus error if the struct is really 8-byte aligned. I encountered this issue when gcc's /usr/libexec/cc1 started crashing with SIGBUS, after rebuilding world with clang ToT, but it also affects the version of clang that we have in the tree. We were just lucky until now, apparently. :) Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Sun May 22 15:24:56 2011 (r222182) +++ head/lib/clang/clang.build.mk Sun May 22 16:32:44 2011 (r222183) @@ -15,7 +15,7 @@ CFLAGS+= -O1 TARGET_ARCH?= ${MACHINE_ARCH} # XXX: 8.0, to keep __FreeBSD_cc_version happy -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" .ifndef LLVM_REQUIRES_EH CXXFLAGS+=-fno-exceptions From owner-svn-src-head@FreeBSD.ORG Sun May 22 16:37:07 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C2DB106566B; Sun, 22 May 2011 16:37:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3D4D38FC1C; Sun, 22 May 2011 16:37:07 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MGWJ4v091485 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 10:32:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 22 May 2011 10:32:19 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 10:32:21 -0600 (MDT) Cc: svn-src-head@FreeBSD.ORG, "Andrey V. Elsukov" , svn-src-all@FreeBSD.ORG, Stefan Farfeleder , src-committers@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:37:07 -0000 After carefully reviewing this code, we need to have it be *OFF* by = default. It should also explain *WHY* it is rejecting the partition. = It isn't clear to me at all that this is even useful. While different = than Marcel's warnings, I think we need to take a very cautious approach = here. Where was this even talked about before the fact? It seems like = a fairly radical enforcement action to just spring on people, especially = now in light of it having so many false positives. Warner On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: > This also bit me on embedded platform stuff. >=20 > Is it possible to disable this by default for now and have it just = warn loudly? > And/or hide the default value behind a kernel configuration variable > so we can disable it > (but still get the warnings) for now? >=20 > Thanks, >=20 >=20 > Adrian >=20 > On 22 May 2011 17:33, Stefan Farfeleder wrote: >> On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >>> Author: ae >>> Date: Sun May 15 20:03:54 2011 >>> New Revision: 221972 >>> URL: http://svn.freebsd.org/changeset/base/221972 >>>=20 >>> Log: >>> Add a sysctl kern.geom.part.check_integrity for those who has = corrupt >>> partition tables and lost an ability to boot after r221788. >>> Also unhide an error message from bootverbose, this would help to >>> easier determine the problem. >>=20 >> So, what's the point of this check? It breaks mounting of all my USB >> drives. Everyone now has to set this sysctl? >>=20 >> da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 >> da0: Removable Direct Access SCSI-0 device >> da0: 40.000MB/s transfers >> da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) >> GEOM_PART: integrity check failed (da0, MBR) >>=20 >> Stefan >>=20 >=20 >=20 From owner-svn-src-head@FreeBSD.ORG Sun May 22 16:43:09 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 9D078106566C; Sun, 22 May 2011 16:43:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9D7D714D80B; Sun, 22 May 2011 16:43:06 +0000 (UTC) Message-ID: <4DD93D14.1010908@FreeBSD.org> Date: Sun, 22 May 2011 20:43:00 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Stefan Farfeleder References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> In-Reply-To: <20110522093302.GA2638@mole.fafoe.narf.at> X-Enigmail-Version: 1.1.2 OpenPGP: id=10C8A17A Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig04740255C2DC18196E3A7C58" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:43:09 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig04740255C2DC18196E3A7C58 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 22.05.2011 13:33, Stefan Farfeleder wrote: >> URL: http://svn.freebsd.org/changeset/base/221972 >> >> Log: >> Add a sysctl kern.geom.part.check_integrity for those who has corrup= t >> partition tables and lost an ability to boot after r221788. >> Also unhide an error message from bootverbose, this would help to >> easier determine the problem. >=20 > So, what's the point of this check? It breaks mounting of all my USB > drives. Everyone now has to set this sysctl? As described in r221788, this check is targeted to prevent usage of incorrect on-disk metadata. And this sysctl is a temporary workaround. And i do not use it, all my disks and partitions are accessible as before= =2E --=20 WBR, Andrey V. Elsukov --------------enig04740255C2DC18196E3A7C58 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJN2T0YAAoJEAHF6gQQyKF6II8H/joYP0GuGgAAXWHwTzXAEx5v WiDakIcmW/7UC6HBqeCrfLQHaO4LQYAG94K0mwcIBjNkHXHcBqjHOhKUgjOMUxlL Lf5SrV62WF32n6Bqy+fNsNTD2W27eERdJm+wGgC2t9Ec4SgIc/swNE/gmpGx0e0a LfQcSjBK+RSOql5ymaplehK8A1McgmiCekQkGiVZp1XX8Hke2zUyaRq+0ecDrCYZ WQHSKLKEqCtPmATkgptpowwRAm8zU4aE3UQQ/sVmuDeMi3DmlwRiHwBB3QG7fKhH xYJbOgnRWLBEJXH9bNolLqmGQ/3kshPUXhaZAaL5mxjfRxiyC673et4pqjzOxqw= =txVb -----END PGP SIGNATURE----- --------------enig04740255C2DC18196E3A7C58-- From owner-svn-src-head@FreeBSD.ORG Sun May 22 16:46:32 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AA4A1065678; Sun, 22 May 2011 16:46:32 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id B58EB8FC15; Sun, 22 May 2011 16:46:31 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 2D7285DC0; Sun, 22 May 2011 16:46:30 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id p4MGkTGn003672; Sun, 22 May 2011 16:46:29 GMT (envelope-from phk@critter.freebsd.dk) To: Warner Losh From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 22 May 2011 10:32:19 CST." <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1 Date: Sun, 22 May 2011 16:46:29 +0000 Message-ID: <3671.1306082789@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Adrian Chadd , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:46:32 -0000 In message <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com>, Warner Losh write s: >After carefully reviewing this code, we need to have it be *OFF* by >default. It should also explain *WHY* it is rejecting the partition. >It isn't clear to me at all that this is even useful. Seconded * 3. My experience so far is that 1 out of in 7 USB flash devices worked with these paranoid checks enabled. What happened to the Robustness Principle ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-head@FreeBSD.ORG Sun May 22 17:04:54 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 83A8E1065673; Sun, 22 May 2011 17:04:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B5818150380; Sun, 22 May 2011 17:04:52 +0000 (UTC) Message-ID: <4DD94232.7060607@FreeBSD.org> Date: Sun, 22 May 2011 21:04:50 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warner Losh References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> In-Reply-To: <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=10C8A17A Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig81A11110392054029A3396E7" Cc: svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, Adrian Chadd , Stefan Farfeleder , src-committers@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 17:04:54 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig81A11110392054029A3396E7 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 22.05.2011 20:32, Warner Losh wrote: > After carefully reviewing this code, we need to have it be *OFF* by > default. It should also explain *WHY* it is rejecting the partition. Did you reviewed r221992? > It isn't clear to me at all that this is even useful. While > different than Marcel's warnings, I think we need to take a very > cautious approach here. Where was this even talked about before the > fact? It seems like a fairly radical enforcement action to just > spring on people, especially now in light of it having so many false > positives. On the other hand now we know that many users have this problem, and we have time to properly fix it before release :) --=20 WBR, Andrey V. Elsukov --------------enig81A11110392054029A3396E7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJN2UIyAAoJEAHF6gQQyKF6zdQIAMBmrAWAFISkdi/qiw80Wrab YneOxRx+rVJAQdS3RKwJDLftepBS0K9c/zjlDTai3Asx8Oh48A6Pkfy1nMcKOKPm 2/mYos8vFxSMT7PVb7bbe5WW6TPNmE7CcguHGp/StjwAl9HSa7hlfN3ApiLxaFCr EZQ1a1BQzm6CQChk11KpuCsmjdNKOW5wlMVzavP8l0AVejvfIqlV6D1mlJv4DIhH SkbbxKES9y+89CxdSUIl6Y2doAxzM3ri+pjhQMXb20W1/TFaDKJvr1e65y+lgMEA Lf9qEzcOjXU1WQVX6GRbRGT+eOoBe/4SZNPPeZIXvUvYj4AWhJ6RVCLmnuvWWxw= =rC5p -----END PGP SIGNATURE----- --------------enig81A11110392054029A3396E7-- From owner-svn-src-head@FreeBSD.ORG Sun May 22 17:46:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97AE6106564A; Sun, 22 May 2011 17:46:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89E858FC12; Sun, 22 May 2011 17:46:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MHkG5P084086; Sun, 22 May 2011 17:46:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MHkGi1084084; Sun, 22 May 2011 17:46:16 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201105221746.p4MHkGi1084084@svn.freebsd.org> From: Alan Cox Date: Sun, 22 May 2011 17:46: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: r222184 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 17:46:16 -0000 Author: alc Date: Sun May 22 17:46:16 2011 New Revision: 222184 URL: http://svn.freebsd.org/changeset/base/222184 Log: Correct an error in r222163. Unless UMA_MD_SMALL_ALLOC is defined, startup_alloc() must be used until uma_startup2() is called. Reported by: jh Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun May 22 16:32:44 2011 (r222183) +++ head/sys/vm/uma_core.c Sun May 22 17:46:16 2011 (r222184) @@ -1318,9 +1318,13 @@ keg_ctor(void *mem, int size, void *udat #ifdef UMA_MD_SMALL_ALLOC keg->uk_allocf = uma_small_alloc; keg->uk_freef = uma_small_free; -#endif + if (booted < UMA_STARTUP) keg->uk_allocf = startup_alloc; +#else + if (booted < UMA_STARTUP2) + keg->uk_allocf = startup_alloc; +#endif } else if (booted < UMA_STARTUP2 && (keg->uk_flags & UMA_ZFLAG_INTERNAL)) keg->uk_allocf = startup_alloc; From owner-svn-src-head@FreeBSD.ORG Sun May 22 18:01:52 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDEAA106564A; Sun, 22 May 2011 18:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E9558FC0C; Sun, 22 May 2011 18:01:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MI1qtT084589; Sun, 22 May 2011 18:01:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MI1qxv084585; Sun, 22 May 2011 18:01:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221801.p4MI1qxv084585@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:01: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: r222185 - in head: share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:01:52 -0000 Author: imp Date: Sun May 22 18:01:52 2011 New Revision: 222185 URL: http://svn.freebsd.org/changeset/base/222185 Log: Start to usher INSTALL_NODEBUG hack out the door. Add new WITH{OUT,}_KERNEL_SYMBOLS (defaulting to WITH). In the fullness of time, likely around 2020, INSTALL_NODEBUG will be removed. For now, don't print a warning when using INSTALL_NODEBUG, but that will be coming soon. Modified: head/share/mk/bsd.own.mk head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun May 22 17:46:16 2011 (r222184) +++ head/share/mk/bsd.own.mk Sun May 22 18:01:52 2011 (r222185) @@ -335,6 +335,7 @@ __DEFAULT_YES_OPTIONS = \ IPX \ JAIL \ KERBEROS \ + KERNEL_SYMBOLS \ KVM \ LEGACY_CONSOLE \ LIB32 \ Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sun May 22 17:46:16 2011 (r222184) +++ head/sys/conf/kern.post.mk Sun May 22 18:01:52 2011 (r222185) @@ -227,7 +227,7 @@ kernel-install: .endif mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -239,7 +239,7 @@ kernel-install: kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sun May 22 17:46:16 2011 (r222184) +++ head/sys/conf/kmod.mk Sun May 22 18:01:52 2011 (r222185) @@ -286,7 +286,7 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} .endif From owner-svn-src-head@FreeBSD.ORG Sun May 22 18:09:51 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBF8C106564A; Sun, 22 May 2011 18:09:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4C378FC16; Sun, 22 May 2011 18:09:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MI9pno084846; Sun, 22 May 2011 18:09:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MI9plO084843; Sun, 22 May 2011 18:09:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221809.p4MI9plO084843@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:09: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: r222186 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:09:52 -0000 Author: imp Date: Sun May 22 18:09:51 2011 New Revision: 222186 URL: http://svn.freebsd.org/changeset/base/222186 Log: Backwards compatibility hacks to allow kernels to be built via config wihtout updating world (good transition aide for -current, but also allows kernels to be built on -stable the old way too). This likely should go away around FreeBSD 10.0 or so. Modified: head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sun May 22 18:01:52 2011 (r222185) +++ head/sys/conf/kern.post.mk Sun May 22 18:09:51 2011 (r222186) @@ -227,7 +227,8 @@ kernel-install: .endif mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -239,7 +240,8 @@ kernel-install: kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sun May 22 18:01:52 2011 (r222185) +++ head/sys/conf/kmod.mk Sun May 22 18:09:51 2011 (r222186) @@ -286,7 +286,8 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} .endif From owner-svn-src-head@FreeBSD.ORG Sun May 22 18:11:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68842106564A; Sun, 22 May 2011 18:11:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7558FC12; Sun, 22 May 2011 18:11:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MIBf2M084961; Sun, 22 May 2011 18:11:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MIBfjS084958; Sun, 22 May 2011 18:11:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201105221811.p4MIBfjS084958@svn.freebsd.org> From: Alan Cox Date: Sun, 22 May 2011 18:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222187 - in head/sys: fs/nfsclient nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:11:41 -0000 Author: alc Date: Sun May 22 18:11:41 2011 New Revision: 222187 URL: http://svn.freebsd.org/changeset/base/222187 Log: Eliminate duplicate #include's. Modified: head/sys/fs/nfsclient/nfs_clvnops.c head/sys/nfsclient/nfs_vnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun May 22 18:09:51 2011 (r222186) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun May 22 18:11:41 2011 (r222187) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Sun May 22 18:09:51 2011 (r222186) +++ head/sys/nfsclient/nfs_vnops.c Sun May 22 18:11:41 2011 (r222187) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From owner-svn-src-head@FreeBSD.ORG Sun May 22 18:12:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95121106566B; Sun, 22 May 2011 18:12:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 874D38FC1B; Sun, 22 May 2011 18:12:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MICxWX085036; Sun, 22 May 2011 18:12:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MICxet085035; Sun, 22 May 2011 18:12:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221812.p4MICxet085035@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222188 - head/tools/build/options X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:12:59 -0000 Author: imp Date: Sun May 22 18:12:59 2011 New Revision: 222188 URL: http://svn.freebsd.org/changeset/base/222188 Log: Add documentation for WITHOUT_KERNEL_SYMBOLS Added: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS (contents, props changed) Added: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Sun May 22 18:12:59 2011 (r222188) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not install kernel symbol files. +This option is recommended for those people who have small root partitions. + From owner-svn-src-head@FreeBSD.ORG Sun May 22 18:23:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D985106566C; Sun, 22 May 2011 18:23:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FC678FC13; Sun, 22 May 2011 18:23:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MINH9p085365; Sun, 22 May 2011 18:23:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MINHav085363; Sun, 22 May 2011 18:23:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221823.p4MINHav085363@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:23: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: r222189 - head/tools/build/options X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:23:17 -0000 Author: imp Date: Sun May 22 18:23:17 2011 New Revision: 222189 URL: http://svn.freebsd.org/changeset/base/222189 Log: Add the description properly... Modified: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Modified: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS ============================================================================== --- head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Sun May 22 18:12:59 2011 (r222188) +++ head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Sun May 22 18:23:17 2011 (r222189) @@ -1,4 +1,5 @@ .\" $FreeBSD$ Set to not install kernel symbol files. +.Bf -symbolic This option is recommended for those people who have small root partitions. - +.Ef From owner-svn-src-head@FreeBSD.ORG Sun May 22 18:34:11 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 923401065673; Sun, 22 May 2011 18:34:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AB8F8FC13; Sun, 22 May 2011 18:34:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MIYBOb085715; Sun, 22 May 2011 18:34:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MIYBRm085713; Sun, 22 May 2011 18:34:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221834.p4MIYBRm085713@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222190 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:34:11 -0000 Author: imp Date: Sun May 22 18:34:11 2011 New Revision: 222190 URL: http://svn.freebsd.org/changeset/base/222190 Log: regen Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sun May 22 18:23:17 2011 (r222189) +++ head/share/man/man5/src.conf.5 Sun May 22 18:34:11 2011 (r222190) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd May 17, 2011 +.Dd May 22, 2011 .Dt SRC.CONF 5 .Os .Sh NAME @@ -206,6 +206,14 @@ and .\" from FreeBSD: head/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb Set to enable the http statistics interface for named. This requires ports/textproc/libxml2 to be installed in /usr/local. +.It Va WITHOUT_BINUTILS +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 222090 2011-05-19 05:13:25Z imp +Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, +ld, nm, objcopy, objdump, readelf, size and strip) +.Bf -symbolic +The option does not generally work for build targets, unless some alternative +toolchain is enabled. +.Ef .It Va WITHOUT_BLUETOOTH .\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. @@ -364,6 +372,13 @@ Set to not build .It Va WITHOUT_GAMES .\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. +.It Va WITHOUT_GCC +.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 222090 2011-05-19 05:13:25Z imp +Set to not install gcc and g++. +.Bf -symbolic +The option does not generally work for build targets, unless some alternative +toolchain is enabled. +.Ef .It Va WITHOUT_GCOV .\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the @@ -512,6 +527,12 @@ Set to build some programs without Kerbe .Xr sshd 8 , and .Xr telnetd 8 . +.It Va WITHOUT_KERNEL_SYMBOLS +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp +Set to not install kernel symbol files. +.Bf -symbolic +This option is recommended for those people who have small root partitions. +.Ef .It Va WITHOUT_KVM .\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the @@ -884,8 +905,12 @@ When set, it also enforces the following .Pp .Bl -item -compact .It +.Va WITHOUT_BINUTILS +.It .Va WITHOUT_CLANG .It +.Va WITHOUT_GCC +.It .Va WITHOUT_GDB .El .It Va WITHOUT_USB From owner-svn-src-head@FreeBSD.ORG Sun May 22 19:56:15 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 341381065670; Sun, 22 May 2011 19:56:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 247788FC0C; Sun, 22 May 2011 19:56:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MJuFWb088175; Sun, 22 May 2011 19:56:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MJuEEQ088170; Sun, 22 May 2011 19:56:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105221956.p4MJuEEQ088170@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 May 2011 19:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222191 - in head/usr.sbin/makefs: . cd9660 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 19:56:15 -0000 Author: nwhitehorn Date: Sun May 22 19:56:14 2011 New Revision: 222191 URL: http://svn.freebsd.org/changeset/base/222191 Log: Add analogs to the -chrp-boot and -prep-boot options to mkisofs. Modified: head/usr.sbin/makefs/cd9660.c head/usr.sbin/makefs/cd9660.h head/usr.sbin/makefs/cd9660/cd9660_eltorito.c head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/cd9660.c Sun May 22 19:56:14 2011 (r222191) @@ -207,6 +207,7 @@ cd9660_set_defaults(void) diskStructure.rr_moved_dir = 0; diskStructure.archimedes_enabled = 0; + diskStructure.chrp_boot = 0; diskStructure.include_padding_areas = 1; @@ -391,6 +392,8 @@ cd9660_parse_opts(const char *option, fs diskStructure.rock_ridge_enabled = 1; else if (CD9660_IS_COMMAND_ARG_DUAL(var, "A", "archimedes")) diskStructure.archimedes_enabled = 1; + else if (CD9660_IS_COMMAND_ARG(var, "chrp-boot")) + diskStructure.chrp_boot = 1; else if (CD9660_IS_COMMAND_ARG_DUAL(var, "K", "keep-bad-images")) diskStructure.keep_bad_images = 1; else if (CD9660_IS_COMMAND_ARG(var, "allow-deep-trees")) Modified: head/usr.sbin/makefs/cd9660.h ============================================================================== --- head/usr.sbin/makefs/cd9660.h Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/cd9660.h Sun May 22 19:56:14 2011 (r222191) @@ -285,6 +285,7 @@ typedef struct _iso9660_disk { cd9660node *rr_moved_dir; int archimedes_enabled; + int chrp_boot; /* Spec breaking options */ u_char allow_deep_trees; Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Sun May 22 19:56:14 2011 (r222191) @@ -32,7 +32,7 @@ * OF SUCH DAMAGE. */ -#include +#include #include "cd9660.h" #include "cd9660_eltorito.h" @@ -501,27 +501,62 @@ cd9660_setup_boot_volume_descriptor(volu } static int +cd9660_write_mbr_partition_entry(FILE *fd, int index, off_t sector_start, + off_t nsectors, int type) +{ + uint8_t val; + uint32_t lba; + + fseeko(fd, (off_t)(index) * 16 + 0x1be, SEEK_SET); + + val = 0x80; /* Bootable */ + fwrite(&val, sizeof(val), 1, fd); + + val = 0xff; /* CHS begin */ + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + + val = type; /* Part type */ + fwrite(&val, sizeof(val), 1, fd); + + val = 0xff; /* CHS end */ + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + + /* LBA extent */ + lba = htole32(sector_start); + fwrite(&lba, sizeof(lba), 1, fd); + lba = htole32(nsectors); + fwrite(&lba, sizeof(lba), 1, fd); + + return (0); +} + +static int cd9660_write_apm_partition_entry(FILE *fd, int index, int total_partitions, off_t sector_start, off_t nsectors, off_t sector_size, - const char *part_name, const char *part_type) { + const char *part_name, const char *part_type) +{ uint32_t apm32; uint16_t apm16; fseeko(fd, (off_t)(index + 1) * sector_size, SEEK_SET); /* Signature */ - apm16 = htons(0x504d); + apm16 = htobe16(0x504d); fwrite(&apm16, sizeof(apm16), 1, fd); apm16 = 0; fwrite(&apm16, sizeof(apm16), 1, fd); /* Total number of partitions */ - apm32 = htonl(total_partitions); + apm32 = htobe32(total_partitions); fwrite(&apm32, sizeof(apm32), 1, fd); /* Bounds */ - apm32 = htonl(sector_start); + apm32 = htobe32(sector_start); fwrite(&apm32, sizeof(apm32), 1, fd); - apm32 = htonl(nsectors); + apm32 = htobe32(nsectors); fwrite(&apm32, sizeof(apm32), 1, fd); fwrite(part_name, strlen(part_name) + 1, 1, fd); @@ -537,6 +572,7 @@ cd9660_write_boot(FILE *fd) struct boot_catalog_entry *e; struct cd9660_boot_image *t; int apm_partitions = 0; + int mbr_partitions = 0; /* write boot catalog */ if (fseeko(fd, (off_t)diskStructure.boot_catalog_sector * @@ -571,6 +607,35 @@ cd9660_write_boot(FILE *fd) if (t->system == ET_SYS_MAC) apm_partitions++; + if (t->system == ET_SYS_PPC) + mbr_partitions++; + } + + /* some systems need partition tables as well */ + if (mbr_partitions > 0 || diskStructure.chrp_boot) { + uint16_t sig; + + fseek(fd, 0x1fe, SEEK_SET); + sig = htole16(0xaa55); + fwrite(&sig, sizeof(sig), 1, fd); + + mbr_partitions = 0; + + /* Write ISO9660 descriptor, enclosing the whole disk */ + if (diskStructure.chrp_boot) + cd9660_write_mbr_partition_entry(fd, mbr_partitions++, + 0, diskStructure.totalSectors * + (diskStructure.sectorSize / 512), 0x96); + + /* Write all partition entries */ + TAILQ_FOREACH(t, &diskStructure.boot_images, image_list) { + if (t->system != ET_SYS_PPC) + continue; + cd9660_write_mbr_partition_entry(fd, mbr_partitions++, + t->sector * (diskStructure.sectorSize / 512), + t->num_sectors * (diskStructure.sectorSize / 512), + 0x41 /* PReP Boot */); + } } if (apm_partitions > 0) { @@ -580,17 +645,17 @@ cd9660_write_boot(FILE *fd) int total_parts; fseek(fd, 0, SEEK_SET); - apm16 = htons(0x4552); + apm16 = htobe16(0x4552); fwrite(&apm16, sizeof(apm16), 1, fd); /* Device block size */ - apm16 = htons(512); + apm16 = htobe16(512); fwrite(&apm16, sizeof(apm16), 1, fd); /* Device block count */ - apm32 = htonl(diskStructure.totalSectors * + apm32 = htobe32(diskStructure.totalSectors * (diskStructure.sectorSize / 512)); fwrite(&apm32, sizeof(apm32), 1, fd); /* Device type/id */ - apm16 = htons(1); + apm16 = htobe16(1); fwrite(&apm16, sizeof(apm16), 1, fd); fwrite(&apm16, sizeof(apm16), 1, fd); Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/makefs.8 Sun May 22 19:56:14 2011 (r222191) @@ -285,6 +285,9 @@ Use the extension to encode .Tn RISC OS metadata. +.It Sy chrp-boot +Write an MBR partition table to the image to allow older CHRP hardware to +boot. .It Sy boot-load-segment Set load segment for the boot image. .It Sy bootimage From owner-svn-src-head@FreeBSD.ORG Sun May 22 20:22:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404CA106566B; Sun, 22 May 2011 20:22:58 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 03E508FC13; Sun, 22 May 2011 20:22:57 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 67D737F382E; Sun, 22 May 2011 22:22:56 +0200 (CEST) Date: Sun, 22 May 2011 22:22:56 +0200 From: Roman Divacky To: Dimitry Andric Message-ID: <20110522202256.GA43412@freebsd.org> References: <201105221632.p4MGWjUb081825@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105221632.p4MGWjUb081825@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:22:58 -0000 The problem here is deeper in my opinion. What FreeBSD calls amd64 the rest of the world (ie. linux) calls x86_64, I think that instead of this we should teach llvm/clang about "amd64". Maybe as a FreeBSD-only diff. The machine part of the triple is used in more places and this hack only is not the complete solution imho. On Sun, May 22, 2011 at 04:32:45PM +0000, Dimitry Andric wrote: > Author: dim > Date: Sun May 22 16:32:44 2011 > New Revision: 222183 > URL: http://svn.freebsd.org/changeset/base/222183 > > Log: > On amd64, change clang's default triple to 'x86_64-unknown-freebsd9.0', > similar to what we do for binutils. When clang's default triple starts > with 'amd64-', it does not pass a proper -target-cpu option to its > first stage. > > This can lead to problems, for example when structs are memcpy'd, and > clang erroneously assumes they are 16-byte aligned. It will then use > the 'movaps' SSE instruction to implement the copy, which results in a > bus error if the struct is really 8-byte aligned. > > I encountered this issue when gcc's /usr/libexec/cc1 started crashing > with SIGBUS, after rebuilding world with clang ToT, but it also affects > the version of clang that we have in the tree. We were just lucky until > now, apparently. :) > > Modified: > head/lib/clang/clang.build.mk > > Modified: head/lib/clang/clang.build.mk > ============================================================================== > --- head/lib/clang/clang.build.mk Sun May 22 15:24:56 2011 (r222182) > +++ head/lib/clang/clang.build.mk Sun May 22 16:32:44 2011 (r222183) > @@ -15,7 +15,7 @@ CFLAGS+= -O1 > > TARGET_ARCH?= ${MACHINE_ARCH} > # XXX: 8.0, to keep __FreeBSD_cc_version happy > -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" > +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" > > .ifndef LLVM_REQUIRES_EH > CXXFLAGS+=-fno-exceptions From owner-svn-src-head@FreeBSD.ORG Sun May 22 20:28:51 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C5F0106564A; Sun, 22 May 2011 20:28:51 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 599658FC15; Sun, 22 May 2011 20:28:51 +0000 (UTC) Received: from dhcp-192-168-2-22.wifi.xcllnt.net (atm.xcllnt.net [70.36.220.6]) (authenticated bits=0) by mail.xcllnt.net (8.14.4/8.14.4) with ESMTP id p4MKSZh8010730 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 13:28:42 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: Date: Sun, 22 May 2011 13:28:35 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Warner Losh X-Mailer: Apple Mail (2.1084) Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:28:51 -0000 On May 22, 2011, at 9:26 AM, Warner Losh wrote: >=20 > On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: >=20 >> This also bit me on embedded platform stuff. >>=20 >> Is it possible to disable this by default for now and have it just = warn loudly? >> And/or hide the default value behind a kernel configuration variable >> so we can disable it >> (but still get the warnings) for now? >=20 > Or just delete it entirely as a bad idea? We had this with Marcel's = warning for a long time that turned out to be utterly bogus so we = removed it. Really? The warning wasn't bogus. It was there to help us understand what was going on and we found over time that it was a harmless condition. That's why we removed the warning. The warning was good to raise awareness. This is in no way similar to what we have now. Here we have to deal with broken and fundamentally invalid MBRs that has caused us harm before and we're trying to do something sensible. As it turns out, a whole bunch of people have invalid MBRs, probably caused by crappy tools. Now what do you suggest we should do? Accept it silently and suffer the consequences later, should we raise awareness so that administrators can try and fix things or should we reject the MBR out of pedanticism? Rather than just calling it a bad idea, why not come up with something constructive? --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-head@FreeBSD.ORG Sun May 22 20:39:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D51106564A; Sun, 22 May 2011 20:39:08 +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 45AD78FC08; Sun, 22 May 2011 20:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MKd8ff089649; Sun, 22 May 2011 20:39:08 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MKd8dQ089647; Sun, 22 May 2011 20:39:08 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105222039.p4MKd8dQ089647@svn.freebsd.org> From: Rick Macklem Date: Sun, 22 May 2011 20:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222196 - head/sys/ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:39:08 -0000 Author: rmacklem Date: Sun May 22 20:39:07 2011 New Revision: 222196 URL: http://svn.freebsd.org/changeset/base/222196 Log: Fix the ufs/ffs file system so that it uses the lock flags argument added to VFS_FHTOVP() by r222167. Reviewed by: mckusick Modified: head/sys/ufs/ufs/ufs_vfsops.c Modified: head/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vfsops.c Sun May 22 20:29:47 2011 (r222195) +++ head/sys/ufs/ufs/ufs_vfsops.c Sun May 22 20:39:07 2011 (r222196) @@ -218,7 +218,7 @@ ufs_fhtovp(mp, ufhp, flags, vpp) struct vnode *nvp; int error; - error = VFS_VGET(mp, ufhp->ufid_ino, LK_EXCLUSIVE, &nvp); + error = VFS_VGET(mp, ufhp->ufid_ino, flags, &nvp); if (error) { *vpp = NULLVP; return (error); From owner-svn-src-head@FreeBSD.ORG Sun May 22 20:41:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 173EE1065670; Sun, 22 May 2011 20:41:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id E49E8151136; Sun, 22 May 2011 20:41:14 +0000 (UTC) Message-ID: <4DD974E9.8040000@FreeBSD.org> Date: Sun, 22 May 2011 13:41:13 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Roman Divacky References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> In-Reply-To: <20110522202256.GA43412@freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:41:17 -0000 On 05/22/2011 13:22, Roman Divacky wrote: > The problem here is deeper in my opinion. What FreeBSD calls > amd64 the rest of the world (ie. linux) calls x86_64, I think > that instead of this we should teach llvm/clang about "amd64". > Maybe as a FreeBSD-only diff. Can we please not go down that route with clang? It was a mistake to add a bunch of FreeBSD'isms to gcc because it made it that much harder for both the code and the compiler to be modular. We have a chance to atone for these mistakes while introducing a new compiler, can we please not make them again? Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Sun May 22 20:55:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4799E106566C; Sun, 22 May 2011 20:55:55 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 360AB8FC08; Sun, 22 May 2011 20:55:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MKtt7r090300; Sun, 22 May 2011 20:55:55 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MKtttg090297; Sun, 22 May 2011 20:55:55 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105222055.p4MKtttg090297@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 May 2011 20:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222198 - in head/sys: dev/cfi powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:55:55 -0000 Author: attilio Date: Sun May 22 20:55:54 2011 New Revision: 222198 URL: http://svn.freebsd.org/changeset/base/222198 Log: Merge r221614,221696,221737,221840 from largeSMP project branch: Rewrite atomic operations for powerpc in order to achieve the following: - Produce a type-clean implementation (in terms of functions arguments and returned values) for the primitives. - Fix errors with _long() atomics where they ended up with the wrong arguments to be accepted. - Follow the sys/type.h specifics that define the numbered types starting from standard C types. - Let _ptr() version to not auto-magically cast arguments, but leave the burden on callers, as _ptr() atomic is intended to be used relatively rarely. Fix cfi in order to support the latest point. In collabouration with: bde Tested by: andreast, nwhitehorn, jceel MFC after: 2 weeks Modified: head/sys/dev/cfi/cfi_dev.c head/sys/powerpc/include/atomic.h Modified: head/sys/dev/cfi/cfi_dev.c ============================================================================== --- head/sys/dev/cfi/cfi_dev.c Sun May 22 20:41:10 2011 (r222197) +++ head/sys/dev/cfi/cfi_dev.c Sun May 22 20:55:54 2011 (r222198) @@ -145,7 +145,8 @@ cfi_devopen(struct cdev *dev, int oflags sc = dev->si_drv1; /* We allow only 1 open. */ - if (!atomic_cmpset_acq_ptr(&sc->sc_opened, NULL, td->td_proc)) + if (!atomic_cmpset_acq_ptr((uintptr_t *)&sc->sc_opened, + (uintptr_t)NULL, (uintptr_t)td->td_proc)) return (EBUSY); return (0); } Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun May 22 20:41:10 2011 (r222197) +++ head/sys/powerpc/include/atomic.h Sun May 22 20:55:54 2011 (r222198) @@ -48,13 +48,7 @@ * { *p += v; } */ -#define __ATOMIC_ADD_8(p, v, t) \ - 8-bit atomic_add not implemented - -#define __ATOMIC_ADD_16(p, v, t) \ - 16-bit atomic_add not implemented - -#define __ATOMIC_ADD_32(p, v, t) \ +#define __atomic_add_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " add %0, %3, %0\n" \ @@ -63,10 +57,10 @@ : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_ADD_32 */ + /* __atomic_add_int */ #ifdef __powerpc64__ -#define __ATOMIC_ADD_64(p, v, t) \ +#define __atomic_add_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " add %0, %3, %0\n" \ @@ -75,69 +69,72 @@ : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_ADD_64 */ + /* __atomic_add_long */ #else -#define __ATOMIC_ADD_64(p, v, t) \ - 64-bit atomic_add not implemented +#define __atomic_add_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " add %0, %3, %0\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_add_long */ #endif -#define _ATOMIC_ADD(width, suffix, type) \ +#define _ATOMIC_ADD(type) \ static __inline void \ - atomic_add_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_ADD_##width(p, v, t); \ + atomic_add_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_add_##type(p, v, t); \ } \ \ static __inline void \ - atomic_add_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_ADD_##width(p, v, t); \ + atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_add_##type(p, v, t); \ __ATOMIC_BARRIER; \ } \ \ static __inline void \ - atomic_add_rel_##suffix(volatile type *p, type v) { \ - type t; \ + atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ __ATOMIC_BARRIER; \ - __ATOMIC_ADD_##width(p, v, t); \ + __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ -#if 0 -_ATOMIC_ADD(8, 8, uint8_t) -_ATOMIC_ADD(8, char, u_char) -_ATOMIC_ADD(16, 16, uint16_t) -_ATOMIC_ADD(16, short, u_short) -#endif -_ATOMIC_ADD(32, 32, uint32_t) -_ATOMIC_ADD(32, int, u_int) -#ifdef __powerpc64__ -_ATOMIC_ADD(64, 64, uint64_t) -_ATOMIC_ADD(64, long, u_long) -_ATOMIC_ADD(64, ptr, uintptr_t) +_ATOMIC_ADD(int) +_ATOMIC_ADD(long) + +#define atomic_add_32 atomic_add_int +#define atomic_add_acq_32 atomic_add_acq_int +#define atomic_add_rel_32 atomic_add_rel_int + +#ifdef __powerpc64__ +#define atomic_add_64 atomic_add_long +#define atomic_add_acq_64 atomic_add_acq_long +#define atomic_add_rel_64 atomic_add_rel_long + +#define atomic_add_ptr atomic_add_long +#define atomic_add_acq_ptr atomic_add_acq_long +#define atomic_add_rel_ptr atomic_add_rel_long #else -_ATOMIC_ADD(32, long, u_long) -_ATOMIC_ADD(32, ptr, uintptr_t) +#define atomic_add_ptr atomic_add_int +#define atomic_add_acq_ptr atomic_add_acq_int +#define atomic_add_rel_ptr atomic_add_rel_int #endif - #undef _ATOMIC_ADD -#undef __ATOMIC_ADD_64 -#undef __ATOMIC_ADD_32 -#undef __ATOMIC_ADD_16 -#undef __ATOMIC_ADD_8 +#undef __atomic_add_long +#undef __atomic_add_int /* * atomic_clear(p, v) * { *p &= ~v; } */ -#define __ATOMIC_CLEAR_8(p, v, t) \ - 8-bit atomic_clear not implemented - -#define __ATOMIC_CLEAR_16(p, v, t) \ - 16-bit atomic_clear not implemented - -#define __ATOMIC_CLEAR_32(p, v, t) \ +#define __atomic_clear_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " andc %0, %0, %3\n" \ @@ -146,10 +143,10 @@ _ATOMIC_ADD(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_CLEAR_32 */ + /* __atomic_clear_int */ #ifdef __powerpc64__ -#define __ATOMIC_CLEAR_64(p, v, t) \ +#define __atomic_clear_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " andc %0, %0, %3\n" \ @@ -158,56 +155,66 @@ _ATOMIC_ADD(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_CLEAR_64 */ + /* __atomic_clear_long */ #else -#define __ATOMIC_CLEAR_64(p, v, t) \ - 64-bit atomic_clear not implemented +#define __atomic_clear_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " andc %0, %0, %3\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_clear_long */ #endif -#define _ATOMIC_CLEAR(width, suffix, type) \ +#define _ATOMIC_CLEAR(type) \ static __inline void \ - atomic_clear_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_CLEAR_##width(p, v, t); \ + atomic_clear_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_clear_##type(p, v, t); \ } \ \ static __inline void \ - atomic_clear_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_CLEAR_##width(p, v, t); \ + atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_clear_##type(p, v, t); \ __ATOMIC_BARRIER; \ } \ \ static __inline void \ - atomic_clear_rel_##suffix(volatile type *p, type v) { \ - type t; \ + atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ __ATOMIC_BARRIER; \ - __ATOMIC_CLEAR_##width(p, v, t); \ + __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ -#if 0 -_ATOMIC_CLEAR(8, 8, uint8_t) -_ATOMIC_CLEAR(8, char, u_char) -_ATOMIC_CLEAR(16, 16, uint16_t) -_ATOMIC_CLEAR(16, short, u_short) -#endif -_ATOMIC_CLEAR(32, 32, uint32_t) -_ATOMIC_CLEAR(32, int, u_int) -#ifdef __powerpc64__ -_ATOMIC_CLEAR(64, 64, uint64_t) -_ATOMIC_CLEAR(64, long, u_long) -_ATOMIC_CLEAR(64, ptr, uintptr_t) + +_ATOMIC_CLEAR(int) +_ATOMIC_CLEAR(long) + +#define atomic_clear_32 atomic_clear_int +#define atomic_clear_acq_32 atomic_clear_acq_int +#define atomic_clear_rel_32 atomic_clear_rel_int + +#ifdef __powerpc64__ +#define atomic_clear_64 atomic_clear_long +#define atomic_clear_acq_64 atomic_clear_acq_long +#define atomic_clear_rel_64 atomic_clear_rel_long + +#define atomic_clear_ptr atomic_clear_long +#define atomic_clear_acq_ptr atomic_clear_acq_long +#define atomic_clear_rel_ptr atomic_clear_rel_long #else -_ATOMIC_CLEAR(32, long, u_long) -_ATOMIC_CLEAR(32, ptr, uintptr_t) +#define atomic_clear_ptr atomic_clear_int +#define atomic_clear_acq_ptr atomic_clear_acq_int +#define atomic_clear_rel_ptr atomic_clear_rel_int #endif - #undef _ATOMIC_CLEAR -#undef __ATOMIC_CLEAR_64 -#undef __ATOMIC_CLEAR_32 -#undef __ATOMIC_CLEAR_16 -#undef __ATOMIC_CLEAR_8 +#undef __atomic_clear_long +#undef __atomic_clear_int /* * atomic_cmpset(p, o, n) @@ -229,13 +236,7 @@ _ATOMIC_CLEAR(32, ptr, uintptr_t) * { *p |= v; } */ -#define __ATOMIC_SET_8(p, v, t) \ - 8-bit atomic_set not implemented - -#define __ATOMIC_SET_16(p, v, t) \ - 16-bit atomic_set not implemented - -#define __ATOMIC_SET_32(p, v, t) \ +#define __atomic_set_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " or %0, %3, %0\n" \ @@ -244,10 +245,10 @@ _ATOMIC_CLEAR(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SET_32 */ + /* __atomic_set_int */ #ifdef __powerpc64__ -#define __ATOMIC_SET_64(p, v, t) \ +#define __atomic_set_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " or %0, %3, %0\n" \ @@ -256,69 +257,72 @@ _ATOMIC_CLEAR(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SET_64 */ + /* __atomic_set_long */ #else -#define __ATOMIC_SET_64(p, v, t) \ - 64-bit atomic_set not implemented +#define __atomic_set_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " or %0, %3, %0\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_set_long */ #endif -#define _ATOMIC_SET(width, suffix, type) \ +#define _ATOMIC_SET(type) \ static __inline void \ - atomic_set_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SET_##width(p, v, t); \ + atomic_set_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_set_##type(p, v, t); \ } \ \ static __inline void \ - atomic_set_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SET_##width(p, v, t); \ + atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_set_##type(p, v, t); \ __ATOMIC_BARRIER; \ } \ \ static __inline void \ - atomic_set_rel_##suffix(volatile type *p, type v) { \ - type t; \ + atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ __ATOMIC_BARRIER; \ - __ATOMIC_SET_##width(p, v, t); \ + __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ -#if 0 -_ATOMIC_SET(8, 8, uint8_t) -_ATOMIC_SET(8, char, u_char) -_ATOMIC_SET(16, 16, uint16_t) -_ATOMIC_SET(16, short, u_short) -#endif -_ATOMIC_SET(32, 32, uint32_t) -_ATOMIC_SET(32, int, u_int) -#ifdef __powerpc64__ -_ATOMIC_SET(64, 64, uint64_t) -_ATOMIC_SET(64, long, u_long) -_ATOMIC_SET(64, ptr, uintptr_t) +_ATOMIC_SET(int) +_ATOMIC_SET(long) + +#define atomic_set_32 atomic_set_int +#define atomic_set_acq_32 atomic_set_acq_int +#define atomic_set_rel_32 atomic_set_rel_int + +#ifdef __powerpc64__ +#define atomic_set_64 atomic_set_long +#define atomic_set_acq_64 atomic_set_acq_long +#define atomic_set_rel_64 atomic_set_rel_long + +#define atomic_set_ptr atomic_set_long +#define atomic_set_acq_ptr atomic_set_acq_long +#define atomic_set_rel_ptr atomic_set_rel_long #else -_ATOMIC_SET(32, long, u_long) -_ATOMIC_SET(32, ptr, uintptr_t) +#define atomic_set_ptr atomic_set_int +#define atomic_set_acq_ptr atomic_set_acq_int +#define atomic_set_rel_ptr atomic_set_rel_int #endif - #undef _ATOMIC_SET -#undef __ATOMIC_SET_64 -#undef __ATOMIC_SET_32 -#undef __ATOMIC_SET_16 -#undef __ATOMIC_SET_8 +#undef __atomic_set_long +#undef __atomic_set_int /* * atomic_subtract(p, v) * { *p -= v; } */ -#define __ATOMIC_SUBTRACT_8(p, v, t) \ - 8-bit atomic_subtract not implemented - -#define __ATOMIC_SUBTRACT_16(p, v, t) \ - 16-bit atomic_subtract not implemented - -#define __ATOMIC_SUBTRACT_32(p, v, t) \ +#define __atomic_subtract_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " subf %0, %3, %0\n" \ @@ -327,10 +331,10 @@ _ATOMIC_SET(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SUBTRACT_32 */ + /* __atomic_subtract_int */ #ifdef __powerpc64__ -#define __ATOMIC_SUBTRACT_64(p, v, t) \ +#define __atomic_subtract_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " subf %0, %3, %0\n" \ @@ -339,56 +343,65 @@ _ATOMIC_SET(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SUBTRACT_64 */ + /* __atomic_subtract_long */ #else -#define __ATOMIC_SUBTRACT_64(p, v, t) \ - 64-bit atomic_subtract not implemented +#define __atomic_subtract_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " subf %0, %3, %0\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_subtract_long */ #endif -#define _ATOMIC_SUBTRACT(width, suffix, type) \ - static __inline void \ - atomic_subtract_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SUBTRACT_##width(p, v, t); \ - } \ - \ - static __inline void \ - atomic_subtract_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SUBTRACT_##width(p, v, t); \ - __ATOMIC_BARRIER; \ - } \ - \ - static __inline void \ - atomic_subtract_rel_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_BARRIER; \ - __ATOMIC_SUBTRACT_##width(p, v, t); \ - } \ +#define _ATOMIC_SUBTRACT(type) \ + static __inline void \ + atomic_subtract_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_subtract_##type(p, v, t); \ + } \ + \ + static __inline void \ + atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_subtract_##type(p, v, t); \ + __ATOMIC_BARRIER; \ + } \ + \ + static __inline void \ + atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __ATOMIC_BARRIER; \ + __atomic_subtract_##type(p, v, t); \ + } \ /* _ATOMIC_SUBTRACT */ -#if 0 -_ATOMIC_SUBTRACT(8, 8, uint8_t) -_ATOMIC_SUBTRACT(8, char, u_char) -_ATOMIC_SUBTRACT(16, 16, uint16_t) -_ATOMIC_SUBTRACT(16, short, u_short) -#endif -_ATOMIC_SUBTRACT(32, 32, uint32_t) -_ATOMIC_SUBTRACT(32, int, u_int) -#ifdef __powerpc64__ -_ATOMIC_SUBTRACT(64, 64, uint64_t) -_ATOMIC_SUBTRACT(64, long, u_long) -_ATOMIC_SUBTRACT(64, ptr, uintptr_t) +_ATOMIC_SUBTRACT(int) +_ATOMIC_SUBTRACT(long) + +#define atomic_subtract_32 atomic_subtract_int +#define atomic_subtract_acq_32 atomic_subtract_acq_int +#define atomic_subtract_rel_32 atomic_subtract_rel_int + +#ifdef __powerpc64__ +#define atomic_subtract_64 atomic_subtract_long +#define atomic_subtract_acq_64 atomic_subract_acq_long +#define atomic_subtract_rel_64 atomic_subtract_rel_long + +#define atomic_subtract_ptr atomic_subtract_long +#define atomic_subtract_acq_ptr atomic_subtract_acq_long +#define atomic_subtract_rel_ptr atomic_subtract_rel_long #else -_ATOMIC_SUBTRACT(32, long, u_long) -_ATOMIC_SUBTRACT(32, ptr, uintptr_t) +#define atomic_subtract_ptr atomic_subtract_int +#define atomic_subtract_acq_ptr atomic_subtract_acq_int +#define atomic_subtract_rel_ptr atomic_subtract_rel_int #endif - #undef _ATOMIC_SUBTRACT -#undef __ATOMIC_SUBTRACT_64 -#undef __ATOMIC_SUBTRACT_32 -#undef __ATOMIC_SUBTRACT_16 -#undef __ATOMIC_SUBTRACT_8 +#undef __atomic_subtract_long +#undef __atomic_subtract_int /* * atomic_store_rel(p, v) @@ -399,10 +412,10 @@ _ATOMIC_SUBTRACT(32, ptr, uintptr_t) * Old/original implementations that still need revisiting. */ -static __inline uint32_t -atomic_readandclear_32(volatile uint32_t *addr) +static __inline u_int +atomic_readandclear_int(volatile u_int *addr) { - uint32_t result,temp; + u_int result,temp; #ifdef __GNUCLIKE_ASM __asm __volatile ( @@ -420,10 +433,10 @@ atomic_readandclear_32(volatile uint32_t } #ifdef __powerpc64__ -static __inline uint64_t -atomic_readandclear_64(volatile uint64_t *addr) +static __inline u_long +atomic_readandclear_long(volatile u_long *addr) { - uint64_t result,temp; + u_long result,temp; #ifdef __GNUCLIKE_ASM __asm __volatile ( @@ -441,37 +454,27 @@ atomic_readandclear_64(volatile uint64_t } #endif -#define atomic_readandclear_int atomic_readandclear_32 +#define atomic_readandclear_32 atomic_readandclear_int #ifdef __powerpc64__ -#define atomic_readandclear_long atomic_readandclear_64 -#define atomic_readandclear_ptr atomic_readandclear_64 +#define atomic_readandclear_64 atomic_readandclear_long + +#define atomic_readandclear_ptr atomic_readandclear_long #else -#define atomic_readandclear_long atomic_readandclear_32 -#define atomic_readandclear_ptr atomic_readandclear_32 +static __inline u_long +atomic_readandclear_long(volatile u_long *addr) +{ + + return ((u_long)atomic_readandclear_int((volatile u_int *)addr)); +} + +#define atomic_readandclear_ptr atomic_readandclear_int #endif /* * We assume that a = b will do atomic loads and stores. */ -#define ATOMIC_STORE_LOAD(TYPE, WIDTH) \ -static __inline u_##TYPE \ -atomic_load_acq_##WIDTH(volatile u_##TYPE *p) \ -{ \ - u_##TYPE v; \ - \ - v = *p; \ - __ATOMIC_BARRIER; \ - return (v); \ -} \ - \ -static __inline void \ -atomic_store_rel_##WIDTH(volatile u_##TYPE *p, u_##TYPE v) \ -{ \ - __ATOMIC_BARRIER; \ - *p = v; \ -} \ - \ +#define ATOMIC_STORE_LOAD(TYPE) \ static __inline u_##TYPE \ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ { \ @@ -489,25 +492,37 @@ atomic_store_rel_##TYPE(volatile u_##TYP *p = v; \ } -ATOMIC_STORE_LOAD(char, 8) -ATOMIC_STORE_LOAD(short, 16) -ATOMIC_STORE_LOAD(int, 32) -#ifdef __powerpc64__ -ATOMIC_STORE_LOAD(long, 64) -#endif +ATOMIC_STORE_LOAD(int) + +#define atomic_load_acq_32 atomic_load_acq_int +#define atomic_store_rel_32 atomic_store_rel_int #ifdef __powerpc64__ -#define atomic_load_acq_long atomic_load_acq_64 -#define atomic_store_rel_long atomic_store_rel_64 -#define atomic_load_acq_ptr atomic_load_acq_64 -#define atomic_store_rel_ptr atomic_store_rel_64 +ATOMIC_STORE_LOAD(long) + +#define atomic_load_acq_64 atomic_load_acq_long +#define atomic_store_rel_64 atomic_store_rel_long + +#define atomic_load_acq_ptr atomic_load_acq_long +#define atomic_store_rel_ptr atomic_store_rel_long #else -#define atomic_load_acq_long atomic_load_acq_32 -#define atomic_store_rel_long atomic_store_rel_32 -#define atomic_load_acq_ptr atomic_load_acq_32 -#define atomic_store_rel_ptr atomic_store_rel_32 -#endif +static __inline u_long +atomic_load_acq_long(volatile u_long *addr) +{ + return ((u_long)atomic_load_acq_int((volatile u_int *)addr)); +} + +static __inline void +atomic_store_rel_long(volatile u_long *addr, u_long val) +{ + + atomic_store_rel_int((volatile u_int *)addr, (u_int)val); +} + +#define atomic_load_acq_ptr atomic_load_acq_int +#define atomic_store_rel_ptr atomic_store_rel_int +#endif #undef ATOMIC_STORE_LOAD /* @@ -516,7 +531,7 @@ ATOMIC_STORE_LOAD(long, 64) * zero if the compare failed, nonzero otherwise. */ static __inline int -atomic_cmpset_32(volatile uint32_t* p, uint32_t cmpval, uint32_t newval) +atomic_cmpset_int(volatile u_int* p, u_int cmpval, u_int newval) { int ret; @@ -540,7 +555,6 @@ atomic_cmpset_32(volatile uint32_t* p, u return (ret); } - static __inline int atomic_cmpset_long(volatile u_long* p, u_long cmpval, u_long newval) { @@ -552,21 +566,21 @@ atomic_cmpset_long(volatile u_long* p, u "1:\tldarx %0, 0, %2\n\t" /* load old value */ "cmpld %3, %0\n\t" /* compare */ "bne 2f\n\t" /* exit if not equal */ - "stdcx. %4, 0, %2\n\t" /* attempt to store */ + "stdcx. %4, 0, %2\n\t" /* attempt to store */ #else "1:\tlwarx %0, 0, %2\n\t" /* load old value */ "cmplw %3, %0\n\t" /* compare */ "bne 2f\n\t" /* exit if not equal */ - "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "stwcx. %4, 0, %2\n\t" /* attempt to store */ #endif "bne- 1b\n\t" /* spin if failed */ "li %0, 1\n\t" /* success - retval = 1 */ "b 3f\n\t" /* we've succeeded */ "2:\n\t" #ifdef __powerpc64__ - "stdcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "stdcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ #else - "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ #endif "li %0, 0\n\t" /* failure - retval = 0 */ "3:\n\t" @@ -578,31 +592,21 @@ atomic_cmpset_long(volatile u_long* p, u return (ret); } -#define atomic_cmpset_int atomic_cmpset_32 - -#ifdef __powerpc64__ -#define atomic_cmpset_ptr(dst, old, new) \ - atomic_cmpset_long((volatile u_long *)(dst), (u_long)(old), (u_long)(new)) -#else -#define atomic_cmpset_ptr(dst, old, new) \ - atomic_cmpset_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) -#endif - static __inline int -atomic_cmpset_acq_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) +atomic_cmpset_acq_int(volatile u_int *p, u_int cmpval, u_int newval) { int retval; - retval = atomic_cmpset_32(p, cmpval, newval); + retval = atomic_cmpset_int(p, cmpval, newval); __ATOMIC_BARRIER; return (retval); } static __inline int -atomic_cmpset_rel_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) +atomic_cmpset_rel_int(volatile u_int *p, u_int cmpval, u_int newval) { __ATOMIC_BARRIER; - return (atomic_cmpset_32(p, cmpval, newval)); + return (atomic_cmpset_int(p, cmpval, newval)); } static __inline int @@ -622,39 +626,39 @@ atomic_cmpset_rel_long(volatile u_long * return (atomic_cmpset_long(p, cmpval, newval)); } -#define atomic_cmpset_acq_int atomic_cmpset_acq_32 -#define atomic_cmpset_rel_int atomic_cmpset_rel_32 +#define atomic_cmpset_32 atomic_cmpset_int +#define atomic_cmpset_acq_32 atomic_cmpset_acq_int +#define atomic_cmpset_rel_32 atomic_cmpset_rel_int #ifdef __powerpc64__ -#define atomic_cmpset_acq_ptr(dst, old, new) \ - atomic_cmpset_acq_long((volatile u_long *)(dst), (u_long)(old), (u_long)(new)) -#define atomic_cmpset_rel_ptr(dst, old, new) \ - atomic_cmpset_rel_long((volatile u_long *)(dst), (u_long)(old), (u_long)(new)) +#define atomic_cmpset_64 atomic_cmpset_long +#define atomic_cmpset_acq_64 atomic_cmpset_acq_long +#define atomic_cmpset_rel_64 atomic_cmpset_rel_long + +#define atomic_cmpset_ptr atomic_cmpset_long +#define atomic_cmpset_acq_ptr atomic_cmpset_acq_long +#define atomic_cmpset_rel_ptr atomic_cmpset_rel_long #else -#define atomic_cmpset_acq_ptr(dst, old, new) \ - atomic_cmpset_acq_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) -#define atomic_cmpset_rel_ptr(dst, old, new) \ - atomic_cmpset_rel_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) +#define atomic_cmpset_ptr atomic_cmpset_int +#define atomic_cmpset_acq_ptr atomic_cmpset_acq_int +#define atomic_cmpset_rel_ptr atomic_cmpset_rel_int #endif -static __inline uint32_t -atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) +static __inline u_int +atomic_fetchadd_int(volatile u_int *p, u_int v) { - uint32_t value; + u_int value; do { value = *p; - } while (!atomic_cmpset_32(p, value, value + v)); + } while (!atomic_cmpset_int(p, value, value + v)); return (value); } -#define atomic_fetchadd_int atomic_fetchadd_32 - -#ifdef __powerpc64__ -static __inline uint64_t -atomic_fetchadd_64(volatile uint64_t *p, uint64_t v) +static __inline u_long +atomic_fetchadd_long(volatile u_long *p, u_long v) { - uint64_t value; + u_long value; do { value = *p; @@ -662,10 +666,10 @@ atomic_fetchadd_64(volatile uint64_t *p, return (value); } -#define atomic_fetchadd_long atomic_fetchadd_64 -#else -#define atomic_fetchadd_long(p, v) \ - (u_long)atomic_fetchadd_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_fetchadd_32 atomic_fetchadd_int + +#ifdef __powerpc64__ +#define atomic_fetchadd_64 atomic_fetchadd_long #endif #endif /* ! _MACHINE_ATOMIC_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun May 22 21:04:32 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73B221065672; Sun, 22 May 2011 21:04:32 +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 636AE8FC0C; Sun, 22 May 2011 21:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ML4W1d090602; Sun, 22 May 2011 21:04:32 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ML4WxY090600; Sun, 22 May 2011 21:04:32 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105222104.p4ML4WxY090600@svn.freebsd.org> From: Rick Macklem Date: Sun, 22 May 2011 21:04: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: r222199 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 21:04:32 -0000 Author: rmacklem Date: Sun May 22 21:04:32 2011 New Revision: 222199 URL: http://svn.freebsd.org/changeset/base/222199 Log: Fix the zfs file system so that it uses the lock flags argument added to VFS_FHTOVP() by r222167. Reviewed by: pjd Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun May 22 20:55:54 2011 (r222198) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun May 22 21:04:32 2011 (r222199) @@ -2069,7 +2069,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int VN_HOLD(*vpp); } ZFS_EXIT(zfsvfs); - err = zfs_vnode_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); + err = zfs_vnode_lock(*vpp, flags | LK_RETRY); if (err != 0) *vpp = NULL; return (err); @@ -2096,7 +2096,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int *vpp = ZTOV(zp); ZFS_EXIT(zfsvfs); - err = zfs_vnode_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); + err = zfs_vnode_lock(*vpp, flags | LK_RETRY); if (err == 0) vnode_create_vobject(*vpp, zp->z_size, curthread); else From owner-svn-src-head@FreeBSD.ORG Sun May 22 21:30:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AEC7106567D; Sun, 22 May 2011 21:30:58 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id 73FDA8FC12; Sun, 22 May 2011 21:30:58 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id 1336556161; Sun, 22 May 2011 16:30:58 -0500 (CDT) Date: Sun, 22 May 2011 16:30:58 -0500 From: Mark Linimon To: Roman Divacky Message-ID: <20110522213058.GB21144@lonesome.com> References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110522202256.GA43412@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 21:30:58 -0000 On Sun, May 22, 2011 at 10:22:56PM +0200, Roman Divacky wrote: > The problem here is deeper in my opinion. What FreeBSD calls > amd64 the rest of the world (ie. linux) calls x86_64, I think > that instead of this we should teach llvm/clang about "amd64". > Maybe as a FreeBSD-only diff. If we move away from "amd64", we are going to need a _substantial_ amount of work on ports. mcl From owner-svn-src-head@FreeBSD.ORG Sun May 22 21:31:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32CF5106564A; Sun, 22 May 2011 21:31:37 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9B368FC1B; Sun, 22 May 2011 21:31:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MLVaJZ091456; Sun, 22 May 2011 21:31:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MLVa1s091454; Sun, 22 May 2011 21:31:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105222131.p4MLVa1s091454@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 May 2011 21:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222200 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 21:31:37 -0000 Author: attilio Date: Sun May 22 21:31:36 2011 New Revision: 222200 URL: http://svn.freebsd.org/changeset/base/222200 Log: Merge r221901 from largeSMP project branch: Increase the size of cg_count in order to enable usage of > 127 CPUs. cg_children is also bumped in order to keep the structure naturally padded, even if this is not strictly necessary. Submitted and tested by: sbruno Modified: head/sys/sys/smp.h Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Sun May 22 21:04:32 2011 (r222199) +++ head/sys/sys/smp.h Sun May 22 21:31:36 2011 (r222200) @@ -33,8 +33,8 @@ struct cpu_group { struct cpu_group *cg_parent; /* Our parent group. */ struct cpu_group *cg_child; /* Optional children groups. */ cpumask_t cg_mask; /* Mask of cpus in this group. */ - int8_t cg_count; /* Count of cpus in this group. */ - int8_t cg_children; /* Number of children groups. */ + int32_t cg_count; /* Count of cpus in this group. */ + int16_t cg_children; /* Number of children groups. */ int8_t cg_level; /* Shared cache level. */ int8_t cg_flags; /* Traversal modifiers. */ }; From owner-svn-src-head@FreeBSD.ORG Sun May 22 21:35:03 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8F721065670; Sun, 22 May 2011 21:35:03 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93A5E8FC1D; Sun, 22 May 2011 21:35:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MLZ36p091605; Sun, 22 May 2011 21:35:03 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MLZ3oM091603; Sun, 22 May 2011 21:35:03 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105222135.p4MLZ3oM091603@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 May 2011 21:35: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: r222201 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 21:35:03 -0000 Author: attilio Date: Sun May 22 21:35:03 2011 New Revision: 222201 URL: http://svn.freebsd.org/changeset/base/222201 Log: Merge r221912 from largeSMP project branch: Fix a long-standing bug in cpuset_thread0() where only the first part of cs_mask is set full. Submitted by: anonymous MFC after: 1 week Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Sun May 22 21:31:36 2011 (r222200) +++ head/sys/kern/kern_cpuset.c Sun May 22 21:35:03 2011 (r222201) @@ -676,7 +676,7 @@ cpuset_thread0(void) * cpuset_create() due to NULL parent. */ set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO); - set->cs_mask.__bits[0] = -1; + CPU_FILL(&set->cs_mask); LIST_INIT(&set->cs_children); LIST_INSERT_HEAD(&cpuset_ids, set, cs_link); set->cs_ref = 1; From owner-svn-src-head@FreeBSD.ORG Sun May 22 21:57:05 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2101D10656D4; Sun, 22 May 2011 21:57:05 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id CF64C8FC12; Sun, 22 May 2011 21:57:04 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 618975DF8; Sun, 22 May 2011 21:57:03 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id p4MLv2iW004780; Sun, 22 May 2011 21:57:02 GMT (envelope-from phk@critter.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 22 May 2011 13:28:35 MST." <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> Content-Type: text/plain; charset=ISO-8859-1 Date: Sun, 22 May 2011 21:57:02 +0000 Message-ID: <4779.1306101422@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 21:57:05 -0000 In message <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net>, Marcel Moolenaar writes: >Rather than just calling it a bad idea, why not come up with something >constructive? One thing I would like to point out, is that the potential for damage is very different in R/O and R/W mode. I think it would be prefectly justified to refuse a R/W open of a provider if there is credible reason to think that might ruin data. But I have a very hard time seeing the point in preventing a R/O open which would allow people to examine if there is an actual problem. At the most basic level, not creating the slices prevents people from even running "fsck_msdosfs -n /dev/da0s1" to get an idea if things are totally bonkers... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-head@FreeBSD.ORG Sun May 22 22:06:25 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 677B5106564A; Sun, 22 May 2011 22:06:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1AC8FC0C; Sun, 22 May 2011 22:06:25 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MM0M1b094076 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 16:00:25 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110522202256.GA43412@freebsd.org> Date: Sun, 22 May 2011 16:00:22 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <9D5A92B1-7577-44CF-A7EB-E8E334411E6F@bsdimp.com> References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> To: Roman Divacky X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 16:00:25 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:06:25 -0000 On May 22, 2011, at 2:22 PM, Roman Divacky wrote: > The problem here is deeper in my opinion. What FreeBSD calls > amd64 the rest of the world (ie. linux) calls x86_64, I think > that instead of this we should teach llvm/clang about "amd64". > Maybe as a FreeBSD-only diff. >=20 > The machine part of the triple is used in more places and this > hack only is not the complete solution imho. Personally, I think we should be migrating to the more widely accepted = MACHINE_ARCH=3Dx86_64 and leave MACHINE=3Damd64. This would be the = least disruptive, although there is going to be disruption no matter = what we do. Either we mess with old users or we keep fighting this = uphill battle with external software. My fear is that this ship has sailed, and we can't change globally. In = that case, we'll just need to configure the CPU for clang to be x86_64 = and have the s/amd64/x86_64/ thing in the Makefiles to cope. The = architecture was originally called amd64, but the name was changed after = we added support for it :( I'd rather not have a bunch of freebsd-specifc clang hacks if we can = avoid it. Warner > On Sun, May 22, 2011 at 04:32:45PM +0000, Dimitry Andric wrote: >> Author: dim >> Date: Sun May 22 16:32:44 2011 >> New Revision: 222183 >> URL: http://svn.freebsd.org/changeset/base/222183 >>=20 >> Log: >> On amd64, change clang's default triple to = 'x86_64-unknown-freebsd9.0', >> similar to what we do for binutils. When clang's default triple = starts >> with 'amd64-', it does not pass a proper -target-cpu option to its >> first stage. >>=20 >> This can lead to problems, for example when structs are memcpy'd, = and >> clang erroneously assumes they are 16-byte aligned. It will then = use >> the 'movaps' SSE instruction to implement the copy, which results in = a >> bus error if the struct is really 8-byte aligned. >>=20 >> I encountered this issue when gcc's /usr/libexec/cc1 started = crashing >> with SIGBUS, after rebuilding world with clang ToT, but it also = affects >> the version of clang that we have in the tree. We were just lucky = until >> now, apparently. :) >>=20 >> Modified: >> head/lib/clang/clang.build.mk >>=20 >> Modified: head/lib/clang/clang.build.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/clang/clang.build.mk Sun May 22 15:24:56 2011 = (r222182) >> +++ head/lib/clang/clang.build.mk Sun May 22 16:32:44 2011 = (r222183) >> @@ -15,7 +15,7 @@ CFLAGS+=3D -O1 >>=20 >> TARGET_ARCH?=3D ${MACHINE_ARCH} >> # XXX: 8.0, to keep __FreeBSD_cc_version happy >> -CFLAGS+=3D-DLLVM_HOSTTRIPLE=3D\"${TARGET_ARCH}-undermydesk-freebsd9.0\= " >> = +CFLAGS+=3D-DLLVM_HOSTTRIPLE=3D\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-fr= eebsd9.0\" >>=20 >> .ifndef LLVM_REQUIRES_EH >> CXXFLAGS+=3D-fno-exceptions >=20 >=20 From owner-svn-src-head@FreeBSD.ORG Sun May 22 22:06:26 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C8981065673; Sun, 22 May 2011 22:06:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BD97D8FC0A; Sun, 22 May 2011 22:06:25 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MM1wAY094084 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 16:01:58 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110522213058.GB21144@lonesome.com> Date: Sun, 22 May 2011 16:01:58 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <22621AEF-6EF3-4E07-8CBD-57D5037A7DEA@bsdimp.com> References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> <20110522213058.GB21144@lonesome.com> To: Mark Linimon X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 16:01:58 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, Roman Divacky , src-committers@FreeBSD.org, Dimitry Andric , svn-src-all@FreeBSD.org Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:06:26 -0000 On May 22, 2011, at 3:30 PM, Mark Linimon wrote: > On Sun, May 22, 2011 at 10:22:56PM +0200, Roman Divacky wrote: >> The problem here is deeper in my opinion. What FreeBSD calls >> amd64 the rest of the world (ie. linux) calls x86_64, I think >> that instead of this we should teach llvm/clang about "amd64". >> Maybe as a FreeBSD-only diff. >=20 > If we move away from "amd64", we are going to need a _substantial_ = amount > of work on ports. Yea. That's why I think, although I'd like to move away from it, we're = stuck with amd64 for both MACHINE and MACHINE_ARCH for quite some time. = In that case, we'll just have to configure clang the same way we = configure gcc with the x86_64 monicker. Warner From owner-svn-src-head@FreeBSD.ORG Sun May 22 22:14:15 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1F5106566C; Sun, 22 May 2011 22:14:15 +0000 (UTC) (envelope-from benl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BFC68FC1E; Sun, 22 May 2011 22:14:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MMEFU0092853; Sun, 22 May 2011 22:14:15 GMT (envelope-from benl@svn.freebsd.org) Received: (from benl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MMEFf1092851; Sun, 22 May 2011 22:14:15 GMT (envelope-from benl@svn.freebsd.org) Message-Id: <201105222214.p4MMEFf1092851@svn.freebsd.org> From: Ben Laurie Date: Sun, 22 May 2011 22:14: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: r222203 - head/contrib/gcclibs/libiberty X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:14:15 -0000 Author: benl Date: Sun May 22 22:14:15 2011 New Revision: 222203 URL: http://svn.freebsd.org/changeset/base/222203 Log: Fix clang compile warnings. Approved by: philip (mentor) Modified: head/contrib/gcclibs/libiberty/regex.c Modified: head/contrib/gcclibs/libiberty/regex.c ============================================================================== --- head/contrib/gcclibs/libiberty/regex.c Sun May 22 21:46:55 2011 (r222202) +++ head/contrib/gcclibs/libiberty/regex.c Sun May 22 22:14:15 2011 (r222203) @@ -149,7 +149,7 @@ char *realloc (); # include # ifndef bzero # ifndef _LIBC -# define bzero(s, n) (memset (s, '\0', n), (s)) +# define bzero(s, n) ((void) (memset (s, '\0', n), (s))) # else # define bzero(s, n) __bzero (s, n) # endif From owner-svn-src-head@FreeBSD.ORG Sun May 22 22:15:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFA67106564A; Sun, 22 May 2011 22:15:16 +0000 (UTC) (envelope-from benl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 860A68FC21; Sun, 22 May 2011 22:15:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MMFGgQ092930; Sun, 22 May 2011 22:15:16 GMT (envelope-from benl@svn.freebsd.org) Received: (from benl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MMFGjg092926; Sun, 22 May 2011 22:15:16 GMT (envelope-from benl@svn.freebsd.org) Message-Id: <201105222215.p4MMFGjg092926@svn.freebsd.org> From: Ben Laurie Date: Sun, 22 May 2011 22:15: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: r222204 - head/contrib/binutils/binutils X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:15:16 -0000 Author: benl Date: Sun May 22 22:15:16 2011 New Revision: 222204 URL: http://svn.freebsd.org/changeset/base/222204 Log: Fix clang warnings. Approved by: philip (mentor) Modified: head/contrib/binutils/binutils/objcopy.c head/contrib/binutils/binutils/readelf.c head/contrib/binutils/binutils/strings.c Modified: head/contrib/binutils/binutils/objcopy.c ============================================================================== --- head/contrib/binutils/binutils/objcopy.c Sun May 22 22:14:15 2011 (r222203) +++ head/contrib/binutils/binutils/objcopy.c Sun May 22 22:15:16 2011 (r222204) @@ -1542,7 +1542,8 @@ copy_object (bfd *ibfd, bfd *obfd) /* Umm, not sure what to do in this case. */ debuglink_vma = 0x1000; - bfd_set_section_vma (obfd, gnu_debuglink_section, debuglink_vma); + (void) bfd_set_section_vma (obfd, gnu_debuglink_section, + debuglink_vma); } } Modified: head/contrib/binutils/binutils/readelf.c ============================================================================== --- head/contrib/binutils/binutils/readelf.c Sun May 22 22:14:15 2011 (r222203) +++ head/contrib/binutils/binutils/readelf.c Sun May 22 22:15:16 2011 (r222204) @@ -9701,7 +9701,7 @@ process_archive (char *file_name, FILE * } if ((longnames_size & 1) != 0) - getc (file); + (void) getc (file); got = fread (&arhdr, 1, sizeof arhdr, file); if (got != sizeof arhdr) Modified: head/contrib/binutils/binutils/strings.c ============================================================================== --- head/contrib/binutils/binutils/strings.c Sun May 22 22:14:15 2011 (r222203) +++ head/contrib/binutils/binutils/strings.c Sun May 22 22:15:16 2011 (r222204) @@ -593,7 +593,7 @@ print_strings (const char *filename, FIL case 8: #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) if (sizeof (start) > sizeof (long)) - printf ("%7Lo ", (unsigned long long) start); + printf ("%7llo ", (unsigned long long) start); else #else # if !BFD_HOST_64BIT_LONG @@ -608,7 +608,7 @@ print_strings (const char *filename, FIL case 10: #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) if (sizeof (start) > sizeof (long)) - printf ("%7Ld ", (unsigned long long) start); + printf ("%7lld ", (unsigned long long) start); else #else # if !BFD_HOST_64BIT_LONG @@ -623,7 +623,7 @@ print_strings (const char *filename, FIL case 16: #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) if (sizeof (start) > sizeof (long)) - printf ("%7Lx ", (unsigned long long) start); + printf ("%7llx ", (unsigned long long) start); else #else # if !BFD_HOST_64BIT_LONG From owner-svn-src-head@FreeBSD.ORG Sun May 22 22:15:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10F0B1065687; Sun, 22 May 2011 22:15:43 +0000 (UTC) (envelope-from benl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00C6C8FC12; Sun, 22 May 2011 22:15:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MMFgtC092980; Sun, 22 May 2011 22:15:42 GMT (envelope-from benl@svn.freebsd.org) Received: (from benl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MMFgeN092977; Sun, 22 May 2011 22:15:42 GMT (envelope-from benl@svn.freebsd.org) Message-Id: <201105222215.p4MMFgeN092977@svn.freebsd.org> From: Ben Laurie Date: Sun, 22 May 2011 22:15: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: r222205 - head/contrib/binutils/gas X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:15:43 -0000 Author: benl Date: Sun May 22 22:15:42 2011 New Revision: 222205 URL: http://svn.freebsd.org/changeset/base/222205 Log: Fix clang warnings. Approved by: philip (mentor) Modified: head/contrib/binutils/gas/read.h head/contrib/binutils/gas/write.c Modified: head/contrib/binutils/gas/read.h ============================================================================== --- head/contrib/binutils/gas/read.h Sun May 22 22:15:16 2011 (r222204) +++ head/contrib/binutils/gas/read.h Sun May 22 22:15:42 2011 (r222205) @@ -30,7 +30,7 @@ extern char *input_line_pointer; /* -> c #ifdef PERMIT_WHITESPACE #define SKIP_WHITESPACE() \ - ((*input_line_pointer == ' ') ? ++input_line_pointer : 0) + do { if (*input_line_pointer == ' ') ++input_line_pointer; } while (0) #else #define SKIP_WHITESPACE() know(*input_line_pointer != ' ' ) #endif Modified: head/contrib/binutils/gas/write.c ============================================================================== --- head/contrib/binutils/gas/write.c Sun May 22 22:15:16 2011 (r222204) +++ head/contrib/binutils/gas/write.c Sun May 22 22:15:42 2011 (r222205) @@ -345,7 +345,7 @@ record_alignment (/* Segment to which al return; if ((unsigned int) align > bfd_get_section_alignment (stdoutput, seg)) - bfd_set_section_alignment (stdoutput, seg, align); + (void) bfd_set_section_alignment (stdoutput, seg, align); } int @@ -2247,7 +2247,7 @@ relax_segment (struct frag *segment_frag newf = frag_alloc (ob); obstack_blank_fast (ob, fragP->fr_var); - obstack_finish (ob); + (void) obstack_finish (ob); memcpy (newf, fragP, SIZEOF_STRUCT_FRAG); memcpy (newf->fr_literal, fragP->fr_literal + fragP->fr_fix, From owner-svn-src-head@FreeBSD.ORG Sun May 22 22:16:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BCD41065675; Sun, 22 May 2011 22:16:19 +0000 (UTC) (envelope-from benl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCAA8FC08; Sun, 22 May 2011 22:16:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MMGJth093040; Sun, 22 May 2011 22:16:19 GMT (envelope-from benl@svn.freebsd.org) Received: (from benl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MMGJ2J093038; Sun, 22 May 2011 22:16:19 GMT (envelope-from benl@svn.freebsd.org) Message-Id: <201105222216.p4MMGJ2J093038@svn.freebsd.org> From: Ben Laurie Date: Sun, 22 May 2011 22:16: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: r222206 - head/contrib/binutils/ld X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:16:19 -0000 Author: benl Date: Sun May 22 22:16:19 2011 New Revision: 222206 URL: http://svn.freebsd.org/changeset/base/222206 Log: Fix clang warnings. Approved by: philip (mentor) Modified: head/contrib/binutils/ld/ldlang.c Modified: head/contrib/binutils/ld/ldlang.c ============================================================================== --- head/contrib/binutils/ld/ldlang.c Sun May 22 22:15:42 2011 (r222205) +++ head/contrib/binutils/ld/ldlang.c Sun May 22 22:16:19 2011 (r222206) @@ -4274,9 +4274,10 @@ lang_size_sections_1 " section %s\n"), os->name); input = os->children.head->input_section.section; - bfd_set_section_vma (os->bfd_section->owner, - os->bfd_section, - bfd_section_vma (input->owner, input)); + (void) bfd_set_section_vma (os->bfd_section->owner, + os->bfd_section, + bfd_section_vma (input->owner, + input)); os->bfd_section->size = input->size; break; } @@ -4361,7 +4362,7 @@ lang_size_sections_1 os->name, (unsigned long) (newdot - savedot)); } - bfd_set_section_vma (0, os->bfd_section, newdot); + (void) bfd_set_section_vma (0, os->bfd_section, newdot); os->bfd_section->output_offset = 0; } From owner-svn-src-head@FreeBSD.ORG Sun May 22 22:17:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ED2A106566C; Sun, 22 May 2011 22:17:07 +0000 (UTC) (envelope-from benl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14BF98FC1B; Sun, 22 May 2011 22:17:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MMH6MJ093112; Sun, 22 May 2011 22:17:06 GMT (envelope-from benl@svn.freebsd.org) Received: (from benl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MMH67u093105; Sun, 22 May 2011 22:17:06 GMT (envelope-from benl@svn.freebsd.org) Message-Id: <201105222217.p4MMH67u093105@svn.freebsd.org> From: Ben Laurie Date: Sun, 22 May 2011 22:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222207 - head/contrib/gcc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:17:07 -0000 Author: benl Date: Sun May 22 22:17:06 2011 New Revision: 222207 URL: http://svn.freebsd.org/changeset/base/222207 Log: Fix clang warnings. Approved by: philip (mentor) Modified: head/contrib/gcc/combine.c head/contrib/gcc/emit-rtl.c head/contrib/gcc/function.c head/contrib/gcc/omp-low.c head/contrib/gcc/tree-cfg.c head/contrib/gcc/tree-vect-patterns.c Modified: head/contrib/gcc/combine.c ============================================================================== --- head/contrib/gcc/combine.c Sun May 22 22:16:19 2011 (r222206) +++ head/contrib/gcc/combine.c Sun May 22 22:17:06 2011 (r222207) @@ -12442,7 +12442,7 @@ distribute_notes (rtx notes, rtx from_in REG_N_DEATHS (REGNO (XEXP (note, 0)))++; REG_NOTES (place2) = gen_rtx_fmt_ee (GET_CODE (note), - REG_NOTE_KIND (note), + GET_MODE (note), XEXP (note, 0), REG_NOTES (place2)); } Modified: head/contrib/gcc/emit-rtl.c ============================================================================== --- head/contrib/gcc/emit-rtl.c Sun May 22 22:16:19 2011 (r222206) +++ head/contrib/gcc/emit-rtl.c Sun May 22 22:17:06 2011 (r222207) @@ -3210,7 +3210,7 @@ try_split (rtx pat, rtx trial, int last) { if (CALL_P (insn)) REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_NOTE_KIND (note), + = gen_rtx_EXPR_LIST (GET_MODE (note), XEXP (note, 0), REG_NOTES (insn)); insn = PREV_INSN (insn); @@ -3223,7 +3223,7 @@ try_split (rtx pat, rtx trial, int last) { if (JUMP_P (insn)) REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_NOTE_KIND (note), + = gen_rtx_EXPR_LIST (GET_MODE (note), XEXP (note, 0), REG_NOTES (insn)); insn = PREV_INSN (insn); @@ -4589,7 +4589,8 @@ set_unique_reg_note (rtx insn, enum reg_ return note; } - REG_NOTES (insn) = gen_rtx_EXPR_LIST (kind, datum, REG_NOTES (insn)); + REG_NOTES (insn) = gen_rtx_EXPR_LIST ((enum machine_mode) kind, datum, + REG_NOTES (insn)); return REG_NOTES (insn); } @@ -5344,12 +5345,12 @@ emit_copy_of_insn_after (rtx insn, rtx a { if (GET_CODE (link) == EXPR_LIST) REG_NOTES (new) - = copy_insn_1 (gen_rtx_EXPR_LIST (REG_NOTE_KIND (link), + = copy_insn_1 (gen_rtx_EXPR_LIST (GET_MODE (link), XEXP (link, 0), REG_NOTES (new))); else REG_NOTES (new) - = copy_insn_1 (gen_rtx_INSN_LIST (REG_NOTE_KIND (link), + = copy_insn_1 (gen_rtx_INSN_LIST (GET_MODE (link), XEXP (link, 0), REG_NOTES (new))); } Modified: head/contrib/gcc/function.c ============================================================================== --- head/contrib/gcc/function.c Sun May 22 22:16:19 2011 (r222206) +++ head/contrib/gcc/function.c Sun May 22 22:17:06 2011 (r222207) @@ -4008,22 +4008,19 @@ stack_protect_epilogue (void) /* Allow the target to compare Y with X without leaking either into a register. */ - switch (HAVE_stack_protect_test != 0) + if (HAVE_stack_protect_test != 0) { - case 1: tmp = gen_stack_protect_test (x, y, label); if (tmp) { emit_insn (tmp); - break; + goto done; } - /* FALLTHRU */ - - default: - emit_cmp_and_jump_insns (x, y, EQ, NULL_RTX, ptr_mode, 1, label); - break; } + emit_cmp_and_jump_insns (x, y, EQ, NULL_RTX, ptr_mode, 1, label); + done: + /* The noreturn predictor has been moved to the tree level. The rtl-level predictors estimate this branch about 20%, which isn't enough to get things moved out of line. Since this is the only extant case of adding Modified: head/contrib/gcc/omp-low.c ============================================================================== --- head/contrib/gcc/omp-low.c Sun May 22 22:16:19 2011 (r222206) +++ head/contrib/gcc/omp-low.c Sun May 22 22:17:06 2011 (r222207) @@ -118,7 +118,7 @@ static tree maybe_lookup_decl_in_outer_c /* Find an OpenMP clause of type KIND within CLAUSES. */ static tree -find_omp_clause (tree clauses, enum tree_code kind) +find_omp_clause (tree clauses, enum omp_clause_code kind) { for (; clauses ; clauses = OMP_CLAUSE_CHAIN (clauses)) if (OMP_CLAUSE_CODE (clauses) == kind) Modified: head/contrib/gcc/tree-cfg.c ============================================================================== --- head/contrib/gcc/tree-cfg.c Sun May 22 22:16:19 2011 (r222206) +++ head/contrib/gcc/tree-cfg.c Sun May 22 22:17:06 2011 (r222207) @@ -2854,7 +2854,7 @@ bsi_insert_before (block_stmt_iterator * { set_bb_for_stmt (t, i->bb); update_modified_stmts (t); - tsi_link_before (&i->tsi, t, m); + tsi_link_before (&i->tsi, t, (enum tsi_iterator_update) m); } @@ -2867,7 +2867,7 @@ bsi_insert_after (block_stmt_iterator *i { set_bb_for_stmt (t, i->bb); update_modified_stmts (t); - tsi_link_after (&i->tsi, t, m); + tsi_link_after (&i->tsi, t, (enum tsi_iterator_update) m); } Modified: head/contrib/gcc/tree-vect-patterns.c ============================================================================== --- head/contrib/gcc/tree-vect-patterns.c Sun May 22 22:16:19 2011 (r222206) +++ head/contrib/gcc/tree-vect-patterns.c Sun May 22 22:17:06 2011 (r222207) @@ -487,7 +487,7 @@ vect_pattern_recog_1 ( } else { - enum tree_code vec_mode; + enum machine_mode vec_mode; enum insn_code icode; optab optab; From owner-svn-src-head@FreeBSD.ORG Mon May 23 02:35:10 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7637B106564A; Mon, 23 May 2011 02:35:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3CC268FC0C; Mon, 23 May 2011 02:35:10 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4N2TAZO095445 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 20:29:13 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> Date: Sun, 22 May 2011 20:29:10 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <42C49AE5-C8EA-44A0-AF88-16130BACE912@bsdimp.com> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 20:29:13 -0600 (MDT) Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 02:35:10 -0000 On May 22, 2011, at 2:28 PM, Marcel Moolenaar wrote: >=20 > On May 22, 2011, at 9:26 AM, Warner Losh wrote: >=20 >>=20 >> On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: >>=20 >>> This also bit me on embedded platform stuff. >>>=20 >>> Is it possible to disable this by default for now and have it just = warn loudly? >>> And/or hide the default value behind a kernel configuration variable >>> so we can disable it >>> (but still get the warnings) for now? >>=20 >> Or just delete it entirely as a bad idea? We had this with Marcel's = warning for a long time that turned out to be utterly bogus so we = removed it. >=20 > Really? >=20 > The warning wasn't bogus. It was there to help us understand what was > going on and we found over time that it was a harmless condition. > That's why we removed the warning. The warning was good to raise > awareness. Except from the moment it went in we knew that the problem it was = reporting was often due to the artificial geometries used throughout the = system. That was the root cause of that problem: the firmware reported = fake geometry and the MBR described a different geometry. The rest of = the world ignored the firmware reported geometry and used what was = described in the MBR. > This is in no way similar to what we have now. Here we have to deal = with > broken and fundamentally invalid MBRs that has caused us harm before = and > we're trying to do something sensible. As it turns out, a whole bunch = of > people have invalid MBRs, probably caused by crappy tools. Now what do > you suggest we should do? Accept it silently and suffer the = consequences > later, should we raise awareness so that administrators can try and = fix > things or should we reject the MBR out of pedanticism? >=20 > Rather than just calling it a bad idea, why not come up with something > constructive? Looking at one of my flash drives that shows the problem: da0: 15423MB (31588351 512 byte sectors: 255H 63S/T 1966C) GEOM_PART: partition 1 has end offset beyond last LBA: 31588350 > = 31588325 So why does gpart think the last LBA is 25 less than it really is. = Well, let's do some sanity checks first. fdisk -s da0 tells us: /dev/da0: 1966 cyl 255 hd 63 sec Part Start Size Type Flags 1: 63 31588288 0x0b 0x00 which puts the ending sector at 31588350, which should be fine. = Diskinfo reports the correct info: sudo diskinfo da0 da0 512 16173235712 31588351 0 0 1966 = 255 63 I'm pretty sure this problem is due to a bug in g_part_mbr.c: basetable->gpt_last =3D msize - (msize % basetable->gpt_sectors) = - 1; This is wrong, or at least it is a widely disregarded part of what makes = up an MBR. When I correct the size, the geom code is fine. There's no = requirement in MBR that a partition end of any particular boundary, = although sometimes you'll find mistaken documentation that suggests this = is the case. Reading between the lines at = http://www.boot-us.com/gloss03.htm suggests that this restriction was = only for disks < 8GB in size (from the fact it said that all the = partitions can be described with the CHS fields). This is one of the = things I learned when I tried to make fdisk enforce that: this isn't a = requirement of MBR as it is implemented in the wild today. Replacing the above with: basetable->gpt_last =3D msize - 1; seems to fix the problem. I'm unsure if this should be unconditional, = or just for disks that are larger than 8GB in size. Given that my thumb = drive that triggers the bogus behavior is 16GB in size, I don't know for = sure. I have one or two 2GB drives that didn't trigger the problem. = They work either way. Please note: this is with a USB drive that I've not repartitioned since = I brought it home. So this isn't a tool issue. This is likely why 6/7 = of phk's USB thumb drives have failed. So please, let's change the code. A similar change is necessary when = creating the MBR as well, at least for media that's 8GB or larger. I'll admit that I was wrong about WHERE the bogusity was (I thought it = was the checks). I was right that it was a bogisty in the FreeBSD code, = and nothing wrong with my media. MacOS, Linux and Windows handle it = correctly, which strongly suggests there's a bug in FreeBSD's MBR = handling. Warner= From owner-svn-src-head@FreeBSD.ORG Mon May 23 06:29:36 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37C37106564A; Mon, 23 May 2011 06:29:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mgat.kirov.so-cdu.ru (mgat.kirov.so-cdu.ru [77.72.136.147]) by mx1.freebsd.org (Postfix) with ESMTP id 985188FC0A; Mon, 23 May 2011 06:29:34 +0000 (UTC) Received: from kirov.so-cdu.ru ([172.21.81.1]RDNS failed) by mgat.kirov.so-cdu.ru with InterScan Message Security Suite; Mon, 23 May 2011 09:29:13 +0400 Received: by ns.kirov.so-cdu.ru (Postfix, from userid 1010) id 03549B83DB; Mon, 23 May 2011 09:29:12 +0400 (MSD) Received: from [10.118.3.52] (elsukov.kirov.oduur.so [10.118.3.52]) by ns.kirov.so-cdu.ru (Postfix) with ESMTP id C021FB83D4; Mon, 23 May 2011 09:29:11 +0400 (MSD) Message-ID: <4DD9F0A3.701@FreeBSD.org> Date: Mon, 23 May 2011 09:29:07 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Warner Losh References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> <42C49AE5-C8EA-44A0-AF88-16130BACE912@bsdimp.com> In-Reply-To: <42C49AE5-C8EA-44A0-AF88-16130BACE912@bsdimp.com> X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig36620514AC8740AB558698E3" Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , Stefan Farfeleder , svn-src-head@FreeBSD.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 06:29:36 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig36620514AC8740AB558698E3 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 23.05.2011 6:29, Warner Losh wrote: > Looking at one of my flash drives that shows the problem: >=20 > da0: 15423MB (31588351 512 byte sectors: 255H 63S/T 1966C) GEOM_PART: p= artition 1 has end offset > beyond last LBA: 31588350 > 31588325 >=20 > So why does gpart think the last LBA is 25 less than it really is. Wel= l, let's do some sanity > checks first. fdisk -s da0 tells us: > I'm pretty sure this problem is due to a bug in g_part_mbr.c: >=20 > basetable->gpt_last =3D msize - (msize % basetable->gpt_sectors) - 1; >=20 > This is wrong, or at least it is a widely disregarded part of what make= s up an MBR. When I > correct the size, the geom code is fine. There's no requirement in MBR= that a partition end of > any particular boundary, although sometimes you'll find mistaken docume= ntation that suggests this > is the case. Reading between the lines at http://www.boot-us.com/gloss= 03.htm suggests that this > restriction was only for disks < 8GB in size (from the fact it said tha= t all the partitions can > be described with the CHS fields). This is one of the things I learned= when I tried to make > fdisk enforce that: this isn't a requirement of MBR as it is implemente= d in the wild today. There is another opinion: http://www.boot-us.com/gloss02.htm "There is the convention that partitions should always start and end on *= cylinder boundaries*." but "Linux and Windows NT/2000/XP/2003/Vista/2008/7 seem to have no problems = when partitions do not start or end on cylinder boundaries. However other operating systems (e.g= =2E DOS) expect that this convention is obeyed." What way will we choose? I prefer to: leave the choice to the user how partition should be aligned= , and remove automatic alignment to track boundaries from MBR (and probably from all other schem= es). --=20 WBR, Andrey V. Elsukov --=20 WBR, Andrey V. Elsukov --------------enig36620514AC8740AB558698E3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJN2fCnAAoJEAHF6gQQyKF6vj4IAK9k37OApJ5Ml+Rxlq8TFBvR 2U4WEwYn0gUwyAlgaeC0bwbD5YN/H1l94PiU5EUUQFQ/7bdPMrIMqnuOTVjNPuh2 5Od8TRBvUbGI1XeEV2NH++0rUFGMp+pht6ZT3QCv3Btvs0PfDx6Jp+wycIGyCQ7f Qt6dQAzMi6Iuu1Cx9+Cckjao94aJ9WSckhr/RAMJMZ+iubyjYL7pGdb15Xq4xoDZ FnXPHd2cD1VyiY+Hing025q/AwRDgpkcXnLXLgshkeWv2QHEWf2UUkHkp15JH4jz b6FVDc74aA5IFqQBQ+hSaxjNzSgHUcRSxzHkGd+bDreDwPcP3xPHvJHxbGsGhiI= =V3re -----END PGP SIGNATURE----- --------------enig36620514AC8740AB558698E3-- From owner-svn-src-head@FreeBSD.ORG Mon May 23 06:56:33 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 933C3106564A; Mon, 23 May 2011 06:56:33 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 4BCDF8FC08; Mon, 23 May 2011 06:56:32 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id EDA005DC2; Mon, 23 May 2011 06:56:31 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id p4N6uUgA011295; Mon, 23 May 2011 06:56:30 GMT (envelope-from phk@critter.freebsd.dk) To: "Andrey V. Elsukov" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 23 May 2011 09:29:07 +0400." <4DD9F0A3.701@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Date: Mon, 23 May 2011 06:56:30 +0000 Message-ID: <11294.1306133790@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , Stefan Farfeleder , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 06:56:33 -0000 In message <4DD9F0A3.701@FreeBSD.org>, "Andrey V. Elsukov" writes: >There is another opinion: >http://www.boot-us.com/gloss02.htm > >"There is the convention that partitions should always start and end on *= >cylinder boundaries*." It is actually more weird than that: The rule is that the starting or ending head of one of the four slices represent the number of heads used to access the drive, and ditto for sectors. This "requirement" dates back to "smart" BIOS'es and ST-506 drives which couldn't ask the drive for its geometry. It has been revived a couple of times, when people got creative around the various silly sizes, most notably the 524MB "limit". -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-head@FreeBSD.ORG Mon May 23 08:00:33 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1448106567B; Mon, 23 May 2011 08:00:33 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 745898FC1F; Mon, 23 May 2011 08:00:33 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p4N80U7I033302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 May 2011 10:00:32 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1306137632; bh=CZAGJeRE7sIZJ/0o3p3ZvptjNf3yuvgSgCcXtIVBddQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=UTSOCHjOw5ZNYnxN4sWC662l92jXBB1mk1BLyqT3DeTp+LaAjsG8vuq6NgEJVMw+f 9X5zNECT5ecs7HBYhvw2aUMVR4FMc7FQWDzhWXWQQCSNKqbg74KFxRenb4ar3ZfSgB u/m7CJZPcOXysi2bheisguGsKFt96o6Ft8clFiKI= Date: Mon, 23 May 2011 10:00:30 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Edwin Groothuis Message-ID: <20110523080030.GU31223@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Edwin Groothuis , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201105191309.p4JD9dXY038734@svn.freebsd.org> <20110522092937.GS31223@acme.spoerlein.net> <3AA8EEBF-4C35-41A3-9516-09044CADAD0C@mavetju.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3AA8EEBF-4C35-41A3-9516-09044CADAD0C@mavetju.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222094 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 08:00:34 -0000 On Sun, 22.05.2011 at 20:16:47 +1000, Edwin Groothuis wrote: > > On 22/05/2011, at 7:29 PM, Ulrich Spörlein wrote: > > > On Thu, 19.05.2011 at 13:09:39 +0000, Edwin Groothuis wrote: > >> Author: edwin > >> Date: Thu May 19 13:09:39 2011 > >> New Revision: 222094 > >> URL: http://svn.freebsd.org/changeset/base/222094 > >> > >> Log: > >> Put AN back after finding out that tzsetup(1) will complain that > >> it doesn't exist. It will be removed again once the tzdata distribution > >> files have been updated with the replacements for AN. > > > > Wouldn't it be better to have tzsetup use iso3166.tab from the tzdata > > distribution, which is mostly guaranteed to be in sync with zone.tab? > > > Which opens a different can of worms. > Duplicate file, with semi-similar contents. > > Whenever there are changes in the distribution of the tzdata iso3166.tab equivalent file, I check if they are in the /usr/share/misc equivalent file. > A warning to that file should be added that tzsetup uses it and that they always should check tzsetup functionality before commiting it. This seems way too brittle, as can be seen by random people going in and updating our iso3166 file. I'd rather take a tiny duplication of files than manual fixups needed to unbreak installing. AFAICS only tzsetup and sysinstall depend on /usr/share/misc/iso3166, if we change tzsetup to use the iso list from tzdata and since sysinstall is on the chopping block we could then simply remove our iso3166 list. And as for duplicated files, have you looked at regdomain.xml and ieee80211_regdomain.h? Just saying ... Uli From owner-svn-src-head@FreeBSD.ORG Mon May 23 08:52:14 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70A06106564A; Mon, 23 May 2011 08:52:14 +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 1F9988FC13; Mon, 23 May 2011 08:52:12 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA07608; Mon, 23 May 2011 11:52:11 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QOQrz-0003OY-HI; Mon, 23 May 2011 11:52:11 +0300 Message-ID: <4DDA203A.7080802@FreeBSD.org> Date: Mon, 23 May 2011 11:52:10 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Jung-uk Kim References: <201105101644.p4AGiHO1052105@svn.freebsd.org> In-Reply-To: <201105101644.p4AGiHO1052105@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221743 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 08:52:14 -0000 on 10/05/2011 19:44 Jung-uk Kim said the following: > Author: jkim > Date: Tue May 10 16:44:16 2011 > New Revision: 221743 > URL: http://svn.freebsd.org/changeset/base/221743 > > Log: > Add SC_PIXEL_MODE to GENERIC for amd64 and i386. > > Requested by: many What about options VESA ? > Modified: > head/sys/amd64/conf/GENERIC > head/sys/i386/conf/GENERIC -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Mon May 23 09:02:44 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0380106564A; Mon, 23 May 2011 09:02:44 +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 CFEED8FC14; Mon, 23 May 2011 09:02:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4N92iHt012890; Mon, 23 May 2011 09:02:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4N92iH8012884; Mon, 23 May 2011 09:02:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105230902.p4N92iH8012884@svn.freebsd.org> From: Xin LI Date: Mon, 23 May 2011 09:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222210 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 09:02:45 -0000 Author: delphij Date: Mon May 23 09:02:44 2011 New Revision: 222210 URL: http://svn.freebsd.org/changeset/base/222210 Log: Diff reduction against NetBSD. The most notable change is to zdiff(1) to handle more file formats including bzip2 and xz. MFC after: 2 weeks Modified: head/usr.bin/gzip/Makefile head/usr.bin/gzip/gzip.c head/usr.bin/gzip/zdiff head/usr.bin/gzip/zdiff.1 head/usr.bin/gzip/zuncompress.c Modified: head/usr.bin/gzip/Makefile ============================================================================== --- head/usr.bin/gzip/Makefile Mon May 23 01:17:30 2011 (r222209) +++ head/usr.bin/gzip/Makefile Mon May 23 09:02:44 2011 (r222210) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2006/05/12 02:01:15 mrg Exp $ +# $NetBSD: Makefile,v 1.13 2009/04/14 22:15:20 lukem Exp $ # $FreeBSD$ .include Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Mon May 23 01:17:30 2011 (r222209) +++ head/usr.bin/gzip/gzip.c Mon May 23 09:02:44 2011 (r222210) @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.97 2009/10/11 09:17:21 mrg Exp $ */ +/* $NetBSD: gzip.c,v 1.99 2011/03/23 12:59:44 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -31,7 +31,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ Matthew R. Green. All rights reserved."); -__RCSID("$FreeBSD$"); +__FBSDID("$FreeBSD$"); #endif /* not lint */ /* @@ -146,7 +146,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "FreeBSD gzip 20100407"; +static const char gzip_version[] = "FreeBSD gzip 20110523"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -314,7 +314,7 @@ main(int argc, char **argv) dflag = cflag = 1; #ifdef SMALL -#define OPT_LIST "123456789cdhltV" +#define OPT_LIST "123456789cdhlV" #else #define OPT_LIST "123456789acdfhklLNnqrS:tVv" #endif @@ -918,6 +918,7 @@ gz_uncompress(int in, int out, char *pre case Z_BUF_ERROR: if (z.avail_out > 0 && !done_reading) continue; + case Z_STREAM_END: case Z_OK: break; Modified: head/usr.bin/gzip/zdiff ============================================================================== --- head/usr.bin/gzip/zdiff Mon May 23 01:17:30 2011 (r222209) +++ head/usr.bin/gzip/zdiff Mon May 23 09:02:44 2011 (r222210) @@ -1,10 +1,12 @@ #!/bin/sh - # -# $NetBSD: zdiff,v 1.3 2004/03/29 10:01:00 wiz Exp $ +# $NetBSD: zdiff,v 1.5 2010/04/14 20:30:28 joerg Exp $ +# # $OpenBSD: zdiff,v 1.2 2003/07/29 07:42:44 otto Exp $ # #- # Copyright (c) 2003 Todd C. Miller +# Copyright (c) 2010 Joerg Sonnenberger # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -31,7 +33,57 @@ case $0 in *) prog=diff ;; esac -USAGE="usage: z$prog [options] file1 [file2]" +USAGE="usage: $0 [options] file1 [file2]" + +check_suffix() { + case "$1" in + *[._-][Zz]) + setvar $2 "${1%??}" + setvar $3 "gzip -cdqf" + ;; + *[._-]bz) + setvar $2 "${1%???}" + setvar $3 "bzip2 -cdqf" + ;; + *[._-]gz) + setvar $2 "${1%???}" + setvar $3 "gzip -cdqf" + ;; + *[._-]xz) + setvar $2 "${1%???}" + setvar $3 "xz -cdqf" + ;; + *[._-]bz2) + setvar $2 "${1%????}" + setvar $3 "bzip2 -cdqf" + ;; + *[._-]lzma) + setvar $2 "${1%?????}" + setvar $3 "xz -cdqf" + ;; + *.t[ag]z) + setvar $2 "${1%??}"ar + setvar $3 "gzip -cdqf" + ;; + *.tbz) + setvar $2 "${1%??}"ar + setvar $3 "bzip2 -cdqf" + ;; + *.tbz2) + setvar $2 "${1%???}"ar + setvar $3 "bzip2 -cdqf" + ;; + *.t[lx]z) + setvar $2 "${1%??}"ar + setvar $3 "xz -cdqf" + ;; + *) + setvar $2 "$1" + setvar $3 "" + ;; + esac +} + # Pull out any command line flags so we can pass them to diff/cmp # XXX - assumes there is no optarg @@ -42,6 +94,9 @@ while test $# -ne 0; do shift break ;; + -) + break + ;; -*) flags="$flags $1" shift @@ -55,52 +110,28 @@ done if [ $# -eq 1 ]; then # One file given, compare compressed to uncompressed files="$1" - case "$1" in - *[._-][Zz]) - files="${1%??}" - ;; - *[._-]gz) - files="${1%???}" - ;; - *.t[ag]z) - files="${1%??}"ar - ;; - *) echo "z$prog: unknown suffix" 1>&2 - exit 1 - esac - gzip -cdfq "$1" | $prog $flags - "$files" + check_suffix "$1" files filt + if [ -z "$filt" ]; then + echo "z$prog: unknown suffix" 1>&2 + exit 1 + fi + $filt -- "$1" | $prog $flags -- - "$files" status=$? elif [ $# -eq 2 ]; then # Two files given, compare the two uncompressing as needed - case "$1" in - *[._-][Zz]|*[._-]gz|*.t[ag]z) - files=- - filt="gzip -cdfq $1" - ;; - *) - files="$1" - ;; - esac - case "$2" in - *[._-][Zz]|*[._-]gz|*.t[ag]z) - if [ "$files" = "-" ]; then - tmp=`mktemp -t z$prog.XXXXXXXXXX` || exit 1 - trap "rm -f $tmp" 0 1 2 3 13 15 - gzip -cdfq "$2" > $tmp - files="$files $tmp" - else - files="$files -" - filt="gzip -cdfq $2" - fi - ;; - *) - files="$files $2" - ;; - esac - if [ -n "$filt" ]; then - $filt | $prog $flags $files + check_suffix "$1" files filt + check_suffix "$2" files2 filt2 + if [ -z "$filt" -a -z "$filt2" ]; then + $prog $flags -- "$1" "$2" + elif [ -z "$filt" -a -n "$filt2" -a "$1" != "-" ]; then + $filt2 -- "$2" | $prog $flags -- "$1" - + elif [ -n "$filt" -a -z "$filt2" -a "$2" != "-" ]; then + $filt -- "$1" | $prog $flags -- - "$2" else - $prog $flags $files + tmp=`mktemp -t z$prog.XXXXXXXXXX` || exit 1 + trap "rm -f $tmp" 0 1 2 3 13 15 + ${filt2:-cat} -- "$2" > $tmp || exit $? + ${filt:-cat} -- "$1" | $prog $flags -- - "$tmp" fi status=$? else Modified: head/usr.bin/gzip/zdiff.1 ============================================================================== --- head/usr.bin/gzip/zdiff.1 Mon May 23 01:17:30 2011 (r222209) +++ head/usr.bin/gzip/zdiff.1 Mon May 23 09:02:44 2011 (r222210) @@ -1,7 +1,8 @@ -.\" $NetBSD: zdiff.1,v 1.3 2003/12/28 12:48:03 wiz Exp $ +.\" $NetBSD: zdiff.1,v 1.5 2010/04/14 19:52:05 wiz Exp $ .\" $OpenBSD: zdiff.1,v 1.2 2003/07/13 17:39:14 millert Exp $ .\" .\" Copyright (c) 2003 Todd C. Miller +.\" Copyright (c) 2010 Joerg Sonnenberger .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -20,7 +21,7 @@ .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" .\" $FreeBSD$ -.Dd January 26, 2007 +.Dd May 23, 2011 .Dt ZDIFF 1 .Os .Sh NAME @@ -45,15 +46,6 @@ are filters that invoke or .Xr diff 1 respectively to compare compressed files. -Such files generally have a -.Dq Z -or -.Dq gz -extension (both the -.Xr compress 1 -and -.Xr gzip 1 -formats are supported). Any .Ar options that are specified are passed to @@ -70,6 +62,45 @@ When both or .Ar file2 are specified, either file may be compressed. +.Pp +Extensions handled by +.Xr gzip 1 : +.Bl -bullet -compact +.It +z, Z, +.It +gz, +.It +taz, +.It +tgz. +.El +.Pp +Extensions handled by +.Xr bzip2 1 : +.Bl -bullet -compact +.It +bz, +.It +bz2, +.It +tbz, +.It +tbz2. +.El +.Pp +Extensions handled by +.Xr xz 1 : +.Bl -bullet -compact +.It +lzma, +.It +xz, +.It +tlz, +.It +txz. +.El .Sh ENVIRONMENT .Bl -tag -width "TMPDIR" .It Ev TMPDIR @@ -88,9 +119,11 @@ Temporary file for .Nm zdiff . .El .Sh SEE ALSO +.Xr bzip2 1 , .Xr cmp 1 , -.Xr compress 1 , -.Xr diff 1 +.Xr diff 1 , +.Xr gzip 1 , +.Xr xz 1 .Sh CAVEATS .Nm zcmp and Modified: head/usr.bin/gzip/zuncompress.c ============================================================================== --- head/usr.bin/gzip/zuncompress.c Mon May 23 01:17:30 2011 (r222209) +++ head/usr.bin/gzip/zuncompress.c Mon May 23 09:02:44 2011 (r222210) @@ -1,4 +1,4 @@ -/* $NetBSD: zuncompress.c,v 1.7 2009/04/12 10:31:14 lukem Exp $ */ +/* $NetBSD: zuncompress.c,v 1.8 2010/11/06 21:42:32 mrg Exp $ */ /*- * Copyright (c) 1985, 1986, 1992, 1993 From owner-svn-src-head@FreeBSD.ORG Mon May 23 09:40:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAE961065677; Mon, 23 May 2011 09:40:21 +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 BB6E08FC0A; Mon, 23 May 2011 09:40:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4N9eL3e014010; Mon, 23 May 2011 09:40:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4N9eLQ1014007; Mon, 23 May 2011 09:40:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105230940.p4N9eLQ1014007@svn.freebsd.org> From: Xin LI Date: Mon, 23 May 2011 09:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222211 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 09:40:21 -0000 Author: delphij Date: Mon May 23 09:40:21 2011 New Revision: 222211 URL: http://svn.freebsd.org/changeset/base/222211 Log: Match symbolic link handling behavior with GNU gzip, bzip2 and xz: When we are operating on a symbolic link pointing to an existing file, bail out by default, but go ahead if -f is specified. Submitted by: arundel MFC after: 2 weeks Modified: head/usr.bin/gzip/gzip.1 head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/gzip.1 ============================================================================== --- head/usr.bin/gzip/gzip.1 Mon May 23 09:02:44 2011 (r222210) +++ head/usr.bin/gzip/gzip.1 Mon May 23 09:40:21 2011 (r222211) @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 27, 2010 +.Dd May 23, 2011 .Dt GZIP 1 .Os .Sh NAME @@ -127,9 +127,9 @@ stream, leaving files intact. This option selects decompression rather than compression. .It Fl f , -force This option turns on force mode. -This allows files with multiple links, overwriting of pre-existing -files, reading from or writing to a terminal, and when combined -with the +This allows files with multiple links, symbolic links to regular files, +overwriting of pre-existing files, reading from or writing to a terminal, +and when combined with the .Fl c option, allowing non-compressed data to pass through unchanged. .It Fl h , -help Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Mon May 23 09:02:44 2011 (r222210) +++ head/usr.bin/gzip/gzip.c Mon May 23 09:40:21 2011 (r222211) @@ -1782,7 +1782,7 @@ handle_pathname(char *path) } retry: - if (stat(path, &sb) != 0) { + if (stat(path, &sb) != 0 || (fflag == 0 && lstat(path, &sb) != 0)) { /* lets try .gz if we're decompressing */ if (dflag && s == NULL && errno == ENOENT) { len = strlen(path); From owner-svn-src-head@FreeBSD.ORG Mon May 23 11:28:25 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 710681065672; Mon, 23 May 2011 11:28:25 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail4out.barnet.com.au (mail4out.barnet.com.au [202.83.178.123]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD838FC0A; Mon, 23 May 2011 11:28:25 +0000 (UTC) Received: by mail4out.barnet.com.au (Postfix, from userid 1001) id 852B337BF9D; Mon, 23 May 2011 21:28:23 +1000 (EST) X-Viruscan-Id: <4DDA44D70000610CE671B6@BarNet> Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.barnet.com.au", Issuer "Equifax" (verified OK)) by mail4.barnet.com.au (Postfix) with ESMTPS id 13EC742206C; Mon, 23 May 2011 21:28:23 +1000 (EST) Received: from [10.204.250.208] (ppp121-45-190-113.lns6.syd7.internode.on.net [121.45.190.113]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by mail4auth.barnet.com.au (Postfix) with ESMTPSA id 6CC0937BF8C; Mon, 23 May 2011 21:28:22 +1000 (EST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Edwin Groothuis In-Reply-To: <20110523080030.GU31223@acme.spoerlein.net> Date: Mon, 23 May 2011 21:28:20 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: <2A9B48C0-9849-4D11-99C1-2572E61EEED6@mavetju.org> References: <201105191309.p4JD9dXY038734@svn.freebsd.org> <20110522092937.GS31223@acme.spoerlein.net> <3AA8EEBF-4C35-41A3-9516-09044CADAD0C@mavetju.org> <20110523080030.GU31223@acme.spoerlein.net> To: =?iso-8859-1?Q?Ulrich_Sp=F6rlein?= X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222094 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 11:28:25 -0000 On 23/05/2011, at 6:00 PM, Ulrich Sp=F6rlein wrote: > On Sun, 22.05.2011 at 20:16:47 +1000, Edwin Groothuis wrote: >>=20 >> On 22/05/2011, at 7:29 PM, Ulrich Sp=F6rlein wrote: >>=20 >>> On Thu, 19.05.2011 at 13:09:39 +0000, Edwin Groothuis wrote: >>>> Author: edwin >>>> Date: Thu May 19 13:09:39 2011 >>>> New Revision: 222094 >>>> URL: http://svn.freebsd.org/changeset/base/222094 >>>>=20 >>>> Log: >>>> Put AN back after finding out that tzsetup(1) will complain that >>>> it doesn't exist. It will be removed again once the tzdata = distribution >>>> files have been updated with the replacements for AN. >>>=20 >>> Wouldn't it be better to have tzsetup use iso3166.tab from the = tzdata >>> distribution, which is mostly guaranteed to be in sync with = zone.tab? >>=20 >>=20 >> Which opens a different can of worms. >> Duplicate file, with semi-similar contents. >>=20 >> Whenever there are changes in the distribution of the tzdata = iso3166.tab equivalent file, I check if they are in the /usr/share/misc = equivalent file. >> A warning to that file should be added that tzsetup uses it and that = they always should check tzsetup functionality before commiting it. >=20 > This seems way too brittle, as can be seen by random people going in = and > updating our iso3166 file. I'd rather take a tiny duplication of files > than manual fixups needed to unbreak installing. >=20 > AFAICS only tzsetup and sysinstall depend on /usr/share/misc/iso3166, That are only the tools in the base system that you know about. It has been part of the base system long enough that people think they = can rely on it. Some of my tools do, for sure. Edwin= From owner-svn-src-head@FreeBSD.ORG Mon May 23 12:05:17 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29360106564A; Mon, 23 May 2011 12:05:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id D4B898FC13; Mon, 23 May 2011 12:05:16 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id ECCF625D3A5A; Mon, 23 May 2011 12:05:15 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E8B9F15A017D; Mon, 23 May 2011 12:05:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id tgh7i71HDqtF; Mon, 23 May 2011 12:05:13 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A3A0A15A015F; Mon, 23 May 2011 12:05:13 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <22621AEF-6EF3-4E07-8CBD-57D5037A7DEA@bsdimp.com> Date: Mon, 23 May 2011 12:05:12 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> <20110522213058.GB21144@lonesome.com> <22621AEF-6EF3-4E07-8CBD-57D5037A7DEA@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 12:05:17 -0000 On May 22, 2011, at 10:01 PM, Warner Losh wrote: >=20 > On May 22, 2011, at 3:30 PM, Mark Linimon wrote: >=20 >> On Sun, May 22, 2011 at 10:22:56PM +0200, Roman Divacky wrote: >>> The problem here is deeper in my opinion. What FreeBSD calls >>> amd64 the rest of the world (ie. linux) calls x86_64, I think >>> that instead of this we should teach llvm/clang about "amd64". >>> Maybe as a FreeBSD-only diff. >>=20 >> If we move away from "amd64", we are going to need a _substantial_ = amount >> of work on ports. >=20 > Yea. That's why I think, although I'd like to move away from it, = we're stuck with amd64 for both MACHINE and MACHINE_ARCH for quite some = time. In that case, we'll just have to configure clang the same way we = configure gcc with the x86_64 monicker. Is there an authoritative source for these names? I am not quite sure what led to the confusion in first place but I guess it's the "oh Intel is doing EMT64 let's not call this amd" kind of thing. I seem to remember that apart from the linux kernel and OSX most others incl. windows, java and sun used to call it amd64 as well when it came = to technical things. So I am not exactly sure why this regularly comes up but I'd assume it's because of "what linux calls it must be right"? I admit that it's confusing to got to x86-64.org and see it called the amd64 architecture. I am sure Peter and David know a lot more about = this. Despite remembering Dragonfly having done the change I cannot see = FreeBSD doing the same in a short timeframe, and yet I have no idea why we = wanted to? /bz The color shall be red. --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Mon May 23 12:55:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3CDC106567E for ; Mon, 23 May 2011 12:55:14 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.freebsd.org (Postfix) with SMTP id 908118FC22 for ; Mon, 23 May 2011 12:55:13 +0000 (UTC) Received: (qmail 14466 invoked from network); 23 May 2011 12:28:30 -0000 Received: from unknown (HELO alex.andxor.it) (192.168.2.30) by andxor.it with SMTP; 23 May 2011 12:28:30 -0000 Message-ID: <4DDA52EE.4070309@FreeBSD.org> Date: Mon, 23 May 2011 14:28:30 +0200 From: Alex Dupre User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; it; rv:1.9.1.19) Gecko/20110509 SeaMonkey/2.0.14 MIME-Version: 1.0 To: Mark Linimon References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> <20110522213058.GB21144@lonesome.com> In-Reply-To: <20110522213058.GB21144@lonesome.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Roman Divacky , src-committers@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 12:55:14 -0000 Mark Linimon ha scritto: > If we move away from "amd64", we are going to need a _substantial_ amount > of work on ports. Yup, as we constantly need to patch ports to correctly support "amd64". It was during my fighting with gmp (and mozilla) configure that I discovered the existence of the Templates/config.[guess|sub] hack. It's a no-win choice :-( -- Alex Dupre From owner-svn-src-head@FreeBSD.ORG Mon May 23 13:38:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A240D1065674; Mon, 23 May 2011 13:38:56 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-px0-f176.google.com (mail-px0-f176.google.com [209.85.212.176]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0FB8FC15; Mon, 23 May 2011 13:38:56 +0000 (UTC) Received: by pxi11 with SMTP id 11so4591701pxi.7 for ; Mon, 23 May 2011 06:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:message-id :user-agent:mime-version:content-type; bh=ijb7doSGuuBZMy4qJrmczpgTb6zNTjQDKN9gfT4Yz54=; b=VQ/UdWhR0EaHH63eO/D8ckeqZt06qgLaE2rbBjvHvoRT1c6dIwW7T6a4OgTxzx5Hrk GCUBJAHqX922HSKO4ghMTho43YvABdQosFf5/e77ISWk3TIwX/DYZN2JRkhpp3nxJx7c RmseMlZI9ogSalHm3kXZbqybqI78hmBY2AWzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; b=W2jb9l7S/DbudARYEUZPPJFkUmQXUatOJyDI/YDI2LtV/wOzTzf3EPzoFs4+Xvb3KI 4/RbKTROmdh86NA2PpkgbLirtmdzSMzmncu/YCiKFULzy84ATEoCFI/91B0eS4dhrZIP /a3FzxAqpI1cWBapm/nUivmPtrgzPi6TUJXWY= Received: by 10.142.2.3 with SMTP id 3mr850693wfb.172.1306156323809; Mon, 23 May 2011 06:12:03 -0700 (PDT) Received: from localhost (tor-exit-router38-readme.formlessnetworking.net [199.48.147.38]) by mx.google.com with ESMTPS id k7sm4334713pbe.32.2011.05.23.06.11.57 (version=SSLv3 cipher=OTHER); Mon, 23 May 2011 06:12:00 -0700 (PDT) From: Pan Tsu To: Andriy Gapon References: <201105101644.p4AGiHO1052105@svn.freebsd.org> <4DDA203A.7080802@FreeBSD.org> Date: Mon, 23 May 2011 17:11:50 +0400 Message-ID: <86fwo55zop.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jung-uk Kim Subject: Re: svn commit: r221743 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 13:38:56 -0000 Andriy Gapon writes: > on 10/05/2011 19:44 Jung-uk Kim said the following: >> Author: jkim >> Date: Tue May 10 16:44:16 2011 >> New Revision: 221743 >> URL: http://svn.freebsd.org/changeset/base/221743 >> >> Log: >> Add SC_PIXEL_MODE to GENERIC for amd64 and i386. >> >> Requested by: many > > What about > options VESA > ? Doesn't vesa.ko module work for you? It should be enough for graphic modes, VGL(3) and sysutils/jfbterm to use with GENERIC kernel. From owner-svn-src-head@FreeBSD.ORG Mon May 23 13:40:41 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2D761065670; Mon, 23 May 2011 13:40:41 +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 78D358FC1C; Mon, 23 May 2011 13:40:40 +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 QAA12712; Mon, 23 May 2011 16:40:33 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DDA63D1.70604@FreeBSD.org> Date: Mon, 23 May 2011 16:40:33 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110504 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pan Tsu References: <201105101644.p4AGiHO1052105@svn.freebsd.org> <4DDA203A.7080802@FreeBSD.org> <86fwo55zop.fsf@gmail.com> In-Reply-To: <86fwo55zop.fsf@gmail.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jung-uk Kim Subject: Re: svn commit: r221743 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 13:40:42 -0000 on 23/05/2011 16:11 Pan Tsu said the following: > Andriy Gapon writes: > >> on 10/05/2011 19:44 Jung-uk Kim said the following: >>> Author: jkim >>> Date: Tue May 10 16:44:16 2011 >>> New Revision: 221743 >>> URL: http://svn.freebsd.org/changeset/base/221743 >>> >>> Log: >>> Add SC_PIXEL_MODE to GENERIC for amd64 and i386. >>> >>> Requested by: many >> >> What about >> options VESA >> ? > > Doesn't vesa.ko module work for you? It should be enough for graphic > modes, VGL(3) and sysutils/jfbterm to use with GENERIC kernel. Right you are! Sorry for the noise. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Mon May 23 13:51:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07AF1106567B; Mon, 23 May 2011 13:51:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF95C8FC25; Mon, 23 May 2011 13:51:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NDpvj1024438; Mon, 23 May 2011 13:51:57 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NDpvWf024436; Mon, 23 May 2011 13:51:57 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201105231351.p4NDpvWf024436@svn.freebsd.org> From: Robert Watson Date: Mon, 23 May 2011 13:51: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: r222213 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 13:51:58 -0000 Author: rwatson Date: Mon May 23 13:51:57 2011 New Revision: 222213 URL: http://svn.freebsd.org/changeset/base/222213 Log: A number of quite incremental refinements to struct inpcbinfo's definition: (1) Add a locking guide for inpcbinfo. (2) Annotate inpcbinfo fields with synchronisation information; not all annotations are 100% satisfactory. (3) Reorder inpcbinfo fields so that the lock is at the head of the structure, and close to fields it protects. (4) Sort fields that will eventually be hashlock/pcbgroup-related together even though they remain locked by ipi_lock for now. Reviewed by: bz Sponsored by: Juniper Networks X-MFC after: KBI analysis required Modified: head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Mon May 23 13:02:04 2011 (r222212) +++ head/sys/netinet/in_pcb.h Mon May 23 13:51:57 2011 (r222213) @@ -1,8 +1,12 @@ /*- * Copyright (c) 1982, 1986, 1990, 1993 * The Regents of the University of California. + * Copyright (c) 2010-2011 Juniper Networks, Inc. * All rights reserved. * + * Portions of this software were developed by Robert N. M. Watson under + * contract to Juniper Networks, Inc. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -260,53 +264,70 @@ struct inpcbport { u_short phd_port; }; -/* +/*- * Global data structure for each high-level protocol (UDP, TCP, ...) in both * IPv4 and IPv6. Holds inpcb lists and information for managing them. + * + * Each pcbinfo is protected by ipi_lock, covering mutable global fields (such + * as the global pcb list) and hashed lookup tables. The lock order is: + * + * ipi_lock (before) inpcb locks + * + * Locking key: + * + * (c) Constant or nearly constant after initialisation + * (g) Locked by ipi_lock + * (h) Read using either ipi_lock or inpcb lock; write requires both. + * (x) Synchronisation properties poorly defined */ struct inpcbinfo { /* - * Global list of inpcbs on the protocol. + * Global lock protecting global inpcb list, inpcb count, hash tables, + * etc. */ - struct inpcbhead *ipi_listhead; - u_int ipi_count; + struct rwlock ipi_lock; /* - * Global hash of inpcbs, hashed by local and foreign addresses and - * port numbers. + * Global list of inpcbs on the protocol. */ - struct inpcbhead *ipi_hashbase; - u_long ipi_hashmask; + struct inpcbhead *ipi_listhead; /* (g) */ + u_int ipi_count; /* (g) */ /* - * Global hash of inpcbs, hashed by only local port number. + * Generation count -- incremented each time a connection is allocated + * or freed. */ - struct inpcbporthead *ipi_porthashbase; - u_long ipi_porthashmask; + u_quad_t ipi_gencnt; /* (g) */ /* * Fields associated with port lookup and allocation. */ - u_short ipi_lastport; - u_short ipi_lastlow; - u_short ipi_lasthi; + u_short ipi_lastport; /* (x) */ + u_short ipi_lastlow; /* (x) */ + u_short ipi_lasthi; /* (x) */ /* * UMA zone from which inpcbs are allocated for this protocol. */ - struct uma_zone *ipi_zone; + struct uma_zone *ipi_zone; /* (c) */ /* - * Generation count--incremented each time a connection is allocated - * or freed. + * Global hash of inpcbs, hashed by local and foreign addresses and + * port numbers. */ - u_quad_t ipi_gencnt; - struct rwlock ipi_lock; + struct inpcbhead *ipi_hashbase; /* (g) */ + u_long ipi_hashmask; /* (g) */ + + /* + * Global hash of inpcbs, hashed by only local port number. + */ + struct inpcbporthead *ipi_porthashbase; /* (g) */ + u_long ipi_porthashmask; /* (g) */ /* * Pointer to network stack instance */ - struct vnet *ipi_vnet; + struct vnet *ipi_vnet; /* (c) */ /* * general use 2 From owner-svn-src-head@FreeBSD.ORG Mon May 23 14:29:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF07D106564A; Mon, 23 May 2011 14:29:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5959E8FC17; Mon, 23 May 2011 14:29:07 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4NEJHqs002156 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 23 May 2011 08:19:17 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DD9F0A3.701@FreeBSD.org> Date: Mon, 23 May 2011 08:19:16 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> <42C49AE5-C8EA-44A0-AF88-16130BACE912@bsdimp.com> <4DD9F0A3.701@FreeBSD.org> To: "Andrey V. Elsukov" X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 23 May 2011 08:19:17 -0600 (MDT) Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , Stefan Farfeleder , svn-src-head@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 14:29:07 -0000 On May 22, 2011, at 11:29 PM, Andrey V. Elsukov wrote: > On 23.05.2011 6:29, Warner Losh wrote: >> Looking at one of my flash drives that shows the problem: >>=20 >> da0: 15423MB (31588351 512 byte sectors: 255H 63S/T 1966C) GEOM_PART: = partition 1 has end offset >> beyond last LBA: 31588350 > 31588325 >>=20 >> So why does gpart think the last LBA is 25 less than it really is. = Well, let's do some sanity >> checks first. fdisk -s da0 tells us: >=20 >> I'm pretty sure this problem is due to a bug in g_part_mbr.c: >>=20 >> basetable->gpt_last =3D msize - (msize % basetable->gpt_sectors) - 1; >>=20 >> This is wrong, or at least it is a widely disregarded part of what = makes up an MBR. When I >> correct the size, the geom code is fine. There's no requirement in = MBR that a partition end of >> any particular boundary, although sometimes you'll find mistaken = documentation that suggests this >> is the case. Reading between the lines at = http://www.boot-us.com/gloss03.htm suggests that this >> restriction was only for disks < 8GB in size (from the fact it said = that all the partitions can >> be described with the CHS fields). This is one of the things I = learned when I tried to make >> fdisk enforce that: this isn't a requirement of MBR as it is = implemented in the wild today. >=20 > There is another opinion: > http://www.boot-us.com/gloss02.htm >=20 > "There is the convention that partitions should always start and end = on *cylinder boundaries*." The current code doesn't do that. The current code just ends on a track = boundary... > but >=20 > "Linux and Windows NT/2000/XP/2003/Vista/2008/7 seem to have no = problems when partitions do not > start or end on cylinder boundaries. However other operating systems = (e.g. DOS) expect that this > convention is obeyed." >=20 > What way will we choose? We choose the way that works and not bother with alignment. It is an = artifact of the < 8GB disks and hasn't really been necessary for about = 15 years now. > I prefer to: leave the choice to the user how partition should be = aligned, and remove automatic > alignment to track boundaries from MBR (and probably from all other = schemes). I think we agree. Allow, but do not force, alignment. Warner > --=20 > WBR, Andrey V. Elsukov >=20 > --=20 > WBR, Andrey V. Elsukov >=20 From owner-svn-src-head@FreeBSD.ORG Mon May 23 14:32:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D36106566B; Mon, 23 May 2011 14:32:21 +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 56EED8FC0C; Mon, 23 May 2011 14:32:21 +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 E4E0F46CDB; Mon, 23 May 2011 10:32:20 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 878D18A04F; Mon, 23 May 2011 10:32:20 -0400 (EDT) From: John Baldwin To: "Bjoern A. Zeeb" Date: Mon, 23 May 2011 09:56:56 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <22621AEF-6EF3-4E07-8CBD-57D5037A7DEA@bsdimp.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105230956.56703.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 23 May 2011 10:32:20 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 14:32:21 -0000 On Monday, May 23, 2011 8:05:12 am Bjoern A. Zeeb wrote: > On May 22, 2011, at 10:01 PM, Warner Losh wrote: > > > > > On May 22, 2011, at 3:30 PM, Mark Linimon wrote: > > > >> On Sun, May 22, 2011 at 10:22:56PM +0200, Roman Divacky wrote: > >>> The problem here is deeper in my opinion. What FreeBSD calls > >>> amd64 the rest of the world (ie. linux) calls x86_64, I think > >>> that instead of this we should teach llvm/clang about "amd64". > >>> Maybe as a FreeBSD-only diff. > >> > >> If we move away from "amd64", we are going to need a _substantial_ amount > >> of work on ports. > > > > Yea. That's why I think, although I'd like to move away from it, we're stuck with amd64 for both MACHINE and MACHINE_ARCH for quite some time. In that case, we'll just have to configure clang the same way we configure gcc with the x86_64 monicker. > > Is there an authoritative source for these names? I am not quite sure > what led to the confusion in first place but I guess it's the "oh Intel > is doing EMT64 let's not call this amd" kind of thing. > > I seem to remember that apart from the linux kernel and OSX most others > incl. windows, java and sun used to call it amd64 as well when it came to > technical things. So I am not exactly sure why this regularly comes up > but I'd assume it's because of "what linux calls it must be right"? > > I admit that it's confusing to got to x86-64.org and see it called the > amd64 architecture. I am sure Peter and David know a lot more about this. > > Despite remembering Dragonfly having done the change I cannot see FreeBSD > doing the same in a short timeframe, and yet I have no idea why we wanted to? AMD changed the name. It used to be 'amd64' and we used that name as result. Later they changed it to x86-64, possibly because Linux and the GNU folks had adopted that instead of 'amd64'. Renaming it now would be a PITA. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon May 23 15:23:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D97D106564A; Mon, 23 May 2011 15:23:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D3C48FC19; Mon, 23 May 2011 15:23:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NFNJBY027252; Mon, 23 May 2011 15:23:19 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NFNJHi027248; Mon, 23 May 2011 15:23:19 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201105231523.p4NFNJHi027248@svn.freebsd.org> From: Robert Watson Date: Mon, 23 May 2011 15:23: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: r222215 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 15:23:19 -0000 Author: rwatson Date: Mon May 23 15:23:18 2011 New Revision: 222215 URL: http://svn.freebsd.org/changeset/base/222215 Log: Move from passing a wildcard boolean to a general set up lookup flags into in_pcb_lport(), in_pcblookup_local(), and in_pcblookup_hash(), and similarly for IPv6 functions. In the future, we would like to support other flags relating to locking strategy. This change doesn't appear to modify the KBI in practice, as callers already passed in INPLOOKUP_WILDCARD rather than a simple boolean. MFC after: 3 weeks Reviewed by: bz Sponsored by: Juniper Networks, Inc. Modified: head/sys/netinet/in_pcb.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_src.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Mon May 23 14:16:45 2011 (r222214) +++ head/sys/netinet/in_pcb.c Mon May 23 15:23:18 2011 (r222215) @@ -329,7 +329,7 @@ in_pcbbind(struct inpcb *inp, struct soc #if defined(INET) || defined(INET6) int in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, - struct ucred *cred, int wild) + struct ucred *cred, int lookupflags) { struct inpcbinfo *pcbinfo; struct inpcb *tmpinp; @@ -424,14 +424,14 @@ in_pcb_lport(struct inpcb *inp, struct i #ifdef INET6 if ((inp->inp_vflag & INP_IPV6) != 0) tmpinp = in6_pcblookup_local(pcbinfo, - &inp->in6p_laddr, lport, wild, cred); + &inp->in6p_laddr, lport, lookupflags, cred); #endif #if defined(INET) && defined(INET6) else #endif #ifdef INET tmpinp = in_pcblookup_local(pcbinfo, laddr, - lport, wild, cred); + lport, lookupflags, cred); #endif } while (tmpinp != NULL); @@ -464,7 +464,7 @@ in_pcbbind_setup(struct inpcb *inp, stru struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct in_addr laddr; u_short lport = 0; - int wild = 0, reuseport = (so->so_options & SO_REUSEPORT); + int lookupflags = 0, reuseport = (so->so_options & SO_REUSEPORT); int error; /* @@ -480,7 +480,7 @@ in_pcbbind_setup(struct inpcb *inp, stru if (nam != NULL && laddr.s_addr != INADDR_ANY) return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) - wild = INPLOOKUP_WILDCARD; + lookupflags = INPLOOKUP_WILDCARD; if (nam == NULL) { if ((error = prison_local_ip4(cred, &laddr)) != 0) return (error); @@ -561,7 +561,7 @@ in_pcbbind_setup(struct inpcb *inp, stru return (EADDRINUSE); } t = in_pcblookup_local(pcbinfo, sin->sin_addr, - lport, wild, cred); + lport, lookupflags, cred); if (t && (t->inp_flags & INP_TIMEWAIT)) { /* * XXXRW: If an incpb has had its timewait @@ -590,7 +590,7 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - error = in_pcb_lport(inp, &laddr, &lport, cred, wild); + error = in_pcb_lport(inp, &laddr, &lport, cred, lookupflags); if (error != 0) return (error); @@ -1307,7 +1307,7 @@ in_pcbpurgeif0(struct inpcbinfo *pcbinfo #define INP_LOOKUP_MAPPED_PCB_COST 3 struct inpcb * in_pcblookup_local(struct inpcbinfo *pcbinfo, struct in_addr laddr, - u_short lport, int wild_okay, struct ucred *cred) + u_short lport, int lookupflags, struct ucred *cred) { struct inpcb *inp; #ifdef INET6 @@ -1317,9 +1317,12 @@ in_pcblookup_local(struct inpcbinfo *pcb #endif int wildcard; + KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0, + ("%s: invalid lookup flags %d", __func__, lookupflags)); + INP_INFO_LOCK_ASSERT(pcbinfo); - if (!wild_okay) { + if ((lookupflags & INPLOOKUP_WILDCARD) == 0) { struct inpcbhead *head; /* * Look for an unconnected (wildcard foreign addr) PCB that @@ -1425,13 +1428,16 @@ in_pcblookup_local(struct inpcbinfo *pcb */ struct inpcb * in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in_addr faddr, - u_int fport_arg, struct in_addr laddr, u_int lport_arg, int wildcard, + u_int fport_arg, struct in_addr laddr, u_int lport_arg, int lookupflags, struct ifnet *ifp) { struct inpcbhead *head; struct inpcb *inp, *tmpinp; u_short fport = fport_arg, lport = lport_arg; + KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0, + ("%s: invalid lookup flags %d", __func__, lookupflags)); + INP_INFO_LOCK_ASSERT(pcbinfo); /* @@ -1467,7 +1473,7 @@ in_pcblookup_hash(struct inpcbinfo *pcbi /* * Then look for a wildcard match, if requested. */ - if (wildcard == INPLOOKUP_WILDCARD) { + if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { struct inpcb *local_wild = NULL, *local_exact = NULL; #ifdef INET6 struct inpcb *local_wild_mapped = NULL; @@ -1538,7 +1544,7 @@ in_pcblookup_hash(struct inpcbinfo *pcbi if (local_wild_mapped != NULL) return (local_wild_mapped); #endif /* defined(INET6) */ - } /* if (wildcard == INPLOOKUP_WILDCARD) */ + } /* if ((lookupflags & INPLOOKUP_WILDCARD) != 0) */ return (NULL); } Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Mon May 23 14:16:45 2011 (r222214) +++ head/sys/netinet6/in6_pcb.c Mon May 23 15:23:18 2011 (r222215) @@ -111,7 +111,8 @@ in6_pcbbind(register struct inpcb *inp, struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)NULL; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; u_short lport = 0; - int error, wild = 0, reuseport = (so->so_options & SO_REUSEPORT); + int error, lookupflags = 0; + int reuseport = (so->so_options & SO_REUSEPORT); INP_INFO_WLOCK_ASSERT(pcbinfo); INP_WLOCK_ASSERT(inp); @@ -121,7 +122,7 @@ in6_pcbbind(register struct inpcb *inp, if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) - wild = INPLOOKUP_WILDCARD; + lookupflags = INPLOOKUP_WILDCARD; if (nam == NULL) { if ((error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) @@ -226,7 +227,7 @@ in6_pcbbind(register struct inpcb *inp, #endif } t = in6_pcblookup_local(pcbinfo, &sin6->sin6_addr, - lport, wild, cred); + lport, lookupflags, cred); if (t && (reuseport & ((t->inp_flags & INP_TIMEWAIT) ? intotw(t)->tw_so_options : t->inp_socket->so_options)) == 0) @@ -238,7 +239,7 @@ in6_pcbbind(register struct inpcb *inp, in6_sin6_2_sin(&sin, sin6); t = in_pcblookup_local(pcbinfo, sin.sin_addr, - lport, wild, cred); + lport, lookupflags, cred); if (t && t->inp_flags & INP_TIMEWAIT) { if ((reuseport & intotw(t)->tw_so_options) == 0 && @@ -652,14 +653,17 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, */ struct inpcb * in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr, - u_short lport, int wild_okay, struct ucred *cred) + u_short lport, int lookupflags, struct ucred *cred) { register struct inpcb *inp; int matchwild = 3, wildcard; + KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0, + ("%s: invalid lookup flags %d", __func__, lookupflags)); + INP_INFO_WLOCK_ASSERT(pcbinfo); - if (!wild_okay) { + if ((lookupflags & INPLOOKUP_WILDCARD) == 0) { struct inpcbhead *head; /* * Look for an unconnected (wildcard foreign addr) PCB that @@ -815,7 +819,7 @@ in6_rtchange(struct inpcb *inp, int errn */ struct inpcb * in6_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int wildcard, + u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, struct ifnet *ifp) { struct inpcbhead *head; @@ -823,6 +827,9 @@ in6_pcblookup_hash(struct inpcbinfo *pcb u_short fport = fport_arg, lport = lport_arg; int faith; + KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0, + ("%s: invalid lookup flags %d", __func__, lookupflags)); + INP_INFO_LOCK_ASSERT(pcbinfo); if (faithprefix_p != NULL) @@ -862,7 +869,7 @@ in6_pcblookup_hash(struct inpcbinfo *pcb /* * Then look for a wildcard match, if requested. */ - if (wildcard == INPLOOKUP_WILDCARD) { + if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { struct inpcb *local_wild = NULL, *local_exact = NULL; struct inpcb *jail_wild = NULL; int injail; @@ -919,7 +926,7 @@ in6_pcblookup_hash(struct inpcbinfo *pcb return (local_exact); if (local_wild != NULL) return (local_wild); - } /* if (wildcard == INPLOOKUP_WILDCARD) */ + } /* if ((lookupflags & INPLOOKUP_WILDCARD) != 0) */ /* * Not found. Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Mon May 23 14:16:45 2011 (r222214) +++ head/sys/netinet6/in6_src.c Mon May 23 15:23:18 2011 (r222215) @@ -851,7 +851,7 @@ in6_pcbsetport(struct in6_addr *laddr, s { struct socket *so = inp->inp_socket; u_int16_t lport = 0; - int error, wild = 0; + int error, lookupflags = 0; #ifdef INVARIANTS struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; #endif @@ -866,11 +866,11 @@ in6_pcbsetport(struct in6_addr *laddr, s /* XXX: this is redundant when called from in6_pcbbind */ if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) - wild = INPLOOKUP_WILDCARD; + lookupflags = INPLOOKUP_WILDCARD; inp->inp_flags |= INP_ANONPORT; - error = in_pcb_lport(inp, NULL, &lport, cred, wild); + error = in_pcb_lport(inp, NULL, &lport, cred, lookupflags); if (error != 0) return (error); From owner-svn-src-head@FreeBSD.ORG Mon May 23 16:40:44 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5C291065674; Mon, 23 May 2011 16:40:44 +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 C70CD8FC17; Mon, 23 May 2011 16:40:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NGeiHZ029557; Mon, 23 May 2011 16:40:44 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NGeiX3029555; Mon, 23 May 2011 16:40:44 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201105231640.p4NGeiX3029555@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 23 May 2011 16:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222216 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 16:40:44 -0000 Author: jh Date: Mon May 23 16:40:44 2011 New Revision: 222216 URL: http://svn.freebsd.org/changeset/base/222216 Log: In init_dynamic_kenv(), ignore environment strings exceeding the KENV_MNAMELEN + 1 + KENV_MVALLEN + 1 length limit to avoid buffer overflow in getenv(). Currenly loader(8) doesn't limit the length of environment strings. PR: kern/132104 MFC after: 1 month Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Mon May 23 15:23:18 2011 (r222215) +++ head/sys/kern/kern_environment.c Mon May 23 16:40:44 2011 (r222216) @@ -225,13 +225,19 @@ static void init_dynamic_kenv(void *data __unused) { char *cp; - int len, i; + size_t len; + int i; kenvp = malloc((KENV_SIZE + 1) * sizeof(char *), M_KENV, M_WAITOK | M_ZERO); i = 0; for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { len = strlen(cp) + 1; + if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { + printf("WARNING: too long kenv string, ignoring %s\n", + cp); + continue; + } if (i < KENV_SIZE) { kenvp[i] = malloc(len, M_KENV, M_WAITOK); strcpy(kenvp[i++], cp); From owner-svn-src-head@FreeBSD.ORG Mon May 23 18:44:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 8CA611065745; Mon, 23 May 2011 18:44:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id DC67C152A80; Mon, 23 May 2011 18:44:18 +0000 (UTC) Message-ID: <4DDAAB01.1020902@FreeBSD.org> Date: Mon, 23 May 2011 11:44:17 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warner Losh References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> <42C49AE5-C8EA-44A0-AF88-16130BACE912@bsdimp.com> <4DD9F0A3.701@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 18:44:25 -0000 I don't know enough about the topic to know what's "best," however what I would like to add to the conversation is that it would be nice if we did it the same way that windows and linux do it, because otherwise you end up with messages like these: GEOM: ad0s2: geometry does not match label (255h,63s != 16h,63s). GEOM: ad0s3: geometry does not match label (255h,63s != 16h,63s). when you use a windows or linux tool to partition your disk before installing FreeBSD. I have tried various combinations of tools and methods of slicing the disk and never found a way to avoid error messages one way or another, so I just ignore them now. If there is truly no reason to do it one way or the other, can we please just do it the way that everyone else does it? Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Mon May 23 19:32:02 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF613106566B; Mon, 23 May 2011 19:32:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF4518FC16; Mon, 23 May 2011 19:32:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NJW2oO034577; Mon, 23 May 2011 19:32:02 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NJW2ms034573; Mon, 23 May 2011 19:32:02 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201105231932.p4NJW2ms034573@svn.freebsd.org> From: Robert Watson Date: Mon, 23 May 2011 19:32:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222217 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 19:32:03 -0000 Author: rwatson Date: Mon May 23 19:32:02 2011 New Revision: 222217 URL: http://svn.freebsd.org/changeset/base/222217 Log: Continue to refine inpcb reference counting and locking, in preparation for reworking of inpcbinfo locking: (1) Convert inpcb reference counting from manually manipulated integers to the refcount(9) KPI. This allows the refcount to be managed atomically with an inpcb read lock rather than write lock, or even with no inpcb lock at all. As a result, in_pcbref() also no longer requires an inpcb lock, so can be performed solely using the lock used to look up an inpcb. (2) Shift more inpcb freeing activity from the in_pcbrele() context (via in_pcbfree_internal) to the explicit in_pcbfree() context. This means that the inpcb refcount is increasingly used only to maintain memory stability, not actually defer the clean up of inpcb protocol parts. This is desirable as many of those protocol parts required the pcbinfo lock, which we'd like not to acquire in in_pcbrele() contexts. Document this in comments better. (3) Introduce new read-locked and write-locked in_pcbrele() variations, in_pcbrele_rlocked() and in_pcbrele_wlocked(), which allow the inpcb to be properly unlocked as needed. in_pcbrele() is a wrapper around the latter, and should probably go away at some point. This makes it easier to use this weak reference model when holding only a read lock, as will happen in the future. This may well be safe to MFC, but some more KBI analysis is required. Reviewed by: bz MFC after: 3 weeks Sponsored by: Juniper Networks, Inc. Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Mon May 23 16:40:44 2011 (r222216) +++ head/sys/netinet/in_pcb.c Mon May 23 19:32:02 2011 (r222217) @@ -2,8 +2,12 @@ * Copyright (c) 1982, 1986, 1991, 1993, 1995 * The Regents of the University of California. * Copyright (c) 2007-2009 Robert N. M. Watson + * Copyright (c) 2010-2011 Juniper Networks, Inc. * All rights reserved. * + * Portions of this software were developed by Robert N. M. Watson under + * contract to Juniper Networks, Inc. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -50,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -287,7 +292,7 @@ in_pcballoc(struct socket *so, struct in #endif INP_WLOCK(inp); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; - inp->inp_refcount = 1; /* Reference from the inpcbinfo */ + refcount_init(&inp->inp_refcount, 1); /* Reference from inpcbinfo */ #if defined(IPSEC) || defined(MAC) out: if (error != 0) { @@ -1028,56 +1033,18 @@ in_pcbdetach(struct inpcb *inp) } /* - * in_pcbfree_internal() frees an inpcb that has been detached from its - * socket, and whose reference count has reached 0. It will also remove the - * inpcb from any global lists it might remain on. - */ -static void -in_pcbfree_internal(struct inpcb *inp) -{ - struct inpcbinfo *ipi = inp->inp_pcbinfo; - - KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); - KASSERT(inp->inp_refcount == 0, ("%s: refcount !0", __func__)); - - INP_INFO_WLOCK_ASSERT(ipi); - INP_WLOCK_ASSERT(inp); - -#ifdef IPSEC - if (inp->inp_sp != NULL) - ipsec_delete_pcbpolicy(inp); -#endif /* IPSEC */ - inp->inp_gencnt = ++ipi->ipi_gencnt; - in_pcbremlists(inp); -#ifdef INET6 - if (inp->inp_vflag & INP_IPV6PROTO) { - ip6_freepcbopts(inp->in6p_outputopts); - if (inp->in6p_moptions != NULL) - ip6_freemoptions(inp->in6p_moptions); - } -#endif - if (inp->inp_options) - (void)m_free(inp->inp_options); -#ifdef INET - if (inp->inp_moptions != NULL) - inp_freemoptions(inp->inp_moptions); -#endif - inp->inp_vflag = 0; - crfree(inp->inp_cred); - -#ifdef MAC - mac_inpcb_destroy(inp); -#endif - INP_WUNLOCK(inp); - uma_zfree(ipi->ipi_zone, inp); -} - -/* * in_pcbref() bumps the reference count on an inpcb in order to maintain * stability of an inpcb pointer despite the inpcb lock being released. This * is used in TCP when the inpcbinfo lock needs to be acquired or upgraded, * but where the inpcb lock is already held. * + * in_pcbref() should be used only to provide brief memory stability, and + * must always be followed by a call to INP_WLOCK() and in_pcbrele() to + * garbage collect the inpcb if it has been in_pcbfree()'d from another + * context. Until in_pcbrele() has returned that the inpcb is still valid, + * lock and rele are the *only* safe operations that may be performed on the + * inpcb. + * * While the inpcb will not be freed, releasing the inpcb lock means that the * connection's state may change, so the caller should be careful to * revalidate any cached state on reacquiring the lock. Drop the reference @@ -1091,7 +1058,7 @@ in_pcbref(struct inpcb *inp) KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); - inp->inp_refcount++; + refcount_acquire(&inp->inp_refcount); } /* @@ -1099,47 +1066,108 @@ in_pcbref(struct inpcb *inp) * in_pcbfree() may have been made between in_pcbref() and in_pcbrele(), we * return a flag indicating whether or not the inpcb remains valid. If it is * valid, we return with the inpcb lock held. + * + * Notice that, unlike in_pcbref(), the inpcb lock must be held to drop a + * reference on an inpcb. Historically more work was done here (actually, in + * in_pcbfree_internal()) but has been moved to in_pcbfree() to avoid the + * need for the pcbinfo lock in in_pcbrele(). Deferring the free is entirely + * about memory stability (and continued use of the write lock). */ int -in_pcbrele(struct inpcb *inp) +in_pcbrele_rlocked(struct inpcb *inp) { -#ifdef INVARIANTS - struct inpcbinfo *ipi = inp->inp_pcbinfo; -#endif + struct inpcbinfo *pcbinfo; + + KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); + + INP_RLOCK_ASSERT(inp); + + if (refcount_release(&inp->inp_refcount) == 0) + return (0); + + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + + INP_RUNLOCK(inp); + pcbinfo = inp->inp_pcbinfo; + uma_zfree(pcbinfo->ipi_zone, inp); + return (1); +} + +int +in_pcbrele_wlocked(struct inpcb *inp) +{ + struct inpcbinfo *pcbinfo; KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); - INP_INFO_WLOCK_ASSERT(ipi); INP_WLOCK_ASSERT(inp); - inp->inp_refcount--; - if (inp->inp_refcount > 0) + if (refcount_release(&inp->inp_refcount) == 0) return (0); - in_pcbfree_internal(inp); + + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + + INP_WUNLOCK(inp); + pcbinfo = inp->inp_pcbinfo; + uma_zfree(pcbinfo->ipi_zone, inp); return (1); } /* + * Temporary wrapper. + */ +int +in_pcbrele(struct inpcb *inp) +{ + + return (in_pcbrele_wlocked(inp)); +} + +/* * Unconditionally schedule an inpcb to be freed by decrementing its * reference count, which should occur only after the inpcb has been detached * from its socket. If another thread holds a temporary reference (acquired * using in_pcbref()) then the free is deferred until that reference is - * released using in_pcbrele(), but the inpcb is still unlocked. + * released using in_pcbrele(), but the inpcb is still unlocked. Almost all + * work, including removal from global lists, is done in this context, where + * the pcbinfo lock is held. */ void in_pcbfree(struct inpcb *inp) { -#ifdef INVARIANTS - struct inpcbinfo *ipi = inp->inp_pcbinfo; -#endif + struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; - KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", - __func__)); + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); - INP_INFO_WLOCK_ASSERT(ipi); + INP_INFO_WLOCK_ASSERT(pcbinfo); INP_WLOCK_ASSERT(inp); - if (!in_pcbrele(inp)) + /* XXXRW: Do as much as possible here. */ +#ifdef IPSEC + if (inp->inp_sp != NULL) + ipsec_delete_pcbpolicy(inp); +#endif /* IPSEC */ + inp->inp_gencnt = ++pcbinfo->ipi_gencnt; + in_pcbremlists(inp); +#ifdef INET6 + if (inp->inp_vflag & INP_IPV6PROTO) { + ip6_freepcbopts(inp->in6p_outputopts); + if (inp->in6p_moptions != NULL) + ip6_freemoptions(inp->in6p_moptions); + } +#endif + if (inp->inp_options) + (void)m_free(inp->inp_options); +#ifdef INET + if (inp->inp_moptions != NULL) + inp_freemoptions(inp->inp_moptions); +#endif + inp->inp_vflag = 0; + crfree(inp->inp_cred); +#ifdef MAC + mac_inpcb_destroy(inp); +#endif + if (!in_pcbrele_wlocked(inp)) INP_WUNLOCK(inp); } Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Mon May 23 16:40:44 2011 (r222216) +++ head/sys/netinet/in_pcb.h Mon May 23 19:32:02 2011 (r222217) @@ -534,6 +534,8 @@ void in_pcbnotifyall(struct inpcbinfo *p void in_pcbref(struct inpcb *); void in_pcbrehash(struct inpcb *); int in_pcbrele(struct inpcb *); +int in_pcbrele_rlocked(struct inpcb *); +int in_pcbrele_wlocked(struct inpcb *); void in_pcbsetsolabel(struct socket *so); int in_getpeeraddr(struct socket *so, struct sockaddr **nam); int in_getsockaddr(struct socket *so, struct sockaddr **nam); From owner-svn-src-head@FreeBSD.ORG Mon May 23 19:36:04 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FFFF1065670; Mon, 23 May 2011 19:36:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id D3C988FC0C; Mon, 23 May 2011 19:36:03 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:19ad:a219:aff6:b6b4] (unknown [IPv6:2001:7b8:3a7:0:19ad:a219:aff6:b6b4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B304C5C37; Mon, 23 May 2011 21:36:02 +0200 (CEST) Message-ID: <4DDAB729.8020902@FreeBSD.org> Date: Mon, 23 May 2011 21:36:09 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18pre) Gecko/20110519 Lanikai/3.1.11pre MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> <20110522213058.GB21144@lonesome.com> <22621AEF-6EF3-4E07-8CBD-57D5037A7DEA@bsdimp.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 19:36:04 -0000 On 2011-05-23 14:05, Bjoern A. Zeeb wrote: > Is there an authoritative source for these names? With regard to the 'triple' or 'quad' strings, e.g. "arch-vendor-os" or "arch-vendor-os-abi", the canonical source is really GNU config.guess, which is used in autoconf, gettext, and most other GNU tools. If you look at the head revision here: http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess you can see that it consistently replaces any 'amd64' arch with 'x86_64'. (Of course the hyphen in 'x86-64' had to be transformed to an underscore, otherwise it would be mistaken for a separator.) > I am not quite sure > what led to the confusion in first place but I guess it's the "oh Intel > is doing EMT64 let's not call this amd" kind of thing. AMD originally announced their 64 bit technology under the name x86-64, in 1999 (nice typo in the title, btw): http://www.amd.com/us/press-releases/Pages/Press_Release_751.aspx Later, in 2003, their marketing department apparently decided to rename it to AMD64, and deprecate the x86-64 terminology: http://www.x86-64.org/pipermail/discuss/2003-April/003315.html Most likely, GNU and Linux had already picked up the x86-64 name, and did not see much reason to rename it afterwards. Since amd64 support got added to FreeBSD in November 2003, it looks like we only picked this up when it was already renamed. From owner-svn-src-head@FreeBSD.ORG Mon May 23 19:48:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3536E106566B; Mon, 23 May 2011 19:48:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id EB1C78FC0C; Mon, 23 May 2011 19:48:33 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:19ad:a219:aff6:b6b4] (unknown [IPv6:2001:7b8:3a7:0:19ad:a219:aff6:b6b4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 25DDD5C37; Mon, 23 May 2011 21:48:33 +0200 (CEST) Message-ID: <4DDABA18.2000901@FreeBSD.org> Date: Mon, 23 May 2011 21:48:40 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18pre) Gecko/20110519 Lanikai/3.1.11pre MIME-Version: 1.0 To: Mark Linimon References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> <20110522213058.GB21144@lonesome.com> In-Reply-To: <20110522213058.GB21144@lonesome.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Roman Divacky , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 19:48:34 -0000 On 2011-05-22 23:30, Mark Linimon wrote: > On Sun, May 22, 2011 at 10:22:56PM +0200, Roman Divacky wrote: >> The problem here is deeper in my opinion. What FreeBSD calls >> amd64 the rest of the world (ie. linux) calls x86_64, I think >> that instead of this we should teach llvm/clang about "amd64". >> Maybe as a FreeBSD-only diff. > > If we move away from "amd64", we are going to need a _substantial_ amount > of work on ports. Note, this commit was *only* to set clang's compiled-in default arch on amd64, to make sure clang selects the correct target CPU when it generates code. This should not influence too many configure scripts, unless they foolishly grep around in "$CC -v" output... ;) From owner-svn-src-head@FreeBSD.ORG Mon May 23 19:57:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05D0C106564A; Mon, 23 May 2011 19:57:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D20B98FC0A; Mon, 23 May 2011 19:57:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NJvCaC035365; Mon, 23 May 2011 19:57:12 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NJvCh1035363; Mon, 23 May 2011 19:57:12 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105231957.p4NJvCh1035363@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 23 May 2011 19:57: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: r222218 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 19:57:13 -0000 Author: ru Date: Mon May 23 19:57:12 2011 New Revision: 222218 URL: http://svn.freebsd.org/changeset/base/222218 Log: expr -> sh arithmetic expansion Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Mon May 23 19:32:02 2011 (r222217) +++ head/sys/conf/newvers.sh Mon May 23 19:57:12 2011 (r222218) @@ -139,4 +139,4 @@ int osreldate = ${RELDATE}; char kern_ident[] = "${i}"; EOF -echo `expr ${v} + 1` > version +echo $((v + 1)) > version From owner-svn-src-head@FreeBSD.ORG Mon May 23 19:58:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E48131065670; Mon, 23 May 2011 19:58:08 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5A998FC16; Mon, 23 May 2011 19:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NJw8a4035432; Mon, 23 May 2011 19:58:08 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NJw8B5035430; Mon, 23 May 2011 19:58:08 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105231958.p4NJw8B5035430@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 19:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222219 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 19:58:09 -0000 Author: yongari Date: Mon May 23 19:58:08 2011 New Revision: 222219 URL: http://svn.freebsd.org/changeset/base/222219 Log: Do not blindly clear entire GPHY control register. It seems some bits of the register is used for other purposes such that clearing these bits resulted in unexpected results such as corrupted RX frames or missing LE status updates. For old controllers like Yukon EC it had no effect but it caused all kind of troubles on Yukon Supreme. This change shall improve stability of controllers like Yukon Ultra, Ultra2, Extreme, Optima and Supreme. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 23 19:57:12 2011 (r222218) +++ head/sys/dev/msk/if_msk.c Mon May 23 19:58:08 2011 (r222219) @@ -1362,8 +1362,8 @@ mskc_reset(struct msk_softc *sc) /* Reset GPHY/GMAC Control */ for (i = 0; i < sc->msk_num_port; i++) { /* GPHY Control reset. */ - CSR_WRITE_4(sc, MR_ADDR(i, GPHY_CTRL), GPC_RST_SET); - CSR_WRITE_4(sc, MR_ADDR(i, GPHY_CTRL), GPC_RST_CLR); + CSR_WRITE_1(sc, MR_ADDR(i, GPHY_CTRL), GPC_RST_SET); + CSR_WRITE_1(sc, MR_ADDR(i, GPHY_CTRL), GPC_RST_CLR); /* GMAC Control reset. */ CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_RST_SET); CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_RST_CLR); From owner-svn-src-head@FreeBSD.ORG Mon May 23 19:59:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27E9106566B; Mon, 23 May 2011 19:59:01 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B40668FC19; Mon, 23 May 2011 19:59:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NJx12q035492; Mon, 23 May 2011 19:59:01 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NJx1Kp035490; Mon, 23 May 2011 19:59:01 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105231959.p4NJx1Kp035490@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 23 May 2011 19:59: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: r222220 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 19:59:01 -0000 Author: ru Date: Mon May 23 19:59:01 2011 New Revision: 222220 URL: http://svn.freebsd.org/changeset/base/222220 Log: BKVASIZE was bumped to 16k more than a decade ago. Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon May 23 19:58:08 2011 (r222219) +++ head/sys/kern/vfs_bio.c Mon May 23 19:59:01 2011 (r222220) @@ -654,7 +654,7 @@ bufinit(void) * To support extreme low-memory systems, make sure hidirtybuffers cannot * eat up all available buffer space. This occurs when our minimum cannot * be met. We try to size hidirtybuffers to 3/4 our buffer space assuming - * BKVASIZE'd (8K) buffers. + * BKVASIZE'd buffers. */ while ((long)hidirtybuffers * BKVASIZE > 3 * hibufspace / 4) { hidirtybuffers >>= 1; From owner-svn-src-head@FreeBSD.ORG Mon May 23 20:09:32 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A9491065674; Mon, 23 May 2011 20:09:32 +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 7222D8FC17; Mon, 23 May 2011 20:09:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NK9WSc035841; Mon, 23 May 2011 20:09:32 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NK9WlL035839; Mon, 23 May 2011 20:09:32 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105232009.p4NK9WlL035839@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 20:09: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: r222221 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 20:09:32 -0000 Author: yongari Date: Mon May 23 20:09:32 2011 New Revision: 222221 URL: http://svn.freebsd.org/changeset/base/222221 Log: Rework store and forward configuration of TX MAC FIFO. Basically it enables store and forward mode except for jumbo frame on Yukon Ultra. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 23 19:59:01 2011 (r222220) +++ head/sys/dev/msk/if_msk.c Mon May 23 20:09:32 2011 (r222221) @@ -3654,37 +3654,24 @@ msk_set_tx_stfwd(struct msk_if_softc *sc ifp = sc_if->msk_ifp; sc = sc_if->msk_softc; - switch (sc->msk_hw_id) { - case CHIP_ID_YUKON_EX: - if (sc->msk_hw_rev == CHIP_REV_YU_EX_A0) - goto yukon_ex_workaround; - if (ifp->if_mtu > ETHERMTU) - CSR_WRITE_4(sc, - MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), - TX_JUMBO_ENA | TX_STFW_ENA); - else - CSR_WRITE_4(sc, - MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), - TX_JUMBO_DIS | TX_STFW_ENA); - break; - default: -yukon_ex_workaround: + if ((sc->msk_hw_id == CHIP_ID_YUKON_EX && + sc->msk_hw_rev != CHIP_REV_YU_EX_A0) || + sc->msk_hw_id >= CHIP_ID_YUKON_SUPR) { + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), + TX_STFW_ENA); + } else { if (ifp->if_mtu > ETHERMTU) { /* Set Tx GMAC FIFO Almost Empty Threshold. */ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_AE_THR), MSK_ECU_JUMBO_WM << 16 | MSK_ECU_AE_THR); /* Disable Store & Forward mode for Tx. */ - CSR_WRITE_4(sc, - MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), - TX_JUMBO_ENA | TX_STFW_DIS); + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), + TX_STFW_DIS); } else { - /* Enable Store & Forward mode for Tx. */ - CSR_WRITE_4(sc, - MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), - TX_JUMBO_DIS | TX_STFW_ENA); + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), + TX_STFW_ENA); } - break; } } From owner-svn-src-head@FreeBSD.ORG Mon May 23 20:12:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EE7B106566B; Mon, 23 May 2011 20:12:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F418A8FC08; Mon, 23 May 2011 20:12:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NKCad4035982; Mon, 23 May 2011 20:12:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NKCa5n035979; Mon, 23 May 2011 20:12:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201105232012.p4NKCa5n035979@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 23 May 2011 20:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222222 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 20:12:37 -0000 Author: jkim Date: Mon May 23 20:12:36 2011 New Revision: 222222 URL: http://svn.freebsd.org/changeset/base/222222 Log: Decrease ACPI-fast timecounter quality to 900 and increase HPET timecounter quality to 950. HPET on modern platforms usually have better resolution and lower latency than ACPI timer. Effectively this changes default timecounter hardware from ACPI-fast to HPET by default when both are available. Discussed with: avg Modified: head/sys/dev/acpica/acpi_hpet.c head/sys/dev/acpica/acpi_timer.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Mon May 23 20:09:32 2011 (r222221) +++ head/sys/dev/acpica/acpi_hpet.c Mon May 23 20:12:36 2011 (r222222) @@ -476,7 +476,7 @@ hpet_attach(device_t dev) sc->tc.tc_get_timecount = hpet_get_timecount, sc->tc.tc_counter_mask = ~0u, sc->tc.tc_name = "HPET", - sc->tc.tc_quality = 900, + sc->tc.tc_quality = 950, sc->tc.tc_frequency = sc->freq; sc->tc.tc_priv = sc; tc_init(&sc->tc); Modified: head/sys/dev/acpica/acpi_timer.c ============================================================================== --- head/sys/dev/acpica/acpi_timer.c Mon May 23 20:09:32 2011 (r222221) +++ head/sys/dev/acpica/acpi_timer.c Mon May 23 20:12:36 2011 (r222222) @@ -203,7 +203,7 @@ acpi_timer_probe(device_t dev) if (j == 10) { acpi_timer_timecounter.tc_name = "ACPI-fast"; acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount; - acpi_timer_timecounter.tc_quality = 1000; + acpi_timer_timecounter.tc_quality = 900; } else { acpi_timer_timecounter.tc_name = "ACPI-safe"; acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount_safe; From owner-svn-src-head@FreeBSD.ORG Mon May 23 20:13:00 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F2561065676; Mon, 23 May 2011 20:13:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2ED7A8FC08; Mon, 23 May 2011 20:13:00 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4NKAMDh005958 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 23 May 2011 14:10:23 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DDAAB01.1020902@FreeBSD.org> Date: Mon, 23 May 2011 14:10:17 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <9D7E6C5D-A581-46A8-A123-FF3DA1E2CB6E@bsdimp.com> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> <42C49AE5-C8EA-44A0-AF88-16130BACE912@bsdimp.com> <4DD9F0A3.701@FreeBSD.org> <4DDAAB01.1020902@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 23 May 2011 14:10:25 -0600 (MDT) Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 20:13:00 -0000 On May 23, 2011, at 12:44 PM, Doug Barton wrote: > I don't know enough about the topic to know what's "best," however = what I would like to add to the conversation is that it would be nice if = we did it the same way that windows and linux do it, because otherwise = you end up with messages like these: >=20 > GEOM: ad0s2: geometry does not match label (255h,63s !=3D 16h,63s). > GEOM: ad0s3: geometry does not match label (255h,63s !=3D 16h,63s). >=20 > when you use a windows or linux tool to partition your disk before = installing FreeBSD. I have tried various combinations of tools and = methods of slicing the disk and never found a way to avoid error = messages one way or another, so I just ignore them now. >=20 > If there is truly no reason to do it one way or the other, can we = please just do it the way that everyone else does it? These messages can simply be deleted. They serve no purpose at all. = The firmware is reporting a different bogus geometry than the label is = encoded. Alternatively, we could likely supress the warning for the 'it is bigger = than this' encoding of 1023/255/63, since that's the more-or-less = official way of having the MBR report 'saturated'. Warner= From owner-svn-src-head@FreeBSD.ORG Mon May 23 20:18:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35BF51065672; Mon, 23 May 2011 20:18:10 +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 268558FC14; Mon, 23 May 2011 20:18:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NKI9Le036175; Mon, 23 May 2011 20:18:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NKI9CI036173; Mon, 23 May 2011 20:18:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105232018.p4NKI9CI036173@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 20:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222223 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 20:18:10 -0000 Author: yongari Date: Mon May 23 20:18:09 2011 New Revision: 222223 URL: http://svn.freebsd.org/changeset/base/222223 Log: Do not configure RAM registers for controllers that do not have them. These registers are defined only for Yukon XL, Yukon EC and Yukon FE. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 23 20:12:36 2011 (r222222) +++ head/sys/dev/msk/if_msk.c Mon May 23 20:18:09 2011 (r222223) @@ -1300,7 +1300,7 @@ mskc_reset(struct msk_softc *sc) bus_addr_t addr; uint16_t status; uint32_t val; - int i; + int i, initram; CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); @@ -1396,8 +1396,14 @@ mskc_reset(struct msk_softc *sc) CSR_WRITE_1(sc, GMAC_TI_ST_CTRL, GMT_ST_STOP); CSR_WRITE_1(sc, GMAC_TI_ST_CTRL, GMT_ST_CLR_IRQ); + initram = 0; + if (sc->msk_hw_id == CHIP_ID_YUKON_XL || + sc->msk_hw_id == CHIP_ID_YUKON_EC || + sc->msk_hw_id == CHIP_ID_YUKON_FE) + initram++; + /* Configure timeout values. */ - for (i = 0; i < sc->msk_num_port; i++) { + for (i = 0; initram > 0 && i < sc->msk_num_port; i++) { CSR_WRITE_2(sc, SELECT_RAM_BUFFER(i, B3_RI_CTRL), RI_RST_SET); CSR_WRITE_2(sc, SELECT_RAM_BUFFER(i, B3_RI_CTRL), RI_RST_CLR); CSR_WRITE_1(sc, SELECT_RAM_BUFFER(i, B3_RI_WTO_R1), From owner-svn-src-head@FreeBSD.ORG Mon May 23 20:59:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DD6C106564A; Mon, 23 May 2011 20:59:50 +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 5F1808FC14; Mon, 23 May 2011 20:59:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NKxoAK037497; Mon, 23 May 2011 20:59:50 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NKxoJc037495; Mon, 23 May 2011 20:59:50 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201105232059.p4NKxoJc037495@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 23 May 2011 20:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222224 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 20:59:50 -0000 Author: pjd Date: Mon May 23 20:59:50 2011 New Revision: 222224 URL: http://svn.freebsd.org/changeset/base/222224 Log: To handle BIO_FLUSH and BIO_DELETE requests in secondary worker we need to use ioctl(2). This is why we can't use capsicum for now to sandbox secondary. Capsicum is still used to sandbox hastctl. MFC after: 1 week Modified: head/sbin/hastd/subr.c Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Mon May 23 20:18:09 2011 (r222223) +++ head/sbin/hastd/subr.c Mon May 23 20:59:50 2011 (r222224) @@ -224,7 +224,13 @@ drop_privs(struct hast_resource *res) return (-1); } - if (res == NULL || res->hr_role != HAST_ROLE_PRIMARY) + /* + * Until capsicum doesn't allow ioctl(2) we cannot use it to sandbox + * primary and secondary worker processes, as primary uses GGATE + * ioctls and secondary uses ioctls to handle BIO_DELETE and BIO_FLUSH. + * For now capsicum is only used to sandbox hastctl. + */ + if (res == NULL) capsicum = (cap_enter() == 0); else capsicum = false; From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:00:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CB0F10656ED; Mon, 23 May 2011 21:00:38 +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 21F208FC2F; Mon, 23 May 2011 21:00:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NL0c7n037576; Mon, 23 May 2011 21:00:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NL0cTp037574; Mon, 23 May 2011 21:00:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201105232100.p4NL0cTp037574@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 23 May 2011 21:00: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: r222225 - head/sys/geom/gate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:00:38 -0000 Author: pjd Date: Mon May 23 21:00:37 2011 New Revision: 222225 URL: http://svn.freebsd.org/changeset/base/222225 Log: Recognize BIO_FLUSH requests and pass them to userland. MFC after: 1 week Modified: head/sys/geom/gate/g_gate.c Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Mon May 23 20:59:50 2011 (r222224) +++ head/sys/geom/gate/g_gate.c Mon May 23 21:00:37 2011 (r222225) @@ -180,6 +180,7 @@ g_gate_start(struct bio *bp) break; case BIO_DELETE: case BIO_WRITE: + case BIO_FLUSH: /* XXX: Hack to allow read-only mounts. */ if ((sc->sc_flags & G_GATE_FLAG_READONLY) != 0) { g_io_deliver(bp, EPERM); @@ -580,6 +581,7 @@ g_gate_ioctl(struct cdev *dev, u_long cm switch (bp->bio_cmd) { case BIO_READ: case BIO_DELETE: + case BIO_FLUSH: break; case BIO_WRITE: error = copyout(bp->bio_data, ggio->gctl_data, @@ -643,6 +645,7 @@ start_end: break; case BIO_DELETE: case BIO_WRITE: + case BIO_FLUSH: break; } } From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:00:57 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFA09106564A; Mon, 23 May 2011 21:00:56 +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 E01528FC18; Mon, 23 May 2011 21:00:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NL0uTY037624; Mon, 23 May 2011 21:00:56 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NL0uNN037622; Mon, 23 May 2011 21:00:56 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105232100.p4NL0uNN037622@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 21:00: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: r222226 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:00:57 -0000 Author: yongari Date: Mon May 23 21:00:56 2011 New Revision: 222226 URL: http://svn.freebsd.org/changeset/base/222226 Log: Make sure to enable all clocks before accessing registers. Releasing PHY from power down/COMA is done after enabling all clocks. While I'm here remove unnecessary controller reset. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 23 21:00:37 2011 (r222225) +++ head/sys/dev/msk/if_msk.c Mon May 23 21:00:56 2011 (r222226) @@ -1212,37 +1212,30 @@ msk_phy_power(struct msk_softc *sc, int */ CSR_WRITE_1(sc, B2_Y2_CLK_GATE, val); - val = CSR_PCI_READ_4(sc, PCI_OUR_REG_1); - val &= ~(PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD); + our = CSR_PCI_READ_4(sc, PCI_OUR_REG_1); + our &= ~(PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD); if (sc->msk_hw_id == CHIP_ID_YUKON_XL) { if (sc->msk_hw_rev > CHIP_REV_YU_XL_A1) { /* Deassert Low Power for 1st PHY. */ - val |= PCI_Y2_PHY1_COMA; + our |= PCI_Y2_PHY1_COMA; if (sc->msk_num_port > 1) - val |= PCI_Y2_PHY2_COMA; + our |= PCI_Y2_PHY2_COMA; } } - /* Release PHY from PowerDown/COMA mode. */ - CSR_PCI_WRITE_4(sc, PCI_OUR_REG_1, val); - switch (sc->msk_hw_id) { - case CHIP_ID_YUKON_EC_U: - case CHIP_ID_YUKON_EX: - case CHIP_ID_YUKON_FE_P: - case CHIP_ID_YUKON_UL_2: - case CHIP_ID_YUKON_OPT: - CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); - - /* Enable all clocks. */ - CSR_PCI_WRITE_4(sc, PCI_OUR_REG_3, 0); - our = CSR_PCI_READ_4(sc, PCI_OUR_REG_4); - our &= (PCI_FORCE_ASPM_REQUEST|PCI_ASPM_GPHY_LINK_DOWN| - PCI_ASPM_INT_FIFO_EMPTY|PCI_ASPM_CLKRUN_REQUEST); + if (sc->msk_hw_id == CHIP_ID_YUKON_EC_U || + sc->msk_hw_id == CHIP_ID_YUKON_EX || + sc->msk_hw_id >= CHIP_ID_YUKON_FE_P) { + val = CSR_PCI_READ_4(sc, PCI_OUR_REG_4); + val &= (PCI_FORCE_ASPM_REQUEST | + PCI_ASPM_GPHY_LINK_DOWN | PCI_ASPM_INT_FIFO_EMPTY | + PCI_ASPM_CLKRUN_REQUEST); /* Set all bits to 0 except bits 15..12. */ - CSR_PCI_WRITE_4(sc, PCI_OUR_REG_4, our); - our = CSR_PCI_READ_4(sc, PCI_OUR_REG_5); - our &= PCI_CTL_TIM_VMAIN_AV_MSK; - CSR_PCI_WRITE_4(sc, PCI_OUR_REG_5, our); + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_4, val); + val = CSR_PCI_READ_4(sc, PCI_OUR_REG_5); + val &= PCI_CTL_TIM_VMAIN_AV_MSK; + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_5, val); CSR_PCI_WRITE_4(sc, PCI_CFG_REG_1, 0); + CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_ON); /* * Disable status race, workaround for * Yukon EC Ultra & Yukon EX. @@ -1251,10 +1244,10 @@ msk_phy_power(struct msk_softc *sc, int val |= GLB_GPIO_STAT_RACE_DIS; CSR_WRITE_4(sc, B2_GP_IO, val); CSR_READ_4(sc, B2_GP_IO); - break; - default: - break; } + /* Release PHY from PowerDown/COMA mode. */ + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_1, our); + for (i = 0; i < sc->msk_num_port; i++) { CSR_WRITE_2(sc, MR_ADDR(i, GMAC_LINK_CTRL), GMLC_RST_SET); @@ -1302,8 +1295,6 @@ mskc_reset(struct msk_softc *sc) uint32_t val; int i, initram; - CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); - /* Disable ASF. */ if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { status = CSR_READ_2(sc, B28_Y2_ASF_HCU_CCSR); @@ -1712,6 +1703,9 @@ mskc_attach(device_t dev) } } + /* Enable all clocks before accessing any registers. */ + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_3, 0); + CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); sc->msk_hw_id = CSR_READ_1(sc, B2_CHIP_ID); sc->msk_hw_rev = (CSR_READ_1(sc, B2_MAC_CFG) >> 4) & 0x0f; @@ -1752,9 +1746,6 @@ mskc_attach(device_t dev) resource_int_value(device_get_name(dev), device_get_unit(dev), "int_holdoff", &sc->msk_int_holdoff); - /* Soft reset. */ - CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); - CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); sc->msk_pmd = CSR_READ_1(sc, B2_PMD_TYP); /* Check number of MACs. */ sc->msk_num_port = 1; @@ -2969,6 +2960,7 @@ mskc_resume(device_t dev) MSK_LOCK(sc); + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_3, 0); mskc_reset(sc); for (i = 0; i < sc->msk_num_port; i++) { if (sc->msk_if[i] != NULL && sc->msk_if[i]->msk_ifp != NULL && From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:11:46 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C568C1065670; Mon, 23 May 2011 21:11:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC0E18FC08; Mon, 23 May 2011 21:11:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NLBkvp037984; Mon, 23 May 2011 21:11:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NLBkaB037981; Mon, 23 May 2011 21:11:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105232111.p4NLBkaB037981@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 21:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222227 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:11:47 -0000 Author: yongari Date: Mon May 23 21:11:46 2011 New Revision: 222227 URL: http://svn.freebsd.org/changeset/base/222227 Log: Do not touch ASF related register for controllers that do not have these registers. Also disable Watchdog of ASF microcontroller. Modified: head/sys/dev/msk/if_msk.c head/sys/dev/msk/if_mskreg.h Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 23 21:00:56 2011 (r222226) +++ head/sys/dev/msk/if_msk.c Mon May 23 21:11:46 2011 (r222227) @@ -1296,23 +1296,30 @@ mskc_reset(struct msk_softc *sc) int i, initram; /* Disable ASF. */ - if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { - status = CSR_READ_2(sc, B28_Y2_ASF_HCU_CCSR); - /* Clear AHB bridge & microcontroller reset. */ - status &= ~(Y2_ASF_HCU_CCSR_AHB_RST | - Y2_ASF_HCU_CCSR_CPU_RST_MODE); - /* Clear ASF microcontroller state. */ - status &= ~ Y2_ASF_HCU_CCSR_UC_STATE_MSK; - CSR_WRITE_2(sc, B28_Y2_ASF_HCU_CCSR, status); - } else - CSR_WRITE_1(sc, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET); - CSR_WRITE_2(sc, B0_CTST, Y2_ASF_DISABLE); - - /* - * Since we disabled ASF, S/W reset is required for Power Management. - */ - CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); - CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); + if (sc->msk_hw_id >= CHIP_ID_YUKON_XL && + sc->msk_hw_id <= CHIP_ID_YUKON_SUPR) { + if (sc->msk_hw_id == CHIP_ID_YUKON_EX || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { + CSR_WRITE_4(sc, B28_Y2_CPU_WDOG, 0); + status = CSR_READ_2(sc, B28_Y2_ASF_HCU_CCSR); + /* Clear AHB bridge & microcontroller reset. */ + status &= ~(Y2_ASF_HCU_CCSR_AHB_RST | + Y2_ASF_HCU_CCSR_CPU_RST_MODE); + /* Clear ASF microcontroller state. */ + status &= ~Y2_ASF_HCU_CCSR_UC_STATE_MSK; + status &= ~Y2_ASF_HCU_CCSR_CPU_CLK_DIVIDE_MSK; + CSR_WRITE_2(sc, B28_Y2_ASF_HCU_CCSR, status); + CSR_WRITE_4(sc, B28_Y2_CPU_WDOG, 0); + } else + CSR_WRITE_1(sc, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET); + CSR_WRITE_2(sc, B0_CTST, Y2_ASF_DISABLE); + /* + * Since we disabled ASF, S/W reset is required for + * Power Management. + */ + CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); + CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); + } /* Clear all error bits in the PCI status register. */ status = pci_read_config(sc->msk_dev, PCIR_STATUS, 2); Modified: head/sys/dev/msk/if_mskreg.h ============================================================================== --- head/sys/dev/msk/if_mskreg.h Mon May 23 21:00:56 2011 (r222226) +++ head/sys/dev/msk/if_mskreg.h Mon May 23 21:11:46 2011 (r222227) @@ -677,6 +677,7 @@ /* ASF Subsystem Registers (Yukon-2 only) */ #define B28_Y2_SMB_CONFIG 0x0e40 /* 32 bit ASF SMBus Config Register */ #define B28_Y2_SMB_CSD_REG 0x0e44 /* 32 bit ASF SMB Control/Status/Data */ +#define B28_Y2_CPU_WDOG 0x0e48 /* 32 bit Watchdog Register */ #define B28_Y2_ASF_IRQ_V_BASE 0x0e60 /* 32 bit ASF IRQ Vector Base */ #define B28_Y2_ASF_STAT_CMD 0x0e68 /* 32 bit ASF Status and Command Reg */ #define B28_Y2_ASF_HCU_CCSR 0x0e68 /* 32 bit ASF HCU CCSR (Yukon EX) */ From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:15:20 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 448901065675; Mon, 23 May 2011 21:15:20 +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 344E78FC1D; Mon, 23 May 2011 21:15:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NLFKDG038127; Mon, 23 May 2011 21:15:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NLFK0X038121; Mon, 23 May 2011 21:15:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201105232115.p4NLFK0X038121@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 23 May 2011 21:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222228 - in head/sbin: hastctl hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:15:20 -0000 Author: pjd Date: Mon May 23 21:15:19 2011 New Revision: 222228 URL: http://svn.freebsd.org/changeset/base/222228 Log: Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH requests as well as number of activemap updates. Number of BIO_WRITEs and activemap updates are especially interesting, because if those two are too close to each other, it means that your workload needs bigger number of dirty extents. Activemap should be updated as rarely as possible. MFC after: 1 week Modified: head/sbin/hastctl/hastctl.c head/sbin/hastd/control.c head/sbin/hastd/hast.h head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Mon May 23 21:11:46 2011 (r222227) +++ head/sbin/hastctl/hastctl.c Mon May 23 21:15:19 2011 (r222228) @@ -341,6 +341,17 @@ control_status(struct nv *nv) printf(" dirty: %ju (%NB)\n", (uintmax_t)nv_get_uint64(nv, "dirty%u", ii), (intmax_t)nv_get_uint64(nv, "dirty%u", ii)); + printf(" statistics:\n"); + printf(" reads: %ju\n", + (uint64_t)nv_get_uint64(nv, "stat_read%u", ii)); + printf(" writes: %ju\n", + (uint64_t)nv_get_uint64(nv, "stat_write%u", ii)); + printf(" deletes: %ju\n", + (uint64_t)nv_get_uint64(nv, "stat_delete%u", ii)); + printf(" flushes: %ju\n", + (uint64_t)nv_get_uint64(nv, "stat_flush%u", ii)); + printf(" activemap updates: %ju\n", + (uint64_t)nv_get_uint64(nv, "stat_activemap_update%u", ii)); } return (ret); } Modified: head/sbin/hastd/control.c ============================================================================== --- head/sbin/hastd/control.c Mon May 23 21:11:46 2011 (r222227) +++ head/sbin/hastd/control.c Mon May 23 21:15:19 2011 (r222228) @@ -199,6 +199,16 @@ control_status_worker(struct hast_resour "extentsize%u", no); nv_add_uint32(nvout, nv_get_uint32(cnvin, "keepdirty"), "keepdirty%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_read"), + "stat_read%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_write"), + "stat_write%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_delete"), + "stat_delete%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush"), + "stat_flush%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_activemap_update"), + "stat_activemap_update%u", no); end: if (cnvin != NULL) nv_free(cnvin); @@ -446,6 +456,13 @@ ctrl_thread(void *arg) nv_add_uint32(nvout, (uint32_t)0, "keepdirty"); nv_add_uint64(nvout, (uint64_t)0, "dirty"); } + nv_add_uint64(nvout, res->hr_stat_read, "stat_read"); + nv_add_uint64(nvout, res->hr_stat_write, "stat_write"); + nv_add_uint64(nvout, res->hr_stat_delete, + "stat_delete"); + nv_add_uint64(nvout, res->hr_stat_flush, "stat_flush"); + nv_add_uint64(nvout, res->hr_stat_activemap_update, + "stat_activemap_update"); nv_add_int16(nvout, 0, "error"); break; case CONTROL_RELOAD: Modified: head/sbin/hastd/hast.h ============================================================================== --- head/sbin/hastd/hast.h Mon May 23 21:11:46 2011 (r222227) +++ head/sbin/hastd/hast.h Mon May 23 21:15:19 2011 (r222228) @@ -218,6 +218,17 @@ struct hast_resource { /* Locked used to synchronize access to hr_amp. */ pthread_mutex_t hr_amp_lock; + /* Number of BIO_READ requests. */ + uint64_t hr_stat_read; + /* Number of BIO_WRITE requests. */ + uint64_t hr_stat_write; + /* Number of BIO_DELETE requests. */ + uint64_t hr_stat_delete; + /* Number of BIO_FLUSH requests. */ + uint64_t hr_stat_flush; + /* Number of activemap updates. */ + uint64_t hr_stat_activemap_update; + /* Next resource. */ TAILQ_ENTRY(hast_resource) hr_next; }; Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon May 23 21:11:46 2011 (r222227) +++ head/sbin/hastd/primary.c Mon May 23 21:15:19 2011 (r222228) @@ -1117,6 +1117,7 @@ ggate_recv_thread(void *arg) */ switch (ggio->gctl_cmd) { case BIO_READ: + res->hr_stat_read++; pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queue.", hio); @@ -1145,6 +1146,7 @@ ggate_recv_thread(void *arg) QUEUE_INSERT1(hio, send, ncomp); break; case BIO_WRITE: + res->hr_stat_write++; if (res->hr_resuid == 0) { /* * This is first write, initialize localcnt and @@ -1183,12 +1185,21 @@ ggate_recv_thread(void *arg) mtx_lock(&res->hr_amp_lock); if (activemap_write_start(res->hr_amp, ggio->gctl_offset, ggio->gctl_length)) { + res->hr_stat_activemap_update++; (void)hast_activemap_flush(res); } mtx_unlock(&res->hr_amp_lock); /* FALLTHROUGH */ case BIO_DELETE: case BIO_FLUSH: + switch (ggio->gctl_cmd) { + case BIO_DELETE: + res->hr_stat_delete++; + break; + case BIO_FLUSH: + res->hr_stat_flush++; + break; + } pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Mon May 23 21:11:46 2011 (r222227) +++ head/sbin/hastd/secondary.c Mon May 23 21:15:19 2011 (r222228) @@ -612,6 +612,20 @@ recv_thread(void *arg) QUEUE_INSERT(send, hio); continue; } + switch (hio->hio_cmd) { + case HIO_READ: + res->hr_stat_read++; + break; + case HIO_WRITE: + res->hr_stat_write++; + break; + case HIO_DELETE: + res->hr_stat_delete++; + break; + case HIO_FLUSH: + res->hr_stat_flush++; + break; + } reqlog(LOG_DEBUG, 2, -1, hio, "recv: (%p) Got request header: ", hio); if (hio->hio_cmd == HIO_KEEPALIVE) { From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:21:32 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25029106564A; Mon, 23 May 2011 21:21:32 +0000 (UTC) (envelope-from wb@freebie.xs4all.nl) Received: from smtp-vbr9.xs4all.nl (smtp-vbr9.xs4all.nl [194.109.24.29]) by mx1.freebsd.org (Postfix) with ESMTP id A57CB8FC0A; Mon, 23 May 2011 21:21:31 +0000 (UTC) Received: from freebie.xs4all.nl (freebie.xs4all.nl [82.95.250.254]) by smtp-vbr9.xs4all.nl (8.13.8/8.13.8) with ESMTP id p4NL9GRY096496; Mon, 23 May 2011 23:09:16 +0200 (CEST) (envelope-from wb@freebie.xs4all.nl) Received: by freebie.xs4all.nl (Postfix, from userid 1000) id BA3195C4A; Mon, 23 May 2011 23:09:15 +0200 (CEST) Date: Mon, 23 May 2011 23:09:15 +0200 From: Wilko Bulte To: Poul-Henning Kamp Message-ID: <20110523210915.GA3024@freebie.xs4all.nl> References: <4DD9F0A3.701@FreeBSD.org> <11294.1306133790@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11294.1306133790@critter.freebsd.dk> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:21:32 -0000 Quoting Poul-Henning Kamp, who wrote on Mon, May 23, 2011 at 06:56:30AM +0000 .. > In message <4DD9F0A3.701@FreeBSD.org>, "Andrey V. Elsukov" writes: > > >There is another opinion: > >http://www.boot-us.com/gloss02.htm > > > >"There is the convention that partitions should always start and end on *= > >cylinder boundaries*." > > It is actually more weird than that: > > The rule is that the starting or ending head of one of the four > slices represent the number of heads used to access the drive, and > ditto for sectors. > > This "requirement" dates back to "smart" BIOS'es and ST-506 drives > which couldn't ask the drive for its geometry. WD1003 anyone? Wilko From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:21:35 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA46F1065670; Mon, 23 May 2011 21:21:35 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 733828FC0A; Mon, 23 May 2011 21:21:35 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 4B4BC5DF8; Mon, 23 May 2011 21:21:34 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id p4NLLXKk015052; Mon, 23 May 2011 21:21:33 GMT (envelope-from phk@critter.freebsd.dk) To: Wilko Bulte From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 23 May 2011 23:09:15 +0200." <20110523210915.GA3024@freebie.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1 Date: Mon, 23 May 2011 21:21:33 +0000 Message-ID: <15051.1306185693@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:21:35 -0000 In message <20110523210915.GA3024@freebie.xs4all.nl>, Wilko Bulte writes: >Quoting Poul-Henning Kamp, who wrote on Mon, May 23, 2011 at 06:56:30AM +0000 .. >> This "requirement" dates back to "smart" BIOS'es and ST-506 drives >> which couldn't ask the drive for its geometry. > >WD1003 anyone? Hehe, I just finished unsoldering the flat CMOS RAM chip so I could reboot this computer: http://phk.freebsd.dk/misc/dsc_8927.jpg But that is a WD1007 and an ESDI disk... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:31:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE076106566B; Mon, 23 May 2011 21:31:55 +0000 (UTC) (envelope-from gonzo@launchpad.bluezbox.com) Received: from launchpad.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 581E58FC12; Mon, 23 May 2011 21:31:55 +0000 (UTC) Received: from localhost ([127.0.0.1]) by launchpad.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1QOc36-000Dur-9d; Mon, 23 May 2011 13:48:25 -0700 Message-ID: <4DDAC819.6070407@freebsd.org> Date: Mon, 23 May 2011 13:48:25 -0700 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Qing Li References: <201105201912.p4KJCKdu097098@svn.freebsd.org> In-Reply-To: <201105201912.p4KJCKdu097098@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@launchpad.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 20/05/2011 12:12 PM, Qing Li wrote: > Author: qingli > Date: Fri May 20 19:12:20 2011 > New Revision: 222143 > URL: http://svn.freebsd.org/changeset/base/222143 > > Log: > The statically configured (permanent) ARP entries are removed when an > interface is brought down, even though the interface address is still > valid. This patch maintains the permanent ARP entries as long as the > interface address (having the same prefix as that of the ARP entries) > is valid. > > Reviewed by: delphij > MFC after: 5 days [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222143 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:31:55 -0000 On 20/05/2011 12:12 PM, Qing Li wrote: > Author: qingli > Date: Fri May 20 19:12:20 2011 > New Revision: 222143 > URL: http://svn.freebsd.org/changeset/base/222143 > > Log: > The statically configured (permanent) ARP entries are removed when an > interface is brought down, even though the interface address is still > valid. This patch maintains the permanent ARP entries as long as the > interface address (having the same prefix as that of the ARP entries) > is valid. > > Reviewed by: delphij > MFC after: 5 days This commit breaks netboot with NFS root: bootpc_init: wired to interface 'nlge1' nlge1: [10Mbps] Sending DHCP Discover packet from interface nlge1 (00:0f:30:00:20:4f) nlge1: [1000Mbps] nlge1: link state changed to UP Received DHCP Offer packet on nlge1 from 192.168.5.1 (accepted) (no root path) Sending DHCP Request packet from interface nlge1 (00:0f:30:00:20:4f) Received DHCP Ack packet on nlge1 from 192.168.5.1 (accepted) (got root path) nlge1 at 192.168.5.32 server 192.168.5.1 server name zoo.freebsd.org boot file /zoo/gonzo/lama1/boot/kernel/kernel subnet mask 255.255.255.0 root_server 192.168.5.1 rootfs /zoo/gonzo/lama1 rootopts nolockd Adjusted interface nlge1 Updating packet distribution for SMP Trying to mount root from nfs: []... nlge1: [1000Mbps] panic: nfs_mountroot: SIOCAIFADDR: 17 cpuid = 1 KDB: enter: panic [ thread pid 1 tid 100001 ] Stopped at kdb_enter+0x8c: lui at,0x0 db> From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:32:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 823DE106564A; Mon, 23 May 2011 21:32:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3978FC21; Mon, 23 May 2011 21:32:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NLWjMH038692; Mon, 23 May 2011 21:32:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NLWjvJ038689; Mon, 23 May 2011 21:32:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105232132.p4NLWjvJ038689@svn.freebsd.org> From: Warner Losh Date: Mon, 23 May 2011 21:32: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: r222229 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:32:45 -0000 Author: imp Date: Mon May 23 21:32:45 2011 New Revision: 222229 URL: http://svn.freebsd.org/changeset/base/222229 Log: Test against "no" rather than "yes" for MK_KERNEL_SYMBOLS Also, change DEBUG back to DEBUG_FLAGS in kmod.mk. The latter accidentally snuck in with my backwards compat fix. Submitted by: ru,gcooper Modified: head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Mon May 23 21:15:19 2011 (r222228) +++ head/sys/conf/kern.post.mk Mon May 23 21:32:45 2011 (r222229) @@ -228,7 +228,7 @@ kernel-install: mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} .if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ - (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -241,7 +241,7 @@ kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} .if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ - (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Mon May 23 21:15:19 2011 (r222228) +++ head/sys/conf/kmod.mk Mon May 23 21:32:45 2011 (r222229) @@ -286,8 +286,8 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ - (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") +.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && \ + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} .endif From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:51:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D498E1065673; Mon, 23 May 2011 21:51:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C533E8FC20; Mon, 23 May 2011 21:51:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NLpllv039319; Mon, 23 May 2011 21:51:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NLplgT039316; Mon, 23 May 2011 21:51:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105232151.p4NLplgT039316@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 21:51: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: r222230 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:51:47 -0000 Author: yongari Date: Mon May 23 21:51:47 2011 New Revision: 222230 URL: http://svn.freebsd.org/changeset/base/222230 Log: Add initial support for Marvell 88E8055/88E8075 Yukon Supreme. Modified: head/sys/dev/msk/if_msk.c head/sys/dev/msk/if_mskreg.h Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 23 21:32:45 2011 (r222229) +++ head/sys/dev/msk/if_msk.c Mon May 23 21:51:47 2011 (r222230) @@ -221,6 +221,10 @@ static struct msk_product { "Marvell Yukon 88E8071 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_436C, "Marvell Yukon 88E8072 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_436D, + "Marvell Yukon 88E8055 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4370, + "Marvell Yukon 88E8075 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4380, "Marvell Yukon 88E8057 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4381, @@ -1366,11 +1370,16 @@ mskc_reset(struct msk_softc *sc) CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_RST_SET); CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_RST_CLR); CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_F_LOOPB_OFF); - if (sc->msk_hw_id == CHIP_ID_YUKON_EX) + if (sc->msk_hw_id == CHIP_ID_YUKON_EX || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR) CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | GMC_BYP_RETR_ON); } + + if (sc->msk_hw_id == CHIP_ID_YUKON_SUPR && + sc->msk_hw_rev > CHIP_REV_YU_SU_B0) + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_3, PCI_CLK_MACSEC_DIS); if (sc->msk_hw_id == CHIP_ID_YUKON_OPT && sc->msk_hw_rev == 0) { /* Disable PCIe PHY powerdown(reg 0x80, bit7). */ CSR_WRITE_4(sc, Y2_PEX_PHY_DATA, (0x0080 << 16) | 0x0080); @@ -1719,7 +1728,6 @@ mskc_attach(device_t dev) /* Bail out if chip is not recognized. */ if (sc->msk_hw_id < CHIP_ID_YUKON_XL || sc->msk_hw_id > CHIP_ID_YUKON_OPT || - sc->msk_hw_id == CHIP_ID_YUKON_SUPR || sc->msk_hw_id == CHIP_ID_YUKON_UNKNOWN) { device_printf(dev, "unknown device: id=0x%02x, rev=0x%02x\n", sc->msk_hw_id, sc->msk_hw_rev); @@ -1826,6 +1834,11 @@ mskc_attach(device_t dev) sc->msk_clock = 156; /* 156 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_SUPR: + sc->msk_clock = 125; /* 125 MHz */ + sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 | + MSK_FLAG_AUTOTX_CSUM; + break; case CHIP_ID_YUKON_UL_2: sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; @@ -3729,7 +3742,8 @@ msk_init_locked(struct msk_if_softc *sc_ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_SET); CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_CLR); CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_F_LOOPB_OFF); - if (sc->msk_hw_id == CHIP_ID_YUKON_EX) + if (sc->msk_hw_id == CHIP_ID_YUKON_EX || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR) CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | GMC_BYP_RETR_ON); @@ -3924,7 +3938,8 @@ msk_init_locked(struct msk_if_softc *sc_ msk_stop(sc_if); return; } - if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { + if (sc->msk_hw_id == CHIP_ID_YUKON_EX || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { /* Disable flushing of non-ASF packets. */ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_RX_MACSEC_FLUSH_OFF); Modified: head/sys/dev/msk/if_mskreg.h ============================================================================== --- head/sys/dev/msk/if_mskreg.h Mon May 23 21:32:45 2011 (r222229) +++ head/sys/dev/msk/if_mskreg.h Mon May 23 21:51:47 2011 (r222230) @@ -144,6 +144,8 @@ #define DEVICEID_MRVL_436A 0x436A #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C +#define DEVICEID_MRVL_436D 0x436D +#define DEVICEID_MRVL_4370 0x4370 #define DEVICEID_MRVL_4380 0x4380 #define DEVICEID_MRVL_4381 0x4381 @@ -321,6 +323,9 @@ #define PCI_OS_SPD_X100 2 /* PCI-X 100MHz Bus */ #define PCI_OS_SPD_X133 3 /* PCI-X 133MHz Bus */ +/* PCI_OUR_REG_3 32 bit Our Register 3 (Yukon-ECU only) */ +#define PCI_CLK_MACSEC_DIS BIT_17 /* Disable Clock MACSec. */ + /* PCI_OUR_REG_4 32 bit Our Register 4 (Yukon-ECU only) */ #define PCI_TIMER_VALUE_MSK (0xff<<16) /* Bit 23..16: Timer Value Mask */ #define PCI_FORCE_ASPM_REQUEST BIT_15 /* Force ASPM Request (A1 only) */ @@ -919,6 +924,10 @@ #define CHIP_REV_YU_EX_A0 1 /* Chip Rev. for Yukon-2 EX A0 */ #define CHIP_REV_YU_EX_B0 2 /* Chip Rev. for Yukon-2 EX B0 */ +#define CHIP_REV_YU_SU_A0 0 /* Chip Rev. for Yukon-2 SUPR A0 */ +#define CHIP_REV_YU_SU_B0 1 /* Chip Rev. for Yukon-2 SUPR B0 */ +#define CHIP_REV_YU_SU_B1 3 /* Chip Rev. for Yukon-2 SUPR B1 */ + /* B2_Y2_CLK_GATE 8 bit Clock Gating (Yukon-2 only) */ #define Y2_STATUS_LNK2_INAC BIT_7 /* Status Link 2 inactiv (0 = activ) */ #define Y2_CLK_GAT_LNK2_DIS BIT_6 /* Disable clock gating Link 2 */ From owner-svn-src-head@FreeBSD.ORG Mon May 23 21:56:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4031E1065708; Mon, 23 May 2011 21:56:05 +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 315998FC15; Mon, 23 May 2011 21:56:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NLu5hH039489; Mon, 23 May 2011 21:56:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NLu5EX039487; Mon, 23 May 2011 21:56:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105232156.p4NLu5EX039487@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 21:56: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: r222231 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 21:56:05 -0000 Author: yongari Date: Mon May 23 21:56:04 2011 New Revision: 222231 URL: http://svn.freebsd.org/changeset/base/222231 Log: When MTU is changed, check whether driver should be reinitialized or not. If reinitialized is required, clear driver running flag. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 23 21:51:47 2011 (r222230) +++ head/sys/dev/msk/if_msk.c Mon May 23 21:56:04 2011 (r222231) @@ -1034,7 +1034,10 @@ msk_ioctl(struct ifnet *ifp, u_long comm } } ifp->if_mtu = ifr->ifr_mtu; - msk_init_locked(sc_if); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + msk_init_locked(sc_if); + } } MSK_IF_UNLOCK(sc_if); break; From owner-svn-src-head@FreeBSD.ORG Mon May 23 22:02:15 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF936106564A; Mon, 23 May 2011 22:02:15 +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 E0A978FC13; Mon, 23 May 2011 22:02:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NM2F4h039728; Mon, 23 May 2011 22:02:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NM2FXF039726; Mon, 23 May 2011 22:02:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105232202.p4NM2FXF039726@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 May 2011 22:02: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: r222232 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 22:02:16 -0000 Author: yongari Date: Mon May 23 22:02:15 2011 New Revision: 222232 URL: http://svn.freebsd.org/changeset/base/222232 Log: Add 88E8075 Yukon Supreme to the list of supported hardware list. Modified: head/share/man/man4/msk.4 Modified: head/share/man/man4/msk.4 ============================================================================== --- head/share/man/man4/msk.4 Mon May 23 21:56:04 2011 (r222231) +++ head/share/man/man4/msk.4 Mon May 23 22:02:15 2011 (r222232) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 23, 2010 +.Dd May 23, 2011 .Dt MSK 4 .Os .Sh NAME @@ -195,6 +195,8 @@ Marvell Yukon 88E8071 Gigabit Ethernet .It Marvell Yukon 88E8072 Gigabit Ethernet .It +Marvell Yukon 88E8075 Gigabit Ethernet +.It SysKonnect SK-9Sxx Gigabit Ethernet .It SysKonnect SK-9Exx Gigabit Ethernet From owner-svn-src-head@FreeBSD.ORG Mon May 23 22:31:42 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AABED1065678; Mon, 23 May 2011 22:31:42 +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 9B6A08FC14; Mon, 23 May 2011 22:31:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NMVgT1040590; Mon, 23 May 2011 22:31:42 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NMVg61040588; Mon, 23 May 2011 22:31:42 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105232231.p4NMVg61040588@svn.freebsd.org> From: Rick Macklem Date: Mon, 23 May 2011 22:31: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: r222233 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 22:31:42 -0000 Author: rmacklem Date: Mon May 23 22:31:42 2011 New Revision: 222233 URL: http://svn.freebsd.org/changeset/base/222233 Log: Set the MNT_NFS4ACLS flag for an NFSv4 client mount if the NFSv4 server supports it. Requested by trasz. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon May 23 22:02:15 2011 (r222232) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon May 23 22:31:42 2011 (r222233) @@ -79,6 +79,7 @@ FEATURE(nfscl, "NFSv4 client"); extern int nfscl_ticks; extern struct timeval nfsboottime; extern struct nfsstats newnfsstats; +extern int nfsrv_useacl; MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "New NFS request header"); MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "New NFS mount struct"); @@ -1331,6 +1332,15 @@ mountnfs(struct nfs_args *argp, struct m if (argp->flags & NFSMNT_NFSV3) ncl_fsinfo(nmp, *vpp, cred, td); + /* Mark if the mount point supports NFSv4 ACLs. */ + if ((argp->flags & NFSMNT_NFSV4) != 0 && nfsrv_useacl != 0 && + ret == 0 && + NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL)) { + MNT_ILOCK(mp); + mp->mnt_flag |= MNT_NFS4ACLS; + MNT_IUNLOCK(mp); + } + /* * Lose the lock but keep the ref. */ From owner-svn-src-head@FreeBSD.ORG Mon May 23 23:35:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A647C106566B; Mon, 23 May 2011 23:35:50 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C1C08FC15; Mon, 23 May 2011 23:35:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NNZoOq042546; Mon, 23 May 2011 23:35:50 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NNZoMJ042544; Mon, 23 May 2011 23:35:50 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105232335.p4NNZoMJ042544@svn.freebsd.org> From: Attilio Rao Date: Mon, 23 May 2011 23:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222234 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 23:35:50 -0000 Author: attilio Date: Mon May 23 23:35:50 2011 New Revision: 222234 URL: http://svn.freebsd.org/changeset/base/222234 Log: Merge r221846 from largeSMP project branch: Fix arguments passing to _long() version of atomic function for mips. The native implementation is bogus in that regard and offers the same problem solved for powerpc as r222198, but mips' guys just wanted a small and self-contained patch for mips rather than rewriting the whole support. Reviewed by: art, imp Tested by: gonzo MFC after: 2 weeks Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Mon May 23 22:31:42 2011 (r222233) +++ head/sys/mips/include/atomic.h Mon May 23 23:35:50 2011 (r222234) @@ -581,32 +581,47 @@ atomic_fetchadd_64(__volatile uint64_t * #else /* !__mips_n64 */ /* Operations on longs. */ -#define atomic_set_long atomic_set_32 -#define atomic_set_acq_long atomic_set_acq_32 -#define atomic_set_rel_long atomic_set_rel_32 -#define atomic_clear_long atomic_clear_32 -#define atomic_clear_acq_long atomic_clear_acq_32 -#define atomic_clear_rel_long atomic_clear_rel_32 -#define atomic_add_long(p, v) \ +#define atomic_set_long(p, v) \ + atomic_set_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_set_acq_long(p, v) \ + atomic_set_acq_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_set_rel_long(p, v) \ + atomic_set_rel_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_clear_long(p, v) \ + atomic_clear_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_clear_acq_long(p, v) \ + atomic_clear_acq_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_clear_rel_long(p, v) \ + atomic_clear_rel_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_add_long(p, v) \ atomic_add_32((volatile u_int *)(p), (u_int)(v)) -#define atomic_add_acq_long atomic_add_acq_32 -#define atomic_add_rel_long atomic_add_rel_32 -#define atomic_subtract_long(p, v) \ +#define atomic_add_acq_long(p, v) \ + atomic_add_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_add_rel_long(p, v) \ + atomic_add_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_subtract_long(p, v) \ atomic_subtract_32((volatile u_int *)(p), (u_int)(v)) -#define atomic_subtract_acq_long atomic_subtract_acq_32 -#define atomic_subtract_rel_long atomic_subtract_rel_32 -#define atomic_cmpset_long atomic_cmpset_32 -#define atomic_cmpset_acq_long(p, cmpval, newval) \ - atomic_cmpset_acq_32((volatile u_int *)(p), \ - (u_int)(cmpval), (u_int)(newval)) -#define atomic_cmpset_rel_long(p, cmpval, newval) \ - atomic_cmpset_rel_32((volatile u_int *)(p), \ - (u_int)(cmpval), (u_int)(newval)) -#define atomic_load_acq_long atomic_load_acq_32 -#define atomic_store_rel_long atomic_store_rel_32 -#define atomic_fetchadd_long(p, v) \ +#define atomic_subtract_acq_long(p, v) \ + atomic_subtract_acq_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_subtract_rel_long(p, v) \ + atomic_subtract_rel_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_cmpset_long(p, cmpval, newval) \ + atomic_cmpset_32((volatile u_int *)(p), (u_int)(cmpval), \ + (u_int)(newval)) +#define atomic_cmpset_acq_long(p, cmpval, newval) \ + atomic_cmpset_acq_32((volatile u_int *)(p), (u_int)(cmpval), \ + (u_int)(newval)) +#define atomic_cmpset_rel_long(p, cmpval, newval) \ + atomic_cmpset_rel_32((volatile u_int *)(p), (u_int)(cmpval), \ + (u_int)(newval)) +#define atomic_load_acq_long(p) \ + (u_long)atomic_load_acq_32((volatile u_int *)(p)) +#define atomic_store_rel_long(p, v) \ + atomic_store_rel_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_fetchadd_long(p, v) \ atomic_fetchadd_32((volatile u_int *)(p), (u_int)(v)) -#define atomic_readandclear_long atomic_readandclear_32 +#define atomic_readandclear_long(p) \ + atomic_readandclear_32((volatile u_int *)(p)) #endif /* __mips_n64 */ From owner-svn-src-head@FreeBSD.ORG Tue May 24 02:19:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A68171065674; Tue, 24 May 2011 02:19:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CA868FC14; Tue, 24 May 2011 02:19:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O2JjtX047490; Tue, 24 May 2011 02:19:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O2Jj4Y047488; Tue, 24 May 2011 02:19:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105240219.p4O2Jj4Y047488@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 24 May 2011 02:19: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: r222239 - head/sys/powerpc/ps3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 02:19:45 -0000 Author: nwhitehorn Date: Tue May 24 02:19:45 2011 New Revision: 222239 URL: http://svn.freebsd.org/changeset/base/222239 Log: Add RTC support for the LV1 clock on the PS3. The hypervisor won't let us set it, but it's better than nothing. Modified: head/sys/powerpc/ps3/ps3bus.c Modified: head/sys/powerpc/ps3/ps3bus.c ============================================================================== --- head/sys/powerpc/ps3/ps3bus.c Tue May 24 01:08:53 2011 (r222238) +++ head/sys/powerpc/ps3/ps3bus.c Tue May 24 02:19:45 2011 (r222239) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ #include "ps3bus.h" #include "ps3-hvcall.h" #include "iommu_if.h" +#include "clock_if.h" static void ps3bus_identify(driver_t *, device_t); static int ps3bus_probe(device_t); @@ -63,6 +65,8 @@ static int ps3_iommu_map(device_t dev, b bus_size_t boundary, void *cookie); static int ps3_iommu_unmap(device_t dev, bus_dma_segment_t *segs, int nsegs, void *cookie); +static int ps3_gettime(device_t dev, struct timespec *ts); +static int ps3_settime(device_t dev, struct timespec *ts); struct ps3bus_devinfo { int bus; @@ -106,6 +110,10 @@ static device_method_t ps3bus_methods[] DEVMETHOD(iommu_map, ps3_iommu_map), DEVMETHOD(iommu_unmap, ps3_iommu_unmap), + /* Clock interface */ + DEVMETHOD(clock_gettime, ps3_gettime), + DEVMETHOD(clock_settime, ps3_settime), + { 0, 0 } }; @@ -312,6 +320,8 @@ ps3bus_attach(device_t self) device_set_ivars(cdev, dinfo); } } + + clock_register(self, 1000); return (bus_generic_attach(self)); } @@ -551,7 +561,6 @@ ps3_iommu_map(device_t dev, bus_dma_segm return (0); } - static int ps3_iommu_unmap(device_t dev, bus_dma_segment_t *segs, int nsegs, void *cookie) { @@ -559,3 +568,26 @@ ps3_iommu_unmap(device_t dev, bus_dma_se return (0); } +#define Y2K 946684800 + +static int +ps3_gettime(device_t dev, struct timespec *ts) +{ + uint64_t rtc, tb; + int result; + + result = lv1_get_rtc(&rtc, &tb); + if (result) + return (result); + + ts->tv_sec = rtc + Y2K; + ts->tv_nsec = 0; + return (0); +} + +static int +ps3_settime(device_t dev, struct timespec *ts) +{ + return (-1); +} + From owner-svn-src-head@FreeBSD.ORG Tue May 24 05:34:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC39D106566B; Tue, 24 May 2011 05:34:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C33AB8FC18; Tue, 24 May 2011 05:34:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O5YjkG053520; Tue, 24 May 2011 05:34:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O5YjXM053518; Tue, 24 May 2011 05:34:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105240534.p4O5YjXM053518@svn.freebsd.org> From: Adrian Chadd Date: Tue, 24 May 2011 05:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222240 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 05:34:46 -0000 Author: adrian Date: Tue May 24 05:34:45 2011 New Revision: 222240 URL: http://svn.freebsd.org/changeset/base/222240 Log: Add in descriptions for TX descriptor fields ctl8-11 - these fields control the antenna control bits for the four TX series and the TPC settings for TX series 1, 2, 3. The specifics: * The TPC setting for TX series 0 is handled in ctl0. * TPC is currently disabled, so the per-packet TX power is set via the global per-rate TX power register, not per packet. * The antenna control bits don't matter for AR5416 and later so they should stay 0 (which they currently do); they may be set for Kite but as there's no TX diversity supported at the moment (it requires the NIC to be built with an external antenna switch, matching how antenna diversity is done on legacy NICs), so again keep them 0. This is in preparation for supporting per-rate TPC on the AR5416 and later. The Kite (and soon to come Kiwi) code sets ctl8-11 to 0x0, which doesn't have any effect at the moment. When TPC is enabled it would result in the second, third and fourth TX series attmpts to be done with a TX power of 0. This commit doesn't change that; it'll be followed up with some commits to properly set the TPC registers appropriately. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Tue May 24 02:19:45 2011 (r222239) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Tue May 24 05:34:45 2011 (r222240) @@ -205,6 +205,29 @@ struct ar5416_desc { #define AR_STBC2 0x40000000 #define AR_STBC3 0x80000000 +/* ds_ctl8 */ +#define AR_AntCtl0 0x00ffffff +#define AR_AntCtl0_S 0 +/* Xmit 0 TPC is AR_XmitPower in ctl0 */ + +/* ds_ctl9 */ +#define AR_AntCtl1 0x00ffffff +#define AR_AntCtl1_S 0 +#define AR_XmitPower1 0xff000000 +#define AR_XmitPower1_S 24 + +/* ds_ctl10 */ +#define AR_AntCtl2 0x00ffffff +#define AR_AntCtl2_S 0 +#define AR_XmitPower2 0xff000000 +#define AR_XmitPower2_S 24 + +/* ds_ctl11 */ +#define AR_AntCtl3 0x00ffffff +#define AR_AntCtl3_S 0 +#define AR_XmitPower3 0xff000000 +#define AR_XmitPower3_S 24 + /************* * TX Status * *************/ From owner-svn-src-head@FreeBSD.ORG Tue May 24 05:49:03 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E15F7106564A; Tue, 24 May 2011 05:49:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7F6E8FC20; Tue, 24 May 2011 05:49:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O5n2rA053979; Tue, 24 May 2011 05:49:02 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O5n2wk053977; Tue, 24 May 2011 05:49:02 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105240549.p4O5n2wk053977@svn.freebsd.org> From: Adrian Chadd Date: Tue, 24 May 2011 05:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222241 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 05:49:03 -0000 Author: adrian Date: Tue May 24 05:49:02 2011 New Revision: 222241 URL: http://svn.freebsd.org/changeset/base/222241 Log: Use the new per-series antenna and TPC definitions when setting ctl8->11. This should hopefully make it clearer to developers what is going on and when TPC is being hacked on, make it obvious why it isn't working for series 1, 2, 3. I won't flip on setting TX power for TX series 1, 2, 3 until I've done some further testing with Kite to ensure it doesn't break anything. (Before people ask - yes, TPC is only needed for 5ghz regdomains and yes, Kite is a 2.4ghz only chip, but there are potential use cases for 2ghz TPC. I just need to sit down and ensure it's supported and functional.) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue May 24 05:34:45 2011 (r222240) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue May 24 05:49:02 2011 (r222241) @@ -208,10 +208,11 @@ ar5416SetupTxDesc(struct ath_hal *ah, st | SM(ahp->ah_tx_chainmask, AR_ChainSel2) | SM(ahp->ah_tx_chainmask, AR_ChainSel3) ; - ads->ds_ctl8 = 0; - ads->ds_ctl9 = (txPower << 24); /* XXX? */ - ads->ds_ctl10 = (txPower << 24); /* XXX? */ - ads->ds_ctl11 = (txPower << 24); /* XXX? */ + ads->ds_ctl8 = SM(0, AR_AntCtl0); + ads->ds_ctl9 = SM(0, AR_AntCtl1) | SM(txPower, AR_XmitPower1); + ads->ds_ctl10 = SM(0, AR_AntCtl2) | SM(txPower, AR_XmitPower2); + ads->ds_ctl11 = SM(0, AR_AntCtl3) | SM(txPower, AR_XmitPower3); + if (keyIx != HAL_TXKEYIX_INVALID) { /* XXX validate key index */ ads->ds_ctl1 |= SM(keyIx, AR_DestIdx); @@ -232,11 +233,16 @@ ar5416SetupTxDesc(struct ath_hal *ah, st ads->ds_ctl7 |= (rtsctsRate << AR_RTSCTSRate_S); } + /* + * Set the TX antenna to 0 for Kite + * To preserve existing behaviour, also set the TPC bits to 0; + * when TPC is enabled these should be filled in appropriately. + */ if (AR_SREV_KITE(ah)) { - ads->ds_ctl8 = 0; - ads->ds_ctl9 = 0; - ads->ds_ctl10 = 0; - ads->ds_ctl11 = 0; + ads->ds_ctl8 = SM(0, AR_AntCtl0); + ads->ds_ctl9 = SM(0, AR_AntCtl1) | SM(0, AR_XmitPower1); + ads->ds_ctl10 = SM(0, AR_AntCtl2) | SM(0, AR_XmitPower2); + ads->ds_ctl11 = SM(0, AR_AntCtl3) | SM(0, AR_XmitPower3); } return AH_TRUE; #undef RTSCTS @@ -410,10 +416,10 @@ ar5416SetupFirstTxDesc(struct ath_hal *a | SM(AH5416(ah)->ah_tx_chainmask, AR_ChainSel3); /* NB: no V1 WAR */ - ads->ds_ctl8 = 0; - ads->ds_ctl9 = (txPower << 24); - ads->ds_ctl10 = (txPower << 24); - ads->ds_ctl11 = (txPower << 24); + ads->ds_ctl8 = SM(0, AR_AntCtl0); + ads->ds_ctl9 = SM(0, AR_AntCtl1) | SM(txPower, AR_XmitPower1); + ads->ds_ctl10 = SM(0, AR_AntCtl2) | SM(txPower, AR_XmitPower2); + ads->ds_ctl11 = SM(0, AR_AntCtl3) | SM(txPower, AR_XmitPower3); ads->ds_ctl6 &= ~(0xffff); ads->ds_ctl6 |= SM(aggrLen, AR_AggrLen); @@ -424,11 +430,16 @@ ar5416SetupFirstTxDesc(struct ath_hal *a | (flags & HAL_TXDESC_RTSENA ? AR_RTSEnable : 0); } + /* + * Set the TX antenna to 0 for Kite + * To preserve existing behaviour, also set the TPC bits to 0; + * when TPC is enabled these should be filled in appropriately. + */ if (AR_SREV_KITE(ah)) { - ads->ds_ctl8 = 0; - ads->ds_ctl9 = 0; - ads->ds_ctl10 = 0; - ads->ds_ctl11 = 0; + ads->ds_ctl8 = SM(0, AR_AntCtl0); + ads->ds_ctl9 = SM(0, AR_AntCtl1) | SM(0, AR_XmitPower1); + ads->ds_ctl10 = SM(0, AR_AntCtl2) | SM(0, AR_XmitPower2); + ads->ds_ctl11 = SM(0, AR_AntCtl3) | SM(0, AR_XmitPower3); } return AH_TRUE; From owner-svn-src-head@FreeBSD.ORG Tue May 24 06:44:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11BFC1065670; Tue, 24 May 2011 06:44:17 +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 02C4C8FC16; Tue, 24 May 2011 06:44:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O6iGQn055621; Tue, 24 May 2011 06:44:16 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O6iGG9055619; Tue, 24 May 2011 06:44:16 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105240644.p4O6iGG9055619@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 May 2011 06:44: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: r222243 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 06:44:17 -0000 Author: ae Date: Tue May 24 06:44:16 2011 New Revision: 222243 URL: http://svn.freebsd.org/changeset/base/222243 Log: Remove unused variable. MFC after: 1 week Modified: head/sys/geom/part/g_part_mbr.c Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Tue May 24 06:14:16 2011 (r222242) +++ head/sys/geom/part/g_part_mbr.c Tue May 24 06:44:16 2011 (r222243) @@ -251,14 +251,11 @@ g_part_mbr_bootcode(struct g_part_table static int g_part_mbr_create(struct g_part_table *basetable, struct g_part_parms *gpp) { - struct g_consumer *cp; struct g_provider *pp; struct g_part_mbr_table *table; uint32_t msize; pp = gpp->gpp_provider; - cp = LIST_FIRST(&pp->consumers); - if (pp->sectorsize < MBRSIZE) return (ENOSPC); From owner-svn-src-head@FreeBSD.ORG Tue May 24 06:46:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E65D1106564A; Tue, 24 May 2011 06:46:07 +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 D78398FC12; Tue, 24 May 2011 06:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O6k74j055714; Tue, 24 May 2011 06:46:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O6k7Tq055712; Tue, 24 May 2011 06:46:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105240646.p4O6k7Tq055712@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 May 2011 06:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222244 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 06:46:08 -0000 Author: ae Date: Tue May 24 06:46:07 2011 New Revision: 222244 URL: http://svn.freebsd.org/changeset/base/222244 Log: Remove unused variable. MFC after: 1 week Modified: head/sys/geom/part/g_part_pc98.c Modified: head/sys/geom/part/g_part_pc98.c ============================================================================== --- head/sys/geom/part/g_part_pc98.c Tue May 24 06:44:16 2011 (r222243) +++ head/sys/geom/part/g_part_pc98.c Tue May 24 06:46:07 2011 (r222244) @@ -246,14 +246,11 @@ g_part_pc98_bootcode(struct g_part_table static int g_part_pc98_create(struct g_part_table *basetable, struct g_part_parms *gpp) { - struct g_consumer *cp; struct g_provider *pp; struct g_part_pc98_table *table; uint32_t cyl, msize; pp = gpp->gpp_provider; - cp = LIST_FIRST(&pp->consumers); - if (pp->sectorsize < SECSIZE || pp->mediasize < BOOTSIZE) return (ENOSPC); if (pp->sectorsize > SECSIZE) From owner-svn-src-head@FreeBSD.ORG Tue May 24 06:56:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 160A9106564A; Tue, 24 May 2011 06:56:41 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 070FF8FC15; Tue, 24 May 2011 06:56:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O6ueWP056053; Tue, 24 May 2011 06:56:40 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O6uep5056051; Tue, 24 May 2011 06:56:40 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105240656.p4O6uep5056051@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 24 May 2011 06:56:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222245 - head/usr.bin/showmount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 06:56:41 -0000 Author: ru Date: Tue May 24 06:56:40 2011 New Revision: 222245 URL: http://svn.freebsd.org/changeset/base/222245 Log: Ensure there is a whitespace after a mount point. PR: 157286 Submitted by: Marcus Reid MFC after: 3 days Modified: head/usr.bin/showmount/showmount.c Modified: head/usr.bin/showmount/showmount.c ============================================================================== --- head/usr.bin/showmount/showmount.c Tue May 24 06:46:07 2011 (r222244) +++ head/usr.bin/showmount/showmount.c Tue May 24 06:56:40 2011 (r222245) @@ -185,7 +185,7 @@ main(int argc, char **argv) printf("Exports list on %s:\n", host); exp = exportslist; while (exp) { - printf("%-35s", exp->ex_dirp); + printf("%-34s ", exp->ex_dirp); grp = exp->ex_groups; if (grp == NULL) { printf("Everyone\n"); From owner-svn-src-head@FreeBSD.ORG Tue May 24 07:57:28 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE27E1065675; Tue, 24 May 2011 07:57:28 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BED318FC17; Tue, 24 May 2011 07:57:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O7vS35057907; Tue, 24 May 2011 07:57:28 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O7vSo9057905; Tue, 24 May 2011 07:57:28 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105240757.p4O7vSo9057905@svn.freebsd.org> From: Marko Zec Date: Tue, 24 May 2011 07:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222246 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 07:57:29 -0000 Author: zec Date: Tue May 24 07:57:28 2011 New Revision: 222246 URL: http://svn.freebsd.org/changeset/base/222246 Log: Let epair(4) virtual interfaces report fake link / media status, by borrowing the skeleton of if_media manipulation and reporting code from if_lagg(4). The main motivation behind this change is to allow for epair(4) interfaces to participate in STP if_bridge(4) configurations. Reviewed by: bz MFC after: 3 days Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Tue May 24 06:56:40 2011 (r222245) +++ head/sys/net/if_epair.c Tue May 24 07:57:28 2011 (r222246) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -92,6 +93,8 @@ static struct mbuf *epair_nh_m2cpuid(str static void epair_nh_drainedcpu(u_int); static void epair_start_locked(struct ifnet *); +static int epair_media_change(struct ifnet *); +static void epair_media_status(struct ifnet *, struct ifmediareq *); static int epair_clone_match(struct if_clone *, const char *); static int epair_clone_create(struct if_clone *, char *, size_t, caddr_t); @@ -127,6 +130,7 @@ SYSCTL_PROC(_net_link_epair, OID_AUTO, n struct epair_softc { struct ifnet *ifp; /* This ifp. */ struct ifnet *oifp; /* other ifp of pair. */ + struct ifmedia media; /* Media config (fake). */ u_int refcount; /* # of mbufs in flight. */ u_int cpuid; /* CPU ID assigned upon creation. */ void (*if_qflush)(struct ifnet *); @@ -611,8 +615,25 @@ epair_qflush(struct ifnet *ifp) } static int +epair_media_change(struct ifnet *ifp __unused) +{ + + /* Do nothing. */ + return (0); +} + +static void +epair_media_status(struct ifnet *ifp __unused, struct ifmediareq *imr) +{ + + imr->ifm_status = IFM_AVALID | IFM_ACTIVE; + imr->ifm_active = IFM_ETHER | IFM_10G_T | IFM_FDX; +} + +static int epair_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { + struct epair_softc *sc; struct ifreq *ifr; int error; @@ -624,6 +645,12 @@ epair_ioctl(struct ifnet *ifp, u_long cm error = 0; break; + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + sc = ifp->if_softc; + error = ifmedia_ioctl(ifp, ifr, &sc->media, cmd); + break; + case SIOCSIFMTU: /* We basically allow all kinds of MTUs. */ ifp->if_mtu = ifr->ifr_mtu; @@ -829,6 +856,14 @@ epair_clone_create(struct if_clone *ifc, strlcpy(name, sca->ifp->if_xname, len); DPRINTF("name='%s/%db' created sca=%p scb=%p\n", name, unit, sca, scb); + /* Initialise pseudo media types. */ + ifmedia_init(&sca->media, 0, epair_media_change, epair_media_status); + ifmedia_add(&sca->media, IFM_ETHER | IFM_10G_T, 0, NULL); + ifmedia_set(&sca->media, IFM_ETHER | IFM_10G_T); + ifmedia_init(&scb->media, 0, epair_media_change, epair_media_status); + ifmedia_add(&scb->media, IFM_ETHER | IFM_10G_T, 0, NULL); + ifmedia_set(&scb->media, IFM_ETHER | IFM_10G_T); + /* Tell the world, that we are ready to rock. */ sca->ifp->if_drv_flags |= IFF_DRV_RUNNING; scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -895,6 +930,8 @@ epair_clone_destroy(struct if_clone *ifc if_free(oifp); CURVNET_RESTORE(); if_free(ifp); + ifmedia_removeall(&sca->media); + ifmedia_removeall(&scb->media); free(scb, M_EPAIR); free(sca, M_EPAIR); ifc_free_unit(ifc, unit); From owner-svn-src-head@FreeBSD.ORG Tue May 24 08:02:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60F371065670; Tue, 24 May 2011 08:02:55 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 524DD8FC1D; Tue, 24 May 2011 08:02:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O82tQn058124; Tue, 24 May 2011 08:02:55 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O82txA058122; Tue, 24 May 2011 08:02:55 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105240802.p4O82txA058122@svn.freebsd.org> From: Marko Zec Date: Tue, 24 May 2011 08:02:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222247 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 08:02:55 -0000 Author: zec Date: Tue May 24 08:02:55 2011 New Revision: 222247 URL: http://svn.freebsd.org/changeset/base/222247 Log: Allow for vlan(4) interfaces with MTU of 1500 bytes to be configured on top of epair(4) virtual interfaces, since there's no physical hardware associated with epair interfaces which would imply any constraints on MTU sizes. MFC after: 3 days Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Tue May 24 07:57:28 2011 (r222246) +++ head/sys/net/if_epair.c Tue May 24 08:02:55 2011 (r222247) @@ -810,6 +810,8 @@ epair_clone_create(struct if_clone *ifc, ifp->if_dname = ifc->ifc_name; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_capabilities = IFCAP_VLAN_MTU; + ifp->if_capenable = IFCAP_VLAN_MTU; ifp->if_start = epair_start; ifp->if_ioctl = epair_ioctl; ifp->if_init = epair_init; @@ -834,6 +836,8 @@ epair_clone_create(struct if_clone *ifc, ifp->if_dname = ifc->ifc_name; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_capabilities = IFCAP_VLAN_MTU; + ifp->if_capenable = IFCAP_VLAN_MTU; ifp->if_start = epair_start; ifp->if_ioctl = epair_ioctl; ifp->if_init = epair_init; From owner-svn-src-head@FreeBSD.ORG Tue May 24 09:01:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F27071065672; Tue, 24 May 2011 09:01:56 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E344F8FC19; Tue, 24 May 2011 09:01:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4O91usL059896; Tue, 24 May 2011 09:01:56 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4O91uha059894; Tue, 24 May 2011 09:01:56 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201105240901.p4O91uha059894@svn.freebsd.org> From: Bruce Cran Date: Tue, 24 May 2011 09:01: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: r222248 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 09:01:57 -0000 Author: brucec Date: Tue May 24 09:01:56 2011 New Revision: 222248 URL: http://svn.freebsd.org/changeset/base/222248 Log: Remove an outdated comment as requested by Bruce Evans in a private email to Alexander Best (arundel@). For clang, -fdiagnostics-show-option is enabled by default, but for gcc it isn't. This option will report which -W* flag was responsible for triggering a certain warning. This will bring gcc warnings closer to the ones clang emits and might also help developers track down tinderbox failures a bit quicker. Submitted by: arundel Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue May 24 08:02:55 2011 (r222247) +++ head/sys/conf/kern.mk Tue May 24 09:01:56 2011 (r222248) @@ -1,15 +1,12 @@ # $FreeBSD$ # -# Warning flags for compiling the kernel and components of the kernel. +# Warning flags for compiling the kernel and components of the kernel: # -# Note that the newly added -Wcast-qual is responsible for generating -# most of the remaining warnings. Warnings introduced with -Wall will -# also pop up, but are easier to fix. CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -fformat-extensions \ - -Wmissing-include-dirs + -Wmissing-include-dirs -fdiagnostics-show-option # # The following flags are next up for working on: # -Wextra From owner-svn-src-head@FreeBSD.ORG Tue May 24 09:22:49 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F33C1065679 for ; Tue, 24 May 2011 09:22:49 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.freebsd.org (Postfix) with SMTP id 96AA28FC1A for ; Tue, 24 May 2011 09:22:47 +0000 (UTC) Received: (qmail 81700 invoked from network); 24 May 2011 09:22:45 -0000 Received: from unknown (HELO alex.andxor.it) (192.168.2.30) by andxor.it with SMTP; 24 May 2011 09:22:45 -0000 Message-ID: <4DDB78E5.3@FreeBSD.org> Date: Tue, 24 May 2011 11:22:45 +0200 From: Alex Dupre User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; it; rv:1.9.1.19) Gecko/20110509 SeaMonkey/2.0.14 MIME-Version: 1.0 To: Dimitry Andric References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> <20110522213058.GB21144@lonesome.com> <22621AEF-6EF3-4E07-8CBD-57D5037A7DEA@bsdimp.com> <4DDAB729.8020902@FreeBSD.org> In-Reply-To: <4DDAB729.8020902@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, "Bjoern A. Zeeb" , Warner Losh , src-committers@FreeBSD.org Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 09:22:49 -0000 Dimitry Andric ha scritto: > With regard to the 'triple' or 'quad' strings, e.g. "arch-vendor-os" or > "arch-vendor-os-abi", the canonical source is really GNU config.guess, > which is used in autoconf, gettext, and most other GNU tools. OTOH, we have custom config.guess in /usr/ports/Templates modifying the "canonical" strings, used by all ports defining GNU_CONFIGURE=yes. -- Alex Dupre From owner-svn-src-head@FreeBSD.ORG Tue May 24 12:34:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6949F106566C; Tue, 24 May 2011 12:34:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58C458FC1B; Tue, 24 May 2011 12:34:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OCYJtR068527; Tue, 24 May 2011 12:34:19 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OCYJJv068523; Tue, 24 May 2011 12:34:19 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201105241234.p4OCYJJv068523@svn.freebsd.org> From: Robert Watson Date: Tue, 24 May 2011 12:34: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: r222249 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 12:34:19 -0000 Author: rwatson Date: Tue May 24 12:34:19 2011 New Revision: 222249 URL: http://svn.freebsd.org/changeset/base/222249 Log: Rework netisr policy mechanism so that per-protocol dispatch policies can be represented: - A single policy namespace is defined, consisting of four possible policies: "default" to use the global default, "deferred" to force deferred dispatch, "direct" to employ direct dispatch where possible, and "hybrid" which makes a dynamic decision based on CPU affinity, ordering, etc. Routines are implemented to convert between strings and an integer namespace. - A new global variable, netisr_dispatch_policy, subsumes existing global variables for direct dispatch, forced direct dispatch, etc, and is used for explicit policy interpretation and composition. Old variables remain so that they can be exported by legacy sysctls for use by old netstat(1) binaries. A new sysctl and tunable, netisr.dispatch.policy, accepts the above strings for specifying a global policy default. - The protocol registration structure, netisr_handler, grows an nh_dispatch field, which accepts a per-policy policy override. The default value is '0', which corresponds to "default", meaning that protocols will accept the global default policy unless otherwise specified. - Policies are now interpreted and composed explicitly at various points in packet dispatch; protocol policies override global policies. - Protocols grow the ability to express a non-opinion about affinity even when implenting m2cpuid by returning NETISR_CPUID_NONE. In that case, the framework falls back on source ordering, rather than simply using the current CPU. These changes are in support of allowing link layer re-dispatch based on RSS or similar hashes provided by NICs, especially in the case where the number of hardware receive queues matches hardware core count, rather than hardware thread count, requiring further software redistributeon. (i.e., on RMI XLR). MFC after: 3 weeks Reviewed by: bz Sponsored by: Juniper Networks, Inc. Modified: head/sys/net/netisr.c head/sys/net/netisr.h head/sys/net/netisr_internal.h Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Tue May 24 09:01:56 2011 (r222248) +++ head/sys/net/netisr.c Tue May 24 12:34:19 2011 (r222249) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2007-2009 Robert N. M. Watson - * Copyright (c) 2010 Juniper Networks, Inc. + * Copyright (c) 2010-2011 Juniper Networks, Inc. * All rights reserved. * * This software was developed by Robert N. M. Watson under contract @@ -127,32 +127,44 @@ static struct rmlock netisr_rmlock; SYSCTL_NODE(_net, OID_AUTO, isr, CTLFLAG_RW, 0, "netisr"); /*- - * Three direct dispatch policies are supported: + * Three global direct dispatch policies are supported: * - * - Always defer: all work is scheduled for a netisr, regardless of context. - * (!direct) + * NETISR_DISPATCH_QUEUED: All work is deferred for a netisr, regardless of + * context (may be overriden by protocols). * - * - Hybrid: if the executing context allows direct dispatch, and we're - * running on the CPU the work would be done on, then direct dispatch if it - * wouldn't violate ordering constraints on the workstream. - * (direct && !direct_force) + * NETISR_DISPATCH_HYBRID: If the executing context allows direct dispatch, + * and we're running on the CPU the work would be performed on, then direct + * dispatch it if it wouldn't violate ordering constraints on the workstream. * - * - Always direct: if the executing context allows direct dispatch, always - * direct dispatch. (direct && direct_force) + * NETISR_DISPATCH_DIRECT: If the executing context allows direct dispatch, + * always direct dispatch. (The default.) * * Notice that changing the global policy could lead to short periods of * misordered processing, but this is considered acceptable as compared to - * the complexity of enforcing ordering during policy changes. - */ -static int netisr_direct_force = 1; /* Always direct dispatch. */ -TUNABLE_INT("net.isr.direct_force", &netisr_direct_force); -SYSCTL_INT(_net_isr, OID_AUTO, direct_force, CTLFLAG_RW, - &netisr_direct_force, 0, "Force direct dispatch"); - -static int netisr_direct = 1; /* Enable direct dispatch. */ -TUNABLE_INT("net.isr.direct", &netisr_direct); -SYSCTL_INT(_net_isr, OID_AUTO, direct, CTLFLAG_RW, - &netisr_direct, 0, "Enable direct dispatch"); + * the complexity of enforcing ordering during policy changes. Protocols can + * override the global policy (when they're not doing that, they select + * NETISR_DISPATCH_DEFAULT). + */ +#define NETISR_DISPATCH_POLICY_DEFAULT NETISR_DISPATCH_DIRECT +#define NETISR_DISPATCH_POLICY_MAXSTR 20 /* Used for temporary buffers. */ +static u_int netisr_dispatch_policy = NETISR_DISPATCH_POLICY_DEFAULT; +static int sysctl_netisr_dispatch_policy(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_net_isr, OID_AUTO, dispatch, CTLTYPE_STRING | CTLFLAG_RW | + CTLFLAG_TUN, 0, 0, sysctl_netisr_dispatch_policy, "A", + "netisr dispatch policy"); + +/* + * These sysctls were used in previous versions to control and export + * dispatch policy state. Now, we provide read-only export via them so that + * older netstat binaries work. At some point they can be garbage collected. + */ +static int netisr_direct_force; +SYSCTL_INT(_net_isr, OID_AUTO, direct_force, CTLFLAG_RD, + &netisr_direct_force, 0, "compat: force direct dispatch"); + +static int netisr_direct; +SYSCTL_INT(_net_isr, OID_AUTO, direct, CTLFLAG_RD, &netisr_direct, 0, + "compat: enable direct dispatch"); /* * Allow the administrator to limit the number of threads (CPUs) to use for @@ -276,6 +288,106 @@ netisr_default_flow2cpu(u_int flowid) } /* + * Dispatch tunable and sysctl configuration. + */ +struct netisr_dispatch_table_entry { + u_int ndte_policy; + const char *ndte_policy_str; +}; +static const struct netisr_dispatch_table_entry netisr_dispatch_table[] = { + { NETISR_DISPATCH_DEFAULT, "default" }, + { NETISR_DISPATCH_DEFERRED, "deferred" }, + { NETISR_DISPATCH_HYBRID, "hybrid" }, + { NETISR_DISPATCH_DIRECT, "direct" }, +}; +static const u_int netisr_dispatch_table_len = + (sizeof(netisr_dispatch_table) / sizeof(netisr_dispatch_table[0])); + +static void +netisr_dispatch_policy_to_str(u_int dispatch_policy, char *buffer, + u_int buflen) +{ + const struct netisr_dispatch_table_entry *ndtep; + const char *str; + u_int i; + + str = "unknown"; + for (i = 0; i < netisr_dispatch_table_len; i++) { + ndtep = &netisr_dispatch_table[i]; + if (ndtep->ndte_policy == dispatch_policy) { + str = ndtep->ndte_policy_str; + break; + } + } + snprintf(buffer, buflen, "%s", str); +} + +static int +netisr_dispatch_policy_from_str(const char *str, u_int *dispatch_policyp) +{ + const struct netisr_dispatch_table_entry *ndtep; + u_int i; + + for (i = 0; i < netisr_dispatch_table_len; i++) { + ndtep = &netisr_dispatch_table[i]; + if (strcmp(ndtep->ndte_policy_str, str) == 0) { + *dispatch_policyp = ndtep->ndte_policy; + return (0); + } + } + return (EINVAL); +} + +static void +netisr_dispatch_policy_compat(void) +{ + + switch (netisr_dispatch_policy) { + case NETISR_DISPATCH_DEFERRED: + netisr_direct_force = 0; + netisr_direct = 0; + break; + + case NETISR_DISPATCH_HYBRID: + netisr_direct_force = 0; + netisr_direct = 1; + break; + + case NETISR_DISPATCH_DIRECT: + netisr_direct_force = 1; + netisr_direct = 1; + break; + + default: + panic("%s: unknown policy %u", __func__, + netisr_dispatch_policy); + } +} + +static int +sysctl_netisr_dispatch_policy(SYSCTL_HANDLER_ARGS) +{ + char tmp[NETISR_DISPATCH_POLICY_MAXSTR]; + u_int dispatch_policy; + int error; + + netisr_dispatch_policy_to_str(netisr_dispatch_policy, tmp, + sizeof(tmp)); + error = sysctl_handle_string(oidp, tmp, sizeof(tmp), req); + if (error == 0 && req->newptr != NULL) { + error = netisr_dispatch_policy_from_str(tmp, + &dispatch_policy); + if (error == 0 && dispatch_policy == NETISR_DISPATCH_DEFAULT) + error = EINVAL; + if (error == 0) { + netisr_dispatch_policy = dispatch_policy; + netisr_dispatch_policy_compat(); + } + } + return (error); +} + +/* * Register a new netisr handler, which requires initializing per-protocol * fields for each workstream. All netisr work is briefly suspended while * the protocol is installed. @@ -312,6 +424,12 @@ netisr_register(const struct netisr_hand KASSERT(nhp->nh_policy != NETISR_POLICY_CPU || nhp->nh_m2cpuid != NULL, ("%s: nh_policy == CPU but m2cpuid not defined for %s", __func__, name)); + KASSERT(nhp->nh_dispatch == NETISR_DISPATCH_DEFAULT || + nhp->nh_dispatch == NETISR_DISPATCH_DEFERRED || + nhp->nh_dispatch == NETISR_DISPATCH_HYBRID || + nhp->nh_dispatch == NETISR_DISPATCH_DIRECT, + ("%s: invalid nh_dispatch (%u)", __func__, nhp->nh_dispatch)); + KASSERT(proto < NETISR_MAXPROT, ("%s(%u, %s): protocol too big", __func__, proto, name)); @@ -339,6 +457,7 @@ netisr_register(const struct netisr_hand } else netisr_proto[proto].np_qlimit = nhp->nh_qlimit; netisr_proto[proto].np_policy = nhp->nh_policy; + netisr_proto[proto].np_dispatch = nhp->nh_dispatch; CPU_FOREACH(i) { npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto]; bzero(npwp, sizeof(*npwp)); @@ -541,15 +660,32 @@ netisr_unregister(const struct netisr_ha } /* + * Compose the global and per-protocol policies on dispatch, and return the + * dispatch policy to use. + */ +static u_int +netisr_get_dispatch(struct netisr_proto *npp) +{ + + /* + * Protocol-specific configuration overrides the global default. + */ + if (npp->np_dispatch != NETISR_DISPATCH_DEFAULT) + return (npp->np_dispatch); + return (netisr_dispatch_policy); +} + +/* * Look up the workstream given a packet and source identifier. Do this by * checking the protocol's policy, and optionally call out to the protocol * for assistance if required. */ static struct mbuf * -netisr_select_cpuid(struct netisr_proto *npp, uintptr_t source, - struct mbuf *m, u_int *cpuidp) +netisr_select_cpuid(struct netisr_proto *npp, u_int dispatch_policy, + uintptr_t source, struct mbuf *m, u_int *cpuidp) { struct ifnet *ifp; + u_int policy; NETISR_LOCK_ASSERT(); @@ -567,11 +703,30 @@ netisr_select_cpuid(struct netisr_proto * If we want to support per-interface policies, we should do that * here first. */ - switch (npp->np_policy) { - case NETISR_POLICY_CPU: - return (npp->np_m2cpuid(m, source, cpuidp)); + policy = npp->np_policy; + if (policy == NETISR_POLICY_CPU) { + m = npp->np_m2cpuid(m, source, cpuidp); + if (m == NULL) + return (NULL); - case NETISR_POLICY_FLOW: + /* + * It's possible for a protocol not to have a good idea about + * where to process a packet, in which case we fall back on + * the netisr code to decide. In the hybrid case, return the + * current CPU ID, which will force an immediate direct + * dispatch. In the queued case, fall back on the SOURCE + * policy. + */ + if (*cpuidp != NETISR_CPUID_NONE) + return (m); + if (dispatch_policy == NETISR_DISPATCH_HYBRID) { + *cpuidp = curcpu; + return (m); + } + policy = NETISR_POLICY_SOURCE; + } + + if (policy == NETISR_POLICY_FLOW) { if (!(m->m_flags & M_FLOWID) && npp->np_m2flow != NULL) { m = npp->np_m2flow(m, source); if (m == NULL) @@ -582,21 +737,19 @@ netisr_select_cpuid(struct netisr_proto netisr_default_flow2cpu(m->m_pkthdr.flowid); return (m); } - /* FALLTHROUGH */ - - case NETISR_POLICY_SOURCE: - ifp = m->m_pkthdr.rcvif; - if (ifp != NULL) - *cpuidp = nws_array[(ifp->if_index + source) % - nws_count]; - else - *cpuidp = nws_array[source % nws_count]; - return (m); - - default: - panic("%s: invalid policy %u for %s", __func__, - npp->np_policy, npp->np_name); + policy = NETISR_POLICY_SOURCE; } + + KASSERT(policy == NETISR_POLICY_SOURCE, + ("%s: invalid policy %u for %s", __func__, npp->np_policy, + npp->np_name)); + + ifp = m->m_pkthdr.rcvif; + if (ifp != NULL) + *cpuidp = nws_array[(ifp->if_index + source) % nws_count]; + else + *cpuidp = nws_array[source % nws_count]; + return (m); } /* @@ -795,7 +948,8 @@ netisr_queue_src(u_int proto, uintptr_t KASSERT(netisr_proto[proto].np_handler != NULL, ("%s: invalid proto %u", __func__, proto)); - m = netisr_select_cpuid(&netisr_proto[proto], source, m, &cpuid); + m = netisr_select_cpuid(&netisr_proto[proto], NETISR_DISPATCH_DEFERRED, + source, m, &cpuid); if (m != NULL) { KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid)); @@ -826,23 +980,23 @@ netisr_dispatch_src(u_int proto, uintptr struct rm_priotracker tracker; #endif struct netisr_workstream *nwsp; + struct netisr_proto *npp; struct netisr_work *npwp; int dosignal, error; - u_int cpuid; - - /* - * If direct dispatch is entirely disabled, fall back on queueing. - */ - if (!netisr_direct) - return (netisr_queue_src(proto, source, m)); + u_int cpuid, dispatch_policy; KASSERT(proto < NETISR_MAXPROT, ("%s: invalid proto %u", __func__, proto)); #ifdef NETISR_LOCKING NETISR_RLOCK(&tracker); #endif - KASSERT(netisr_proto[proto].np_handler != NULL, - ("%s: invalid proto %u", __func__, proto)); + npp = &netisr_proto[proto]; + KASSERT(npp->np_handler != NULL, ("%s: invalid proto %u", __func__, + proto)); + + dispatch_policy = netisr_get_dispatch(npp); + if (dispatch_policy == NETISR_DISPATCH_DEFERRED) + return (netisr_queue_src(proto, source, m)); /* * If direct dispatch is forced, then unconditionally dispatch @@ -851,7 +1005,7 @@ netisr_dispatch_src(u_int proto, uintptr * nws_flags because all netisr processing will be source ordered due * to always being forced to directly dispatch. */ - if (netisr_direct_force) { + if (dispatch_policy == NETISR_DISPATCH_DIRECT) { nwsp = DPCPU_PTR(nws); npwp = &nwsp->nws_work[proto]; npwp->nw_dispatched++; @@ -861,18 +1015,22 @@ netisr_dispatch_src(u_int proto, uintptr goto out_unlock; } + KASSERT(dispatch_policy == NETISR_DISPATCH_HYBRID, + ("%s: unknown dispatch policy (%u)", __func__, dispatch_policy)); + /* * Otherwise, we execute in a hybrid mode where we will try to direct * dispatch if we're on the right CPU and the netisr worker isn't * already running. */ - m = netisr_select_cpuid(&netisr_proto[proto], source, m, &cpuid); + sched_pin(); + m = netisr_select_cpuid(&netisr_proto[proto], NETISR_DISPATCH_HYBRID, + source, m, &cpuid); if (m == NULL) { error = ENOBUFS; - goto out_unlock; + goto out_unpin; } KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid)); - sched_pin(); if (cpuid != curcpu) goto queue_fallback; nwsp = DPCPU_PTR(nws); @@ -1003,6 +1161,9 @@ netisr_start_swi(u_int cpuid, struct pcp static void netisr_init(void *arg) { + char tmp[NETISR_DISPATCH_POLICY_MAXSTR]; + u_int dispatch_policy; + int error; KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__)); @@ -1033,6 +1194,20 @@ netisr_init(void *arg) } #endif + if (TUNABLE_STR_FETCH("net.isr.dispatch", tmp, sizeof(tmp))) { + error = netisr_dispatch_policy_from_str(tmp, + &dispatch_policy); + if (error == 0 && dispatch_policy == NETISR_DISPATCH_DEFAULT) + error = EINVAL; + if (error == 0) { + netisr_dispatch_policy = dispatch_policy; + netisr_dispatch_policy_compat(); + } else + printf( + "%s: invalid dispatch policy %s, using default\n", + __func__, tmp); + } + netisr_start_swi(curcpu, pcpu_find(curcpu)); } SYSINIT(netisr_init, SI_SUB_SOFTINTR, SI_ORDER_FIRST, netisr_init, NULL); @@ -1088,6 +1263,7 @@ sysctl_netisr_proto(SYSCTL_HANDLER_ARGS) snpp->snp_proto = proto; snpp->snp_qlimit = npp->np_qlimit; snpp->snp_policy = npp->np_policy; + snpp->snp_dispatch = npp->np_dispatch; if (npp->np_m2flow != NULL) snpp->snp_flags |= NETISR_SNP_FLAGS_M2FLOW; if (npp->np_m2cpuid != NULL) Modified: head/sys/net/netisr.h ============================================================================== --- head/sys/net/netisr.h Tue May 24 09:01:56 2011 (r222248) +++ head/sys/net/netisr.h Tue May 24 12:34:19 2011 (r222249) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2007-2009 Robert N. M. Watson - * Copyright (c) 2010 Juniper Networks, Inc. + * Copyright (c) 2010-2011 Juniper Networks, Inc. * All rights reserved. * * This software was developed by Robert N. M. Watson under contract @@ -71,6 +71,15 @@ #define NETISR_POLICY_CPU 3 /* Protocol determines CPU placement. */ /* + * Protocol dispatch policy constants; selects whether and when direct + * dispatch is permitted. + */ +#define NETISR_DISPATCH_DEFAULT 0 /* Use global default. */ +#define NETISR_DISPATCH_DEFERRED 1 /* Always defer dispatch. */ +#define NETISR_DISPATCH_HYBRID 2 /* Allow hybrid dispatch. */ +#define NETISR_DISPATCH_DIRECT 3 /* Always direct dispatch. */ + +/* * Monitoring data structures, exported by sysctl(2). * * Three sysctls are defined. First, a per-protocol structure exported by @@ -84,7 +93,8 @@ struct sysctl_netisr_proto { u_int snp_qlimit; /* nh_qlimit */ u_int snp_policy; /* nh_policy */ u_int snp_flags; /* Various flags. */ - u_int _snp_ispare[7]; + u_int snp_dispatch; /* Dispatch policy. */ + u_int _snp_ispare[6]; }; /* @@ -173,6 +183,8 @@ typedef struct mbuf *netisr_m2cpuid_t(st typedef struct mbuf *netisr_m2flow_t(struct mbuf *m, uintptr_t source); typedef void netisr_drainedcpu_t(u_int cpuid); +#define NETISR_CPUID_NONE ((u_int)-1) /* No affinity returned. */ + /* * Data structure describing a protocol handler. */ @@ -185,7 +197,8 @@ struct netisr_handler { u_int nh_proto; /* Integer protocol ID. */ u_int nh_qlimit; /* Maximum per-CPU queue depth. */ u_int nh_policy; /* Work placement policy. */ - u_int nh_ispare[5]; /* For future use. */ + u_int nh_dispatch; /* Dispatch policy. */ + u_int nh_ispare[4]; /* For future use. */ void *nh_pspare[4]; /* For future use. */ }; Modified: head/sys/net/netisr_internal.h ============================================================================== --- head/sys/net/netisr_internal.h Tue May 24 09:01:56 2011 (r222248) +++ head/sys/net/netisr_internal.h Tue May 24 12:34:19 2011 (r222249) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2007-2009 Robert N. M. Watson - * Copyright (c) 2010 Juniper Networks, Inc. + * Copyright (c) 2010-2011 Juniper Networks, Inc. * All rights reserved. * * This software was developed by Robert N. M. Watson under contract @@ -64,6 +64,7 @@ struct netisr_proto { netisr_drainedcpu_t *np_drainedcpu; /* Callback when drained a queue. */ u_int np_qlimit; /* Maximum per-CPU queue depth. */ u_int np_policy; /* Work placement policy. */ + u_int np_dispatch; /* Work dispatch policy. */ }; #define NETISR_MAXPROT 16 /* Compile-time limit. */ From owner-svn-src-head@FreeBSD.ORG Tue May 24 12:38:00 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68B971065670; Tue, 24 May 2011 12:38:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58F9B8FC1A; Tue, 24 May 2011 12:38:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OCc0JH068665; Tue, 24 May 2011 12:38:00 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OCc0KD068663; Tue, 24 May 2011 12:38:00 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201105241238.p4OCc0KD068663@svn.freebsd.org> From: Robert Watson Date: Tue, 24 May 2011 12:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222250 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 12:38:00 -0000 Author: rwatson Date: Tue May 24 12:38:00 2011 New Revision: 222250 URL: http://svn.freebsd.org/changeset/base/222250 Log: Teach netstat(1) about the new global netisr policy sysctl, net.isr.dispatch, and about per-protocol dispatch policies. MFC after: 3 weeks Reviewed by: bz Sponsored by: Juniper Networks, Inc. Modified: head/usr.bin/netstat/netisr.c Modified: head/usr.bin/netstat/netisr.c ============================================================================== --- head/usr.bin/netstat/netisr.c Tue May 24 12:34:19 2011 (r222249) +++ head/usr.bin/netstat/netisr.c Tue May 24 12:38:00 2011 (r222250) @@ -60,8 +60,7 @@ static u_int numthreads; static u_int defaultqlimit; static u_int maxqlimit; -static u_int direct; -static u_int direct_force; +static char dispatch_policy[20]; static struct sysctl_netisr_proto *proto_array; static u_int proto_array_len; @@ -77,6 +76,32 @@ static u_int *nws_array; static u_int maxprot; static void +netisr_dispatch_policy_to_string(u_int dispatch_policy, char *buf, + size_t buflen) +{ + const char *str; + + switch (dispatch_policy) { + case NETISR_DISPATCH_DEFAULT: + str = "default"; + break; + case NETISR_DISPATCH_DEFERRED: + str = "deferred"; + break; + case NETISR_DISPATCH_HYBRID: + str = "hybrid"; + break; + case NETISR_DISPATCH_DIRECT: + str = "direct"; + break; + default: + str = "unknown"; + break; + } + snprintf(buf, buflen, "%s", str); +} + +static void netisr_load_kvm_uint(kvm_t *kd, char *name, u_int *p) { struct nlist nl[] = { @@ -144,6 +169,7 @@ netisr_protoispresent(u_int proto) static void netisr_load_kvm_config(kvm_t *kd) { + u_int tmp; netisr_load_kvm_uint(kd, "_netisr_bindthreads", &bindthreads); netisr_load_kvm_uint(kd, "_netisr_maxthreads", &maxthreads); @@ -152,8 +178,9 @@ netisr_load_kvm_config(kvm_t *kd) netisr_load_kvm_uint(kd, "_netisr_defaultqlimit", &defaultqlimit); netisr_load_kvm_uint(kd, "_netisr_maxqlimit", &maxqlimit); - netisr_load_kvm_uint(kd, "_netisr_direct", &direct); - netisr_load_kvm_uint(kd, "_netisr_direct_force", &direct_force); + netisr_load_kvm_uint(kd, "_netisr_dispatch_policy", &tmp); + netisr_dispatch_policy_to_string(tmp, dispatch_policy, + sizeof(dispatch_policy)); } static void @@ -169,6 +196,17 @@ netisr_load_sysctl_uint(const char *name } static void +netisr_load_sysctl_string(const char *name, char *p, size_t len) +{ + size_t retlen; + + retlen = len; + if (sysctlbyname(name, p, &retlen, NULL, 0) < 0) + err(-1, "%s", name); + p[len - 1] = '\0'; +} + +static void netisr_load_sysctl_config(void) { @@ -179,8 +217,8 @@ netisr_load_sysctl_config(void) netisr_load_sysctl_uint("net.isr.defaultqlimit", &defaultqlimit); netisr_load_sysctl_uint("net.isr.maxqlimit", &maxqlimit); - netisr_load_sysctl_uint("net.isr.direct", &direct); - netisr_load_sysctl_uint("net.isr.direct_force", &direct_force); + netisr_load_sysctl_string("net.isr.dispatch", dispatch_policy, + sizeof(dispatch_policy)); } static void @@ -244,6 +282,7 @@ netisr_load_kvm_proto(kvm_t *kd) snpp->snp_proto = i; snpp->snp_qlimit = npp->np_qlimit; snpp->snp_policy = npp->np_policy; + snpp->snp_dispatch = npp->np_dispatch; if (npp->np_m2flow != NULL) snpp->snp_flags |= NETISR_SNP_FLAGS_M2FLOW; if (npp->np_m2cpuid != NULL) @@ -418,6 +457,7 @@ netisr_load_sysctl_work(void) static void netisr_print_proto(struct sysctl_netisr_proto *snpp) { + char tmp[20]; printf("%-6s", snpp->snp_name); printf(" %5u", snpp->snp_proto); @@ -426,6 +466,9 @@ netisr_print_proto(struct sysctl_netisr_ (snpp->snp_policy == NETISR_POLICY_SOURCE) ? "source" : (snpp->snp_policy == NETISR_POLICY_FLOW) ? "flow" : (snpp->snp_policy == NETISR_POLICY_CPU) ? "cpu" : "-"); + netisr_dispatch_policy_to_string(snpp->snp_dispatch, tmp, + sizeof(tmp)); + printf(" %8s", tmp); printf(" %s%s%s\n", (snpp->snp_flags & NETISR_SNP_FLAGS_M2CPUID) ? "C" : "-", (snpp->snp_flags & NETISR_SNP_FLAGS_DRAINEDCPU) ? "D" : "-", @@ -483,17 +526,15 @@ netisr_stats(void *kvmd) printf("%-25s %12u %12u\n", "Thread count", numthreads, maxthreads); printf("%-25s %12u %12u\n", "Default queue limit", defaultqlimit, maxqlimit); - printf("%-25s %12s %12s\n", "Direct dispatch", - direct ? "enabled" : "disabled", "n/a"); - printf("%-25s %12s %12s\n", "Forced direct dispatch", - direct_force ? "enabled" : "disabled", "n/a"); + printf("%-25s %12s %12s\n", "Dispatch policy", dispatch_policy, + "n/a"); printf("%-25s %12s %12s\n", "Threads bound to CPUs", bindthreads ? "enabled" : "disabled", "n/a"); printf("\n"); printf("Protocols:\n"); - printf("%-6s %5s %6s %-6s %-5s\n", "Name", "Proto", "QLimit", - "Policy", "Flags"); + printf("%-6s %5s %6s %-6s %-8s %-5s\n", "Name", "Proto", "QLimit", + "Policy", "Dispatch", "Flags"); for (i = 0; i < proto_array_len; i++) { snpp = &proto_array[i]; netisr_print_proto(snpp); From owner-svn-src-head@FreeBSD.ORG Tue May 24 13:08:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCD971065670; Tue, 24 May 2011 13:08:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD8EC8FC0C; Tue, 24 May 2011 13:08:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OD8xRc069589; Tue, 24 May 2011 13:08:59 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OD8xqH069587; Tue, 24 May 2011 13:08:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201105241308.p4OD8xqH069587@svn.freebsd.org> From: Robert Watson Date: Tue, 24 May 2011 13:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222251 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 13:08:59 -0000 Author: rwatson Date: Tue May 24 13:08:59 2011 New Revision: 222251 URL: http://svn.freebsd.org/changeset/base/222251 Log: An inpcb lock is no longer required in in_pcbref() since the move to refcount(9). MFC after: 3 weeks Sponsored by: Juniper Networks, Inc. Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Tue May 24 12:38:00 2011 (r222250) +++ head/sys/netinet/in_pcb.c Tue May 24 13:08:59 2011 (r222251) @@ -1054,8 +1054,6 @@ void in_pcbref(struct inpcb *inp) { - INP_WLOCK_ASSERT(inp); - KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); refcount_acquire(&inp->inp_refcount); From owner-svn-src-head@FreeBSD.ORG Tue May 24 13:17:09 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 351AD106564A; Tue, 24 May 2011 13:17: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 265768FC0A; Tue, 24 May 2011 13:17:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ODH9pd069884; Tue, 24 May 2011 13:17:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ODH9SY069882; Tue, 24 May 2011 13:17:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105241317.p4ODH9SY069882@svn.freebsd.org> From: John Baldwin Date: Tue, 24 May 2011 13:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222252 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 13:17:09 -0000 Author: jhb Date: Tue May 24 13:17:08 2011 New Revision: 222252 URL: http://svn.freebsd.org/changeset/base/222252 Log: Simplify a stale assertion. We have not called mi_switch() from a nested critical section during a preemption for several years. MFC after: 1 week Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue May 24 13:08:59 2011 (r222251) +++ head/sys/kern/kern_synch.c Tue May 24 13:17:08 2011 (r222252) @@ -400,9 +400,7 @@ mi_switch(int flags, struct thread *newt if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td)) mtx_assert(&Giant, MA_NOTOWNED); #endif - KASSERT(td->td_critnest == 1 || (td->td_critnest == 2 && - (td->td_owepreempt) && (flags & SW_INVOL) != 0 && - newtd == NULL) || panicstr, + KASSERT(td->td_critnest == 1 || panicstr, ("mi_switch: switch in a critical section")); KASSERT((flags & (SW_INVOL | SW_VOL)) != 0, ("mi_switch: switch must be voluntary or involuntary")); From owner-svn-src-head@FreeBSD.ORG Tue May 24 13:22:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0122A1065677; Tue, 24 May 2011 13:22:41 +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 CD2868FC08; Tue, 24 May 2011 13:22:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ODMeR7070086; Tue, 24 May 2011 13:22:40 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ODMejk070084; Tue, 24 May 2011 13:22:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105241322.p4ODMejk070084@svn.freebsd.org> From: John Baldwin Date: Tue, 24 May 2011 13:22:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222253 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 13:22:41 -0000 Author: jhb Date: Tue May 24 13:22:40 2011 New Revision: 222253 URL: http://svn.freebsd.org/changeset/base/222253 Log: Update comments for DEVICE_PROBE() to reflect that BUS_PROBE_DEFAULT is now the preferred typical return value from a probe routine. Discourage the use of 0 (BUS_PROBE_SPECIFIC) as it should be used very rarely. Point the reader to the DEVICE_PROBE(9) manpage for more detailed notes on possible probe return values. Submitted by: Philip Soeberg philip-dev of soeberg net Modified: head/sys/kern/device_if.m Modified: head/sys/kern/device_if.m ============================================================================== --- head/sys/kern/device_if.m Tue May 24 13:17:08 2011 (r222252) +++ head/sys/kern/device_if.m Tue May 24 13:22:40 2011 (r222253) @@ -89,28 +89,29 @@ CODE { * the probe before returning. The return value of DEVICE_PROBE() * is used to elect which driver is used - the driver which returns * the largest non-error value wins the election and attaches to - * the device. + * the device. Common non-error values are described in the + * DEVICE_PROBE(9) manual page. * * If a driver matches the hardware, it should set the device * description string using device_set_desc() or - * device_set_desc_copy(). This string is - * used to generate an informative message when DEVICE_ATTACH() - * is called. + * device_set_desc_copy(). This string is used to generate an + * informative message when DEVICE_ATTACH() is called. * * As a special case, if a driver returns zero, the driver election * is cut short and that driver will attach to the device - * immediately. + * immediately. This should rarely be used. * - * For example, a probe method for a pci device driver might look + * For example, a probe method for a PCI device driver might look * like this: * * @code - * int foo_probe(device_t dev) + * int + * foo_probe(device_t dev) * { * if (pci_get_vendor(dev) == FOOVENDOR && * pci_get_device(dev) == FOODEVICE) { * device_set_desc(dev, "Foo device"); - * return (0); + * return (BUS_PROBE_DEFAULT); * } * return (ENXIO); * } @@ -125,7 +126,8 @@ CODE { * * @param dev the device to probe * - * @retval 0 if the driver strongly matches this device + * @retval 0 if this is the only possible driver for this + * device * @retval negative if the driver can match this device - the * least negative value is used to select the * driver From owner-svn-src-head@FreeBSD.ORG Tue May 24 13:36:42 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 421341065673; Tue, 24 May 2011 13:36:42 +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 2802D8FC14; Tue, 24 May 2011 13:36:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ODagh4070535; Tue, 24 May 2011 13:36:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ODagSQ070533; Tue, 24 May 2011 13:36:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105241336.p4ODagSQ070533@svn.freebsd.org> From: John Baldwin Date: Tue, 24 May 2011 13:36: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: r222254 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 13:36:42 -0000 Author: jhb Date: Tue May 24 13:36:41 2011 New Revision: 222254 URL: http://svn.freebsd.org/changeset/base/222254 Log: Fix an issue with critical sections and SMP rendezvous handlers. Specifically, a critical_exit() call that drops the nesting level to zero has a brief window where the pending preemption flag is set and the nesting level is set to zero. This is done purposefully to avoid races where a preemption scheduled by an interrupt could be lost otherwise (see revision 144777). However, this does mean that if an interrupt fires during this window and enters and exits a critical section, it may preempt from the interrupt context. This is generally fine as the interrupt code is careful to arrange critical sections so that they are not exited until it is safe to preempt (e.g. interrupts EOI'd and masked if necessary). However, the SMP rendezvous IPI handler does not quite follow this rule, and in general a rendezvous can never be preempted. Rendezvous handlers are also not permitted to schedule threads to execute, so they will not typically trigger preemptions. SMP rendezvous handlers may use spinlocks (carefully) such as the rm_cleanIPI() handler used in rmlocks, but using a spinlock also enters and exits a critical section. If the interrupted top-half code is in the brief window of critical_exit() where the nesting level is zero but a preemption is pending, then releasing the spinlock can trigger a preemption. Because we know that SMP rendezvous handlers can never schedule a thread, we know that a critical_exit() in an SMP rendezvous handler will only preempt in this edge case. We also know that the top-half thread will happily handle the deferred preemption once the SMP rendezvous has completed, so the preemption will not be lost. This makes it safe to employ a workaround where we use a nested critical section in the SMP rendezvous code itself around rendezvous action routines to prevent any preemptions during an SMP rendezvous. The workaround intentionally avoids checking for a deferred preemption when leaving the critical section on the assumption that if there is a pending preemption it will be handled by the interrupted top-half code. Submitted by: mlaier (variation specific to rm_cleanIPI()) Obtained from: Isilon MFC after: 1 week Modified: head/sys/kern/subr_smp.c Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Tue May 24 13:22:40 2011 (r222253) +++ head/sys/kern/subr_smp.c Tue May 24 13:36:41 2011 (r222254) @@ -311,11 +311,15 @@ restart_cpus(cpumask_t map) void smp_rendezvous_action(void) { + struct thread *td; void *local_func_arg; void (*local_setup_func)(void*); void (*local_action_func)(void*); void (*local_teardown_func)(void*); int generation; +#ifdef INVARIANTS + int owepreempt; +#endif /* Ensure we have up-to-date values. */ atomic_add_acq_int(&smp_rv_waiters[0], 1); @@ -330,6 +334,34 @@ smp_rendezvous_action(void) generation = smp_rv_generation; /* + * Use a nested critical section to prevent any preemptions + * from occurring during a rendezvous action routine. + * Specifically, if a rendezvous handler is invoked via an IPI + * and the interrupted thread was in the critical_exit() + * function after setting td_critnest to 0 but before + * performing a deferred preemption, this routine can be + * invoked with td_critnest set to 0 and td_owepreempt true. + * In that case, a critical_exit() during the rendezvous + * action would trigger a preemption which is not permitted in + * a rendezvous action. To fix this, wrap all of the + * rendezvous action handlers in a critical section. We + * cannot use a regular critical section however as having + * critical_exit() preempt from this routine would also be + * problematic (the preemption must not occur before the IPI + * has been acknowleged via an EOI). Instead, we + * intentionally ignore td_owepreempt when leaving the + * critical setion. This should be harmless because we do not + * permit rendezvous action routines to schedule threads, and + * thus td_owepreempt should never transition from 0 to 1 + * during this routine. + */ + td = curthread; + td->td_critnest++; +#ifdef INVARIANTS + owepreempt = td->td_owepreempt; +#endif + + /* * If requested, run a setup function before the main action * function. Ensure all CPUs have completed the setup * function before moving on to the action function. @@ -362,14 +394,18 @@ smp_rendezvous_action(void) */ MPASS(generation == smp_rv_generation); atomic_add_int(&smp_rv_waiters[2], 1); - if (local_teardown_func == smp_no_rendevous_barrier) - return; - while (smp_rv_waiters[2] < smp_rv_ncpus && - generation == smp_rv_generation) - cpu_spinwait(); + if (local_teardown_func != smp_no_rendevous_barrier) { + while (smp_rv_waiters[2] < smp_rv_ncpus && + generation == smp_rv_generation) + cpu_spinwait(); + + if (local_teardown_func != NULL) + local_teardown_func(local_func_arg); + } - if (local_teardown_func != NULL) - local_teardown_func(local_func_arg); + td->td_critnest--; + KASSERT(owepreempt == td->td_owepreempt, + ("rendezvous action changed td_owepreempt")); } void From owner-svn-src-head@FreeBSD.ORG Tue May 24 14:10:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A54C106564A; Tue, 24 May 2011 14:10:34 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 403918FC08; Tue, 24 May 2011 14:10:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OEAYnU071555; Tue, 24 May 2011 14:10:34 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OEAYGH071553; Tue, 24 May 2011 14:10:34 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105241410.p4OEAYGH071553@svn.freebsd.org> From: Marko Zec Date: Tue, 24 May 2011 14:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222255 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 14:10:34 -0000 Author: zec Date: Tue May 24 14:10:33 2011 New Revision: 222255 URL: http://svn.freebsd.org/changeset/base/222255 Log: Provide fake link status information in an attempt to let ng_eiface(4) virtual ifnets more realistically mimic physical ethernet interfaces. The main motivation behind this change is to allow for ng_eiface(4) interfaces to participate in STP if_bridge(4) configurations. When announcing link status changes, switch to the vnet to which the ifnet belongs, since it is possible for ng_eiface ifnets to be assigned to a vnet different from the one in which its netgraph node resides. MFC after: 3 days Modified: head/sys/netgraph/ng_eiface.c Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Tue May 24 13:36:41 2011 (r222254) +++ head/sys/netgraph/ng_eiface.c Tue May 24 14:10:33 2011 (r222255) @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -76,6 +77,8 @@ static const struct ng_cmdlist ng_eiface /* Node private data */ struct ng_eiface_private { struct ifnet *ifp; /* per-interface network data */ + struct ifmedia media; /* (fake) media information */ + int link_status; /* fake */ int unit; /* Interface unit number */ node_p node; /* Our netgraph node */ hook_p ether; /* Hook for ethernet stream */ @@ -127,6 +130,7 @@ static VNET_DEFINE(struct unrhdr *, ng_e static int ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { + const priv_p priv = (priv_p)ifp->if_softc; struct ifreq *const ifr = (struct ifreq *)data; int s, error = 0; @@ -170,6 +174,12 @@ ng_eiface_ioctl(struct ifnet *ifp, u_lon ifp->if_mtu = ifr->ifr_mtu; break; + /* (Fake) media type manipulation */ + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &priv->media, command); + break; + /* Stuff that's not supported */ case SIOCADDMULTI: case SIOCDELMULTI: @@ -280,7 +290,6 @@ ng_eiface_start2(node_p node, hook_p hoo static void ng_eiface_start(struct ifnet *ifp) { - const priv_p priv = (priv_p)ifp->if_softc; /* Don't do anything if output is active */ @@ -328,6 +337,41 @@ ng_eiface_print_ioctl(struct ifnet *ifp, } #endif /* DEBUG */ +/* + * ifmedia stuff + */ +static int +ng_eiface_mediachange(struct ifnet *ifp) +{ + const priv_p priv = (priv_p)ifp->if_softc; + struct ifmedia *ifm = &priv->media; + + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) + return (EINVAL); + if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) + ifp->if_baudrate = ifmedia_baudrate(IFM_ETHER | IFM_1000_T); + else + ifp->if_baudrate = ifmedia_baudrate(ifm->ifm_media); + + return (0); +} + +static void +ng_eiface_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + const priv_p priv = (priv_p)ifp->if_softc; + struct ifmedia *ifm = &priv->media; + + if (ifm->ifm_cur->ifm_media == (IFM_ETHER | IFM_AUTO) && + (priv->link_status & IFM_ACTIVE)) + ifmr->ifm_active = IFM_ETHER | IFM_1000_T | IFM_FDX; + else + ifmr->ifm_active = ifm->ifm_cur->ifm_media; + ifmr->ifm_status = priv->link_status; + + return; +} + /************************************************************************ NETGRAPH NODE STUFF ************************************************************************/ @@ -371,6 +415,18 @@ ng_eiface_constructor(node_p node) ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU; ifp->if_capenable = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU; + ifmedia_init(&priv->media, 0, ng_eiface_mediachange, + ng_eiface_mediastatus); + ifmedia_add(&priv->media, IFM_ETHER | IFM_10_T, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_100_TX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_1000_T, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_10G_T | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO); + priv->link_status = IFM_AVALID; /* Give this node the same name as the interface (if possible) */ if (ng_name_node(node, ifp->if_xname) != 0) @@ -379,6 +435,7 @@ ng_eiface_constructor(node_p node) /* Attach the interface */ ether_ifattach(ifp, eaddr); + ifp->if_baudrate = ifmedia_baudrate(IFM_ETHER | IFM_1000_T); /* Done */ return (0); @@ -401,7 +458,10 @@ ng_eiface_newhook(node_p node, hook_p ho NG_HOOK_SET_PRIVATE(hook, &priv->ether); NG_HOOK_SET_TO_INBOUND(hook); + priv->link_status |= IFM_ACTIVE; + CURVNET_SET_QUIET(ifp->if_vnet); if_link_state_change(ifp, LINK_STATE_UP); + CURVNET_RESTORE(); return (0); } @@ -486,16 +546,20 @@ ng_eiface_rcvmsg(node_p node, item_p ite } /* end of inner switch() */ break; case NGM_FLOW_COOKIE: + CURVNET_SET_QUIET(ifp->if_vnet); switch (msg->header.cmd) { case NGM_LINK_IS_UP: + priv->link_status |= IFM_ACTIVE; if_link_state_change(ifp, LINK_STATE_UP); break; case NGM_LINK_IS_DOWN: + priv->link_status &= ~IFM_ACTIVE; if_link_state_change(ifp, LINK_STATE_DOWN); break; default: break; } + CURVNET_RESTORE(); break; default: error = EINVAL; @@ -557,6 +621,7 @@ ng_eiface_rmnode(node_p node) * hence we have to change the current vnet context here. */ CURVNET_SET_QUIET(ifp->if_vnet); + ifmedia_removeall(&priv->media); ether_ifdetach(ifp); if_free(ifp); CURVNET_RESTORE(); @@ -576,6 +641,10 @@ ng_eiface_disconnect(hook_p hook) const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); priv->ether = NULL; + priv->link_status &= ~IFM_ACTIVE; + CURVNET_SET_QUIET(priv->ifp->if_vnet); + if_link_state_change(priv->ifp, LINK_STATE_DOWN); + CURVNET_RESTORE(); return (0); } From owner-svn-src-head@FreeBSD.ORG Tue May 24 14:36:33 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22D56106564A; Tue, 24 May 2011 14:36:33 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE6E08FC0C; Tue, 24 May 2011 14:36:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OEaWpD072395; Tue, 24 May 2011 14:36:32 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OEaWtj072393; Tue, 24 May 2011 14:36:32 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105241436.p4OEaWtj072393@svn.freebsd.org> From: Marko Zec Date: Tue, 24 May 2011 14:36: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: r222257 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 14:36:33 -0000 Author: zec Date: Tue May 24 14:36:32 2011 New Revision: 222257 URL: http://svn.freebsd.org/changeset/base/222257 Log: Assume the link to be dead if bit error rate (BER) parameter is set to 1. When a transition from link alive to link dead configuration or vice versa occurs, notify any upstream and / or downstream peers using NGM_FLOW messagges. Link state notification using NGM_FLOW messages is modelled around around already existing code in ng_ether.c. MFC after: 3 days Modified: head/sys/netgraph/ng_pipe.c Modified: head/sys/netgraph/ng_pipe.c ============================================================================== --- head/sys/netgraph/ng_pipe.c Tue May 24 14:12:31 2011 (r222256) +++ head/sys/netgraph/ng_pipe.c Tue May 24 14:36:32 2011 (r222257) @@ -298,11 +298,12 @@ ngp_rcvmsg(node_p node, item_p item, hoo { const priv_p priv = NG_NODE_PRIVATE(node); struct ng_mesg *resp = NULL; - struct ng_mesg *msg; + struct ng_mesg *msg, *flow_msg; struct ng_pipe_stats *stats; struct ng_pipe_run *run; struct ng_pipe_cfg *cfg; int error = 0; + int prev_down, now_down, cmd; NGI_GET_MSG(item, msg); switch (msg->header.typecookie) { @@ -403,10 +404,38 @@ ngp_rcvmsg(node_p node, item_p item, hoo cfg->header_offset < 64) priv->header_offset = cfg->header_offset; + prev_down = priv->upper.cfg.ber == 1 || + priv->lower.cfg.ber == 1; parse_cfg(&priv->upper.cfg, &cfg->downstream, &priv->upper, priv); parse_cfg(&priv->lower.cfg, &cfg->upstream, &priv->lower, priv); + now_down = priv->upper.cfg.ber == 1 || + priv->lower.cfg.ber == 1; + + if (prev_down != now_down) { + if (now_down) + cmd = NGM_LINK_IS_DOWN; + else + cmd = NGM_LINK_IS_UP; + + if (priv->lower.hook != NULL) { + NG_MKMESSAGE(flow_msg, NGM_FLOW_COOKIE, + cmd, 0, M_NOWAIT); + if (flow_msg != NULL) + NG_SEND_MSG_HOOK(error, node, + flow_msg, priv->lower.hook, + 0); + } + if (priv->upper.hook != NULL) { + NG_MKMESSAGE(flow_msg, NGM_FLOW_COOKIE, + cmd, 0, M_NOWAIT); + if (flow_msg != NULL) + NG_SEND_MSG_HOOK(error, node, + flow_msg, priv->upper.hook, + 0); + } + } break; default: error = EINVAL; From owner-svn-src-head@FreeBSD.ORG Tue May 24 16:49:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8E771065672; Tue, 24 May 2011 16:49:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 996AE8FC0C; Tue, 24 May 2011 16:49:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OGnY8o077871; Tue, 24 May 2011 16:49:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OGnYSS077869; Tue, 24 May 2011 16:49:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105241649.p4OGnYSS077869@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 May 2011 16:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222263 - head/sbin/geom/class/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 16:49:34 -0000 Author: ae Date: Tue May 24 16:49:34 2011 New Revision: 222263 URL: http://svn.freebsd.org/changeset/base/222263 Log: Fix calculation of alignment for odd values. Also do not change value when it is already aligned. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Tue May 24 16:06:26 2011 (r222262) +++ head/sbin/geom/class/part/geom_part.c Tue May 24 16:49:34 2011 (r222263) @@ -295,8 +295,8 @@ fmtattrib(struct gprovider *pp) return (buf); } -#define ALIGNDOWN(d, a) (-(a) & (d)) -#define ALIGNUP(d, a) (-(-(a) & -(d))) +#define ALIGNDOWN(d, a) ((d) % (a) ? (d) - (d) % (a): (d)) +#define ALIGNUP(d, a) ((d) % (a) ? (d) - (d) % (a) + (a): (d)) static int gpart_autofill_resize(struct gctl_req *req) From owner-svn-src-head@FreeBSD.ORG Tue May 24 17:03:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EC74106566B; Tue, 24 May 2011 17:03:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F6808FC12; Tue, 24 May 2011 17:03:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OH3lqm078320; Tue, 24 May 2011 17:03:47 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OH3lWL078318; Tue, 24 May 2011 17:03:47 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105241703.p4OH3lWL078318@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 May 2011 17:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222264 - head/sbin/geom/class/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 17:03:47 -0000 Author: ae Date: Tue May 24 17:03:46 2011 New Revision: 222264 URL: http://svn.freebsd.org/changeset/base/222264 Log: Simplify ALIGNDOWN macro. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Tue May 24 16:49:34 2011 (r222263) +++ head/sbin/geom/class/part/geom_part.c Tue May 24 17:03:46 2011 (r222264) @@ -295,7 +295,7 @@ fmtattrib(struct gprovider *pp) return (buf); } -#define ALIGNDOWN(d, a) ((d) % (a) ? (d) - (d) % (a): (d)) +#define ALIGNDOWN(d, a) ((d) - (d) % (a)) #define ALIGNUP(d, a) ((d) % (a) ? (d) - (d) % (a) + (a): (d)) static int From owner-svn-src-head@FreeBSD.ORG Tue May 24 18:25:40 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D79B106564A; Tue, 24 May 2011 18:25:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D2F28FC0C; Tue, 24 May 2011 18:25:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OIPeWC080780; Tue, 24 May 2011 18:25:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OIPeVm080775; Tue, 24 May 2011 18:25:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105241825.p4OIPeVm080775@svn.freebsd.org> From: Adrian Chadd Date: Tue, 24 May 2011 18:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222265 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 18:25:40 -0000 Author: adrian Date: Tue May 24 18:25:40 2011 New Revision: 222265 URL: http://svn.freebsd.org/changeset/base/222265 Log: The ANI control for the AR5416 and later chips was calling ar5212AniControl(), which did AR5212 specific initialisation. This would cause some slight silliness when enabling/disabling ANI. Just to be completely correct - and to ensure the phy error mask/RX filter register isn't incorrectly played with - make the ANI control function a method, have it set appropriately for AR5212/AR5416, and call that from the ANI control interface. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue May 24 17:03:46 2011 (r222264) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue May 24 18:25:40 2011 (r222265) @@ -320,6 +320,9 @@ struct ath_hal_5212 { struct ar5212AniState *ah_curani; /* cached last reference */ struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */ + /* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */ + HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param); + /* * Transmit power state. Note these are maintained * here so they can be retrieved by diagnostic tools. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue May 24 17:03:46 2011 (r222264) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue May 24 18:25:40 2011 (r222265) @@ -203,6 +203,9 @@ ar5212AniSetup(struct ath_hal *ah) ar5212AniAttach(ah, &tmp, &tmp, AH_TRUE); } else ar5212AniAttach(ah, &aniparams, &aniparams, AH_TRUE); + + /* Set overridable ANI methods */ + AH5212(ah)->ah_aniControl = ar5212AniControl; } /* Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Tue May 24 17:03:46 2011 (r222264) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Tue May 24 18:25:40 2011 (r222265) @@ -990,7 +990,7 @@ ar5212SetCapability(struct ath_hal *ah, HAL_ANI_SPUR_IMMUNITY_LEVEL, }; return capability < N(cmds) ? - ar5212AniControl(ah, cmds[capability], setting) : + AH5212(ah)->ah_aniControl(ah, cmds[capability], setting) : AH_FALSE; } case HAL_CAP_TSF_ADJUST: /* hardware has beacon tsf adjust */ @@ -1053,7 +1053,7 @@ ar5212GetDiagState(struct ath_hal *ah, i case HAL_DIAG_ANI_CMD: if (argsize != 2*sizeof(uint32_t)) return AH_FALSE; - ar5212AniControl(ah, ((const uint32_t *)args)[0], + AH5212(ah)->ah_aniControl(ah, ((const uint32_t *)args)[0], ((const uint32_t *)args)[1]); return AH_TRUE; case HAL_DIAG_ANI_PARAMS: Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue May 24 17:03:46 2011 (r222264) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue May 24 18:25:40 2011 (r222265) @@ -200,6 +200,9 @@ ar5416InitState(struct ath_hal_5416 *ahp /* Enable all ANI functions to begin with */ AH5416(ah)->ah_ani_function = HAL_ANI_ALL; + + /* Set overridable ANI methods */ + AH5212(ah)->ah_aniControl = ar5416AniControl; } uint32_t From owner-svn-src-head@FreeBSD.ORG Tue May 24 19:55:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17E0B106564A; Tue, 24 May 2011 19:55:58 +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 085398FC19; Tue, 24 May 2011 19:55:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OJtv3F083445; Tue, 24 May 2011 19:55:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OJtvli083443; Tue, 24 May 2011 19:55:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105241955.p4OJtvli083443@svn.freebsd.org> From: John Baldwin Date: Tue, 24 May 2011 19:55: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: r222266 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 19:55:58 -0000 Author: jhb Date: Tue May 24 19:55:57 2011 New Revision: 222266 URL: http://svn.freebsd.org/changeset/base/222266 Log: Silly spelling typos. Submitted by: "b. f." Modified: head/sys/kern/subr_smp.c Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Tue May 24 18:25:40 2011 (r222265) +++ head/sys/kern/subr_smp.c Tue May 24 19:55:57 2011 (r222266) @@ -348,11 +348,11 @@ smp_rendezvous_action(void) * cannot use a regular critical section however as having * critical_exit() preempt from this routine would also be * problematic (the preemption must not occur before the IPI - * has been acknowleged via an EOI). Instead, we + * has been acknowledged via an EOI). Instead, we * intentionally ignore td_owepreempt when leaving the - * critical setion. This should be harmless because we do not - * permit rendezvous action routines to schedule threads, and - * thus td_owepreempt should never transition from 0 to 1 + * critical section. This should be harmless because we do + * not permit rendezvous action routines to schedule threads, + * and thus td_owepreempt should never transition from 0 to 1 * during this routine. */ td = curthread; From owner-svn-src-head@FreeBSD.ORG Tue May 24 20:07:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E181F1065672; Tue, 24 May 2011 20:07:15 +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 C79198FC15; Tue, 24 May 2011 20:07:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OK7FYD083874; Tue, 24 May 2011 20:07:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OK7FkF083869; Tue, 24 May 2011 20:07:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201105242007.p4OK7FkF083869@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 24 May 2011 20:07: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: r222267 - in head/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 20:07:16 -0000 Author: pjd Date: Tue May 24 20:07:15 2011 New Revision: 222267 URL: http://svn.freebsd.org/changeset/base/222267 Log: Don't access task structure once we call task function. The task structure might be no longer available. This also allows to eliminates the need for two tasks in the zio structure. Submitted by: anonymous MFC after: 2 weeks Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c head/sys/cddl/compat/opensolaris/sys/taskq.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Tue May 24 19:55:57 2011 (r222266) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Tue May 24 20:07:15 2011 (r222267) @@ -147,9 +147,7 @@ taskq_run_safe(void *arg, int pending __ { struct ostask *task = arg; - ASSERT(task->ost_magic == TASKQ_MAGIC); task->ost_func(task->ost_arg); - task->ost_magic = 0; } taskqid_t @@ -158,15 +156,12 @@ taskq_dispatch_safe(taskq_t *tq, task_fu { int prio; - ASSERT(task->ost_magic != TASKQ_MAGIC); - /* * If TQ_FRONT is given, we want higher priority for this task, so it * can go at the front of the queue. */ prio = !!(flags & TQ_FRONT); - task->ost_magic = TASKQ_MAGIC; task->ost_func = func; task->ost_arg = arg; Modified: head/sys/cddl/compat/opensolaris/sys/taskq.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/taskq.h Tue May 24 19:55:57 2011 (r222266) +++ head/sys/cddl/compat/opensolaris/sys/taskq.h Tue May 24 20:07:15 2011 (r222267) @@ -35,7 +35,6 @@ struct ostask { struct task ost_task; task_func_t *ost_func; void *ost_arg; - int ost_magic; }; taskqid_t taskq_dispatch_safe(taskq_t *tq, task_func_t func, void *arg, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue May 24 19:55:57 2011 (r222266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue May 24 20:07:15 2011 (r222267) @@ -421,8 +421,7 @@ struct zio { #ifdef _KERNEL /* FreeBSD only. */ - struct ostask io_task_issue; - struct ostask io_task_interrupt; + struct ostask io_task; #endif }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue May 24 19:55:57 2011 (r222266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue May 24 20:07:15 2011 (r222267) @@ -1068,19 +1068,9 @@ zio_taskq_dispatch(zio_t *zio, enum zio_ spa_t *spa = zio->io_spa; zio_type_t t = zio->io_type; int flags = TQ_SLEEP | (cutinline ? TQ_FRONT : 0); -#ifdef _KERNEL - struct ostask *task; -#endif ASSERT(q == ZIO_TASKQ_ISSUE || q == ZIO_TASKQ_INTERRUPT); -#ifdef _KERNEL - if (q == ZIO_TASKQ_ISSUE) - task = &zio->io_task_issue; - else /* if (q == ZIO_TASKQ_INTERRUPT) */ - task = &zio->io_task_interrupt; -#endif - /* * If we're a config writer or a probe, the normal issue and * interrupt threads may all be blocked waiting for the config lock. @@ -1105,7 +1095,7 @@ zio_taskq_dispatch(zio_t *zio, enum zio_ ASSERT3U(q, <, ZIO_TASKQ_TYPES); #ifdef _KERNEL (void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q], - (task_func_t *)zio_execute, zio, flags, task); + (task_func_t *)zio_execute, zio, flags, &zio->io_task); #else (void) taskq_dispatch(spa->spa_zio_taskq[t][q], (task_func_t *)zio_execute, zio, flags); @@ -2904,7 +2894,7 @@ zio_done(zio_t *zio) (void) taskq_dispatch_safe( spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], (task_func_t *)zio_reexecute, zio, TQ_SLEEP, - &zio->io_task_issue); + &zio->io_task); #else (void) taskq_dispatch( spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], From owner-svn-src-head@FreeBSD.ORG Tue May 24 20:10:12 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97B04106566B; Tue, 24 May 2011 20:10:12 +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 6DD778FC0C; Tue, 24 May 2011 20:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OKAC23083995; Tue, 24 May 2011 20:10:12 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OKACI1083993; Tue, 24 May 2011 20:10:12 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201105242010.p4OKACI1083993@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 24 May 2011 20: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: r222268 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 20:10:12 -0000 Author: pjd Date: Tue May 24 20:10:12 2011 New Revision: 222268 URL: http://svn.freebsd.org/changeset/base/222268 Log: Don't pass pointer to name buffer which is on the stack to another thread, because the stack might be paged out once the other thread tries to use the data. Instead, just allocate memory. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Tue May 24 20:07:15 2011 (r222267) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Tue May 24 20:10:12 2011 (r222268) @@ -239,15 +239,20 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn return (ENOENT); } if (dl == NULL) { + size_t namesize; + /* * Allocate a new dirlock and add it to the list. */ - dl = kmem_alloc(sizeof (zfs_dirlock_t), KM_SLEEP); + namesize = strlen(name) + 1; + dl = kmem_alloc(sizeof (zfs_dirlock_t) + namesize, + KM_SLEEP); cv_init(&dl->dl_cv, NULL, CV_DEFAULT, NULL); - dl->dl_name = name; + dl->dl_name = (char *)(dl + 1); + bcopy(name, dl->dl_name, namesize); dl->dl_sharecnt = 0; dl->dl_namelock = 0; - dl->dl_namesize = 0; + dl->dl_namesize = namesize; dl->dl_dzp = dzp; dl->dl_next = dzp->z_dirlocks; dzp->z_dirlocks = dl; @@ -264,20 +269,8 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn if (flag & ZHAVELOCK) dl->dl_namelock = 1; - if ((flag & ZSHARED) && ++dl->dl_sharecnt > 1 && dl->dl_namesize == 0) { - /* - * We're the second shared reference to dl. Make a copy of - * dl_name in case the first thread goes away before we do. - * Note that we initialize the new name before storing its - * pointer into dl_name, because the first thread may load - * dl->dl_name at any time. He'll either see the old value, - * which is his, or the new shared copy; either is OK. - */ - dl->dl_namesize = strlen(dl->dl_name) + 1; - name = kmem_alloc(dl->dl_namesize, KM_SLEEP); - bcopy(dl->dl_name, name, dl->dl_namesize); - dl->dl_name = name; - } + if (flag & ZSHARED) + dl->dl_sharecnt++; mutex_exit(&dzp->z_lock); @@ -361,10 +354,8 @@ zfs_dirent_unlock(zfs_dirlock_t *dl) cv_broadcast(&dl->dl_cv); mutex_exit(&dzp->z_lock); - if (dl->dl_namesize != 0) - kmem_free(dl->dl_name, dl->dl_namesize); cv_destroy(&dl->dl_cv); - kmem_free(dl, sizeof (*dl)); + kmem_free(dl, sizeof (*dl) + dl->dl_namesize); } /* From owner-svn-src-head@FreeBSD.ORG Tue May 24 20:39:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6B8B106566B; Tue, 24 May 2011 20:39:07 +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 966358FC0A; Tue, 24 May 2011 20:39:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4OKd7lC084836; Tue, 24 May 2011 20:39:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OKd7F8084834; Tue, 24 May 2011 20:39:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105242039.p4OKd7F8084834@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 24 May 2011 20:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222269 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 20:39:07 -0000 Author: yongari Date: Tue May 24 20:39:07 2011 New Revision: 222269 URL: http://svn.freebsd.org/changeset/base/222269 Log: style(9) Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Tue May 24 20:10:12 2011 (r222268) +++ head/sys/dev/msk/if_msk.c Tue May 24 20:39:07 2011 (r222269) @@ -1018,7 +1018,7 @@ msk_ioctl(struct ifnet *ifp, u_long comm if (ifr->ifr_mtu > MSK_JUMBO_MTU || ifr->ifr_mtu < ETHERMIN) error = EINVAL; else if (ifp->if_mtu != ifr->ifr_mtu) { - if (ifr->ifr_mtu > ETHERMTU) { + if (ifr->ifr_mtu > ETHERMTU) { if ((sc_if->msk_flags & MSK_FLAG_JUMBO) == 0) { error = EINVAL; MSK_IF_UNLOCK(sc_if); @@ -1636,7 +1636,7 @@ msk_attach(device_t dev) * this workaround does not work so disable checksum offload * for VLAN interface. */ - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO; + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO; /* * Enable Rx checksum offloading for VLAN tagged frames * if controller support new descriptor format. @@ -1921,7 +1921,8 @@ mskc_attach(device_t dev) error = ENXIO; goto fail; } - mmd = malloc(sizeof(struct msk_mii_data), M_DEVBUF, M_WAITOK | M_ZERO); + mmd = malloc(sizeof(struct msk_mii_data), M_DEVBUF, M_WAITOK | + M_ZERO); if (mmd == NULL) { device_printf(dev, "failed to allocate memory for " "ivars of PORT_B\n"); @@ -1930,9 +1931,9 @@ mskc_attach(device_t dev) } mmd->port = MSK_PORT_B; mmd->pmd = sc->msk_pmd; - if (sc->msk_pmd == 'L' || sc->msk_pmd == 'S') + if (sc->msk_pmd == 'L' || sc->msk_pmd == 'S') mmd->mii_flags |= MIIF_HAVEFIBER; - if (sc->msk_pmd == 'P') + if (sc->msk_pmd == 'P') mmd->mii_flags |= MIIF_HAVEFIBER | MIIF_MACPRIV0; device_set_ivars(sc->msk_devs[MSK_PORT_B], mmd); } @@ -3741,10 +3742,10 @@ msk_init_locked(struct msk_if_softc *sc_ ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_TXCSUM); } - /* GMAC Control reset. */ - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_SET); - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_CLR); - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_F_LOOPB_OFF); + /* GMAC Control reset. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_SET); + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_CLR); + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_F_LOOPB_OFF); if (sc->msk_hw_id == CHIP_ID_YUKON_EX || sc->msk_hw_id == CHIP_ID_YUKON_SUPR) CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), @@ -3854,13 +3855,13 @@ msk_init_locked(struct msk_if_softc *sc_ msk_set_tx_stfwd(sc_if); } - if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P && - sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { - /* Disable dynamic watermark - from Linux. */ - reg = CSR_READ_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_EA)); - reg &= ~0x03; - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_EA), reg); - } + if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P && + sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { + /* Disable dynamic watermark - from Linux. */ + reg = CSR_READ_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_EA)); + reg &= ~0x03; + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_EA), reg); + } /* * Disable Force Sync bit and Alloc bit in Tx RAM interface From owner-svn-src-head@FreeBSD.ORG Wed May 25 00:34:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84051106567B; Wed, 25 May 2011 00:34:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 744368FC1E; Wed, 25 May 2011 00:34:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P0YP22091844; Wed, 25 May 2011 00:34:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P0YPc3091841; Wed, 25 May 2011 00:34:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201105250034.p4P0YPc3091841@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 25 May 2011 00:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222272 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 00:34:25 -0000 Author: bz Date: Wed May 25 00:34:25 2011 New Revision: 222272 URL: http://svn.freebsd.org/changeset/base/222272 Log: Add FEATURE() definitions for IPv4 and IPv6 so that we can use feature_present(3) to dynamically decide whether to use one or the other family. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 10 days Modified: head/sys/netinet/in_proto.c head/sys/netinet6/in6_proto.c Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Tue May 24 21:15:13 2011 (r222271) +++ head/sys/netinet/in_proto.c Wed May 25 00:34:25 2011 (r222272) @@ -106,6 +106,8 @@ static struct pr_usrreqs nousrreqs; #include #endif +FEATURE(inet, "Internet Protocol version 4"); + extern struct domain inetdomain; /* Spacer for loadable protocols. */ Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Tue May 24 21:15:13 2011 (r222271) +++ head/sys/netinet6/in6_proto.c Wed May 25 00:34:25 2011 (r222272) @@ -133,6 +133,7 @@ __FBSDID("$FreeBSD$"); /* * TCP/IP protocol family: IP6, ICMP6, UDP, TCP. */ +FEATURE(inet6, "Internet Protocol version 6"); extern struct domain inet6domain; static struct pr_usrreqs nousrreqs; From owner-svn-src-head@FreeBSD.ORG Wed May 25 01:04:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5590B1065670; Wed, 25 May 2011 01:04:13 +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 3BE4F8FC14; Wed, 25 May 2011 01:04:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P14DXA092754; Wed, 25 May 2011 01:04:13 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P14DLb092748; Wed, 25 May 2011 01:04:13 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105250104.p4P14DLb092748@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 25 May 2011 01:04: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: r222273 - in head: gnu/usr.bin gnu/usr.bin/grep tools/build/options usr.bin usr.bin/grep X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 01:04:13 -0000 Author: obrien Date: Wed May 25 01:04:12 2011 New Revision: 222273 URL: http://svn.freebsd.org/changeset/base/222273 Log: Build and install a BSD licensed grep. If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be '[ef]grep'. Otherwise, BSD-grep will be the grep family, and GNUgrep will be 'gnugrep'. Discussed with: brooks Modified: head/gnu/usr.bin/Makefile head/gnu/usr.bin/grep/Makefile head/tools/build/options/WITH_BSD_GREP head/usr.bin/Makefile head/usr.bin/grep/Makefile Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Wed May 25 00:34:25 2011 (r222272) +++ head/gnu/usr.bin/Makefile Wed May 25 01:04:12 2011 (r222273) @@ -27,9 +27,7 @@ _groff= groff .endif .endif -.if ${MK_BSD_GREP} != "yes" _grep= grep -.endif .if ${MK_CVS} != "no" _cvs= cvs Modified: head/gnu/usr.bin/grep/Makefile ============================================================================== --- head/gnu/usr.bin/grep/Makefile Wed May 25 00:34:25 2011 (r222272) +++ head/gnu/usr.bin/grep/Makefile Wed May 25 01:04:12 2011 (r222273) @@ -1,35 +1,50 @@ # $FreeBSD$ +.include + GREP_LIBZ=YES +.if ${MK_BSD_GREP} != "yes" PROG= grep +.else +PROG= gnugrep +.endif SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \ isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \ xstrtoumax.c CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H +.if ${MK_BSD_GREP} != "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep MLINKS= grep.1 egrep.1 grep.1 fgrep.1 +.endif DPADD= ${LIBGNUREGEX} ${LIBBZ2} LDADD= -lgnuregex -lbz2 +.if ${MK_BSD_GREP} != "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ ${BINDIR}/grep ${BINDIR}/bzegrep \ ${BINDIR}/grep ${BINDIR}/bzfgrep MLINKS+=grep.1 bzgrep.1 grep.1 bzegrep.1 grep.1 bzfgrep.1 +.endif .if defined(GREP_LIBZ) && !empty(GREP_LIBZ) LDADD+= -lz DPADD+= ${LIBZ} CFLAGS+=-DHAVE_LIBZ=1 +.if ${MK_BSD_GREP} != "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS+=grep.1 zgrep.1 grep.1 zegrep.1 grep.1 zfgrep.1 .endif +.endif + +gnugrep.1: grep.1 + cp ${.ALLSRC} ${.TARGET} SUBDIR+=doc Modified: head/tools/build/options/WITH_BSD_GREP ============================================================================== --- head/tools/build/options/WITH_BSD_GREP Wed May 25 00:34:25 2011 (r222272) +++ head/tools/build/options/WITH_BSD_GREP Wed May 25 01:04:12 2011 (r222273) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Build BSD-licensed grep instead of GNU grep. +Install BSD-licensed grep as '[ef]grep' instead of GNU grep. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Wed May 25 00:34:25 2011 (r222272) +++ head/usr.bin/Makefile Wed May 25 01:04:12 2011 (r222273) @@ -57,7 +57,7 @@ SUBDIR= alias \ getconf \ getent \ getopt \ - ${_grep} \ + grep \ gzip \ head \ hexdump \ @@ -227,10 +227,6 @@ SUBDIR+= bluetooth SUBDIR+= cpio .endif -.if ${MK_BSD_GREP} != "no" -_grep= grep -.endif - .if ${MK_CALENDAR} != "no" SUBDIR+= calendar .endif Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Wed May 25 00:34:25 2011 (r222272) +++ head/usr.bin/grep/Makefile Wed May 25 01:04:12 2011 (r222273) @@ -2,9 +2,16 @@ # $FreeBSD$ # $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $ +.include + +.if ${MK_BSD_GREP} == "yes" PROG= grep +.else +PROG= bsdgrep +.endif SRCS= fastgrep.c file.c grep.c queue.c util.c +.if ${MK_BSD_GREP} == "yes" LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ @@ -16,6 +23,10 @@ MLINKS= grep.1 egrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ grep.1 zfgrep.1 +.endif + +bsdgrep.1: grep.1 + cp ${.ALLSRC} ${.TARGET} WARNS?= 6 From owner-svn-src-head@FreeBSD.ORG Wed May 25 04:46:48 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED311106566C; Wed, 25 May 2011 04:46:48 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD45A8FC0A; Wed, 25 May 2011 04:46:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P4kmwV099584; Wed, 25 May 2011 04:46:48 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P4kmXH099581; Wed, 25 May 2011 04:46:48 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201105250446.p4P4kmXH099581@svn.freebsd.org> From: Kevin Lo Date: Wed, 25 May 2011 04:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222275 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 04:46:49 -0000 Author: kevlo Date: Wed May 25 04:46:48 2011 New Revision: 222275 URL: http://svn.freebsd.org/changeset/base/222275 Log: run(4) needs firmware loaded to work Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed May 25 03:25:14 2011 (r222274) +++ head/sys/amd64/conf/GENERIC Wed May 25 04:46:48 2011 (r222275) @@ -324,6 +324,7 @@ device udav # Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs device run # Ralink Technology RT2700/RT2800/RT3000 NICs. +device runfw # Ralink Technology RT2700/RT2800/RT3000 NICs firmware device uath # Atheros AR5523 wireless NICs device upgt # Conexant/Intersil PrismGT wireless NICs. device ural # Ralink Technology RT2500USB wireless NICs Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Wed May 25 03:25:14 2011 (r222274) +++ head/sys/i386/conf/GENERIC Wed May 25 04:46:48 2011 (r222275) @@ -337,6 +337,7 @@ device udav # Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs device run # Ralink Technology RT2700/RT2800/RT3000 NICs. +device runfw # Ralink Technology RT2700/RT2800/RT3000 NICs firmware device uath # Atheros AR5523 wireless NICs device upgt # Conexant/Intersil PrismGT wireless NICs. device ural # Ralink Technology RT2500USB wireless NICs From owner-svn-src-head@FreeBSD.ORG Wed May 25 04:52:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD336106564A; Wed, 25 May 2011 04:52:07 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0FDE48FC0A; Wed, 25 May 2011 04:52:06 +0000 (UTC) Received: by wyf23 with SMTP id 23so7451805wyf.13 for ; Tue, 24 May 2011 21:52:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.64.145 with SMTP id c17mr4086690wed.56.1306299125455; Tue, 24 May 2011 21:52:05 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.216.187.141 with HTTP; Tue, 24 May 2011 21:52:05 -0700 (PDT) In-Reply-To: <201105250446.p4P4kmXH099581@svn.freebsd.org> References: <201105250446.p4P4kmXH099581@svn.freebsd.org> Date: Wed, 25 May 2011 16:52:05 +1200 X-Google-Sender-Auth: pY6s-ZN98IvFPR_WVtNPYU9RuEg Message-ID: From: Andrew Thompson To: Kevin Lo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222275 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 04:52:07 -0000 On 25 May 2011 16:46, Kevin Lo wrote: > Author: kevlo > Date: Wed May 25 04:46:48 2011 > New Revision: 222275 > URL: http://svn.freebsd.org/changeset/base/222275 > > Log: > =A0run(4) needs firmware loaded to work > > Modified: > =A0head/sys/amd64/conf/GENERIC > =A0head/sys/i386/conf/GENERIC > > Modified: head/sys/amd64/conf/GENERIC > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/amd64/conf/GENERIC Wed May 25 03:25:14 2011 =A0 =A0 =A0 =A0(= r222274) > +++ head/sys/amd64/conf/GENERIC Wed May 25 04:46:48 2011 =A0 =A0 =A0 =A0(= r222275) > @@ -324,6 +324,7 @@ device =A0 =A0 =A0 =A0 =A0 =A0 =A0udav =A0 =A0 =A0 = =A0 =A0 =A0# Davicom DM9601E USB > =A0# USB Wireless > =A0device =A0 =A0 =A0 =A0 rum =A0 =A0 =A0 =A0 =A0 =A0 # Ralink Technology= RT2501USB wireless NICs > =A0device =A0 =A0 =A0 =A0 run =A0 =A0 =A0 =A0 =A0 =A0 # Ralink Technology= RT2700/RT2800/RT3000 NICs. > +device =A0 =A0 =A0 =A0 runfw =A0 =A0 =A0 =A0 =A0 # Ralink Technology RT2= 700/RT2800/RT3000 NICs firmware > =A0device =A0 =A0 =A0 =A0 uath =A0 =A0 =A0 =A0 =A0 =A0# Atheros AR5523 wi= reless NICs > =A0device =A0 =A0 =A0 =A0 upgt =A0 =A0 =A0 =A0 =A0 =A0# Conexant/Intersil= PrismGT wireless NICs. > =A0device =A0 =A0 =A0 =A0 ural =A0 =A0 =A0 =A0 =A0 =A0# Ralink Technology= RT2500USB wireless NICs Are you sure this is right? I believe this will statically link in contrib/dev/run/rt2870.fw.uu to the kernel as opposed to having the kernel load and release runfw.ko as needed. Andrew From owner-svn-src-head@FreeBSD.ORG Wed May 25 07:19:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5D6F106566B; Wed, 25 May 2011 07:19:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4ADF8FC13; Wed, 25 May 2011 07:19:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P7JJSn004130; Wed, 25 May 2011 07:19:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P7JJld004123; Wed, 25 May 2011 07:19:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105250719.p4P7JJld004123@svn.freebsd.org> From: Adrian Chadd Date: Wed, 25 May 2011 07:19: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: r222276 - in head/sys/dev/ath/ath_hal: . ar5416 ar9001 ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 07:19:19 -0000 Author: adrian Date: Wed May 25 07:19:19 2011 New Revision: 222276 URL: http://svn.freebsd.org/changeset/base/222276 Log: Tidy up the ANI API in preparation for looking to expose some more of the ANI statistics and committing some tools which use these. * Change HAL_ANI_* commands _back_ to be numerical, rather than a bitmap; * modify access to the ANI control bitmap to convert a command to a bitmap; * Fix the ANI noise immunity fiddling for CCK errors - it wasn't checking whether noise immunity was disabled or not. Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 04:46:48 2011 (r222275) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 07:19:19 2011 (r222276) @@ -418,16 +418,21 @@ extern HAL_BOOL ath_hal_setTxQProps(stru extern HAL_BOOL ath_hal_getTxQProps(struct ath_hal *ah, HAL_TXQ_INFO *qInfo, const HAL_TX_QUEUE_INFO *qi); +/* + * Internal HAL ANI commands. + * + * These values represent the ANI commands passed to the ANI Control method + * for AR5212, AR5416 and later chipsets. + */ typedef enum { - HAL_ANI_PRESENT = 0x1, /* is ANI support present */ - HAL_ANI_NOISE_IMMUNITY_LEVEL = 0x2, /* set level */ - HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 0x4, /* enable/disable */ - HAL_ANI_CCK_WEAK_SIGNAL_THR = 0x8, /* enable/disable */ - HAL_ANI_FIRSTEP_LEVEL = 0x10, /* set level */ - HAL_ANI_SPUR_IMMUNITY_LEVEL = 0x20, /* set level */ - HAL_ANI_MODE = 0x40, /* 0 => manual, 1 => auto (XXX do not change) */ - HAL_ANI_PHYERR_RESET =0x80, /* reset phy error stats */ - HAL_ANI_ALL = 0xff + HAL_ANI_PRESENT = 0, /* is ANI support present */ + HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */ + HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */ + HAL_ANI_CCK_WEAK_SIGNAL_THR = 3, /* enable/disable */ + HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */ + HAL_ANI_SPUR_IMMUNITY_LEVEL = 5, /* set level */ + HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */ + HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ } HAL_ANI_CMD; #define HAL_SPUR_VAL_MASK 0x3FFF Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Wed May 25 04:46:48 2011 (r222275) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Wed May 25 07:19:19 2011 (r222276) @@ -175,9 +175,17 @@ ar5416AniControl(struct ath_hal *ah, HAL struct ar5212AniState *aniState = ahp->ah_curani; const struct ar5212AniParams *params = aniState->params; + /* Check whether the particular function is enabled */ + if (((1 << cmd) & AH5416(ah)->ah_ani_function) == 0) { + HALDEBUG(ah, HAL_DEBUG_ANI, "%s: command %d disabled\n", + __func__, cmd); + HALDEBUG(ah, HAL_DEBUG_ANI, "%s: cmd %d; mask %x\n", __func__, cmd, AH5416(ah)->ah_ani_function); + return AH_FALSE; + } + OS_MARK(ah, AH_MARK_ANI_CONTROL, cmd); - switch (cmd & AH5416(ah)->ah_ani_function) { + switch (cmd) { case HAL_ANI_NOISE_IMMUNITY_LEVEL: { u_int level = param; @@ -356,14 +364,14 @@ ar5416AniOfdmErrTrigger(struct ath_hal * aniState = ahp->ah_curani; params = aniState->params; /* First, raise noise immunity level, up to max */ - if ((AH5416(ah)->ah_ani_function & HAL_ANI_NOISE_IMMUNITY_LEVEL) && + if ((AH5416(ah)->ah_ani_function & (1 << HAL_ANI_NOISE_IMMUNITY_LEVEL)) && (aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel)) { ar5416AniControl(ah, HAL_ANI_NOISE_IMMUNITY_LEVEL, aniState->noiseImmunityLevel + 1); return; } /* then, raise spur immunity level, up to max */ - if ((AH5416(ah)->ah_ani_function & HAL_ANI_SPUR_IMMUNITY_LEVEL) && + if ((AH5416(ah)->ah_ani_function & (1 << HAL_ANI_SPUR_IMMUNITY_LEVEL)) && (aniState->spurImmunityLevel+1 < params->maxSpurImmunityLevel)) { ar5416AniControl(ah, HAL_ANI_SPUR_IMMUNITY_LEVEL, aniState->spurImmunityLevel + 1); @@ -443,7 +451,8 @@ ar5416AniCckErrTrigger(struct ath_hal *a /* first, raise noise immunity level, up to max */ aniState = ahp->ah_curani; params = aniState->params; - if (aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel) { + if ((AH5416(ah)->ah_ani_function & (1 << HAL_ANI_NOISE_IMMUNITY_LEVEL) && + aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel)) { ar5416AniControl(ah, HAL_ANI_NOISE_IMMUNITY_LEVEL, aniState->noiseImmunityLevel + 1); return; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed May 25 04:46:48 2011 (r222275) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed May 25 07:19:19 2011 (r222276) @@ -58,7 +58,7 @@ ar5416AniSetup(struct ath_hal *ah) .period = 100, }; /* NB: disable ANI noise immmunity for reliable RIFS rx */ - AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + AH5416(ah)->ah_ani_function &= ~(1 << HAL_ANI_NOISE_IMMUNITY_LEVEL); ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } @@ -199,7 +199,7 @@ ar5416InitState(struct ath_hal_5416 *ahp AH5416(ah)->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK; /* Enable all ANI functions to begin with */ - AH5416(ah)->ah_ani_function = HAL_ANI_ALL; + AH5416(ah)->ah_ani_function = 0xffffffff; /* Set overridable ANI methods */ AH5212(ah)->ah_aniControl = ar5416AniControl; Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Wed May 25 04:46:48 2011 (r222275) +++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Wed May 25 07:19:19 2011 (r222276) @@ -82,7 +82,7 @@ ar9160AniSetup(struct ath_hal *ah) }; /* NB: disable ANI noise immmunity for reliable RIFS rx */ - AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + AH5416(ah)->ah_ani_function &= ~(1 << HAL_ANI_NOISE_IMMUNITY_LEVEL); ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Wed May 25 04:46:48 2011 (r222275) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Wed May 25 07:19:19 2011 (r222276) @@ -93,7 +93,7 @@ ar9280AniSetup(struct ath_hal *ah) .period = 100, }; /* NB: disable ANI noise immmunity for reliable RIFS rx */ - AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + AH5416(ah)->ah_ani_function &= ~(1 << HAL_ANI_NOISE_IMMUNITY_LEVEL); /* NB: ANI is not enabled yet */ ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Wed May 25 04:46:48 2011 (r222275) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Wed May 25 07:19:19 2011 (r222276) @@ -98,7 +98,7 @@ ar9285AniSetup(struct ath_hal *ah) .period = 100, }; /* NB: disable ANI noise immmunity for reliable RIFS rx */ - AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + AH5416(ah)->ah_ani_function &= ~(1 << HAL_ANI_NOISE_IMMUNITY_LEVEL); ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } From owner-svn-src-head@FreeBSD.ORG Wed May 25 07:34:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2CB3106566B; Wed, 25 May 2011 07:34:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 919CC8FC17; Wed, 25 May 2011 07:34:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P7YnDv004629; Wed, 25 May 2011 07:34:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P7Ynug004624; Wed, 25 May 2011 07:34:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105250734.p4P7Ynug004624@svn.freebsd.org> From: Adrian Chadd Date: Wed, 25 May 2011 07:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222277 - in head/sys/dev/ath: . ath_hal ath_hal/ar5212 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 07:34:49 -0000 Author: adrian Date: Wed May 25 07:34:49 2011 New Revision: 222277 URL: http://svn.freebsd.org/changeset/base/222277 Log: The current ANI capability information uses a different set of values for the commands, compared to the internal command values (HAL_ANI_CMD.) My eventual aim is to make the HAL_ANI_CMD internal enum match the public API and then remove all this messiness. This now allows HAL_CAP_INTMIT users to use a public HAL_CAP_INTMIT_ enum rather than magic constants. The only magic constants currently used by if_ath are "enable" and "present". Some local tools of mine allow for direct, manual fiddling of the ANI variables and I'll convert these to use the public enum API before I commit them. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Wed May 25 07:19:19 2011 (r222276) +++ head/sys/dev/ath/ath_hal/ah.h Wed May 25 07:34:49 2011 (r222277) @@ -669,6 +669,41 @@ typedef struct { } HAL_CHANNEL_SURVEY; /* + * ANI commands. + * + * These are used both internally and externally via the diagnostic + * API. + * + * Note that this is NOT the ANI commands being used via the INTMIT + * capability - that has a different mapping for some reason. + */ +typedef enum { + HAL_ANI_PRESENT = 0, /* is ANI support present */ + HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */ + HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */ + HAL_ANI_CCK_WEAK_SIGNAL_THR = 3, /* enable/disable */ + HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */ + HAL_ANI_SPUR_IMMUNITY_LEVEL = 5, /* set level */ + HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */ + HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ +} HAL_ANI_CMD; + +/* + * This is the layout of the ANI INTMIT capability. + * + * Notice that the command values differ to HAL_ANI_CMD. + */ +typedef enum { + HAL_CAP_INTMIT_PRESENT = 0, + HAL_CAP_INTMIT_ENABLE = 1, + HAL_CAP_INTMIT_NOISE_IMMUNITY_LEVEL = 2, + HAL_CAP_INTMIT_OFDM_WEAK_SIGNAL_LEVEL = 3, + HAL_CAP_INTMIT_CCK_WEAK_SIGNAL_THR = 4, + HAL_CAP_INTMIT_FIRSTEP_LEVEL = 5, + HAL_CAP_INTMIT_SPUR_IMMUNITY_LEVEL = 6 +} HAL_CAP_INTMIT_CMD; + +/* * Hardware Access Layer (HAL) API. * * Clients of the HAL call ath_hal_attach to obtain a reference to an Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 07:19:19 2011 (r222276) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 07:34:49 2011 (r222277) @@ -418,23 +418,6 @@ extern HAL_BOOL ath_hal_setTxQProps(stru extern HAL_BOOL ath_hal_getTxQProps(struct ath_hal *ah, HAL_TXQ_INFO *qInfo, const HAL_TX_QUEUE_INFO *qi); -/* - * Internal HAL ANI commands. - * - * These values represent the ANI commands passed to the ANI Control method - * for AR5212, AR5416 and later chipsets. - */ -typedef enum { - HAL_ANI_PRESENT = 0, /* is ANI support present */ - HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */ - HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */ - HAL_ANI_CCK_WEAK_SIGNAL_THR = 3, /* enable/disable */ - HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */ - HAL_ANI_SPUR_IMMUNITY_LEVEL = 5, /* set level */ - HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */ - HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ -} HAL_ANI_CMD; - #define HAL_SPUR_VAL_MASK 0x3FFF #define HAL_SPUR_CHAN_WIDTH 87 #define HAL_BIN_WIDTH_BASE_100HZ 3125 Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed May 25 07:19:19 2011 (r222276) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed May 25 07:34:49 2011 (r222277) @@ -880,16 +880,16 @@ ar5212GetCapability(struct ath_hal *ah, return HAL_OK; case HAL_CAP_INTMIT: /* interference mitigation */ switch (capability) { - case 0: /* hardware capability */ + case HAL_CAP_INTMIT_PRESENT: /* hardware capability */ return HAL_OK; - case 1: + case HAL_CAP_INTMIT_ENABLE: return (ahp->ah_procPhyErr & HAL_ANI_ENA) ? HAL_OK : HAL_ENXIO; - case 2: /* HAL_ANI_NOISE_IMMUNITY_LEVEL */ - case 3: /* HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION */ - case 4: /* HAL_ANI_CCK_WEAK_SIGNAL_THR */ - case 5: /* HAL_ANI_FIRSTEP_LEVEL */ - case 6: /* HAL_ANI_SPUR_IMMUNITY_LEVEL */ + case HAL_CAP_INTMIT_NOISE_IMMUNITY_LEVEL: + case HAL_CAP_INTMIT_OFDM_WEAK_SIGNAL_LEVEL: + case HAL_CAP_INTMIT_CCK_WEAK_SIGNAL_THR: + case HAL_CAP_INTMIT_FIRSTEP_LEVEL: + case HAL_CAP_INTMIT_SPUR_IMMUNITY_LEVEL: ani = ar5212AniGetCurrentState(ah); if (ani == AH_NULL) return HAL_ENXIO; @@ -980,6 +980,8 @@ ar5212SetCapability(struct ath_hal *ah, OS_REG_WRITE(ah, AR_TPC, ahp->ah_macTPC); return AH_TRUE; case HAL_CAP_INTMIT: { /* interference mitigation */ + /* This maps the public ANI commands to the internal ANI commands */ + /* Private: HAL_ANI_CMD; Public: HAL_CAP_INTMIT_CMD */ static const HAL_ANI_CMD cmds[] = { HAL_ANI_PRESENT, HAL_ANI_MODE, Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Wed May 25 07:19:19 2011 (r222276) +++ head/sys/dev/ath/if_athvar.h Wed May 25 07:34:49 2011 (r222277) @@ -634,11 +634,11 @@ void ath_intr(void *); #define ath_hal_settpcts(_ah, _tpcts) \ ath_hal_setcapability(_ah, HAL_CAP_TPC_CTS, 0, _tpcts, NULL) #define ath_hal_hasintmit(_ah) \ - (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, 0, NULL) == HAL_OK) + (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, HAL_CAP_INTMIT_PRESENT, NULL) == HAL_OK) #define ath_hal_getintmit(_ah) \ - (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, 1, NULL) == HAL_OK) + (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, HAL_CAP_INTMIT_ENABLE, NULL) == HAL_OK) #define ath_hal_setintmit(_ah, _v) \ - ath_hal_setcapability(_ah, HAL_CAP_INTMIT, 1, _v, NULL) + ath_hal_setcapability(_ah, HAL_CAP_INTMIT, HAL_CAP_INTMIT_ENABLE, _v, NULL) #define ath_hal_getchannoise(_ah, _c) \ ((*(_ah)->ah_getChanNoise)((_ah), (_c))) #define ath_hal_getrxchainmask(_ah, _prxchainmask) \ From owner-svn-src-head@FreeBSD.ORG Wed May 25 08:42:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7384D106566B; Wed, 25 May 2011 08:42:01 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6431C8FC12; Wed, 25 May 2011 08:42:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P8g1dp006601; Wed, 25 May 2011 08:42:01 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P8g1XU006599; Wed, 25 May 2011 08:42:01 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201105250842.p4P8g1XU006599@svn.freebsd.org> From: Benedict Reuschling Date: Wed, 25 May 2011 08:42: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: r222278 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 08:42:01 -0000 Author: bcr (doc committer) Date: Wed May 25 08:42:01 2011 New Revision: 222278 URL: http://svn.freebsd.org/changeset/base/222278 Log: Add a description to the checksum target about not only being able to verify, but also having the ability to fetch distfiles that are missing or failed the checksum calculation PR: docs/138887 Submitted by: Radim Kolar (hsn at sendmail dot cz) MFC after: 5 days Modified: head/share/man/man7/ports.7 Modified: head/share/man/man7/ports.7 ============================================================================== --- head/share/man/man7/ports.7 Wed May 25 07:34:49 2011 (r222277) +++ head/share/man/man7/ports.7 Wed May 25 08:42:01 2011 (r222278) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2009 +.Dd May 25, 2011 .Dt PORTS 7 .Os .Sh NAME @@ -124,6 +124,8 @@ and .It Cm checksum Verify that the fetched distfile's checksum matches the one the port was tested against. +If the distfile's checksum does not match, it also fetches the distfiles +which are missing or failed the checksum calculation. Defining .Va NO_CHECKSUM will skip this step. From owner-svn-src-head@FreeBSD.ORG Wed May 25 09:32:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCBCB1065672; Wed, 25 May 2011 09:32:19 +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 BDDD28FC08; Wed, 25 May 2011 09:32:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P9WJm7008195; Wed, 25 May 2011 09:32:19 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P9WJDn008193; Wed, 25 May 2011 09:32:19 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105250932.p4P9WJDn008193@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 25 May 2011 09:32: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: r222279 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 09:32:19 -0000 Author: ae Date: Wed May 25 09:32:19 2011 New Revision: 222279 URL: http://svn.freebsd.org/changeset/base/222279 Log: Do not truncate available disk space to the closest track boundary. Modified: head/sys/geom/part/g_part_mbr.c Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Wed May 25 08:42:01 2011 (r222278) +++ head/sys/geom/part/g_part_mbr.c Wed May 25 09:32:19 2011 (r222279) @@ -253,15 +253,14 @@ g_part_mbr_create(struct g_part_table *b { struct g_provider *pp; struct g_part_mbr_table *table; - uint32_t msize; pp = gpp->gpp_provider; if (pp->sectorsize < MBRSIZE) return (ENOSPC); - msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); basetable->gpt_first = basetable->gpt_sectors; - basetable->gpt_last = msize - (msize % basetable->gpt_sectors) - 1; + basetable->gpt_last = MIN(pp->mediasize / pp->sectorsize, + UINT32_MAX) - 1; table = (struct g_part_mbr_table *)basetable; le16enc(table->mbr + DOSMAGICOFFSET, DOSMAGIC); @@ -470,7 +469,7 @@ g_part_mbr_read(struct g_part_table *bas basetable->gpt_entries = NDOSPART; basetable->gpt_first = basetable->gpt_sectors; - basetable->gpt_last = msize - (msize % basetable->gpt_sectors) - 1; + basetable->gpt_last = msize - 1; g_free(buf); return (0); From owner-svn-src-head@FreeBSD.ORG Wed May 25 09:38:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01C86106564A; Wed, 25 May 2011 09:38:13 +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 E74B48FC1B; Wed, 25 May 2011 09:38:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P9cCRR008404; Wed, 25 May 2011 09:38:12 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P9cChx008402; Wed, 25 May 2011 09:38:12 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105250938.p4P9cChx008402@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 25 May 2011 09:38: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: r222280 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 09:38:13 -0000 Author: ae Date: Wed May 25 09:38:12 2011 New Revision: 222280 URL: http://svn.freebsd.org/changeset/base/222280 Log: Do not truncate available disk space to the closest track boundary. Modified: head/sys/geom/part/g_part_ebr.c Modified: head/sys/geom/part/g_part_ebr.c ============================================================================== --- head/sys/geom/part/g_part_ebr.c Wed May 25 09:32:19 2011 (r222279) +++ head/sys/geom/part/g_part_ebr.c Wed May 25 09:38:12 2011 (r222280) @@ -289,7 +289,6 @@ g_part_ebr_create(struct g_part_table *b return (ENXIO); msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); - msize -= msize % basetable->gpt_sectors; basetable->gpt_first = 0; basetable->gpt_last = msize - 1; basetable->gpt_entries = msize / basetable->gpt_sectors; @@ -523,7 +522,7 @@ g_part_ebr_read(struct g_part_table *bas basetable->gpt_entries = msize / basetable->gpt_sectors; basetable->gpt_first = 0; - basetable->gpt_last = msize - (msize % basetable->gpt_sectors) - 1; + basetable->gpt_last = msize - 1; return (0); } From owner-svn-src-head@FreeBSD.ORG Wed May 25 09:45:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E19106564A; Wed, 25 May 2011 09:45:13 +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 8B1048FC13; Wed, 25 May 2011 09:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4P9jDHM008657; Wed, 25 May 2011 09:45:13 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P9jDXe008655; Wed, 25 May 2011 09:45:13 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105250945.p4P9jDXe008655@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 25 May 2011 09:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222281 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 09:45:13 -0000 Author: ae Date: Wed May 25 09:45:13 2011 New Revision: 222281 URL: http://svn.freebsd.org/changeset/base/222281 Log: Do not truncate available disk space to the closest track boundary. Modified: head/sys/geom/part/g_part_pc98.c Modified: head/sys/geom/part/g_part_pc98.c ============================================================================== --- head/sys/geom/part/g_part_pc98.c Wed May 25 09:38:12 2011 (r222280) +++ head/sys/geom/part/g_part_pc98.c Wed May 25 09:45:13 2011 (r222281) @@ -248,7 +248,6 @@ g_part_pc98_create(struct g_part_table * { struct g_provider *pp; struct g_part_pc98_table *table; - uint32_t cyl, msize; pp = gpp->gpp_provider; if (pp->sectorsize < SECSIZE || pp->mediasize < BOOTSIZE) @@ -256,11 +255,8 @@ g_part_pc98_create(struct g_part_table * if (pp->sectorsize > SECSIZE) return (ENXIO); - cyl = basetable->gpt_heads * basetable->gpt_sectors; - - msize = MIN(pp->mediasize / SECSIZE, UINT32_MAX); - basetable->gpt_first = cyl; - basetable->gpt_last = msize - (msize % cyl) - 1; + basetable->gpt_first = basetable->gpt_heads * basetable->gpt_sectors; + basetable->gpt_last = MIN(pp->mediasize / SECSIZE, UINT32_MAX) - 1; table = (struct g_part_pc98_table *)basetable; le16enc(table->boot + DOSMAGICOFFSET, DOSMAGIC); @@ -488,7 +484,7 @@ g_part_pc98_read(struct g_part_table *ba basetable->gpt_entries = NDOSPART; basetable->gpt_first = cyl; - basetable->gpt_last = msize - (msize % cyl) - 1; + basetable->gpt_last = msize - 1; g_free(buf); return (0); From owner-svn-src-head@FreeBSD.ORG Wed May 25 10:04:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA562106566B; Wed, 25 May 2011 10:04:13 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB7148FC0C; Wed, 25 May 2011 10:04:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PA4D16009289; Wed, 25 May 2011 10:04:13 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PA4D4u009286; Wed, 25 May 2011 10:04:13 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201105251004.p4PA4D4u009286@svn.freebsd.org> From: Kevin Lo Date: Wed, 25 May 2011 10:04: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: r222282 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 10:04:14 -0000 Author: kevlo Date: Wed May 25 10:04:13 2011 New Revision: 222282 URL: http://svn.freebsd.org/changeset/base/222282 Log: Bring back r222275. runfw(4) will statically link in rt2870.fw.uu to the kernel, though I have MODULES_OVERRIDE="" in GENERIC. Spotted by: thompsa Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed May 25 09:45:13 2011 (r222281) +++ head/sys/amd64/conf/GENERIC Wed May 25 10:04:13 2011 (r222282) @@ -324,7 +324,6 @@ device udav # Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs device run # Ralink Technology RT2700/RT2800/RT3000 NICs. -device runfw # Ralink Technology RT2700/RT2800/RT3000 NICs firmware device uath # Atheros AR5523 wireless NICs device upgt # Conexant/Intersil PrismGT wireless NICs. device ural # Ralink Technology RT2500USB wireless NICs Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Wed May 25 09:45:13 2011 (r222281) +++ head/sys/i386/conf/GENERIC Wed May 25 10:04:13 2011 (r222282) @@ -337,7 +337,6 @@ device udav # Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs device run # Ralink Technology RT2700/RT2800/RT3000 NICs. -device runfw # Ralink Technology RT2700/RT2800/RT3000 NICs firmware device uath # Atheros AR5523 wireless NICs device upgt # Conexant/Intersil PrismGT wireless NICs. device ural # Ralink Technology RT2500USB wireless NICs From owner-svn-src-head@FreeBSD.ORG Wed May 25 11:14:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47D87106564A; Wed, 25 May 2011 11:14:27 +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 396BC8FC13; Wed, 25 May 2011 11:14:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PBERqj012720; Wed, 25 May 2011 11:14:27 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PBERhH012717; Wed, 25 May 2011 11:14:27 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105251114.p4PBERhH012717@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 25 May 2011 11:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222283 - head/sys/geom/vinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 11:14:27 -0000 Author: ae Date: Wed May 25 11:14:26 2011 New Revision: 222283 URL: http://svn.freebsd.org/changeset/base/222283 Log: Prevent non-aligned reading from provider while tasting. Reject providers with unsupported sectorsize. Reported by: Joerg Wunsch MFC after: 1 week Modified: head/sys/geom/vinum/geom_vinum_drive.c head/sys/geom/vinum/geom_vinum_events.c Modified: head/sys/geom/vinum/geom_vinum_drive.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_drive.c Wed May 25 10:04:13 2011 (r222282) +++ head/sys/geom/vinum/geom_vinum_drive.c Wed May 25 11:14:26 2011 (r222283) @@ -126,6 +126,10 @@ gv_read_header(struct g_consumer *cp, st pp = cp->provider; KASSERT(pp != NULL, ("gv_read_header: null pp")); + if ((GV_HDR_OFFSET % pp->sectorsize) != 0 || + (GV_HDR_LEN % pp->sectorsize) != 0) + return (ENODEV); + d_hdr = g_read_data(cp, GV_HDR_OFFSET, pp->sectorsize, NULL); if (d_hdr == NULL) return (-1); Modified: head/sys/geom/vinum/geom_vinum_events.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_events.c Wed May 25 10:04:13 2011 (r222282) +++ head/sys/geom/vinum/geom_vinum_events.c Wed May 25 11:14:26 2011 (r222283) @@ -109,6 +109,12 @@ gv_drive_tasted(struct gv_softc *sc, str buf = NULL; G_VINUM_DEBUG(2, "tasted drive on '%s'", pp->name); + if ((GV_CFG_OFFSET % pp->sectorsize) != 0 || + (GV_CFG_LEN % pp->sectorsize) != 0) { + G_VINUM_DEBUG(0, "provider %s has unsupported sectorsize.", + pp->name); + return; + } gp = sc->geom; g_topology_lock(); From owner-svn-src-head@FreeBSD.ORG Wed May 25 13:55:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7CB5106564A; Wed, 25 May 2011 13:55:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6D168FC12; Wed, 25 May 2011 13:55:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PDtn1i017478; Wed, 25 May 2011 13:55:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PDtnDw017474; Wed, 25 May 2011 13:55:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105251355.p4PDtnDw017474@svn.freebsd.org> From: Alexander Motin Date: Wed, 25 May 2011 13:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222285 - in head/sys/dev: ahci mvs siis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 13:55:49 -0000 Author: mav Date: Wed May 25 13:55:49 2011 New Revision: 222285 URL: http://svn.freebsd.org/changeset/base/222285 Log: According to SATA specification, when Serial ATA Enclosure Management Bridge (SEMB) is unable to communicate to Storage Enclosure Processor (SEP), in response to hard and soft resets it should among other things return value 0x7F in Status register. The weird side is that it means DRQ bit set, which tells that reset request is not completed. It would be fine if SEMB was the only device on port. But if SEMB connected to PMP or built into it, it may block access to other devices sharing same SATA port. Make some tunings/fixes to soft-reset handling to workaround the issue: - ahci(4): request CLO on the port after soft reset to ignore DRQ bit; - siis(4): gracefully reinitialize port after soft reset timeout (hardware doesn't detect reset request completion in this case); - mvs(4): if PMP is used, send dummy soft-reset to the PMP port to make it clear DRQ bit for us. For now this makes quirks in ata_pmp.c, hiding SEMB ports of SiI3726/SiI4726 PMPs, less important. Further, if hardware permit, I hope to implement real SEMB support. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed May 25 13:30:44 2011 (r222284) +++ head/sys/dev/ahci/ahci.c Wed May 25 13:55:49 2011 (r222285) @@ -1835,9 +1835,11 @@ ahci_execute_transaction(struct ahci_slo if (!(ATA_INL(ch->r_mem, AHCI_P_CI) & (1 << slot->slot))) break; if (ATA_INL(ch->r_mem, AHCI_P_TFD) & ATA_S_ERROR) { +#if 0 device_printf(ch->dev, "Poll error on slot %d, TFD: %04x\n", slot->slot, ATA_INL(ch->r_mem, AHCI_P_TFD)); +#endif et = AHCI_ERR_TFE; break; } @@ -1877,14 +1879,12 @@ ahci_execute_transaction(struct ahci_slo } } } - ahci_end_transaction(slot, et); /* Kick controller into sane state and enable FBS. */ if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && - (ccb->ataio.cmd.control & ATA_A_RESET) == 0) { - ahci_stop(ch->dev); - ahci_start(ch->dev, 1); - } + (ccb->ataio.cmd.control & ATA_A_RESET) == 0) + ch->eslots |= (1 << slot->slot); + ahci_end_transaction(slot, et); return; } /* Start command execution timeout */ @@ -2169,13 +2169,6 @@ ahci_end_transaction(struct ahci_slot *s ch->numhslots++; } else xpt_done(ccb); - /* Unfreeze frozen command. */ - if (ch->frozen && !ahci_check_collision(dev, ch->frozen)) { - union ccb *fccb = ch->frozen; - ch->frozen = NULL; - ahci_begin_transaction(dev, fccb); - xpt_release_simq(ch->sim, TRUE); - } /* If we have no other active commands, ... */ if (ch->rslots == 0) { /* if there was fatal error - reset port. */ @@ -2185,6 +2178,7 @@ ahci_end_transaction(struct ahci_slot *s /* if we have slots in error, we can reinit port. */ if (ch->eslots != 0) { ahci_stop(dev); + ahci_clo(dev); ahci_start(dev, 1); } /* if there commands on hold, we can do READ LOG. */ @@ -2195,6 +2189,13 @@ ahci_end_transaction(struct ahci_slot *s } else if ((ch->rslots & ~ch->toslots) == 0 && et != AHCI_ERR_TIMEOUT) ahci_rearm_timeout(dev); + /* Unfreeze frozen command. */ + if (ch->frozen && !ahci_check_collision(dev, ch->frozen)) { + union ccb *fccb = ch->frozen; + ch->frozen = NULL; + ahci_begin_transaction(dev, fccb); + xpt_release_simq(ch->sim, TRUE); + } /* Start PM timer. */ if (ch->numrslots == 0 && ch->pm_level > 3 && (ch->curr[ch->pm_present ? 15 : 0].caps & CTS_SATA_CAPS_D_PMREQ)) { Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Wed May 25 13:30:44 2011 (r222284) +++ head/sys/dev/mvs/mvs.c Wed May 25 13:55:49 2011 (r222285) @@ -1738,13 +1738,6 @@ mvs_end_transaction(struct mvs_slot *slo ch->numhslots++; } else xpt_done(ccb); - /* Unfreeze frozen command. */ - if (ch->frozen && !mvs_check_collision(dev, ch->frozen)) { - union ccb *fccb = ch->frozen; - ch->frozen = NULL; - mvs_begin_transaction(dev, fccb); - xpt_release_simq(ch->sim, TRUE); - } /* If we have no other active commands, ... */ if (ch->rslots == 0) { /* if there was fatal error - reset port. */ @@ -1764,6 +1757,13 @@ mvs_end_transaction(struct mvs_slot *slo } else if ((ch->rslots & ~ch->toslots) == 0 && et != MVS_ERR_TIMEOUT) mvs_rearm_timeout(dev); + /* Unfreeze frozen command. */ + if (ch->frozen && !mvs_check_collision(dev, ch->frozen)) { + union ccb *fccb = ch->frozen; + ch->frozen = NULL; + mvs_begin_transaction(dev, fccb); + xpt_release_simq(ch->sim, TRUE); + } /* Start PM timer. */ if (ch->numrslots == 0 && ch->pm_level > 3 && (ch->curr[ch->pm_present ? 15 : 0].caps & CTS_SATA_CAPS_D_PMREQ)) { @@ -2080,7 +2080,8 @@ mvs_softreset(device_t dev, union ccb *c { struct mvs_channel *ch = device_get_softc(dev); int port = ccb->ccb_h.target_id & 0x0f; - int i; + int i, stuck; + uint8_t status; mvs_set_edma_mode(dev, MVS_EDMA_OFF); ATA_OUTB(ch->r_mem, SATA_SATAICTL, port << SATA_SATAICTL_PMPTX_SHIFT); @@ -2089,12 +2090,35 @@ mvs_softreset(device_t dev, union ccb *c ATA_OUTB(ch->r_mem, ATA_CONTROL, 0); ccb->ccb_h.status &= ~CAM_STATUS_MASK; /* Wait for clearing busy status. */ - if ((i = mvs_wait(dev, 0, ATA_S_BUSY | ATA_S_DRQ, ccb->ccb_h.timeout)) < 0) { + if ((i = mvs_wait(dev, 0, ATA_S_BUSY, ccb->ccb_h.timeout)) < 0) { ccb->ccb_h.status |= CAM_CMD_TIMEOUT; + stuck = 1; } else { - ccb->ccb_h.status |= CAM_REQ_CMP; + status = mvs_getstatus(dev, 0); + if (status & ATA_S_ERROR) + ccb->ccb_h.status |= CAM_ATA_STATUS_ERROR; + else + ccb->ccb_h.status |= CAM_REQ_CMP; + if (status & ATA_S_DRQ) + stuck = 1; + else + stuck = 0; } mvs_tfd_read(dev, ccb); + + /* + * XXX: If some device on PMP failed to soft-reset, + * try to recover by sending dummy soft-reset to PMP. + */ + if (stuck && ch->pm_present && port != 15) { + ATA_OUTB(ch->r_mem, SATA_SATAICTL, + 15 << SATA_SATAICTL_PMPTX_SHIFT); + ATA_OUTB(ch->r_mem, ATA_CONTROL, ATA_A_RESET); + DELAY(10000); + ATA_OUTB(ch->r_mem, ATA_CONTROL, 0); + mvs_wait(dev, 0, ATA_S_BUSY | ATA_S_DRQ, ccb->ccb_h.timeout); + } + xpt_done(ccb); } Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Wed May 25 13:30:44 2011 (r222284) +++ head/sys/dev/siis/siis.c Wed May 25 13:55:49 2011 (r222285) @@ -1178,11 +1178,22 @@ siis_timeout(struct siis_slot *slot) { device_t dev = slot->dev; struct siis_channel *ch = device_get_softc(dev); + union ccb *ccb = slot->ccb; mtx_assert(&ch->mtx, MA_OWNED); /* Check for stale timeout. */ if (slot->state < SIIS_SLOT_RUNNING) return; + + /* Handle soft-reset timeouts without doing hard-reset. */ + if ((ccb->ccb_h.func_code == XPT_ATA_IO) && + (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && + (ccb->ataio.cmd.control & ATA_A_RESET)) { + xpt_freeze_simq(ch->sim, ch->numrslots); + siis_end_transaction(slot, SIIS_ERR_TFE); + return; + } + device_printf(dev, "Timeout on slot %d\n", slot->slot); device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n", __func__, ATA_INL(ch->r_mem, SIIS_P_IS), @@ -1331,13 +1342,6 @@ siis_end_transaction(struct siis_slot *s ch->numhslots++; } else xpt_done(ccb); - /* Unfreeze frozen command. */ - if (ch->frozen && !siis_check_collision(dev, ch->frozen)) { - union ccb *fccb = ch->frozen; - ch->frozen = NULL; - siis_begin_transaction(dev, fccb); - xpt_release_simq(ch->sim, TRUE); - } /* If we have no other active commands, ... */ if (ch->rslots == 0) { /* if there were timeouts or fatal error - reset port. */ @@ -1355,6 +1359,13 @@ siis_end_transaction(struct siis_slot *s } else if ((ch->rslots & ~ch->toslots) == 0 && et != SIIS_ERR_TIMEOUT) siis_rearm_timeout(dev); + /* Unfreeze frozen command. */ + if (ch->frozen && !siis_check_collision(dev, ch->frozen)) { + union ccb *fccb = ch->frozen; + ch->frozen = NULL; + siis_begin_transaction(dev, fccb); + xpt_release_simq(ch->sim, TRUE); + } } static void From owner-svn-src-head@FreeBSD.ORG Wed May 25 14:13:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F991106564A; Wed, 25 May 2011 14:13:54 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C31E8FC14; Wed, 25 May 2011 14:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PEDrG4018195; Wed, 25 May 2011 14:13:53 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PEDrwj018176; Wed, 25 May 2011 14:13:53 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105251413.p4PEDrwj018176@svn.freebsd.org> From: Ruslan Ermilov Date: Wed, 25 May 2011 14:13: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: r222286 - in head: contrib/openbsm/libbsm lib/libc/gen share/man/man4 share/man/man7 share/man/man9 tools/tools/ether_reflect usr.bin/mkcsmapper usr.bin/mkesdb usr.sbin/bsnmpd/modules/s... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 14:13:54 -0000 Author: ru Date: Wed May 25 14:13:53 2011 New Revision: 222286 URL: http://svn.freebsd.org/changeset/base/222286 Log: [mdoc] Fixed .Dt call. Modified: head/contrib/openbsm/libbsm/audit_submit.3 head/lib/libc/gen/feature_present.3 head/share/man/man4/atrtc.4 head/share/man/man4/attimer.4 head/share/man/man4/cc.4 head/share/man/man4/h_ertt.4 head/share/man/man4/nvram2env.4 head/share/man/man7/eventtimers.7 head/share/man/man9/devfs_set_cdevpriv.9 head/share/man/man9/hhook.9 head/share/man/man9/khelp.9 head/tools/tools/ether_reflect/ether_reflect.1 head/usr.bin/mkcsmapper/mkcsmapper.1 head/usr.bin/mkesdb/mkesdb.1 head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 head/usr.sbin/usbdump/usbdump.8 Modified: head/contrib/openbsm/libbsm/audit_submit.3 ============================================================================== --- head/contrib/openbsm/libbsm/audit_submit.3 Wed May 25 13:55:49 2011 (r222285) +++ head/contrib/openbsm/libbsm/audit_submit.3 Wed May 25 14:13:53 2011 (r222286) @@ -30,7 +30,7 @@ .\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#17 $ .\" .Dd January 18, 2008 -.Dt audit_submit 3 +.Dt AUDIT_SUBMIT 3 .Os .Sh NAME .Nm audit_submit Modified: head/lib/libc/gen/feature_present.3 ============================================================================== --- head/lib/libc/gen/feature_present.3 Wed May 25 13:55:49 2011 (r222285) +++ head/lib/libc/gen/feature_present.3 Wed May 25 14:13:53 2011 (r222286) @@ -29,7 +29,7 @@ .\" $FreeBSD$ .\" .Dd January 8, 2008 -.Dt feature_present 3 +.Dt FEATURE_PRESENT 3 .Os .Sh NAME .Nm feature_present Modified: head/share/man/man4/atrtc.4 ============================================================================== --- head/share/man/man4/atrtc.4 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man4/atrtc.4 Wed May 25 14:13:53 2011 (r222286) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd September 17, 2010 -.Dt atrtc 4 +.Dt ATRTC 4 .Os .Sh NAME .Nm atrtc Modified: head/share/man/man4/attimer.4 ============================================================================== --- head/share/man/man4/attimer.4 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man4/attimer.4 Wed May 25 14:13:53 2011 (r222286) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd September 14, 2010 -.Dt attimer 4 +.Dt ATTIMER 4 .Os .Sh NAME .Nm attimer Modified: head/share/man/man4/cc.4 ============================================================================== --- head/share/man/man4/cc.4 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man4/cc.4 Wed May 25 14:13:53 2011 (r222286) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .Dd February 15, 2011 -.Dt cc 4 +.Dt CC 4 .Os .Sh NAME .Nm cc Modified: head/share/man/man4/h_ertt.4 ============================================================================== --- head/share/man/man4/h_ertt.4 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man4/h_ertt.4 Wed May 25 14:13:53 2011 (r222286) @@ -30,7 +30,7 @@ .\" $FreeBSD$ .\" .Dd February 15, 2011 -.Dt h_ertt 9 +.Dt H_ERTT 9 .Os .Sh NAME .Nm h_ertt Modified: head/share/man/man4/nvram2env.4 ============================================================================== --- head/share/man/man4/nvram2env.4 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man4/nvram2env.4 Wed May 25 14:13:53 2011 (r222286) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd April 3, 2011 -.Dt nvram2env 4 +.Dt NVRAM2ENV 4 .Os .Sh NAME .Nm nvram2env Modified: head/share/man/man7/eventtimers.7 ============================================================================== --- head/share/man/man7/eventtimers.7 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man7/eventtimers.7 Wed May 25 14:13:53 2011 (r222286) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd September 15, 2010 -.Dt eventtimers 4 +.Dt EVENTTIMERS 4 .Os .Sh NAME .Nm eventtimers Modified: head/share/man/man9/devfs_set_cdevpriv.9 ============================================================================== --- head/share/man/man9/devfs_set_cdevpriv.9 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man9/devfs_set_cdevpriv.9 Wed May 25 14:13:53 2011 (r222286) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd September 8, 2008 -.Dt DEVFS_CDEVPRIV +.Dt DEVFS_CDEVPRIV 9 .Os .Sh NAME .Nm devfs_set_cdevpriv , Modified: head/share/man/man9/hhook.9 ============================================================================== --- head/share/man/man9/hhook.9 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man9/hhook.9 Wed May 25 14:13:53 2011 (r222286) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .Dd February 15, 2011 -.Dt hhook 9 +.Dt HHOOK 9 .Os .Sh NAME .Nm hhook , Modified: head/share/man/man9/khelp.9 ============================================================================== --- head/share/man/man9/khelp.9 Wed May 25 13:55:49 2011 (r222285) +++ head/share/man/man9/khelp.9 Wed May 25 14:13:53 2011 (r222286) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .Dd February 15, 2011 -.Dt khelp 9 +.Dt KHELP 9 .Os .Sh NAME .Nm khelp , Modified: head/tools/tools/ether_reflect/ether_reflect.1 ============================================================================== --- head/tools/tools/ether_reflect/ether_reflect.1 Wed May 25 13:55:49 2011 (r222285) +++ head/tools/tools/ether_reflect/ether_reflect.1 Wed May 25 14:13:53 2011 (r222286) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd December 23, 2008 -.Dt ether_reflect 1 +.Dt ETHER_REFLECT 1 .Os .Sh NAME .Nm ether_reflect Modified: head/usr.bin/mkcsmapper/mkcsmapper.1 ============================================================================== --- head/usr.bin/mkcsmapper/mkcsmapper.1 Wed May 25 13:55:49 2011 (r222285) +++ head/usr.bin/mkcsmapper/mkcsmapper.1 Wed May 25 14:13:53 2011 (r222286) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" .Dd Sep 6, 2009 -.Dt mkcsmapper 1 +.Dt MKCSMAPPER 1 .Os .Sh NAME .Nm mkcsmapper Modified: head/usr.bin/mkesdb/mkesdb.1 ============================================================================== --- head/usr.bin/mkesdb/mkesdb.1 Wed May 25 13:55:49 2011 (r222285) +++ head/usr.bin/mkesdb/mkesdb.1 Wed May 25 14:13:53 2011 (r222286) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" .Dd November 1, 2009 -.Dt mkesdb 1 +.Dt MKESDB 1 .Os .Sh NAME .Nm mkesdb Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 Wed May 25 13:55:49 2011 (r222285) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 Wed May 25 14:13:53 2011 (r222286) @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .Dd August 6, 2007 -.Dt snmp_bridge 3 +.Dt SNMP_BRIDGE 3 .Os .Sh NAME .Nm snmp_bridge Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 Wed May 25 13:55:49 2011 (r222285) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 Wed May 25 14:13:53 2011 (r222286) @@ -29,7 +29,7 @@ .\" $FreeBSD$ .\" .Dd January 3, 2006 -.Dt snmp_hostres 3 +.Dt SNMP_HOSTRES 3 .Os .Sh NAME .Nm snmp_hostres Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Wed May 25 13:55:49 2011 (r222285) +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Wed May 25 14:13:53 2011 (r222286) @@ -29,7 +29,7 @@ .\" $FreeBSD$ .\" .Dd June 28, 2010 -.Dt snmp_wlan 3 +.Dt SNMP_WLAN 3 .Os .Sh NAME .Nm snmp_wlan Modified: head/usr.sbin/usbdump/usbdump.8 ============================================================================== --- head/usr.sbin/usbdump/usbdump.8 Wed May 25 13:55:49 2011 (r222285) +++ head/usr.sbin/usbdump/usbdump.8 Wed May 25 14:13:53 2011 (r222286) @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .Dd December 4, 2010 -.Dt usbdump 8 +.Dt USBDUMP 8 .Os .Sh NAME .Nm usbdump From owner-svn-src-head@FreeBSD.ORG Wed May 25 15:15:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 618B7106564A; Wed, 25 May 2011 15:15:13 +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 F12FF8FC19; Wed, 25 May 2011 15:15:12 +0000 (UTC) Received: from outgoing.leidinger.net (p5B155B09.dip.t-dialin.net [91.21.91.9]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 27377844015; Wed, 25 May 2011 17:14:57 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::3:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 5E5A82C30; Wed, 25 May 2011 17:14:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1306336494; bh=42xYIpmMvmEqW6NOUZ9CBa0KSC8Zq6HHFO66hRYv8ls=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=n+jIoxy3TilMVUNWOy3k9FSV4T5yWNf3yEomB8MZvhbg7FjWw8O2gmJqopYLJU4vQ sBTcTQXbKfoX692xKIiEyGZZSg5w+HXZanxiPHjZ45m0RJafmxzDp2qvgSRiup8MDL 8k3AttmbIMUWOSau9FGawC8gVFXfhmszJIDeByIQESpLvn2esM+ssN8xDFkgdcjfC5 QcWnsub6TxS7QWidLCEYGgGASo43Xq1tMeYMSKisk2WEWwk+VK6H18xWObD/tLhFq3 CQ2LkysSIxpp0ON7eOmG7qAwIniddVX6FXCA9WY0r39+WSOk3x1Ho0f22s9Fzbuv5B UD2GUdrH2ohtw== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.14.4/Submit) id p4PFEsNU013084; Wed, 25 May 2011 17:14:54 +0200 (CEST) (envelope-from Alexander@Leidinger.net) X-Authentication-Warning: webmail.leidinger.net: www set sender to Alexander@Leidinger.net using -f Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 25 May 2011 17:14:53 +0200 Message-ID: <20110525171453.16937dppizl7tbzh@webmail.leidinger.net> Date: Wed, 25 May 2011 17:14:53 +0200 From: Alexander Leidinger To: "Bjoern A. Zeeb" References: <201105250034.p4P0YPc3091841@svn.freebsd.org> In-Reply-To: <201105250034.p4P0YPc3091841@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.6) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 27377844015.AF74A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.023, required 6, autolearn=disabled, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1306941298.6919@mqs2WOLzDLFKRiNfRBTTFA X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222272 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 15:15:13 -0000 Quoting "Bjoern A. Zeeb" (from Wed, 25 May 2011 00:34:25 +0000 (UTC)): > Author: bz > Date: Wed May 25 00:34:25 2011 > New Revision: 222272 > URL: http://svn.freebsd.org/changeset/base/222272 > > Log: > Add FEATURE() definitions for IPv4 and IPv6 so that we can use > feature_present(3) to dynamically decide whether to use one or the > other family. Any estimate when you can get to the network related FEATURE macros I've send to you (those which where produced during GSoC 2010 by kibab@)? When all are in, I have a final oommit to do for the userland application which can query them (including the masking of existing features feature). Or do you prefer that I ask on net@ for a review of the network related feature macros? > Reviewed by: gnn > Sponsored by: The FreeBSD Foundation > Sponsored by: iXsystems > MFC after: 10 days Bye, Alexander. -- We don't really understand it, so we'll give it to the programmers. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-head@FreeBSD.ORG Wed May 25 17:03:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10C06106566B; Wed, 25 May 2011 17:03:55 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 404CD8FC12; Wed, 25 May 2011 17:03:53 +0000 (UTC) Received: by wwc33 with SMTP id 33so8377118wwc.31 for ; Wed, 25 May 2011 10:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:message-id :user-agent:mime-version:content-type; bh=87mychAX4fvZ4/s973RgCJ7UFLLldMmgtKtIDV0g53o=; b=aUo2EYAhyI15T1+JkhdmDSb6Jq5lY8udtKYe3KaZZ7agFxG1GgB/IVdbSiohW7js8l vVnzjxlncdOjDn6PLHhS3uoJdLLmuu0za1MpPMdDC3qEdvkvDvjxHb7mEgcFWsnRhkzB vKIdJfSAh33UKFgQkhBI/QtxClhu3QnKTejUw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; b=Th/jhMFJBmDGjJzXtZ1rjoMfH8NbvfgsYE91QemOMxFKc6gCmj0RrkdhpRtW9VpRzM MIDA9gLbmNPm16B0fXI2e7edeuYjozT9LKBW2E+sUVYR5YuE6LnBkM8M0mzdlVwLwpJ7 Az3VyvLJRhEPBq2TBhctDowpwuSODSffxgPF8= Received: by 10.216.255.73 with SMTP id i51mr4758807wes.88.1306343032771; Wed, 25 May 2011 10:03:52 -0700 (PDT) Received: from localhost (94-23-158-115.kimsufi.com [94.23.158.115]) by mx.google.com with ESMTPS id d13sm496398wbh.35.2011.05.25.10.03.49 (version=SSLv3 cipher=OTHER); Wed, 25 May 2011 10:03:51 -0700 (PDT) From: Pan Tsu To: Xin LI References: <201105230940.p4N9eLQ1014007__26701.9700528637$1306143644$gmane$org@svn.freebsd.org> Date: Wed, 25 May 2011 21:03:41 +0400 Message-ID: <86vcwy67bm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222211 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 17:03:55 -0000 Xin LI writes: > Author: delphij > Date: Mon May 23 09:40:21 2011 > New Revision: 222211 > URL: http://svn.freebsd.org/changeset/base/222211 > > Log: > Match symbolic link handling behavior with GNU gzip, bzip2 and xz: After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. $ zcat TIFFfree.3tiff.gz zcat: TIFFfree.3tiff.gz is not a regular file Exit 1 > When we are operating on a symbolic link pointing to an existing > file, bail out by default, but go ahead if -f is specified. > > Submitted by: arundel > MFC after: 2 weeks At least our man(1) relies on foocat, e.g. $ man -d TIFFfree # from graphics/tiff -- Using architecture: amd64:amd64 -- Using pager: less -- Using manual sections: 1:1aout:8:2:3:n:4:5:6:7:9:l -- Searching PATH for man directories -- Adding /home/luser/.bin/man to manpath -- Adding /usr/local/man to manpath -- Adding /usr/share/man to manpath -- Adding default manpath entries -- Adding /usr/share/openssl/man to manpath -- Parsing config file: /etc/man.conf -- Using manual path: /home/luser/.bin/man:/usr/local/man:/usr/share/man:/usr/share/openssl/man -- Using locale paths: en_US.UTF-8:en.UTF-8:. -- Searching for TIFFfree -- Found manpage /usr/local/man/man3/TIFFfree.3tiff.gz -- Skipping catpage: not found or old zcat: /usr/local/man/man3/TIFFfree.3tiff.gz is not a regular file -- Command: /usr/bin/zcat /usr/local/man/man3/TIFFfree.3tiff.gz | tbl | groff -S -P-c -Wall -mtty-char -man -Tascii | /usr/bin/col | less and uses `-f' flag only when compression is not known/not compressed setup_cattool() { case "$1" in *.bz) cattool='/usr/bin/bzcat' ;; *.bz2) cattool='/usr/bin/bzcat' ;; *.gz) cattool='/usr/bin/zcat' ;; *.lzma) cattool='/usr/bin/lzcat' ;; *.xz) cattool='/usr/bin/xzcat' ;; *) cattool='/usr/bin/zcat -f' ;; esac } From owner-svn-src-head@FreeBSD.ORG Wed May 25 17:38:40 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD481065672; Wed, 25 May 2011 17:38:40 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9BEAB8FC18; Wed, 25 May 2011 17:38:39 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 74729A7F423; Thu, 26 May 2011 01:38:38 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id Gylpa9BIT1kS; Thu, 26 May 2011 01:38:31 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id F3F85A7F2A2; Thu, 26 May 2011 01:38:28 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=LBshNWa5SaXbTNflwC2NJKeG94s9ZgVSQjEX33iwwCmdqCk9+LkQv3CqK28IsPIL5 PGiuNVCci1tEpUu3NGAMw== Message-ID: <4DDD3E8E.7090806@delphij.net> Date: Wed, 25 May 2011 10:38:22 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110502 Thunderbird/3.1.10 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: Pan Tsu References: <201105230940.p4N9eLQ1014007__26701.9700528637$1306143644$gmane$org@svn.freebsd.org> <86vcwy67bm.fsf@gmail.com> In-Reply-To: <86vcwy67bm.fsf@gmail.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------090806040608030803070303" Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r222211 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 17:38:40 -0000 This is a multi-part message in MIME format. --------------090806040608030803070303 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Pan, On 05/25/11 10:03, Pan Tsu wrote: >> Match symbolic link handling behavior with GNU gzip, bzip2 and xz: > > After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. > > $ zcat TIFFfree.3tiff.gz > zcat: TIFFfree.3tiff.gz is not a regular file > Exit 1 Will the attached patch help? [...] > At least our man(1) relies on foocat, e.g. [...] > and uses `-f' flag only when compression is not known/not compressed I think this is a gzip(1) bug and thus it's not man(1) to be fixed. However, that might indicate a different bug (thankfully it revealed the gzip(1) one) in the TIFF port :) Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBCAAGBQJN3T6NAAoJEATO+BI/yjfB/4YIALvCH1J1GvbHFXn8aN4msBnY 28RnaioHsOpABVwJJ4H6HR6hh3XEC/rU6LeQaCocZ3K+THkKc4+OvvLJwi/QEiLz 0i4zW/K0ZM3BrwjmCuoTHSNPCTkAAcEPiGQt2XjvgPRzAXOeQSI16ABbl98i6OeK nT2ntP9izC4A0VR+YBPBYAjCi7u1Yers46fhjTEDi0ISpuKiONPeU32ZyIttee/U j0uRc4PBxAsrGZTkhMn2qB3pVRIfQje+eUxB/yHQs3JwW9CIZ/VWprIlfn1S5Gr+ JPsNeBGRYWTUS2MJyn9uEmiMZvOzGO0rzATKgzyoP6yBrUCmSQhAO6DpkMTibj8= =kLw1 -----END PGP SIGNATURE----- --------------090806040608030803070303 Content-Type: text/plain; name="gzip.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gzip.diff" SW5kZXg6IHVzci5iaW4vZ3ppcC9nemlwLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNyLmJpbi9n emlwL2d6aXAuYwkocmV2aXNpb24gMjIyMjY1KQorKysgdXNyLmJpbi9nemlwL2d6aXAuYwko d29ya2luZyBjb3B5KQpAQCAtMTc4Miw3ICsxNzgyLDggQEAKIAl9CiAKIHJldHJ5OgotCWlm IChzdGF0KHBhdGgsICZzYikgIT0gMCB8fCAoZmZsYWcgPT0gMCAmJiBsc3RhdChwYXRoLCAm c2IpICE9IDApKSB7CisJaWYgKHN0YXQocGF0aCwgJnNiKSAhPSAwIHx8IChmZmxhZyA9PSAw ICYmIGNmbGFnID09IDAgJiYKKwkgICAgbHN0YXQocGF0aCwgJnNiKSAhPSAwKSkgewogCQkv KiBsZXRzIHRyeSA8cGF0aD4uZ3ogaWYgd2UncmUgZGVjb21wcmVzc2luZyAqLwogCQlpZiAo ZGZsYWcgJiYgcyA9PSBOVUxMICYmIGVycm5vID09IEVOT0VOVCkgewogCQkJbGVuID0gc3Ry bGVuKHBhdGgpOwo= --------------090806040608030803070303-- From owner-svn-src-head@FreeBSD.ORG Wed May 25 17:47:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05ADC106566C; Wed, 25 May 2011 17:47:16 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 0A6DB8FC1C; Wed, 25 May 2011 17:47:14 +0000 (UTC) Received: by wwc33 with SMTP id 33so8419869wwc.31 for ; Wed, 25 May 2011 10:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=dvkJViX5mZSP2qnOJOFKBjr04T14f+IVCupfZB8pm50=; b=eWJugqG8ZyKYpL6Ti6wxMXBDVKlEpSPrEzuAmmkLMKtiIE/A4Wsa8yT0yNWw1TXEy+ OZlppkTsDEqn9Es6mngrw1zFcZOoBUhgoGddCpoSPq0H4ndBoUiV6z86CHUuHOYvNkoq 8B9ILWyBcwPbUQYAMtsKFDfaURvkEycme4Tag= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=Zpmye/e+KZNiZO25jRaZnKfAl4MPNdBWWmUgAwRnf3iKq6Ok18Nocgd7SVzgJAZnR7 XCKxh8obDXO/AIlGZfbL0JWfGetcEOdnZSjjlgtXh+MG1YroMwOmnCjEaTs3srA1Njqf qUNepwkStDYGoTmRCPYkZ9zT1gxQeWFAYR3fg= Received: by 10.216.150.153 with SMTP id z25mr4638512wej.89.1306345633908; Wed, 25 May 2011 10:47:13 -0700 (PDT) Received: from localhost (rockhall.torservers.net [77.247.181.163]) by mx.google.com with ESMTPS id k58sm426222wed.5.2011.05.25.10.47.10 (version=SSLv3 cipher=OTHER); Wed, 25 May 2011 10:47:12 -0700 (PDT) From: Pan Tsu To: d@delphij.net References: <201105230940.p4N9eLQ1014007__26701.9700528637$1306143644$gmane$org@svn.freebsd.org> <86vcwy67bm.fsf@gmail.com> <4DDD3E8E.7090806@delphij.net> Date: Wed, 25 May 2011 21:46:51 +0400 In-Reply-To: <4DDD3E8E.7090806@delphij.net> (Xin LI's message of "Wed, 25 May 2011 10:38:22 -0700") Message-ID: <86aaeaoepg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r222211 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 17:47:16 -0000 Xin LI writes: > On 05/25/11 10:03, Pan Tsu wrote: >>> Match symbolic link handling behavior with GNU gzip, bzip2 and xz: >> >> After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. >> >> $ zcat TIFFfree.3tiff.gz >> zcat: TIFFfree.3tiff.gz is not a regular file >> Exit 1 > > Will the attached patch help? [...] Yes, with the patch I can view such manpages again. From owner-svn-src-head@FreeBSD.ORG Wed May 25 18:04:12 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EB67106566B; Wed, 25 May 2011 18:04:12 +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 1E90D8FC0C; Wed, 25 May 2011 18:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PI4CMk024819; Wed, 25 May 2011 18:04:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PI4CBw024817; Wed, 25 May 2011 18:04:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105251804.p4PI4CBw024817@svn.freebsd.org> From: Xin LI Date: Wed, 25 May 2011 18:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222287 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 18:04:12 -0000 Author: delphij Date: Wed May 25 18:04:11 2011 New Revision: 222287 URL: http://svn.freebsd.org/changeset/base/222287 Log: Fix a regression introduced with previous changeset: if output is stdout, do not check for symbolic link. Modified: head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Wed May 25 14:13:53 2011 (r222286) +++ head/usr.bin/gzip/gzip.c Wed May 25 18:04:11 2011 (r222287) @@ -1782,7 +1782,8 @@ handle_pathname(char *path) } retry: - if (stat(path, &sb) != 0 || (fflag == 0 && lstat(path, &sb) != 0)) { + if (stat(path, &sb) != 0 || (fflag == 0 && cflag == 0 && + lstat(path, &sb) != 0)) { /* lets try .gz if we're decompressing */ if (dflag && s == NULL && errno == ENOENT) { len = strlen(path); From owner-svn-src-head@FreeBSD.ORG Wed May 25 18:09:18 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 547511065674; Wed, 25 May 2011 18:09:18 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id ECF9A8FC14; Wed, 25 May 2011 18:09:17 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 04736A6738E; Thu, 26 May 2011 02:09:17 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id Lz0L4l9G2Vgd; Thu, 26 May 2011 02:09:10 +0800 (CST) Received: from delta.delphij.net (c-76-102-50-245.hsd1.ca.comcast.net [76.102.50.245]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 0903BA66F5C; Thu, 26 May 2011 02:09:07 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=rbrjweZusWOujj4yC6WbpL7n21U+XNmmk5U7RR6eErf9UZH50a3F24LgzAB/BDMvA zUSBzQh+HmgcVBw44BCqA== Message-ID: <4DDD45C0.10703@delphij.net> Date: Wed, 25 May 2011 11:09:04 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110502 Thunderbird/3.1.10 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: Pan Tsu References: <201105230940.p4N9eLQ1014007__26701.9700528637$1306143644$gmane$org@svn.freebsd.org> <86vcwy67bm.fsf@gmail.com> <4DDD3E8E.7090806@delphij.net> <86aaeaoepg.fsf@gmail.com> In-Reply-To: <86aaeaoepg.fsf@gmail.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, Xin LI , svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, d@delphij.net Subject: Re: svn commit: r222211 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 18:09:18 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 05/25/11 10:46, Pan Tsu wrote: > Xin LI writes: > >> On 05/25/11 10:03, Pan Tsu wrote: >>>> Match symbolic link handling behavior with GNU gzip, bzip2 and xz: >>> >>> After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. >>> >>> $ zcat TIFFfree.3tiff.gz >>> zcat: TIFFfree.3tiff.gz is not a regular file >>> Exit 1 >> >> Will the attached patch help? > [...] > > Yes, with the patch I can view such manpages again. Thanks! I've committed the fix as r222287. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBCAAGBQJN3UW/AAoJEATO+BI/yjfB+dMH/3BF0r/XSElSPNN9Y6VaC8B1 w2CBySOCau7sh2vuk8vm5Mw/+vqyuR3ZpDCNpMRcLUH58KsDZBCNICE1yWt/hFgF 7gF1ZMHzt2Z3arWZFvmSWuEnkeUUI/EvH73chLNY/gqNt6tER5YmFf8cbC5xr7aB 11zexuB4eXoiFu4NldQ8ZYs8zhz1akA84IY+o97RJYk8yuMueF9ni06k2K64CvjV uWneF7QRAzNtj7NkeBW2OzmT2GvoceOa3qRMNHDOBbJT8l6VaoIQhA0uZ6jGuExi R3HmSvE9UEELnnT5QvUVgIaTiKmAuiSrtZYyOIfYCA0Ic4qY4mql9GWivblIf6Q= =Rnfh -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed May 25 18:11:05 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19BE2106566B; Wed, 25 May 2011 18:11:05 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id B37148FC12; Wed, 25 May 2011 18:11:04 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 8DA9EA7E877; Thu, 26 May 2011 02:11:03 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id i4i-NfcTKZi8; Thu, 26 May 2011 02:10:57 +0800 (CST) Received: from delta.delphij.net (c-76-102-50-245.hsd1.ca.comcast.net [76.102.50.245]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 784ACA683D3; Thu, 26 May 2011 02:10:55 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=iGIyRFtxCvTPSj27Yj5WYpbTYLh4uPb4u3zxwh3PtforzKIikReljlJxKwgPPrW16 YOIWExpQidD3zRyeQv3qQ== Message-ID: <4DDD462C.2090709@delphij.net> Date: Wed, 25 May 2011 11:10:52 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110502 Thunderbird/3.1.10 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: d@delphij.net References: <201105230940.p4N9eLQ1014007__26701.9700528637$1306143644$gmane$org@svn.freebsd.org> <86vcwy67bm.fsf@gmail.com> <4DDD3E8E.7090806@delphij.net> In-Reply-To: <4DDD3E8E.7090806@delphij.net> X-Enigmail-Version: 1.1.2 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI , Pan Tsu Subject: Re: svn commit: r222211 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 18:11:05 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 05/25/11 10:38, Xin LI wrote: [...] > However, that might indicate a different bug Correction: I was wrong here, the MLINKS just behave this way. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBCAAGBQJN3UYsAAoJEATO+BI/yjfBI78H/j3jB9tge0kwci+wKHArjWvm DrrXBthWNk4koAPY7Y/pJxyt8ayY8Jz8cqklXPL7NPHGwJFy5RD1sslBiSzCdo7u vwnPFy9WOViu379wbyb1NrWh4qleS0PiPoKxDtcba1cQhlakt99Na2fBNMeMvknL hbn+g1zNxEjWxS53MFH32i2EraCDrttmqGJJngpX9mOZm0Q9F1IBHX76pCkBkCPg 6K+RDRiJnsIW7nVv6jSUPF/Jf6Moc8nsAgUI0OTyeaiwjB77oXykK39AI/syYbYs ZnU2J6VvJoqQztcyd5xw27zscy0cblNqVmbuD24BZ9Lfj34KwaWX3UwzNVgnBr8= =ggiS -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed May 25 20:25:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25C191065674; Wed, 25 May 2011 20:25:14 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16D398FC21; Wed, 25 May 2011 20:25:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PKPDhW028968; Wed, 25 May 2011 20:25:13 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PKPDTD028966; Wed, 25 May 2011 20:25:13 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201105252025.p4PKPDTD028966@svn.freebsd.org> From: Benedict Reuschling Date: Wed, 25 May 2011 20:25: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: r222288 - head/usr.sbin/gpioctl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 20:25:14 -0000 Author: bcr (doc committer) Date: Wed May 25 20:25:13 2011 New Revision: 222288 URL: http://svn.freebsd.org/changeset/base/222288 Log: Document the device name change from gpioctl to gpioc in the man page. PR: docs/157075 Submitted by: brix Reviewed by: gonzo Modified: head/usr.sbin/gpioctl/gpioctl.8 Modified: head/usr.sbin/gpioctl/gpioctl.8 ============================================================================== --- head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 18:04:11 2011 (r222287) +++ head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 20:25:13 2011 (r222288) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2010 +.Dd May 15, 2011 .Dt GPIOCTL 1 .Os .Sh NAME @@ -93,17 +93,17 @@ be verbose: for each listed pin print cu .Sh EXAMPLES .Bl -bullet .It -List pins available on GPIO controller defined by device /dev/gpioctl0 +List pins available on GPIO controller defined by device /dev/gpioc0 .Pp -gpioctl -f /dev/gpioctl0 -l +gpioctl -f /dev/gpioc0 -l .It Set the value of pin 12 to 1 .Pp -gpioctl -f /dev/gpioctl0 12 1 +gpioctl -f /dev/gpioc0 12 1 .It Configure pin 12 to be input pin .Pp -gpioctl -f /dev/gpioctl0 -c 12 IN +gpioctl -f /dev/gpioc0 -c 12 IN .El .Sh HISTORY The From owner-svn-src-head@FreeBSD.ORG Wed May 25 20:53:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D33C81065677; Wed, 25 May 2011 20:53:08 +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 B94D58FC08; Wed, 25 May 2011 20:53:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PKr88P029798; Wed, 25 May 2011 20:53:08 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PKr8j1029794; Wed, 25 May 2011 20:53:08 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105252053.p4PKr8j1029794@svn.freebsd.org> From: Rick Macklem Date: Wed, 25 May 2011 20:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222289 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 20:53:08 -0000 Author: rmacklem Date: Wed May 25 20:53:08 2011 New Revision: 222289 URL: http://svn.freebsd.org/changeset/base/222289 Log: Fix the new NFS client so that it correctly sets the "must_commit" argument for a write RPC when it succeeds for the first one and fails for a subsequent RPC within the same call to the function. This makes it compatible with the old NFS client for this case. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Wed May 25 20:25:13 2011 (r222288) +++ head/sys/fs/nfs/nfs_var.h Wed May 25 20:53:08 2011 (r222289) @@ -370,7 +370,7 @@ int nfsrpc_readlink(vnode_t, struct uio NFSPROC_T *, struct nfsvattr *, int *, void *); int nfsrpc_read(vnode_t, struct uio *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); -int nfsrpc_write(vnode_t, struct uio *, int *, u_char *, +int nfsrpc_write(vnode_t, struct uio *, int *, int *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *, int); int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t, enum vtype, struct ucred *, NFSPROC_T *, struct nfsvattr *, Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Wed May 25 20:25:13 2011 (r222288) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Wed May 25 20:53:08 2011 (r222289) @@ -68,7 +68,7 @@ static int nfsrpc_setattrrpc(vnode_t , s struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); static int nfsrpc_readrpc(vnode_t , struct uio *, struct ucred *, nfsv4stateid_t *, NFSPROC_T *, struct nfsvattr *, int *, void *); -static int nfsrpc_writerpc(vnode_t , struct uio *, int *, u_char *, +static int nfsrpc_writerpc(vnode_t , struct uio *, int *, int *, struct ucred *, nfsv4stateid_t *, NFSPROC_T *, struct nfsvattr *, int *, void *); static int nfsrpc_createv23(vnode_t , char *, int, struct vattr *, @@ -1369,7 +1369,7 @@ nfsmout: * will then deadlock. */ APPLESTATIC int -nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, u_char *verfp, +nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff, int called_from_strategy) { @@ -1382,6 +1382,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio nfsv4stateid_t stateid; void *lckp; + *must_commit = 0; if (nmp->nm_clp != NULL) clidrev = nmp->nm_clp->nfsc_clientidrev; newcred = cred; @@ -1412,7 +1413,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio if (nostateid) error = 0; else - error = nfsrpc_writerpc(vp, uiop, iomode, verfp, + error = nfsrpc_writerpc(vp, uiop, iomode, must_commit, newcred, &stateid, p, nap, attrflagp, stuff); if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); @@ -1447,7 +1448,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio */ static int nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, - u_char *verfp, struct ucred *cred, nfsv4stateid_t *stateidp, + int *must_commit, struct ucred *cred, nfsv4stateid_t *stateidp, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff) { u_int32_t *tl; @@ -1585,14 +1586,16 @@ nfsrpc_writerpc(vnode_t vp, struct uio * else if (committed == NFSWRITE_DATASYNC && commit == NFSWRITE_UNSTABLE) committed = commit; - if (verfp != NULL) - NFSBCOPY((caddr_t)tl, verfp, NFSX_VERF); NFSLOCKMNT(nmp); if (!NFSHASWRITEVERF(nmp)) { NFSBCOPY((caddr_t)tl, (caddr_t)&nmp->nm_verf[0], NFSX_VERF); NFSSETWRITEVERF(nmp); + } else if (NFSBCMP(tl, nmp->nm_verf, + NFSX_VERF)) { + *must_commit = 1; + NFSBCOPY(tl, nmp->nm_verf, NFSX_VERF); } NFSUNLOCKMNT(nmp); } Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 20:25:13 2011 (r222288) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 20:53:08 2011 (r222289) @@ -1332,19 +1332,9 @@ ncl_writerpc(struct vnode *vp, struct ui { struct nfsvattr nfsva; int error = 0, attrflag, ret; - u_char verf[NFSX_VERF]; - struct nfsmount *nmp = VFSTONFS(vp->v_mount); - *must_commit = 0; - error = nfsrpc_write(vp, uiop, iomode, verf, cred, + error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, NULL, called_from_strategy); - NFSLOCKMNT(nmp); - if (!error && NFSHASWRITEVERF(nmp) && - NFSBCMP(verf, nmp->nm_verf, NFSX_VERF)) { - *must_commit = 1; - NFSBCOPY(verf, nmp->nm_verf, NFSX_VERF); - } - NFSUNLOCKMNT(nmp); if (attrflag) { if (VTONFS(vp)->n_flag & ND_NFSV4) ret = nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 1, From owner-svn-src-head@FreeBSD.ORG Wed May 25 21:04:12 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 188541065673; Wed, 25 May 2011 21:04:12 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09A358FC16; Wed, 25 May 2011 21:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PL4Bh3030228; Wed, 25 May 2011 21:04:11 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PL4B2u030226; Wed, 25 May 2011 21:04:11 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201105252104.p4PL4B2u030226@svn.freebsd.org> From: Benedict Reuschling Date: Wed, 25 May 2011 21:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222290 - head/usr.sbin/gpioctl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 21:04:12 -0000 Author: bcr (doc committer) Date: Wed May 25 21:04:11 2011 New Revision: 222290 URL: http://svn.freebsd.org/changeset/base/222290 Log: Bump the date of the man page to the date of the actual commit. Noticed by: brix Modified: head/usr.sbin/gpioctl/gpioctl.8 Modified: head/usr.sbin/gpioctl/gpioctl.8 ============================================================================== --- head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 20:53:08 2011 (r222289) +++ head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 21:04:11 2011 (r222290) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 15, 2011 +.Dd May 25, 2011 .Dt GPIOCTL 1 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Wed May 25 21:17:53 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8482E106564A; Wed, 25 May 2011 21:17:53 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7557D8FC12; Wed, 25 May 2011 21:17:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PLHrcF030668; Wed, 25 May 2011 21:17:53 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PLHrvE030666; Wed, 25 May 2011 21:17:53 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105252117.p4PLHrvE030666@svn.freebsd.org> From: Rick Macklem Date: Wed, 25 May 2011 21:17: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: r222291 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 21:17:53 -0000 Author: rmacklem Date: Wed May 25 21:17:53 2011 New Revision: 222291 URL: http://svn.freebsd.org/changeset/base/222291 Log: Add some missing mutex locking to the new NFS client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 21:04:11 2011 (r222290) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 21:17:53 2011 (r222291) @@ -2470,10 +2470,12 @@ ncl_commit(struct vnode *vp, u_quad_t of error = nfsrpc_commit(vp, offset, cnt, cred, td, verf, &nfsva, &attrflag, NULL); if (!error) { + mtx_lock(&nmp->nm_mtx); if (NFSBCMP((caddr_t)nmp->nm_verf, verf, NFSX_VERF)) { NFSBCOPY(verf, (caddr_t)nmp->nm_verf, NFSX_VERF); error = NFSERR_STALEWRITEVERF; } + mtx_unlock(&nmp->nm_mtx); if (!error && attrflag) (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1); From owner-svn-src-head@FreeBSD.ORG Wed May 25 21:38:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 336F31065675; Wed, 25 May 2011 21:38:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFE418FC20; Wed, 25 May 2011 21:38:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PLcGl5031299; Wed, 25 May 2011 21:38:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PLcGdt031297; Wed, 25 May 2011 21:38:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105252138.p4PLcGdt031297@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 25 May 2011 21:38: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: r222292 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 21:38:17 -0000 Author: jilles Date: Wed May 25 21:38:16 2011 New Revision: 222292 URL: http://svn.freebsd.org/changeset/base/222292 Log: sh: Show errno messages in cd. Modified: head/bin/sh/cd.c Modified: head/bin/sh/cd.c ============================================================================== --- head/bin/sh/cd.c Wed May 25 21:17:53 2011 (r222291) +++ head/bin/sh/cd.c Wed May 25 21:38:16 2011 (r222292) @@ -86,6 +86,7 @@ cdcmd(int argc, char **argv) struct stat statb; int ch, phys, print = 0, getcwderr = 0; int rc; + int errno1 = ENOENT; optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ phys = Pflag; @@ -138,9 +139,11 @@ cdcmd(int argc, char **argv) rc = docd(p, print, phys); if (rc >= 0) return getcwderr ? rc : 0; + if (errno != ENOENT) + errno1 = errno; } } - error("can't cd to %s", dest); + error("%s: %s", dest, strerror(errno1)); /*NOTREACHED*/ return 0; } From owner-svn-src-head@FreeBSD.ORG Wed May 25 23:33:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96552106564A; Wed, 25 May 2011 23:33:49 +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 8234E8FC14; Wed, 25 May 2011 23:33:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4PNXnLJ034796; Wed, 25 May 2011 23:33:49 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4PNXnZ2034794; Wed, 25 May 2011 23:33:49 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105252333.p4PNXnZ2034794@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 25 May 2011 23:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222295 - head/tools/build/make_check X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 23:33:49 -0000 Author: obrien Date: Wed May 25 23:33:49 2011 New Revision: 222295 URL: http://svn.freebsd.org/changeset/base/222295 Log: + Tighten up (and simplify) the pass_cmd_vars_1 "variable definition arrived from the calling make" test. + Be more tolerant of newlines in the plus_flag "supports the '+' flag" test. Modified: head/tools/build/make_check/Makefile Modified: head/tools/build/make_check/Makefile ============================================================================== --- head/tools/build/make_check/Makefile Wed May 25 21:53:25 2011 (r222294) +++ head/tools/build/make_check/Makefile Wed May 25 23:33:49 2011 (r222295) @@ -1,5 +1,7 @@ # $FreeBSD$ +.MAKE.MODE= normal + # Test for broken LHS expansion. # This *must* cause make(1) to detect a recursive variable, and fail as such. .if make(lhs_expn) @@ -152,24 +154,19 @@ pass_cmd_vars: @${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_4 .endif -.if make(pass_cmd_vars_1) +# # Check that the variable definition arrived from the calling make +# +.if make(pass_cmd_vars_1) +# These values should get overridden by the commandline +CMD1=oops1 +CMD2=oops2 pass_cmd_vars_1: @: .if ${CMD1} != cmd1 || ${CMD2} != cmd2 .error variables not passed through MAKEFLAGS .endif - -# Check that the variable definition is in MAKEFLAGS -.if ${.MAKEFLAGS:MCMD1=*} != "CMD1=cmd1" || ${.MAKEFLAGS:MCMD2=*} != "CMD2=cmd2" -.error variable assignment not found in $${MAKEFLAGS} -.endif - -# Check that the variable definition is not in MFLAGS -.if ${MFLAGS:MCMD1=*} != "" || ${MFLAGS:MCMD2=*} != "" -.error variable assignment found in $${MFLAGS} -.endif .endif .if make(pass_cmd_vars_2) @@ -228,7 +225,7 @@ pass_cmd_vars_4_1: # .if make(plus_flag) OUT != ${SMAKE} -n plus_flag_1 -.if ${OUT} != "/tmp" +.if ${OUT:M/tmp} != "/tmp" .error make doesn't handle + flag .endif plus_flag: From owner-svn-src-head@FreeBSD.ORG Thu May 26 06:43:11 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17CE3106564A; Thu, 26 May 2011 06:43:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2CF28FC0C; Thu, 26 May 2011 06:43:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q6hAGa047895; Thu, 26 May 2011 06:43:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q6hAed047893; Thu, 26 May 2011 06:43:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105260643.p4Q6hAed047893@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 May 2011 06:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222298 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 06:43:11 -0000 Author: mav Date: Thu May 26 06:43:10 2011 New Revision: 222298 URL: http://svn.freebsd.org/changeset/base/222298 Log: Add better names for the Intel HDMI audio codecs. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Thu May 26 00:37:44 2011 (r222297) +++ head/sys/dev/sound/pci/hda/hdac.c Thu May 26 06:43:10 2011 (r222298) @@ -826,12 +826,13 @@ static const struct { #define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) /* INTEL */ -#define HDA_CODEC_INTELG45_1 HDA_CODEC_CONSTRUCT(INTEL, 0x2801) -#define HDA_CODEC_INTELG45_2 HDA_CODEC_CONSTRUCT(INTEL, 0x2802) -#define HDA_CODEC_INTELG45_3 HDA_CODEC_CONSTRUCT(INTEL, 0x2803) -#define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x2804) -#define HDA_CODEC_INTELG45_5 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) -#define HDA_CODEC_INTELQ57 HDA_CODEC_CONSTRUCT(INTEL, 0x0054) +#define HDA_CODEC_INTELIP HDA_CODEC_CONSTRUCT(INTEL, 0x0054) +#define HDA_CODEC_INTELBL HDA_CODEC_CONSTRUCT(INTEL, 0x2801) +#define HDA_CODEC_INTELCA HDA_CODEC_CONSTRUCT(INTEL, 0x2802) +#define HDA_CODEC_INTELEL HDA_CODEC_CONSTRUCT(INTEL, 0x2803) +#define HDA_CODEC_INTELIP2 HDA_CODEC_CONSTRUCT(INTEL, 0x2804) +#define HDA_CODEC_INTELCPT HDA_CODEC_CONSTRUCT(INTEL, 0x2805) +#define HDA_CODEC_INTELCL HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ @@ -998,12 +999,13 @@ static const struct { { HDA_CODEC_NVIDIAGT21X, "NVidia GT21x HDMI" }, { HDA_CODEC_NVIDIAMCP89, "NVidia MCP89 HDMI" }, { HDA_CODEC_NVIDIAGT240, "NVidia GT240 HDMI" }, - { HDA_CODEC_INTELG45_1, "Intel G45 HDMI" }, - { HDA_CODEC_INTELG45_2, "Intel G45 HDMI" }, - { HDA_CODEC_INTELG45_3, "Intel G45 HDMI" }, - { HDA_CODEC_INTELG45_4, "Intel G45 HDMI" }, - { HDA_CODEC_INTELG45_5, "Intel G45 HDMI" }, - { HDA_CODEC_INTELQ57, "Intel Q57 HDMI" }, + { HDA_CODEC_INTELIP, "Intel Ibex Peak HDMI" }, + { HDA_CODEC_INTELBL, "Intel Bearlake HDMI" }, + { HDA_CODEC_INTELCA, "Intel Cantiga HDMI" }, + { HDA_CODEC_INTELEL, "Intel Eaglelake HDMI" }, + { HDA_CODEC_INTELIP2, "Intel Ibex Peak HDMI" }, + { HDA_CODEC_INTELCPT, "Intel Cougar Point HDMI" }, + { HDA_CODEC_INTELCL, "Intel Crestline HDMI" }, { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" }, { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ From owner-svn-src-head@FreeBSD.ORG Thu May 26 08:20:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4F58106566C; Thu, 26 May 2011 08:20:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB8B08FC0C; Thu, 26 May 2011 08:20:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q8KEkh050722; Thu, 26 May 2011 08:20:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q8KEtk050719; Thu, 26 May 2011 08:20:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105260820.p4Q8KEtk050719@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 08:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222299 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 08:20:15 -0000 Author: adrian Date: Thu May 26 08:20:14 2011 New Revision: 222299 URL: http://svn.freebsd.org/changeset/base/222299 Log: Add temp sense to the EEPROM variable list; Export the temperature sense variables to ah_eeprom_9287.c Modified: head/sys/dev/ath/ath_hal/ah_eeprom.h head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Modified: head/sys/dev/ath/ath_hal/ah_eeprom.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom.h Thu May 26 06:43:10 2011 (r222298) +++ head/sys/dev/ath/ath_hal/ah_eeprom.h Thu May 26 08:20:14 2011 (r222299) @@ -101,7 +101,9 @@ enum { AR_EEP_ANTGAINMAX_2, /* int8_t* */ AR_EEP_WRITEPROTECT, /* use ath_hal_eepromGetFlag */ AR_EEP_PWR_TABLE_OFFSET,/* int8_t* */ - AR_EEP_PWDCLKIND /* uint8_t* */ + AR_EEP_PWDCLKIND, /* uint8_t* */ + AR_EEP_TEMPSENSE_SLOPE, /* int8_t* */ + AR_EEP_TEMPSENSE_SLOPE_PAL_ON, /* int8_t* */ }; typedef struct { Modified: head/sys/dev/ath/ath_hal/ah_eeprom_9287.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Thu May 26 06:43:10 2011 (r222298) +++ head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Thu May 26 08:20:14 2011 (r222299) @@ -63,28 +63,10 @@ v9287EepromGet(struct ath_hal *ah, int p return pBase->opCapFlags; case AR_EEP_RFSILENT: return pBase->rfSilent; -#if 0 - case AR_EEP_OB_5: - return pModal[CHAN_A_IDX].ob; - case AR_EEP_DB_5: - return pModal[CHAN_A_IDX].db; - case AR_EEP_OB_2: - return pModal[CHAN_B_IDX].ob; - case AR_EEP_DB_2: - return pModal[CHAN_B_IDX].db; -#endif case AR_EEP_TXMASK: return pBase->txMask; case AR_EEP_RXMASK: return pBase->rxMask; -#if 0 - case AR_EEP_RXGAIN_TYPE: - return IS_VERS(>=, AR5416_EEP_MINOR_VER_17) ? - pBase->rxGainType : AR5416_EEP_RXGAIN_ORIG; - case AR_EEP_TXGAIN_TYPE: - return IS_VERS(>=, AR5416_EEP_MINOR_VER_19) ? - pBase->txGainType : AR5416_EEP_TXGAIN_ORIG; -#endif case AR_EEP_OL_PWRCTRL: HALASSERT(val == AH_NULL); return pBase->openLoopPwrCntl ? HAL_OK : HAL_EIO; @@ -117,6 +99,18 @@ v9287EepromGet(struct ath_hal *ah, int p case AR_EEP_PWR_TABLE_OFFSET: *(int8_t *) val = pBase->pwrTableOffset; return HAL_OK; + case AR_EEP_TEMPSENSE_SLOPE: + if (IS_VERS(>=, AR9287_EEP_MINOR_VER_2)) + *(int8_t *)val = pBase->tempSensSlope; + else + *(int8_t *)val = 0; + return HAL_OK; + case AR_EEP_TEMPSENSE_SLOPE_PAL_ON: + if (IS_VERS(>=, AR9287_EEP_MINOR_VER_3)) + *(int8_t *)val = pBase->tempSensSlopePalOn; + else + *(int8_t *)val = 0; + return HAL_OK; default: HALASSERT(0); return HAL_EINVAL; @@ -135,10 +129,6 @@ v9287EepromSet(struct ath_hal *ah, int p case AR_EEP_ANTGAINMAX_2: ee->ee_antennaGainMax[1] = (int8_t) v; return HAL_OK; - case AR_EEP_ANTGAINMAX_5: - ee->ee_antennaGainMax[0] = (int8_t) v; - return HAL_OK; - } return HAL_EINVAL; } From owner-svn-src-head@FreeBSD.ORG Thu May 26 08:35:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D3EE106566B; Thu, 26 May 2011 08:35:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CE428FC0C; Thu, 26 May 2011 08:35:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q8Zl1o051207; Thu, 26 May 2011 08:35:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q8Zl20051203; Thu, 26 May 2011 08:35:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105260835.p4Q8Zl20051203@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 08:35: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: r222300 - in head/sys/dev/ath/ath_hal: . ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 08:35:47 -0000 Author: adrian Date: Thu May 26 08:35:47 2011 New Revision: 222300 URL: http://svn.freebsd.org/changeset/base/222300 Log: AR9287 prep work: * Add PCI/PCIE devids * Add AR9287/Kiwi version check macros * AR_SREV_9287 -> AR_SREV_KIWI Obtained from: Atheros, ath9k Modified: head/sys/dev/ath/ath_hal/ah_devid.h head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_devid.h Thu May 26 08:20:14 2011 (r222299) +++ head/sys/dev/ath/ath_hal/ah_devid.h Thu May 26 08:35:47 2011 (r222300) @@ -80,6 +80,8 @@ #define AR9280_DEVID_PCIE 0x002a /* AR9280 PCI-E Merlin */ #define AR9285_DEVID_PCIE 0x002b /* AR9285 PCI-E Kite */ #define AR2427_DEVID_PCIE 0x002c /* AR2427 PCI-E w/ 802.11n bonded out */ +#define AR9287_DEVID_PCI 0x002d /* AR9227 PCI Merlin */ +#define AR9287_DEVID_PCIE 0x002e /* AR9287 PCI-E Merlin */ #define AR_SUBVENDOR_ID_NOG 0x0e11 /* No 11G subvendor ID */ #define AR_SUBVENDOR_ID_NEW_A 0x7065 /* Update device to new RD */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu May 26 08:20:14 2011 (r222299) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu May 26 08:35:47 2011 (r222300) @@ -2576,7 +2576,7 @@ ar5416OverrideIni(struct ath_hal *ah, co if (!AR_SREV_9271(ah)) val &= ~AR_PCU_MISC_MODE2_HWWAR1; - if (AR_SREV_9287_11_OR_LATER(ah)) + if (AR_SREV_KIWI_11_OR_LATER(ah)) val = val & (~AR_PCU_MISC_MODE2_HWWAR2); OS_REG_WRITE(ah, AR_PCU_MISC_MODE2, val); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 26 08:20:14 2011 (r222299) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 26 08:35:47 2011 (r222300) @@ -566,6 +566,11 @@ #define AR_XSREV_REVISION_KITE_10 0 /* Kite 1.0 */ #define AR_XSREV_REVISION_KITE_11 1 /* Kite 1.1 */ #define AR_XSREV_REVISION_KITE_12 2 /* Kite 1.2 */ +#define AR_XSREV_VERSION_KIWI 0x180 /* Kite Version */ +#define AR_XSREV_REVISION_KIWI_10 0 +#define AR_XSREV_REVISION_KIWI_11 1 +#define AR_XSREV_REVISION_KIWI_12 2 +#define AR_XSREV_REVISION_KIWI_13 3 /* Owl (AR5416) */ #define AR_SREV_OWL(_ah) \ @@ -648,9 +653,31 @@ (AR_SREV_KITE_12_OR_LATER(_ah) && \ ((OS_REG_READ(_ah, AR_AN_SYNTH9) & 0x7) == 0x1)) +#define AR_SREV_KIWI(_ah) \ + (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_KIWI) + +#define AR_SREV_KIWI_11_OR_LATER(_ah) \ + (AR_SREV_KIWI(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KIWI_11) + +#define AR_SREV_KIWI_11(_ah) \ + (AR_SREV_KIWI(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KIWI_11) + +#define AR_SREV_KIWI_12(_ah) \ + (AR_SREV_KIWI(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KIWI_12) + +#define AR_SREV_KIWI_12_OR_LATER(_ah) \ + (AR_SREV_KIWI(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KIWI_12) + +#define AR_SREV_KIWI_13_OR_LATER(_ah) \ + (AR_SREV_KIWI(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KIWI_13) + + /* Not yet implemented chips */ #define AR_SREV_9271(_ah) 0 -#define AR_SREV_9287_11_OR_LATER(_ah) 0 -#define AR_SREV_KIWI_10_OR_LATER(_ah) 0 #endif /* _DEV_ATH_AR5416REG_H */ From owner-svn-src-head@FreeBSD.ORG Thu May 26 09:15:33 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 990B91065670; Thu, 26 May 2011 09:15:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86CC68FC14; Thu, 26 May 2011 09:15:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q9FXau052475; Thu, 26 May 2011 09:15:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q9FX8W052466; Thu, 26 May 2011 09:15:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105260915.p4Q9FX8W052466@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 09:15: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: r222301 - in head/sys/dev/ath/ath_hal: ar5416 ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 09:15:33 -0000 Author: adrian Date: Thu May 26 09:15:33 2011 New Revision: 222301 URL: http://svn.freebsd.org/changeset/base/222301 Log: Bring over my AR9287 work in progress. It isn't linked into the build because it's missing the TX power and PDADC programming code. This code is mostly based on the ath9k codebase, compared against the Atheros codebase as appropriate. What's implemented: * probe/attach * EEPROM board value programming * RX initial calibration * radio channel programming * general MAC / baseband setup * async fifo setup * open-loop tx power calibration What's missing before it can be enabled by default: * TX power / calibration setting code * closed-loop tx power calibration routines * TSF2 handling * generic timer support from ath9k Obtained from: Atheros, ath9k Added: head/sys/dev/ath/ath_hal/ar9002/ar9287.c (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287.h (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287.ini (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287_cal.c (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287_cal.h (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.h (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287an.h (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9287phy.h (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu May 26 08:35:47 2011 (r222300) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu May 26 09:15:33 2011 (r222301) @@ -167,6 +167,17 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO AH5416(ah)->ah_writeIni(ah, chan); + if(AR_SREV_KIWI_13_OR_LATER(ah) ) { + /* Enable ASYNC FIFO */ + OS_REG_SET_BIT(ah, AR_MAC_PCU_ASYNC_FIFO_REG3, + AR_MAC_PCU_ASYNC_FIFO_REG3_DATAPATH_SEL); + OS_REG_SET_BIT(ah, AR_PHY_MODE, AR_PHY_MODE_ASYNCFIFO); + OS_REG_CLR_BIT(ah, AR_MAC_PCU_ASYNC_FIFO_REG3, + AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET); + OS_REG_SET_BIT(ah, AR_MAC_PCU_ASYNC_FIFO_REG3, + AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET); + } + /* Override ini values (that can be overriden in this fashion) */ ar5416OverrideIni(ah, chan); @@ -258,6 +269,12 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO OS_REG_WRITE(ah, AR_MAC_LED, OS_REG_READ(ah, AR_MAC_LED) | saveLedState); + /* Start TSF2 for generic timer 8-15 */ +#ifdef NOTYET + if (AR_SREV_KIWI(ah)) + ar5416StartTsf2(ah); +#endif + /* Restore previous antenna */ OS_REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna); @@ -292,6 +309,41 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO /* This may override the AR_DIAG_SW register */ ar5416InitUserSettings(ah); + if (AR_SREV_KIWI_13_OR_LATER(ah)) { + /* + * Enable ASYNC FIFO + * + * If Async FIFO is enabled, the following counters change + * as MAC now runs at 117 Mhz instead of 88/44MHz when + * async FIFO is disabled. + * + * Overwrite the delay/timeouts initialized in ProcessIni() + * above. + */ + OS_REG_WRITE(ah, AR_D_GBL_IFS_SIFS, + AR_D_GBL_IFS_SIFS_ASYNC_FIFO_DUR); + OS_REG_WRITE(ah, AR_D_GBL_IFS_SLOT, + AR_D_GBL_IFS_SLOT_ASYNC_FIFO_DUR); + OS_REG_WRITE(ah, AR_D_GBL_IFS_EIFS, + AR_D_GBL_IFS_EIFS_ASYNC_FIFO_DUR); + + OS_REG_WRITE(ah, AR_TIME_OUT, + AR_TIME_OUT_ACK_CTS_ASYNC_FIFO_DUR); + OS_REG_WRITE(ah, AR_USEC, AR_USEC_ASYNC_FIFO_DUR); + + OS_REG_SET_BIT(ah, AR_MAC_PCU_LOGIC_ANALYZER, + AR_MAC_PCU_LOGIC_ANALYZER_DISBUG20768); + OS_REG_RMW_FIELD(ah, AR_AHB_MODE, AR_AHB_CUSTOM_BURST_EN, + AR_AHB_CUSTOM_BURST_ASYNC_FIFO_VAL); + } + + if (AR_SREV_KIWI_13_OR_LATER(ah)) { + /* Enable AGGWEP to accelerate encryption engine */ + OS_REG_SET_BIT(ah, AR_PCU_MISC_MODE2, + AR_PCU_MISC_MODE2_ENABLE_AGGWEP); + } + + /* * disable seq number generation in hw */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu May 26 08:35:47 2011 (r222300) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu May 26 09:15:33 2011 (r222301) @@ -301,4 +301,6 @@ #define AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL 0x80000000 #define AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL_S 31 +#define AR_PHY_MODE_ASYNCFIFO 0x80 /* Enable async fifo */ + #endif /* _DEV_ATH_AR5416PHY_H_ */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 26 08:35:47 2011 (r222300) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 26 09:15:33 2011 (r222301) @@ -219,6 +219,10 @@ #define AR_AHB_PAGE_SIZE_1K 0x00000000 /* set page-size as 1k */ #define AR_AHB_PAGE_SIZE_2K 0x00000008 /* set page-size as 2k */ #define AR_AHB_PAGE_SIZE_4K 0x00000010 /* set page-size as 4k */ +/* Kiwi */ +#define AR_AHB_CUSTOM_BURST_EN 0x000000C0 /* set Custom Burst Mode */ +#define AR_AHB_CUSTOM_BURST_EN_S 6 /* set Custom Burst Mode */ +#define AR_AHB_CUSTOM_BURST_ASYNC_FIFO_VAL 3 /* set both bits in Async FIFO mode */ /* MAC PCU Registers */ #define AR_STA_ID1_PRESERVE_SEQNUM 0x20000000 /* Don't replace seq num */ @@ -451,9 +455,23 @@ * For Merlin and above only. */ #define AR_PCU_MISC_MODE2_ADHOC_MCAST_KEYID_ENABLE 0x00000040 +#define AR_PCU_MISC_MODE2_ENABLE_AGGWEP 0x00020000 /* Kiwi or later? */ #define AR_PCU_MISC_MODE2_HWWAR1 0x00100000 #define AR_PCU_MISC_MODE2_HWWAR2 0x02000000 +/* For Kiwi */ +#define AR_MAC_PCU_ASYNC_FIFO_REG3 0x8358 +#define AR_MAC_PCU_ASYNC_FIFO_REG3_DATAPATH_SEL 0x00000400 +#define AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET 0x80000000 + +/* TSF2. For Kiwi only */ +#define AR_TSF2_L32 0x8390 +#define AR_TSF2_U32 0x8394 + +/* MAC Direct Connect Control. For Kiwi only */ +#define AR_DIRECT_CONNECT 0x83A0 +#define AR_DC_AP_STA_EN 0x00000001 + /* GPIO Interrupt */ #define AR_INTR_GPIO 0x3FF00000 /* gpio interrupted */ #define AR_INTR_GPIO_S 20 @@ -488,6 +506,17 @@ #define AR_PCU_TXBUF_CTRL_USABLE_SIZE 0x700 #define AR_9285_PCU_TXBUF_CTRL_USABLE_SIZE 0x380 +/* IFS, SIFS, slot, etc for Async FIFO mode (Kiwi) */ +#define AR_D_GBL_IFS_SIFS_ASYNC_FIFO_DUR 0x000003AB +#define AR_TIME_OUT_ACK_CTS_ASYNC_FIFO_DUR 0x16001D56 +#define AR_USEC_ASYNC_FIFO_DUR 0x12e00074 +#define AR_D_GBL_IFS_SLOT_ASYNC_FIFO_DUR 0x00000420 +#define AR_D_GBL_IFS_EIFS_ASYNC_FIFO_DUR 0x0000A5EB + +/* Used by Kiwi Async FIFO */ +#define AR_MAC_PCU_LOGIC_ANALYZER 0x8264 +#define AR_MAC_PCU_LOGIC_ANALYZER_DISBUG20768 0x20000000 + /* Eeprom defines */ #define AR_EEPROM_STATUS_DATA_VAL 0x0000ffff #define AR_EEPROM_STATUS_DATA_VAL_S 0 @@ -566,7 +595,7 @@ #define AR_XSREV_REVISION_KITE_10 0 /* Kite 1.0 */ #define AR_XSREV_REVISION_KITE_11 1 /* Kite 1.1 */ #define AR_XSREV_REVISION_KITE_12 2 /* Kite 1.2 */ -#define AR_XSREV_VERSION_KIWI 0x180 /* Kite Version */ +#define AR_XSREV_VERSION_KIWI 0x180 /* Kiwi (AR9287) */ #define AR_XSREV_REVISION_KIWI_10 0 #define AR_XSREV_REVISION_KIWI_11 1 #define AR_XSREV_REVISION_KIWI_12 2 Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c Thu May 26 08:35:47 2011 (r222300) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c Thu May 26 09:15:33 2011 (r222301) @@ -87,8 +87,10 @@ ar9285_check_div_comb(struct ath_hal *ah HAL_EEPROM_v4k *ee = AH_PRIVATE(ah)->ah_eeprom; const MODAL_EEP4K_HEADER *pModal = &ee->ee_base.modalHeader; +#if 0 /* For now, simply disable this until it's better debugged. -adrian */ return AH_FALSE; +#endif if (! AR_SREV_KITE(ah)) return AH_FALSE; Added: head/sys/dev/ath/ath_hal/ar9002/ar9287.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287.c Thu May 26 09:15:33 2011 (r222301) @@ -0,0 +1,392 @@ +/* + * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting + * Copyright (c) 2008 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#include "opt_ah.h" + +/* + * NB: Merlin and later have a simpler RF backend. + */ +#include "ah.h" +#include "ah_internal.h" + +#include "ah_eeprom_v14.h" + +#include "ar9002/ar9287.h" +#include "ar5416/ar5416reg.h" +#include "ar5416/ar5416phy.h" + +#define N(a) (sizeof(a)/sizeof(a[0])) + +struct ar9287State { + RF_HAL_FUNCS base; /* public state, must be first */ + uint16_t pcdacTable[1]; /* XXX */ +}; +#define AR9280(ah) ((struct ar9287State *) AH5212(ah)->ah_rfHal) + +static HAL_BOOL ar9287GetChannelMaxMinPower(struct ath_hal *, + const struct ieee80211_channel *, int16_t *maxPow,int16_t *minPow); +int16_t ar9287GetNfAdjust(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *c); + +static void +ar9287WriteRegs(struct ath_hal *ah, u_int modesIndex, u_int freqIndex, + int writes) +{ + (void) ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_bb_rfgain, + freqIndex, writes); +} + +/* + * Take the MHz channel value and set the Channel value + * + * ASSUMES: Writes enabled to analog bus + * + * Actual Expression, + * + * For 2GHz channel, + * Channel Frequency = (3/4) * freq_ref * (chansel[8:0] + chanfrac[16:0]/2^17) + * (freq_ref = 40MHz) + * + * For 5GHz channel, + * Channel Frequency = (3/2) * freq_ref * (chansel[8:0] + chanfrac[16:0]/2^10) + * (freq_ref = 40MHz/(24>>amodeRefSel)) + * + * For 5GHz channels which are 5MHz spaced, + * Channel Frequency = (3/2) * freq_ref * (chansel[8:0] + chanfrac[16:0]/2^17) + * (freq_ref = 40MHz) + */ +static HAL_BOOL +ar9287SetChannel(struct ath_hal *ah, const struct ieee80211_channel *chan) +{ + uint16_t bMode, fracMode, aModeRefSel = 0; + uint32_t freq, ndiv, channelSel = 0, channelFrac = 0, reg32 = 0; + CHAN_CENTERS centers; + uint32_t refDivA = 24; + + OS_MARK(ah, AH_MARK_SETCHANNEL, chan->ic_freq); + + ar5416GetChannelCenters(ah, chan, ¢ers); + freq = centers.synth_center; + + reg32 = OS_REG_READ(ah, AR_PHY_SYNTH_CONTROL); + reg32 &= 0xc0000000; + + if (freq < 4800) { /* 2 GHz, fractional mode */ + uint32_t txctl; + int regWrites = 0; + + bMode = 1; + fracMode = 1; + aModeRefSel = 0; + channelSel = (freq * 0x10000)/15; + + if (AR_SREV_KIWI_11_OR_LATER(ah)) { + if (freq == 2484) { + ath_hal_ini_write(ah, + &AH9287(ah)->ah_ini_cckFirJapan2484, 1, + regWrites); + } else { + ath_hal_ini_write(ah, + &AH9287(ah)->ah_ini_cckFirNormal, 1, + regWrites); + } + } + + txctl = OS_REG_READ(ah, AR_PHY_CCK_TX_CTRL); + if (freq == 2484) { + /* Enable channel spreading for channel 14 */ + OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, + txctl | AR_PHY_CCK_TX_CTRL_JAPAN); + } else { + OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, + txctl &~ AR_PHY_CCK_TX_CTRL_JAPAN); + } + } else { + bMode = 0; + fracMode = 0; + + if ((freq % 20) == 0) { + aModeRefSel = 3; + } else if ((freq % 10) == 0) { + aModeRefSel = 2; + } else { + aModeRefSel = 0; + /* + * Enable 2G (fractional) mode for channels which + * are 5MHz spaced + */ + fracMode = 1; + refDivA = 1; + channelSel = (freq * 0x8000)/15; + + /* RefDivA setting */ + OS_A_REG_RMW_FIELD(ah, AR_AN_SYNTH9, + AR_AN_SYNTH9_REFDIVA, refDivA); + } + if (!fracMode) { + ndiv = (freq * (refDivA >> aModeRefSel))/60; + channelSel = ndiv & 0x1ff; + channelFrac = (ndiv & 0xfffffe00) * 2; + channelSel = (channelSel << 17) | channelFrac; + } + } + + reg32 = reg32 | (bMode << 29) | (fracMode << 28) | + (aModeRefSel << 26) | (channelSel); + + OS_REG_WRITE(ah, AR_PHY_SYNTH_CONTROL, reg32); + + AH_PRIVATE(ah)->ah_curchan = chan; + + return AH_TRUE; +} + +/* + * Return a reference to the requested RF Bank. + */ +static uint32_t * +ar9287GetRfBank(struct ath_hal *ah, int bank) +{ + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown RF Bank %d requested\n", + __func__, bank); + return AH_NULL; +} + +/* + * Reads EEPROM header info from device structure and programs + * all rf registers + */ +static HAL_BOOL +ar9287SetRfRegs(struct ath_hal *ah, const struct ieee80211_channel *chan, + uint16_t modesIndex, uint16_t *rfXpdGain) +{ + return AH_TRUE; /* nothing to do */ +} + +/* + * Read the transmit power levels from the structures taken from EEPROM + * Interpolate read transmit power values for this channel + * Organize the transmit power values into a table for writing into the hardware + */ + +static HAL_BOOL +ar9287SetPowerTable(struct ath_hal *ah, int16_t *pPowerMin, int16_t *pPowerMax, + const struct ieee80211_channel *chan, uint16_t *rfXpdGain) +{ + return AH_TRUE; +} + +#if 0 +static int16_t +ar9287GetMinPower(struct ath_hal *ah, EXPN_DATA_PER_CHANNEL_5112 *data) +{ + int i, minIndex; + int16_t minGain,minPwr,minPcdac,retVal; + + /* Assume NUM_POINTS_XPD0 > 0 */ + minGain = data->pDataPerXPD[0].xpd_gain; + for (minIndex=0,i=1; ipDataPerXPD[i].xpd_gain < minGain) { + minIndex = i; + minGain = data->pDataPerXPD[i].xpd_gain; + } + } + minPwr = data->pDataPerXPD[minIndex].pwr_t4[0]; + minPcdac = data->pDataPerXPD[minIndex].pcdac[0]; + for (i=1; ipDataPerXPD[minIndex].pwr_t4[i] < minPwr) { + minPwr = data->pDataPerXPD[minIndex].pwr_t4[i]; + minPcdac = data->pDataPerXPD[minIndex].pcdac[i]; + } + } + retVal = minPwr - (minPcdac*2); + return(retVal); +} +#endif + +static HAL_BOOL +ar9287GetChannelMaxMinPower(struct ath_hal *ah, + const struct ieee80211_channel *chan, + int16_t *maxPow, int16_t *minPow) +{ +#if 0 + struct ath_hal_5212 *ahp = AH5212(ah); + int numChannels=0,i,last; + int totalD, totalF,totalMin; + EXPN_DATA_PER_CHANNEL_5112 *data=AH_NULL; + EEPROM_POWER_EXPN_5112 *powerArray=AH_NULL; + + *maxPow = 0; + if (IS_CHAN_A(chan)) { + powerArray = ahp->ah_modePowerArray5112; + data = powerArray[headerInfo11A].pDataPerChannel; + numChannels = powerArray[headerInfo11A].numChannels; + } else if (IS_CHAN_G(chan) || IS_CHAN_108G(chan)) { + /* XXX - is this correct? Should we also use the same power for turbo G? */ + powerArray = ahp->ah_modePowerArray5112; + data = powerArray[headerInfo11G].pDataPerChannel; + numChannels = powerArray[headerInfo11G].numChannels; + } else if (IS_CHAN_B(chan)) { + powerArray = ahp->ah_modePowerArray5112; + data = powerArray[headerInfo11B].pDataPerChannel; + numChannels = powerArray[headerInfo11B].numChannels; + } else { + return (AH_TRUE); + } + /* Make sure the channel is in the range of the TP values + * (freq piers) + */ + if ((numChannels < 1) || + (chan->channel < data[0].channelValue) || + (chan->channel > data[numChannels-1].channelValue)) + return(AH_FALSE); + + /* Linearly interpolate the power value now */ + for (last=0,i=0; + (ichannel > data[i].channelValue); + last=i++); + totalD = data[i].channelValue - data[last].channelValue; + if (totalD > 0) { + totalF = data[i].maxPower_t4 - data[last].maxPower_t4; + *maxPow = (int8_t) ((totalF*(chan->channel-data[last].channelValue) + data[last].maxPower_t4*totalD)/totalD); + + totalMin = ar9287GetMinPower(ah,&data[i]) - ar9287GetMinPower(ah, &data[last]); + *minPow = (int8_t) ((totalMin*(chan->channel-data[last].channelValue) + ar9287GetMinPower(ah, &data[last])*totalD)/totalD); + return (AH_TRUE); + } else { + if (chan->channel == data[i].channelValue) { + *maxPow = data[i].maxPower_t4; + *minPow = ar9287GetMinPower(ah, &data[i]); + return(AH_TRUE); + } else + return(AH_FALSE); + } +#else + *maxPow = *minPow = 0; + return AH_FALSE; +#endif +} + +/* + * The ordering of nfarray is thus: + * + * nfarray[0]: Chain 0 ctl + * nfarray[1]: Chain 1 ctl + * nfarray[2]: Chain 2 ctl + * nfarray[3]: Chain 0 ext + * nfarray[4]: Chain 1 ext + * nfarray[5]: Chain 2 ext + */ +static void +ar9287GetNoiseFloor(struct ath_hal *ah, int16_t nfarray[]) +{ + int16_t nf; + + nf = MS(OS_REG_READ(ah, AR_PHY_CCA), AR9280_PHY_MINCCA_PWR); + if (nf & 0x100) + nf = 0 - ((nf ^ 0x1ff) + 1); + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ctl] [chain 0] is %d\n", nf); + nfarray[0] = nf; + + nf = MS(OS_REG_READ(ah, AR_PHY_CH1_CCA), AR9280_PHY_CH1_MINCCA_PWR); + if (nf & 0x100) + nf = 0 - ((nf ^ 0x1ff) + 1); + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ctl] [chain 1] is %d\n", nf); + nfarray[1] = nf; + + nf = MS(OS_REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR); + if (nf & 0x100) + nf = 0 - ((nf ^ 0x1ff) + 1); + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ext] [chain 0] is %d\n", nf); + nfarray[3] = nf; + + nf = MS(OS_REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR9280_PHY_CH1_EXT_MINCCA_PWR); + if (nf & 0x100) + nf = 0 - ((nf ^ 0x1ff) + 1); + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ext] [chain 1] is %d\n", nf); + nfarray[4] = nf; + + /* Chain 2 - invalid */ + nfarray[2] = 0; + nfarray[5] = 0; + +} + +/* + * Adjust NF based on statistical values for 5GHz frequencies. + * Stubbed:Not used by Fowl + */ +int16_t +ar9287GetNfAdjust(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *c) +{ + return 0; +} + +/* + * Free memory for analog bank scratch buffers + */ +static void +ar9287RfDetach(struct ath_hal *ah) +{ + struct ath_hal_5212 *ahp = AH5212(ah); + + HALASSERT(ahp->ah_rfHal != AH_NULL); + ath_hal_free(ahp->ah_rfHal); + ahp->ah_rfHal = AH_NULL; +} + +HAL_BOOL +ar9287RfAttach(struct ath_hal *ah, HAL_STATUS *status) +{ + struct ath_hal_5212 *ahp = AH5212(ah); + struct ar9287State *priv; + + HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: attach AR9280 radio\n", __func__); + + HALASSERT(ahp->ah_rfHal == AH_NULL); + priv = ath_hal_malloc(sizeof(struct ar9287State)); + if (priv == AH_NULL) { + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: cannot allocate private state\n", __func__); + *status = HAL_ENOMEM; /* XXX */ + return AH_FALSE; + } + priv->base.rfDetach = ar9287RfDetach; + priv->base.writeRegs = ar9287WriteRegs; + priv->base.getRfBank = ar9287GetRfBank; + priv->base.setChannel = ar9287SetChannel; + priv->base.setRfRegs = ar9287SetRfRegs; + priv->base.setPowerTable = ar9287SetPowerTable; + priv->base.getChannelMaxMinPower = ar9287GetChannelMaxMinPower; + priv->base.getNfAdjust = ar9287GetNfAdjust; + + ahp->ah_pcdacTable = priv->pcdacTable; + ahp->ah_pcdacTableSize = sizeof(priv->pcdacTable); + ahp->ah_rfHal = &priv->base; + /* + * Set noise floor adjust method; we arrange a + * direct call instead of thunking. + */ + AH_PRIVATE(ah)->ah_getNfAdjust = priv->base.getNfAdjust; + AH_PRIVATE(ah)->ah_getNoiseFloor = ar9287GetNoiseFloor; + + return AH_TRUE; +} Added: head/sys/dev/ath/ath_hal/ar9002/ar9287.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287.h Thu May 26 09:15:33 2011 (r222301) @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2010 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#ifndef _ATH_AR9287_H_ +#define _ATH_AR9287_H_ + +#include "ar5416/ar5416.h" + +/* + * This is a chip thing, but it's used here as part of the + * ath_hal_9287 struct; so it's convienent to locate the + * define here. + */ +#define AR9287_TX_GAIN_TABLE_SIZE 22 + +struct ath_hal_9287 { + struct ath_hal_5416 ah_5416; + + HAL_INI_ARRAY ah_ini_xmodes; + HAL_INI_ARRAY ah_ini_rxgain; + HAL_INI_ARRAY ah_ini_txgain; + + HAL_INI_ARRAY ah_ini_cckFirNormal; + HAL_INI_ARRAY ah_ini_cckFirJapan2484; + + int PDADCdelta; + + uint32_t originalGain[AR9287_TX_GAIN_TABLE_SIZE]; +}; +#define AH9287(_ah) ((struct ath_hal_9287 *)(_ah)) + +#define AR9287_DEFAULT_RXCHAINMASK 3 +#define AR9285_DEFAULT_RXCHAINMASK 1 +#define AR9287_DEFAULT_TXCHAINMASK 3 +#define AR9285_DEFAULT_TXCHAINMASK 1 + +#define AR_PHY_CCA_NOM_VAL_9287_2GHZ -112 +#define AR_PHY_CCA_NOM_VAL_9287_5GHZ -112 +#define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ -127 +#define AR_PHY_CCA_MIN_GOOD_VAL_9287_5GHZ -122 +#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ -97 +#define AR_PHY_CCA_MAX_GOOD_VAL_9287_5GHZ -102 + +extern HAL_BOOL ar9287RfAttach(struct ath_hal *, HAL_STATUS *); +extern HAL_BOOL ar9287SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); + +#endif /* _ATH_AR9287_H_ */ Added: head/sys/dev/ath/ath_hal/ar9002/ar9287.ini ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287.ini Thu May 26 09:15:33 2011 (r222301) @@ -0,0 +1,783 @@ +/* + * Copyright (c) 2010 Atheros Communications Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +static const uint32_t ar9287Modes_9287_1_1[][6] = { + {0x00001030, 0x00000000, 0x00000000, 0x000002c0, 0x00000160, 0x000001e0}, + {0x00001070, 0x00000000, 0x00000000, 0x00000318, 0x0000018c, 0x000001e0}, + {0x000010b0, 0x00000000, 0x00000000, 0x00007c70, 0x00003e38, 0x00001180}, + {0x000010f0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008}, + {0x00008014, 0x00000000, 0x00000000, 0x10801600, 0x08400b00, 0x06e006e0}, + {0x0000801c, 0x00000000, 0x00000000, 0x12e00057, 0x12e0002b, 0x0988004f}, + {0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810, 0x08f04810}, + {0x000081d0, 0x00003200, 0x00003200, 0x0000320a, 0x0000320a, 0x0000320a}, + {0x00008318, 0x00000000, 0x00000000, 0x00006880, 0x00003440, 0x00006880}, + {0x00009804, 0x00000000, 0x00000000, 0x000003c4, 0x00000300, 0x00000303}, + {0x00009820, 0x00000000, 0x00000000, 0x02020200, 0x02020200, 0x02020200}, + {0x00009824, 0x00000000, 0x00000000, 0x01000e0e, 0x01000e0e, 0x01000e0e}, + {0x00009828, 0x00000000, 0x00000000, 0x3a020001, 0x3a020001, 0x3a020001}, + {0x00009834, 0x00000000, 0x00000000, 0x00000e0e, 0x00000e0e, 0x00000e0e}, + {0x00009838, 0x00000003, 0x00000003, 0x00000007, 0x00000007, 0x00000007}, + {0x00009840, 0x206a002e, 0x206a002e, 0x206a012e, 0x206a012e, 0x206a012e}, + {0x00009844, 0x03720000, 0x03720000, 0x037216a0, 0x037216a0, 0x037216a0}, + {0x00009850, 0x60000000, 0x60000000, 0x6d4000e2, 0x6c4000e2, 0x6c4000e2}, + {0x00009858, 0x7c000d00, 0x7c000d00, 0x7ec84d2e, 0x7ec84d2e, 0x7ec84d2e}, + {0x0000985c, 0x3100005e, 0x3100005e, 0x3139605e, 0x31395d5e, 0x31395d5e}, + {0x00009860, 0x00058d00, 0x00058d00, 0x00058d20, 0x00058d20, 0x00058d18}, + {0x00009864, 0x00000e00, 0x00000e00, 0x0001ce00, 0x0001ce00, 0x0001ce00}, + {0x00009868, 0x000040c0, 0x000040c0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0}, + {0x0000986c, 0x00000080, 0x00000080, 0x06903881, 0x06903881, 0x06903881}, + {0x00009914, 0x00000000, 0x00000000, 0x00001130, 0x00000898, 0x000007d0}, + {0x00009918, 0x00000000, 0x00000000, 0x00000016, 0x0000000b, 0x00000016}, + {0x00009924, 0xd00a8a01, 0xd00a8a01, 0xd00a8a0d, 0xd00a8a0d, 0xd00a8a0d}, + {0x00009944, 0xefbc0000, 0xefbc0000, 0xefbc1010, 0xefbc1010, 0xefbc1010}, + {0x00009960, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000010}, + {0x0000a960, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000010}, + {0x00009964, 0x00000000, 0x00000000, 0x00000210, 0x00000210, 0x00000210}, + {0x0000c968, 0x00000200, 0x00000200, 0x000003ce, 0x000003ce, 0x000003ce}, + {0x000099b8, 0x00000000, 0x00000000, 0x0000001c, 0x0000001c, 0x0000001c}, + {0x000099bc, 0x00000000, 0x00000000, 0x00000c00, 0x00000c00, 0x00000c00}, + {0x000099c0, 0x00000000, 0x00000000, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4}, + {0x0000a204, 0x00000440, 0x00000440, 0x00000444, 0x00000444, 0x00000444}, + {0x0000a20c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000b20c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a21c, 0x1803800a, 0x1803800a, 0x1883800a, 0x1883800a, 0x1883800a}, + {0x0000a230, 0x00000000, 0x00000000, 0x00000210, 0x00000108, 0x00000000}, + {0x0000a250, 0x00000000, 0x00000000, 0x0004a000, 0x0004a000, 0x0004a000}, + {0x0000a358, 0x7999aa02, 0x7999aa02, 0x7999aa0e, 0x7999aa0e, 0x7999aa0e}, + {0x0000a3d8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, +}; + +static const uint32_t ar9287Common_9287_1_1[][2] = { + /* Addr allmodes */ + {0x0000000c, 0x00000000}, + {0x00000030, 0x00020015}, + {0x00000034, 0x00000005}, + {0x00000040, 0x00000000}, + {0x00000044, 0x00000008}, + {0x00000048, 0x00000008}, + {0x0000004c, 0x00000010}, + {0x00000050, 0x00000000}, + {0x00000054, 0x0000001f}, + {0x00000800, 0x00000000}, + {0x00000804, 0x00000000}, + {0x00000808, 0x00000000}, + {0x0000080c, 0x00000000}, + {0x00000810, 0x00000000}, + {0x00000814, 0x00000000}, + {0x00000818, 0x00000000}, + {0x0000081c, 0x00000000}, + {0x00000820, 0x00000000}, + {0x00000824, 0x00000000}, + {0x00001040, 0x002ffc0f}, + {0x00001044, 0x002ffc0f}, + {0x00001048, 0x002ffc0f}, + {0x0000104c, 0x002ffc0f}, + {0x00001050, 0x002ffc0f}, + {0x00001054, 0x002ffc0f}, + {0x00001058, 0x002ffc0f}, + {0x0000105c, 0x002ffc0f}, + {0x00001060, 0x002ffc0f}, + {0x00001064, 0x002ffc0f}, + {0x00001230, 0x00000000}, + {0x00001270, 0x00000000}, + {0x00001038, 0x00000000}, + {0x00001078, 0x00000000}, + {0x000010b8, 0x00000000}, + {0x000010f8, 0x00000000}, + {0x00001138, 0x00000000}, + {0x00001178, 0x00000000}, + {0x000011b8, 0x00000000}, + {0x000011f8, 0x00000000}, + {0x00001238, 0x00000000}, + {0x00001278, 0x00000000}, + {0x000012b8, 0x00000000}, + {0x000012f8, 0x00000000}, + {0x00001338, 0x00000000}, + {0x00001378, 0x00000000}, + {0x000013b8, 0x00000000}, + {0x000013f8, 0x00000000}, + {0x00001438, 0x00000000}, + {0x00001478, 0x00000000}, + {0x000014b8, 0x00000000}, + {0x000014f8, 0x00000000}, + {0x00001538, 0x00000000}, + {0x00001578, 0x00000000}, + {0x000015b8, 0x00000000}, + {0x000015f8, 0x00000000}, + {0x00001638, 0x00000000}, + {0x00001678, 0x00000000}, + {0x000016b8, 0x00000000}, + {0x000016f8, 0x00000000}, + {0x00001738, 0x00000000}, + {0x00001778, 0x00000000}, + {0x000017b8, 0x00000000}, + {0x000017f8, 0x00000000}, + {0x0000103c, 0x00000000}, + {0x0000107c, 0x00000000}, + {0x000010bc, 0x00000000}, + {0x000010fc, 0x00000000}, + {0x0000113c, 0x00000000}, + {0x0000117c, 0x00000000}, + {0x000011bc, 0x00000000}, + {0x000011fc, 0x00000000}, + {0x0000123c, 0x00000000}, + {0x0000127c, 0x00000000}, + {0x000012bc, 0x00000000}, + {0x000012fc, 0x00000000}, + {0x0000133c, 0x00000000}, + {0x0000137c, 0x00000000}, + {0x000013bc, 0x00000000}, + {0x000013fc, 0x00000000}, + {0x0000143c, 0x00000000}, + {0x0000147c, 0x00000000}, + {0x00004030, 0x00000002}, + {0x0000403c, 0x00000002}, + {0x00004024, 0x0000001f}, + {0x00004060, 0x00000000}, + {0x00004064, 0x00000000}, + {0x00007010, 0x00000033}, + {0x00007020, 0x00000000}, + {0x00007034, 0x00000002}, + {0x00007038, 0x000004c2}, + {0x00008004, 0x00000000}, + {0x00008008, 0x00000000}, + {0x0000800c, 0x00000000}, + {0x00008018, 0x00000700}, + {0x00008020, 0x00000000}, + {0x00008038, 0x00000000}, + {0x0000803c, 0x00000000}, + {0x00008048, 0x40000000}, + {0x00008054, 0x00000000}, + {0x00008058, 0x00000000}, + {0x0000805c, 0x000fc78f}, + {0x00008060, 0x0000000f}, + {0x00008064, 0x00000000}, + {0x00008070, 0x00000000}, + {0x000080c0, 0x2a80001a}, + {0x000080c4, 0x05dc01e0}, + {0x000080c8, 0x1f402710}, + {0x000080cc, 0x01f40000}, + {0x000080d0, 0x00001e00}, + {0x000080d4, 0x00000000}, + {0x000080d8, 0x00400000}, + {0x000080e0, 0xffffffff}, + {0x000080e4, 0x0000ffff}, + {0x000080e8, 0x003f3f3f}, + {0x000080ec, 0x00000000}, + {0x000080f0, 0x00000000}, + {0x000080f4, 0x00000000}, + {0x000080f8, 0x00000000}, + {0x000080fc, 0x00020000}, + {0x00008100, 0x00020000}, + {0x00008104, 0x00000001}, + {0x00008108, 0x00000052}, + {0x0000810c, 0x00000000}, + {0x00008110, 0x00000168}, + {0x00008118, 0x000100aa}, + {0x0000811c, 0x00003210}, + {0x00008124, 0x00000000}, + {0x00008128, 0x00000000}, + {0x0000812c, 0x00000000}, + {0x00008130, 0x00000000}, + {0x00008134, 0x00000000}, + {0x00008138, 0x00000000}, + {0x0000813c, 0x00000000}, + {0x00008144, 0xffffffff}, + {0x00008168, 0x00000000}, + {0x0000816c, 0x00000000}, + {0x00008170, 0x18487320}, + {0x00008174, 0xfaa4fa50}, + {0x00008178, 0x00000100}, + {0x0000817c, 0x00000000}, + {0x000081c0, 0x00000000}, + {0x000081c4, 0x00000000}, + {0x000081d4, 0x00000000}, + {0x000081ec, 0x00000000}, + {0x000081f0, 0x00000000}, + {0x000081f4, 0x00000000}, + {0x000081f8, 0x00000000}, + {0x000081fc, 0x00000000}, + {0x00008200, 0x00000000}, + {0x00008204, 0x00000000}, + {0x00008208, 0x00000000}, + {0x0000820c, 0x00000000}, + {0x00008210, 0x00000000}, + {0x00008214, 0x00000000}, + {0x00008218, 0x00000000}, + {0x0000821c, 0x00000000}, + {0x00008220, 0x00000000}, + {0x00008224, 0x00000000}, + {0x00008228, 0x00000000}, + {0x0000822c, 0x00000000}, + {0x00008230, 0x00000000}, + {0x00008234, 0x00000000}, + {0x00008238, 0x00000000}, + {0x0000823c, 0x00000000}, + {0x00008240, 0x00100000}, + {0x00008244, 0x0010f400}, + {0x00008248, 0x00000100}, + {0x0000824c, 0x0001e800}, + {0x00008250, 0x00000000}, + {0x00008254, 0x00000000}, + {0x00008258, 0x00000000}, + {0x0000825c, 0x400000ff}, + {0x00008260, 0x00080922}, + {0x00008264, 0x88a00010}, + {0x00008270, 0x00000000}, + {0x00008274, 0x40000000}, + {0x00008278, 0x003e4180}, + {0x0000827c, 0x00000000}, + {0x00008284, 0x0000002c}, + {0x00008288, 0x0000002c}, + {0x0000828c, 0x000000ff}, + {0x00008294, 0x00000000}, + {0x00008298, 0x00000000}, + {0x0000829c, 0x00000000}, + {0x00008300, 0x00000040}, + {0x00008314, 0x00000000}, + {0x00008328, 0x00000000}, + {0x0000832c, 0x00000007}, + {0x00008330, 0x00000302}, + {0x00008334, 0x00000e00}, + {0x00008338, 0x00ff0000}, + {0x0000833c, 0x00000000}, + {0x00008340, 0x000107ff}, + {0x00008344, 0x01c81043}, + {0x00008360, 0xffffffff}, + {0x00008364, 0xffffffff}, + {0x00008368, 0x00000000}, + {0x00008370, 0x00000000}, + {0x00008374, 0x000000ff}, + {0x00008378, 0x00000000}, + {0x0000837c, 0x00000000}, + {0x00008380, 0xffffffff}, + {0x00008384, 0xffffffff}, + {0x00008390, 0x0fffffff}, + {0x00008394, 0x0fffffff}, + {0x00008398, 0x00000000}, + {0x0000839c, 0x00000000}, + {0x000083a0, 0x00000000}, + {0x00009808, 0x00000000}, + {0x0000980c, 0xafe68e30}, + {0x00009810, 0xfd14e000}, + {0x00009814, 0x9c0a9f6b}, + {0x0000981c, 0x00000000}, + {0x0000982c, 0x0000a000}, + {0x00009830, 0x00000000}, + {0x0000983c, 0x00200400}, + {0x0000984c, 0x0040233c}, + {0x0000a84c, 0x0040233c}, + {0x00009854, 0x00000044}, + {0x00009900, 0x00000000}, + {0x00009904, 0x00000000}, + {0x00009908, 0x00000000}, + {0x0000990c, 0x00000000}, + {0x00009910, 0x10002310}, + {0x0000991c, 0x10000fff}, + {0x00009920, 0x04900000}, + {0x0000a920, 0x04900000}, + {0x00009928, 0x00000001}, + {0x0000992c, 0x00000004}, + {0x00009930, 0x00000000}, + {0x0000a930, 0x00000000}, + {0x00009934, 0x1e1f2022}, + {0x00009938, 0x0a0b0c0d}, + {0x0000993c, 0x00000000}, + {0x00009948, 0x9280c00a}, + {0x0000994c, 0x00020028}, + {0x00009954, 0x5f3ca3de}, + {0x00009958, 0x0108ecff}, + {0x00009940, 0x14750604}, + {0x0000c95c, 0x004b6a8e}, + {0x00009970, 0x990bb514}, + {0x00009974, 0x00000000}, + {0x00009978, 0x00000001}, + {0x0000997c, 0x00000000}, + {0x000099a0, 0x00000000}, + {0x000099a4, 0x00000001}, + {0x000099a8, 0x201fff00}, + {0x000099ac, 0x0c6f0000}, + {0x000099b0, 0x03051000}, + {0x000099b4, 0x00000820}, + {0x000099c4, 0x06336f77}, + {0x000099c8, 0x6af6532f}, + {0x000099cc, 0x08f186c8}, + {0x000099d0, 0x00046384}, + {0x000099dc, 0x00000000}, + {0x000099e0, 0x00000000}, + {0x000099e4, 0xaaaaaaaa}, + {0x000099e8, 0x3c466478}, + {0x000099ec, 0x0cc80caa}, + {0x000099f0, 0x00000000}, + {0x000099fc, 0x00001042}, + {0x0000a208, 0x803e4788}, + {0x0000a210, 0x4080a333}, + {0x0000a214, 0x40206c10}, + {0x0000a218, 0x009c4060}, + {0x0000a220, 0x01834061}, + {0x0000a224, 0x00000400}, + {0x0000a228, 0x000003b5}, + {0x0000a22c, 0x233f7180}, + {0x0000a234, 0x20202020}, + {0x0000a238, 0x20202020}, + {0x0000a23c, 0x13c889af}, + {0x0000a240, 0x38490a20}, + {0x0000a244, 0x00000000}, + {0x0000a248, 0xfffffffc}, + {0x0000a24c, 0x00000000}, + {0x0000a254, 0x00000000}, + {0x0000a258, 0x0cdbd380}, + {0x0000a25c, 0x0f0f0f01}, + {0x0000a260, 0xdfa91f01}, + {0x0000a264, 0x00418a11}, + {0x0000b264, 0x00418a11}, + {0x0000a268, 0x00000000}, + {0x0000a26c, 0x0e79e5c6}, + {0x0000b26c, 0x0e79e5c6}, + {0x0000d270, 0x00820820}, + {0x0000a278, 0x1ce739ce}, + {0x0000a27c, 0x050701ce}, + {0x0000d35c, 0x07ffffef}, + {0x0000d360, 0x0fffffe7}, + {0x0000d364, 0x17ffffe5}, + {0x0000d368, 0x1fffffe4}, + {0x0000d36c, 0x37ffffe3}, + {0x0000d370, 0x3fffffe3}, + {0x0000d374, 0x57ffffe3}, + {0x0000d378, 0x5fffffe2}, + {0x0000d37c, 0x7fffffe2}, + {0x0000d380, 0x7f3c7bba}, + {0x0000d384, 0xf3307ff0}, + {0x0000a388, 0x0c000000}, + {0x0000a38c, 0x20202020}, + {0x0000a390, 0x20202020}, + {0x0000a394, 0x1ce739ce}, + {0x0000a398, 0x000001ce}, + {0x0000b398, 0x000001ce}, + {0x0000a39c, 0x00000001}, + {0x0000a3c8, 0x00000246}, + {0x0000a3cc, 0x20202020}, + {0x0000a3d0, 0x20202020}, + {0x0000a3d4, 0x20202020}, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu May 26 09:16:09 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 865D9106564A; Thu, 26 May 2011 09:16:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7605B8FC15; Thu, 26 May 2011 09:16:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q9G9sh052534; Thu, 26 May 2011 09:16:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q9G9di052532; Thu, 26 May 2011 09:16:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105260916.p4Q9G9di052532@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 09:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222302 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 09:16:09 -0000 Author: adrian Date: Thu May 26 09:16:09 2011 New Revision: 222302 URL: http://svn.freebsd.org/changeset/base/222302 Log: Merlin -> Kiwi Modified: head/sys/dev/ath/ath_hal/ah_devid.h Modified: head/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_devid.h Thu May 26 09:15:33 2011 (r222301) +++ head/sys/dev/ath/ath_hal/ah_devid.h Thu May 26 09:16:09 2011 (r222302) @@ -80,8 +80,8 @@ #define AR9280_DEVID_PCIE 0x002a /* AR9280 PCI-E Merlin */ #define AR9285_DEVID_PCIE 0x002b /* AR9285 PCI-E Kite */ #define AR2427_DEVID_PCIE 0x002c /* AR2427 PCI-E w/ 802.11n bonded out */ -#define AR9287_DEVID_PCI 0x002d /* AR9227 PCI Merlin */ -#define AR9287_DEVID_PCIE 0x002e /* AR9287 PCI-E Merlin */ +#define AR9287_DEVID_PCI 0x002d /* AR9227 PCI Kiwi */ +#define AR9287_DEVID_PCIE 0x002e /* AR9287 PCI-E Kiwi */ #define AR_SUBVENDOR_ID_NOG 0x0e11 /* No 11G subvendor ID */ #define AR_SUBVENDOR_ID_NEW_A 0x7065 /* Update device to new RD */ From owner-svn-src-head@FreeBSD.ORG Thu May 26 09:22:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70B04106564A; Thu, 26 May 2011 09:22:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF1D8FC13; Thu, 26 May 2011 09:22:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q9MxkE052772; Thu, 26 May 2011 09:22:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q9MxnF052770; Thu, 26 May 2011 09:22:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105260922.p4Q9MxnF052770@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 09:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222303 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 09:22:59 -0000 Author: adrian Date: Thu May 26 09:22:59 2011 New Revision: 222303 URL: http://svn.freebsd.org/changeset/base/222303 Log: Fix a bad merge from a previous commit. Modified: head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Modified: head/sys/dev/ath/ath_hal/ah_eeprom_9287.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Thu May 26 09:16:09 2011 (r222302) +++ head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Thu May 26 09:22:59 2011 (r222303) @@ -126,10 +126,12 @@ v9287EepromSet(struct ath_hal *ah, int p HAL_EEPROM_9287 *ee = AH_PRIVATE(ah)->ah_eeprom; switch (param) { - case AR_EEP_ANTGAINMAX_2: - ee->ee_antennaGainMax[1] = (int8_t) v; - return HAL_OK; - return HAL_EINVAL; + case AR_EEP_ANTGAINMAX_2: + ee->ee_antennaGainMax[1] = (int8_t) v; + return HAL_OK; + default: + return HAL_EINVAL; + } } static HAL_BOOL From owner-svn-src-head@FreeBSD.ORG Thu May 26 09:23:02 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CDBC1065674; Thu, 26 May 2011 09:23:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B99F8FC08; Thu, 26 May 2011 09:23:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q9N2pc052811; Thu, 26 May 2011 09:23:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q9N2XO052809; Thu, 26 May 2011 09:23:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105260923.p4Q9N2XO052809@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 May 2011 09:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222304 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 09:23:02 -0000 Author: mav Date: Thu May 26 09:23:01 2011 New Revision: 222304 URL: http://svn.freebsd.org/changeset/base/222304 Log: Marvell 88SE91xx controllers are known to report soft-reset completion without waiting for device readiness (or at least not updating FIS receive area in time). To workaround that, special quirk was added earlier to wait for the FIS receive area update. But it was found that under same PCI ID 0x91231b4b and revision 0x11 there are two completely different chip versions (firmware?): HBA and RAID. The problem is that RAID version in some cases, such as hot-plug, does not update FIS receive area at all! To workaround that, differentiate the chip versions by their capabilities, and, if RAID version found, skip FIS receive area update waiting and read device signature from the PxSIG register instead. This method doesn't work for HBA version when PMP attached, so keep using previous workaround there. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu May 26 09:22:59 2011 (r222303) +++ head/sys/dev/ahci/ahci.c Thu May 26 09:23:01 2011 (r222304) @@ -119,6 +119,7 @@ static struct { #define AHCI_Q_NOBSYRES 256 #define AHCI_Q_NOAA 512 #define AHCI_Q_NOCOUNT 1024 +#define AHCI_Q_ALTSIG 2048 } ahci_ids[] = { {0x43801002, 0x00, "ATI IXP600", 0}, {0x43901002, 0x00, "ATI IXP700", 0}, @@ -192,7 +193,7 @@ static struct { {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, - {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, + {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, @@ -398,6 +399,13 @@ ahci_attach(device_t dev) if (ctlr->caps & AHCI_CAP_EMS) ctlr->capsem = ATA_INL(ctlr->r_mem, AHCI_EM_CTL); ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); + + /* Identify and set separate quirks for HBA and RAID f/w Marvells. */ + if ((ctlr->quirks & AHCI_Q_NOBSYRES) && + (ctlr->quirks & AHCI_Q_ALTSIG) && + (ctlr->caps & AHCI_CAP_SPM) == 0) + ctlr->quirks &= ~AHCI_Q_NOBSYRES; + if (ctlr->quirks & AHCI_Q_1CH) { ctlr->caps &= ~AHCI_CAP_NPMASK; ctlr->ichannels &= 0x01; @@ -1764,7 +1772,7 @@ ahci_execute_transaction(struct ahci_slo struct ahci_cmd_list *clp; union ccb *ccb = slot->ccb; int port = ccb->ccb_h.target_id & 0x0f; - int fis_size, i; + int fis_size, i, softreset; uint8_t *fis = ch->dma.rfis + 0x40; uint8_t val; @@ -1791,17 +1799,20 @@ ahci_execute_transaction(struct ahci_slo if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) { if (ccb->ataio.cmd.control & ATA_A_RESET) { + softreset = 1; /* Kick controller into sane state */ ahci_stop(dev); ahci_clo(dev); ahci_start(dev, 0); clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY; } else { + softreset = 2; /* Prepare FIS receive area for check. */ for (i = 0; i < 20; i++) fis[i] = 0xff; } - } + } else + softreset = 0; clp->bytecount = 0; clp->cmd_table_phys = htole64(ch->dma.work_bus + AHCI_CT_OFFSET + (AHCI_CT_SIZE * slot->slot)); @@ -1825,8 +1836,7 @@ ahci_execute_transaction(struct ahci_slo ATA_OUTL(ch->r_mem, AHCI_P_CI, (1 << slot->slot)); /* Device reset commands doesn't interrupt. Poll them. */ if (ccb->ccb_h.func_code == XPT_ATA_IO && - (ccb->ataio.cmd.command == ATA_DEVICE_RESET || - (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL))) { + (ccb->ataio.cmd.command == ATA_DEVICE_RESET || softreset)) { int count, timeout = ccb->ccb_h.timeout * 100; enum ahci_err_type et = AHCI_ERR_NONE; @@ -1834,7 +1844,8 @@ ahci_execute_transaction(struct ahci_slo DELAY(10); if (!(ATA_INL(ch->r_mem, AHCI_P_CI) & (1 << slot->slot))) break; - if (ATA_INL(ch->r_mem, AHCI_P_TFD) & ATA_S_ERROR) { + if ((ATA_INL(ch->r_mem, AHCI_P_TFD) & ATA_S_ERROR) && + softreset != 1) { #if 0 device_printf(ch->dev, "Poll error on slot %d, TFD: %04x\n", @@ -1851,9 +1862,20 @@ ahci_execute_transaction(struct ahci_slo break; } } + + /* Marvell controllers do not wait for readyness. */ + if ((ch->quirks & AHCI_Q_NOBSYRES) && softreset == 2 && + et == AHCI_ERR_NONE) { + while ((val = fis[2]) & ATA_S_BUSY) { + DELAY(10); + if (count++ >= timeout) + break; + } + } + if (timeout && (count >= timeout)) { - device_printf(ch->dev, - "Poll timeout on slot %d\n", slot->slot); + device_printf(dev, "Poll timeout on slot %d port %d\n", + slot->slot, port); device_printf(dev, "is %08x cs %08x ss %08x " "rs %08x tfd %02x serr %08x\n", ATA_INL(ch->r_mem, AHCI_P_IS), @@ -1863,26 +1885,9 @@ ahci_execute_transaction(struct ahci_slo ATA_INL(ch->r_mem, AHCI_P_SERR)); et = AHCI_ERR_TIMEOUT; } - /* Marvell controllers do not wait for readyness. */ - if ((ch->quirks & AHCI_Q_NOBSYRES) && - (ccb->ccb_h.func_code == XPT_ATA_IO) && - (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && - (ccb->ataio.cmd.control & ATA_A_RESET) == 0) { - while ((val = fis[2]) & (ATA_S_BUSY | ATA_S_DRQ)) { - DELAY(10); - if (count++ >= timeout) { - device_printf(dev, "device is not " - "ready after soft-reset: " - "tfd = %08x\n", val); - et = AHCI_ERR_TIMEOUT; - break; - } - } - } + /* Kick controller into sane state and enable FBS. */ - if ((ccb->ccb_h.func_code == XPT_ATA_IO) && - (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && - (ccb->ataio.cmd.control & ATA_A_RESET) == 0) + if (softreset == 2) ch->eslots |= (1 << slot->slot); ahci_end_transaction(slot, et); return; @@ -1962,7 +1967,8 @@ ahci_timeout(struct ahci_slot *slot) return; } - device_printf(dev, "Timeout on slot %d\n", slot->slot); + device_printf(dev, "Timeout on slot %d port %d\n", + slot->slot, slot->ccb->ccb_h.target_id & 0x0f); device_printf(dev, "is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x\n", ATA_INL(ch->r_mem, AHCI_P_IS), ATA_INL(ch->r_mem, AHCI_P_CI), ATA_INL(ch->r_mem, AHCI_P_SACT), ch->rslots, @@ -2013,6 +2019,7 @@ ahci_end_transaction(struct ahci_slot *s union ccb *ccb = slot->ccb; struct ahci_cmd_list *clp; int lastto; + uint32_t sig; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -2050,6 +2057,20 @@ ahci_end_transaction(struct ahci_slot *s res->lba_high_exp = fis[10]; res->sector_count = fis[12]; res->sector_count_exp = fis[13]; + + /* + * Some weird controllers do not return signature in + * FIS receive area. Read it from PxSIG register. + */ + if ((ch->quirks & AHCI_Q_ALTSIG) && + (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && + (ccb->ataio.cmd.control & ATA_A_RESET) == 0) { + sig = ATA_INL(ch->r_mem, AHCI_P_SIG); + res->lba_high = sig >> 24; + res->lba_mid = sig >> 16; + res->lba_low = sig >> 8; + res->sector_count = sig; + } } else bzero(res, sizeof(*res)); if ((ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) == 0 && From owner-svn-src-head@FreeBSD.ORG Thu May 26 09:27:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 718931065689; Thu, 26 May 2011 09:27:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 565408FC19; Thu, 26 May 2011 09:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q9Rw8e052994; Thu, 26 May 2011 09:27:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q9RwaA052992; Thu, 26 May 2011 09:27:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105260927.p4Q9RwaA052992@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 09:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222305 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 09:27:58 -0000 Author: adrian Date: Thu May 26 09:27:58 2011 New Revision: 222305 URL: http://svn.freebsd.org/changeset/base/222305 Log: Add the AR9287 chip identification string. Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Thu May 26 09:23:01 2011 (r222304) +++ head/sys/dev/ath/ath_hal/ah.c Thu May 26 09:27:58 2011 (r222305) @@ -117,6 +117,8 @@ ath_hal_mac_name(struct ath_hal *ah) return "9280"; case AR_XSREV_VERSION_KITE: return "9285"; + case AR_XSREV_VERSION_KIWI: + return "9287"; } return "????"; } From owner-svn-src-head@FreeBSD.ORG Thu May 26 10:10:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB306106566B; Thu, 26 May 2011 10:10:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA25B8FC1B; Thu, 26 May 2011 10:10:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QAAAQ5054402; Thu, 26 May 2011 10:10:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QAAAJr054400; Thu, 26 May 2011 10:10:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105261010.p4QAAAJr054400@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 May 2011 10:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222306 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 10:10:11 -0000 Author: mav Date: Thu May 26 10:10:10 2011 New Revision: 222306 URL: http://svn.freebsd.org/changeset/base/222306 Log: Add Marvell 88SE9172 chip PCI ID. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu May 26 09:27:58 2011 (r222305) +++ head/sys/dev/ahci/ahci.c Thu May 26 10:10:10 2011 (r222306) @@ -195,6 +195,7 @@ static struct { {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, + {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, From owner-svn-src-head@FreeBSD.ORG Thu May 26 13:54:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BD221065672; Thu, 26 May 2011 13:54:07 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 715608FC13; Thu, 26 May 2011 13:54:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QDs7a8067195; Thu, 26 May 2011 13:54:07 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QDs7ro067192; Thu, 26 May 2011 13:54:07 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201105261354.p4QDs7ro067192@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 26 May 2011 13:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222307 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 13:54:07 -0000 Author: ray Date: Thu May 26 13:54:07 2011 New Revision: 222307 URL: http://svn.freebsd.org/changeset/base/222307 Log: Added myself as src committer. Approved by: adrian (mentor) Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu May 26 10:10:10 2011 (r222306) +++ head/share/misc/committers-src.dot Thu May 26 13:54:07 2011 (r222307) @@ -206,6 +206,7 @@ ps [label="Paul Saab\nps@FreeBSD.org\n20 qingli [label="Qing Li\nqingli@FreeBSD.org\n2005/04/13"] rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2007/01/31"] randi [label="Randi Harper\nrandi@FreeBSD.org\n2010/04/20"] +ray [label="Aleksandr Rybalko\nray@FreeBSD.org\n2011/05/25"] rdivacky [label="Roman Divacky\nrdivacky@FreeBSD.org\n2008/03/13"] remko [label="Remko Lodder\nremko@FreeBSD.org\n2007/02/23"] rik [label="Roman Kurakin\nrik@FreeBSD.org\n2003/12/18"] @@ -268,6 +269,8 @@ day1 -> rgrimes day1 -> alm day1 -> dg +adrian -> ray + andre -> qingli anholt -> jkim Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu May 26 10:10:10 2011 (r222306) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu May 26 13:54:07 2011 (r222307) @@ -266,6 +266,7 @@ 09/12 Weongyo Jeong born in Haman, Korea, 1980 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 +09/15 Aleksandr Rybalko born in Odessa, Ukraine, 1977 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 From owner-svn-src-head@FreeBSD.ORG Thu May 26 14:29:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8C1E1065741; Thu, 26 May 2011 14:29:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7C828FC1C; Thu, 26 May 2011 14:29:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QET5TJ068253; Thu, 26 May 2011 14:29:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QET5Im068248; Thu, 26 May 2011 14:29:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105261429.p4QET5Im068248@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 14:29: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: r222308 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 14:29:05 -0000 Author: adrian Date: Thu May 26 14:29:05 2011 New Revision: 222308 URL: http://svn.freebsd.org/changeset/base/222308 Log: Flesh out the TX power calibration for the AR9287. I'm assuming for now that the AR9287 is only open-loop TX power control (as mine is) so I've hard-coded the attach path to fail if the NIC is not open-loop. This greatly simplifies the TX calibration path and the amount of code which needs to be ported over. This still isn't complete - the rate calculation code still needs to be ported and it all needs to be glued together. Obtained from: Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Thu May 26 13:54:07 2011 (r222307) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Thu May 26 14:29:05 2011 (r222308) @@ -276,6 +276,17 @@ ar9287Attach(uint16_t devid, HAL_SOFTC s goto bad; } + /* + * We only implement open-loop TX power control + * for the AR9287 in this codebase. + */ + if (! ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL)) { + ath_hal_printf(ah, "[ath] AR9287 w/ closed-loop TX power control" + " isn't supported.\n"); + ecode = HAL_ENOTSUPP; + goto bad; + } + /* * Check whether the power table offset isn't the default. * This can occur with eeprom minor V21 or greater on Merlin. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c Thu May 26 13:54:07 2011 (r222307) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c Thu May 26 14:29:05 2011 (r222308) @@ -30,6 +30,7 @@ #include "ah_internal.h" #include "ah_eeprom_v14.h" +#include "ah_eeprom_9287.h" #include "ar9002/ar9280.h" #include "ar5416/ar5416reg.h" @@ -92,3 +93,74 @@ ar9287olcTemperatureCompensation(struct AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta); } } + +void +ar9287olcGetTxGainIndex(struct ath_hal *ah, + const struct ieee80211_channel *chan, + struct cal_data_op_loop_ar9287 *pRawDatasetOpLoop, + uint8_t *pCalChans, uint16_t availPiers, int8_t *pPwr) +{ + uint16_t idxL = 0, idxR = 0, numPiers; + HAL_BOOL match; + CHAN_CENTERS centers; + + ar5416GetChannelCenters(ah, chan, ¢ers); + + for (numPiers = 0; numPiers < availPiers; numPiers++) { + if (pCalChans[numPiers] == AR5416_BCHAN_UNUSED) + break; + } + + match = ath_ee_getLowerUpperIndex( + (uint8_t)FREQ2FBIN(centers.synth_center, IEEE80211_IS_CHAN_2GHZ(chan)), + pCalChans, numPiers, &idxL, &idxR); + + if (match) { + *pPwr = (int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0]; + } else { + *pPwr = ((int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0] + + (int8_t) pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2; + } +} + +void +ar9287olcSetPDADCs(struct ath_hal *ah, int32_t txPower, + uint16_t chain) +{ + uint32_t tmpVal; + uint32_t a; + + /* Enable OLPC for chain 0 */ + + tmpVal = OS_REG_READ(ah, 0xa270); + tmpVal = tmpVal & 0xFCFFFFFF; + tmpVal = tmpVal | (0x3 << 24); + OS_REG_WRITE(ah, 0xa270, tmpVal); + + /* Enable OLPC for chain 1 */ + + tmpVal = OS_REG_READ(ah, 0xb270); + tmpVal = tmpVal & 0xFCFFFFFF; + tmpVal = tmpVal | (0x3 << 24); + OS_REG_WRITE(ah, 0xb270, tmpVal); + + /* Write the OLPC ref power for chain 0 */ + + if (chain == 0) { + tmpVal = OS_REG_READ(ah, 0xa398); + tmpVal = tmpVal & 0xff00ffff; + a = (txPower)&0xff; + tmpVal = tmpVal | (a << 16); + OS_REG_WRITE(ah, 0xa398, tmpVal); + } + + /* Write the OLPC ref power for chain 1 */ + + if (chain == 1) { + tmpVal = OS_REG_READ(ah, 0xb398); + tmpVal = tmpVal & 0xff00ffff; + a = (txPower)&0xff; + tmpVal = tmpVal | (a << 16); + OS_REG_WRITE(ah, 0xb398, tmpVal); + } +} Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h Thu May 26 13:54:07 2011 (r222307) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h Thu May 26 14:29:05 2011 (r222308) @@ -21,5 +21,11 @@ extern void ar9287olcInit(struct ath_hal *ah); extern void ar9287olcTemperatureCompensation(struct ath_hal *ah); +extern void ar9287olcGetTxGainIndex(struct ath_hal *ah, + const struct ieee80211_channel *chan, + struct cal_data_op_loop_ar9287 *pRawDatasetOpLoop, + uint8_t *pCalChans, uint16_t availPiers, int8_t *pPwr); +extern void ar9287olcSetPDADCs(struct ath_hal *ah, + int32_t txPower, uint16_t chain); #endif /* __AR9287_OLC_H__ */ Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 13:54:07 2011 (r222307) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 14:29:05 2011 (r222308) @@ -33,13 +33,103 @@ #include "ar9002/ar9287phy.h" #include "ar9002/ar9287an.h" +#include "ar9002/ar9287_olc.h" #include "ar9002/ar9287_reset.h" +/* + * Set the TX power calibration table per-chain. + * + * This only supports open-loop TX power control for the AR9287. + */ +static void +ar9287SetPowerCalTable(struct ath_hal *ah, + const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset) +{ + struct cal_data_op_loop_ar9287 *pRawDatasetOpenLoop; + uint8_t *pCalBChans = NULL; + uint16_t pdGainOverlap_t2; + uint16_t numPiers = 0, i; + uint16_t numXpdGain, xpdMask; + uint16_t xpdGainValues[AR5416_NUM_PD_GAINS] = {0, 0, 0, 0}; + uint32_t regChainOffset; + HAL_EEPROM_9287 *ee = AH_PRIVATE(ah)->ah_eeprom; + struct ar9287_eeprom *pEepData = &ee->ee_base; + + xpdMask = pEepData->modalHeader.xpdGain; + + if ((pEepData->baseEepHeader.version & AR9287_EEP_VER_MINOR_MASK) >= + AR9287_EEP_MINOR_VER_2) + pdGainOverlap_t2 = pEepData->modalHeader.pdGainOverlap; + else + pdGainOverlap_t2 = (uint16_t)(MS(OS_REG_READ(ah, AR_PHY_TPCRG5), + AR_PHY_TPCRG5_PD_GAIN_OVERLAP)); + + /* Note: Kiwi should only be 2ghz.. */ + if (IEEE80211_IS_CHAN_2GHZ(chan)) { + pCalBChans = pEepData->calFreqPier2G; + numPiers = AR9287_NUM_2G_CAL_PIERS; + pRawDatasetOpenLoop = (struct cal_data_op_loop_ar9287 *)pEepData->calPierData2G[0]; + AH5416(ah)->initPDADC = pRawDatasetOpenLoop->vpdPdg[0][0]; + } + numXpdGain = 0; + + /* Calculate the value of xpdgains from the xpdGain Mask */ + for (i = 1; i <= AR5416_PD_GAINS_IN_MASK; i++) { + if ((xpdMask >> (AR5416_PD_GAINS_IN_MASK - i)) & 1) { + if (numXpdGain >= AR5416_NUM_PD_GAINS) + break; + xpdGainValues[numXpdGain] = + (uint16_t)(AR5416_PD_GAINS_IN_MASK-i); + numXpdGain++; + } + } + + OS_REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_NUM_PD_GAIN, + (numXpdGain - 1) & 0x3); + OS_REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_GAIN_1, + xpdGainValues[0]); + OS_REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_GAIN_2, + xpdGainValues[1]); + OS_REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_GAIN_3, + xpdGainValues[2]); + + for (i = 0; i < AR9287_MAX_CHAINS; i++) { + regChainOffset = i * 0x1000; + + if (pEepData->baseEepHeader.txMask & (1 << i)) { + int8_t txPower; + pRawDatasetOpenLoop = + (struct cal_data_op_loop_ar9287 *)pEepData->calPierData2G[i]; + ar9287olcGetTxGainIndex(ah, chan, + pRawDatasetOpenLoop, + pCalBChans, numPiers, + &txPower); + ar9287olcSetPDADCs(ah, txPower, i); + } + } + + *pTxPowerIndexOffset = 0; +} + HAL_BOOL ar9287SetTransmitPower(struct ath_hal *ah, const struct ieee80211_channel *chan, uint16_t *rfXpdGain) { + int16_t txPowerIndexOffset = 0; + /* XXX TODO */ + + /* Fetch per-rate power table for the given channel */ + + /* Set open-loop TX power control calibration */ + ar9287SetPowerCalTable(ah, chan, &txPowerIndexOffset); + + /* Calculate regulatory maximum power level */ + + /* Kiwi TX power starts at -5 dBm */ + + /* Write TX power registers */ + return AH_TRUE; } From owner-svn-src-head@FreeBSD.ORG Thu May 26 14:34:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3179D1065670; Thu, 26 May 2011 14:34:23 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2142E8FC0C; Thu, 26 May 2011 14:34:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QEYNQh068453; Thu, 26 May 2011 14:34:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QEYNdc068451; Thu, 26 May 2011 14:34:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105261434.p4QEYNdc068451@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 May 2011 14:34: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: r222309 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 14:34:23 -0000 Author: nwhitehorn Date: Thu May 26 14:34:22 2011 New Revision: 222309 URL: http://svn.freebsd.org/changeset/base/222309 Log: Add a missing isync. Modified: head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Thu May 26 14:29:05 2011 (r222308) +++ head/sys/powerpc/aim/trap_subr64.S Thu May 26 14:34:22 2011 (r222309) @@ -519,6 +519,7 @@ CNAME(trapexit): mfmsr %r3 andi. %r3,%r3,~PSL_EE@l mtmsr %r3 + isync /* Test AST pending: */ ld %r5,FRAME_SRR1+48(%r1) mtcr %r5 From owner-svn-src-head@FreeBSD.ORG Thu May 26 15:01:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5342A106566C; Thu, 26 May 2011 15:01:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 432328FC18; Thu, 26 May 2011 15:01:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QF1cWV069358; Thu, 26 May 2011 15:01:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QF1cla069356; Thu, 26 May 2011 15:01:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105261501.p4QF1cla069356@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 15:01: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: r222310 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 15:01:38 -0000 Author: adrian Date: Thu May 26 15:01:37 2011 New Revision: 222310 URL: http://svn.freebsd.org/changeset/base/222310 Log: Flesh out ar9287SetTransmitPower() based on the AR9285 routine. Hard-code the per-rate TX power at 5dBm for now so testing can be done. This passes initial TX testing in 11g mode (but, obviously, at 5dBm.) Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 14:34:22 2011 (r222309) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 15:01:37 2011 (r222310) @@ -111,26 +111,136 @@ ar9287SetPowerCalTable(struct ath_hal *a *pTxPowerIndexOffset = 0; } +/* + * Fetch the maximum TX power per rate. + * + * For now, this is hard-coded at 5dBm until this code has been ported + * from Atheros/ath9k and tested. + */ +static HAL_BOOL +ar9285SetPowerPerRateTable(struct ath_hal *ah, + struct ar9287_eeprom *pEepData, + const struct ieee80211_channel *chan, + int16_t *ratesArray, uint16_t cfgCtl, + uint16_t AntennaReduction, + uint16_t twiceMaxRegulatoryPower, + uint16_t powerLimit) +{ + int i; + + /* For now, set all tx power rates to 5 dBm */ + for (i = 0; i < Ar5416RateSize; i++) + ratesArray[i] = 10; + + return AH_TRUE; +} + +/* + * This is based off of the AR5416/AR9285 code and likely could + * be unified in the future. + */ HAL_BOOL ar9287SetTransmitPower(struct ath_hal *ah, const struct ieee80211_channel *chan, uint16_t *rfXpdGain) { - int16_t txPowerIndexOffset = 0; +#define POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) +#define N(a) (sizeof (a) / sizeof (a[0])) + + const struct modal_eep_ar9287_header *pModal; + struct ath_hal_5212 *ahp = AH5212(ah); + int16_t ratesArray[Ar5416RateSize]; + int16_t txPowerIndexOffset = 0; + uint8_t ht40PowerIncForPdadc = 2; + int i; + + uint16_t cfgCtl; + uint16_t powerLimit; + uint16_t twiceAntennaReduction; + uint16_t twiceMaxRegulatoryPower; + int16_t maxPower; + HAL_EEPROM_9287 *ee = AH_PRIVATE(ah)->ah_eeprom; + struct ar9287_eeprom *pEepData = &ee->ee_base; + + /* Setup info for the actual eeprom */ + OS_MEMZERO(ratesArray, sizeof(ratesArray)); + cfgCtl = ath_hal_getctl(ah, chan); + powerLimit = chan->ic_maxregpower * 2; + twiceAntennaReduction = chan->ic_maxantgain; + twiceMaxRegulatoryPower = AH_MIN(MAX_RATE_POWER, AH_PRIVATE(ah)->ah_powerLimit); + pModal = &pEepData->modalHeader; + HALDEBUG(ah, HAL_DEBUG_RESET, "%s Channel=%u CfgCtl=%u\n", + __func__,chan->ic_freq, cfgCtl ); - /* XXX TODO */ + /* XXX Assume Minor is v2 or later */ + ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; /* Fetch per-rate power table for the given channel */ + if (!ar9285SetPowerPerRateTable(ah, pEepData, chan, + &ratesArray[0],cfgCtl, + twiceAntennaReduction, + twiceMaxRegulatoryPower, powerLimit)) { + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: unable to set tx power per rate table\n", __func__); + return AH_FALSE; + } - /* Set open-loop TX power control calibration */ + /* Set TX power control calibration curves for each TX chain */ ar9287SetPowerCalTable(ah, chan, &txPowerIndexOffset); - /* Calculate regulatory maximum power level */ + /* Calculate maximum power level */ + maxPower = AH_MAX(ratesArray[rate6mb], ratesArray[rateHt20_0]); + maxPower = AH_MAX(maxPower, ratesArray[rate1l]); + + if (IEEE80211_IS_CHAN_HT40(chan)) + maxPower = AH_MAX(maxPower, ratesArray[rateHt40_0]); + + ahp->ah_tx6PowerInHalfDbm = maxPower; + AH_PRIVATE(ah)->ah_maxPowerLevel = maxPower; + ahp->ah_txPowerIndexOffset = txPowerIndexOffset; + + /* + * txPowerIndexOffset is set by the SetPowerTable() call - + * adjust the rate table (0 offset if rates EEPROM not loaded) + */ + /* XXX what about the pwrTableOffset? */ + for (i = 0; i < N(ratesArray); i++) { + ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]); + /* -5 dBm offset for Merlin and later; this includes Kiwi */ + ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2; + if (ratesArray[i] > AR5416_MAX_RATE_POWER) + ratesArray[i] = AR5416_MAX_RATE_POWER; + if (ratesArray[i] < 0) + ratesArray[i] = 0; + } - /* Kiwi TX power starts at -5 dBm */ +#ifdef AH_EEPROM_DUMP + ar5416PrintPowerPerRate(ah, ratesArray); +#endif + + /* + * Adjust the HT40 power to meet the correct target TX power + * for 40MHz mode, based on TX power curves that are established + * for 20MHz mode. + * + * XXX handle overflow/too high power level? + */ + if (IEEE80211_IS_CHAN_HT40(chan)) { + ratesArray[rateHt40_0] += ht40PowerIncForPdadc; + ratesArray[rateHt40_1] += ht40PowerIncForPdadc; + ratesArray[rateHt40_2] += ht40PowerIncForPdadc; + ratesArray[rateHt40_3] += ht40PowerIncForPdadc; + ratesArray[rateHt40_4] += ht40PowerIncForPdadc; + ratesArray[rateHt40_5] += ht40PowerIncForPdadc; + ratesArray[rateHt40_6] += ht40PowerIncForPdadc; + ratesArray[rateHt40_7] += ht40PowerIncForPdadc; + } - /* Write TX power registers */ + /* Write the TX power rate registers */ + ar5416WriteTxPowerRateRegisters(ah, chan, ratesArray); return AH_TRUE; +#undef POW_SM +#undef N } /* From owner-svn-src-head@FreeBSD.ORG Thu May 26 15:55:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 994D5106564A; Thu, 26 May 2011 15:55:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 899678FC19; Thu, 26 May 2011 15:55:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QFtRdu070981; Thu, 26 May 2011 15:55:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QFtRup070979; Thu, 26 May 2011 15:55:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105261555.p4QFtRup070979@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 15:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222312 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 15:55:27 -0000 Author: adrian Date: Thu May 26 15:55:27 2011 New Revision: 222312 URL: http://svn.freebsd.org/changeset/base/222312 Log: Bring over the AR5416 per-rate TX power code, modified to use the AR9287 EEPROM layout. The AR9287 only supports 2ghz, so I've removed the 5ghz code (but left the 5ghz edge flags in there for now) and hard-coded the 2ghz-only path. Whilst I'm there, fix a typo (ar9285->ar9287.) This meets basic TX throughput testing - iperf TX tests == 27-28mbit in 11g, matching the rest of my 11g kit. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 15:38:11 2011 (r222311) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 15:55:27 2011 (r222312) @@ -111,30 +111,220 @@ ar9287SetPowerCalTable(struct ath_hal *a *pTxPowerIndexOffset = 0; } + +/* XXX hard-coded values? */ +#define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 +#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 10 + /* - * Fetch the maximum TX power per rate. + * ar9287SetPowerPerRateTable * - * For now, this is hard-coded at 5dBm until this code has been ported - * from Atheros/ath9k and tested. + * Sets the transmit power in the baseband for the given + * operating channel and mode. + * + * This is like the v14 EEPROM table except the 5GHz code. */ static HAL_BOOL -ar9285SetPowerPerRateTable(struct ath_hal *ah, +ar9287SetPowerPerRateTable(struct ath_hal *ah, struct ar9287_eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *ratesArray, uint16_t cfgCtl, - uint16_t AntennaReduction, + uint16_t AntennaReduction, uint16_t twiceMaxRegulatoryPower, uint16_t powerLimit) { +#define N(a) (sizeof(a)/sizeof(a[0])) +/* Local defines to distinguish between extension and control CTL's */ +#define EXT_ADDITIVE (0x8000) +#define CTL_11A_EXT (CTL_11A | EXT_ADDITIVE) +#define CTL_11G_EXT (CTL_11G | EXT_ADDITIVE) +#define CTL_11B_EXT (CTL_11B | EXT_ADDITIVE) + + uint16_t twiceMaxEdgePower = AR5416_MAX_RATE_POWER; int i; + int16_t twiceLargestAntenna; + struct cal_ctl_data_ar9287 *rep; + CAL_TARGET_POWER_LEG targetPowerOfdm; + CAL_TARGET_POWER_LEG targetPowerCck = {0, {0, 0, 0, 0}}; + CAL_TARGET_POWER_LEG targetPowerOfdmExt = {0, {0, 0, 0, 0}}; + CAL_TARGET_POWER_LEG targetPowerCckExt = {0, {0, 0, 0, 0}}; + CAL_TARGET_POWER_HT targetPowerHt20; + CAL_TARGET_POWER_HT targetPowerHt40 = {0, {0, 0, 0, 0}}; + int16_t scaledPower, minCtlPower; + +#define SUB_NUM_CTL_MODES_AT_2G_40 3 /* excluding HT40, EXT-OFDM, EXT-CCK */ + static const uint16_t ctlModesFor11g[] = { + CTL_11B, CTL_11G, CTL_2GHT20, CTL_11B_EXT, CTL_11G_EXT, CTL_2GHT40 + }; + const uint16_t *pCtlMode; + uint16_t numCtlModes, ctlMode, freq; + CHAN_CENTERS centers; + + ar5416GetChannelCenters(ah, chan, ¢ers); + + /* Compute TxPower reduction due to Antenna Gain */ + + twiceLargestAntenna = AH_MAX( + pEepData->modalHeader.antennaGainCh[0], + pEepData->modalHeader.antennaGainCh[1]); + + twiceLargestAntenna = (int16_t)AH_MIN((AntennaReduction) - twiceLargestAntenna, 0); + + /* XXX setup for 5212 use (really used?) */ + ath_hal_eepromSet(ah, AR_EEP_ANTGAINMAX_2, twiceLargestAntenna); + + /* + * scaledPower is the minimum of the user input power level and + * the regulatory allowed power level + */ + scaledPower = AH_MIN(powerLimit, twiceMaxRegulatoryPower + twiceLargestAntenna); + + /* Reduce scaled Power by number of chains active to get to per chain tx power level */ + /* TODO: better value than these? */ + switch (owl_get_ntxchains(AH5416(ah)->ah_tx_chainmask)) { + case 1: + break; + case 2: + scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; + break; + case 3: + scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; + break; + default: + return AH_FALSE; /* Unsupported number of chains */ + } - /* For now, set all tx power rates to 5 dBm */ - for (i = 0; i < Ar5416RateSize; i++) - ratesArray[i] = 10; + scaledPower = AH_MAX(0, scaledPower); + /* Get target powers from EEPROM - our baseline for TX Power */ + /* XXX assume channel is 2ghz */ + if (1) { + /* Setup for CTL modes */ + numCtlModes = N(ctlModesFor11g) - SUB_NUM_CTL_MODES_AT_2G_40; /* CTL_11B, CTL_11G, CTL_2GHT20 */ + pCtlMode = ctlModesFor11g; + + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPowerCck, + AR9287_NUM_2G_CCK_TARGET_POWERS, &targetPowerCck, 4, AH_FALSE); + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPower2G, + AR9287_NUM_2G_20_TARGET_POWERS, &targetPowerOfdm, 4, AH_FALSE); + ar5416GetTargetPowers(ah, chan, pEepData->calTargetPower2GHT20, + AR9287_NUM_2G_20_TARGET_POWERS, &targetPowerHt20, 8, AH_FALSE); + + if (IEEE80211_IS_CHAN_HT40(chan)) { + numCtlModes = N(ctlModesFor11g); /* All 2G CTL's */ + + ar5416GetTargetPowers(ah, chan, pEepData->calTargetPower2GHT40, + AR9287_NUM_2G_40_TARGET_POWERS, &targetPowerHt40, 8, AH_TRUE); + /* Get target powers for extension channels */ + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPowerCck, + AR9287_NUM_2G_CCK_TARGET_POWERS, &targetPowerCckExt, 4, AH_TRUE); + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPower2G, + AR9287_NUM_2G_20_TARGET_POWERS, &targetPowerOfdmExt, 4, AH_TRUE); + } + } + + /* + * For MIMO, need to apply regulatory caps individually across dynamically + * running modes: CCK, OFDM, HT20, HT40 + * + * The outer loop walks through each possible applicable runtime mode. + * The inner loop walks through each ctlIndex entry in EEPROM. + * The ctl value is encoded as [7:4] == test group, [3:0] == test mode. + * + */ + for (ctlMode = 0; ctlMode < numCtlModes; ctlMode++) { + HAL_BOOL isHt40CtlMode = (pCtlMode[ctlMode] == CTL_5GHT40) || + (pCtlMode[ctlMode] == CTL_2GHT40); + if (isHt40CtlMode) { + freq = centers.ctl_center; + } else if (pCtlMode[ctlMode] & EXT_ADDITIVE) { + freq = centers.ext_center; + } else { + freq = centers.ctl_center; + } + + /* walk through each CTL index stored in EEPROM */ + for (i = 0; (i < AR9287_NUM_CTLS) && pEepData->ctlIndex[i]; i++) { + uint16_t twiceMinEdgePower; + + /* compare test group from regulatory channel list with test mode from pCtlMode list */ + if ((((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == pEepData->ctlIndex[i]) || + (((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == + ((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))) { + rep = &(pEepData->ctlData[i]); + twiceMinEdgePower = ar5416GetMaxEdgePower(freq, + rep->ctlEdges[owl_get_ntxchains(AH5416(ah)->ah_tx_chainmask) - 1], + IEEE80211_IS_CHAN_2GHZ(chan)); + if ((cfgCtl & ~CTL_MODE_M) == SD_NO_CTL) { + /* Find the minimum of all CTL edge powers that apply to this channel */ + twiceMaxEdgePower = AH_MIN(twiceMaxEdgePower, twiceMinEdgePower); + } else { + /* specific */ + twiceMaxEdgePower = twiceMinEdgePower; + break; + } + } + } + minCtlPower = (uint8_t)AH_MIN(twiceMaxEdgePower, scaledPower); + /* Apply ctl mode to correct target power set */ + switch(pCtlMode[ctlMode]) { + case CTL_11B: + for (i = 0; i < N(targetPowerCck.tPow2x); i++) { + targetPowerCck.tPow2x[i] = (uint8_t)AH_MIN(targetPowerCck.tPow2x[i], minCtlPower); + } + break; + case CTL_11A: + case CTL_11G: + for (i = 0; i < N(targetPowerOfdm.tPow2x); i++) { + targetPowerOfdm.tPow2x[i] = (uint8_t)AH_MIN(targetPowerOfdm.tPow2x[i], minCtlPower); + } + break; + case CTL_5GHT20: + case CTL_2GHT20: + for (i = 0; i < N(targetPowerHt20.tPow2x); i++) { + targetPowerHt20.tPow2x[i] = (uint8_t)AH_MIN(targetPowerHt20.tPow2x[i], minCtlPower); + } + break; + case CTL_11B_EXT: + targetPowerCckExt.tPow2x[0] = (uint8_t)AH_MIN(targetPowerCckExt.tPow2x[0], minCtlPower); + break; + case CTL_11A_EXT: + case CTL_11G_EXT: + targetPowerOfdmExt.tPow2x[0] = (uint8_t)AH_MIN(targetPowerOfdmExt.tPow2x[0], minCtlPower); + break; + case CTL_5GHT40: + case CTL_2GHT40: + for (i = 0; i < N(targetPowerHt40.tPow2x); i++) { + targetPowerHt40.tPow2x[i] = (uint8_t)AH_MIN(targetPowerHt40.tPow2x[i], minCtlPower); + } + break; + default: + return AH_FALSE; + break; + } + } /* end ctl mode checking */ + + /* Set rates Array from collected data */ + ar5416SetRatesArrayFromTargetPower(ah, chan, ratesArray, + &targetPowerCck, + &targetPowerCckExt, + &targetPowerOfdm, + &targetPowerOfdmExt, + &targetPowerHt20, + &targetPowerHt40); return AH_TRUE; +#undef EXT_ADDITIVE +#undef CTL_11A_EXT +#undef CTL_11G_EXT +#undef CTL_11B_EXT +#undef SUB_NUM_CTL_MODES_AT_5G_40 +#undef SUB_NUM_CTL_MODES_AT_2G_40 +#undef N } +#undef REDUCE_SCALED_POWER_BY_TWO_CHAIN +#undef REDUCE_SCALED_POWER_BY_THREE_CHAIN + /* * This is based off of the AR5416/AR9285 code and likely could * be unified in the future. @@ -175,7 +365,7 @@ ar9287SetTransmitPower(struct ath_hal *a ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; /* Fetch per-rate power table for the given channel */ - if (!ar9285SetPowerPerRateTable(ah, pEepData, chan, + if (! ar9287SetPowerPerRateTable(ah, pEepData, chan, &ratesArray[0],cfgCtl, twiceAntennaReduction, twiceMaxRegulatoryPower, powerLimit)) { From owner-svn-src-head@FreeBSD.ORG Thu May 26 16:27:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3252F106566C; Thu, 26 May 2011 16:27:01 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 240448FC0C; Thu, 26 May 2011 16:27:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QGR1K8071907; Thu, 26 May 2011 16:27:01 GMT (envelope-from will@svn.freebsd.org) Received: (from will@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QGR0uF071905; Thu, 26 May 2011 16:27:01 GMT (envelope-from will@svn.freebsd.org) Message-Id: <201105261627.p4QGR0uF071905@svn.freebsd.org> From: Will Andrews Date: Thu, 26 May 2011 16:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222313 - head/cddl/compat/opensolaris/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 16:27:01 -0000 Author: will Date: Thu May 26 16:27:00 2011 New Revision: 222313 URL: http://svn.freebsd.org/changeset/base/222313 Log: Close a race between libzfs and mountd when updating NFS exports. - Flush the file descriptor for the new ZFS exports file before sending a SIGHUP to mountd. Reviewed by: pjd Approved by: ken MFC after: 3 days Modified: head/cddl/compat/opensolaris/misc/fsshare.c Modified: head/cddl/compat/opensolaris/misc/fsshare.c ============================================================================== --- head/cddl/compat/opensolaris/misc/fsshare.c Thu May 26 15:55:27 2011 (r222312) +++ head/cddl/compat/opensolaris/misc/fsshare.c Thu May 26 16:27:00 2011 (r222313) @@ -223,6 +223,7 @@ out: error = errno; unlink(tmpfile); } else { + fflush(newfd); /* * Send SIGHUP to mountd, but unlock exports file later. */ From owner-svn-src-head@FreeBSD.ORG Thu May 26 16:52:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 145F2106566C; Thu, 26 May 2011 16:52:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05EFE8FC0A; Thu, 26 May 2011 16:52:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QGqbO1072654; Thu, 26 May 2011 16:52:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QGqbYt072652; Thu, 26 May 2011 16:52:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105261652.p4QGqbYt072652@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 16:52: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: r222314 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 16:52:38 -0000 Author: adrian Date: Thu May 26 16:52:37 2011 New Revision: 222314 URL: http://svn.freebsd.org/changeset/base/222314 Log: Add some open-loop TX power debugging for AR9287. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c Thu May 26 16:27:00 2011 (r222313) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c Thu May 26 16:52:37 2011 (r222314) @@ -70,6 +70,9 @@ ar9287olcTemperatureCompensation(struct rddata = OS_REG_READ(ah, AR_PHY_TX_PWRCTRL4); currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT); + HALDEBUG(ah, HAL_DEBUG_PERCAL, "%s: initPDADC=%d, currPDADC=%d\n", + __func__, AH5416(ah)->initPDADC, currPDADC); + if (AH5416(ah)->initPDADC == 0 || currPDADC == 0) { /* * Zero value indicates that no frames have been transmitted @@ -91,6 +94,8 @@ ar9287olcTemperatureCompensation(struct AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta); OS_REG_RMW_FIELD(ah, AR_PHY_CH1_TX_PWRCTRL11, AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta); + + HALDEBUG(ah, HAL_DEBUG_PERCAL, "%s: delta=%d\n", __func__, delta); } } From owner-svn-src-head@FreeBSD.ORG Thu May 26 16:55:44 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 668251065673; Thu, 26 May 2011 16:55:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 587628FC17; Thu, 26 May 2011 16:55:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QGtimY072793; Thu, 26 May 2011 16:55:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QGtiKu072791; Thu, 26 May 2011 16:55:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105261655.p4QGtiKu072791@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 16:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222315 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 16:55:44 -0000 Author: adrian Date: Thu May 26 16:55:44 2011 New Revision: 222315 URL: http://svn.freebsd.org/changeset/base/222315 Log: Make sure only two chains are calibrated for the AR9287. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Thu May 26 16:52:37 2011 (r222314) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Thu May 26 16:55:44 2011 (r222315) @@ -594,8 +594,8 @@ ar5416LoadNF(struct ath_hal *ah, const s if (AR_SREV_KITE(ah)) { /* Kite has only one chain */ chainmask = 0x9; - } else if (AR_SREV_MERLIN(ah)) { - /* Merlin has only two chains */ + } else if (AR_SREV_MERLIN(ah) || AR_SREV_KIWI(ah)) { + /* Merlin/Kiwi has only two chains */ chainmask = 0x1B; } else { chainmask = 0x3F; From owner-svn-src-head@FreeBSD.ORG Thu May 26 16:59:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 191E2106566B; Thu, 26 May 2011 16:59:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0298FC18; Thu, 26 May 2011 16:59:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QGxg3e073022; Thu, 26 May 2011 16:59:42 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QGxgKY073020; Thu, 26 May 2011 16:59:42 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105261659.p4QGxgKY073020@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 16:59: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: r222316 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 16:59:43 -0000 Author: adrian Date: Thu May 26 16:59:42 2011 New Revision: 222316 URL: http://svn.freebsd.org/changeset/base/222316 Log: Remove the three-chain scaled power check for the AR9287 - it isn't needed. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 16:55:44 2011 (r222315) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Thu May 26 16:59:42 2011 (r222316) @@ -114,7 +114,6 @@ ar9287SetPowerCalTable(struct ath_hal *a /* XXX hard-coded values? */ #define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 -#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 10 /* * ar9287SetPowerPerRateTable @@ -186,10 +185,6 @@ ar9287SetPowerPerRateTable(struct ath_ha break; case 2: scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; - break; - case 3: - scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; - break; default: return AH_FALSE; /* Unsupported number of chains */ } @@ -323,7 +318,6 @@ ar9287SetPowerPerRateTable(struct ath_ha } #undef REDUCE_SCALED_POWER_BY_TWO_CHAIN -#undef REDUCE_SCALED_POWER_BY_THREE_CHAIN /* * This is based off of the AR5416/AR9285 code and likely could From owner-svn-src-head@FreeBSD.ORG Thu May 26 17:02:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D2A2106564A; Thu, 26 May 2011 17:02:56 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EF968FC08; Thu, 26 May 2011 17:02:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QH2uII073179; Thu, 26 May 2011 17:02:56 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QH2u7R073177; Thu, 26 May 2011 17:02:56 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105261702.p4QH2u7R073177@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 26 May 2011 17:02: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: r222317 - head/sys/dev/uart X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 17:02:56 -0000 Author: marcel Date: Thu May 26 17:02:56 2011 New Revision: 222317 URL: http://svn.freebsd.org/changeset/base/222317 Log: Ignore MCR[6] during the probe to fix a false negative. Bit 6 of the MCR register on the Sunix Sun1699 chip tends to be set but doesn't seem to have a function. That is, FreeBSD just works (provided the correct RCLK is used) regardless. PR: kern/129663 Diagnostics: Eygene Ryabinkin MFC after: 3 days Modified: head/sys/dev/uart/uart_dev_ns8250.c Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Thu May 26 16:59:42 2011 (r222316) +++ head/sys/dev/uart/uart_dev_ns8250.c Thu May 26 17:02:56 2011 (r222317) @@ -242,8 +242,14 @@ ns8250_probe(struct uart_bas *bas) val = uart_getreg(bas, REG_IIR); if (val & 0x30) return (ENXIO); + /* + * Bit 6 of the MCR (= 0x40) appears to be 1 for the Sun1699 + * chip, but otherwise doesn't seem to have a function. In + * other words, uart(4) works regardless. Ignore that bit so + * the probe succeeds. + */ val = uart_getreg(bas, REG_MCR); - if (val & 0xe0) + if (val & 0xa0) return (ENXIO); return (0); From owner-svn-src-head@FreeBSD.ORG Thu May 26 18:22:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2FF4106564A; Thu, 26 May 2011 18:22:49 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4EC68FC08; Thu, 26 May 2011 18:22:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QIMnft075809; Thu, 26 May 2011 18:22:49 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QIMn0Y075807; Thu, 26 May 2011 18:22:49 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201105261822.p4QIMn0Y075807@svn.freebsd.org> From: Kirk McKusick Date: Thu, 26 May 2011 18:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222319 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 18:22:50 -0000 Author: mckusick Date: Thu May 26 18:22:49 2011 New Revision: 222319 URL: http://svn.freebsd.org/changeset/base/222319 Log: Raise the default blocksize for UFS/FFS filesystems from 16K to 32K and the default fragment size from 2K to 4K. The rational is that most disks are now running with 4K sectors. While they can (slowly) simulate 512-byte sectors by doing a read-modify-write, it is desirable to avoid this functionality. By raising the minimum filesystem allocation to 4K, the filesystem will never trigger the small sector emulation. Also, the growth of disk sizes has lead us to double the default block size about every ten years. The rise from 8K to 16K blocks was done in 2001. So, by the 10-year metric, the time has come for 32K blocks. Discussed at: May 2011 BSDCan Developer Summit Reference: http://wiki.freebsd.org/201105DevSummit/FileSystems Modified: head/sbin/newfs/newfs.h Modified: head/sbin/newfs/newfs.h ============================================================================== --- head/sbin/newfs/newfs.h Thu May 26 17:38:00 2011 (r222318) +++ head/sbin/newfs/newfs.h Thu May 26 18:22:49 2011 (r222319) @@ -47,8 +47,8 @@ * sectorsize <= DESFRAGSIZE <= DESBLKSIZE * DESBLKSIZE / DESFRAGSIZE <= 8 */ -#define DFL_FRAGSIZE 2048 -#define DFL_BLKSIZE 16384 +#define DFL_FRAGSIZE 4096 +#define DFL_BLKSIZE 32768 /* * Cylinder groups may have up to MAXBLKSPERCG blocks. The actual From owner-svn-src-head@FreeBSD.ORG Thu May 26 18:54:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27AD01065674; Thu, 26 May 2011 18:54:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5B0D8FC12; Thu, 26 May 2011 18:54:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QIs75N076715; Thu, 26 May 2011 18:54:07 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QIs7sE076712; Thu, 26 May 2011 18:54:07 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201105261854.p4QIs7sE076712@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 26 May 2011 18:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222320 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 18:54:08 -0000 Author: trasz Date: Thu May 26 18:54:07 2011 New Revision: 222320 URL: http://svn.freebsd.org/changeset/base/222320 Log: Fix support for RACCT_CORE by merging forgotten file. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Thu May 26 18:22:49 2011 (r222319) +++ head/sys/kern/kern_sig.c Thu May 26 18:54:07 2011 (r222320) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3173,14 +3174,15 @@ coredump(struct thread *td) * if it is larger than the limit. */ limit = (off_t)lim_cur(p, RLIMIT_CORE); - PROC_UNLOCK(p); - if (limit == 0) { + if (limit == 0 || racct_get_available(p, RACCT_CORE) == 0) { + PROC_UNLOCK(p); #ifdef AUDIT audit_proc_coredump(td, name, EFBIG); #endif free(name, M_TEMP); return (EFBIG); } + PROC_UNLOCK(p); restart: NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, name, td); From owner-svn-src-head@FreeBSD.ORG Thu May 26 19:49:32 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1501065677; Thu, 26 May 2011 19:49:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACC238FC17; Thu, 26 May 2011 19:49:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QJnWt9078402; Thu, 26 May 2011 19:49:32 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QJnWPU078396; Thu, 26 May 2011 19:49:32 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105261949.p4QJnWPU078396@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 19:49: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: r222322 - head/tools/tools/ath/ath_ee_9287_print X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 19:49:32 -0000 Author: adrian Date: Thu May 26 19:49:32 2011 New Revision: 222322 URL: http://svn.freebsd.org/changeset/base/222322 Log: Include an EEPROM dump program for the AR9287 EEPROM format. Added: head/tools/tools/ath/ath_ee_9287_print/ head/tools/tools/ath/ath_ee_9287_print/9287.c (contents, props changed) head/tools/tools/ath/ath_ee_9287_print/9287.h (contents, props changed) head/tools/tools/ath/ath_ee_9287_print/Makefile (contents, props changed) head/tools/tools/ath/ath_ee_9287_print/eeprom.c (contents, props changed) head/tools/tools/ath/ath_ee_9287_print/eeprom.h (contents, props changed) head/tools/tools/ath/ath_ee_9287_print/main.c (contents, props changed) Added: head/tools/tools/ath/ath_ee_9287_print/9287.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/ath_ee_9287_print/9287.c Thu May 26 19:49:32 2011 (r222322) @@ -0,0 +1,316 @@ +/* + * Copyright (c) 2010-2011 Adrian Chadd, Xenion Pty Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +typedef enum { + AH_FALSE = 0, /* NB: lots of code assumes false is zero */ + AH_TRUE = 1, +} HAL_BOOL; + +typedef enum { + HAL_OK = 0, /* No error */ +} HAL_STATUS; + +struct ath_hal; + +#include "ah_eeprom_v14.h" +#include "ah_eeprom_9287.h" + +void +eeprom_9287_base_print(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; + BASE_EEP_9287_HEADER *eh = &eep->ee_base.baseEepHeader; + int i; + + printf("| Version: 0x%.4x | Length: 0x%.4x | Checksum: 0x%.4x ", + eh->version, eh->length, eh->checksum); + printf("| CapFlags: 0x%.2x | eepMisc: 0x%.2x | RegDomain: 0x%.4x 0x%.4x | \n", + eh->opCapFlags, eh->eepMisc, eh->regDmn[0], eh->regDmn[1]); + printf("| MAC: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x ", + eh->macAddr[0], eh->macAddr[1], eh->macAddr[2], + eh->macAddr[3], eh->macAddr[4], eh->macAddr[5]); + printf("| RxMask: 0x%.2x | TxMask: 0x%.2x | RfSilent: 0x%.4x | btOptions: 0x%.4x |\n", + eh->rxMask, eh->txMask, eh->rfSilent, eh->blueToothOptions); + printf("| DeviceCap: 0x%.4x | binBuildNumber: %.8x | deviceType: 0x%.2x | openLoopPwrCntl 0x%.2x |\n", + eh->deviceCap, eh->binBuildNumber, eh->deviceType, eh->openLoopPwrCntl); + printf("| pwrTableOffset: %d | tempSensSlope: %d | tempSensSlopePalOn: %d |\n", + eh->pwrTableOffset, eh->tempSensSlope, eh->tempSensSlopePalOn); + + printf("Future:\n"); + for (i = 0; i < sizeof(eh->futureBase) / sizeof(uint16_t); i++) { + printf("0x%.2x ", eh->futureBase[i]); + } + printf("\n"); +} + +void +eeprom_9287_custdata_print(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; + uint8_t *custdata = (uint8_t *) &eep->ee_base.custData; + int i; + + printf("\n| Custdata: |\n"); + for (i = 0; i < 20; i++) { + printf("%s0x%.2x %s", + i % 16 == 0 ? "| " : "", + custdata[i], + i % 16 == 15 ? "|\n" : ""); + } + printf("\n"); +} + +void +eeprom_9287_modal_print(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; + MODAL_EEP_9287_HEADER *mh = &eep->ee_base.modalHeader; + int i; + + printf("| antCtrlCommon: 0x%.8x |\n", mh->antCtrlCommon); + printf("| switchSettling: 0x%.2x |\n", mh->switchSettling); + printf("| adcDesiredSize: %d |\n", mh->adcDesiredSize); + + for (i = 0; i < AR9287_MAX_CHAINS; i++) { + printf("| Chain %d:\n", i); + printf("| antCtrlChain: 0:0x%.4x |\n", mh->antCtrlChain[i]); + printf("| antennaGainCh: 0:0x%.2x |\n", mh->antennaGainCh[i]); + printf("| txRxAttenCh: 0:0x%.2x |\n", mh->txRxAttenCh[i]); + printf("| rxTxMarginCh: 0:0x%.2x |\n", mh->rxTxMarginCh[i]); + printf("| noiseFloorThresCh: 0:0x%.2x |\n", mh->noiseFloorThreshCh[i]); + printf("| iqCalICh: 0:0x%.2x |\n", mh->iqCalICh[i]); + printf("| iqCalQCh: 0:0x%.2x |\n", mh->iqCalQCh[i]); + printf("| bswAtten: 0:0x%.2x |\n", mh->bswAtten[i]); + printf("| bswMargin: 0:0x%.2x |\n", mh->bswMargin[i]); + printf("\n"); + } + + printf("| txEndToXpaOff: 0x%.2x | txEndToRxOn: 0x%.2x | txFrameToXpaOn: 0x%.2x |\n", + mh->txEndToXpaOff, mh->txEndToRxOn, mh->txFrameToXpaOn); + printf("| thres62: 0x%.2x\n", mh->thresh62); + printf("| xpdGain: 0x%.2x | xpd: 0x%.2x |\n", mh->xpdGain, mh->xpd); + + printf("| pdGainOverlap: 0x%.2x xpaBiasLvl: 0x%.2x |\n", mh->pdGainOverlap, mh->xpaBiasLvl); + printf("| txFrameToDataStart: 0x%.2x | txFrameToPaOn: 0x%.2x |\n", mh->txFrameToDataStart, mh->txFrameToPaOn); + printf("| ht40PowerIncForPdadc: 0x%.2x |\n", mh->ht40PowerIncForPdadc); + printf("| swSettleHt40: 0x%.2x |\n", mh->swSettleHt40); + + printf("| Modal Version: %.2x |\n", mh->version); + printf("| db1 = %d | db2 = %d |\n", mh->db1, mh->db2); + printf("| ob_cck = %d | ob_psk = %d | ob_qam = %d | ob_pal_off = %d |\n", + mh->ob_cck, mh->ob_psk, mh->ob_qam, mh->ob_pal_off); + + printf("| futureModal: "); + for (i = 0; i < sizeof(mh->futureModal) / sizeof(uint16_t); i++) { + printf("0x%.2x ", mh->futureModal[i]); + } + printf("\n"); + + /* and now, spur channels */ + for (i = 0; i < AR5416_EEPROM_MODAL_SPURS; i++) { + printf("| Spur %d: spurChan: 0x%.4x spurRangeLow: 0x%.2x spurRangeHigh: 0x%.2x |\n", + i, mh->spurChans[i].spurChan, + (int) mh->spurChans[i].spurRangeLow, + (int) mh->spurChans[i].spurRangeHigh); + } +} + +static void +eeprom_9287_print_caldata_oploop(struct cal_data_op_loop_ar9287 *f) +{ + int i, j; + + /* XXX flesh out the rest */ + for (i = 0; i < 2; i++) { + printf(" pwrPdg:"); + for (j = 0; j < 5; j++) { + printf("[%d][%d]=%d, ", i, j, f->pwrPdg[i][j]); + } + printf("\n"); + + printf(" vpdPdg:"); + for (j = 0; j < 5; j++) { + printf("[%d][%d]=%d, ", i, j, f->vpdPdg[i][j]); + } + printf("\n"); + + printf(" pcdac:"); + for (j = 0; j < 5; j++) { + printf("[%d][%d]=%d, ", i, j, f->pcdac[i][j]); + } + printf("\n"); + + printf(" empty:"); + for (j = 0; j < 5; j++) { + printf("[%d][%d]=%d, ", i, j, f->empty[i][j]); + } + printf("\n\n"); + } +} + +void +eeprom_9287_calfreqpiers_print(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; + int i, n; + + /* 2ghz cal piers */ + printf("calFreqPier2G: "); + for (i = 0; i < AR9287_NUM_2G_CAL_PIERS; i++) { + printf(" 0x%.2x ", eep->ee_base.calFreqPier2G[i]); + } + printf("|\n"); + + for (i = 0; i < AR9287_NUM_2G_CAL_PIERS; i++) { + if (eep->ee_base.calFreqPier2G[i] == 0xff) + continue; + printf("2Ghz Cal Pier %d\n", i); + for (n = 0; n < AR9287_MAX_CHAINS; n++) { + printf(" Chain %d:\n", n); + eeprom_9287_print_caldata_oploop((void *)&eep->ee_base.calPierData2G[n][i]); + } + } + + printf("\n"); +} + +/* XXX these should just reference the v14 print routines */ +static void +eeprom_v14_target_legacy_print(CAL_TARGET_POWER_LEG *l) +{ + int i; + if (l->bChannel == 0xff) + return; + printf(" bChannel: %d;", l->bChannel); + for (i = 0; i < 4; i++) { + printf(" %.2f", (float) l->tPow2x[i] / 2.0); + } + printf(" (dBm)\n"); +} + +static void +eeprom_v14_target_ht_print(CAL_TARGET_POWER_HT *l) +{ + int i; + if (l->bChannel == 0xff) + return; + printf(" bChannel: %d;", l->bChannel); + for (i = 0; i < 8; i++) { + printf(" %.2f", (float) l->tPow2x[i] / 2.0); + } + printf(" (dBm)\n"); +} + +void +eeprom_9287_print_targets(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; + int i; + + /* 2ghz rates */ + printf("2Ghz CCK:\n"); + for (i = 0; i < AR9287_NUM_2G_CCK_TARGET_POWERS; i++) { + eeprom_v14_target_legacy_print(&eep->ee_base.calTargetPowerCck[i]); + } + printf("2Ghz 11g:\n"); + for (i = 0; i < AR9287_NUM_2G_20_TARGET_POWERS; i++) { + eeprom_v14_target_legacy_print(&eep->ee_base.calTargetPower2G[i]); + } + printf("2Ghz HT20:\n"); + for (i = 0; i < AR9287_NUM_2G_20_TARGET_POWERS; i++) { + eeprom_v14_target_ht_print(&eep->ee_base.calTargetPower2GHT20[i]); + } + printf("2Ghz HT40:\n"); + for (i = 0; i < AR9287_NUM_2G_40_TARGET_POWERS; i++) { + eeprom_v14_target_ht_print(&eep->ee_base.calTargetPower2GHT40[i]); + } + +} + +static void +eeprom_9287_ctl_edge_print(struct cal_ctl_data_ar9287 *ctl) +{ + int i, j; + uint8_t pow, flag; + + for (i = 0; i < AR9287_MAX_CHAINS; i++) { + printf(" chain %d: ", i); + for (j = 0; j < AR9287_NUM_BAND_EDGES; j++) { + pow = ctl->ctlEdges[i][j].tPowerFlag & 0x3f; + flag = (ctl->ctlEdges[i][j].tPowerFlag & 0xc0) >> 6; + printf(" %d:pow=%d,flag=%.2x", j, pow, flag); + } + printf("\n"); + } +} + +void +eeprom_9287_ctl_print(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; + int i; + + for (i = 0; i < AR9287_NUM_CTLS; i++) { + if (eep->ee_base.ctlIndex[i] == 0) + continue; + printf("| ctlIndex: offset %d, value %d\n", i, eep->ee_base.ctlIndex[i]); + eeprom_9287_ctl_edge_print(&eep->ee_base.ctlData[i]); + } +} + +void +eeprom_9287_print_edges(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; + int i; + + printf("| eeNumCtls: %d\n", eep->ee_numCtls); + for (i = 0; i < NUM_EDGES*eep->ee_numCtls; i++) { + /* XXX is flag 8 or 32 bits? */ + printf("| edge %2d/%2d: rdEdge: %5d EdgePower: %.2f dBm Flag: 0x%.8x\n", + i / NUM_EDGES, i % NUM_EDGES, + eep->ee_rdEdgesPower[i].rdEdge, + (float) eep->ee_rdEdgesPower[i].twice_rdEdgePower / 2.0, + eep->ee_rdEdgesPower[i].flag); + + if (i % NUM_EDGES == (NUM_EDGES -1)) + printf("|\n"); + } +} + +void +eeprom_9287_print_other(uint16_t *buf) +{ + HAL_EEPROM_9287 *eep = (HAL_EEPROM_9287 *) buf; +} Added: head/tools/tools/ath/ath_ee_9287_print/9287.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/ath_ee_9287_print/9287.h Thu May 26 19:49:32 2011 (r222322) @@ -0,0 +1,15 @@ +/* $FreeBSD$ */ + +#ifndef __9287_H__ +#define __9287_H__ + +extern void eeprom_9287_base_print(uint16_t *buf); +extern void eeprom_9287_custdata_print(uint16_t *buf); +extern void eeprom_9287_modal_print(uint16_t *buf); +extern void eeprom_9287_calfreqpiers_print(uint16_t *buf); +extern void eeprom_9287_ctl_print(uint16_t *buf); +extern void eeprom_9287_print_targets(uint16_t *buf); +extern void eeprom_9287_print_edges(uint16_t *buf); +extern void eeprom_9287_print_other(uint16_t *buf); + +#endif Added: head/tools/tools/ath/ath_ee_9287_print/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/ath_ee_9287_print/Makefile Thu May 26 19:49:32 2011 (r222322) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal + +PROG= ath_ee_9287_print +SRCS= main.c eeprom.c 9287.c +NOMAN= yes +NO_MAN= yes + +.include <../Makefile.inc> + +.include Added: head/tools/tools/ath/ath_ee_9287_print/eeprom.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/ath_ee_9287_print/eeprom.c Thu May 26 19:49:32 2011 (r222322) @@ -0,0 +1,72 @@ + +/* + * Copyright (c) 2010-2011 Adrian Chadd, Xenion Pty Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#include "eeprom.h" + +void +load_eeprom_dump(const char *file, uint16_t *buf) +{ + unsigned int r[8]; + FILE *fp; + char b[1024]; + int i; + + fp = fopen(file, "r"); + if (!fp) + err(1, "fopen"); + + while (!feof(fp)) { + if (fgets(b, 1024, fp) == NULL) + break; + if (feof(fp)) + break; + if (strlen(b) > 0) + b[strlen(b)-1] = '\0'; + if (strlen(b) == 0) + break; + sscanf(b, "%x: %x %x %x %x %x %x %x %x\n", + &i, &r[0], &r[1], &r[2], &r[3], &r[4], + &r[5], &r[6], &r[7]); + buf[i++] = r[0]; + buf[i++] = r[1]; + buf[i++] = r[2]; + buf[i++] = r[3]; + buf[i++] = r[4]; + buf[i++] = r[5]; + buf[i++] = r[6]; + buf[i++] = r[7]; + } + fclose(fp); +} Added: head/tools/tools/ath/ath_ee_9287_print/eeprom.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/ath_ee_9287_print/eeprom.h Thu May 26 19:49:32 2011 (r222322) @@ -0,0 +1,8 @@ +/* $FreeBSD$ */ + +#ifndef __EEPROM_H__ +#define __EEPROM_H__ + +extern void load_eeprom_dump(const char *file, uint16_t *buf); + +#endif Added: head/tools/tools/ath/ath_ee_9287_print/main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/ath_ee_9287_print/main.c Thu May 26 19:49:32 2011 (r222322) @@ -0,0 +1,85 @@ + +/* + * Copyright (c) 2010-2011 Adrian Chadd, Xenion Pty Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#include "eeprom.h" +#include "9287.h" + +void +usage(char *argv[]) +{ + printf("Usage: %s \n", argv[0]); + printf("\n"); + printf(" The eeprom dump file is a text hexdump of an EEPROM.\n"); + printf(" The lines must be formatted as follows:\n"); + printf(" 0xAAAA: 0xDD 0xDD 0xDD 0xDD 0xDD 0xDD 0xDD 0xDD\n"); + printf(" where each line must have exactly eight data bytes.\n"); + exit(127); +} + +int +main(int argc, char *argv[]) +{ + uint16_t *eep = NULL; + eep = calloc(4096, sizeof(int16_t)); + + if (argc < 2) + usage(argv); + + load_eeprom_dump(argv[1], eep); + + eeprom_9287_base_print(eep); + eeprom_9287_custdata_print(eep); + printf("\n2.4ghz:\n"); + eeprom_9287_modal_print(eep); + printf("\n"); + + eeprom_9287_calfreqpiers_print(eep); + printf("\n"); + + eeprom_9287_print_targets(eep); + printf("\n"); + + eeprom_9287_ctl_print(eep); + printf("\n"); + + eeprom_9287_print_edges(eep); + printf("\n"); + + eeprom_9287_print_other(eep); + printf("\n"); + + free(eep); + exit(0); +} From owner-svn-src-head@FreeBSD.ORG Thu May 26 20:17:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA557106564A; Thu, 26 May 2011 20:17:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABA3D8FC19; Thu, 26 May 2011 20:17:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QKHxCY079259; Thu, 26 May 2011 20:17:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QKHxOB079257; Thu, 26 May 2011 20:17:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105262017.p4QKHxOB079257@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 20:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222323 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 20:17:59 -0000 Author: adrian Date: Thu May 26 20:17:59 2011 New Revision: 222323 URL: http://svn.freebsd.org/changeset/base/222323 Log: Revert this erroneous commit and re-disable the AR9285 combined antenna diversity. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c Thu May 26 19:49:32 2011 (r222322) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c Thu May 26 20:17:59 2011 (r222323) @@ -87,10 +87,8 @@ ar9285_check_div_comb(struct ath_hal *ah HAL_EEPROM_v4k *ee = AH_PRIVATE(ah)->ah_eeprom; const MODAL_EEP4K_HEADER *pModal = &ee->ee_base.modalHeader; -#if 0 /* For now, simply disable this until it's better debugged. -adrian */ return AH_FALSE; -#endif if (! AR_SREV_KITE(ah)) return AH_FALSE; From owner-svn-src-head@FreeBSD.ORG Thu May 26 20:22:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DAE3106566C; Thu, 26 May 2011 20:22:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EDA98FC13; Thu, 26 May 2011 20:22:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QKMALl079426; Thu, 26 May 2011 20:22:10 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QKMA9K079424; Thu, 26 May 2011 20:22:10 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105262022.p4QKMA9K079424@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 20:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222324 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 20:22:10 -0000 Author: adrian Date: Thu May 26 20:22:10 2011 New Revision: 222324 URL: http://svn.freebsd.org/changeset/base/222324 Log: Fix a macro name - it's currently unused in this file however, but keep it consistent with ar9280.c. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287.c Thu May 26 20:17:59 2011 (r222323) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287.c Thu May 26 20:22:10 2011 (r222324) @@ -36,7 +36,7 @@ struct ar9287State { RF_HAL_FUNCS base; /* public state, must be first */ uint16_t pcdacTable[1]; /* XXX */ }; -#define AR9280(ah) ((struct ar9287State *) AH5212(ah)->ah_rfHal) +#define AR9287(ah) ((struct ar9287State *) AH5212(ah)->ah_rfHal) static HAL_BOOL ar9287GetChannelMaxMinPower(struct ath_hal *, const struct ieee80211_channel *, int16_t *maxPow,int16_t *minPow); From owner-svn-src-head@FreeBSD.ORG Thu May 26 20:31:09 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 584D51065670; Thu, 26 May 2011 20:31:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7508FC08; Thu, 26 May 2011 20:31:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QKV99h079721; Thu, 26 May 2011 20:31:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QKV9u1079718; Thu, 26 May 2011 20:31:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105262031.p4QKV9u1079718@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 May 2011 20:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222325 - in head/sys: conf modules/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 20:31:09 -0000 Author: adrian Date: Thu May 26 20:31:08 2011 New Revision: 222325 URL: http://svn.freebsd.org/changeset/base/222325 Log: Introduce AR9287 support to the FreeBSD HAL. Modified: head/sys/conf/files head/sys/modules/ath/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu May 26 20:22:10 2011 (r222324) +++ head/sys/conf/files Thu May 26 20:31:08 2011 (r222325) @@ -604,6 +604,9 @@ dev/ath/ath_hal/ah_eeprom_v14.c \ dev/ath/ath_hal/ah_eeprom_v4k.c \ optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/ath_hal/ah_eeprom_9287.c \ + optional ath_hal | ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_regdomain.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # ar5210 @@ -651,111 +654,128 @@ dev/ath/ath_hal/ar5211/ar5211_xmit.c op # ar5212 dev/ath/ath_hal/ar5212/ar5212_ani.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_attach.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_beacon.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_eeprom.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_gpio.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_interrupts.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_keycache.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_misc.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_phy.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_power.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_recv.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_reset.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_rfgain.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_xmit.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5416 (depends on ar5212) dev/ath/ath_hal/ar5416/ar5416_ani.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_attach.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_beacon.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_iq.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_eeprom.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_gpio.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_interrupts.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_keycache.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_misc.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_phy.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_power.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_recv.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_reset.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_xmit.c \ - optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9130 (depends upon ar5416) - also requires AH_SUPPORT_AR9130 dev/ath/ath_hal/ar9001/ar9130_attach.c optional ath_hal | ath_ar9130 \ @@ -786,6 +806,16 @@ dev/ath/ath_hal/ar9002/ar9285_phy.c opti compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_diversity.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +# ar9287 (depends on ar5416) +dev/ath/ath_hal/ar9002/ar9287_attach.c optional ath_hal | ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar9002/ar9287_reset.c optional ath_hal | ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar9002/ar9287_cal.c optional ath_hal | ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar9002/ar9287_olc.c optional ath_hal | ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" + # rf backends dev/ath/ath_hal/ar5212/ar2316.c optional ath_rf2316 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" @@ -807,6 +837,8 @@ dev/ath/ath_hal/ar9002/ar9280.c optional compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar9002/ar9287.c optional ath_hal | ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ath rate control algorithms dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr \ compile-with "${NORMAL_C} -I$S/dev/ath" Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Thu May 26 20:22:10 2011 (r222324) +++ head/sys/modules/ath/Makefile Thu May 26 20:31:08 2011 (r222325) @@ -116,6 +116,12 @@ SRCS+= ar9280.c ar9280_attach.c ar9280_o SRCS+= ar9285.c ar9285_reset.c ar9285_attach.c ar9285_cal.c ar9285_phy.c SRCS+= ar9285_diversity.c +# + AR9287 - Kiwi +.PATH: ${.CURDIR}/../../dev/ath/ath_hal +SRCS+= ah_eeprom_9287.c +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9002 +SRCS+= ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c + # NB: rate control is bound to the driver by symbol names so only pick one .if ${ATH_RATE} == "sample" .PATH: ${.CURDIR}/../../dev/ath/ath_rate/sample From owner-svn-src-head@FreeBSD.ORG Thu May 26 20:32:33 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 951D71065675; Thu, 26 May 2011 20:32:33 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 867968FC16; Thu, 26 May 2011 20:32:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QKWXQ7079793; Thu, 26 May 2011 20:32:33 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QKWXxs079791; Thu, 26 May 2011 20:32:33 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201105262032.p4QKWXxs079791@svn.freebsd.org> From: Craig Rodrigues Date: Thu, 26 May 2011 20:32: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: r222326 - head/libexec/tftpd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 20:32:33 -0000 Author: rodrigc Date: Thu May 26 20:32:33 2011 New Revision: 222326 URL: http://svn.freebsd.org/changeset/base/222326 Log: Fix tftp_log() usage. Modified: head/libexec/tftpd/tftp-io.c Modified: head/libexec/tftpd/tftp-io.c ============================================================================== --- head/libexec/tftpd/tftp-io.c Thu May 26 20:31:08 2011 (r222325) +++ head/libexec/tftpd/tftp-io.c Thu May 26 20:32:33 2011 (r222326) @@ -262,7 +262,7 @@ send_rrq(int peer, char *filename, char n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_rrq: %s", n, strerror(errno)); + tftp_log(LOG_ERR, "send_rrq: %d %s", n, strerror(errno)); return (1); } return (0); From owner-svn-src-head@FreeBSD.ORG Thu May 26 20:47:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9578E1065670; Thu, 26 May 2011 20:47:05 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 866818FC13; Thu, 26 May 2011 20:47:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QKl5bl080254; Thu, 26 May 2011 20:47:05 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QKl5Y8080252; Thu, 26 May 2011 20:47:05 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105262047.p4QKl5Y8080252@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 26 May 2011 20:47: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: r222327 - head/sys/powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 20:47:05 -0000 Author: marcel Date: Thu May 26 20:47:05 2011 New Revision: 222327 URL: http://svn.freebsd.org/changeset/base/222327 Log: Don't assume we have a valid bootinfo pointer. Modified: head/sys/powerpc/booke/platform_bare.c Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Thu May 26 20:32:33 2011 (r222326) +++ head/sys/powerpc/booke/platform_bare.c Thu May 26 20:47:05 2011 (r222327) @@ -166,8 +166,11 @@ bare_timebase_freq(platform_t plat, stru phandle_t cpus, child; pcell_t freq; - /* Backward compatibility. See 8-STABLE. */ - ticks = bootinfo[3] >> 3; + if (bootinfo != NULL) { + /* Backward compatibility. See 8-STABLE. */ + ticks = bootinfo[3] >> 3; + } else + ticks = 0; if ((cpus = OF_finddevice("/cpus")) == 0) goto out; From owner-svn-src-head@FreeBSD.ORG Thu May 26 20:54:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A71DC106566C; Thu, 26 May 2011 20:54:45 +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 97E258FC12; Thu, 26 May 2011 20:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QKsjCC080498; Thu, 26 May 2011 20:54:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QKsjN3080496; Thu, 26 May 2011 20:54:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105262054.p4QKsjN3080496@svn.freebsd.org> From: John Baldwin Date: Thu, 26 May 2011 20:54: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: r222328 - head/sys/dev/puc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 20:54:45 -0000 Author: jhb Date: Thu May 26 20:54:45 2011 New Revision: 222328 URL: http://svn.freebsd.org/changeset/base/222328 Log: For Timedia multiport serial adapters, the first two ports use a SUN1889 which uses a non-standard clock (* 8) while any additional ports use SUN1699 chips which use a standard clock. Tested by: N.J. Mann njm of njm me uk MFC after: 1 week Modified: head/sys/dev/puc/pucdata.c Modified: head/sys/dev/puc/pucdata.c ============================================================================== --- head/sys/dev/puc/pucdata.c Thu May 26 20:47:05 2011 (r222327) +++ head/sys/dev/puc/pucdata.c Thu May 26 20:54:45 2011 (r222328) @@ -1292,6 +1292,12 @@ puc_config_timedia(struct puc_softc *sc, uint16_t subdev; switch (cmd) { + case PUC_CFG_GET_CLOCK: + if (port < 2) + *res = DEFAULT_RCLK * 8; + else + *res = DEFAULT_RCLK; + return (0); case PUC_CFG_GET_DESC: snprintf(desc, sizeof(desc), "Timedia technology %d Port Serial", (int)sc->sc_cfg_data); From owner-svn-src-head@FreeBSD.ORG Thu May 26 22:05:36 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24B781065675; Thu, 26 May 2011 22:05:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13EC68FC0C; Thu, 26 May 2011 22:05:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QM5Zwg082643; Thu, 26 May 2011 22:05:35 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QM5ZGO082641; Thu, 26 May 2011 22:05:35 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105262205.p4QM5ZGO082641@svn.freebsd.org> From: Rick Macklem Date: Thu, 26 May 2011 22:05: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: r222329 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 22:05:36 -0000 Author: rmacklem Date: Thu May 26 22:05:35 2011 New Revision: 222329 URL: http://svn.freebsd.org/changeset/base/222329 Log: Add a check for MNTK_UNMOUNTF at the beginning of nfs_sync() in the new NFS client so that a forced dismount doesn't get stuck in the VFS_SYNC() call that happens before VFS_UNMOUNT() in dounmount(). Additional changes are needed before forced dismounts will work. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Thu May 26 20:54:45 2011 (r222328) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Thu May 26 22:05:35 2011 (r222329) @@ -1458,10 +1458,20 @@ nfs_sync(struct mount *mp, int waitfor) td = curthread; + MNT_ILOCK(mp); + /* + * If a forced dismount is in progress, return from here so that + * the umount(2) syscall doesn't get stuck in VFS_SYNC() before + * calling VFS_UNMOUNT(). + */ + if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { + MNT_IUNLOCK(mp); + return (EBADF); + } + /* * Force stale buffer cache information to be flushed. */ - MNT_ILOCK(mp); loop: MNT_VNODE_FOREACH(vp, mp, mvp) { VI_LOCK(vp); From owner-svn-src-head@FreeBSD.ORG Thu May 26 22:29:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FDE6106566C; Thu, 26 May 2011 22:29:43 +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 8EB7D8FC17; Thu, 26 May 2011 22:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QMThdc083360; Thu, 26 May 2011 22:29:43 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QMThXS083358; Thu, 26 May 2011 22:29:43 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105262229.p4QMThXS083358@svn.freebsd.org> From: Xin LI Date: Thu, 26 May 2011 22:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222330 - head/sys/ofed/drivers/infiniband/ulp/ipoib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 22:29:43 -0000 Author: delphij Date: Thu May 26 22:29:43 2011 New Revision: 222330 URL: http://svn.freebsd.org/changeset/base/222330 Log: In ipoib_cm_handle_rx_wc(): Count incoming packets and bytes toward incoming counters. Reviewed by: jeff Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Thu May 26 22:05:35 2011 (r222329) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Thu May 26 22:29:43 2011 (r222330) @@ -554,8 +554,8 @@ void ipoib_cm_handle_rx_wc(struct ipoib_ ipoib_dma_mb(priv, mb, wc->byte_len); - ++dev->if_opackets; - dev->if_obytes += mb->m_pkthdr.len; + ++dev->if_ipackets; + dev->if_ibytes += mb->m_pkthdr.len; mb->m_pkthdr.rcvif = dev; proto = *mtod(mb, uint16_t *); From owner-svn-src-head@FreeBSD.ORG Thu May 26 23:56:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 874F1106566B; Thu, 26 May 2011 23:56:58 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7586A8FC0A; Thu, 26 May 2011 23:56:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QNuwlv086356; Thu, 26 May 2011 23:56:58 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QNuwbd086354; Thu, 26 May 2011 23:56:58 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201105262356.p4QNuwbd086354@svn.freebsd.org> From: Kirk McKusick Date: Thu, 26 May 2011 23:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222334 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 23:56:58 -0000 Author: mckusick Date: Thu May 26 23:56:58 2011 New Revision: 222334 URL: http://svn.freebsd.org/changeset/base/222334 Log: The check for whether a block is going to be claimed by a snapshot needs to happen before we notify the underlying layer that it is being freed. Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Thu May 26 23:30:28 2011 (r222333) +++ head/sys/ufs/ffs/ffs_alloc.c Thu May 26 23:56:58 2011 (r222334) @@ -1873,10 +1873,7 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size /* devvp is a normal disk device */ dev = devvp->v_rdev; cgblkno = fsbtodb(fs, cgtod(fs, cg)); - ASSERT_VOP_LOCKED(devvp, "ffs_blkfree"); - if ((devvp->v_vflag & VV_COPYONWRITE) && - ffs_snapblkfree(fs, devvp, bno, size, inum)) - return; + ASSERT_VOP_LOCKED(devvp, "ffs_blkfree_cg"); } #ifdef INVARIANTS if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 || @@ -2030,6 +2027,17 @@ ffs_blkfree(ump, fs, devvp, bno, size, i struct bio *bip; struct ffs_blkfree_trim_params *tp; + /* + * Check to see if a snapshot wants to claim the block. + * Check that devvp is a normal disk device, not a snapshot, + * it has a snapshot(s) associated with it, and one of the + * snapshots wants to claim the block. + */ + if (devvp->v_type != VREG && + (devvp->v_vflag & VV_COPYONWRITE) && + ffs_snapblkfree(fs, devvp, bno, size, inum)) { + return; + } if (!ump->um_candelete) { ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd); return; From owner-svn-src-head@FreeBSD.ORG Fri May 27 03:23:40 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630DA1065676; Fri, 27 May 2011 03:23:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF8D88FC17; Fri, 27 May 2011 03:23:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4R3Ndr0092824; Fri, 27 May 2011 03:23:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R3Nd6m092821; Fri, 27 May 2011 03:23:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105270323.p4R3Nd6m092821@svn.freebsd.org> From: Alexander Motin Date: Fri, 27 May 2011 03:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222336 - in head: share/examples/ses/srcs sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 03:23:40 -0000 Author: mav Date: Fri May 27 03:23:39 2011 New Revision: 222336 URL: http://svn.freebsd.org/changeset/base/222336 Log: Add names for few more SES element types according SES-2 specification. Modified: head/share/examples/ses/srcs/eltsub.c head/sys/cam/scsi/scsi_ses.h Modified: head/share/examples/ses/srcs/eltsub.c ============================================================================== --- head/share/examples/ses/srcs/eltsub.c Fri May 27 00:23:44 2011 (r222335) +++ head/share/examples/ses/srcs/eltsub.c Fri May 27 03:23:39 2011 (r222336) @@ -85,6 +85,9 @@ geteltnm(int type) case SESTYP_KEYPAD: sprintf(rbuf, "Key pad entry device"); break; + case SESTYP_ENCLOSURE: + sprintf(rbuf, "Enclosure"); + break; case SESTYP_SCSIXVR: sprintf(rbuf, "SCSI port/transceiver"); break; @@ -109,6 +112,15 @@ geteltnm(int type) case SESTYP_SUBENC: sprintf(rbuf, "Simple sub-enclosure"); break; + case SESTYP_ARRAY: + sprintf(rbuf, "Array device"); + break; + case SESTYP_SAS_EXP: + sprintf(rbuf, "SAS Expender"); + break; + case SESTYP_SAS_CONN: + sprintf(rbuf, "SAS Connector"); + break; default: (void) sprintf(rbuf, "", type); break; Modified: head/sys/cam/scsi/scsi_ses.h ============================================================================== --- head/sys/cam/scsi/scsi_ses.h Fri May 27 00:23:44 2011 (r222335) +++ head/sys/cam/scsi/scsi_ses.h Fri May 27 03:23:39 2011 (r222336) @@ -101,6 +101,7 @@ typedef struct { #define SESTYP_UPS 0x0b #define SESTYP_DISPLAY 0x0c #define SESTYP_KEYPAD 0x0d +#define SESTYP_ENCLOSURE 0x0e #define SESTYP_SCSIXVR 0x0f #define SESTYP_LANGUAGE 0x10 #define SESTYP_COMPORT 0x11 @@ -109,6 +110,9 @@ typedef struct { #define SESTYP_SCSI_TGT 0x14 #define SESTYP_SCSI_INI 0x15 #define SESTYP_SUBENC 0x16 +#define SESTYP_ARRAY 0x17 +#define SESTYP_SAS_EXP 0x18 +#define SESTYP_SAS_CONN 0x19 /* * Overall Enclosure Status From owner-svn-src-head@FreeBSD.ORG Fri May 27 03:27:28 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73FFC1065670; Fri, 27 May 2011 03:27:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 634D28FC13; Fri, 27 May 2011 03:27:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4R3RS4o092967; Fri, 27 May 2011 03:27:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R3RSNR092965; Fri, 27 May 2011 03:27:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105270327.p4R3RSNR092965@svn.freebsd.org> From: Alexander Motin Date: Fri, 27 May 2011 03:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222337 - head/share/examples X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 03:27:28 -0000 Author: mav Date: Fri May 27 03:27:28 2011 New Revision: 222337 URL: http://svn.freebsd.org/changeset/base/222337 Log: Add ses/srcs/eltsub.h to the list of files to be installed. It is required for user-level SES example tools build. Modified: head/share/examples/Makefile Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Fri May 27 03:23:39 2011 (r222336) +++ head/share/examples/Makefile Fri May 27 03:27:28 2011 (r222337) @@ -175,6 +175,7 @@ XFILES= BSD_daemon/FreeBSD.pfa \ ses/setobjstat/setobjstat.0 \ ses/srcs/chpmon.c \ ses/srcs/eltsub.c \ + ses/srcs/eltsub.h \ ses/srcs/getencstat.c \ ses/srcs/getnobj.c \ ses/srcs/getobjmap.c \ From owner-svn-src-head@FreeBSD.ORG Fri May 27 03:30:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAC12106564A; Fri, 27 May 2011 03:30:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9C888FC13; Fri, 27 May 2011 03:30:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4R3UNgT093087; Fri, 27 May 2011 03:30:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R3UNeO093085; Fri, 27 May 2011 03:30:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105270330.p4R3UNeO093085@svn.freebsd.org> From: Alexander Motin Date: Fri, 27 May 2011 03:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222338 - head/share/examples/ses/srcs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 03:30:23 -0000 Author: mav Date: Fri May 27 03:30:23 2011 New Revision: 222338 URL: http://svn.freebsd.org/changeset/base/222338 Log: Oops, fix typo in r222336. Modified: head/share/examples/ses/srcs/eltsub.c Modified: head/share/examples/ses/srcs/eltsub.c ============================================================================== --- head/share/examples/ses/srcs/eltsub.c Fri May 27 03:27:28 2011 (r222337) +++ head/share/examples/ses/srcs/eltsub.c Fri May 27 03:30:23 2011 (r222338) @@ -116,7 +116,7 @@ geteltnm(int type) sprintf(rbuf, "Array device"); break; case SESTYP_SAS_EXP: - sprintf(rbuf, "SAS Expender"); + sprintf(rbuf, "SAS Expander"); break; case SESTYP_SAS_CONN: sprintf(rbuf, "SAS Connector"); From owner-svn-src-head@FreeBSD.ORG Fri May 27 03:44:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFB4E1065672; Fri, 27 May 2011 03:44:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE5878FC0A; Fri, 27 May 2011 03:44:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4R3il0v093548; Fri, 27 May 2011 03:44:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R3ilJ2093545; Fri, 27 May 2011 03:44:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105270344.p4R3ilJ2093545@svn.freebsd.org> From: Alexander Motin Date: Fri, 27 May 2011 03:44: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: r222339 - in head: share/examples/ses/srcs sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 03:44:47 -0000 Author: mav Date: Fri May 27 03:44:47 2011 New Revision: 222339 URL: http://svn.freebsd.org/changeset/base/222339 Log: Change new constant names to ones used by OpenSolaris. Modified: head/share/examples/ses/srcs/eltsub.c head/sys/cam/scsi/scsi_ses.h Modified: head/share/examples/ses/srcs/eltsub.c ============================================================================== --- head/share/examples/ses/srcs/eltsub.c Fri May 27 03:30:23 2011 (r222338) +++ head/share/examples/ses/srcs/eltsub.c Fri May 27 03:44:47 2011 (r222339) @@ -115,10 +115,10 @@ geteltnm(int type) case SESTYP_ARRAY: sprintf(rbuf, "Array device"); break; - case SESTYP_SAS_EXP: + case SESTYP_SASEXPANDER: sprintf(rbuf, "SAS Expander"); break; - case SESTYP_SAS_CONN: + case SESTYP_SASCONNECTOR: sprintf(rbuf, "SAS Connector"); break; default: Modified: head/sys/cam/scsi/scsi_ses.h ============================================================================== --- head/sys/cam/scsi/scsi_ses.h Fri May 27 03:30:23 2011 (r222338) +++ head/sys/cam/scsi/scsi_ses.h Fri May 27 03:44:47 2011 (r222339) @@ -111,8 +111,8 @@ typedef struct { #define SESTYP_SCSI_INI 0x15 #define SESTYP_SUBENC 0x16 #define SESTYP_ARRAY 0x17 -#define SESTYP_SAS_EXP 0x18 -#define SESTYP_SAS_CONN 0x19 +#define SESTYP_SASEXPANDER 0x18 +#define SESTYP_SASCONNECTOR 0x19 /* * Overall Enclosure Status From owner-svn-src-head@FreeBSD.ORG Fri May 27 05:58:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE3C2106564A; Fri, 27 May 2011 05:58:10 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDF1A8FC15; Fri, 27 May 2011 05:58:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4R5wAUd097444; Fri, 27 May 2011 05:58:10 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R5wA7Z097442; Fri, 27 May 2011 05:58:10 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105270558.p4R5wA7Z097442@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 27 May 2011 05:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222340 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 05:58:11 -0000 Author: marcel Date: Fri May 27 05:58:10 2011 New Revision: 222340 URL: http://svn.freebsd.org/changeset/base/222340 Log: o Swap the SVR numbers for MPC8533 & MPC8533E o Add SVR defines for P1011(E), P1020(E), P2010(E) & P2020(E) Modified: head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Fri May 27 03:44:47 2011 (r222339) +++ head/sys/powerpc/include/spr.h Fri May 27 05:58:10 2011 (r222340) @@ -644,8 +644,8 @@ #define SPR_MCSRR1 0x23b /* ..8 571 Machine check SRR1 */ #define SPR_SVR 0x3ff /* ..8 1023 System Version Register */ -#define SVR_MPC8533 0x803c -#define SVR_MPC8533E 0x8034 +#define SVR_MPC8533 0x8034 +#define SVR_MPC8533E 0x803c #define SVR_MPC8541 0x8072 #define SVR_MPC8541E 0x807a #define SVR_MPC8548 0x8031 @@ -654,6 +654,14 @@ #define SVR_MPC8555E 0x8079 #define SVR_MPC8572 0x80e0 #define SVR_MPC8572E 0x80e8 +#define SVR_P1011 0x80e5 +#define SVR_P1011E 0x80ed +#define SVR_P1020 0x80e4 +#define SVR_P1020E 0x80ec +#define SVR_P2010 0x80e3 +#define SVR_P2010E 0x80eb +#define SVR_P2020 0x80e2 +#define SVR_P2020E 0x80ea #define SVR_VER(svr) (((svr) >> 16) & 0xffff) #define SPR_PID0 0x030 /* ..8 Process ID Register 0 */ From owner-svn-src-head@FreeBSD.ORG Fri May 27 06:37:42 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26C4106566C; Fri, 27 May 2011 06:37:42 +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 A2E508FC15; Fri, 27 May 2011 06:37:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4R6bg2b098596; Fri, 27 May 2011 06:37:42 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R6bgp1098594; Fri, 27 May 2011 06:37:42 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105270637.p4R6bgp1098594@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 27 May 2011 06:37: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: r222341 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 06:37:42 -0000 Author: ae Date: Fri May 27 06:37:42 2011 New Revision: 222341 URL: http://svn.freebsd.org/changeset/base/222341 Log: Some partitioning tools may have a different opinion about disk geometry and partitions may start from withing the first track. If we found such partitions, then do not reserve space of the first track, only first sector. Modified: head/sys/geom/part/g_part_mbr.c Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Fri May 27 05:58:10 2011 (r222340) +++ head/sys/geom/part/g_part_mbr.c Fri May 27 06:37:42 2011 (r222341) @@ -423,12 +423,13 @@ g_part_mbr_read(struct g_part_table *bas struct g_part_mbr_table *table; struct g_part_mbr_entry *entry; u_char *buf, *p; - off_t chs, msize; + off_t chs, msize, first; u_int sectors, heads; int error, index; pp = cp->provider; table = (struct g_part_mbr_table *)basetable; + first = basetable->gpt_sectors; msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); buf = g_read_data(cp, 0L, pp->sectorsize, &error); @@ -461,7 +462,8 @@ g_part_mbr_read(struct g_part_table *bas basetable->gpt_heads = heads; } } - + if (ent.dp_start < first) + first = ent.dp_start; entry = (struct g_part_mbr_entry *)g_part_new_entry(basetable, index + 1, ent.dp_start, ent.dp_start + ent.dp_size - 1); entry->ent = ent; @@ -471,6 +473,9 @@ g_part_mbr_read(struct g_part_table *bas basetable->gpt_first = basetable->gpt_sectors; basetable->gpt_last = msize - 1; + if (first < basetable->gpt_first) + basetable->gpt_first = 1; + g_free(buf); return (0); } From owner-svn-src-head@FreeBSD.ORG Fri May 27 08:34:31 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F8381065674; Fri, 27 May 2011 08:34:31 +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 6FABD8FC1E; Fri, 27 May 2011 08:34:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4R8YVJD007974; Fri, 27 May 2011 08:34:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R8YVS8007972; Fri, 27 May 2011 08:34:31 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201105270834.p4R8YVS8007972@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 27 May 2011 08:34: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: r222343 - head/sys/cddl/compat/opensolaris/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 08:34:31 -0000 Author: pjd Date: Fri May 27 08:34:31 2011 New Revision: 222343 URL: http://svn.freebsd.org/changeset/base/222343 Log: Silence warnings about unsupoorted value types. MFC after: 2 weeks Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c Fri May 27 07:38:58 2011 (r222342) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c Fri May 27 08:34:31 2011 (r222343) @@ -113,8 +113,10 @@ sysevent_add_attr(sysevent_attr_list_t * } break; default: +#if 0 printf("%s: type %d is not implemented\n", __func__, se_value->value_type); +#endif break; } @@ -286,8 +288,10 @@ log_sysevent(sysevent_t *evp, int flag, break; } default: +#if 0 printf("%s: type %d is not implemented\n", __func__, nvpair_type(elem)); +#endif break; } } From owner-svn-src-head@FreeBSD.ORG Fri May 27 08:42:41 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54F041065672; Fri, 27 May 2011 08:42:41 +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 0C3AD8FC08; Fri, 27 May 2011 08:42:39 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA04784; Fri, 27 May 2011 11:42:38 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QPscw-0003UM-9o; Fri, 27 May 2011 11:42:38 +0300 Message-ID: <4DDF63FD.8040205@FreeBSD.org> Date: Fri, 27 May 2011 11:42:37 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201105270834.p4R8YVS8007972@svn.freebsd.org> In-Reply-To: <201105270834.p4R8YVS8007972@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222343 - head/sys/cddl/compat/opensolaris/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 08:42:41 -0000 on 27/05/2011 11:34 Pawel Jakub Dawidek said the following: > Author: pjd > Date: Fri May 27 08:34:31 2011 > New Revision: 222343 > URL: http://svn.freebsd.org/changeset/base/222343 > > Log: > Silence warnings about unsupoorted value types. > > MFC after: 2 weeks BTW, I've just came with this patch for type 19 in particular, haven't even tested it yet :-) diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c b/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c index dea618c..12b9e22 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c @@ -157,26 +157,15 @@ sysevent_detach_attributes(sysevent_t *evp) ev->se_nvl = NULL; } -int -log_sysevent(sysevent_t *evp, int flag, sysevent_id_t *eid) +static void +print_nvlist_sbuf(nvlist_t *nvl, struct sbuf *sb, const char **type) { - struct sysevent *ev = (struct sysevent *)evp; - struct sbuf *sb; - const char *type; - char typestr[128]; nvpair_t *elem = NULL; - ASSERT(evp != NULL); - ASSERT(ev->se_nvl != NULL); - ASSERT(flag == SE_SLEEP); - ASSERT(eid != NULL); + if (type != NULL) + *type = NULL; - sb = sbuf_new_auto(); - if (sb == NULL) - return (SE_ENOMEM); - type = NULL; - - while ((elem = nvlist_next_nvpair(ev->se_nvl, elem)) != NULL) { + while ((elem = nvlist_next_nvpair(nvl, elem)) != NULL) { switch (nvpair_type(elem)) { case DATA_TYPE_BOOLEAN: { @@ -237,13 +226,24 @@ log_sysevent(sysevent_t *evp, int flag, sysevent_id_t *eid) (void) nvpair_value_string(elem, &value); sbuf_printf(sb, " %s=%s", nvpair_name(elem), value); - if (strcmp(FM_CLASS, nvpair_name(elem)) == 0) - type = value; + if (type != NULL && + strcmp(FM_CLASS, nvpair_name(elem)) == 0) + *type = value; + break; + } + case DATA_TYPE_NVLIST: + { + nvlist_t *value; + + (void) nvpair_value_nvlist(elem, &value); + sbuf_printf(sb, " %s=[", nvpair_name(elem)); + print_nvlist_sbuf(value, sb, NULL); + sbuf_printf(sb, "]"); break; } case DATA_TYPE_UINT8_ARRAY: { - uint8_t *value; + uint8_t *value; uint_t ii, nelem; (void) nvpair_value_uint8_array(elem, &value, &nelem); @@ -254,7 +254,7 @@ log_sysevent(sysevent_t *evp, int flag, sysevent_id_t *eid) } case DATA_TYPE_UINT16_ARRAY: { - uint16_t *value; + uint16_t *value; uint_t ii, nelem; (void) nvpair_value_uint16_array(elem, &value, &nelem); @@ -265,7 +265,7 @@ log_sysevent(sysevent_t *evp, int flag, sysevent_id_t *eid) } case DATA_TYPE_UINT32_ARRAY: { - uint32_t *value; + uint32_t *value; uint_t ii, nelem; (void) nvpair_value_uint32_array(elem, &value, &nelem); @@ -276,7 +276,7 @@ log_sysevent(sysevent_t *evp, int flag, sysevent_id_t *eid) } case DATA_TYPE_UINT64_ARRAY: { - uint64_t *value; + uint64_t *value; uint_t ii, nelem; (void) nvpair_value_uint64_array(elem, &value, &nelem); @@ -291,6 +291,26 @@ log_sysevent(sysevent_t *evp, int flag, sysevent_id_t *eid) break; } } +} + +int +log_sysevent(sysevent_t *evp, int flag, sysevent_id_t *eid) +{ + struct sysevent *ev = (struct sysevent *)evp; + struct sbuf *sb; + const char *type; + char typestr[128]; + + ASSERT(evp != NULL); + ASSERT(ev->se_nvl != NULL); + ASSERT(flag == SE_SLEEP); + ASSERT(eid != NULL); + + sb = sbuf_new_auto(); + if (sb == NULL) + return (SE_ENOMEM); + + print_nvlist_sbuf(ev->se_nvl, sb, &type); if (sbuf_finish(sb) != 0) { sbuf_delete(sb); -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Fri May 27 10:40:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75DB9106566B; Fri, 27 May 2011 10:40:34 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 660AF8FC08; Fri, 27 May 2011 10:40:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RAeYx5020134; Fri, 27 May 2011 10:40:34 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RAeY0q020132; Fri, 27 May 2011 10:40:34 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201105271040.p4RAeY0q020132@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 27 May 2011 10:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222354 - head/lib/libc/iconv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 10:40:34 -0000 Author: gabor Date: Fri May 27 10:40:34 2011 New Revision: 222354 URL: http://svn.freebsd.org/changeset/base/222354 Log: - Move some internal functions to the private namespace Submitted by: kan Approved by: delphij (mentor) Modified: head/lib/libc/iconv/Symbol.map Modified: head/lib/libc/iconv/Symbol.map ============================================================================== --- head/lib/libc/iconv/Symbol.map Fri May 27 10:08:26 2011 (r222353) +++ head/lib/libc/iconv/Symbol.map Fri May 27 10:40:34 2011 (r222354) @@ -6,6 +6,18 @@ FBSD_1.2 { __iconv; __iconv_free_list; __iconv_get_list; + _libiconv_version; + iconv_canonicalize; + libiconv; + libiconv_close; + libiconv_open; + libiconv_open_into; + libiconv_set_relocation_prefix; + libiconvctl; + libiconvlist; +}; + +FBSDprivate_1.0 { _citrus_bcs_convert_to_lower; _citrus_bcs_convert_to_upper; _citrus_bcs_isalnum; @@ -89,13 +101,4 @@ FBSD_1.2 { _citrus_stdenc_close; _citrus_stdenc_open; _citrus_unmap_file; - _libiconv_version; - iconv_canonicalize; - libiconv; - libiconv_close; - libiconv_open; - libiconv_open_into; - libiconv_set_relocation_prefix; - libiconvctl; - libiconvlist; }; From owner-svn-src-head@FreeBSD.ORG Fri May 27 14:24:53 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7622A106564A; Fri, 27 May 2011 14:24:53 +0000 (UTC) (envelope-from pluknet@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 EE7EC8FC1A; Fri, 27 May 2011 14:24:52 +0000 (UTC) Received: by qwc9 with SMTP id 9so1216142qwc.13 for ; Fri, 27 May 2011 07:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=vz33MbO2tMzwYTuNsOMjQbt0mMHb7+nz/cjpoyBSmNc=; b=TQy1pksOjEyQaikJoREMyj1q2ZYmrIZHHSziqkw1xWY45FiDPly1N5n0KHVNlOAZwr SXc5PK+ZnVimarVLyKnnz5lymu8LSUOHkdusqDo5Kesh8qiSOvYQZhmmWwH/2mRjkvN8 8UrDMstkpvOWZyV0Ztyad5C9871HqFXV4ayTs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=hdn/tp9y+jEoejU6o7x6R/fS9MknSgndCP4I8QczTIyRr/1hMlC+ysF/ab4fsBBV84 xXhKkM37UO13xLg54KpdFIWRYmvAKlnDlLOcjELW9nXi+bwFN3mBaSt+WLcA1VAsKdd8 43ktRZCiFKUSt6McU7p92h9jPG5Zf3IolvidM= MIME-Version: 1.0 Received: by 10.229.71.77 with SMTP id g13mr1617125qcj.116.1306506291987; Fri, 27 May 2011 07:24:51 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.229.86.133 with HTTP; Fri, 27 May 2011 07:24:51 -0700 (PDT) In-Reply-To: <4DD80A22.3090300@FreeBSD.org> References: <201105201703.p4KH3NrR093036@svn.freebsd.org> <4DD80A22.3090300@FreeBSD.org> Date: Fri, 27 May 2011 18:24:51 +0400 X-Google-Sender-Auth: 4rpgjaHjqAQSqchVZnft74_BKlE Message-ID: From: Sergey Kandaurov To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222136 - head/usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 14:24:53 -0000 On 21 May 2011 22:53, Doug Barton wrote: > On 05/20/2011 10:09, Sergey Kandaurov wrote: >> >> There's still a lot of warnings but all of them reside in contrib part. > > That doesn't mean that they shouldn't be fixed. :) The great thing about the > way that the contrib sources are arranged in svn is that we can fix things > in src/contrib with no concern to any "costs" imposed by the VCS. I'm afraid it makes no sense until we finish with importing top-3.8b1. Most warnings are fixed in this version itself, and Edwin did a good job in the past porting it to FreeBSD. -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Fri May 27 14:30:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30BA106566B; Fri, 27 May 2011 14:30:13 +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 8947E8FC16; Fri, 27 May 2011 14:30:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4REUD6H039398; Fri, 27 May 2011 14:30:13 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4REUD5l039395; Fri, 27 May 2011 14:30:13 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105271430.p4REUD5l039395@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 27 May 2011 14:30: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: r222357 - head/sbin/geom/class/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 14:30:13 -0000 Author: ae Date: Fri May 27 14:30:13 2011 New Revision: 222357 URL: http://svn.freebsd.org/changeset/base/222357 Log: Synchronize manpage's synopsis with program's usage. Since -l and -r keys are mutually exclusive for the `gpart show` command, then mark them so. Requested by: ru Modified: head/sbin/geom/class/part/geom_part.c head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Fri May 27 14:27:28 2011 (r222356) +++ head/sbin/geom/class/part/geom_part.c Fri May 27 14:30:13 2011 (r222357) @@ -101,7 +101,7 @@ struct g_command PUBSYM(class_commands)[ { 'l', "label", G_VAL_OPTIONAL, G_TYPE_STRING }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "[-a alignment] [-b start] [-s size] -t type [-i index] " + "-t type [-a alignment] [-b start] [-s size] [-i index] " "[-l label] [-f flags] geom" }, { "backup", 0, gpart_backup, G_NULL_OPTS, @@ -113,7 +113,7 @@ struct g_command PUBSYM(class_commands)[ { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "[-b bootcode] [-p partcode] [-i index] [-f flags] geom" + "[-b bootcode] [-p partcode -i index] [-f flags] geom" }, { "commit", 0, gpart_issue, G_NULL_OPTS, "geom" @@ -157,7 +157,7 @@ struct g_command PUBSYM(class_commands)[ { 'r', "show_rawtype", NULL, G_TYPE_BOOL }, { 'p', "show_providers", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-lrp] [geom ...]" + "[-l | -r] [-p] [geom ...]" }, { "undo", 0, gpart_issue, G_NULL_OPTS, "geom" @@ -175,7 +175,7 @@ struct g_command PUBSYM(class_commands)[ { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "[-a alignment] [-s size] -i index [-f flags] geom" + "-i index [-a alignment] [-s size] [-f flags] geom" }, { "restore", 0, gpart_restore, { { 'F', "force", NULL, G_TYPE_BOOL }, Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Fri May 27 14:27:28 2011 (r222356) +++ head/sbin/geom/class/part/gpart.8 Fri May 27 14:30:13 2011 (r222357) @@ -170,7 +170,8 @@ utility: .\" ==== SHOW ==== .Nm .Cm show -.Op Fl lrp +.Op Fl l | Fl r +.Op Fl p .Op Ar geom ... .\" ==== UNDO ==== .Nm From owner-svn-src-head@FreeBSD.ORG Fri May 27 15:29:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6CAF106566B; Fri, 27 May 2011 15:29:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C61858FC08; Fri, 27 May 2011 15:29:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RFTdb4041317; Fri, 27 May 2011 15:29:39 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RFTdY2041315; Fri, 27 May 2011 15:29:39 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105271529.p4RFTdY2041315@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 27 May 2011 15:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222359 - head/sbin/geom/class/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 15:29:39 -0000 Author: ae Date: Fri May 27 15:29:39 2011 New Revision: 222359 URL: http://svn.freebsd.org/changeset/base/222359 Log: Add example how to create MBR and BSD schemes and install boot code. Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Fri May 27 14:30:19 2011 (r222358) +++ head/sbin/geom/class/part/gpart.8 Fri May 27 15:29:39 2011 (r222359) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 03, 2011 +.Dd May 27, 2011 .Dt GPART 8 .Os .Sh NAME @@ -842,6 +842,33 @@ partition that would contain UFS where t /sbin/gpart add -b 162 -s 1048576 -t freebsd-ufs ad0 .Ed .Pp +Create MBR scheme on +.Pa ada0 , +then create 30GB-sized FreeBSD slice, mark it active and +install boot0 boot manager: +.Bd -literal -offset indent +/sbin/gpart create -s MBR ada0 +/sbin/gpart add -t freebsd -s 30G ada0 +/sbin/gpart set -a active -i 1 ada0 +/sbin/gpart bootcode -b /boot/boot0 ada0 +.Ed +.Pp +Now create BSD scheme (BSD label) with ability to have up to 20 partitions: +.Bd -literal -offset indent +/sbin/gpart create -s BSD -n 20 ada0s1 +.Ed +.Pp +Create 1GB-sized UFS partition and 4GB-sized swap partition: +.Bd -literal -offset indent +/sbin/gpart add -t freebsd-ufs -s 1G ada0s1 +/sbin/gpart add -t freebsd-swap -s 4G ada0s1 +.Ed +.Pp +Install bootstrap code for the BSD label: +.Bd -literal -offset indent +/sbin/gpart bootcode -b /boot/boot ada0s1 +.Ed +.Pp Create VTOC8 scheme on .Pa da0 . .Bd -literal -offset indent From owner-svn-src-head@FreeBSD.ORG Fri May 27 15:56:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 368AD106564A; Fri, 27 May 2011 15:56:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C97D8FC18; Fri, 27 May 2011 15:56:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RFuDAP042176; Fri, 27 May 2011 15:56:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RFuDug042173; Fri, 27 May 2011 15:56:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105271556.p4RFuDug042173@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 27 May 2011 15:56: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: r222361 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 15:56:14 -0000 Author: jilles Date: Fri May 27 15:56:13 2011 New Revision: 222361 URL: http://svn.freebsd.org/changeset/base/222361 Log: sh: Fix unquoted $@/$* if IFS=''. If IFS is null, unquoted $@/$* should still expand to separate words. This differs from quoted $@ (which does not depend on IFS) in that pathname generation is performed and empty words are removed. Added: head/tools/regression/bin/sh/expansion/ifs4.0 (contents, props changed) Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Fri May 27 15:50:14 2011 (r222360) +++ head/bin/sh/expand.c Fri May 27 15:56:13 2011 (r222361) @@ -761,7 +761,8 @@ again: /* jump here after setting a vari break; record: recordregion(startloc, expdest - stackblock(), - varflags & VSQUOTE); + varflags & VSQUOTE || (ifsset() && ifsval()[0] == '\0' && + (*var == '@' || *var == '*'))); break; case VSPLUS: @@ -947,7 +948,9 @@ numvar: sep = ' '; for (ap = shellparam.p ; (p = *ap++) != NULL ; ) { strtodest(p, flag, subtype, quoted); - if (*ap && sep) + if (!*ap) + break; + if (sep || (flag & EXP_FULL && !quoted && **ap != '\0')) STPUTC(sep, expdest); } break; Added: head/tools/regression/bin/sh/expansion/ifs4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/ifs4.0 Fri May 27 15:56:13 2011 (r222361) @@ -0,0 +1,39 @@ +# $FreeBSD$ + +c=: e= s=' ' +failures='' +ok='' + +check_result() { + if [ "x$2" = "x$3" ]; then + ok=x$ok + else + failures=x$failures + echo "For $1, expected $3 actual $2" + fi +} + +IFS=' +' +set -- a b '' c +set -- $@ +check_result 'set -- $@' "($#)($1)($2)($3)($4)" "(3)(a)(b)(c)()" + +IFS='' +set -- a b '' c +set -- $@ +check_result 'set -- $@' "($#)($1)($2)($3)($4)" "(3)(a)(b)(c)()" + +set -- a b '' c +set -- $* +check_result 'set -- $*' "($#)($1)($2)($3)($4)" "(3)(a)(b)(c)()" + +set -- a b '' c +set -- "$@" +check_result 'set -- "$@"' "($#)($1)($2)($3)($4)" "(4)(a)(b)()(c)" + +set -- a b '' c +set -- "$*" +check_result 'set -- "$*"' "($#)($1)($2)($3)($4)" "(1)(abc)()()()" + +test "x$failures" = x From owner-svn-src-head@FreeBSD.ORG Fri May 27 16:00:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84130106566C; Fri, 27 May 2011 16:00:37 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72E7F8FC18; Fri, 27 May 2011 16:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RG0bP1042348; Fri, 27 May 2011 16:00:37 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RG0bMN042346; Fri, 27 May 2011 16:00:37 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105271600.p4RG0bMN042346@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 27 May 2011 16:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222362 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 16:00:37 -0000 Author: jilles Date: Fri May 27 16:00:37 2011 New Revision: 222362 URL: http://svn.freebsd.org/changeset/base/222362 Log: sh: Various updates to the TOUR document. Modified: head/bin/sh/TOUR Modified: head/bin/sh/TOUR ============================================================================== --- head/bin/sh/TOUR Fri May 27 15:56:13 2011 (r222361) +++ head/bin/sh/TOUR Fri May 27 16:00:37 2011 (r222362) @@ -27,10 +27,8 @@ programs is: mkbuiltins builtins builtins.h builtins.c mkinit *.c init.c mknodes nodetypes nodes.h nodes.c - mksignames - signames.h signames.c mksyntax - syntax.h syntax.c mktokens - token.h - bltin/mkexpr unary_op binary_op operators.h operators.c There are undoubtedly too many of these. Mkinit searches all the C source files for entries looking like: @@ -64,14 +62,6 @@ tion: Preprocessor #define statements are copied to init.c without any special action to request this. -INDENTATION: The ash source is indented in multiples of six -spaces. The only study that I have heard of on the subject con- -cluded that the optimal amount to indent is in the range of four -to six spaces. I use six spaces since it is not too big a jump -from the widely used eight spaces. If you really hate six space -indentation, use the adjind (source included) program to change -it to something else. - EXCEPTIONS: Code for dealing with exceptions appears in exceptions.c. The C language doesn't include exception handling, so I implement it using setjmp and longjmp. The global variable @@ -115,7 +105,7 @@ repeatedly parses and executes commands. OPTIONS.C: This file contains the option processing code. It is called from main to parse the shell arguments when the shell is -invoked, and it also contains the set builtin. The -i and -j op- +invoked, and it also contains the set builtin. The -i and -m op- tions (the latter turns on job control) require changes in signal handling. The routines setjobctl (in jobs.c) and setinteractive (in trap.c) are called to handle changes to these options. @@ -123,10 +113,11 @@ handling. The routines setjobctl (in jo PARSING: The parser code is all in parser.c. A recursive des- cent parser is used. Syntax tables (generated by mksyntax) are used to classify characters during lexical analysis. There are -three tables: one for normal use, one for use when inside single -quotes, and one for use when inside double quotes. The tables -are machine dependent because they are indexed by character vari- -ables and the range of a char varies from machine to machine. +four tables: one for normal use, one for use when inside single +quotes and dollar single quotes, one for use when inside double +quotes and one for use in arithmetic. The tables are machine +dependent because they are indexed by character variables and +the range of a char varies from machine to machine. PARSE OUTPUT: The output of the parser consists of a tree of nodes. The various types of nodes are defined in the file node- @@ -242,12 +233,7 @@ The routine shellexec is the interface t EXPAND.C: Arguments are processed in three passes. The first (performed by the routine argstr) performs variable and command substitution. The second (ifsbreakup) performs word splitting -and the third (expandmeta) performs file name generation. If the -"/u" directory is simulated, then when "/u/username" is replaced -by the user's home directory, the flag "didudir" is set. This -tells the cd command that it should print out the directory name, -just as it would if the "/u" directory were implemented using -symbolic links. +and the third (expandmeta) performs file name generation. VAR.C: Variables are stored in a hash table. Probably we should switch to extensible hashing. The variable name is stored in the @@ -292,14 +278,7 @@ when the program is linked into ash. Th before bltin.h is included; bltin.h will #undef main if the pro- gram is to be compiled stand-alone. -CD.C: This file defines the cd and pwd builtins. The pwd com- -mand runs /bin/pwd the first time it is invoked (unless the user -has already done a cd to an absolute pathname), but then -remembers the current directory and updates it when the cd com- -mand is run, so subsequent pwd commands run very fast. The main -complication in the cd command is in the docd command, which -resolves symbolic links into actual names and informs the user -where the user ended up if he crossed a symbolic link. +CD.C: This file defines the cd and pwd builtins. SIGNALS: Trap.c implements the trap command. The routine set- signal figures out what action should be taken when a signal is From owner-svn-src-head@FreeBSD.ORG Fri May 27 16:17:36 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 259101065675; Fri, 27 May 2011 16:17:36 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14F368FC17; Fri, 27 May 2011 16:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RGHZYx043163; Fri, 27 May 2011 16:17:35 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RGHZR5043161; Fri, 27 May 2011 16:17:35 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201105271617.p4RGHZR5043161@svn.freebsd.org> From: Kevin Lo Date: Fri, 27 May 2011 16:17: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: r222365 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 16:17:36 -0000 Author: kevlo Date: Fri May 27 16:17:35 2011 New Revision: 222365 URL: http://svn.freebsd.org/changeset/base/222365 Log: Whitespace fixes Reviewed by: jpaetzel Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Fri May 27 16:09:10 2011 (r222364) +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Fri May 27 16:17:35 2011 (r222365) @@ -219,9 +219,9 @@ setup_fstab() # Echo out the fstab entry now if [ "${PARTFS}" = "SWAP" ] then - echo "/dev/${DEVICE} none swap ${MNTOPTS} 0 0" >> ${FSTAB} + echo "/dev/${DEVICE} none swap ${MNTOPTS} 0 0" >> ${FSTAB} else - echo "/dev/${DEVICE} ${PARTMNT} ufs ${MNTOPTS} 1 1" >> ${FSTAB} + echo "/dev/${DEVICE} ${PARTMNT} ufs ${MNTOPTS} 1 1" >> ${FSTAB} fi fi # End of ZFS Check From owner-svn-src-head@FreeBSD.ORG Fri May 27 17:24:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 9A086106564A; Fri, 27 May 2011 17:24:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 38EFB1799B4; Fri, 27 May 2011 17:24:39 +0000 (UTC) Message-ID: <4DDFDE53.1010602@FreeBSD.org> Date: Fri, 27 May 2011 10:24:35 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Sergey Kandaurov References: <201105201703.p4KH3NrR093036@svn.freebsd.org> <4DD80A22.3090300@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222136 - head/usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 17:24:49 -0000 On 05/27/2011 07:24, Sergey Kandaurov wrote: > On 21 May 2011 22:53, Doug Barton wrote: >> On 05/20/2011 10:09, Sergey Kandaurov wrote: >>> >>> There's still a lot of warnings but all of them reside in contrib part. >> >> That doesn't mean that they shouldn't be fixed. :) The great thing about the >> way that the contrib sources are arranged in svn is that we can fix things >> in src/contrib with no concern to any "costs" imposed by the VCS. > > I'm afraid it makes no sense until we finish with importing top-3.8b1. > Most warnings are fixed in this version itself, and Edwin did a good job in > the past porting it to FreeBSD. Fair enough, thanks for the response. :) -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Fri May 27 19:36:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B504106564A; Fri, 27 May 2011 19:36:07 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B35C8FC08; Fri, 27 May 2011 19:36:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RJa71A049684; Fri, 27 May 2011 19:36:07 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RJa7Qs049683; Fri, 27 May 2011 19:36:07 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105271936.p4RJa7Qs049683@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 27 May 2011 19:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222379 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 19:36:07 -0000 Author: jilles Date: Fri May 27 19:36:07 2011 New Revision: 222379 URL: http://svn.freebsd.org/changeset/base/222379 Log: sh: Add simple CDPATH test. Added: head/tools/regression/bin/sh/builtins/cd5.0 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/cd5.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/cd5.0 Fri May 27 19:36:07 2011 (r222379) @@ -0,0 +1,23 @@ +# $FreeBSD$ + +set -e +T=$(mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXX") +trap 'rm -rf "$T"' 0 + +cd -P "$T" +D=$(pwd) + +mkdir a a/1 b b/1 b/2 + +CDPATH=$D/a: +# Basic test. +cd 1 >/dev/null +[ "$(pwd)" = "$D/a/1" ] +# Test that the current directory is not checked before CDPATH. +cd "$D/b" +cd 1 >/dev/null +[ "$(pwd)" = "$D/a/1" ] +# Test not using a CDPATH entry. +cd "$D/b" +cd 2 +[ "$(pwd)" = "$D/b/2" ] From owner-svn-src-head@FreeBSD.ORG Fri May 27 19:57:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBF36106566C; Fri, 27 May 2011 19:57:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D16898FC0A; Fri, 27 May 2011 19:57:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RJvw4s050418; Fri, 27 May 2011 19:57:58 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RJvwpj050413; Fri, 27 May 2011 19:57:58 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201105271957.p4RJvwpj050413@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 27 May 2011 19:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222380 - in head: sys/kern sys/sys usr.bin/rctl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 19:57:59 -0000 Author: trasz Date: Fri May 27 19:57:58 2011 New Revision: 222380 URL: http://svn.freebsd.org/changeset/base/222380 Log: Remove definitions for RACCT_FSIZE and RACCT_SBSIZE - these two are rather performance-sensitive and not that useful, so I won't be merging them before 9.0. Modified: head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c head/sys/sys/racct.h head/usr.bin/rctl/rctl.8 Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Fri May 27 19:36:07 2011 (r222379) +++ head/sys/kern/kern_racct.c Fri May 27 19:57:58 2011 (r222380) @@ -104,8 +104,6 @@ SDT_PROBE_DEFINE2(racct, kernel, racct, int racct_types[] = { [RACCT_CPU] = RACCT_IN_THOUSANDS, - [RACCT_FSIZE] = - RACCT_RECLAIMABLE | RACCT_INHERITABLE | RACCT_DENIABLE, [RACCT_DATA] = RACCT_RECLAIMABLE | RACCT_INHERITABLE | RACCT_DENIABLE, [RACCT_STACK] = @@ -120,8 +118,6 @@ int racct_types[] = { RACCT_RECLAIMABLE | RACCT_DENIABLE, [RACCT_NOFILE] = RACCT_RECLAIMABLE | RACCT_INHERITABLE | RACCT_DENIABLE, - [RACCT_SBSIZE] = - RACCT_RECLAIMABLE | RACCT_DENIABLE | RACCT_SLOPPY, [RACCT_VMEM] = RACCT_RECLAIMABLE | RACCT_INHERITABLE | RACCT_DENIABLE, [RACCT_NPTS] = @@ -627,7 +623,6 @@ racct_proc_exit(struct proc *p) /* * XXX: Free this some other way. */ - racct_set(p, RACCT_FSIZE, 0); racct_set(p, RACCT_NPTS, 0); racct_set(p, RACCT_NTHR, 0); racct_set(p, RACCT_RSS, 0); Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Fri May 27 19:36:07 2011 (r222379) +++ head/sys/kern/kern_rctl.c Fri May 27 19:57:58 2011 (r222380) @@ -100,7 +100,6 @@ static struct dict subjectnames[] = { static struct dict resourcenames[] = { { "cpu", RACCT_CPU }, - { "fsize", RACCT_FSIZE }, { "data", RACCT_DATA }, { "stack", RACCT_STACK }, { "core", RACCT_CORE }, @@ -108,7 +107,6 @@ static struct dict resourcenames[] = { { "memlock", RACCT_MEMLOCK }, { "nproc", RACCT_NPROC }, { "nofile", RACCT_NOFILE }, - { "sbsize", RACCT_SBSIZE }, { "vmem", RACCT_VMEM }, { "npts", RACCT_NPTS }, { "swap", RACCT_SWAP }, Modified: head/sys/sys/racct.h ============================================================================== --- head/sys/sys/racct.h Fri May 27 19:36:07 2011 (r222379) +++ head/sys/sys/racct.h Fri May 27 19:57:58 2011 (r222380) @@ -49,27 +49,25 @@ struct ucred; */ #define RACCT_UNDEFINED -1 #define RACCT_CPU 0 -#define RACCT_FSIZE 1 -#define RACCT_DATA 2 -#define RACCT_STACK 3 -#define RACCT_CORE 4 -#define RACCT_RSS 5 -#define RACCT_MEMLOCK 6 -#define RACCT_NPROC 7 -#define RACCT_NOFILE 8 -#define RACCT_SBSIZE 9 -#define RACCT_VMEM 10 -#define RACCT_NPTS 11 -#define RACCT_SWAP 12 -#define RACCT_NTHR 13 -#define RACCT_MSGQQUEUED 14 -#define RACCT_MSGQSIZE 15 -#define RACCT_NMSGQ 16 -#define RACCT_NSEM 17 -#define RACCT_NSEMOP 18 -#define RACCT_NSHM 19 -#define RACCT_SHMSIZE 20 -#define RACCT_WALLCLOCK 21 +#define RACCT_DATA 1 +#define RACCT_STACK 2 +#define RACCT_CORE 3 +#define RACCT_RSS 4 +#define RACCT_MEMLOCK 5 +#define RACCT_NPROC 6 +#define RACCT_NOFILE 7 +#define RACCT_VMEM 8 +#define RACCT_NPTS 9 +#define RACCT_SWAP 10 +#define RACCT_NTHR 11 +#define RACCT_MSGQQUEUED 12 +#define RACCT_MSGQSIZE 13 +#define RACCT_NMSGQ 14 +#define RACCT_NSEM 15 +#define RACCT_NSEMOP 16 +#define RACCT_NSHM 17 +#define RACCT_SHMSIZE 18 +#define RACCT_WALLCLOCK 19 #define RACCT_MAX RACCT_WALLCLOCK /* Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Fri May 27 19:36:07 2011 (r222379) +++ head/usr.bin/rctl/rctl.8 Fri May 27 19:57:58 2011 (r222380) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd May 26, 2011 .Dt RCTL 8 .Os .Sh NAME @@ -123,7 +123,6 @@ A filter that matches all defined rules .Sh RESOURCES .Bl -column -offset 3n "msgqqueued" .It cpu CPU time, in milliseconds -.It fsize maximum file size, in bytes .It data data size, in bytes .It stack stack size, in bytes .It core core dump size, in bytes @@ -131,7 +130,6 @@ A filter that matches all defined rules .It memlock locked memory, in bytes .It nproc number of processes .It nofile file descriptor table size -.It sbsize memory consumed by socket buffers, in bytes .It vmem address space limit, in bytes .It npts number of PTYs .It swap swap usage, in bytes From owner-svn-src-head@FreeBSD.ORG Fri May 27 20:01:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 018E3106566B; Fri, 27 May 2011 20:01:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC21C8FC13; Fri, 27 May 2011 20:01:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RK1kbF050588; Fri, 27 May 2011 20:01:46 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RK1kmN050584; Fri, 27 May 2011 20:01:46 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105272001.p4RK1kmN050584@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 27 May 2011 20:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222381 - in head: bin/sh tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 20:01:47 -0000 Author: jilles Date: Fri May 27 20:01:46 2011 New Revision: 222381 URL: http://svn.freebsd.org/changeset/base/222381 Log: sh: Correct criterion for using CDPATH in cd. CDPATH should be ignored not only for pathnames starting with '/' but also for pathnames whose first component is '.' or '..'. The man page already describes this behaviour. Added: head/tools/regression/bin/sh/builtins/cd6.0 (contents, props changed) head/tools/regression/bin/sh/builtins/cd7.0 (contents, props changed) Modified: head/bin/sh/cd.c Modified: head/bin/sh/cd.c ============================================================================== --- head/bin/sh/cd.c Fri May 27 19:57:58 2011 (r222380) +++ head/bin/sh/cd.c Fri May 27 20:01:46 2011 (r222381) @@ -123,7 +123,10 @@ cdcmd(int argc, char **argv) else dest = "."; } - if (*dest == '/' || (path = bltinlookup("CDPATH", 1)) == NULL) + if (dest[0] == '/' || + (dest[0] == '.' && (dest[1] == '/' || dest[1] == '\0')) || + (dest[0] == '.' && dest[1] == '.' && (dest[2] == '/' || dest[2] == '\0')) || + (path = bltinlookup("CDPATH", 1)) == NULL) path = nullstr; while ((p = padvance(&path, dest)) != NULL) { if (stat(p, &statb) >= 0 && S_ISDIR(statb.st_mode)) { Added: head/tools/regression/bin/sh/builtins/cd6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/cd6.0 Fri May 27 20:01:46 2011 (r222381) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +set -e +cd -P /bin +d=$PWD +CDPATH=/: +cd -P . +[ "$d" = "$PWD" ] +cd -P ./ +[ "$d" = "$PWD" ] Added: head/tools/regression/bin/sh/builtins/cd7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/cd7.0 Fri May 27 20:01:46 2011 (r222381) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +set -e +cd /usr/bin +[ "$PWD" = /usr/bin ] +CDPATH=/: +cd . +[ "$PWD" = /usr/bin ] +cd ./ +[ "$PWD" = /usr/bin ] +cd .. +[ "$PWD" = /usr ] +cd /usr/bin +cd ../ +[ "$PWD" = /usr ] From owner-svn-src-head@FreeBSD.ORG Fri May 27 20:53:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71E43106566B; Fri, 27 May 2011 20:53:07 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 629778FC16; Fri, 27 May 2011 20:53:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RKr7OM052582; Fri, 27 May 2011 20:53:07 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RKr7Ls052579; Fri, 27 May 2011 20:53:07 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105272053.p4RKr7Ls052579@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 27 May 2011 20:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222386 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 20:53:07 -0000 Author: jilles Date: Fri May 27 20:53:07 2011 New Revision: 222386 URL: http://svn.freebsd.org/changeset/base/222386 Log: sh: Remove the "exp" builtin. The "exp" builtin is undocumented, non-standard and not very useful. If exp's return value is not used, something like VAR=$(exp EXPRESSION) is equivalent to VAR=$((EXPRESSION)) except that errors in the expression are fatal and quoting special characters is not needed in the latter case. If exp's return value is used, something like if exp EXPRESSION >/dev/null can be replaced by if [ $((EXPRESSION)) -ne 0 ] with similar differences. The exp-run showed that "let" is close enough to bash's and ksh's builtin that removing it would break a few ports. Therefore, "let" remains in 9.x. PR: bin/104432 Exp-run done by: pav (with some other sh(1) changes) Modified: head/bin/sh/arith_yacc.c head/bin/sh/builtins.def Modified: head/bin/sh/arith_yacc.c ============================================================================== --- head/bin/sh/arith_yacc.c Fri May 27 20:34:23 2011 (r222385) +++ head/bin/sh/arith_yacc.c Fri May 27 20:53:07 2011 (r222386) @@ -344,7 +344,7 @@ arith_t arith(const char *s) * The exp(1) builtin. */ int -expcmd(int argc, char **argv) +letcmd(int argc, char **argv) { const char *p; char *concat; Modified: head/bin/sh/builtins.def ============================================================================== --- head/bin/sh/builtins.def Fri May 27 20:34:23 2011 (r222385) +++ head/bin/sh/builtins.def Fri May 27 20:53:07 2011 (r222386) @@ -60,7 +60,7 @@ echocmd echo evalcmd -s eval execcmd -s exec exitcmd -s exit -expcmd exp let +letcmd let exportcmd -s export -s readonly #exprcmd expr falsecmd false From owner-svn-src-head@FreeBSD.ORG Fri May 27 22:05:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6BC7106564A; Fri, 27 May 2011 22:05:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5B2D8FC14; Fri, 27 May 2011 22:05:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RM5AMG054903; Fri, 27 May 2011 22:05:10 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RM5Aih054896; Fri, 27 May 2011 22:05:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105272205.p4RM5Aih054896@svn.freebsd.org> From: Rick Macklem Date: Fri, 27 May 2011 22:05:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222389 - in head/sys/fs: nfs nfsclient nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 22:05:10 -0000 Author: rmacklem Date: Fri May 27 22:05:10 2011 New Revision: 222389 URL: http://svn.freebsd.org/changeset/base/222389 Log: Fix the new NFS client so that it handles NFSv4 state correctly during a forced dismount. This required that the exclusive and shared (refcnt) sleep lock functions check for MNTK_UMOUNTF before sleeping, so that they won't block while nfscl_umount() is getting rid of the state. As such, a "struct mount *" argument was added to the locking functions. I believe the only remaining case where a forced dismount can get hung in the kernel is when a thread is already attempting to do a TCP connect to a dead server when the krpc client structure called nr_client is NULL. This will only happen just after a "mount -u" with options that force a new TCP connection is done, so it shouldn't be a problem in practice. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsserver/nfs_nfsdsocket.c head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Fri May 27 21:45:21 2011 (r222388) +++ head/sys/fs/nfs/nfs_commonsubs.c Fri May 27 22:05:10 2011 (r222389) @@ -1726,11 +1726,13 @@ nfsmout: * Any usecnt must be decremented by calling nfsv4_relref() before * calling nfsv4_lock(). It was done this way, so nfsv4_lock() could * be called in a loop. - * The last argument is set to indicate if the call slept, iff not NULL. + * The isleptp argument is set to indicate if the call slept, iff not NULL + * and the mp argument indicates to check for a forced dismount, iff not + * NULL. */ APPLESTATIC int nfsv4_lock(struct nfsv4lock *lp, int iwantlock, int *isleptp, - void *mutex) + void *mutex, struct mount *mp) { if (isleptp) @@ -1751,6 +1753,10 @@ nfsv4_lock(struct nfsv4lock *lp, int iwa lp->nfslock_lock |= NFSV4LOCK_LOCKWANTED; } while (lp->nfslock_lock & (NFSV4LOCK_LOCK | NFSV4LOCK_LOCKWANTED)) { + if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { + lp->nfslock_lock &= ~NFSV4LOCK_LOCKWANTED; + return (0); + } lp->nfslock_lock |= NFSV4LOCK_WANTED; if (isleptp) *isleptp = 1; @@ -1801,9 +1807,12 @@ nfsv4_relref(struct nfsv4lock *lp) * not wait for threads that want the exclusive lock. If priority needs * to be given to threads that need the exclusive lock, a call to nfsv4_lock() * with the 2nd argument == 0 should be done before calling nfsv4_getref(). + * If the mp argument is not NULL, check for MNTK_UNMOUNTF being set and + * return without getting a refcnt for that case. */ APPLESTATIC void -nfsv4_getref(struct nfsv4lock *lp, int *isleptp, void *mutex) +nfsv4_getref(struct nfsv4lock *lp, int *isleptp, void *mutex, + struct mount *mp) { if (isleptp) @@ -1813,12 +1822,16 @@ nfsv4_getref(struct nfsv4lock *lp, int * * Wait for a lock held. */ while (lp->nfslock_lock & NFSV4LOCK_LOCK) { + if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) + return; lp->nfslock_lock |= NFSV4LOCK_WANTED; if (isleptp) *isleptp = 1; (void) nfsmsleep(&lp->nfslock_lock, mutex, PZERO - 1, "nfsv4lck", NULL); } + if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) + return; lp->nfslock_usecnt++; } Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Fri May 27 21:45:21 2011 (r222388) +++ head/sys/fs/nfs/nfs_var.h Fri May 27 22:05:10 2011 (r222389) @@ -247,10 +247,10 @@ int nfsv4_loadattr(struct nfsrv_descript struct nfsv3_pathconf *, struct statfs *, struct nfsstatfs *, struct nfsfsinfo *, NFSACL_T *, int, int *, u_int32_t *, u_int32_t *, NFSPROC_T *, struct ucred *); -int nfsv4_lock(struct nfsv4lock *, int, int *, void *); +int nfsv4_lock(struct nfsv4lock *, int, int *, void *, struct mount *); void nfsv4_unlock(struct nfsv4lock *, int); void nfsv4_relref(struct nfsv4lock *); -void nfsv4_getref(struct nfsv4lock *, int *, void *); +void nfsv4_getref(struct nfsv4lock *, int *, void *, struct mount *); int nfsv4_getref_nonblock(struct nfsv4lock *); int nfsv4_testlock(struct nfsv4lock *); int nfsrv_mtostr(struct nfsrv_descript *, char *, int); Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Fri May 27 21:45:21 2011 (r222388) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Fri May 27 22:05:10 2011 (r222389) @@ -482,7 +482,7 @@ nfscl_lockexcl(struct nfsv4lock *lckp, v int igotlock; do { - igotlock = nfsv4_lock(lckp, 1, NULL, mutex); + igotlock = nfsv4_lock(lckp, 1, NULL, mutex, NULL); } while (!igotlock); } Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Fri May 27 21:45:21 2011 (r222388) +++ head/sys/fs/nfsclient/nfs_clstate.c Fri May 27 22:05:10 2011 (r222389) @@ -687,11 +687,14 @@ nfscl_getcl(vnode_t vp, struct ucred *cr struct nfsclclient *clp; struct nfsclclient *newclp = NULL; struct nfscllockowner *lp, *nlp; - struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); + struct mount *mp; + struct nfsmount *nmp; char uuid[HOSTUUIDLEN]; int igotlock = 0, error, trystalecnt, clidinusedelay, i; u_int16_t idlen = 0; + mp = vnode_mount(vp); + nmp = VFSTONFS(mp); if (cred != NULL) { getcredhostuuid(cred, uuid, sizeof uuid); idlen = strlen(uuid); @@ -704,6 +707,17 @@ nfscl_getcl(vnode_t vp, struct ucred *cr M_WAITOK); } NFSLOCKCLSTATE(); + /* + * If a forced dismount is already in progress, don't + * allocate a new clientid and get out now. For the case where + * clp != NULL, this is a harmless optimization. + */ + if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { + NFSUNLOCKCLSTATE(); + if (newclp != NULL) + free(newclp, M_NFSCLCLIENT); + return (EBADF); + } clp = nmp->nm_clp; if (clp == NULL) { if (newclp == NULL) { @@ -736,9 +750,21 @@ nfscl_getcl(vnode_t vp, struct ucred *cr NFSLOCKCLSTATE(); while ((clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID) == 0 && !igotlock) igotlock = nfsv4_lock(&clp->nfsc_lock, 1, NULL, - NFSCLSTATEMUTEXPTR); + NFSCLSTATEMUTEXPTR, mp); if (!igotlock) - nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR); + nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR, mp); + if (igotlock == 0 && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { + /* + * Both nfsv4_lock() and nfsv4_getref() know to check + * for MNTK_UNMOUNTF and return without sleeping to + * wait for the exclusive lock to be released, since it + * might be held by nfscl_umount() and we need to get out + * now for that case and not wait until nfscl_umount() + * releases it. + */ + NFSUNLOCKCLSTATE(); + return (EBADF); + } NFSUNLOCKCLSTATE(); /* @@ -1713,6 +1739,7 @@ nfscl_cleanupkext(struct nfsclclient *cl } #endif /* APPLEKEXT || __FreeBSD__ */ +static int fake_global; /* Used to force visibility of MNTK_UNMOUNTF */ /* * Called from nfs umount to free up the clientid. */ @@ -1723,6 +1750,33 @@ nfscl_umount(struct nfsmount *nmp, NFSPR struct ucred *cred; int igotlock; + /* + * For the case that matters, this is the thread that set + * MNTK_UNMOUNTF, so it will see it set. The code that follows is + * done to ensure that any thread executing nfscl_getcl() after + * this time, will see MNTK_UNMOUNTF set. nfscl_getcl() uses the + * mutex for NFSLOCKCLSTATE(), so it is "m" for the following + * explanation, courtesy of Alan Cox. + * What follows is a snippet from Alan Cox's email at: + * http://docs.FreeBSD.org/cgi/ + * mid.cgi?BANLkTikR3d65zPHo9==08ZfJ2vmqZucEvw + * + * 1. Set MNTK_UNMOUNTF + * 2. Acquire a standard FreeBSD mutex "m". + * 3. Update some data structures. + * 4. Release mutex "m". + * + * Then, other threads that acquire "m" after step 4 has occurred will + * see MNTK_UNMOUNTF as set. But, other threads that beat thread X to + * step 2 may or may not see MNTK_UNMOUNTF as set. + */ + NFSLOCKCLSTATE(); + if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { + fake_global++; + NFSUNLOCKCLSTATE(); + NFSLOCKCLSTATE(); + } + clp = nmp->nm_clp; if (clp != NULL) { if ((clp->nfsc_flags & NFSCLFLAGS_INITED) == 0) @@ -1734,12 +1788,16 @@ nfscl_umount(struct nfsmount *nmp, NFSPR */ clp->nfsc_flags |= NFSCLFLAGS_UMOUNT; while (clp->nfsc_flags & NFSCLFLAGS_HASTHREAD) - (void) tsleep((caddr_t)clp, PWAIT, "nfsclumnt", hz); + (void)mtx_sleep(clp, NFSCLSTATEMUTEXPTR, PWAIT, + "nfsclumnt", hz); - NFSLOCKCLSTATE(); + /* + * Now, get the exclusive lock on the client state, so + * that no uses of the state are still in progress. + */ do { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, NULL, - NFSCLSTATEMUTEXPTR); + NFSCLSTATEMUTEXPTR, NULL); } while (!igotlock); NFSUNLOCKCLSTATE(); @@ -1756,8 +1814,8 @@ nfscl_umount(struct nfsmount *nmp, NFSPR nmp->nm_clp = NULL; NFSFREECRED(cred); FREE((caddr_t)clp, M_NFSCLCLIENT); - } - + } else + NFSUNLOCKCLSTATE(); } /* @@ -1790,7 +1848,7 @@ nfscl_recover(struct nfsclclient *clp, s clp->nfsc_flags |= NFSCLFLAGS_RECVRINPROG; do { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, NULL, - NFSCLSTATEMUTEXPTR); + NFSCLSTATEMUTEXPTR, NULL); } while (!igotlock); NFSUNLOCKCLSTATE(); @@ -2105,7 +2163,7 @@ nfscl_hasexpired(struct nfsclclient *clp clp->nfsc_flags |= NFSCLFLAGS_EXPIREIT; do { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, NULL, - NFSCLSTATEMUTEXPTR); + NFSCLSTATEMUTEXPTR, NULL); } while (!igotlock && (clp->nfsc_flags & NFSCLFLAGS_EXPIREIT)); if ((clp->nfsc_flags & NFSCLFLAGS_EXPIREIT) == 0) { if (igotlock) @@ -2464,7 +2522,7 @@ tryagain: } while (!igotlock) { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, - &islept, NFSCLSTATEMUTEXPTR); + &islept, NFSCLSTATEMUTEXPTR, NULL); if (islept) goto tryagain; } @@ -2556,14 +2614,18 @@ tryagain: } #endif /* APPLEKEXT || __FreeBSD__ */ + NFSLOCKCLSTATE(); if ((clp->nfsc_flags & NFSCLFLAGS_RECOVER) == 0) - (void) tsleep((caddr_t)clp, PWAIT, "nfscl", hz); + (void)mtx_sleep(clp, NFSCLSTATEMUTEXPTR, PWAIT, "nfscl", + hz); if (clp->nfsc_flags & NFSCLFLAGS_UMOUNT) { - NFSFREECRED(cred); clp->nfsc_flags &= ~NFSCLFLAGS_HASTHREAD; + NFSUNLOCKCLSTATE(); + NFSFREECRED(cred); wakeup((caddr_t)clp); return; } + NFSUNLOCKCLSTATE(); } } @@ -3864,7 +3926,7 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T islept = 0; while (!igotlock) { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, - &islept, NFSCLSTATEMUTEXPTR); + &islept, NFSCLSTATEMUTEXPTR, NULL); if (islept) break; } @@ -3963,7 +4025,7 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stat islept = 0; while (!igotlock) { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, - &islept, NFSCLSTATEMUTEXPTR); + &islept, NFSCLSTATEMUTEXPTR, NULL); if (islept) break; } @@ -4043,7 +4105,7 @@ nfscl_getref(struct nfsmount *nmp) NFSUNLOCKCLSTATE(); return (0); } - nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR); + nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR, NULL); NFSUNLOCKCLSTATE(); return (1); } Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdsocket.c Fri May 27 21:45:21 2011 (r222388) +++ head/sys/fs/nfsserver/nfs_nfsdsocket.c Fri May 27 22:05:10 2011 (r222389) @@ -525,10 +525,10 @@ nfsrvd_compound(struct nfsrv_descript *n NFSLOCKV4ROOTMUTEX(); if (nfsrv_stablefirst.nsf_flags & NFSNSF_NEEDLOCK) igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); else igotlock = nfsv4_lock(&nfsv4rootfs_lock, 0, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); NFSUNLOCKV4ROOTMUTEX(); if (igotlock) { /* @@ -576,7 +576,7 @@ nfsrvd_compound(struct nfsrv_descript *n */ NFSLOCKV4ROOTMUTEX(); nfsv4_getref(&nfsv4rootfs_lock, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); NFSUNLOCKV4ROOTMUTEX(); } Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri May 27 21:45:21 2011 (r222388) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri May 27 22:05:10 2011 (r222389) @@ -169,7 +169,7 @@ nfsrv_setclient(struct nfsrv_descript *n nfsv4_relref(&nfsv4rootfs_lock); do { igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); } while (!igotlock); NFSUNLOCKV4ROOTMUTEX(); @@ -419,7 +419,7 @@ nfsrv_getclient(nfsquad_t clientid, int nfsv4_relref(&nfsv4rootfs_lock); do { igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); } while (!igotlock); NFSUNLOCKV4ROOTMUTEX(); } else if (opflags != CLOPS_RENEW) { @@ -548,7 +548,7 @@ nfsrv_adminrevoke(struct nfsd_clid *revo NFSLOCKV4ROOTMUTEX(); do { igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); } while (!igotlock); NFSUNLOCKV4ROOTMUTEX(); @@ -608,7 +608,7 @@ nfsrv_dumpclients(struct nfsd_dumpclient * exclusive lock cannot be acquired while dumping the clients. */ NFSLOCKV4ROOTMUTEX(); - nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR); + nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR, NULL); NFSUNLOCKV4ROOTMUTEX(); NFSLOCKSTATE(); /* @@ -709,7 +709,7 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ * exclusive lock on it cannot be acquired while dumping the locks. */ NFSLOCKV4ROOTMUTEX(); - nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR); + nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR, NULL); NFSUNLOCKV4ROOTMUTEX(); NFSLOCKSTATE(); if (!ret) @@ -4254,7 +4254,7 @@ nfsrv_clientconflict(struct nfsclient *c nfsv4_relref(&nfsv4rootfs_lock); do { gotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); } while (!gotlock); NFSUNLOCKV4ROOTMUTEX(); *haslockp = 1; @@ -4422,7 +4422,7 @@ nfsrv_delegconflict(struct nfsstate *stp nfsv4_relref(&nfsv4rootfs_lock); do { gotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, - NFSV4ROOTLOCKMUTEXPTR); + NFSV4ROOTLOCKMUTEXPTR, NULL); } while (!gotlock); NFSUNLOCKV4ROOTMUTEX(); *haslockp = 1; @@ -4616,7 +4616,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPRO * exclusive lock cannot be acquired by another thread. */ NFSLOCKV4ROOTMUTEX(); - nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR); + nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR, NULL); NFSUNLOCKV4ROOTMUTEX(); /* @@ -5179,7 +5179,7 @@ nfsrv_locklf(struct nfslockfile *lfp) lfp->lf_usecount++; do { gotlock = nfsv4_lock(&lfp->lf_locallock_lck, 1, NULL, - NFSSTATEMUTEXPTR); + NFSSTATEMUTEXPTR, NULL); } while (gotlock == 0); lfp->lf_usecount--; } From owner-svn-src-head@FreeBSD.ORG Fri May 27 22:14:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F1051065673; Fri, 27 May 2011 22:14:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FDC08FC08; Fri, 27 May 2011 22:14:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RMEngt055210; Fri, 27 May 2011 22:14:49 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RMEnUj055208; Fri, 27 May 2011 22:14:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105272214.p4RMEnUj055208@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 27 May 2011 22:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222390 - head/usr.bin/find X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 22:14:49 -0000 Author: jilles Date: Fri May 27 22:14:49 2011 New Revision: 222390 URL: http://svn.freebsd.org/changeset/base/222390 Log: find: If a part of an expression is unknown, do not call it an option. Although most of the primaries and operators start with "-", they are not options. Examples: find . -xyz find . -name xyz -or bad MFC after: 1 week Modified: head/usr.bin/find/option.c Modified: head/usr.bin/find/option.c ============================================================================== --- head/usr.bin/find/option.c Fri May 27 22:05:10 2011 (r222389) +++ head/usr.bin/find/option.c Fri May 27 22:14:49 2011 (r222390) @@ -172,7 +172,7 @@ find_create(char ***argvp) argv = *argvp; if ((p = lookup_option(*argv)) == NULL) - errx(1, "%s: unknown option", *argv); + errx(1, "%s: unknown primary or operator", *argv); ++argv; new = (p->create)(p, &argv); From owner-svn-src-head@FreeBSD.ORG Fri May 27 23:09:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D8751065714; Fri, 27 May 2011 23:09:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D85A8FC29; Fri, 27 May 2011 23:09:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RN9Dt7056851; Fri, 27 May 2011 23:09:13 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RN9DVq056848; Fri, 27 May 2011 23:09:13 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105272309.p4RN9DVq056848@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 27 May 2011 23:09: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: r222391 - head/sys/powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 23:09:13 -0000 Author: marcel Date: Fri May 27 23:09:12 2011 New Revision: 222391 URL: http://svn.freebsd.org/changeset/base/222391 Log: Wire the kernel using TLB1 entry 0 rather than entry 1. A more recent U-Boot as found on the P1020RDB doesn't like it when we use entry 1 (for some reason) whereas an older U-Boot doesn't mind if we use entry 0. If anything else, this simplifies the code a bit. Modified: head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Fri May 27 22:14:49 2011 (r222390) +++ head/sys/powerpc/booke/locore.S Fri May 27 23:09:12 2011 (r222391) @@ -148,7 +148,7 @@ __start: */ /* Final kernel mapping, map in 16 MB of RAM */ lis %r3, MAS0_TLBSEL1@h /* Select TLB1 */ - li %r4, 1 /* Entry 1 */ + li %r4, 0 /* Entry 0 */ rlwimi %r3, %r4, 16, 12, 15 mtspr SPR_MAS0, %r3 isync @@ -318,7 +318,7 @@ kernload_ap: */ /* Final kernel mapping, map in 16 MB of RAM */ lis %r3, MAS0_TLBSEL1@h /* Select TLB1 */ - li %r4, 1 /* Entry 1 */ + li %r4, 0 /* Entry 0 */ rlwimi %r3, %r4, 16, 4, 15 mtspr SPR_MAS0, %r3 isync @@ -490,11 +490,7 @@ tlb1_temp_mapping_as1: */ lis %r3, MAS0_TLBSEL1@h /* Select TLB1 */ addi %r29, %r30, 1 /* Use next entry. */ - li %r4, 1 - cmpw %r4, %r29 - bne 1f - addi %r29, %r29, 1 -1: rlwimi %r3, %r29, 16, 12, 15 /* Select temp entry */ + rlwimi %r3, %r29, 16, 12, 15 /* Select temp entry */ mtspr SPR_MAS0, %r3 isync mfspr %r5, SPR_MAS1 Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Fri May 27 22:14:49 2011 (r222390) +++ head/sys/powerpc/booke/pmap.c Fri May 27 23:09:12 2011 (r222391) @@ -91,9 +91,6 @@ __FBSDID("$FreeBSD$"); #include "mmu_if.h" -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) printf(fmt, ##args) #else @@ -3019,24 +3016,18 @@ tlb1_init(vm_offset_t ccsrbar) { uint32_t mas0; - /* TLB1[1] is used to map the kernel. Save that entry. */ - mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(1); + /* TLB1[0] is used to map the kernel. Save that entry. */ + mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(0); mtspr(SPR_MAS0, mas0); __asm __volatile("isync; tlbre"); - tlb1[1].mas1 = mfspr(SPR_MAS1); - tlb1[1].mas2 = mfspr(SPR_MAS2); - tlb1[1].mas3 = mfspr(SPR_MAS3); + tlb1[0].mas1 = mfspr(SPR_MAS1); + tlb1[0].mas2 = mfspr(SPR_MAS2); + tlb1[0].mas3 = mfspr(SPR_MAS3); - /* Map in CCSRBAR in TLB1[0] */ - tlb1_idx = 0; + /* Map in CCSRBAR in TLB1[1] */ + tlb1_idx = 1; tlb1_set_entry(CCSRBAR_VA, ccsrbar, CCSRBAR_SIZE, _TLB_ENTRY_IO); - /* - * Set the next available TLB1 entry index. Note TLB[1] is reserved - * for initial mapping of kernel text+data, which was set early in - * locore, we need to skip this [busy] entry. - */ - tlb1_idx = 2; /* Setup TLB miss defaults */ set_mas4_defaults(); From owner-svn-src-head@FreeBSD.ORG Fri May 27 23:18:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA3FD106564A; Fri, 27 May 2011 23:18:41 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B121A8FC08; Fri, 27 May 2011 23:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RNIfWf057178; Fri, 27 May 2011 23:18:41 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RNIfeb057176; Fri, 27 May 2011 23:18:41 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105272318.p4RNIfeb057176@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 27 May 2011 23:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222392 - head/sys/powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 23:18:42 -0000 Author: marcel Date: Fri May 27 23:18:41 2011 New Revision: 222392 URL: http://svn.freebsd.org/changeset/base/222392 Log: o The P1020(E) & P2020(E) also have two cores. This conditional has a tendency to grow unwieldy so we may want to revisit this in due time. o Simplify the CPU reset function by writing to the reset control register irrespective of whether the CPU has one and automatically falling back to the debug control register if we didn't reset the CPU. The side-effect is that we now properly reset future processors without first having to add the system version to the list. Modified: head/sys/powerpc/booke/platform_bare.c Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Fri May 27 23:09:12 2011 (r222391) +++ head/sys/powerpc/booke/platform_bare.c Fri May 27 23:18:41 2011 (r222392) @@ -104,7 +104,10 @@ bare_probe(platform_t plat) int i, law_max, tgt; ver = SVR_VER(mfspr(SPR_SVR)); - if (ver == SVR_MPC8572E || ver == SVR_MPC8572) + + if (ver == SVR_MPC8572E || ver == SVR_MPC8572 || + ver == SVR_P1020E || ver == SVR_P1020 || + ver == SVR_P2020E || ver == SVR_P2020) maxcpu = 2; else maxcpu = 1; @@ -280,24 +283,23 @@ bare_smp_start_cpu(platform_t plat, stru static void e500_reset(platform_t plat) { - uint32_t ver = SVR_VER(mfspr(SPR_SVR)); - if (ver == SVR_MPC8572E || ver == SVR_MPC8572 || - ver == SVR_MPC8548E || ver == SVR_MPC8548) - /* Systems with dedicated reset register */ - ccsr_write4(OCP85XX_RSTCR, 2); - else { - /* Clear DBCR0, disables debug interrupts and events. */ - mtspr(SPR_DBCR0, 0); - __asm __volatile("isync"); - - /* Enable Debug Interrupts in MSR. */ - mtmsr(mfmsr() | PSL_DE); - - /* Enable debug interrupts and issue reset. */ - mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | - DBCR0_RST_SYSTEM); - } + /* + * Try the dedicated reset register first. + * If the SoC doesn't have one, we'll fall + * back to using the debug control register. + */ + ccsr_write4(OCP85XX_RSTCR, 2); + + /* Clear DBCR0, disables debug interrupts and events. */ + mtspr(SPR_DBCR0, 0); + __asm __volatile("isync"); + + /* Enable Debug Interrupts in MSR. */ + mtmsr(mfmsr() | PSL_DE); + + /* Enable debug interrupts and issue reset. */ + mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | DBCR0_RST_SYSTEM); printf("Reset failed...\n"); while (1); From owner-svn-src-head@FreeBSD.ORG Sat May 28 00:21:30 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD8B8106566C; Sat, 28 May 2011 00:21:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A80688FC0C; Sat, 28 May 2011 00:21:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4S0LULE059303; Sat, 28 May 2011 00:21:30 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S0LTDs059235; Sat, 28 May 2011 00:21:29 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201105280021.p4S0LTDs059235@svn.freebsd.org> From: Doug Barton Date: Sat, 28 May 2011 00:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222395 - in head/contrib/bind9: . bin bin/check bin/dig bin/dig/include/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rn... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 00:21:30 -0000 Author: dougb Date: Sat May 28 00:21:28 2011 New Revision: 222395 URL: http://svn.freebsd.org/changeset/base/222395 Log: Upgrade to 9.6-ESV-R4-P1, which address the following issues: 1. Very large RRSIG RRsets included in a negative cache can trigger an assertion failure that will crash named (BIND 9 DNS) due to an off-by-one error in a buffer size check. This bug affects all resolving name servers, whether DNSSEC validation is enabled or not, on all BIND versions prior to today. There is a possibility of malicious exploitation of this bug by remote users. 2. Named could fail to validate zones listed in a DLV that validated insecure without using DLV and had DS records in the parent zone. Add a patch provided by ru@ and confirmed by ISC to fix a crash at shutdown time when a SIG(0) key is being used. Deleted: head/contrib/bind9/RELEASE-NOTES-BIND-9.6.3.html head/contrib/bind9/RELEASE-NOTES-BIND-9.6.3.pdf head/contrib/bind9/RELEASE-NOTES-BIND-9.6.3.txt Modified: head/contrib/bind9/CHANGES head/contrib/bind9/FAQ.xml head/contrib/bind9/Makefile.in head/contrib/bind9/README.idnkit head/contrib/bind9/acconfig.h head/contrib/bind9/bin/Makefile.in head/contrib/bind9/bin/check/Makefile.in head/contrib/bind9/bin/check/named-checkconf.8 head/contrib/bind9/bin/check/named-checkconf.docbook head/contrib/bind9/bin/check/named-checkconf.html head/contrib/bind9/bin/check/named-checkzone.8 head/contrib/bind9/bin/check/named-checkzone.docbook head/contrib/bind9/bin/check/named-checkzone.html head/contrib/bind9/bin/dig/Makefile.in head/contrib/bind9/bin/dig/dig.1 head/contrib/bind9/bin/dig/dig.docbook head/contrib/bind9/bin/dig/dig.html head/contrib/bind9/bin/dig/host.1 head/contrib/bind9/bin/dig/host.docbook head/contrib/bind9/bin/dig/host.html head/contrib/bind9/bin/dig/include/dig/dig.h head/contrib/bind9/bin/dig/nslookup.c head/contrib/bind9/bin/dnssec/Makefile.in head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook head/contrib/bind9/bin/dnssec/dnssec-keygen.8 head/contrib/bind9/bin/dnssec/dnssec-keygen.c head/contrib/bind9/bin/dnssec/dnssec-keygen.docbook head/contrib/bind9/bin/dnssec/dnssec-signzone.8 head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook head/contrib/bind9/bin/dnssec/dnssectool.c head/contrib/bind9/bin/dnssec/dnssectool.h head/contrib/bind9/bin/named/Makefile.in head/contrib/bind9/bin/named/bind9.xsl head/contrib/bind9/bin/named/config.c head/contrib/bind9/bin/named/controlconf.c head/contrib/bind9/bin/named/convertxsl.pl head/contrib/bind9/bin/named/include/named/builtin.h head/contrib/bind9/bin/named/include/named/client.h head/contrib/bind9/bin/named/include/named/config.h head/contrib/bind9/bin/named/include/named/control.h head/contrib/bind9/bin/named/include/named/interfacemgr.h head/contrib/bind9/bin/named/include/named/listenlist.h head/contrib/bind9/bin/named/include/named/log.h head/contrib/bind9/bin/named/include/named/logconf.h head/contrib/bind9/bin/named/include/named/lwaddr.h head/contrib/bind9/bin/named/include/named/lwdclient.h head/contrib/bind9/bin/named/include/named/lwresd.h head/contrib/bind9/bin/named/include/named/lwsearch.h head/contrib/bind9/bin/named/include/named/main.h head/contrib/bind9/bin/named/include/named/notify.h head/contrib/bind9/bin/named/include/named/ns_smf_globals.h head/contrib/bind9/bin/named/include/named/server.h head/contrib/bind9/bin/named/include/named/sortlist.h head/contrib/bind9/bin/named/include/named/statschannel.h head/contrib/bind9/bin/named/include/named/tkeyconf.h head/contrib/bind9/bin/named/include/named/tsigconf.h head/contrib/bind9/bin/named/include/named/types.h head/contrib/bind9/bin/named/include/named/update.h head/contrib/bind9/bin/named/include/named/xfrout.h head/contrib/bind9/bin/named/include/named/zoneconf.h head/contrib/bind9/bin/named/interfacemgr.c head/contrib/bind9/bin/named/listenlist.c head/contrib/bind9/bin/named/log.c head/contrib/bind9/bin/named/logconf.c head/contrib/bind9/bin/named/lwaddr.c head/contrib/bind9/bin/named/lwdclient.c head/contrib/bind9/bin/named/lwderror.c head/contrib/bind9/bin/named/lwdgabn.c head/contrib/bind9/bin/named/lwdgnba.c head/contrib/bind9/bin/named/lwdgrbn.c head/contrib/bind9/bin/named/lwdnoop.c head/contrib/bind9/bin/named/lwresd.8 head/contrib/bind9/bin/named/lwresd.c head/contrib/bind9/bin/named/lwresd.docbook head/contrib/bind9/bin/named/lwresd.html head/contrib/bind9/bin/named/lwsearch.c head/contrib/bind9/bin/named/named.8 head/contrib/bind9/bin/named/named.conf.5 head/contrib/bind9/bin/named/named.conf.docbook head/contrib/bind9/bin/named/named.conf.html head/contrib/bind9/bin/named/named.docbook head/contrib/bind9/bin/named/named.html head/contrib/bind9/bin/named/notify.c head/contrib/bind9/bin/named/sortlist.c head/contrib/bind9/bin/named/statschannel.c head/contrib/bind9/bin/named/tkeyconf.c head/contrib/bind9/bin/named/tsigconf.c head/contrib/bind9/bin/named/unix/Makefile.in head/contrib/bind9/bin/named/unix/include/named/os.h head/contrib/bind9/bin/named/unix/os.c head/contrib/bind9/bin/named/zoneconf.c head/contrib/bind9/bin/nsupdate/Makefile.in head/contrib/bind9/bin/nsupdate/nsupdate.c head/contrib/bind9/bin/rndc/Makefile.in head/contrib/bind9/bin/rndc/include/rndc/os.h head/contrib/bind9/bin/rndc/rndc-confgen.8 head/contrib/bind9/bin/rndc/rndc-confgen.c head/contrib/bind9/bin/rndc/rndc-confgen.docbook head/contrib/bind9/bin/rndc/rndc-confgen.html head/contrib/bind9/bin/rndc/rndc.8 head/contrib/bind9/bin/rndc/rndc.c head/contrib/bind9/bin/rndc/rndc.conf head/contrib/bind9/bin/rndc/rndc.conf.5 head/contrib/bind9/bin/rndc/rndc.conf.docbook head/contrib/bind9/bin/rndc/rndc.conf.html head/contrib/bind9/bin/rndc/rndc.docbook head/contrib/bind9/bin/rndc/rndc.html head/contrib/bind9/bin/rndc/unix/Makefile.in head/contrib/bind9/bin/rndc/unix/os.c head/contrib/bind9/bin/rndc/util.c head/contrib/bind9/bin/rndc/util.h head/contrib/bind9/doc/Makefile.in head/contrib/bind9/doc/arm/Bv9ARM.ch01.html head/contrib/bind9/doc/arm/Bv9ARM.ch02.html head/contrib/bind9/doc/arm/Bv9ARM.ch03.html head/contrib/bind9/doc/arm/Bv9ARM.ch04.html head/contrib/bind9/doc/arm/Bv9ARM.ch05.html head/contrib/bind9/doc/arm/Bv9ARM.ch10.html head/contrib/bind9/doc/arm/Makefile.in head/contrib/bind9/doc/arm/README-SGML head/contrib/bind9/doc/misc/Makefile.in head/contrib/bind9/doc/misc/dnssec head/contrib/bind9/doc/misc/format-options.pl head/contrib/bind9/doc/misc/ipv6 head/contrib/bind9/doc/misc/migration head/contrib/bind9/doc/misc/migration-4to9 head/contrib/bind9/doc/misc/rfc-compliance head/contrib/bind9/doc/misc/roadmap head/contrib/bind9/doc/misc/sdb head/contrib/bind9/doc/misc/sort-options.pl head/contrib/bind9/isc-config.sh.in head/contrib/bind9/lib/Makefile.in head/contrib/bind9/lib/bind9/Makefile.in head/contrib/bind9/lib/bind9/getaddresses.c head/contrib/bind9/lib/bind9/include/Makefile.in head/contrib/bind9/lib/bind9/include/bind9/Makefile.in head/contrib/bind9/lib/bind9/include/bind9/check.h head/contrib/bind9/lib/bind9/include/bind9/getaddresses.h head/contrib/bind9/lib/bind9/include/bind9/version.h head/contrib/bind9/lib/bind9/version.c head/contrib/bind9/lib/dns/acache.c head/contrib/bind9/lib/dns/acl.c head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/byaddr.c head/contrib/bind9/lib/dns/cache.c head/contrib/bind9/lib/dns/callbacks.c head/contrib/bind9/lib/dns/compress.c head/contrib/bind9/lib/dns/db.c head/contrib/bind9/lib/dns/dbiterator.c head/contrib/bind9/lib/dns/dbtable.c head/contrib/bind9/lib/dns/diff.c head/contrib/bind9/lib/dns/dispatch.c head/contrib/bind9/lib/dns/dlz.c head/contrib/bind9/lib/dns/dnssec.c head/contrib/bind9/lib/dns/ds.c head/contrib/bind9/lib/dns/dst_lib.c head/contrib/bind9/lib/dns/dst_openssl.h head/contrib/bind9/lib/dns/dst_parse.c head/contrib/bind9/lib/dns/dst_parse.h head/contrib/bind9/lib/dns/dst_result.c head/contrib/bind9/lib/dns/forward.c head/contrib/bind9/lib/dns/gen-unix.h head/contrib/bind9/lib/dns/gen.c head/contrib/bind9/lib/dns/gssapi_link.c head/contrib/bind9/lib/dns/hmac_link.c head/contrib/bind9/lib/dns/include/Makefile.in head/contrib/bind9/lib/dns/include/dns/Makefile.in head/contrib/bind9/lib/dns/include/dns/acache.h head/contrib/bind9/lib/dns/include/dns/acl.h head/contrib/bind9/lib/dns/include/dns/adb.h head/contrib/bind9/lib/dns/include/dns/bit.h head/contrib/bind9/lib/dns/include/dns/byaddr.h head/contrib/bind9/lib/dns/include/dns/cache.h head/contrib/bind9/lib/dns/include/dns/callbacks.h head/contrib/bind9/lib/dns/include/dns/cert.h head/contrib/bind9/lib/dns/include/dns/compress.h head/contrib/bind9/lib/dns/include/dns/db.h head/contrib/bind9/lib/dns/include/dns/dbiterator.h head/contrib/bind9/lib/dns/include/dns/dbtable.h head/contrib/bind9/lib/dns/include/dns/dispatch.h head/contrib/bind9/lib/dns/include/dns/dlz.h head/contrib/bind9/lib/dns/include/dns/dnssec.h head/contrib/bind9/lib/dns/include/dns/ds.h head/contrib/bind9/lib/dns/include/dns/fixedname.h head/contrib/bind9/lib/dns/include/dns/forward.h head/contrib/bind9/lib/dns/include/dns/iptable.h head/contrib/bind9/lib/dns/include/dns/journal.h head/contrib/bind9/lib/dns/include/dns/keyflags.h head/contrib/bind9/lib/dns/include/dns/keytable.h head/contrib/bind9/lib/dns/include/dns/keyvalues.h head/contrib/bind9/lib/dns/include/dns/lib.h head/contrib/bind9/lib/dns/include/dns/log.h head/contrib/bind9/lib/dns/include/dns/lookup.h head/contrib/bind9/lib/dns/include/dns/master.h head/contrib/bind9/lib/dns/include/dns/masterdump.h head/contrib/bind9/lib/dns/include/dns/message.h head/contrib/bind9/lib/dns/include/dns/nsec.h head/contrib/bind9/lib/dns/include/dns/nsec3.h head/contrib/bind9/lib/dns/include/dns/opcode.h head/contrib/bind9/lib/dns/include/dns/order.h head/contrib/bind9/lib/dns/include/dns/peer.h head/contrib/bind9/lib/dns/include/dns/portlist.h head/contrib/bind9/lib/dns/include/dns/rbt.h head/contrib/bind9/lib/dns/include/dns/rcode.h head/contrib/bind9/lib/dns/include/dns/rdata.h head/contrib/bind9/lib/dns/include/dns/rdataclass.h head/contrib/bind9/lib/dns/include/dns/rdatalist.h head/contrib/bind9/lib/dns/include/dns/rdataset.h head/contrib/bind9/lib/dns/include/dns/rdatasetiter.h head/contrib/bind9/lib/dns/include/dns/rdataslab.h head/contrib/bind9/lib/dns/include/dns/rdatatype.h head/contrib/bind9/lib/dns/include/dns/request.h head/contrib/bind9/lib/dns/include/dns/rootns.h head/contrib/bind9/lib/dns/include/dns/sdb.h head/contrib/bind9/lib/dns/include/dns/sdlz.h head/contrib/bind9/lib/dns/include/dns/secalg.h head/contrib/bind9/lib/dns/include/dns/secproto.h head/contrib/bind9/lib/dns/include/dns/soa.h head/contrib/bind9/lib/dns/include/dns/ssu.h head/contrib/bind9/lib/dns/include/dns/stats.h head/contrib/bind9/lib/dns/include/dns/tcpmsg.h head/contrib/bind9/lib/dns/include/dns/time.h head/contrib/bind9/lib/dns/include/dns/timer.h head/contrib/bind9/lib/dns/include/dns/tkey.h head/contrib/bind9/lib/dns/include/dns/ttl.h head/contrib/bind9/lib/dns/include/dns/version.h head/contrib/bind9/lib/dns/include/dns/xfrin.h head/contrib/bind9/lib/dns/include/dns/zonekey.h head/contrib/bind9/lib/dns/include/dns/zt.h head/contrib/bind9/lib/dns/include/dst/Makefile.in head/contrib/bind9/lib/dns/include/dst/gssapi.h head/contrib/bind9/lib/dns/include/dst/lib.h head/contrib/bind9/lib/dns/include/dst/result.h head/contrib/bind9/lib/dns/iptable.c head/contrib/bind9/lib/dns/key.c head/contrib/bind9/lib/dns/keytable.c head/contrib/bind9/lib/dns/lib.c head/contrib/bind9/lib/dns/log.c head/contrib/bind9/lib/dns/lookup.c head/contrib/bind9/lib/dns/master.c head/contrib/bind9/lib/dns/masterdump.c head/contrib/bind9/lib/dns/ncache.c head/contrib/bind9/lib/dns/nsec.c head/contrib/bind9/lib/dns/nsec3.c head/contrib/bind9/lib/dns/openssldh_link.c head/contrib/bind9/lib/dns/openssldsa_link.c head/contrib/bind9/lib/dns/opensslrsa_link.c head/contrib/bind9/lib/dns/order.c head/contrib/bind9/lib/dns/peer.c head/contrib/bind9/lib/dns/portlist.c head/contrib/bind9/lib/dns/rbt.c head/contrib/bind9/lib/dns/rbtdb.h head/contrib/bind9/lib/dns/rbtdb64.c head/contrib/bind9/lib/dns/rbtdb64.h head/contrib/bind9/lib/dns/rcode.c head/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c head/contrib/bind9/lib/dns/rdata/any_255/tsig_250.h head/contrib/bind9/lib/dns/rdata/ch_3/a_1.c head/contrib/bind9/lib/dns/rdata/ch_3/a_1.h head/contrib/bind9/lib/dns/rdata/generic/afsdb_18.c head/contrib/bind9/lib/dns/rdata/generic/afsdb_18.h head/contrib/bind9/lib/dns/rdata/generic/cert_37.c head/contrib/bind9/lib/dns/rdata/generic/cert_37.h head/contrib/bind9/lib/dns/rdata/generic/cname_5.c head/contrib/bind9/lib/dns/rdata/generic/cname_5.h head/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c head/contrib/bind9/lib/dns/rdata/generic/dlv_32769.h head/contrib/bind9/lib/dns/rdata/generic/dname_39.c head/contrib/bind9/lib/dns/rdata/generic/dname_39.h head/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c head/contrib/bind9/lib/dns/rdata/generic/dnskey_48.h head/contrib/bind9/lib/dns/rdata/generic/ds_43.c head/contrib/bind9/lib/dns/rdata/generic/ds_43.h head/contrib/bind9/lib/dns/rdata/generic/gpos_27.c head/contrib/bind9/lib/dns/rdata/generic/gpos_27.h head/contrib/bind9/lib/dns/rdata/generic/hinfo_13.c head/contrib/bind9/lib/dns/rdata/generic/hinfo_13.h head/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.h head/contrib/bind9/lib/dns/rdata/generic/isdn_20.c head/contrib/bind9/lib/dns/rdata/generic/isdn_20.h head/contrib/bind9/lib/dns/rdata/generic/key_25.c head/contrib/bind9/lib/dns/rdata/generic/key_25.h head/contrib/bind9/lib/dns/rdata/generic/loc_29.c head/contrib/bind9/lib/dns/rdata/generic/loc_29.h head/contrib/bind9/lib/dns/rdata/generic/mb_7.c head/contrib/bind9/lib/dns/rdata/generic/mb_7.h head/contrib/bind9/lib/dns/rdata/generic/md_3.c head/contrib/bind9/lib/dns/rdata/generic/md_3.h head/contrib/bind9/lib/dns/rdata/generic/mf_4.c head/contrib/bind9/lib/dns/rdata/generic/mf_4.h head/contrib/bind9/lib/dns/rdata/generic/mg_8.c head/contrib/bind9/lib/dns/rdata/generic/mg_8.h head/contrib/bind9/lib/dns/rdata/generic/minfo_14.c head/contrib/bind9/lib/dns/rdata/generic/minfo_14.h head/contrib/bind9/lib/dns/rdata/generic/mr_9.c head/contrib/bind9/lib/dns/rdata/generic/mr_9.h head/contrib/bind9/lib/dns/rdata/generic/mx_15.c head/contrib/bind9/lib/dns/rdata/generic/mx_15.h head/contrib/bind9/lib/dns/rdata/generic/ns_2.c head/contrib/bind9/lib/dns/rdata/generic/ns_2.h head/contrib/bind9/lib/dns/rdata/generic/nsec3_50.c head/contrib/bind9/lib/dns/rdata/generic/nsec3_50.h head/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.c head/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.h head/contrib/bind9/lib/dns/rdata/generic/nsec_47.h head/contrib/bind9/lib/dns/rdata/generic/null_10.c head/contrib/bind9/lib/dns/rdata/generic/null_10.h head/contrib/bind9/lib/dns/rdata/generic/nxt_30.c head/contrib/bind9/lib/dns/rdata/generic/nxt_30.h head/contrib/bind9/lib/dns/rdata/generic/opt_41.c head/contrib/bind9/lib/dns/rdata/generic/opt_41.h head/contrib/bind9/lib/dns/rdata/generic/proforma.c head/contrib/bind9/lib/dns/rdata/generic/proforma.h head/contrib/bind9/lib/dns/rdata/generic/ptr_12.c head/contrib/bind9/lib/dns/rdata/generic/ptr_12.h head/contrib/bind9/lib/dns/rdata/generic/rp_17.c head/contrib/bind9/lib/dns/rdata/generic/rp_17.h head/contrib/bind9/lib/dns/rdata/generic/rrsig_46.h head/contrib/bind9/lib/dns/rdata/generic/rt_21.c head/contrib/bind9/lib/dns/rdata/generic/rt_21.h head/contrib/bind9/lib/dns/rdata/generic/sig_24.c head/contrib/bind9/lib/dns/rdata/generic/sig_24.h head/contrib/bind9/lib/dns/rdata/generic/soa_6.c head/contrib/bind9/lib/dns/rdata/generic/soa_6.h head/contrib/bind9/lib/dns/rdata/generic/spf_99.c head/contrib/bind9/lib/dns/rdata/generic/spf_99.h head/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c head/contrib/bind9/lib/dns/rdata/generic/sshfp_44.h head/contrib/bind9/lib/dns/rdata/generic/tkey_249.c head/contrib/bind9/lib/dns/rdata/generic/tkey_249.h head/contrib/bind9/lib/dns/rdata/generic/txt_16.c head/contrib/bind9/lib/dns/rdata/generic/txt_16.h head/contrib/bind9/lib/dns/rdata/generic/unspec_103.c head/contrib/bind9/lib/dns/rdata/generic/unspec_103.h head/contrib/bind9/lib/dns/rdata/generic/x25_19.c head/contrib/bind9/lib/dns/rdata/generic/x25_19.h head/contrib/bind9/lib/dns/rdata/hs_4/a_1.c head/contrib/bind9/lib/dns/rdata/hs_4/a_1.h head/contrib/bind9/lib/dns/rdata/in_1/a6_38.c head/contrib/bind9/lib/dns/rdata/in_1/a6_38.h head/contrib/bind9/lib/dns/rdata/in_1/a_1.c head/contrib/bind9/lib/dns/rdata/in_1/a_1.h head/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.c head/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.h head/contrib/bind9/lib/dns/rdata/in_1/apl_42.c head/contrib/bind9/lib/dns/rdata/in_1/apl_42.h head/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.c head/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.h head/contrib/bind9/lib/dns/rdata/in_1/kx_36.c head/contrib/bind9/lib/dns/rdata/in_1/kx_36.h head/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c head/contrib/bind9/lib/dns/rdata/in_1/naptr_35.h head/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.c head/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.h head/contrib/bind9/lib/dns/rdata/in_1/nsap_22.c head/contrib/bind9/lib/dns/rdata/in_1/nsap_22.h head/contrib/bind9/lib/dns/rdata/in_1/px_26.c head/contrib/bind9/lib/dns/rdata/in_1/px_26.h head/contrib/bind9/lib/dns/rdata/in_1/srv_33.c head/contrib/bind9/lib/dns/rdata/in_1/srv_33.h head/contrib/bind9/lib/dns/rdata/in_1/wks_11.c head/contrib/bind9/lib/dns/rdata/in_1/wks_11.h head/contrib/bind9/lib/dns/rdata/rdatastructpre.h head/contrib/bind9/lib/dns/rdata/rdatastructsuf.h head/contrib/bind9/lib/dns/rdatalist_p.h head/contrib/bind9/lib/dns/rdataset.c head/contrib/bind9/lib/dns/rdatasetiter.c head/contrib/bind9/lib/dns/request.c head/contrib/bind9/lib/dns/soa.c head/contrib/bind9/lib/dns/spnego.asn1 head/contrib/bind9/lib/dns/spnego.c head/contrib/bind9/lib/dns/spnego.h head/contrib/bind9/lib/dns/spnego_asn1.c head/contrib/bind9/lib/dns/spnego_asn1.pl head/contrib/bind9/lib/dns/ssu.c head/contrib/bind9/lib/dns/stats.c head/contrib/bind9/lib/dns/tcpmsg.c head/contrib/bind9/lib/dns/timer.c head/contrib/bind9/lib/dns/ttl.c head/contrib/bind9/lib/dns/validator.c head/contrib/bind9/lib/dns/version.c head/contrib/bind9/lib/dns/xfrin.c head/contrib/bind9/lib/dns/zonekey.c head/contrib/bind9/lib/dns/zt.c head/contrib/bind9/lib/isc/alpha/Makefile.in head/contrib/bind9/lib/isc/alpha/include/Makefile.in head/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in head/contrib/bind9/lib/isc/alpha/include/isc/atomic.h head/contrib/bind9/lib/isc/assertions.c head/contrib/bind9/lib/isc/base32.c head/contrib/bind9/lib/isc/base64.c head/contrib/bind9/lib/isc/bitstring.c head/contrib/bind9/lib/isc/buffer.c head/contrib/bind9/lib/isc/bufferlist.c head/contrib/bind9/lib/isc/commandline.c head/contrib/bind9/lib/isc/error.c head/contrib/bind9/lib/isc/event.c head/contrib/bind9/lib/isc/fsaccess.c head/contrib/bind9/lib/isc/hash.c head/contrib/bind9/lib/isc/heap.c head/contrib/bind9/lib/isc/hex.c head/contrib/bind9/lib/isc/hmacmd5.c head/contrib/bind9/lib/isc/hmacsha.c head/contrib/bind9/lib/isc/httpd.c head/contrib/bind9/lib/isc/ia64/Makefile.in head/contrib/bind9/lib/isc/ia64/include/Makefile.in head/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h head/contrib/bind9/lib/isc/include/Makefile.in head/contrib/bind9/lib/isc/include/isc/Makefile.in head/contrib/bind9/lib/isc/include/isc/app.h head/contrib/bind9/lib/isc/include/isc/assertions.h head/contrib/bind9/lib/isc/include/isc/base32.h head/contrib/bind9/lib/isc/include/isc/base64.h head/contrib/bind9/lib/isc/include/isc/bitstring.h head/contrib/bind9/lib/isc/include/isc/boolean.h head/contrib/bind9/lib/isc/include/isc/buffer.h head/contrib/bind9/lib/isc/include/isc/bufferlist.h head/contrib/bind9/lib/isc/include/isc/commandline.h head/contrib/bind9/lib/isc/include/isc/entropy.h head/contrib/bind9/lib/isc/include/isc/error.h head/contrib/bind9/lib/isc/include/isc/event.h head/contrib/bind9/lib/isc/include/isc/eventclass.h head/contrib/bind9/lib/isc/include/isc/file.h head/contrib/bind9/lib/isc/include/isc/formatcheck.h head/contrib/bind9/lib/isc/include/isc/fsaccess.h head/contrib/bind9/lib/isc/include/isc/hash.h head/contrib/bind9/lib/isc/include/isc/heap.h head/contrib/bind9/lib/isc/include/isc/hex.h head/contrib/bind9/lib/isc/include/isc/hmacmd5.h head/contrib/bind9/lib/isc/include/isc/hmacsha.h head/contrib/bind9/lib/isc/include/isc/httpd.h head/contrib/bind9/lib/isc/include/isc/interfaceiter.h head/contrib/bind9/lib/isc/include/isc/ipv6.h head/contrib/bind9/lib/isc/include/isc/iterated_hash.h head/contrib/bind9/lib/isc/include/isc/lang.h head/contrib/bind9/lib/isc/include/isc/lex.h head/contrib/bind9/lib/isc/include/isc/lfsr.h head/contrib/bind9/lib/isc/include/isc/lib.h head/contrib/bind9/lib/isc/include/isc/list.h head/contrib/bind9/lib/isc/include/isc/log.h head/contrib/bind9/lib/isc/include/isc/magic.h head/contrib/bind9/lib/isc/include/isc/md5.h head/contrib/bind9/lib/isc/include/isc/msgcat.h head/contrib/bind9/lib/isc/include/isc/msgs.h head/contrib/bind9/lib/isc/include/isc/mutexblock.h head/contrib/bind9/lib/isc/include/isc/netaddr.h head/contrib/bind9/lib/isc/include/isc/netscope.h head/contrib/bind9/lib/isc/include/isc/ondestroy.h head/contrib/bind9/lib/isc/include/isc/os.h head/contrib/bind9/lib/isc/include/isc/parseint.h head/contrib/bind9/lib/isc/include/isc/portset.h head/contrib/bind9/lib/isc/include/isc/print.h head/contrib/bind9/lib/isc/include/isc/quota.h head/contrib/bind9/lib/isc/include/isc/radix.h head/contrib/bind9/lib/isc/include/isc/random.h head/contrib/bind9/lib/isc/include/isc/ratelimiter.h head/contrib/bind9/lib/isc/include/isc/refcount.h head/contrib/bind9/lib/isc/include/isc/region.h head/contrib/bind9/lib/isc/include/isc/resource.h head/contrib/bind9/lib/isc/include/isc/result.h head/contrib/bind9/lib/isc/include/isc/resultclass.h head/contrib/bind9/lib/isc/include/isc/rwlock.h head/contrib/bind9/lib/isc/include/isc/serial.h head/contrib/bind9/lib/isc/include/isc/sha1.h head/contrib/bind9/lib/isc/include/isc/sha2.h head/contrib/bind9/lib/isc/include/isc/sockaddr.h head/contrib/bind9/lib/isc/include/isc/socket.h head/contrib/bind9/lib/isc/include/isc/stats.h head/contrib/bind9/lib/isc/include/isc/stdio.h head/contrib/bind9/lib/isc/include/isc/stdlib.h head/contrib/bind9/lib/isc/include/isc/string.h head/contrib/bind9/lib/isc/include/isc/symtab.h head/contrib/bind9/lib/isc/include/isc/taskpool.h head/contrib/bind9/lib/isc/include/isc/timer.h head/contrib/bind9/lib/isc/include/isc/types.h head/contrib/bind9/lib/isc/include/isc/util.h head/contrib/bind9/lib/isc/include/isc/version.h head/contrib/bind9/lib/isc/include/isc/xml.h head/contrib/bind9/lib/isc/inet_aton.c head/contrib/bind9/lib/isc/inet_ntop.c head/contrib/bind9/lib/isc/inet_pton.c head/contrib/bind9/lib/isc/iterated_hash.c head/contrib/bind9/lib/isc/lex.c head/contrib/bind9/lib/isc/lfsr.c head/contrib/bind9/lib/isc/lib.c head/contrib/bind9/lib/isc/log.c head/contrib/bind9/lib/isc/md5.c head/contrib/bind9/lib/isc/mips/Makefile.in head/contrib/bind9/lib/isc/mips/include/Makefile.in head/contrib/bind9/lib/isc/mips/include/isc/Makefile.in head/contrib/bind9/lib/isc/mips/include/isc/atomic.h head/contrib/bind9/lib/isc/mutexblock.c head/contrib/bind9/lib/isc/netaddr.c head/contrib/bind9/lib/isc/netscope.c head/contrib/bind9/lib/isc/nls/Makefile.in head/contrib/bind9/lib/isc/nls/msgcat.c head/contrib/bind9/lib/isc/noatomic/Makefile.in head/contrib/bind9/lib/isc/noatomic/include/Makefile.in head/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in head/contrib/bind9/lib/isc/noatomic/include/isc/atomic.h head/contrib/bind9/lib/isc/nothreads/condition.c head/contrib/bind9/lib/isc/nothreads/include/Makefile.in head/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in head/contrib/bind9/lib/isc/nothreads/include/isc/condition.h head/contrib/bind9/lib/isc/nothreads/include/isc/mutex.h head/contrib/bind9/lib/isc/nothreads/include/isc/once.h head/contrib/bind9/lib/isc/nothreads/include/isc/thread.h head/contrib/bind9/lib/isc/nothreads/mutex.c head/contrib/bind9/lib/isc/nothreads/thread.c head/contrib/bind9/lib/isc/ondestroy.c head/contrib/bind9/lib/isc/parseint.c head/contrib/bind9/lib/isc/portset.c head/contrib/bind9/lib/isc/powerpc/Makefile.in head/contrib/bind9/lib/isc/powerpc/include/Makefile.in head/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in head/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h head/contrib/bind9/lib/isc/pthreads/Makefile.in head/contrib/bind9/lib/isc/pthreads/condition.c head/contrib/bind9/lib/isc/pthreads/include/Makefile.in head/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in head/contrib/bind9/lib/isc/pthreads/include/isc/condition.h head/contrib/bind9/lib/isc/pthreads/include/isc/mutex.h head/contrib/bind9/lib/isc/pthreads/include/isc/once.h head/contrib/bind9/lib/isc/pthreads/include/isc/thread.h head/contrib/bind9/lib/isc/pthreads/thread.c head/contrib/bind9/lib/isc/quota.c head/contrib/bind9/lib/isc/radix.c head/contrib/bind9/lib/isc/random.c head/contrib/bind9/lib/isc/ratelimiter.c head/contrib/bind9/lib/isc/refcount.c head/contrib/bind9/lib/isc/region.c head/contrib/bind9/lib/isc/result.c head/contrib/bind9/lib/isc/rwlock.c head/contrib/bind9/lib/isc/serial.c head/contrib/bind9/lib/isc/sha1.c head/contrib/bind9/lib/isc/sha2.c head/contrib/bind9/lib/isc/sockaddr.c head/contrib/bind9/lib/isc/sparc64/Makefile.in head/contrib/bind9/lib/isc/sparc64/include/Makefile.in head/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in head/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h head/contrib/bind9/lib/isc/stats.c head/contrib/bind9/lib/isc/string.c head/contrib/bind9/lib/isc/strtoul.c head/contrib/bind9/lib/isc/symtab.c head/contrib/bind9/lib/isc/task_p.h head/contrib/bind9/lib/isc/taskpool.c head/contrib/bind9/lib/isc/timer.c head/contrib/bind9/lib/isc/timer_p.h head/contrib/bind9/lib/isc/unix/Makefile.in head/contrib/bind9/lib/isc/unix/app.c head/contrib/bind9/lib/isc/unix/dir.c head/contrib/bind9/lib/isc/unix/entropy.c head/contrib/bind9/lib/isc/unix/errno2result.c head/contrib/bind9/lib/isc/unix/errno2result.h head/contrib/bind9/lib/isc/unix/file.c head/contrib/bind9/lib/isc/unix/fsaccess.c head/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c head/contrib/bind9/lib/isc/unix/ifiter_ioctl.c head/contrib/bind9/lib/isc/unix/ifiter_sysctl.c head/contrib/bind9/lib/isc/unix/include/Makefile.in head/contrib/bind9/lib/isc/unix/include/isc/Makefile.in head/contrib/bind9/lib/isc/unix/include/isc/dir.h head/contrib/bind9/lib/isc/unix/include/isc/int.h head/contrib/bind9/lib/isc/unix/include/isc/keyboard.h head/contrib/bind9/lib/isc/unix/include/isc/net.h head/contrib/bind9/lib/isc/unix/include/isc/netdb.h head/contrib/bind9/lib/isc/unix/include/isc/offset.h head/contrib/bind9/lib/isc/unix/include/isc/stat.h head/contrib/bind9/lib/isc/unix/include/isc/stdtime.h head/contrib/bind9/lib/isc/unix/include/isc/strerror.h head/contrib/bind9/lib/isc/unix/include/isc/syslog.h head/contrib/bind9/lib/isc/unix/include/isc/time.h head/contrib/bind9/lib/isc/unix/interfaceiter.c head/contrib/bind9/lib/isc/unix/ipv6.c head/contrib/bind9/lib/isc/unix/keyboard.c head/contrib/bind9/lib/isc/unix/net.c head/contrib/bind9/lib/isc/unix/os.c head/contrib/bind9/lib/isc/unix/resource.c head/contrib/bind9/lib/isc/unix/socket_p.h head/contrib/bind9/lib/isc/unix/stdio.c head/contrib/bind9/lib/isc/unix/stdtime.c head/contrib/bind9/lib/isc/unix/strerror.c head/contrib/bind9/lib/isc/unix/syslog.c head/contrib/bind9/lib/isc/unix/time.c head/contrib/bind9/lib/isc/version.c head/contrib/bind9/lib/isc/x86_32/Makefile.in head/contrib/bind9/lib/isc/x86_32/include/Makefile.in head/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in head/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h head/contrib/bind9/lib/isc/x86_64/Makefile.in head/contrib/bind9/lib/isc/x86_64/include/Makefile.in head/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in head/contrib/bind9/lib/isc/x86_64/include/isc/atomic.h head/contrib/bind9/lib/isccc/Makefile.in head/contrib/bind9/lib/isccc/alist.c head/contrib/bind9/lib/isccc/base64.c head/contrib/bind9/lib/isccc/cc.c head/contrib/bind9/lib/isccc/ccmsg.c head/contrib/bind9/lib/isccc/include/Makefile.in head/contrib/bind9/lib/isccc/include/isccc/Makefile.in head/contrib/bind9/lib/isccc/include/isccc/alist.h head/contrib/bind9/lib/isccc/include/isccc/base64.h head/contrib/bind9/lib/isccc/include/isccc/cc.h head/contrib/bind9/lib/isccc/include/isccc/ccmsg.h head/contrib/bind9/lib/isccc/include/isccc/events.h head/contrib/bind9/lib/isccc/include/isccc/lib.h head/contrib/bind9/lib/isccc/include/isccc/result.h head/contrib/bind9/lib/isccc/include/isccc/sexpr.h head/contrib/bind9/lib/isccc/include/isccc/symtab.h head/contrib/bind9/lib/isccc/include/isccc/symtype.h head/contrib/bind9/lib/isccc/include/isccc/types.h head/contrib/bind9/lib/isccc/include/isccc/util.h head/contrib/bind9/lib/isccc/include/isccc/version.h head/contrib/bind9/lib/isccc/lib.c head/contrib/bind9/lib/isccc/result.c head/contrib/bind9/lib/isccc/sexpr.c head/contrib/bind9/lib/isccc/symtab.c head/contrib/bind9/lib/isccc/version.c head/contrib/bind9/lib/isccfg/Makefile.in head/contrib/bind9/lib/isccfg/aclconf.c head/contrib/bind9/lib/isccfg/include/Makefile.in head/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in head/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h head/contrib/bind9/lib/isccfg/include/isccfg/cfg.h head/contrib/bind9/lib/isccfg/include/isccfg/grammar.h head/contrib/bind9/lib/isccfg/include/isccfg/log.h head/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h head/contrib/bind9/lib/isccfg/include/isccfg/version.h head/contrib/bind9/lib/isccfg/log.c head/contrib/bind9/lib/isccfg/parser.c head/contrib/bind9/lib/isccfg/version.c head/contrib/bind9/lib/lwres/Makefile.in head/contrib/bind9/lib/lwres/assert_p.h head/contrib/bind9/lib/lwres/context.c head/contrib/bind9/lib/lwres/context_p.h head/contrib/bind9/lib/lwres/gai_strerror.c head/contrib/bind9/lib/lwres/getaddrinfo.c head/contrib/bind9/lib/lwres/gethost.c head/contrib/bind9/lib/lwres/getipnode.c head/contrib/bind9/lib/lwres/getnameinfo.c head/contrib/bind9/lib/lwres/getrrset.c head/contrib/bind9/lib/lwres/herror.c head/contrib/bind9/lib/lwres/include/Makefile.in head/contrib/bind9/lib/lwres/include/lwres/Makefile.in head/contrib/bind9/lib/lwres/include/lwres/context.h head/contrib/bind9/lib/lwres/include/lwres/int.h head/contrib/bind9/lib/lwres/include/lwres/ipv6.h head/contrib/bind9/lib/lwres/include/lwres/lang.h head/contrib/bind9/lib/lwres/include/lwres/list.h head/contrib/bind9/lib/lwres/include/lwres/lwbuffer.h head/contrib/bind9/lib/lwres/include/lwres/lwpacket.h head/contrib/bind9/lib/lwres/include/lwres/lwres.h head/contrib/bind9/lib/lwres/include/lwres/netdb.h.in head/contrib/bind9/lib/lwres/include/lwres/platform.h.in head/contrib/bind9/lib/lwres/include/lwres/result.h head/contrib/bind9/lib/lwres/include/lwres/stdlib.h head/contrib/bind9/lib/lwres/include/lwres/version.h head/contrib/bind9/lib/lwres/lwbuffer.c head/contrib/bind9/lib/lwres/lwconfig.c head/contrib/bind9/lib/lwres/lwinetaton.c head/contrib/bind9/lib/lwres/lwinetntop.c head/contrib/bind9/lib/lwres/lwinetpton.c head/contrib/bind9/lib/lwres/lwpacket.c head/contrib/bind9/lib/lwres/lwres_gabn.c head/contrib/bind9/lib/lwres/lwres_gnba.c head/contrib/bind9/lib/lwres/lwres_grbn.c head/contrib/bind9/lib/lwres/lwres_noop.c head/contrib/bind9/lib/lwres/lwresutil.c head/contrib/bind9/lib/lwres/man/Makefile.in head/contrib/bind9/lib/lwres/man/lwres.3 head/contrib/bind9/lib/lwres/man/lwres.docbook head/contrib/bind9/lib/lwres/man/lwres_buffer.3 head/contrib/bind9/lib/lwres/man/lwres_buffer.docbook head/contrib/bind9/lib/lwres/man/lwres_config.3 head/contrib/bind9/lib/lwres/man/lwres_config.docbook head/contrib/bind9/lib/lwres/man/lwres_context.3 head/contrib/bind9/lib/lwres/man/lwres_context.docbook head/contrib/bind9/lib/lwres/man/lwres_gabn.3 head/contrib/bind9/lib/lwres/man/lwres_gabn.docbook head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook head/contrib/bind9/lib/lwres/man/lwres_gethostent.3 head/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook head/contrib/bind9/lib/lwres/man/lwres_getipnode.3 head/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook head/contrib/bind9/lib/lwres/man/lwres_gnba.3 head/contrib/bind9/lib/lwres/man/lwres_gnba.docbook head/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 head/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook head/contrib/bind9/lib/lwres/man/lwres_inetntop.3 head/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook head/contrib/bind9/lib/lwres/man/lwres_noop.3 head/contrib/bind9/lib/lwres/man/lwres_noop.docbook head/contrib/bind9/lib/lwres/man/lwres_packet.3 head/contrib/bind9/lib/lwres/man/lwres_packet.docbook head/contrib/bind9/lib/lwres/man/lwres_resutil.3 head/contrib/bind9/lib/lwres/man/lwres_resutil.docbook head/contrib/bind9/lib/lwres/print.c head/contrib/bind9/lib/lwres/strtoul.c head/contrib/bind9/lib/lwres/unix/Makefile.in head/contrib/bind9/lib/lwres/unix/include/Makefile.in head/contrib/bind9/lib/lwres/unix/include/lwres/Makefile.in head/contrib/bind9/lib/lwres/unix/include/lwres/net.h head/contrib/bind9/lib/lwres/version.c head/contrib/bind9/make/Makefile.in head/contrib/bind9/make/includes.in head/contrib/bind9/make/rules.in head/contrib/bind9/mkinstalldirs head/contrib/bind9/version Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/CHANGES Sat May 28 00:21:28 2011 (r222395) @@ -1,3 +1,16 @@ + --- 9.6-ESV-R4-P1 released --- + +3121. [security] An authoritative name server sending a negative + response containing a very large RRset could + trigger an off-by-one error in the ncache code + and crash named. [RT #24650] + +3120. [bug] Named could fail to validate zones listed in a DLV + that validated insecure without using DLV and had + DS records in the parent zone. [RT #24631] + + --- 9.6-ESV-R4 released --- + --- 9.6.3 released --- 3009. [bug] clients-per-query code didn't work as expected with @@ -50,51 +63,9 @@ wrong lock which could lead to server deadlock. [RT #22614] -2972. [bug] win32: address windows socket errors. [RT #21906] - -2971. [bug] Fixed a bug that caused journal files not to be - compacted on Windows systems as a result of - non-POSIX-compliant rename() semantics. [RT #22434] - -2970. [security] Adding a NO DATA negative cache entry failed to clear - any matching RRSIG records. A subsequent lookup of - of NO DATA cache entry could trigger a INSIST when the - unexpected RRSIG was also returned with the NO DATA - cache entry. - - CVE-2010-3613, VU#706148. [RT #22288] - -2969. [security] Fix acl type processing so that allow-query works - in options and view statements. Also add a new - set of tests to verify proper functioning. - - CVE-2010-3615, VU#510208. [RT #22418] - -2968. [security] Named could fail to prove a data set was insecure - before marking it as insecure. One set of conditions - that can trigger this occurs naturally when rolling - DNSKEY algorithms. - - CVE-2010-3614, VU#837744. [RT #22309] - -2967. [bug] 'host -D' now turns on debugging messages earlier. - [RT #22361] - -2966. [bug] isc_print_vsnprintf() failed to check if there was - space available in the buffer when adding a left - justified character with a non zero width, - (e.g. "%-1c"). [RT #22270] - 2965. [func] Test HMAC functions using test data from RFC 2104 and RFC 4634. [RT #21702] -2964. [bug] view->queryacl was being overloaded. Seperate the - usage into view->queryacl, view->cacheacl and - view->queryonacl. [RT #22114] - -2962. [port] win32: add more dependencies to BINDBuild.dsw. - [RT #22062] - 2960. [func] Check that named accepts non-authoritative answers. [RT #21594] @@ -114,13 +85,6 @@ exact match" message when returning a wildcard no data response. [RT #21744] -2952. [port] win32: named-checkzone and named-checkconf failed - to initialise winsock. [RT #21932] - -2951. [bug] named failed to generate a correct signed response - in a optout, delegation only zone with no secure - delegations. [RT #22007] - 2950. [bug] named failed to perform a SOA up to date check when falling back to TCP on UDP timeouts when ixfr-from-differences was set. [RT #21595] @@ -139,27 +103,6 @@ 2941. [bug] sdb and sdlz (dlz's zone database) failed to support DNAME at the zone apex. [RT #21610] -2939. [func] Check that named successfully skips NSEC3 records - that fail to match the NSEC3PARAM record currently - in use. [RT# 21868] - -2937. [bug] Worked around an apparent race condition in over - memory conditions. Without this fix a DNS cache DB or - ADB could incorrectly stay in an over memory state, - effectively refusing further caching, which - subsequently made a BIND 9 caching server unworkable. - This fix prevents this problem from happening by - polling the state of the memory context, rather than - making a copy of the state, which appeared to cause - a race. This is a "workaround" in that it doesn't - solve the possible race per se, but several experiments - proved this change solves the symptom. Also, the - polling overhead hasn't been reported to be an issue. - This bug should only affect a caching server that - specifies a finite max-cache-size. It's also quite - likely that the bug happens only when enabling threads, - but it's not confirmed yet. [RT #21818] - 2935. [bug] nsupdate: improve 'file not found' error message. [RT #21871] @@ -189,17 +132,11 @@ smaller) [RT #19737] -2925. [bug] Named failed to accept uncachable negative responses - from insecure zones. [RT# 21555] - 2923. [bug] 'dig +trace' could drop core after "connection timeout". [RT #21514] 2922. [contrib] Update zkt to version 1.0. -2921. [bug] The resolver could attempt to destroy a fetch context - too soon. [RT #19878] - 2918. [maint] Add AAAA address for I.ROOT-SERVERS.NET. 2916. [func] Add framework to use IPv6 in tests. @@ -229,10 +166,6 @@ 2901. [port] Use AC_C_FLEXIBLE_ARRAY_MEMBER. [RT #21316] -2900. [bug] The placeholder negative caching element was not - properly constructed triggering a INSIST in - dns_ncache_towire(). [RT #21346] - 2899. [port] win32: Support linking against OpenSSL 1.0.0. 2898. [bug] nslookup leaked memory when -domain=value was @@ -243,9 +176,6 @@ 2891. [maint] Update empty-zones list to match draft-ietf-dnsop-default-local-zones-13. [RT# 21099] -2890. [bug] Handle the introduction of new trusted-keys and - DS, DLV RRsets better. [RT #21097] - 2889. [bug] Elements of the grammar where not properly reported. [RT #21046] @@ -272,9 +202,6 @@ 2877. [bug] The validator failed to skip obviously mismatching RRSIGs. [RT #21138] -2876. [bug] Named could return SERVFAIL for negative responses - from unsigned zones. [RT #21131] - 2875. [bug] dns_time64_fromtext() could accept non digits. [RT #21033] @@ -284,9 +211,6 @@ 2870. [maint] Add AAAA address for L.ROOT-SERVERS.NET. -2869. [bug] Fix arguments to dns_keytable_findnextkeynode() call. - [RT #20877] - 2868. [cleanup] Run "make clean" at the end of configure to ensure any changes made by configure are integrated. Use --with-make-clean=no to disable. [RT #20994] @@ -322,11 +246,108 @@ 2853. [bug] add_sigs() could run out of scratch space. [RT #21015] -2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] - 2851. [doc] nslookup.1, removed from the docbook source as it produced bad nroff. [RT #21007] + --- 9.6-ESV-R3 released --- + +2972. [bug] win32: address windows socket errors. [RT #21906] + +2971. [bug] Fixed a bug that caused journal files not to be + compacted on Windows systems as a result of + non-POSIX-compliant rename() semantics. [RT #22434] + +2970. [security] Adding a NO DATA negative cache entry failed to clear + any matching RRSIG records. A subsequent lookup of + of NO DATA cache entry could trigger a INSIST when the + unexpected RRSIG was also returned with the NO DATA + cache entry. + + CVE-2010-3613, VU#706148. [RT #22288] + +2969. [security] Fix acl type processing so that allow-query works + in options and view statements. Also add a new + set of tests to verify proper functioning. + + CVE-2010-3615, VU#510208. [RT #22418] + +2968. [security] Named could fail to prove a data set was insecure + before marking it as insecure. One set of conditions + that can trigger this occurs naturally when rolling + DNSKEY algorithms. + + CVE-2010-3614, VU#837744. [RT #22309] + +2967. [bug] 'host -D' now turns on debugging messages earlier. + [RT #22361] + +2966. [bug] isc_print_vsnprintf() failed to check if there was + space available in the buffer when adding a left + justified character with a non zero width, + (e.g. "%-1c"). [RT #22270] + +2964. [bug] view->queryacl was being overloaded. Seperate the + usage into view->queryacl, view->cacheacl and + view->queryonacl. [RT #22114] + +2962. [port] win32: add more dependencies to BINDBuild.dsw. + [RT #22062] + +2952. [port] win32: named-checkzone and named-checkconf failed + to initialise winsock. [RT #21932] + +2951. [bug] named failed to generate a correct signed response + in a optout, delegation only zone with no secure + delegations. [RT #22007] + + --- 9.6-ESV-R2 released --- + +2939. [func] Check that named successfully skips NSEC3 records + that fail to match the NSEC3PARAM record currently + in use. [RT# 21868] + +2937. [bug] Worked around an apparent race condition in over + memory conditions. Without this fix a DNS cache DB or + ADB could incorrectly stay in an over memory state, + effectively refusing further caching, which + subsequently made a BIND 9 caching server unworkable. + This fix prevents this problem from happening by + polling the state of the memory context, rather than + making a copy of the state, which appeared to cause + a race. This is a "workaround" in that it doesn't + solve the possible race per se, but several experiments + proved this change solves the symptom. Also, the + polling overhead hasn't been reported to be an issue. + This bug should only affect a caching server that + specifies a finite max-cache-size. It's also quite + likely that the bug happens only when enabling threads, + but it's not confirmed yet. [RT #21818] + +2925. [bug] Named failed to accept uncachable negative responses + from insecure zones. [RT# 21555] + +2921. [bug] The resolver could attempt to destroy a fetch context + too soon. [RT #19878] + +2900. [bug] The placeholder negative caching element was not + properly constructed triggering a INSIST in + dns_ncache_towire(). [RT #21346] + +2890. [bug] Handle the introduction of new trusted-keys and + DS, DLV RRsets better. [RT #21097] + +2869. [bug] Fix arguments to dns_keytable_findnextkeynode() call. + [RT #20877] + + --- 9.6-ESV-R1 released --- + +2876. [bug] Named could return SERVFAIL for negative responses + from unsigned zones. [RT #21131] + + --- 9.6-ESV released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] + --- 9.6.2 released --- 2850. [bug] If isc_heap_insert() failed due to memory shortage Modified: head/contrib/bind9/FAQ.xml ============================================================================== --- head/contrib/bind9/FAQ.xml Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/FAQ.xml Sat May 28 00:21:28 2011 (r222395) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - +
Frequently Asked Questions about BIND 9 Modified: head/contrib/bind9/Makefile.in ============================================================================== --- head/contrib/bind9/Makefile.in Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/Makefile.in Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.52.48.2 2009/02/20 23:47:23 tbox Exp $ +# $Id: Makefile.in,v 1.52.48.2 2009-02-20 23:47:23 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/README.idnkit ============================================================================== --- head/contrib/bind9/README.idnkit Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/README.idnkit Sat May 28 00:21:28 2011 (r222395) @@ -109,4 +109,4 @@ about idnkit and this patch. Bug reports and comments on this kit should be sent to mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -; $Id: README.idnkit,v 1.2.762.1 2009/01/18 23:25:14 marka Exp $ +; $Id: README.idnkit,v 1.2.762.1 2009-01-18 23:25:14 marka Exp $ Modified: head/contrib/bind9/acconfig.h ============================================================================== --- head/contrib/bind9/acconfig.h Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/acconfig.h Sat May 28 00:21:28 2011 (r222395) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.51.334.2 2009/02/16 23:47:15 tbox Exp $ */ +/* $Id: acconfig.h,v 1.51.334.2 2009-02-16 23:47:15 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/Makefile.in ============================================================================== --- head/contrib/bind9/bin/Makefile.in Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/Makefile.in Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.25 2007/06/19 23:46:59 tbox Exp $ +# $Id: Makefile.in,v 1.25 2007-06-19 23:46:59 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/check/Makefile.in ============================================================================== --- head/contrib/bind9/bin/check/Makefile.in Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/check/Makefile.in Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.32 2007/06/19 23:46:59 tbox Exp $ +# $Id: Makefile.in,v 1.32 2007-06-19 23:46:59 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.8 Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/check/named-checkconf.8 Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.30.334.1 2009/07/11 01:55:20 tbox Exp $ +.\" $Id: named-checkconf.8,v 1.30.334.1 2009-07-11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/check/named-checkconf.docbook ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/check/named-checkconf.docbook Sat May 28 00:21:28 2011 (r222395) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 14, 2000 Modified: head/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- head/contrib/bind9/bin/check/named-checkconf.html Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/check/named-checkconf.html Sat May 28 00:21:28 2011 (r222395) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: head/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.8 Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/check/named-checkzone.8 Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkzone.8,v 1.42.334.3 2009/11/11 01:56:22 tbox Exp $ +.\" $Id: named-checkzone.8,v 1.42.334.3 2009-11-11 01:56:22 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/check/named-checkzone.docbook ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/check/named-checkzone.docbook Sat May 28 00:21:28 2011 (r222395) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 13, 2000 Modified: head/contrib/bind9/bin/check/named-checkzone.html ============================================================================== --- head/contrib/bind9/bin/check/named-checkzone.html Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/check/named-checkzone.html Sat May 28 00:21:28 2011 (r222395) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: head/contrib/bind9/bin/dig/Makefile.in ============================================================================== --- head/contrib/bind9/bin/dig/Makefile.in Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/Makefile.in Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.41 2007/06/19 23:46:59 tbox Exp $ +# $Id: Makefile.in,v 1.41 2007-06-19 23:46:59 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/dig/dig.1 ============================================================================== --- head/contrib/bind9/bin/dig/dig.1 Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/dig.1 Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dig.1,v 1.50.44.3 2009/07/11 01:55:20 tbox Exp $ +.\" $Id: dig.1,v 1.50.44.3 2009-07-11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/dig/dig.docbook ============================================================================== --- head/contrib/bind9/bin/dig/dig.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/dig.docbook Sat May 28 00:21:28 2011 (r222395) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: head/contrib/bind9/bin/dig/dig.html ============================================================================== --- head/contrib/bind9/bin/dig/dig.html Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/dig.html Sat May 28 00:21:28 2011 (r222395) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: head/contrib/bind9/bin/dig/host.1 ============================================================================== --- head/contrib/bind9/bin/dig/host.1 Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/host.1 Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: host.1,v 1.29.114.2 2009/07/11 01:55:20 tbox Exp $ +.\" $Id: host.1,v 1.29.114.2 2009-07-11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/dig/host.docbook ============================================================================== --- head/contrib/bind9/bin/dig/host.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/host.docbook Sat May 28 00:21:28 2011 (r222395) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: head/contrib/bind9/bin/dig/host.html ============================================================================== --- head/contrib/bind9/bin/dig/host.html Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/host.html Sat May 28 00:21:28 2011 (r222395) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: head/contrib/bind9/bin/dig/include/dig/dig.h ============================================================================== --- head/contrib/bind9/bin/dig/include/dig/dig.h Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/include/dig/dig.h Sat May 28 00:21:28 2011 (r222395) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.h,v 1.107.120.2 2009/01/06 23:47:26 tbox Exp $ */ +/* $Id: dig.h,v 1.107.120.2 2009-01-06 23:47:26 tbox Exp $ */ #ifndef DIG_H #define DIG_H Modified: head/contrib/bind9/bin/dig/nslookup.c ============================================================================== --- head/contrib/bind9/bin/dig/nslookup.c Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dig/nslookup.c Sat May 28 00:21:28 2011 (r222395) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nslookup.c,v 1.117.334.5 2009/10/20 01:11:22 marka Exp $ */ +/* $Id: nslookup.c,v 1.117.334.5 2009-10-20 01:11:22 marka Exp $ */ #include Modified: head/contrib/bind9/bin/dnssec/Makefile.in ============================================================================== --- head/contrib/bind9/bin/dnssec/Makefile.in Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/Makefile.in Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.35 2008/11/07 02:28:49 marka Exp $ +# $Id: Makefile.in,v 1.35 2008-11-07 02:28:49 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c Sat May 28 00:21:28 2011 (r222395) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-dsfromkey.c,v 1.2.14.6 2010/01/11 23:47:22 tbox Exp $ */ +/* $Id: dnssec-dsfromkey.c,v 1.2.14.6 2010-01-11 23:47:22 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook Sat May 28 00:21:28 2011 (r222395) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + November 29, 2008 Modified: head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 Sat May 28 00:21:28 2011 (r222395) @@ -12,7 +12,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-keyfromlabel.8,v 1.6.14.3 2010/01/16 01:55:32 tbox Exp $ +.\" $Id: dnssec-keyfromlabel.8,v 1.6.14.3 2010-01-16 01:55:32 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c Sat May 28 00:21:28 2011 (r222395) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keyfromlabel.c,v 1.4.50.2 2010/01/15 23:47:31 tbox Exp $ */ +/* $Id: dnssec-keyfromlabel.c,v 1.4.50.2 2010-01-15 23:47:31 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook Sat May 28 00:21:28 2011 (r222395) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + February 8, 2008 Modified: head/contrib/bind9/bin/dnssec/dnssec-keygen.8 ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-keygen.8 Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-keygen.8 Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-keygen.8,v 1.40.44.4 2010/01/16 01:55:32 tbox Exp $ +.\" $Id: dnssec-keygen.8,v 1.40.44.4 2010-01-16 01:55:32 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/dnssec/dnssec-keygen.c ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-keygen.c Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-keygen.c Sat May 28 00:21:28 2011 (r222395) @@ -29,7 +29,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keygen.c,v 1.81.48.2 2010/01/15 23:47:31 tbox Exp $ */ +/* $Id: dnssec-keygen.c,v 1.81.48.2 2010-01-15 23:47:31 tbox Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/dnssec/dnssec-keygen.docbook ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-keygen.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-keygen.docbook Sat May 28 00:21:28 2011 (r222395) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 30, 2000 Modified: head/contrib/bind9/bin/dnssec/dnssec-signzone.8 ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-signzone.8 Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-signzone.8 Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-signzone.8,v 1.47.44.8 2009/11/07 01:56:11 tbox Exp $ +.\" $Id: dnssec-signzone.8,v 1.47.44.8 2009-11-07 01:56:11 tbox Exp $ .\" .hy 0 .ad l Modified: head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook Sat May 28 00:21:28 2011 (r222395) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 08, 2009 Modified: head/contrib/bind9/bin/dnssec/dnssectool.c ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssectool.c Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssectool.c Sat May 28 00:21:28 2011 (r222395) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.c,v 1.45.334.5 2009/06/22 05:05:00 marka Exp $ */ +/* $Id: dnssectool.c,v 1.45.334.5 2009-06-22 05:05:00 marka Exp $ */ /*! \file */ Modified: head/contrib/bind9/bin/dnssec/dnssectool.h ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssectool.h Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/dnssec/dnssectool.h Sat May 28 00:21:28 2011 (r222395) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.h,v 1.22.48.2 2009/09/04 23:46:58 tbox Exp $ */ +/* $Id: dnssectool.h,v 1.22.48.2 2009-09-04 23:46:58 tbox Exp $ */ #ifndef DNSSECTOOL_H #define DNSSECTOOL_H 1 Modified: head/contrib/bind9/bin/named/Makefile.in ============================================================================== --- head/contrib/bind9/bin/named/Makefile.in Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/named/Makefile.in Sat May 28 00:21:28 2011 (r222395) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.101 2008/09/23 17:25:47 jinmei Exp $ +# $Id: Makefile.in,v 1.101 2008-09-23 17:25:47 jinmei Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: head/contrib/bind9/bin/named/bind9.xsl ============================================================================== --- head/contrib/bind9/bin/named/bind9.xsl Fri May 27 23:50:46 2011 (r222394) +++ head/contrib/bind9/bin/named/bind9.xsl Sat May 28 00:21:28 2011 (r222395) @@ -15,7 +15,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A0DD106564A; Sat, 28 May 2011 04:10:45 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 178448FC12; Sat, 28 May 2011 04:10:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4S4AiNu067136; Sat, 28 May 2011 04:10:44 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S4AiSk067132; Sat, 28 May 2011 04:10:44 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105280410.p4S4AiSk067132@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 28 May 2011 04:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222400 - head/sys/powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 04:10:45 -0000 Author: marcel Date: Sat May 28 04:10:44 2011 New Revision: 222400 URL: http://svn.freebsd.org/changeset/base/222400 Log: Better support different kernel hand-offs. When loaded directly from U-Boot, the kernel is passed a standard argc/argv pair. The Juniper loader passes the metadata pointer as the second argument and passes 0 in the first. The FreeBSD loader passes the metadata pointer in the first argument. As such, have locore preserve the first 2 arguments in registers r30 & r31. Change e500_init() to accept these arguments. Don't pass global offsets (i.e. kernel_text and _end) as arguments to e500_init(). We can reference those directly. Rename e500_init() to booke_init() now that we're changing the prototype. In booke_init(), "decode" arg1 and arg2 to obtain the metadata pointer correctly. For the U-Boot case, clear SBSS and BSS and bank on having a static FDT for now. This allows loading the ELF kernel and jumping to the entry point without trampoline. Modified: head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Sat May 28 00:58:19 2011 (r222399) +++ head/sys/powerpc/booke/locore.S Sat May 28 04:10:44 2011 (r222400) @@ -83,17 +83,18 @@ __start: * locore registers use: * r1 : stack pointer * r2 : trace pointer (AP only, for early diagnostics) - * r3-r27 : scratch registers - * r28 : kernload - * r29 : temp TLB1 entry - * r30 : initial TLB1 entry we started in - * r31 : metadata pointer + * r3-r26 : scratch registers + * r27 : kernload + * r28 : temp TLB1 entry + * r29 : initial TLB1 entry we started in + * r30-r31 : arguments (metadata pointer) */ /* - * Keep metadata ptr in r31 for later use. + * Keep arguments in r30 & r31 for later use. */ - mr %r31, %r3 + mr %r30, %r3 + mr %r31, %r4 /* * Initial cleanup @@ -120,7 +121,7 @@ __start: */ bl 1f 1: mflr %r3 - bl tlb1_find_current /* the entry number found is returned in r30 */ + bl tlb1_find_current /* the entry found is returned in r29 */ bl tlb1_inval_all_but_current /* @@ -140,7 +141,7 @@ __start: /* * Invalidate initial entry */ - mr %r3, %r30 + mr %r3, %r29 bl tlb1_inval_entry /* @@ -170,7 +171,7 @@ __start: bl 3f 3: mflr %r4 /* Use current address */ rlwinm %r4, %r4, 0, 0, 7 /* 16MB alignment mask */ - mr %r28, %r4 /* Keep kernel load address */ + mr %r27, %r4 /* Keep kernel load address */ ori %r4, %r4, (MAS3_SX | MAS3_SW | MAS3_SR)@l mtspr SPR_MAS3, %r4 /* Set RPN and protection */ isync @@ -193,7 +194,7 @@ __start: /* * Invalidate temp mapping */ - mr %r3, %r29 + mr %r3, %r28 bl tlb1_inval_entry /* @@ -201,7 +202,7 @@ __start: */ lis %r3, kernload@ha addi %r3, %r3, kernload@l - stw %r28, 0(%r3) + stw %r27, 0(%r3) #ifdef SMP /* * APs need a separate copy of kernload info within the __boot_page @@ -210,7 +211,7 @@ __start: */ lis %r3, kernload_ap@ha addi %r3, %r3, kernload_ap@l - stw %r28, 0(%r3) + stw %r27, 0(%r3) msync #endif @@ -229,14 +230,11 @@ __start: /* * Set up arguments and jump to system initialization code */ - lis %r3, kernel_text@ha - addi %r3, %r3, kernel_text@l - lis %r4, _end@ha - addi %r4, %r4, _end@l - mr %r5, %r31 /* metadata ptr */ + mr %r3, %r30 + mr %r4, %r31 /* Prepare e500 core */ - bl e500_init + bl booke_init /* Switch to thread0.td_kstack now */ mr %r1, %r3 @@ -290,7 +288,7 @@ kernload_ap: */ bl 2f 2: mflr %r3 - bl tlb1_find_current /* the entry number found is in r30 */ + bl tlb1_find_current /* the entry number found is in r29 */ bl tlb1_inval_all_but_current /* @@ -310,7 +308,7 @@ kernload_ap: /* * Invalidate initial entry */ - mr %r3, %r30 + mr %r3, %r29 bl tlb1_inval_entry /* @@ -373,7 +371,7 @@ kernload_ap: /* * Invalidate temp mapping */ - mr %r3, %r29 + mr %r3, %r28 bl tlb1_inval_entry /* @@ -425,7 +423,7 @@ tlb_inval_all: blr /* - * expects address to look up in r3, returns entry number in r30 + * expects address to look up in r3, returns entry number in r29 * * FIXME: the hidden assumption is we are now running in AS=0, but we should * retrieve actual AS from MSR[IS|DS] and put it in MAS6[SAS] @@ -437,7 +435,7 @@ tlb1_find_current: isync tlbsx 0, %r3 mfspr %r17, SPR_MAS0 - rlwinm %r30, %r17, 16, 20, 31 /* MAS0[ESEL] -> r30 */ + rlwinm %r29, %r17, 16, 20, 31 /* MAS0[ESEL] -> r29 */ /* Make sure we have IPROT set on the entry */ mfspr %r17, SPR_MAS1 @@ -470,14 +468,14 @@ tlb1_inval_entry: blr /* - * r30 current entry number - * r29 returned temp entry + * r29 current entry number + * r28 returned temp entry * r3-r5 scratched */ tlb1_temp_mapping_as1: /* Read our current translation */ lis %r3, MAS0_TLBSEL1@h /* Select TLB1 */ - rlwimi %r3, %r30, 16, 12, 15 /* Select our current entry */ + rlwimi %r3, %r29, 16, 12, 15 /* Select our current entry */ mtspr SPR_MAS0, %r3 isync tlbre @@ -489,8 +487,8 @@ tlb1_temp_mapping_as1: * entry is the last in TLB1 */ lis %r3, MAS0_TLBSEL1@h /* Select TLB1 */ - addi %r29, %r30, 1 /* Use next entry. */ - rlwimi %r3, %r29, 16, 12, 15 /* Select temp entry */ + addi %r28, %r29, 1 /* Use next entry. */ + rlwimi %r3, %r28, 16, 12, 15 /* Select temp entry */ mtspr SPR_MAS0, %r3 isync mfspr %r5, SPR_MAS1 @@ -510,7 +508,7 @@ tlb1_temp_mapping_as1: * Loops over TLB1, invalidates all entries skipping the one which currently * maps this code. * - * r30 current entry + * r29 current entry * r3-r5 scratched */ tlb1_inval_all_but_current: @@ -524,7 +522,7 @@ tlb1_inval_all_but_current: isync tlbre mfspr %r5, SPR_MAS1 - cmpw %r4, %r30 /* our current entry? */ + cmpw %r4, %r29 /* our current entry? */ beq 2f rlwinm %r5, %r5, 0, 2, 31 /* clear VALID and IPROT bits */ mtspr SPR_MAS1, %r5 Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Sat May 28 00:58:19 2011 (r222399) +++ head/sys/powerpc/booke/machdep.c Sat May 28 04:10:44 2011 (r222400) @@ -190,7 +190,7 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, void print_kernel_section_addr(void); void print_kenv(void); -u_int e500_init(u_int32_t, u_int32_t, void *); +u_int booke_init(uint32_t, uint32_t); static void cpu_e500_startup(void *dummy) @@ -276,19 +276,41 @@ print_kernel_section_addr(void) } u_int -e500_init(u_int32_t startkernel, u_int32_t endkernel, void *mdp) +booke_init(uint32_t arg1, uint32_t arg2) { struct pcpu *pc; - void *kmdp; + void *kmdp, *mdp; vm_offset_t dtbp, end; uint32_t csr; kmdp = NULL; - end = endkernel; + end = (uintptr_t)_end; dtbp = (vm_offset_t)NULL; /* + * Handle the various ways we can get loaded and started: + * - FreeBSD's loader passes the pointer to the metadata + * in arg1, with arg2 undefined. arg1 has a value that's + * relative to the kernel's link address (i.e. larger + * than 0xc0000000). + * - Juniper's loader passes the metadata pointer in arg2 + * and sets arg1 to zero. This is to signal that the + * loader maps the kernel and starts it at its link + * address (unlike the FreeBSD loader). + * - U-Boot passes the standard argc and argv parameters + * in arg1 and arg2 (resp). arg1 is between 1 and some + * relatively small number, such as 64K. arg2 is the + * physical address of the argv vector. + */ + if (arg1 > (uintptr_t)kernel_text) /* FreeBSD loader */ + mdp = (void *)arg1; + else if (arg1 == 0) /* Juniper loader */ + mdp = (void *)arg2; + else /* U-Boot */ + mdp = NULL; + + /* * Parse metadata and fetch parameters. */ if (mdp != NULL) { @@ -309,17 +331,8 @@ e500_init(u_int32_t startkernel, u_int32 #endif } } else { - /* - * We should scream but how? Cannot even output anything... - */ - - /* - * FIXME add return value and handle in the locore so we can - * return to the loader maybe? (this seems not very easy to - * restore everything as the TLB have all been reprogrammed - * in the locore etc...) - */ - while (1); + bzero(__sbss_start, __sbss_end - __sbss_start); + bzero(__bss_start, _end - __bss_start); } #if defined(FDT_DTB_STATIC) @@ -368,9 +381,7 @@ e500_init(u_int32_t startkernel, u_int32 cninit(); /* Print out some debug info... */ - debugf("e500_init: console initialized\n"); - debugf(" arg1 startkernel = 0x%08x\n", startkernel); - debugf(" arg2 endkernel = 0x%08x\n", endkernel); + debugf("%s: console initialized\n", __func__); debugf(" arg3 mdp = 0x%08x\n", (u_int32_t)mdp); debugf(" end = 0x%08x\n", (u_int32_t)end); debugf(" boothowto = 0x%08x\n", boothowto); @@ -403,7 +414,7 @@ e500_init(u_int32_t startkernel, u_int32 /* Initialise virtual memory. */ pmap_mmu_install(MMU_TYPE_BOOKE, 0); - pmap_bootstrap(startkernel, end); + pmap_bootstrap((uintptr_t)kernel_text, end); debugf("MSR = 0x%08x\n", mfmsr()); //tlb1_print_entries(); //tlb1_print_tlbentries(); @@ -449,8 +460,8 @@ e500_init(u_int32_t startkernel, u_int32 printf("L1 I-cache %sabled\n", (csr & L1CSR1_ICE) ? "en" : "dis"); - debugf("e500_init: SP = 0x%08x\n", ((uintptr_t)thread0.td_pcb - 16) & ~15); - debugf("e500_init: e\n"); + debugf("%s: SP = 0x%08x\n", __func__, + ((uintptr_t)thread0.td_pcb - 16) & ~15); return (((uintptr_t)thread0.td_pcb - 16) & ~15); } Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sat May 28 00:58:19 2011 (r222399) +++ head/sys/powerpc/booke/pmap.c Sat May 28 04:10:44 2011 (r222400) @@ -943,7 +943,7 @@ pte_find(mmu_t mmu, pmap_t pmap, vm_offs /**************************************************************************/ /* - * This is called during e500_init, before the system is really initialized. + * This is called during booke_init, before the system is really initialized. */ static void mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_offset_t kernelend) From owner-svn-src-head@FreeBSD.ORG Sat May 28 08:50:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50565106564A; Sat, 28 May 2011 08:50:39 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DF178FC0C; Sat, 28 May 2011 08:50:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4S8odaZ076448; Sat, 28 May 2011 08:50:39 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8odjf076440; Sat, 28 May 2011 08:50:39 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <201105280850.p4S8odjf076440@svn.freebsd.org> From: Julian Elischer Date: Sat, 28 May 2011 08:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222417 - in head/sys/boot: common forth i386/loader ia64/common pc98/loader powerpc/ofw powerpc/ps3 sparc64/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:50:39 -0000 Author: julian Date: Sat May 28 08:50:38 2011 New Revision: 222417 URL: http://svn.freebsd.org/changeset/base/222417 Log: New boot loader menus from Devin Teske. Discussed on hackers and recommended for inclusion into 9.0 at the devsummit. All support email to devin dteske at vicor dot ignoreme dot com . Submitted by: dteske at vicor dot ignoreme dot com Reviewed by: me and many others Added: head/sys/boot/forth/beastie.4th.8 (contents, props changed) head/sys/boot/forth/brand.4th (contents, props changed) head/sys/boot/forth/brand.4th.8 (contents, props changed) head/sys/boot/forth/check-password.4th (contents, props changed) head/sys/boot/forth/check-password.4th.8 (contents, props changed) head/sys/boot/forth/color.4th (contents, props changed) head/sys/boot/forth/color.4th.8 (contents, props changed) head/sys/boot/forth/delay.4th (contents, props changed) head/sys/boot/forth/delay.4th.8 (contents, props changed) head/sys/boot/forth/menu-commands.4th (contents, props changed) head/sys/boot/forth/menu.4th (contents, props changed) head/sys/boot/forth/menu.4th.8 (contents, props changed) head/sys/boot/forth/menu.rc (contents, props changed) head/sys/boot/forth/shortcuts.4th (contents, props changed) head/sys/boot/forth/version.4th (contents, props changed) head/sys/boot/forth/version.4th.8 (contents, props changed) Modified: head/sys/boot/common/Makefile.inc head/sys/boot/forth/beastie.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/loader.conf.5 head/sys/boot/forth/loader.rc head/sys/boot/forth/support.4th head/sys/boot/i386/loader/Makefile head/sys/boot/ia64/common/Makefile head/sys/boot/pc98/loader/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/ps3/Makefile head/sys/boot/sparc64/loader/Makefile Modified: head/sys/boot/common/Makefile.inc ============================================================================== --- head/sys/boot/common/Makefile.inc Sat May 28 08:44:39 2011 (r222416) +++ head/sys/boot/common/Makefile.inc Sat May 28 08:50:38 2011 (r222417) @@ -44,8 +44,15 @@ SRCS+= pnp.c # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c +MAN+= ../forth/beastie.4th.8 +MAN+= ../forth/brand.4th.8 +MAN+= ../forth/check-password.4th.8 +MAN+= ../forth/color.4th.8 +MAN+= ../forth/delay.4th.8 MAN+= ../forth/loader.conf.5 MAN+= ../forth/loader.4th.8 +MAN+= ../forth/menu.4th.8 +MAN+= ../forth/version.4th.8 .endif .if defined(BOOT_PROMPT_123) Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Sat May 28 08:44:39 2011 (r222416) +++ head/sys/boot/forth/beastie.4th Sat May 28 08:50:38 2011 (r222417) @@ -1,7 +1,8 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. -\ +\ \ Redistribution and use in source and binary forms, with or without \ modification, are permitted provided that the following conditions \ are met: @@ -10,7 +11,7 @@ \ 2. Redistributions in binary form must reproduce the above copyright \ notice, this list of conditions and the following disclaimer in the \ documentation and/or other materials provided with the distribution. -\ +\ \ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND \ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -22,35 +23,24 @@ \ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY \ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \ SUCH DAMAGE. -\ +\ \ $FreeBSD$ marker task-beastie.4th -include /boot/screen.4th -include /boot/frames.4th +include /boot/color.4th +include /boot/delay.4th -hide +variable logoX +variable logoY -variable menuidx -variable menubllt -variable menuX -variable menuY -variable promptwidth - -variable bootkey -variable bootacpikey -variable bootsafekey -variable bootverbosekey -variable bootsinglekey -variable escapekey -variable rebootkey - -46 constant dot - -\ The BSD Daemon. He is 19 rows high and 34 columns wide -: beastie-logo ( x y -- ) -2dup at-xy ." , ," 1+ +\ Initialize logo placement to defaults +46 logoX ! +4 logoY ! + +: beastie-logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns) + +2dup at-xy ." , ," 1+ 2dup at-xy ." /( )`" 1+ 2dup at-xy ." \ \___ / |" 1+ 2dup at-xy ." /- _ `-/ '" 1+ @@ -59,7 +49,7 @@ variable rebootkey 2dup at-xy ." O O ) / |" 1+ 2dup at-xy ." `-^--'`< '" 1+ 2dup at-xy ." (_.) _ ) /" 1+ -2dup at-xy ." `.___/` / " 1+ +2dup at-xy ." `.___/` /" 1+ 2dup at-xy ." `-----' /" 1+ 2dup at-xy ." <----. __ / __ \" 1+ 2dup at-xy ." <----|====O)))==) \) /====|" 1+ @@ -68,173 +58,201 @@ variable rebootkey 2dup at-xy ." \ / /\" 1+ 2dup at-xy ." ______( (_ / \______/" 1+ 2dup at-xy ." ,' ,-----' |" 1+ -at-xy ." `--{__________) " + at-xy ." `--{__________)" + + \ Put the cursor back at the bottom + 0 25 at-xy ; -: beastiebw-logo ( x y -- ) - 2dup at-xy ." , ," 1+ - 2dup at-xy ." /( )`" 1+ - 2dup at-xy ." \ \___ / |" 1+ - 2dup at-xy ." /- _ `-/ '" 1+ - 2dup at-xy ." (/\/ \ \ /\" 1+ - 2dup at-xy ." / / | ` \" 1+ - 2dup at-xy ." O O ) / |" 1+ - 2dup at-xy ." `-^--'`< '" 1+ - 2dup at-xy ." (_.) _ ) /" 1+ - 2dup at-xy ." `.___/` /" 1+ - 2dup at-xy ." `-----' /" 1+ - 2dup at-xy ." <----. __ / __ \" 1+ - 2dup at-xy ." <----|====O)))==) \) /====" 1+ - 2dup at-xy ." <----' `--' `.__,' \" 1+ - 2dup at-xy ." | |" 1+ - 2dup at-xy ." \ / /\" 1+ - 2dup at-xy ." ______( (_ / \______/" 1+ - 2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" +: beastiebw-logo ( x y -- ) \ B/W BSD mascot (19 rows x 34 columns) + + 2dup at-xy ." , ," 1+ + 2dup at-xy ." /( )`" 1+ + 2dup at-xy ." \ \___ / |" 1+ + 2dup at-xy ." /- _ `-/ '" 1+ + 2dup at-xy ." (/\/ \ \ /\" 1+ + 2dup at-xy ." / / | ` \" 1+ + 2dup at-xy ." O O ) / |" 1+ + 2dup at-xy ." `-^--'`< '" 1+ + 2dup at-xy ." (_.) _ ) /" 1+ + 2dup at-xy ." `.___/` /" 1+ + 2dup at-xy ." `-----' /" 1+ + 2dup at-xy ." <----. __ / __ \" 1+ + 2dup at-xy ." <----|====O)))==) \) /====|" 1+ + 2dup at-xy ." <----' `--' `.__,' \" 1+ + 2dup at-xy ." | |" 1+ + 2dup at-xy ." \ / /\" 1+ + 2dup at-xy ." ______( (_ / \______/" 1+ + 2dup at-xy ." ,' ,-----' |" 1+ + at-xy ." `--{__________)" + + \ Put the cursor back at the bottom + 0 25 at-xy ; -: fbsdbw-logo ( x y -- ) - 2dup at-xy ." ______" 1+ - 2dup at-xy ." | ____| __ ___ ___ " 1+ - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ - 2dup at-xy ." | __|| | | __/ __/" 1+ - 2dup at-xy ." | | | | | | |" 1+ - 2dup at-xy ." |_| |_| \___|\___|" 1+ - 2dup at-xy ." ____ _____ _____" 1+ - 2dup at-xy ." | _ \ / ____| __ \" 1+ - 2dup at-xy ." | |_) | (___ | | | |" 1+ - 2dup at-xy ." | _ < \___ \| | | |" 1+ - 2dup at-xy ." | |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | |" 1+ - at-xy ." |____/|_____/|_____/" +: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) + + \ We used to use the beastie himself as our default... until the + \ eventual complaint derided his reign of the advanced boot-menu. + \ + \ This is the replacement of beastie to satiate the haters of our + \ beloved helper-daemon (ready to track down and spear bugs with + \ his trident and sporty sneakers; see above). + \ + \ Since we merely just changed the default and not the default- + \ location, below is an adjustment to the passed-in coordinates, + \ forever influenced by the proper location of beastie himself + \ kept as the default loader_logo_x/loader_logo_y values. + \ + 5 + swap 6 + swap + + 2dup at-xy ." ______" 1+ + 2dup at-xy ." | ____| __ ___ ___ " 1+ + 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ + 2dup at-xy ." | __|| | | __/ __/" 1+ + 2dup at-xy ." | | | | | | |" 1+ + 2dup at-xy ." |_| |_| \___|\___|" 1+ + 2dup at-xy ." ____ _____ _____" 1+ + 2dup at-xy ." | _ \ / ____| __ \" 1+ + 2dup at-xy ." | |_) | (___ | | | |" 1+ + 2dup at-xy ." | _ < \___ \| | | |" 1+ + 2dup at-xy ." | |_) |____) | |__| |" 1+ + 2dup at-xy ." | | | |" 1+ + at-xy ." |____/|_____/|_____/" + + \ Put the cursor back at the bottom + 0 25 at-xy ; -: print-logo ( x y -- ) - s" loader_logo" getenv - dup -1 = if - drop - fbsdbw-logo - exit - then - 2dup s" fbsdbw" compare-insensitive 0= if - 2drop - fbsdbw-logo - exit - then - 2dup s" beastiebw" compare-insensitive 0= if - 2drop - beastiebw-logo - exit - then - 2dup s" beastie" compare-insensitive 0= if - 2drop - beastie-logo - exit - then - 2dup s" none" compare-insensitive 0= if - 2drop - \ no logo - exit - then - 2drop - fbsdbw-logo +: orb-logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns) + + 3 + \ beastie adjustment (see `fbsdbw-logo' comments above) + + 2dup at-xy ." ``` `" 1+ + 2dup at-xy ." s` `.....---.......--.``` -/" 1+ + 2dup at-xy ." +o .--` /y:` +." 1+ + 2dup at-xy ." yo`:. :o `+-" 1+ + 2dup at-xy ." y/ -/` -o/" 1+ + 2dup at-xy ." .- ::/sy+:." 1+ + 2dup at-xy ." / `-- /" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." / /" 1+ + 2dup at-xy ." .- -." 1+ + 2dup at-xy ." -- -." 1+ + 2dup at-xy ." `:` `:`" 1+ + 2dup at-xy ." .-- `--." 1+ + at-xy ." .---.....----." + + \ Put the cursor back at the bottom + 0 25 at-xy ; -: acpipresent? ( -- flag ) - s" hint.acpi.0.rsdp" getenv - dup -1 = if - drop false exit - then - 2drop - true +: orbbw-logo ( x y -- ) \ B/W Orb mascot (15 rows x 32 columns) + + 3 + \ beastie adjustment (see `fbsdbw-logo' comments above) + + 2dup at-xy ." ``` `" 1+ + 2dup at-xy ." s` `.....---.......--.``` -/" 1+ + 2dup at-xy ." +o .--` /y:` +." 1+ + 2dup at-xy ." yo`:. :o `+-" 1+ + 2dup at-xy ." y/ -/` -o/" 1+ + 2dup at-xy ." .- ::/sy+:." 1+ + 2dup at-xy ." / `-- /" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." / /" 1+ + 2dup at-xy ." .- -." 1+ + 2dup at-xy ." -- -." 1+ + 2dup at-xy ." `:` `:`" 1+ + 2dup at-xy ." .-- `--." 1+ + at-xy ." .---.....----." + + \ Put the cursor back at the bottom + 0 25 at-xy ; -: acpienabled? ( -- flag ) - s" hint.acpi.0.disabled" getenv - dup -1 <> if - s" 0" compare 0<> if - false exit - then +\ This function draws any number of beastie logos at (loader_logo_x, +\ loader_logo_y) if defined, else (46,4) (to the right of the menu). To choose +\ your beastie, set the variable `loader_logo' to the respective logo name. +\ +\ Currently available: +\ +\ NAME DESCRIPTION +\ beastie Color ``Helper Daemon'' mascot (19 rows x 34 columns) +\ beastiebw B/W ``Helper Daemon'' mascot (19 rows x 34 columns) +\ fbsdbw "FreeBSD" logo in B/W (13 rows x 21 columns) +\ orb Color ``Orb'' mascot (15 rows x 30 columns) +\ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) (default) +\ +\ NOTE: Setting `loader_logo' to an undefined value (such as "none") will +\ prevent beastie from being drawn. +\ +: draw-beastie ( -- ) \ at (loader_logo_x,loader_logo_y), else (46,4) + + s" loader_logo_x" getenv dup -1 <> if + ?number 1 = if logoX ! then else drop then - true -; - -: printmenuitem ( -- n ) - menuidx @ - 1+ dup - menuidx ! - menuY @ + dup menuX @ swap at-xy - menuidx @ . - menuX @ 1+ swap at-xy - menubllt @ emit - menuidx @ 48 + -; - -: beastie-menu ( -- ) - 0 menuidx ! - dot menubllt ! - 8 menuY ! - 5 menuX ! - clear - 46 4 print-logo - 42 20 2 2 box - 13 6 at-xy ." Welcome to FreeBSD!" - printmenuitem ." Boot FreeBSD [default]" bootkey ! - s" arch-i386" environment? if + s" loader_logo_y" getenv dup -1 <> if + ?number 1 = if logoY ! then + else drop - acpipresent? if - printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! - acpienabled? if - ." disabled" - else - ." enabled" - then + then + + s" loader_logo" getenv dup -1 = if + logoX @ logoY @ + loader_color? if + orb-logo else - menuidx @ - 1+ - menuidx ! - -2 bootacpikey ! + orbbw-logo then - else - -2 bootacpikey ! + drop exit then - printmenuitem ." Boot FreeBSD in Safe Mode" bootsafekey ! - printmenuitem ." Boot FreeBSD in single user mode" bootsinglekey ! - printmenuitem ." Boot FreeBSD with verbose logging" bootverbosekey ! - printmenuitem ." Escape to loader prompt" escapekey ! - printmenuitem ." Reboot" rebootkey ! - menuX @ 20 at-xy - ." Select option, [Enter] for default" - menuX @ 21 at-xy - s" or [Space] to pause timer " dup 2 - promptwidth ! - type -; -: tkey - seconds + - begin 1 while - over 0<> if - dup seconds u< if - drop - -1 - exit - then - menuX @ promptwidth @ + 21 at-xy dup seconds - . - then - key? if - drop - key - exit - then - 50 ms - repeat + 2dup s" beastie" compare-insensitive 0= if + logoX @ logoY @ beastie-logo + 2drop exit + then + 2dup s" beastiebw" compare-insensitive 0= if + logoX @ logoY @ beastiebw-logo + 2drop exit + then + 2dup s" fbsdbw" compare-insensitive 0= if + logoX @ logoY @ fbsdbw-logo + 2drop exit + then + 2dup s" orb" compare-insensitive 0= if + logoX @ logoY @ orb-logo + 2drop exit + then + 2dup s" orbbw" compare-insensitive 0= if + logoX @ logoY @ orbbw-logo + 2drop exit + then + + 2drop ; -set-current +: clear-beastie ( -- ) \ clears beastie from the screen + logoX @ logoY @ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ + 2dup at-xy 34 spaces 2drop + + \ Put the cursor back at the bottom + 0 25 at-xy +; -: beastie-start +: beastie-start ( -- ) \ starts the menu s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if @@ -243,62 +261,15 @@ set-current else drop then - beastie-menu - s" autoboot_delay" getenv - dup -1 = if - drop - 10 + + s" loader_delay" getenv + -1 = if + s" include /boot/menu.rc" evaluate else - 2dup s" -1" compare 0= if - 0 boot - then - 0 s>d 2swap >number 2drop drop + drop + ." Loading Menu (Ctrl-C to Abort)" cr + s" set delay_command='include /boot/menu.rc'" evaluate + s" set delay_showdots" evaluate + delay_execute then - begin - dup tkey - 0 25 at-xy - dup 32 = if nip 0 swap then - dup -1 = if 0 boot then - dup 13 = if 0 boot then - dup bootkey @ = if 0 boot then - dup bootacpikey @ = if - acpienabled? if - s" 1" s" hint.acpi.0.disabled" setenv - s" 1" s" loader.acpi_disabled_by_user" setenv - else - s" 0" s" hint.acpi.0.disabled" setenv - then - 0 boot - then - dup bootsafekey @ = if - s" arch-i386" environment? if - drop - s" 1" s" hint.acpi.0.disabled" setenv - s" 1" s" loader.acpi_disabled_by_user" setenv - s" 1" s" hint.apic.0.disabled" setenv - then - s" 0" s" hw.ata.ata_dma" setenv - s" 0" s" hw.ata.atapi_dma" setenv - s" 0" s" hw.ata.wc" setenv - s" 0" s" hw.eisa_slots" setenv - s" 1" s" hint.kbdmux.0.disabled" setenv - 0 boot - then - dup bootverbosekey @ = if - s" YES" s" boot_verbose" setenv - 0 boot - then - dup bootsinglekey @ = if - s" YES" s" boot_single" setenv - 0 boot - then - dup escapekey @ = if - 2drop - s" NO" s" autoboot_delay" setenv - exit - then - rebootkey @ = if 0 reboot then - again ; - -previous Added: head/sys/boot/forth/beastie.4th.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/beastie.4th.8 Sat May 28 08:50:38 2011 (r222417) @@ -0,0 +1,171 @@ +.\" Copyright (c) 2011 Devin Teske +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 16, 2011 +.Dt BEASTIE.4TH 8 +.Os +.Sh NAME +.Nm beastie.4th +.Nd FreeBSD ASCII art boot module. +.Sh DESCRIPTION +The file that goes by the name of +.Nm +is a set of commands designed to draw the ASCII art FreeBSD mascot +.Nd known simply as +.Ic beastie +.Nd to the right of the boot loader menu. +The commands of +.Nm +by themselves are not enough for most uses. +Please refer to the +examples below for the most common situations, and to +.Xr loader 8 +for additional commands. +.Pp +Before using any of the commands provided in +.Nm , +it must be included +through the command: +.Pp +.Dl include beastie.4th +.Pp +This line is present in the default +.Pa /boot/loader.rc +file, so it is not needed (and should not be re-issued) in a normal setup. +.Pp +The commands provided by it are: +.Pp +.Bl -tag -width disable-module_module -compact -offset indent +.It Ic draw-beastie +Draws the FreeBSD logo. +.Pp +The logo that is drawn is configured by setting the +.Ic loader_logo +variable in +.Xr loader.conf 5 +to one of +.Dq Li beastie , +.Dq Li beastiebw , +.Dq Li fbsdbw , +.Dq Li orb , +and +.Dq Li orbbw +(the default). +.Pp +The position of the logo can be configured by setting the +.Ic loader_logo_x +and +.Ic loader_logo_y +variables in +.Xr loader.conf 5 . +The default values are 46 (x) and 4 (y). +.Pp +.It Ic clear-beastie +Clears the screen of beastie. +.Pp +.It Ic beastie-start +Initializes the interactive boot loader menu. +.Pp +The +.Ic loader_delay +variable can be configured in +.Xr loader.conf 5 +to the number of seconds you would like to delay loading the boot menu. +During the delay the user can press Ctrl-C to fall back to autoboot or ENTER +to proceed. +The default behavior is to not delay. +.El +.Pp +The environment variables that effect its behavior are: +.Bl -tag -width bootfile -offset indent +.It Va loader_logo +Selects the desired logo in the beastie boot menu. Possible values are: +.Dq Li fbsdbw , +.Dq Li beastie , +.Dq Li beastiebw , +.Dq Li orb , +.Dq Li orbbw +(default), and +.Dq Li none . +.It Va loader_logo_x +Sets the desired column position of the logo. Default is 46. +.It Va loader_logo_y +Sets the desired row position of the logo. Default is 4. +.It Va beastie_disable +If set to +.Dq YES , +the beastie boot menu will be skipped. +.It Va loader_delay +If set to a number higher than zero, introduces a delay before starting the +beastie boot menu. During the delay the user can press either Ctrl-C to skip +the menu or ENTER to proceed to the menu. The default is to not delay when +loading the menu. +.El +.Sh FILES +.Bl -tag -width /boot/loader.4th -compact +.It Pa /boot/loader +The +.Xr loader 8 . +.It Pa /boot/beastie.4th +.Nm +itself. +.It Pa /boot/loader.rc +.Xr loader 8 +bootstrapping script. +.El +.Sh EXAMPLES +Standard i386 +.Pa /boot/loader.rc : +.Pp +.Bd -literal -offset indent -compact +include /boot/beastie.4th +beastie-start +.Ed +.Pp +Set a different logo in +.Xr loader.conf 5 : +.Pp +.Bd -literal -offset indent -compact +loader_logo="beastie" +.Ed +.Sh SEE ALSO +.Xr loader.conf 5 , +.Xr loader 8 , +.Xr loader.4th 8 +.Sh HISTORY +The +.Nm +set of commands first appeared in +.Fx 5.1 . +.Sh AUTHORS +The +.Nm +set of commands was written by +.An -nosplit +.An Scott Long Aq scottl@FreeBSD.org , +.An Aleksander Fafula Aq alex@fafula.com +and +.An Devin Teske Aq devinteske@hotmail.com . Added: head/sys/boot/forth/brand.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/brand.4th Sat May 28 08:50:38 2011 (r222417) @@ -0,0 +1,91 @@ +\ Copyright (c) 2006-2011 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +marker task-brand.4th + +variable brandX +variable brandY + +\ Initialize logo placement +2 brandX ! +1 brandY ! + +: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) + + 2dup at-xy ." ______ ____ _____ _____ " 1+ + 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ + 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ + 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ + 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ + 2dup at-xy ." | | | | | | || | | |" 1+ + at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " + + \ Put the cursor back at the bottom + 0 25 at-xy +; + +\ This function draws any number of company logos at (loader_brand_x, +\ loader_brand_y) if defined, or (2,1) (top-left) if not defined. To choose +\ your logo, set the variable `loader_brand' to the respective logo name. +\ +\ Currently available: +\ +\ NAME DESCRIPTION +\ fbsd FreeBSD logo +\ +\ NOTE: Setting `loader_brand' to an undefined value (such as "none") will +\ prevent any brand from being drawn. +\ +: draw-brand ( -- ) + + s" loader_brand_x" getenv dup -1 <> if + ?number 1 = if + brandX ! + then + else + drop + then + + s" loader_brand_y" getenv dup -1 <> if + ?number 1 = if + brandY ! + then + else + drop + then + + s" loader_brand" getenv dup -1 = if + brandX @ brandY @ fbsd-logo + drop exit + then + + 2dup s" fbsd" compare-insensitive 0= if + brandX @ brandY @ fbsd-logo + 2drop exit + then + + 2drop +; Added: head/sys/boot/forth/brand.4th.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/brand.4th.8 Sat May 28 08:50:38 2011 (r222417) @@ -0,0 +1,125 @@ +.\" Copyright (c) 2011 Devin Teske +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 18, 2011 +.Dt BRAND.4TH 8 +.Os +.Sh NAME +.Nm brand.4th +.Nd FreeBSD ASCII art boot module. +.Sh DESCRIPTION +The file that goes by the name of +.Nm +is a set of commands designed to draw the ASCII art BSD brand above the boot +loader menu. +The commands of +.Nm +by themselves are not enough for most uses. +Please refer to the +examples below for the most common situations, and to +.Xr loader 8 +for additional commands. +.Pp +Before using any of the commands provided in +.Nm , +it must be included +through the command: +.Pp +.Dl include brand.4th +.Pp +This line is present in the default +.Pa /boot/menu.rc +file, so it is not needed (and should not be re-issued) in a normal setup. +.Pp +The commands provided by it are: +.Pp +.Bl -tag -width disable-module_module -compact -offset indent +.It Ic draw-brand +Draws the BSD brand. +.Pp +The brand that is drawn is configured by setting the +.Ic loader_brand +variable in +.Xr loader.conf 5 +to one of +.Dq Li fbsd +(the default) or +.Dq Li none . +.Pp +The position of the logo can be configured by setting the +.Ic loader_brand_x +and +.Ic loader_brand_y +variables in +.Xr loader.conf 5 . +The default values are 2 (x) and 1 (y). +.El +.Pp +The environment variables that effect its behavior are: +.Bl -tag -width bootfile -offset indent +.It Va loader_brand +Selects the desired brand in the beastie boot menu. Possible values are: +.Dq Li fbsd +(default) or +.Dq Li none . +.It Va loader_brand_x +Sets the desired column position of the brand. Default is 2. +.It Va loader_brand_y +Sets the desired row position of the brand. Default is 1. +.El +.Sh FILES +.Bl -tag -width /boot/loader.4th -compact +.It Pa /boot/loader +The +.Xr loader 8 . +.It Pa /boot/brand.4th +.Nm +itself. +.It Pa /boot/loader.rc +.Xr loader 8 +bootstrapping script. +.El +.Sh EXAMPLES +Set FreeBSD brand in +.Xr loader.conf 5 : +.Pp +.Bd -literal -offset indent -compact +loader_brand="fbsd" +.Ed +.Sh SEE ALSO +.Xr loader.conf 5 , +.Xr loader 8 , +.Sh HISTORY +The +.Nm +set of commands first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +set of commands was written by +.An -nosplit +.An Devin Teske Aq devinteske@hotmail.com . Added: head/sys/boot/forth/check-password.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/check-password.4th Sat May 28 08:50:38 2011 (r222417) @@ -0,0 +1,156 @@ +\ Copyright (c) 2006-2011 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +marker task-check-password.4th + +include /boot/screen.4th + +13 constant enter_key \ The decimal ASCII value for Enter key +8 constant bs_key \ The decimal ASCII value for Backspace key +16 constant readmax \ Maximum number of characters for the password + +variable readX \ Current X offset (column)(used by read) +variable read-start \ Starting X offset (column)(used by read) + +create readval 16 allot \ input obtained (maximum 16 characters) +variable readlen \ input length + +\ This function blocks program flow (loops forever) until a key is pressed. +\ The key that was pressed is added to the top of the stack in the form of its +\ decimal ASCII representation. Note: the stack cannot be empty when this +\ function starts or an underflow exception will occur. Simplest way to prevent +\ this is to pass 0 as a stack parameter (ie. `0 sgetkey'). This function is +\ called by the read function. You need not call it directly. NOTE: arrow keys +\ show as 0 on the stack +\ +: sgetkey ( -- ) + + begin \ Loop forever + key? if \ Was a key pressed? (see loader(8)) + + drop \ Remove stack-cruft + key \ Get the key that was pressed + + \ Check key pressed (see loader(8)) and input limit + dup 0<> if ( and ) readlen @ readmax < if + + \ Echo an asterisk (unless Backspace/Enter) + dup bs_key <> if ( and ) dup enter_key <> if + ." *" \ Echo an asterisk + then then + + exit \ Exit from the function + then then + + \ Always allow Backspace and Enter + dup bs_key = if exit then + dup enter_key = if exit then + + then + 50 ms \ Sleep for 50 milliseconds (see loader(8)) + again +; + +: read ( -- String prompt ) + + 0 25 at-xy \ Move the cursor to the bottom-left + dup 1+ read-start ! \ Store X offset after the prompt + read-start @ readX ! \ copy value to the current X offset + 0 readlen ! \ Initialize the read length + type \ Print the prompt + + begin \ Loop forever *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat May 28 11:37:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D18FE1065670; Sat, 28 May 2011 11:37:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B657C8FC14; Sat, 28 May 2011 11:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SBbl7p082843; Sat, 28 May 2011 11:37:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SBbl2d082838; Sat, 28 May 2011 11:37:47 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105281137.p4SBbl2d082838@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 28 May 2011 11:37: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: r222418 - in head: tools/regression/usr.bin/printf usr.bin/printf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 11:37:48 -0000 Author: jilles Date: Sat May 28 11:37:47 2011 New Revision: 222418 URL: http://svn.freebsd.org/changeset/base/222418 Log: printf: Allow multibyte characters for ' form, avoid negative codes. Examples: LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244) LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344) Both of these should print 228. Like some other shells, incomplete or invalid multibyte characters yield the value of the first byte without a warning. Note that there is no general way to go back from the character code to the character. Added: head/tools/regression/usr.bin/printf/regress.l1.out (contents, props changed) head/tools/regression/usr.bin/printf/regress.l2.out (contents, props changed) Modified: head/tools/regression/usr.bin/printf/regress.sh head/usr.bin/printf/printf.1 head/usr.bin/printf/printf.c Added: head/tools/regression/usr.bin/printf/regress.l1.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/printf/regress.l1.out Sat May 28 11:37:47 2011 (r222418) @@ -0,0 +1 @@ +228 Added: head/tools/regression/usr.bin/printf/regress.l2.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/printf/regress.l2.out Sat May 28 11:37:47 2011 (r222418) @@ -0,0 +1 @@ +228 Modified: head/tools/regression/usr.bin/printf/regress.sh ============================================================================== --- head/tools/regression/usr.bin/printf/regress.sh Sat May 28 08:50:38 2011 (r222417) +++ head/tools/regression/usr.bin/printf/regress.sh Sat May 28 11:37:47 2011 (r222418) @@ -2,11 +2,13 @@ REGRESSION_START($1) -echo '1..9' +echo '1..11' REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"') REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 123') REGRESSION_TEST(`f', `printf "%f,%-8.3f,%f,%f\n" +42.25 -42.25 inf nan') +REGRESSION_TEST(`l1', `LC_ALL=en_US.ISO8859-1 printf "%d\n" $(printf \"\\344)') +REGRESSION_TEST(`l2', `LC_ALL=en_US.UTF-8 printf "%d\n" $(printf \"\\303\\244)') REGRESSION_TEST(`m1', `printf "%c%%%d\0\045\n" abc \"abc') REGRESSION_TEST(`m2', `printf "abc\n\cdef"') REGRESSION_TEST(`m3', `printf "%%%s\n" abc def ghi jkl') Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Sat May 28 08:50:38 2011 (r222417) +++ head/usr.bin/printf/printf.1 Sat May 28 11:37:47 2011 (r222418) @@ -31,7 +31,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 25, 2011 +.Dd May 28, 2011 .Dt PRINTF 1 .Os .Sh NAME @@ -68,8 +68,7 @@ otherwise it is evaluated as a C constan A leading plus or minus sign is allowed. .It If the leading character is a single or double quote, the value is the -.Tn ASCII -code of the next character. +character code of the next character. .El .Pp The format string is reused as often as necessary to satisfy the Modified: head/usr.bin/printf/printf.c ============================================================================== --- head/usr.bin/printf/printf.c Sat May 28 08:50:38 2011 (r222417) +++ head/usr.bin/printf/printf.c Sat May 28 11:37:47 2011 (r222418) @@ -58,6 +58,7 @@ static const char rcsid[] = #include #include #include +#include #ifdef SHELL #define main printfcmd @@ -537,10 +538,23 @@ static int asciicode(void) { int ch; + wchar_t wch; + mbstate_t mbs; - ch = **gargv; - if (ch == '\'' || ch == '"') - ch = (*gargv)[1]; + ch = (unsigned char)**gargv; + if (ch == '\'' || ch == '"') { + memset(&mbs, 0, sizeof(mbs)); + switch (mbrtowc(&wch, *gargv + 1, MB_LEN_MAX, &mbs)) { + case (size_t)-2: + case (size_t)-1: + wch = (unsigned char)gargv[0][1]; + break; + case 0: + wch = 0; + break; + } + ch = wch; + } ++gargv; return (ch); } From owner-svn-src-head@FreeBSD.ORG Sat May 28 14:32:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D48106564A; Sat, 28 May 2011 14:32:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB208FC13; Sat, 28 May 2011 14:32:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SEWlUW088133; Sat, 28 May 2011 14:32:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SEWlNl088131; Sat, 28 May 2011 14:32:47 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105281432.p4SEWlNl088131@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 28 May 2011 14:32: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: r222421 - head/usr.bin/printf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 14:32:47 -0000 Author: jilles Date: Sat May 28 14:32:47 2011 New Revision: 222421 URL: http://svn.freebsd.org/changeset/base/222421 Log: printf(1): Document that %c and precision for %b/%s use bytes, not chars. This means these features do not work as expected with multibyte characters. This perhaps less than ideal behaviour matches printf(3) and is specified by POSIX. Modified: head/usr.bin/printf/printf.1 Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Sat May 28 13:54:19 2011 (r222420) +++ head/usr.bin/printf/printf.1 Sat May 28 14:32:47 2011 (r222421) @@ -171,7 +171,7 @@ A `\-' overrides a `0' if both are used; .It "Field Width:" An optional digit string specifying a .Em field width ; -if the output string has fewer characters than the field width it will +if the output string has fewer bytes than the field width it will be blank-padded on the left (or right, if the left-adjustment indicator has been given) to make up the field width (note that a leading zero is a flag, but an embedded zero is part of a field width); @@ -185,7 +185,7 @@ for .Cm e and .Cm f -formats, or the maximum number of characters to be printed +formats, or the maximum number of bytes to be printed from a string; if the digit string is missing, the precision is treated as zero; .It Format: @@ -271,15 +271,15 @@ and .Ql nan , respectively. .It Cm c -The first character of +The first byte of .Ar argument is printed. .It Cm s -Characters from the string +Bytes from the string .Ar argument -are printed until the end is reached or until the number of characters +are printed until the end is reached or until the number of bytes indicated by the precision specification is reached; however if the -precision is 0 or missing, all characters in the string are printed. +precision is 0 or missing, the string is printed entirely. .It Cm b As for .Cm s , @@ -346,6 +346,17 @@ to interpret the dash as a program argum .Nm -- must be used before .Ar format . +.Pp +If the locale contains multibyte characters +(such as UTF-8), +the +.Cm c +format and +.Cm b +and +.Cm s +formats with a precision +may not operate as expected. .Sh BUGS Since the floating point numbers are translated from .Tn ASCII From owner-svn-src-head@FreeBSD.ORG Sat May 28 15:07:29 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5ED22106566C; Sat, 28 May 2011 15:07:29 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7938FC08; Sat, 28 May 2011 15:07:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SF7TGM089283; Sat, 28 May 2011 15:07:29 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SF7Thk089281; Sat, 28 May 2011 15:07:29 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201105281507.p4SF7Thk089281@svn.freebsd.org> From: Kirk McKusick Date: Sat, 28 May 2011 15:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222422 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 15:07:29 -0000 Author: mckusick Date: Sat May 28 15:07:29 2011 New Revision: 222422 URL: http://svn.freebsd.org/changeset/base/222422 Log: Due to a lag in updating the fs_pendinginodes count, we cannot depend on it to decide whether we should try to reclaim inodes when we run short. Discovered by: Peter Holm Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sat May 28 14:32:47 2011 (r222421) +++ head/sys/ufs/ffs/ffs_alloc.c Sat May 28 15:07:29 2011 (r222422) @@ -1022,7 +1022,7 @@ dup_alloc: (*vpp)->v_op = &ffs_vnodeops1; return (0); noinodes: - if (fs->fs_pendinginodes > 0 && reclaimed == 0) { + if (reclaimed == 0) { reclaimed = 1; softdep_request_cleanup(fs, pvp, cred, FLUSH_INODES_WAIT); goto retry; From owner-svn-src-head@FreeBSD.ORG Sat May 28 15:14:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E51106566B; Sat, 28 May 2011 15:14:50 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 524628FC08; Sat, 28 May 2011 15:14:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SFEoBK089542; Sat, 28 May 2011 15:14:50 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SFEoB2089540; Sat, 28 May 2011 15:14:50 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201105281514.p4SFEoB2089540@svn.freebsd.org> From: Kirk McKusick Date: Sat, 28 May 2011 15:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222423 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 15:14:50 -0000 Author: mckusick Date: Sat May 28 15:14:50 2011 New Revision: 222423 URL: http://svn.freebsd.org/changeset/base/222423 Log: Update the manual page to reflect the new 32K/4K defaults. Reminded by: Ivan Voras Modified: head/sbin/newfs/newfs.8 Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Sat May 28 15:07:29 2011 (r222422) +++ head/sbin/newfs/newfs.8 Sat May 28 15:14:50 2011 (r222423) @@ -28,7 +28,7 @@ .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd February 22, 2011 +.Dd May 25, 2011 .Dt NEWFS 8 .Os .Sh NAME @@ -112,7 +112,7 @@ for more details on how to set this opti The block size of the file system, in bytes. It must be a power of 2. The -default size is 16384 bytes, and the smallest allowable size is 4096 bytes. +default size is 32768 bytes, and the smallest allowable size is 4096 bytes. The optimal block:fragment ratio is 8:1. Other ratios are possible, but are not recommended, and may produce poor results. @@ -143,7 +143,7 @@ ranging in value between .Ar blocksize Ns /8 and .Ar blocksize . -The default is 2048 bytes. +The default is 4096 bytes. .It Fl g Ar avgfilesize The expected average file size for the file system. .It Fl h Ar avgfpdir @@ -279,7 +279,7 @@ Creates a new ufs file system on .Pa ad3s1a . The .Nm -utility will use a block size of 16384 bytes, a fragment size of 2048 bytes +utility will use a block size of 32768 bytes, a fragment size of 4096 bytes and the largest possible number of blocks per cylinders group. These values tend to produce better performance for most applications than the historical defaults From owner-svn-src-head@FreeBSD.ORG Sat May 28 15:43:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 706481065672; Sat, 28 May 2011 15:43:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60F188FC0C; Sat, 28 May 2011 15:43:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SFhuDm090714; Sat, 28 May 2011 15:43:56 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SFhuaI090712; Sat, 28 May 2011 15:43:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105281543.p4SFhuaI090712@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 May 2011 15:43: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: r222424 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 15:43:56 -0000 Author: adrian Date: Sat May 28 15:43:56 2011 New Revision: 222424 URL: http://svn.freebsd.org/changeset/base/222424 Log: Fix AR9287 operation when >1 TX chain is enabled. I didn't pick this up with the initial commit because I was only testing with 11bg. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Sat May 28 15:14:50 2011 (r222423) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Sat May 28 15:43:56 2011 (r222424) @@ -185,6 +185,7 @@ ar9287SetPowerPerRateTable(struct ath_ha break; case 2: scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; + break; default: return AH_FALSE; /* Unsupported number of chains */ } From owner-svn-src-head@FreeBSD.ORG Sat May 28 16:11:22 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48F3B106564A; Sat, 28 May 2011 16:11:22 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (unknown [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id C739E8FC0C; Sat, 28 May 2011 16:11:20 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id C90ED40002; Sat, 28 May 2011 18:11:18 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id BADA14000B; Sat, 28 May 2011 18:11:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.1 Received: from mx.daemonic.se (h-90-99.A163.priv.bahnhof.se [79.136.90.99]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id AB04340002; Sat, 28 May 2011 18:11:17 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id 41130119C04; Sat, 28 May 2011 18:11:17 +0200 (CEST) Received: from [IPv6:2001:470:dca9:1::4] (vivi.daemonic.se [IPv6:2001:470:dca9:1::4]) by mail.daemonic.se (Postfix) with ESMTPSA id 14C3A12B2DA; Sat, 28 May 2011 18:11:16 +0200 (CEST) Message-ID: <4DE11E9F.1020601@daemonic.se> Date: Sat, 28 May 2011 18:11:11 +0200 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Kirk McKusick References: <201105281514.p4SFEoB2089540@svn.freebsd.org> In-Reply-To: <201105281514.p4SFEoB2089540@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222423 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 16:11:22 -0000 On 2011-05-28 17:14, Kirk McKusick wrote: > Author: mckusick > Date: Sat May 28 15:14:50 2011 > New Revision: 222423 > URL: http://svn.freebsd.org/changeset/base/222423 > > Log: > Update the manual page to reflect the new 32K/4K defaults. > > Reminded by: Ivan Voras > > Modified: > head/sbin/newfs/newfs.8 > See docs/157354 as well. http://www.freebsd.org/cgi/query-pr.cgi?pr=157354 Regards! -- Niclas From owner-svn-src-head@FreeBSD.ORG Sat May 28 16:15:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133D7106566B; Sat, 28 May 2011 16:15:47 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03D638FC19; Sat, 28 May 2011 16:15:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SGFkGp091722; Sat, 28 May 2011 16:15:46 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SGFkmJ091720; Sat, 28 May 2011 16:15:46 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105281615.p4SGFkmJ091720@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 May 2011 16:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222425 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 16:15:47 -0000 Author: nwhitehorn Date: Sat May 28 16:15:46 2011 New Revision: 222425 URL: http://svn.freebsd.org/changeset/base/222425 Log: Fix shell-based partitioning. Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Sat May 28 15:43:56 2011 (r222424) +++ head/usr.sbin/bsdinstall/scripts/auto Sat May 28 16:15:46 2011 (r222425) @@ -105,7 +105,7 @@ case $? in 1) # Shell clear echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'." - sh + sh 2>&1 ;; 3) # Manual bsdinstall partedit || error From owner-svn-src-head@FreeBSD.ORG Sat May 28 16:30:24 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69501106566B; Sat, 28 May 2011 16:30:24 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A65F8FC0A; Sat, 28 May 2011 16:30:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SGUO4R092229; Sat, 28 May 2011 16:30:24 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SGUO4f092227; Sat, 28 May 2011 16:30:24 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105281630.p4SGUO4f092227@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 28 May 2011 16:30: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: r222426 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 16:30:24 -0000 Author: marcel Date: Sat May 28 16:30:24 2011 New Revision: 222426 URL: http://svn.freebsd.org/changeset/base/222426 Log: Remove unused defines. They're distracting... Modified: head/sys/powerpc/mpc85xx/mpc85xx.h Modified: head/sys/powerpc/mpc85xx/mpc85xx.h ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.h Sat May 28 16:15:46 2011 (r222425) +++ head/sys/powerpc/mpc85xx/mpc85xx.h Sat May 28 16:30:24 2011 (r222426) @@ -67,11 +67,6 @@ #define OCP85XX_PORDEVSR2 (CCSRBAR_VA + 0xe0014) -#define OCP85XX_DEVDISR (CCSRBAR_VA + 0xe0070) -#define OCP85XX_DEVDISR_PCIE0 0x20000000 -#define OCP85XX_DEVDISR_PCIE1 0x04000000 -#define OCP85XX_DEVDISR_PCIE2 0x02000000 - /* * Status Registers. */ From owner-svn-src-head@FreeBSD.ORG Sat May 28 19:14:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94134106566B; Sat, 28 May 2011 19:14:16 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B23A8FC14; Sat, 28 May 2011 19:14:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SJEGd8097165; Sat, 28 May 2011 19:14:16 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SJEG0s097163; Sat, 28 May 2011 19:14:16 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105281914.p4SJEG0s097163@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 28 May 2011 19:14: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: r222428 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 19:14:16 -0000 Author: marcel Date: Sat May 28 19:14:16 2011 New Revision: 222428 URL: http://svn.freebsd.org/changeset/base/222428 Log: o Determine the number of LAWs in a way the is future proof. Only the MPC8555(E) has 8 LAWs, so don't make that the default case. Current processors have 12 LAWs so use that as the default instead. o Determine the target ID of the PCI/PCI-X and PCI-E controllers in a way that's more future proof. There's almost a perfect mapping from HC register offset to target ID, so use that as the default. Handle the MPC8548(E) specially, since it has a non-standard target ID for the PCI-E controller. Don't worry about whether the processor implements the target ID here, because we should not get called for PCI/PCI-X or PCI-E host controllers that don't exist. Modified: head/sys/powerpc/mpc85xx/mpc85xx.c Modified: head/sys/powerpc/mpc85xx/mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.c Sat May 28 17:13:15 2011 (r222427) +++ head/sys/powerpc/mpc85xx/mpc85xx.c Sat May 28 19:14:16 2011 (r222428) @@ -69,12 +69,13 @@ law_getmax(void) uint32_t ver; ver = SVR_VER(mfspr(SPR_SVR)); - if (ver == SVR_MPC8572E || ver == SVR_MPC8572) - return (12); - else if (ver == SVR_MPC8548E || ver == SVR_MPC8548) - return (10); - else + if (ver == SVR_MPC8555E || ver == SVR_MPC8555) return (8); + if (ver == SVR_MPC8548E || ver == SVR_MPC8548 || + ver == SVR_MPC8533E || ver == SVR_MPC8533) + return (10); + + return (12); } #define _LAW_SR(trgt,size) (0x80000000 | (trgt << 20) | (ffsl(size) - 2)) @@ -152,10 +153,16 @@ law_pci_target(struct resource *res, int trgt = 1; break; case 0xa000: - if (ver == SVR_MPC8572E || ver == SVR_MPC8572) - trgt = 2; + if (ver == SVR_MPC8548E || ver == SVR_MPC8548) + trgt = 3; else + trgt = 2; + break; + case 0xb000: + if (ver == SVR_MPC8548E || ver == SVR_MPC8548) rv = EINVAL; + else + trgt = 3; break; default: rv = ENXIO; From owner-svn-src-head@FreeBSD.ORG Sat May 28 19:18:30 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4FC0106564A; Sat, 28 May 2011 19:18:30 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from mx.utwente.nl (mx2.utsp.utwente.nl [130.89.2.13]) by mx1.freebsd.org (Postfix) with ESMTP id 34FB68FC12; Sat, 28 May 2011 19:18:29 +0000 (UTC) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id p4SJ3hP4003548; Sat, 28 May 2011 21:03:43 +0200 From: Pieter de Goeje To: svn-src-all@freebsd.org Date: Sat, 28 May 2011 21:03:42 +0200 User-Agent: KMail/1.9.10 References: <201105131848.p4DIm1j7079495@svn.freebsd.org> In-Reply-To: <201105131848.p4DIm1j7079495@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201105282103.43370.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: svn-src-head@freebsd.org, Matthew D Fleming , src-committers@freebsd.org Subject: Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 19:18:30 -0000 On Friday 13 May 2011 20:48:01 Matthew D Fleming wrote: > Author: mdf > Date: Fri May 13 18:48:00 2011 > New Revision: 221853 > URL: http://svn.freebsd.org/changeset/base/221853 > > Log: > Usa a globally visible region of zeros for both /dev/zero and the md > device. There are likely other kernel uses of "blob of zeros" than can > be converted. > > Reviewed by: alc > MFC after: 1 week > This change seems to reduce /dev/zero performance by 68% as measured by this command: dd if=/dev/zero of=/dev/null bs=64k count=100000. x dd-8-stable + dd-9-current +-------------------------------------------------------------------------+ |+ | |+ | |+ | |+ x x| |+ x x x| |A |MA_|| +-------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 1.2573578e+10 1.3156063e+10 1.2827355e+10 1.290079e+10 2.4951207e+08 + 5 4.1271391e+09 4.1453925e+09 4.1295157e+09 4.1328097e+09 7487363.6 Difference at 95.0% confidence -8.76798e+09 +/- 2.57431e+08 -67.9647% +/- 1.99547% (Student's t, pooled s = 1.76511e+08) This particular measurement was against 8-stable but the results are the same for -current just before this commit. Basically througput drops from ~13GB/sec to 4GB/sec. Hardware is a Phenom II X4 945 with 8GB of 800Mhz DDR2 memory. FreeBSD/amd64 is installed. This processor has 6MB of L3 cache. To me it looks like it's not able to cache the zeroes anymore. Is this intentional? I tried to change ZERO_REGION_SIZE back to 64K but that didn't help. Regards, Pieter de Goeje From owner-svn-src-head@FreeBSD.ORG Sat May 28 21:13:22 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D8FF106566C; Sat, 28 May 2011 21:13:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C11B8FC0C; Sat, 28 May 2011 21:13:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SLDMfZ000780; Sat, 28 May 2011 21:13:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SLDMos000775; Sat, 28 May 2011 21:13:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105282113.p4SLDMos000775@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 May 2011 21:13: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: r222429 - in head/sys: conf powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 21:13:22 -0000 Author: nwhitehorn Date: Sat May 28 21:13:22 2011 New Revision: 222429 URL: http://svn.freebsd.org/changeset/base/222429 Log: Factor out the SMU fan management code into a new module (powermac_thermal) that will connect all of the various sensors and fan control modules on Apple hardware with software-controlled fans (e.g. all G5 systems). MFC after: 1 month Added: head/sys/powerpc/powermac/powermac_thermal.c (contents, props changed) head/sys/powerpc/powermac/powermac_thermal.h (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/powermac/smu.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sat May 28 19:14:16 2011 (r222428) +++ head/sys/conf/files.powerpc Sat May 28 21:13:22 2011 (r222429) @@ -150,6 +150,7 @@ powerpc/powermac/macgpio.c optional powe powerpc/powermac/macio.c optional powermac pci powerpc/powermac/openpic_macio.c optional powermac pci powerpc/powermac/platform_powermac.c optional powermac +powerpc/powermac/powermac_thermal.c optional powermac powerpc/powermac/pswitch.c optional powermac pswitch powerpc/powermac/pmu.c optional powermac pmu powerpc/powermac/smu.c optional powermac smu Added: head/sys/powerpc/powermac/powermac_thermal.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powermac/powermac_thermal.c Sat May 28 21:13:22 2011 (r222429) @@ -0,0 +1,176 @@ +/*- + * Copyright (c) 2009-2011 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "powermac_thermal.h" + +static void fan_management_proc(void); +static void pmac_therm_manage_fans(void); + +static struct proc *pmac_them_proc; +static int enable_pmac_thermal = 1; + +static struct kproc_desc pmac_therm_kp = { + "pmac_thermal", + fan_management_proc, + &pmac_them_proc +}; + +SYSINIT(pmac_therm_setup, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, kproc_start, + &pmac_therm_kp); +SYSCTL_INT(_machdep, OID_AUTO, manage_fans, CTLFLAG_RW | CTLFLAG_TUN, + &enable_pmac_thermal, 1, "Enable automatic fan management"); +MALLOC_DEFINE(M_PMACTHERM, "pmactherm", "Powermac Thermal Management"); + +struct pmac_fan_le { + struct pmac_fan *fan; + int last_val; + SLIST_ENTRY(pmac_fan_le) entries; +}; +struct pmac_sens_le { + struct pmac_therm *sensor; + int last_val; + SLIST_ENTRY(pmac_sens_le) entries; +}; +static SLIST_HEAD(pmac_fans, pmac_fan_le) fans = SLIST_HEAD_INITIALIZER(fans); +static SLIST_HEAD(pmac_sensors, pmac_sens_le) sensors = + SLIST_HEAD_INITIALIZER(sensors); + +static void +fan_management_proc(void) +{ + /* Nothing to manage? */ + if (SLIST_EMPTY(&fans)) + return; + + while (1) { + pmac_therm_manage_fans(); + pause("pmac_therm", hz); + } +} + +static void +pmac_therm_manage_fans(void) +{ + struct pmac_sens_le *sensor; + struct pmac_fan_le *fan; + int average_excess, max_excess_zone, frac_excess; + int nsens, nsens_zone; + + if (!enable_pmac_thermal) + return; + + /* Read all the sensors */ + SLIST_FOREACH(sensor, &sensors, entries) { + sensor->last_val = sensor->sensor->read(sensor->sensor); + if (sensor->last_val > sensor->sensor->max_temp) { + printf("WARNING: Current temperature (%s: %d.%d C) " + "exceeds critical temperature (%d.%d C)! " + "Shutting down!\n", sensor->sensor->name, + sensor->last_val / 10, sensor->last_val % 10, + sensor->sensor->max_temp / 10, + sensor->sensor->max_temp % 10); + shutdown_nice(RB_POWEROFF); + } + } + + /* Set all the fans */ + SLIST_FOREACH(fan, &fans, entries) { + nsens = nsens_zone = 0; + average_excess = max_excess_zone = 0; + SLIST_FOREACH(sensor, &sensors, entries) { + frac_excess = (sensor->last_val - + sensor->sensor->target_temp)*100 / + (sensor->sensor->max_temp - + sensor->sensor->target_temp); + if (sensor->sensor->zone == fan->fan->zone) { + max_excess_zone = imax(max_excess_zone, + frac_excess); + nsens_zone++; + } + average_excess += frac_excess; + nsens++; + } + average_excess /= nsens; + + /* If there are no sensors in this zone, use the average */ + if (nsens_zone == 0) + max_excess_zone = average_excess; + /* No sensors at all? Use default */ + if (nsens == 0) { + fan->fan->set(fan->fan, fan->fan->default_rpm); + continue; + } + + /* + * Scale the fan linearly in the max temperature in its + * thermal zone. + */ + fan->fan->set(fan->fan, max_excess_zone * + (fan->fan->max_rpm - fan->fan->min_rpm)/100 + + fan->fan->min_rpm); + } +} + +void +pmac_thermal_fan_register(struct pmac_fan *fan) +{ + struct pmac_fan_le *list_entry; + + list_entry = malloc(sizeof(struct pmac_fan_le), M_PMACTHERM, + M_ZERO | M_WAITOK); + list_entry->fan = fan; + + SLIST_INSERT_HEAD(&fans, list_entry, entries); +} + +void +pmac_thermal_sensor_register(struct pmac_therm *sensor) +{ + struct pmac_sens_le *list_entry; + + list_entry = malloc(sizeof(struct pmac_sens_le), M_PMACTHERM, + M_ZERO | M_WAITOK); + list_entry->sensor = sensor; + + SLIST_INSERT_HEAD(&sensors, list_entry, entries); +} + Added: head/sys/powerpc/powermac/powermac_thermal.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powermac/powermac_thermal.h Sat May 28 21:13:22 2011 (r222429) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2009-2011 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _POWERPC_POWERMAC_POWERMAC_THERMAL_H +#define _POWERPC_POWERMAC_POWERMAC_THERMAL_H + +struct pmac_fan { + int min_rpm, max_rpm, default_rpm; + + char name[32]; + int zone; + + int (*read)(struct pmac_fan *); + int (*set)(struct pmac_fan *, int value); +}; + +struct pmac_therm { + int target_temp, max_temp; /* Tenths of a degree K */ + + char name[32]; + int zone; + + int (*read)(struct pmac_therm *); +}; + +void pmac_thermal_fan_register(struct pmac_fan *); +void pmac_thermal_sensor_register(struct pmac_therm *); + +#endif Modified: head/sys/powerpc/powermac/smu.c ============================================================================== --- head/sys/powerpc/powermac/smu.c Sat May 28 19:14:16 2011 (r222428) +++ head/sys/powerpc/powermac/smu.c Sat May 28 21:13:22 2011 (r222429) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "clock_if.h" #include "iicbus_if.h" @@ -69,19 +70,19 @@ struct smu_cmd { STAILQ_HEAD(smu_cmdq, smu_cmd); struct smu_fan { + struct pmac_fan fan; + device_t dev; cell_t reg; - cell_t min_rpm; - cell_t max_rpm; - cell_t unmanaged_rpm; - char location[32]; int old_style; int setpoint; }; struct smu_sensor { + struct pmac_therm therm; + device_t dev; + cell_t reg; - char location[32]; enum { SMU_CURRENT_SENSOR, SMU_VOLTAGE_SENSOR, @@ -131,10 +132,6 @@ struct smu_softc { uint16_t sc_slots_pow_scale; int16_t sc_slots_pow_offset; - /* Thermal management parameters */ - int sc_target_temp; /* Default 55 C */ - int sc_critical_temp; /* Default 90 C */ - struct cdev *sc_leddev; }; @@ -161,8 +158,6 @@ static int smu_get_datablock(device_t de static void smu_attach_i2c(device_t dev, phandle_t i2croot); static void smu_attach_fans(device_t dev, phandle_t fanroot); static void smu_attach_sensors(device_t dev, phandle_t sensroot); -static void smu_fan_management_proc(void *xdev); -static void smu_manage_fans(device_t smu); static void smu_set_sleepled(void *xdev, int onoff); static int smu_server_mode(SYSCTL_HANDLER_ARGS); static void smu_doorbell_intr(void *xdev); @@ -349,24 +344,6 @@ smu_attach(device_t dev) sc->sc_slots_pow_offset = (data[6] << 8) + data[7]; /* - * Set up simple-minded thermal management. - */ - sc->sc_target_temp = 55; - sc->sc_critical_temp = 90; - - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "target_temp", CTLTYPE_INT | CTLFLAG_RW, &sc->sc_target_temp, - sizeof(int), "Target temperature (C)"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "critical_temp", CTLTYPE_INT | CTLFLAG_RW, - &sc->sc_critical_temp, sizeof(int), "Critical temperature (C)"); - - kproc_create(smu_fan_management_proc, dev, &sc->sc_fanmgt_proc, - RFHIGHPID, 0, "smu_thermal"); - - /* * Set up LED interface */ sc->sc_leddev = led_create(smu_set_sleepled, dev, "sleepled"); @@ -658,8 +635,9 @@ doorbell_attach(device_t dev) */ static int -smu_fan_set_rpm(device_t smu, struct smu_fan *fan, int rpm) +smu_fan_set_rpm(struct smu_fan *fan, int rpm) { + device_t smu = fan->dev; struct smu_cmd cmd; int error; @@ -667,8 +645,8 @@ smu_fan_set_rpm(device_t smu, struct smu error = EIO; /* Clamp to allowed range */ - rpm = max(fan->min_rpm, rpm); - rpm = min(fan->max_rpm, rpm); + rpm = max(fan->fan.min_rpm, rpm); + rpm = min(fan->fan.max_rpm, rpm); /* * Apple has two fan control mechanisms. We can't distinguish @@ -704,8 +682,9 @@ smu_fan_set_rpm(device_t smu, struct smu } static int -smu_fan_read_rpm(device_t smu, struct smu_fan *fan) +smu_fan_read_rpm(struct smu_fan *fan) { + device_t smu = fan->dev; struct smu_cmd cmd; int rpm, error; @@ -749,7 +728,7 @@ smu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS) sc = device_get_softc(smu); fan = &sc->sc_fans[arg2]; - rpm = smu_fan_read_rpm(smu, fan); + rpm = smu_fan_read_rpm(fan); if (rpm < 0) return (rpm); @@ -760,7 +739,7 @@ smu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS) sc->sc_lastuserchange = time_uptime; - return (smu_fan_set_rpm(smu, fan, rpm)); + return (smu_fan_set_rpm(fan, rpm)); } static void @@ -801,23 +780,25 @@ smu_attach_fans(device_t dev, phandle_t if (strcmp(type, "fan-rpm-control") != 0) continue; + fan->dev = dev; fan->old_style = 0; OF_getprop(child, "reg", &fan->reg, sizeof(cell_t)); - OF_getprop(child, "min-value", &fan->min_rpm, sizeof(cell_t)); - OF_getprop(child, "max-value", &fan->max_rpm, sizeof(cell_t)); - - if (OF_getprop(child, "unmanaged-value", &fan->unmanaged_rpm, - sizeof(cell_t)) != sizeof(cell_t)) - fan->unmanaged_rpm = fan->max_rpm; + OF_getprop(child, "min-value", &fan->fan.min_rpm, sizeof(int)); + OF_getprop(child, "max-value", &fan->fan.max_rpm, sizeof(int)); + OF_getprop(child, "zone", &fan->fan.zone, sizeof(int)); + + if (OF_getprop(child, "unmanaged-value", &fan->fan.default_rpm, + sizeof(int)) != sizeof(int)) + fan->fan.default_rpm = fan->fan.max_rpm; - fan->setpoint = smu_fan_read_rpm(dev, fan); + fan->setpoint = smu_fan_read_rpm(fan); - OF_getprop(child, "location", fan->location, - sizeof(fan->location)); + OF_getprop(child, "location", fan->fan.name, + sizeof(fan->fan.name)); /* Add sysctls */ - for (i = 0; i < strlen(fan->location); i++) { - sysctl_name[i] = tolower(fan->location[i]); + for (i = 0; i < strlen(fan->fan.name); i++) { + sysctl_name[i] = tolower(fan->fan.name[i]); if (isspace(sysctl_name[i])) sysctl_name[i] = '_'; } @@ -826,23 +807,28 @@ smu_attach_fans(device_t dev, phandle_t oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(fanroot_oid), OID_AUTO, sysctl_name, CTLFLAG_RD, 0, "Fan Information"); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "minrpm", - CTLTYPE_INT | CTLFLAG_RD, &fan->min_rpm, sizeof(cell_t), + CTLTYPE_INT | CTLFLAG_RD, &fan->fan.min_rpm, sizeof(int), "Minimum allowed RPM"); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "maxrpm", - CTLTYPE_INT | CTLFLAG_RD, &fan->max_rpm, sizeof(cell_t), + CTLTYPE_INT | CTLFLAG_RD, &fan->fan.max_rpm, sizeof(int), "Maximum allowed RPM"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "rpm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, sc->sc_nfans, smu_fanrpm_sysctl, "I", "Fan RPM"); + fan->fan.read = (int (*)(struct pmac_fan *))smu_fan_read_rpm; + fan->fan.set = (int (*)(struct pmac_fan *, int))smu_fan_set_rpm; + pmac_thermal_fan_register(&fan->fan); + fan++; sc->sc_nfans++; } } static int -smu_sensor_read(device_t smu, struct smu_sensor *sens, int *val) +smu_sensor_read(struct smu_sensor *sens) { + device_t smu = sens->dev; struct smu_cmd cmd; struct smu_softc *sc; int64_t value; @@ -855,7 +841,7 @@ smu_sensor_read(device_t smu, struct smu error = smu_run_cmd(smu, &cmd, 1); if (error != 0) - return (error); + return (-1); sc = device_get_softc(smu); value = (cmd.data[0] << 8) | cmd.data[1]; @@ -867,8 +853,8 @@ smu_sensor_read(device_t smu, struct smu value += ((int64_t)sc->sc_cpu_diode_offset) << 9; value <<= 1; - /* Convert from 16.16 fixed point degC into integer C. */ - value >>= 16; + /* Convert from 16.16 fixed point degC into integer 0.1 K. */ + value = 10*(value >> 16) + 2732; break; case SMU_VOLTAGE_SENSOR: value *= sc->sc_cpu_volt_scale; @@ -902,8 +888,7 @@ smu_sensor_read(device_t smu, struct smu break; } - *val = value; - return (0); + return (value); } static int @@ -918,9 +903,9 @@ smu_sensor_sysctl(SYSCTL_HANDLER_ARGS) sc = device_get_softc(smu); sens = &sc->sc_sensors[arg2]; - error = smu_sensor_read(smu, sens, &value); - if (error != 0) - return (error); + value = smu_sensor_read(sens); + if (value < 0) + return (EBUSY); error = sysctl_handle_int(oidp, &value, 0, req); @@ -964,6 +949,7 @@ smu_attach_sensors(device_t dev, phandle char sysctl_name[40], sysctl_desc[40]; const char *units; + sens->dev = dev; OF_getprop(child, "device_type", type, sizeof(type)); if (strcmp(type, "current-sensor") == 0) { @@ -983,21 +969,33 @@ smu_attach_sensors(device_t dev, phandle } OF_getprop(child, "reg", &sens->reg, sizeof(cell_t)); - OF_getprop(child, "location", sens->location, - sizeof(sens->location)); + OF_getprop(child, "zone", &sens->therm.zone, sizeof(int)); + OF_getprop(child, "location", sens->therm.name, + sizeof(sens->therm.name)); - for (i = 0; i < strlen(sens->location); i++) { - sysctl_name[i] = tolower(sens->location[i]); + for (i = 0; i < strlen(sens->therm.name); i++) { + sysctl_name[i] = tolower(sens->therm.name[i]); if (isspace(sysctl_name[i])) sysctl_name[i] = '_'; } sysctl_name[i] = 0; - sprintf(sysctl_desc,"%s (%s)", sens->location, units); + sprintf(sysctl_desc,"%s (%s)", sens->therm.name, units); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(sensroot_oid), OID_AUTO, sysctl_name, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, sc->sc_nsensors, smu_sensor_sysctl, "I", sysctl_desc); + dev, sc->sc_nsensors, smu_sensor_sysctl, + (sens->type == SMU_TEMP_SENSOR) ? "IK" : "I", sysctl_desc); + + if (sens->type == SMU_TEMP_SENSOR) { + /* Make up some numbers */ + sens->therm.target_temp = 500 + 2732; /* 50 C */ + sens->therm.max_temp = 900 + 2732; /* 90 C */ + + sens->therm.read = + (int (*)(struct pmac_therm *))smu_sensor_read; + pmac_thermal_sensor_register(&sens->therm); + } sens++; sc->sc_nsensors++; @@ -1005,79 +1003,6 @@ smu_attach_sensors(device_t dev, phandle } static void -smu_fan_management_proc(void *xdev) -{ - device_t smu = xdev; - - while(1) { - smu_manage_fans(smu); - pause("smu", SMU_FANMGT_INTERVAL * hz / 1000); - } -} - -static void -smu_manage_fans(device_t smu) -{ - struct smu_softc *sc; - int i, maxtemp, temp, factor, error; - - sc = device_get_softc(smu); - - maxtemp = 0; - for (i = 0; i < sc->sc_nsensors; i++) { - if (sc->sc_sensors[i].type != SMU_TEMP_SENSOR) - continue; - - error = smu_sensor_read(smu, &sc->sc_sensors[i], &temp); - if (error == 0 && temp > maxtemp) - maxtemp = temp; - } - - if (maxtemp > sc->sc_critical_temp) { - device_printf(smu, "WARNING: Current system temperature (%d C) " - "exceeds critical temperature (%d C)! Shutting down!\n", - maxtemp, sc->sc_critical_temp); - shutdown_nice(RB_POWEROFF); - } - - if (maxtemp - sc->sc_target_temp > 20) - device_printf(smu, "WARNING: Current system temperature (%d C) " - "more than 20 degrees over target temperature (%d C)!\n", - maxtemp, sc->sc_target_temp); - - if (time_uptime - sc->sc_lastuserchange < 3) { - /* - * If we have heard from a user process in the last 3 seconds, - * go away. - */ - - return; - } - - if (maxtemp < 10) { /* Bail if no good sensors */ - for (i = 0; i < sc->sc_nfans; i++) - smu_fan_set_rpm(smu, &sc->sc_fans[i], - sc->sc_fans[i].unmanaged_rpm); - return; - } - - if (maxtemp - sc->sc_target_temp > 4) - factor = 110; - else if (maxtemp - sc->sc_target_temp > 1) - factor = 105; - else if (sc->sc_target_temp - maxtemp > 4) - factor = 90; - else if (sc->sc_target_temp - maxtemp > 1) - factor = 95; - else - factor = 100; - - for (i = 0; i < sc->sc_nfans; i++) - smu_fan_set_rpm(smu, &sc->sc_fans[i], - (sc->sc_fans[i].setpoint * factor) / 100); -} - -static void smu_set_sleepled(void *xdev, int onoff) { static struct smu_cmd cmd; From owner-svn-src-head@FreeBSD.ORG Sat May 28 21:54:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A0C1106566B; Sat, 28 May 2011 21:54:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A08E8FC0C; Sat, 28 May 2011 21:54:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SLsJZ1002021; Sat, 28 May 2011 21:54:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SLsJoR002019; Sat, 28 May 2011 21:54:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105282154.p4SLsJoR002019@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 May 2011 21:54: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: r222430 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 21:54:19 -0000 Author: nwhitehorn Date: Sat May 28 21:54:18 2011 New Revision: 222430 URL: http://svn.freebsd.org/changeset/base/222430 Log: Require an error instead of a timeout to decide the new-style fan commands won't work. This prevents a busy system from making smu(4) suddenly decide its fans use the old-style command set. MFC after: 3 days Modified: head/sys/powerpc/powermac/smu.c Modified: head/sys/powerpc/powermac/smu.c ============================================================================== --- head/sys/powerpc/powermac/smu.c Sat May 28 21:13:22 2011 (r222429) +++ head/sys/powerpc/powermac/smu.c Sat May 28 21:54:18 2011 (r222430) @@ -662,7 +662,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int cmd.data[3] = rpm & 0xff; error = smu_run_cmd(smu, &cmd, 1); - if (error) + if (error && error != EWOULDBLOCK) fan->old_style = 1; } @@ -695,7 +695,7 @@ smu_fan_read_rpm(struct smu_fan *fan) cmd.data[1] = fan->reg; error = smu_run_cmd(smu, &cmd, 1); - if (error) + if (error && error != EWOULDBLOCK) fan->old_style = 1; rpm = (cmd.data[0] << 8) | cmd.data[1]; From owner-svn-src-head@FreeBSD.ORG Sat May 28 22:11:22 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B004F106564A; Sat, 28 May 2011 22:11:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 957A08FC0C; Sat, 28 May 2011 22:11:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SMBMWt002562; Sat, 28 May 2011 22:11:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SMBMHr002560; Sat, 28 May 2011 22:11:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105282211.p4SMBMHr002560@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 May 2011 22:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222431 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 22:11:22 -0000 Author: nwhitehorn Date: Sat May 28 22:11:22 2011 New Revision: 222431 URL: http://svn.freebsd.org/changeset/base/222431 Log: Adapt smusat(4) to use powermac_thermal. This provides automatic fan management on dual- and quad-core Powermac G5s, and the last G5 iMacs. Modified: head/sys/powerpc/powermac/smusat.c Modified: head/sys/powerpc/powermac/smusat.c ============================================================================== --- head/sys/powerpc/powermac/smusat.c Sat May 28 21:54:18 2011 (r222430) +++ head/sys/powerpc/powermac/smusat.c Sat May 28 22:11:22 2011 (r222431) @@ -43,9 +43,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include + struct smu_sensor { + struct pmac_therm therm; + device_t dev; + cell_t reg; - char location[32]; enum { SMU_CURRENT_SENSOR, SMU_VOLTAGE_SENSOR, @@ -57,6 +61,7 @@ struct smu_sensor { static int smusat_probe(device_t); static int smusat_attach(device_t); static int smusat_sensor_sysctl(SYSCTL_HANDLER_ARGS); +static int smusat_sensor_read(struct smu_sensor *sens); MALLOC_DEFINE(M_SMUSAT, "smusat", "SMU Sattelite Sensors"); @@ -135,14 +140,16 @@ smusat_attach(device_t dev) char sysctl_name[40], sysctl_desc[40]; const char *units; + sens->dev = dev; sens->reg = 0; OF_getprop(child, "reg", &sens->reg, sizeof(sens->reg)); if (sens->reg < 0x30) continue; - sens->reg -= 0x30; - OF_getprop(child, "location", sens->location, - sizeof(sens->location)); + + OF_getprop(child, "zone", &sens->therm.zone, sizeof(int)); + OF_getprop(child, "location", sens->therm.name, + sizeof(sens->therm.name)); OF_getprop(child, "device_type", type, sizeof(type)); @@ -162,17 +169,27 @@ smusat_attach(device_t dev) continue; } - for (i = 0; i < strlen(sens->location); i++) { - sysctl_name[i] = tolower(sens->location[i]); + for (i = 0; i < strlen(sens->therm.name); i++) { + sysctl_name[i] = tolower(sens->therm.name[i]); if (isspace(sysctl_name[i])) sysctl_name[i] = '_'; } sysctl_name[i] = 0; - sprintf(sysctl_desc,"%s (%s)", sens->location, units); + sprintf(sysctl_desc,"%s (%s)", sens->therm.name, units); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(sensroot_oid), OID_AUTO, sysctl_name, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, - sc->sc_nsensors, smusat_sensor_sysctl, "I", sysctl_desc); + sc->sc_nsensors, smusat_sensor_sysctl, + (sens->type == SMU_TEMP_SENSOR) ? "IK" : "I", sysctl_desc); + + if (sens->type == SMU_TEMP_SENSOR) { + /* Make up some numbers */ + sens->therm.target_temp = 500 + 2732; /* 50 C */ + sens->therm.max_temp = 900 + 2732; /* 90 C */ + sens->therm.read = + (int (*)(struct pmac_therm *))smusat_sensor_read; + pmac_thermal_sensor_register(&sens->therm); + } sens++; sc->sc_nsensors++; @@ -198,11 +215,13 @@ smusat_updatecache(device_t dev) } static int -smusat_sensor_read(device_t dev, struct smu_sensor *sens, int *val) +smusat_sensor_read(struct smu_sensor *sens) { int value; + device_t dev; struct smusat_softc *sc; + dev = sens->dev; sc = device_get_softc(dev); if (time_uptime - sc->sc_last_update > 1) @@ -215,8 +234,8 @@ smusat_sensor_read(device_t dev, struct case SMU_TEMP_SENSOR: /* 16.16 */ value <<= 10; - /* Kill the .16 */ - value >>= 16; + /* From 16.16 to 0.1 C */ + value = 10*(value >> 16) + 2732; break; case SMU_VOLTAGE_SENSOR: /* 16.16 */ @@ -235,8 +254,7 @@ smusat_sensor_read(device_t dev, struct break; } - *val = value; - return (0); + return (value); } static int @@ -251,9 +269,9 @@ smusat_sensor_sysctl(SYSCTL_HANDLER_ARGS sc = device_get_softc(dev); sens = &sc->sc_sensors[arg2]; - error = smusat_sensor_read(dev, sens, &value); - if (error != 0) - return (error); + value = smusat_sensor_read(sens); + if (value < 0) + return (EBUSY); error = sysctl_handle_int(oidp, &value, 0, req);