svn commit: r243809 - stable/9/sys/libkern
Author: delphij Date: Mon Dec 3 18:01:53 2012 New Revision: 243809 URL: http://svnweb.freebsd.org/changeset/base/243809 Log: MFC r242506: Sync strlen with userland implementation. Modified: stable/9/sys/libkern/strlen.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/libkern/strlen.c == --- stable/9/sys/libkern/strlen.c Mon Dec 3 05:03:33 2012 (r243808) +++ stable/9/sys/libkern/strlen.c Mon Dec 3 18:01:53 2012 (r243809) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2009, 2010 Xin LI + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,14 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -31,14 +28,102 @@ __FBSDID("$FreeBSD$"); #include +#include + +/* + * Portable strlen() for 32-bit and 64-bit systems. + * + * Rationale: it is generally much more efficient to do word length + * operations and avoid branches on modern computer systems, as + * compared to byte-length operations with a lot of branches. + * + * The expression: + * + * ((x - 0x0101) & ~x & 0x8080) + * + * would evaluate to a non-zero value iff any of the bytes in the + * original word is zero. + * + * On multi-issue processors, we can divide the above expression into: + * a) (x - 0x0101) + * b) (~x & 0x8080) + * c) a & b + * + * Where, a) and b) can be partially computed in parallel. + * + * The algorithm above is found on "Hacker's Delight" by + * Henry S. Warren, Jr. + */ + +/* Magic numbers for the algorithm */ +#if LONG_BIT == 32 +static const unsigned long mask01 = 0x01010101; +static const unsigned long mask80 = 0x80808080; +#elif LONG_BIT == 64 +static const unsigned long mask01 = 0x0101010101010101; +static const unsigned long mask80 = 0x8080808080808080; +#else +#error Unsupported word size +#endif + +#defineLONGPTR_MASK (sizeof(long) - 1) + +/* + * Helper macro to return string length if we caught the zero + * byte. + */ +#define testbyte(x)\ + do {\ + if (p[x] == '\0') \ + return (p - str + x); \ + } while (0) size_t -strlen(str) - const char *str; +strlen(const char *str) { - register const char *s; + const char *p; + const unsigned long *lp; + long va, vb; - for (s = str; *s; ++s); - return(s - str); -} + /* +* Before trying the hard (unaligned byte-by-byte access) way +* to figure out whether there is a nul character, try to see +* if there is a nul character is within this accessible word +* first. +* +* p and (p & ~LONGPTR_MASK) must be equally accessible since +* they always fall in the same memory page, as long as page +* boundaries is integral multiple of word size. +*/ + lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK); + va = (*lp - mask01); + vb = ((~*lp) & mask80); + lp++; + if (va & vb) + /* Check if we have \0 in the first part */ + for (p = str; p < (const char *)lp; p++) + if (*p == '\0') + return (p - str); + /* Scan the rest of the string using word sized operation */ + for (; ; lp++) { + va = (*lp - mask01); + vb = ((~*lp) & mask80); + if (va & vb) { + p = (const char *)(lp); + testbyte(0); + testbyte(1); + testbyte(2); +
svn commit: r243810 - stable/8/sys/libkern
Author: delphij Date: Mon Dec 3 18:03:06 2012 New Revision: 243810 URL: http://svnweb.freebsd.org/changeset/base/243810 Log: MFC r242506: Sync strlen with userland implementation. Modified: stable/8/sys/libkern/strlen.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/libkern/ (props changed) Modified: stable/8/sys/libkern/strlen.c == --- stable/8/sys/libkern/strlen.c Mon Dec 3 18:01:53 2012 (r243809) +++ stable/8/sys/libkern/strlen.c Mon Dec 3 18:03:06 2012 (r243810) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2009, 2010 Xin LI + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,14 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -31,14 +28,102 @@ __FBSDID("$FreeBSD$"); #include +#include + +/* + * Portable strlen() for 32-bit and 64-bit systems. + * + * Rationale: it is generally much more efficient to do word length + * operations and avoid branches on modern computer systems, as + * compared to byte-length operations with a lot of branches. + * + * The expression: + * + * ((x - 0x0101) & ~x & 0x8080) + * + * would evaluate to a non-zero value iff any of the bytes in the + * original word is zero. + * + * On multi-issue processors, we can divide the above expression into: + * a) (x - 0x0101) + * b) (~x & 0x8080) + * c) a & b + * + * Where, a) and b) can be partially computed in parallel. + * + * The algorithm above is found on "Hacker's Delight" by + * Henry S. Warren, Jr. + */ + +/* Magic numbers for the algorithm */ +#if LONG_BIT == 32 +static const unsigned long mask01 = 0x01010101; +static const unsigned long mask80 = 0x80808080; +#elif LONG_BIT == 64 +static const unsigned long mask01 = 0x0101010101010101; +static const unsigned long mask80 = 0x8080808080808080; +#else +#error Unsupported word size +#endif + +#defineLONGPTR_MASK (sizeof(long) - 1) + +/* + * Helper macro to return string length if we caught the zero + * byte. + */ +#define testbyte(x)\ + do {\ + if (p[x] == '\0') \ + return (p - str + x); \ + } while (0) size_t -strlen(str) - const char *str; +strlen(const char *str) { - register const char *s; + const char *p; + const unsigned long *lp; + long va, vb; - for (s = str; *s; ++s); - return(s - str); -} + /* +* Before trying the hard (unaligned byte-by-byte access) way +* to figure out whether there is a nul character, try to see +* if there is a nul character is within this accessible word +* first. +* +* p and (p & ~LONGPTR_MASK) must be equally accessible since +* they always fall in the same memory page, as long as page +* boundaries is integral multiple of word size. +*/ + lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK); + va = (*lp - mask01); + vb = ((~*lp) & mask80); + lp++; + if (va & vb) + /* Check if we have \0 in the first part */ + for (p = str; p < (const char *)lp; p++) + if (*p == '\0') + return (p - str); + /* Scan the rest of the string using word sized operation */ + for (; ; lp++) { + va = (*lp - mask01); + vb = ((~*lp) & mask80); + if (va & vb) { + p = (const char *)(lp); + testbyte(0); + testbyte(1); +
svn commit: r243811 - stable/9/sys/libkern
Author: delphij Date: Mon Dec 3 18:08:44 2012 New Revision: 243811 URL: http://svnweb.freebsd.org/changeset/base/243811 Log: MFC r242507: Sync strlcpy with userland version. Modified: stable/9/sys/libkern/strlcpy.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/libkern/strlcpy.c == --- stable/9/sys/libkern/strlcpy.c Mon Dec 3 18:03:06 2012 (r243810) +++ stable/9/sys/libkern/strlcpy.c Mon Dec 3 18:08:44 2012 (r243811) @@ -1,35 +1,21 @@ -/* $OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $ */ +/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $*/ /*- * Copyright (c) 1998 Todd C. Miller - * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. + * Permission to use, copy, modify, and 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. * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * 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. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); @@ -41,21 +27,19 @@ __FBSDID("$FreeBSD$"); * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ -size_t strlcpy(dst, src, siz) - char *dst; - const char *src; - size_t siz; +size_t +strlcpy(char * __restrict dst, const char * __restrict src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; /* Copy as many bytes as will fit */ - if (n != 0 && --n != 0) { - do { - if ((*d++ = *s++) == 0) + if (n != 0) { + while (--n != 0) { + if ((*d++ = *s++) == '\0') break; - } while (--n != 0); + } } /* Not enough room in dst, add NUL and traverse rest of src */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243812 - stable/8/sys/libkern
Author: delphij Date: Mon Dec 3 18:10:30 2012 New Revision: 243812 URL: http://svnweb.freebsd.org/changeset/base/243812 Log: MFC r242507: Sync strlcpy with userland version. Modified: stable/8/sys/libkern/strlcpy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/libkern/ (props changed) Modified: stable/8/sys/libkern/strlcpy.c == --- stable/8/sys/libkern/strlcpy.c Mon Dec 3 18:08:44 2012 (r243811) +++ stable/8/sys/libkern/strlcpy.c Mon Dec 3 18:10:30 2012 (r243812) @@ -1,35 +1,21 @@ -/* $OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $ */ +/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $*/ /*- * Copyright (c) 1998 Todd C. Miller - * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. + * Permission to use, copy, modify, and 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. * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * 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. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); @@ -41,21 +27,19 @@ __FBSDID("$FreeBSD$"); * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ -size_t strlcpy(dst, src, siz) - char *dst; - const char *src; - size_t siz; +size_t +strlcpy(char * __restrict dst, const char * __restrict src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; /* Copy as many bytes as will fit */ - if (n != 0 && --n != 0) { - do { - if ((*d++ = *s++) == 0) + if (n != 0) { + while (--n != 0) { + if ((*d++ = *s++) == '\0') break; - } while (--n != 0); + } } /* Not enough room in dst, add NUL and traverse rest of src */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r243752 - in head: etc etc/defaults etc/mail etc/mtree etc/rc.d share/man/man4 usr.sbin usr.sbin/auditdistd
On 12/01/12 16:11, Robert Watson wrote: > Author: rwatson > Date: Sat Dec 1 15:11:46 2012 > New Revision: 243752 > URL: http://svnweb.freebsd.org/changeset/base/243752 > > Log: > Merge a number of changes required to hook up OpenBSM 1.2-alpha2's > auditdistd (distributed audit daemon) to the build: This should probably be documented in rc.conf(5) as well. Something like attached patch might work. As a bonus it also adds documentation for auditd_enable and friends. Regards! -- Niclas Index: share/man/man5/rc.conf.5 === --- share/man/man5/rc.conf.5 (revision 243808) +++ share/man/man5/rc.conf.5 (working copy) @@ -3402,6 +3402,40 @@ will set the .Xr syscons 4 scrollback (history) buffer to 200 lines. +.It Va auditd_enable +.Pq Vt bool +If set to +.Dq Li YES , +run the +.Xr auditd 8 +daemon at system boot time. +.It Va auditd_program +.Pq Vt str +Path to +.Xr autitd 8 +(default +.Pa /usr/sbin/auditd ) . +.It Va auditd_flags +.Pq Vt str +Flags to pass to +.Xr audtid 8 . +.It Va auditdistd_enable +.Pq Vt bool +If set to +.Dq Li YES , +run the +.Xr auditdistd 8 +daemon at system boot time. +.It Va auditdistd_program +.Pq Vt str +Path to +.Xr auditdistd 8 +(default +.Pa /usr/sbin/auditdistd ) . +.It Va auditdistd_flags +.Pq Vt str +Flags to pass to +.Xr auditdistd 8 . .It Va cron_enable .Pq Vt bool If set to ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243813 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: delphij Date: Mon Dec 3 18:12:54 2012 New Revision: 243813 URL: http://svnweb.freebsd.org/changeset/base/243813 Log: MFC r242332: s/dettach/detach/g Approved by: pjd Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Dec 3 18:10:30 2012(r243812) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Dec 3 18:12:54 2012(r243813) @@ -329,7 +329,7 @@ vdev_geom_attach_taster(struct g_consume } static void -vdev_geom_dettach_taster(struct g_consumer *cp) +vdev_geom_detach_taster(struct g_consumer *cp) { g_access(cp, -1, 0, 0); g_detach(cp); @@ -370,7 +370,7 @@ vdev_geom_read_pool_label(const char *na g_topology_unlock(); error = vdev_geom_read_config(zcp, &vdev_cfg); g_topology_lock(); - vdev_geom_dettach_taster(zcp); + vdev_geom_detach_taster(zcp); if (error) continue; ZFS_LOG(1, "successfully read vdev config"); @@ -439,7 +439,7 @@ vdev_geom_attach_by_guid(uint64_t guid) g_topology_unlock(); pguid = vdev_geom_read_guid(zcp); g_topology_lock(); - vdev_geom_dettach_taster(zcp); + vdev_geom_detach_taster(zcp); if (pguid != guid) continue; cp = vdev_geom_attach(pp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243814 - stable/9/sys/ofed/include/linux
Author: delphij Date: Mon Dec 3 18:16:36 2012 New Revision: 243814 URL: http://svnweb.freebsd.org/changeset/base/243814 Log: MFC r242841: Use %s when calling make_dev with a string pointer. This makes clang happy. Modified: stable/9/sys/ofed/include/linux/cdev.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/cdev.h == --- stable/9/sys/ofed/include/linux/cdev.h Mon Dec 3 18:12:54 2012 (r243813) +++ stable/9/sys/ofed/include/linux/cdev.h Mon Dec 3 18:16:36 2012 (r243814) @@ -107,7 +107,7 @@ cdev_add(struct linux_cdev *cdev, dev_t if (count != 1) panic("cdev_add: Unsupported count: %d", count); cdev->cdev = make_dev(&linuxcdevsw, MINOR(dev), 0, 0, 0700, - kobject_name(&cdev->kobj)); + "%s", kobject_name(&cdev->kobj)); cdev->dev = dev; cdev->cdev->si_drv1 = cdev; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243815 - stable/9/share/man/man4
Author: delphij Date: Mon Dec 3 18:19:58 2012 New Revision: 243815 URL: http://svnweb.freebsd.org/changeset/base/243815 Log: MFC r242728: ICMPV6_FILTER should read ICMP6_FILTER. Submitted by: Frédéric Perrin Modified: stable/9/share/man/man4/icmp6.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/icmp6.4 == --- stable/9/share/man/man4/icmp6.4 Mon Dec 3 18:16:36 2012 (r243814) +++ stable/9/share/man/man4/icmp6.4 Mon Dec 3 18:19:58 2012 (r243815) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2004 +.Dd November 7, 2012 .Dt ICMP6 4 .Os .Sh NAME @@ -234,7 +234,7 @@ calls may be used to obtain and install option level .Dv IPPROTO_ICMPV6 and name -.Dv ICMPV6_FILTER +.Dv ICMP6_FILTER with a pointer to the .Vt icmp6_filter structure as the option value. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243816 - stable/8/share/man/man4
Author: delphij Date: Mon Dec 3 18:20:52 2012 New Revision: 243816 URL: http://svnweb.freebsd.org/changeset/base/243816 Log: MFC r242728: ICMPV6_FILTER should read ICMP6_FILTER. Submitted by: Frédéric Perrin Modified: stable/8/share/man/man4/icmp6.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/icmp6.4 == --- stable/8/share/man/man4/icmp6.4 Mon Dec 3 18:19:58 2012 (r243815) +++ stable/8/share/man/man4/icmp6.4 Mon Dec 3 18:20:52 2012 (r243816) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2004 +.Dd November 7, 2012 .Dt ICMP6 4 .Os .Sh NAME @@ -234,7 +234,7 @@ calls may be used to obtain and install option level .Dv IPPROTO_ICMPV6 and name -.Dv ICMPV6_FILTER +.Dv ICMP6_FILTER with a pointer to the .Vt icmp6_filter structure as the option value. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243817 - stable/7/share/man/man4
Author: delphij Date: Mon Dec 3 18:21:29 2012 New Revision: 243817 URL: http://svnweb.freebsd.org/changeset/base/243817 Log: MFC r242728: ICMPV6_FILTER should read ICMP6_FILTER. Submitted by: Frédéric Perrin Modified: stable/7/share/man/man4/icmp6.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/icmp6.4 == --- stable/7/share/man/man4/icmp6.4 Mon Dec 3 18:20:52 2012 (r243816) +++ stable/7/share/man/man4/icmp6.4 Mon Dec 3 18:21:29 2012 (r243817) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2004 +.Dd November 7, 2012 .Dt ICMP6 4 .Os .Sh NAME @@ -234,7 +234,7 @@ calls may be used to obtain and install option level .Dv IPPROTO_ICMPV6 and name -.Dv ICMPV6_FILTER +.Dv ICMP6_FILTER with a pointer to the .Vt icmp6_filter structure as the option value. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243818 - stable/9/contrib/netcat
Author: delphij Date: Mon Dec 3 18:26:23 2012 New Revision: 243818 URL: http://svnweb.freebsd.org/changeset/base/243818 Log: MFC r235038,241906: netcat from OpenBSD 5.2. Modified: stable/9/contrib/netcat/FREEBSD-vendor stable/9/contrib/netcat/nc.1 stable/9/contrib/netcat/netcat.c stable/9/contrib/netcat/socks.c Directory Properties: stable/9/contrib/netcat/ (props changed) Modified: stable/9/contrib/netcat/FREEBSD-vendor == --- stable/9/contrib/netcat/FREEBSD-vendor Mon Dec 3 18:21:29 2012 (r243817) +++ stable/9/contrib/netcat/FREEBSD-vendor Mon Dec 3 18:26:23 2012 (r243818) @@ -1,5 +1,5 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL:http://www.openbsd.org/ -Version: 5.1 +Version: 5.2 License: BSD Modified: stable/9/contrib/netcat/nc.1 == --- stable/9/contrib/netcat/nc.1Mon Dec 3 18:21:29 2012 (r243817) +++ stable/9/contrib/netcat/nc.1Mon Dec 3 18:26:23 2012 (r243818) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ +.\" $OpenBSD: nc.1,v 1.61 2012/07/07 15:33:02 haesbaert Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 4, 2011 +.Dd February 7, 2012 .Dt NC 1 .Os .Sh NAME @@ -137,6 +137,10 @@ is completed. It is an error to use this option without the .Fl l option. +When used together with the +.Fl u +option, the server socket is not connected and it can receive UDP datagrams from +multiple hosts. .It Fl l Used to specify that .Nm Modified: stable/9/contrib/netcat/netcat.c == --- stable/9/contrib/netcat/netcat.cMon Dec 3 18:21:29 2012 (r243817) +++ stable/9/contrib/netcat/netcat.cMon Dec 3 18:26:23 2012 (r243818) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ +/* $OpenBSD: netcat.c,v 1.109 2012/07/07 15:33:02 haesbaert Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -75,7 +75,6 @@ /* Command Line Options */ intdflag; /* detached, no stdin */ unsigned int iflag;/* Interval Flag */ -intjflag; /* use jumbo frames if we can */ intkflag; /* More than one connect */ intlflag; /* Bind to local port */ intnflag; /* Don't do name look up */ @@ -116,6 +115,7 @@ int unix_connect(char *); intunix_listen(char *); void set_common_sockopts(int); intmap_tos(char *, int *); +void report_connect(const struct sockaddr *, socklen_t); void usage(int); #ifdef IPSEC @@ -153,7 +153,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46DdEe:hI:i:jklnoO:P:p:rSs:tT:UuV:vw:X:x:z", + "46DdEe:hI:i:klnoO:P:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -201,11 +201,6 @@ main(int argc, char *argv[]) if (errstr) errx(1, "interval %s: %s", errstr, optarg); break; -#ifdef SO_JUMBO - case 'j': - jflag = 1; - break; -#endif case 'k': kflag = 1; break; @@ -395,17 +390,23 @@ main(int argc, char *argv[]) if (s < 0) err(1, NULL); /* -* For UDP, we will use recvfrom() initially -* to wait for a caller, then use the regular -* functions to talk to the caller. +* For UDP and -k, don't connect the socket, let it +* receive datagrams from multiple socket pairs. +*/ + if (uflag && kflag) + readwrite(s); + /* +* For UDP and not -k, we will use recvfrom() initially +* to wait for a caller, then use the regular functions +* to talk to the caller. */ - if (uflag) { + else if (uflag && !kflag) { int rv, plen; char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 16384 : 2048; + plen =
svn commit: r243819 - stable/8/contrib/netcat
Author: delphij Date: Mon Dec 3 18:28:54 2012 New Revision: 243819 URL: http://svnweb.freebsd.org/changeset/base/243819 Log: MFC r235038,241906: netcat from OpenBSD 5.2. Modified: stable/8/contrib/netcat/nc.1 stable/8/contrib/netcat/netcat.c stable/8/contrib/netcat/socks.c Directory Properties: stable/8/contrib/netcat/ (props changed) Modified: stable/8/contrib/netcat/nc.1 == --- stable/8/contrib/netcat/nc.1Mon Dec 3 18:26:23 2012 (r243818) +++ stable/8/contrib/netcat/nc.1Mon Dec 3 18:28:54 2012 (r243819) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ +.\" $OpenBSD: nc.1,v 1.61 2012/07/07 15:33:02 haesbaert Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 4, 2011 +.Dd February 7, 2012 .Dt NC 1 .Os .Sh NAME @@ -137,6 +137,10 @@ is completed. It is an error to use this option without the .Fl l option. +When used together with the +.Fl u +option, the server socket is not connected and it can receive UDP datagrams from +multiple hosts. .It Fl l Used to specify that .Nm Modified: stable/8/contrib/netcat/netcat.c == --- stable/8/contrib/netcat/netcat.cMon Dec 3 18:26:23 2012 (r243818) +++ stable/8/contrib/netcat/netcat.cMon Dec 3 18:28:54 2012 (r243819) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ +/* $OpenBSD: netcat.c,v 1.109 2012/07/07 15:33:02 haesbaert Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -75,7 +75,6 @@ /* Command Line Options */ intdflag; /* detached, no stdin */ unsigned int iflag;/* Interval Flag */ -intjflag; /* use jumbo frames if we can */ intkflag; /* More than one connect */ intlflag; /* Bind to local port */ intnflag; /* Don't do name look up */ @@ -116,6 +115,7 @@ int unix_connect(char *); intunix_listen(char *); void set_common_sockopts(int); intmap_tos(char *, int *); +void report_connect(const struct sockaddr *, socklen_t); void usage(int); #ifdef IPSEC @@ -153,7 +153,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46DdEe:hI:i:jklnoO:P:p:rSs:tT:UuV:vw:X:x:z", + "46DdEe:hI:i:klnoO:P:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -201,11 +201,6 @@ main(int argc, char *argv[]) if (errstr) errx(1, "interval %s: %s", errstr, optarg); break; -#ifdef SO_JUMBO - case 'j': - jflag = 1; - break; -#endif case 'k': kflag = 1; break; @@ -395,17 +390,23 @@ main(int argc, char *argv[]) if (s < 0) err(1, NULL); /* -* For UDP, we will use recvfrom() initially -* to wait for a caller, then use the regular -* functions to talk to the caller. +* For UDP and -k, don't connect the socket, let it +* receive datagrams from multiple socket pairs. +*/ + if (uflag && kflag) + readwrite(s); + /* +* For UDP and not -k, we will use recvfrom() initially +* to wait for a caller, then use the regular functions +* to talk to the caller. */ - if (uflag) { + else if (uflag && !kflag) { int rv, plen; char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 16384 : 2048; + plen = 2048; rv = recvfrom(s, buf, plen, MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) @@ -415,11 +416,20 @@ main(int argc, char *argv[]) if (rv < 0) err(1, "connect"); + if (vflag) + report_connect((struct sockaddr *)&z, len); + readwrite(s);
svn commit: r243820 - stable/9/usr.sbin/watchdogd
Author: delphij Date: Mon Dec 3 18:30:12 2012 New Revision: 243820 URL: http://svnweb.freebsd.org/changeset/base/243820 Log: MFC r242519: Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency. Modified: stable/9/usr.sbin/watchdogd/Makefile stable/9/usr.sbin/watchdogd/watchdogd.c Directory Properties: stable/9/usr.sbin/watchdogd/ (props changed) Modified: stable/9/usr.sbin/watchdogd/Makefile == --- stable/9/usr.sbin/watchdogd/MakefileMon Dec 3 18:28:54 2012 (r243819) +++ stable/9/usr.sbin/watchdogd/MakefileMon Dec 3 18:30:12 2012 (r243820) @@ -4,8 +4,8 @@ PROG= watchdogd LINKS= ${BINDIR}/watchdogd ${BINDIR}/watchdog MAN= watchdogd.8 watchdog.8 -LDADD= -lm -lutil -DPADD= ${LIBM} ${LIBUTIL} +LDADD= -lutil +DPADD= ${LIBUTIL} .include Modified: stable/9/usr.sbin/watchdogd/watchdogd.c == --- stable/9/usr.sbin/watchdogd/watchdogd.c Mon Dec 3 18:28:54 2012 (r243819) +++ stable/9/usr.sbin/watchdogd/watchdogd.c Mon Dec 3 18:30:12 2012 (r243820) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -280,7 +281,7 @@ parseargs(int argc, char *argv[]) if (a == 0) timeout = WD_TO_NEVER; else - timeout = 1.0 + log(a * 1e9) / log(2.0); + timeout = flsll(a * 1e9); if (debugging) printf("Timeout is 2^%d nanoseconds\n", timeout); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243822 - stable/7/usr.sbin/watchdogd
Author: delphij Date: Mon Dec 3 18:31:33 2012 New Revision: 243822 URL: http://svnweb.freebsd.org/changeset/base/243822 Log: MFC r242519: Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency. Modified: stable/7/usr.sbin/watchdogd/Makefile stable/7/usr.sbin/watchdogd/watchdogd.c Directory Properties: stable/7/usr.sbin/watchdogd/ (props changed) Modified: stable/7/usr.sbin/watchdogd/Makefile == --- stable/7/usr.sbin/watchdogd/MakefileMon Dec 3 18:30:52 2012 (r243821) +++ stable/7/usr.sbin/watchdogd/MakefileMon Dec 3 18:31:33 2012 (r243822) @@ -5,8 +5,8 @@ LINKS= ${BINDIR}/watchdogd ${BINDIR}/wat MAN= watchdogd.8 watchdog.8 WARNS?=6 -LDADD= -lm -lutil -DPADD= ${LIBM} ${LIBUTIL} +LDADD= -lutil +DPADD= ${LIBUTIL} .include Modified: stable/7/usr.sbin/watchdogd/watchdogd.c == --- stable/7/usr.sbin/watchdogd/watchdogd.c Mon Dec 3 18:30:52 2012 (r243821) +++ stable/7/usr.sbin/watchdogd/watchdogd.c Mon Dec 3 18:31:33 2012 (r243822) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -277,7 +278,7 @@ parseargs(int argc, char *argv[]) if (a == 0) timeout = WD_TO_NEVER; else - timeout = 1.0 + log(a * 1e9) / log(2.0); + timeout = flsll(a * 1e9); if (debugging) printf("Timeout is 2^%d nanoseconds\n", timeout); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243821 - stable/8/usr.sbin/watchdogd
Author: delphij Date: Mon Dec 3 18:30:52 2012 New Revision: 243821 URL: http://svnweb.freebsd.org/changeset/base/243821 Log: MFC r242519: Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency. Modified: stable/8/usr.sbin/watchdogd/Makefile stable/8/usr.sbin/watchdogd/watchdogd.c Directory Properties: stable/8/usr.sbin/watchdogd/ (props changed) Modified: stable/8/usr.sbin/watchdogd/Makefile == --- stable/8/usr.sbin/watchdogd/MakefileMon Dec 3 18:30:12 2012 (r243820) +++ stable/8/usr.sbin/watchdogd/MakefileMon Dec 3 18:30:52 2012 (r243821) @@ -5,8 +5,8 @@ LINKS= ${BINDIR}/watchdogd ${BINDIR}/wat MAN= watchdogd.8 watchdog.8 WARNS?=6 -LDADD= -lm -lutil -DPADD= ${LIBM} ${LIBUTIL} +LDADD= -lutil +DPADD= ${LIBUTIL} .include Modified: stable/8/usr.sbin/watchdogd/watchdogd.c == --- stable/8/usr.sbin/watchdogd/watchdogd.c Mon Dec 3 18:30:12 2012 (r243820) +++ stable/8/usr.sbin/watchdogd/watchdogd.c Mon Dec 3 18:30:52 2012 (r243821) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -282,7 +283,7 @@ parseargs(int argc, char *argv[]) if (a == 0) timeout = WD_TO_NEVER; else - timeout = 1.0 + log(a * 1e9) / log(2.0); + timeout = flsll(a * 1e9); if (debugging) printf("Timeout is 2^%d nanoseconds\n", timeout); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243823 - stable/9/sys/dev/mfi
Author: delphij Date: Mon Dec 3 18:34:54 2012 New Revision: 243823 URL: http://svnweb.freebsd.org/changeset/base/243823 Log: MFC r242497: Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSI command properly. Without this change, mfi(4) always sends 10 byte READ and WRITE commands, which will cause data corruption when device is larger than 2^32 sectors. PR: kern/173291 Submitted by: Steven Hartland Reviewed by: mav Modified: stable/9/sys/dev/mfi/mfi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mfi/mfi.c == --- stable/9/sys/dev/mfi/mfi.c Mon Dec 3 18:31:33 2012(r243822) +++ stable/9/sys/dev/mfi/mfi.c Mon Dec 3 18:34:54 2012(r243823) @@ -106,6 +106,8 @@ static void mfi_add_sys_pd_complete(stru static struct mfi_command * mfi_bio_command(struct mfi_softc *); static voidmfi_bio_complete(struct mfi_command *); static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*); +static int mfi_build_syspd_cdb(struct mfi_pass_frame *pass, uint32_t block_count, + uint64_t lba, uint8_t byte2, int readop); static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*); static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); static int mfi_abort(struct mfi_softc *, struct mfi_command *); @@ -1982,13 +1984,78 @@ mfi_bio_command(struct mfi_softc *sc) mfi_enqueue_bio(sc, bio); return cm; } + +static int +mfi_build_syspd_cdb(struct mfi_pass_frame *pass, uint32_t block_count, +uint64_t lba, uint8_t byte2, int readop) +{ + int cdb_len; + + if (((lba & 0x1f) == lba) + && ((block_count & 0xff) == block_count) + && (byte2 == 0)) { + /* We can fit in a 6 byte cdb */ + struct scsi_rw_6 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_6 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_6 : WRITE_6; + scsi_ulto3b(lba, scsi_cmd->addr); + scsi_cmd->length = block_count & 0xff; + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } else if (((block_count & 0x) == block_count) && ((lba & 0x) == lba)) { + /* Need a 10 byte CDB */ + struct scsi_rw_10 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_10 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_10 : WRITE_10; + scsi_cmd->byte2 = byte2; + scsi_ulto4b(lba, scsi_cmd->addr); + scsi_cmd->reserved = 0; + scsi_ulto2b(block_count, scsi_cmd->length); + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } else if (((block_count & 0x) == block_count) && + ((lba & 0x) == lba)) { + /* Block count is too big for 10 byte CDB use a 12 byte CDB */ + struct scsi_rw_12 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_12 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_12 : WRITE_12; + scsi_cmd->byte2 = byte2; + scsi_ulto4b(lba, scsi_cmd->addr); + scsi_cmd->reserved = 0; + scsi_ulto4b(block_count, scsi_cmd->length); + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } else { + /* +* 16 byte CDB. We'll only get here if the LBA is larger +* than 2^32 +*/ + struct scsi_rw_16 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_16 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_16 : WRITE_16; + scsi_cmd->byte2 = byte2; + scsi_u64to8b(lba, scsi_cmd->addr); + scsi_cmd->reserved = 0; + scsi_ulto4b(block_count, scsi_cmd->length); + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } + + return cdb_len; +} + static struct mfi_command * mfi_build_syspdio(struct mfi_softc *sc, struct bio *bio) { struct mfi_command *cm; struct mfi_pass_frame *pass; - int flags = 0, blkcount = 0; - uint32_t context = 0; + int flags = 0; + uint8_t cdb_len; + uint32_t block_count, context = 0; if ((cm = mfi_dequeue_free(sc)) == NULL) return (NULL); @@ -2002,35 +2069,29 @@ mfi_build_syspdio(struct mfi_softc *sc, pass->header.cmd = MFI_CMD_PD_SCSI_IO; switch (bio->bio_cmd & 0x03) { case BIO_READ: -#define SCSI_READ 0x28 - pass->cdb[0] = SCSI_READ; flags = MFI_CMD_DATAIN; break; case BIO_WRITE: -#define SCSI_WRITE 0x2a - pass->cdb[0] = SCSI_WRITE; flags = MFI_CMD_DATAOUT;
svn commit: r243824 - stable/9/sys/dev/mfi
Author: delphij Date: Mon Dec 3 18:37:02 2012 New Revision: 243824 URL: http://svnweb.freebsd.org/changeset/base/243824 Log: MFC r242681 (ambrisko): - Extend the prior commit to use the generic SCSI command building function use that for JBOD and Thunderbolt disk write command. Now we only have one implementation in mfi. - Fix dumping on Thunderbolt cards. Polled IO commands do not seem to be normally acknowledged by changing cmd_status to MFI_STAT_OK. In order to get acknowledgement of the IO is complete, the Thunderbolt command queue needs to be run through. I added a flag MFI_CMD_SCSI to indicate this command is being polled and to complete the Thunderbolt wrapper and indicate the result. This flag needs to be set in the JBOD case in case if that us using Thunderbolt card. When in the polling loop check for completed commands. - Remove mfi_tbolt_is_ldio and just do the check when needed. - Fix an issue when attaching of disk device happens when a device is already scheduled to be attached but hasn't attached. - add a tunable to allow raw disk attachment to CAM via: hw.mfi.allow_cam_disk_passthrough=1 - fixup aborting of commands (AEN and LD state change). Use a generic abort function and only wait the command being aborted not both. Thunderbolt cards don't seem to abort commands so the abort times out. Modified: stable/9/sys/dev/mfi/mfi.c stable/9/sys/dev/mfi/mfi_cam.c stable/9/sys/dev/mfi/mfi_disk.c stable/9/sys/dev/mfi/mfi_syspd.c stable/9/sys/dev/mfi/mfi_tbolt.c stable/9/sys/dev/mfi/mfivar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mfi/mfi.c == --- stable/9/sys/dev/mfi/mfi.c Mon Dec 3 18:34:54 2012(r243823) +++ stable/9/sys/dev/mfi/mfi.c Mon Dec 3 18:37:02 2012(r243824) @@ -106,11 +106,9 @@ static voidmfi_add_sys_pd_complete(stru static struct mfi_command * mfi_bio_command(struct mfi_softc *); static voidmfi_bio_complete(struct mfi_command *); static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*); -static int mfi_build_syspd_cdb(struct mfi_pass_frame *pass, uint32_t block_count, - uint64_t lba, uint8_t byte2, int readop); static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*); static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); -static int mfi_abort(struct mfi_softc *, struct mfi_command *); +static int mfi_abort(struct mfi_softc *, struct mfi_command **); static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, struct thread *); static voidmfi_timeout(void *); static int mfi_user_command(struct mfi_softc *, @@ -376,6 +374,8 @@ mfi_attach(struct mfi_softc *sc) sx_init(&sc->mfi_config_lock, "MFI config"); TAILQ_INIT(&sc->mfi_ld_tqh); TAILQ_INIT(&sc->mfi_syspd_tqh); + TAILQ_INIT(&sc->mfi_ld_pend_tqh); + TAILQ_INIT(&sc->mfi_syspd_pend_tqh); TAILQ_INIT(&sc->mfi_evt_queue); TASK_INIT(&sc->mfi_evt_task, 0, mfi_handle_evt, sc); TASK_INIT(&sc->mfi_map_sync_task, 0, mfi_handle_map_sync, sc); @@ -697,6 +697,7 @@ mfi_attach(struct mfi_softc *sc) device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); return (EINVAL); } + sc->mfi_intr_ptr = mfi_intr_tbolt; sc->mfi_enable_intr(sc); } else { if ((error = mfi_comms_init(sc)) != 0) @@ -707,6 +708,7 @@ mfi_attach(struct mfi_softc *sc) device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); return (EINVAL); } + sc->mfi_intr_ptr = mfi_intr; sc->mfi_enable_intr(sc); } if ((error = mfi_get_controller_info(sc)) != 0) @@ -1281,6 +1283,17 @@ mfi_shutdown(struct mfi_softc *sc) struct mfi_command *cm; int error; + + if (sc->mfi_aen_cm) + sc->cm_aen_abort = 1; + if (sc->mfi_aen_cm != NULL) + mfi_abort(sc, &sc->mfi_aen_cm); + + if (sc->mfi_map_sync_cm) + sc->cm_map_abort = 1; + if (sc->mfi_map_sync_cm != NULL) + mfi_abort(sc, &sc->mfi_map_sync_cm); + mtx_lock(&sc->mfi_io_lock); error = mfi_dcmd_command(sc, &cm, MFI_DCMD_CTRL_SHUTDOWN, NULL, 0); if (error) { @@ -1288,12 +1301,6 @@ mfi_shutdown(struct mfi_softc *sc) return (error); } - if (sc->mfi_aen_cm != NULL) - mfi_abort(sc, sc->mfi_aen_cm); - - if (sc->mfi_map_sync_cm != NULL) - mfi_abort(sc, sc->mfi_map_sync_cm); - dcmd = &cm->cm_frame->dcmd; dcmd->header.flags = MFI_FRAME_DIR_NONE; cm->cm_flags = MFI_CMD_POLLED; @@ -1315,6 +1322,
svn commit: r243825 - stable/8/sys/dev/mfi
Author: delphij Date: Mon Dec 3 18:39:29 2012 New Revision: 243825 URL: http://svnweb.freebsd.org/changeset/base/243825 Log: MFC r242497: Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSI command properly. Without this change, mfi(4) always sends 10 byte READ and WRITE commands, which will cause data corruption when device is larger than 2^32 sectors. PR: kern/173291 Submitted by: Steven Hartland Reviewed by: mav Modified: stable/8/sys/dev/mfi/mfi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mfi/ (props changed) Modified: stable/8/sys/dev/mfi/mfi.c == --- stable/8/sys/dev/mfi/mfi.c Mon Dec 3 18:37:02 2012(r243824) +++ stable/8/sys/dev/mfi/mfi.c Mon Dec 3 18:39:29 2012(r243825) @@ -106,6 +106,8 @@ static void mfi_add_sys_pd_complete(stru static struct mfi_command * mfi_bio_command(struct mfi_softc *); static voidmfi_bio_complete(struct mfi_command *); static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*); +static int mfi_build_syspd_cdb(struct mfi_pass_frame *pass, uint32_t block_count, + uint64_t lba, uint8_t byte2, int readop); static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*); static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); static int mfi_abort(struct mfi_softc *, struct mfi_command *); @@ -1982,13 +1984,78 @@ mfi_bio_command(struct mfi_softc *sc) mfi_enqueue_bio(sc, bio); return cm; } + +static int +mfi_build_syspd_cdb(struct mfi_pass_frame *pass, uint32_t block_count, +uint64_t lba, uint8_t byte2, int readop) +{ + int cdb_len; + + if (((lba & 0x1f) == lba) + && ((block_count & 0xff) == block_count) + && (byte2 == 0)) { + /* We can fit in a 6 byte cdb */ + struct scsi_rw_6 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_6 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_6 : WRITE_6; + scsi_ulto3b(lba, scsi_cmd->addr); + scsi_cmd->length = block_count & 0xff; + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } else if (((block_count & 0x) == block_count) && ((lba & 0x) == lba)) { + /* Need a 10 byte CDB */ + struct scsi_rw_10 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_10 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_10 : WRITE_10; + scsi_cmd->byte2 = byte2; + scsi_ulto4b(lba, scsi_cmd->addr); + scsi_cmd->reserved = 0; + scsi_ulto2b(block_count, scsi_cmd->length); + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } else if (((block_count & 0x) == block_count) && + ((lba & 0x) == lba)) { + /* Block count is too big for 10 byte CDB use a 12 byte CDB */ + struct scsi_rw_12 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_12 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_12 : WRITE_12; + scsi_cmd->byte2 = byte2; + scsi_ulto4b(lba, scsi_cmd->addr); + scsi_cmd->reserved = 0; + scsi_ulto4b(block_count, scsi_cmd->length); + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } else { + /* +* 16 byte CDB. We'll only get here if the LBA is larger +* than 2^32 +*/ + struct scsi_rw_16 *scsi_cmd; + + scsi_cmd = (struct scsi_rw_16 *)&pass->cdb; + scsi_cmd->opcode = readop ? READ_16 : WRITE_16; + scsi_cmd->byte2 = byte2; + scsi_u64to8b(lba, scsi_cmd->addr); + scsi_cmd->reserved = 0; + scsi_ulto4b(block_count, scsi_cmd->length); + scsi_cmd->control = 0; + cdb_len = sizeof(*scsi_cmd); + } + + return cdb_len; +} + static struct mfi_command * mfi_build_syspdio(struct mfi_softc *sc, struct bio *bio) { struct mfi_command *cm; struct mfi_pass_frame *pass; - int flags = 0, blkcount = 0; - uint32_t context = 0; + int flags = 0; + uint8_t cdb_len; + uint32_t block_count, context = 0; if ((cm = mfi_dequeue_free(sc)) == NULL) return (NULL); @@ -2002,35 +2069,29 @@ mfi_build_syspdio(struct mfi_softc *sc, pass->header.cmd = MFI_CMD_PD_SCSI_IO; switch (bio->bio_cmd & 0x03) { case BIO_READ: -#define SCSI_READ 0x28 - pass->cdb[0] = SCSI_READ; flags = MFI_CMD_DATAIN; break; case BIO_WRITE: -#define SCSI_WRITE 0x2a - pass->cdb[0] = SCSI_WRITE;
Re: svn commit: r243554 - in head/usr.sbin/pkg_install: add create delete info lib updating version
On Sat, 1 Dec 2012 08:52:52 + Chris Rees mentioned: > > UPDATING, yes. Also as I reminded you in IRC last week, users of -CURRENT > are expected to follow -current@. Users of ports are also strongly > recommended to read -ports-announce. Repeating that several times does not make it true. > > What are you trying to achieve here? You discussed this previously, and > got exactly the same answer. There were extensive discussions over it in > ports@. I'm trying to point out, that this commit (and previous pkgng ones) was made without proper peer review and consulations, which is a recommended practice in THIS project. Doing so hurts not only the committer reputation (which I frankly do not care about), but the project image as a whole. I really don't want to go in and revert these changes, but I want to find a reasonable solution. It's not the first time an unreviewed ports-related change is being committed to a tree by that hurts us, who actually use FreeBSD and not consider it a personal playground. -- Stanislav Sedov ST4096-RIPE () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243826 - stable/8/sys/dev/mfi
Author: delphij Date: Mon Dec 3 18:47:25 2012 New Revision: 243826 URL: http://svnweb.freebsd.org/changeset/base/243826 Log: MFC r242681 (ambrisko): - Extend the prior commit to use the generic SCSI command building function use that for JBOD and Thunderbolt disk write command. Now we only have one implementation in mfi. - Fix dumping on Thunderbolt cards. Polled IO commands do not seem to be normally acknowledged by changing cmd_status to MFI_STAT_OK. In order to get acknowledgement of the IO is complete, the Thunderbolt command queue needs to be run through. I added a flag MFI_CMD_SCSI to indicate this command is being polled and to complete the Thunderbolt wrapper and indicate the result. This flag needs to be set in the JBOD case in case if that us using Thunderbolt card. When in the polling loop check for completed commands. - Remove mfi_tbolt_is_ldio and just do the check when needed. - Fix an issue when attaching of disk device happens when a device is already scheduled to be attached but hasn't attached. - add a tunable to allow raw disk attachment to CAM via: hw.mfi.allow_cam_disk_passthrough=1 - fixup aborting of commands (AEN and LD state change). Use a generic abort function and only wait the command being aborted not both. Thunderbolt cards don't seem to abort commands so the abort times out. Modified: stable/8/sys/dev/mfi/mfi.c stable/8/sys/dev/mfi/mfi_cam.c stable/8/sys/dev/mfi/mfi_disk.c stable/8/sys/dev/mfi/mfi_syspd.c stable/8/sys/dev/mfi/mfi_tbolt.c stable/8/sys/dev/mfi/mfivar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mfi/ (props changed) Modified: stable/8/sys/dev/mfi/mfi.c == --- stable/8/sys/dev/mfi/mfi.c Mon Dec 3 18:39:29 2012(r243825) +++ stable/8/sys/dev/mfi/mfi.c Mon Dec 3 18:47:25 2012(r243826) @@ -106,11 +106,9 @@ static voidmfi_add_sys_pd_complete(stru static struct mfi_command * mfi_bio_command(struct mfi_softc *); static voidmfi_bio_complete(struct mfi_command *); static struct mfi_command *mfi_build_ldio(struct mfi_softc *,struct bio*); -static int mfi_build_syspd_cdb(struct mfi_pass_frame *pass, uint32_t block_count, - uint64_t lba, uint8_t byte2, int readop); static struct mfi_command *mfi_build_syspdio(struct mfi_softc *,struct bio*); static int mfi_send_frame(struct mfi_softc *, struct mfi_command *); -static int mfi_abort(struct mfi_softc *, struct mfi_command *); +static int mfi_abort(struct mfi_softc *, struct mfi_command **); static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, struct thread *); static voidmfi_timeout(void *); static int mfi_user_command(struct mfi_softc *, @@ -376,6 +374,8 @@ mfi_attach(struct mfi_softc *sc) sx_init(&sc->mfi_config_lock, "MFI config"); TAILQ_INIT(&sc->mfi_ld_tqh); TAILQ_INIT(&sc->mfi_syspd_tqh); + TAILQ_INIT(&sc->mfi_ld_pend_tqh); + TAILQ_INIT(&sc->mfi_syspd_pend_tqh); TAILQ_INIT(&sc->mfi_evt_queue); TASK_INIT(&sc->mfi_evt_task, 0, mfi_handle_evt, sc); TASK_INIT(&sc->mfi_map_sync_task, 0, mfi_handle_map_sync, sc); @@ -697,6 +697,7 @@ mfi_attach(struct mfi_softc *sc) device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); return (EINVAL); } + sc->mfi_intr_ptr = mfi_intr_tbolt; sc->mfi_enable_intr(sc); } else { if ((error = mfi_comms_init(sc)) != 0) @@ -707,6 +708,7 @@ mfi_attach(struct mfi_softc *sc) device_printf(sc->mfi_dev, "Cannot set up interrupt\n"); return (EINVAL); } + sc->mfi_intr_ptr = mfi_intr; sc->mfi_enable_intr(sc); } if ((error = mfi_get_controller_info(sc)) != 0) @@ -1281,6 +1283,17 @@ mfi_shutdown(struct mfi_softc *sc) struct mfi_command *cm; int error; + + if (sc->mfi_aen_cm) + sc->cm_aen_abort = 1; + if (sc->mfi_aen_cm != NULL) + mfi_abort(sc, &sc->mfi_aen_cm); + + if (sc->mfi_map_sync_cm) + sc->cm_map_abort = 1; + if (sc->mfi_map_sync_cm != NULL) + mfi_abort(sc, &sc->mfi_map_sync_cm); + mtx_lock(&sc->mfi_io_lock); error = mfi_dcmd_command(sc, &cm, MFI_DCMD_CTRL_SHUTDOWN, NULL, 0); if (error) { @@ -1288,12 +1301,6 @@ mfi_shutdown(struct mfi_softc *sc) return (error); } - if (sc->mfi_aen_cm != NULL) - mfi_abort(sc, sc->mfi_aen_cm); - - if (sc->mfi_map_sync_cm != NULL) - mfi_abort(sc, sc->mfi_map_sync_cm); - dcmd = &cm->cm_frame->dcmd; dcmd->header.flags = MFI_FRAME_DIR_NONE; cm->cm
svn commit: r243827 - vendor/less/dist
Author: delphij Date: Mon Dec 3 18:58:12 2012 New Revision: 243827 URL: http://svnweb.freebsd.org/changeset/base/243827 Log: Vendor import of less v456 (beta). Modified: vendor/less/dist/NEWS vendor/less/dist/README vendor/less/dist/configure.ac vendor/less/dist/defines.h.in vendor/less/dist/less.man vendor/less/dist/less.nro vendor/less/dist/lessecho.man vendor/less/dist/lessecho.nro vendor/less/dist/lesskey.man vendor/less/dist/lesskey.nro vendor/less/dist/option.c vendor/less/dist/version.c Modified: vendor/less/dist/NEWS == --- vendor/less/dist/NEWS Mon Dec 3 18:47:25 2012(r243826) +++ vendor/less/dist/NEWS Mon Dec 3 18:58:12 2012(r243827) @@ -11,7 +11,7 @@ == - Major changes between "less" versions 451 and 453 + Major changes between "less" versions 451 and 456 * Allow backslash escaping of metacharacters in LESS environment variable. Modified: vendor/less/dist/README == --- vendor/less/dist/README Mon Dec 3 18:47:25 2012(r243826) +++ vendor/less/dist/README Mon Dec 3 18:58:12 2012(r243827) @@ -1,7 +1,7 @@ -Less, version 453 +Less, version 456 -This is the distribution of less, version 453, released 27 Oct 2012. +This is the distribution of less, version 456, released 08 Nov 2012. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or Modified: vendor/less/dist/configure.ac == --- vendor/less/dist/configure.ac Mon Dec 3 18:47:25 2012 (r243826) +++ vendor/less/dist/configure.ac Mon Dec 3 18:58:12 2012 (r243827) @@ -669,7 +669,7 @@ AH_TOP([ /* * Sizes of various buffers. */ -#if 0 /* old sizes for small memory machines +#if 0 /* old sizes for small memory machines */ #defineCMDBUF_SIZE 512 /* Buffer for multichar commands */ #defineUNGOT_SIZE 100 /* Max chars to unget() */ #defineLINEBUF_SIZE1024/* Max size of line in input file */ Modified: vendor/less/dist/defines.h.in == --- vendor/less/dist/defines.h.in Mon Dec 3 18:47:25 2012 (r243826) +++ vendor/less/dist/defines.h.in Mon Dec 3 18:58:12 2012 (r243827) @@ -182,7 +182,7 @@ /* * Sizes of various buffers. */ -#if 0 /* old sizes for small memory machines +#if 0 /* old sizes for small memory machines */ #defineCMDBUF_SIZE 512 /* Buffer for multichar commands */ #defineUNGOT_SIZE 100 /* Max chars to unget() */ #defineLINEBUF_SIZE1024/* Max size of line in input file */ Modified: vendor/less/dist/less.man == --- vendor/less/dist/less.man Mon Dec 3 18:47:25 2012(r243826) +++ vendor/less/dist/less.man Mon Dec 3 18:58:12 2012(r243827) @@ -438,18 +438,14 @@ LESS(1) the command line by beginning the command line option with "-+". Some options like -k or -D require a string to follow the option let- - ter. The string for that option is considered to end when a space, - tab, dash or dollar sign ($) is found. For example, to set two -D - options on MS-DOS, you can separate them with a dollar sign, like this: + ter. The string for that option is considered to end when a dollar + sign ($) is found. For example, you can set two -D options on MS-DOS + like this: LESS="Dn9.1$Ds4.1" - or a space like this: - - LESS="Dn9.1 Ds4.1" - - Any character may be included literally in an option string by preced- - ing it with a backslash. + A dollar sign or backslash may be included literally in an option + string by preceding it with a backslash. -? or --help This option displays a summary of the commands accepted by [4mless[0m @@ -1612,4 +1608,4 @@ LESS(1) - Version 453: 27 Oct 2012LESS(1) + Version 456: 08 Nov 2012LESS(1) Modified: vendor/less/dist/less.nro == --- vendor/less/dist/less.nro Mon Dec 3 18:47:25 2012(r243826) +++ vendor/less/dist/less.nro Mon Dec 3 18:58:12 2012(r243827) @@ -1,4 +1,4 @@ -.TH LESS 1 "Version 453: 27 Oct 2012" +.TH LESS 1 "Version 456: 08 Nov 201
svn commit: r243828 - vendor/less/v456
Author: delphij Date: Mon Dec 3 18:58:46 2012 New Revision: 243828 URL: http://svnweb.freebsd.org/changeset/base/243828 Log: Tag less v456. Added: vendor/less/v456/ - copied from r243827, vendor/less/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243829 - head/contrib/less
Author: delphij Date: Mon Dec 3 19:00:23 2012 New Revision: 243829 URL: http://svnweb.freebsd.org/changeset/base/243829 Log: MFV: less v456. Modified: head/contrib/less/NEWS head/contrib/less/README head/contrib/less/configure.ac head/contrib/less/defines.h.in head/contrib/less/less.man head/contrib/less/less.nro head/contrib/less/lessecho.man head/contrib/less/lessecho.nro head/contrib/less/lesskey.man head/contrib/less/lesskey.nro head/contrib/less/option.c head/contrib/less/version.c Directory Properties: head/contrib/less/ (props changed) Modified: head/contrib/less/NEWS == --- head/contrib/less/NEWS Mon Dec 3 18:58:46 2012(r243828) +++ head/contrib/less/NEWS Mon Dec 3 19:00:23 2012(r243829) @@ -11,7 +11,7 @@ == - Major changes between "less" versions 451 and 453 + Major changes between "less" versions 451 and 456 * Allow backslash escaping of metacharacters in LESS environment variable. Modified: head/contrib/less/README == --- head/contrib/less/READMEMon Dec 3 18:58:46 2012(r243828) +++ head/contrib/less/READMEMon Dec 3 19:00:23 2012(r243829) @@ -7,9 +7,9 @@ ** ** -Less, version 453 +Less, version 456 -This is the distribution of less, version 453, released 27 Oct 2012. +This is the distribution of less, version 456, released 08 Nov 2012. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or Modified: head/contrib/less/configure.ac == --- head/contrib/less/configure.ac Mon Dec 3 18:58:46 2012 (r243828) +++ head/contrib/less/configure.ac Mon Dec 3 19:00:23 2012 (r243829) @@ -669,7 +669,7 @@ AH_TOP([ /* * Sizes of various buffers. */ -#if 0 /* old sizes for small memory machines +#if 0 /* old sizes for small memory machines */ #defineCMDBUF_SIZE 512 /* Buffer for multichar commands */ #defineUNGOT_SIZE 100 /* Max chars to unget() */ #defineLINEBUF_SIZE1024/* Max size of line in input file */ Modified: head/contrib/less/defines.h.in == --- head/contrib/less/defines.h.in Mon Dec 3 18:58:46 2012 (r243828) +++ head/contrib/less/defines.h.in Mon Dec 3 19:00:23 2012 (r243829) @@ -182,7 +182,7 @@ /* * Sizes of various buffers. */ -#if 0 /* old sizes for small memory machines +#if 0 /* old sizes for small memory machines */ #defineCMDBUF_SIZE 512 /* Buffer for multichar commands */ #defineUNGOT_SIZE 100 /* Max chars to unget() */ #defineLINEBUF_SIZE1024/* Max size of line in input file */ Modified: head/contrib/less/less.man == --- head/contrib/less/less.man Mon Dec 3 18:58:46 2012(r243828) +++ head/contrib/less/less.man Mon Dec 3 19:00:23 2012(r243829) @@ -438,18 +438,14 @@ LESS(1) the command line by beginning the command line option with "-+". Some options like -k or -D require a string to follow the option let- - ter. The string for that option is considered to end when a space, - tab, dash or dollar sign ($) is found. For example, to set two -D - options on MS-DOS, you can separate them with a dollar sign, like this: + ter. The string for that option is considered to end when a dollar + sign ($) is found. For example, you can set two -D options on MS-DOS + like this: LESS="Dn9.1$Ds4.1" - or a space like this: - - LESS="Dn9.1 Ds4.1" - - Any character may be included literally in an option string by preced- - ing it with a backslash. + A dollar sign or backslash may be included literally in an option + string by preceding it with a backslash. -? or --help This option displays a summary of the commands accepted by [4mless[0m @@ -1612,4 +1608,4 @@ LESS(1) - Version 453: 27 Oct 2012LESS(1) + Version 456: 08 Nov 2012LESS(1) Modified: head/contrib/less/less.nro == --- head/contrib/less/less.
Re: svn commit: r243554 - in head/usr.sbin/pkg_install: add create delete info lib updating version
On Mon, Dec 03, 2012 at 10:45:26AM -0800, Stanislav Sedov wrote: > On Sat, 1 Dec 2012 08:52:52 + > Chris Rees mentioned: > > > > > UPDATING, yes. Also as I reminded you in IRC last week, users of -CURRENT > > are expected to follow -current@. Users of ports are also strongly > > recommended to read -ports-announce. > > Repeating that several times does not make it true. This was also sent to current@ > > > > > What are you trying to achieve here? You discussed this previously, and > > got exactly the same answer. There were extensive discussions over it in > > ports@. > > I'm trying to point out, that this commit (and previous pkgng ones) was made > without proper peer review and consulations, which is a recommended practice > in THIS project. Doing so hurts not only the committer reputation (which I > frankly do not care about), but the project image as a whole. That is good I don't care about my reputation either. But I do care about the project image, and lots of very large companies with large freebsd setup sent me mails thank the pkgng people for our work and how much it simplifies their life about managing their servers, because pkgng can reliably upgrade packages, and fits nicely with puppet/chef/cfengine. they also appreciate how easy a new FreeBSD installation is with pkgng. Of course pkgng is far from perfect but it is actually better than pkg_install and the bottleneck to improve the pkgng is now the ports tree which lacks lot of thing to be able to produce better binary packages. And for that we need pkgng to be the default backend of the ports tree. > > I really don't want to go in and revert these changes, but I want to find a > reasonable solution. It's not the first time an unreviewed ports-related > change is being committed to a tree by that hurts us, who actually use FreeBSD > and not consider it a personal playground. Sorry but I consider companies with 1K+ server using FreeBSD not a personnal playground, and lot's of them are really happy with the direction the ports tree and package management on FreeBSD is taking Bapt pgpeB5TWqMNCx.pgp Description: PGP signature
svn commit: r243831 - in head: share/examples/etc share/mk usr.bin/make
Author: jkim Date: Mon Dec 3 19:27:31 2012 New Revision: 243831 URL: http://svnweb.freebsd.org/changeset/base/243831 Log: Remove fictitious support for 80386-class CPUs from bsd.cpu.mk and make(1). It was removed from head more than 8 years ago (see r137784 and r137785). Reviewed by: imp, delphij, dim Modified: head/share/examples/etc/make.conf head/share/mk/bsd.cpu.mk head/usr.bin/make/main.c Modified: head/share/examples/etc/make.conf == --- head/share/examples/etc/make.conf Mon Dec 3 19:24:08 2012 (r243830) +++ head/share/examples/etc/make.conf Mon Dec 3 19:27:31 2012 (r243831) @@ -35,7 +35,7 @@ # athlon-tbird, athlon, k7, geode, k6-3, k6-2, k6, k5 # (Intel CPUs) core2, core, nocona, pentium4m, pentium4, prescott, # pentium3m, pentium3, pentium-m, pentium2, -# pentiumpro, pentium-mmx, pentium, i486, i386 +# pentiumpro, pentium-mmx, pentium, i486 # (VIA CPUs) c7, c3-2, c3 # AMD64 architecture:opteron-sse3, athlon64-sse3, k8-sse3, opteron, # athlon64, k8, core2, nocona, prescott Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkMon Dec 3 19:24:08 2012(r243830) +++ head/share/mk/bsd.cpu.mkMon Dec 3 19:27:31 2012(r243831) @@ -145,59 +145,54 @@ _CPUCFLAGS = -mcpu=ultrasparc3 . if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2" MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 -MACHINE_CPU += i486 i386 . elif ${CPUTYPE} == "btver1" -MACHINE_CPU = ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 i486 i386 +MACHINE_CPU = ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "amdfam10" MACHINE_CPU = athlon-xp athlon k7 3dnow sse4a sse3 sse2 sse mmx k6 k5 i586 -MACHINE_CPU += i486 i386 . elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" -MACHINE_CPU = athlon-xp athlon k7 3dnow sse3 sse2 sse mmx k6 k5 i586 i486 i386 +MACHINE_CPU = athlon-xp athlon k7 3dnow sse3 sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" -MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386 +MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ ${CPUTYPE} == "athlon-4" -MACHINE_CPU = athlon-xp athlon k7 3dnow sse mmx k6 k5 i586 i486 i386 +MACHINE_CPU = athlon-xp athlon k7 3dnow sse mmx k6 k5 i586 . elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird" -MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386 +MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 . elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2" || ${CPUTYPE} == "geode" -MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386 +MACHINE_CPU = 3dnow mmx k6 k5 i586 . elif ${CPUTYPE} == "k6" -MACHINE_CPU = mmx k6 k5 i586 i486 i386 +MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" -MACHINE_CPU = k5 i586 i486 i386 +MACHINE_CPU = k5 i586 . elif ${CPUTYPE} == "c3" -MACHINE_CPU = 3dnow mmx i586 i486 i386 +MACHINE_CPU = 3dnow mmx i586 . elif ${CPUTYPE} == "c3-2" -MACHINE_CPU = sse mmx i586 i486 i386 +MACHINE_CPU = sse mmx i586 . elif ${CPUTYPE} == "c7" -MACHINE_CPU = sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i" -MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "corei7" -MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "core2" -MACHINE_CPU = ssse3 sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "prescott" -MACHINE_CPU = sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" || \ ${CPUTYPE} == "pentium-m" -MACHINE_CPU = sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "pentium3" || ${CPUTYPE} == "pentium3m" -MACHINE_CPU = sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse i686 mmx i586 . elif ${CPUTYPE} == "pentium2" -MACHINE_CPU = i686 mmx i586 i486 i386 +MACHINE_CPU = i686 mmx i586 . elif ${CPUTYPE} == "pentiumpro" -MACHINE_CPU = i686 i586 i486 i386 +MACHINE_CPU = i686 i586 . elif ${CPUTYPE} == "pentium-mmx" -MACHINE_CPU = mmx i586 i486 i386 +MACHINE_CPU = mmx i586 . elif ${CPUTYPE} == "pentium" -MACHINE_CPU = i586 i486 i386 -. elif ${CPUTYPE} == "i486" -MACHINE_CPU = i486 i386 -. elif ${CPUTYPE} == "i386" -MACHINE_CPU = i386 +MACHINE_CPU = i586 . endif +MACHINE_CPU +=
Re: svn commit: r243019 - head/sbin/route
It seems that this commit breaks the following commands like this: route add -net 10.8/16 10.2.0.1 --- Script started on Mon Dec 3 11:36:49 2012 delphij has logged on ttyv0 from local. [delphij@epsilon] ~> netstat -anrafinet Routing tables Internet: DestinationGatewayFlagsRefs Use Netif Expire default10.2.0.1 UGS 0 37 alc0 10.2.0.0/16link#1 U 0 32 alc0 10.2.2.130 link#1 UHS 00lo0 127.0.0.1 link#2 UH 00lo0 [delphij@epsilon] ~> sudo route add -net 10.8/16 10.2.0.1 add net 10.8: gateway 10.2.0.1 [delphij@epsilon] ~> netstat -anrafinet Routing tables Internet: DestinationGatewayFlagsRefs Use Netif Expire 0.0.0.0/16 10.2.0.1 UGS 00 alc0 => default10.2.0.1 UGS 0 40 alc0 10.2.0.0/16link#1 U 0 32 alc0 10.2.2.130 link#1 UHS 00lo0 127.0.0.1 link#2 UH 00lo0 [delphij@epsilon] ~> sudo route delete 0.0.0.0/16 10.2.0.1 delete net 0.0.0.0: gateway 10.2.0.1 [delphij@epsilon] ~> exit Script done on Mon Dec 3 11:37:31 2012 --- If I reverted the changeset, it would add the right route. According to the commit message, this doesn't seem intentional? Could you please take a look at this and fix it? Thanks in advance! Cheers, On Wed, Nov 14, 2012 at 12:05 AM, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Nov 14 08:05:21 2012 > New Revision: 243019 > URL: http://svnweb.freebsd.org/changeset/base/243019 > > Log: > Remove remnants of classful addressing. These magic transformations > of supplied arguments is not what a modern sysadmin expect. > > Modified: > head/sbin/route/route.c > > Modified: head/sbin/route/route.c > > == > --- head/sbin/route/route.c Wed Nov 14 06:37:43 2012(r243018) > +++ head/sbin/route/route.c Wed Nov 14 08:05:21 2012(r243019) > @@ -422,7 +422,7 @@ routename(struct sockaddr *sa) > > /* > * Return the name of the network whose address is given. > - * The address is assumed to be that of a net or subnet, not a host. > + * The address is assumed to be that of a net, not a host. > */ > const char * > netname(struct sockaddr *sa) > @@ -430,9 +430,8 @@ netname(struct sockaddr *sa) > const char *cp = NULL; > static char line[MAXHOSTNAMELEN + 1]; > struct netent *np = NULL; > - u_long net, mask; > u_long i; > - int n, subnetshift; > + int n; > > switch (sa->sa_family) { > > @@ -444,28 +443,7 @@ netname(struct sockaddr *sa) > if (in.s_addr == 0) > cp = "default"; > else if (!nflag) { > - if (IN_CLASSA(i)) { > - mask = IN_CLASSA_NET; > - subnetshift = 8; > - } else if (IN_CLASSB(i)) { > - mask = IN_CLASSB_NET; > - subnetshift = 8; > - } else { > - mask = IN_CLASSC_NET; > - subnetshift = 4; > - } > - /* > -* If there are more bits than the standard mask > -* would suggest, subnets must be in use. > -* Guess at the subnet mask, assuming reasonable > -* width subnet fields. > -*/ > - while (in.s_addr & ~mask) > - mask |= mask >> subnetshift; > - net = in.s_addr & mask; > - while ((mask & 1) == 0) > - mask >>= 1, net >>= 1; > - np = getnetbyaddr(net, AF_INET); > + np = getnetbyaddr(i, AF_INET); > if (np != NULL) > cp = np->n_name; > } > @@ -810,30 +788,19 @@ newroute(int argc, char **argv) > static void > inet_makenetandmask(u_long net, struct sockaddr_in *sin, u_long bits) > { > - u_long addr, mask = 0; > + u_long mask = 0; > char *cp; > > rtm_addrs |= RTA_NETMASK; > - /* > -* XXX: This approach unable to handle 0.0.0.1/32 correctly > -* as inet_network() converts 0.0.0.1 and 1 equally. > -*/ > - if (net <= 0xff) > - addr = net << IN_CLASSA_NSHIFT; > - else if (net <= 0x) > - addr = net << IN_CLASSB_NSHIFT; > - else if (net <= 0xff) > - addr = net << IN_CLASSC_NSHIFT; > - else > - addr =
svn commit: r243832 - head/usr.sbin/bsdinstall/scripts
Author: joel (doc committer) Date: Mon Dec 3 19:55:00 2012 New Revision: 243832 URL: http://svnweb.freebsd.org/changeset/base/243832 Log: - Remove snapshots.se.freebsd.org [1] - Add ftp6.se.freebsd.org Discussed with: brd [1] Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect == --- head/usr.sbin/bsdinstall/scripts/mirrorselect Mon Dec 3 19:27:31 2012(r243831) +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Mon Dec 3 19:55:00 2012(r243832) @@ -40,7 +40,6 @@ MIRROR=`dialog --backtitle "FreeBSD Inst 0 0 0 \ ftp://ftp.freebsd.org "Main Site"\ ftp://snapshots.jp.freebsd.org "Snapshots Server Japan"\ - ftp://snapshots.se.freebsd.org "Snapshots Server Sweden"\ ftp://ftp.freebsd.org "IPv6 Main Site"\ ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\ ftp://ftp.il.freebsd.org"IPv6 Israel"\ @@ -151,6 +150,7 @@ MIRROR=`dialog --backtitle "FreeBSD Inst ftp://ftp3.se.freebsd.org "Sweden #3"\ ftp://ftp4.se.freebsd.org "Sweden #4"\ ftp://ftp5.se.freebsd.org "Sweden #5"\ + ftp://ftp6.se.freebsd.org "Sweden #6"\ ftp://ftp.ch.freebsd.org"Switzerland"\ ftp://ftp2.ch.freebsd.org "Switzerland #2"\ ftp://ftp.tw.freebsd.org"Taiwan"\ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243833 - head/sys/dev/ixgbe
Author: jfv Date: Mon Dec 3 21:38:02 2012 New Revision: 243833 URL: http://svnweb.freebsd.org/changeset/base/243833 Log: Remove the sysctl process_limit interface, after some thought I've decided its overkill,a simple tuneable for each RX and TX limit, and then init sets the ring values based on that, should be sufficient. More importantly, fix a bug causing a panic, when changing the define style to IXGBE_LEGACY_TX a taskqueue init was inadvertently set #ifdef when it should be #ifndef. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Mon Dec 3 19:55:00 2012(r243832) +++ head/sys/dev/ixgbe/ixgbe.c Mon Dec 3 21:38:02 2012(r243833) @@ -2329,7 +2329,7 @@ ixgbe_allocate_msix(struct adapter *adap if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, i); -#ifdef IXGBE_LEGACY_TX +#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); @@ -3082,6 +3082,9 @@ ixgbe_initialize_transmit_units(struct a txr->txd_cmd = IXGBE_TXD_CMD_IFCS; txr->queue_status = IXGBE_QUEUE_IDLE; + /* Set the processing limit */ + txr->process_limit = ixgbe_tx_process_limit; + /* Disable Head Writeback */ switch (hw->mac.type) { case ixgbe_mac_82598EB: @@ -4130,6 +4133,9 @@ ixgbe_initialize_receive_units(struct ad /* Setup the HW Rx Head and Tail Descriptor Pointers */ IXGBE_WRITE_REG(hw, IXGBE_RDH(i), 0); IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0); + + /* Set the processing limit */ + rxr->process_limit = ixgbe_rx_process_limit; } if (adapter->hw.mac.type != ixgbe_mac_82598EB) { @@ -5173,23 +5179,6 @@ ixgbe_sysctl_tdt_handler(SYSCTL_HANDLER_ return 0; } -/** ixgbe_sysctl_tx_process_limit - Handler function - * Set the limit value for TX processing - */ -static int -ixgbe_sysctl_tx_process_limit(SYSCTL_HANDLER_ARGS) -{ - int error; - - struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1); - if (!txr) return 0; - - error = sysctl_handle_int(oidp, &ixgbe_tx_process_limit, 0, req); - if (error || !req->newptr) - return error; - return 0; -} - /** ixgbe_sysctl_rdh_handler - Handler function * Retrieves the RDH value from the hardware */ @@ -5226,23 +5215,6 @@ ixgbe_sysctl_rdt_handler(SYSCTL_HANDLER_ return 0; } -/** ixgbe_sysctl_rx_process_limit - Handler function - * Set the limit value for RX processing - */ -static int -ixgbe_sysctl_rx_process_limit(SYSCTL_HANDLER_ARGS) -{ - int error; - - struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1); - if (!rxr) return 0; - - error = sysctl_handle_int(oidp, &ixgbe_rx_process_limit, 0, req); - if (error || !req->newptr) - return error; - return 0; -} - static int ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) { @@ -5330,10 +5302,6 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); - SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "tx_process_limit", - CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), - ixgbe_sysctl_tx_process_limit, "IU", - "Transmit Process Limit"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); @@ -5369,10 +5337,6 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr), ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor Tail"); - SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rx_process_limit", - CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr), - ixgbe_sysctl_rx_process_limit, "IU", - "Receive Process Limit"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_packets", CTLFLAG_RD, &rxr->rx_packets, "Queue Packets Received"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243834 - head/usr.bin/less
Author: delphij Date: Mon Dec 3 21:49:37 2012 New Revision: 243834 URL: http://svnweb.freebsd.org/changeset/base/243834 Log: Note that the manual page of less(1) says: Note that a preprocessor cannot output an empty file, since that is interpreted as meaning there is no replacement, and the origi- nal file is used. To avoid this, if LESSOPEN starts with two ver- tical bars, the exit status of the script becomes meaningful. If the exit status is zero, the output is considered to be replace- ment text, even if it empty. If the exit status is nonzero, any output is ignored and the original file is used. For compatibil- ity with previous versions of less, if LESSOPEN starts with only one vertical bar, the exit status of the preprocessor is ignored. Use two pipe symbols for zless, so that zless'ing a compressed empty file will give output rather than being interpreted as its compressed form, which is typically a binary. Thanks Mark Nudelman for pointing out this difference and the suggested solution. Reported by: Matthias Meyser PR: bin/168839 MFC after:2 weeks Modified: head/usr.bin/less/zless.sh Modified: head/usr.bin/less/zless.sh == --- head/usr.bin/less/zless.sh Mon Dec 3 21:38:02 2012(r243833) +++ head/usr.bin/less/zless.sh Mon Dec 3 21:49:37 2012(r243834) @@ -3,5 +3,5 @@ # $FreeBSD$ # -export LESSOPEN="|/usr/bin/lesspipe.sh %s" +export LESSOPEN="||/usr/bin/lesspipe.sh %s" exec /usr/bin/less "$@" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243835 - head/sys/kern
Author: kib Date: Mon Dec 3 22:15:16 2012 New Revision: 243835 URL: http://svnweb.freebsd.org/changeset/base/243835 Log: The vnode_free_list_mtx is required unconditionally when iterating over the active list. The mount interlock is not enough to guarantee the validity of the tailq link pointers. The __mnt_vnode_next_active() and __mnt_vnode_first_active() active lists iterators helper functions did not provided the neccessary stability for the list, allowing the iterators to pick garbage. This was uncovered after the r243599 made the active list iterators non-nop. Since a vnode interlock is before the vnode_free_list_mtx, obtain the vnode ilock in the non-blocking manner when under vnode_free_list_mtx, and restart iteration after the yield if the lock attempt failed. Assert that a vnode found on the list is active, and assert that the helpers return the vnode with interlock owned. Reported and tested by: pho MFC after:1 week Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cMon Dec 3 21:49:37 2012(r243834) +++ head/sys/kern/vfs_subr.cMon Dec 3 22:15:16 2012(r243835) @@ -4718,10 +4718,20 @@ __mnt_vnode_next_active(struct vnode **m if (should_yield()) kern_yield(PRI_UNCHANGED); MNT_ILOCK(mp); +restart: + mtx_lock(&vnode_free_list_mtx); KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); vp = TAILQ_NEXT(*mvp, v_actfreelist); while (vp != NULL) { - VI_LOCK(vp); + if (vp->v_type == VMARKER) { + vp = TAILQ_NEXT(vp, v_actfreelist); + continue; + } + if (!VI_TRYLOCK(vp)) { + mtx_unlock(&vnode_free_list_mtx); + kern_yield(PRI_UNCHANGED); + goto restart; + } if (vp->v_mount == mp && vp->v_type != VMARKER && (vp->v_iflag & VI_DOOMED) == 0) break; @@ -4732,16 +4742,18 @@ __mnt_vnode_next_active(struct vnode **m /* Check if we are done */ if (vp == NULL) { + mtx_unlock(&vnode_free_list_mtx); __mnt_vnode_markerfree_active(mvp, mp); /* MNT_IUNLOCK(mp); -- done in above function */ mtx_assert(MNT_MTX(mp), MA_NOTOWNED); return (NULL); } - mtx_lock(&vnode_free_list_mtx); TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist); mtx_unlock(&vnode_free_list_mtx); MNT_IUNLOCK(mp); + ASSERT_VI_LOCKED(vp, "active iter"); + KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp)); return (vp); } @@ -4755,9 +4767,19 @@ __mnt_vnode_first_active(struct vnode ** MNT_REF(mp); (*mvp)->v_type = VMARKER; +restart: + mtx_lock(&vnode_free_list_mtx); vp = TAILQ_FIRST(&mp->mnt_activevnodelist); while (vp != NULL) { - VI_LOCK(vp); + if (vp->v_type == VMARKER) { + vp = TAILQ_NEXT(vp, v_actfreelist); + continue; + } + if (!VI_TRYLOCK(vp)) { + mtx_unlock(&vnode_free_list_mtx); + kern_yield(PRI_UNCHANGED); + goto restart; + } if (vp->v_mount == mp && vp->v_type != VMARKER && (vp->v_iflag & VI_DOOMED) == 0) break; @@ -4768,6 +4790,7 @@ __mnt_vnode_first_active(struct vnode ** /* Check if we are done */ if (vp == NULL) { + mtx_unlock(&vnode_free_list_mtx); MNT_REL(mp); MNT_IUNLOCK(mp); free(*mvp, M_VNODE_MARKER); @@ -4775,10 +4798,11 @@ __mnt_vnode_first_active(struct vnode ** return (NULL); } (*mvp)->v_mount = mp; - mtx_lock(&vnode_free_list_mtx); TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist); mtx_unlock(&vnode_free_list_mtx); MNT_IUNLOCK(mp); + ASSERT_VI_LOCKED(vp, "active iter first"); + KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp)); return (vp); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243836 - in head/sys: amd64/amd64 i386/i386
Author: kib Date: Mon Dec 3 22:16:51 2012 New Revision: 243836 URL: http://svnweb.freebsd.org/changeset/base/243836 Log: Print the frame addresses for the backtraces on i386 and amd64. It allows both to inspect the frame sizes and to manually peek into the frames from ddb, if needed. Reviewed by: dim MFC after:2 weeks Modified: head/sys/amd64/amd64/db_trace.c head/sys/i386/i386/db_trace.c Modified: head/sys/amd64/amd64/db_trace.c == --- head/sys/amd64/amd64/db_trace.c Mon Dec 3 22:15:16 2012 (r243835) +++ head/sys/amd64/amd64/db_trace.c Mon Dec 3 22:16:51 2012 (r243836) @@ -186,7 +186,8 @@ db_ss(struct db_variable *vp, db_expr_t static void db_nextframe(struct amd64_frame **, db_addr_t *, struct thread *); static int db_numargs(struct amd64_frame *); -static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t); +static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t, +void *); static void decode_syscall(int, struct thread *); static const char * watchtype_str(int type); @@ -230,12 +231,13 @@ db_numargs(fp) } static void -db_print_stack_entry(name, narg, argnp, argp, callpc) +db_print_stack_entry(name, narg, argnp, argp, callpc, frame) const char *name; int narg; char **argnp; long *argp; db_addr_t callpc; + void *frame; { db_printf("%s(", name); #if 0 @@ -250,6 +252,8 @@ db_print_stack_entry(name, narg, argnp, #endif db_printf(") at "); db_printsym(callpc, DB_STGY_PROC); + if (frame != NULL) + db_printf("/frame 0x%lx", (register_t)frame); db_printf("\n"); } @@ -341,7 +345,7 @@ db_nextframe(struct amd64_frame **fp, db return; } - db_print_stack_entry(name, 0, 0, 0, rip); + db_print_stack_entry(name, 0, 0, 0, rip, &(*fp)->f_frame); /* * Point to base of trapframe which is just above the @@ -437,7 +441,8 @@ db_backtrace(struct thread *td, struct t * Don't try to walk back on a stack for a * process that hasn't actually been run yet. */ - db_print_stack_entry(name, 0, 0, 0, pc); + db_print_stack_entry(name, 0, 0, 0, pc, + actframe); break; } first = FALSE; @@ -451,7 +456,7 @@ db_backtrace(struct thread *td, struct t narg = db_numargs(frame); } - db_print_stack_entry(name, narg, argnp, argp, pc); + db_print_stack_entry(name, narg, argnp, argp, pc, actframe); if (actframe != frame) { /* `frame' belongs to caller. */ @@ -465,7 +470,7 @@ db_backtrace(struct thread *td, struct t if (INKERNEL((long)pc) && !INKERNEL((long)frame)) { sym = db_search_symbol(pc, DB_STGY_ANY, &offset); db_symbol_values(sym, &name, NULL); - db_print_stack_entry(name, 0, 0, 0, pc); + db_print_stack_entry(name, 0, 0, 0, pc, frame); break; } if (!INKERNEL((long) frame)) { Modified: head/sys/i386/i386/db_trace.c == --- head/sys/i386/i386/db_trace.c Mon Dec 3 22:15:16 2012 (r243835) +++ head/sys/i386/i386/db_trace.c Mon Dec 3 22:16:51 2012 (r243836) @@ -176,7 +176,8 @@ db_ss(struct db_variable *vp, db_expr_t static void db_nextframe(struct i386_frame **, db_addr_t *, struct thread *); static int db_numargs(struct i386_frame *); -static void db_print_stack_entry(const char *, int, char **, int *, db_addr_t); +static void db_print_stack_entry(const char *, int, char **, int *, db_addr_t, +void *); static void decode_syscall(int, struct thread *); static const char * watchtype_str(int type); @@ -220,12 +221,13 @@ retry: } static void -db_print_stack_entry(name, narg, argnp, argp, callpc) +db_print_stack_entry(name, narg, argnp, argp, callpc, frame) const char *name; int narg; char **argnp; int *argp; db_addr_t callpc; + void *frame; { int n = narg >= 0 ? narg : 5; @@ -242,6 +244,8 @@ db_print_stack_entry(name, narg, argnp, db_printf(",..."); db_printf(") at "); db_printsym(callpc, DB_STGY_PROC); + if (frame != NULL) + db_printf("/frame 0x%r", (register_t)frame); db_printf("\n"); } @@ -326,7 +330,7 @@ db_nextframe(struct i386_frame **fp, db_ return; } - db_print_stack_entry(name, 0, 0, 0, eip)
Re: svn commit: r243554 - in head/usr.sbin/pkg_install: add create delete info lib updating version
on 03/12/2012 20:45 Stanislav Sedov said the following: > I'm trying to point out, that this commit (and previous pkgng ones) was made > without proper peer review and consulations, which is a recommended practice > in THIS project. I'd like to chime in to point out that the proper peer review doesn't imply review by each and every member of the project (in THIS project). You seem to have been not very active for a while. Sorry if you missed influencing things while they were happening, but now they have happened and they have happened with both silent and vocal approval of the project members. -- Andriy Gapon ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243837 - head/sys/modules/ath
Author: adrian Date: Mon Dec 3 23:36:03 2012 New Revision: 243837 URL: http://svnweb.freebsd.org/changeset/base/243837 Log: Include if_ath_alq.c, which only gets actually compiled if ATH_DEBUG_ALQ is enabled. Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile == --- head/sys/modules/ath/Makefile Mon Dec 3 22:16:51 2012 (r243836) +++ head/sys/modules/ath/Makefile Mon Dec 3 23:36:03 2012 (r243837) @@ -35,7 +35,7 @@ ATH_RATE?=sample # tx rate control alg .PATH: ${.CURDIR}/../../dev/ath/ath_hal KMOD= if_ath -SRCS= if_ath.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c +SRCS= if_ath.c if_ath_alq.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c SRCS+= if_ath_tx.c if_ath_tx_ht.c if_ath_led.c if_ath_rx.c if_ath_tdma.c SRCS+= if_ath_beacon.c if_ath_rx_edma.c if_ath_tx_edma.c # NB: v3 eeprom support used by both AR5211 and AR5212; just include it ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243838 - head/sys/modules/ath
Author: adrian Date: Mon Dec 3 23:38:08 2012 New Revision: 243838 URL: http://svnweb.freebsd.org/changeset/base/243838 Log: Add the btcoex code into the module compilation. Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile == --- head/sys/modules/ath/Makefile Mon Dec 3 23:36:03 2012 (r243837) +++ head/sys/modules/ath/Makefile Mon Dec 3 23:38:08 2012 (r243838) @@ -86,8 +86,8 @@ SRCS+=ar5413.c # + 5416 (Owl) .PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416 SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ - ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_cal.c \ - ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ + ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_btcoex.c \ + ar5416_cal.c ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \ ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_radar.c \ ar5416_recv.c ar5416_reset.c ar5416_xmit.c @@ -115,7 +115,7 @@ SRCS+= ar9280.c ar9280_attach.c ar9280_o # + AR9285 - Kite SRCS+= ar9285.c ar9285_reset.c ar9285_attach.c ar9285_cal.c ar9285_phy.c -SRCS+= ar9285_diversity.c +SRCS+= ar9285_diversity.c ar9285_btcoex.c # + AR9287 - Kiwi .PATH: ${.CURDIR}/../../dev/ath/ath_hal ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243839 - head/sys/conf
Author: adrian Date: Mon Dec 3 23:43:23 2012 New Revision: 243839 URL: http://svnweb.freebsd.org/changeset/base/243839 Log: Add the AR5416/AR9285 bluetooth coexistence code into the main kernel build. Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Mon Dec 3 23:38:08 2012(r243838) +++ head/sys/conf/files Mon Dec 3 23:43:23 2012(r243839) @@ -858,6 +858,10 @@ dev/ath/ath_hal/ar5416/ar5416_beacon.c \ 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_btcoex.c \ + 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 | \ ath_ar9287 \ @@ -941,6 +945,8 @@ dev/ath/ath_hal/ar9002/ar9280_olc.c opti # ar9285 (depends on ar5416 and ar9280) dev/ath/ath_hal/ar9002/ar9285_attach.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/ar9285_btcoex.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/ar9285_reset.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/ar9285_cal.c optional ath_hal | ath_ar9285 \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243840 - in head/sys/dev/ath/ath_hal: . ar5416
Author: adrian Date: Mon Dec 3 23:45:06 2012 New Revision: 243840 URL: http://svnweb.freebsd.org/changeset/base/243840 Log: Add and tie in the AR5416 bluetooth coexistence methods into the HAL. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Mon Dec 3 23:43:23 2012 (r243839) +++ head/sys/dev/ath/ath_hal/ah.h Mon Dec 3 23:45:06 2012 (r243840) @@ -1514,6 +1514,22 @@ struct ath_hal { HAL_BOOL __ahdecl(*ah_getPendingInterrupts)(struct ath_hal*, HAL_INT*); HAL_INT __ahdecl(*ah_getInterrupts)(struct ath_hal*); HAL_INT __ahdecl(*ah_setInterrupts)(struct ath_hal*, HAL_INT); + + /* Bluetooth Coexistence functions */ + void__ahdecl(*ah_btCoexSetInfo)(struct ath_hal *, + HAL_BT_COEX_INFO *); + void__ahdecl(*ah_btCoexSetConfig)(struct ath_hal *, + HAL_BT_COEX_CONFIG *); + void__ahdecl(*ah_btCoexSetQcuThresh)(struct ath_hal *, + int); + void__ahdecl(*ah_btCoexSetWeights)(struct ath_hal *, + uint32_t); + void__ahdecl(*ah_btCoexSetBmissThresh)(struct ath_hal *, + uint32_t); + void__ahdecl(*ah_btcoexSetParameter)(struct ath_hal *, + uint32_t, uint32_t); + void__ahdecl(*ah_btCoexDisable)(struct ath_hal *); + int __ahdecl(*ah_btCoexEnable)(struct ath_hal *); }; /* Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Dec 3 23:43:23 2012(r243839) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Dec 3 23:45:06 2012(r243840) @@ -191,6 +191,16 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_getPendingInterrupts = ar5416GetPendingInterrupts; ah->ah_setInterrupts= ar5416SetInterrupts; + /* Bluetooth Coexistence functions */ + ah->ah_btCoexSetInfo= ar5416SetBTCoexInfo; + ah->ah_btCoexSetConfig = ar5416BTCoexConfig; + ah->ah_btCoexSetQcuThresh = ar5416BTCoexSetQcuThresh; + ah->ah_btCoexSetWeights = ar5416BTCoexSetWeights; + ah->ah_btCoexSetBmissThresh = ar5416BTCoexSetupBmissThresh; + ah->ah_btcoexSetParameter = ar5416BTCoexSetParameter; + ah->ah_btCoexDisable= ar5416BTCoexDisable; + ah->ah_btCoexEnable = ar5416BTCoexEnable; + ahp->ah_priv.ah_getWirelessModes= ar5416GetWirelessModes; ahp->ah_priv.ah_eepromRead = ar5416EepromRead; #ifdef AH_SUPPORT_WRITE_EEPROM ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243841 - head/sys/dev/ath/ath_hal/ar9002
Author: adrian Date: Tue Dec 4 00:01:24 2012 New Revision: 243841 URL: http://svnweb.freebsd.org/changeset/base/243841 Log: Reformat/reindent. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c == --- head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Mon Dec 3 23:45:06 2012(r243840) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Tue Dec 4 00:01:24 2012(r243841) @@ -24,7 +24,7 @@ #include "ah_internal.h" #include "ah_devid.h" #ifdef AH_DEBUG -#include "ah_desc.h"/* NB: for HAL_PHYERR* */ +#include "ah_desc.h" /* NB: for HAL_PHYERR* */ #endif #include "ar5416/ar5416.h" @@ -47,64 +47,75 @@ ar9285BTCoexAntennaDiversity(struct ath_ u_int32_t regVal; u_int8_t ant_div_control1, ant_div_control2; -if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) || -(AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { -if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) && - (AH5212(ah)->ah_diversity == HAL_ANT_VARIABLE)) { -/* Enable antenna diversity */ -ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_ENABLE; -ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_ENABLE; - -/* Don't disable BT ant to allow BB to control SWCOM */ -ahp->ah_btCoexMode2 &= (~(AR_BT_DISABLE_BT_ANT)); -OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); - -/* Program the correct SWCOM table */ -OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, - HAL_BT_COEX_ANT_DIV_SWITCH_COM); -OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf000); -} else if (AH5212(ah)->ah_diversity == HAL_ANT_FIXED_B) { -/* Disable antenna diversity. Use antenna B(LNA2) only. */ -ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_B; -ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_B; - -/* Disable BT ant to allow concurrent BT and WLAN receive */ -ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT; -OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); - -/* Program SWCOM talbe to make sure RF switch always parks at WLAN side */ -OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, HAL_BT_COEX_ANT_DIV_SWITCH_COM); -OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0x6000, 0xf000); -} else { -/* Disable antenna diversity. Use antenna A(LNA1) only */ -ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_A; -ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_A; - -/* Disable BT ant to allow concurrent BT and WLAN receive */ -ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT; -OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); - -/* Program SWCOM talbe to make sure RF switch always parks at BT side */ -OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, 0); -OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf000); -} - -regVal = OS_REG_READ(ah, AR_PHY_MULTICHAIN_GAIN_CTL); -regVal &= (~(AR_PHY_9285_ANT_DIV_CTL_ALL)); -/* Clear ant_fast_div_bias [14:9] since for Janus the main LNA is always LNA1. */ -regVal &= (~(AR_PHY_9285_FAST_DIV_BIAS)); - -regVal |= SM(ant_div_control1, AR_PHY_9285_ANT_DIV_CTL); -regVal |= SM(ant_div_control2, AR_PHY_9285_ANT_DIV_ALT_LNACONF); -regVal |= SM((ant_div_control2 >> 2), AR_PHY_9285_ANT_DIV_MAIN_LNACONF); -regVal |= SM((ant_div_control1 >> 1), AR_PHY_9285_ANT_DIV_ALT_GAINTB); -regVal |= SM((ant_div_control1 >> 2), AR_PHY_9285_ANT_DIV_MAIN_GAINTB); -OS_REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regVal); - -regVal = OS_REG_READ(ah, AR_PHY_CCK_DETECT); -regVal &= (~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV); -regVal |= SM((ant_div_control1 >> 3), AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV); -OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, regVal); + if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) || + (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { + if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) && +(AH5212(ah)->ah_diversity == HAL_ANT_VARIABLE)) { + /* Enable antenna diversity */ + ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_ENABLE; + ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_ENABLE; + + /* Don't disable BT ant to allow BB to control SWCOM */ + ahp->ah_btCoexMode2 &= (~(AR_BT_DISABLE_BT_ANT)); + OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); + + /* Program the correct SWCOM table */ + OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, + HAL_BT_COEX_ANT_DIV_SWITCH_COM); + O
svn commit: r243842 - head/sys/dev/ath/ath_hal/ar9002
Author: adrian Date: Tue Dec 4 00:01:42 2012 New Revision: 243842 URL: http://svnweb.freebsd.org/changeset/base/243842 Log: Override the BT coex parameter function for the AR9285. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c == --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Dec 4 00:01:24 2012(r243841) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Dec 4 00:01:42 2012(r243842) @@ -148,15 +148,16 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s ah->ah_eepromdata = eepromdata; } - /* XXX override with 9285 specific state */ - /* override 5416 methods for our needs */ + /* override with 9285 specific state */ AH5416(ah)->ah_initPLL = ar9280InitPLL; + AH5416(ah)->ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity; ah->ah_setAntennaSwitch = ar9285SetAntennaSwitch; ah->ah_configPCIE = ar9285ConfigPCIE; ah->ah_disablePCIE = ar9285DisablePCIE; ah->ah_setTxPower = ar9285SetTransmitPower; ah->ah_setBoardValues = ar9285SetBoardValues; + ah->ah_btcoexSetParameter = ar9285BTCoexSetParameter; AH5416(ah)->ah_cal.iqCalData.calData = &ar9280_iq_cal; AH5416(ah)->ah_cal.adcGainCalData.calData = &ar9280_adc_gain_cal; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243843 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Tue Dec 4 00:02:46 2012 New Revision: 243843 URL: http://svnweb.freebsd.org/changeset/base/243843 Log: Methodise the BT diversity configuration function; so the AR9285 can correctly override it. This was missed in the previous commit. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416.hTue Dec 4 00:01:42 2012 (r243842) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.hTue Dec 4 00:02:46 2012 (r243843) @@ -107,6 +107,9 @@ struct ath_hal_5416 { void(*ah_initPLL) (struct ath_hal *ah, const struct ieee80211_channel *chan); + /* bluetooth coexistence operations */ + void(*ah_btCoexSetDiversity)(struct ath_hal *ah); + u_int ah_globaltxtimeout; /* global tx timeout */ u_int ah_gpioMask; int ah_hangs; /* h/w hangs state */ @@ -200,6 +203,7 @@ extern void ar5416SetBTCoexInfo(struct a HAL_BT_COEX_INFO *btinfo); extern void ar5416BTCoexConfig(struct ath_hal *ah, HAL_BT_COEX_CONFIG *btconf); +extern void ar5416BTCoexAntennaDiversity(struct ath_hal *ah); extern void ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum); extern void ar5416BTCoexSetWeights(struct ath_hal *ah, uint32_t stompType); extern void ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Dec 4 00:01:42 2012(r243842) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Dec 4 00:02:46 2012(r243843) @@ -200,6 +200,7 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_btcoexSetParameter = ar5416BTCoexSetParameter; ah->ah_btCoexDisable= ar5416BTCoexDisable; ah->ah_btCoexEnable = ar5416BTCoexEnable; + AH5416(ah)->ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity; ahp->ah_priv.ah_getWirelessModes= ar5416GetWirelessModes; ahp->ah_priv.ah_eepromRead = ar5416EepromRead; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Tue Dec 4 00:01:42 2012(r243842) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Tue Dec 4 00:02:46 2012(r243843) @@ -173,7 +173,7 @@ ar5416BTCoexSetupBmissThresh(struct ath_ * * Kite will override this particular method. */ -static void +void ar5416BTCoexAntennaDiversity(struct ath_hal *ah) { } @@ -350,8 +350,12 @@ ar5416InitBTCoex(struct ath_hal *ah) ar5416GpioCfgInput(ah, ahp->ah_btActiveGpioSelect); ar5416GpioCfgInput(ah, ahp->ah_btPriorityGpioSelect); - if (AR_SREV_KITE(ah)) - ar5416BTCoexAntennaDiversity(ah); + /* +* Configure the antenna diversity setup. +* It's a no-op for AR9287; AR9285 overrides this +* as required. +*/ + AH5416(ah)->ah_btCoexSetDiversity(ah); if (ahp->ah_btCoexEnabled) ar5416BTCoexEnable(ah); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243845 - head/share/man/man9
Author: kib Date: Tue Dec 4 00:32:12 2012 New Revision: 243845 URL: http://svnweb.freebsd.org/changeset/base/243845 Log: Document the interpretation of the negative value of ticks for taskqueue_enqueue_timeout(9). MFC after:3 days Modified: head/share/man/man9/taskqueue.9 Modified: head/share/man/man9/taskqueue.9 == --- head/share/man/man9/taskqueue.9 Tue Dec 4 00:06:58 2012 (r243844) +++ head/share/man/man9/taskqueue.9 Tue Dec 4 00:32:12 2012 (r243845) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2011 +.Dd December 4, 2012 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -180,6 +180,13 @@ is used to schedule the enqueue after th Only non-fast task queues can be used for .Va timeout_task scheduling. +If the +.Va ticks +argument is negative, the already scheduled enqueueing is not re-scheduled. +Otherwise, the task is schedules for enqueueing in the future, +after the absolute value of +.Va ticks +is passed. .Pp The .Fn taskqueue_cancel ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243846 - in head/share: examples/etc mk
Author: jkim Date: Tue Dec 4 00:37:17 2012 New Revision: 243846 URL: http://svnweb.freebsd.org/changeset/base/243846 Log: Tidy up bsd.cpu.mk for X86 CPUs: - Do not limit recent processors to "prescott" class for i386 target. There is no reason for this hack because clang is default now. On top of that, it will only grow indefinitely over time. - Add more CPUTYPEs, i.e., "athlon-fx", "core-avx2", "atom", "penryn", and "yonah". Note "penryn" and "yonah" are intentionally undocumented because they are not supported by gcc and marked deprecated by clang. - Add more CPUTYPE aliases, i.e., "barcelona" (-> amdfam10), "westmere" and "nehalem" (-> corei7). Note these are intentionally undocumented because they are not supported by (base) gcc and/or clang. However, LLVM (backend) seems to "know" the differences. Most likely, they were deprecated with other vendor code names and clang did not bother implementing them at all. - Add i686 to MACHINE_CPU for "c3-2" (VIA Nehemiah). Both gcc & clang treat it like an i686-class processor. - Add IDT "winchip2" and "winchip-c6" for completeness (undocumented). - Order processors per make.conf example, i.e., CPU vendors and models. - Tidy up make.conf example, i.e., remove "by gcc" (because we have aliases) and remove "prescott" from AMD64 architecture (because it is not correct). Modified: head/share/examples/etc/make.conf head/share/mk/bsd.cpu.mk Modified: head/share/examples/etc/make.conf == --- head/share/examples/etc/make.conf Tue Dec 4 00:32:12 2012 (r243845) +++ head/share/examples/etc/make.conf Tue Dec 4 00:37:17 2012 (r243846) @@ -28,24 +28,25 @@ # of CFLAGS to contain the appropriate optimization directive to cc. # The automatic setting of CFLAGS may be overridden using the # NO_CPU_CFLAGS variable below. -# Currently the following CPU types are recognized by gcc: +# Currently the following CPU types are recognized: # Intel x86 architecture: # (AMD CPUs) opteron-sse3, athlon64-sse3, k8-sse3, opteron, -# athlon64, k8, athlon-mp, athlon-xp, athlon-4, -# athlon-tbird, athlon, k7, geode, k6-3, k6-2, k6, k5 +# athlon64, athlon-fx, k8, athlon-mp, athlon-xp, +# athlon-4, athlon-tbird, athlon, k7, geode, k6-3, +# k6-2, k6 # (Intel CPUs) core2, core, nocona, pentium4m, pentium4, prescott, # pentium3m, pentium3, pentium-m, pentium2, # pentiumpro, pentium-mmx, pentium, i486 # (VIA CPUs) c7, c3-2, c3 # AMD64 architecture:opteron-sse3, athlon64-sse3, k8-sse3, opteron, -# athlon64, k8, core2, nocona, prescott +# athlon64, k8, core2, nocona # Intel ia64 architecture: itanium2, itanium # SPARC-V9 architecture: v9 (generic 64-bit V9), ultrasparc (default # if omitted), ultrasparc3 # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): # (AMD CPUs) bdver2, bdver1, btver1, amdfam10 -# (Intel CPUs) core-avx-i, corei7-avx, corei7 +# (Intel CPUs) core-avx2, core-avx-i, corei7-avx, corei7, atom # # (?= allows to buildworld for a different CPUTYPE.) # Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkTue Dec 4 00:32:12 2012(r243845) +++ head/share/mk/bsd.cpu.mkTue Dec 4 00:37:17 2012(r243846) @@ -27,9 +27,13 @@ MACHINE_CPU = mips # between e.g. i586 and pentium) . if ${MACHINE_CPUARCH} == "i386" -. if ${CPUTYPE} == "nocona" || ${CPUTYPE} == "core" || \ -${CPUTYPE} == "core2" || ${CPUTYPE} == "corei7" || \ -${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i" +. if ${CPUTYPE} == "barcelona" +CPUTYPE = amdfam10 +. elif ${CPUTYPE} == "k7" +CPUTYPE = athlon +. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem" +CPUTYPE = corei7 +. elif ${CPUTYPE} == "core" CPUTYPE = prescott . elif ${CPUTYPE} == "p4" CPUTYPE = pentium4 @@ -49,18 +53,13 @@ CPUTYPE = pentiumpro CPUTYPE = pentium-mmx . elif ${CPUTYPE} == "i586" CPUTYPE = pentium -. elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" || \ -${CPUTYPE} == "k8-sse3" || ${CPUTYPE} == "amdfam10" || \ -${CPUTYPE} == "btver1" || ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2" -CPUTYPE = prescott -. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ -${CPUTYPE} == "k8" -CPUTYPE = athlon-mp -. elif ${CPUTYPE} == "k7" -CPUTYPE = athlon . endif . elif ${MACHINE_CPUARCH} == "amd64" -. if ${CPUTYPE} == "prescott" +. if ${CPUTYPE} == "barcelona" +CPUTYPE = amdfam10 +. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem" +CPUTYPE = corei7 +.
svn commit: r243847 - head/share/mk
Author: jkim Date: Tue Dec 4 00:44:31 2012 New Revision: 243847 URL: http://svnweb.freebsd.org/changeset/base/243847 Log: Fix typos in the previous commit. Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkTue Dec 4 00:37:17 2012(r243846) +++ head/share/mk/bsd.cpu.mkTue Dec 4 00:44:31 2012(r243847) @@ -164,7 +164,7 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "corei-avx2" +. elif ${CPUTYPE} == "core-avx2" MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 @@ -214,7 +214,7 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "corei-avx2" +. elif ${CPUTYPE} == "core-avx2" MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243848 - stable/9/sys/amd64/amd64
Author: kib Date: Tue Dec 4 00:51:29 2012 New Revision: 243848 URL: http://svnweb.freebsd.org/changeset/base/243848 Log: MFC r242433: Enable the new instructions for reading and writing bases for %fs, %gs, when supported. Enable SMEP when supported. MFC r242828: Do not try to enable new features in the %cr4 if running under hypervisor. Modified: stable/9/sys/amd64/amd64/identcpu.c stable/9/sys/amd64/amd64/initcpu.c stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/identcpu.c == --- stable/9/sys/amd64/amd64/identcpu.c Tue Dec 4 00:44:31 2012 (r243847) +++ stable/9/sys/amd64/amd64/identcpu.c Tue Dec 4 00:51:29 2012 (r243848) @@ -481,7 +481,7 @@ SYSINIT(hook_tsc_freq, SI_SUB_CONFIGURE, void identify_cpu(void) { - u_int regs[4]; + u_int regs[4], cpu_stdext_disable; do_cpuid(0, regs); cpu_high = regs[0]; @@ -516,6 +516,20 @@ identify_cpu(void) if (cpu_high >= 7) { cpuid_count(7, 0, regs); cpu_stdext_feature = regs[1]; + + /* +* Some hypervisors fail to filter out unsupported +* extended features. For now, disable the +* extensions, activation of which requires setting a +* bit in CR4, and which VM monitors do not support. +*/ + if (cpu_feature2 & CPUID2_HV) { + cpu_stdext_disable = CPUID_STDEXT_FSGSBASE | + CPUID_STDEXT_SMEP; + } else + cpu_stdext_disable = 0; + TUNABLE_INT_FETCH("hw.cpu_stdext_disable", &cpu_stdext_disable); + cpu_stdext_feature &= ~cpu_stdext_disable; } if (cpu_vendor_id == CPU_VENDOR_INTEL || Modified: stable/9/sys/amd64/amd64/initcpu.c == --- stable/9/sys/amd64/amd64/initcpu.c Tue Dec 4 00:44:31 2012 (r243847) +++ stable/9/sys/amd64/amd64/initcpu.c Tue Dec 4 00:51:29 2012 (r243848) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -153,11 +154,25 @@ void initializecpu(void) { uint64_t msr; + uint32_t cr4; + cr4 = rcr4(); if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { - load_cr4(rcr4() | CR4_FXSR | CR4_XMM); + cr4 |= CR4_FXSR | CR4_XMM; cpu_fxsr = hw_instruction_sse = 1; } + if (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) + cr4 |= CR4_FSGSBASE; + + /* +* Postpone enabling the SMEP on the boot CPU until the page +* tables are switched from the boot loader identity mapping +* to the kernel tables. The boot loader enables the U bit in +* its tables. +*/ + if (!IS_BSP() && (cpu_stdext_feature & CPUID_STDEXT_SMEP)) + cr4 |= CR4_SMEP; + load_cr4(cr4); if ((amd_feature & AMDID_NX) != 0) { msr = rdmsr(MSR_EFER) | EFER_NXE; wrmsr(MSR_EFER, msr); Modified: stable/9/sys/amd64/amd64/pmap.c == --- stable/9/sys/amd64/amd64/pmap.c Tue Dec 4 00:44:31 2012 (r243847) +++ stable/9/sys/amd64/amd64/pmap.c Tue Dec 4 00:51:29 2012 (r243848) @@ -629,6 +629,8 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* XXX do %cr0 as well */ load_cr4(rcr4() | CR4_PGE | CR4_PSE); load_cr3(KPML4phys); + if (cpu_stdext_feature & CPUID_STDEXT_SMEP) + load_cr4(rcr4() | CR4_SMEP); /* * Initialize the kernel pmap (which is statically allocated). ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243849 - head/usr.bin/rctl
Author: bdrewery (ports committer) Date: Tue Dec 4 00:53:20 2012 New Revision: 243849 URL: http://svnweb.freebsd.org/changeset/base/243849 Log: - Move EXAMPLES descriptions to before the actual command - Add mdoc macros for EXAMPLES Reviewed by: eadler Approved by: gjb MFC after:3 days Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 == --- head/usr.bin/rctl/rctl.8Tue Dec 4 00:51:29 2012(r243848) +++ head/usr.bin/rctl/rctl.8Tue Dec 4 00:53:20 2012(r243849) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2012 +.Dd December 3, 2012 .Dt RCTL 8 .Os .Sh NAME @@ -169,21 +169,18 @@ Note that limiting RSS may kill the mach .Sh EXIT STATUS .Ex -std .Sh EXAMPLES -.Dl rctl -a user:joe:vmemoryuse:deny=1g +Prevent user "joe" from allocating more than 1GB of virtual memory: +.Dl Nm Fl a Ar user:joe:vmemoryuse:deny=1g .Pp -Prevent user "joe" from allocating more than 1GB of virtual memory. +Remove all RCTL rules: +.Dl Nm Fl r Ar \&: .Pp -.Dl rctl -r : +Display resource usage information for jail named "www": +.Dl Nm Fl hu Ar jail:www .Pp -Remove all RCTL rules. +Display all the rules applicable to process with PID 512: +.Dl Nm Fl l Ar process:512 .Pp -.Dl rctl -hu jail:www -.Pp -Display resource usage information for jail named "www". -.Pp -.Dl rctl -l process:512 -.Pp -Display all the rules applicable to process with PID 512. .Sh SEE ALSO .Xr rctl.conf 5 .Sh HISTORY ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243850 - stable/9/sys/kern
Author: kib Date: Tue Dec 4 00:54:49 2012 New Revision: 243850 URL: http://svnweb.freebsd.org/changeset/base/243850 Log: MFC r243341: Add a special meaning to the negative ticks argument for taskqueue_enqueue_timeout(). Do not rearm the callout if it is already armed and the ticks is negative. Otherwise rearm it to fire in abs(ticks) ticks in the future. Modified: stable/9/sys/kern/subr_taskqueue.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_taskqueue.c == --- stable/9/sys/kern/subr_taskqueue.c Tue Dec 4 00:53:20 2012 (r243849) +++ stable/9/sys/kern/subr_taskqueue.c Tue Dec 4 00:54:49 2012 (r243850) @@ -252,9 +252,13 @@ taskqueue_enqueue_timeout(struct taskque } else { queue->tq_callouts++; timeout_task->f |= DT_CALLOUT_ARMED; + if (ticks < 0) + ticks = -ticks; /* Ignore overflow. */ + } + if (ticks > 0) { + callout_reset(&timeout_task->c, ticks, + taskqueue_timeout_func, timeout_task); } - callout_reset(&timeout_task->c, ticks, taskqueue_timeout_func, - timeout_task); } TQ_UNLOCK(queue); return (res); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243851 - stable/9/sys/kern
Author: kib Date: Tue Dec 4 00:57:11 2012 New Revision: 243851 URL: http://svnweb.freebsd.org/changeset/base/243851 Log: MFC r243342: Schedule garbage collection run for the in-flight rights passed over the unix domain sockets to the next tick, coalescing the serial calls until the collection fires. Modified: stable/9/sys/kern/uipc_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_usrreq.c == --- stable/9/sys/kern/uipc_usrreq.c Tue Dec 4 00:54:49 2012 (r243850) +++ stable/9/sys/kern/uipc_usrreq.c Tue Dec 4 00:57:11 2012 (r243851) @@ -131,7 +131,7 @@ static const struct sockaddrsun_noname * reentrance in the UNIX domain socket, file descriptor, and socket layer * code. See unp_gc() for a full description. */ -static struct task unp_gc_task; +static struct timeout_task unp_gc_task; /* * The close of unix domain sockets attached as SCM_RIGHTS is @@ -681,7 +681,7 @@ uipc_detach(struct socket *so) VFS_UNLOCK_GIANT(vfslocked); } if (local_unp_rights) - taskqueue_enqueue(taskqueue_thread, &unp_gc_task); + taskqueue_enqueue_timeout(taskqueue_thread, &unp_gc_task, -1); } static int @@ -1801,7 +1801,7 @@ unp_init(void) LIST_INIT(&unp_shead); LIST_INIT(&unp_sphead); SLIST_INIT(&unp_defers); - TASK_INIT(&unp_gc_task, 0, unp_gc, NULL); + TIMEOUT_TASK_INIT(taskqueue_thread, &unp_gc_task, 0, unp_gc, NULL); TASK_INIT(&unp_defer_task, 0, unp_process_defers, NULL); UNP_LINK_LOCK_INIT(); UNP_LIST_LOCK_INIT(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r243846 - in head/share: examples/etc mk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-12-03 19:37:17 -0500, Jung-uk Kim wrote: > Author: jkim Date: Tue Dec 4 00:37:17 2012 New Revision: 243846 > URL: http://svnweb.freebsd.org/changeset/base/243846 > > Log: Tidy up bsd.cpu.mk for X86 CPUs: > > - Do not limit recent processors to "prescott" class for i386 > target. There is no reason for this hack because clang is default > now. On top of that, it will only grow indefinitely over time. - > Add more CPUTYPEs, i.e., "athlon-fx", "core-avx2", "atom", > "penryn", and "yonah". Note "penryn" and "yonah" are intentionally > undocumented because they are not supported by gcc and marked > deprecated by clang. - Add more CPUTYPE aliases, i.e., "barcelona" > (-> amdfam10), "westmere" and "nehalem" (-> corei7). Note these > are intentionally undocumented because they are not supported by > (base) gcc and/or clang. However, LLVM (backend) seems to "know" > the differences. Most likely, they were deprecated with other > vendor code names and clang did not bother implementing them at > all. - Add i686 to MACHINE_CPU for "c3-2" (VIA Nehemiah). Both gcc > & clang treat it like an i686-class processor. [ Snipped the rest... ] Please note "c3" is treated like an i486-class processor by the compilers. However, I didn't remove i586 because it wasn't really clear to me. It seems most people just used -march=i586 for the processors (before GCC added - -march=c3). For example: http://radagast.ca/epia/epia_howto/index.html#VIA_EPIA_CPUs The original VIA C3 (aka Cyrix III) was considered i486-class, maybe? I think I still have one of these in the basement collecting dust but its mobo died long ago. :-( Jung-uk Kim -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJQvU2AAAoJECXpabHZMqHOntMH/RdhI7uCntALF/p9gRJl7uDh xffyaDsMML3CR86yjD+KZKa8MGRN7yW62AIMkXRf67iUhRQ2P2fF6p2FBrrGWZ8a br6ePOylBG+abNvSkWYLaq6BgoEqPOsdmdTkwUK8b2uuukGIxXajdpmjXkQikSJh 3BkVb4NK+AnCGukOeLez06X1XQsXd7N/XvKHYyZV8kNXQo1Uk/91wYewdcSBLjWF VOEW9ub42RYuPj8t+xWfKjv3/+rjYw+Gyvat5m9nvU4wkbvRB7oB48ZGDkFPQrH8 j++h4wjnEjzXY1EHg+3Ph1hlyZEiCdcCjFNGqB+QKzSsEVTAlsbSY4c5tW6xYzM= =jedj -END PGP SIGNATURE- ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r243850 - stable/9/sys/kern
On 3 December 2012 19:54, Konstantin Belousov wrote: > Author: kib > Date: Tue Dec 4 00:54:49 2012 > New Revision: 243850 > URL: http://svnweb.freebsd.org/changeset/base/243850 > > Log: > MFC r243341: > Add a special meaning to the negative ticks argument for > taskqueue_enqueue_timeout(). Do not rearm the callout if it is > already armed and the ticks is negative. Otherwise rearm it to fire > in abs(ticks) ticks in the future. Why was this not MFCed together with r243845 ? -- Eitan Adler ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r243850 - stable/9/sys/kern
On Mon, Dec 03, 2012 at 07:58:09PM -0500, Eitan Adler wrote: > On 3 December 2012 19:54, Konstantin Belousov wrote: > > Author: kib > > Date: Tue Dec 4 00:54:49 2012 > > New Revision: 243850 > > URL: http://svnweb.freebsd.org/changeset/base/243850 > > > > Log: > > MFC r243341: > > Add a special meaning to the negative ticks argument for > > taskqueue_enqueue_timeout(). Do not rearm the callout if it is > > already armed and the ticks is negative. Otherwise rearm it to fire > > in abs(ticks) ticks in the future. > > Why was this not MFCed together with r243845 ? Because r243845 was only committed today, and I do not see a need to postpone the merge of the fix for the (rare) bug. Less formal, I do not see much use in the single commit spanning both sys and non-sys. We almost never should have such interlock, otherwise ABI issues would cause troubles for people updating the system. And spanning commits are somewhat more cumbersome to both merge, revert and for non-developer to pick. pgpXyVZLgm75V.pgp Description: PGP signature
Re: svn commit: r243850 - stable/9/sys/kern
On 3 December 2012 20:46, Konstantin Belousov wrote: > Less formal, I do not see much use in the single commit spanning both > sys and non-sys. We almost never should have such interlock, otherwise > ABI issues would cause troubles for people updating the system. > And spanning commits are somewhat more cumbersome to both merge, > revert and for non-developer to pick. This isn't an issue of sys and non-sys being tied together. This is one of documentation and feature being committed together. -- Eitan Adler ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243853 - head/sys/kern
Author: alfred Date: Tue Dec 4 05:28:20 2012 New Revision: 243853 URL: http://svnweb.freebsd.org/changeset/base/243853 Log: replace bit shifting loop with 1
svn commit: r243854 - head/usr.sbin/bsdinstall/scripts
Author: joel (doc committer) Date: Tue Dec 4 07:22:15 2012 New Revision: 243854 URL: http://svnweb.freebsd.org/changeset/base/243854 Log: Remove snapshots.jp.freebsd.org. It stopped working years ago. Discussed with: hrs Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect == --- head/usr.sbin/bsdinstall/scripts/mirrorselect Tue Dec 4 05:28:20 2012(r243853) +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Tue Dec 4 07:22:15 2012(r243854) @@ -39,7 +39,6 @@ MIRROR=`dialog --backtitle "FreeBSD Inst --menu "Please select the site closest to you or \"other\" if you'd like to specify a different choice. Also note that not every site listed here carries more than the base distribution kits. Only Primary sites are guaranteed to carry the full range of possible distributions. Select a site that's close!" \ 0 0 0 \ ftp://ftp.freebsd.org "Main Site"\ - ftp://snapshots.jp.freebsd.org "Snapshots Server Japan"\ ftp://ftp.freebsd.org "IPv6 Main Site"\ ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\ ftp://ftp.il.freebsd.org"IPv6 Israel"\ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"