From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 01:26:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A56241065672; Sun, 16 Oct 2011 01:26:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1948FC17; Sun, 16 Oct 2011 01:26:07 +0000 (UTC) Received: by gyd8 with SMTP id 8so2721704gyd.13 for ; Sat, 15 Oct 2011 18:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FEGnDoLQDHeeh39La+GkVae0bTcNyNNLXDm+lCLQ6f8=; b=vAVpQ/MRBFxIHKF1OjjoW6ppHA30HpZvTfGpLAH+xgXH/56M4Xw/Q1B7U4CAhGqDdf z1XuhSxJuMKdB8TLVjDiPJHF8K+WyU7y9rH/FPwqtnjafSDIPXxsCmy7LZ0Ki9PHdibT QJcaXblT7DO8kqvcDIQH+km0LPHSFLLYd1Qhw= MIME-Version: 1.0 Received: by 10.236.186.2 with SMTP id v2mr2607073yhm.83.1318728366641; Sat, 15 Oct 2011 18:26:06 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.95.147 with HTTP; Sat, 15 Oct 2011 18:26:06 -0700 (PDT) In-Reply-To: <201110152315.p9FNFtbM035080@svn.freebsd.org> References: <201110152315.p9FNFtbM035080@svn.freebsd.org> Date: Sun, 16 Oct 2011 09:26:06 +0800 X-Google-Sender-Auth: 13T2gBpUrvHsMstluQf14xiLFPc Message-ID: From: Adrian Chadd To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226410 - head/sys/powerpc/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 01:26:07 -0000 Thanks! I'm going to eventually fix the ath driver to always call bus_space_barrier() when doing stream bus calls. It's likely worthwhile doing a check to see which other drivers use the stream calls? Adrian From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 05:36:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 962361065673; Sun, 16 Oct 2011 05:36:23 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1B68FC12; Sun, 16 Oct 2011 05:36:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5aNnQ047085; Sun, 16 Oct 2011 05:36:23 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5aNRU047083; Sun, 16 Oct 2011 05:36:23 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160536.p9G5aNRU047083@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226411 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:36:23 -0000 Author: das Date: Sun Oct 16 05:36:23 2011 New Revision: 226411 URL: http://svn.freebsd.org/changeset/base/226411 Log: Remove an unused variable. Modified: head/lib/msun/src/e_log10f.c Modified: head/lib/msun/src/e_log10f.c ============================================================================== --- head/lib/msun/src/e_log10f.c Sat Oct 15 23:15:55 2011 (r226410) +++ head/lib/msun/src/e_log10f.c Sun Oct 16 05:36:23 2011 (r226411) @@ -32,7 +32,7 @@ static const float zero = 0.0; float __ieee754_log10f(float x) { - float f,hfsq,hi,lo,r,y,y2; + float f,hfsq,hi,lo,r,y; int32_t i,k,hx; GET_FLOAT_WORD(hx,x); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 05:36:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E90031065670; Sun, 16 Oct 2011 05:36:39 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFF688FC08; Sun, 16 Oct 2011 05:36:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5adXF047130; Sun, 16 Oct 2011 05:36:39 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5adOW047127; Sun, 16 Oct 2011 05:36:39 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160536.p9G5adOW047127@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226412 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:36:40 -0000 Author: das Date: Sun Oct 16 05:36:39 2011 New Revision: 226412 URL: http://svn.freebsd.org/changeset/base/226412 Log: Move the macros GET_LDBL_EXPSIGN() and SET_LDBL_EXPSIGN() into math_private.h, so they can be used elsewhere in the math library. Modified: head/lib/msun/src/e_hypotl.c head/lib/msun/src/math_private.h Modified: head/lib/msun/src/e_hypotl.c ============================================================================== --- head/lib/msun/src/e_hypotl.c Sun Oct 16 05:36:23 2011 (r226411) +++ head/lib/msun/src/e_hypotl.c Sun Oct 16 05:36:39 2011 (r226412) @@ -21,13 +21,6 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -#define GET_LDBL_EXPSIGN(i, v) do { \ - union IEEEl2bits uv; \ - \ - uv.e = v; \ - i = uv.xbits.expsign; \ -} while (0) - #define GET_LDBL_MAN(h, l, v) do { \ union IEEEl2bits uv; \ \ @@ -36,14 +29,6 @@ __FBSDID("$FreeBSD$"); l = uv.bits.manl; \ } while (0) -#define SET_LDBL_EXPSIGN(v, i) do { \ - union IEEEl2bits uv; \ - \ - uv.e = v; \ - uv.xbits.expsign = i; \ - v = uv.e; \ -} while (0) - #undef GET_HIGH_WORD #define GET_HIGH_WORD(i, v) GET_LDBL_EXPSIGN(i, v) #undef SET_HIGH_WORD Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Sun Oct 16 05:36:23 2011 (r226411) +++ head/lib/msun/src/math_private.h Sun Oct 16 05:36:39 2011 (r226412) @@ -188,6 +188,25 @@ do { \ (d) = sf_u.value; \ } while (0) +/* Get expsign as a 16 bit int from a long double. */ + +#define GET_LDBL_EXPSIGN(i,d) \ +do { \ + union IEEEl2bits ge_u; \ + ge_u.e = (d); \ + (i) = ge_u.xbits.expsign; \ +} while (0) + +/* Set expsign of a long double from a 16 bit int. */ + +#define SET_LDBL_EXPSIGN(d,v) \ +do { \ + union IEEEl2bits se_u; \ + se_u.e = (d); \ + se_u.xbits.expsign = (v); \ + (d) = se_u.e; \ +} while (0) + #ifdef FLT_EVAL_METHOD /* * Attempt to get strict C99 semantics for assignment with non-C99 compilers. From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 05:37:02 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D819106568A; Sun, 16 Oct 2011 05:37:02 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D92C8FC12; Sun, 16 Oct 2011 05:37:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5b29c047185; Sun, 16 Oct 2011 05:37:02 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5b2x0047181; Sun, 16 Oct 2011 05:37:02 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160537.p9G5b2x0047181@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226413 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:37:02 -0000 Author: das Date: Sun Oct 16 05:37:01 2011 New Revision: 226413 URL: http://svn.freebsd.org/changeset/base/226413 Log: Optimize the case of pure imaginary arguments. Calls like this are common, e.g., in DFT implementations. Discussed with: bde, kargl Modified: head/lib/msun/src/s_cexp.c head/lib/msun/src/s_cexpf.c Modified: head/lib/msun/src/s_cexp.c ============================================================================== --- head/lib/msun/src/s_cexp.c Sun Oct 16 05:36:39 2011 (r226412) +++ head/lib/msun/src/s_cexp.c Sun Oct 16 05:37:01 2011 (r226413) @@ -56,8 +56,12 @@ cexp(double complex z) /* cexp(x + I 0) = exp(x) + I 0 */ if ((hy | ly) == 0) return (cpack(exp(x), y)); + EXTRACT_WORDS(hx, lx, x); + /* cexp(0 + I y) = cos(y) + I sin(y) */ + if (((hx & 0x7fffffff) | lx) == 0) + return (cpack(cos(y), sin(y))); + if (hy >= 0x7ff00000) { - EXTRACT_WORDS(hx, lx, x); if (lx != 0 || (hx & 0x7fffffff) != 0x7ff00000) { /* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */ return (cpack(y - y, y - y)); @@ -70,7 +74,6 @@ cexp(double complex z) } } - GET_HIGH_WORD(hx, x); if (hx >= exp_ovfl && hx <= cexp_ovfl) { /* * x is between 709.7 and 1454.3, so we must scale to avoid Modified: head/lib/msun/src/s_cexpf.c ============================================================================== --- head/lib/msun/src/s_cexpf.c Sun Oct 16 05:36:39 2011 (r226412) +++ head/lib/msun/src/s_cexpf.c Sun Oct 16 05:37:01 2011 (r226413) @@ -57,6 +57,10 @@ cexpf(float complex z) if (hy == 0) return (cpackf(expf(x), y)); GET_FLOAT_WORD(hx, x); + /* cexp(0 + I y) = cos(y) + I sin(y) */ + if ((hx & 0x7fffffff) == 0) + return (cpackf(cosf(y), sinf(y))); + if (hy >= 0x7f800000) { if ((hx & 0x7fffffff) != 0x7f800000) { /* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */ From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 05:37:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E5A4106567A; Sun, 16 Oct 2011 05:37:21 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9268FC0C; Sun, 16 Oct 2011 05:37:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5bLKd047235; Sun, 16 Oct 2011 05:37:21 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5bLEo047233; Sun, 16 Oct 2011 05:37:21 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160537.p9G5bLEo047233@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226414 - head/lib/msun/bsdsrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:37:21 -0000 Author: das Date: Sun Oct 16 05:37:20 2011 New Revision: 226414 URL: http://svn.freebsd.org/changeset/base/226414 Log: Fix some non-standard variable declarations. Modified: head/lib/msun/bsdsrc/b_exp.c Modified: head/lib/msun/bsdsrc/b_exp.c ============================================================================== --- head/lib/msun/bsdsrc/b_exp.c Sun Oct 16 05:37:01 2011 (r226413) +++ head/lib/msun/bsdsrc/b_exp.c Sun Oct 16 05:37:20 2011 (r226414) @@ -74,16 +74,16 @@ __FBSDID("$FreeBSD$"); #include "mathimpl.h" -const static double p1 = 0x1.555555555553ep-3; -const static double p2 = -0x1.6c16c16bebd93p-9; -const static double p3 = 0x1.1566aaf25de2cp-14; -const static double p4 = -0x1.bbd41c5d26bf1p-20; -const static double p5 = 0x1.6376972bea4d0p-25; -const static double ln2hi = 0x1.62e42fee00000p-1; -const static double ln2lo = 0x1.a39ef35793c76p-33; -const static double lnhuge = 0x1.6602b15b7ecf2p9; -const static double lntiny = -0x1.77af8ebeae354p9; -const static double invln2 = 0x1.71547652b82fep0; +static const double p1 = 0x1.555555555553ep-3; +static const double p2 = -0x1.6c16c16bebd93p-9; +static const double p3 = 0x1.1566aaf25de2cp-14; +static const double p4 = -0x1.bbd41c5d26bf1p-20; +static const double p5 = 0x1.6376972bea4d0p-25; +static const double ln2hi = 0x1.62e42fee00000p-1; +static const double ln2lo = 0x1.a39ef35793c76p-33; +static const double lnhuge = 0x1.6602b15b7ecf2p9; +static const double lntiny = -0x1.77af8ebeae354p9; +static const double invln2 = 0x1.71547652b82fep0; #if 0 double exp(x) From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 05:37:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A70B91065672; Sun, 16 Oct 2011 05:37:56 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 968408FC14; Sun, 16 Oct 2011 05:37:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5buph047300; Sun, 16 Oct 2011 05:37:56 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5bucm047292; Sun, 16 Oct 2011 05:37:56 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160537.p9G5bucm047292@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226415 - in head/lib/msun: amd64 arm i387 ia64 mips powerpc sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:37:56 -0000 Author: das Date: Sun Oct 16 05:37:56 2011 New Revision: 226415 URL: http://svn.freebsd.org/changeset/base/226415 Log: Use #include "fenv.h" instead of #include . This makes it more convenient to compile the math library by itself. Requested by: bde Modified: head/lib/msun/amd64/fenv.c head/lib/msun/arm/fenv.c head/lib/msun/i387/fenv.c head/lib/msun/ia64/fenv.c head/lib/msun/mips/fenv.c head/lib/msun/powerpc/fenv.c head/lib/msun/sparc64/fenv.c Modified: head/lib/msun/amd64/fenv.c ============================================================================== --- head/lib/msun/amd64/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/amd64/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -31,7 +31,7 @@ #include #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/arm/fenv.c ============================================================================== --- head/lib/msun/arm/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/arm/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/i387/fenv.c ============================================================================== --- head/lib/msun/i387/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/i387/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -31,7 +31,7 @@ #include #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/ia64/fenv.c ============================================================================== --- head/lib/msun/ia64/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/ia64/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -29,7 +29,7 @@ #include #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/mips/fenv.c ============================================================================== --- head/lib/msun/mips/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/mips/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/powerpc/fenv.c ============================================================================== --- head/lib/msun/powerpc/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/powerpc/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/sparc64/fenv.c ============================================================================== --- head/lib/msun/sparc64/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/sparc64/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 07:05:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D37AE1065672; Sun, 16 Oct 2011 07:05:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C36268FC12; Sun, 16 Oct 2011 07:05:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G75hDc050040; Sun, 16 Oct 2011 07:05:43 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G75hf8050038; Sun, 16 Oct 2011 07:05:43 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110160705.p9G75hf8050038@svn.freebsd.org> From: Xin LI Date: Sun, 16 Oct 2011 07:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226416 - head/usr.bin/newgrp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:05:43 -0000 Author: delphij Date: Sun Oct 16 07:05:43 2011 New Revision: 226416 URL: http://svn.freebsd.org/changeset/base/226416 Log: Partially revert r226274, the old code was right. Modified: head/usr.bin/newgrp/newgrp.c Modified: head/usr.bin/newgrp/newgrp.c ============================================================================== --- head/usr.bin/newgrp/newgrp.c Sun Oct 16 05:37:56 2011 (r226415) +++ head/usr.bin/newgrp/newgrp.c Sun Oct 16 07:05:43 2011 (r226416) @@ -220,7 +220,7 @@ addgroup(const char *grpname) /* Add old effective gid to supp. list if it does not exist. */ if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) { - if (ngrps + 1 >= ngrps_max) + if (ngrps == ngrps_max) warnx("too many groups"); else { grps[ngrps++] = egid; From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 07:35:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35027106566C; Sun, 16 Oct 2011 07:35:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24CDA8FC12; Sun, 16 Oct 2011 07:35:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G7ZRIf051026; Sun, 16 Oct 2011 07:35:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G7ZRKG051024; Sun, 16 Oct 2011 07:35:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110160735.p9G7ZRKG051024@svn.freebsd.org> From: Xin LI Date: Sun, 16 Oct 2011 07:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226418 - head/usr.bin/gzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:35:27 -0000 Author: delphij Date: Sun Oct 16 07:35:26 2011 New Revision: 226418 URL: http://svn.freebsd.org/changeset/base/226418 Log: According to the NetBSD foundation [1]: Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license. We would also encourage you to inform us about these files, so that we can continue to track the many places in which NetBSD is used. http://www.netbsd.org/about/redistribution.html#why2clause [1] Requested by: joel@ Modified: head/usr.bin/gzip/unxz.c Modified: head/usr.bin/gzip/unxz.c ============================================================================== --- head/usr.bin/gzip/unxz.c Sun Oct 16 07:29:50 2011 (r226417) +++ head/usr.bin/gzip/unxz.c Sun Oct 16 07:35:26 2011 (r226418) @@ -15,13 +15,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 07:36:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0E3E106566B; Sun, 16 Oct 2011 07:36:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A014C8FC19; Sun, 16 Oct 2011 07:36:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G7aRdu051095; Sun, 16 Oct 2011 07:36:27 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G7aRks051092; Sun, 16 Oct 2011 07:36:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160736.p9G7aRks051092@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 07:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226419 - head/usr.bin/ruptime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:36:27 -0000 Author: ed Date: Sun Oct 16 07:36:27 2011 New Revision: 226419 URL: http://svn.freebsd.org/changeset/base/226419 Log: Make some internal fixes to ruptime(1): - Prevent possible unaligned access to struct whoent. - Increase uptime column by one, to properly print hosts with an uptime greater than 1000 days. - Reduce code complexity by storing struct whod inside struct hs. - Set WARNS to 6. MFC after: 3 months Modified: head/usr.bin/ruptime/Makefile head/usr.bin/ruptime/ruptime.c Modified: head/usr.bin/ruptime/Makefile ============================================================================== --- head/usr.bin/ruptime/Makefile Sun Oct 16 07:35:26 2011 (r226418) +++ head/usr.bin/ruptime/Makefile Sun Oct 16 07:36:27 2011 (r226419) @@ -3,6 +3,4 @@ PROG= ruptime -WARNS?= 3 - .include Modified: head/usr.bin/ruptime/ruptime.c ============================================================================== --- head/usr.bin/ruptime/ruptime.c Sun Oct 16 07:35:26 2011 (r226418) +++ head/usr.bin/ruptime/ruptime.c Sun Oct 16 07:36:27 2011 (r226419) @@ -55,13 +55,12 @@ __FBSDID("$FreeBSD$"); #include struct hs { - struct whod *hs_wd; + struct whod hs_wd; int hs_nusers; } *hs; -struct whod awhod; -#define LEFTEARTH(h) (now - (h) > 4*24*60*60) -#define ISDOWN(h) (now - (h)->hs_wd->wd_recvtime > 11 * 60) -#define WHDRSIZE (sizeof (awhod) - sizeof (awhod.wd_we)) +#define LEFTEARTH(h) (now - (h) > 4*24*60*60) +#define ISDOWN(h) (now - (h)->hs_wd.wd_recvtime > 11 * 60) +#define WHDRSIZE __offsetof(struct whod, wd_we) size_t nhosts; time_t now; @@ -127,10 +126,10 @@ interval(time_t tval, const char *updown int days, hours, minutes; if (tval < 0) { - (void)snprintf(resbuf, sizeof(resbuf), " %s ??:??", updown); + (void)snprintf(resbuf, sizeof(resbuf), "%s ??:??", updown); return (resbuf); } - /* round to minutes. */ + /* Round to minutes. */ minutes = (tval + (60 - 1)) / 60; hours = minutes / 60; minutes %= 60; @@ -138,10 +137,10 @@ interval(time_t tval, const char *updown hours %= 24; if (days) (void)snprintf(resbuf, sizeof(resbuf), - "%s %3d+%02d:%02d", updown, days, hours, minutes); + "%s %4d+%02d:%02d", updown, days, hours, minutes); else (void)snprintf(resbuf, sizeof(resbuf), - "%s %2d:%02d", updown, hours, minutes); + "%s %2d:%02d", updown, hours, minutes); return (resbuf); } @@ -152,7 +151,7 @@ int hscmp(const void *a1, const void *a2) { return (rflg * - strcmp(HS(a1)->hs_wd->wd_hostname, HS(a2)->hs_wd->wd_hostname)); + strcmp(HS(a1)->hs_wd.wd_hostname, HS(a2)->hs_wd.wd_hostname)); } /* Load average comparison. */ @@ -168,7 +167,7 @@ lcmp(const void *a1, const void *a2) return (-rflg); else return (rflg * - (HS(a2)->hs_wd->wd_loadav[0] - HS(a1)->hs_wd->wd_loadav[0])); + (HS(a2)->hs_wd.wd_loadav[0] - HS(a1)->hs_wd.wd_loadav[0])); } void @@ -179,10 +178,9 @@ ruptime(const char *host, int aflg, int struct whoent *we; struct dirent *dp; const char *hostname; - char buf[sizeof(struct whod)]; int fd, i, maxloadav; size_t hspace; - u_int cc; + ssize_t cc; rewinddir(dirp); hsp = NULL; @@ -195,18 +193,7 @@ ruptime(const char *host, int aflg, int warn("%s", dp->d_name); continue; } - cc = read(fd, buf, sizeof(struct whod)); - (void)close(fd); - if (host != NULL) { - hostname = ((struct whod *)buf)->wd_hostname; - if (strcasecmp(hostname, host) != 0) - continue; - } - if (cc < WHDRSIZE) - continue; - if (LEFTEARTH(((struct whod *)buf)->wd_recvtime)) - continue; if (nhosts == hspace) { if ((hs = realloc(hs, (hspace += 40) * sizeof(*hs))) == NULL) @@ -214,16 +201,26 @@ ruptime(const char *host, int aflg, int hsp = hs + nhosts; } - if ((hsp->hs_wd = malloc((size_t)WHDRSIZE)) == NULL) - err(1, NULL); - memmove(hsp->hs_wd, buf, (size_t)WHDRSIZE); + wd = &hsp->hs_wd; + cc = read(fd, wd, sizeof(*wd)); + (void)close(fd); + if (cc < (ssize_t)WHDRSIZE) + continue; + + if (host != NULL) { + hostname = wd->wd_hostname; + if (strcasecmp(hostname, host) != 0) + continue; + } + if (LEFTEARTH(wd->wd_recvtime)) + continue; - for (wd = (struct whod *)buf, i = 0; i < 2; ++i) + for (i = 0; i < 2; i++) if (wd->wd_loadav[i] > maxloadav) maxloadav = wd->wd_loadav[i]; - for (hsp->hs_nusers = 0, - we = (struct whoent *)(buf + cc); --we >= wd->wd_we;) + for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; + (char *)(we + 1) <= (char *)wd + cc; we++) if (aflg || we->we_idle < 3600) ++hsp->hs_nusers; ++hsp; @@ -239,25 +236,25 @@ ruptime(const char *host, int aflg, int qsort(hs, nhosts, sizeof(hs[0]), cmp); for (i = 0; i < (int)nhosts; i++) { hsp = &hs[i]; + wd = &hsp->hs_wd; if (ISDOWN(hsp)) { - (void)printf("%-25.25s%s\n", hsp->hs_wd->wd_hostname, - interval(now - hsp->hs_wd->wd_recvtime, "down")); + (void)printf("%-25.25s%s\n", wd->wd_hostname, + interval(now - hsp->hs_wd.wd_recvtime, "down")); continue; } (void)printf( "%-25.25s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n", - hsp->hs_wd->wd_hostname, - interval((time_t)hsp->hs_wd->wd_sendtime - - (time_t)hsp->hs_wd->wd_boottime, " up"), + wd->wd_hostname, + interval((time_t)wd->wd_sendtime - + (time_t)wd->wd_boottime, " up"), hsp->hs_nusers, hsp->hs_nusers == 1 ? ", " : "s,", maxloadav >= 1000 ? 5 : 4, - hsp->hs_wd->wd_loadav[0] / 100.0, + wd->wd_loadav[0] / 100.0, maxloadav >= 1000 ? 5 : 4, - hsp->hs_wd->wd_loadav[1] / 100.0, + wd->wd_loadav[1] / 100.0, maxloadav >= 1000 ? 5 : 4, - hsp->hs_wd->wd_loadav[2] / 100.0); - free(hsp->hs_wd); + wd->wd_loadav[2] / 100.0); } free(hs); hs = NULL; @@ -283,11 +280,11 @@ int tcmp(const void *a1, const void *a2) { return (rflg * ( - (ISDOWN(HS(a2)) ? HS(a2)->hs_wd->wd_recvtime - now - : HS(a2)->hs_wd->wd_sendtime - HS(a2)->hs_wd->wd_boottime) + (ISDOWN(HS(a2)) ? HS(a2)->hs_wd.wd_recvtime - now + : HS(a2)->hs_wd.wd_sendtime - HS(a2)->hs_wd.wd_boottime) - - (ISDOWN(HS(a1)) ? HS(a1)->hs_wd->wd_recvtime - now - : HS(a1)->hs_wd->wd_sendtime - HS(a1)->hs_wd->wd_boottime) + (ISDOWN(HS(a1)) ? HS(a1)->hs_wd.wd_recvtime - now + : HS(a1)->hs_wd.wd_sendtime - HS(a1)->hs_wd.wd_boottime) )); } From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 07:57:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA6A9106566C; Sun, 16 Oct 2011 07:57:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 812608FC0A; Sun, 16 Oct 2011 07:57:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G7v144051765; Sun, 16 Oct 2011 07:57:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G7v1ch051763; Sun, 16 Oct 2011 07:57:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160757.p9G7v1ch051763@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 07:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226420 - head/usr.bin/at X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:57:01 -0000 Author: ed Date: Sun Oct 16 07:57:01 2011 New Revision: 226420 URL: http://svn.freebsd.org/changeset/base/226420 Log: Build at(1) with NO_WFORMAT instead of WARNS=1. Modified: head/usr.bin/at/Makefile Modified: head/usr.bin/at/Makefile ============================================================================== --- head/usr.bin/at/Makefile Sun Oct 16 07:36:27 2011 (r226419) +++ head/usr.bin/at/Makefile Sun Oct 16 07:57:01 2011 (r226420) @@ -11,7 +11,7 @@ MLINKS= at.1 batch.1 \ at.1 atq.1 \ at.1 atrm.1 -WARNS?= 1 +NO_WFORMAT= BINOWN= root BINMODE= 4555 From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 08:04:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CC941065670; Sun, 16 Oct 2011 08:04:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C9E48FC16; Sun, 16 Oct 2011 08:04:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G84h5V052047; Sun, 16 Oct 2011 08:04:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G84hAn052044; Sun, 16 Oct 2011 08:04:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160804.p9G84hAn052044@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226421 - in head/usr.bin: lzmainfo xzdec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:04:43 -0000 Author: ed Date: Sun Oct 16 08:04:43 2011 New Revision: 226421 URL: http://svn.freebsd.org/changeset/base/226421 Log: Remove unneeded WARNS=3 lines. It seems these two tools can be built properly with WARNS=6, even on architectures that are stricter about alignment. Modified: head/usr.bin/lzmainfo/Makefile head/usr.bin/xzdec/Makefile Modified: head/usr.bin/lzmainfo/Makefile ============================================================================== --- head/usr.bin/lzmainfo/Makefile Sun Oct 16 07:57:01 2011 (r226420) +++ head/usr.bin/lzmainfo/Makefile Sun Oct 16 08:04:43 2011 (r226421) @@ -12,8 +12,6 @@ SRCS+= lzmainfo.c SRCS+= tuklib_progname.c \ tuklib_exit.c -WARNS?= 3 - CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ -I${XZDIR}/common Modified: head/usr.bin/xzdec/Makefile ============================================================================== --- head/usr.bin/xzdec/Makefile Sun Oct 16 07:57:01 2011 (r226420) +++ head/usr.bin/xzdec/Makefile Sun Oct 16 08:04:43 2011 (r226421) @@ -18,8 +18,6 @@ SRCS= xzdec.c SRCS+= tuklib_progname.c \ tuklib_exit.c -WARNS?= 3 - CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ -I${XZDIR}/common From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 08:09:18 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1092106564A; Sun, 16 Oct 2011 08:09:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6BA78FC0A; Sun, 16 Oct 2011 08:09:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G89HC4052276; Sun, 16 Oct 2011 08:09:17 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G89Hlq052272; Sun, 16 Oct 2011 08:09:17 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160809.p9G89Hlq052272@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226422 - head/usr.bin/m4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:09:18 -0000 Author: ed Date: Sun Oct 16 08:09:17 2011 New Revision: 226422 URL: http://svn.freebsd.org/changeset/base/226422 Log: Fix build of m4 with WARNS=6. Change the parser; rename `exp' to `exponent' not to collide with exp(3). Modified: head/usr.bin/m4/Makefile head/usr.bin/m4/expr.c head/usr.bin/m4/main.c Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Sun Oct 16 08:04:43 2011 (r226421) +++ head/usr.bin/m4/Makefile Sun Oct 16 08:09:17 2011 (r226422) @@ -9,6 +9,4 @@ CFLAGS+=-DEXTENDED SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c -WARNS?= 0 - .include Modified: head/usr.bin/m4/expr.c ============================================================================== --- head/usr.bin/m4/expr.c Sun Oct 16 08:04:43 2011 (r226421) +++ head/usr.bin/m4/expr.c Sun Oct 16 08:09:17 2011 (r226422) @@ -71,8 +71,8 @@ __FBSDID("$FreeBSD$"); * nerel : shift { ("<" | ">" | "<=" | ">=") shift } * shift : primary { ("<<" | ">>") primary } * primary : term { ("+" | "-") term } - * term : exp { ("*" | "/" | "%") exp } - * exp : unary { "**" unary } + * term : exponent { ("*" | "/" | "%") exponent } + * exponent: unary { "**" unary } * unary : factor * | ("+" | "-" | "~" | "!") unary * factor : constant @@ -115,12 +115,11 @@ static int nerel(int mayeval); static int shift(int mayeval); static int primary(int mayeval); static int term(int mayeval); -static int exp(int mayeval); +static int exponent(int mayeval); static int unary(int mayeval); static int factor(int mayeval); static int constant(int mayeval); static int num(int mayeval); -static int geteqrel(int mayeval); static int skipws(void); static void experr(const char *); @@ -388,16 +387,16 @@ primary(int mayeval) } /* - * term : exp { ("*" | "/" | "%") exp } + * term : exponent { ("*" | "/" | "%") exponent } */ static int term(int mayeval) { int c, vl, vr; - vl = exp(mayeval); + vl = exponent(mayeval); while ((c = skipws()) == '*' || c == '/' || c == '%') { - vr = exp(mayeval); + vr = exponent(mayeval); switch (c) { case '*': @@ -426,10 +425,10 @@ term(int mayeval) } /* - * exp : unary { "**" exp } + * exponent : unary { "**" exponent } */ static int -exp(int mayeval) +exponent(int mayeval) { int c, vl, vr, n; @@ -562,7 +561,7 @@ constant(int mayeval) * num : digit | num digit */ static int -num(int mayeval) +num(int mayeval __unused) { int rval, c, base; int ndig; Modified: head/usr.bin/m4/main.c ============================================================================== --- head/usr.bin/m4/main.c Sun Oct 16 08:04:43 2011 (r226421) +++ head/usr.bin/m4/main.c Sun Oct 16 08:09:17 2011 (r226422) @@ -34,9 +34,11 @@ */ #ifndef lint +#if 0 static char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; +#endif #endif /* not lint */ #ifndef lint From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 08:14:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04ECD1065674; Sun, 16 Oct 2011 08:14:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D04C38FC1A; Sun, 16 Oct 2011 08:14:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8ECSf052465; Sun, 16 Oct 2011 08:14:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8ECbt052463; Sun, 16 Oct 2011 08:14:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160814.p9G8ECbt052463@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226423 - head/usr.bin/su X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:14:13 -0000 Author: ed Date: Sun Oct 16 08:14:12 2011 New Revision: 226423 URL: http://svn.freebsd.org/changeset/base/226423 Log: Remove WARNS line. This tool builds with WARNS=6 properly. Modified: head/usr.bin/su/Makefile Modified: head/usr.bin/su/Makefile ============================================================================== --- head/usr.bin/su/Makefile Sun Oct 16 08:09:17 2011 (r226422) +++ head/usr.bin/su/Makefile Sun Oct 16 08:14:12 2011 (r226423) @@ -5,8 +5,6 @@ PROG= su -WARNS?= 5 - DPADD= ${LIBUTIL} ${LIBPAM} LDADD= -lutil ${MINUSLPAM} From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 08:36:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49B01065675; Sun, 16 Oct 2011 08:36:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94A188FC16; Sun, 16 Oct 2011 08:36:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8aA79053168; Sun, 16 Oct 2011 08:36:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8aA3E053166; Sun, 16 Oct 2011 08:36:10 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160836.p9G8aA3E053166@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226424 - head/usr.bin/systat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:36:10 -0000 Author: ed Date: Sun Oct 16 08:36:10 2011 New Revision: 226424 URL: http://svn.freebsd.org/changeset/base/226424 Log: Use integer to store the result of getch(). We need to use an integer to make the comparison against ERR work. MFC after: 3 months Modified: head/usr.bin/systat/keyboard.c Modified: head/usr.bin/systat/keyboard.c ============================================================================== --- head/usr.bin/systat/keyboard.c Sun Oct 16 08:14:12 2011 (r226423) +++ head/usr.bin/systat/keyboard.c Sun Oct 16 08:36:10 2011 (r226424) @@ -47,8 +47,8 @@ static const char sccsid[] = "@(#)keyboa int keyboard(void) { - char ch, line[80]; - int oldmask; + char line[80]; + int ch, oldmask; for (;;) { col = 0; From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 08:44:04 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DDF1106566B; Sun, 16 Oct 2011 08:44:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA068FC0A; Sun, 16 Oct 2011 08:44:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8i4fF053441; Sun, 16 Oct 2011 08:44:04 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8i4kX053438; Sun, 16 Oct 2011 08:44:04 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160844.p9G8i4kX053438@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226425 - in head: lib/libncp sys/netncp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:44:04 -0000 Author: ed Date: Sun Oct 16 08:44:03 2011 New Revision: 226425 URL: http://svn.freebsd.org/changeset/base/226425 Log: Change ncp_scan_bindery_object() to pass a constant search string. The ncp_scan_bindery_object() function does not modify search_string internally, so there is no need to declare it as `char *'. Modified: head/lib/libncp/ncpl_bind.c head/sys/netncp/ncp_lib.h Modified: head/lib/libncp/ncpl_bind.c ============================================================================== --- head/lib/libncp/ncpl_bind.c Sun Oct 16 08:36:10 2011 (r226424) +++ head/lib/libncp/ncpl_bind.c Sun Oct 16 08:44:03 2011 (r226425) @@ -85,7 +85,7 @@ ncp_read_property_value(NWCONN_HANDLE co int ncp_scan_bindery_object(NWCONN_HANDLE connid, u_int32_t last_id, - u_int16_t object_type, char *search_string, + u_int16_t object_type, const char *search_string, struct ncp_bindery_object *target) { int error; Modified: head/sys/netncp/ncp_lib.h ============================================================================== --- head/sys/netncp/ncp_lib.h Sun Oct 16 08:36:10 2011 (r226424) +++ head/sys/netncp/ncp_lib.h Sun Oct 16 08:44:03 2011 (r226425) @@ -174,7 +174,7 @@ int ncp_get_bindery_object_id(NWCONN_HA int ncp_get_bindery_object_name(NWCONN_HANDLE, u_int32_t, struct ncp_bindery_object *); int ncp_scan_bindery_object(NWCONN_HANDLE, u_int32_t, u_int16_t, - char *, struct ncp_bindery_object *); + const char *, struct ncp_bindery_object *); int ncp_read_property_value(NWCONN_HANDLE, int object_type, const char *, int, const char *, struct nw_property *); int ncp_get_encryption_key(NWCONN_HANDLE, char *); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 08:45:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D5F8106564A; Sun, 16 Oct 2011 08:45:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DAAB8FC16; Sun, 16 Oct 2011 08:45:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8jGex053519; Sun, 16 Oct 2011 08:45:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8jG3K053517; Sun, 16 Oct 2011 08:45:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160845.p9G8jG3K053517@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226426 - head/lib/libsdp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:45:16 -0000 Author: ed Date: Sun Oct 16 08:45:16 2011 New Revision: 226426 URL: http://svn.freebsd.org/changeset/base/226426 Log: Change the SDP_GET* macros to cast to a const buffer. This fixes a compiler warning when passing a const buffer to them. Modified: head/lib/libsdp/sdp.h Modified: head/lib/libsdp/sdp.h ============================================================================== --- head/lib/libsdp/sdp.h Sun Oct 16 08:44:03 2011 (r226425) +++ head/lib/libsdp/sdp.h Sun Oct 16 08:45:16 2011 (r226426) @@ -312,13 +312,13 @@ typedef struct sdp_attr * sdp_attr_p; /* Inline versions of get/put byte/short/long. Pointer is advanced */ #define SDP_GET8(b, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (b) = *t_cp; \ (cp) ++; \ } #define SDP_GET16(s, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (s) = ((uint16_t)t_cp[0] << 8) \ | ((uint16_t)t_cp[1]) \ ; \ @@ -326,7 +326,7 @@ typedef struct sdp_attr * sdp_attr_p; } #define SDP_GET32(l, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (l) = ((uint32_t)t_cp[0] << 24) \ | ((uint32_t)t_cp[1] << 16) \ | ((uint32_t)t_cp[2] << 8) \ From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 08:54:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1DE21065672; Sun, 16 Oct 2011 08:54:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1DA08FC14; Sun, 16 Oct 2011 08:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8sf9D053829; Sun, 16 Oct 2011 08:54:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8sfLU053826; Sun, 16 Oct 2011 08:54:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160854.p9G8sfLU053826@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226427 - head/usr.bin/rwho X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:54:41 -0000 Author: ed Date: Sun Oct 16 08:54:41 2011 New Revision: 226427 URL: http://svn.freebsd.org/changeset/base/226427 Log: Build rwho(1) with WARNS=6. The only reason why it didn't build with WARNS=6, is because of some simple to fix string formatting bugs. MFC after: 3 months Modified: head/usr.bin/rwho/Makefile head/usr.bin/rwho/rwho.c Modified: head/usr.bin/rwho/Makefile ============================================================================== --- head/usr.bin/rwho/Makefile Sun Oct 16 08:45:16 2011 (r226426) +++ head/usr.bin/rwho/Makefile Sun Oct 16 08:54:41 2011 (r226427) @@ -3,6 +3,4 @@ PROG= rwho -WARNS?= 1 - .include Modified: head/usr.bin/rwho/rwho.c ============================================================================== --- head/usr.bin/rwho/rwho.c Sun Oct 16 08:45:16 2011 (r226426) +++ head/usr.bin/rwho/rwho.c Sun Oct 16 08:54:41 2011 (r226427) @@ -165,9 +165,10 @@ main(int argc, char *argv[]) d_first ? "%e %b %R" : "%b %e %R", localtime(&t)); (void)sprintf(buf, "%s:%-.*s", mp->myhost, - sizeof(mp->myutmp.out_line), mp->myutmp.out_line); + (int)sizeof(mp->myutmp.out_line), mp->myutmp.out_line); printf("%-*.*s %-*s %s", - sizeof(mp->myutmp.out_name), sizeof(mp->myutmp.out_name), + (int)sizeof(mp->myutmp.out_name), + (int)sizeof(mp->myutmp.out_name), mp->myutmp.out_name, width, buf, From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 09:09:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21B1D10657A3; Sun, 16 Oct 2011 09:09:34 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC7448FC0C; Sun, 16 Oct 2011 09:09:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G99X54054363; Sun, 16 Oct 2011 09:09:33 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G99XkQ054361; Sun, 16 Oct 2011 09:09:33 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160909.p9G99XkQ054361@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 09:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226428 - head/usr.bin/su X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 09:09:34 -0000 Author: ed Date: Sun Oct 16 09:09:33 2011 New Revision: 226428 URL: http://svn.freebsd.org/changeset/base/226428 Log: Undo r226423. It seems su does build without warnings, but it requires a small fix to libbsm headers, which I have not committed to SVN yet. Modified: head/usr.bin/su/Makefile Modified: head/usr.bin/su/Makefile ============================================================================== --- head/usr.bin/su/Makefile Sun Oct 16 08:54:41 2011 (r226427) +++ head/usr.bin/su/Makefile Sun Oct 16 09:09:33 2011 (r226428) @@ -5,6 +5,8 @@ PROG= su +WARNS?= 5 + DPADD= ${LIBUTIL} ${LIBPAM} LDADD= -lutil ${MINUSLPAM} From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 10:00:28 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE0641065686; Sun, 16 Oct 2011 10:00:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE0018FC1F; Sun, 16 Oct 2011 10:00:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GA0SkN056008; Sun, 16 Oct 2011 10:00:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GA0SeE056005; Sun, 16 Oct 2011 10:00:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161000.p9GA0SeE056005@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 10:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226429 - head/usr.bin/ncplist X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:00:29 -0000 Author: ed Date: Sun Oct 16 10:00:28 2011 New Revision: 226429 URL: http://svn.freebsd.org/changeset/base/226429 Log: Fix ncplist to build with WARNS=6. Add some const and static keywords to get it all to build. Also add missing #includes. Modified: head/usr.bin/ncplist/Makefile head/usr.bin/ncplist/ncplist.c Modified: head/usr.bin/ncplist/Makefile ============================================================================== --- head/usr.bin/ncplist/Makefile Sun Oct 16 09:09:33 2011 (r226428) +++ head/usr.bin/ncplist/Makefile Sun Oct 16 10:00:28 2011 (r226429) @@ -2,8 +2,6 @@ PROG= ncplist -WARNS?= 0 - DPADD= ${LIBNCP} ${LIBIPX} LDADD= -lncp -lipx Modified: head/usr.bin/ncplist/ncplist.c ============================================================================== --- head/usr.bin/ncplist/ncplist.c Sun Oct 16 09:09:33 2011 (r226428) +++ head/usr.bin/ncplist/ncplist.c Sun Oct 16 10:00:28 2011 (r226429) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -153,7 +155,7 @@ show_serverlist(char *server) { int found = 0, connid; struct ncp_bindery_object obj; - char *pattern = "*"; + const char *pattern = "*"; connid = ncp_get_connid(server, 1); if (connid < 0) @@ -229,7 +231,7 @@ show_userlist(char *server) return; } -void +static void show_queuelist(char *server, char *patt) { struct ncp_bindery_object q; @@ -298,8 +300,8 @@ list_volumes(char *server) } struct ncp_bind_type { - u_long type; - char *name; + u_long type; + const char *name; }; static struct ncp_bind_type btypes[] = { @@ -310,7 +312,7 @@ static struct ncp_bind_type btypes[] = { {0, NULL} }; -void +static void list_bindery(char *server, char *type, char *patt) { struct ncp_bindery_object q; From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 10:14:33 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E872D106564A; Sun, 16 Oct 2011 10:14:33 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D813E8FC0A; Sun, 16 Oct 2011 10:14:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GAEXZC057950; Sun, 16 Oct 2011 10:14:33 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GAEX4C057948; Sun, 16 Oct 2011 10:14:33 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201110161014.p9GAEX4C057948@svn.freebsd.org> From: Stefan Farfeleder Date: Sun, 16 Oct 2011 10:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226430 - head/contrib/gcc/config/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:14:34 -0000 Author: stefanf Date: Sun Oct 16 10:14:33 2011 New Revision: 226430 URL: http://svn.freebsd.org/changeset/base/226430 Log: Adjust posix_memalign() prototype to match what we define in stdlib.h for C++ compilation. PR: standards/147210 Modified: head/contrib/gcc/config/i386/pmm_malloc.h Modified: head/contrib/gcc/config/i386/pmm_malloc.h ============================================================================== --- head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:00:28 2011 (r226429) +++ head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:14:33 2011 (r226430) @@ -34,7 +34,7 @@ #ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); #else -extern "C" int posix_memalign (void **, size_t, size_t) throw (); +extern "C" int posix_memalign (void **, size_t, size_t); #endif static __inline void * From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 10:30:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 662FA1065670; Sun, 16 Oct 2011 10:30:23 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 29DDE8FC14; Sun, 16 Oct 2011 10:30:22 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 57C097F382B; Sun, 16 Oct 2011 12:25:14 +0200 (CEST) Date: Sun, 16 Oct 2011 12:25:14 +0200 From: Roman Divacky To: Stefan Farfeleder Message-ID: <20111016102514.GA70944@freebsd.org> References: <201110161014.p9GAEX4C057948@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110161014.p9GAEX4C057948@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226430 - head/contrib/gcc/config/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:30:23 -0000 Can this be MFCed to stable/9 ? I've seen clang erroring out because of this quite a lot. roman On Sun, Oct 16, 2011 at 10:14:33AM +0000, Stefan Farfeleder wrote: > Author: stefanf > Date: Sun Oct 16 10:14:33 2011 > New Revision: 226430 > URL: http://svn.freebsd.org/changeset/base/226430 > > Log: > Adjust posix_memalign() prototype to match what we define in stdlib.h for > C++ compilation. > > PR: standards/147210 > > Modified: > head/contrib/gcc/config/i386/pmm_malloc.h > > Modified: head/contrib/gcc/config/i386/pmm_malloc.h > ============================================================================== > --- head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:00:28 2011 (r226429) > +++ head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:14:33 2011 (r226430) > @@ -34,7 +34,7 @@ > #ifndef __cplusplus > extern int posix_memalign (void **, size_t, size_t); > #else > -extern "C" int posix_memalign (void **, size_t, size_t) throw (); > +extern "C" int posix_memalign (void **, size_t, size_t); > #endif > > static __inline void * From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 10:58:00 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4E49106564A; Sun, 16 Oct 2011 10:58:00 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D50E68FC19; Sun, 16 Oct 2011 10:58:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GAw0cQ059341; Sun, 16 Oct 2011 10:58:00 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GAw0Wl059339; Sun, 16 Oct 2011 10:58:00 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161058.p9GAw0Wl059339@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 10:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226431 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:58:01 -0000 Author: ed Date: Sun Oct 16 10:58:00 2011 New Revision: 226431 URL: http://svn.freebsd.org/changeset/base/226431 Log: Forward declare mbuf and inpcb. This fixes a compiler warning at WARNS=6 when including the header files as follows: #include #include #include #include #include Modified: head/sys/netinet/udp_var.h Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Sun Oct 16 10:14:33 2011 (r226430) +++ head/sys/netinet/udp_var.h Sun Oct 16 10:58:00 2011 (r226431) @@ -51,6 +51,9 @@ struct udpiphdr { #define ui_ulen ui_u.uh_ulen #define ui_sum ui_u.uh_sum +struct inpcb; +struct mbuf; + typedef void(*udp_tun_func_t)(struct mbuf *, int off, struct inpcb *); /* From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 11:39:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53EA6106564A; Sun, 16 Oct 2011 11:39:07 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep32.mx.upcmail.net (fep32.mx.upcmail.net [62.179.121.50]) by mx1.freebsd.org (Postfix) with ESMTP id 202F18FC0C; Sun, 16 Oct 2011 11:39:05 +0000 (UTC) Received: from edge03.upcmail.net ([192.168.13.238]) by viefep18-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20111016112426.VUGG1564.viefep18-int.chello.at@edge03.upcmail.net>; Sun, 16 Oct 2011 13:24:26 +0200 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge03.upcmail.net with edge id lPQQ1h00z0a5KZh03PQRWt; Sun, 16 Oct 2011 13:24:26 +0200 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 4BEBC6D41F; Sun, 16 Oct 2011 13:11:54 +0200 (CEST) Date: Sun, 16 Oct 2011 13:11:54 +0200 From: Stefan Farfeleder To: Roman Divacky Message-ID: <20111016111153.GA2283@mole.fafoe.narf.at> References: <201110161014.p9GAEX4C057948@svn.freebsd.org> <20111016102514.GA70944@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111016102514.GA70944@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Cloudmark-Analysis: v=1.1 cv=h6X7fkn2Y8psEldlT1JduSyVgv7YVLWttKdqKtnr7ik= c=1 sm=0 a=wom5GMh1gUkA:10 a=H8VswmBAHeYA:10 a=dBRESv0yCI8A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=WwCa5mEH0ntyKeEHsIUA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226430 - head/contrib/gcc/config/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 11:39:07 -0000 On Sun, Oct 16, 2011 at 12:25:14PM +0200, Roman Divacky wrote: > Can this be MFCed to stable/9 ? I've seen clang erroring out > because of this quite a lot. Yes I think so. Stefan > On Sun, Oct 16, 2011 at 10:14:33AM +0000, Stefan Farfeleder wrote: > > Author: stefanf > > Date: Sun Oct 16 10:14:33 2011 > > New Revision: 226430 > > URL: http://svn.freebsd.org/changeset/base/226430 > > > > Log: > > Adjust posix_memalign() prototype to match what we define in stdlib.h for > > C++ compilation. > > > > PR: standards/147210 > > > > Modified: > > head/contrib/gcc/config/i386/pmm_malloc.h > > > > Modified: head/contrib/gcc/config/i386/pmm_malloc.h > > ============================================================================== > > --- head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:00:28 2011 (r226429) > > +++ head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:14:33 2011 (r226430) > > @@ -34,7 +34,7 @@ > > #ifndef __cplusplus > > extern int posix_memalign (void **, size_t, size_t); > > #else > > -extern "C" int posix_memalign (void **, size_t, size_t) throw (); > > +extern "C" int posix_memalign (void **, size_t, size_t); > > #endif > > > > static __inline void * > From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 12:44:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7993F106566B for ; Sun, 16 Oct 2011 12:44:37 +0000 (UTC) (envelope-from tcberner@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 06FA28FC14 for ; Sun, 16 Oct 2011 12:44:36 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so2537379bkb.13 for ; Sun, 16 Oct 2011 05:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:to:subject:references:date:mime-version :content-transfer-encoding:from:organization:message-id:in-reply-to :user-agent; bh=xyd2EtEzpUggw0zfy4uYaPek0m3ExX9YHKvLRSqWR+Y=; b=j2+Yd0LDdS0dQwGrl1Aw8p0ik7ldkgmtx7ycGCM7DxbUMJFXBY8kOQeCcOZ7geWRF0 5DvTTVotThGJHJA/7aexUqFhs4t3Rei+lJt1phiNsId18wn7SoT6zXxFvlAqOH2v7qnJ 0JChZkfvhCKZlhBY0BqEpmc3S1bHazrbsV9oM= Received: by 10.223.16.82 with SMTP id n18mr17252296faa.2.1318767602768; Sun, 16 Oct 2011 05:20:02 -0700 (PDT) Received: from sam.firefly (95-9.195-178.cust.bluewin.ch. [178.195.9.95]) by mx.google.com with ESMTPS id c13sm1620107fai.3.2011.10.16.05.19.59 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 16 Oct 2011 05:20:00 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: svn-src-head@freebsd.org References: <201110140724.p9E7OmMB052118@svn.freebsd.org> Date: Sun, 16 Oct 2011 14:19:57 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tcb Organization: - Message-ID: In-Reply-To: <201110140724.p9E7OmMB052118@svn.freebsd.org> User-Agent: Opera Mail/12.00 (FreeBSD) Subject: Re: svn commit: r226359 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 12:44:37 -0000 This seems to break portsnap on amd64. As seen in ports/161703 (with error look: file too large). mfg tobias On Fri, 14 Oct 2011 09:24:48 +0200, Ed Schouten wrote: > Author: ed > Date: Fri Oct 14 07:24:48 2011 > New Revision: 226359 > URL: http://svn.freebsd.org/changeset/base/226359 > > Log: > Build look(1) with WARNS=6. > > Modified: > head/usr.bin/look/Makefile > head/usr.bin/look/look.c > > Modified: head/usr.bin/look/Makefile > ============================================================================== > --- head/usr.bin/look/Makefile Fri Oct 14 07:24:23 2011 (r226358) > +++ head/usr.bin/look/Makefile Fri Oct 14 07:24:48 2011 (r226359) > @@ -3,6 +3,4 @@ > PROG= look > -WARNS?= 2 > - > .include > > Modified: head/usr.bin/look/look.c > ============================================================================== > --- head/usr.bin/look/look.c Fri Oct 14 07:24:23 2011 (r226358) > +++ head/usr.bin/look/look.c Fri Oct 14 07:24:48 2011 (r226359) > @@ -134,7 +134,7 @@ main(int argc, char *argv[]) > do { > if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) > err(2, "%s", file); > - if (sb.st_size > SIZE_T_MAX) > + if (sb.st_size > (off_t)SIZE_T_MAX) > errx(2, "%s: %s", file, strerror(EFBIG)); > if (sb.st_size == 0) { > close(fd); > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 13:54:46 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB182106564A; Sun, 16 Oct 2011 13:54:46 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAE358FC13; Sun, 16 Oct 2011 13:54:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GDskuF065105; Sun, 16 Oct 2011 13:54:46 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GDskO6065103; Sun, 16 Oct 2011 13:54:46 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110161354.p9GDskO6065103@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 13:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226433 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 13:54:46 -0000 Author: andre Date: Sun Oct 16 13:54:46 2011 New Revision: 226433 URL: http://svn.freebsd.org/changeset/base/226433 Log: Update the comment and description of tcp_sendspace and tcp_recvspace to better reflect their purpose. MFC after: 1 week Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sun Oct 16 11:08:51 2011 (r226432) +++ head/sys/netinet/tcp_usrreq.c Sun Oct 16 13:54:46 2011 (r226433) @@ -1498,16 +1498,15 @@ tcp_ctloutput(struct socket *so, struct #undef INP_WLOCK_RECHECK /* - * tcp_sendspace and tcp_recvspace are the default send and receive window - * sizes, respectively. These are obsolescent (this information should - * be set by the route). + * Set the initial send and receive socket buffer sizes for + * newly created TCP sockets. */ u_long tcp_sendspace = 1024*32; SYSCTL_ULONG(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace, CTLFLAG_RW, - &tcp_sendspace , 0, "Maximum outgoing TCP datagram size"); + &tcp_sendspace , 0, "Initial send socket buffer size"); u_long tcp_recvspace = 1024*64; SYSCTL_ULONG(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_RW, - &tcp_recvspace , 0, "Maximum incoming TCP datagram size"); + &tcp_recvspace , 0, "Initial receive socket buffer size"); /* * Attach TCP protocol to socket, allocating From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 14:11:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2A24106566C; Sun, 16 Oct 2011 14:11:05 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D23318FC08; Sun, 16 Oct 2011 14:11:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GEB5Ze065667; Sun, 16 Oct 2011 14:11:05 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GEB5TW065665; Sun, 16 Oct 2011 14:11:05 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201110161411.p9GEB5TW065665@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 16 Oct 2011 14:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226434 - head/usr.bin/elfdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 14:11:06 -0000 Author: marcel Date: Sun Oct 16 14:11:05 2011 New Revision: 226434 URL: http://svn.freebsd.org/changeset/base/226434 Log: o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE. o In elf_get_byte(), cast through uint8_t and not char to avoid sign extension. Modified: head/usr.bin/elfdump/elfdump.c Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Sun Oct 16 13:54:46 2011 (r226433) +++ head/usr.bin/elfdump/elfdump.c Sun Oct 16 14:11:05 2011 (r226434) @@ -282,11 +282,12 @@ const char *ei_data[] = { "ELFDATANONE", "ELFDATA2LSB", "ELFDATA2MSB" }; -const char *ei_abis[] = { +const char *ei_abis[256] = { "ELFOSABI_SYSV", "ELFOSABI_HPUX", "ELFOSABI_NETBSD", "ELFOSABI_LINUX", - "ELFOSABI_HURD", "ELFOSABI_86OPEN", "ELFOSABI_SOLARIS", - "ELFOSABI_MONTEREY", "ELFOSABI_IRIX", "ELFOSABI_FREEBSD", - "ELFOSABI_TRU64", "ELFOSABI_MODESTO", "ELFOSABI_OPENBSD" + "ELFOSABI_HURD", "ELFOSABI_86OPEN", "ELFOSABI_SOLARIS", "ELFOSABI_AIX", + "ELFOSABI_IRIX", "ELFOSABI_FREEBSD", "ELFOSABI_TRU64", + "ELFOSABI_MODESTO", "ELFOSABI_OPENBSD", + [255] = "ELFOSABI_STANDALONE" }; const char *p_types[] = { @@ -931,10 +932,10 @@ elf_get_byte(Elf32_Ehdr *e, void *base, val = 0; switch (e->e_ident[EI_CLASS]) { case ELFCLASS32: - val = ((char *)base)[elf32_offsets[member]]; + val = ((uint8_t *)base)[elf32_offsets[member]]; break; case ELFCLASS64: - val = ((char *)base)[elf64_offsets[member]]; + val = ((uint8_t *)base)[elf64_offsets[member]]; break; case ELFCLASSNONE: errx(1, "invalid class"); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 14:16:46 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F71D1065670; Sun, 16 Oct 2011 14:16:46 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3988FC0A; Sun, 16 Oct 2011 14:16:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GEGkwJ065868; Sun, 16 Oct 2011 14:16:46 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GEGkoC065866; Sun, 16 Oct 2011 14:16:46 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201110161416.p9GEGkoC065866@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 16 Oct 2011 14:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226435 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 14:16:46 -0000 Author: marcel Date: Sun Oct 16 14:16:46 2011 New Revision: 226435 URL: http://svn.freebsd.org/changeset/base/226435 Log: Fix double vision syndrome (read: double output) when in the debugger without a panic. Modified: head/sys/kern/subr_prf.c Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Sun Oct 16 14:11:05 2011 (r226434) +++ head/sys/kern/subr_prf.c Sun Oct 16 14:16:46 2011 (r226435) @@ -467,25 +467,19 @@ putchar(int c, void *arg) struct putchar_arg *ap = (struct putchar_arg*) arg; struct tty *tp = ap->tty; int flags = ap->flags; - int putbuf_done = 0; /* Don't use the tty code after a panic or while in ddb. */ if (kdb_active) { if (c != '\0') cnputc(c); - } else { - if ((panicstr == NULL) && (flags & TOTTY) && (tp != NULL)) - tty_putchar(tp, c); - - if (flags & TOCONS) { - putbuf(c, ap); - putbuf_done = 1; - } - } - if ((flags & TOLOG) && (putbuf_done == 0)) { - if (c != '\0') - putbuf(c, ap); + return; } + + if ((flags & TOTTY) && tp != NULL && panicstr == NULL) + tty_putchar(tp, c); + + if ((flags & (TOCONS | TOLOG)) && c != '\0') + putbuf(c, ap); } /* From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 14:30:29 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A8B106566B; Sun, 16 Oct 2011 14:30:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B07418FC13; Sun, 16 Oct 2011 14:30:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GEUTVs066371; Sun, 16 Oct 2011 14:30:29 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GEUTFj066335; Sun, 16 Oct 2011 14:30:29 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201110161430.p9GEUTFj066335@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Oct 2011 14:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226436 - in head: . gnu/usr.bin/binutils/objcopy gnu/usr.bin/binutils/strip lib/libc/gen lib/libelf lib/libipsec lib/libpmc lib/msun/man libexec/rtld-elf/amd64 libexec/rtld-elf/i386 sb... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 14:30:29 -0000 Author: eadler (ports committer) Date: Sun Oct 16 14:30:28 2011 New Revision: 226436 URL: http://svn.freebsd.org/changeset/base/226436 Log: - change "is is" to "is" or "it is" - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days Modified: head/UPDATING head/gnu/usr.bin/binutils/objcopy/objcopy.1 head/gnu/usr.bin/binutils/strip/strip.1 head/lib/libc/gen/getutxent.3 head/lib/libelf/elf_update.3 head/lib/libipsec/ipsec_strerror.3 head/lib/libpmc/pmc.core.3 head/lib/msun/man/ieee.3 head/libexec/rtld-elf/amd64/rtld_start.S head/libexec/rtld-elf/i386/rtld_start.S head/sbin/geom/class/part/gpart.8 head/sbin/init/init.8 head/secure/lib/libcrypto/man/engine.3 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/dgst.1 head/share/doc/psd/03.iosys/iosys head/share/doc/psd/23.rpc/rpc.prog.ms head/share/doc/psd/24.xdr/xdr.nts.ms head/share/doc/psd/27.nfsrpc/nfs.rfc.ms head/share/man/man4/dc.4 head/share/man/man9/sleepqueue.9 head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh head/sys/dev/ath/ath_dfs/null/dfs_null.c head/sys/dev/bxe/bxe_link.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/isp/DriverManual.txt head/sys/dev/vxge/include/vxgehal-config.h head/sys/dev/vxge/include/vxgehal-ll.h head/sys/dev/vxge/vxgehal/vxgehal-ring.c head/sys/mips/nlm/cms.c head/sys/netinet/ipfw/dummynet.txt head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig head/usr.bin/compress/doc/NOTES head/usr.sbin/pkg_install/lib/version.c head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Oct 16 14:16:46 2011 (r226435) +++ head/UPDATING Sun Oct 16 14:30:28 2011 (r226436) @@ -462,7 +462,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 There's one kernel module for each firmware. Adding "device iwnfw" to the kernel configuration file means including all three firmware images inside the kernel. If you want to include just the one for - your wireless card, use the the devices iwn4965fw, iwn5000fw or + your wireless card, use the devices iwn4965fw, iwn5000fw or iwn5150fw. 20090926: Modified: head/gnu/usr.bin/binutils/objcopy/objcopy.1 ============================================================================== --- head/gnu/usr.bin/binutils/objcopy/objcopy.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/gnu/usr.bin/binutils/objcopy/objcopy.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -738,8 +738,8 @@ distribution and the second a debugging needed if debugging abilities are required. The suggested procedure to create these files is as follows: .RS 4 -.IP "1." 4 -.IX Item "1." +.IP "1." 4 +.IX Item "1." \&\f(CW\*(C`foo\*(C'\fR then... .ie n .IP "1." 4 .el .IP "1." 4 Modified: head/gnu/usr.bin/binutils/strip/strip.1 ============================================================================== --- head/gnu/usr.bin/binutils/strip/strip.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/gnu/usr.bin/binutils/strip/strip.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -300,8 +300,8 @@ distribution and the second a debugging needed if debugging abilities are required. The suggested procedure to create these files is as follows: .RS 4 -.IP "1." 4 -.IX Item "1." +.IP "1." 4 +.IX Item "1." \&\f(CW\*(C`foo\*(C'\fR then... .ie n .IP "1." 4 .el .IP "1." 4 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libc/gen/getutxent.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -243,7 +243,7 @@ or .Dv LOGIN_PROCESS and whose .Fa ut_line -is equal to the the same field in +is equal to the same field in .Fa line . .Pp The Modified: head/lib/libelf/elf_update.3 ============================================================================== --- head/lib/libelf/elf_update.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libelf/elf_update.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -66,7 +66,7 @@ responsibility for the layout of the ELF If this flag is not set, the ELF library will compute the layout of the file from its associated section descriptors. .Pp -It is the application's responsibility to manage the the following +It is the application's responsibility to manage the following structure members in the ELF file: .Bl -tag -width indent .It "Executable Header" Modified: head/lib/libipsec/ipsec_strerror.3 ============================================================================== --- head/lib/libipsec/ipsec_strerror.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libipsec/ipsec_strerror.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -63,7 +63,7 @@ as an underlying function, calling .Xr strerror 3 after .Fn ipsec_strerror -would overwrite the the return value from +would overwrite the return value from .Fn ipsec_strerror and make it invalid. .\" Modified: head/lib/libpmc/pmc.core.3 ============================================================================== --- head/lib/libpmc/pmc.core.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libpmc/pmc.core.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -459,7 +459,7 @@ The number of instruction fetch misses i streaming buffers. .It Li ICache_Reads .Pq Event 80H , Umask 00H -The number of instruction fetches from the the instruction cache and +The number of instruction fetches from the instruction cache and streaming buffers counting both cacheable and un-cacheable fetches. .It Li IFU_Mem_Stall .Pq Event 86H , Umask 00H Modified: head/lib/msun/man/ieee.3 ============================================================================== --- head/lib/msun/man/ieee.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/msun/man/ieee.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -183,7 +183,7 @@ Type name: .Bd -ragged -offset indent -compact On some architectures, .Vt long double -is the the same as +is the same as .Vt double . .Ed .Pp Modified: head/libexec/rtld-elf/amd64/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_start.S Sun Oct 16 14:16:46 2011 (r226435) +++ head/libexec/rtld-elf/amd64/rtld_start.S Sun Oct 16 14:30:28 2011 (r226436) @@ -56,7 +56,7 @@ * and (2) "reloff", the byte offset of the appropriate relocation entry * in the PLT relocation table. * - * We are careful to preserve all registers, even the the caller-save + * We are careful to preserve all registers, even the caller-save * registers. That is because this code may be invoked by low-level * assembly-language code that is not ABI-compliant. * Modified: head/libexec/rtld-elf/i386/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/i386/rtld_start.S Sun Oct 16 14:16:46 2011 (r226435) +++ head/libexec/rtld-elf/i386/rtld_start.S Sun Oct 16 14:30:28 2011 (r226436) @@ -63,7 +63,7 @@ * and (2) "reloff", the byte offset of the appropriate relocation entry * in the PLT relocation table. * - * We are careful to preserve all registers, even the the caller-save + * We are careful to preserve all registers, even the caller-save * registers. That is because this code may be invoked by low-level * assembly-language code that is not ABI-compliant. */ Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Sun Oct 16 14:16:46 2011 (r226435) +++ head/sbin/geom/class/part/gpart.8 Sun Oct 16 14:30:28 2011 (r226436) @@ -371,7 +371,7 @@ Modify a partition from geom and further identified by the .Fl i Ar index option. -Only the the type and/or label of the partition can be modified. +Only the type and/or label of the partition can be modified. To change the type of a partition, specify the new type with the .Fl t Ar type option. Modified: head/sbin/init/init.8 ============================================================================== --- head/sbin/init/init.8 Sun Oct 16 14:16:46 2011 (r226435) +++ head/sbin/init/init.8 Sun Oct 16 14:30:28 2011 (r226436) @@ -147,7 +147,7 @@ When this shell dies, either because the user logged out or an abnormal termination occurred (a signal), .Nm login -records the logout in the the user accounting +records the logout in the user accounting database (see .Xr getutxent 3) and terminates. Modified: head/secure/lib/libcrypto/man/engine.3 ============================================================================== --- head/secure/lib/libcrypto/man/engine.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/secure/lib/libcrypto/man/engine.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -653,7 +653,7 @@ implemented by ENGINEs should be numbere this symbol is considered a \*(L"generic\*(R" command is handled directly by the OpenSSL core routines. .PP -It is using these \*(L"core\*(R" control commands that one can discover the the control +It is using these \*(L"core\*(R" control commands that one can discover the control commands implemented by a given \s-1ENGINE\s0, specifically the commands; .PP .Vb 9 Modified: head/secure/usr.bin/openssl/man/ca.1 ============================================================================== --- head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -205,7 +205,7 @@ section for information on the required .IP "\fB\-infiles\fR" 4 .IX Item "-infiles" if present this should be the last option, all subsequent arguments -are assumed to the the names of files containing certificate requests. +are assumed to the names of files containing certificate requests. .IP "\fB\-out filename\fR" 4 .IX Item "-out filename" the output file to output certificates to. The default is standard Modified: head/secure/usr.bin/openssl/man/dgst.1 ============================================================================== --- head/secure/usr.bin/openssl/man/dgst.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/secure/usr.bin/openssl/man/dgst.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -184,7 +184,7 @@ the private key password source. For mor see the \fB\s-1PASS\s0 \s-1PHRASE\s0 \s-1ARGUMENTS\s0\fR section in \fIopenssl\fR\|(1). .IP "\fB\-verify filename\fR" 4 .IX Item "-verify filename" -verify the signature using the the public key in \*(L"filename\*(R". +verify the signature using the public key in \*(L"filename\*(R". The output is either \*(L"Verification \s-1OK\s0\*(R" or \*(L"Verification Failure\*(R". .IP "\fB\-prverify filename\fR" 4 .IX Item "-prverify filename" Modified: head/share/doc/psd/03.iosys/iosys ============================================================================== --- head/share/doc/psd/03.iosys/iosys Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/03.iosys/iosys Sun Oct 16 14:30:28 2011 (r226436) @@ -813,7 +813,7 @@ which have a separate argument which indicates read or write. .IP B_DONE 10 This bit is set -to 0 when a block is handed to the the device strategy +to 0 when a block is handed to the device strategy routine and is turned on when the operation completes, whether normally as the result of an error. It is also used as part of the return argument of Modified: head/share/doc/psd/23.rpc/rpc.prog.ms ============================================================================== --- head/share/doc/psd/23.rpc/rpc.prog.ms Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/23.rpc/rpc.prog.ms Sun Oct 16 14:30:28 2011 (r226436) @@ -317,7 +317,7 @@ look up the appropriate program, version in a manual, just as you look up the name of a memory allocator when you want to allocate memory. .LP -The simplest way of making remote procedure calls is with the the RPC +The simplest way of making remote procedure calls is with the RPC library routine .I callrpc() It has eight parameters. The first is the name of the remote server @@ -1105,7 +1105,7 @@ Note that, after being used, the charact .I svc_freeargs() .I svc_freeargs() will not attempt to free any memory if the variable indicating it -is NULL. For example, in the the routine +is NULL. For example, in the routine .I xdr_finalexample (), given earlier, if .I finalp->string Modified: head/share/doc/psd/24.xdr/xdr.nts.ms ============================================================================== --- head/share/doc/psd/24.xdr/xdr.nts.ms Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/24.xdr/xdr.nts.ms Sun Oct 16 14:30:28 2011 (r226436) @@ -721,7 +721,7 @@ it must not exceed .I maxlength . Next .I sp -is dereferenced; if the the value is +is dereferenced; if the value is .I NULL , then a string of the appropriate length is allocated and .I *sp Modified: head/share/doc/psd/27.nfsrpc/nfs.rfc.ms ============================================================================== --- head/share/doc/psd/27.nfsrpc/nfs.rfc.ms Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/27.nfsrpc/nfs.rfc.ms Sun Oct 16 14:30:28 2011 (r226436) @@ -961,7 +961,7 @@ call to get more entries starting at a given point in the directory. The special cookie zero (all bits zero) can be used to get the entries starting at the beginning of the directory. The "fileid" field should be the same number as the -"fileid" in the the attributes of the file. (See the +"fileid" in the attributes of the file. (See the .I "Basic Data Types" section.) The "eof" flag has a value of Modified: head/share/man/man4/dc.4 ============================================================================== --- head/share/man/man4/dc.4 Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/man/man4/dc.4 Sun Oct 16 14:30:28 2011 (r226436) @@ -55,7 +55,7 @@ if_dc_load="YES" The .Nm driver provides support for several PCI Fast Ethernet adapters and -embedded controllers based on the the DEC/Intel 21143 chipset and clones. +embedded controllers based on the DEC/Intel 21143 chipset and clones. .Pp All of supported chipsets have the same general register layout, DMA descriptor format and method of operation. Modified: head/share/man/man9/sleepqueue.9 ============================================================================== --- head/share/man/man9/sleepqueue.9 Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/man/man9/sleepqueue.9 Sun Oct 16 14:30:28 2011 (r226436) @@ -351,7 +351,7 @@ argument specifies the thread to awaken argument specifies the wait channel to awaken it from. If the thread .Fa td -is not blocked on the the wait channel +is not blocked on the wait channel .Fa wchan then this function will not do anything, even if the thread is asleep on a different wait channel. Modified: head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh Sun Oct 16 14:30:28 2011 (r226436) @@ -29,7 +29,7 @@ hmkdir ppc hattrib -b ppc hcd ppc -# Make two dummy files for the the CHRP boot script and boot1 +# Make two dummy files for the CHRP boot script and boot1 echo 'Bootinfo START' | dd of=bootinfo.txt.tmp cbs=$CHRPBOOT_SIZE count=1 conv=block echo 'Boot1 START' | dd of=boot1.elf.tmp cbs=$BOOT1_SIZE count=1 conv=block Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c ============================================================================== --- head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Oct 16 14:30:28 2011 (r226436) @@ -128,7 +128,7 @@ ath_dfs_process_radar_event(struct ath_s } /* - * Determine whether the the DFS check task needs to be queued. + * Determine whether the DFS check task needs to be queued. * * This is called in the RX task when the current batch of packets * have been received. It will return whether there are any radar Modified: head/sys/dev/bxe/bxe_link.c ============================================================================== --- head/sys/dev/bxe/bxe_link.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/bxe/bxe_link.c Sun Oct 16 14:30:28 2011 (r226436) @@ -2586,7 +2586,7 @@ bxe_8726_read_sfp_module_eeprom(struct l if (byte_cnt > 16) { DBPRINT(sc, BXE_VERBOSE_PHY, - "Reading from eeprom is is limited to 0xf\n"); + "Reading from eeprom is limited to 0xf\n"); return (-EINVAL); } /* Set the read command byte count. */ @@ -2655,7 +2655,7 @@ bxe_8727_read_sfp_module_eeprom(struct l if (byte_cnt > 16) { DBPRINT(sc, BXE_VERBOSE_PHY, - "Reading from eeprom is is limited to 0xf\n"); + "Reading from eeprom is limited to 0xf\n"); return (-EINVAL); } Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/e1000/e1000_82575.c Sun Oct 16 14:30:28 2011 (r226436) @@ -1983,7 +1983,7 @@ out: * e1000_reset_mdicnfg_82580 - Reset MDICNFG destination and com_mdio bits * @hw: pointer to the HW structure * - * This resets the the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on + * This resets the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on * the values found in the EEPROM. This addresses an issue in which these * bits are not restored from EEPROM after reset. **/ Modified: head/sys/dev/isp/DriverManual.txt ============================================================================== --- head/sys/dev/isp/DriverManual.txt Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/isp/DriverManual.txt Sun Oct 16 14:30:28 2011 (r226436) @@ -165,7 +165,7 @@ and saves the QLogic HBA from having to The QLogic HBA is an interrupting card, and when servicing an interrupt you really only have to check for either a mailbox interrupt or an -interrupt notification that the the response queue has an entry to +interrupt notification that the response queue has an entry to be dequeued. 4.3 Fibre Channel SCSI out of SCSI @@ -327,7 +327,7 @@ here in clarifying some of this. A succesful execution of isp_init will lead to the driver 'registering' itself with this platform's SCSI subsystem. One assumed action for this -is the registry of a function the the SCSI subsystem for this platform +is the registry of a function the SCSI subsystem for this platform will call when it has a SCSI command to run. The platform specific module function that receives this will do whatever Modified: head/sys/dev/vxge/include/vxgehal-config.h ============================================================================== --- head/sys/dev/vxge/include/vxgehal-config.h Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/vxge/include/vxgehal-config.h Sun Oct 16 14:30:28 2011 (r226436) @@ -1665,7 +1665,7 @@ typedef struct vxge_hal_mrpcim_config_t * the interrupt is triggered. * @rtimer_event_sf: Restriction Timer Event Scale Factor. A scale factor that * is to be applied to the current event count before it is added - * to the restriction timer value when the the restriction timer + * to the restriction timer value when the restriction timer * is started. * The scale factor is applied as a right or left shift to multiply * or divide by the event count. The programmable values are as Modified: head/sys/dev/vxge/include/vxgehal-ll.h ============================================================================== --- head/sys/dev/vxge/include/vxgehal-ll.h Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/vxge/include/vxgehal-ll.h Sun Oct 16 14:30:28 2011 (r226436) @@ -1590,7 +1590,7 @@ vxge_hal_ring_rxd_post( * vxge_hal_ring_is_next_rxd_completed - Check if the next rxd is completed * @vpath_handle: Virtual Path handle. * - * Checks if the the _next_ completed descriptor is in host memory + * Checks if the _next_ completed descriptor is in host memory * * Returns: VXGE_HAL_OK - success. * VXGE_HAL_INF_NO_MORE_COMPLETED_DESCRIPTORS - No completed descriptors Modified: head/sys/dev/vxge/vxgehal/vxgehal-ring.c ============================================================================== --- head/sys/dev/vxge/vxgehal/vxgehal-ring.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/vxge/vxgehal/vxgehal-ring.c Sun Oct 16 14:30:28 2011 (r226436) @@ -1339,7 +1339,7 @@ vxge_hal_ring_rxd_post_post_db( * vxge_hal_ring_is_next_rxd_completed - Check if the next rxd is completed * @vpath_handle: Virtual Path handle. * - * Checks if the the _next_ completed descriptor is in host memory + * Checks if the _next_ completed descriptor is in host memory * * Returns: VXGE_HAL_OK - success. * VXGE_HAL_INF_NO_MORE_COMPLETED_DESCRIPTORS - No completed descriptors Modified: head/sys/mips/nlm/cms.c ============================================================================== --- head/sys/mips/nlm/cms.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/mips/nlm/cms.c Sun Oct 16 14:30:28 2011 (r226436) @@ -82,7 +82,7 @@ static struct msgring_thread msgring_thr static struct proc *msgring_proc; /* all threads are under a proc */ /* - * The device drivers can register a handler for the the messages sent + * The device drivers can register a handler for the messages sent * from a station (corresponding to the device). */ struct tx_stn_handler { Modified: head/sys/netinet/ipfw/dummynet.txt ============================================================================== --- head/sys/netinet/ipfw/dummynet.txt Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/netinet/ipfw/dummynet.txt Sun Oct 16 14:30:28 2011 (r226436) @@ -325,7 +325,7 @@ we do the following: dummynet_task() =============== -The dummynet_task() is the the main dummynet processing function and is +The dummynet_task() is the main dummynet processing function and is called every tick. This function first calculate the new current time, then it checks if it is the time to wake up object from the system_heap comparing the current time and the key of the heap. Two types of object (really the Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig Sun Oct 16 14:30:28 2011 (r226436) @@ -21,7 +21,7 @@ config INFINIBAND_SDP_DEBUG_DATA bool "Sockets Direct Protocol data path debugging" depends on INFINIBAND_SDP_DEBUG ---help--- - This option compiles debugging code into the the data path + This option compiles debugging code into the data path of the SDP driver. The output can be turned on via the data_debug_level module parameter; however, even with output turned off, this debugging code will have some performance Modified: head/usr.bin/compress/doc/NOTES ============================================================================== --- head/usr.bin/compress/doc/NOTES Sun Oct 16 14:16:46 2011 (r226435) +++ head/usr.bin/compress/doc/NOTES Sun Oct 16 14:30:28 2011 (r226436) @@ -51,7 +51,7 @@ comprehensive survey of an area which wi Until the dust clears, how you approach ideas which are patented depends on how paranoid you are of a legal onslaught. Arbitrary? Yes. But -the patent bar the the CCPA (Court of Customs and Patent Appeals) +the patent bar the CCPA (Court of Customs and Patent Appeals) thanks you for any uncertainty as they, at least, stand to gain from any trouble. Modified: head/usr.sbin/pkg_install/lib/version.c ============================================================================== --- head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:30:28 2011 (r226436) @@ -66,7 +66,7 @@ split_version(const char *pkgname, const if (pkgname == NULL) errx(2, "%s: Passed NULL pkgname.", __func__); - /* Look for the last '-' the the pkgname */ + /* Look for the last '-' the pkgname */ ch = strrchr(pkgname, '-'); /* Cheat if we are just passed a version, not a valid package name */ versionstr = ch ? ch + 1 : pkgname; Modified: head/usr.sbin/tcpdump/tcpdump/tcpdump.1 ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -1413,11 +1413,11 @@ not be useful to people who are not fami AFS and RX. .LP If the -v (verbose) flag is given twice, acknowledgement packets and -additional header information is printed, such as the the RX call ID, +additional header information is printed, such as the RX call ID, call number, sequence number, serial number, and the RX packet flags. .LP If the -v flag is given twice, additional information is printed, -such as the the RX call ID, serial number, and the RX packet flags. +such as the RX call ID, serial number, and the RX packet flags. The MTU negotiation information is also printed from RX ack packets. .LP If the -v flag is given three times, the security index and service id From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 15:08:44 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA0C106566B; Sun, 16 Oct 2011 15:08:44 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DDEF8FC0C; Sun, 16 Oct 2011 15:08:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GF8icB067655; Sun, 16 Oct 2011 15:08:44 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GF8hIc067651; Sun, 16 Oct 2011 15:08:43 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110161508.p9GF8hIc067651@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 15:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226437 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 15:08:44 -0000 Author: andre Date: Sun Oct 16 15:08:43 2011 New Revision: 226437 URL: http://svn.freebsd.org/changeset/base/226437 Log: VNET virtualize tcp_sendspace/tcp_recvspace and change the type to INT. A long is not necessary as the TCP window is limited to 2**30. A larger initial window isn't useful. MFC after: 1 week Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Oct 16 14:30:28 2011 (r226436) +++ head/sys/netinet/tcp_input.c Sun Oct 16 15:08:43 2011 (r226437) @@ -3517,7 +3517,7 @@ tcp_mss(struct tcpcb *tp, int offer) */ so = inp->inp_socket; SOCKBUF_LOCK(&so->so_snd); - if ((so->so_snd.sb_hiwat == tcp_sendspace) && metrics.rmx_sendpipe) + if ((so->so_snd.sb_hiwat == V_tcp_sendspace) && metrics.rmx_sendpipe) bufsize = metrics.rmx_sendpipe; else bufsize = so->so_snd.sb_hiwat; @@ -3534,7 +3534,7 @@ tcp_mss(struct tcpcb *tp, int offer) tp->t_maxseg = mss; SOCKBUF_LOCK(&so->so_rcv); - if ((so->so_rcv.sb_hiwat == tcp_recvspace) && metrics.rmx_recvpipe) + if ((so->so_rcv.sb_hiwat == V_tcp_recvspace) && metrics.rmx_recvpipe) bufsize = metrics.rmx_recvpipe; else bufsize = so->so_rcv.sb_hiwat; Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sun Oct 16 14:30:28 2011 (r226436) +++ head/sys/netinet/tcp_usrreq.c Sun Oct 16 15:08:43 2011 (r226437) @@ -1501,12 +1501,15 @@ tcp_ctloutput(struct socket *so, struct * Set the initial send and receive socket buffer sizes for * newly created TCP sockets. */ -u_long tcp_sendspace = 1024*32; -SYSCTL_ULONG(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace, CTLFLAG_RW, - &tcp_sendspace , 0, "Initial send socket buffer size"); -u_long tcp_recvspace = 1024*64; -SYSCTL_ULONG(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_RW, - &tcp_recvspace , 0, "Initial receive socket buffer size"); +VNET_DEFINE(int, tcp_sendspace) = 1024*32; +#define V_tcp_sendspace VNET(tcp_sendspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_SENDSPACE, tcp_sendspace, CTLFLAG_RW, + &VNET_NAME(tcp_sendspace), 0, "Initial send socket buffer size"); + +VNET_DEFINE(int, tcp_recvspace) = 1024*64 +#define V_tcp_recvspace VNET(tcp_recvspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, + &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); /* * Attach TCP protocol to socket, allocating @@ -1521,7 +1524,7 @@ tcp_attach(struct socket *so) int error; if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) { - error = soreserve(so, tcp_sendspace, tcp_recvspace); + error = soreserve(so, V_tcp_sendspace, V_tcp_recvspace); if (error) return (error); } Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Oct 16 14:30:28 2011 (r226436) +++ head/sys/netinet/tcp_var.h Sun Oct 16 15:08:43 2011 (r226437) @@ -606,6 +606,8 @@ VNET_DECLARE(int, tcp_mssdflt); /* XXX * VNET_DECLARE(int, tcp_minmss); VNET_DECLARE(int, tcp_delack_enabled); VNET_DECLARE(int, tcp_do_rfc3390); +VNET_DECLARE(int, tcp_sendspace); +VNET_DECLARE(int, tcp_recvspace); VNET_DECLARE(int, path_mtu_discovery); VNET_DECLARE(int, ss_fltsz); VNET_DECLARE(int, ss_fltsz_local); @@ -618,6 +620,8 @@ VNET_DECLARE(int, tcp_abc_l_var); #define V_tcp_minmss VNET(tcp_minmss) #define V_tcp_delack_enabled VNET(tcp_delack_enabled) #define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) +#define V_tcp_sendspace VNET(tcp_sendspace) +#define V_tcp_recvspace VNET(tcp_recvspace) #define V_path_mtu_discovery VNET(path_mtu_discovery) #define V_ss_fltsz VNET(ss_fltsz) #define V_ss_fltsz_local VNET(ss_fltsz_local) @@ -716,8 +720,6 @@ void tcp_hc_updatemtu(struct in_conninf void tcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *); extern struct pr_usrreqs tcp_usrreqs; -extern u_long tcp_sendspace; -extern u_long tcp_recvspace; tcp_seq tcp_new_isn(struct tcpcb *); void tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 16:02:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19CE71065673; Sun, 16 Oct 2011 16:02:08 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id BDF8A8FC08; Sun, 16 Oct 2011 16:02:07 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 50089850; Sun, 16 Oct 2011 17:46:56 +0200 (CEST) Date: Sun, 16 Oct 2011 17:46:12 +0200 From: Pawel Jakub Dawidek To: Christian Brueffer Message-ID: <20111016154611.GA1832@garage.freebsd.pl> References: <201110151557.p9FFvuuc020536@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <201110151557.p9FFvuuc020536@svn.freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226398 - head/sys/dev/iicbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 16:02:08 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 15, 2011 at 03:57:56PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Sat Oct 15 15:57:55 2011 > New Revision: 226398 > URL: http://svn.freebsd.org/changeset/base/226398 >=20 > Log: > Properly free resources in an error case. > =20 > CID: 4203 > Found with: Coverity Prevent(tm) > MFC after: 1 week >=20 > Modified: > head/sys/dev/iicbus/iic.c >=20 > Modified: head/sys/dev/iicbus/iic.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/iicbus/iic.c Sat Oct 15 15:21:33 2011 (r226397) > +++ head/sys/dev/iicbus/iic.c Sat Oct 15 15:57:55 2011 (r226398) > @@ -348,8 +348,10 @@ iicioctl(struct cdev *dev, u_long cmd, c > buf =3D malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); > usrbufs =3D malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITO= K); > error =3D copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); > - if (error) > + if (error) { > + free(usrbufs, M_TEMP); > break; > + } I think that better fix is to move usrbufs allocation after copyin(), as usrbufs is not used there. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --/04w6evG8XlLl3ft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6a/EMACgkQForvXbEpPzRoewCgiEM/YOUQpHgZyfj3G/SJ7nnc nW0AoL/Ec8dM5QzJW6NMFxgwfyM/QgCW =X6L5 -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 16:05:24 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5681B106564A; Sun, 16 Oct 2011 16:05:24 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CC6F8FC13; Sun, 16 Oct 2011 16:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GG5NPd069706; Sun, 16 Oct 2011 16:05:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GG5Npt069704; Sun, 16 Oct 2011 16:05:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110161605.p9GG5Npt069704@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 16 Oct 2011 16:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226439 - head/usr.sbin/kbdmap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 16:05:24 -0000 Author: nwhitehorn Date: Sun Oct 16 16:05:23 2011 New Revision: 226439 URL: http://svn.freebsd.org/changeset/base/226439 Log: Place quotes around the output of kbdmap(1), designed to be pasted into /etc/rc.conf. PR: bin/161711 Submitted by: manolis MFC after: 1 week Modified: head/usr.sbin/kbdmap/kbdmap.c Modified: head/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- head/usr.sbin/kbdmap/kbdmap.c Sun Oct 16 15:55:23 2011 (r226438) +++ head/usr.sbin/kbdmap/kbdmap.c Sun Oct 16 16:05:23 2011 (r226439) @@ -289,7 +289,7 @@ do_kbdcontrol(struct keymap *km) if (!x11) system(kbd_cmd); - fprintf(stderr, "keymap=%s\n", km->keym); + fprintf(stderr, "keymap=\"%s\"\n", km->keym); free(kbd_cmd); } From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 16:58:29 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28D381065670; Sun, 16 Oct 2011 16:58:29 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 184A18FC0C; Sun, 16 Oct 2011 16:58:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GGwS7K071396; Sun, 16 Oct 2011 16:58:28 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GGwSuL071394; Sun, 16 Oct 2011 16:58:28 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201110161658.p9GGwSuL071394@svn.freebsd.org> From: Olivier Houchard Date: Sun, 16 Oct 2011 16:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226440 - head/sbin/atm/atmconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 16:58:29 -0000 Author: cognet Date: Sun Oct 16 16:58:28 2011 New Revision: 226440 URL: http://svn.freebsd.org/changeset/base/226440 Log: Unbreak NO_DYNAMICROOT by explicitely linking to libcrypto if MK_OPENSSL isn't set to no, as libbsnmp needs it. Modified: head/sbin/atm/atmconfig/Makefile Modified: head/sbin/atm/atmconfig/Makefile ============================================================================== --- head/sbin/atm/atmconfig/Makefile Sun Oct 16 16:05:23 2011 (r226439) +++ head/sbin/atm/atmconfig/Makefile Sun Oct 16 16:58:28 2011 (r226440) @@ -5,6 +5,8 @@ # # $FreeBSD$ +.include + PROG= atmconfig .ifndef RESCUE SRCS= ${.OBJDIR}/oid.h @@ -21,6 +23,9 @@ CFLAGS+= -I${.OBJDIR} .ifndef RESCUE DPADD= ${LIBBSNMP} LDADD= -lbsnmp +. if ${MK_DYNAMICROOT} == "no" && ${MK_OPENSSL} != "no" +LDADD+= -lcrypto +. endif .endif .ifndef RESCUE From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 17:09:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 767D5106566B; Sun, 16 Oct 2011 17:09:58 +0000 (UTC) (envelope-from SRS0=Y50X=47=FreeBSD.org=brueffer@srs.kundenserver.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 06E048FC14; Sun, 16 Oct 2011 17:09:57 +0000 (UTC) Received: from hd5b90bea.sedadby.dyn.perspektivbredband.net (hd5b90bea.sedadby.dyn.perspektivbredband.net [213.185.11.234]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0Mccy4-1RX9Or03DE-00Hgdn; Sun, 16 Oct 2011 18:57:21 +0200 Message-ID: <4E9B0CEE.7000809@FreeBSD.org> Date: Sun, 16 Oct 2011 18:57:18 +0200 From: Christian Brueffer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201110151557.p9FFvuuc020536@svn.freebsd.org> <20111016154611.GA1832@garage.freebsd.pl> In-Reply-To: <20111016154611.GA1832@garage.freebsd.pl> Content-Type: multipart/mixed; boundary="------------040404080201060701070605" X-Provags-ID: V02:K0:6QiO0+ryfkYjRi0WOAvzaXFrvr2kRVFsvjPvoB9TVkE GURb9ARhgH9dqEV7d1pC8/LWKAUCX8MzO6yqXRY+4PAQZLQwpr eBb7as/rgZqzhxogE3MBcXS7DGn+IeOjHaMbjomQdEGrUtBcF9 vC17TScHAA+m3sKOGp3keVbdPgptCJ3Dp0wa06NYFtEKom01v/ 7bY9/vlNRNz2brQsxDug4BNXpLo1ZV/jnci07msLML/ZW+y8LU zYxVWZVoz/RarJWohZyBB1006P6liPD4C/vlxCAxldySmNkoX/ 4xjvAEHfY0FHFQ2iwND1FmBKnAj8aRx70IF2KfNmFyAFDE3/Td dnCNh9DE0XV2V4Y3PnEGsqjAtNE80SMnuWn1fYd0shduTanF0d OPAEohwkg0znGJzuF518ri+N/G3z9TqV8A= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226398 - head/sys/dev/iicbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:09:58 -0000 This is a multi-part message in MIME format. --------------040404080201060701070605 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/16/11 17:46 , Pawel Jakub Dawidek wrote: > On Sat, Oct 15, 2011 at 03:57:56PM +0000, Christian Brueffer wrote: >> Author: brueffer >> Date: Sat Oct 15 15:57:55 2011 >> New Revision: 226398 >> URL: http://svn.freebsd.org/changeset/base/226398 >> >> Log: >> Properly free resources in an error case. >> >> CID: 4203 >> Found with: Coverity Prevent(tm) >> MFC after: 1 week >> >> Modified: >> head/sys/dev/iicbus/iic.c >> >> Modified: head/sys/dev/iicbus/iic.c >> ============================================================================== >> --- head/sys/dev/iicbus/iic.c Sat Oct 15 15:21:33 2011 (r226397) >> +++ head/sys/dev/iicbus/iic.c Sat Oct 15 15:57:55 2011 (r226398) >> @@ -348,8 +348,10 @@ iicioctl(struct cdev *dev, u_long cmd, c >> buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); >> usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); >> error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); >> - if (error) >> + if (error) { >> + free(usrbufs, M_TEMP); >> break; >> + } > > I think that better fix is to move usrbufs allocation after copyin(), as > usrbufs is not used there. > Agreed, how about the attached patch? --------------040404080201060701070605 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="iic.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="iic.c.diff" Index: iic.c =================================================================== --- iic.c (revision 226398) +++ iic.c (working copy) @@ -346,13 +346,11 @@ case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - if (error) { - free(usrbufs, M_TEMP); + if (error) break; - } /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; --------------040404080201060701070605-- From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 17:21:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813B11065673; Sun, 16 Oct 2011 17:21:16 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 2925D8FC0A; Sun, 16 Oct 2011 17:21:15 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 8580F896; Sun, 16 Oct 2011 19:21:13 +0200 (CEST) Date: Sun, 16 Oct 2011 19:20:28 +0200 From: Pawel Jakub Dawidek To: Christian Brueffer Message-ID: <20111016172028.GB1832@garage.freebsd.pl> References: <201110151557.p9FFvuuc020536@svn.freebsd.org> <20111016154611.GA1832@garage.freebsd.pl> <4E9B0CEE.7000809@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG" Content-Disposition: inline In-Reply-To: <4E9B0CEE.7000809@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226398 - head/sys/dev/iicbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:21:16 -0000 --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 16, 2011 at 06:57:18PM +0200, Christian Brueffer wrote: > > I think that better fix is to move usrbufs allocation after copyin(), as > > usrbufs is not used there. > > >=20 > Agreed, how about the attached patch? Looks good. > Index: iic.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- iic.c (revision 226398) > +++ iic.c (working copy) > @@ -346,13 +346,11 @@ > =20 > case I2CRDWR: > buf =3D malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); > - usrbufs =3D malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITO= K); > error =3D copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); > - if (error) { > - free(usrbufs, M_TEMP); > + if (error) > break; > - } > /* Alloc kernel buffers for userland data, copyin write data */ > + usrbufs =3D malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITO= K); > for (i =3D 0; i < d->nmsgs; i++) { > m =3D &((struct iic_msg *)buf)[i]; > usrbufs[i] =3D m->buf; --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --1UWUbFP1cBYEclgG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6bElwACgkQForvXbEpPzQRBQCgmeXbugKIMbWQUNpiMxc/C/WK c+0AnjflxBSwg7ugzEnRGK/lfcc/CEei =dpbp -----END PGP SIGNATURE----- --1UWUbFP1cBYEclgG-- From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 17:37:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DF38106566C; Sun, 16 Oct 2011 17:37:55 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DAFE8FC18; Sun, 16 Oct 2011 17:37:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GHbsf6072697; Sun, 16 Oct 2011 17:37:54 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GHbsen072695; Sun, 16 Oct 2011 17:37:54 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201110161737.p9GHbsen072695@svn.freebsd.org> From: Olivier Houchard Date: Sun, 16 Oct 2011 17:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226441 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:37:55 -0000 Author: cognet Date: Sun Oct 16 17:37:54 2011 New Revision: 226441 URL: http://svn.freebsd.org/changeset/base/226441 Log: Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the page has been allocated, or we could end up using random values, and bad things could happen. PR: arm/161492 Submitted by: Ian Lepore MFC after: 1 week Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Oct 16 16:58:28 2011 (r226440) +++ head/sys/arm/arm/machdep.c Sun Oct 16 17:37:54 2011 (r226441) @@ -312,6 +312,8 @@ cpu_startup(void *dummy) m = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_ZERO); pmap_kenter_user(ARM_TP_ADDRESS, VM_PAGE_TO_PHYS(m)); #endif + *(uint32_t *)ARM_RAS_START = 0; + *(uint32_t *)ARM_RAS_END = 0xffffffff; } SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 17:38:20 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF95B1065786; Sun, 16 Oct 2011 17:38:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1928FC0A; Sun, 16 Oct 2011 17:38:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GHcKil072747; Sun, 16 Oct 2011 17:38:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GHcKFk072745; Sun, 16 Oct 2011 17:38:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110161738.p9GHcKFk072745@svn.freebsd.org> From: Christian Brueffer Date: Sun, 16 Oct 2011 17:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226442 - head/sys/dev/iicbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:38:20 -0000 Author: brueffer Date: Sun Oct 16 17:38:20 2011 New Revision: 226442 URL: http://svn.freebsd.org/changeset/base/226442 Log: Revert r226398 and instead move the allocation of usrbufs after the error check. Suggested by: pjd MFC after: 1 week Modified: head/sys/dev/iicbus/iic.c Modified: head/sys/dev/iicbus/iic.c ============================================================================== --- head/sys/dev/iicbus/iic.c Sun Oct 16 17:37:54 2011 (r226441) +++ head/sys/dev/iicbus/iic.c Sun Oct 16 17:38:20 2011 (r226442) @@ -346,13 +346,11 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - if (error) { - free(usrbufs, M_TEMP); + if (error) break; - } /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 17:39:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0717106566C for ; Sun, 16 Oct 2011 17:39:58 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o2.shared.sendgrid.net (o2.shared.sendgrid.net [74.63.235.152]) by mx1.freebsd.org (Postfix) with SMTP id A7C8A8FC0C for ; Sun, 16 Oct 2011 17:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=/2ucajSE+27ftwV1d9J2o3nGWgo=; b=X5IzVz9euvzREKqVSdCxiUIk6e0F pusGmNsRbsY0+R+Ok3CXnWpeL27tvSlBQftRxchgbSPt+zKh+VvMmUgsDWlCywKR j1gOXPyO/hWqY3W+DwdUKkA2dPuHhXR1w9cak2qYSyUsVe6ZL1heyy7Yy76iuSmC n2zJRIkyFomX+f8= Received: by 10.8.49.92 with SMTP id mf40.29427.4E9B12A5B Sun, 16 Oct 2011 12:21:41 -0500 (CDT) Received: from mail.tarsnap.com (unknown [10.9.180.5]) by mi7 (SG) with ESMTP id 4e9b12a5.4d2a.33f4553 for ; Sun, 16 Oct 2011 12:21:41 -0500 (CST) Received: (qmail 55641 invoked from network); 16 Oct 2011 17:19:22 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 16 Oct 2011 17:19:22 -0000 Received: (qmail 77746 invoked from network); 16 Oct 2011 17:21:12 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 16 Oct 2011 17:21:12 -0000 Message-ID: <4E9B1287.4050507@freebsd.org> Date: Sun, 16 Oct 2011 10:21:11 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110914 Thunderbird/6.0.2 MIME-Version: 1.0 To: Ed Schouten References: <201110140724.p9E7OmMB052118@svn.freebsd.org> In-Reply-To: <201110140724.p9E7OmMB052118@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNH1hBSAA8VgH2A4oWYBu6jEX3OBTy0XPwj98l/jaS6r65bO30TDk/lBbqgr/4xdQm1DbKiyA23CzFvY1dRShhPpWYbz3o/IYz0lCnNzfbfif1Wlo5vDC39Z4AnSQMBj654= X-SendGrid-Contentd-ID: {"test_id":1318785701} Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226359 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:39:59 -0000 On 10/14/11 00:24, Ed Schouten wrote: > Log: > Build look(1) with WARNS=6. > > - if (sb.st_size > SIZE_T_MAX) > + if (sb.st_size > (off_t)SIZE_T_MAX) > errx(2, "%s: %s", file, strerror(EFBIG)); This might make look(1) build, but on a 64-bit machine it also makes look(1) fail with "File too large" whenever it's larger than (int64_t)(UINT64_MAX) = -1 bytes long. Please fix. :-) -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 17:59:28 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 810B9106566C; Sun, 16 Oct 2011 17:59:28 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66B248FC0C; Sun, 16 Oct 2011 17:59:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GHxSGx073445; Sun, 16 Oct 2011 17:59:28 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GHxSsC073442; Sun, 16 Oct 2011 17:59:28 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201110161759.p9GHxSsC073442@svn.freebsd.org> From: Olivier Houchard Date: Sun, 16 Oct 2011 17:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226443 - head/sys/arm/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:59:28 -0000 Author: cognet Date: Sun Oct 16 17:59:28 2011 New Revision: 226443 URL: http://svn.freebsd.org/changeset/base/226443 Log: Fix 2 bugs : - A race condition could happen if two threads were using RAS at the same time as the code didn't reset RAS_END, the RAS code could believe we were not in a RAS, when we were in fact. - Using signed value logic to compare addresses wasn't such a good idea. Many thanks to Ian to investigate on these issues. Pointy hat to: cognet PR: arm/161498 Submitted by: Ian Lepore Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F84106564A; Sun, 16 Oct 2011 18:20:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 12D358FC08; Sun, 16 Oct 2011 18:20:34 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 1DE842A28CC5; Sun, 16 Oct 2011 20:20:33 +0200 (CEST) Date: Sun, 16 Oct 2011 20:20:33 +0200 From: Ed Schouten To: Colin Percival Message-ID: <20111016182033.GS91943@hoeg.nl> References: <201110140724.p9E7OmMB052118@svn.freebsd.org> <4E9B1287.4050507@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Taf0VO/VdHaNBIEp" Content-Disposition: inline In-Reply-To: <4E9B1287.4050507@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226359 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 18:20:34 -0000 --Taf0VO/VdHaNBIEp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Colin Percival , 20111016 19:21: > This might make look(1) build, but on a 64-bit machine it also makes > look(1) fail with "File too large" whenever it's larger than > (int64_t)(UINT64_MAX) =3D -1 bytes long. d'oh! Stupid signedness. I casted to off_t explicitly, since we need to do 64-bit comparison, but off_t is signed, while size_t is not. Hmmm... Casting to size_t is not the way to go, but off_t also should be avoided. We can assume st_size is non-negative, so we should do something like this, right? %%% Index: look.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- look.c (revision 226430) +++ look.c (working copy) @@ -134,7 +134,7 @@ do { if ((fd =3D open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) err(2, "%s", file); - if (sb.st_size > (off_t)SIZE_T_MAX) + if ((uintmax_t)sb.st_size > (uintmax_t)SIZE_T_MAX) errx(2, "%s: %s", file, strerror(EFBIG)); if (sb.st_size =3D=3D 0) { close(fd); %%% --=20 Ed Schouten WWW: http://80386.nl/ --Taf0VO/VdHaNBIEp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJOmyBwAAoJEG5e2P40kaK71ekQAITQU+dcxuPCm/xTaEU6CNOP /6C/zxPIpfOakYRb/qqAFMkyIukYVifgxc7FIpQ7+Nq0sgnc8wPB8btW7Daw4669 VOPjeuVfDOQpg+QBncuETRANlDABJd0TyBtNsh0ZWJLwDFfDtZTSt++0yWzmkoJ9 Cqu318bd61oUEyM7Xr8QX8/autANAaiYjbPmOIi4yFUxEA74Wn/ExncqTjdytTvQ vXnpSHJOqUPbD3WEKLOiJEp1AkxTqLgIMovLpITEmlM4x3qLDKebAg3ysTudmrI8 QbXBp2xME5YVRJa/KrBV5gp0I/juvAeoh0+ngr7xH6Gq/+qexxpBrDq+n+WSWZgC rjZhcRzoBk+qedkqq8nVJjkIooKuSAkD/Hrzjon0IKz+odG92miJLRdVBV+5jeZz 2BoRUcUGGAn4OGNigzEhvbmH90dYYbVHPkSyP4xWcio20PJvMMoPTewt8Z8ZQ2IX TbmSz7Z1zJ6TART5Str1WTX7GdwGgGsTDVAqHg+cPrBKEjbUVA2w2VR8gbX8uhfq orMqueW1Ycav7EjuVIJBypAjqiychOYt7FRenE8MInwthFAeyZxzhHtaSETTclD5 XWEjIIwW5xP7f2aZNX2pO/ziIULuIeNkGvr52BXRmfNvC0JMoV4q+dFiF8gOGXYQ Edp9CE9cs1eRDcXeheT8 =5U1D -----END PGP SIGNATURE----- --Taf0VO/VdHaNBIEp-- From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 18:39:11 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE81E106567B for ; Sun, 16 Oct 2011 18:39:11 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o2.shared.sendgrid.net (o2.shared.sendgrid.net [74.63.235.152]) by mx1.freebsd.org (Postfix) with SMTP id 9464B8FC16 for ; Sun, 16 Oct 2011 18:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=Aok4ZANUptSZF/k6pBjI3PMACp8=; b=F0b4te2vR1a+JachKlzRlFpLIzHj l/34QLN2+ZYLQtUQDfEUpU7Ec22dDYVdlePIzHyWDpHNje0MgkPHVnwq6Wta850p NGI4Vw1TAQINtWjlRTqecUYjNonuIPkTLNz5Wy0dYgr5uXgaeJOZg2gBC1q0Enz+ RtXboMYExf2k+sQ= Received: by 10.12.16.8 with SMTP id mf37.3695.4E9B24CEA Sun, 16 Oct 2011 13:39:10 -0500 (CDT) Received: from mail.tarsnap.com (unknown [10.9.180.5]) by mi11 (SG) with ESMTP id 4e9b24ce.53cb.570fe0c for ; Sun, 16 Oct 2011 13:39:10 -0500 (CST) Received: (qmail 56255 invoked from network); 16 Oct 2011 18:36:51 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 16 Oct 2011 18:36:51 -0000 Received: (qmail 78187 invoked from network); 16 Oct 2011 18:38:40 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 16 Oct 2011 18:38:40 -0000 Message-ID: <4E9B24B0.60106@freebsd.org> Date: Sun, 16 Oct 2011 11:38:40 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110914 Thunderbird/6.0.2 MIME-Version: 1.0 To: Ed Schouten References: <201110140724.p9E7OmMB052118@svn.freebsd.org> <4E9B1287.4050507@freebsd.org> <20111016182033.GS91943@hoeg.nl> In-Reply-To: <20111016182033.GS91943@hoeg.nl> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNG0vxZEW+W746qi3T5RfEzWhpaEsLcVyBlkBUedDM9PwxrXcoFMZY8ilCLyTorAMk/iF+uCwxGv8b4GDDJwMu/3c/Stk6OREjbbsJc5o/gkMIzXgS7eEB99NMYaGyHlDJU= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226359 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 18:39:12 -0000 On 10/16/11 11:20, Ed Schouten wrote: > Hmmm... Casting to size_t is not the way to go, but off_t also should be > avoided. We can assume st_size is non-negative, so we should do > something like this, right? > > - if (sb.st_size > (off_t)SIZE_T_MAX) > + if ((uintmax_t)sb.st_size > (uintmax_t)SIZE_T_MAX) That should work. I've also solved this problem in the past with if ((sizeof(off_t) > sizeof(size_t)) && (sb.st_size > (off_t) -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 18:57:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 4B06B106564A; Sun, 16 Oct 2011 18:57:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id F1C7114E12A; Sun, 16 Oct 2011 18:57:58 +0000 (UTC) Message-ID: <4E9B2936.6040108@FreeBSD.org> Date: Sun, 16 Oct 2011 11:57:58 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Eitan Adler References: <201110161430.p9GEUTFj066335@svn.freebsd.org> In-Reply-To: <201110161430.p9GEUTFj066335@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, lstewart@FreeBSD.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sahil@FreeBSD.org Subject: Re: svn commit: r226436 - in head: . gnu/usr.bin/binutils/objcopy gnu/usr.bin/binutils/strip lib/libc/gen lib/libelf lib/libipsec lib/libpmc lib/msun/man libexec/rtld-elf/amd64 libexec/rtld-elf/i386 sb... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 18:57:59 -0000 On 10/16/2011 07:30, Eitan Adler wrote: > Author: eadler (ports committer) > Date: Sun Oct 16 14:30:28 2011 > New Revision: 226436 > URL: http://svn.freebsd.org/changeset/base/226436 > > Log: > - change "is is" to "is" or "it is" > - change "the the" to "the" > > Approved by: lstewart > Approved by: sahil (mentor) > MFC after: 3 days > Modified: head/secure/usr.bin/openssl/man/ca.1 > ============================================================================== > --- head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:16:46 2011 (r226435) > +++ head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:30:28 2011 (r226436) > @@ -205,7 +205,7 @@ section for information on the required > .IP "\fB\-infiles\fR" 4 > .IX Item "-infiles" > if present this should be the last option, all subsequent arguments > -are assumed to the the names of files containing certificate requests. > +are assumed to the names of files containing certificate requests. I think you need "be" between "to the" here. > Modified: head/usr.sbin/pkg_install/lib/version.c > ============================================================================== > --- head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:16:46 2011 (r226435) > +++ head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:30:28 2011 (r226436) > @@ -66,7 +66,7 @@ split_version(const char *pkgname, const > if (pkgname == NULL) > errx(2, "%s: Passed NULL pkgname.", __func__); > > - /* Look for the last '-' the the pkgname */ > + /* Look for the last '-' the pkgname */ "in" before "the" Meanwhile, nice work. :) At least the openssl stuff is contributed code, please be sure to send the patches upstream for all of the contrib code. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 19:11:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 167561065672; Sun, 16 Oct 2011 19:11:55 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 9697A8FC14; Sun, 16 Oct 2011 19:11:54 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 68BD025D38A1; Sun, 16 Oct 2011 19:11:53 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5D1AEBD3C56; Sun, 16 Oct 2011 19:11:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id gmHE7q7kYirc; Sun, 16 Oct 2011 19:11:51 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 3B21EBD3C39; Sun, 16 Oct 2011 19:11:51 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110131720.p9DHKjWn024920@svn.freebsd.org> Date: Sun, 16 Oct 2011 19:11:50 +0000 Content-Transfer-Encoding: 7bit Message-Id: <20E8F22B-A5C5-490F-B225-55EE2B5A7350@lists.zabbadoz.net> References: <201110131720.p9DHKjWn024920@svn.freebsd.org> To: Dag-Erling Smorgrav , Xin LI X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226345 - in head: etc/rc.d sbin/dhclient; Re: svn commit: r225849 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:11:55 -0000 On 13. Oct 2011, at 17:20 , Dag-Erling Smorgrav wrote: > Author: des > Date: Thu Oct 13 17:20:45 2011 > New Revision: 226345 > URL: http://svn.freebsd.org/changeset/base/226345 > > Log: > Make dhclient use a pid file. Modify the rc script accordingly; while > there, clean it up and add some error checks. > ... On 28. Sep 2011, at 19:01 , Xin LI wrote: > Author: delphij > Date: Wed Sep 28 19:01:15 2011 > New Revision: 225849 > URL: http://svn.freebsd.org/changeset/base/225849 > > Log: > Test if the interface is afif in dhcpif() and syncdhcpif(), as > done in ipv6_autoconfif. I now see dhclient running even if no DHCP was configured at all %grep -i dhc /etc/rc.conf %ps ax | grep dhc 951 ?? Is 0:00.00 dhclient: em0 [priv] (dhclient) 971 ?? Is 0:00.00 dhclient: em0 (dhclient) 1491 0 RL+ 0:00.00 grep dhc % Which also means I have inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 while it tries in vain to get a lease. Can you two please double-check your changes? -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 19:15:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98D31106566B; Sun, 16 Oct 2011 19:15:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88CE08FC13; Sun, 16 Oct 2011 19:15:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GJFPlb075847; Sun, 16 Oct 2011 19:15:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GJFPpo075845; Sun, 16 Oct 2011 19:15:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161915.p9GJFPpo075845@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 19:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226444 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:15:25 -0000 Author: ed Date: Sun Oct 16 19:15:25 2011 New Revision: 226444 URL: http://svn.freebsd.org/changeset/base/226444 Log: Don't cast SIZE_T_MAX to off_t. I focused so much on the 32-bits case where we have to cast SIZE_T_MAX up in size, that I forgot about the 64-bits case, where off_t and size_t are equal in size. Simply cast both numbers to uintmax_t, as we can assume st_size is never negative. Reported by: cperciva Modified: head/usr.bin/look/look.c Modified: head/usr.bin/look/look.c ============================================================================== --- head/usr.bin/look/look.c Sun Oct 16 17:59:28 2011 (r226443) +++ head/usr.bin/look/look.c Sun Oct 16 19:15:25 2011 (r226444) @@ -134,7 +134,7 @@ main(int argc, char *argv[]) do { if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) err(2, "%s", file); - if (sb.st_size > (off_t)SIZE_T_MAX) + if ((uintmax_t)sb.st_size > (uintmax_t)SIZE_T_MAX) errx(2, "%s: %s", file, strerror(EFBIG)); if (sb.st_size == 0) { close(fd); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 19:23:44 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A3DA1065674; Sun, 16 Oct 2011 19:23:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A4AD8FC15; Sun, 16 Oct 2011 19:23:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GJNhaU076147; Sun, 16 Oct 2011 19:23:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GJNhsT076145; Sun, 16 Oct 2011 19:23:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161923.p9GJNhsT076145@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 19:23:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226445 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:23:44 -0000 Author: ed Date: Sun Oct 16 19:23:43 2011 New Revision: 226445 URL: http://svn.freebsd.org/changeset/base/226445 Log: Add missing #include. Note to myself: don't write patches while watching a movie. Modified: head/usr.bin/look/look.c Modified: head/usr.bin/look/look.c ============================================================================== --- head/usr.bin/look/look.c Sun Oct 16 19:15:25 2011 (r226444) +++ head/usr.bin/look/look.c Sun Oct 16 19:23:43 2011 (r226445) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 19:46:53 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DE5A106566B; Sun, 16 Oct 2011 19:46:53 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 142A58FC12; Sun, 16 Oct 2011 19:46:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GJkqGT077137; Sun, 16 Oct 2011 19:46:52 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GJkqeP077135; Sun, 16 Oct 2011 19:46:52 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201110161946.p9GJkqeP077135@svn.freebsd.org> From: Hiroki Sato Date: Sun, 16 Oct 2011 19:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226446 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:46:53 -0000 Author: hrs Date: Sun Oct 16 19:46:52 2011 New Revision: 226446 URL: http://svn.freebsd.org/changeset/base/226446 Log: Fix a problem that an interface unexpectedly becomes IFF_UP by just doing "ifconfing inet6 -ifdisabled" when the interface has ND6_IFF_AUTO_LINKLOCAL flag and no link-local address. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Oct 16 19:23:43 2011 (r226445) +++ head/sys/netinet6/nd6.c Sun Oct 16 19:46:52 2011 (r226446) @@ -1364,7 +1364,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru " duplicate.\n"); } else { ND_IFINFO(ifp)->flags &= ~ND6_IFF_IFDISABLED; - in6_if_up(ifp); + if (ifp->if_flags & IFF_UP) + in6_if_up(ifp); } } else if (!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && (ND.flags & ND6_IFF_IFDISABLED)) { @@ -1382,35 +1383,37 @@ nd6_ioctl(u_long cmd, caddr_t data, stru IF_ADDR_UNLOCK(ifp); } - if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - (ND.flags & ND6_IFF_AUTO_LINKLOCAL)) { - /* auto_linklocal 0->1 transision */ - - /* If no link-local address on ifp, configure */ - ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; - in6_ifattach(ifp, NULL); - } else if ((ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - !(ND.flags & ND6_IFF_IFDISABLED)) { - /* - * When the IF already has - * ND6_IFF_AUTO_LINKLOCAL and no link-local - * address is assigned, try to assign one. - */ - int haslinklocal = 0; + if (ND.flags & ND6_IFF_AUTO_LINKLOCAL) { + if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL)) { + /* auto_linklocal 0->1 transision */ + + /* If no link-local address on ifp, configure */ + ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; + in6_ifattach(ifp, NULL); + } else if (!(ND.flags & ND6_IFF_IFDISABLED) && + ifp->if_flags & IFF_UP) { + /* + * When the IF already has + * ND6_IFF_AUTO_LINKLOCAL, no link-local + * address is assigned, and IFF_UP, try to + * assign one. + */ + int haslinklocal = 0; - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family != AF_INET6) - continue; - ia = (struct in6_ifaddr *)ifa; - if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { - haslinklocal = 1; - break; + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + ia = (struct in6_ifaddr *)ifa; + if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { + haslinklocal = 1; + break; + } } + IF_ADDR_UNLOCK(ifp); + if (!haslinklocal) + in6_ifattach(ifp, NULL); } - IF_ADDR_UNLOCK(ifp); - if (!haslinklocal) - in6_ifattach(ifp, NULL); } } ND_IFINFO(ifp)->flags = ND.flags; From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 20:06:44 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADFD3106564A; Sun, 16 Oct 2011 20:06:44 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92B208FC0A; Sun, 16 Oct 2011 20:06:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GK6ia0077803; Sun, 16 Oct 2011 20:06:44 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GK6ite077799; Sun, 16 Oct 2011 20:06:44 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110162006.p9GK6ite077799@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 20:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226447 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 20:06:44 -0000 Author: andre Date: Sun Oct 16 20:06:44 2011 New Revision: 226447 URL: http://svn.freebsd.org/changeset/base/226447 Log: Remove the ss_fltsz and ss_fltsz_local sysctl's which have long been superseded by the RFC3390 initial CWND sizing. Also remove the remnants of TCP_METRICS_CWND which used the TCP hostcache to set the initial CWND in a non-RFC compliant way. MFC after: 1 week Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Oct 16 19:46:52 2011 (r226446) +++ head/sys/netinet/tcp_input.c Sun Oct 16 20:06:44 2011 (r226447) @@ -301,9 +301,6 @@ cc_conn_init(struct tcpcb *tp) struct hc_metrics_lite metrics; struct inpcb *inp = tp->t_inpcb; int rtt; -#ifdef INET6 - int isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0; -#endif INP_WLOCK_ASSERT(tp->t_inpcb); @@ -337,49 +334,16 @@ cc_conn_init(struct tcpcb *tp) } /* - * Set the slow-start flight size depending on whether this - * is a local network or not. - * - * Extend this so we cache the cwnd too and retrieve it here. - * Make cwnd even bigger than RFC3390 suggests but only if we - * have previous experience with the remote host. Be careful - * not make cwnd bigger than remote receive window or our own - * send socket buffer. Maybe put some additional upper bound - * on the retrieved cwnd. Should do incremental updates to - * hostcache when cwnd collapses so next connection doesn't - * overloads the path again. - * - * XXXAO: Initializing the CWND from the hostcache is broken - * and in its current form not RFC conformant. It is disabled - * until fixed or removed entirely. + * Set the initial slow-start flight size. * * RFC3390 says only do this if SYN or SYN/ACK didn't got lost. - * We currently check only in syncache_socket for that. + * XXX: We currently check only in syncache_socket for that. */ -/* #define TCP_METRICS_CWND */ -#ifdef TCP_METRICS_CWND - if (metrics.rmx_cwnd) - tp->snd_cwnd = max(tp->t_maxseg, min(metrics.rmx_cwnd / 2, - min(tp->snd_wnd, so->so_snd.sb_hiwat))); - else -#endif if (V_tcp_do_rfc3390) tp->snd_cwnd = min(4 * tp->t_maxseg, max(2 * tp->t_maxseg, 4380)); -#ifdef INET6 - else if (isipv6 && in6_localaddr(&inp->in6p_faddr)) - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; -#endif -#if defined(INET) && defined(INET6) - else if (!isipv6 && in_localaddr(inp->inp_faddr)) - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; -#endif -#ifdef INET - else if (in_localaddr(inp->inp_faddr)) - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; -#endif else - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz; + tp->snd_cwnd = tp->t_maxseg; if (CC_ALGO(tp)->conn_init != NULL) CC_ALGO(tp)->conn_init(tp->ccv); Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sun Oct 16 19:46:52 2011 (r226446) +++ head/sys/netinet/tcp_output.c Sun Oct 16 20:06:44 2011 (r226447) @@ -89,16 +89,6 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(path_mtu_discovery), 1, "Enable Path MTU Discovery"); -VNET_DEFINE(int, ss_fltsz) = 1; -SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, slowstart_flightsize, CTLFLAG_RW, - &VNET_NAME(ss_fltsz), 1, - "Slow start flight size"); - -VNET_DEFINE(int, ss_fltsz_local) = 4; -SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, - CTLFLAG_RW, &VNET_NAME(ss_fltsz_local), 1, - "Slow start flight size for local networks"); - VNET_DEFINE(int, tcp_do_tso) = 1; #define V_tcp_do_tso VNET(tcp_do_tso) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, tso, CTLFLAG_RW, Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Oct 16 19:46:52 2011 (r226446) +++ head/sys/netinet/tcp_var.h Sun Oct 16 20:06:44 2011 (r226447) @@ -609,8 +609,6 @@ VNET_DECLARE(int, tcp_do_rfc3390); VNET_DECLARE(int, tcp_sendspace); VNET_DECLARE(int, tcp_recvspace); VNET_DECLARE(int, path_mtu_discovery); -VNET_DECLARE(int, ss_fltsz); -VNET_DECLARE(int, ss_fltsz_local); VNET_DECLARE(int, tcp_do_rfc3465); VNET_DECLARE(int, tcp_abc_l_var); #define V_tcb VNET(tcb) @@ -623,8 +621,6 @@ VNET_DECLARE(int, tcp_abc_l_var); #define V_tcp_sendspace VNET(tcp_sendspace) #define V_tcp_recvspace VNET(tcp_recvspace) #define V_path_mtu_discovery VNET(path_mtu_discovery) -#define V_ss_fltsz VNET(ss_fltsz) -#define V_ss_fltsz_local VNET(ss_fltsz_local) #define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) #define V_tcp_abc_l_var VNET(tcp_abc_l_var) From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 20:18:40 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28CF51065670; Sun, 16 Oct 2011 20:18:40 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEC5A8FC0A; Sun, 16 Oct 2011 20:18:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GKIdf3078341; Sun, 16 Oct 2011 20:18:39 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GKId7c078337; Sun, 16 Oct 2011 20:18:39 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110162018.p9GKId7c078337@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 20:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226448 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 20:18:40 -0000 Author: andre Date: Sun Oct 16 20:18:39 2011 New Revision: 226448 URL: http://svn.freebsd.org/changeset/base/226448 Log: Move the tcp_sendspace and tcp_recvspace sysctl's from the middle of tcp_usrreq.c to the top of tcp_output.c and tcp_input.c respectively next to the socket buffer autosizing controls. MFC after: 1 week Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Oct 16 20:06:44 2011 (r226447) +++ head/sys/netinet/tcp_input.c Sun Oct 16 20:18:39 2011 (r226448) @@ -183,6 +183,11 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_insecure_rst), 0, "Follow the old (insecure) criteria for accepting RST packets"); +VNET_DEFINE(int, tcp_recvspace) = 1024*64 +#define V_tcp_recvspace VNET(tcp_recvspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, + &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); + VNET_DEFINE(int, tcp_do_autorcvbuf) = 1; #define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_RW, Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sun Oct 16 20:06:44 2011 (r226447) +++ head/sys/netinet/tcp_output.c Sun Oct 16 20:18:39 2011 (r226448) @@ -95,6 +95,11 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_do_tso), 0, "Enable TCP Segmentation Offload"); +VNET_DEFINE(int, tcp_sendspace) = 1024*32; +#define V_tcp_sendspace VNET(tcp_sendspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_SENDSPACE, tcp_sendspace, CTLFLAG_RW, + &VNET_NAME(tcp_sendspace), 0, "Initial send socket buffer size"); + VNET_DEFINE(int, tcp_do_autosndbuf) = 1; #define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_auto, CTLFLAG_RW, Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sun Oct 16 20:06:44 2011 (r226447) +++ head/sys/netinet/tcp_usrreq.c Sun Oct 16 20:18:39 2011 (r226448) @@ -1498,20 +1498,6 @@ tcp_ctloutput(struct socket *so, struct #undef INP_WLOCK_RECHECK /* - * Set the initial send and receive socket buffer sizes for - * newly created TCP sockets. - */ -VNET_DEFINE(int, tcp_sendspace) = 1024*32; -#define V_tcp_sendspace VNET(tcp_sendspace) -SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_SENDSPACE, tcp_sendspace, CTLFLAG_RW, - &VNET_NAME(tcp_sendspace), 0, "Initial send socket buffer size"); - -VNET_DEFINE(int, tcp_recvspace) = 1024*64 -#define V_tcp_recvspace VNET(tcp_recvspace) -SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, - &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); - -/* * Attach TCP protocol to socket, allocating * internet protocol control block, tcp control block, * bufer space, and entering LISTEN state if to accept connections. From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 21:01:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 578541065673; Sun, 16 Oct 2011 21:01:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4481F8FC18; Sun, 16 Oct 2011 21:01:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GL1hgH079694; Sun, 16 Oct 2011 21:01:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GL1hJX079685; Sun, 16 Oct 2011 21:01:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110162101.p9GL1hJX079685@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 16 Oct 2011 21:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226449 - in head: etc/devd share/man/man4/man4.powerpc sys/conf sys/dev/adb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 21:01:43 -0000 Author: nwhitehorn Date: Sun Oct 16 21:01:42 2011 New Revision: 226449 URL: http://svn.freebsd.org/changeset/base/226449 Log: Add support for special keys (volume/brightness/eject) on Apple laptops with ADB keyboards. Submitted by: Justin Hibbits MFC after: 9.0-RELEASE Added: head/etc/devd/apple.conf (contents, props changed) head/share/man/man4/man4.powerpc/abtn.4 (contents, props changed) head/sys/dev/adb/adb_buttons.c (contents, props changed) Modified: head/etc/devd/Makefile head/share/man/man4/man4.powerpc/Makefile head/share/man/man4/man4.powerpc/akbd.4 head/sys/conf/files.powerpc head/sys/dev/adb/adb_kbd.c Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Sun Oct 16 20:18:39 2011 (r226448) +++ head/etc/devd/Makefile Sun Oct 16 21:01:42 2011 (r226449) @@ -1,6 +1,14 @@ # $FreeBSD$ -FILES= asus.conf uath.conf usb.conf +FILES= uath.conf usb.conf + +.if ${MACHINE} == "powerpc" +FILES+= apple.conf +.endif + +.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +FILES+= asus.conf +.endif NO_OBJ= FILESDIR= /etc/devd Added: head/etc/devd/apple.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/apple.conf Sun Oct 16 21:01:42 2011 (r226449) @@ -0,0 +1,46 @@ +# $FreeBSD$ +# +# PowerPC Apple specific devd events + +# Keyboard power key +notify 0 { + match "system" "PMU"; + match "subsystem" "Button"; + match "notify" "0x0"; + action "shutdown -p now"; +}; + + +# The next blocks enable volume hotkeys that can be found on Apple laptops +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "mute"; + action "mixer 0"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "volume"; + match "notify" "down"; + action "mixer vol -10"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "volume"; + match "notify" "up"; + action "mixer vol +10"; +}; + +# Eject key +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "eject"; + action "camcontrol eject cd0"; +}; + + Modified: head/share/man/man4/man4.powerpc/Makefile ============================================================================== --- head/share/man/man4/man4.powerpc/Makefile Sun Oct 16 20:18:39 2011 (r226448) +++ head/share/man/man4/man4.powerpc/Makefile Sun Oct 16 21:01:42 2011 (r226449) @@ -2,6 +2,7 @@ MAN= adb.4 \ akbd.4 \ + abtn.4 \ ams.4 \ bm.4 \ cuda.4 \ Added: head/share/man/man4/man4.powerpc/abtn.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/man4.powerpc/abtn.4 Sun Oct 16 21:01:42 2011 (r226449) @@ -0,0 +1,115 @@ +.\"- +.\" Copyright (c) 2011 Justin Hibbits +.\" Copyright (c) 2009 Nathan Whitehorn +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 16, 2011 +.Dt ABTN 4 +.Os +.Sh NAME +.Nm abtn +.Nd ADB Keyboard Special Keys Driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device adb" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the extended Fn keys on Apple notebooks with an ADB +interface. +.Sh HARDWARE +The +.Nm +driver supports extended keyboard keys (special F-keys) on the following devices: +.Pp +.Bl -bullet -compact +.It +Apple iBook Keyboard +.It +Apple PowerBook Keyboard +.El +.Sh EVENTS +The +.Nm +driver sends events to +.Xr devd 8 +for the following events under the +.Cd PMU +system, and +.Cd keys +subsystem: +.Pp +.Bl -bullet -compact +.It +.Cd brightness +- Generates +.Cd up +and +.Cd down +notify types matching the pressed key. +.It +.Cd mute +.It +.Cd volume +- Generates +.Cd up +and +.Cd down +notify types matching the pressed key. +.It +.Cd eject +.El +.Pp +Examples are included in /etc/devd/apple.conf. +.Sh SEE ALSO +.Xr adb 4 , +.Xr akbd 4 , +.Xr cuda 4 , +.Xr pmu 4, +.Xr devd 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Nx 5.0 +and was ported to +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Tsubai Masanari +for +.Nx +and ported to +.Fx +by +.An Justin Hibbits . Modified: head/share/man/man4/man4.powerpc/akbd.4 ============================================================================== --- head/share/man/man4/man4.powerpc/akbd.4 Sun Oct 16 20:18:39 2011 (r226448) +++ head/share/man/man4/man4.powerpc/akbd.4 Sun Oct 16 21:01:42 2011 (r226449) @@ -58,7 +58,36 @@ Apple iBook Keyboard .It Apple PowerBook Keyboard .El +.Sh EVENTS +The +.Nm +driver sends events to +.Xr devd 8 +for the following events under the +.Cd PMU +system: +.Pp +.Bl -bullet -compact +.It +Power button - +.Cd "Button" +subsystem, +.Cd "pressed" +type. +.El +.Sh SYSCTL VARIABLES +The +.Nm +driver supports the following sysctl variable for configuring the Fn keys: +.Bl -tag -width indent +.It Va dev.akbd.%d.fn_keys_function_as_primary +Set the Fn keys to be their F-key type as default. A value of 0 causes the +F-keys keys to work as special keys by default ( +.Xr abtn 4 ) +and a value of 1 sets them to behave as F-keys by default. +.El .Sh SEE ALSO +.Xr abtn 4 , .Xr adb 4 , .Xr cuda 4 , .Xr pmu 4 Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Oct 16 20:18:39 2011 (r226448) +++ head/sys/conf/files.powerpc Sun Oct 16 21:01:42 2011 (r226449) @@ -22,6 +22,7 @@ dev/adb/adb_kbd.c optional adb dev/adb/adb_mouse.c optional adb dev/adb/adb_hb_if.m optional adb dev/adb/adb_if.m optional adb +dev/adb/adb_buttons.c optional adb dev/agp/agp_apple.c optional agp powermac dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/fb/fb.c optional sc Added: head/sys/dev/adb/adb_buttons.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/adb/adb_buttons.c Sun Oct 16 21:01:42 2011 (r226449) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2011, Justin Hibbits. + * Copyright (c) 2002, Miodrag Vallat. + * Copyright (C) 1999 Tsubai Masanari. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * OpenBSD: abtn.c,v 1.12 2009/01/10 18:00:59 robert Exp + * NetBSD: abtn.c,v 1.1 1999/07/12 17:48:26 tsubai Exp + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#define ABTN_HANDLER_ID 31 + +struct abtn_softc { + device_t sc_dev; + + int handler_id; +}; + +static int abtn_probe(device_t dev); +static int abtn_attach(device_t dev); +static u_int abtn_receive_packet(device_t dev, u_char status, + u_char command, u_char reg, int len, u_char *data); + +static device_method_t abtn_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, abtn_probe), + DEVMETHOD(device_attach, abtn_attach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* ADB interface */ + DEVMETHOD(adb_receive_packet, abtn_receive_packet), + + { 0, 0 } +}; + +static driver_t abtn_driver = { + "abtn", + abtn_methods, + sizeof(struct abtn_softc), +}; + +static devclass_t abtn_devclass; + +DRIVER_MODULE(abtn, adb, abtn_driver, abtn_devclass, 0, 0); + +static int +abtn_probe(device_t dev) +{ + uint8_t type; + + type = adb_get_device_type(dev); + + if (type != ADB_DEVICE_MISC) + return (ENXIO); + + device_set_desc(dev, "ADB Brightness/Volume/Eject Buttons"); + return (0); +} + +static int +abtn_attach(device_t dev) +{ + struct abtn_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + sc->handler_id = adb_get_device_handler(dev); + + return 0; +} + +static u_int +abtn_receive_packet(device_t dev, u_char status, + u_char command, u_char reg, int len, u_char *data) +{ + u_int cmd; + + cmd = data[0]; + + switch (cmd) { + case 0x0a: /* decrease brightness */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "brightness", + "notify=down"); + break; + + case 0x09: /* increase brightness */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "brightness", "notify=up"); + break; + + case 0x08: /* mute */ + case 0x01: /* mute, AV hardware */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "mute", NULL); + break; + case 0x07: /* decrease volume */ + case 0x02: /* decrease volume, AV hardware */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "volume", "notify=down"); + break; + case 0x06: /* increase volume */ + case 0x03: /* increase volume, AV hardware */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "volume", "notify=up"); + break; + case 0x0c: /* mirror display key */ + /* Need callback to do something with this */ + break; + case 0x0b: /* eject tray */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "eject", NULL); + case 0x7f: /* numlock */ + /* Need callback to do something with this */ + break; + + default: +#ifdef DEBUG + if ((cmd & ~0x7f) == 0) + device_printf(dev, "unknown ADB button 0x%x\n", cmd); +#endif + break; + } + return 0; +} + Modified: head/sys/dev/adb/adb_kbd.c ============================================================================== --- head/sys/dev/adb/adb_kbd.c Sun Oct 16 20:18:39 2011 (r226448) +++ head/sys/dev/adb/adb_kbd.c Sun Oct 16 21:01:42 2011 (r226449) @@ -35,12 +35,15 @@ #include #include #include +#include #include #include "opt_kbd.h" #include #include +#include +#include #include #include @@ -55,6 +58,7 @@ static int adb_kbd_probe(device_t dev); static int adb_kbd_attach(device_t dev); static int adb_kbd_detach(device_t dev); static void akbd_repeat(void *xsc); +static int adb_fn_keys(SYSCTL_HANDLER_ARGS); static u_int adb_kbd_receive_packet(device_t dev, u_char status, u_char command, u_char reg, int len, u_char *data); @@ -282,6 +286,8 @@ adb_kbd_attach(device_t dev) { struct adb_kbd_softc *sc; keyboard_switch_t *sw; + uint32_t fkeys; + phandle_t handle; sw = kbd_get_switch(KBD_DRIVER_NAME); if (sw == NULL) { @@ -333,6 +339,40 @@ adb_kbd_attach(device_t dev) adb_set_autopoll(dev,1); + handle = OF_finddevice("mac-io/via-pmu/adb/keyboard"); + if (handle != -1 && OF_getprop(handle, "AAPL,has-embedded-fn-keys", + &fkeys, sizeof(fkeys)) != -1) { + static const char *key_names[] = {"F1", "F2", "F3", "F4", "F5", + "F6", "F7", "F8", "F9", "F10", "F11", "F12"}; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + int i; + + if (bootverbose) + device_printf(dev, "Keyboard has embedded Fn keys\n"); + + for (i = 0; i < 12; i++) { + uint32_t keyval; + char buf[3]; + if (OF_getprop(handle, key_names[i], &keyval, + sizeof(keyval)) < 0) + continue; + buf[0] = 1; + buf[1] = i+1; + buf[2] = keyval; + adb_write_register(dev, 0, 3, buf); + } + adb_write_register(dev, 1, 2, &(uint16_t){0}); + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "fn_keys_function_as_primary", CTLTYPE_INT | CTLFLAG_RW, sc, + 0, adb_fn_keys, "I", + "Set the Fn keys to be their F-key type as default"); + } + return (0); } @@ -383,6 +423,13 @@ adb_kbd_receive_packet(device_t dev, u_c return (0); mtx_lock(&sc->sc_mutex); + /* 0x7f is always the power button */ + if (data[0] == 0x7f && devctl_process_running()) { + devctl_notify("PMU", "Button", "pressed", NULL); + return (0); + } else if (data[0] == 0xff) { + return (0); /* Ignore power button release. */ + } if ((data[0] & 0x7f) == 57 && sc->buffers < 7) { /* Fake the down/up cycle for caps lock */ sc->buffer[sc->buffers++] = data[0] & 0x7f; @@ -390,7 +437,6 @@ adb_kbd_receive_packet(device_t dev, u_c } else { sc->buffer[sc->buffers++] = data[0]; } - if (sc->buffer[sc->buffers-1] < 0xff) sc->last_press = sc->buffer[sc->buffers-1]; @@ -814,5 +860,29 @@ akbd_modevent(module_t mod, int type, vo return (0); } +static int +adb_fn_keys(SYSCTL_HANDLER_ARGS) +{ + struct adb_kbd_softc *sc = arg1; + int error; + uint16_t is_fn_enabled; + unsigned int is_fn_enabled_sysctl; + + adb_read_register(sc->sc_dev, 1, &is_fn_enabled); + is_fn_enabled &= 1; + is_fn_enabled_sysctl = is_fn_enabled; + error = sysctl_handle_int(oidp, &is_fn_enabled_sysctl, 0, req); + + if (error || !req->newptr) + return (error); + + is_fn_enabled = is_fn_enabled_sysctl; + if (is_fn_enabled != 1 && is_fn_enabled != 0) + return (EINVAL); + + adb_write_register(sc->sc_dev, 1, 2, &is_fn_enabled); + return (0); +} + DEV_MODULE(akbd, akbd_modevent, NULL); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 21:30:15 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94501106564A; Sun, 16 Oct 2011 21:30:15 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78CB48FC0A; Sun, 16 Oct 2011 21:30:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GLUFe4080627; Sun, 16 Oct 2011 21:30:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GLUFuw080624; Sun, 16 Oct 2011 21:30:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110162130.p9GLUFuw080624@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 16 Oct 2011 21:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226450 - head/lib/libutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 21:30:15 -0000 Author: pjd Date: Sun Oct 16 21:30:15 2011 New Revision: 226450 URL: http://svn.freebsd.org/changeset/base/226450 Log: In pidfile_open(), if the pidfile is locked, but empty (PID is not stored yet) and the caller requested other process' PID by passing non-NULL pidptr argument, we will wait at most 100ms for the PID to show up in the file and if it won't, we will store -1 in *pidptr. From now on, pidfile_open() function never sets errno to EAGAIN on failure. In collaboration with: des MFC after: 1 week Modified: head/lib/libutil/pidfile.3 head/lib/libutil/pidfile.c Modified: head/lib/libutil/pidfile.3 ============================================================================== --- head/lib/libutil/pidfile.3 Sun Oct 16 21:01:42 2011 (r226449) +++ head/lib/libutil/pidfile.3 Sun Oct 16 21:30:15 2011 (r226450) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2008 +.Dd October 16, 2011 .Dt PIDFILE 3 .Os .Sh NAME @@ -59,11 +59,14 @@ The function opens (or creates) a file specified by the .Fa path argument and locks it. -If a file can not be locked, a PID of an already running daemon is returned in -the +If .Fa pidptr -argument (if it is not -.Dv NULL ) . +argument is not +.Dv NULL +and file can not be locked, the function will use it to store a PID of an +already running daemon or +.Li -1 +in case daemon did not write its PID yet. The function does not write process' PID into the file here, so it can be used before .Fn fork Ns ing @@ -162,16 +165,18 @@ function will fail if: .It Bq Er EEXIST Some process already holds the lock on the given pidfile, meaning that a daemon is already running. +If +.Fa pidptr +argument is not +.Dv NULL +the function will use it to store a PID of an already running daemon or +.Li -1 +in case daemon did not write its PID yet. .It Bq Er ENAMETOOLONG Specified pidfile's name is too long. .It Bq Er EINVAL Some process already holds the lock on the given pidfile, but PID read from there is invalid. -.It Bq Er EAGAIN -Some process already holds the lock on the given pidfile, but the file -is truncated. -Most likely, the existing daemon is writing new PID into -the file. .El .Pp The Modified: head/lib/libutil/pidfile.c ============================================================================== --- head/lib/libutil/pidfile.c Sun Oct 16 21:01:42 2011 (r226449) +++ head/lib/libutil/pidfile.c Sun Oct 16 21:30:15 2011 (r226450) @@ -119,20 +119,20 @@ pidfile_open(const char *path, mode_t mo fd = flopen(pfh->pf_path, O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); if (fd == -1) { - count = 0; - rqtp.tv_sec = 0; - rqtp.tv_nsec = 5000000; if (errno == EWOULDBLOCK && pidptr != NULL) { - again: - errno = pidfile_read(pfh->pf_path, pidptr); - if (errno == 0) - errno = EEXIST; - else if (errno == EAGAIN) { - if (++count <= 3) { - nanosleep(&rqtp, 0); - goto again; - } + count = 20; + rqtp.tv_sec = 0; + rqtp.tv_nsec = 5000000; + for (;;) { + errno = pidfile_read(pfh->pf_path, pidptr); + if (errno != EAGAIN || --count == 0) + break; + nanosleep(&rqtp, 0); } + if (errno == EAGAIN) + *pidptr = -1; + if (errno == 0 || errno == EAGAIN) + errno = EEXIST; } free(pfh); return (NULL); From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 22:15:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5ED42106566B; Sun, 16 Oct 2011 22:15:14 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED2D8FC0C; Sun, 16 Oct 2011 22:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GMFEWQ082487; Sun, 16 Oct 2011 22:15:14 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GMFErC082485; Sun, 16 Oct 2011 22:15:14 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110162215.p9GMFErC082485@svn.freebsd.org> From: Qing Li Date: Sun, 16 Oct 2011 22:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226451 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 22:15:14 -0000 Author: qingli Date: Sun Oct 16 22:15:13 2011 New Revision: 226451 URL: http://svn.freebsd.org/changeset/base/226451 Log: The IPv6 code was influx at the time of r196865 due to the L2/L3 separation rewrite changes. r196865 was committed to fix a scope violation problem in the following test scenario: box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64 box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64 em0 and re0 are on the same link. box-2# ping6 2001:db8:1:: PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1:: the ICMPv6 response should have a source address of em1, which is 2001:db8:2::1, not the link-local address of em0. That code is no longer necessary and breaks the IPv6-Ready logo testing, so revert it now. Reviewed by: hrs MFC after: 3 days Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Sun Oct 16 21:30:15 2011 (r226450) +++ head/sys/netinet6/icmp6.c Sun Oct 16 22:15:13 2011 (r226451) @@ -2244,10 +2244,6 @@ icmp6_reflect(struct mbuf *m, size_t off } } - if ((srcp != NULL) && - (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src))) - srcp = NULL; - if (srcp == NULL) { int e; struct sockaddr_in6 sin6; From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 22:18:09 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 299E3106566C; Sun, 16 Oct 2011 22:18:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 198CA8FC18; Sun, 16 Oct 2011 22:18:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GMI8sL082668; Sun, 16 Oct 2011 22:18:08 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GMI8e8082666; Sun, 16 Oct 2011 22:18:08 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201110162218.p9GMI8e8082666@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 16 Oct 2011 22:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226452 - head/sys/cddl/dev/dtrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 22:18:09 -0000 Author: marcel Date: Sun Oct 16 22:18:08 2011 New Revision: 226452 URL: http://svn.freebsd.org/changeset/base/226452 Log: Define dtrace_cmpset_long in terms of atomic_cmpset_long and not by virtue of inline assembly. Now this file compiles on all supported architectures. Modified: head/sys/cddl/dev/dtrace/dtrace_debug.c Modified: head/sys/cddl/dev/dtrace/dtrace_debug.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_debug.c Sun Oct 16 22:15:13 2011 (r226451) +++ head/sys/cddl/dev/dtrace/dtrace_debug.c Sun Oct 16 22:18:08 2011 (r226452) @@ -31,49 +31,9 @@ #ifdef DEBUG -#if defined(__amd64__) -static __inline int -dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src) -{ - u_char res; - - __asm __volatile( - " lock ; " - " cmpxchgq %2,%1 ; " - " sete %0 ; " - "1: " - "# dtrace_cmpset_long" - : "=a" (res), /* 0 */ - "=m" (*dst) /* 1 */ - : "r" (src), /* 2 */ - "a" (exp), /* 3 */ - "m" (*dst) /* 4 */ - : "memory"); - - return (res); -} -#elif defined(__i386__) -static __inline int -dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src) -{ - u_char res; - - __asm __volatile( - " lock ; " - " cmpxchgl %2,%1 ; " - " sete %0 ; " - "1: " - "# dtrace_cmpset_long" - : "=a" (res), /* 0 */ - "=m" (*dst) /* 1 */ - : "r" (src), /* 2 */ - "a" (exp), /* 3 */ - "m" (*dst) /* 4 */ - : "memory"); +#include - return (res); -} -#endif +#define dtrace_cmpset_long atomic_cmpset_long #define DTRACE_DEBUG_BUFR_SIZE (32 * 1024) From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 22:24:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B020106566C; Sun, 16 Oct 2011 22:24:05 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0168FC13; Sun, 16 Oct 2011 22:24:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GMO58j082888; Sun, 16 Oct 2011 22:24:05 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GMO5mQ082887; Sun, 16 Oct 2011 22:24:05 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110162224.p9GMO5mQ082887@svn.freebsd.org> From: Qing Li Date: Sun, 16 Oct 2011 22:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226453 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 22:24:05 -0000 Author: qingli Date: Sun Oct 16 22:24:04 2011 New Revision: 226453 URL: http://svn.freebsd.org/changeset/base/226453 Log: The code change made in r226040 was incomplete and resulted in routes such as fe80::1%lo0 no being installed. This patch completes the original intended fix. Reviewed by: hrs, bz MFC after: 3 days Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sun Oct 16 22:18:08 2011 (r226452) +++ head/sys/netinet6/in6.c Sun Oct 16 22:24:04 2011 (r226453) @@ -1860,14 +1860,17 @@ in6_ifinit(struct ifnet *ifp, struct in6 if (error != 0) return (error); ia->ia_flags |= IFA_ROUTE; + /* + * Handle the case for ::1 . + */ + if (ifp->if_flags & IFF_LOOPBACK) + ia->ia_flags |= IFA_RTSELF; } /* * add a loopback route to self */ - if (!(ia->ia_flags & IFA_RTSELF) - && (V_nd6_useloopback - && !(ifp->if_flags & IFF_LOOPBACK))) { + if (!(ia->ia_flags & IFA_RTSELF) && V_nd6_useloopback) { error = ifa_add_loopback_route((struct ifaddr *)ia, (struct sockaddr *)&ia->ia_addr); if (error == 0) From owner-svn-src-head@FreeBSD.ORG Sun Oct 16 23:59:44 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B960106564A; Sun, 16 Oct 2011 23:59:44 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 924278FC14; Sun, 16 Oct 2011 23:59:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id p9GNxcLL058996; Mon, 17 Oct 2011 03:59:38 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id p9GNxctf058995; Mon, 17 Oct 2011 03:59:38 +0400 (MSK) (envelope-from ache) Date: Mon, 17 Oct 2011 03:59:38 +0400 From: Andrey Chernov To: Andre Oppermann Message-ID: <20111016235937.GA58969@vniz.net> Mail-Followup-To: Andrey Chernov , Andre Oppermann , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201110161354.p9GDskO6065103@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110161354.p9GDskO6065103@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r226433 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 23:59:44 -0000 On Sun, Oct 16, 2011 at 01:54:46PM +0000, Andre Oppermann wrote: > Author: andre > Date: Sun Oct 16 13:54:46 2011 > New Revision: 226433 > URL: http://svn.freebsd.org/changeset/base/226433 > > Log: > Update the comment and description of tcp_sendspace and tcp_recvspace > to better reflect their purpose. > MFC after: 1 week Please don't forget to update tcp(4), it still tells about "maximum". -- http://ache.vniz.net/ From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 00:05:31 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88C3C106564A; Mon, 17 Oct 2011 00:05:31 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78E688FC14; Mon, 17 Oct 2011 00:05:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9H05VdZ086264; Mon, 17 Oct 2011 00:05:31 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9H05VrP086262; Mon, 17 Oct 2011 00:05:31 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110170005.p9H05VrP086262@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 17 Oct 2011 00:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226454 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 00:05:31 -0000 Author: bz Date: Mon Oct 17 00:05:31 2011 New Revision: 226454 URL: http://svn.freebsd.org/changeset/base/226454 Log: Add syntactic sugar missed in r226437 and then not added either when moving things around in r226448 but desperately needed to always make things compile successfully. MFC after: 1 week Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Oct 16 22:24:04 2011 (r226453) +++ head/sys/netinet/tcp_input.c Mon Oct 17 00:05:31 2011 (r226454) @@ -183,7 +183,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_insecure_rst), 0, "Follow the old (insecure) criteria for accepting RST packets"); -VNET_DEFINE(int, tcp_recvspace) = 1024*64 +VNET_DEFINE(int, tcp_recvspace) = 1024*64; #define V_tcp_recvspace VNET(tcp_recvspace) SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 00:16:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29C47106566C; Mon, 17 Oct 2011 00:16:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id AD3EA8FC12; Mon, 17 Oct 2011 00:16:26 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 9D55D25D37C7; Mon, 17 Oct 2011 00:16:25 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id BEE51BD3C4D; Mon, 17 Oct 2011 00:16:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id U2KUOB+W7yuZ; Mon, 17 Oct 2011 00:16:23 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 39076BD3C2E; Mon, 17 Oct 2011 00:16:23 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110170005.p9H05VrP086262@svn.freebsd.org> Date: Mon, 17 Oct 2011 00:16:22 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201110170005.p9H05VrP086262@svn.freebsd.org> To: src-committers@freebsd.org X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r226454 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 00:16:27 -0000 On 17. Oct 2011, at 00:05 , Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Oct 17 00:05:31 2011 > New Revision: 226454 > URL: http://svn.freebsd.org/changeset/base/226454 >=20 > Log: > Add syntactic sugar missed in r226437 and then not added either when = moving > things around in r226448 but desperately needed to always make things > compile successfully. >=20 GENRIC and LINT did not fail failed on it as it expanded to: int tcp_recvspace =3D 1024*64 followed by: #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) = \ SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) =20 =3D> #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) = \=20 SYSCTL_ASSERT_TYPE(INT, ptr, parent, name); = \ SYSCTL_OID(parent, nbr, name, = \ CTLTYPE_INT | CTLFLAG_MPSAFE | (access), = \ ptr, val, sysctl_handle_int, "I", descr) and the SYSCTL_ASSERT_TYPE() expanding to nothing in #define SYSCTL_ASSERT_TYPE(type, ptr, parent, name) leaving just the ';' around; so it ended up as: int tcp_recvspace =3D 1024*64 ; and an expanded SYSCTL_OID(...); > MFC after: 1 week >=20 > Modified: > head/sys/netinet/tcp_input.c >=20 > Modified: head/sys/netinet/tcp_input.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/tcp_input.c Sun Oct 16 22:24:04 2011 = (r226453) > +++ head/sys/netinet/tcp_input.c Mon Oct 17 00:05:31 2011 = (r226454) > @@ -183,7 +183,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, > &VNET_NAME(tcp_insecure_rst), 0, > "Follow the old (insecure) criteria for accepting RST packets"); >=20 > -VNET_DEFINE(int, tcp_recvspace) =3D 1024*64 > +VNET_DEFINE(int, tcp_recvspace) =3D 1024*64; > #define V_tcp_recvspace VNET(tcp_recvspace) > SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, = CTLFLAG_RW, > &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer = size"); --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 03:05:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 5D2A3106566C; Mon, 17 Oct 2011 03:05:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id C48D914F6E2; Mon, 17 Oct 2011 03:05:04 +0000 (UTC) Message-ID: <4E9B9B5F.4090004@FreeBSD.org> Date: Sun, 16 Oct 2011 20:05:03 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201110052208.p95M8H3C030566@svn.freebsd.org> <05F84C7F-A1CD-40E4-BDD5-BCACB58C56BF@lists.zabbadoz.net> In-Reply-To: <05F84C7F-A1CD-40E4-BDD5-BCACB58C56BF@lists.zabbadoz.net> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dag-Erling Smorgrav Subject: Re: svn commit: r226046 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/usr.sbin/sshd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 03:05:05 -0000 On 10/12/2011 02:09, Bjoern A. Zeeb wrote: > Mergemaster brought up this change: Yay for showing changes. :) From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 05:41:04 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 753AA106566C; Mon, 17 Oct 2011 05:41:04 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62A098FC08; Mon, 17 Oct 2011 05:41:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9H5f4N6096939; Mon, 17 Oct 2011 05:41:04 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9H5f4DH096920; Mon, 17 Oct 2011 05:41:04 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110170541.p9H5f4DH096920@svn.freebsd.org> From: David Schultz Date: Mon, 17 Oct 2011 05:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226458 - in head: include lib/msun lib/msun/man lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 05:41:04 -0000 Author: das Date: Mon Oct 17 05:41:03 2011 New Revision: 226458 URL: http://svn.freebsd.org/changeset/base/226458 Log: Add c{cos,sin,tan}{,h}{,f} functions. This is joint work with bde and kargl. Added: head/lib/msun/man/ccos.3 (contents, props changed) head/lib/msun/man/ccosh.3 (contents, props changed) head/lib/msun/src/s_ccosh.c (contents, props changed) head/lib/msun/src/s_ccoshf.c (contents, props changed) head/lib/msun/src/s_csinh.c (contents, props changed) head/lib/msun/src/s_csinhf.c (contents, props changed) head/lib/msun/src/s_ctanh.c (contents, props changed) head/lib/msun/src/s_ctanhf.c (contents, props changed) Modified: head/include/complex.h head/lib/msun/Makefile head/lib/msun/Symbol.map head/lib/msun/man/complex.3 head/lib/msun/man/cos.3 head/lib/msun/man/cosh.3 head/lib/msun/man/sin.3 head/lib/msun/man/sinh.3 head/lib/msun/man/tan.3 head/lib/msun/man/tanh.3 Modified: head/include/complex.h ============================================================================== --- head/include/complex.h Mon Oct 17 05:38:22 2011 (r226457) +++ head/include/complex.h Mon Oct 17 05:41:03 2011 (r226458) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2001-2008 The FreeBSD Project. + * Copyright (c) 2001-2011 The FreeBSD Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,6 +49,10 @@ long double cabsl(long double complex); double carg(double complex); float cargf(float complex); long double cargl(long double complex); +double complex ccos(double complex); +float complex ccosf(float complex); +double complex ccosh(double complex); +float complex ccoshf(float complex); double complex cexp(double complex); float complex cexpf(float complex); double cimag(double complex) __pure2; @@ -65,10 +69,18 @@ long double complex double creal(double complex) __pure2; float crealf(float complex) __pure2; long double creall(long double complex) __pure2; +double complex csin(double complex); +float complex csinf(float complex); +double complex csinh(double complex); +float complex csinhf(float complex); double complex csqrt(double complex); float complex csqrtf(float complex); long double complex csqrtl(long double complex); +double complex ctan(double complex); +float complex ctanf(float complex); +double complex ctanh(double complex); +float complex ctanhf(float complex); __END_DECLS Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/Makefile Mon Oct 17 05:41:03 2011 (r226458) @@ -101,9 +101,11 @@ COMMON_SRCS+= e_acosl.c e_asinl.c e_atan .endif # C99 complex functions -COMMON_SRCS+= s_cexp.c s_cexpf.c s_cimag.c s_cimagf.c s_cimagl.c \ +COMMON_SRCS+= s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \ + s_cimag.c s_cimagf.c s_cimagl.c \ s_conj.c s_conjf.c s_conjl.c \ - s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c + s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c \ + s_csinh.c s_csinhf.c s_ctanh.c s_ctanhf.c # FreeBSD's C library supplies these functions: #COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c @@ -125,7 +127,8 @@ SRCS= ${COMMON_SRCS} ${ARCH_SRCS} INCS= fenv.h math.h -MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 cexp.3 \ +MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \ + ceil.3 ccos.3 ccosh.3 cexp.3 \ cimag.3 copysign.3 cos.3 cosh.3 csqrt.3 erf.3 exp.3 fabs.3 fdim.3 \ feclearexcept.3 feenableexcept.3 fegetenv.3 \ fegetround.3 fenv.3 floor.3 \ @@ -143,6 +146,9 @@ MLINKS+=atan.3 atanf.3 atan.3 atanl.3 MLINKS+=atanh.3 atanhf.3 MLINKS+=atan2.3 atan2f.3 atan2.3 atan2l.3 \ atan2.3 carg.3 atan2.3 cargf.3 atan2.3 cargl.3 +MLINKS+=ccos.3 ccosf.3 ccos.3 csin.3 ccos.3 csinf.3 ccos.3 ctan.3 ccos.3 ctanf.3 +MLINKS+=ccosh.3 ccoshf.3 ccosh.3 csinh.3 ccosh.3 csinhf.3 \ + ccosh.3 ctanh.3 ccosh.3 ctanhf.3 MLINKS+=ceil.3 ceilf.3 ceil.3 ceill.3 MLINKS+=cexp.3 cexpf.3 MLINKS+=cimag.3 cimagf.3 cimag.3 cimagl.3 \ Modified: head/lib/msun/Symbol.map ============================================================================== --- head/lib/msun/Symbol.map Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/Symbol.map Mon Oct 17 05:41:03 2011 (r226458) @@ -237,4 +237,16 @@ FBSD_1.3 { fegetround; fesetround; fesetenv; + csin; + csinf; + csinh; + csinhf; + ccos; + ccosf; + ccosh; + ccoshf; + ctan; + ctanf; + ctanh; + ctanhf; }; Added: head/lib/msun/man/ccos.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/man/ccos.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,80 @@ +.\" Copyright (c) 2011 David Schultz +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 17, 2011 +.Dt CCOS 3 +.Os +.Sh NAME +.Nm ccos , +.Nm ccosf , +.Nm csin , +.Nm csinf +.Nm ctan , +.Nm ctanf +.Nd complex trigonometric functions +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In complex.h +.Ft double complex +.Fn ccos "double complex z" +.Ft float complex +.Fn ccosf "float complex z" +.Ft double complex +.Fn csin "double complex z" +.Ft float complex +.Fn csinf "float complex z" +.Ft double complex +.Fn ctan "double complex z" +.Ft float complex +.Fn ctanf "float complex z" +.Sh DESCRIPTION +The +.Fn ccos , +.Fn csin , +and +.Fn ctan +functions compute the cosine, sine, and tangent of the complex number +.Fa z , +respectively. +The +.Fn ccosf , +.Fn csinf , +and +.Fn ctanf +functions perform the same operations in +.Fa float +precision. +.Sh SEE ALSO +.Xr ccosh 3 , +.Xr complex 3 , +.Xr cos 3 , +.Xr math 3 , +.Xr sin 3 , +.Xr tan 3 +.Sh STANDARDS +These functions conform to +.St -isoC-99 . Added: head/lib/msun/man/ccosh.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/man/ccosh.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,80 @@ +.\" Copyright (c) 2011 David Schultz +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 17, 2011 +.Dt CCOSH 3 +.Os +.Sh NAME +.Nm ccosh , +.Nm ccoshf , +.Nm csinh , +.Nm csinhf +.Nm ctanh , +.Nm ctanhf +.Nd complex hyperbolic functions +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In complex.h +.Ft double complex +.Fn ccosh "double complex z" +.Ft float complex +.Fn ccoshf "float complex z" +.Ft double complex +.Fn csinh "double complex z" +.Ft float complex +.Fn csinhf "float complex z" +.Ft double complex +.Fn ctanh "double complex z" +.Ft float complex +.Fn ctanhf "float complex z" +.Sh DESCRIPTION +The +.Fn ccosh , +.Fn csinh , +and +.Fn ctanh +functions compute the hyperbolic cosine, sine, and tangent of the complex number +.Fa z , +respectively. +The +.Fn ccoshf , +.Fn csinhf , +and +.Fn ctanhf +functions perform the same operations in +.Fa float +precision. +.Sh SEE ALSO +.Xr ccos 3 , +.Xr complex 3 , +.Xr cosh 3 , +.Xr math 3 , +.Xr sinh 3 , +.Xr tanh 3 +.Sh STANDARDS +These functions conform to +.St -isoC-99 . Modified: head/lib/msun/man/complex.3 ============================================================================== --- head/lib/msun/man/complex.3 Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/man/complex.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 7, 2011 +.Dd October 17, 2011 .Dt COMPLEX 3 .Os .Sh NAME @@ -86,6 +86,16 @@ conj compute the complex conjugate cproj compute projection onto Riemann sphere creal compute the real part .El +.\" Section 7.3.5-6 of ISO C99 standard +.Ss Trigonometric and Hyperbolic Functions +.Cl +ccos cosine +ccosh hyperbolic cosine +csin sine +csinh hyperbolic sine +ctan tangent +ctanh hyperbolic tangent +.El .Sh SEE ALSO .Xr math 3 , .Xr fenv 3 , @@ -101,20 +111,14 @@ The functions described here conform to .St -isoC-99 . .Sh BUGS -The trigonmetric and hyperbolic functions +The inverse trigonmetric and hyperbolic functions .Fn cacos , .Fn cacosh , .Fn casin , .Fn casinh , .Fn catan , -.Fn catanh , -.Fn ccos , -.Fn ccosh , -.Fn csin , -.Fn csinh , -.Fn ctan , and -.Fn ctanh +.Fn catanh are not implemented. .Pp The logarithmic functions Modified: head/lib/msun/man/cos.3 ============================================================================== --- head/lib/msun/man/cos.3 Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/man/cos.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -71,6 +71,7 @@ functions return the cosine value. .Xr asin 3 , .Xr atan 3 , .Xr atan2 3 , +.Xr ccos 3 , .Xr cosh 3 , .Xr math 3 , .Xr sin 3 , Modified: head/lib/msun/man/cosh.3 ============================================================================== --- head/lib/msun/man/cosh.3 Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/man/cosh.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -55,6 +55,7 @@ functions compute the hyperbolic cosine .Xr asin 3 , .Xr atan 3 , .Xr atan2 3 , +.Xr ccosh 3 , .Xr cos 3 , .Xr math 3 , .Xr sin 3 , Modified: head/lib/msun/man/sin.3 ============================================================================== --- head/lib/msun/man/sin.3 Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/man/sin.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -70,6 +70,7 @@ functions return the sine value. .Xr asin 3 , .Xr atan 3 , .Xr atan2 3 , +.Xr csin 3 , .Xr cos 3 , .Xr cosh 3 , .Xr math 3 , Modified: head/lib/msun/man/sinh.3 ============================================================================== --- head/lib/msun/man/sinh.3 Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/man/sinh.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -56,6 +56,7 @@ functions compute the hyperbolic sine of .Xr atan2 3 , .Xr cos 3 , .Xr cosh 3 , +.Xr csinh 3 , .Xr math 3 , .Xr sin 3 , .Xr tan 3 , Modified: head/lib/msun/man/tan.3 ============================================================================== --- head/lib/msun/man/tan.3 Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/man/tan.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -73,6 +73,7 @@ functions return the tangent value. .Xr atan2 3 , .Xr cos 3 , .Xr cosh 3 , +.Xr ctan 3 , .Xr math 3 , .Xr sin 3 , .Xr sinh 3 , Modified: head/lib/msun/man/tanh.3 ============================================================================== --- head/lib/msun/man/tanh.3 Mon Oct 17 05:38:22 2011 (r226457) +++ head/lib/msun/man/tanh.3 Mon Oct 17 05:41:03 2011 (r226458) @@ -65,6 +65,7 @@ functions return the hyperbolic tangent .Xr atan2 3 , .Xr cos 3 , .Xr cosh 3 , +.Xr ctanh 3 , .Xr math 3 , .Xr sin 3 , .Xr sinh 3 , Added: head/lib/msun/src/s_ccosh.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_ccosh.c Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,138 @@ +/*- + * Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Hyperbolic cosine of a complex argument z = x + i y. + * + * cosh(z) = cosh(x+iy) + * = cosh(x) cos(y) + i sinh(x) sin(y). + * + * Exceptional values are noted in the comments within the source code. + * These values and the return value were taken from n1124.pdf. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "math_private.h" + +double complex +ccosh(double complex z) +{ + double x, y; + int32_t hx, hy, ix, iy, lx, ly; + + x = creal(z); + y = cimag(z); + + EXTRACT_WORDS(hx, lx, x); + EXTRACT_WORDS(hy, ly, y); + + ix = 0x7fffffff & hx; + iy = 0x7fffffff & hy; + + /* Handle the nearly-non-exceptional cases where x and y are finite. */ + if (ix < 0x7ff00000 && iy < 0x7ff00000) { + if ((iy | ly) == 0) + return (cpack(cosh(x), x * y)); + /* XXX We don't handle |x| > DBL_MAX ln(2) yet. */ + return (cpack(cosh(x) * cos(y), sinh(x) * sin(y))); + } + + /* + * cosh(+-0 +- I Inf) = dNaN + I sign(d(+-0, dNaN))0. + * The sign of 0 in the result is unspecified. Choice = normally + * the same as dNaN. Raise the invalid floating-point exception. + * + * cosh(+-0 +- I NaN) = d(NaN) + I sign(d(+-0, NaN))0. + * The sign of 0 in the result is unspecified. Choice = normally + * the same as d(NaN). + */ + if ((ix | lx) == 0 && iy >= 0x7ff00000) + return (cpack(y - y, copysign(0, x * (y - y)))); + + /* + * cosh(+-Inf +- I 0) = +Inf + I (+-)(+-)0. + * + * cosh(NaN +- I 0) = d(NaN) + I sign(d(NaN, +-0))0. + * The sign of 0 in the result is unspecified. + */ + if ((iy | ly) == 0 && ix >= 0x7ff00000) { + if (((hx & 0xfffff) | lx) == 0) + return (cpack(x * x, copysign(0, x) * y)); + return (cpack(x * x, copysign(0, (x + x) * y))); + } + + /* + * cosh(x +- I Inf) = dNaN + I dNaN. + * Raise the invalid floating-point exception for finite nonzero x. + * + * cosh(x + I NaN) = d(NaN) + I d(NaN). + * Optionally raises the invalid floating-point exception for finite + * nonzero x. Choice = don't raise (except for signaling NaNs). + */ + if (ix < 0x7ff00000 && iy >= 0x7ff00000) + return (cpack(y - y, x * (y - y))); + + /* + * cosh(+-Inf + I NaN) = +Inf + I d(NaN). + * + * cosh(+-Inf +- I Inf) = +Inf + I dNaN. + * The sign of Inf in the result is unspecified. Choice = always +. + * Raise the invalid floating-point exception. + * + * cosh(+-Inf + I y) = +Inf cos(y) +- I Inf sin(y) + */ + if (ix >= 0x7ff00000 && ((hx & 0xfffff) | lx) == 0) { + if (iy >= 0x7ff00000) + return (cpack(x * x, x * (y - y))); + return (cpack((x * x) * cos(y), x * sin(y))); + } + + /* + * cosh(NaN + I NaN) = d(NaN) + I d(NaN). + * + * cosh(NaN +- I Inf) = d(NaN) + I d(NaN). + * Optionally raises the invalid floating-point exception. + * Choice = raise. + * + * cosh(NaN + I y) = d(NaN) + I d(NaN). + * Optionally raises the invalid floating-point exception for finite + * nonzero y. Choice = don't raise (except for signaling NaNs). + */ + return (cpack((x * x) * (y - y), (x + x) * (y - y))); +} + +double complex +ccos(double complex z) +{ + + /* ccos(z) = ccosh(I * z) */ + return (ccosh(cpack(-cimag(z), creal(z)))); +} Added: head/lib/msun/src/s_ccoshf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_ccoshf.c Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Hyperbolic cosine of a complex argument. See s_ccosh.c for details. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "math_private.h" + +float complex +ccoshf(float complex z) +{ + float x, y; + int32_t hx, hy, ix, iy; + + x = crealf(z); + y = cimagf(z); + + GET_FLOAT_WORD(hx, x); + GET_FLOAT_WORD(hy, y); + + ix = 0x7fffffff & hx; + iy = 0x7fffffff & hy; + + if (ix < 0x7f800000 && iy < 0x7f800000) { + if (iy == 0) + return (cpackf(coshf(x), x * y)); + /* XXX We don't handle |x| > FLT_MAX ln(2) yet. */ + return (cpackf(coshf(x) * cosf(y), sinhf(x) * sinf(y))); + } + + if (ix == 0 && iy >= 0x7f800000) + return (cpackf(y - y, copysignf(0, x * (y - y)))); + + if (iy == 0 && ix >= 0x7f800000) { + if ((hx & 0x7fffff) == 0) + return (cpackf(x * x, copysignf(0, x) * y)); + return (cpackf(x * x, copysignf(0, (x + x) * y))); + } + + if (ix < 0x7f800000 && iy >= 0x7f800000) + return (cpackf(y - y, x * (y - y))); + + if (ix >= 0x7f800000 && (hx & 0x7fffff) == 0) { + if (iy >= 0x7f800000) + return (cpackf(x * x, x * (y - y))); + return (cpackf((x * x) * cosf(y), x * sinf(y))); + } + + return (cpackf((x * x) * (y - y), (x + x) * (y - y))); +} + +float complex +ccosf(float complex z) +{ + + return (ccoshf(cpackf(-cimagf(z), crealf(z)))); +} Added: head/lib/msun/src/s_csinh.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_csinh.c Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,140 @@ +/*- + * Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Hyperbolic sine of a complex argument z = x + i y. + * + * sinh(z) = sinh(x+iy) + * = sinh(x) cos(y) + i cosh(x) sin(y). + * + * Exceptional values are noted in the comments within the source code. + * These values and the return value were taken from n1124.pdf. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "math_private.h" + +double complex +csinh(double complex z) +{ + double x, y; + int32_t hx, hy, ix, iy, lx, ly; + + x = creal(z); + y = cimag(z); + + EXTRACT_WORDS(hx, lx, x); + EXTRACT_WORDS(hy, ly, y); + + ix = 0x7fffffff & hx; + iy = 0x7fffffff & hy; + + /* Handle the nearly-non-exceptional cases where x and y are finite. */ + if (ix < 0x7ff00000 && iy < 0x7ff00000) { + if ((iy | ly) == 0) + return (cpack(sinh(x), y)); + /* XXX We don't handle |x| > DBL_MAX ln(2) yet. */ + return (cpack(sinh(x) * cos(y), cosh(x) * sin(y))); + } + + /* + * sinh(+-0 +- I Inf) = sign(d(+-0, dNaN))0 + I dNaN. + * The sign of 0 in the result is unspecified. Choice = normally + * the same as dNaN. Raise the invalid floating-point exception. + * + * sinh(+-0 +- I NaN) = sign(d(+-0, NaN))0 + I d(NaN). + * The sign of 0 in the result is unspecified. Choice = normally + * the same as d(NaN). + */ + if ((ix | lx) == 0 && iy >= 0x7ff00000) + return (cpack(copysign(0, x * (y - y)), y - y)); + + /* + * sinh(+-Inf +- I 0) = +-Inf + I (+-)(+-)0. + * + * sinh(NaN +- I 0) = d(NaN) + I +-0. + */ + if ((iy | ly) == 0 && ix >= 0x7ff00000) { + if (((hx & 0xfffff) | lx) == 0) + return (cpack(x, copysign(0, x) * y)); + return (cpack(x, copysign(0, y))); + } + + /* + * sinh(x +- I Inf) = dNaN + I dNaN. + * Raise the invalid floating-point exception for finite nonzero x. + * + * sinh(x + I NaN) = d(NaN) + I d(NaN). + * Optionally raises the invalid floating-point exception for finite + * nonzero x. Choice = don't raise (except for signaling NaNs). + */ + if (ix < 0x7ff00000 && iy >= 0x7ff00000) + return (cpack(y - y, x * (y - y))); + + /* + * sinh(+-Inf + I NaN) = +-Inf + I d(NaN). + * The sign of Inf in the result is unspecified. Choice = normally + * the same as d(NaN). + * + * sinh(+-Inf +- I Inf) = +Inf + I dNaN. + * The sign of Inf in the result is unspecified. Choice = always +. + * Raise the invalid floating-point exception. + * + * sinh(+-Inf + I y) = +-Inf cos(y) + I Inf sin(y) + */ + if (ix >= 0x7ff00000 && ((hx & 0xfffff) | lx) == 0) { + if (iy >= 0x7ff00000) + return (cpack(x * x, x * (y - y))); + return (cpack(x * cos(y), INFINITY * sin(y))); + } + + /* + * sinh(NaN + I NaN) = d(NaN) + I d(NaN). + * + * sinh(NaN +- I Inf) = d(NaN) + I d(NaN). + * Optionally raises the invalid floating-point exception. + * Choice = raise. + * + * sinh(NaN + I y) = d(NaN) + I d(NaN). + * Optionally raises the invalid floating-point exception for finite + * nonzero y. Choice = don't raise (except for signaling NaNs). + */ + return (cpack((x * x) * (y - y), (x + x) * (y - y))); +} + +double complex +csin(double complex z) +{ + + /* csin(z) = -I * csinh(I * z) */ + z = csinh(cpack(-cimag(z), creal(z))); + return (cpack(cimag(z), -creal(z))); +} Added: head/lib/msun/src/s_csinhf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_csinhf.c Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,88 @@ +/*- + * Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Hyperbolic sine of a complex argument z. See s_csinh.c for details. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "math_private.h" + +float complex +csinhf(float complex z) +{ + float x, y; + int32_t hx, hy, ix, iy; + + x = crealf(z); + y = cimagf(z); + + GET_FLOAT_WORD(hx, x); + GET_FLOAT_WORD(hy, y); + + ix = 0x7fffffff & hx; + iy = 0x7fffffff & hy; + + if (ix < 0x7f800000 && iy < 0x7f800000) { + if (iy == 0) + return (cpackf(sinhf(x), y)); + /* XXX We don't handle |x| > FLT_MAX ln(2) yet. */ + return (cpackf(sinhf(x) * cosf(y), coshf(x) * sinf(y))); + } + + if (ix == 0 && iy >= 0x7f800000) + return (cpackf(copysignf(0, x * (y - y)), y - y)); + + if (iy == 0 && ix >= 0x7f800000) { + if ((hx & 0x7fffff) == 0) + return (cpackf(x, copysignf(0, x) * y)); + return (cpackf(x, copysignf(0, y))); + } + + if (ix < 0x7f800000 && iy >= 0x7f800000) + return (cpackf(y - y, x * (y - y))); + + if (ix >= 0x7f800000 && (hx & 0x7fffff) == 0) { + if (iy >= 0x7f800000) + return (cpackf(x * x, x * (y - y))); + return (cpackf(x * cosf(y), INFINITY * sinf(y))); + } + + return (cpackf((x * x) * (y - y), (x + x) * (y - y))); +} + +float complex +csinf(float complex z) +{ + + z = csinhf(cpackf(-cimagf(z), crealf(z))); + return (cpackf(cimagf(z), -crealf(z))); +} Added: head/lib/msun/src/s_ctanh.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_ctanh.c Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,137 @@ +/*- + * Copyright (c) 2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Hyperbolic tangent of a complex argument z = x + i y. + * + * The algorithm is from: + * + * W. Kahan. Branch Cuts for Complex Elementary Functions or Much + * Ado About Nothing's Sign Bit. In The State of the Art in + * Numerical Analysis, pp. 165 ff. Iserles and Powell, eds., 1987. + * + * Method: + * + * Let t = tan(x) + * beta = 1/cos^2(y) + * s = sinh(x) + * rho = cosh(x) + * + * We have: + * + * tanh(z) = sinh(z) / cosh(z) + * + * sinh(x) cos(y) + i cosh(x) sin(y) + * = --------------------------------- + * cosh(x) cos(y) + i sinh(x) sin(y) + * + * cosh(x) sinh(x) / cos^2(y) + i tan(y) + * = ------------------------------------- + * 1 + sinh^2(x) / cos^2(y) + * + * beta rho s + i t + * = ---------------- + * 1 + beta s^2 + * + * Modifications: + * + * I omitted the original algorithm's handling of overflow in tan(x) after + * verifying with nearpi.c that this can't happen in IEEE single or double + * precision. I also handle large x differently. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "math_private.h" + +double complex +ctanh(double complex z) +{ + double x, y; + double t, beta, s, rho, denom; + uint32_t hx, ix, lx; + + x = creal(z); + y = cimag(z); + + EXTRACT_WORDS(hx, lx, x); + ix = hx & 0x7fffffff; + + /* + * ctanh(NaN + i 0) = NaN + i 0 + * + * ctanh(NaN + i y) = NaN + i NaN for y != 0 + * + * The imaginary part has the sign of x*sin(2*y), but there's no + * special effort to get this right. + * + * ctanh(+-Inf +- i Inf) = +-1 +- 0 + * + * ctanh(+-Inf + i y) = +-1 + 0 sin(2y) for y finite + * + * The imaginary part of the sign is unspecified. This special + * case is only needed to avoid a spurious invalid exception when + * y is infinite. + */ + if (ix >= 0x7ff00000) { + if ((ix & 0xfffff) | lx) /* x is NaN */ + return (cpack(x, (y == 0 ? y : x * y))); + SET_HIGH_WORD(x, hx - 0x40000000); /* x = copysign(1, x) */ + return (cpack(x, copysign(0, isinf(y) ? y : sin(y) * cos(y)))); + } + + /* + * ctanh(+-huge + i +-y) ~= +-1 +- i 2sin(2y)/exp(2x), using the + * approximation sinh^2(huge) ~= exp(2*huge) / 4. + * We use a modified formula to avoid spurious overflow. + */ + if (ix >= 0x40360000) { /* x >= 22 */ + double exp_mx = exp(-fabs(x)); + return (cpack(copysign(1, x), + 4 * sin(y) * cos(y) * exp_mx * exp_mx)); + } + + /* Kahan's algorithm */ + t = tan(y); + beta = 1.0 + t * t; /* = 1 / cos^2(y) */ + s = sinh(x); + rho = sqrt(1 + s * s); /* = cosh(x) */ + denom = 1 + beta * s * s; + return (cpack((beta * rho * s) / denom, t / denom)); +} + +double complex +ctan(double complex z) +{ + + /* ctan(z) = -I * ctanh(I * z) */ + z = ctanh(cpack(-cimag(z), creal(z))); + return (cpack(cimag(z), -creal(z))); +} Added: head/lib/msun/src/s_ctanhf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_ctanhf.c Mon Oct 17 05:41:03 2011 (r226458) @@ -0,0 +1,81 @@ +/*- + * Copyright (c) 2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 05:42:53 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 770711065670; Mon, 17 Oct 2011 05:42:53 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66DD68FC13; Mon, 17 Oct 2011 05:42:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9H5grlb097026; Mon, 17 Oct 2011 05:42:53 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9H5gro3097024; Mon, 17 Oct 2011 05:42:53 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110170542.p9H5gro3097024@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 17 Oct 2011 05:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226459 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 05:42:53 -0000 Author: jchandra Date: Mon Oct 17 05:42:53 2011 New Revision: 226459 URL: http://svn.freebsd.org/changeset/base/226459 Log: Fix for crash on MIPS /dev/mem read. Reading /dev/mem in 64 bit kernel crashes. This is because the page used to call uiomove_fromphys() from memrw() does not have md.pv_list initialized correctly. The fix is to call pmap_page_init() on the page to initialize it. Modified: head/sys/mips/mips/mem.c Modified: head/sys/mips/mips/mem.c ============================================================================== --- head/sys/mips/mips/mem.c Mon Oct 17 05:41:03 2011 (r226458) +++ head/sys/mips/mips/mem.c Mon Oct 17 05:42:53 2011 (r226459) @@ -87,6 +87,7 @@ memrw(struct cdev *dev, struct uio *uio, GIANT_REQUIRED; + pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; if (iov->iov_len == 0) { From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 06:10:32 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3388106566B; Mon, 17 Oct 2011 06:10:32 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C34BC8FC16; Mon, 17 Oct 2011 06:10:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9H6AWkH097972; Mon, 17 Oct 2011 06:10:32 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9H6AWYR097970; Mon, 17 Oct 2011 06:10:32 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110170610.p9H6AWYR097970@svn.freebsd.org> From: David Schultz Date: Mon, 17 Oct 2011 06:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226460 - head/lib/msun/man X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 06:10:32 -0000 Author: das Date: Mon Oct 17 06:10:32 2011 New Revision: 226460 URL: http://svn.freebsd.org/changeset/base/226460 Log: It's no longer accurate to say that math.h "constitute[s] the C math library," since complex.h, tgmath.h, and fenv.h are also part of the math library. Replace the outdated sentence with some references to the other parts. Modified: head/lib/msun/man/math.3 Modified: head/lib/msun/man/math.3 ============================================================================== --- head/lib/msun/man/math.3 Mon Oct 17 05:42:53 2011 (r226459) +++ head/lib/msun/man/math.3 Mon Oct 17 06:10:32 2011 (r226460) @@ -39,7 +39,21 @@ .Sh SYNOPSIS .In math.h .Sh DESCRIPTION -These functions constitute the C math library. +The math library includes the following components: +.Bl -column "" "polymorphic (type-generic) versions of functions" -compact -offset indent +.In math.h Ta basic routines and real-valued functions +.In complex.h Ta complex number support +.In tgmath.h Ta polymorphic (type-generic) versions of functions +.In fenv.h Ta routines to control rounding and exceptions +.El +The rest of this manual page describes the functions provided by +.In math.h . +Please consult +.Xr complex 3 , +.Xr tgmath 3 , +and +.Xr fenv 3 +for information on the other components. .Sh "LIST OF FUNCTIONS" Each of the following .Vt double @@ -200,6 +214,7 @@ so reproducible results cannot be guaran For most of these functions, however, incorrect rounding occurs rarely, and then only in very-close-to-halfway cases. .Sh SEE ALSO +.Xr complex 3 , .Xr fenv 3 , .Xr ieee 3 , .Xr tgmath 3 From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 06:51:06 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C765106564A for ; Mon, 17 Oct 2011 06:51:06 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id DA2A88FC1E for ; Mon, 17 Oct 2011 06:51:05 +0000 (UTC) Received: (qmail 81583 invoked from network); 17 Oct 2011 05:31:27 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 17 Oct 2011 05:31:27 -0000 Message-ID: <4E9BD057.4060609@freebsd.org> Date: Mon, 17 Oct 2011 08:51:03 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201110170005.p9H05VrP086262@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226454 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 06:51:06 -0000 On 17.10.2011 02:16, Bjoern A. Zeeb wrote: > > On 17. Oct 2011, at 00:05 , Bjoern A. Zeeb wrote: > >> Author: bz >> Date: Mon Oct 17 00:05:31 2011 >> New Revision: 226454 >> URL: http://svn.freebsd.org/changeset/base/226454 >> >> Log: >> Add syntactic sugar missed in r226437 and then not added either when moving >> things around in r226448 but desperately needed to always make things >> compile successfully. >> > > > GENRIC and LINT did not fail failed on it as it expanded to: > > int tcp_recvspace = 1024*64 > > followed by: > > #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ > SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) > > => > > #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ > SYSCTL_ASSERT_TYPE(INT, ptr, parent, name); \ > SYSCTL_OID(parent, nbr, name, \ > CTLTYPE_INT | CTLFLAG_MPSAFE | (access), \ > ptr, val, sysctl_handle_int, "I", descr) > > and the SYSCTL_ASSERT_TYPE() expanding to nothing in > > #define SYSCTL_ASSERT_TYPE(type, ptr, parent, name) > > leaving just the ';' around; so it ended up as: > > int tcp_recvspace = 1024*64 > > ; > and an expanded SYSCTL_OID(...); Oops, sorry missing that one. And thanks for comitting the fix. -- Andre >> MFC after: 1 week >> >> Modified: >> head/sys/netinet/tcp_input.c >> >> Modified: head/sys/netinet/tcp_input.c >> ============================================================================== >> --- head/sys/netinet/tcp_input.c Sun Oct 16 22:24:04 2011 (r226453) >> +++ head/sys/netinet/tcp_input.c Mon Oct 17 00:05:31 2011 (r226454) >> @@ -183,7 +183,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, >> &VNET_NAME(tcp_insecure_rst), 0, >> "Follow the old (insecure) criteria for accepting RST packets"); >> >> -VNET_DEFINE(int, tcp_recvspace) = 1024*64 >> +VNET_DEFINE(int, tcp_recvspace) = 1024*64; >> #define V_tcp_recvspace VNET(tcp_recvspace) >> SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, >> &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); > From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 09:54:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 319FB106566B; Mon, 17 Oct 2011 09:54:08 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 219D18FC15; Mon, 17 Oct 2011 09:54:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9H9s8GY005019; Mon, 17 Oct 2011 09:54:08 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9H9s8lV005017; Mon, 17 Oct 2011 09:54:08 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110170954.p9H9s8lV005017@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 17 Oct 2011 09:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226461 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 09:54:08 -0000 Author: pjd Date: Mon Oct 17 09:54:07 2011 New Revision: 226461 URL: http://svn.freebsd.org/changeset/base/226461 Log: When path to the configuration file is relative, obtain full path, so we can always find the file, even after daemonizing and changing working directory to /. MFC after: 1 week Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Mon Oct 17 06:10:32 2011 (r226460) +++ head/sbin/hastd/hastd.c Mon Oct 17 09:54:07 2011 (r226461) @@ -1168,6 +1168,22 @@ main(int argc, char *argv[]) pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile"); } + /* + * When path to the configuration file is relative, obtain full path, + * so we can always find the file, even after daemonizing and changing + * working directory to /. + */ + if (cfgpath[0] != '/') { + const char *newcfgpath; + + newcfgpath = realpath(cfgpath, NULL); + if (newcfgpath == NULL) { + pjdlog_exit(EX_CONFIG, + "Unable to obtain full path of %s", cfgpath); + } + cfgpath = newcfgpath; + } + cfg = yy_config_parse(cfgpath, true); PJDLOG_ASSERT(cfg != NULL); From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 09:59:04 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F5631065673; Mon, 17 Oct 2011 09:59:04 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8188FC14; Mon, 17 Oct 2011 09:59:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9H9x4Ti005524; Mon, 17 Oct 2011 09:59:04 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9H9x4KR005522; Mon, 17 Oct 2011 09:59:04 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110170959.p9H9x4KR005522@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 17 Oct 2011 09:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226462 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 09:59:04 -0000 Author: pjd Date: Mon Oct 17 09:59:04 2011 New Revision: 226462 URL: http://svn.freebsd.org/changeset/base/226462 Log: Remove redundant space. MFC after: 1 week Modified: head/sbin/hastd/hast.h Modified: head/sbin/hastd/hast.h ============================================================================== --- head/sbin/hastd/hast.h Mon Oct 17 09:54:07 2011 (r226461) +++ head/sbin/hastd/hast.h Mon Oct 17 09:59:04 2011 (r226462) @@ -111,7 +111,7 @@ struct hastd_listen { struct hastd_config { /* Address to communicate with hastctl(8). */ - char hc_controladdr[HAST_ADDRSIZE]; + char hc_controladdr[HAST_ADDRSIZE]; /* Protocol-specific data. */ struct proto_conn *hc_controlconn; /* Incoming control connection. */ From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 12:22:09 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B715E1065673; Mon, 17 Oct 2011 12:22:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A605D8FC12; Mon, 17 Oct 2011 12:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HCM90j022993; Mon, 17 Oct 2011 12:22:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HCM96S022987; Mon, 17 Oct 2011 12:22:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110171222.p9HCM96S022987@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 17 Oct 2011 12:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226463 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 12:22:09 -0000 Author: pjd Date: Mon Oct 17 12:22:09 2011 New Revision: 226463 URL: http://svn.freebsd.org/changeset/base/226463 Log: Allow to specify pidfile in HAST configuration file. MFC after: 1 week Modified: head/sbin/hastd/hast.conf.5 head/sbin/hastd/hast.h head/sbin/hastd/hastd.c head/sbin/hastd/parse.y head/sbin/hastd/token.l Modified: head/sbin/hastd/hast.conf.5 ============================================================================== --- head/sbin/hastd/hast.conf.5 Mon Oct 17 09:59:04 2011 (r226462) +++ head/sbin/hastd/hast.conf.5 Mon Oct 17 12:22:09 2011 (r226463) @@ -64,17 +64,20 @@ compression timeout exec metaflush "on" | "off" +pidfile on { # Node section control listen + pidfile } on { # Node section control listen + pidfile } resource { @@ -146,6 +149,14 @@ unix:///var/run/hastctl .Pp The default value is .Pa uds:///var/run/hastctl . +.It Ic pidfile Aq path +.Pp +File in which to store the process ID of the main +.Xr hastd 8 +process. +.Pp +The default value is +.Pa /var/run/hastd.pid . .It Ic listen Aq addr .Pp Address to listen on in form of: Modified: head/sbin/hastd/hast.h ============================================================================== --- head/sbin/hastd/hast.h Mon Oct 17 09:59:04 2011 (r226462) +++ head/sbin/hastd/hast.h Mon Oct 17 12:22:09 2011 (r226463) @@ -116,6 +116,8 @@ struct hastd_config { struct proto_conn *hc_controlconn; /* Incoming control connection. */ struct proto_conn *hc_controlin; + /* PID file path. */ + char hc_pidfile[PATH_MAX]; /* List of addresses to listen on. */ TAILQ_HEAD(, hastd_listen) hc_listen; /* List of resources. */ Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Mon Oct 17 09:59:04 2011 (r226462) +++ head/sbin/hastd/hastd.c Mon Oct 17 12:22:09 2011 (r226463) @@ -476,11 +476,15 @@ hastd_reload(void) struct hastd_config *newcfg; struct hast_resource *nres, *cres, *tres; struct hastd_listen *nlst, *clst; + struct pidfh *newpfh; unsigned int nlisten; uint8_t role; + pid_t otherpid; pjdlog_info("Reloading configuration..."); + newpfh = NULL; + newcfg = yy_config_parse(cfgpath, false); if (newcfg == NULL) goto failed; @@ -524,6 +528,31 @@ hastd_reload(void) pjdlog_error("No addresses to listen on."); goto failed; } + /* + * Check if pidfile's path has changed. + */ + if (strcmp(cfg->hc_pidfile, newcfg->hc_pidfile) != 0) { + newpfh = pidfile_open(newcfg->hc_pidfile, 0600, &otherpid); + if (newpfh == NULL) { + if (errno == EEXIST) { + pjdlog_errno(LOG_WARNING, + "Another hastd is already running, pidfile: %s, pid: %jd.", + newcfg->hc_pidfile, (intmax_t)otherpid); + } else { + pjdlog_errno(LOG_WARNING, + "Unable to open or create pidfile %s", + newcfg->hc_pidfile); + } + } else if (pidfile_write(newpfh) < 0) { + /* Write PID to a file. */ + pjdlog_errno(LOG_WARNING, + "Unable to write PID to file %s", + newcfg->hc_pidfile); + } else { + pjdlog_debug(1, "PID stored in %s.", + newcfg->hc_pidfile); + } + } /* No failures from now on. */ @@ -540,6 +569,13 @@ hastd_reload(void) sizeof(cfg->hc_controladdr)); } /* + * Switch to new pidfile. + */ + (void)pidfile_remove(pfh); + pfh = newpfh; + (void)strlcpy(cfg->hc_pidfile, newcfg->hc_pidfile, + sizeof(cfg->hc_pidfile)); + /* * Switch to new listen addresses. Close all that were removed. */ while ((clst = TAILQ_FIRST(&cfg->hc_listen)) != NULL) { @@ -666,6 +702,8 @@ failed: } yy_config_free(newcfg); } + if (newpfh != NULL) + (void)pidfile_remove(newpfh); pjdlog_warning("Configuration not reloaded."); } @@ -1123,7 +1161,7 @@ main(int argc, char *argv[]) foreground = false; debuglevel = 0; - pidfile = HASTD_PIDFILE; + pidfile = NULL; for (;;) { int ch; @@ -1157,17 +1195,6 @@ main(int argc, char *argv[]) g_gate_load(); - pfh = pidfile_open(pidfile, 0600, &otherpid); - if (pfh == NULL) { - if (errno == EEXIST) { - pjdlog_exitx(EX_TEMPFAIL, - "Another hastd is already running, pid: %jd.", - (intmax_t)otherpid); - } - /* If we cannot create pidfile from other reasons, only warn. */ - pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile"); - } - /* * When path to the configuration file is relative, obtain full path, * so we can always find the file, even after daemonizing and changing @@ -1187,6 +1214,24 @@ main(int argc, char *argv[]) cfg = yy_config_parse(cfgpath, true); PJDLOG_ASSERT(cfg != NULL); + if (pidfile != NULL) { + if (strlcpy(cfg->hc_pidfile, pidfile, + sizeof(cfg->hc_pidfile)) >= sizeof(cfg->hc_pidfile)) { + pjdlog_exitx(EX_CONFIG, "Pidfile path is too long."); + } + } + pfh = pidfile_open(cfg->hc_pidfile, 0600, &otherpid); + if (pfh == NULL) { + if (errno == EEXIST) { + pjdlog_exitx(EX_TEMPFAIL, + "Another hastd is already running, pidfile: %s, pid: %jd.", + cfg->hc_pidfile, (intmax_t)otherpid); + } + /* If we cannot create pidfile for other reasons, only warn. */ + pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile %s", + cfg->hc_pidfile); + } + /* * Restore default actions for interesting signals in case parent * process (like init(8)) decided to ignore some of them (like SIGHUP). @@ -1234,7 +1279,10 @@ main(int argc, char *argv[]) /* Write PID to a file. */ if (pidfile_write(pfh) < 0) { pjdlog_errno(LOG_WARNING, - "Unable to write PID to a file"); + "Unable to write PID to a file %s", + cfg->hc_pidfile); + } else { + pjdlog_debug(1, "PID stored in %s.", cfg->hc_pidfile); } } Modified: head/sbin/hastd/parse.y ============================================================================== --- head/sbin/hastd/parse.y Mon Oct 17 09:59:04 2011 (r226462) +++ head/sbin/hastd/parse.y Mon Oct 17 12:22:09 2011 (r226463) @@ -60,6 +60,7 @@ static struct hast_resource *curres; static bool mynode, hadmynode; static char depth0_control[HAST_ADDRSIZE]; +static char depth0_pidfile[PATH_MAX]; static char depth0_listen_tcp4[HAST_ADDRSIZE]; static char depth0_listen_tcp6[HAST_ADDRSIZE]; static TAILQ_HEAD(, hastd_listen) depth0_listen; @@ -193,6 +194,7 @@ yy_config_parse(const char *config, bool depth0_checksum = HAST_CHECKSUM_NONE; depth0_compression = HAST_COMPRESSION_HOLE; strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control)); + strlcpy(depth0_pidfile, HASTD_PIDFILE, sizeof(depth0_pidfile)); TAILQ_INIT(&depth0_listen); strlcpy(depth0_listen_tcp4, HASTD_LISTEN_TCP4, sizeof(depth0_listen_tcp4)); @@ -238,6 +240,10 @@ yy_config_parse(const char *config, bool strlcpy(lconfig->hc_controladdr, depth0_control, sizeof(lconfig->hc_controladdr)); } + if (lconfig->hc_pidfile[0] == '\0') { + strlcpy(lconfig->hc_pidfile, depth0_pidfile, + sizeof(lconfig->hc_pidfile)); + } if (!TAILQ_EMPTY(&depth0_listen)) TAILQ_CONCAT(&lconfig->hc_listen, &depth0_listen, hl_next); if (TAILQ_EMPTY(&lconfig->hc_listen)) { @@ -365,7 +371,7 @@ yy_config_free(struct hastd_config *conf } %} -%token CONTROL LISTEN PORT REPLICATION CHECKSUM COMPRESSION METAFLUSH +%token CONTROL PIDFILE LISTEN PORT REPLICATION CHECKSUM COMPRESSION METAFLUSH %token TIMEOUT EXEC EXTENTSIZE RESOURCE NAME LOCAL REMOTE SOURCE ON OFF %token FULLSYNC MEMSYNC ASYNC NONE CRC32 SHA256 HOLE LZF %token NUM STR OB CB @@ -395,6 +401,8 @@ statements: statement: control_statement | + pidfile_statement + | listen_statement | replication_statement @@ -444,6 +452,36 @@ control_statement: CONTROL STR } ; +pidfile_statement: PIDFILE STR + { + switch (depth) { + case 0: + if (strlcpy(depth0_pidfile, $2, + sizeof(depth0_pidfile)) >= + sizeof(depth0_pidfile)) { + pjdlog_error("pidfile argument is too long."); + free($2); + return (1); + } + break; + case 1: + if (!mynode) + break; + if (strlcpy(lconfig->hc_pidfile, $2, + sizeof(lconfig->hc_pidfile)) >= + sizeof(lconfig->hc_pidfile)) { + pjdlog_error("pidfile argument is too long."); + free($2); + return (1); + } + break; + default: + PJDLOG_ABORT("pidfile at wrong depth level"); + } + free($2); + } + ; + listen_statement: LISTEN STR { struct hastd_listen *lst; @@ -658,6 +696,8 @@ node_entries: node_entry: control_statement | + pidfile_statement + | listen_statement ; Modified: head/sbin/hastd/token.l ============================================================================== --- head/sbin/hastd/token.l Mon Oct 17 09:59:04 2011 (r226462) +++ head/sbin/hastd/token.l Mon Oct 17 12:22:09 2011 (r226463) @@ -46,6 +46,7 @@ int lineno; %% control { DP; return CONTROL; } +pidfile { DP; return PIDFILE; } listen { DP; return LISTEN; } port { DP; return PORT; } replication { DP; return REPLICATION; } From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 13:05:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28B0D106564A; Mon, 17 Oct 2011 13:05:57 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3F568FC0A; Mon, 17 Oct 2011 13:05:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HD5v1c024415; Mon, 17 Oct 2011 13:05:57 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HD5v2O024413; Mon, 17 Oct 2011 13:05:57 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110171305.p9HD5v2O024413@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 17 Oct 2011 13:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226464 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 13:05:58 -0000 Author: des Date: Mon Oct 17 13:05:57 2011 New Revision: 226464 URL: http://svn.freebsd.org/changeset/base/226464 Log: The rc_force test was inverted in the previous commit, so that dhclient ran for interfaces which were not configured for DHCP *unless* rc_force was set; the correct logic is to run dhclient for those interfaces *only if* rc_force is set. Broken by: des@ Noticed by: everybody and his dog Submitted by: rea@ PR: bin/161733 Modified: head/etc/rc.d/dhclient Modified: head/etc/rc.d/dhclient ============================================================================== --- head/etc/rc.d/dhclient Mon Oct 17 12:22:09 2011 (r226463) +++ head/etc/rc.d/dhclient Mon Oct 17 13:05:57 2011 (r226464) @@ -41,7 +41,7 @@ if [ -z $ifn ] ; then echo 1>&2 "$0: no interface specified" return 1 fi -elif [ -n "${rc_force}" ] && ! dhcpif $ifn; then +elif [ -z "${rc_force}" ] && ! dhcpif $ifn; then return 1 fi From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 13:12:48 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37D61106564A; Mon, 17 Oct 2011 13:12:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 272808FC12; Mon, 17 Oct 2011 13:12:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HDCmk1024664; Mon, 17 Oct 2011 13:12:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HDCmRu024662; Mon, 17 Oct 2011 13:12:48 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110171312.p9HDCmRu024662@svn.freebsd.org> From: Adrian Chadd Date: Mon, 17 Oct 2011 13:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226465 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 13:12:48 -0000 Author: adrian Date: Mon Oct 17 13:12:47 2011 New Revision: 226465 URL: http://svn.freebsd.org/changeset/base/226465 Log: Fix an issue with 11g beacon frames which looks to be a limitation on the largest multi-write size. From the submitter: == I looked further into the magic 88-byte threshold after which the bug occurs. It turns out that figure included the 24-byte tx_desc, and up to 64 bytes of beacon frame (header+data). rum_write_multi doesn't seem happy with writing >64 bytes at a time to the MAC register. If I break it up into separate calls (e.g. bytes 0-63, then bytes 64-65, written at the appropriate offset) I see the proper beacon frames being transmitted now. == Submitted by: Steven Chamberlain MFC after: 3 days Modified: head/sys/dev/usb/wlan/if_rum.c Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:05:57 2011 (r226464) +++ head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:12:47 2011 (r226465) @@ -1407,20 +1407,25 @@ rum_write_multi(struct rum_softc *sc, ui { struct usb_device_request req; usb_error_t error; + int offset; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RT2573_WRITE_MULTI_MAC; USETW(req.wValue, 0); - USETW(req.wIndex, reg); - USETW(req.wLength, len); - error = rum_do_request(sc, &req, buf); - if (error != 0) { - device_printf(sc->sc_dev, - "could not multi write MAC register: %s\n", - usbd_errstr(error)); + /* write at most 64 bytes at a time */ + for (offset = 0; offset < len; offset += 64) { + USETW(req.wIndex, reg + offset); + USETW(req.wLength, MIN(len - offset, 64)); + + error = rum_do_request(sc, &req, buf + offset); + if (error != 0) { + device_printf(sc->sc_dev, + "could not multi write MAC register: %s\n", + usbd_errstr(error)); + return (error); + } } - return (error); } static void From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 13:25:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A4EA1065672; Mon, 17 Oct 2011 13:25:58 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id C20928FC16; Mon, 17 Oct 2011 13:25:57 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D99D325D3888; Mon, 17 Oct 2011 13:25:56 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 30784BD3C41; Mon, 17 Oct 2011 13:25:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id iDvWPg3TcXDE; Mon, 17 Oct 2011 13:25:54 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 61437BD3C27; Mon, 17 Oct 2011 13:25:54 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110171312.p9HDCmRu024662@svn.freebsd.org> Date: Mon, 17 Oct 2011 13:25:53 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <2F05371F-0989-4424-9CCD-A92FB89F9191@lists.zabbadoz.net> References: <201110171312.p9HDCmRu024662@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226465 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 13:25:58 -0000 On 17. Oct 2011, at 13:12 , Adrian Chadd wrote: > Author: adrian > Date: Mon Oct 17 13:12:47 2011 > New Revision: 226465 > URL: http://svn.freebsd.org/changeset/base/226465 >=20 > Log: > Fix an issue with 11g beacon frames which looks to be a limitation > on the largest multi-write size. >=20 Does it compile? I just did a -DKERNFAST recompile and hit: /sys/modules/usb/rum/../../../dev/usb/wlan/if_rum.c: In function = 'rum_write_multi': /sys/modules/usb/rum/../../../dev/usb/wlan/if_rum.c:1421: warning: = pointer of type 'void *' used in arithmetic > =46rom the submitter: >=20 > =3D=3D > I looked further into the magic 88-byte threshold after which the bug > occurs. It turns out that figure included the 24-byte tx_desc, and = up > to 64 bytes of beacon frame (header+data). >=20 > rum_write_multi doesn't seem happy with writing >64 bytes at a time = to > the MAC register. If I break it up into separate calls (e.g. bytes > 0-63, then bytes 64-65, written at the appropriate offset) I see the > proper beacon frames being transmitted now. > =3D=3D >=20 > Submitted by: Steven Chamberlain > MFC after: 3 days >=20 > Modified: > head/sys/dev/usb/wlan/if_rum.c >=20 > Modified: head/sys/dev/usb/wlan/if_rum.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:05:57 2011 = (r226464) > +++ head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:12:47 2011 = (r226465) > @@ -1407,20 +1407,25 @@ rum_write_multi(struct rum_softc *sc, ui > { > struct usb_device_request req; > usb_error_t error; > + int offset; >=20 > req.bmRequestType =3D UT_WRITE_VENDOR_DEVICE; > req.bRequest =3D RT2573_WRITE_MULTI_MAC; > USETW(req.wValue, 0); > - USETW(req.wIndex, reg); > - USETW(req.wLength, len); >=20 > - error =3D rum_do_request(sc, &req, buf); > - if (error !=3D 0) { > - device_printf(sc->sc_dev, > - "could not multi write MAC register: %s\n", > - usbd_errstr(error)); > + /* write at most 64 bytes at a time */ > + for (offset =3D 0; offset < len; offset +=3D 64) { > + USETW(req.wIndex, reg + offset); > + USETW(req.wLength, MIN(len - offset, 64)); > + > + error =3D rum_do_request(sc, &req, buf + offset); > + if (error !=3D 0) { > + device_printf(sc->sc_dev, > + "could not multi write MAC register: %s\n", > + usbd_errstr(error)); > + return (error); > + } > } > - return (error); > } >=20 > static void --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 13:44:33 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEF441065674; Mon, 17 Oct 2011 13:44:33 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE0878FC0A; Mon, 17 Oct 2011 13:44:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HDiXqP025650; Mon, 17 Oct 2011 13:44:33 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HDiXte025648; Mon, 17 Oct 2011 13:44:33 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110171344.p9HDiXte025648@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 17 Oct 2011 13:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226466 - head/sys/dev/ofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 13:44:34 -0000 Author: jchandra Date: Mon Oct 17 13:44:33 2011 New Revision: 226466 URL: http://svn.freebsd.org/changeset/base/226466 Log: FDT changes for 64 bit kernel Use the offset into the device tree from fdtp as the phandle instead of using pointer into the device tree. This will make sure that the phandle fits into a uint32_t type, even when compiled for 64bit. Reviewed by: raj, nathanw, marcel Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Mon Oct 17 13:12:47 2011 (r226465) +++ head/sys/dev/ofw/ofw_fdt.c Mon Oct 17 13:44:33 2011 (r226466) @@ -109,22 +109,48 @@ ofw_fdt_init(ofw_t ofw, void *data) } /* - * Device tree functions + * Device tree functions. + * + * We use the offset from fdtp to the node as the 'phandle' in OF interface. + * + * phandle is a u32 value, therefore we cannot use the pointer to node as + * phandle in 64 bit. We also do not use the usual fdt offset as phandle, + * as it can be 0, and the OF interface has special meaning for phandle 0. */ +static phandle_t +fdt_offset_phandle(int offset) +{ + if (offset < 0) + return (0); + return ((phandle_t)offset + fdt_off_dt_struct(fdtp)); +} + static int fdt_phandle_offset(phandle_t p) { - const char *dt_struct; + int pint = (int)p; + int dtoff = fdt_off_dt_struct(fdtp); + + if (pint < dtoff) + return (-1); + return (pint - dtoff); +} + +static int +fdt_pointer_offset(const void *ptr) +{ + uintptr_t dt_struct, p; int offset; - dt_struct = (const char *)fdtp + fdt_off_dt_struct(fdtp); + p = (uintptr_t)ptr; + dt_struct = (uintptr_t)fdtp + fdt_off_dt_struct(fdtp); - if (((const char *)p < dt_struct) || - (const char *)p > (dt_struct + fdt_size_dt_struct(fdtp))) + if ((p < dt_struct) || + p > (dt_struct + fdt_size_dt_struct(fdtp))) return (-1); - offset = (const char *)p - dt_struct; + offset = p - dt_struct; if (offset < 0) return (-1); @@ -135,15 +161,13 @@ fdt_phandle_offset(phandle_t p) static phandle_t ofw_fdt_peer(ofw_t ofw, phandle_t node) { - phandle_t p; int depth, offset; if (node == 0) { /* Find root node */ offset = fdt_path_offset(fdtp, "/"); - p = (phandle_t)fdt_offset_ptr(fdtp, offset, sizeof(p)); - return (p); + return (fdt_offset_phandle(offset)); } offset = fdt_phandle_offset(node); @@ -155,10 +179,8 @@ ofw_fdt_peer(ofw_t ofw, phandle_t node) offset = fdt_next_node(fdtp, offset, &depth)) { if (depth < 0) return (0); - if (depth == 1) { - p = (phandle_t)fdt_offset_ptr(fdtp, offset, sizeof(p)); - return (p); - } + if (depth == 1) + return (fdt_offset_phandle(offset)); } return (0); @@ -168,7 +190,6 @@ ofw_fdt_peer(ofw_t ofw, phandle_t node) static phandle_t ofw_fdt_child(ofw_t ofw, phandle_t node) { - phandle_t p; int depth, offset; offset = fdt_phandle_offset(node); @@ -180,10 +201,8 @@ ofw_fdt_child(ofw_t ofw, phandle_t node) offset = fdt_next_node(fdtp, offset, &depth)) { if (depth < 0) return (0); - if (depth == 1) { - p = (phandle_t)fdt_offset_ptr(fdtp, offset, sizeof(p)); - return (p); - } + if (depth == 1) + return (fdt_offset_phandle(offset)); } return (0); @@ -193,7 +212,6 @@ ofw_fdt_child(ofw_t ofw, phandle_t node) static phandle_t ofw_fdt_parent(ofw_t ofw, phandle_t node) { - phandle_t p; int offset, paroffset; offset = fdt_phandle_offset(node); @@ -201,15 +219,13 @@ ofw_fdt_parent(ofw_t ofw, phandle_t node return (0); paroffset = fdt_parent_offset(fdtp, offset); - p = (phandle_t)fdt_offset_ptr(fdtp, paroffset, sizeof(phandle_t)); - return (p); + return (fdt_offset_phandle(paroffset)); } /* Return the package handle that corresponds to an instance handle. */ static phandle_t ofw_fdt_instance_to_package(ofw_t ofw, ihandle_t instance) { - phandle_t p; int offset; /* @@ -223,8 +239,7 @@ ofw_fdt_instance_to_package(ofw_t ofw, i if (offset < 0) return (-1); - p = (phandle_t)fdt_offset_ptr(fdtp, offset, sizeof(phandle_t)); - return (p); + return (fdt_offset_phandle(offset)); } /* Get the length of a property of a package. */ @@ -343,7 +358,7 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa if (prop == NULL) return (-1); - offset = fdt_phandle_offset((phandle_t)prop); + offset = fdt_pointer_offset(prop); rv = fdt_nextprop(offset, buf, size); return (rv); } @@ -374,14 +389,10 @@ ofw_fdt_canon(ofw_t ofw, const char *dev static phandle_t ofw_fdt_finddevice(ofw_t ofw, const char *device) { - phandle_t p; int offset; offset = fdt_path_offset(fdtp, device); - - p = (phandle_t)fdt_offset_ptr(fdtp, offset, sizeof(p)); - - return (p); + return (fdt_offset_phandle(offset)); } /* Return the fully qualified pathname corresponding to an instance. */ From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 13:51:00 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 870BB106567F; Mon, 17 Oct 2011 13:51:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76A328FC13; Mon, 17 Oct 2011 13:51:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HDp0DA025885; Mon, 17 Oct 2011 13:51:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HDp0Uo025883; Mon, 17 Oct 2011 13:51:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110171351.p9HDp0Uo025883@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 17 Oct 2011 13:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226467 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 13:51:00 -0000 Author: bz Date: Mon Oct 17 13:51:00 2011 New Revision: 226467 URL: http://svn.freebsd.org/changeset/base/226467 Log: Fix build after r226465. Cast void * to char * for arithmetics and make function return "no error". MFC after: 3 days Modified: head/sys/dev/usb/wlan/if_rum.c Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:44:33 2011 (r226466) +++ head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:51:00 2011 (r226467) @@ -1418,7 +1418,7 @@ rum_write_multi(struct rum_softc *sc, ui USETW(req.wIndex, reg + offset); USETW(req.wLength, MIN(len - offset, 64)); - error = rum_do_request(sc, &req, buf + offset); + error = rum_do_request(sc, &req, (char *)buf + offset); if (error != 0) { device_printf(sc->sc_dev, "could not multi write MAC register: %s\n", @@ -1426,6 +1426,8 @@ rum_write_multi(struct rum_softc *sc, ui return (error); } } + + return (USB_ERR_NORMAL_COMPLETION); } static void From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 13:54:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2816B106567C; Mon, 17 Oct 2011 13:54:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1827D8FC18; Mon, 17 Oct 2011 13:54:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HDstrM026035; Mon, 17 Oct 2011 13:54:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HDstfP026033; Mon, 17 Oct 2011 13:54:55 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110171354.p9HDstfP026033@svn.freebsd.org> From: Ed Schouten Date: Mon, 17 Oct 2011 13:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226468 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 13:54:56 -0000 Author: ed Date: Mon Oct 17 13:54:55 2011 New Revision: 226468 URL: http://svn.freebsd.org/changeset/base/226468 Log: Sort header file names. Spotted by: des Modified: head/usr.bin/look/look.c Modified: head/usr.bin/look/look.c ============================================================================== --- head/usr.bin/look/look.c Mon Oct 17 13:51:00 2011 (r226467) +++ head/usr.bin/look/look.c Mon Oct 17 13:54:55 2011 (r226468) @@ -61,8 +61,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 14:17:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2ADB106566B; Mon, 17 Oct 2011 14:17:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E26DA8FC0C; Mon, 17 Oct 2011 14:17:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HEHbJO026795; Mon, 17 Oct 2011 14:17:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HEHbeV026792; Mon, 17 Oct 2011 14:17:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110171417.p9HEHbeV026792@svn.freebsd.org> From: Adrian Chadd Date: Mon, 17 Oct 2011 14:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226469 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 14:17:38 -0000 Author: adrian Date: Mon Oct 17 14:17:37 2011 New Revision: 226469 URL: http://svn.freebsd.org/changeset/base/226469 Log: Don't enable the PHY radar errors in calcrxfilter. That way the radar errors aren't enabled prematurely. A DFS tester has reported that radar events are reported during channel scanning, before DFS is actually enabled. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 17 13:54:55 2011 (r226468) +++ head/sys/dev/ath/if_ath.c Mon Oct 17 14:17:37 2011 (r226469) @@ -2031,10 +2031,6 @@ ath_calcrxfilter(struct ath_softc *sc) if (ic->ic_opmode == IEEE80211_M_MONITOR) rfilt |= HAL_RX_FILTER_CONTROL; - if (sc->sc_dodfs) { - rfilt |= HAL_RX_FILTER_PHYRADAR; - } - /* * Enable RX of compressed BAR frames only when doing * 802.11n. Required for A-MPDU. From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 14:33:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF680106566B; Mon, 17 Oct 2011 14:33:41 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A66A18FC08; Mon, 17 Oct 2011 14:33:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HEXfvv027340; Mon, 17 Oct 2011 14:33:41 GMT (envelope-from se@svn.freebsd.org) Received: (from se@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HEXfge027338; Mon, 17 Oct 2011 14:33:41 GMT (envelope-from se@svn.freebsd.org) Message-Id: <201110171433.p9HEXfge027338@svn.freebsd.org> From: Stefan Esser Date: Mon, 17 Oct 2011 14:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226470 - head/etc/periodic/daily X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 14:33:42 -0000 Author: se Date: Mon Oct 17 14:33:41 2011 New Revision: 226470 URL: http://svn.freebsd.org/changeset/base/226470 Log: Fix error message in case the backup storage directory does not exist and cannot be created ($daily_backup_pkgdb_dbdir -> $daily_backup_pkgdb_dir). MFC after: 1 week Modified: head/etc/periodic/daily/220.backup-pkgdb Modified: head/etc/periodic/daily/220.backup-pkgdb ============================================================================== --- head/etc/periodic/daily/220.backup-pkgdb Mon Oct 17 14:17:37 2011 (r226469) +++ head/etc/periodic/daily/220.backup-pkgdb Mon Oct 17 14:33:41 2011 (r226470) @@ -25,7 +25,7 @@ case "$daily_backup_pkgdb_enable" in then install -d -o root -g wheel -m 750 $bak || { echo '$daily_backup_pkgdb_enable is enabled but' \ - "$daily_backup_pkgdb_dbdir doesn't exist" ; + "$daily_backup_pkgdb_dir doesn't exist" ; exit 2 ; } fi From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 14:37:24 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E69C6106566B; Mon, 17 Oct 2011 14:37:24 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6B298FC14; Mon, 17 Oct 2011 14:37:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HEbOuD027487; Mon, 17 Oct 2011 14:37:24 GMT (envelope-from se@svn.freebsd.org) Received: (from se@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HEbOXK027485; Mon, 17 Oct 2011 14:37:24 GMT (envelope-from se@svn.freebsd.org) Message-Id: <201110171437.p9HEbOXK027485@svn.freebsd.org> From: Stefan Esser Date: Mon, 17 Oct 2011 14:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226471 - head/etc/defaults X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 14:37:25 -0000 Author: se Date: Mon Oct 17 14:37:24 2011 New Revision: 226471 URL: http://svn.freebsd.org/changeset/base/226471 Log: Add missing default values for daily/800.scrub-zfs for documentation purposes. No functional change, since all parameters are set to their default values. MFC after: 1 week Modified: head/etc/defaults/periodic.conf Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Mon Oct 17 14:33:41 2011 (r226470) +++ head/etc/defaults/periodic.conf Mon Oct 17 14:37:24 2011 (r226471) @@ -147,6 +147,12 @@ daily_status_pkg_changes_enable="NO" # daily_queuerun_enable="YES" # Run mail queue daily_submit_queuerun="YES" # Also submit queue +# 800.scrub-zfs +daily_scrub_zfs_enable="NO" +daily_scrub_zfs_pools="" # empty string selects all pools +daily_scrub_zfs_default_threshold="30" # days between scrubs +#daily_scrub_zfs_${poolname}_threshold="30" # pool specific threshold + # 999.local daily_local="/etc/daily.local" # Local scripts From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 15:54:20 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D9811065689; Mon, 17 Oct 2011 15:54:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52D708FC21; Mon, 17 Oct 2011 15:54:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HFsKwY030098; Mon, 17 Oct 2011 15:54:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HFsKng030096; Mon, 17 Oct 2011 15:54:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201110171554.p9HFsKng030096@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 17 Oct 2011 15:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226474 - head/usr.sbin/usbdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 15:54:20 -0000 Author: hselasky Date: Mon Oct 17 15:54:20 2011 New Revision: 226474 URL: http://svn.freebsd.org/changeset/base/226474 Log: Make the usbdump utility work again by using the correct BPF structures. MFC after: 3 days Modified: head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Mon Oct 17 15:25:38 2011 (r226473) +++ head/usr.sbin/usbdump/usbdump.c Mon Oct 17 15:54:20 2011 (r226474) @@ -283,7 +283,7 @@ hexdump(const uint8_t *region, uint32_t } static void -print_apacket(const struct bpf_xhdr *hdr, const uint8_t *ptr, int ptr_len) +print_apacket(const struct bpf_hdr *hdr, const uint8_t *ptr, int ptr_len) { struct tm *tm; struct usbpf_pkthdr up_temp; @@ -318,8 +318,8 @@ print_apacket(const struct bpf_xhdr *hdr up->up_packet_count = le32toh(up->up_packet_count); up->up_endpoint = le32toh(up->up_endpoint); - tv.tv_sec = hdr->bh_tstamp.bt_sec; - tv.tv_usec = hdr->bh_tstamp.bt_frac; + tv.tv_sec = hdr->bh_tstamp.tv_sec; + tv.tv_usec = hdr->bh_tstamp.tv_usec; tm = localtime(&tv.tv_sec); len = strftime(buf, sizeof(buf), "%H:%M:%S", tm); @@ -386,12 +386,12 @@ print_apacket(const struct bpf_xhdr *hdr static void print_packets(uint8_t *data, const int datalen) { - const struct bpf_xhdr *hdr; + const struct bpf_hdr *hdr; uint8_t *ptr; uint8_t *next; for (ptr = data; ptr < (data + datalen); ptr = next) { - hdr = (const struct bpf_xhdr *)ptr; + hdr = (const struct bpf_hdr *)ptr; next = ptr + BPF_WORDALIGN(hdr->bh_hdrlen + hdr->bh_caplen); if (w_arg == NULL) { From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 17:02:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 0E0421065670; Mon, 17 Oct 2011 17:02:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id C59C1157274; Mon, 17 Oct 2011 17:02:58 +0000 (UTC) Message-ID: <4E9C5FC2.8000504@FreeBSD.org> Date: Mon, 17 Oct 2011 10:02:58 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Stefan Esser References: <201110171433.p9HEXfge027338@svn.freebsd.org> In-Reply-To: <201110171433.p9HEXfge027338@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226470 - head/etc/periodic/daily X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 17:02:59 -0000 On 10/17/2011 07:33, Stefan Esser wrote: > Author: se > Date: Mon Oct 17 14:33:41 2011 > New Revision: 226470 > URL: http://svn.freebsd.org/changeset/base/226470 > > Log: > Fix error message in case the backup storage directory does not exist and > cannot be created ($daily_backup_pkgdb_dbdir -> $daily_backup_pkgdb_dir). D'oh! Thanks for catching that. > MFC after: 1 week > > Modified: > head/etc/periodic/daily/220.backup-pkgdb > > Modified: head/etc/periodic/daily/220.backup-pkgdb > ============================================================================== > --- head/etc/periodic/daily/220.backup-pkgdb Mon Oct 17 14:17:37 2011 (r226469) > +++ head/etc/periodic/daily/220.backup-pkgdb Mon Oct 17 14:33:41 2011 (r226470) > @@ -25,7 +25,7 @@ case "$daily_backup_pkgdb_enable" in > then > install -d -o root -g wheel -m 750 $bak || { > echo '$daily_backup_pkgdb_enable is enabled but' \ > - "$daily_backup_pkgdb_dbdir doesn't exist" ; > + "$daily_backup_pkgdb_dir doesn't exist" ; > exit 2 ; } > fi > > -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 17:58:51 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25CC0106566B; Mon, 17 Oct 2011 17:58:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DF46C8FC08; Mon, 17 Oct 2011 17:58:50 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9308546B23; Mon, 17 Oct 2011 13:58:50 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 282178A02E; Mon, 17 Oct 2011 13:58:50 -0400 (EDT) From: John Baldwin To: Eitan Adler Date: Mon, 17 Oct 2011 13:29:00 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <201110161430.p9GEUTFj066335@svn.freebsd.org> In-Reply-To: <201110161430.p9GEUTFj066335@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110171329.00859.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 17 Oct 2011 13:58:50 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226436 - in head: . gnu/usr.bin/binutils/objcopy gnu/usr.bin/binutils/strip lib/libc/gen lib/libelf lib/libipsec lib/libpmc lib/msun/man libexec/rtld-elf/amd64 libexec/rtld-elf/i386 sb... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 17:58:51 -0000 On Sunday, October 16, 2011 10:30:29 am Eitan Adler wrote: > Author: eadler (ports committer) > Date: Sun Oct 16 14:30:28 2011 > New Revision: 226436 > URL: http://svn.freebsd.org/changeset/base/226436 > > Log: > - change "is is" to "is" or "it is" > - change "the the" to "the" > > Approved by: lstewart > Approved by: sahil (mentor) > MFC after: 3 days Hmm, at least some of these are indicative of other errors and the new sentences are still broken. Also, for changes to 3rd party code, you probably want to see about sending those upstream. You should probably send the e1000 change to jfv@ so it isn't lost in the next Intel driver import as well. > Modified: head/secure/usr.bin/openssl/man/ca.1 > ============================================================================== > --- head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:16:46 2011 (r226435) > +++ head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:30:28 2011 (r226436) > @@ -205,7 +205,7 @@ section for information on the required > .IP "\fB\-infiles\fR" 4 > .IX Item "-infiles" > if present this should be the last option, all subsequent arguments > -are assumed to the the names of files containing certificate requests. > +are assumed to the names of files containing certificate requests. Here the removed 'the' should be replaced with 'be'. > .IP "\fB\-out filename\fR" 4 > .IX Item "-out filename" > the output file to output certificates to. The default is standard > > Modified: head/sys/dev/isp/DriverManual.txt > ============================================================================== > --- head/sys/dev/isp/DriverManual.txt Sun Oct 16 14:16:46 2011 (r226435) > +++ head/sys/dev/isp/DriverManual.txt Sun Oct 16 14:30:28 2011 (r226436) > @@ -327,7 +327,7 @@ here in clarifying some of this. > > A succesful execution of isp_init will lead to the driver 'registering' > itself with this platform's SCSI subsystem. One assumed action for this > -is the registry of a function the the SCSI subsystem for this platform > +is the registry of a function the SCSI subsystem for this platform > will call when it has a SCSI command to run. The removed 'the' should be replaced with 'that'. > > The platform specific module function that receives this will do whatever > > Modified: head/sys/netinet/ipfw/dummynet.txt > ============================================================================== > --- head/sys/netinet/ipfw/dummynet.txt Sun Oct 16 14:16:46 2011 (r226435) > +++ head/sys/netinet/ipfw/dummynet.txt Sun Oct 16 14:30:28 2011 (r226436) > @@ -325,7 +325,7 @@ we do the following: > > dummynet_task() > =============== > -The dummynet_task() is the the main dummynet processing function and is > +The dummynet_task() is the main dummynet processing function and is Unrelated, this should probably say "The dummnet_task() function" (or routine, etc.). > called every tick. This function first calculate the new current time, then > it checks if it is the time to wake up object from the system_heap comparing > the current time and the key of the heap. Two types of object (really the > > Modified: head/usr.bin/compress/doc/NOTES > ============================================================================== > --- head/usr.bin/compress/doc/NOTES Sun Oct 16 14:16:46 2011 (r226435) > +++ head/usr.bin/compress/doc/NOTES Sun Oct 16 14:30:28 2011 (r226436) > @@ -51,7 +51,7 @@ comprehensive survey of an area which wi > > Until the dust clears, how you approach ideas which are patented depends > on how paranoid you are of a legal onslaught. Arbitrary? Yes. But > -the patent bar the the CCPA (Court of Customs and Patent Appeals) > +the patent bar the CCPA (Court of Customs and Patent Appeals) > thanks you for any uncertainty as they, at least, stand to gain > from any trouble. I think the first 'the' here should be 'of'. > Modified: head/usr.sbin/pkg_install/lib/version.c > ============================================================================== > --- head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:16:46 2011 (r226435) > +++ head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:30:28 2011 (r226436) > @@ -66,7 +66,7 @@ split_version(const char *pkgname, const > if (pkgname == NULL) > errx(2, "%s: Passed NULL pkgname.", __func__); > > - /* Look for the last '-' the the pkgname */ > + /* Look for the last '-' the pkgname */ The first 'the' should be 'in'. > ch = strrchr(pkgname, '-'); > /* Cheat if we are just passed a version, not a valid package name */ > versionstr = ch ? ch + 1 : pkgname; > -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 18:30:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 195A3106566C; Mon, 17 Oct 2011 18:30:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 095598FC18; Mon, 17 Oct 2011 18:30:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HIUISs035425; Mon, 17 Oct 2011 18:30:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HIUIiR035423; Mon, 17 Oct 2011 18:30:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201110171830.p9HIUIiR035423@svn.freebsd.org> From: Dimitry Andric Date: Mon, 17 Oct 2011 18:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226475 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 18:30:19 -0000 Author: dim Date: Mon Oct 17 18:30:18 2011 New Revision: 226475 URL: http://svn.freebsd.org/changeset/base/226475 Log: Update llvm/clang's target triple (confusingly named LLVM_HOSTTRIPLE) to $arch-unknown-freebsd10.0. Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Mon Oct 17 15:54:20 2011 (r226474) +++ head/lib/clang/clang.build.mk Mon Oct 17 18:30:18 2011 (r226475) @@ -14,8 +14,7 @@ CFLAGS+= -O1 .endif TARGET_ARCH?= ${MACHINE_ARCH} -# XXX: 8.0, to keep __FreeBSD_cc_version happy -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" .ifndef LLVM_REQUIRES_EH CXXFLAGS+=-fno-exceptions From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 19:21:42 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E924D1065677; Mon, 17 Oct 2011 19:21:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8E1B8FC25; Mon, 17 Oct 2011 19:21:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HJLg1M037061; Mon, 17 Oct 2011 19:21:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HJLgbW037059; Mon, 17 Oct 2011 19:21:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110171921.p9HJLgbW037059@svn.freebsd.org> From: Xin LI Date: Mon, 17 Oct 2011 19:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226476 - head/sys/dev/tws X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 19:21:43 -0000 Author: delphij Date: Mon Oct 17 19:21:42 2011 New Revision: 226476 URL: http://svn.freebsd.org/changeset/base/226476 Log: Return BUS_PROBE_DEFAULT instead of 0 (BUS_PROBE_SPECIFIC), allowing vendor provided driver to override in kernel driver. MFC after: 3 days Modified: head/sys/dev/tws/tws.c Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Mon Oct 17 18:30:18 2011 (r226475) +++ head/sys/dev/tws/tws.c Mon Oct 17 19:21:42 2011 (r226476) @@ -172,7 +172,7 @@ tws_probe(device_t dev) first_ctlr = 0; } - return(0); + return(BUS_PROBE_DEFAULT); } return (ENXIO); } From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 19:40:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFF65106566B; Mon, 17 Oct 2011 19:40:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5C838FC0A; Mon, 17 Oct 2011 19:40:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HJeQep037711; Mon, 17 Oct 2011 19:40:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HJeQfi037709; Mon, 17 Oct 2011 19:40:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110171940.p9HJeQfi037709@svn.freebsd.org> From: Ed Schouten Date: Mon, 17 Oct 2011 19:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226477 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 19:40:27 -0000 Author: ed Date: Mon Oct 17 19:40:26 2011 New Revision: 226477 URL: http://svn.freebsd.org/changeset/base/226477 Log: Fix whitespace. Modified: head/sys/sys/conf.h Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Mon Oct 17 19:21:42 2011 (r226476) +++ head/sys/sys/conf.h Mon Oct 17 19:40:26 2011 (r226477) @@ -55,15 +55,15 @@ struct cdev { void *__si_reserved; u_int si_flags; #define SI_ETERNAL 0x0001 /* never destroyed */ -#define SI_ALIAS 0x0002 /* carrier of alias name */ -#define SI_NAMED 0x0004 /* make_dev{_alias} has been called */ -#define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode reclaims */ -#define SI_CHILD 0x0010 /* child of another struct cdev **/ -#define SI_DEVOPEN 0x0020 /* opened by device */ -#define SI_CONSOPEN 0x0040 /* opened by console */ -#define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ -#define SI_CANDELETE 0x0100 /* can do BIO_DELETE */ -#define SI_CLONELIST 0x0200 /* on a clone list */ +#define SI_ALIAS 0x0002 /* carrier of alias name */ +#define SI_NAMED 0x0004 /* make_dev{_alias} has been called */ +#define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode reclaims */ +#define SI_CHILD 0x0010 /* child of another struct cdev **/ +#define SI_DEVOPEN 0x0020 /* opened by device */ +#define SI_CONSOPEN 0x0040 /* opened by console */ +#define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ +#define SI_CANDELETE 0x0100 /* can do BIO_DELETE */ +#define SI_CLONELIST 0x0200 /* on a clone list */ struct timespec si_atime; struct timespec si_ctime; struct timespec si_mtime; @@ -90,7 +90,7 @@ struct cdev { char __si_namebuf[SPECNAMELEN + 1]; }; -#define si_snapdata __si_u.__sid_snapdata +#define si_snapdata __si_u.__sid_snapdata #ifdef _KERNEL @@ -159,7 +159,7 @@ typedef int dumper_t( #define D_TTY 0x0004 #define D_MEM 0x0008 -#ifdef _KERNEL +#ifdef _KERNEL #define D_TYPEMASK 0xffff @@ -167,24 +167,24 @@ typedef int dumper_t( * Flags for d_flags which the drivers can set. */ #define D_TRACKCLOSE 0x00080000 /* track all closes */ -#define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */ -#define D_PSEUDO 0x00200000 /* make_dev() can return NULL */ -#define D_NEEDGIANT 0x00400000 /* driver want Giant */ +#define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */ +#define D_PSEUDO 0x00200000 /* make_dev() can return NULL */ +#define D_NEEDGIANT 0x00400000 /* driver want Giant */ #define D_NEEDMINOR 0x00800000 /* driver uses clone_create() */ /* * Version numbers. */ -#define D_VERSION_00 0x20011966 -#define D_VERSION_01 0x17032005 /* Add d_uid,gid,mode & kind */ -#define D_VERSION_02 0x28042009 /* Add d_mmap_single */ -#define D_VERSION_03 0x17122009 /* d_mmap takes memattr,vm_ooffset_t */ -#define D_VERSION D_VERSION_03 +#define D_VERSION_00 0x20011966 +#define D_VERSION_01 0x17032005 /* Add d_uid,gid,mode & kind */ +#define D_VERSION_02 0x28042009 /* Add d_mmap_single */ +#define D_VERSION_03 0x17122009 /* d_mmap takes memattr,vm_ooffset_t */ +#define D_VERSION D_VERSION_03 /* * Flags used for internal housekeeping */ -#define D_INIT 0x80000000 /* cdevsw initialized */ +#define D_INIT 0x80000000 /* cdevsw initialized */ /* * Character device switch table @@ -229,7 +229,7 @@ struct devsw_module_data { /* Do not initialize fields hereafter */ }; -#define DEV_MODULE(name, evh, arg) \ +#define DEV_MODULE(name, evh, arg) \ static moduledata_t name##_mod = { \ #name, \ evh, \ @@ -240,8 +240,8 @@ DECLARE_MODULE(name, name##_mod, SI_SUB_ void clone_setup(struct clonedevs **cdp); void clone_cleanup(struct clonedevs **); -#define CLONE_UNITMASK 0xfffff -#define CLONE_FLAG0 (CLONE_UNITMASK + 1) +#define CLONE_UNITMASK 0xfffff +#define CLONE_FLAG0 (CLONE_UNITMASK + 1) int clone_create(struct clonedevs **, struct cdevsw *, int *unit, struct cdev **dev, int extra); int count_dev(struct cdev *_dev); @@ -281,8 +281,8 @@ struct cdev *make_dev_alias(struct cdev int make_dev_alias_p(int _flags, struct cdev **_cdev, struct cdev *_pdev, const char *_fmt, ...) __printflike(4, 5); int make_dev_physpath_alias(int _flags, struct cdev **_cdev, - struct cdev *_pdev, struct cdev *_old_alias, - const char *_physpath); + struct cdev *_pdev, struct cdev *_old_alias, + const char *_physpath); void dev_lock(void); void dev_unlock(void); void setconf(void); From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 19:49:00 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D132F1065672; Mon, 17 Oct 2011 19:49:00 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDA048FC15; Mon, 17 Oct 2011 19:49:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HJn0so038026; Mon, 17 Oct 2011 19:49:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HJn0hQ038008; Mon, 17 Oct 2011 19:49:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110171949.p9HJn0hQ038008@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 Oct 2011 19:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226478 - in head/sys: dev/age dev/alc dev/ale dev/lge dev/msk dev/nfe dev/nge dev/nve dev/re dev/sge dev/sis dev/vge dev/vr dev/vte mips/atheros mips/idt pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 19:49:00 -0000 Author: yongari Date: Mon Oct 17 19:49:00 2011 New Revision: 226478 URL: http://svn.freebsd.org/changeset/base/226478 Log: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: head/sys/dev/age/if_age.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/lge/if_lge.c head/sys/dev/msk/if_msk.c head/sys/dev/nfe/if_nfe.c head/sys/dev/nge/if_nge.c head/sys/dev/nve/if_nve.c head/sys/dev/re/if_re.c head/sys/dev/sge/if_sge.c head/sys/dev/sis/if_sis.c head/sys/dev/vge/if_vge.c head/sys/dev/vr/if_vr.c head/sys/dev/vte/if_vte.c head/sys/mips/atheros/if_arge.c head/sys/mips/idt/if_kr.c head/sys/pci/if_rl.c Modified: head/sys/dev/age/if_age.c ============================================================================== --- head/sys/dev/age/if_age.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/age/if_age.c Mon Oct 17 19:49:00 2011 (r226478) @@ -282,9 +282,9 @@ age_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->age_miibus); mii_pollstat(mii); - AGE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + AGE_UNLOCK(sc); } /* Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/alc/if_alc.c Mon Oct 17 19:49:00 2011 (r226478) @@ -349,9 +349,9 @@ alc_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->alc_miibus); mii_pollstat(mii); - ALC_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALC_UNLOCK(sc); } static int Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/ale/if_ale.c Mon Oct 17 19:49:00 2011 (r226478) @@ -270,9 +270,9 @@ ale_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->ale_miibus); mii_pollstat(mii); - ALE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALE_UNLOCK(sc); } static int Modified: head/sys/dev/lge/if_lge.c ============================================================================== --- head/sys/dev/lge/if_lge.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/lge/if_lge.c Mon Oct 17 19:49:00 2011 (r226478) @@ -1430,9 +1430,9 @@ lge_ifmedia_sts(ifp, ifmr) LGE_LOCK(sc); mii = device_get_softc(sc->lge_miibus); mii_pollstat(mii); - LGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + LGE_UNLOCK(sc); return; } Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/msk/if_msk.c Mon Oct 17 19:49:00 2011 (r226478) @@ -995,9 +995,9 @@ msk_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); - MSK_IF_UNLOCK(sc_if); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MSK_IF_UNLOCK(sc_if); } static int Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/nfe/if_nfe.c Mon Oct 17 19:49:00 2011 (r226478) @@ -2952,10 +2952,10 @@ nfe_ifmedia_sts(struct ifnet *ifp, struc NFE_LOCK(sc); mii = device_get_softc(sc->nfe_miibus); mii_pollstat(mii); - NFE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NFE_UNLOCK(sc); } Modified: head/sys/dev/nge/if_nge.c ============================================================================== --- head/sys/dev/nge/if_nge.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/nge/if_nge.c Mon Oct 17 19:49:00 2011 (r226478) @@ -2417,9 +2417,9 @@ nge_mediastatus(struct ifnet *ifp, struc NGE_LOCK(sc); mii = device_get_softc(sc->nge_miibus); mii_pollstat(mii); - NGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NGE_UNLOCK(sc); } static int Modified: head/sys/dev/nve/if_nve.c ============================================================================== --- head/sys/dev/nve/if_nve.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/nve/if_nve.c Mon Oct 17 19:49:00 2011 (r226478) @@ -1202,10 +1202,10 @@ nve_ifmedia_sts(struct ifnet *ifp, struc NVE_LOCK(sc); mii = device_get_softc(sc->miibus); mii_pollstat(mii); - NVE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NVE_UNLOCK(sc); return; } Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/re/if_re.c Mon Oct 17 19:49:00 2011 (r226478) @@ -3214,9 +3214,9 @@ re_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/sge/if_sge.c Mon Oct 17 19:49:00 2011 (r226478) @@ -1746,9 +1746,9 @@ sge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - SGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SGE_UNLOCK(sc); } static int Modified: head/sys/dev/sis/if_sis.c ============================================================================== --- head/sys/dev/sis/if_sis.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/sis/if_sis.c Mon Oct 17 19:49:00 2011 (r226478) @@ -2237,9 +2237,9 @@ sis_ifmedia_sts(struct ifnet *ifp, struc SIS_LOCK(sc); mii = device_get_softc(sc->sis_miibus); mii_pollstat(mii); - SIS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SIS_UNLOCK(sc); } static int Modified: head/sys/dev/vge/if_vge.c ============================================================================== --- head/sys/dev/vge/if_vge.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/vge/if_vge.c Mon Oct 17 19:49:00 2011 (r226478) @@ -2173,9 +2173,9 @@ vge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VGE_UNLOCK(sc); } static void Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/vr/if_vr.c Mon Oct 17 19:49:00 2011 (r226478) @@ -2155,9 +2155,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct return; } mii_pollstat(mii); - VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VR_UNLOCK(sc); } static int Modified: head/sys/dev/vte/if_vte.c ============================================================================== --- head/sys/dev/vte/if_vte.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/dev/vte/if_vte.c Mon Oct 17 19:49:00 2011 (r226478) @@ -284,9 +284,9 @@ vte_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->vte_miibus); mii_pollstat(mii); - VTE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + VTE_UNLOCK(sc); } static int Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/mips/atheros/if_arge.c Mon Oct 17 19:49:00 2011 (r226478) @@ -1199,9 +1199,9 @@ arge_ifmedia_sts(struct ifnet *ifp, stru mii = device_get_softc(sc->arge_miibus); ARGE_LOCK(sc); mii_pollstat(mii); - ARGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ARGE_UNLOCK(sc); } struct arge_dmamap_arg { Modified: head/sys/mips/idt/if_kr.c ============================================================================== --- head/sys/mips/idt/if_kr.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/mips/idt/if_kr.c Mon Oct 17 19:49:00 2011 (r226478) @@ -945,9 +945,9 @@ kr_ifmedia_sts(struct ifnet *ifp, struct mii = device_get_softc(sc->kr_miibus); KR_LOCK(sc); mii_pollstat(mii); - KR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + KR_UNLOCK(sc); } struct kr_dmamap_arg { Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Mon Oct 17 19:40:26 2011 (r226477) +++ head/sys/pci/if_rl.c Mon Oct 17 19:49:00 2011 (r226478) @@ -1932,9 +1932,9 @@ rl_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 19:51:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D27EF106566B; Mon, 17 Oct 2011 19:51:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7DFB8FC0C; Mon, 17 Oct 2011 19:51:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HJpcJf038147; Mon, 17 Oct 2011 19:51:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HJpcg1038141; Mon, 17 Oct 2011 19:51:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110171951.p9HJpcg1038141@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 Oct 2011 19:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226479 - head/sys/dev/usb/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 19:51:39 -0000 Author: yongari Date: Mon Oct 17 19:51:38 2011 New Revision: 226479 URL: http://svn.freebsd.org/changeset/base/226479 Log: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: head/sys/dev/usb/net/if_aue.c head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_mos.c head/sys/dev/usb/net/if_rue.c head/sys/dev/usb/net/if_udav.c Modified: head/sys/dev/usb/net/if_aue.c ============================================================================== --- head/sys/dev/usb/net/if_aue.c Mon Oct 17 19:49:00 2011 (r226478) +++ head/sys/dev/usb/net/if_aue.c Mon Oct 17 19:51:38 2011 (r226479) @@ -1032,9 +1032,9 @@ aue_ifmedia_sts(struct ifnet *ifp, struc AUE_LOCK(sc); mii_pollstat(mii); - AUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AUE_UNLOCK(sc); } /* Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Mon Oct 17 19:49:00 2011 (r226478) +++ head/sys/dev/usb/net/if_axe.c Mon Oct 17 19:51:38 2011 (r226479) @@ -452,9 +452,9 @@ axe_ifmedia_sts(struct ifnet *ifp, struc AXE_LOCK(sc); mii_pollstat(mii); - AXE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AXE_UNLOCK(sc); } static void Modified: head/sys/dev/usb/net/if_mos.c ============================================================================== --- head/sys/dev/usb/net/if_mos.c Mon Oct 17 19:49:00 2011 (r226478) +++ head/sys/dev/usb/net/if_mos.c Mon Oct 17 19:51:38 2011 (r226479) @@ -551,10 +551,10 @@ mos_ifmedia_sts(struct ifnet *ifp, struc MOS_LOCK(sc); mii_pollstat(mii); - MOS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MOS_UNLOCK(sc); } static void Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Mon Oct 17 19:49:00 2011 (r226478) +++ head/sys/dev/usb/net/if_rue.c Mon Oct 17 19:51:38 2011 (r226479) @@ -889,9 +889,9 @@ rue_ifmedia_sts(struct ifnet *ifp, struc RUE_LOCK(sc); mii_pollstat(mii); - RUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RUE_UNLOCK(sc); } static void Modified: head/sys/dev/usb/net/if_udav.c ============================================================================== --- head/sys/dev/usb/net/if_udav.c Mon Oct 17 19:49:00 2011 (r226478) +++ head/sys/dev/usb/net/if_udav.c Mon Oct 17 19:51:38 2011 (r226479) @@ -751,9 +751,9 @@ udav_ifmedia_status(struct ifnet *ifp, s UDAV_LOCK(sc); mii_pollstat(mii); - UDAV_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + UDAV_UNLOCK(sc); } static void From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 19:58:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5EC810656D3; Mon, 17 Oct 2011 19:58:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5DA78FC1D; Mon, 17 Oct 2011 19:58:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HJwYL4038386; Mon, 17 Oct 2011 19:58:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HJwYZA038384; Mon, 17 Oct 2011 19:58:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110171958.p9HJwYZA038384@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 Oct 2011 19:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226480 - head/sys/dev/et X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 19:58:35 -0000 Author: yongari Date: Mon Oct 17 19:58:34 2011 New Revision: 226480 URL: http://svn.freebsd.org/changeset/base/226480 Log: Add missing driver lock in media status handler. Modified: head/sys/dev/et/if_et.c Modified: head/sys/dev/et/if_et.c ============================================================================== --- head/sys/dev/et/if_et.c Mon Oct 17 19:51:38 2011 (r226479) +++ head/sys/dev/et/if_et.c Mon Oct 17 19:58:34 2011 (r226480) @@ -542,9 +542,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 20:03:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4458F106567F; Mon, 17 Oct 2011 20:03:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33F7E8FC1E; Mon, 17 Oct 2011 20:03:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HK3dnS038814; Mon, 17 Oct 2011 20:03:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HK3dVR038812; Mon, 17 Oct 2011 20:03:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110172003.p9HK3dVR038812@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 Oct 2011 20:03:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226481 - head/sys/dev/et X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 20:03:39 -0000 Author: yongari Date: Mon Oct 17 20:03:38 2011 New Revision: 226481 URL: http://svn.freebsd.org/changeset/base/226481 Log: Make sure to report media change status to caller. Previously it always reported success. Modified: head/sys/dev/et/if_et.c Modified: head/sys/dev/et/if_et.c ============================================================================== --- head/sys/dev/et/if_et.c Mon Oct 17 19:58:34 2011 (r226480) +++ head/sys/dev/et/if_et.c Mon Oct 17 20:03:38 2011 (r226481) @@ -518,9 +518,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) PHY_RESET(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 21:31:03 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8187A106566C; Mon, 17 Oct 2011 21:31:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7141B8FC08; Mon, 17 Oct 2011 21:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HLV3j8041494; Mon, 17 Oct 2011 21:31:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HLV3xL041492; Mon, 17 Oct 2011 21:31:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201110172131.p9HLV3xL041492@svn.freebsd.org> From: Eitan Adler Date: Mon, 17 Oct 2011 21:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226482 - head/usr.sbin/makefs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 21:31:03 -0000 Author: eadler (ports committer) Date: Mon Oct 17 21:31:03 2011 New Revision: 226482 URL: http://svn.freebsd.org/changeset/base/226482 Log: - remove device keyword from makefs manpage PR: docs/144408 Submitted by: gcooper Approved by: gjb Approved by: sahil (mentor) MFC after: 1 week Modified: head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Mon Oct 17 20:03:38 2011 (r226481) +++ head/usr.sbin/makefs/makefs.8 Mon Oct 17 21:31:03 2011 (r226482) @@ -134,8 +134,7 @@ and .Sy uname or .Sy uid , -.Sy device -(in the case of block or character devices), and +and .Sy link (in the case of symbolic links). If From owner-svn-src-head@FreeBSD.ORG Mon Oct 17 22:23:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80E821065741; Mon, 17 Oct 2011 22:23:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 702938FC15; Mon, 17 Oct 2011 22:23:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HMNRgX043140; Mon, 17 Oct 2011 22:23:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9HMNRF3043138; Mon, 17 Oct 2011 22:23:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110172223.p9HMNRF3043138@svn.freebsd.org> From: Xin LI Date: Mon, 17 Oct 2011 22:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226483 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 22:23:27 -0000 Author: delphij Date: Mon Oct 17 22:23:27 2011 New Revision: 226483 URL: http://svn.freebsd.org/changeset/base/226483 Log: Fix a bug in sa_find_sizes() which could lead to panic: When calculating space needed for SA_BONUS buffers, hdrsize is always rounded up to next 8-aligned boundary. However, in two places the round up was done against sum of 'total' plus hdrsize. On the other hand, hdrsize increments by 4 each time, which means in certain conditions, we would end up returning with will_spill == 0 and (total + hdrsize) larger than full_space, leading to a failed assertion because it's invalid for dmu_set_bonus. Sponsored by: iXsystems, Inc. Reviewed by: mm MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Mon Oct 17 21:31:03 2011 (r226482) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Mon Oct 17 22:23:27 2011 (r226483) @@ -605,14 +605,14 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ * and spill buffer. */ if (buftype == SA_BONUS && *index == -1 && - P2ROUNDUP(*total + hdrsize, 8) > + (*total + P2ROUNDUP(hdrsize, 8)) > (full_space - sizeof (blkptr_t))) { *index = i; done = B_TRUE; } next: - if (P2ROUNDUP(*total + hdrsize, 8) > full_space && + if ((*total + P2ROUNDUP(hdrsize, 8)) > full_space && buftype == SA_BONUS) *will_spill = B_TRUE; } From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 01:22:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47A09106564A; Tue, 18 Oct 2011 01:22:19 +0000 (UTC) (envelope-from nalitoja@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 116428FC0A; Tue, 18 Oct 2011 01:22:17 +0000 (UTC) Received: by eyd10 with SMTP id 10so86940eyd.13 for ; Mon, 17 Oct 2011 18:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=rS0N74ilG4YiGwR9eqBQIMVoBNWdcjiYmbku8fsLb9A=; b=uxt119XFVxx19n/LDtkTS+aoSqmuCtmvAP53RmSsNSMm2MjlErFchqF2wGl7gLmy+Y 3ByAZrmdroEGLJG85Yim2zUIYKfpgRRN1V2ArvFwXKMYNN2dcMBSTkI9DX8S45DcOEbU U2/5juCRi4tZeVPuVcInI+xasavPsxOHfAe/0= Received: by 10.223.7.18 with SMTP id b18mr304526fab.31.1318899525805; Mon, 17 Oct 2011 17:58:45 -0700 (PDT) Received: from nil (politkovskaja.torservers.net. [77.247.181.165]) by mx.google.com with ESMTPS id l8sm523214fai.16.2011.10.17.17.58.43 (version=SSLv3 cipher=OTHER); Mon, 17 Oct 2011 17:58:45 -0700 (PDT) From: Nali Toja To: Dimitry Andric In-Reply-To: <201110171830.p9HIUIiR035423__37008.086537435$1318876298$gmane$org@svn.freebsd.org> (Dimitry Andric's message of "Mon, 17 Oct 2011 18:30:18 +0000 (UTC)") Date: Tue, 18 Oct 2011 00:58:21 +0000 Message-ID: <86y5wjktea.fsf@gmail.com> References: <201110171830.p9HIUIiR035423__37008.086537435$1318876298$gmane$org@svn.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226475 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 01:22:19 -0000 Dimitry Andric writes: > Log: > Update llvm/clang's target triple (confusingly named LLVM_HOSTTRIPLE) to > $arch-unknown-freebsd10.0. > > Modified: > head/lib/clang/clang.build.mk > > Modified: head/lib/clang/clang.build.mk > ============================================================================== > --- head/lib/clang/clang.build.mk Mon Oct 17 15:54:20 2011 (r226474) > +++ head/lib/clang/clang.build.mk Mon Oct 17 18:30:18 2011 (r226475) > @@ -14,8 +14,7 @@ CFLAGS+= -O1 > .endif > > TARGET_ARCH?= ${MACHINE_ARCH} > -# XXX: 8.0, to keep __FreeBSD_cc_version happy > -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" > +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" I think this results in __FreeBSD__ macro being defined as `1' and subsequently breaking clangworld where its value is used, e.g. ===> lib/libarchive (all) In file included from /src/lib/libarchive/archive_check_magic.c:26: In file included from /src/lib/libarchive/archive_platform.h:81: In file included from /obj/src/tmp/usr/include/inttypes.h:33: /obj/src/tmp/usr/include/sys/stdint.h:59:21: error: redefinition of typedef 'int64_t' is invalid in C [-Wtypedef- redefinition] typedef __intmax_t intmax_t; ^ /src/lib/libarchive/config_freebsd.h:166:18: note: expanded from: #define intmax_t int64_t ^ /obj/src/tmp/usr/include/sys/_stdint.h:49:20: note: previous definition is here typedef __int64_t int64_t; From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 02:43:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FB0A1065674; Tue, 18 Oct 2011 02:43:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FA668FC0A; Tue, 18 Oct 2011 02:43:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I2hxsw052330; Tue, 18 Oct 2011 02:43:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I2hxYt052328; Tue, 18 Oct 2011 02:43:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110180243.p9I2hxYt052328@svn.freebsd.org> From: Adrian Chadd Date: Tue, 18 Oct 2011 02:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226486 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 02:43:59 -0000 Author: adrian Date: Tue Oct 18 02:43:59 2011 New Revision: 226486 URL: http://svn.freebsd.org/changeset/base/226486 Log: Include opt_ah.h when compiling the driver. There are HAL methods which are actually direct register access, rather than simply HAL calls. Because of this, these register accesses would use the non-debug path in ah_osdep.h as opt_ah.h isn't included. With this, the correct register access methods are used, so debugging traces show things such as TXDP checking and TSF32 access. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Oct 18 01:56:43 2011 (r226485) +++ head/sys/dev/ath/if_ath.c Tue Oct 18 02:43:59 2011 (r226486) @@ -39,6 +39,11 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_ath.h" +/* + * This is needed for register operations which are performed + * by the driver - eg, calls to ath_hal_gettsf32(). + */ +#include "opt_ah.h" #include "opt_wlan.h" #include From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 02:46:26 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90C01106566C; Tue, 18 Oct 2011 02:46:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80D3A8FC16; Tue, 18 Oct 2011 02:46:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I2kQWu052457; Tue, 18 Oct 2011 02:46:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I2kQla052455; Tue, 18 Oct 2011 02:46:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110180246.p9I2kQla052455@svn.freebsd.org> From: Adrian Chadd Date: Tue, 18 Oct 2011 02:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226487 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 02:46:26 -0000 Author: adrian Date: Tue Oct 18 02:46:26 2011 New Revision: 226487 URL: http://svn.freebsd.org/changeset/base/226487 Log: Add in OS_REG_BIT_SET, a macro which does what it says it does. This will be used in an upcoming commit to the ar5212 HAL. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Tue Oct 18 02:43:59 2011 (r226486) +++ head/sys/dev/ath/ath_hal/ah_internal.h Tue Oct 18 02:46:26 2011 (r226487) @@ -472,6 +472,8 @@ isBigEndian(void) OS_REG_WRITE(_a, _r, OS_REG_READ(_a, _r) | (_f)) #define OS_REG_CLR_BIT(_a, _r, _f) \ OS_REG_WRITE(_a, _r, OS_REG_READ(_a, _r) &~ (_f)) +#define OS_REG_IS_BIT_SET(_a, _r, _f) \ + ((OS_REG_READ(_a, _r) & (_f)) != 0) /* Analog register writes may require a delay between each one (eg Merlin?) */ #define OS_A_REG_RMW_FIELD(_a, _r, _f, _v) \ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 03:01:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6BA61065672; Tue, 18 Oct 2011 03:01:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5CA68FC0C; Tue, 18 Oct 2011 03:01:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I31fSl053142; Tue, 18 Oct 2011 03:01:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I31f7p053135; Tue, 18 Oct 2011 03:01:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110180301.p9I31f7p053135@svn.freebsd.org> From: Adrian Chadd Date: Tue, 18 Oct 2011 03:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226488 - in head/sys/dev/ath/ath_hal: . ar5416 ar9001 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 03:01:41 -0000 Author: adrian Date: Tue Oct 18 03:01:41 2011 New Revision: 226488 URL: http://svn.freebsd.org/changeset/base/226488 Log: Implement the first part of the BB read workaround. The AR5008/AR9001 series NICs have a bug where BB register reads will occasionally be corrupted. This could cause issues with things such as ANI, which adjust operational parameters based on the BB radio register reads. This was introduced in the AR5008 chip and fixed with the first released AR9002 series NIC (AR9280v2.) A followup commit will implement the acutal WAR when reading BB registers. I'm still not sure how I'll implement it - whether it should be done in the osdep layer, or whether it should just live in the AR5416 HAL. Either way, they can use this capability bit to determine whether to implement the WAR or not. Thankyou to various sources inside Atheros who have helped me track down what this particular issue is. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Tue Oct 18 02:46:26 2011 (r226487) +++ head/sys/dev/ath/ath_hal/ah.c Tue Oct 18 03:01:41 2011 (r226488) @@ -659,6 +659,8 @@ ath_hal_getcapability(struct ath_hal *ah return pCap->halHasRxSelfLinkedTail ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_LONG_RXDESC_TSF: /* 32 bit TSF in RX descriptor? */ return pCap->halHasLongRxDescTsf ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_BB_READ_WAR: /* Baseband read WAR */ + return pCap->halHasBBReadWar? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Tue Oct 18 02:46:26 2011 (r226487) +++ head/sys/dev/ath/ath_hal/ah.h Tue Oct 18 03:01:41 2011 (r226488) @@ -149,6 +149,7 @@ typedef enum { HAL_CAP_STREAMS = 239, /* how many 802.11n spatial streams are available */ HAL_CAP_RXDESC_SELFLINK = 242, /* support a self-linked tail RX descriptor */ HAL_CAP_LONG_RXDESC_TSF = 243, /* hardware supports 32bit TSF in RX descriptor */ + HAL_CAP_BB_READ_WAR = 244, /* baseband read WAR */ } HAL_CAPABILITY_TYPE; /* Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Tue Oct 18 02:46:26 2011 (r226487) +++ head/sys/dev/ath/ath_hal/ah_internal.h Tue Oct 18 03:01:41 2011 (r226488) @@ -209,7 +209,8 @@ typedef struct { hal4kbSplitTransSupport : 1, halHasRxSelfLinkedTail : 1, halSupportsFastClock5GHz : 1, /* Hardware supports 5ghz fast clock; check eeprom/channel before using */ - halHasLongRxDescTsf : 1; + halHasLongRxDescTsf : 1, + halHasBBReadWar : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; uint16_t halKeyCacheSize; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Oct 18 02:46:26 2011 (r226487) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Oct 18 03:01:41 2011 (r226488) @@ -892,6 +892,12 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halEnhancedDfsSupport = AH_FALSE; /* Hardware supports 32 bit TSF values in the RX descriptor */ pCap->halHasLongRxDescTsf = AH_TRUE; + /* + * BB Read WAR: this is only for AR5008/AR9001 NICs + * It is also set individually in the AR91xx attach functions. + */ + if (AR_SREV_OWL(ah)) + pCap->halHasBBReadWar = AH_TRUE; if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { Modified: head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Tue Oct 18 02:46:26 2011 (r226487) +++ head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Tue Oct 18 03:01:41 2011 (r226488) @@ -298,6 +298,8 @@ ar9130FillCapabilityInfo(struct ath_hal */ pCap->halMbssidAggrSupport = AH_FALSE; pCap->hal4AddrAggrSupport = AH_TRUE; + /* BB Read WAR */ + pCap->halHasBBReadWar = AH_TRUE; return AH_TRUE; } Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Tue Oct 18 02:46:26 2011 (r226487) +++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Tue Oct 18 03:01:41 2011 (r226488) @@ -320,6 +320,8 @@ ar9160FillCapabilityInfo(struct ath_hal pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->halMbssidAggrSupport = AH_TRUE; pCap->hal4AddrAggrSupport = AH_TRUE; + /* BB Read WAR */ + pCap->halHasBBReadWar = AH_TRUE; /* AR9160 is a 2x2 stream device */ pCap->halTxStreams = 2; From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 03:17:06 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B41BD106564A; Tue, 18 Oct 2011 03:17:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A37EF8FC08; Tue, 18 Oct 2011 03:17:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I3H6jL053793; Tue, 18 Oct 2011 03:17:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I3H6p2053790; Tue, 18 Oct 2011 03:17:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110180317.p9I3H6p2053790@svn.freebsd.org> From: Adrian Chadd Date: Tue, 18 Oct 2011 03:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226489 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 03:17:06 -0000 Author: adrian Date: Tue Oct 18 03:17:06 2011 New Revision: 226489 URL: http://svn.freebsd.org/changeset/base/226489 Log: Port over some missing code from the ar5212 reference driver reset path. The final missing bit here is enabling the PCI configuration register read, but there's currently no glue available for the HAL to read (and write) PCI configuration space registers. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Tue Oct 18 03:01:41 2011 (r226488) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Tue Oct 18 03:17:06 2011 (r226489) @@ -96,6 +96,16 @@ write_common(struct ath_hal *ah, const H #define IS_DISABLE_FAST_ADC_CHAN(x) (((x) == 2462) || ((x) == 2467)) /* + * XXX NDIS 5.x code had MAX_RESET_WAIT set to 2000 for AP code + * and 10 for Client code + */ +#define MAX_RESET_WAIT 10 + +#define TX_QUEUEPEND_CHECK 1 +#define TX_ENABLE_CHECK 2 +#define RX_ENABLE_CHECK 4 + +/* * Places the device in and out of reset and then places sane * values in the registers based on EEPROM config, initialization * vectors (as determined by the mode), and station configuration @@ -1104,6 +1114,76 @@ ar5212ResetCalValid(struct ath_hal *ah, return AH_TRUE; } +/************************************************************** + * ar5212MacStop + * + * Disables all active QCUs and ensure that the mac is in a + * quiessence state. + */ +static HAL_BOOL +ar5212MacStop(struct ath_hal *ah) +{ + HAL_BOOL status; + uint32_t count; + uint32_t pendFrameCount; + uint32_t macStateFlag; + uint32_t queue; + + status = AH_FALSE; + + /* Disable Rx Operation ***********************************/ + OS_REG_SET_BIT(ah, AR_CR, AR_CR_RXD); + + /* Disable TX Operation ***********************************/ +#ifdef NOT_YET + ar5212SetTxdpInvalid(ah); +#endif + OS_REG_SET_BIT(ah, AR_Q_TXD, AR_Q_TXD_M); + + /* Polling operation for completion of disable ************/ + macStateFlag = TX_ENABLE_CHECK | RX_ENABLE_CHECK; + + for (count = 0; count < MAX_RESET_WAIT; count++) { + if (macStateFlag & RX_ENABLE_CHECK) { + if (!OS_REG_IS_BIT_SET(ah, AR_CR, AR_CR_RXE)) { + macStateFlag &= ~RX_ENABLE_CHECK; + } + } + + if (macStateFlag & TX_ENABLE_CHECK) { + if (!OS_REG_IS_BIT_SET(ah, AR_Q_TXE, AR_Q_TXE_M)) { + macStateFlag &= ~TX_ENABLE_CHECK; + macStateFlag |= TX_QUEUEPEND_CHECK; + } + } + if (macStateFlag & TX_QUEUEPEND_CHECK) { + pendFrameCount = 0; + for (queue = 0; queue < AR_NUM_DCU; queue++) { + pendFrameCount += OS_REG_READ(ah, + AR_Q0_STS + (queue * 4)) & + AR_Q_STS_PEND_FR_CNT; + } + if (pendFrameCount == 0) { + macStateFlag &= ~TX_QUEUEPEND_CHECK; + } + } + if (macStateFlag == 0) { + status = AH_TRUE; + break; + } + OS_DELAY(50); + } + + if (status != AH_TRUE) { + HALDEBUG(ah, HAL_DEBUG_RESET, + "%s:Failed to stop the MAC state 0x%x\n", + __func__, macStateFlag); + } + + return status; +} + + /* * Write the given reset bit mask into the reset register */ @@ -1113,12 +1193,75 @@ ar5212SetResetReg(struct ath_hal *ah, ui uint32_t mask = resetMask ? resetMask : ~0; HAL_BOOL rt; - /* XXX ar5212MacStop & co. */ - + /* Never reset the PCIE core */ if (AH_PRIVATE(ah)->ah_ispcie) { resetMask &= ~AR_RC_PCI; } + if (resetMask & (AR_RC_MAC | AR_RC_PCI)) { + /* + * To ensure that the driver can reset the + * MAC, wake up the chip + */ + rt = ar5212SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE); + + if (rt != AH_TRUE) { + return rt; + } + + /* + * Disable interrupts + */ + OS_REG_WRITE(ah, AR_IER, AR_IER_DISABLE); + OS_REG_READ(ah, AR_IER); + + if (ar5212MacStop(ah) != AH_TRUE) { + /* + * Failed to stop the MAC gracefully; let's be more forceful then + */ + + /* need some delay before flush any pending MMR writes */ + OS_DELAY(15); + OS_REG_READ(ah, AR_RXDP); + + resetMask |= AR_RC_MAC | AR_RC_BB; + /* _Never_ reset PCI Express core */ + if (! AH_PRIVATE(ah)->ah_ispcie) { + resetMask |= AR_RC_PCI; + } +#if 0 + /* + * Flush the park address of the PCI controller + */ + /* Read PCI slot information less than Hainan revision */ + if (AH_PRIVATE(ah)->ah_bustype == HAL_BUS_TYPE_PCI) { + if (!IS_5112_REV5_UP(ah)) { +#define PCI_COMMON_CONFIG_STATUS 0x06 + u_int32_t i; + u_int16_t reg16; + + for (i = 0; i < 32; i++) { + ath_hal_read_pci_config_space(ah, + PCI_COMMON_CONFIG_STATUS, + ®16, sizeof(reg16)); + } + } +#undef PCI_COMMON_CONFIG_STATUS + } +#endif + } else { + /* + * MAC stopped gracefully; no need to warm-reset the PCI bus + */ + + resetMask &= ~AR_RC_PCI; + + /* need some delay before flush any pending MMR writes */ + OS_DELAY(15); + OS_REG_READ(ah, AR_RXDP); + } + } + (void) OS_REG_READ(ah, AR_RXDP);/* flush any pending MMR writes */ OS_REG_WRITE(ah, AR_RC, resetMask); OS_DELAY(15); /* need to wait at least 128 clocks Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Tue Oct 18 03:01:41 2011 (r226488) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Tue Oct 18 03:17:06 2011 (r226489) @@ -94,7 +94,9 @@ #define AR_QTXDP(_i) (AR_Q0_TXDP + ((_i)<<2)) #define AR_Q_TXE 0x0840 /* MAC Transmit Queue enable */ +#define AR_Q_TXE_M 0x000003FF /* Mask for TXE (QCU 0-9) */ #define AR_Q_TXD 0x0880 /* MAC Transmit Queue disable */ +#define AR_Q_TXD_M 0x000003FF /* Mask for TXD (QCU 0-9) */ #define AR_Q0_CBRCFG 0x08c0 /* MAC CBR configuration */ #define AR_Q1_CBRCFG 0x08c4 /* MAC CBR configuration */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 03:24:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834BA106564A; Tue, 18 Oct 2011 03:24:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 735078FC0A; Tue, 18 Oct 2011 03:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I3OHCJ054043; Tue, 18 Oct 2011 03:24:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I3OHAY054041; Tue, 18 Oct 2011 03:24:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110180324.p9I3OHAY054041@svn.freebsd.org> From: Adrian Chadd Date: Tue, 18 Oct 2011 03:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226490 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 03:24:17 -0000 Author: adrian Date: Tue Oct 18 03:24:17 2011 New Revision: 226490 URL: http://svn.freebsd.org/changeset/base/226490 Log: Add a WAR from the reference code - clear the PCI error status upon detach. Obtained from: Atheros Modified: head/sys/dev/ath/if_ath_pci.c Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Tue Oct 18 03:17:06 2011 (r226489) +++ head/sys/dev/ath/if_ath_pci.c Tue Oct 18 03:24:17 2011 (r226490) @@ -199,6 +199,11 @@ ath_pci_detach(device_t dev) /* check if device was removed */ sc->sc_invalid = !bus_child_present(dev); + /* + * Do a config read to clear pre-existing pci error status. + */ + (void) pci_read_config(dev, PCIR_COMMAND, 4); + ath_detach(sc); bus_generic_detach(dev); From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 03:32:18 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9ADB106566C; Tue, 18 Oct 2011 03:32:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99A308FC15; Tue, 18 Oct 2011 03:32:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I3WIR3054312; Tue, 18 Oct 2011 03:32:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I3WI3U054310; Tue, 18 Oct 2011 03:32:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110180332.p9I3WI3U054310@svn.freebsd.org> From: Adrian Chadd Date: Tue, 18 Oct 2011 03:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226491 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 03:32:18 -0000 Author: adrian Date: Tue Oct 18 03:32:18 2011 New Revision: 226491 URL: http://svn.freebsd.org/changeset/base/226491 Log: Add in a currently-disabled WAR for PCI NICs. Some earlier series (~AR5212?) play badly with BIOSes. In these instances, they may require a forced reset (by transitioning the NIC through D0 -> D3 -> D0) before they probe/attach correctly. This is currently disabled because: * I haven't figured out the "right" code to ensure this only happens for PCI NICs (not PCIe or Cardbus); * I haven't at all done wide scale testing for this, and I'm not yet ready for said wide-scale testing. I'm documenting this primarily so users with misbehaving NICs have something to tinker with. Obtained from: Atheros Modified: head/sys/dev/ath/if_ath_pci.c Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Tue Oct 18 03:24:17 2011 (r226490) +++ head/sys/dev/ath/if_ath_pci.c Tue Oct 18 03:32:18 2011 (r226491) @@ -73,10 +73,27 @@ struct ath_pci_softc { #define BS_BAR 0x10 #define PCIR_RETRY_TIMEOUT 0x41 +#define PCIR_CFG_PMCSR 0x48 static void ath_pci_setup(device_t dev) { + /* Override the system latency timer */ + pci_write_config(dev, PCIR_LATTIMER, 0x80, 1); + + /* If a PCI NIC, force wakeup */ +#ifdef ATH_PCI_WAKEUP_WAR + /* XXX TODO: don't do this for non-PCI (ie, PCIe, Cardbus!) */ + if (1) { + uint16_t pmcsr; + pmcsr = pci_read_config(dev, PCIR_CFG_PMCSR, 2); + pmcsr |= 3; + pci_write_config(dev, PCIR_CFG_PMCSR, pmcsr, 2); + pmcsr &= ~3; + pci_write_config(dev, PCIR_CFG_PMCSR, pmcsr, 2); + } +#endif + /* * Disable retry timeout to keep PCI Tx retries from * interfering with C3 CPU state. From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 07:28:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 361CC1065673; Tue, 18 Oct 2011 07:28:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2469D8FC17; Tue, 18 Oct 2011 07:28:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I7SxOO061660; Tue, 18 Oct 2011 07:28:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I7SwSn061654; Tue, 18 Oct 2011 07:28:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180728.p9I7SwSn061654@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 07:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226495 - in head: sys/kern sys/sys usr.bin/kdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 07:28:59 -0000 Author: des Date: Tue Oct 18 07:28:58 2011 New Revision: 226495 URL: http://svn.freebsd.org/changeset/base/226495 Log: Revisit the capability failure trace points. The initial implementation only logged instances where an operation on a file descriptor required capabilities which the file descriptor did not have. By adding a type enum to struct ktr_cap_fail, we can catch other types of capability failures as well, such as disallowed system calls or attempts to wrap a file descriptor with more capabilities than it had to begin with. Modified: head/sys/kern/kern_ktrace.c head/sys/kern/sys_capability.c head/sys/kern/vfs_lookup.c head/sys/sys/ktrace.h head/usr.bin/kdump/kdump.c Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Tue Oct 18 07:17:44 2011 (r226494) +++ head/sys/kern/kern_ktrace.c Tue Oct 18 07:28:58 2011 (r226495) @@ -772,7 +772,8 @@ ktrstruct(name, data, datalen) } void -ktrcapfail(needed, held) +ktrcapfail(type, needed, held) + enum ktr_cap_fail_type type; cap_rights_t needed; cap_rights_t held; { @@ -784,6 +785,7 @@ ktrcapfail(needed, held) if (req == NULL) return; kcf = &req->ktr_data.ktr_cap_fail; + kcf->cap_type = type; kcf->cap_needed = needed; kcf->cap_held = held; ktr_enqueuerequest(td, req); Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Tue Oct 18 07:17:44 2011 (r226494) +++ head/sys/kern/sys_capability.c Tue Oct 18 07:28:58 2011 (r226495) @@ -218,7 +218,7 @@ cap_check(struct capability *c, cap_righ if ((c->cap_rights | rights) != c->cap_rights) { #ifdef KTRACE if (KTRPOINT(curthread, KTR_CAPFAIL)) - ktrcapfail(rights, c->cap_rights); + ktrcapfail(CAPFAIL_NOTCAPABLE, rights, c->cap_rights); #endif return (ENOTCAPABLE); } @@ -314,8 +314,14 @@ kern_capwrap(struct thread *td, struct f */ if (fp->f_type == DTYPE_CAPABILITY) { cp_old = fp->f_data; - if ((cp_old->cap_rights | rights) != cp_old->cap_rights) + if ((cp_old->cap_rights | rights) != cp_old->cap_rights) { +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_INCREASE, + rights, cp_old->cap_rights); +#endif return (ENOTCAPABLE); + } } /* Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Oct 18 07:17:44 2011 (r226494) +++ head/sys/kern/vfs_lookup.c Tue Oct 18 07:28:58 2011 (r226495) @@ -188,8 +188,13 @@ namei(struct nameidata *ndp) */ if (IN_CAPABILITY_MODE(td)) { ndp->ni_strictrelative = 1; - if (ndp->ni_dirfd == AT_FDCWD) + if (ndp->ni_dirfd == AT_FDCWD) { +#ifdef KTRACE + if (KTRPOINT(td, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_LOOKUP, 0, 0); +#endif error = ECAPMODE; + } } #endif if (error) { @@ -281,8 +286,13 @@ namei(struct nameidata *ndp) if (*(cnp->cn_nameptr) == '/') { vrele(dp); VFS_UNLOCK_GIANT(vfslocked); - if (ndp->ni_strictrelative != 0) + if (ndp->ni_strictrelative != 0) { +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_LOOKUP, 0, 0); +#endif return (ENOTCAPABLE); + } while (*(cnp->cn_nameptr) == '/') { cnp->cn_nameptr++; ndp->ni_pathlen--; @@ -644,6 +654,10 @@ dirloop: */ if (cnp->cn_flags & ISDOTDOT) { if (ndp->ni_strictrelative != 0) { +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_LOOKUP, 0, 0); +#endif error = ENOTCAPABLE; goto bad; } Modified: head/sys/sys/ktrace.h ============================================================================== --- head/sys/sys/ktrace.h Tue Oct 18 07:17:44 2011 (r226494) +++ head/sys/sys/ktrace.h Tue Oct 18 07:28:58 2011 (r226495) @@ -181,7 +181,14 @@ struct ktr_proc_ctor { * KTR_CAPFAIL - trace capability check failures */ #define KTR_CAPFAIL 12 +enum ktr_cap_fail_type { + CAPFAIL_NOTCAPABLE, /* insufficient capabilities in cap_check() */ + CAPFAIL_INCREASE, /* attempt to increase capabilities */ + CAPFAIL_SYSCALL, /* disallowed system call */ + CAPFAIL_LOOKUP, /* disallowed VFS lookup */ +}; struct ktr_cap_fail { + enum ktr_cap_fail_type cap_type; cap_rights_t cap_needed; cap_rights_t cap_held; }; @@ -230,7 +237,7 @@ void ktrprocexit(struct thread *); void ktrprocfork(struct proc *, struct proc *); void ktruserret(struct thread *); void ktrstruct(const char *, void *, size_t); -void ktrcapfail(cap_rights_t, cap_rights_t); +void ktrcapfail(enum ktr_cap_fail_type, cap_rights_t, cap_rights_t); #define ktrsockaddr(s) \ ktrstruct("sockaddr", (s), ((struct sockaddr *)(s))->sa_len) #define ktrstat(s) \ Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Oct 18 07:17:44 2011 (r226494) +++ head/usr.bin/kdump/kdump.c Tue Oct 18 07:28:58 2011 (r226495) @@ -1592,10 +1592,36 @@ invalid: void ktrcapfail(struct ktr_cap_fail *ktr) { - printf("needed "); - capname((intmax_t)ktr->cap_needed); - printf(" held "); - capname((intmax_t)ktr->cap_held); + switch (ktr->cap_type) { + case CAPFAIL_NOTCAPABLE: + /* operation on fd with insufficient capabilities */ + printf("operation requires "); + capname((intmax_t)ktr->cap_needed); + printf(", process holds "); + capname((intmax_t)ktr->cap_held); + break; + case CAPFAIL_INCREASE: + /* requested more capabilities than fd already has */ + printf("attempt to increase capabilities from "); + capname((intmax_t)ktr->cap_needed); + printf(" to "); + capname((intmax_t)ktr->cap_held); + break; + case CAPFAIL_SYSCALL: + /* called restricted syscall */ + printf("disallowed system call"); + break; + case CAPFAIL_LOOKUP: + /* used ".." in strict-relative mode */ + printf("restricted VFS lookup"); + break; + default: + printf("unknown capability failure: "); + capname((intmax_t)ktr->cap_needed); + printf(" "); + capname((intmax_t)ktr->cap_held); + break; + } } #if defined(__amd64__) || defined(__i386__) From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 07:29:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9005B1065787; Tue, 18 Oct 2011 07:29:21 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74A138FC12; Tue, 18 Oct 2011 07:29:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I7TLD0061718; Tue, 18 Oct 2011 07:29:21 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I7TLKf061710; Tue, 18 Oct 2011 07:29:21 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110180729.p9I7TLKf061710@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 18 Oct 2011 07:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226496 - in head/sys: conf dev/fdt mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 07:29:21 -0000 Author: jchandra Date: Tue Oct 18 07:29:21 2011 New Revision: 226496 URL: http://svn.freebsd.org/changeset/base/226496 Log: FDT support for MIPS. Add architecture specific files needed to compile MIPS with flattened device tree support. Added: head/sys/dev/fdt/fdt_mips.c (contents, props changed) head/sys/mips/include/fdt.h (contents, props changed) head/sys/mips/include/ofw_machdep.h (contents, props changed) Modified: head/sys/conf/Makefile.mips head/sys/conf/files.mips head/sys/dev/fdt/fdtbus.c head/sys/mips/include/intr_machdep.h Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Tue Oct 18 07:28:58 2011 (r226495) +++ head/sys/conf/Makefile.mips Tue Oct 18 07:29:21 2011 (r226496) @@ -28,6 +28,8 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" +INCLUDES+= -I$S/contrib/libfdt + LDSCRIPT_NAME?=ldscript.$M SYSTEM_LD:= ${SYSTEM_LD:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}} SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}} Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Tue Oct 18 07:28:58 2011 (r226495) +++ head/sys/conf/files.mips Tue Oct 18 07:29:21 2011 (r226496) @@ -78,6 +78,7 @@ libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard +libkern/memchr.c optional fdt libkern/memmove.c standard libkern/moddi3.c optional isa_mips32 libkern/qdivrem.c optional isa_mips32 @@ -108,3 +109,13 @@ dev/hwpmc/hwpmc_mips24k.c optional hwpmc dev/rt/if_rt.c optional rt dev/nvram2env/nvram2env.c optional nvram2env + +dev/ofw/openfirm.c optional fdt +dev/ofw/openfirmio.c optional fdt +dev/ofw/ofw_bus_if.m optional fdt +dev/ofw/ofw_if.m optional fdt +dev/ofw/ofw_bus_subr.c optional fdt +dev/ofw/ofw_fdt.c optional fdt + +dev/fdt/fdt_mips.c optional fdt + Added: head/sys/dev/fdt/fdt_mips.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_mips.c Tue Oct 18 07:29:21 2011 (r226496) @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "ofw_bus_if.h" +#include "fdt_common.h" + +struct fdt_fixup_entry fdt_fixup_table[] = { + { NULL, NULL } +}; + +fdt_pic_decode_t fdt_pic_table[] = { + NULL, + NULL, + NULL +}; Modified: head/sys/dev/fdt/fdtbus.c ============================================================================== --- head/sys/dev/fdt/fdtbus.c Tue Oct 18 07:28:58 2011 (r226495) +++ head/sys/dev/fdt/fdtbus.c Tue Oct 18 07:29:21 2011 (r226496) @@ -591,6 +591,9 @@ fdtbus_setup_intr(device_t bus, device_t #if defined(__powerpc__) err = powerpc_setup_intr(device_get_nameunit(child), rman_get_start(res), filter, ihand, arg, flags, cookiep); +#elif defined(__mips__) + cpu_establish_hardintr(device_get_nameunit(child), + filter, ihand, arg, rman_get_start(res), flags, cookiep); #elif defined(__arm__) arm_setup_irqhandler(device_get_nameunit(child), filter, ihand, arg, rman_get_start(res), flags, cookiep); @@ -617,7 +620,6 @@ fdtbus_deactivate_resource(device_t bus, return (rman_deactivate_resource(res)); } - static int fdtbus_teardown_intr(device_t bus, device_t child, struct resource *res, void *cookie) @@ -625,6 +627,9 @@ fdtbus_teardown_intr(device_t bus, devic #if defined(__powerpc__) return (powerpc_teardown_intr(cookie)); +#elif defined(__mips__) + /* mips does not have a teardown yet */ + return (0); #elif defined(__arm__) return (arm_remove_irqhandler(rman_get_start(res), cookie)); #endif Added: head/sys/mips/include/fdt.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/fdt.h Tue Oct 18 07:29:21 2011 (r226496) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_FDT_H_ +#define _MACHINE_FDT_H_ + +#include +#include + +/* Max interrupt number */ +#if defined(CPU_RMI) || defined(CPU_NLM) +#define FDT_INTR_MAX XLR_MAX_INTR +#else +#define FDT_INTR_MAX (NHARD_IRQS + NSOFT_IRQS) +#endif + +/* Map phandle/intpin pair to global IRQ number */ +#define FDT_MAP_IRQ(node, pin) (pin) + +/* + * Bus space tag. XXX endianess info needs to be derived from the blob. + */ +#define fdtbus_bs_tag NULL + +#endif /* _MACHINE_FDT_H_ */ Modified: head/sys/mips/include/intr_machdep.h ============================================================================== --- head/sys/mips/include/intr_machdep.h Tue Oct 18 07:28:58 2011 (r226495) +++ head/sys/mips/include/intr_machdep.h Tue Oct 18 07:29:21 2011 (r226496) @@ -29,6 +29,8 @@ #ifndef _MACHINE_INTR_MACHDEP_H_ #define _MACHINE_INTR_MACHDEP_H_ +#include + #if defined(CPU_RMI) || defined(CPU_NLM) #define XLR_MAX_INTR 64 #else Added: head/sys/mips/include/ofw_machdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/ofw_machdep.h Tue Oct 18 07:29:21 2011 (r226496) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2001 by Thomas Moestl . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_OFW_MACHDEP_H_ +#define _MACHINE_OFW_MACHDEP_H_ + +#include +#include +#include +#include +#include + +typedef uint32_t cell_t; +struct mem_region { + vm_offset_t mr_start; + vm_size_t mr_size; +}; + + +int OF_decode_addr(phandle_t, int, bus_space_tag_t *, bus_space_handle_t *); +void OF_getetheraddr(device_t dev, u_char *addr); +void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)); + +#endif /* _MACHINE_OFW_MACHDEP_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 07:31:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3140106564A; Tue, 18 Oct 2011 07:31:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2BF28FC08; Tue, 18 Oct 2011 07:31:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I7VnqJ061832; Tue, 18 Oct 2011 07:31:49 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I7Vnfg061830; Tue, 18 Oct 2011 07:31:49 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180731.p9I7Vnfg061830@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 07:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226497 - head/sys/fs/portalfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 07:31:49 -0000 Author: des Date: Tue Oct 18 07:31:49 2011 New Revision: 226497 URL: http://svn.freebsd.org/changeset/base/226497 Log: Trace attempts to open a portal device. Ceterum censeo portalfs esse delendam. Modified: head/sys/fs/portalfs/portal_vnops.c Modified: head/sys/fs/portalfs/portal_vnops.c ============================================================================== --- head/sys/fs/portalfs/portal_vnops.c Tue Oct 18 07:29:21 2011 (r226496) +++ head/sys/fs/portalfs/portal_vnops.c Tue Oct 18 07:31:49 2011 (r226497) @@ -240,8 +240,13 @@ portal_open(ap) * This may require access to a global namespace (e.g. an IP address); * disallow it entirely, as we do open(2). */ - if (IN_CAPABILITY_MODE(td)) + if (IN_CAPABILITY_MODE(td)) { +#ifdef KTRACE + if (KTRPOINT(td, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_SYSCALL, 0, 0); +#endif return (ECAPMODE); + } #endif /* From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 07:39:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C801065676; Tue, 18 Oct 2011 07:39:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A72B88FC0A; Tue, 18 Oct 2011 07:39:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I7dRTe062099; Tue, 18 Oct 2011 07:39:27 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I7dRem062094; Tue, 18 Oct 2011 07:39:27 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180739.p9I7dRem062094@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 07:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226498 - in head/sys: amd64/amd64 arm/arm i386/i386 sparc64/sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 07:39:27 -0000 Author: des Date: Tue Oct 18 07:39:27 2011 New Revision: 226498 URL: http://svn.freebsd.org/changeset/base/226498 Log: Trace attempts to call restricted MD syscalls. Modified: head/sys/amd64/amd64/sys_machdep.c head/sys/arm/arm/sys_machdep.c head/sys/i386/i386/sys_machdep.c head/sys/sparc64/sparc64/sys_machdep.c Modified: head/sys/amd64/amd64/sys_machdep.c ============================================================================== --- head/sys/amd64/amd64/sys_machdep.c Tue Oct 18 07:31:49 2011 (r226497) +++ head/sys/amd64/amd64/sys_machdep.c Tue Oct 18 07:39:27 2011 (r226498) @@ -203,6 +203,10 @@ sysarch(td, uap) case I386_SET_IOPERM: default: +#ifdef KTRACE + if (KTRPOINT(td, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_SYSCALL, 0, 0); +#endif return (ECAPMODE); } } Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Tue Oct 18 07:31:49 2011 (r226497) +++ head/sys/arm/arm/sys_machdep.c Tue Oct 18 07:39:27 2011 (r226498) @@ -122,6 +122,10 @@ sysarch(td, uap) break; default: +#ifdef KTRACE + if (KTRPOINT(td, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_SYSCALL, 0, 0); +#endif return (ECAPMODE); } } Modified: head/sys/i386/i386/sys_machdep.c ============================================================================== --- head/sys/i386/i386/sys_machdep.c Tue Oct 18 07:31:49 2011 (r226497) +++ head/sys/i386/i386/sys_machdep.c Tue Oct 18 07:39:27 2011 (r226498) @@ -130,6 +130,10 @@ sysarch(td, uap) case I386_SET_IOPERM: default: +#ifdef KTRACE + if (KTRPOINT(td, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_SYSCALL, 0, 0); +#endif return (ECAPMODE); } } Modified: head/sys/sparc64/sparc64/sys_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/sys_machdep.c Tue Oct 18 07:31:49 2011 (r226497) +++ head/sys/sparc64/sparc64/sys_machdep.c Tue Oct 18 07:39:27 2011 (r226498) @@ -69,6 +69,10 @@ sysarch(struct thread *td, struct sysarc break; default: +#ifdef KTRACE + if (KTRPOINT(td, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_SYSCALL, 0, 0); +#endif return (ECAPMODE); } } From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 08:09:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB3E106566B; Tue, 18 Oct 2011 08:09:45 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60CF18FC12; Tue, 18 Oct 2011 08:09:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I89jmW063111; Tue, 18 Oct 2011 08:09:45 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I89jVU063103; Tue, 18 Oct 2011 08:09:45 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110180809.p9I89jVU063103@svn.freebsd.org> From: Ed Schouten Date: Tue, 18 Oct 2011 08:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226500 - in head/sys: dev/gpio dev/ksyms dev/vkbd net security/audit sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 08:09:45 -0000 Author: ed Date: Tue Oct 18 08:09:44 2011 New Revision: 226500 URL: http://svn.freebsd.org/changeset/base/226500 Log: Get rid of D_PSEUDO. It seems the D_PSEUDO flag was meant to allow make_dev() to return NULL. Nowadays we have a different interface for that; make_dev_p(). There's no need to keep it there. While there, remove an unneeded D_NEEDMINOR from the gpio driver. Discussed with: gonzo@ (gpio) Modified: head/sys/dev/gpio/gpioc.c head/sys/dev/ksyms/ksyms.c head/sys/dev/vkbd/vkbd.c head/sys/net/if_tap.c head/sys/net/if_tun.c head/sys/security/audit/audit_pipe.c head/sys/sys/conf.h Modified: head/sys/dev/gpio/gpioc.c ============================================================================== --- head/sys/dev/gpio/gpioc.c Tue Oct 18 07:54:22 2011 (r226499) +++ head/sys/dev/gpio/gpioc.c Tue Oct 18 08:09:44 2011 (r226500) @@ -61,9 +61,6 @@ static struct cdevsw gpioc_cdevsw = { .d_version = D_VERSION, .d_ioctl = gpioc_ioctl, .d_name = "gpioc", -#if __FreeBSD_version >= 800039 - .d_flags = D_PSEUDO | D_NEEDMINOR -#endif }; struct gpioc_softc { Modified: head/sys/dev/ksyms/ksyms.c ============================================================================== --- head/sys/dev/ksyms/ksyms.c Tue Oct 18 07:54:22 2011 (r226499) +++ head/sys/dev/ksyms/ksyms.c Tue Oct 18 08:09:44 2011 (r226500) @@ -74,7 +74,7 @@ static d_mmap_t ksyms_mmap; static struct cdevsw ksyms_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_TRACKCLOSE, + .d_flags = D_TRACKCLOSE, .d_open = ksyms_open, .d_close = ksyms_close, .d_read = ksyms_read, Modified: head/sys/dev/vkbd/vkbd.c ============================================================================== --- head/sys/dev/vkbd/vkbd.c Tue Oct 18 07:54:22 2011 (r226499) +++ head/sys/dev/vkbd/vkbd.c Tue Oct 18 08:09:44 2011 (r226500) @@ -158,7 +158,7 @@ static int vkbd_data_read(vkbd_state_t static struct cdevsw vkbd_dev_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDGIANT | D_NEEDMINOR, + .d_flags = D_NEEDGIANT | D_NEEDMINOR, .d_open = vkbd_dev_open, .d_close = vkbd_dev_close, .d_read = vkbd_dev_read, Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Tue Oct 18 07:54:22 2011 (r226499) +++ head/sys/net/if_tap.c Tue Oct 18 08:09:44 2011 (r226500) @@ -132,7 +132,7 @@ static struct filterops tap_write_filter static struct cdevsw tap_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDMINOR, + .d_flags = D_NEEDMINOR, .d_open = tapopen, .d_close = tapclose, .d_read = tapread, Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Tue Oct 18 07:54:22 2011 (r226499) +++ head/sys/net/if_tun.c Tue Oct 18 08:09:44 2011 (r226500) @@ -165,7 +165,7 @@ static struct filterops tun_write_filter static struct cdevsw tun_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDMINOR, + .d_flags = D_NEEDMINOR, .d_open = tunopen, .d_close = tunclose, .d_read = tunread, Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Tue Oct 18 07:54:22 2011 (r226499) +++ head/sys/security/audit/audit_pipe.c Tue Oct 18 08:09:44 2011 (r226500) @@ -231,7 +231,7 @@ static d_kqfilter_t audit_pipe_kqfilter; static struct cdevsw audit_pipe_cdevsw = { .d_version = D_VERSION, - .d_flags = D_PSEUDO | D_NEEDMINOR, + .d_flags = D_NEEDMINOR, .d_open = audit_pipe_open, .d_close = audit_pipe_close, .d_read = audit_pipe_read, Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Tue Oct 18 07:54:22 2011 (r226499) +++ head/sys/sys/conf.h Tue Oct 18 08:09:44 2011 (r226500) @@ -168,7 +168,6 @@ typedef int dumper_t( */ #define D_TRACKCLOSE 0x00080000 /* track all closes */ #define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */ -#define D_PSEUDO 0x00200000 /* make_dev() can return NULL */ #define D_NEEDGIANT 0x00400000 /* driver want Giant */ #define D_NEEDMINOR 0x00800000 /* driver uses clone_create() */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 08:10:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA7F410656AA; Tue, 18 Oct 2011 08:10:23 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A83798FC21; Tue, 18 Oct 2011 08:10:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I8ANaf063176; Tue, 18 Oct 2011 08:10:23 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I8AN7k063168; Tue, 18 Oct 2011 08:10:23 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110180810.p9I8AN7k063168@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 18 Oct 2011 08:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226501 - in head/sys: boot/fdt/dts mips/conf mips/include mips/nlm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 08:10:23 -0000 Author: jchandra Date: Tue Oct 18 08:10:23 2011 New Revision: 226501 URL: http://svn.freebsd.org/changeset/base/226501 Log: Support for booting XLP using FDT. - update xlp_machdep.c to read arguments from FDT if FDT support is compiled in. - define rmi_uart_bus_space, and use it as fdtbus_bs_tag - update conf files for FDT support - add default dts file xlp-basic.dts Added: head/sys/boot/fdt/dts/xlp-basic.dts (contents, props changed) Modified: head/sys/mips/conf/XLP head/sys/mips/conf/XLP64 head/sys/mips/include/bus.h head/sys/mips/include/fdt.h head/sys/mips/nlm/bus_space_rmi.c head/sys/mips/nlm/uart_cpu_xlp.c head/sys/mips/nlm/xlp_machdep.c Added: head/sys/boot/fdt/dts/xlp-basic.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/xlp-basic.dts Tue Oct 18 08:10:23 2011 (r226501) @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Netlogic Microsystems XLP8xx Device Tree Source. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "netl,XLP8XX"; + compatible = "XLP8XX"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + serial0 = &serial0; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0x0>; + bus-frequency = <0>; + + serial0: serial@30100 { + compatible = "ns16550"; + reg = <0x30100 0x200>; + reg-shift = <2>; + current-speed = <115200>; + clock-frequency = <133000000>; + interrupts = <9>; + }; + + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + cpumask = <0xffffffff>; + bootargs = "-v"; + }; +}; Modified: head/sys/mips/conf/XLP ============================================================================== --- head/sys/mips/conf/XLP Tue Oct 18 08:09:44 2011 (r226500) +++ head/sys/mips/conf/XLP Tue Oct 18 08:10:23 2011 (r226501) @@ -93,3 +93,8 @@ device pci # Network device ether +# +# FDT support +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=xlp-basic.dts Modified: head/sys/mips/conf/XLP64 ============================================================================== --- head/sys/mips/conf/XLP64 Tue Oct 18 08:09:44 2011 (r226500) +++ head/sys/mips/conf/XLP64 Tue Oct 18 08:10:23 2011 (r226501) @@ -95,3 +95,8 @@ device pci # Network device ether + +# FDT support +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=xlp-basic.dts Modified: head/sys/mips/include/bus.h ============================================================================== --- head/sys/mips/include/bus.h Tue Oct 18 08:09:44 2011 (r226500) +++ head/sys/mips/include/bus.h Tue Oct 18 08:10:23 2011 (r226501) @@ -724,6 +724,7 @@ extern bus_space_tag_t mips_bus_space_ge #if defined(CPU_RMI) || defined (CPU_NLM) extern bus_space_tag_t rmi_bus_space; extern bus_space_tag_t rmi_pci_bus_space; +extern bus_space_tag_t rmi_uart_bus_space; #endif #include Modified: head/sys/mips/include/fdt.h ============================================================================== --- head/sys/mips/include/fdt.h Tue Oct 18 08:09:44 2011 (r226500) +++ head/sys/mips/include/fdt.h Tue Oct 18 08:10:23 2011 (r226501) @@ -48,6 +48,10 @@ /* * Bus space tag. XXX endianess info needs to be derived from the blob. */ +#if defined(CPU_RMI) || defined(CPU_NLM) +#define fdtbus_bs_tag rmi_uart_bus_space +#else #define fdtbus_bs_tag NULL +#endif #endif /* _MACHINE_FDT_H_ */ Modified: head/sys/mips/nlm/bus_space_rmi.c ============================================================================== --- head/sys/mips/nlm/bus_space_rmi.c Tue Oct 18 08:09:44 2011 (r226500) +++ head/sys/mips/nlm/bus_space_rmi.c Tue Oct 18 08:10:23 2011 (r226501) @@ -686,3 +686,87 @@ rmi_bus_space_barrier(void *tag __unused bus_size_t offset __unused, bus_size_t len __unused, int flags) { } + +/* + * need a special bus space for this, because the Netlogic SoC + * UART allows only 32 bit access to its registers + */ + +static u_int8_t +rmi_uart_bus_space_read_1(void *tag, bus_space_handle_t handle, + bus_size_t offset) +{ + return (u_int8_t)(*(volatile u_int32_t *)(handle + offset)); +} + +static void +rmi_uart_bus_space_write_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int8_t value) +{ + *(volatile u_int32_t *)(handle + offset) = value; +} + +static struct bus_space local_rmi_uart_bus_space = { + /* cookie */ + (void *)0, + + /* mapping/unmapping */ + rmi_bus_space_map, + rmi_bus_space_unmap, + rmi_bus_space_subregion, + + /* allocation/deallocation */ + NULL, + NULL, + + /* barrier */ + rmi_bus_space_barrier, + + /* read (single) */ + rmi_uart_bus_space_read_1, NULL, NULL, NULL, + + /* read multiple */ + NULL, NULL, NULL, NULL, + + /* read region */ + NULL, NULL, NULL, NULL, + + /* write (single) */ + rmi_uart_bus_space_write_1, NULL, NULL, NULL, + + /* write multiple */ + NULL, NULL, NULL, NULL, + + /* write region */ + NULL, NULL, NULL, NULL, + + /* set multiple */ + NULL, NULL, NULL, NULL, + + /* set region */ + NULL, NULL, NULL, NULL, + + /* copy */ + NULL, NULL, NULL, NULL, + + /* read (single) stream */ + NULL, NULL, NULL, NULL, + + /* read multiple stream */ + NULL, NULL, NULL, NULL, + + /* read region stream */ + NULL, NULL, NULL, NULL, + + /* write (single) stream */ + NULL, NULL, NULL, NULL, + + /* write multiple stream */ + NULL, NULL, NULL, NULL, + + /* write region stream */ + NULL, NULL, NULL, NULL, +}; + +/* generic bus_space tag */ +bus_space_tag_t rmi_uart_bus_space = &local_rmi_uart_bus_space; Modified: head/sys/mips/nlm/uart_cpu_xlp.c ============================================================================== --- head/sys/mips/nlm/uart_cpu_xlp.c Tue Oct 18 08:09:44 2011 (r226500) +++ head/sys/mips/nlm/uart_cpu_xlp.c Tue Oct 18 08:10:23 2011 (r226501) @@ -34,6 +34,9 @@ /* * XLRMIPS: This file is hacked from arm/... */ +#include "opt_platform.h" + +#ifndef FDT /* use FDT uart when fdt is enable */ #include "opt_uart.h" #include @@ -60,26 +63,6 @@ __FBSDID("$FreeBSD$"); bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -/* - * need a special bus space for this, because the Netlogic SoC - * UART allows only 32 bit access to its registers - */ -static struct bus_space nlm_uart_bussp; - -static u_int8_t -nlm_uart_bussp_read_1(void *tag, bus_space_handle_t handle, - bus_size_t offset) -{ - return (u_int8_t)(*(volatile u_int32_t *)(handle + offset)); -} - -static void -nlm_uart_bussp_write_1(void *tag, bus_space_handle_t handle, - bus_size_t offset, u_int8_t value) -{ - *(volatile u_int32_t *)(handle + offset) = value; -} - int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { @@ -89,14 +72,9 @@ uart_cpu_eqres(struct uart_bas *b1, stru int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - /* Create custom bus space */ - memcpy(&nlm_uart_bussp, rmi_bus_space, sizeof(nlm_uart_bussp)); - nlm_uart_bussp.bs_r_1 = nlm_uart_bussp_read_1; - nlm_uart_bussp.bs_w_1 = nlm_uart_bussp_write_1; - di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; - di->bas.bst = &nlm_uart_bussp; + di->bas.bst = rmi_uart_bus_space; di->bas.bsh = nlm_get_uart_regbase(0, 0); di->bas.regshft = 2; @@ -108,6 +86,7 @@ uart_cpu_getdev(int devtype, struct uart di->parity = UART_PARITY_NONE; uart_bus_space_io = NULL; - uart_bus_space_mem = &nlm_uart_bussp; + uart_bus_space_mem = rmi_uart_bus_space; return (0); } +#endif Modified: head/sys/mips/nlm/xlp_machdep.c ============================================================================== --- head/sys/mips/nlm/xlp_machdep.c Tue Oct 18 08:09:44 2011 (r226500) +++ head/sys/mips/nlm/xlp_machdep.c Tue Oct 18 08:10:23 2011 (r226501) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_platform.h" #include #include @@ -85,11 +86,14 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#endif + /* 4KB static data aread to keep a copy of the bootload env until the dynamic kenv is setup */ char boot1_env[4096]; -int xlp_argc; -char **xlp_argv, **xlp_envp; uint64_t xlp_cpu_frequency; uint64_t xlp_io_base = MIPS_PHYS_TO_KSEG1(XLP_DEFAULT_IO_BASE); @@ -147,8 +151,13 @@ xlp_parse_mmu_options(void) uint32_t cpu_map = xlp_hw_thread_mask; uint32_t core0_thr_mask, core_thr_mask; -#ifndef SMP /* Uniprocessor! */ - if (cpu_map != 0x1) { +#ifdef SMP + if (cpu_map == 0) + cpu_map = 0xffffffff; +#else /* Uniprocessor! */ + if (cpu_map == 0) + cpu_map = 0x1; + else if (cpu_map != 0x1) { printf("WARNING: Starting uniprocessor kernel on cpumask [0x%lx]!\n" "WARNING: Other CPUs will be unused.\n", (u_long)cpu_map); cpu_map = 0x1; @@ -219,44 +228,106 @@ unsupp: return; } -static void -xlp_set_boot_flags(void) +/* Parse cmd line args as env - copied from ar71xx */ +static void +xlp_parse_bootargs(char *cmdline) { - char *p; + char *n, *v; - p = getenv("bootflags"); - if (p == NULL) - return; - - for (; p && *p != '\0'; p++) { - switch (*p) { - case 'd': - case 'D': - boothowto |= RB_KDB; - break; - case 'g': - case 'G': - boothowto |= RB_GDB; - break; - case 'v': - case 'V': - boothowto |= RB_VERBOSE; - break; - - case 's': /* single-user (default, supported for sanity) */ - case 'S': - boothowto |= RB_SINGLE; - break; - - default: - printf("Unrecognized boot flag '%c'.\n", *p); - break; + while ((v = strsep(&cmdline, " \n")) != NULL) { + if (*v == '\0') + continue; + if (*v == '-') { + while (*v != '\0') { + v++; + switch (*v) { + case 'a': boothowto |= RB_ASKNAME; break; + case 'd': boothowto |= RB_KDB; break; + case 'g': boothowto |= RB_GDB; break; + case 's': boothowto |= RB_SINGLE; break; + case 'v': boothowto |= RB_VERBOSE; break; + } + } + } else { + n = strsep(&v, "="); + if (v == NULL) + setenv(n, "1"); + else + setenv(n, v); } } +} - freeenv(p); - return; +#ifdef FDT +static void +xlp_bootargs_init(__register_t arg) +{ + char buf[2048]; /* early stack is big enough */ + void *dtbp; + phandle_t chosen; + ihandle_t mask; + + dtbp = (void *)arg; +#if defined(FDT_DTB_STATIC) + /* + * In case the device tree blob was not passed as argument try + * to use the statically embedded one. + */ + if (dtbp == NULL) + dtbp = &fdt_static_dtb; +#endif + if (OF_install(OFW_FDT, 0) == FALSE) + while (1); + if (OF_init((void *)dtbp) != 0) + while (1); + if (fdt_immr_addr(xlp_io_base) != 0) + while (1); + OF_interpret("perform-fixup", 0); + + chosen = OF_finddevice("/chosen"); + if (OF_getprop(chosen, "cpumask", &mask, sizeof(mask)) == 0) + xlp_hw_thread_mask = mask; + + if (OF_getprop(chosen, "bootargs", buf, sizeof(buf)) == 0) + xlp_parse_bootargs(buf); +} +#else +/* + * arg is a pointer to the environment block, the format of the block is + * a=xyz\0b=pqr\0\0 + */ +static void +xlp_bootargs_init(__register_t arg) +{ + char buf[2048]; /* early stack is big enough */ + char *p, *v, *n; + uint32_t mask; + + p = (void *)arg; + while (*p != '\0') { + strlcpy(buf, p, sizeof(buf)); + v = buf; + n = strsep(&v, "="); + if (v == NULL) + setenv(n, "1"); + else + setenv(n, v); + p += strlen(p) + 1; + } + + /* CPU mask can be passed thru env */ + if (getenv_uint("cpumask", &mask) != 0) + xlp_hw_thread_mask = mask; + + /* command line argument */ + v = getenv("bootargs"); + if (v != NULL) { + strlcpy(buf, v, sizeof(buf)); + xlp_parse_bootargs(buf); + freeenv(v); + } } +#endif static void mips_init(void) @@ -428,14 +499,6 @@ platform_start(__register_t a0 __unused, __register_t a2 __unused, __register_t a3 __unused) { - int i; - - xlp_argc = 1; - /* - * argv and envp are passed in array of 32bit pointers - */ - xlp_argv = NULL; - xlp_envp = NULL; /* Initialize pcpu stuff */ mips_pcpu0_init(); @@ -443,10 +506,8 @@ platform_start(__register_t a0 __unused, /* initialize console so that we have printf */ boothowto |= (RB_SERIAL | RB_MULTIPLE); /* Use multiple consoles */ - /* For now */ - boothowto |= RB_VERBOSE; - boothowto |= RB_SINGLE; - bootverbose++; + init_static_kenv(boot1_env, sizeof(boot1_env)); + xlp_bootargs_init(a0); /* clockrate used by delay, so initialize it here */ xlp_cpu_frequency = xlp_get_cpu_frequency(); @@ -456,32 +517,10 @@ platform_start(__register_t a0 __unused, /* Init console please */ cninit(); - /* Environment */ - printf("Args %#jx %#jx %#jx %#jx:\n", (intmax_t)a0, - (intmax_t)a1, (intmax_t)a2, (intmax_t)a3); - xlp_hw_thread_mask = a0; - init_static_kenv(boot1_env, sizeof(boot1_env)); - printf("Environment (from %d args):\n", xlp_argc - 1); - if (xlp_argc == 1) - printf("\tNone\n"); - for (i = 1; i < xlp_argc; i++) { - char *n, *arg; - - arg = (char *)(intptr_t)xlp_argv[i]; - printf("\t%s\n", arg); - n = strsep(&arg, "="); - if (arg == NULL) - setenv(n, "1"); - else - setenv(n, arg); - } - /* Early core init and fixes for errata */ xlp_setup_core(); - xlp_set_boot_flags(); xlp_parse_mmu_options(); - xlp_mem_init(); bcopy(XLPResetEntry, (void *)MIPS_RESET_EXC_VEC, @@ -491,6 +530,7 @@ platform_start(__register_t a0 __unused, * MIPS generic init */ mips_init(); + /* * XLP specific post initialization * initialize other on chip stuff From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 08:18:26 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E3AD106564A; Tue, 18 Oct 2011 08:18:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8A38FC08; Tue, 18 Oct 2011 08:18:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I8IQH8063445; Tue, 18 Oct 2011 08:18:26 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I8IQlb063443; Tue, 18 Oct 2011 08:18:26 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180818.p9I8IQlb063443@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 08:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226502 - head/bin/df X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 08:18:26 -0000 Author: des Date: Tue Oct 18 08:18:26 2011 New Revision: 226502 URL: http://svn.freebsd.org/changeset/base/226502 Log: Simplify df(1) by factoring out most of the common code: - In the argc == 0 case, just populate the mount list as before, but do not calculate widths, update totals or print anything. - In the argv > 0 case, collect information about the requested file systems and store it in the mount list, but do not calculate widths, update totals or print anything. - In either case, once all the information has been collected, iterate once through the mount list to calculate widths and totals, then once more to print everything. This also fixes two bugs: firstly, column widths were not calculated correctly if more than one file system was specified on the command line; and secondly, file systems with MNT_IGNORE were included in the totals even if -a was not specified. Noticed by: Paul Schenkeveld MFC after: 3 weeks Modified: head/bin/df/df.c Modified: head/bin/df/df.c ============================================================================== --- head/bin/df/df.c Tue Oct 18 08:10:23 2011 (r226501) +++ head/bin/df/df.c Tue Oct 18 08:18:26 2011 (r226502) @@ -107,7 +107,7 @@ main(int argc, char *argv[]) const char *fstype; char *mntpath, *mntpt; const char **vfslist; - size_t i, mntsize; + int i, mntsize; int ch, rv; fstype = "ufs"; @@ -187,30 +187,21 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); - bzero(&maxwidths, sizeof(maxwidths)); - for (i = 0; i < mntsize; i++) - update_maxwidths(&maxwidths, &mntbuf[i]); - rv = 0; if (!*argv) { + /* everything (modulo -t) */ + mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); mntsize = regetmntinfo(&mntbuf, mntsize, vfslist); - bzero(&maxwidths, sizeof(maxwidths)); - for (i = 0; i < mntsize; i++) { - if (cflag) - addstat(&totalbuf, &mntbuf[i]); - update_maxwidths(&maxwidths, &mntbuf[i]); - } - if (cflag) - update_maxwidths(&maxwidths, &totalbuf); - for (i = 0; i < mntsize; i++) - if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0) - prtstat(&mntbuf[i], &maxwidths); - if (cflag) - prtstat(&totalbuf, &maxwidths); - exit(rv); + } else { + /* just the filesystems specified on the command line */ + mntbuf = malloc(argc * sizeof(*mntbuf)); + if (mntbuf == 0) + err(1, "malloc()"); + mntsize = 0; + /* continued in for loop below */ } + /* iterate through specified filesystems */ for (; *argv; argv++) { if (stat(*argv, &stbuf) < 0) { if ((mntpt = getmntpt(*argv)) == 0) { @@ -279,14 +270,24 @@ main(int argc, char *argv[]) continue; } - if (argc == 1) { - bzero(&maxwidths, sizeof(maxwidths)); - update_maxwidths(&maxwidths, &statfsbuf); + /* the user asked for it, so ignore the ignore flag */ + statfsbuf.f_flags &= ~MNT_IGNORE; + + /* add to list */ + mntbuf[mntsize++] = statfsbuf; + } + + bzero(&maxwidths, sizeof(maxwidths)); + for (i = 0; i < mntsize; i++) { + if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0) { + update_maxwidths(&maxwidths, &mntbuf[i]); + if (cflag) + addstat(&totalbuf, &mntbuf[i]); } - prtstat(&statfsbuf, &maxwidths); - if (cflag) - addstat(&totalbuf, &statfsbuf); } + for (i = 0; i < mntsize; i++) + if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0) + prtstat(&mntbuf[i], &maxwidths); if (cflag) prtstat(&totalbuf, &maxwidths); return (rv); From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 08:20:36 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC4BA106566B; Tue, 18 Oct 2011 08:20:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3378FC14; Tue, 18 Oct 2011 08:20:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I8Kal6063559; Tue, 18 Oct 2011 08:20:36 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I8KavL063557; Tue, 18 Oct 2011 08:20:36 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180820.p9I8KavL063557@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 08:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226503 - head/bin/df X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 08:20:37 -0000 Author: des Date: Tue Oct 18 08:20:36 2011 New Revision: 226503 URL: http://svn.freebsd.org/changeset/base/226503 Log: Minor clarification MFC after: 3 weeks Modified: head/bin/df/df.1 Modified: head/bin/df/df.1 ============================================================================== --- head/bin/df/df.1 Tue Oct 18 08:18:26 2011 (r226502) +++ head/bin/df/df.1 Tue Oct 18 08:20:36 2011 (r226503) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd November 23, 2008 +.Dd October 18, 2011 .Dt DF 1 .Os .Sh NAME @@ -63,6 +63,7 @@ The following options are available: Show all mount points, including those that were mounted with the .Dv MNT_IGNORE flag. +This is implied for file systems specified on the command line. .It Fl b Use 512-byte blocks rather than the default. Note that From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 08:26:12 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90E1E1065670; Tue, 18 Oct 2011 08:26:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FE938FC0A; Tue, 18 Oct 2011 08:26:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I8QCpR063797; Tue, 18 Oct 2011 08:26:12 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I8QCA2063794; Tue, 18 Oct 2011 08:26:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180826.p9I8QCA2063794@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 08:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226504 - head/usr.bin/ktrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 08:26:12 -0000 Author: des Date: Tue Oct 18 08:26:12 2011 New Revision: 226504 URL: http://svn.freebsd.org/changeset/base/226504 Log: Make ktrace(1) build cleanly at WARNS level 6 by completely rethinking the way in which it handles the -C, -c, -g and -p options. MFC after: 3 weeks Modified: head/usr.bin/ktrace/Makefile head/usr.bin/ktrace/ktrace.c Modified: head/usr.bin/ktrace/Makefile ============================================================================== --- head/usr.bin/ktrace/Makefile Tue Oct 18 08:20:36 2011 (r226503) +++ head/usr.bin/ktrace/Makefile Tue Oct 18 08:26:12 2011 (r226504) @@ -5,6 +5,4 @@ PROG= ktrace SRCS= ktrace.c subr.c MLINKS= ktrace.1 trace.1 -WARNS?= 4 - .include Modified: head/usr.bin/ktrace/ktrace.c ============================================================================== --- head/usr.bin/ktrace/ktrace.c Tue Oct 18 08:20:36 2011 (r226503) +++ head/usr.bin/ktrace/ktrace.c Tue Oct 18 08:26:12 2011 (r226504) @@ -43,14 +43,15 @@ static char sccsid[] = "@(#)ktrace.c 8.1 __FBSDID("$FreeBSD$"); #include -#include #include +#include #include -#include #include #include #include +#include +#include #include #include #include @@ -59,21 +60,22 @@ __FBSDID("$FreeBSD$"); static char def_tracefile[] = DEF_TRACEFILE; +static enum clear { NOTSET, CLEAR, CLEARALL } clear = NOTSET; +static int pid; + static void no_ktrace(int); -static int rpid(char *); +static void set_pid_clear(const char *, enum clear); static void usage(void); int main(int argc, char *argv[]) { - enum { NOTSET, CLEAR, CLEARALL } clear; - int append, ch, fd, inherit, ops, pid, pidset, trpoints; + int append, ch, fd, inherit, ops, trpoints; const char *tracefile; mode_t omask; struct stat sb; - clear = NOTSET; - append = ops = pidset = inherit = 0; + append = ops = inherit = 0; trpoints = DEF_POINTS; tracefile = def_tracefile; while ((ch = getopt(argc,argv,"aCcdf:g:ip:t:")) != -1) @@ -82,11 +84,10 @@ main(int argc, char *argv[]) append = 1; break; case 'C': - clear = CLEARALL; - pidset = 1; + set_pid_clear("1", CLEARALL); break; case 'c': - clear = CLEAR; + set_pid_clear(NULL, CLEAR); break; case 'd': ops |= KTRFLAG_DESCEND; @@ -95,15 +96,14 @@ main(int argc, char *argv[]) tracefile = optarg; break; case 'g': - pid = -rpid(optarg); - pidset = 1; + set_pid_clear(optarg, NOTSET); + pid = -pid; break; case 'i': inherit = 1; break; case 'p': - pid = rpid(optarg); - pidset = 1; + set_pid_clear(optarg, NOTSET); break; case 't': trpoints = getpoints(optarg); @@ -115,12 +115,19 @@ main(int argc, char *argv[]) default: usage(); } + argv += optind; argc -= optind; - - if ((pidset && *argv) || (!pidset && clear == NOTSET && !*argv)) + + /* must have either -[Cc], a pid or a command */ + if (clear == NOTSET && pid == 0 && argc == 0) + usage(); + /* can't have both a pid and a command */ + /* (note that -C sets pid to 1) */ + if (pid != 0 && argc > 0) { usage(); - + } + if (inherit) trpoints |= KTRFAC_INHERIT; @@ -129,10 +136,9 @@ main(int argc, char *argv[]) if (clear == CLEARALL) { ops = KTROP_CLEAR | KTRFLAG_DESCEND; trpoints = ALL_POINTS; - pid = 1; - } else - ops |= pidset ? KTROP_CLEAR : KTROP_CLEARFILE; - + } else { + ops |= pid ? KTROP_CLEAR : KTROP_CLEARFILE; + } if (ktrace(tracefile, ops, trpoints, pid) < 0) err(1, "%s", tracefile); exit(0); @@ -160,46 +166,75 @@ main(int argc, char *argv[]) trpoints |= PROC_ABI_POINTS; - if (*argv) { + if (argc > 0) { if (ktrace(tracefile, ops, trpoints, getpid()) < 0) err(1, "%s", tracefile); - execvp(argv[0], &argv[0]); - err(1, "exec of '%s' failed", argv[0]); + execvp(*argv, argv); + err(1, "exec of '%s' failed", *argv); } - else if (ktrace(tracefile, ops, trpoints, pid) < 0) + if (ktrace(tracefile, ops, trpoints, pid) < 0) err(1, "%s", tracefile); exit(0); } -static int -rpid(char *p) +static void +set_pid_clear(const char *p, enum clear cl) { - static int first; + intmax_t n; + char *e; - if (first++) { - warnx("only one -g or -p flag is permitted"); + if (clear != NOTSET && cl != NOTSET) { + /* either -c and -C or either of them twice */ + warnx("only one -c or -C flag is permitted"); + usage(); + } + if ((clear == CLEARALL && p != NULL) || (cl == CLEARALL && pid != 0)) { + /* both -C and a pid or pgid */ + warnx("the -C flag may not be combined with -g or -p"); usage(); } - if (!*p) { - warnx("illegal process id"); + if (p != NULL && pid != 0) { + /* either -p and -g or either of them twice */ + warnx("only one -g or -p flag is permitted"); usage(); } - return(atoi(p)); + if (p != NULL) { + errno = 0; + n = strtoimax(p, &e, 10); + /* + * 1) not a number, or outside the range of an intmax_t + * 2) inside the range of intmax_t but outside the range + * of an int, keeping in mind that the pid may be + * negated if it's actually a pgid. + */ + if (*e != '\0' || n < 1 || errno == ERANGE || + n > (intmax_t)INT_MAX || n > -(intmax_t)INT_MIN) { + warnx("invalid process or group id"); + usage(); + } + pid = n; + } + if (cl != NOTSET) + if ((clear = cl) == CLEARALL) + pid = 1; } static void usage(void) { - (void)fprintf(stderr, "%s\n%s\n", -"usage: ktrace [-aCcdi] [-f trfile] [-g pgrp | -p pid] [-t trstr]", -" ktrace [-adi] [-f trfile] [-t trstr] command"); + + fprintf(stderr, "%s\n%s\n", + "usage: ktrace [-aCcdi] [-f trfile] [-g pgrp | -p pid] [-t trstr]", + " ktrace [-adi] [-f trfile] [-t trstr] command"); exit(1); } static void no_ktrace(int sig __unused) { - (void)fprintf(stderr, -"error:\tktrace() system call not supported in the running kernel\n\tre-compile kernel with 'options KTRACE'\n"); + + fprintf(stderr, "error:\t%s\n\t%s\n", + "ktrace() system call not supported in the running kernel", + "re-compile kernel with 'options KTRACE'"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 09:39:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 969B31065670; Tue, 18 Oct 2011 09:39:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 868478FC17; Tue, 18 Oct 2011 09:39:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I9df4M066077; Tue, 18 Oct 2011 09:39:41 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I9dfip066075; Tue, 18 Oct 2011 09:39:41 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180939.p9I9dfip066075@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 09:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226505 - head/usr.bin/kdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 09:39:41 -0000 Author: des Date: Tue Oct 18 09:39:41 2011 New Revision: 226505 URL: http://svn.freebsd.org/changeset/base/226505 Log: Fix copy-pasto in CAPFAIL_INCREASE case. Noticed by: pjd Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Oct 18 08:26:12 2011 (r226504) +++ head/usr.bin/kdump/kdump.c Tue Oct 18 09:39:41 2011 (r226505) @@ -1603,9 +1603,9 @@ ktrcapfail(struct ktr_cap_fail *ktr) case CAPFAIL_INCREASE: /* requested more capabilities than fd already has */ printf("attempt to increase capabilities from "); - capname((intmax_t)ktr->cap_needed); - printf(" to "); capname((intmax_t)ktr->cap_held); + printf(" to "); + capname((intmax_t)ktr->cap_needed); break; case CAPFAIL_SYSCALL: /* called restricted syscall */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 09:46:53 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613B7106564A; Tue, 18 Oct 2011 09:46:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46D918FC19; Tue, 18 Oct 2011 09:46:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I9krDn066340; Tue, 18 Oct 2011 09:46:53 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I9krU8066333; Tue, 18 Oct 2011 09:46:53 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110180946.p9I9krU8066333@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 09:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226506 - in head/sys/boot: arm/at91/boot2 arm/ixp425/boot2 i386/boot2 i386/gptboot i386/zfsboot pc98/boot2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 09:46:53 -0000 Author: des Date: Tue Oct 18 09:46:52 2011 New Revision: 226506 URL: http://svn.freebsd.org/changeset/base/226506 Log: Look for /boot/config in addition to /boot.config, with the former taking precedence over the latter if it exists. MFC after: 3 weeks Modified: head/sys/boot/arm/at91/boot2/boot2.c head/sys/boot/arm/ixp425/boot2/boot2.c head/sys/boot/i386/boot2/boot2.c head/sys/boot/i386/gptboot/gptboot.c head/sys/boot/i386/zfsboot/zfsboot.c head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/arm/at91/boot2/boot2.c ============================================================================== --- head/sys/boot/arm/at91/boot2/boot2.c Tue Oct 18 09:39:41 2011 (r226505) +++ head/sys/boot/arm/at91/boot2/boot2.c Tue Oct 18 09:46:52 2011 (r226506) @@ -64,7 +64,8 @@ __FBSDID("$FreeBSD$"); OPT_SET(RBX_VERBOSE) | \ OPT_SET(RBX_GDB)) -#define PATH_CONFIG "/boot.config" +#define PATH_DOTCONFIG "/boot.config" +#define PATH_CONFIG "/boot/config" //#define PATH_KERNEL "/boot/kernel/kernel" #define PATH_KERNEL "/boot/kernel/kernel.gz.tramp" @@ -160,7 +161,8 @@ main(void) autoboot = 1; /* Process configuration file */ - if ((ino = lookup(PATH_CONFIG))) + if ((ino = lookup(PATH_CONFIG)) || + (ino = lookup(PATH_DOTCONFIG))) fsread(ino, cmd, sizeof(cmd)); if (*cmd) { Modified: head/sys/boot/arm/ixp425/boot2/boot2.c ============================================================================== --- head/sys/boot/arm/ixp425/boot2/boot2.c Tue Oct 18 09:39:41 2011 (r226505) +++ head/sys/boot/arm/ixp425/boot2/boot2.c Tue Oct 18 09:46:52 2011 (r226506) @@ -62,7 +62,8 @@ __FBSDID("$FreeBSD$"); OPT_SET(RBX_VERBOSE) | \ OPT_SET(RBX_GDB)) -#define PATH_CONFIG "/boot.config" +#define PATH_DOTCONFIG "/boot.config" +#define PATH_CONFIG "/boot/config" #define PATH_KERNEL "/boot/kernel/kernel" extern uint32_t _end; @@ -168,7 +169,8 @@ main(void) autoboot = 1; /* Process configuration file */ - if ((ino = lookup(PATH_CONFIG))) + if ((ino = lookup(PATH_CONFIG)) || + (ino = lookup(PATH_DOTCONFIG))) fsread(ino, cmd, sizeof(cmd)); if (*cmd) { Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Tue Oct 18 09:39:41 2011 (r226505) +++ head/sys/boot/i386/boot2/boot2.c Tue Oct 18 09:46:52 2011 (r226506) @@ -75,7 +75,8 @@ __FBSDID("$FreeBSD$"); OPT_SET(RBX_GDB ) | OPT_SET(RBX_MUTE) | \ OPT_SET(RBX_PAUSE) | OPT_SET(RBX_DUAL)) -#define PATH_CONFIG "/boot.config" +#define PATH_DOTCONFIG "/boot.config" +#define PATH_CONFIG "/boot/config" #define PATH_BOOT3 "/boot/loader" #define PATH_KERNEL "/boot/kernel/kernel" @@ -241,7 +242,8 @@ main(void) autoboot = 1; - if ((ino = lookup(PATH_CONFIG))) + if ((ino = lookup(PATH_CONFIG)) || + (ino = lookup(PATH_DOTCONFIG))) fsread(ino, cmd, sizeof(cmd)); if (*cmd) { Modified: head/sys/boot/i386/gptboot/gptboot.c ============================================================================== --- head/sys/boot/i386/gptboot/gptboot.c Tue Oct 18 09:39:41 2011 (r226505) +++ head/sys/boot/i386/gptboot/gptboot.c Tue Oct 18 09:46:52 2011 (r226506) @@ -38,7 +38,8 @@ __FBSDID("$FreeBSD$"); #include "cons.h" #include "gpt.h" -#define PATH_CONFIG "/boot.config" +#define PATH_DOTCONFIG "/boot.config" +#define PATH_CONFIG "/boot/config" #define PATH_BOOT3 "/boot/loader" #define PATH_KERNEL "/boot/kernel/kernel" @@ -163,8 +164,8 @@ main(void) for (;;) { *kname = '\0'; - ino = lookup(PATH_CONFIG); - if (ino > 0) + if ((ino = lookup(PATH_CONFIG)) || + (ino = lookup(PATH_DOTCONFIG))) fsread(ino, cmd, sizeof(cmd)); if (*cmd != '\0') { Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Tue Oct 18 09:39:41 2011 (r226505) +++ head/sys/boot/i386/zfsboot/zfsboot.c Tue Oct 18 09:46:52 2011 (r226506) @@ -45,7 +45,8 @@ __FBSDID("$FreeBSD$"); /* Hint to loader that we came from ZFS */ #define KARGS_FLAGS_ZFS 0x4 -#define PATH_CONFIG "/boot.config" +#define PATH_DOTCONFIG "/boot.config" +#define PATH_CONFIG "/boot/config" #define PATH_BOOT3 "/boot/zfsloader" #define PATH_KERNEL "/boot/kernel/kernel" @@ -533,7 +534,8 @@ main(void) zfs_mount_pool(spa); - if (zfs_lookup(spa, PATH_CONFIG, &dn) == 0) { + if (zfs_lookup(spa, PATH_CONFIG, &dn) == 0 || + zfs_lookup(spa, PATH_DOTCONFIG, &dn) == 0) { off = 0; zfs_read(spa, &dn, &off, cmd, sizeof(cmd)); } Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Tue Oct 18 09:39:41 2011 (r226505) +++ head/sys/boot/pc98/boot2/boot2.c Tue Oct 18 09:46:52 2011 (r226506) @@ -77,7 +77,8 @@ __FBSDID("$FreeBSD$"); OPT_SET(RBX_GDB ) | OPT_SET(RBX_MUTE) | \ OPT_SET(RBX_PAUSE) | OPT_SET(RBX_DUAL)) -#define PATH_CONFIG "/boot.config" +#define PATH_DOTCONFIG "/boot.config" +#define PATH_CONFIG "/boot/config" #define PATH_BOOT3 "/boot/loader" #define PATH_KERNEL "/boot/kernel/kernel" @@ -379,7 +380,8 @@ main(void) autoboot = 1; - if ((ino = lookup(PATH_CONFIG))) + if ((ino = lookup(PATH_CONFIG)) || + (ino = lookup(PATH_DOTCONFIG))) fsread(ino, cmd, sizeof(cmd)); if (*cmd) { From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 10:44:57 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96D09106566C; Tue, 18 Oct 2011 10:44:57 +0000 (UTC) (envelope-from nalitoja@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A8DD98FC18; Tue, 18 Oct 2011 10:44:56 +0000 (UTC) Received: by wyi40 with SMTP id 40so544733wyi.13 for ; Tue, 18 Oct 2011 03:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=KN/LZJbJkyA8b+8z3DG8jcl87hcR76y+KhwiI7C8+eU=; b=gqWY1AJNiSStGBgkyGcPK2yC9EB/H7JrtQ8jte9zhdiq1ZMz4Jglu1/U0WS9hFQxMT GC4xTDuz3i+GOukigY9f7uAiCRFFumUFhAEHZyPPOSG/HcmG9hmBdQJptYUB+40XfCXn aAoTTFY6dBBjblBdjIs8mmCnFhBKimEvSwzL8= Received: by 10.216.229.219 with SMTP id h69mr484702weq.1.1318934695292; Tue, 18 Oct 2011 03:44:55 -0700 (PDT) Received: from nil (exit-01d.noisetor.net. [173.254.216.69]) by mx.google.com with ESMTPS id ek13sm2757649wbb.3.2011.10.18.03.44.24 (version=SSLv3 cipher=OTHER); Tue, 18 Oct 2011 03:44:53 -0700 (PDT) From: Nali Toja To: Dimitry Andric In-Reply-To: <86y5wjktea.fsf@gmail.com> (Nali Toja's message of "Tue, 18 Oct 2011 00:58:21 +0000") Date: Tue, 18 Oct 2011 10:43:44 +0000 Message-ID: <8662jmo9zz.fsf@gmail.com> References: <201110171830.p9HIUIiR035423__37008.086537435$1318876298$gmane$org@svn.freebsd.org> <86y5wjktea.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226475 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 10:44:57 -0000 Nali Toja writes: >> Log: >> Update llvm/clang's target triple (confusingly named LLVM_HOSTTRIPLE) to >> $arch-unknown-freebsd10.0. >> >> Modified: >> head/lib/clang/clang.build.mk >> >> Modified: head/lib/clang/clang.build.mk >> ============================================================================== >> --- head/lib/clang/clang.build.mk Mon Oct 17 15:54:20 2011 (r226474) >> +++ head/lib/clang/clang.build.mk Mon Oct 17 18:30:18 2011 (r226475) >> @@ -14,8 +14,7 @@ CFLAGS+= -O1 >> .endif >> >> TARGET_ARCH?= ${MACHINE_ARCH} >> -# XXX: 8.0, to keep __FreeBSD_cc_version happy >> -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" >> +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" > > I think this results in __FreeBSD__ macro being defined as `1' and > subsequently breaking clangworld where its value is used, e.g. And it builds successfully with the following bandaid. Index: contrib/llvm/tools/clang/lib/Basic/Targets.cpp =================================================================== --- contrib/llvm/tools/clang/lib/Basic/Targets.cpp (revision 226484) +++ contrib/llvm/tools/clang/lib/Basic/Targets.cpp (working copy) @@ -239,7 +239,7 @@ class FreeBSDTargetInfo : public OSTargetInfo Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A41C01065672; Tue, 18 Oct 2011 11:16:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 656F88FC1C; Tue, 18 Oct 2011 11:16:48 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a909:f402:4151:1503] (unknown [IPv6:2001:7b8:3a7:0:a909:f402:4151:1503]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 153795C37; Tue, 18 Oct 2011 13:16:46 +0200 (CEST) Message-ID: <4E9D601D.7060604@FreeBSD.org> Date: Tue, 18 Oct 2011 13:16:45 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111012 Thunderbird/8.0 MIME-Version: 1.0 To: Nali Toja References: <201110171830.p9HIUIiR035423__37008.086537435$1318876298$gmane$org@svn.freebsd.org> <86y5wjktea.fsf@gmail.com> <8662jmo9zz.fsf@gmail.com> In-Reply-To: <8662jmo9zz.fsf@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226475 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 11:16:48 -0000 On 2011-10-18 12:43, Nali Toja wrote: ... >>> -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" >>> +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" >> I think this results in __FreeBSD__ macro being defined as `1' and >> subsequently breaking clangworld where its value is used, e.g. > And it builds successfully with the following bandaid. Thanks for reporting this, I'll commit a proper fix later today. I've also sent it upstream, hopefully it will make the 3.0 release. :) From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 11:29:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 636A4106564A; Tue, 18 Oct 2011 11:29:10 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 532EB8FC12; Tue, 18 Oct 2011 11:29:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IBTAO3071651; Tue, 18 Oct 2011 11:29:10 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IBTAUP071649; Tue, 18 Oct 2011 11:29:10 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201110181129.p9IBTAUP071649@svn.freebsd.org> From: Ken Smith Date: Tue, 18 Oct 2011 11:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226507 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 11:29:10 -0000 Author: kensmith Date: Tue Oct 18 11:29:10 2011 New Revision: 226507 URL: http://svn.freebsd.org/changeset/base/226507 Log: Escape the newline so we get a proper line continuation. Without this the text of the menu selections doesn't get displayed properly and it makes the installer appear to lock up for no obvious reason. Reviewed by: nwhitehorn Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Tue Oct 18 09:46:52 2011 (r226506) +++ head/usr.sbin/bsdinstall/scripts/auto Tue Oct 18 11:29:10 2011 (r226507) @@ -158,7 +158,7 @@ finalconfig() { REVISIT=$(dialog --backtitle "FreeBSD Installer" \ --title "Final Configuration" --no-cancel --menu \ "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices or apply more complex changes using a shell." 0 0 0 \ - "Exit" "Apply configuration and exit installer" + "Exit" "Apply configuration and exit installer" \ "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ "Hostname" "Set system hostname" \ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 13:10:46 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 641E310656D1; Tue, 18 Oct 2011 13:10:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 542118FC21; Tue, 18 Oct 2011 13:10:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IDAkLc074950; Tue, 18 Oct 2011 13:10:46 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IDAk0X074948; Tue, 18 Oct 2011 13:10:46 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110181310.p9IDAk0X074948@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 18 Oct 2011 13:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226509 - head/bin/ls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 13:10:46 -0000 Author: des Date: Tue Oct 18 13:10:46 2011 New Revision: 226509 URL: http://svn.freebsd.org/changeset/base/226509 Log: When calculating the width of the blocksize column, ls(1) used 512-byte units (as returned by stat(2)) instead of BLOCKSIZE units. Submitted by: Paul Schenkeveld MFC after: 3 weeks Modified: head/bin/ls/ls.c Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Tue Oct 18 12:13:20 2011 (r226508) +++ head/bin/ls/ls.c Tue Oct 18 13:10:46 2011 (r226509) @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)ls.c 8.5 (Be #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include @@ -835,7 +835,7 @@ label_out: d.maxlen = maxlen; if (needstats) { d.btotal = btotal; - d.s_block = snprintf(NULL, 0, "%lu", maxblock); + d.s_block = snprintf(NULL, 0, "%lu", howmany(maxblock, blocksize)); d.s_flags = maxflags; d.s_label = maxlabelstr; d.s_group = maxgroup; From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 13:13:00 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6E94106570A; Tue, 18 Oct 2011 13:13:00 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 345EF8FC23; Tue, 18 Oct 2011 13:13:00 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 355B325D3860; Tue, 18 Oct 2011 13:12:59 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 6C4C3BD3C50; Tue, 18 Oct 2011 13:12:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id LFgK80LaIAAN; Tue, 18 Oct 2011 13:12:57 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 403F9BD3C31; Tue, 18 Oct 2011 13:12:57 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110180810.p9I8AN7k063168@svn.freebsd.org> Date: Tue, 18 Oct 2011 13:12:56 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <408E46BD-AAF8-4296-89E5-3267EBF97503@lists.zabbadoz.net> References: <201110180810.p9I8AN7k063168@svn.freebsd.org> To: Jayachandran C. X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226501 - in head/sys: boot/fdt/dts mips/conf mips/include mips/nlm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 13:13:00 -0000 On 18. Oct 2011, at 08:10 , Jayachandran C. wrote: > Author: jchandra > Date: Tue Oct 18 08:10:23 2011 > New Revision: 226501 > URL: http://svn.freebsd.org/changeset/base/226501 >=20 > Log: > Support for booting XLP using FDT. >=20 > - update xlp_machdep.c to read arguments from FDT if FDT support is > compiled in. > - define rmi_uart_bus_space, and use it as fdtbus_bs_tag > - update conf files for FDT support > - add default dts file xlp-basic.dts cc1: warnings being treated as errors /scratch/tmp/bz/head.universe/sys/mips/nlm/xlp_machdep.c: In function = 'xlp_bootargs_init': /scratch/tmp/bz/head.universe/sys/mips/nlm/xlp_machdep.c:306: warning: = cast to pointer from integer of different size [-Wint-to-pointer-cast] /bz --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 13:45:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 755F7106566B; Tue, 18 Oct 2011 13:45:16 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8DB8FC13; Tue, 18 Oct 2011 13:45:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IDjG9C076022; Tue, 18 Oct 2011 13:45:16 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IDjG8q076017; Tue, 18 Oct 2011 13:45:16 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201110181345.p9IDjG8q076017@svn.freebsd.org> From: Ken Smith Date: Tue, 18 Oct 2011 13:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226510 - in head/sys: amd64/conf i386/conf ia64/conf sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 13:45:16 -0000 Author: kensmith Date: Tue Oct 18 13:45:16 2011 New Revision: 226510 URL: http://svn.freebsd.org/changeset/base/226510 Log: Comment out the sbp(4) driver for architectures that support it. As part of the 8.0-RELEASE cycle this was done in stable/8 (r199112) but was left alone in head so people could work on fixing an issue that caused boot failure on some motherboards. Apparently nobody has worked on it and we are getting reports of boot failure with the 9.0 test builds. So this time I'll comment out the driver in head (still hoping someone will work on it) and MFC to stable/9. Submitted by: Alberto Villa Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Oct 18 13:10:46 2011 (r226509) +++ head/sys/amd64/conf/GENERIC Tue Oct 18 13:45:16 2011 (r226510) @@ -331,7 +331,7 @@ device zyd # ZyDAS zd1211/zd1211b wire # FireWire support device firewire # FireWire bus code -device sbp # SCSI over FireWire (Requires scbus and da) +#device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) device dcons # Dumb console driver Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Oct 18 13:10:46 2011 (r226509) +++ head/sys/i386/conf/GENERIC Tue Oct 18 13:45:16 2011 (r226510) @@ -344,7 +344,7 @@ device zyd # ZyDAS zd1211/zd1211b wire # FireWire support device firewire # FireWire bus code -device sbp # SCSI over FireWire (Requires scbus and da) +#device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) device dcons # Dumb console driver Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Tue Oct 18 13:10:46 2011 (r226509) +++ head/sys/ia64/conf/GENERIC Tue Oct 18 13:45:16 2011 (r226510) @@ -175,7 +175,7 @@ device uvscom # USB serial support for # FireWire support device fwip # IP over FireWire (RFC 2734,3146) -device sbp # SCSI over FireWire (need scbus & da) +#device sbp # SCSI over FireWire (need scbus & da) # Various (pseudo) devices device ether # Ethernet support Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Tue Oct 18 13:10:46 2011 (r226509) +++ head/sys/sparc64/conf/GENERIC Tue Oct 18 13:45:16 2011 (r226510) @@ -261,7 +261,7 @@ device zyd # ZyDAS zd1211/zd1211b wire # FireWire support device firewire # FireWire bus code -device sbp # SCSI over FireWire (Requires scbus and da) +#device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) device dcons # Dumb console driver From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 13:46:24 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E49BC1065680; Tue, 18 Oct 2011 13:46:24 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 195CE8FC14; Tue, 18 Oct 2011 13:46:23 +0000 (UTC) Received: by wyi40 with SMTP id 40so766264wyi.13 for ; Tue, 18 Oct 2011 06:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7gmRjijOohiIfAAlkdd8sg1qK85NC1GJKKja1QKlZJk=; b=LFzHbFnpSukbqQf4a6+aONbS2c4y/AkotaKZsYJZt6Ci/fHNyz2yG2aMTCmf5/2GD5 a4rqqDb86S7p2MDI5BE0MnKNWQTcYt3D5vg+JTTre0i+8xTF/W95VmydzxQe5FsGiUPW 6S9Be635HGY8XN+6XInoxcwU90K5rTrNuphcE= MIME-Version: 1.0 Received: by 10.216.208.158 with SMTP id q30mr936147weo.56.1318945582671; Tue, 18 Oct 2011 06:46:22 -0700 (PDT) Sender: c.jayachandran@gmail.com Received: by 10.216.188.3 with HTTP; Tue, 18 Oct 2011 06:46:22 -0700 (PDT) In-Reply-To: <408E46BD-AAF8-4296-89E5-3267EBF97503@lists.zabbadoz.net> References: <201110180810.p9I8AN7k063168@svn.freebsd.org> <408E46BD-AAF8-4296-89E5-3267EBF97503@lists.zabbadoz.net> Date: Tue, 18 Oct 2011 19:16:22 +0530 X-Google-Sender-Auth: 1HcGTAMrRjud_fRpS0BX6492bxY Message-ID: From: "Jayachandran C." To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226501 - in head/sys: boot/fdt/dts mips/conf mips/include mips/nlm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 13:46:25 -0000 On Tue, Oct 18, 2011 at 6:42 PM, Bjoern A. Zeeb wrote: > > On 18. Oct 2011, at 08:10 , Jayachandran C. wrote: > >> Author: jchandra >> Date: Tue Oct 18 08:10:23 2011 >> New Revision: 226501 >> URL: http://svn.freebsd.org/changeset/base/226501 >> >> Log: >> =A0Support for booting XLP using FDT. >> >> =A0- update xlp_machdep.c to read arguments from FDT if FDT support is >> =A0 =A0compiled in. >> =A0- define rmi_uart_bus_space, and use it as fdtbus_bs_tag >> =A0- update conf files for FDT support >> =A0- add default dts file xlp-basic.dts > > > cc1: warnings being treated as errors > /scratch/tmp/bz/head.universe/sys/mips/nlm/xlp_machdep.c: In function 'xl= p_bootargs_init': > /scratch/tmp/bz/head.universe/sys/mips/nlm/xlp_machdep.c:306: warning: ca= st to pointer from integer of different size [-Wint-to-pointer-cast] n32 ABI again, will fix. Thanks. JC. From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 13:58:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32F16106564A; Tue, 18 Oct 2011 13:58:23 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08E1E8FC0A; Tue, 18 Oct 2011 13:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IDwMkg076514; Tue, 18 Oct 2011 13:58:22 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IDwMhi076511; Tue, 18 Oct 2011 13:58:22 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201110181358.p9IDwMhi076511@svn.freebsd.org> From: Martin Matuska Date: Tue, 18 Oct 2011 13:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226512 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 13:58:23 -0000 Author: mm Date: Tue Oct 18 13:58:22 2011 New Revision: 226512 URL: http://svn.freebsd.org/changeset/base/226512 Log: Import fix for Illumos bug #1475 to reduce diff against upstream. Panic caused by this bug was already partially fixed by pjd@ in p4 CH 185940 and 185942. Reference: 1475 zfs spill block hold can access invalid spill blkptr https://www.illumos.org/issues/1475 Reviewed by: delphij Obtained from: Illumos (issue 1475, changeset 13469:b8e89e5c4167) MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Oct 18 13:48:31 2011 (r226511) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Oct 18 13:58:22 2011 (r226512) @@ -21,6 +21,9 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ #include #include @@ -676,6 +679,8 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o ASSERT3P(dmu_ot[dn->dn_type].ot_byteswap, ==, zap_byteswap); if (dn->dn_maxblkid == 0 && !add) { + blkptr_t *bp; + /* * If there is only one block (i.e. this is a micro-zap) * and we are not adding anything, the accounting is simple. @@ -690,14 +695,13 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o * Use max block size here, since we don't know how much * the size will change between now and the dbuf dirty call. */ + bp = &dn->dn_phys->dn_blkptr[0]; if (dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, - &dn->dn_phys->dn_blkptr[0], - dn->dn_phys->dn_blkptr[0].blk_birth)) { + bp, bp->blk_birth)) txh->txh_space_tooverwrite += SPA_MAXBLOCKSIZE; - } else { + else txh->txh_space_towrite += SPA_MAXBLOCKSIZE; - } - if (dn->dn_phys->dn_blkptr[0].blk_birth) + if (!BP_IS_HOLE(bp)) txh->txh_space_tounref += SPA_MAXBLOCKSIZE; return; } @@ -1273,7 +1277,6 @@ dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t { dnode_t *dn; dmu_tx_hold_t *txh; - blkptr_t *bp; txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object, THT_SPILL, 0, 0); @@ -1286,15 +1289,16 @@ dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t /* If blkptr doesn't exist then add space to towrite */ if (!(dn->dn_phys->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) { txh->txh_space_towrite += SPA_MAXBLOCKSIZE; - txh->txh_space_tounref = 0; } else { + blkptr_t *bp; + bp = &dn->dn_phys->dn_spill; if (dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, bp, bp->blk_birth)) txh->txh_space_tooverwrite += SPA_MAXBLOCKSIZE; else txh->txh_space_towrite += SPA_MAXBLOCKSIZE; - if (bp->blk_birth) + if (!BP_IS_HOLE(bp)) txh->txh_space_tounref += SPA_MAXBLOCKSIZE; } } From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 14:05:18 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99C951065670; Tue, 18 Oct 2011 14:05:18 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89AD48FC15; Tue, 18 Oct 2011 14:05:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IE5IEr076774; Tue, 18 Oct 2011 14:05:18 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IE5I2N076772; Tue, 18 Oct 2011 14:05:18 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110181405.p9IE5I2N076772@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 18 Oct 2011 14:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226513 - head/sys/mips/nlm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 14:05:18 -0000 Author: jchandra Date: Tue Oct 18 14:05:18 2011 New Revision: 226513 URL: http://svn.freebsd.org/changeset/base/226513 Log: Fix XLP compile failure on n32 abi. Reported by: bz@ Modified: head/sys/mips/nlm/xlp_machdep.c Modified: head/sys/mips/nlm/xlp_machdep.c ============================================================================== --- head/sys/mips/nlm/xlp_machdep.c Tue Oct 18 13:58:22 2011 (r226512) +++ head/sys/mips/nlm/xlp_machdep.c Tue Oct 18 14:05:18 2011 (r226513) @@ -303,7 +303,7 @@ xlp_bootargs_init(__register_t arg) char *p, *v, *n; uint32_t mask; - p = (void *)arg; + p = (void *)(intptr_t)arg; while (*p != '\0') { strlcpy(buf, p, sizeof(buf)); v = buf; From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 15:07:24 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79DBD106564A; Tue, 18 Oct 2011 15:07:24 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 0485D8FC19; Tue, 18 Oct 2011 15:07:24 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E307225D3810; Tue, 18 Oct 2011 15:07:22 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DF87EBD3C3D; Tue, 18 Oct 2011 15:07:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id q2oIHufkM7-C; Tue, 18 Oct 2011 15:07:21 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id BECE9BD3C39; Tue, 18 Oct 2011 15:07:20 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: Date: Tue, 18 Oct 2011 15:07:19 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201110180810.p9I8AN7k063168@svn.freebsd.org> <408E46BD-AAF8-4296-89E5-3267EBF97503@lists.zabbadoz.net> To: Jayachandran C. X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226501 - in head/sys: boot/fdt/dts mips/conf mips/include mips/nlm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 15:07:24 -0000 On 18. Oct 2011, at 13:46 , Jayachandran C. wrote: > On Tue, Oct 18, 2011 at 6:42 PM, Bjoern A. Zeeb > wrote: >>=20 >> On 18. Oct 2011, at 08:10 , Jayachandran C. wrote: >>=20 >>> Author: jchandra >>> Date: Tue Oct 18 08:10:23 2011 >>> New Revision: 226501 >>> URL: http://svn.freebsd.org/changeset/base/226501 >>>=20 >>> Log: >>> Support for booting XLP using FDT. >>>=20 >>> - update xlp_machdep.c to read arguments from FDT if FDT support is >>> compiled in. >>> - define rmi_uart_bus_space, and use it as fdtbus_bs_tag >>> - update conf files for FDT support >>> - add default dts file xlp-basic.dts >>=20 >>=20 >> cc1: warnings being treated as errors >> /scratch/tmp/bz/head.universe/sys/mips/nlm/xlp_machdep.c: In function = 'xlp_bootargs_init': >> /scratch/tmp/bz/head.universe/sys/mips/nlm/xlp_machdep.c:306: = warning: cast to pointer from integer of different size = [-Wint-to-pointer-cast] >=20 > n32 ABI again, will fix. Thanks. Hehe, yeah; Thanks; I see it already happened:) /bz --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 15:25:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9626B106564A; Tue, 18 Oct 2011 15:25:43 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D5B8FC1B; Tue, 18 Oct 2011 15:25:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IFPhCO079287; Tue, 18 Oct 2011 15:25:43 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IFPhMd079276; Tue, 18 Oct 2011 15:25:43 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201110181525.p9IFPhMd079276@svn.freebsd.org> From: Fabien Thomas Date: Tue, 18 Oct 2011 15:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226514 - in head: lib/libpmc sys/dev/hwpmc sys/sys usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 15:25:43 -0000 Author: fabient Date: Tue Oct 18 15:25:43 2011 New Revision: 226514 URL: http://svn.freebsd.org/changeset/base/226514 Log: Add a flush of the current PMC log buffer before displaying the next top. As the underlying block is 4KB if the PMC throughput is low the measurement will be reported on the next tick. pmcstat(8) use the modified flush API to reclaim current buffer before displaying next top. MFC after: 1 month Modified: head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.3 head/lib/libpmc/pmc.h head/lib/libpmc/pmc_configure_logfile.3 head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/sys/pmc.h head/sys/sys/pmclog.h head/usr.sbin/pmcstat/pmcstat.c head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Tue Oct 18 14:05:18 2011 (r226513) +++ head/lib/libpmc/libpmc.c Tue Oct 18 15:25:43 2011 (r226514) @@ -2596,6 +2596,12 @@ pmc_flush_logfile(void) } int +pmc_close_logfile(void) +{ + return (PMC_CALL(CLOSELOG,0)); +} + +int pmc_get_driver_stats(struct pmc_driverstats *ds) { struct pmc_op_getdriverstats gms; Modified: head/lib/libpmc/pmc.3 ============================================================================== --- head/lib/libpmc/pmc.3 Tue Oct 18 14:05:18 2011 (r226513) +++ head/lib/libpmc/pmc.3 Tue Oct 18 15:25:43 2011 (r226514) @@ -322,6 +322,10 @@ to write logged events to. Flush all pending log data in .Xr hwpmc 4 Ns Ap s buffers. +.It Fn pmc_close_logfile +Flush all pending log data and close +.Xr hwpmc 4 Ns Ap s +side of the stream. .It Fn pmc_writelog Append arbitrary user data to the current log file. .El Modified: head/lib/libpmc/pmc.h ============================================================================== --- head/lib/libpmc/pmc.h Tue Oct 18 14:05:18 2011 (r226513) +++ head/lib/libpmc/pmc.h Tue Oct 18 15:25:43 2011 (r226514) @@ -76,6 +76,7 @@ int pmc_attach(pmc_id_t _pmcid, pid_t _p int pmc_capabilities(pmc_id_t _pmc, uint32_t *_caps); int pmc_configure_logfile(int _fd); int pmc_flush_logfile(void); +int pmc_close_logfile(void); int pmc_detach(pmc_id_t _pmcid, pid_t _pid); int pmc_disable(int _cpu, int _pmc); int pmc_enable(int _cpu, int _pmc); Modified: head/lib/libpmc/pmc_configure_logfile.3 ============================================================================== --- head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 14:05:18 2011 (r226513) +++ head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 15:25:43 2011 (r226514) @@ -29,7 +29,8 @@ .Sh NAME .Nm pmc_configure_logfile , .Nm pmc_flush_logfile , -.Nm pmc_writelog +.Nm pmc_writelog , +.Nm pmc_close_logfile .Nd log file management .Sh LIBRARY .Lb libpmc @@ -41,6 +42,8 @@ .Fn pmc_flush_logfile void .Ft int .Fn pmc_writelog "uint32_t userdata" +.Ft int +.Fn pmc_close_logfile void .Sh DESCRIPTION The functions manage logging of .Xr hwpmc 4 @@ -72,6 +75,12 @@ Function will append a log entry containing the value of argument .Fa userdata to the log file. +.Pp +Function +.Fn pmc_close_logfile +will flush all pending log data and close +.Xr hwpmc 4 Ns Ap s +side of the stream. .Sh RETURN VALUES .Rv -std .Sh ERRORS Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 14:05:18 2011 (r226513) +++ head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 15:25:43 2011 (r226514) @@ -238,7 +238,7 @@ pmclog_get_buffer(struct pmc_owner *po) static void pmclog_loop(void *arg) { - int error, last_buffer; + int error; struct pmc_owner *po; struct pmclog_buffer *lb; struct proc *p; @@ -253,7 +253,6 @@ pmclog_loop(void *arg) p = po->po_owner; td = curthread; mycred = td->td_ucred; - last_buffer = 0; PROC_LOCK(p); ownercred = crhold(p->p_ucred); @@ -286,14 +285,22 @@ pmclog_loop(void *arg) if ((lb = TAILQ_FIRST(&po->po_logbuffers)) == NULL) { mtx_unlock_spin(&po->po_mtx); + if (po->po_flags & PMC_PO_SHUTDOWN) { + mtx_unlock(&pmc_kthread_mtx); + /* + * Close the file to get PMCLOG_EOF + * error in pmclog(3). + */ + fo_close(po->po_file, curthread); + mtx_lock(&pmc_kthread_mtx); + } + (void) msleep(po, &pmc_kthread_mtx, PWAIT, "pmcloop", 0); continue; } TAILQ_REMOVE(&po->po_logbuffers, lb, plb_next); - if (po->po_flags & PMC_PO_SHUTDOWN) - last_buffer = TAILQ_EMPTY(&po->po_logbuffers); mtx_unlock_spin(&po->po_mtx); } @@ -336,14 +343,6 @@ pmclog_loop(void *arg) break; } - if (last_buffer) { - /* - * Close the file to get PMCLOG_EOF error - * in pmclog(3). - */ - fo_close(po->po_file, curthread); - } - mtx_lock(&pmc_kthread_mtx); /* put the used buffer back into the global pool */ @@ -693,6 +692,7 @@ int pmclog_flush(struct pmc_owner *po) { int error; + struct pmclog_buffer *lb; PMCDBG(LOG,FLS,1, "po=%p", po); @@ -715,11 +715,38 @@ pmclog_flush(struct pmc_owner *po) } /* - * Schedule the current buffer if any. + * Schedule the current buffer if any and not empty. + */ + mtx_lock_spin(&po->po_mtx); + lb = po->po_curbuf; + if (lb && lb->plb_ptr != lb->plb_base) { + pmclog_schedule_io(po); + } else + error = ENOBUFS; + mtx_unlock_spin(&po->po_mtx); + + error: + mtx_unlock(&pmc_kthread_mtx); + + return (error); +} + +int +pmclog_close(struct pmc_owner *po) +{ + + PMCDBG(LOG,CLO,1, "po=%p", po); + + mtx_lock(&pmc_kthread_mtx); + + /* + * Schedule the current buffer. */ mtx_lock_spin(&po->po_mtx); if (po->po_curbuf) pmclog_schedule_io(po); + else + wakeup_one(po); mtx_unlock_spin(&po->po_mtx); /* @@ -728,13 +755,11 @@ pmclog_flush(struct pmc_owner *po) */ po->po_flags |= PMC_PO_SHUTDOWN; - error: mtx_unlock(&pmc_kthread_mtx); - return (error); + return (0); } - void pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) { Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 14:05:18 2011 (r226513) +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 15:25:43 2011 (r226514) @@ -2891,7 +2891,7 @@ pmc_syscall_handler(struct thread *td, v error = pmclog_configure_log(md, po, cl.pm_logfd); } else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { pmclog_process_closelog(po); - error = pmclog_flush(po); + error = pmclog_close(po); if (error == 0) { LIST_FOREACH(pm, &po->po_pmcs, pm_next) if (pm->pm_flags & PMC_F_NEEDS_LOGFILE && @@ -2907,7 +2907,6 @@ pmc_syscall_handler(struct thread *td, v } break; - /* * Flush a log file. */ @@ -2928,6 +2927,25 @@ pmc_syscall_handler(struct thread *td, v break; /* + * Close a log file. + */ + + case PMC_OP_CLOSELOG: + { + struct pmc_owner *po; + + sx_assert(&pmc_sx, SX_XLOCKED); + + if ((po = pmc_find_owner_descriptor(td->td_proc)) == NULL) { + error = EINVAL; + break; + } + + error = pmclog_close(po); + } + break; + + /* * Retrieve hardware configuration. */ Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Tue Oct 18 14:05:18 2011 (r226513) +++ head/sys/sys/pmc.h Tue Oct 18 15:25:43 2011 (r226514) @@ -302,7 +302,8 @@ enum pmc_event { __PMC_OP(PMCSETCOUNT, "Set initial count/sampling rate") \ __PMC_OP(PMCSTART, "Start a PMC") \ __PMC_OP(PMCSTOP, "Stop a PMC") \ - __PMC_OP(WRITELOG, "Write a cookie to the log file") + __PMC_OP(WRITELOG, "Write a cookie to the log file") \ + __PMC_OP(CLOSELOG, "Close log file") enum pmc_ops { Modified: head/sys/sys/pmclog.h ============================================================================== --- head/sys/sys/pmclog.h Tue Oct 18 14:05:18 2011 (r226513) +++ head/sys/sys/pmclog.h Tue Oct 18 15:25:43 2011 (r226514) @@ -243,6 +243,7 @@ int pmclog_configure_log(struct pmc_mdep int _logfd); int pmclog_deconfigure_log(struct pmc_owner *_po); int pmclog_flush(struct pmc_owner *_po); +int pmclog_close(struct pmc_owner *_po); void pmclog_initialize(void); void pmclog_process_callchain(struct pmc *_pm, struct pmc_sample *_ps); void pmclog_process_closelog(struct pmc_owner *po); Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 14:05:18 2011 (r226513) +++ head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 15:25:43 2011 (r226514) @@ -552,7 +552,7 @@ main(int argc, char **argv) int hcpu, option, npmc, ncpu; int c, check_driver_stats, current_cpu, current_sampling_count; int do_callchain, do_descendants, do_logproccsw, do_logprocexit; - int do_print; + int do_print, do_read; size_t dummy; int graphdepth; int pipefd[2], rfd; @@ -1328,7 +1328,7 @@ main(int argc, char **argv) * are killed by a SIGINT. */ runstate = PMCSTAT_RUNNING; - do_print = 0; + do_print = do_read = 0; do { if ((c = kevent(pmcstat_kq, NULL, 0, &kev, 1, NULL)) <= 0) { if (errno != EINTR) @@ -1351,8 +1351,10 @@ main(int argc, char **argv) (args.pa_flags & FLAG_DO_TOP)) { if (pmcstat_keypress_log()) runstate = pmcstat_close_log(); - } else + } else { + do_read = 0; runstate = pmcstat_process_log(); + } break; case EVFILT_SIGNAL: @@ -1377,9 +1379,6 @@ main(int argc, char **argv) /* Kill the child process if we started it */ if (args.pa_flags & FLAG_HAS_COMMANDLINE) pmcstat_kill_process(); - /* Close the pipe to self, if present. */ - if (args.pa_flags & FLAG_HAS_PIPE) - (void) close(pipefd[READPIPEFD]); runstate = pmcstat_close_log(); } else if (kev.ident == SIGWINCH) { if (ioctl(fileno(args.pa_printfile), @@ -1394,12 +1393,15 @@ main(int argc, char **argv) break; case EVFILT_TIMER: /* print out counting PMCs */ + if ((args.pa_flags & FLAG_DO_TOP) && + pmc_flush_logfile() != ENOBUFS) + do_read = 1; do_print = 1; break; } - if (do_print) { + if (do_print && !do_read) { if ((args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) == 0) { pmcstat_print_pmcs(); if (runstate == PMCSTAT_FINISHED && /* final newline */ @@ -1420,7 +1422,7 @@ main(int argc, char **argv) /* flush any pending log entries */ if (args.pa_flags & (FLAG_HAS_OUTPUT_LOGFILE | FLAG_HAS_PIPE)) - pmc_flush_logfile(); + pmc_close_logfile(); pmcstat_cleanup(); Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 14:05:18 2011 (r226513) +++ head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 15:25:43 2011 (r226514) @@ -1702,7 +1702,7 @@ pmcstat_close_log(void) * so keep the status to EXITING. */ if (args.pa_logfd != -1) { - if (pmc_flush_logfile() < 0) + if (pmc_close_logfile() < 0) err(EX_OSERR, "ERROR: logging failed"); } From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 16:23:51 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9AC3106566C; Tue, 18 Oct 2011 16:23:51 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 2BE1E8FC13; Tue, 18 Oct 2011 16:23:51 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id BD96025D386D; Tue, 18 Oct 2011 16:23:49 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id CBAADBD3C50; Tue, 18 Oct 2011 16:23:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ACKe7A6Fxt3V; Tue, 18 Oct 2011 16:23:45 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id EA1FCBD3C39; Tue, 18 Oct 2011 16:23:44 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110181525.p9IFPhMd079276@svn.freebsd.org> Date: Tue, 18 Oct 2011 16:23:43 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <919B2142-241B-454B-B01E-750AB8935D3C@lists.zabbadoz.net> References: <201110181525.p9IFPhMd079276@svn.freebsd.org> To: Fabien Thomas X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226514 - in head: lib/libpmc sys/dev/hwpmc sys/sys usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 16:23:52 -0000 On 18. Oct 2011, at 15:25 , Fabien Thomas wrote: > Author: fabient > Date: Tue Oct 18 15:25:43 2011 > New Revision: 226514 > URL: http://svn.freebsd.org/changeset/base/226514 >=20 > Log: > Add a flush of the current PMC log buffer before displaying the next = top. >=20 > As the underlying block is 4KB if the PMC throughput is low the = measurement > will be reported on the next tick. pmcstat(8) use the modified flush = API to > reclaim current buffer before displaying next top. >=20 I get this for every LINT kernel at minimum: = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c: In function 'pmclog_close': = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: 'PMC_DEBUG_MIN_CLO' undeclared (first use in this = function) = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: (Each undeclared identifier is reported only once = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: for each function it appears in.) > MFC after: 1 month >=20 > Modified: > head/lib/libpmc/libpmc.c > head/lib/libpmc/pmc.3 > head/lib/libpmc/pmc.h > head/lib/libpmc/pmc_configure_logfile.3 > head/sys/dev/hwpmc/hwpmc_logging.c > head/sys/dev/hwpmc/hwpmc_mod.c > head/sys/sys/pmc.h > head/sys/sys/pmclog.h > head/usr.sbin/pmcstat/pmcstat.c > head/usr.sbin/pmcstat/pmcstat_log.c >=20 > Modified: head/lib/libpmc/libpmc.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libpmc/libpmc.c Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/lib/libpmc/libpmc.c Tue Oct 18 15:25:43 2011 = (r226514) > @@ -2596,6 +2596,12 @@ pmc_flush_logfile(void) > } >=20 > int > +pmc_close_logfile(void) > +{ > + return (PMC_CALL(CLOSELOG,0)); > +} > + > +int > pmc_get_driver_stats(struct pmc_driverstats *ds) > { > struct pmc_op_getdriverstats gms; >=20 > Modified: head/lib/libpmc/pmc.3 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libpmc/pmc.3 Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/lib/libpmc/pmc.3 Tue Oct 18 15:25:43 2011 = (r226514) > @@ -322,6 +322,10 @@ to write logged events to. > Flush all pending log data in > .Xr hwpmc 4 Ns Ap s > buffers. > +.It Fn pmc_close_logfile > +Flush all pending log data and close > +.Xr hwpmc 4 Ns Ap s > +side of the stream. > .It Fn pmc_writelog > Append arbitrary user data to the current log file. > .El >=20 > Modified: head/lib/libpmc/pmc.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libpmc/pmc.h Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/lib/libpmc/pmc.h Tue Oct 18 15:25:43 2011 = (r226514) > @@ -76,6 +76,7 @@ int pmc_attach(pmc_id_t _pmcid, pid_t _p > int pmc_capabilities(pmc_id_t _pmc, uint32_t *_caps); > int pmc_configure_logfile(int _fd); > int pmc_flush_logfile(void); > +int pmc_close_logfile(void); > int pmc_detach(pmc_id_t _pmcid, pid_t _pid); > int pmc_disable(int _cpu, int _pmc); > int pmc_enable(int _cpu, int _pmc); >=20 > Modified: head/lib/libpmc/pmc_configure_logfile.3 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 15:25:43 2011 = (r226514) > @@ -29,7 +29,8 @@ > .Sh NAME > .Nm pmc_configure_logfile , > .Nm pmc_flush_logfile , > -.Nm pmc_writelog > +.Nm pmc_writelog , > +.Nm pmc_close_logfile > .Nd log file management > .Sh LIBRARY > .Lb libpmc > @@ -41,6 +42,8 @@ > .Fn pmc_flush_logfile void > .Ft int > .Fn pmc_writelog "uint32_t userdata" > +.Ft int > +.Fn pmc_close_logfile void > .Sh DESCRIPTION > The functions manage logging of > .Xr hwpmc 4 > @@ -72,6 +75,12 @@ Function > will append a log entry containing the value of argument > .Fa userdata > to the log file. > +.Pp > +Function > +.Fn pmc_close_logfile > +will flush all pending log data and close > +.Xr hwpmc 4 Ns Ap s > +side of the stream. > .Sh RETURN VALUES > .Rv -std > .Sh ERRORS >=20 > Modified: head/sys/dev/hwpmc/hwpmc_logging.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 15:25:43 2011 = (r226514) > @@ -238,7 +238,7 @@ pmclog_get_buffer(struct pmc_owner *po) > static void > pmclog_loop(void *arg) > { > - int error, last_buffer; > + int error; > struct pmc_owner *po; > struct pmclog_buffer *lb; > struct proc *p; > @@ -253,7 +253,6 @@ pmclog_loop(void *arg) > p =3D po->po_owner; > td =3D curthread; > mycred =3D td->td_ucred; > - last_buffer =3D 0; >=20 > PROC_LOCK(p); > ownercred =3D crhold(p->p_ucred); > @@ -286,14 +285,22 @@ pmclog_loop(void *arg) > if ((lb =3D TAILQ_FIRST(&po->po_logbuffers)) =3D=3D= NULL) { > mtx_unlock_spin(&po->po_mtx); >=20 > + if (po->po_flags & PMC_PO_SHUTDOWN) { > + mtx_unlock(&pmc_kthread_mtx); > + /* > + * Close the file to get = PMCLOG_EOF > + * error in pmclog(3). > + */ > + fo_close(po->po_file, = curthread); > + mtx_lock(&pmc_kthread_mtx); > + } > + > (void) msleep(po, &pmc_kthread_mtx, = PWAIT, > "pmcloop", 0); > continue; > } >=20 > TAILQ_REMOVE(&po->po_logbuffers, lb, plb_next); > - if (po->po_flags & PMC_PO_SHUTDOWN) > - last_buffer =3D = TAILQ_EMPTY(&po->po_logbuffers); > mtx_unlock_spin(&po->po_mtx); > } >=20 > @@ -336,14 +343,6 @@ pmclog_loop(void *arg) > break; > } >=20 > - if (last_buffer) { > - /* > - * Close the file to get PMCLOG_EOF error > - * in pmclog(3). > - */ > - fo_close(po->po_file, curthread); > - } > - > mtx_lock(&pmc_kthread_mtx); >=20 > /* put the used buffer back into the global pool */ > @@ -693,6 +692,7 @@ int > pmclog_flush(struct pmc_owner *po) > { > int error; > + struct pmclog_buffer *lb; >=20 > PMCDBG(LOG,FLS,1, "po=3D%p", po); >=20 > @@ -715,11 +715,38 @@ pmclog_flush(struct pmc_owner *po) > } >=20 > /* > - * Schedule the current buffer if any. > + * Schedule the current buffer if any and not empty. > + */ > + mtx_lock_spin(&po->po_mtx); > + lb =3D po->po_curbuf; > + if (lb && lb->plb_ptr !=3D lb->plb_base) { > + pmclog_schedule_io(po); > + } else > + error =3D ENOBUFS; > + mtx_unlock_spin(&po->po_mtx); > + > + error: > + mtx_unlock(&pmc_kthread_mtx); > + > + return (error); > +} > + > +int > +pmclog_close(struct pmc_owner *po) > +{ > + > + PMCDBG(LOG,CLO,1, "po=3D%p", po); > + > + mtx_lock(&pmc_kthread_mtx); > + > + /* > + * Schedule the current buffer. > */ > mtx_lock_spin(&po->po_mtx); > if (po->po_curbuf) > pmclog_schedule_io(po); > + else > + wakeup_one(po); > mtx_unlock_spin(&po->po_mtx); >=20 > /* > @@ -728,13 +755,11 @@ pmclog_flush(struct pmc_owner *po) > */ > po->po_flags |=3D PMC_PO_SHUTDOWN; >=20 > - error: > mtx_unlock(&pmc_kthread_mtx); >=20 > - return (error); > + return (0); > } >=20 > - > void > pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) > { >=20 > Modified: head/sys/dev/hwpmc/hwpmc_mod.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 15:25:43 2011 = (r226514) > @@ -2891,7 +2891,7 @@ pmc_syscall_handler(struct thread *td, v > error =3D pmclog_configure_log(md, po, = cl.pm_logfd); > } else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { > pmclog_process_closelog(po); > - error =3D pmclog_flush(po); > + error =3D pmclog_close(po); > if (error =3D=3D 0) { > LIST_FOREACH(pm, &po->po_pmcs, pm_next) > if (pm->pm_flags & = PMC_F_NEEDS_LOGFILE && > @@ -2907,7 +2907,6 @@ pmc_syscall_handler(struct thread *td, v > } > break; >=20 > - > /* > * Flush a log file. > */ > @@ -2928,6 +2927,25 @@ pmc_syscall_handler(struct thread *td, v > break; >=20 > /* > + * Close a log file. > + */ > + > + case PMC_OP_CLOSELOG: > + { > + struct pmc_owner *po; > + > + sx_assert(&pmc_sx, SX_XLOCKED); > + > + if ((po =3D pmc_find_owner_descriptor(td->td_proc)) =3D=3D= NULL) { > + error =3D EINVAL; > + break; > + } > + > + error =3D pmclog_close(po); > + } > + break; > + > + /* > * Retrieve hardware configuration. > */ >=20 >=20 > Modified: head/sys/sys/pmc.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/sys/pmc.h Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/sys/sys/pmc.h Tue Oct 18 15:25:43 2011 = (r226514) > @@ -302,7 +302,8 @@ enum pmc_event { > __PMC_OP(PMCSETCOUNT, "Set initial count/sampling rate") = \ > __PMC_OP(PMCSTART, "Start a PMC") = \ > __PMC_OP(PMCSTOP, "Stop a PMC") = \ > - __PMC_OP(WRITELOG, "Write a cookie to the log file") > + __PMC_OP(WRITELOG, "Write a cookie to the log file") = \ > + __PMC_OP(CLOSELOG, "Close log file") >=20 >=20 > enum pmc_ops { >=20 > Modified: head/sys/sys/pmclog.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/sys/pmclog.h Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/sys/sys/pmclog.h Tue Oct 18 15:25:43 2011 = (r226514) > @@ -243,6 +243,7 @@ int pmclog_configure_log(struct pmc_mdep > int _logfd); > int pmclog_deconfigure_log(struct pmc_owner *_po); > int pmclog_flush(struct pmc_owner *_po); > +int pmclog_close(struct pmc_owner *_po); > void pmclog_initialize(void); > void pmclog_process_callchain(struct pmc *_pm, struct pmc_sample = *_ps); > void pmclog_process_closelog(struct pmc_owner *po); >=20 > Modified: head/usr.sbin/pmcstat/pmcstat.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 15:25:43 2011 = (r226514) > @@ -552,7 +552,7 @@ main(int argc, char **argv) > int hcpu, option, npmc, ncpu; > int c, check_driver_stats, current_cpu, current_sampling_count; > int do_callchain, do_descendants, do_logproccsw, do_logprocexit; > - int do_print; > + int do_print, do_read; > size_t dummy; > int graphdepth; > int pipefd[2], rfd; > @@ -1328,7 +1328,7 @@ main(int argc, char **argv) > * are killed by a SIGINT. > */ > runstate =3D PMCSTAT_RUNNING; > - do_print =3D 0; > + do_print =3D do_read =3D 0; > do { > if ((c =3D kevent(pmcstat_kq, NULL, 0, &kev, 1, NULL)) = <=3D 0) { > if (errno !=3D EINTR) > @@ -1351,8 +1351,10 @@ main(int argc, char **argv) > (args.pa_flags & FLAG_DO_TOP)) { > if (pmcstat_keypress_log()) > runstate =3D = pmcstat_close_log(); > - } else > + } else { > + do_read =3D 0; > runstate =3D pmcstat_process_log(); > + } > break; >=20 > case EVFILT_SIGNAL: > @@ -1377,9 +1379,6 @@ main(int argc, char **argv) > /* Kill the child process if we started = it */ > if (args.pa_flags & = FLAG_HAS_COMMANDLINE) > pmcstat_kill_process(); > - /* Close the pipe to self, if present. = */ > - if (args.pa_flags & FLAG_HAS_PIPE) > - (void) = close(pipefd[READPIPEFD]); > runstate =3D pmcstat_close_log(); > } else if (kev.ident =3D=3D SIGWINCH) { > if (ioctl(fileno(args.pa_printfile), > @@ -1394,12 +1393,15 @@ main(int argc, char **argv) > break; >=20 > case EVFILT_TIMER: /* print out counting PMCs */ > + if ((args.pa_flags & FLAG_DO_TOP) && > + pmc_flush_logfile() !=3D ENOBUFS) > + do_read =3D 1; > do_print =3D 1; > break; >=20 > } >=20 > - if (do_print) { > + if (do_print && !do_read) { > if ((args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) = =3D=3D 0) { > pmcstat_print_pmcs(); > if (runstate =3D=3D PMCSTAT_FINISHED && = /* final newline */ > @@ -1420,7 +1422,7 @@ main(int argc, char **argv) >=20 > /* flush any pending log entries */ > if (args.pa_flags & (FLAG_HAS_OUTPUT_LOGFILE | FLAG_HAS_PIPE)) > - pmc_flush_logfile(); > + pmc_close_logfile(); >=20 > pmcstat_cleanup(); >=20 >=20 > Modified: head/usr.sbin/pmcstat/pmcstat_log.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 14:05:18 2011 = (r226513) > +++ head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 15:25:43 2011 = (r226514) > @@ -1702,7 +1702,7 @@ pmcstat_close_log(void) > * so keep the status to EXITING. > */ > if (args.pa_logfd !=3D -1) { > - if (pmc_flush_logfile() < 0) > + if (pmc_close_logfile() < 0) > err(EX_OSERR, "ERROR: logging failed"); > } >=20 --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 16:37:29 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5785B106566B; Tue, 18 Oct 2011 16:37:29 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5800D8FC16; Tue, 18 Oct 2011 16:37:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IGbSep081633; Tue, 18 Oct 2011 16:37:28 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IGbSJI081629; Tue, 18 Oct 2011 16:37:28 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110181637.p9IGbSJI081629@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 18 Oct 2011 16:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226517 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 16:37:29 -0000 Author: jchandra Date: Tue Oct 18 16:37:28 2011 New Revision: 226517 URL: http://svn.freebsd.org/changeset/base/226517 Log: Fix wakeup latency when sleeping with 'wait' If we handle an interrupt just before the 'wait' and the interrupt schedules some work, we need to skip the 'wait' call. The simple solution of calling sched_runnable() with interrupts disabled immediately before wait still leaves a window after the call and before 'wait' in which the same issue can occur. The solution implemented is to check the EPC in the interrupt handler, and if it is in a region before the 'wait' call, to fix up the EPC to skip the wait call. Reported/analysed by: adrian Fix suggested by: kib Reviewed by: jmallett, imp Modified: head/sys/mips/include/md_var.h head/sys/mips/mips/exception.S head/sys/mips/mips/machdep.c Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Tue Oct 18 15:53:48 2011 (r226516) +++ head/sys/mips/include/md_var.h Tue Oct 18 16:37:28 2011 (r226517) @@ -56,6 +56,7 @@ void MipsSwitchFPState(struct thread *, u_long kvtop(void *addr); int is_cacheable_mem(vm_paddr_t addr); void mips_generic_reset(void); +void mips_wait(void); #define MIPS_DEBUG 0 Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Tue Oct 18 15:53:48 2011 (r226516) +++ head/sys/mips/mips/exception.S Tue Oct 18 16:37:28 2011 (r226517) @@ -557,6 +557,33 @@ NNON_LEAF(MipsUserGenException, CALLFRAM .set at END(MipsUserGenException) + .set push + .set noat +NON_LEAF(mips_wait, CALLFRAME_SIZ, ra) + PTR_SUBU sp, sp, CALLFRAME_SIZ + .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) + REG_S ra, CALLFRAME_RA(sp) # save RA + mfc0 t0, MIPS_COP_0_STATUS + xori t1, t0, MIPS_SR_INT_IE + mtc0 t1, MIPS_COP_0_STATUS + COP0_SYNC + jal sched_runnable + nop + REG_L ra, CALLFRAME_RA(sp) + mfc0 t0, MIPS_COP_0_STATUS + ori t1, t0, MIPS_SR_INT_IE + .align 4 +GLOBAL(MipsWaitStart) # this is 16 byte aligned + mtc0 t1, MIPS_COP_0_STATUS + bnez v0, MipsWaitEnd + nop + wait +GLOBAL(MipsWaitEnd) # MipsWaitStart + 16 + jr ra + PTR_ADDU sp, sp, CALLFRAME_SIZ +END(mips_wait) + .set pop + /*---------------------------------------------------------------------------- * * MipsKernIntr -- @@ -578,6 +605,19 @@ NNON_LEAF(MipsKernIntr, KERN_EXC_FRAME_S .set noat PTR_SUBU sp, sp, KERN_EXC_FRAME_SIZE .mask 0x80000000, (CALLFRAME_RA - KERN_EXC_FRAME_SIZE) + +/* + * Check for getting interrupts just before wait + */ + MFC0 k0, MIPS_COP_0_EXC_PC + ori k0, 0xf + xori k0, 0xf # 16 byte align + PTR_LA k1, MipsWaitStart + bne k0, k1, 1f + nop + PTR_ADDU k1, 16 # skip over wait + MTC0 k1, MIPS_COP_0_EXC_PC +1: /* * Save CPU state, building 'frame'. */ Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Tue Oct 18 15:53:48 2011 (r226516) +++ head/sys/mips/mips/machdep.c Tue Oct 18 16:37:28 2011 (r226517) @@ -163,6 +163,9 @@ extern char MipsTLBMiss[], MipsTLBMissEn /* Cache error handler */ extern char MipsCache[], MipsCacheEnd[]; +/* MIPS wait skip region */ +extern char MipsWaitStart[], MipsWaitEnd[]; + extern char edata[], end[]; #ifdef DDB extern vm_offset_t ksym_start, ksym_end; @@ -327,6 +330,12 @@ void mips_vector_init(void) { /* + * Make sure that the Wait region logic is not been + * changed + */ + if (MipsWaitEnd - MipsWaitStart != 16) + panic("startup: MIPS wait region not correct"); + /* * Copy down exception vector code. */ if (MipsTLBMissEnd - MipsTLBMiss > 0x80) @@ -485,24 +494,9 @@ spinlock_exit(void) /* * call platform specific code to halt (until next interrupt) for the idle loop */ -/* - * This is disabled because of three issues: - * - * + By calling critical_enter(), any interrupt which occurs after that but - * before the wait instruction will be handled but not serviced (in the case - * of a netisr) because preemption is not allowed at this point; - * + Any fast interrupt handler which schedules an immediate or fast callout - * will not occur until the wait instruction is interrupted, as the clock - * has already been set by cpu_idleclock(); - * + There is currently no known way to atomically enable interrupts and call - * wait, which is how the i386/amd64 code gets around (1). Thus even if - * interrupts were disabled and reenabled just before the wait call, any - * interrupt that did occur may not interrupt wait. - */ void cpu_idle(int busy) { -#if 0 KASSERT((mips_rd_status() & MIPS_SR_INT_IE) != 0, ("interrupts disabled in idle process.")); KASSERT((mips_rd_status() & MIPS_INT_MASK) != 0, @@ -512,12 +506,11 @@ cpu_idle(int busy) critical_enter(); cpu_idleclock(); } - __asm __volatile ("wait"); + mips_wait(); if (!busy) { cpu_activeclock(); critical_exit(); } -#endif } int From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 17:37:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A8CF1065670; Tue, 18 Oct 2011 17:37:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09F408FC15; Tue, 18 Oct 2011 17:37:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IHbIOi083476; Tue, 18 Oct 2011 17:37:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IHbIvW083474; Tue, 18 Oct 2011 17:37:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201110181737.p9IHbIvW083474@svn.freebsd.org> From: Dimitry Andric Date: Tue, 18 Oct 2011 17:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226518 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 17:37:19 -0000 Author: dim Date: Tue Oct 18 17:37:18 2011 New Revision: 226518 URL: http://svn.freebsd.org/changeset/base/226518 Log: Fix the way clang retrieves the major FreeBSD release number from the target triple, so that the __FreeBSD__ and __FreeBSD_cc_version builtin macros return the expected results. Spotted by: nalitoja at gmail.com Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Oct 18 16:37:28 2011 (r226517) +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Oct 18 17:37:18 2011 (r226518) @@ -238,11 +238,12 @@ protected: MacroBuilder &Builder) const { // FreeBSD defines; list based off of gcc output - // FIXME: Move version number handling to llvm::Triple. - llvm::StringRef Release = Triple.getOSName().substr(strlen("freebsd"), 1); + unsigned Release = Triple.getOSMajorVersion(); + if (Release == 0U) + Release = 8U; - Builder.defineMacro("__FreeBSD__", Release); - Builder.defineMacro("__FreeBSD_cc_version", Release + "00001"); + Builder.defineMacro("__FreeBSD__", Twine(Release)); + Builder.defineMacro("__FreeBSD_cc_version", Twine(Release * 100000U + 1U)); Builder.defineMacro("__KPRINTF_ATTRIBUTE__"); DefineStd(Builder, "unix", Opts); Builder.defineMacro("__ELF__"); From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 17:38:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA2081065670; Tue, 18 Oct 2011 17:38:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9BD88FC13; Tue, 18 Oct 2011 17:38:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IHcPEs083546; Tue, 18 Oct 2011 17:38:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IHcPlb083544; Tue, 18 Oct 2011 17:38:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201110181738.p9IHcPlb083544@svn.freebsd.org> From: Dimitry Andric Date: Tue, 18 Oct 2011 17:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226519 - head/gnu/usr.bin/cc/cc_tools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 17:38:25 -0000 Author: dim Date: Tue Oct 18 17:38:25 2011 New Revision: 226519 URL: http://svn.freebsd.org/changeset/base/226519 Log: Update gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 10. Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Tue Oct 18 17:37:18 2011 (r226518) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Tue Oct 18 17:38:25 2011 (r226519) @@ -7,8 +7,8 @@ #define FREEBSD_NATIVE 1 /* Fake out gcc/config/freebsd.h. */ -#define FBSD_MAJOR 8 -#define FBSD_CC_VER 800001 /* form like __FreeBSD_version */ +#define FBSD_MAJOR 10 +#define FBSD_CC_VER 1000001 /* form like __FreeBSD_version */ #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 18:08:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 776241065670; Tue, 18 Oct 2011 18:08:41 +0000 (UTC) Date: Tue, 18 Oct 2011 18:08:41 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20111018180841.GA2389@freebsd.org> References: <201110181738.p9IHcPlb083544@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110181738.p9IHcPlb083544@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226519 - head/gnu/usr.bin/cc/cc_tools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 18:08:41 -0000 On Tue Oct 18 11, Dimitry Andric wrote: > Author: dim > Date: Tue Oct 18 17:38:25 2011 > New Revision: 226519 > URL: http://svn.freebsd.org/changeset/base/226519 > > Log: > Update gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 10. should these also be updated to 9? maybe before it gets released? cheers. alex > > Modified: > head/gnu/usr.bin/cc/cc_tools/freebsd-native.h > > Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h > ============================================================================== > --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Tue Oct 18 17:37:18 2011 (r226518) > +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Tue Oct 18 17:38:25 2011 (r226519) > @@ -7,8 +7,8 @@ > #define FREEBSD_NATIVE 1 > > /* Fake out gcc/config/freebsd.h. */ > -#define FBSD_MAJOR 8 > -#define FBSD_CC_VER 800001 /* form like __FreeBSD_version */ > +#define FBSD_MAJOR 10 > +#define FBSD_CC_VER 1000001 /* form like __FreeBSD_version */ > > #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ > #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 18:16:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30311106564A; Tue, 18 Oct 2011 18:16:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id E364B8FC0A; Tue, 18 Oct 2011 18:16:57 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a909:f402:4151:1503] (unknown [IPv6:2001:7b8:3a7:0:a909:f402:4151:1503]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 23E0E5C37; Tue, 18 Oct 2011 20:16:57 +0200 (CEST) Message-ID: <4E9DC297.5080602@FreeBSD.org> Date: Tue, 18 Oct 2011 20:16:55 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111012 Thunderbird/8.0 MIME-Version: 1.0 To: Alexander Best References: <201110181738.p9IHcPlb083544@svn.freebsd.org> <20111018180841.GA2389@freebsd.org> In-Reply-To: <20111018180841.GA2389@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226519 - head/gnu/usr.bin/cc/cc_tools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 18:16:58 -0000 On 2011-10-18 20:08, Alexander Best wrote: > On Tue Oct 18 11, Dimitry Andric wrote: >> Author: dim >> Date: Tue Oct 18 17:38:25 2011 >> New Revision: 226519 >> URL: http://svn.freebsd.org/changeset/base/226519 >> >> Log: >> Update gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 10. > > should these also be updated to 9? maybe before it gets released? It would be nice to do so. I've asked re@ for approval. From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 18:42:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39B781065672; Tue, 18 Oct 2011 18:42:27 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD5C8FC15; Tue, 18 Oct 2011 18:42:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IIgQd3085968; Tue, 18 Oct 2011 18:42:26 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IIgQkc085965; Tue, 18 Oct 2011 18:42:26 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201110181842.p9IIgQkc085965@svn.freebsd.org> From: Kirk McKusick Date: Tue, 18 Oct 2011 18:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226520 - head/sbin/dump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 18:42:27 -0000 Author: mckusick Date: Tue Oct 18 18:42:26 2011 New Revision: 226520 URL: http://svn.freebsd.org/changeset/base/226520 Log: The current /etc/dumpdates file restricts device names to 32 characters. With the addition of various GEOM layers some device names now exceed this length, for example /dev/mirror/encrypted.elig.journal. This change expands the field to 53 bytes which brings the /etc/dumpdates lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates file much less human readable. A test is added to dump so that it verifies that the device name will fit in the 53 character field failing the dump if it is too long. This change has been checked to verify that its /etc/dumpdates file is compatible with older versions of dump. Reported by: Martin Sugioarto PR: kern/160678 MFC after: 3 weeks Modified: head/sbin/dump/dump.h head/sbin/dump/itime.c Modified: head/sbin/dump/dump.h ============================================================================== --- head/sbin/dump/dump.h Tue Oct 18 17:38:25 2011 (r226519) +++ head/sbin/dump/dump.h Tue Oct 18 18:42:26 2011 (r226520) @@ -171,9 +171,10 @@ void putdumptime(void); if (ddatev != NULL) \ for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i]) -#define DUMPOUTFMT "%-32s %d %s" /* for printf */ +#define DUMPFMTLEN 53 /* max device pathname length */ +#define DUMPOUTFMT "%-*s %d %s" /* for printf */ /* name, level, ctime(date) */ -#define DUMPINFMT "%32s %d %[^\n]\n" /* inverse for scanf */ +#define DUMPINFMT "%s %d %[^\n]\n" /* inverse for scanf */ void sig(int signo); Modified: head/sbin/dump/itime.c ============================================================================== --- head/sbin/dump/itime.c Tue Oct 18 17:38:25 2011 (r226519) +++ head/sbin/dump/itime.c Tue Oct 18 18:42:26 2011 (r226520) @@ -222,7 +222,10 @@ static void dumprecout(FILE *file, const struct dumpdates *what) { - if (fprintf(file, DUMPOUTFMT, what->dd_name, + if (strlen(what->dd_name) > DUMPFMTLEN) + quit("Name '%s' exceeds DUMPFMTLEN (%d) bytes\n", + what->dd_name, DUMPFMTLEN); + if (fprintf(file, DUMPOUTFMT, DUMPFMTLEN, what->dd_name, what->dd_level, ctime(&what->dd_ddate)) < 0) quit("%s: %s\n", dumpdates, strerror(errno)); } From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 19:36:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 92AD51065670; Tue, 18 Oct 2011 19:36:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 3F709150855; Tue, 18 Oct 2011 19:36:54 +0000 (UTC) Message-ID: <4E9DD555.4070402@FreeBSD.org> Date: Tue, 18 Oct 2011 12:36:53 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Ken Smith References: <201110181345.p9IDjG8q076017@svn.freebsd.org> In-Reply-To: <201110181345.p9IDjG8q076017@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226510 - in head/sys: amd64/conf i386/conf ia64/conf sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 19:36:55 -0000 On 10/18/2011 06:45, Ken Smith wrote: > Author: kensmith > Date: Tue Oct 18 13:45:16 2011 > New Revision: 226510 > URL: http://svn.freebsd.org/changeset/base/226510 > > Log: > Comment out the sbp(4) driver for architectures that support it. > > As part of the 8.0-RELEASE cycle this was done in stable/8 (r199112) > but was left alone in head so people could work on fixing an issue that > caused boot failure on some motherboards. Apparently nobody has worked > on it and we are getting reports of boot failure with the 9.0 test builds. > So this time I'll comment out the driver in head (still hoping someone > will work on it) and MFC to stable/9. Hope is not a plan. :) How about adding a comment to the effect that "this is broken, and needs someone to adopt it"? At least that would explain why it's commented out so that people like me don't un-comment it and wonder why their box won't boot (true story). It might also attract an actual human to look at it ... Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 20:16:03 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A4BF106564A; Tue, 18 Oct 2011 20:16:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A05F8FC08; Tue, 18 Oct 2011 20:16:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IKG2kr088853; Tue, 18 Oct 2011 20:16:02 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IKG2Wp088851; Tue, 18 Oct 2011 20:16:02 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110182016.p9IKG2Wp088851@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 Oct 2011 20:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226522 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 20:16:03 -0000 Author: marius Date: Tue Oct 18 20:16:02 2011 New Revision: 226522 URL: http://svn.freebsd.org/changeset/base/226522 Log: Allow to dump on Solaris swap partitions. PR: 161764 Submitted by: Peter Jeremy Modified: head/sys/geom/part/g_part_vtoc8.c Modified: head/sys/geom/part/g_part_vtoc8.c ============================================================================== --- head/sys/geom/part/g_part_vtoc8.c Tue Oct 18 18:52:22 2011 (r226521) +++ head/sys/geom/part/g_part_vtoc8.c Tue Oct 18 20:16:02 2011 (r226522) @@ -274,7 +274,8 @@ g_part_vtoc8_dumpto(struct g_part_table */ table = (struct g_part_vtoc8_table *)basetable; tag = be16dec(&table->vtoc.part[entry->gpe_index - 1].tag); - return ((tag == 0 || tag == VTOC_TAG_FREEBSD_SWAP) ? 1 : 0); + return ((tag == 0 || tag == VTOC_TAG_FREEBSD_SWAP || + tag == VTOC_TAG_SWAP) ? 1 : 0); } static int From owner-svn-src-head@FreeBSD.ORG Tue Oct 18 22:51:40 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D3AC106566B; Tue, 18 Oct 2011 22:51:40 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CA738FC14; Tue, 18 Oct 2011 22:51:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IMpecr093636; Tue, 18 Oct 2011 22:51:40 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IMpelI093634; Tue, 18 Oct 2011 22:51:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201110182251.p9IMpelI093634@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 18 Oct 2011 22:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226523 - head/tools/regression/doat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 22:51:40 -0000 Author: jilles Date: Tue Oct 18 22:51:40 2011 New Revision: 226523 URL: http://svn.freebsd.org/changeset/base/226523 Log: Fix some memory errors in *at() regression tests. Modified: head/tools/regression/doat/doat.c Modified: head/tools/regression/doat/doat.c ============================================================================== --- head/tools/regression/doat/doat.c Tue Oct 18 20:16:02 2011 (r226522) +++ head/tools/regression/doat/doat.c Tue Oct 18 22:51:40 2011 (r226523) @@ -103,8 +103,9 @@ setup(void) { int i, error; struct stat sb; + size_t len; - tests = calloc(NUM_OF_TESTS, sizeof(struct test)); + tests = calloc(NUM_OF_TESTS + 1, sizeof(struct test)); if (tests == NULL) { perror(""); exit(0); @@ -116,14 +117,16 @@ setup(void) exit(0); } - absolute_path = realloc(absolute_path, strlen(absolute_path) + 5); + len = strlen(absolute_path); + absolute_path = realloc(absolute_path, + len + 1 + strlen(relative_path) + 1); if (absolute_path == NULL) { perror("realloc"); exit(0); } - absolute_path[strlen(absolute_path)] = '/'; - strcpy(absolute_path + strlen(absolute_path), relative_path); + absolute_path[len] = '/'; + strcpy(absolute_path + len + 1, relative_path); absolute_file = malloc(strlen(absolute_path) + 1 + strlen(file)); bzero(absolute_file, strlen(absolute_path) + 1 + strlen(file)); @@ -145,7 +148,7 @@ setup(void) relative_file[strlen(relative_file)] = '/'; strcpy(relative_file + strlen(relative_path), file); - error = mkdir(relative_path, 666); + error = mkdir(relative_path, 0700); dir_exist = (errno == EEXIST); if (error && errno != EEXIST) { perror("tmp"); @@ -154,7 +157,7 @@ setup(void) error = stat("tmp/foo", &sb); file_exist = (errno != ENOENT); - i = open("tmp/foo", O_RDONLY | O_CREAT); + i = open("tmp/foo", O_RDONLY | O_CREAT, 0666); if (i == -1) { perror("foo"); exit(0); From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 03:08:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0AB7106564A; Wed, 19 Oct 2011 03:08:43 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3F91A8FC18; Wed, 19 Oct 2011 03:08:42 +0000 (UTC) Received: by ywm3 with SMTP id 3so1612054ywm.13 for ; Tue, 18 Oct 2011 20:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=7EhOR3bOusn4ah7/Yqhxse8jIc96MGAdMHXr5cMylfY=; b=KjmmXykmzoFUilqEMA55VT9v+gdPQngPIII5SXf/rprnZfFuWgV2gWT+92jvQPoC1z IQzdrBnosCj2u3nZktGT1ns8rNyTH+wf6rUFp+jhmJwoRZZUL24UBbASYrxxVOn8gJM1 Lwzuphfjkrz4rbK4RrwUAXPoU+3Ifh552TRUY= MIME-Version: 1.0 Received: by 10.42.137.6 with SMTP id w6mr9362663ict.5.1318993722341; Tue, 18 Oct 2011 20:08:42 -0700 (PDT) Received: by 10.182.122.33 with HTTP; Tue, 18 Oct 2011 20:08:42 -0700 (PDT) In-Reply-To: <201110181737.p9IHbIvW083474@svn.freebsd.org> References: <201110181737.p9IHbIvW083474@svn.freebsd.org> Date: Tue, 18 Oct 2011 20:08:42 -0700 Message-ID: From: Garrett Cooper To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226518 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 03:08:44 -0000 On Tue, Oct 18, 2011 at 10:37 AM, Dimitry Andric wrote: > Author: dim > Date: Tue Oct 18 17:37:18 2011 > New Revision: 226518 > URL: http://svn.freebsd.org/changeset/base/226518 > > Log: > =A0Fix the way clang retrieves the major FreeBSD release number from the > =A0target triple, so that the __FreeBSD__ and __FreeBSD_cc_version builti= n > =A0macros return the expected results. > > =A0Spotted by: =A0 nalitoja at gmail.com > > Modified: > =A0head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp > > Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Oct 18 16:37:= 28 2011 =A0 =A0 =A0 =A0(r226517) > +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Oct 18 17:37:= 18 2011 =A0 =A0 =A0 =A0(r226518) > @@ -238,11 +238,12 @@ protected: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MacroBuilder &Bui= lder) const { > =A0 =A0 // FreeBSD defines; list based off of gcc output > > - =A0 =A0// FIXME: Move version number handling to llvm::Triple. > - =A0 =A0llvm::StringRef Release =3D Triple.getOSName().substr(strlen("fr= eebsd"), 1); > + =A0 =A0unsigned Release =3D Triple.getOSMajorVersion(); > + =A0 =A0if (Release =3D=3D 0U) > + =A0 =A0 =A0Release =3D 8U; > > - =A0 =A0Builder.defineMacro("__FreeBSD__", Release); > - =A0 =A0Builder.defineMacro("__FreeBSD_cc_version", Release + "00001"); > + =A0 =A0Builder.defineMacro("__FreeBSD__", Twine(Release)); > + =A0 =A0Builder.defineMacro("__FreeBSD_cc_version", Twine(Release * 1000= 00U + 1U)); > =A0 =A0 Builder.defineMacro("__KPRINTF_ATTRIBUTE__"); > =A0 =A0 DefineStd(Builder, "unix", Opts); > =A0 =A0 Builder.defineMacro("__ELF__"); It looks like this commit broke tinderbox for multiple archs. -Garrett From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 03:13:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36008106564A; Wed, 19 Oct 2011 03:13:24 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9300D8FC0A; Wed, 19 Oct 2011 03:13:24 +0000 (UTC) Received: by iaky10 with SMTP id y10so1842080iak.13 for ; Tue, 18 Oct 2011 20:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=7lFto0nd212WO5udDEiKroD6xn8MtZEFHLT2cOTikGI=; b=mpXcBnXxV0KwF1Kj/JOEZ47X6L6zn5O12tOI1HdQSkeBdPSmNuCOC8exgXM66q5/0o GYEi1/mXqSDMKfPKSmXlMkVqiR3G2jjMFjk7ENRVvvf3uhykx40Fs98BsFV0Lr0Isw0K Im0J3rwZ1ZHjsnMqnGe44uepMXFgwFu/bYupY= MIME-Version: 1.0 Received: by 10.231.64.78 with SMTP id d14mr2059047ibi.56.1318994003577; Tue, 18 Oct 2011 20:13:23 -0700 (PDT) Received: by 10.182.122.33 with HTTP; Tue, 18 Oct 2011 20:13:23 -0700 (PDT) In-Reply-To: References: <201110181737.p9IHbIvW083474@svn.freebsd.org> Date: Tue, 18 Oct 2011 20:13:23 -0700 Message-ID: From: Garrett Cooper To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226518 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 03:13:25 -0000 On Tue, Oct 18, 2011 at 8:08 PM, Garrett Cooper wrote: > On Tue, Oct 18, 2011 at 10:37 AM, Dimitry Andric wrote: >> Author: dim >> Date: Tue Oct 18 17:37:18 2011 >> New Revision: 226518 >> URL: http://svn.freebsd.org/changeset/base/226518 >> >> Log: >> =A0Fix the way clang retrieves the major FreeBSD release number from the >> =A0target triple, so that the __FreeBSD__ and __FreeBSD_cc_version built= in >> =A0macros return the expected results. >> >> =A0Spotted by: =A0 nalitoja at gmail.com >> >> Modified: >> =A0head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp >> >> Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Oct 18 16:37= :28 2011 =A0 =A0 =A0 =A0(r226517) >> +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Oct 18 17:37= :18 2011 =A0 =A0 =A0 =A0(r226518) >> @@ -238,11 +238,12 @@ protected: >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MacroBuilder &Bu= ilder) const { >> =A0 =A0 // FreeBSD defines; list based off of gcc output >> >> - =A0 =A0// FIXME: Move version number handling to llvm::Triple. >> - =A0 =A0llvm::StringRef Release =3D Triple.getOSName().substr(strlen("f= reebsd"), 1); >> + =A0 =A0unsigned Release =3D Triple.getOSMajorVersion(); >> + =A0 =A0if (Release =3D=3D 0U) >> + =A0 =A0 =A0Release =3D 8U; >> >> - =A0 =A0Builder.defineMacro("__FreeBSD__", Release); >> - =A0 =A0Builder.defineMacro("__FreeBSD_cc_version", Release + "00001"); >> + =A0 =A0Builder.defineMacro("__FreeBSD__", Twine(Release)); >> + =A0 =A0Builder.defineMacro("__FreeBSD_cc_version", Twine(Release * 100= 000U + 1U)); >> =A0 =A0 Builder.defineMacro("__KPRINTF_ATTRIBUTE__"); >> =A0 =A0 DefineStd(Builder, "unix", Opts); >> =A0 =A0 Builder.defineMacro("__ELF__"); > > It looks like this commit broke tinderbox for multiple archs. Rather than just complaining, I figured I should provide a fix (note the llvm namespace scoping operators for the Twine method)... -Garrett $ svn diff contrib/llvm/tools/clang/lib/Basic/Targets.cpp Index: contrib/llvm/tools/clang/lib/Basic/Targets.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- contrib/llvm/tools/clang/lib/Basic/Targets.cpp (revision 226524) +++ contrib/llvm/tools/clang/lib/Basic/Targets.cpp (working copy) @@ -242,8 +242,9 @@ if (Release =3D=3D 0U) Release =3D 8U; - Builder.defineMacro("__FreeBSD__", Twine(Release)); - Builder.defineMacro("__FreeBSD_cc_version", Twine(Release * 100000U + = 1U)); + Builder.defineMacro("__FreeBSD__", llvm::Twine(Release)); + Builder.defineMacro("__FreeBSD_cc_version", + llvm::Twine(Release * 100000U + 1U)); Builder.defineMacro("__KPRINTF_ATTRIBUTE__"); DefineStd(Builder, "unix", Opts); Builder.defineMacro("__ELF__"); From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 06:24:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD1E106564A; Wed, 19 Oct 2011 06:24:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6368FC14; Wed, 19 Oct 2011 06:24:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J6Osh3007697; Wed, 19 Oct 2011 06:24:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9J6Osnv007695; Wed, 19 Oct 2011 06:24:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201110190624.p9J6Osnv007695@svn.freebsd.org> From: Dimitry Andric Date: Wed, 19 Oct 2011 06:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226525 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 06:24:54 -0000 Author: dim Date: Wed Oct 19 06:24:53 2011 New Revision: 226525 URL: http://svn.freebsd.org/changeset/base/226525 Log: Fix breakage introduced by r226518. Spotted by: tinderbox, yanefbsd at gmail.com Pointy hat to: dim Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Wed Oct 19 01:23:13 2011 (r226524) +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Wed Oct 19 06:24:53 2011 (r226525) @@ -242,8 +242,9 @@ protected: if (Release == 0U) Release = 8U; - Builder.defineMacro("__FreeBSD__", Twine(Release)); - Builder.defineMacro("__FreeBSD_cc_version", Twine(Release * 100000U + 1U)); + Builder.defineMacro("__FreeBSD__", llvm::Twine(Release)); + Builder.defineMacro("__FreeBSD_cc_version", + llvm::Twine(Release * 100000U + 1U)); Builder.defineMacro("__KPRINTF_ATTRIBUTE__"); DefineStd(Builder, "unix", Opts); Builder.defineMacro("__ELF__"); From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 06:26:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5106E106566C; Wed, 19 Oct 2011 06:26:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1107A8FC08; Wed, 19 Oct 2011 06:26:39 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:2809:4756:fc07:9670] (unknown [IPv6:2001:7b8:3a7:0:2809:4756:fc07:9670]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1C6DD5C37; Wed, 19 Oct 2011 08:26:38 +0200 (CEST) Message-ID: <4E9E6D9E.9090802@FreeBSD.org> Date: Wed, 19 Oct 2011 08:26:38 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111012 Thunderbird/8.0 MIME-Version: 1.0 To: Garrett Cooper References: <201110181737.p9IHbIvW083474@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226518 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 06:26:39 -0000 On 2011-10-19 05:13, Garrett Cooper wrote: > On Tue, Oct 18, 2011 at 8:08 PM, Garrett Cooper wrote: >> On Tue, Oct 18, 2011 at 10:37 AM, Dimitry Andric wrote: >>> Author: dim >>> Date: Tue Oct 18 17:37:18 2011 >>> New Revision: 226518 >>> URL: http://svn.freebsd.org/changeset/base/226518 ... >> It looks like this commit broke tinderbox for multiple archs. > > Rather than just complaining, I figured I should provide a fix (note > the llvm namespace scoping operators for the Twine method)... Sorry for the breakage. I committed the fix just now. From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 07:16:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B214106564A; Wed, 19 Oct 2011 07:16:58 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B52E8FC17; Wed, 19 Oct 2011 07:16:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J7Gwev009676; Wed, 19 Oct 2011 07:16:58 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9J7GwpZ009674; Wed, 19 Oct 2011 07:16:58 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201110190716.p9J7GwpZ009674@svn.freebsd.org> From: Fabien Thomas Date: Wed, 19 Oct 2011 07:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226526 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 07:16:58 -0000 Author: fabient Date: Wed Oct 19 07:16:57 2011 New Revision: 226526 URL: http://svn.freebsd.org/changeset/base/226526 Log: Add missing DEBUG define from r226514. Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Wed Oct 19 06:24:53 2011 (r226525) +++ head/sys/sys/pmc.h Wed Oct 19 07:16:57 2011 (r226526) @@ -1040,6 +1040,7 @@ extern struct pmc_debugflags pmc_debugfl #define PMC_DEBUG_MIN_SIO 9 /* schedule i/o */ #define PMC_DEBUG_MIN_FLS 10 /* flush */ #define PMC_DEBUG_MIN_SAM 11 /* sample */ +#define PMC_DEBUG_MIN_CLO 12 /* close */ #else #define PMCDBG(M,N,L,F,...) /* nothing */ From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 07:33:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AA2F106566B; Wed, 19 Oct 2011 07:33:17 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (mars.netasq.com [91.212.116.3]) by mx1.freebsd.org (Postfix) with ESMTP id 215F98FC08; Wed, 19 Oct 2011 07:33:15 +0000 (UTC) Received: from [172.20.110.4] (unknown [172.20.110.4]) by work.netasq.com (Postfix) with ESMTPSA id EEA97740002; Wed, 19 Oct 2011 09:16:20 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Fabien Thomas In-Reply-To: <919B2142-241B-454B-B01E-750AB8935D3C@lists.zabbadoz.net> Date: Wed, 19 Oct 2011 09:17:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201110181525.p9IFPhMd079276@svn.freebsd.org> <919B2142-241B-454B-B01E-750AB8935D3C@lists.zabbadoz.net> To: Bjoern A. Zeeb X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226514 - in head: lib/libpmc sys/dev/hwpmc sys/sys usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 07:33:17 -0000 Badly merged my patchset... Corrected with r226526. On Oct 18, 2011, at 6:23 PM, Bjoern A. Zeeb wrote: >=20 > On 18. Oct 2011, at 15:25 , Fabien Thomas wrote: >=20 >> Author: fabient >> Date: Tue Oct 18 15:25:43 2011 >> New Revision: 226514 >> URL: http://svn.freebsd.org/changeset/base/226514 >>=20 >> Log: >> Add a flush of the current PMC log buffer before displaying the next = top. >>=20 >> As the underlying block is 4KB if the PMC throughput is low the = measurement >> will be reported on the next tick. pmcstat(8) use the modified flush = API to >> reclaim current buffer before displaying next top. >>=20 >=20 > I get this for every LINT kernel at minimum: >=20 > = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c: In function 'pmclog_close': > = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: 'PMC_DEBUG_MIN_CLO' undeclared (first use in this = function) > = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: (Each undeclared identifier is reported only once > = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: for each function it appears in.) >=20 >=20 >=20 >> MFC after: 1 month >>=20 >> Modified: >> head/lib/libpmc/libpmc.c >> head/lib/libpmc/pmc.3 >> head/lib/libpmc/pmc.h >> head/lib/libpmc/pmc_configure_logfile.3 >> head/sys/dev/hwpmc/hwpmc_logging.c >> head/sys/dev/hwpmc/hwpmc_mod.c >> head/sys/sys/pmc.h >> head/sys/sys/pmclog.h >> head/usr.sbin/pmcstat/pmcstat.c >> head/usr.sbin/pmcstat/pmcstat_log.c >>=20 >> Modified: head/lib/libpmc/libpmc.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libpmc/libpmc.c Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/lib/libpmc/libpmc.c Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -2596,6 +2596,12 @@ pmc_flush_logfile(void) >> } >>=20 >> int >> +pmc_close_logfile(void) >> +{ >> + return (PMC_CALL(CLOSELOG,0)); >> +} >> + >> +int >> pmc_get_driver_stats(struct pmc_driverstats *ds) >> { >> struct pmc_op_getdriverstats gms; >>=20 >> Modified: head/lib/libpmc/pmc.3 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libpmc/pmc.3 Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/lib/libpmc/pmc.3 Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -322,6 +322,10 @@ to write logged events to. >> Flush all pending log data in >> .Xr hwpmc 4 Ns Ap s >> buffers. >> +.It Fn pmc_close_logfile >> +Flush all pending log data and close >> +.Xr hwpmc 4 Ns Ap s >> +side of the stream. >> .It Fn pmc_writelog >> Append arbitrary user data to the current log file. >> .El >>=20 >> Modified: head/lib/libpmc/pmc.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libpmc/pmc.h Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/lib/libpmc/pmc.h Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -76,6 +76,7 @@ int pmc_attach(pmc_id_t _pmcid, pid_t _p >> int pmc_capabilities(pmc_id_t _pmc, uint32_t *_caps); >> int pmc_configure_logfile(int _fd); >> int pmc_flush_logfile(void); >> +int pmc_close_logfile(void); >> int pmc_detach(pmc_id_t _pmcid, pid_t _pid); >> int pmc_disable(int _cpu, int _pmc); >> int pmc_enable(int _cpu, int _pmc); >>=20 >> Modified: head/lib/libpmc/pmc_configure_logfile.3 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -29,7 +29,8 @@ >> .Sh NAME >> .Nm pmc_configure_logfile , >> .Nm pmc_flush_logfile , >> -.Nm pmc_writelog >> +.Nm pmc_writelog , >> +.Nm pmc_close_logfile >> .Nd log file management >> .Sh LIBRARY >> .Lb libpmc >> @@ -41,6 +42,8 @@ >> .Fn pmc_flush_logfile void >> .Ft int >> .Fn pmc_writelog "uint32_t userdata" >> +.Ft int >> +.Fn pmc_close_logfile void >> .Sh DESCRIPTION >> The functions manage logging of >> .Xr hwpmc 4 >> @@ -72,6 +75,12 @@ Function >> will append a log entry containing the value of argument >> .Fa userdata >> to the log file. >> +.Pp >> +Function >> +.Fn pmc_close_logfile >> +will flush all pending log data and close >> +.Xr hwpmc 4 Ns Ap s >> +side of the stream. >> .Sh RETURN VALUES >> .Rv -std >> .Sh ERRORS >>=20 >> Modified: head/sys/dev/hwpmc/hwpmc_logging.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -238,7 +238,7 @@ pmclog_get_buffer(struct pmc_owner *po) >> static void >> pmclog_loop(void *arg) >> { >> - int error, last_buffer; >> + int error; >> struct pmc_owner *po; >> struct pmclog_buffer *lb; >> struct proc *p; >> @@ -253,7 +253,6 @@ pmclog_loop(void *arg) >> p =3D po->po_owner; >> td =3D curthread; >> mycred =3D td->td_ucred; >> - last_buffer =3D 0; >>=20 >> PROC_LOCK(p); >> ownercred =3D crhold(p->p_ucred); >> @@ -286,14 +285,22 @@ pmclog_loop(void *arg) >> if ((lb =3D TAILQ_FIRST(&po->po_logbuffers)) =3D=3D= NULL) { >> mtx_unlock_spin(&po->po_mtx); >>=20 >> + if (po->po_flags & PMC_PO_SHUTDOWN) { >> + mtx_unlock(&pmc_kthread_mtx); >> + /* >> + * Close the file to get = PMCLOG_EOF >> + * error in pmclog(3). >> + */ >> + fo_close(po->po_file, = curthread); >> + mtx_lock(&pmc_kthread_mtx); >> + } >> + >> (void) msleep(po, &pmc_kthread_mtx, = PWAIT, >> "pmcloop", 0); >> continue; >> } >>=20 >> TAILQ_REMOVE(&po->po_logbuffers, lb, plb_next); >> - if (po->po_flags & PMC_PO_SHUTDOWN) >> - last_buffer =3D = TAILQ_EMPTY(&po->po_logbuffers); >> mtx_unlock_spin(&po->po_mtx); >> } >>=20 >> @@ -336,14 +343,6 @@ pmclog_loop(void *arg) >> break; >> } >>=20 >> - if (last_buffer) { >> - /* >> - * Close the file to get PMCLOG_EOF error >> - * in pmclog(3). >> - */ >> - fo_close(po->po_file, curthread); >> - } >> - >> mtx_lock(&pmc_kthread_mtx); >>=20 >> /* put the used buffer back into the global pool */ >> @@ -693,6 +692,7 @@ int >> pmclog_flush(struct pmc_owner *po) >> { >> int error; >> + struct pmclog_buffer *lb; >>=20 >> PMCDBG(LOG,FLS,1, "po=3D%p", po); >>=20 >> @@ -715,11 +715,38 @@ pmclog_flush(struct pmc_owner *po) >> } >>=20 >> /* >> - * Schedule the current buffer if any. >> + * Schedule the current buffer if any and not empty. >> + */ >> + mtx_lock_spin(&po->po_mtx); >> + lb =3D po->po_curbuf; >> + if (lb && lb->plb_ptr !=3D lb->plb_base) { >> + pmclog_schedule_io(po); >> + } else >> + error =3D ENOBUFS; >> + mtx_unlock_spin(&po->po_mtx); >> + >> + error: >> + mtx_unlock(&pmc_kthread_mtx); >> + >> + return (error); >> +} >> + >> +int >> +pmclog_close(struct pmc_owner *po) >> +{ >> + >> + PMCDBG(LOG,CLO,1, "po=3D%p", po); >> + >> + mtx_lock(&pmc_kthread_mtx); >> + >> + /* >> + * Schedule the current buffer. >> */ >> mtx_lock_spin(&po->po_mtx); >> if (po->po_curbuf) >> pmclog_schedule_io(po); >> + else >> + wakeup_one(po); >> mtx_unlock_spin(&po->po_mtx); >>=20 >> /* >> @@ -728,13 +755,11 @@ pmclog_flush(struct pmc_owner *po) >> */ >> po->po_flags |=3D PMC_PO_SHUTDOWN; >>=20 >> - error: >> mtx_unlock(&pmc_kthread_mtx); >>=20 >> - return (error); >> + return (0); >> } >>=20 >> - >> void >> pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) >> { >>=20 >> Modified: head/sys/dev/hwpmc/hwpmc_mod.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -2891,7 +2891,7 @@ pmc_syscall_handler(struct thread *td, v >> error =3D pmclog_configure_log(md, po, = cl.pm_logfd); >> } else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { >> pmclog_process_closelog(po); >> - error =3D pmclog_flush(po); >> + error =3D pmclog_close(po); >> if (error =3D=3D 0) { >> LIST_FOREACH(pm, &po->po_pmcs, pm_next) >> if (pm->pm_flags & = PMC_F_NEEDS_LOGFILE && >> @@ -2907,7 +2907,6 @@ pmc_syscall_handler(struct thread *td, v >> } >> break; >>=20 >> - >> /* >> * Flush a log file. >> */ >> @@ -2928,6 +2927,25 @@ pmc_syscall_handler(struct thread *td, v >> break; >>=20 >> /* >> + * Close a log file. >> + */ >> + >> + case PMC_OP_CLOSELOG: >> + { >> + struct pmc_owner *po; >> + >> + sx_assert(&pmc_sx, SX_XLOCKED); >> + >> + if ((po =3D pmc_find_owner_descriptor(td->td_proc)) =3D=3D= NULL) { >> + error =3D EINVAL; >> + break; >> + } >> + >> + error =3D pmclog_close(po); >> + } >> + break; >> + >> + /* >> * Retrieve hardware configuration. >> */ >>=20 >>=20 >> Modified: head/sys/sys/pmc.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/sys/pmc.h Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/sys/sys/pmc.h Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -302,7 +302,8 @@ enum pmc_event { >> __PMC_OP(PMCSETCOUNT, "Set initial count/sampling rate") = \ >> __PMC_OP(PMCSTART, "Start a PMC") = \ >> __PMC_OP(PMCSTOP, "Stop a PMC") = \ >> - __PMC_OP(WRITELOG, "Write a cookie to the log file") >> + __PMC_OP(WRITELOG, "Write a cookie to the log file") = \ >> + __PMC_OP(CLOSELOG, "Close log file") >>=20 >>=20 >> enum pmc_ops { >>=20 >> Modified: head/sys/sys/pmclog.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/sys/pmclog.h Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/sys/sys/pmclog.h Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -243,6 +243,7 @@ int pmclog_configure_log(struct pmc_mdep >> int _logfd); >> int pmclog_deconfigure_log(struct pmc_owner *_po); >> int pmclog_flush(struct pmc_owner *_po); >> +int pmclog_close(struct pmc_owner *_po); >> void pmclog_initialize(void); >> void pmclog_process_callchain(struct pmc *_pm, struct pmc_sample = *_ps); >> void pmclog_process_closelog(struct pmc_owner *po); >>=20 >> Modified: head/usr.sbin/pmcstat/pmcstat.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -552,7 +552,7 @@ main(int argc, char **argv) >> int hcpu, option, npmc, ncpu; >> int c, check_driver_stats, current_cpu, current_sampling_count; >> int do_callchain, do_descendants, do_logproccsw, do_logprocexit; >> - int do_print; >> + int do_print, do_read; >> size_t dummy; >> int graphdepth; >> int pipefd[2], rfd; >> @@ -1328,7 +1328,7 @@ main(int argc, char **argv) >> * are killed by a SIGINT. >> */ >> runstate =3D PMCSTAT_RUNNING; >> - do_print =3D 0; >> + do_print =3D do_read =3D 0; >> do { >> if ((c =3D kevent(pmcstat_kq, NULL, 0, &kev, 1, NULL)) = <=3D 0) { >> if (errno !=3D EINTR) >> @@ -1351,8 +1351,10 @@ main(int argc, char **argv) >> (args.pa_flags & FLAG_DO_TOP)) { >> if (pmcstat_keypress_log()) >> runstate =3D = pmcstat_close_log(); >> - } else >> + } else { >> + do_read =3D 0; >> runstate =3D pmcstat_process_log(); >> + } >> break; >>=20 >> case EVFILT_SIGNAL: >> @@ -1377,9 +1379,6 @@ main(int argc, char **argv) >> /* Kill the child process if we started = it */ >> if (args.pa_flags & = FLAG_HAS_COMMANDLINE) >> pmcstat_kill_process(); >> - /* Close the pipe to self, if present. = */ >> - if (args.pa_flags & FLAG_HAS_PIPE) >> - (void) = close(pipefd[READPIPEFD]); >> runstate =3D pmcstat_close_log(); >> } else if (kev.ident =3D=3D SIGWINCH) { >> if (ioctl(fileno(args.pa_printfile), >> @@ -1394,12 +1393,15 @@ main(int argc, char **argv) >> break; >>=20 >> case EVFILT_TIMER: /* print out counting PMCs */ >> + if ((args.pa_flags & FLAG_DO_TOP) && >> + pmc_flush_logfile() !=3D ENOBUFS) >> + do_read =3D 1; >> do_print =3D 1; >> break; >>=20 >> } >>=20 >> - if (do_print) { >> + if (do_print && !do_read) { >> if ((args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) = =3D=3D 0) { >> pmcstat_print_pmcs(); >> if (runstate =3D=3D PMCSTAT_FINISHED && = /* final newline */ >> @@ -1420,7 +1422,7 @@ main(int argc, char **argv) >>=20 >> /* flush any pending log entries */ >> if (args.pa_flags & (FLAG_HAS_OUTPUT_LOGFILE | FLAG_HAS_PIPE)) >> - pmc_flush_logfile(); >> + pmc_close_logfile(); >>=20 >> pmcstat_cleanup(); >>=20 >>=20 >> Modified: head/usr.sbin/pmcstat/pmcstat_log.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 14:05:18 2011 = (r226513) >> +++ head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 15:25:43 2011 = (r226514) >> @@ -1702,7 +1702,7 @@ pmcstat_close_log(void) >> * so keep the status to EXITING. >> */ >> if (args.pa_logfd !=3D -1) { >> - if (pmc_flush_logfile() < 0) >> + if (pmc_close_logfile() < 0) >> err(EX_OSERR, "ERROR: logging failed"); >> } >>=20 >=20 > --=20 > Bjoern A. Zeeb You have to have = visions! > Stop bit received. Insert coin for new address family. >=20 -- Fabien Thomas From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 08:37:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BEB8106564A; Wed, 19 Oct 2011 08:37:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 125DA8FC12; Wed, 19 Oct 2011 08:37:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J8bmYY012256; Wed, 19 Oct 2011 08:37:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9J8bm2a012254; Wed, 19 Oct 2011 08:37:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110190837.p9J8bm2a012254@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 08:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226527 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 08:37:49 -0000 Author: bz Date: Wed Oct 19 08:37:48 2011 New Revision: 226527 URL: http://svn.freebsd.org/changeset/base/226527 Log: Fix indentation in a loop and a tiny maze of #ifdefs for just the __FreeBSD__ parts that had it wrong. MFC after: 3 days Modified: head/sys/contrib/pf/net/pf.c Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Wed Oct 19 07:16:57 2011 (r226526) +++ head/sys/contrib/pf/net/pf.c Wed Oct 19 08:37:48 2011 (r226527) @@ -1342,42 +1342,42 @@ pf_purge_thread(void *v) tsleep(pf_purge_thread, PWAIT, "pftm", 1 * hz); #ifdef __FreeBSD__ - sx_slock(&V_pf_consistency_lock); - PF_LOCK(); - locked = 0; - - if (V_pf_end_threads) { - PF_UNLOCK(); - sx_sunlock(&V_pf_consistency_lock); - sx_xlock(&V_pf_consistency_lock); + sx_slock(&V_pf_consistency_lock); PF_LOCK(); + locked = 0; + + if (V_pf_end_threads) { + PF_UNLOCK(); + sx_sunlock(&V_pf_consistency_lock); + sx_xlock(&V_pf_consistency_lock); + PF_LOCK(); - pf_purge_expired_states(V_pf_status.states, 1); - pf_purge_expired_fragments(); - pf_purge_expired_src_nodes(1); - V_pf_end_threads++; + pf_purge_expired_states(V_pf_status.states, 1); + pf_purge_expired_fragments(); + pf_purge_expired_src_nodes(1); + V_pf_end_threads++; - sx_xunlock(&V_pf_consistency_lock); - PF_UNLOCK(); - wakeup(pf_purge_thread); - kproc_exit(0); - } + sx_xunlock(&V_pf_consistency_lock); + PF_UNLOCK(); + wakeup(pf_purge_thread); + kproc_exit(0); + } #endif s = splsoftnet(); /* process a fraction of the state table every second */ #ifdef __FreeBSD__ - if (!pf_purge_expired_states(1 + (V_pf_status.states / - V_pf_default_rule.timeout[PFTM_INTERVAL]), 0)) { - PF_UNLOCK(); - sx_sunlock(&V_pf_consistency_lock); - sx_xlock(&V_pf_consistency_lock); - PF_LOCK(); - locked = 1; + if (!pf_purge_expired_states(1 + (V_pf_status.states / + V_pf_default_rule.timeout[PFTM_INTERVAL]), 0)) { + PF_UNLOCK(); + sx_sunlock(&V_pf_consistency_lock); + sx_xlock(&V_pf_consistency_lock); + PF_LOCK(); + locked = 1; - pf_purge_expired_states(1 + (V_pf_status.states / - V_pf_default_rule.timeout[PFTM_INTERVAL]), 1); - } + pf_purge_expired_states(1 + (V_pf_status.states / + V_pf_default_rule.timeout[PFTM_INTERVAL]), 1); + } #else pf_purge_expired_states(1 + (pf_status.states / pf_default_rule.timeout[PFTM_INTERVAL])); From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 08:57:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96F2B1065672; Wed, 19 Oct 2011 08:57:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 872A28FC13; Wed, 19 Oct 2011 08:57:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J8vHbY013032; Wed, 19 Oct 2011 08:57:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9J8vHBJ013030; Wed, 19 Oct 2011 08:57:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110190857.p9J8vHBJ013030@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 08:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226530 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 08:57:17 -0000 Author: bz Date: Wed Oct 19 08:57:17 2011 New Revision: 226530 URL: http://svn.freebsd.org/changeset/base/226530 Log: Fix a bug when NPFSYNC > 0 that on FreeBSD we would always return and never remove state. This fixes the problem some people are seeing that state is removed when pf is loaded as a module but not in situations when compiled into the kernel. Reported by: many on freebsd-pf Tested by: flo MFC after: 3 days Modified: head/sys/contrib/pf/net/pf.c Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Wed Oct 19 08:52:14 2011 (r226529) +++ head/sys/contrib/pf/net/pf.c Wed Oct 19 08:57:17 2011 (r226530) @@ -1626,8 +1626,8 @@ pf_free_state(struct pf_state *cur) #if NPFSYNC > 0 #ifdef __FreeBSD__ - if (pfsync_state_in_use_ptr != NULL) - pfsync_state_in_use_ptr(cur); + if (pfsync_state_in_use_ptr != NULL && + pfsync_state_in_use_ptr(cur)) #else if (pfsync_state_in_use(cur)) #endif From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 08:58:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FE001065677; Wed, 19 Oct 2011 08:58:13 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 3FF0C8FC27; Wed, 19 Oct 2011 08:58:12 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A976A25D3899; Wed, 19 Oct 2011 08:58:10 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D15D7BD3C5A; Wed, 19 Oct 2011 08:58:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id LS0zj84V5RPC; Wed, 19 Oct 2011 08:58:06 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 78685BD3C54; Wed, 19 Oct 2011 08:58:06 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: Date: Wed, 19 Oct 2011 08:58:05 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <12C2045E-AD80-42C3-A515-BEA5FCDCF5B8@lists.zabbadoz.net> References: <201110181525.p9IFPhMd079276@svn.freebsd.org> <919B2142-241B-454B-B01E-750AB8935D3C@lists.zabbadoz.net> To: Fabien Thomas X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226514 - in head: lib/libpmc sys/dev/hwpmc sys/sys usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 08:58:13 -0000 On 19. Oct 2011, at 07:17 , Fabien Thomas wrote: > Badly merged my patchset... > Corrected with r226526. >=20 Thanks! > On Oct 18, 2011, at 6:23 PM, Bjoern A. Zeeb wrote: >=20 >>=20 >> On 18. Oct 2011, at 15:25 , Fabien Thomas wrote: >>=20 >>> Author: fabient >>> Date: Tue Oct 18 15:25:43 2011 >>> New Revision: 226514 >>> URL: http://svn.freebsd.org/changeset/base/226514 >>>=20 >>> Log: >>> Add a flush of the current PMC log buffer before displaying the next = top. >>>=20 >>> As the underlying block is 4KB if the PMC throughput is low the = measurement >>> will be reported on the next tick. pmcstat(8) use the modified flush = API to >>> reclaim current buffer before displaying next top. >>>=20 >>=20 >> I get this for every LINT kernel at minimum: >>=20 >> = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c: In function 'pmclog_close': >> = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: 'PMC_DEBUG_MIN_CLO' undeclared (first use in this = function) >> = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: (Each undeclared identifier is reported only once >> = /scratch/tmp/bz/head.universe/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_logg= ing.c:738: error: for each function it appears in.) >>=20 >>=20 >>=20 >>> MFC after: 1 month >>>=20 >>> Modified: >>> head/lib/libpmc/libpmc.c >>> head/lib/libpmc/pmc.3 >>> head/lib/libpmc/pmc.h >>> head/lib/libpmc/pmc_configure_logfile.3 >>> head/sys/dev/hwpmc/hwpmc_logging.c >>> head/sys/dev/hwpmc/hwpmc_mod.c >>> head/sys/sys/pmc.h >>> head/sys/sys/pmclog.h >>> head/usr.sbin/pmcstat/pmcstat.c >>> head/usr.sbin/pmcstat/pmcstat_log.c >>>=20 >>> Modified: head/lib/libpmc/libpmc.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/lib/libpmc/libpmc.c Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/lib/libpmc/libpmc.c Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -2596,6 +2596,12 @@ pmc_flush_logfile(void) >>> } >>>=20 >>> int >>> +pmc_close_logfile(void) >>> +{ >>> + return (PMC_CALL(CLOSELOG,0)); >>> +} >>> + >>> +int >>> pmc_get_driver_stats(struct pmc_driverstats *ds) >>> { >>> struct pmc_op_getdriverstats gms; >>>=20 >>> Modified: head/lib/libpmc/pmc.3 >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/lib/libpmc/pmc.3 Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/lib/libpmc/pmc.3 Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -322,6 +322,10 @@ to write logged events to. >>> Flush all pending log data in >>> .Xr hwpmc 4 Ns Ap s >>> buffers. >>> +.It Fn pmc_close_logfile >>> +Flush all pending log data and close >>> +.Xr hwpmc 4 Ns Ap s >>> +side of the stream. >>> .It Fn pmc_writelog >>> Append arbitrary user data to the current log file. >>> .El >>>=20 >>> Modified: head/lib/libpmc/pmc.h >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/lib/libpmc/pmc.h Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/lib/libpmc/pmc.h Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -76,6 +76,7 @@ int pmc_attach(pmc_id_t _pmcid, pid_t _p >>> int pmc_capabilities(pmc_id_t _pmc, uint32_t *_caps); >>> int pmc_configure_logfile(int _fd); >>> int pmc_flush_logfile(void); >>> +int pmc_close_logfile(void); >>> int pmc_detach(pmc_id_t _pmcid, pid_t _pid); >>> int pmc_disable(int _cpu, int _pmc); >>> int pmc_enable(int _cpu, int _pmc); >>>=20 >>> Modified: head/lib/libpmc/pmc_configure_logfile.3 >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/lib/libpmc/pmc_configure_logfile.3 Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -29,7 +29,8 @@ >>> .Sh NAME >>> .Nm pmc_configure_logfile , >>> .Nm pmc_flush_logfile , >>> -.Nm pmc_writelog >>> +.Nm pmc_writelog , >>> +.Nm pmc_close_logfile >>> .Nd log file management >>> .Sh LIBRARY >>> .Lb libpmc >>> @@ -41,6 +42,8 @@ >>> .Fn pmc_flush_logfile void >>> .Ft int >>> .Fn pmc_writelog "uint32_t userdata" >>> +.Ft int >>> +.Fn pmc_close_logfile void >>> .Sh DESCRIPTION >>> The functions manage logging of >>> .Xr hwpmc 4 >>> @@ -72,6 +75,12 @@ Function >>> will append a log entry containing the value of argument >>> .Fa userdata >>> to the log file. >>> +.Pp >>> +Function >>> +.Fn pmc_close_logfile >>> +will flush all pending log data and close >>> +.Xr hwpmc 4 Ns Ap s >>> +side of the stream. >>> .Sh RETURN VALUES >>> .Rv -std >>> .Sh ERRORS >>>=20 >>> Modified: head/sys/dev/hwpmc/hwpmc_logging.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/sys/dev/hwpmc/hwpmc_logging.c Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -238,7 +238,7 @@ pmclog_get_buffer(struct pmc_owner *po) >>> static void >>> pmclog_loop(void *arg) >>> { >>> - int error, last_buffer; >>> + int error; >>> struct pmc_owner *po; >>> struct pmclog_buffer *lb; >>> struct proc *p; >>> @@ -253,7 +253,6 @@ pmclog_loop(void *arg) >>> p =3D po->po_owner; >>> td =3D curthread; >>> mycred =3D td->td_ucred; >>> - last_buffer =3D 0; >>>=20 >>> PROC_LOCK(p); >>> ownercred =3D crhold(p->p_ucred); >>> @@ -286,14 +285,22 @@ pmclog_loop(void *arg) >>> if ((lb =3D TAILQ_FIRST(&po->po_logbuffers)) =3D=3D= NULL) { >>> mtx_unlock_spin(&po->po_mtx); >>>=20 >>> + if (po->po_flags & PMC_PO_SHUTDOWN) { >>> + mtx_unlock(&pmc_kthread_mtx); >>> + /* >>> + * Close the file to get = PMCLOG_EOF >>> + * error in pmclog(3). >>> + */ >>> + fo_close(po->po_file, = curthread); >>> + mtx_lock(&pmc_kthread_mtx); >>> + } >>> + >>> (void) msleep(po, &pmc_kthread_mtx, = PWAIT, >>> "pmcloop", 0); >>> continue; >>> } >>>=20 >>> TAILQ_REMOVE(&po->po_logbuffers, lb, plb_next); >>> - if (po->po_flags & PMC_PO_SHUTDOWN) >>> - last_buffer =3D = TAILQ_EMPTY(&po->po_logbuffers); >>> mtx_unlock_spin(&po->po_mtx); >>> } >>>=20 >>> @@ -336,14 +343,6 @@ pmclog_loop(void *arg) >>> break; >>> } >>>=20 >>> - if (last_buffer) { >>> - /* >>> - * Close the file to get PMCLOG_EOF error >>> - * in pmclog(3). >>> - */ >>> - fo_close(po->po_file, curthread); >>> - } >>> - >>> mtx_lock(&pmc_kthread_mtx); >>>=20 >>> /* put the used buffer back into the global pool */ >>> @@ -693,6 +692,7 @@ int >>> pmclog_flush(struct pmc_owner *po) >>> { >>> int error; >>> + struct pmclog_buffer *lb; >>>=20 >>> PMCDBG(LOG,FLS,1, "po=3D%p", po); >>>=20 >>> @@ -715,11 +715,38 @@ pmclog_flush(struct pmc_owner *po) >>> } >>>=20 >>> /* >>> - * Schedule the current buffer if any. >>> + * Schedule the current buffer if any and not empty. >>> + */ >>> + mtx_lock_spin(&po->po_mtx); >>> + lb =3D po->po_curbuf; >>> + if (lb && lb->plb_ptr !=3D lb->plb_base) { >>> + pmclog_schedule_io(po); >>> + } else >>> + error =3D ENOBUFS; >>> + mtx_unlock_spin(&po->po_mtx); >>> + >>> + error: >>> + mtx_unlock(&pmc_kthread_mtx); >>> + >>> + return (error); >>> +} >>> + >>> +int >>> +pmclog_close(struct pmc_owner *po) >>> +{ >>> + >>> + PMCDBG(LOG,CLO,1, "po=3D%p", po); >>> + >>> + mtx_lock(&pmc_kthread_mtx); >>> + >>> + /* >>> + * Schedule the current buffer. >>> */ >>> mtx_lock_spin(&po->po_mtx); >>> if (po->po_curbuf) >>> pmclog_schedule_io(po); >>> + else >>> + wakeup_one(po); >>> mtx_unlock_spin(&po->po_mtx); >>>=20 >>> /* >>> @@ -728,13 +755,11 @@ pmclog_flush(struct pmc_owner *po) >>> */ >>> po->po_flags |=3D PMC_PO_SHUTDOWN; >>>=20 >>> - error: >>> mtx_unlock(&pmc_kthread_mtx); >>>=20 >>> - return (error); >>> + return (0); >>> } >>>=20 >>> - >>> void >>> pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) >>> { >>>=20 >>> Modified: head/sys/dev/hwpmc/hwpmc_mod.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -2891,7 +2891,7 @@ pmc_syscall_handler(struct thread *td, v >>> error =3D pmclog_configure_log(md, po, = cl.pm_logfd); >>> } else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { >>> pmclog_process_closelog(po); >>> - error =3D pmclog_flush(po); >>> + error =3D pmclog_close(po); >>> if (error =3D=3D 0) { >>> LIST_FOREACH(pm, &po->po_pmcs, pm_next) >>> if (pm->pm_flags & = PMC_F_NEEDS_LOGFILE && >>> @@ -2907,7 +2907,6 @@ pmc_syscall_handler(struct thread *td, v >>> } >>> break; >>>=20 >>> - >>> /* >>> * Flush a log file. >>> */ >>> @@ -2928,6 +2927,25 @@ pmc_syscall_handler(struct thread *td, v >>> break; >>>=20 >>> /* >>> + * Close a log file. >>> + */ >>> + >>> + case PMC_OP_CLOSELOG: >>> + { >>> + struct pmc_owner *po; >>> + >>> + sx_assert(&pmc_sx, SX_XLOCKED); >>> + >>> + if ((po =3D pmc_find_owner_descriptor(td->td_proc)) =3D=3D= NULL) { >>> + error =3D EINVAL; >>> + break; >>> + } >>> + >>> + error =3D pmclog_close(po); >>> + } >>> + break; >>> + >>> + /* >>> * Retrieve hardware configuration. >>> */ >>>=20 >>>=20 >>> Modified: head/sys/sys/pmc.h >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/sys/sys/pmc.h Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/sys/sys/pmc.h Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -302,7 +302,8 @@ enum pmc_event { >>> __PMC_OP(PMCSETCOUNT, "Set initial count/sampling rate") = \ >>> __PMC_OP(PMCSTART, "Start a PMC") = \ >>> __PMC_OP(PMCSTOP, "Stop a PMC") = \ >>> - __PMC_OP(WRITELOG, "Write a cookie to the log file") >>> + __PMC_OP(WRITELOG, "Write a cookie to the log file") = \ >>> + __PMC_OP(CLOSELOG, "Close log file") >>>=20 >>>=20 >>> enum pmc_ops { >>>=20 >>> Modified: head/sys/sys/pmclog.h >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/sys/sys/pmclog.h Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/sys/sys/pmclog.h Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -243,6 +243,7 @@ int pmclog_configure_log(struct pmc_mdep >>> int _logfd); >>> int pmclog_deconfigure_log(struct pmc_owner *_po); >>> int pmclog_flush(struct pmc_owner *_po); >>> +int pmclog_close(struct pmc_owner *_po); >>> void pmclog_initialize(void); >>> void pmclog_process_callchain(struct pmc *_pm, struct = pmc_sample *_ps); >>> void pmclog_process_closelog(struct pmc_owner *po); >>>=20 >>> Modified: head/usr.sbin/pmcstat/pmcstat.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/usr.sbin/pmcstat/pmcstat.c Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -552,7 +552,7 @@ main(int argc, char **argv) >>> int hcpu, option, npmc, ncpu; >>> int c, check_driver_stats, current_cpu, current_sampling_count; >>> int do_callchain, do_descendants, do_logproccsw, do_logprocexit; >>> - int do_print; >>> + int do_print, do_read; >>> size_t dummy; >>> int graphdepth; >>> int pipefd[2], rfd; >>> @@ -1328,7 +1328,7 @@ main(int argc, char **argv) >>> * are killed by a SIGINT. >>> */ >>> runstate =3D PMCSTAT_RUNNING; >>> - do_print =3D 0; >>> + do_print =3D do_read =3D 0; >>> do { >>> if ((c =3D kevent(pmcstat_kq, NULL, 0, &kev, 1, NULL)) = <=3D 0) { >>> if (errno !=3D EINTR) >>> @@ -1351,8 +1351,10 @@ main(int argc, char **argv) >>> (args.pa_flags & FLAG_DO_TOP)) { >>> if (pmcstat_keypress_log()) >>> runstate =3D = pmcstat_close_log(); >>> - } else >>> + } else { >>> + do_read =3D 0; >>> runstate =3D pmcstat_process_log(); >>> + } >>> break; >>>=20 >>> case EVFILT_SIGNAL: >>> @@ -1377,9 +1379,6 @@ main(int argc, char **argv) >>> /* Kill the child process if we started = it */ >>> if (args.pa_flags & = FLAG_HAS_COMMANDLINE) >>> pmcstat_kill_process(); >>> - /* Close the pipe to self, if present. = */ >>> - if (args.pa_flags & FLAG_HAS_PIPE) >>> - (void) = close(pipefd[READPIPEFD]); >>> runstate =3D pmcstat_close_log(); >>> } else if (kev.ident =3D=3D SIGWINCH) { >>> if (ioctl(fileno(args.pa_printfile), >>> @@ -1394,12 +1393,15 @@ main(int argc, char **argv) >>> break; >>>=20 >>> case EVFILT_TIMER: /* print out counting PMCs */ >>> + if ((args.pa_flags & FLAG_DO_TOP) && >>> + pmc_flush_logfile() !=3D ENOBUFS) >>> + do_read =3D 1; >>> do_print =3D 1; >>> break; >>>=20 >>> } >>>=20 >>> - if (do_print) { >>> + if (do_print && !do_read) { >>> if ((args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) = =3D=3D 0) { >>> pmcstat_print_pmcs(); >>> if (runstate =3D=3D PMCSTAT_FINISHED && = /* final newline */ >>> @@ -1420,7 +1422,7 @@ main(int argc, char **argv) >>>=20 >>> /* flush any pending log entries */ >>> if (args.pa_flags & (FLAG_HAS_OUTPUT_LOGFILE | FLAG_HAS_PIPE)) >>> - pmc_flush_logfile(); >>> + pmc_close_logfile(); >>>=20 >>> pmcstat_cleanup(); >>>=20 >>>=20 >>> Modified: head/usr.sbin/pmcstat/pmcstat_log.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 14:05:18 2011 = (r226513) >>> +++ head/usr.sbin/pmcstat/pmcstat_log.c Tue Oct 18 15:25:43 2011 = (r226514) >>> @@ -1702,7 +1702,7 @@ pmcstat_close_log(void) >>> * so keep the status to EXITING. >>> */ >>> if (args.pa_logfd !=3D -1) { >>> - if (pmc_flush_logfile() < 0) >>> + if (pmc_close_logfile() < 0) >>> err(EX_OSERR, "ERROR: logging failed"); >>> } >>>=20 >>=20 >> --=20 >> Bjoern A. Zeeb You have to have = visions! >> Stop bit received. Insert coin for new address family. >>=20 >=20 > -- > Fabien Thomas >=20 >=20 >=20 >=20 --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 09:34:40 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E4F5106566B; Wed, 19 Oct 2011 09:34:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E7B68FC12; Wed, 19 Oct 2011 09:34:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J9YeoP014265; Wed, 19 Oct 2011 09:34:40 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9J9YeMp014263; Wed, 19 Oct 2011 09:34:40 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110190934.p9J9YeMp014263@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 09:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226531 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 09:34:40 -0000 Author: bz Date: Wed Oct 19 09:34:40 2011 New Revision: 226531 URL: http://svn.freebsd.org/changeset/base/226531 Log: Fix an obvious locking bug where we would lock again rather than unlock. MFC after: 3 days Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 08:57:17 2011 (r226530) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 09:34:40 2011 (r226531) @@ -1558,7 +1558,7 @@ pfsync_in_del_c(struct pfsync_pkt *pkt, pf_unlink_state(st); } #ifdef __FreeBSD__ - PF_LOCK(); + PF_UNLOCK(); #endif splx(s); From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 10:04:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A0E8106564A; Wed, 19 Oct 2011 10:04:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 511DF8FC1B; Wed, 19 Oct 2011 10:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JA4Peo015239; Wed, 19 Oct 2011 10:04:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JA4Pwo015235; Wed, 19 Oct 2011 10:04:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110191004.p9JA4Pwo015235@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 10:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226532 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 10:04:25 -0000 Author: bz Date: Wed Oct 19 10:04:24 2011 New Revision: 226532 URL: http://svn.freebsd.org/changeset/base/226532 Log: Pseudo interfaces should go at SI_SUB_PSEUDO. However at least pfsync also depends on pf to be initialized already so pf goes at FIRST and the interfaces go at ANY. Then the (VNET_)SYSINIT startups for pf stays at SI_SUB_PROTO_BEGIN and for pfsync we move to the later SI_SUB_PROTO_IF. This is not ideal either but at least an order that should work for the moment and can be re-fined with the VIMAGE merge, once this will actually work with more than one network stack. MFC after: 3 days Modified: head/sys/contrib/pf/net/if_pflog.c head/sys/contrib/pf/net/if_pfsync.c head/sys/contrib/pf/net/pf_ioctl.c Modified: head/sys/contrib/pf/net/if_pflog.c ============================================================================== --- head/sys/contrib/pf/net/if_pflog.c Wed Oct 19 09:34:40 2011 (r226531) +++ head/sys/contrib/pf/net/if_pflog.c Wed Oct 19 10:04:24 2011 (r226532) @@ -429,7 +429,7 @@ static moduledata_t pflog_mod = { "pflog #define PFLOG_MODVER 1 -DECLARE_MODULE(pflog, pflog_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); +DECLARE_MODULE(pflog, pflog_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(pflog, PFLOG_MODVER); MODULE_DEPEND(pflog, pf, PF_MODVER, PF_MODVER, PF_MODVER); #endif /* __FreeBSD__ */ Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 09:34:40 2011 (r226531) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 10:04:24 2011 (r226532) @@ -3380,7 +3380,7 @@ vnet_pfsync_uninit(const void *unused) } /* Define startup order. */ -#define PFSYNC_SYSINIT_ORDER SI_SUB_PROTO_BEGIN +#define PFSYNC_SYSINIT_ORDER SI_SUB_PROTO_IF #define PFSYNC_MODEVENT_ORDER (SI_ORDER_FIRST) /* On boot slot in here. */ #define PFSYNC_VNET_ORDER (PFSYNC_MODEVENT_ORDER + 2) /* Later still. */ @@ -3430,7 +3430,7 @@ static moduledata_t pfsync_mod = { #define PFSYNC_MODVER 1 -DECLARE_MODULE(pfsync, pfsync_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); +DECLARE_MODULE(pfsync, pfsync_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(pfsync, PFSYNC_MODVER); MODULE_DEPEND(pfsync, pf, PF_MODVER, PF_MODVER, PF_MODVER); #endif /* __FreeBSD__ */ Modified: head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- head/sys/contrib/pf/net/pf_ioctl.c Wed Oct 19 09:34:40 2011 (r226531) +++ head/sys/contrib/pf/net/pf_ioctl.c Wed Oct 19 10:04:24 2011 (r226532) @@ -4450,6 +4450,6 @@ static moduledata_t pf_mod = { 0 }; -DECLARE_MODULE(pf, pf_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST); +DECLARE_MODULE(pf, pf_mod, SI_SUB_PSEUDO, SI_ORDER_FIRST); MODULE_VERSION(pf, PF_MODVER); #endif /* __FreeBSD__ */ From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 10:08:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F69106564A; Wed, 19 Oct 2011 10:08:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 243448FC08; Wed, 19 Oct 2011 10:08:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JA8xRm015407; Wed, 19 Oct 2011 10:08:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JA8xQ3015405; Wed, 19 Oct 2011 10:08:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110191008.p9JA8xQ3015405@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 10:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226533 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 10:08:59 -0000 Author: bz Date: Wed Oct 19 10:08:58 2011 New Revision: 226533 URL: http://svn.freebsd.org/changeset/base/226533 Log: In the non-FreeBSD case we do not expect PF_LOCK and friends to do anything. MFC after: 3 days Modified: head/sys/contrib/pf/net/pfvar.h Modified: head/sys/contrib/pf/net/pfvar.h ============================================================================== --- head/sys/contrib/pf/net/pfvar.h Wed Oct 19 10:04:24 2011 (r226532) +++ head/sys/contrib/pf/net/pfvar.h Wed Oct 19 10:08:58 2011 (r226533) @@ -251,19 +251,10 @@ VNET_DECLARE(struct mtx, pf_task_mtx); mtx_unlock(&V_pf_task_mtx); \ } while(0) #else -extern struct mtx pf_task_mtx; - -#define PF_ASSERT(h) mtx_assert(&pf_task_mtx, (h)) - -#define PF_LOCK() do { \ - PF_ASSERT(MA_NOTOWNED); \ - mtx_lock(&pf_task_mtx); \ -} while(0) -#define PF_UNLOCK() do { \ - PF_ASSERT(MA_OWNED); \ - mtx_unlock(&pf_task_mtx); \ -} while(0) -#endif +#define PF_ASSERT(h) +#define PF_LOCK() +#define PF_UNLOCK() +#endif /* __FreeBSD__ */ #define PF_COPYIN(uaddr, kaddr, len, r) do { \ PF_UNLOCK(); \ From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 10:09:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B8B21065670; Wed, 19 Oct 2011 10:09:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AC768FC12; Wed, 19 Oct 2011 10:09:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JA914E015443; Wed, 19 Oct 2011 10:09:01 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JA912U015439; Wed, 19 Oct 2011 10:09:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201110191009.p9JA912U015439@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 19 Oct 2011 10:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226534 - in head: etc/devd sys/dev/usb sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 10:09:01 -0000 Author: hselasky Date: Wed Oct 19 10:09:01 2011 New Revision: 226534 URL: http://svn.freebsd.org/changeset/base/226534 Log: Add new USB IDs to RUN driver. Update usb.conf. PR: usb/161798 MFC after: 3 days Modified: head/etc/devd/usb.conf head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Wed Oct 19 10:08:58 2011 (r226533) +++ head/etc/devd/usb.conf Wed Oct 19 10:09:01 2011 (r226534) @@ -565,6 +565,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x04e8"; + match "product" "0x2018"; + action "kldload if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x04e8"; match "product" "(0x5f00|0x5f01|0x5f02|0x5f03|0x5f04)"; action "kldload uipaq"; }; @@ -741,7 +749,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x050d"; - match "product" "(0x8053|0x805c|0x815c|0x825a)"; + match "product" "(0x8053|0x805c|0x815c|0x825a|0x825b)"; action "kldload if_run"; }; @@ -1877,7 +1885,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0af0"; - match "product" "(0x5000|0x6000|0x6050|0x6100|0x6150|0x6200|0x6250|0x6300|0x6350|0x6500|0x6501|0x6600|0x6601|0x6701|0x6721|0x6741|0x6761|0x6800|0x6901)"; + match "product" "(0x5000|0x6000|0x6050|0x6100|0x6150|0x6200|0x6250|0x6300|0x6350|0x6500|0x6501|0x6600|0x6601|0x6701)"; + action "kldload u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0af0"; + match "product" "0x6711"; + action "kldload uhso"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0af0"; + match "product" "(0x6721|0x6741|0x6761|0x6800|0x6901)"; action "kldload u3g"; }; @@ -2069,7 +2093,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b95"; - match "product" "(0x1720|0x1780|0x7720|0x772a)"; + match "product" "(0x1720|0x1780|0x7720|0x772a|0x772b)"; action "kldload if_axe"; }; @@ -2500,6 +2524,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0f3d"; + match "product" "0x68a3"; + action "kldload usie"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0f4e"; match "product" "0x0200"; action "kldload uipaq"; @@ -2789,13 +2821,37 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1199"; - match "product" "(0x0220|0x0224|0x0fff|0x6802|0x6803|0x6804|0x6805|0x6808|0x6809|0x6812|0x6813|0x6815|0x6816|0x6820|0x6821|0x6822|0x6832|0x6833|0x6834|0x6835|0x6838|0x6839|0x683a|0x683b|0x683c|0x683d|0x683e|0x6850|0x6851|0x6852|0x6853|0x6855|0x6856|0x6859|0x685a|0x6880|0x6890|0x6891|0x6892|0x6893|0x68a3)"; + match "product" "(0x0220|0x0224|0x0fff)"; + action "kldload u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1199"; + match "product" "0x0fff"; + action "kldload usie"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1199"; + match "product" "(0x6802|0x6803|0x6804|0x6805|0x6808|0x6809|0x6812|0x6813|0x6815|0x6816|0x6820|0x6821|0x6822|0x6832|0x6833|0x6834|0x6835|0x6838|0x6839|0x683a|0x683b|0x683c|0x683d|0x683e|0x6850|0x6851|0x6852|0x6853|0x6855|0x6856|0x6859|0x685a|0x6880|0x6890|0x6891|0x6892|0x6893|0x68a3)"; action "kldload u3g"; }; nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x1199"; + match "product" "0x68a3"; + action "kldload usie"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x11ad"; match "product" "0x0701"; action "kldload uplcom"; @@ -2869,7 +2925,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1465|0x14ac|0x1520)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1465|0x14ac|0x1520|0x1c05|0x1c0b)"; action "kldload u3g"; }; @@ -2972,6 +3028,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x13b1"; + match "product" "0x002f"; + action "kldload if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x13d2"; match "product" "0x0400"; action "kldload if_kue"; @@ -3669,7 +3733,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1c9e"; - match "product" "(0x6061|0x9603|0xf000)"; + match "product" "(0x6061|0x9603|0x9605|0xf000)"; action "kldload u3g"; }; @@ -4263,5 +4327,5 @@ nomatch 32 { action "kldload umass"; }; -# 1634 USB entries processed +# 1645 USB entries processed Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Oct 19 10:08:58 2011 (r226533) +++ head/sys/dev/usb/usbdevs Wed Oct 19 10:09:01 2011 (r226534) @@ -1145,6 +1145,7 @@ product BELKIN RT2870_1 0x8053 RT2870 product BELKIN RT2870_2 0x805c RT2870 product BELKIN F5D8053V3 0x815c F5D8053 v3 product BELKIN F5D8055 0x825a F5D8055 +product BELKIN F5D8055V2 0x825b F5D8055 v2 product BELKIN F5D9050V3 0x905b F5D9050 ver 3 Wireless Adapter product BELKIN2 F5U002 0x0002 F5U002 Parallel printer product BELKIN F6D4050V1 0x935a F6D4050 v1 @@ -1228,8 +1229,9 @@ product CISCOLINKSYS HU200TS 0x001a HU20 product CISCOLINKSYS WUSB54GC 0x0020 WUSB54GC product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G -product CISCOLINKSYS2 RT3070 0x4001 RT3070 -product CISCOLINKSYS3 RT3070 0x0101 RT3070 +product CISCOLINKSYS AE1000 0x002f AE1000 +product CISCOLINKSYS2 RT3070 0x4001 RT3070 +product CISCOLINKSYS3 RT3070 0x0101 RT3070 /* Clipsal products */ product CLIPSAL 5500PCU 0x0303 5500PCU C-Bus @@ -2840,6 +2842,7 @@ product SAGEM XG760A 0x004a XG-760A product SAGEM XG76NA 0x0062 XG-76NA /* Samsung products */ +product SAMSUNG WIS09ABGN 0x2018 WIS09ABGN Wireless LAN adapter product SAMSUNG ML6060 0x3008 ML-6060 laser printer product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player product SAMSUNG YP_U4 0x5092 YP-U4 MP3 Player Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Oct 19 10:08:58 2011 (r226533) +++ head/sys/dev/usb/wlan/if_run.c Wed Oct 19 10:09:01 2011 (r226534) @@ -144,9 +144,11 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(AZUREWAVE, RT3070_3), RUN_DEV(BELKIN, F5D8053V3), RUN_DEV(BELKIN, F5D8055), + RUN_DEV(BELKIN, F5D8055V2), RUN_DEV(BELKIN, F6D4050V1), RUN_DEV(BELKIN, RT2870_1), RUN_DEV(BELKIN, RT2870_2), + RUN_DEV(CISCOLINKSYS, AE1000), RUN_DEV(CISCOLINKSYS2, RT3070), RUN_DEV(CISCOLINKSYS3, RT3070), RUN_DEV(CONCEPTRONIC2, RT2870_1), @@ -247,6 +249,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(RALINK, RT3370), RUN_DEV(RALINK, RT3572), RUN_DEV(RALINK, RT8070), + RUN_DEV(SAMSUNG, WIS09ABGN), RUN_DEV(SAMSUNG2, RT2870_1), RUN_DEV(SENAO, RT2870_1), RUN_DEV(SENAO, RT2870_2), From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 10:16:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F04F1065672; Wed, 19 Oct 2011 10:16:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34A1C8FC12; Wed, 19 Oct 2011 10:16:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JAGhD0015722; Wed, 19 Oct 2011 10:16:43 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JAGhZd015716; Wed, 19 Oct 2011 10:16:43 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110191016.p9JAGhZd015716@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 10:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226535 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 10:16:43 -0000 Author: bz Date: Wed Oct 19 10:16:42 2011 New Revision: 226535 URL: http://svn.freebsd.org/changeset/base/226535 Log: Adjust the PF_ASSERT() macro to what we usually use in the network stack: PF_LOCK_ASSERT() and PF_UNLOCK_ASSERT(). MFC after: 3 days Modified: head/sys/contrib/pf/net/if_pfsync.c head/sys/contrib/pf/net/pf_ioctl.c head/sys/contrib/pf/net/pf_table.c head/sys/contrib/pf/net/pfvar.h Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 10:09:01 2011 (r226534) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 10:16:42 2011 (r226535) @@ -2143,7 +2143,7 @@ pfsync_sendout(void) int q, count = 0; #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #else splassert(IPL_NET); #endif @@ -2378,7 +2378,7 @@ pfsync_insert_state(struct pf_state *st) #endif #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #else splassert(IPL_SOFTNET); #endif @@ -2430,7 +2430,7 @@ pfsync_defer(struct pf_state *st, struct struct pfsync_deferral *pd; #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #else splassert(IPL_SOFTNET); #endif @@ -2477,7 +2477,7 @@ pfsync_undefer(struct pfsync_deferral *p int s; #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #else splassert(IPL_SOFTNET); #endif @@ -2560,7 +2560,7 @@ pfsync_update_state(struct pf_state *st) int sync = 0; #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #else splassert(IPL_SOFTNET); #endif @@ -2710,7 +2710,7 @@ pfsync_delete_state(struct pf_state *st) #endif #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #else splassert(IPL_SOFTNET); #endif @@ -2771,7 +2771,7 @@ pfsync_clear_states(u_int32_t creatorid, #endif #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #else splassert(IPL_SOFTNET); #endif Modified: head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- head/sys/contrib/pf/net/pf_ioctl.c Wed Oct 19 10:09:01 2011 (r226534) +++ head/sys/contrib/pf/net/pf_ioctl.c Wed Oct 19 10:16:42 2011 (r226535) @@ -4259,7 +4259,7 @@ hook_pf(void) struct pfil_head *pfh_inet6; #endif - PF_ASSERT(MA_NOTOWNED); + PF_UNLOCK_ASSERT(); if (V_pf_pfil_hooked) return (0); @@ -4300,7 +4300,7 @@ dehook_pf(void) struct pfil_head *pfh_inet6; #endif - PF_ASSERT(MA_NOTOWNED); + PF_UNLOCK_ASSERT(); if (V_pf_pfil_hooked == 0) return (0); Modified: head/sys/contrib/pf/net/pf_table.c ============================================================================== --- head/sys/contrib/pf/net/pf_table.c Wed Oct 19 10:09:01 2011 (r226534) +++ head/sys/contrib/pf/net/pf_table.c Wed Oct 19 10:16:42 2011 (r226535) @@ -906,7 +906,7 @@ pfr_lookup_addr(struct pfr_ktable *kt, s pfr_prepare_network(&mask, ad->pfra_af, ad->pfra_net); s = splsoftnet(); /* rn_lookup makes use of globals */ #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #endif ke = (struct pfr_kentry *)rn_lookup(&sa, &mask, head); splx(s); @@ -1127,7 +1127,7 @@ pfr_route_kentry(struct pfr_ktable *kt, s = splsoftnet(); #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #endif if (KENTRY_NETWORK(ke)) { pfr_prepare_network(&mask, ke->pfrke_af, ke->pfrke_net); @@ -1166,7 +1166,7 @@ pfr_unroute_kentry(struct pfr_ktable *kt s = splsoftnet(); #ifdef __FreeBSD__ - PF_ASSERT(MA_OWNED); + PF_LOCK_ASSERT(); #endif if (KENTRY_NETWORK(ke)) { pfr_prepare_network(&mask, ke->pfrke_af, ke->pfrke_net); Modified: head/sys/contrib/pf/net/pfvar.h ============================================================================== --- head/sys/contrib/pf/net/pfvar.h Wed Oct 19 10:09:01 2011 (r226534) +++ head/sys/contrib/pf/net/pfvar.h Wed Oct 19 10:16:42 2011 (r226535) @@ -240,18 +240,20 @@ struct pfi_dynaddr { VNET_DECLARE(struct mtx, pf_task_mtx); #define V_pf_task_mtx VNET(pf_task_mtx) -#define PF_ASSERT(h) mtx_assert(&V_pf_task_mtx, (h)) +#define PF_LOCK_ASSERT() mtx_assert(&V_pf_task_mtx, MA_OWNED) +#define PF_UNLOCK_ASSERT() mtx_assert(&V_pf_task_mtx, MA_NOTOWNED) #define PF_LOCK() do { \ - PF_ASSERT(MA_NOTOWNED); \ + PF_UNLOCK_ASSERT(); \ mtx_lock(&V_pf_task_mtx); \ } while(0) #define PF_UNLOCK() do { \ - PF_ASSERT(MA_OWNED); \ + PF_LOCK_ASSERT(); \ mtx_unlock(&V_pf_task_mtx); \ } while(0) #else -#define PF_ASSERT(h) +#define PF_LOCK_ASSERT() +#define PF_UNLOCK_ASSERT() #define PF_LOCK() #define PF_UNLOCK() #endif /* __FreeBSD__ */ From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 11:04:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27244106564A; Wed, 19 Oct 2011 11:04:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D49B8FC0A; Wed, 19 Oct 2011 11:04:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JB4nd8021381; Wed, 19 Oct 2011 11:04:49 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JB4nlK021378; Wed, 19 Oct 2011 11:04:49 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110191104.p9JB4nlK021378@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 11:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226536 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 11:04:50 -0000 Author: bz Date: Wed Oct 19 11:04:49 2011 New Revision: 226536 URL: http://svn.freebsd.org/changeset/base/226536 Log: De-virtualize the pf_task_mtx lock. At the current state of pf locking and virtualization it is not helpful but complicates things. Current state of art is to not virtualize these kinds of locks - inp_group/hash/info/.. are all not virtualized either. MFC after: 3 days Modified: head/sys/contrib/pf/net/pf_ioctl.c head/sys/contrib/pf/net/pfvar.h Modified: head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- head/sys/contrib/pf/net/pf_ioctl.c Wed Oct 19 10:16:42 2011 (r226535) +++ head/sys/contrib/pf/net/pf_ioctl.c Wed Oct 19 11:04:49 2011 (r226536) @@ -266,7 +266,7 @@ static struct cdevsw pf_cdevsw = { static volatile VNET_DEFINE(int, pf_pfil_hooked); #define V_pf_pfil_hooked VNET(pf_pfil_hooked) VNET_DEFINE(int, pf_end_threads); -VNET_DEFINE(struct mtx, pf_task_mtx); +struct mtx pf_task_mtx; /* pfsync */ pfsync_state_import_t *pfsync_state_import_ptr = NULL; @@ -287,18 +287,18 @@ SYSCTL_VNET_INT(_debug, OID_AUTO, pfugid &VNET_NAME(debug_pfugidhack), 0, "Enable/disable pf user/group rules mpsafe hack"); -void +static void init_pf_mutex(void) { - mtx_init(&V_pf_task_mtx, "pf task mtx", NULL, MTX_DEF); + mtx_init(&pf_task_mtx, "pf task mtx", NULL, MTX_DEF); } -void +static void destroy_pf_mutex(void) { - mtx_destroy(&V_pf_task_mtx); + mtx_destroy(&pf_task_mtx); } void init_zone_var(void) @@ -4381,11 +4381,8 @@ pf_load(void) init_zone_var(); sx_init(&V_pf_consistency_lock, "pf_statetbl_lock"); - init_pf_mutex(); - if (pfattach() < 0) { - destroy_pf_mutex(); + if (pfattach() < 0) return (ENOMEM); - } return (0); } @@ -4413,14 +4410,13 @@ pf_unload(void) V_pf_end_threads = 1; while (V_pf_end_threads < 2) { wakeup_one(pf_purge_thread); - msleep(pf_purge_thread, &V_pf_task_mtx, 0, "pftmo", hz); + msleep(pf_purge_thread, &pf_task_mtx, 0, "pftmo", hz); } pfi_cleanup(); pf_osfp_flush(); pf_osfp_cleanup(); cleanup_pf_zone(); PF_UNLOCK(); - destroy_pf_mutex(); sx_destroy(&V_pf_consistency_lock); return error; } @@ -4432,10 +4428,12 @@ pf_modevent(module_t mod, int type, void switch(type) { case MOD_LOAD: + init_pf_mutex(); pf_dev = make_dev(&pf_cdevsw, 0, 0, 0, 0600, PF_NAME); break; case MOD_UNLOAD: destroy_dev(pf_dev); + destroy_pf_mutex(); break; default: error = EINVAL; Modified: head/sys/contrib/pf/net/pfvar.h ============================================================================== --- head/sys/contrib/pf/net/pfvar.h Wed Oct 19 10:16:42 2011 (r226535) +++ head/sys/contrib/pf/net/pfvar.h Wed Oct 19 11:04:49 2011 (r226536) @@ -237,19 +237,18 @@ struct pfi_dynaddr { uma_zdestroy(var) #ifdef __FreeBSD__ -VNET_DECLARE(struct mtx, pf_task_mtx); -#define V_pf_task_mtx VNET(pf_task_mtx) +extern struct mtx pf_task_mtx; -#define PF_LOCK_ASSERT() mtx_assert(&V_pf_task_mtx, MA_OWNED) -#define PF_UNLOCK_ASSERT() mtx_assert(&V_pf_task_mtx, MA_NOTOWNED) +#define PF_LOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_OWNED) +#define PF_UNLOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_NOTOWNED) #define PF_LOCK() do { \ PF_UNLOCK_ASSERT(); \ - mtx_lock(&V_pf_task_mtx); \ + mtx_lock(&pf_task_mtx); \ } while(0) #define PF_UNLOCK() do { \ PF_LOCK_ASSERT(); \ - mtx_unlock(&V_pf_task_mtx); \ + mtx_unlock(&pf_task_mtx); \ } while(0) #else #define PF_LOCK_ASSERT() @@ -270,9 +269,6 @@ VNET_DECLARE(struct mtx, pf_task_mtx); PF_LOCK(); \ } while(0) -extern void init_pf_mutex(void); -extern void destroy_pf_mutex(void); - #define PF_MODVER 1 #define PFLOG_MODVER 1 #define PFSYNC_MODVER 1 From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 11:43:52 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D52A106566C; Wed, 19 Oct 2011 11:43:52 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0353B8FC0A; Wed, 19 Oct 2011 11:43:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JBhpYc022909; Wed, 19 Oct 2011 11:43:51 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JBhpAg022900; Wed, 19 Oct 2011 11:43:51 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110191143.p9JBhpAg022900@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 19 Oct 2011 11:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226537 - head/lib/libfetch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 11:43:52 -0000 Author: des Date: Wed Oct 19 11:43:51 2011 New Revision: 226537 URL: http://svn.freebsd.org/changeset/base/226537 Log: latin1 -> utf8 Modified: head/lib/libfetch/common.c head/lib/libfetch/common.h head/lib/libfetch/fetch.3 head/lib/libfetch/fetch.c head/lib/libfetch/fetch.h head/lib/libfetch/file.c head/lib/libfetch/ftp.c head/lib/libfetch/http.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/common.c Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2011 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libfetch/common.h ============================================================================== --- head/lib/libfetch/common.h Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/common.h Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2011 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libfetch/fetch.3 ============================================================================== --- head/lib/libfetch/fetch.3 Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/fetch.3 Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 1998-2011 Dag-Erling Smørgrav +.\" Copyright (c) 1998-2011 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/lib/libfetch/fetch.c ============================================================================== --- head/lib/libfetch/fetch.c Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/fetch.c Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2004 Dag-Erling Smørgrav + * Copyright (c) 1998-2004 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libfetch/fetch.h ============================================================================== --- head/lib/libfetch/fetch.h Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/fetch.h Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2004 Dag-Erling Smørgrav + * Copyright (c) 1998-2004 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libfetch/file.c ============================================================================== --- head/lib/libfetch/file.c Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/file.c Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2011 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libfetch/ftp.c ============================================================================== --- head/lib/libfetch/ftp.c Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/ftp.c Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2011 Dag-Erling Smørgrav + * Copyright (c) 1998-2011 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); * * Major Changelog: * - * Dag-Erling Coïdan Smørgrav + * Dag-Erling Smørgrav * 9 Jun 1998 * * Incorporated into libfetch Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Wed Oct 19 11:04:49 2011 (r226536) +++ head/lib/libfetch/http.c Wed Oct 19 11:43:51 2011 (r226537) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2011 Dag-Erling Smørgrav + * Copyright (c) 2000-2011 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 13:13:57 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AC9C106564A; Wed, 19 Oct 2011 13:13:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E40C08FC0C; Wed, 19 Oct 2011 13:13:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JDDujU026275; Wed, 19 Oct 2011 13:13:56 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JDDuDP026273; Wed, 19 Oct 2011 13:13:56 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110191313.p9JDDuDP026273@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 13:13:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226544 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 13:13:57 -0000 Author: bz Date: Wed Oct 19 13:13:56 2011 New Revision: 226544 URL: http://svn.freebsd.org/changeset/base/226544 Log: Fix recursive pf locking leading to panics. Splatter PF_LOCK_ASSERT()s to document where we are expecting to be called with a lock held to more easily catch unnoticed code paths. This does not neccessarily improve locking in pfsync, it just tries to avoid the panics reported. PR: kern/159390, kern/158873 Submitted by: pluknet (at least something that partly resembles my patch ignoring other cleanup, which I only saw too late on the 2nd PR) MFC After: 3 days Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 13:11:50 2011 (r226543) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Oct 19 13:13:56 2011 (r226544) @@ -714,6 +714,8 @@ pfsync_state_import(struct pfsync_state int pool_flags; int error; + PF_LOCK_ASSERT(); + #ifdef __FreeBSD__ if (sp->creatorid == 0 && V_pf_status.debug >= PF_DEBUG_MISC) { #else @@ -1469,7 +1471,9 @@ pfsync_in_ureq(struct pfsync_pkt *pkt, s if (ISSET(st->state_flags, PFSTATE_NOSYNC)) continue; + PF_LOCK(); pfsync_update_state_req(st); + PF_UNLOCK(); } } @@ -2625,6 +2629,8 @@ pfsync_request_update(u_int32_t creatori size_t nlen = sizeof(struct pfsync_upd_req); int s; + PF_LOCK_ASSERT(); + /* * this code does nothing to prevent multiple update requests for the * same state being generated. @@ -2670,6 +2676,8 @@ pfsync_update_state_req(struct pf_state struct pfsync_softc *sc = pfsyncif; #endif + PF_LOCK_ASSERT(); + if (sc == NULL) panic("pfsync_update_state_req: nonexistant instance"); @@ -2801,6 +2809,8 @@ pfsync_q_ins(struct pf_state *st, int q) size_t nlen = pfsync_qs[q].len; int s; + PF_LOCK_ASSERT(); + #ifdef __FreeBSD__ KASSERT(st->sync_state == PFSYNC_S_NONE, ("%s: st->sync_state == PFSYNC_S_NONE", __FUNCTION__)); @@ -2825,13 +2835,7 @@ pfsync_q_ins(struct pf_state *st, int q) if (sc->sc_len + nlen > sc->sc_if.if_mtu) { #endif s = splnet(); -#ifdef __FreeBSD__ - PF_LOCK(); -#endif pfsync_sendout(); -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif splx(s); nlen = sizeof(struct pfsync_subheader) + pfsync_qs[q].len; @@ -2888,7 +2892,9 @@ pfsync_update_tdb(struct tdb *t, int out if (sc->sc_len + nlen > sc->sc_if.if_mtu) { s = splnet(); + PF_LOCK(); pfsync_sendout(); + PF_UNLOCK(); splx(s); nlen = sizeof(struct pfsync_subheader) + @@ -2991,8 +2997,10 @@ pfsync_bulk_start(void) #endif printf("pfsync: received bulk update request\n"); + PF_LOCK(); pfsync_bulk_status(PFSYNC_BUS_START); pfsync_bulk_update(sc); + PF_UNLOCK(); } void @@ -3003,10 +3011,11 @@ pfsync_bulk_update(void *arg) int i = 0; int s; + PF_LOCK_ASSERT(); + s = splsoftnet(); #ifdef __FreeBSD__ CURVNET_SET(sc->sc_ifp->if_vnet); - PF_LOCK(); #endif do { if (st->sync_state == PFSYNC_S_NONE && @@ -3043,7 +3052,6 @@ pfsync_bulk_update(void *arg) out: #ifdef __FreeBSD__ - PF_UNLOCK(); CURVNET_RESTORE(); #endif splx(s); @@ -3063,6 +3071,8 @@ pfsync_bulk_status(u_int8_t status) struct pfsync_softc *sc = pfsyncif; #endif + PF_LOCK_ASSERT(); + bzero(&r, sizeof(r)); r.subh.action = PFSYNC_ACT_BUS; @@ -3096,7 +3106,9 @@ pfsync_bulk_fail(void *arg) #else timeout_add_sec(&sc->sc_bulkfail_tmo, 5); #endif + PF_LOCK(); pfsync_request_update(0, 0); + PF_UNLOCK(); } else { /* Pretend like the transfer was ok */ sc->sc_ureq_sent = 0; @@ -3139,19 +3151,15 @@ pfsync_send_plus(void *plus, size_t plus #endif int s; + PF_LOCK_ASSERT(); + #ifdef __FreeBSD__ if (sc->sc_len + pluslen > sc->sc_ifp->if_mtu) { #else if (sc->sc_len + pluslen > sc->sc_if.if_mtu) { #endif s = splnet(); -#ifdef __FreeBSD__ - PF_LOCK(); -#endif pfsync_sendout(); -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif splx(s); } @@ -3159,13 +3167,7 @@ pfsync_send_plus(void *plus, size_t plus sc->sc_len += (sc->sc_pluslen = pluslen); s = splnet(); -#ifdef __FreeBSD__ - PF_LOCK(); -#endif pfsync_sendout(); -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif splx(s); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 14:38:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C70C31065674; Wed, 19 Oct 2011 14:38:01 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B665F8FC12; Wed, 19 Oct 2011 14:38:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JEc1Zg029231; Wed, 19 Oct 2011 14:38:01 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JEc1PS029228; Wed, 19 Oct 2011 14:38:01 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110191438.p9JEc1PS029228@svn.freebsd.org> From: "Jayachandran C." Date: Wed, 19 Oct 2011 14:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226545 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 14:38:01 -0000 Author: jchandra Date: Wed Oct 19 14:38:01 2011 New Revision: 226545 URL: http://svn.freebsd.org/changeset/base/226545 Log: Keep FDT options commented until dtc is build by default for mips Otherwise automated builds will fail for XLP and XLP64 Modified: head/sys/mips/conf/XLP head/sys/mips/conf/XLP64 Modified: head/sys/mips/conf/XLP ============================================================================== --- head/sys/mips/conf/XLP Wed Oct 19 13:13:56 2011 (r226544) +++ head/sys/mips/conf/XLP Wed Oct 19 14:38:01 2011 (r226545) @@ -95,6 +95,6 @@ device pci device ether # # FDT support -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=xlp-basic.dts +#options FDT +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=xlp-basic.dts Modified: head/sys/mips/conf/XLP64 ============================================================================== --- head/sys/mips/conf/XLP64 Wed Oct 19 13:13:56 2011 (r226544) +++ head/sys/mips/conf/XLP64 Wed Oct 19 14:38:01 2011 (r226545) @@ -97,6 +97,6 @@ device pci device ether # FDT support -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=xlp-basic.dts +#options FDT +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=xlp-basic.dts From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 15:35:41 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70EFB1065670; Wed, 19 Oct 2011 15:35:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 607608FC08; Wed, 19 Oct 2011 15:35:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JFZfbR031035; Wed, 19 Oct 2011 15:35:41 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JFZfUu031033; Wed, 19 Oct 2011 15:35:41 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110191535.p9JFZfUu031033@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 19 Oct 2011 15:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226546 - head/bin/ls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 15:35:41 -0000 Author: des Date: Wed Oct 19 15:35:41 2011 New Revision: 226546 URL: http://svn.freebsd.org/changeset/base/226546 Log: If ls was invoked with -i but neither -l nor -s, blocksize was used in display() to calculate column widths, but was not initialized in main(). This resulted in a division by zero. Noticed by: Michael Butler Modified: head/bin/ls/ls.c Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Wed Oct 19 14:38:01 2011 (r226545) +++ head/bin/ls/ls.c Wed Oct 19 15:35:41 2011 (r226546) @@ -414,8 +414,8 @@ main(int argc, char *argv[]) fts_options |= FTS_WHITEOUT; #endif - /* If -l or -s, figure out block size. */ - if (f_longform || f_size) { + /* If -i, -l or -s, figure out block size. */ + if (f_inode || f_longform || f_size) { if (f_kblocks) blocksize = 2; else { From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 17:27:32 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BC8F106566C; Wed, 19 Oct 2011 17:27:32 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id AA0FB8FC18; Wed, 19 Oct 2011 17:27:31 +0000 (UTC) Received: by vcbfo13 with SMTP id fo13so2653952vcb.13 for ; Wed, 19 Oct 2011 10:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FYueB77FI5djx++fSwBwLwF+88KIl5Fo4DtvSY+jrXk=; b=j/G2m1xiwQpL2vrAtp/nTfDfNgGwHMg7H2mxsGSyUQoWTHQYJhvWIJV5Z9E4FxYqhK EtWhga0U4H5HSgSTqC8+coHp538+PkD93fUMDF91fzXQmN/xVJhO2Lenn3DgpiIbwfsi NwkmIzFxiigxOHhssJ6zbxte31hVeiR4Lwa2A= MIME-Version: 1.0 Received: by 10.182.110.1 with SMTP id hw1mr485632obb.38.1319045250904; Wed, 19 Oct 2011 10:27:30 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.182.216.38 with HTTP; Wed, 19 Oct 2011 10:27:30 -0700 (PDT) In-Reply-To: <201110191313.p9JDDuDP026273@svn.freebsd.org> References: <201110191313.p9JDDuDP026273@svn.freebsd.org> Date: Wed, 19 Oct 2011 21:27:30 +0400 X-Google-Sender-Auth: O6TQD0PxhdSvVFuX1U2L2Y5Uxr4 Message-ID: From: Sergey Kandaurov To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226544 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 17:27:32 -0000 On 19 October 2011 17:13, Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Oct 19 13:13:56 2011 > New Revision: 226544 > URL: http://svn.freebsd.org/changeset/base/226544 > > Log: > =A0Fix recursive pf locking leading to panics. =A0Splatter PF_LOCK_ASSERT= ()s > =A0to document where we are expecting to be called with a lock held to > =A0more easily catch unnoticed code paths. > =A0This does not neccessarily improve locking in pfsync, it just tries > =A0to avoid the panics reported. > > =A0PR: =A0 =A0 =A0 =A0 =A0 kern/159390, kern/158873 > =A0Submitted by: pluknet (at least something that partly resembles > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0my patch ignoring other cleanup, which I o= nly saw > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0too late on the 2nd PR) > =A0MFC After: =A0 =A03 days Thanks. Hope my patch helped you at least a little bit. --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 21:55:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21C671065675; Wed, 19 Oct 2011 21:55:21 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10CA38FC13; Wed, 19 Oct 2011 21:55:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JLtKkH044032; Wed, 19 Oct 2011 21:55:20 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JLtKP6044026; Wed, 19 Oct 2011 21:55:20 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201110192155.p9JLtKP6044026@svn.freebsd.org> From: Ken Smith Date: Wed, 19 Oct 2011 21:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226547 - in head/sys: amd64/conf i386/conf ia64/conf powerpc/conf sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 21:55:21 -0000 Author: kensmith Date: Wed Oct 19 21:55:20 2011 New Revision: 226547 URL: http://svn.freebsd.org/changeset/base/226547 Log: Add a warning about why sbp(4) is commented out so that curious folks are forewarned they might wind up with a hole in their foot if they decide to give it a try. Suggested by: dougb Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Oct 19 15:35:41 2011 (r226546) +++ head/sys/amd64/conf/GENERIC Wed Oct 19 21:55:20 2011 (r226547) @@ -331,6 +331,7 @@ device zyd # ZyDAS zd1211/zd1211b wire # FireWire support device firewire # FireWire bus code +# sbp(4) works for some systems but causes boot failure on others #device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Wed Oct 19 15:35:41 2011 (r226546) +++ head/sys/i386/conf/GENERIC Wed Oct 19 21:55:20 2011 (r226547) @@ -344,6 +344,7 @@ device zyd # ZyDAS zd1211/zd1211b wire # FireWire support device firewire # FireWire bus code +# sbp(4) works for some systems but causes boot failure on others #device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Wed Oct 19 15:35:41 2011 (r226546) +++ head/sys/ia64/conf/GENERIC Wed Oct 19 21:55:20 2011 (r226547) @@ -175,6 +175,7 @@ device uvscom # USB serial support for # FireWire support device fwip # IP over FireWire (RFC 2734,3146) +# sbp(4) works for some systems but causes boot failure on others #device sbp # SCSI over FireWire (need scbus & da) # Various (pseudo) devices Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Wed Oct 19 15:35:41 2011 (r226546) +++ head/sys/powerpc/conf/GENERIC Wed Oct 19 21:55:20 2011 (r226547) @@ -171,6 +171,7 @@ device kue # Kawasaki LSI USB Ethernet # FireWire support device firewire # FireWire bus code +# sbp(4) works for some systems but causes boot failure on others device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Wed Oct 19 15:35:41 2011 (r226546) +++ head/sys/sparc64/conf/GENERIC Wed Oct 19 21:55:20 2011 (r226547) @@ -261,6 +261,7 @@ device zyd # ZyDAS zd1211/zd1211b wire # FireWire support device firewire # FireWire bus code +# sbp(4) works for some systems but causes boot failure on others #device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 22:21:03 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 41641106567F; Wed, 19 Oct 2011 22:21:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 0992F202E28; Wed, 19 Oct 2011 22:20:40 +0000 (UTC) Message-ID: <4E9F4D38.3000601@FreeBSD.org> Date: Wed, 19 Oct 2011 15:20:40 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Ken Smith References: <201110192155.p9JLtKP6044026@svn.freebsd.org> In-Reply-To: <201110192155.p9JLtKP6044026@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226547 - in head/sys: amd64/conf i386/conf ia64/conf powerpc/conf sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 22:21:03 -0000 On 10/19/2011 14:55, Ken Smith wrote: > Add a warning about why sbp(4) is commented out so that curious folks > are forewarned they might wind up with a hole in their foot if they > decide to give it a try. That's awesome, thanks! I think (hope?) that this will help avoid user confusion, which is always a good goal. :) Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 23:31:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B0071065673; Wed, 19 Oct 2011 23:31:50 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF028FC08; Wed, 19 Oct 2011 23:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JNVoF6047180; Wed, 19 Oct 2011 23:31:50 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JNVo3L047178; Wed, 19 Oct 2011 23:31:50 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110192331.p9JNVo3L047178@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 19 Oct 2011 23:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226549 - head/sys/cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 23:31:50 -0000 Author: pjd Date: Wed Oct 19 23:31:50 2011 New Revision: 226549 URL: http://svn.freebsd.org/changeset/base/226549 Log: Remove redundant size calculation. MFC after: 3 days Modified: head/sys/cddl/boot/zfs/zfssubr.c Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Wed Oct 19 23:02:57 2011 (r226548) +++ head/sys/cddl/boot/zfs/zfssubr.c Wed Oct 19 23:31:50 2011 (r226549) @@ -1215,15 +1215,10 @@ static void vdev_raidz_map_free(raidz_map_t *rm) { int c; - size_t size; for (c = rm->rm_firstdatacol - 1; c >= 0; c--) zfs_free(rm->rm_col[c].rc_data, rm->rm_col[c].rc_size); - size = 0; - for (c = rm->rm_firstdatacol; c < rm->rm_cols; c++) - size += rm->rm_col[c].rc_size; - zfs_free(rm, offsetof(raidz_map_t, rm_col[rm->rm_scols])); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 23:33:48 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0F3F106564A; Wed, 19 Oct 2011 23:33:48 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0B918FC0A; Wed, 19 Oct 2011 23:33:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JNXmXA047285; Wed, 19 Oct 2011 23:33:48 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JNXmZ8047283; Wed, 19 Oct 2011 23:33:48 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110192333.p9JNXmZ8047283@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 19 Oct 2011 23:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226550 - head/sys/cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 23:33:48 -0000 Author: pjd Date: Wed Oct 19 23:33:48 2011 New Revision: 226550 URL: http://svn.freebsd.org/changeset/base/226550 Log: Initialize 'rc' properly before using it. This error could lead to infinite loop when data reconstruction was needed. MFC after: 3 days Modified: head/sys/cddl/boot/zfs/zfssubr.c Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Wed Oct 19 23:31:50 2011 (r226549) +++ head/sys/cddl/boot/zfs/zfssubr.c Wed Oct 19 23:33:48 2011 (r226550) @@ -1628,7 +1628,9 @@ reconstruct: n = 0; for (c = 0; c < rm->rm_cols; c++) { - if (rm->rm_col[c].rc_tried) + rc = &rm->rm_col[c]; + + if (rc->rc_tried) continue; cvd = vdev_child(vd, rc->rc_devidx); From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 23:37:30 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 836BD1065673; Wed, 19 Oct 2011 23:37:30 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 736088FC0C; Wed, 19 Oct 2011 23:37:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JNbUrc047434; Wed, 19 Oct 2011 23:37:30 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JNbU3u047432; Wed, 19 Oct 2011 23:37:30 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110192337.p9JNbU3u047432@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 19 Oct 2011 23:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226551 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 23:37:30 -0000 Author: pjd Date: Wed Oct 19 23:37:30 2011 New Revision: 226551 URL: http://svn.freebsd.org/changeset/base/226551 Log: Don't mark vdev as healthy too soon, so we won't try to use invalid vdevs. MFC after: 3 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:33:48 2011 (r226550) +++ head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:37:30 2011 (r226551) @@ -543,8 +543,6 @@ vdev_init_from_nvlist(const unsigned cha vdev->v_state = VDEV_STATE_DEGRADED; else if (isnt_present) vdev->v_state = VDEV_STATE_CANT_OPEN; - else - vdev->v_state = VDEV_STATE_HEALTHY; } rc = nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN, @@ -912,6 +910,7 @@ vdev_probe(vdev_phys_read_t *read, void if (vdev) { vdev->v_phys_read = read; vdev->v_read_priv = read_priv; + vdev->v_state = VDEV_STATE_HEALTHY; } else { printf("ZFS: inconsistent nvlist contents\n"); return (EIO); From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 23:40:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C734C106566B; Wed, 19 Oct 2011 23:40:37 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B72EC8FC0C; Wed, 19 Oct 2011 23:40:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JNeb5p047568; Wed, 19 Oct 2011 23:40:37 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JNebOH047566; Wed, 19 Oct 2011 23:40:37 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110192340.p9JNebOH047566@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 19 Oct 2011 23:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226552 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 23:40:37 -0000 Author: pjd Date: Wed Oct 19 23:40:37 2011 New Revision: 226552 URL: http://svn.freebsd.org/changeset/base/226552 Log: Never pass NULL block pointer when reading. This is neither expected nor handled by lower layers like vdev_raidz, which uses bp for checksum verification. This bug could lead to NULL pointer reference and resets during boot. MFC after: 3 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:37:30 2011 (r226551) +++ head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:40:37 2011 (r226552) @@ -988,7 +988,8 @@ zio_read_gang(spa_t *spa, const blkptr_t break; if (!vdev || !vdev->v_read) return (EIO); - if (vdev->v_read(vdev, NULL, &zio_gb, offset, SPA_GANGBLOCKSIZE)) + + if (vdev->v_read(vdev, bp, &zio_gb, offset, SPA_GANGBLOCKSIZE)) return (EIO); for (i = 0; i < SPA_GBH_NBLKPTRS; i++) { From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 23:44:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F406106566C; Wed, 19 Oct 2011 23:44:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 848E18FC13; Wed, 19 Oct 2011 23:44:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JNiciR047734; Wed, 19 Oct 2011 23:44:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JNicuo047731; Wed, 19 Oct 2011 23:44:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110192344.p9JNicuo047731@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 19 Oct 2011 23:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226553 - in head/sys: boot/zfs cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 23:44:38 -0000 Author: pjd Date: Wed Oct 19 23:44:38 2011 New Revision: 226553 URL: http://svn.freebsd.org/changeset/base/226553 Log: Always pass data size for checksum verification function, as using physical block size declared in bp may not always be what we want. For example in case of gang block header physical block size declared in bp is much larger than SPA_GANGBLOCKSIZE (512 bytes) and checksum calculation failed. This bug could lead to accessing unallocated memory and resets/failures during boot. MFC after: 3 days Modified: head/sys/boot/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfssubr.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:40:37 2011 (r226552) +++ head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:44:38 2011 (r226553) @@ -347,7 +347,7 @@ vdev_read_phys(vdev_t *vdev, const blkpt rc = vdev->v_phys_read(vdev, vdev->v_read_priv, offset, buf, psize); if (rc) return (rc); - if (bp && zio_checksum_error(bp, buf, offset)) + if (bp && zio_checksum_verify(bp, buf, offset, psize)) return (EIO); return (0); Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Wed Oct 19 23:40:37 2011 (r226552) +++ head/sys/cddl/boot/zfs/zfssubr.c Wed Oct 19 23:44:38 2011 (r226553) @@ -181,10 +181,10 @@ zio_checksum_label_verifier(zio_cksum_t } static int -zio_checksum_error(const blkptr_t *bp, void *data, uint64_t offset) +zio_checksum_verify(const blkptr_t *bp, void *data, uint64_t offset, + uint64_t size) { unsigned int checksum = BP_IS_GANG(bp) ? ZIO_CHECKSUM_GANG_HEADER : BP_GET_CHECKSUM(bp); - uint64_t size = BP_GET_PSIZE(bp); zio_checksum_info_t *ci; zio_cksum_t actual_cksum, expected_cksum, verifier; int byteswap; @@ -1240,10 +1240,10 @@ vdev_child(vdev_t *pvd, uint64_t devidx) * any ereports we generate can note it. */ static int -raidz_checksum_verify(const blkptr_t *bp, void *data) +raidz_checksum_verify(const blkptr_t *bp, void *data, uint64_t size) { - return (zio_checksum_error(bp, data, 0)); + return (zio_checksum_verify(bp, data, 0, size)); } /* @@ -1293,7 +1293,7 @@ raidz_parity_verify(raidz_map_t *rm) */ static int vdev_raidz_combrec(raidz_map_t *rm, const blkptr_t *bp, void *data, - off_t offset, int total_errors, int data_errors) + off_t offset, uint64_t bytes, int total_errors, int data_errors) { raidz_col_t *rc; void *orig[VDEV_RAIDZ_MAXPARITY]; @@ -1372,7 +1372,7 @@ vdev_raidz_combrec(raidz_map_t *rm, cons * success. */ code = vdev_raidz_reconstruct(rm, tgts, n); - if (raidz_checksum_verify(bp, data) == 0) { + if (raidz_checksum_verify(bp, data, bytes) == 0) { for (i = 0; i < n; i++) { c = tgts[i]; rc = &rm->rm_col[c]; @@ -1543,7 +1543,7 @@ reconstruct: */ if (total_errors <= rm->rm_firstdatacol - parity_untried) { if (data_errors == 0) { - if (raidz_checksum_verify(bp, data) == 0) { + if (raidz_checksum_verify(bp, data, bytes) == 0) { /* * If we read parity information (unnecessarily * as it happens since no reconstruction was @@ -1588,7 +1588,7 @@ reconstruct: code = vdev_raidz_reconstruct(rm, tgts, n); - if (raidz_checksum_verify(bp, data) == 0) { + if (raidz_checksum_verify(bp, data, bytes) == 0) { /* * If we read more parity disks than were used * for reconstruction, confirm that the other @@ -1662,8 +1662,8 @@ reconstruct: if (total_errors > rm->rm_firstdatacol) { error = EIO; } else if (total_errors < rm->rm_firstdatacol && - (code = vdev_raidz_combrec(rm, bp, data, offset, total_errors, - data_errors)) != 0) { + (code = vdev_raidz_combrec(rm, bp, data, offset, bytes, + total_errors, data_errors)) != 0) { /* * If we didn't use all the available parity for the * combinatorial reconstruction, verify that the remaining From owner-svn-src-head@FreeBSD.ORG Wed Oct 19 23:48:15 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2F941065675; Wed, 19 Oct 2011 23:48:15 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2E948FC18; Wed, 19 Oct 2011 23:48:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JNmFHF047885; Wed, 19 Oct 2011 23:48:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JNmFvR047883; Wed, 19 Oct 2011 23:48:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110192348.p9JNmFvR047883@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 19 Oct 2011 23:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226554 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 23:48:15 -0000 Author: pjd Date: Wed Oct 19 23:48:15 2011 New Revision: 226554 URL: http://svn.freebsd.org/changeset/base/226554 Log: Fix missing return when LOADER_GPT_SUPPORT is defined, but LOADER_MBR_SUPPORT is not. MFC after: 3 days Modified: head/sys/boot/common/disk.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Wed Oct 19 23:44:38 2011 (r226553) +++ head/sys/boot/common/disk.c Wed Oct 19 23:48:15 2011 (r226554) @@ -776,9 +776,9 @@ disk_open(struct disk_devdesc *dev) #ifdef LOADER_GPT_SUPPORT rc = disk_opengpt(dev); - if (rc) #endif #ifdef LOADER_MBR_SUPPORT + if (rc) rc = disk_openmbr(dev); #endif From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 07:06:39 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AEE51065673; Thu, 20 Oct 2011 07:06:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2BAF38FC0A; Thu, 20 Oct 2011 07:06:37 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA12619; Thu, 20 Oct 2011 10:06:36 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RGmi4-000JFw-Du; Thu, 20 Oct 2011 10:06:36 +0300 Message-ID: <4E9FC87B.7010903@FreeBSD.org> Date: Thu, 20 Oct 2011 10:06:35 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201110192348.p9JNmFvR047883@svn.freebsd.org> In-Reply-To: <201110192348.p9JNmFvR047883@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226554 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 07:06:39 -0000 on 20/10/2011 02:48 Pawel Jakub Dawidek said the following: > Author: pjd > Date: Wed Oct 19 23:48:15 2011 > New Revision: 226554 > URL: http://svn.freebsd.org/changeset/base/226554 > > Log: > Fix missing return when LOADER_GPT_SUPPORT is defined, but LOADER_MBR_SUPPORT > is not. > > MFC after: 3 days > > Modified: > head/sys/boot/common/disk.c > > Modified: head/sys/boot/common/disk.c > ============================================================================== > --- head/sys/boot/common/disk.c Wed Oct 19 23:44:38 2011 (r226553) > +++ head/sys/boot/common/disk.c Wed Oct 19 23:48:15 2011 (r226554) > @@ -776,9 +776,9 @@ disk_open(struct disk_devdesc *dev) > > #ifdef LOADER_GPT_SUPPORT > rc = disk_opengpt(dev); > - if (rc) > #endif > #ifdef LOADER_MBR_SUPPORT > + if (rc) > rc = disk_openmbr(dev); > #endif > I believe that this fix is incorrect. Now with !LOADER_GPT_SUPPORT and LOADER_MBR_SUPPORT the preprocessed code would be: rc = 0; /* * While we are reading disk metadata, make sure we do it relative * to the start of the disk */ dev->d_offset = 0; if (rc) rc = disk_openmbr(dev); Please see my take at the problem: https://gitorious.org/~avg/freebsd/avgbsd/commit/49adde51339791a7bf0e2c75f24eeda2bc886da5 -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 07:15:13 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 354F0106564A; Thu, 20 Oct 2011 07:15:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E079D8FC0C; Thu, 20 Oct 2011 07:15:11 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA12777; Thu, 20 Oct 2011 10:15:10 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RGmqM-000JGS-58; Thu, 20 Oct 2011 10:15:10 +0300 Message-ID: <4E9FCA7D.8010900@FreeBSD.org> Date: Thu, 20 Oct 2011 10:15:09 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201110192340.p9JNebOH047566@svn.freebsd.org> In-Reply-To: <201110192340.p9JNebOH047566@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226552 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 07:15:13 -0000 on 20/10/2011 02:40 Pawel Jakub Dawidek said the following: > Author: pjd > Date: Wed Oct 19 23:40:37 2011 > New Revision: 226552 > URL: http://svn.freebsd.org/changeset/base/226552 > > Log: > Never pass NULL block pointer when reading. This is neither expected nor > handled by lower layers like vdev_raidz, which uses bp for checksum > verification. This bug could lead to NULL pointer reference and resets > during boot. > > MFC after: 3 days > > Modified: > head/sys/boot/zfs/zfsimpl.c > > Modified: head/sys/boot/zfs/zfsimpl.c > ============================================================================== > --- head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:37:30 2011 (r226551) > +++ head/sys/boot/zfs/zfsimpl.c Wed Oct 19 23:40:37 2011 (r226552) > @@ -988,7 +988,8 @@ zio_read_gang(spa_t *spa, const blkptr_t > break; > if (!vdev || !vdev->v_read) > return (EIO); > - if (vdev->v_read(vdev, NULL, &zio_gb, offset, SPA_GANGBLOCKSIZE)) > + > + if (vdev->v_read(vdev, bp, &zio_gb, offset, SPA_GANGBLOCKSIZE)) > return (EIO); > > for (i = 0; i < SPA_GBH_NBLKPTRS; i++) { I believe that this commit is incorrect. It does appear to do the right thing for raidz, but I believe that it breaks the simple case when v_read is vdev_read_phys. Now because the bp argument is not NULL, the latter will try to read BP_GET_PSIZE(bp) bytes instead of SPA_GANGBLOCKSIZE bytes. I believe that my patch that I shared (much) earlier handles this issue correctly and integrally: http://article.gmane.org/gmane.os.freebsd.devel.file-systems/13130 Did you find anything wrong with it? If not, then maybe we can get back to discussing it? -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 07:21:29 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C69B1065674; Thu, 20 Oct 2011 07:21:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3EDB38FC18; Thu, 20 Oct 2011 07:21:28 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA12854; Thu, 20 Oct 2011 10:21:26 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RGmwQ-000JGl-Gb; Thu, 20 Oct 2011 10:21:26 +0300 Message-ID: <4E9FCBF5.1090000@FreeBSD.org> Date: Thu, 20 Oct 2011 10:21:25 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201110192344.p9JNicuo047731@svn.freebsd.org> In-Reply-To: <201110192344.p9JNicuo047731@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226553 - in head/sys: boot/zfs cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 07:21:29 -0000 on 20/10/2011 02:44 Pawel Jakub Dawidek said the following: > Author: pjd > Date: Wed Oct 19 23:44:38 2011 > New Revision: 226553 > URL: http://svn.freebsd.org/changeset/base/226553 > > Log: > Always pass data size for checksum verification function, as using > physical block size declared in bp may not always be what we want. > For example in case of gang block header physical block size declared > in bp is much larger than SPA_GANGBLOCKSIZE (512 bytes) and checksum > calculation failed. This bug could lead to accessing unallocated > memory and resets/failures during boot. > > MFC after: 3 days I believe that this change is going in the wrong direction. I'd rather prefer that we decreased number of parameters :-) Se my other email. Besides I do not see where we currently really verify checksum of a re-assembled gang block. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 09:15:41 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 112F6106566B; Thu, 20 Oct 2011 09:15:41 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id A790A8FC0A; Thu, 20 Oct 2011 09:15:40 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 12223999; Thu, 20 Oct 2011 11:15:39 +0200 (CEST) Date: Thu, 20 Oct 2011 11:14:58 +0200 From: Pawel Jakub Dawidek To: Andriy Gapon Message-ID: <20111020091457.GE1722@garage.freebsd.pl> References: <201110192348.p9JNmFvR047883@svn.freebsd.org> <4E9FC87B.7010903@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hwvH6HDNit2nSK4j" Content-Disposition: inline In-Reply-To: <4E9FC87B.7010903@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226554 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 09:15:41 -0000 --hwvH6HDNit2nSK4j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 20, 2011 at 10:06:35AM +0300, Andriy Gapon wrote: > on 20/10/2011 02:48 Pawel Jakub Dawidek said the following: > > Author: pjd > > Date: Wed Oct 19 23:48:15 2011 > > New Revision: 226554 > > URL: http://svn.freebsd.org/changeset/base/226554 > >=20 > > Log: > > Fix missing return when LOADER_GPT_SUPPORT is defined, but LOADER_MBR= _SUPPORT > > is not. > > =20 > > MFC after: 3 days > >=20 > > Modified: > > head/sys/boot/common/disk.c > >=20 > > Modified: head/sys/boot/common/disk.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/boot/common/disk.c Wed Oct 19 23:44:38 2011 (r226553) > > +++ head/sys/boot/common/disk.c Wed Oct 19 23:48:15 2011 (r226554) > > @@ -776,9 +776,9 @@ disk_open(struct disk_devdesc *dev) > > =20 > > #ifdef LOADER_GPT_SUPPORT > > rc =3D disk_opengpt(dev); > > - if (rc) > > #endif > > #ifdef LOADER_MBR_SUPPORT > > + if (rc) > > rc =3D disk_openmbr(dev); > > #endif > > =20 >=20 > I believe that this fix is incorrect. Now with !LOADER_GPT_SUPPORT and > LOADER_MBR_SUPPORT the preprocessed code would be: >=20 > rc =3D 0; > /* > * While we are reading disk metadata, make sure we do it relative > * to the start of the disk > */ > dev->d_offset =3D 0; >=20 > if (rc) > rc =3D disk_openmbr(dev); > > Please see my take at the problem: > https://gitorious.org/~avg/freebsd/avgbsd/commit/49adde51339791a7bf0e2c75= f24eeda2bc886da5 Yes, you are right. Feel free to commit your fix. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --hwvH6HDNit2nSK4j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6f5pAACgkQForvXbEpPzQolACeL2ck8y6UKqE255af6xK8xCkH 5o8AoNZU9BdzCpIf0W2pAGhu26U+FaOQ =4xpt -----END PGP SIGNATURE----- --hwvH6HDNit2nSK4j-- From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 09:36:37 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 219E3106566C; Thu, 20 Oct 2011 09:36:37 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id B47488FC18; Thu, 20 Oct 2011 09:36:36 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id C4B059AB; Thu, 20 Oct 2011 11:36:34 +0200 (CEST) Date: Thu, 20 Oct 2011 11:35:53 +0200 From: Pawel Jakub Dawidek To: Andriy Gapon Message-ID: <20111020093552.GF1722@garage.freebsd.pl> References: <201110192340.p9JNebOH047566@svn.freebsd.org> <4E9FCA7D.8010900@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FoLtEtfbNGMjfgrs" Content-Disposition: inline In-Reply-To: <4E9FCA7D.8010900@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226552 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 09:36:37 -0000 --FoLtEtfbNGMjfgrs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 20, 2011 at 10:15:09AM +0300, Andriy Gapon wrote: > I believe that this commit is incorrect. > It does appear to do the right thing for raidz, but I believe that it bre= aks the > simple case when v_read is vdev_read_phys. Now because the bp argument i= s not > NULL, the latter will try to read BP_GET_PSIZE(bp) bytes instead of > SPA_GANGBLOCKSIZE bytes. >=20 > I believe that my patch that I shared (much) earlier handles this issue > correctly and integrally: > http://article.gmane.org/gmane.os.freebsd.devel.file-systems/13130 > Did you find anything wrong with it? > If not, then maybe we can get back to discussing it? You see. My memory is very short:) and I remembered that you were working on gang blocks in ZFS boot code, but could find the commit, so I went ahead with my changes. Those changes still didn't fix one problem for me. Your patch seems to be much more complete and correct and it fixes all my problems. Please, wait no longer and commit your patch! We have to have this in 9.0. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --FoLtEtfbNGMjfgrs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEUEARECAAYFAk6f63cACgkQForvXbEpPzQhHgCYkR2P9p1KvyM+cAvSVBVvB2/3 cACeM6LnyhsCvH10VZMaCErwwVHetG0= =/zeE -----END PGP SIGNATURE----- --FoLtEtfbNGMjfgrs-- From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 11:40:27 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBFA71065674; Thu, 20 Oct 2011 11:40:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 894DE8FC0A; Thu, 20 Oct 2011 11:40:26 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA18378; Thu, 20 Oct 2011 14:40:24 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4EA008A7.7010203@FreeBSD.org> Date: Thu, 20 Oct 2011 14:40:23 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111003 Thunderbird/7.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201110192340.p9JNebOH047566@svn.freebsd.org> <4E9FCA7D.8010900@FreeBSD.org> <20111020093552.GF1722@garage.freebsd.pl> In-Reply-To: <20111020093552.GF1722@garage.freebsd.pl> X-Enigmail-Version: undefined Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226552 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 11:40:27 -0000 on 20/10/2011 12:35 Pawel Jakub Dawidek said the following: > On Thu, Oct 20, 2011 at 10:15:09AM +0300, Andriy Gapon wrote: >> I believe that this commit is incorrect. >> It does appear to do the right thing for raidz, but I believe that it breaks the >> simple case when v_read is vdev_read_phys. Now because the bp argument is not >> NULL, the latter will try to read BP_GET_PSIZE(bp) bytes instead of >> SPA_GANGBLOCKSIZE bytes. >> >> I believe that my patch that I shared (much) earlier handles this issue >> correctly and integrally: >> http://article.gmane.org/gmane.os.freebsd.devel.file-systems/13130 >> Did you find anything wrong with it? >> If not, then maybe we can get back to discussing it? > > You see. My memory is very short:) and I remembered that you were > working on gang blocks in ZFS boot code, but could find the commit, so I > went ahead with my changes. Those changes still didn't fix one problem > for me. Your patch seems to be much more complete and correct and it > fixes all my problems. > > Please, wait no longer and commit your patch! We have to have this in 9.0. > Unfortunately, at the moment I can only afford to spend at most 1/2 hour a day for FreeBSD (and those go mostly into reading and writing emails) and my development environment is in a little bit of disarray. I will try to find some time, but if you have a chance to review, possibly rework and commit those changes, that would be really great and appreciated. Thank you! -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 13:41:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF291065673; Thu, 20 Oct 2011 13:41:37 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E26B8FC16; Thu, 20 Oct 2011 13:41:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KDfbBs076804; Thu, 20 Oct 2011 13:41:37 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KDfblx076802; Thu, 20 Oct 2011 13:41:37 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201110201341.p9KDfblx076802@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 20 Oct 2011 13:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226564 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 13:41:37 -0000 Author: jchandra Date: Thu Oct 20 13:41:37 2011 New Revision: 226564 URL: http://svn.freebsd.org/changeset/base/226564 Log: Build 'dtc' by default for MIPS. The device tree compiler is needed during the kernel build to compile DTS files to DTB. Reviewed by: stas Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Thu Oct 20 09:57:27 2011 (r226563) +++ head/share/mk/bsd.own.mk Thu Oct 20 13:41:37 2011 (r226564) @@ -434,8 +434,9 @@ __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG .endif -# FDT is needed only for arm and powerpc (and not powerpc64) -.if ${__T} == "arm" || ${__T} == "armeb" || ${__T} == "powerpc" +# FDT is needed only for arm, mips and powerpc (and not powerpc64) +.if ${__T} == "arm" || ${__T} == "armeb" || ${__T} == "powerpc" || \ + ${__T:Mmips*} __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 15:42:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00E0F1065670; Thu, 20 Oct 2011 15:42:39 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3BEE8FC1C; Thu, 20 Oct 2011 15:42:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KFgcoR080767; Thu, 20 Oct 2011 15:42:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KFgcQA080764; Thu, 20 Oct 2011 15:42:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110201542.p9KFgcQA080764@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 20 Oct 2011 15:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226568 - in head/sys: boot/zfs cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 15:42:39 -0000 Author: pjd Date: Thu Oct 20 15:42:38 2011 New Revision: 226568 URL: http://svn.freebsd.org/changeset/base/226568 Log: - Correctly read gang header from raidz. - Decompress assembled gang block data if compressed. - Verify checksum of a gang header. - Verify checksum of assembled gang block data. - Verify checksum of uber block. Submitted by: avg MFC after: 3 days Modified: head/sys/boot/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfssubr.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Thu Oct 20 15:34:17 2011 (r226567) +++ head/sys/boot/zfs/zfsimpl.c Thu Oct 20 15:42:38 2011 (r226568) @@ -347,7 +347,7 @@ vdev_read_phys(vdev_t *vdev, const blkpt rc = vdev->v_phys_read(vdev, vdev->v_read_priv, offset, buf, psize); if (rc) return (rc); - if (bp && zio_checksum_verify(bp, buf, offset, psize)) + if (bp && zio_checksum_verify(bp, buf)) return (EIO); return (0); @@ -798,6 +798,7 @@ vdev_probe(vdev_phys_read_t *read, void BP_SET_PSIZE(&bp, sizeof(vdev_phys_t)); BP_SET_CHECKSUM(&bp, ZIO_CHECKSUM_LABEL); BP_SET_COMPRESS(&bp, ZIO_COMPRESS_OFF); + DVA_SET_OFFSET(BP_IDENTITY(&bp), off); ZIO_SET_CHECKSUM(&bp.blk_cksum, off, 0, 0, 0); if (vdev_read_phys(&vtmp, &bp, vdev_label, off, 0)) return (EIO); @@ -940,7 +941,7 @@ vdev_probe(vdev_phys_read_t *read, void BP_SET_COMPRESS(&bp, ZIO_COMPRESS_OFF); ZIO_SET_CHECKSUM(&bp.blk_cksum, off, 0, 0, 0); - if (vdev_read_phys(vdev, NULL, upbuf, off, VDEV_UBERBLOCK_SIZE(vdev))) + if (vdev_read_phys(vdev, &bp, upbuf, off, 0)) continue; if (up->ub_magic != UBERBLOCK_MAGIC) @@ -973,35 +974,39 @@ ilog2(int n) } static int -zio_read_gang(spa_t *spa, const blkptr_t *bp, const dva_t *dva, void *buf) +zio_read_gang(spa_t *spa, const blkptr_t *bp, void *buf) { + blkptr_t gbh_bp; zio_gbh_phys_t zio_gb; - vdev_t *vdev; - int vdevid; - off_t offset; + char *pbuf; int i; - vdevid = DVA_GET_VDEV(dva); - offset = DVA_GET_OFFSET(dva); - STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink) - if (vdev->v_id == vdevid) - break; - if (!vdev || !vdev->v_read) - return (EIO); + /* Artificial BP for gang block header. */ + gbh_bp = *bp; + BP_SET_PSIZE(&gbh_bp, SPA_GANGBLOCKSIZE); + BP_SET_LSIZE(&gbh_bp, SPA_GANGBLOCKSIZE); + BP_SET_CHECKSUM(&gbh_bp, ZIO_CHECKSUM_GANG_HEADER); + BP_SET_COMPRESS(&gbh_bp, ZIO_COMPRESS_OFF); + for (i = 0; i < SPA_DVAS_PER_BP; i++) + DVA_SET_GANG(&gbh_bp.blk_dva[i], 0); - if (vdev->v_read(vdev, bp, &zio_gb, offset, SPA_GANGBLOCKSIZE)) + /* Read gang header block using the artificial BP. */ + if (zio_read(spa, &gbh_bp, &zio_gb)) return (EIO); + pbuf = buf; for (i = 0; i < SPA_GBH_NBLKPTRS; i++) { blkptr_t *gbp = &zio_gb.zg_blkptr[i]; if (BP_IS_HOLE(gbp)) continue; - if (zio_read(spa, gbp, buf)) + if (zio_read(spa, gbp, pbuf)) return (EIO); - buf = (char*)buf + BP_GET_PSIZE(gbp); + pbuf += BP_GET_PSIZE(gbp); } - + + if (zio_checksum_verify(bp, buf)) + return (EIO); return (0); } @@ -1024,46 +1029,41 @@ zio_read(spa_t *spa, const blkptr_t *bp, if (!dva->dva_word[0] && !dva->dva_word[1]) continue; - if (DVA_GET_GANG(dva)) { - error = zio_read_gang(spa, bp, dva, buf); - if (error != 0) - continue; - } else { - vdevid = DVA_GET_VDEV(dva); - offset = DVA_GET_OFFSET(dva); - STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink) { - if (vdev->v_id == vdevid) - break; - } - if (!vdev || !vdev->v_read) - continue; + vdevid = DVA_GET_VDEV(dva); + offset = DVA_GET_OFFSET(dva); + STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink) { + if (vdev->v_id == vdevid) + break; + } + if (!vdev || !vdev->v_read) + continue; - size = BP_GET_PSIZE(bp); + size = BP_GET_PSIZE(bp); + if (vdev->v_read == vdev_raidz_read) { align = 1ULL << vdev->v_top->v_ashift; if (P2PHASE(size, align) != 0) size = P2ROUNDUP(size, align); - if (size != BP_GET_PSIZE(bp) || cpfunc != ZIO_COMPRESS_OFF) - pbuf = zfs_alloc(size); - else - pbuf = buf; + } + if (size != BP_GET_PSIZE(bp) || cpfunc != ZIO_COMPRESS_OFF) + pbuf = zfs_alloc(size); + else + pbuf = buf; + if (DVA_GET_GANG(dva)) + error = zio_read_gang(spa, bp, pbuf); + else error = vdev->v_read(vdev, bp, pbuf, offset, size); - if (error == 0) { - if (cpfunc != ZIO_COMPRESS_OFF) { - error = zio_decompress_data(cpfunc, - pbuf, BP_GET_PSIZE(bp), buf, - BP_GET_LSIZE(bp)); - } else if (size != BP_GET_PSIZE(bp)) { - bcopy(pbuf, buf, BP_GET_PSIZE(bp)); - } - } - if (buf != pbuf) - zfs_free(pbuf, size); - if (error != 0) - continue; + if (error == 0) { + if (cpfunc != ZIO_COMPRESS_OFF) + error = zio_decompress_data(cpfunc, pbuf, + BP_GET_PSIZE(bp), buf, BP_GET_LSIZE(bp)); + else if (size != BP_GET_PSIZE(bp)) + bcopy(pbuf, buf, BP_GET_PSIZE(bp)); } - error = 0; - break; + if (buf != pbuf) + zfs_free(pbuf, size); + if (error == 0) + break; } if (error != 0) printf("ZFS: i/o error - all block copies unavailable\n"); Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Thu Oct 20 15:34:17 2011 (r226567) +++ head/sys/cddl/boot/zfs/zfssubr.c Thu Oct 20 15:42:38 2011 (r226568) @@ -181,14 +181,17 @@ zio_checksum_label_verifier(zio_cksum_t } static int -zio_checksum_verify(const blkptr_t *bp, void *data, uint64_t offset, - uint64_t size) +zio_checksum_verify(const blkptr_t *bp, void *data) { - unsigned int checksum = BP_IS_GANG(bp) ? ZIO_CHECKSUM_GANG_HEADER : BP_GET_CHECKSUM(bp); + uint64_t size; + unsigned int checksum; zio_checksum_info_t *ci; zio_cksum_t actual_cksum, expected_cksum, verifier; int byteswap; + checksum = BP_GET_CHECKSUM(bp); + size = BP_GET_PSIZE(bp); + if (checksum >= ZIO_CHECKSUM_FUNCTIONS) return (EINVAL); ci = &zio_checksum_table[checksum]; @@ -206,7 +209,8 @@ zio_checksum_verify(const blkptr_t *bp, if (checksum == ZIO_CHECKSUM_GANG_HEADER) zio_checksum_gang_verifier(&verifier, bp); else if (checksum == ZIO_CHECKSUM_LABEL) - zio_checksum_label_verifier(&verifier, offset); + zio_checksum_label_verifier(&verifier, + DVA_GET_OFFSET(BP_IDENTITY(bp))); else verifier = bp->blk_cksum; @@ -224,7 +228,6 @@ zio_checksum_verify(const blkptr_t *bp, byteswap_uint64_array(&expected_cksum, sizeof (zio_cksum_t)); } else { - ASSERT(!BP_IS_GANG(bp)); expected_cksum = bp->blk_cksum; ci->ci_func[0](data, size, &actual_cksum); } @@ -1243,7 +1246,7 @@ static int raidz_checksum_verify(const blkptr_t *bp, void *data, uint64_t size) { - return (zio_checksum_verify(bp, data, 0, size)); + return (zio_checksum_verify(bp, data)); } /* From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 15:46:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A9F4106564A; Thu, 20 Oct 2011 15:46:54 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9A68FC0A; Thu, 20 Oct 2011 15:46:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KFkstP080951; Thu, 20 Oct 2011 15:46:54 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KFksT4080949; Thu, 20 Oct 2011 15:46:54 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110201546.p9KFksT4080949@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 20 Oct 2011 15:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226569 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 15:46:54 -0000 Author: pjd Date: Thu Oct 20 15:46:54 2011 New Revision: 226569 URL: http://svn.freebsd.org/changeset/base/226569 Log: With LOADER_MBR_SUPPORT defined and LOADER_GPT_SUPPORT undefined we would never call disk_openmbr(). Submitted by: avg MFC after: 3 days Modified: head/sys/boot/common/disk.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Thu Oct 20 15:42:38 2011 (r226568) +++ head/sys/boot/common/disk.c Thu Oct 20 15:46:54 2011 (r226569) @@ -776,10 +776,11 @@ disk_open(struct disk_devdesc *dev) #ifdef LOADER_GPT_SUPPORT rc = disk_opengpt(dev); + if (rc == 0) + return (0); #endif #ifdef LOADER_MBR_SUPPORT - if (rc) - rc = disk_openmbr(dev); + rc = disk_openmbr(dev); #endif return (rc); From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 15:58:37 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FF32106564A; Thu, 20 Oct 2011 15:58:37 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id AD6288FC13; Thu, 20 Oct 2011 15:58:36 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p9KFwZQO099776; Thu, 20 Oct 2011 19:58:35 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p9KFwZ3r099774; Thu, 20 Oct 2011 19:58:35 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 20 Oct 2011 19:58:35 +0400 From: Gleb Smirnoff To: Nikolay Denev Message-ID: <20111020155835.GZ51949@FreeBSD.org> References: <201110151841.p9FIfQLE025750@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226402 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 15:58:37 -0000 On Sat, Oct 15, 2011 at 11:51:21PM +0300, Nikolay Denev wrote: N> > Log: N> > Add support for IPv4 /31 prefixes, as described in RFC3021. N> > N> > To run a /31 network, participating hosts MUST drop support N> > for directed broadcasts, and treat the first and last addresses N> > on subnet as unicast. The broadcast address for the prefix N> > should be the link local broadcast address, INADDR_BROADCAST. ... N> That's great! Thanks! N> Any plans for MFC? Merged to stable/9. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Oct 20 21:01:51 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF231065689; Thu, 20 Oct 2011 21:01:51 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B43C8FC0A; Thu, 20 Oct 2011 21:01:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KL1p85091438; Thu, 20 Oct 2011 21:01:51 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KL1pNN091436; Thu, 20 Oct 2011 21:01:51 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110202101.p9KL1pNN091436@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 20 Oct 2011 21:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226583 - head/cddl/contrib/opensolaris/cmd/zpool X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 21:01:51 -0000 Author: pjd Date: Thu Oct 20 21:01:50 2011 New Revision: 226583 URL: http://svn.freebsd.org/changeset/base/226583 Log: Make all the lines align properly. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Oct 20 20:33:31 2011 (r226582) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Oct 20 21:01:50 2011 (r226583) @@ -3377,7 +3377,7 @@ print_scan_status(pool_scan_stat_t *ps) double fraction_done; char processed_buf[7], examined_buf[7], total_buf[7], rate_buf[7]; - (void) printf(gettext(" scan: ")); + (void) printf(gettext(" scan: ")); /* If there's never been a scan, there's not much to say. */ if (ps == NULL || ps->pss_func == POOL_SCAN_NONE || @@ -3457,7 +3457,7 @@ print_scan_status(pool_scan_stat_t *ps) /* * do not print estimated time if hours_left is more than 30 days */ - (void) printf(gettext(" %s scanned out of %s at %s/s"), + (void) printf(gettext(" %s scanned out of %s at %s/s"), examined_buf, total_buf, rate_buf); if (hours_left < (30 * 24)) { (void) printf(gettext(", %lluh%um to go\n"), @@ -3468,10 +3468,10 @@ print_scan_status(pool_scan_stat_t *ps) } if (ps->pss_func == POOL_SCAN_RESILVER) { - (void) printf(gettext(" %s resilvered, %.2f%% done\n"), + (void) printf(gettext(" %s resilvered, %.2f%% done\n"), processed_buf, 100 * fraction_done); } else if (ps->pss_func == POOL_SCAN_SCRUB) { - (void) printf(gettext(" %s repaired, %.2f%% done\n"), + (void) printf(gettext(" %s repaired, %.2f%% done\n"), processed_buf, 100 * fraction_done); } } From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:25:31 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E83E106566C; Fri, 21 Oct 2011 06:25:31 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7458E8FC0A; Fri, 21 Oct 2011 06:25:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6PVJO009596; Fri, 21 Oct 2011 06:25:31 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6PVDS009593; Fri, 21 Oct 2011 06:25:31 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210625.p9L6PVDS009593@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226594 - in head/lib/msun: amd64 i387 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:25:31 -0000 Author: das Date: Fri Oct 21 06:25:31 2011 New Revision: 226594 URL: http://svn.freebsd.org/changeset/base/226594 Log: Bugfix: feenableexcept() and fedisableexcept() should just return the old exception mask, not mask | ~FE_ALL_EXCEPT. MFC after: 2 weeks Modified: head/lib/msun/amd64/fenv.c head/lib/msun/i387/fenv.c Modified: head/lib/msun/amd64/fenv.c ============================================================================== --- head/lib/msun/amd64/fenv.c Fri Oct 21 05:41:20 2011 (r226593) +++ head/lib/msun/amd64/fenv.c Fri Oct 21 06:25:31 2011 (r226594) @@ -135,12 +135,12 @@ __feenableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); - return (~omask); + return (omask); } int @@ -152,12 +152,12 @@ __fedisableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); Modified: head/lib/msun/i387/fenv.c ============================================================================== --- head/lib/msun/i387/fenv.c Fri Oct 21 05:41:20 2011 (r226593) +++ head/lib/msun/i387/fenv.c Fri Oct 21 06:25:31 2011 (r226594) @@ -192,14 +192,14 @@ __feenableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); if (__HAS_SSE()) { mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } int @@ -214,14 +214,14 @@ __fedisableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); if (__HAS_SSE()) { mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:26:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 050FF1065670; Fri, 21 Oct 2011 06:26:08 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF6388FC08; Fri, 21 Oct 2011 06:26:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6Q7iQ009656; Fri, 21 Oct 2011 06:26:07 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6Q7oB009653; Fri, 21 Oct 2011 06:26:07 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210626.p9L6Q7oB009653@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226595 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:26:08 -0000 Author: das Date: Fri Oct 21 06:26:07 2011 New Revision: 226595 URL: http://svn.freebsd.org/changeset/base/226595 Log: Per IEEE754r, pow(1, y) is 1 even if y is NaN, and pow(-1, +-Inf) is 1. MFC after: 2 weeks Modified: head/lib/msun/src/e_pow.c head/lib/msun/src/e_powf.c Modified: head/lib/msun/src/e_pow.c ============================================================================== --- head/lib/msun/src/e_pow.c Fri Oct 21 06:25:31 2011 (r226594) +++ head/lib/msun/src/e_pow.c Fri Oct 21 06:26:07 2011 (r226595) @@ -109,6 +109,9 @@ __ieee754_pow(double x, double y) /* y==zero: x**0 = 1 */ if((iy|ly)==0) return one; + /* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3ff00000 && lx == 0) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) @@ -138,7 +141,7 @@ __ieee754_pow(double x, double y) if(ly==0) { if (iy==0x7ff00000) { /* y is +-inf */ if(((ix-0x3ff00000)|lx)==0) - return y - y; /* inf**+-1 is NaN */ + return one; /* (-1)**+-inf is NaN */ else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else /* (|x|<1)**-,+inf = inf,0 */ Modified: head/lib/msun/src/e_powf.c ============================================================================== --- head/lib/msun/src/e_powf.c Fri Oct 21 06:25:31 2011 (r226594) +++ head/lib/msun/src/e_powf.c Fri Oct 21 06:26:07 2011 (r226595) @@ -67,6 +67,9 @@ __ieee754_powf(float x, float y) /* y==zero: x**0 = 1 */ if(iy==0) return one; + /* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3f800000) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7f800000 || iy > 0x7f800000) @@ -90,7 +93,7 @@ __ieee754_powf(float x, float y) /* special value of y */ if (iy==0x7f800000) { /* y is +-inf */ if (ix==0x3f800000) - return y - y; /* inf**+-1 is NaN */ + return one; /* (-1)**+-inf is NaN */ else if (ix > 0x3f800000)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else /* (|x|<1)**-,+inf = inf,0 */ From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:26:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24FC3106564A; Fri, 21 Oct 2011 06:26:39 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 145228FC16; Fri, 21 Oct 2011 06:26:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6QcPR009708; Fri, 21 Oct 2011 06:26:38 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6QcEG009703; Fri, 21 Oct 2011 06:26:38 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210626.p9L6QcEG009703@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226596 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:26:39 -0000 Author: das Date: Fri Oct 21 06:26:38 2011 New Revision: 226596 URL: http://svn.freebsd.org/changeset/base/226596 Log: Use STRICT_ASSIGN() to ensure that the compiler doesn't screw things up by storing x in a wider type than it's supposed to. Submitted by: bde Modified: head/lib/msun/src/e_exp.c head/lib/msun/src/e_expf.c head/lib/msun/src/s_expm1.c head/lib/msun/src/s_expm1f.c Modified: head/lib/msun/src/e_exp.c ============================================================================== --- head/lib/msun/src/e_exp.c Fri Oct 21 06:26:07 2011 (r226595) +++ head/lib/msun/src/e_exp.c Fri Oct 21 06:26:38 2011 (r226596) @@ -76,6 +76,8 @@ __FBSDID("$FreeBSD$"); * to produce the hexadecimal values shown. */ +#include + #include "math.h" #include "math_private.h" @@ -133,7 +135,7 @@ __ieee754_exp(double x) /* default IEEE hi = x - t*ln2HI[0]; /* t*ln2HI is exact here */ lo = t*ln2LO[0]; } - x = hi - lo; + STRICT_ASSIGN(double, x, hi - lo); } else if(hx < 0x3e300000) { /* when |x|<2**-28 */ if(huge+x>one) return one+x;/* trigger inexact */ Modified: head/lib/msun/src/e_expf.c ============================================================================== --- head/lib/msun/src/e_expf.c Fri Oct 21 06:26:07 2011 (r226595) +++ head/lib/msun/src/e_expf.c Fri Oct 21 06:26:38 2011 (r226596) @@ -16,6 +16,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "math.h" #include "math_private.h" @@ -40,7 +42,7 @@ P2 = -2.7667332906e-3; /* -0xb55215.0p- static volatile float twom100 = 7.8886090522e-31; /* 2**-100=0x0d800000 */ float -__ieee754_expf(float x) /* default IEEE double exp */ +__ieee754_expf(float x) { float y,hi=0.0,lo=0.0,c,t,twopk; int32_t k=0,xsb; @@ -70,7 +72,7 @@ __ieee754_expf(float x) /* default IEEE hi = x - t*ln2HI[0]; /* t*ln2HI is exact here */ lo = t*ln2LO[0]; } - x = hi - lo; + STRICT_ASSIGN(float, x, hi - lo); } else if(hx < 0x39000000) { /* when |x|<2**-14 */ if(huge+x>one) return one+x;/* trigger inexact */ Modified: head/lib/msun/src/s_expm1.c ============================================================================== --- head/lib/msun/src/s_expm1.c Fri Oct 21 06:26:07 2011 (r226595) +++ head/lib/msun/src/s_expm1.c Fri Oct 21 06:26:38 2011 (r226596) @@ -108,6 +108,8 @@ __FBSDID("$FreeBSD$"); * to produce the hexadecimal values shown. */ +#include + #include "math.h" #include "math_private.h" @@ -168,7 +170,7 @@ expm1(double x) hi = x - t*ln2_hi; /* t*ln2_hi is exact here */ lo = t*ln2_lo; } - x = hi - lo; + STRICT_ASSIGN(double, x, hi - lo); c = (hi-x)-lo; } else if(hx < 0x3c900000) { /* when |x|<2**-54, return x */ Modified: head/lib/msun/src/s_expm1f.c ============================================================================== --- head/lib/msun/src/s_expm1f.c Fri Oct 21 06:26:07 2011 (r226595) +++ head/lib/msun/src/s_expm1f.c Fri Oct 21 06:26:38 2011 (r226596) @@ -16,6 +16,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "math.h" #include "math_private.h" @@ -74,7 +76,7 @@ expm1f(float x) hi = x - t*ln2_hi; /* t*ln2_hi is exact here */ lo = t*ln2_lo; } - x = hi - lo; + STRICT_ASSIGN(float, x, hi - lo); c = (hi-x)-lo; } else if(hx < 0x33000000) { /* when |x|<2**-25, return x */ From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:27:56 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E44E51065742; Fri, 21 Oct 2011 06:27:56 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D238F8FC1B; Fri, 21 Oct 2011 06:27:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6Ruth009791; Fri, 21 Oct 2011 06:27:56 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6RuPP009784; Fri, 21 Oct 2011 06:27:56 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210627.p9L6RuPP009784@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226597 - in head/lib/msun: . src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:27:57 -0000 Author: das Date: Fri Oct 21 06:27:56 2011 New Revision: 226597 URL: http://svn.freebsd.org/changeset/base/226597 Log: The cexp() and {,c}{cos,sin}h functions all need to be able to compute exp(x) scaled down by some factor, and the challenge is doing this accurately when exp(x) would overflow. This change replaces all of the tricks we've been using with common __ldexp_exp() and __ldexp_cexp() routines that handle all the scaling. bde plans to improve on this further by moving the guts of exp() into k_exp.c and handling the scaling in a more direct manner. But the current approach is simple and adequate for now. Added: head/lib/msun/src/k_exp.c (contents, props changed) head/lib/msun/src/k_expf.c (contents, props changed) Modified: head/lib/msun/Makefile head/lib/msun/src/math_private.h head/lib/msun/src/s_cexp.c head/lib/msun/src/s_cexpf.c Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Fri Oct 21 06:26:38 2011 (r226596) +++ head/lib/msun/Makefile Fri Oct 21 06:27:56 2011 (r226597) @@ -49,7 +49,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c e_pow.c e_powf.c e_rem_pio2.c \ e_rem_pio2f.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \ e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c fenv.c \ - k_cos.c k_cosf.c k_rem_pio2.c k_sin.c k_sinf.c \ + k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c \ Added: head/lib/msun/src/k_exp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/k_exp.c Fri Oct 21 06:27:56 2011 (r226597) @@ -0,0 +1,108 @@ +/*- + * Copyright (c) 2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "math.h" +#include "math_private.h" + +static const uint32_t k = 1799; /* constant for reduction */ +static const double kln2 = 1246.97177782734161156; /* k * ln2 */ + +/* + * Compute exp(x), scaled to avoid spurious overflow. An exponent is + * returned separately in 'expt'. + * + * Input: ln(DBL_MAX) <= x < ln(2 * DBL_MAX / DBL_MIN_DENORM) ~= 1454.91 + * Output: 2**1023 <= y < 2**1024 + */ +static double +__frexp_exp(double x, int *expt) +{ + double exp_x; + uint32_t hx; + + /* + * We use exp(x) = exp(x - kln2) * 2**k, carefully chosen to + * minimize |exp(kln2) - 2**k|. We also scale the exponent of + * exp_x to MAX_EXP so that the result can be multiplied by + * a tiny number without losing accuracy due to denormalization. + */ + exp_x = exp(x - kln2); + GET_HIGH_WORD(hx, exp_x); + *expt = (hx >> 20) - (0x3ff + 1023) + k; + SET_HIGH_WORD(exp_x, (hx & 0xfffff) | ((0x3ff + 1023) << 20)); + return (exp_x); +} + +/* + * __ldexp_exp(x, expt) and __ldexp_cexp(x, expt) compute exp(x) * 2**expt. + * They are intended for large arguments (real part >= ln(DBL_MAX)) + * where care is needed to avoid overflow. + * + * The present implementation is narrowly tailored for our hyperbolic and + * exponential functions. We assume expt is small (0 or -1), and the caller + * has filtered out very large x, for which overflow would be inevitable. + */ + +double +__ldexp_exp(double x, int expt) +{ + double exp_x, scale; + int ex_expt; + + exp_x = __frexp_exp(x, &ex_expt); + expt += ex_expt; + INSERT_WORDS(scale, (0x3ff + expt) << 20, 0); + return (exp_x * scale); +} + +double complex +__ldexp_cexp(double complex z, int expt) +{ + double x, y, exp_x, scale1, scale2; + int ex_expt, half_expt; + + x = creal(z); + y = cimag(z); + exp_x = __frexp_exp(x, &ex_expt); + expt += ex_expt; + + /* + * Arrange so that scale1 * scale2 == 2**expt. We use this to + * compensate for scalbn being horrendously slow. + */ + half_expt = expt / 2; + INSERT_WORDS(scale1, (0x3ff + half_expt) << 20, 0); + half_expt = expt - half_expt; + INSERT_WORDS(scale2, (0x3ff + half_expt) << 20, 0); + + return (cpack(cos(y) * exp_x * scale1 * scale2, + sin(y) * exp_x * scale1 * scale2)); +} Added: head/lib/msun/src/k_expf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/k_expf.c Fri Oct 21 06:27:56 2011 (r226597) @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "math.h" +#include "math_private.h" + +static const uint32_t k = 235; /* constant for reduction */ +static const float kln2 = 162.88958740F; /* k * ln2 */ + +/* + * See k_exp.c for details. + * + * Input: ln(FLT_MAX) <= x < ln(2 * FLT_MAX / FLT_MIN_DENORM) ~= 192.7 + * Output: 2**127 <= y < 2**128 + */ +static float +__frexp_expf(float x, int *expt) +{ + double exp_x; + uint32_t hx; + + exp_x = expf(x - kln2); + GET_FLOAT_WORD(hx, exp_x); + *expt = (hx >> 23) - (0x7f + 127) + k; + SET_FLOAT_WORD(exp_x, (hx & 0x7fffff) | ((0x7f + 127) << 23)); + return (exp_x); +} + +float +__ldexp_expf(float x, int expt) +{ + float exp_x, scale; + int ex_expt; + + exp_x = __frexp_expf(x, &ex_expt); + expt += ex_expt; + SET_FLOAT_WORD(scale, (0x7f + expt) << 23); + return (exp_x * scale); +} + +float complex +__ldexp_cexpf(float complex z, int expt) +{ + float x, y, exp_x, scale1, scale2; + int ex_expt, half_expt; + + x = crealf(z); + y = cimagf(z); + exp_x = __frexp_expf(x, &ex_expt); + expt += ex_expt; + + half_expt = expt / 2; + SET_FLOAT_WORD(scale1, (0x7f + half_expt) << 23); + half_expt = expt - half_expt; + SET_FLOAT_WORD(scale2, (0x7f + half_expt) << 23); + + return (cpackf(cosf(y) * exp_x * scale1 * scale2, + sinf(y) * exp_x * scale1 * scale2)); +} Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Fri Oct 21 06:26:38 2011 (r226596) +++ head/lib/msun/src/math_private.h Fri Oct 21 06:27:56 2011 (r226597) @@ -397,6 +397,10 @@ int __ieee754_rem_pio2(double,double*); double __kernel_sin(double,double,int); double __kernel_cos(double,double); double __kernel_tan(double,double,int); +double __ldexp_exp(double,int); +#ifdef _COMPLEX_H +double complex __ldexp_cexp(double complex,int); +#endif /* float precision kernel functions */ #ifdef INLINE_REM_PIO2F @@ -415,6 +419,10 @@ float __kernel_cosdf(double); __inline #endif float __kernel_tandf(double,int); +float __ldexp_expf(float,int); +#ifdef _COMPLEX_H +float complex __ldexp_cexpf(float complex,int); +#endif /* long double precision kernel functions */ long double __kernel_sinl(long double, long double, int); Modified: head/lib/msun/src/s_cexp.c ============================================================================== --- head/lib/msun/src/s_cexp.c Fri Oct 21 06:26:38 2011 (r226596) +++ head/lib/msun/src/s_cexp.c Fri Oct 21 06:27:56 2011 (r226597) @@ -34,18 +34,13 @@ __FBSDID("$FreeBSD$"); static const uint32_t exp_ovfl = 0x40862e42, /* high bits of MAX_EXP * ln2 ~= 710 */ -cexp_ovfl = 0x4096b8e4, /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */ -k = 1799; /* constant for reduction */ - -static const double -kln2 = 1246.97177782734161156; /* k * ln2 */ +cexp_ovfl = 0x4096b8e4; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */ double complex cexp(double complex z) { double x, y, exp_x; uint32_t hx, hy, lx, ly; - int scale; x = creal(z); y = cimag(z); @@ -77,17 +72,9 @@ cexp(double complex z) if (hx >= exp_ovfl && hx <= cexp_ovfl) { /* * x is between 709.7 and 1454.3, so we must scale to avoid - * overflow in exp(x). We use exp(x) = exp(x - kln2) * 2**k, - * carefully chosen to minimize |exp(kln2) - 2**k|. We also - * scale the exponent of exp(x) to MANT_DIG to avoid loss of - * accuracy due to underflow if sin(y) is tiny. + * overflow in exp(x). */ - exp_x = exp(x - kln2); - GET_HIGH_WORD(hx, exp_x); - SET_HIGH_WORD(exp_x, (hx & 0xfffff) | ((0x3ff + 52) << 20)); - scale = (hx >> 20) - (0x3ff + 52) + k; - return (cpack(scalbn(cos(y) * exp_x, scale), - scalbn(sin(y) * exp_x, scale))); + return (__ldexp_cexp(z, 0)); } else { /* * Cases covered here: Modified: head/lib/msun/src/s_cexpf.c ============================================================================== --- head/lib/msun/src/s_cexpf.c Fri Oct 21 06:26:38 2011 (r226596) +++ head/lib/msun/src/s_cexpf.c Fri Oct 21 06:27:56 2011 (r226597) @@ -34,18 +34,13 @@ __FBSDID("$FreeBSD$"); static const uint32_t exp_ovfl = 0x42b17218, /* MAX_EXP * ln2 ~= 88.722839355 */ -cexp_ovfl = 0x43400074, /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */ -k = 235; /* constant for reduction */ - -static const float -kln2 = 162.88958740f; /* k * ln2 */ +cexp_ovfl = 0x43400074; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */ float complex cexpf(float complex z) { float x, y, exp_x; uint32_t hx, hy; - int scale; x = crealf(z); y = cimagf(z); @@ -77,17 +72,9 @@ cexpf(float complex z) if (hx >= exp_ovfl && hx <= cexp_ovfl) { /* * x is between 88.7 and 192, so we must scale to avoid - * overflow in expf(x). We use exp(x) = exp(x - kln2) * 2**k, - * carefully chosen to minimize |exp(kln2) - 2**k|. We also - * scale the exponent of exp(x) to MANT_DIG to avoid loss of - * accuracy due to underflow if sin(y) is tiny. + * overflow in expf(x). */ - exp_x = expf(x - kln2); - GET_FLOAT_WORD(hx, exp_x); - SET_FLOAT_WORD(exp_x, (hx & 0x7fffff) | ((0x7f + 23) << 23)); - scale = (hx >> 23) - (0x7f + 23) + k; - return (cpackf(scalbnf(cosf(y) * exp_x, scale), - scalbnf(sinf(y) * exp_x, scale))); + return (__ldexp_cexpf(z, 0)); } else { /* * Cases covered here: From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:28:48 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E9B5106564A; Fri, 21 Oct 2011 06:28:48 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E088FC19; Fri, 21 Oct 2011 06:28:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6Sldq009853; Fri, 21 Oct 2011 06:28:47 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6SlID009848; Fri, 21 Oct 2011 06:28:47 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210628.p9L6SlID009848@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226598 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:28:48 -0000 Author: das Date: Fri Oct 21 06:28:47 2011 New Revision: 226598 URL: http://svn.freebsd.org/changeset/base/226598 Log: Use __ldexp_exp() to simplify things and improve accuracy for x near the overflow threshold. Modified: head/lib/msun/src/e_cosh.c head/lib/msun/src/e_coshf.c head/lib/msun/src/e_sinh.c head/lib/msun/src/e_sinhf.c Modified: head/lib/msun/src/e_cosh.c ============================================================================== --- head/lib/msun/src/e_cosh.c Fri Oct 21 06:27:56 2011 (r226597) +++ head/lib/msun/src/e_cosh.c Fri Oct 21 06:28:47 2011 (r226598) @@ -45,7 +45,6 @@ __ieee754_cosh(double x) { double t,w; int32_t ix; - u_int32_t lx; /* High word of |x|. */ GET_HIGH_WORD(ix,x); @@ -72,13 +71,8 @@ __ieee754_cosh(double x) if (ix < 0x40862E42) return half*__ieee754_exp(fabs(x)); /* |x| in [log(maxdouble), overflowthresold] */ - GET_LOW_WORD(lx,x); - if (ix<0x408633CE || - ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) { - w = __ieee754_exp(half*fabs(x)); - t = half*w; - return t*w; - } + if (ix<=0x408633CE) + return __ldexp_exp(fabs(x), -1); /* |x| > overflowthresold, cosh(x) overflow */ return huge*huge; Modified: head/lib/msun/src/e_coshf.c ============================================================================== --- head/lib/msun/src/e_coshf.c Fri Oct 21 06:27:56 2011 (r226597) +++ head/lib/msun/src/e_coshf.c Fri Oct 21 06:28:47 2011 (r226598) @@ -51,11 +51,8 @@ __ieee754_coshf(float x) if (ix < 0x42b17217) return half*__ieee754_expf(fabsf(x)); /* |x| in [log(maxfloat), overflowthresold] */ - if (ix<=0x42b2d4fc) { - w = __ieee754_expf(half*fabsf(x)); - t = half*w; - return t*w; - } + if (ix<=0x42b2d4fc) + return __ldexp_expf(fabsf(x), -1); /* |x| > overflowthresold, cosh(x) overflow */ return huge*huge; Modified: head/lib/msun/src/e_sinh.c ============================================================================== --- head/lib/msun/src/e_sinh.c Fri Oct 21 06:27:56 2011 (r226597) +++ head/lib/msun/src/e_sinh.c Fri Oct 21 06:28:47 2011 (r226598) @@ -40,9 +40,8 @@ static const double one = 1.0, shuge = 1 double __ieee754_sinh(double x) { - double t,w,h; + double t,h; int32_t ix,jx; - u_int32_t lx; /* High word of |x|. */ GET_HIGH_WORD(jx,x); @@ -66,12 +65,8 @@ __ieee754_sinh(double x) if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x)); /* |x| in [log(maxdouble), overflowthresold] */ - GET_LOW_WORD(lx,x); - if (ix<0x408633CE || ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) { - w = __ieee754_exp(0.5*fabs(x)); - t = h*w; - return t*w; - } + if (ix<=0x408633CE) + return h*2.0*__ldexp_exp(fabs(x), -1); /* |x| > overflowthresold, sinh(x) overflow */ return x*shuge; Modified: head/lib/msun/src/e_sinhf.c ============================================================================== --- head/lib/msun/src/e_sinhf.c Fri Oct 21 06:27:56 2011 (r226597) +++ head/lib/msun/src/e_sinhf.c Fri Oct 21 06:28:47 2011 (r226598) @@ -24,7 +24,7 @@ static const float one = 1.0, shuge = 1. float __ieee754_sinhf(float x) { - float t,w,h; + float t,h; int32_t ix,jx; GET_FLOAT_WORD(jx,x); @@ -48,11 +48,8 @@ __ieee754_sinhf(float x) if (ix < 0x42b17217) return h*__ieee754_expf(fabsf(x)); /* |x| in [logf(maxfloat), overflowthresold] */ - if (ix<=0x42b2d4fc) { - w = __ieee754_expf((float)0.5*fabsf(x)); - t = h*w; - return t*w; - } + if (ix<=0x42b2d4fc) + return h*2.0F*__ldexp_expf(fabsf(x), -1); /* |x| > overflowthresold, sinh(x) overflow */ return x*shuge; From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:29:32 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDAD1106566B; Fri, 21 Oct 2011 06:29:32 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC74C8FC21; Fri, 21 Oct 2011 06:29:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6TW0U009917; Fri, 21 Oct 2011 06:29:32 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6TWQb009912; Fri, 21 Oct 2011 06:29:32 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210629.p9L6TWQb009912@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226599 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:29:32 -0000 Author: das Date: Fri Oct 21 06:29:32 2011 New Revision: 226599 URL: http://svn.freebsd.org/changeset/base/226599 Log: Improved handling of large x in ccosh{,f}(): - Handle cases where exp(x) would overflow, but ccosh(x) ~= exp(x) / 2 shouldn't. - Use the ccosh(x) ~= exp(x) / 2 approximation to simplify the calculation when x is large. Similarly for csinh(). Also fixed the return value of csinh(-Inf +- 0i). Modified: head/lib/msun/src/s_ccosh.c head/lib/msun/src/s_ccoshf.c head/lib/msun/src/s_csinh.c head/lib/msun/src/s_csinhf.c Modified: head/lib/msun/src/s_ccosh.c ============================================================================== --- head/lib/msun/src/s_ccosh.c Fri Oct 21 06:28:47 2011 (r226598) +++ head/lib/msun/src/s_ccosh.c Fri Oct 21 06:29:32 2011 (r226599) @@ -42,10 +42,12 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" +static const double huge = 0x1p1023; + double complex ccosh(double complex z) { - double x, y; + double x, y, h; int32_t hx, hy, ix, iy, lx, ly; x = creal(z); @@ -61,8 +63,23 @@ ccosh(double complex z) if (ix < 0x7ff00000 && iy < 0x7ff00000) { if ((iy | ly) == 0) return (cpack(cosh(x), x * y)); - /* XXX We don't handle |x| > DBL_MAX ln(2) yet. */ - return (cpack(cosh(x) * cos(y), sinh(x) * sin(y))); + if (ix < 0x40360000) /* small x: normal case */ + return (cpack(cosh(x) * cos(y), sinh(x) * sin(y))); + + /* |x| >= 22, so cosh(x) ~= exp(|x|) */ + if (ix < 0x40862e42) { + /* x < 710: exp(|x|) won't overflow */ + h = exp(fabs(x)) * 0.5; + return (cpack(h * cos(y), copysign(h, x) * sin(y))); + } else if (ix < 0x4096bbaa) { + /* x < 1455: scale to avoid overflow */ + z = __ldexp_cexp(cpack(fabs(x), y), -1); + return (cpack(creal(z), cimag(z) * copysign(1, x))); + } else { + /* x >= 1455: the result always overflows */ + h = huge * x; + return (cpack(h * h * cos(y), h * sin(y))); + } } /* Modified: head/lib/msun/src/s_ccoshf.c ============================================================================== --- head/lib/msun/src/s_ccoshf.c Fri Oct 21 06:28:47 2011 (r226598) +++ head/lib/msun/src/s_ccoshf.c Fri Oct 21 06:29:32 2011 (r226599) @@ -36,10 +36,12 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" +static const float huge = 0x1p127; + float complex ccoshf(float complex z) { - float x, y; + float x, y, h; int32_t hx, hy, ix, iy; x = crealf(z); @@ -54,8 +56,23 @@ ccoshf(float complex z) if (ix < 0x7f800000 && iy < 0x7f800000) { if (iy == 0) return (cpackf(coshf(x), x * y)); - /* XXX We don't handle |x| > FLT_MAX ln(2) yet. */ - return (cpackf(coshf(x) * cosf(y), sinhf(x) * sinf(y))); + if (ix < 0x41100000) /* small x: normal case */ + return (cpackf(coshf(x) * cosf(y), sinhf(x) * sinf(y))); + + /* |x| >= 9, so cosh(x) ~= exp(|x|) */ + if (ix < 0x42b17218) { + /* x < 88.7: expf(|x|) won't overflow */ + h = expf(fabsf(x)) * 0.5f; + return (cpackf(h * cosf(y), copysignf(h, x) * sinf(y))); + } else if (ix < 0x4340b1e7) { + /* x < 192.7: scale to avoid overflow */ + z = __ldexp_cexpf(cpackf(fabsf(x), y), -1); + return (cpackf(crealf(z), cimagf(z) * copysignf(1, x))); + } else { + /* x >= 192.7: the result always overflows */ + h = huge * x; + return (cpackf(h * h * cosf(y), h * sinf(y))); + } } if (ix == 0 && iy >= 0x7f800000) Modified: head/lib/msun/src/s_csinh.c ============================================================================== --- head/lib/msun/src/s_csinh.c Fri Oct 21 06:28:47 2011 (r226598) +++ head/lib/msun/src/s_csinh.c Fri Oct 21 06:29:32 2011 (r226599) @@ -42,10 +42,12 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" +static const double huge = 0x1p1023; + double complex csinh(double complex z) { - double x, y; + double x, y, h; int32_t hx, hy, ix, iy, lx, ly; x = creal(z); @@ -61,8 +63,23 @@ csinh(double complex z) if (ix < 0x7ff00000 && iy < 0x7ff00000) { if ((iy | ly) == 0) return (cpack(sinh(x), y)); - /* XXX We don't handle |x| > DBL_MAX ln(2) yet. */ - return (cpack(sinh(x) * cos(y), cosh(x) * sin(y))); + if (ix < 0x40360000) /* small x: normal case */ + return (cpack(sinh(x) * cos(y), cosh(x) * sin(y))); + + /* |x| >= 22, so cosh(x) ~= exp(|x|) */ + if (ix < 0x40862e42) { + /* x < 710: exp(|x|) won't overflow */ + h = exp(fabs(x)) * 0.5; + return (cpack(copysign(h, x) * cos(y), h * sin(y))); + } else if (ix < 0x4096bbaa) { + /* x < 1455: scale to avoid overflow */ + z = __ldexp_cexp(cpack(fabs(x), y), -1); + return (cpack(creal(z) * copysign(1, x), cimag(z))); + } else { + /* x >= 1455: the result always overflows */ + h = huge * x; + return (cpack(h * cos(y), h * h * sin(y))); + } } /* @@ -78,13 +95,13 @@ csinh(double complex z) return (cpack(copysign(0, x * (y - y)), y - y)); /* - * sinh(+-Inf +- I 0) = +-Inf + I (+-)(+-)0. + * sinh(+-Inf +- I 0) = +-Inf + I +-0. * * sinh(NaN +- I 0) = d(NaN) + I +-0. */ if ((iy | ly) == 0 && ix >= 0x7ff00000) { if (((hx & 0xfffff) | lx) == 0) - return (cpack(x, copysign(0, x) * y)); + return (cpack(x, y)); return (cpack(x, copysign(0, y))); } Modified: head/lib/msun/src/s_csinhf.c ============================================================================== --- head/lib/msun/src/s_csinhf.c Fri Oct 21 06:28:47 2011 (r226598) +++ head/lib/msun/src/s_csinhf.c Fri Oct 21 06:29:32 2011 (r226599) @@ -36,10 +36,12 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" +static const float huge = 0x1p127; + float complex csinhf(float complex z) { - float x, y; + float x, y, h; int32_t hx, hy, ix, iy; x = crealf(z); @@ -54,8 +56,23 @@ csinhf(float complex z) if (ix < 0x7f800000 && iy < 0x7f800000) { if (iy == 0) return (cpackf(sinhf(x), y)); - /* XXX We don't handle |x| > FLT_MAX ln(2) yet. */ - return (cpackf(sinhf(x) * cosf(y), coshf(x) * sinf(y))); + if (ix < 0x41100000) /* small x: normal case */ + return (cpackf(sinhf(x) * cosf(y), coshf(x) * sinf(y))); + + /* |x| >= 9, so cosh(x) ~= exp(|x|) */ + if (ix < 0x42b17218) { + /* x < 88.7: expf(|x|) won't overflow */ + h = expf(fabsf(x)) * 0.5f; + return (cpackf(copysignf(h, x) * cosf(y), h * sinf(y))); + } else if (ix < 0x4340b1e7) { + /* x < 192.7: scale to avoid overflow */ + z = __ldexp_cexpf(cpackf(fabsf(x), y), -1); + return (cpackf(crealf(z) * copysignf(1, x), cimagf(z))); + } else { + /* x >= 192.7: the result always overflows */ + h = huge * x; + return (cpackf(h * cosf(y), h * h * sinf(y))); + } } if (ix == 0 && iy >= 0x7f800000) @@ -63,7 +80,7 @@ csinhf(float complex z) if (iy == 0 && ix >= 0x7f800000) { if ((hx & 0x7fffff) == 0) - return (cpackf(x, copysignf(0, x) * y)); + return (cpackf(x, y)); return (cpackf(x, copysignf(0, y))); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:30:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F0DC1065670; Fri, 21 Oct 2011 06:30:17 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F29708FC1D; Fri, 21 Oct 2011 06:30:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6UGwr009981; Fri, 21 Oct 2011 06:30:16 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6UGFv009978; Fri, 21 Oct 2011 06:30:16 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210630.p9L6UGFv009978@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226600 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:30:17 -0000 Author: das Date: Fri Oct 21 06:30:16 2011 New Revision: 226600 URL: http://svn.freebsd.org/changeset/base/226600 Log: Fix a corner case: tan(large + Inf i) == NaN + NaN i. Modified: head/lib/msun/src/s_ctanh.c head/lib/msun/src/s_ctanhf.c Modified: head/lib/msun/src/s_ctanh.c ============================================================================== --- head/lib/msun/src/s_ctanh.c Fri Oct 21 06:29:32 2011 (r226599) +++ head/lib/msun/src/s_ctanh.c Fri Oct 21 06:30:16 2011 (r226600) @@ -108,6 +108,13 @@ ctanh(double complex z) } /* + * ctanh(x + i NAN) = NaN + i NaN + * ctanh(x +- i Inf) = NaN + i NaN + */ + if (!isfinite(y)) + return (cpack(y - y, y - y)); + + /* * ctanh(+-huge + i +-y) ~= +-1 +- i 2sin(2y)/exp(2x), using the * approximation sinh^2(huge) ~= exp(2*huge) / 4. * We use a modified formula to avoid spurious overflow. Modified: head/lib/msun/src/s_ctanhf.c ============================================================================== --- head/lib/msun/src/s_ctanhf.c Fri Oct 21 06:29:32 2011 (r226599) +++ head/lib/msun/src/s_ctanhf.c Fri Oct 21 06:30:16 2011 (r226600) @@ -57,6 +57,9 @@ ctanhf(float complex z) copysignf(0, isinf(y) ? y : sinf(y) * cosf(y)))); } + if (!isfinite(y)) + return (cpackf(y - y, y - y)); + if (ix >= 0x41300000) { /* x >= 11 */ float exp_mx = expf(-fabsf(x)); return (cpackf(copysignf(1, x), From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:30:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B21E21065798; Fri, 21 Oct 2011 06:30:43 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16448FC23; Fri, 21 Oct 2011 06:30:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6Uh6e010035; Fri, 21 Oct 2011 06:30:43 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6UhjO010032; Fri, 21 Oct 2011 06:30:43 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210630.p9L6UhjO010032@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226601 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:30:43 -0000 Author: das Date: Fri Oct 21 06:30:43 2011 New Revision: 226601 URL: http://svn.freebsd.org/changeset/base/226601 Log: Fix a regression introduced in r226371: When the high part of x*y exactly cancels with z, return the low part of x*y instead of discarding it. Modified: head/lib/msun/src/s_fma.c head/lib/msun/src/s_fmal.c Modified: head/lib/msun/src/s_fma.c ============================================================================== --- head/lib/msun/src/s_fma.c Fri Oct 21 06:30:16 2011 (r226600) +++ head/lib/msun/src/s_fma.c Fri Oct 21 06:30:43 2011 (r226601) @@ -250,6 +250,8 @@ fma(double x, double y, double z) xy = dd_mul(xs, ys); r = dd_add(xy.hi, zs); + spread = ex + ey; + if (r.hi == 0.0) { /* * When the addends cancel to 0, ensure that the result has @@ -257,11 +259,9 @@ fma(double x, double y, double z) */ fesetround(oround); volatile double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs); + return (xy.hi + vzs + ldexp(xy.lo, spread)); } - spread = ex + ey; - if (oround != FE_TONEAREST) { /* * There is no need to worry about double rounding in directed Modified: head/lib/msun/src/s_fmal.c ============================================================================== --- head/lib/msun/src/s_fmal.c Fri Oct 21 06:30:16 2011 (r226600) +++ head/lib/msun/src/s_fmal.c Fri Oct 21 06:30:43 2011 (r226601) @@ -238,6 +238,8 @@ fmal(long double x, long double y, long xy = dd_mul(xs, ys); r = dd_add(xy.hi, zs); + spread = ex + ey; + if (r.hi == 0.0) { /* * When the addends cancel to 0, ensure that the result has @@ -245,11 +247,9 @@ fmal(long double x, long double y, long */ fesetround(oround); volatile long double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs); + return (xy.hi + vzs + ldexpl(xy.lo, spread)); } - spread = ex + ey; - if (oround != FE_TONEAREST) { /* * There is no need to worry about double rounding in directed From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:32:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0F14106567D; Fri, 21 Oct 2011 06:32:54 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B595E8FC19; Fri, 21 Oct 2011 06:32:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6WsPO010139; Fri, 21 Oct 2011 06:32:54 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6Wsoc010137; Fri, 21 Oct 2011 06:32:54 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210632.p9L6Wsoc010137@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226602 - head/tools/regression/lib/msun X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:32:55 -0000 Author: das Date: Fri Oct 21 06:32:54 2011 New Revision: 226602 URL: http://svn.freebsd.org/changeset/base/226602 Log: Tests for cancellation in fma(). Also include more tests for 128-bit long doubles. Thanks for clusteradm (simon) for making the needed hardware available. Modified: head/tools/regression/lib/msun/test-fma.c Modified: head/tools/regression/lib/msun/test-fma.c ============================================================================== --- head/tools/regression/lib/msun/test-fma.c Fri Oct 21 06:30:43 2011 (r226601) +++ head/tools/regression/lib/msun/test-fma.c Fri Oct 21 06:32:54 2011 (r226602) @@ -362,6 +362,65 @@ test_accuracy(void) 0x1.d87da3aafda40p70L, 0x1.d87da3aafda3fp70L, 0x1.d87da3aafda3fp70L, ALL_STD_EXCEPT, FE_INEXACT); #endif + + /* ilogb(x*y) - ilogb(z) = 0 */ + testrnd(fmaf, 0x1.31ad02p+100, 0x1.2fbf7ap-42, -0x1.c3e106p+58, + -0x1.64c27cp+56, -0x1.64c27ap+56, -0x1.64c27cp+56, + -0x1.64c27ap+56, ALL_STD_EXCEPT, FE_INEXACT); + testrnd(fma, 0x1.31ad012ede8aap+100, 0x1.2fbf79c839067p-42, + -0x1.c3e106929056ep+58, -0x1.64c282b970a5fp+56, + -0x1.64c282b970a5ep+56, -0x1.64c282b970a5fp+56, + -0x1.64c282b970a5ep+56, ALL_STD_EXCEPT, FE_INEXACT); +#if LDBL_MANT_DIG == 113 + testrnd(fmal, 0x1.31ad012ede8aa282fa1c19376d16p+100L, + 0x1.2fbf79c839066f0f5c68f6d2e814p-42L, + -0x1.c3e106929056ec19de72bfe64215p+58L, + -0x1.64c282b970a612598fc025ca8cddp+56L, + -0x1.64c282b970a612598fc025ca8cddp+56L, + -0x1.64c282b970a612598fc025ca8cdep+56L, + -0x1.64c282b970a612598fc025ca8cddp+56L, + ALL_STD_EXCEPT, FE_INEXACT); +#elif LDBL_MANT_DIG == 64 + testrnd(fmal, 0x1.31ad012ede8aa4eap+100L, 0x1.2fbf79c839066aeap-42L, + -0x1.c3e106929056e61p+58L, -0x1.64c282b970a60298p+56L, + -0x1.64c282b970a60298p+56L, -0x1.64c282b970a6029ap+56L, + -0x1.64c282b970a60298p+56L, ALL_STD_EXCEPT, FE_INEXACT); +#elif LDBL_MANT_DIG == 53 + testrnd(fmal, 0x1.31ad012ede8aap+100L, 0x1.2fbf79c839067p-42L, + -0x1.c3e106929056ep+58L, -0x1.64c282b970a5fp+56L, + -0x1.64c282b970a5ep+56L, -0x1.64c282b970a5fp+56L, + -0x1.64c282b970a5ep+56L, ALL_STD_EXCEPT, FE_INEXACT); +#endif + + /* x*y (rounded) ~= -z */ + /* XXX spurious inexact exceptions */ + testrnd(fmaf, 0x1.bbffeep-30, -0x1.1d164cp-74, 0x1.ee7296p-104, + -0x1.c46ea8p-128, -0x1.c46ea8p-128, -0x1.c46ea8p-128, + -0x1.c46ea8p-128, ALL_STD_EXCEPT & ~FE_INEXACT, 0); + testrnd(fma, 0x1.bbffeea6fc7d6p-30, 0x1.1d164c6cbf078p-74, + -0x1.ee72993aff948p-104, -0x1.71f72ac7d9d8p-159, + -0x1.71f72ac7d9d8p-159, -0x1.71f72ac7d9d8p-159, + -0x1.71f72ac7d9d8p-159, ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#if LDBL_MANT_DIG == 113 + testrnd(fmal, 0x1.bbffeea6fc7d65927d147f437675p-30L, + 0x1.1d164c6cbf078b7a22607d1cd6a2p-74L, + -0x1.ee72993aff94973876031bec0944p-104L, + 0x1.64e086175b3a2adc36e607058814p-217L, + 0x1.64e086175b3a2adc36e607058814p-217L, + 0x1.64e086175b3a2adc36e607058814p-217L, + 0x1.64e086175b3a2adc36e607058814p-217L, + ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#elif LDBL_MANT_DIG == 64 + testrnd(fmal, 0x1.bbffeea6fc7d6592p-30L, 0x1.1d164c6cbf078b7ap-74L, + -0x1.ee72993aff949736p-104L, 0x1.af190e7a1ee6ad94p-168L, + 0x1.af190e7a1ee6ad94p-168L, 0x1.af190e7a1ee6ad94p-168L, + 0x1.af190e7a1ee6ad94p-168L, ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#elif LDBL_MANT_DIG == 53 + testrnd(fmal, 0x1.bbffeea6fc7d6p-30L, 0x1.1d164c6cbf078p-74L, + -0x1.ee72993aff948p-104L, -0x1.71f72ac7d9d8p-159L, + -0x1.71f72ac7d9d8p-159L, -0x1.71f72ac7d9d8p-159L, + -0x1.71f72ac7d9d8p-159L, ALL_STD_EXCEPT & ~FE_INEXACT, 0); +#endif } static void @@ -407,9 +466,10 @@ test_double_rounding(void) test(fmal, 0x1.4p+0L, 0x1.0000000000000004p+0L, 0x1p-128L, 0x1.4000000000000006p+0L, ALL_STD_EXCEPT, FE_INEXACT); #elif LDBL_MANT_DIG == 113 - /* XXX untested test */ - test(fmal, 0x1.4p+0L, 0x1.0000000000000000000000000002p+0L, 0x1p-224L, - 0x1.4000000000000000000000000003p+0L, ALL_STD_EXCEPT, FE_INEXACT); + test(fmal, 0x1.8000000000000000000000000001p+0L, + 0x1.8000000000000000000000000001p+0L, + -0x1.0000000000000000000000000001p-224L, + 0x1.2000000000000000000000000001p+1L, ALL_STD_EXCEPT, FE_INEXACT); #endif } From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:34:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 691A9106566C; Fri, 21 Oct 2011 06:34:38 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56A5E8FC21; Fri, 21 Oct 2011 06:34:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6YcPM010234; Fri, 21 Oct 2011 06:34:38 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6YcYr010230; Fri, 21 Oct 2011 06:34:38 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210634.p9L6YcYr010230@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226603 - head/tools/regression/lib/msun X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:34:38 -0000 Author: das Date: Fri Oct 21 06:34:38 2011 New Revision: 226603 URL: http://svn.freebsd.org/changeset/base/226603 Log: Tests for complex trig and hyperbolic functions. Added: head/tools/regression/lib/msun/test-ctrig.c (contents, props changed) head/tools/regression/lib/msun/test-ctrig.t (contents, props changed) Modified: head/tools/regression/lib/msun/Makefile Modified: head/tools/regression/lib/msun/Makefile ============================================================================== --- head/tools/regression/lib/msun/Makefile Fri Oct 21 06:32:54 2011 (r226602) +++ head/tools/regression/lib/msun/Makefile Fri Oct 21 06:34:38 2011 (r226603) @@ -1,6 +1,7 @@ # $FreeBSD$ -TESTS= test-cexp test-conj test-csqrt test-exponential test-fenv test-fma \ +TESTS= test-cexp test-conj test-csqrt test-ctrig \ + test-exponential test-fenv test-fma \ test-fmaxmin test-ilogb test-invtrig test-logarithm test-lrint \ test-lround test-nan test-nearbyint test-next test-rem test-trig CFLAGS+= -O0 -lm Added: head/tools/regression/lib/msun/test-ctrig.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/msun/test-ctrig.c Fri Oct 21 06:34:38 2011 (r226603) @@ -0,0 +1,540 @@ +/*- + * Copyright (c) 2008-2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Tests for csin[h](), ccos[h](), and ctan[h](). + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#define ALL_STD_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \ + FE_OVERFLOW | FE_UNDERFLOW) +#define OPT_INVALID (ALL_STD_EXCEPT & ~FE_INVALID) +#define OPT_INEXACT (ALL_STD_EXCEPT & ~FE_INEXACT) +#define FLT_ULP() ldexpl(1.0, 1 - FLT_MANT_DIG) +#define DBL_ULP() ldexpl(1.0, 1 - DBL_MANT_DIG) +#define LDBL_ULP() ldexpl(1.0, 1 - LDBL_MANT_DIG) + +#pragma STDC FENV_ACCESS ON +#pragma STDC CX_LIMITED_RANGE OFF + +/* + * XXX gcc implements complex multiplication incorrectly. In + * particular, it implements it as if the CX_LIMITED_RANGE pragma + * were ON. Consequently, we need this function to form numbers + * such as x + INFINITY * I, since gcc evalutes INFINITY * I as + * NaN + INFINITY * I. + */ +static inline long double complex +cpackl(long double x, long double y) +{ + long double complex z; + + __real__ z = x; + __imag__ z = y; + return (z); +} + +/* Flags that determine whether to check the signs of the result. */ +#define CS_REAL 1 +#define CS_IMAG 2 +#define CS_BOTH (CS_REAL | CS_IMAG) + +#ifdef DEBUG +#define debug(...) printf(__VA_ARGS__) +#else +#define debug(...) (void)0 +#endif + +/* + * Test that a function returns the correct value and sets the + * exception flags correctly. The exceptmask specifies which + * exceptions we should check. We need to be lenient for several + * reasons, but mainly because on some architectures it's impossible + * to raise FE_OVERFLOW without raising FE_INEXACT. + * + * These are macros instead of functions so that assert provides more + * meaningful error messages. + * + * XXX The volatile here is to avoid gcc's bogus constant folding and work + * around the lack of support for the FENV_ACCESS pragma. + */ +#define test_p(func, z, result, exceptmask, excepts, checksign) do { \ + volatile long double complex _d = z; \ + debug(" testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func, \ + creall(_d), cimagl(_d), creall(result), cimagl(result)); \ + assert(feclearexcept(FE_ALL_EXCEPT) == 0); \ + assert(cfpequal((func)(_d), (result), (checksign))); \ + assert(((func), fetestexcept(exceptmask) == (excepts))); \ +} while (0) + +/* + * Test within a given tolerance. The tolerance indicates relative error + * in ulps. If result is 0, however, it measures absolute error in units + * of _EPSILON. + */ +#define test_p_tol(func, z, result, tol) do { \ + volatile long double complex _d = z; \ + debug(" testing %s(%Lg + %Lg I) ~= %Lg + %Lg I\n", #func, \ + creall(_d), cimagl(_d), creall(result), cimagl(result)); \ + assert(cfpequal_tol((func)(_d), (result), (tol))); \ +} while (0) + +/* These wrappers apply the identities f(conj(z)) = conj(f(z)). */ +#define test(func, z, result, exceptmask, excepts, checksign) do { \ + test_p(func, z, result, exceptmask, excepts, checksign); \ + test_p(func, conjl(z), conjl(result), exceptmask, excepts, checksign); \ +} while (0) +#define test_tol(func, z, result, tol) do { \ + test_p_tol(func, z, result, tol); \ + test_p_tol(func, conjl(z), conjl(result), tol); \ +} while (0) + +/* Test the given function in all precisions. */ +#define testall(func, x, result, exceptmask, excepts, checksign) do { \ + test(func, x, result, exceptmask, excepts, checksign); \ + test(func##f, x, result, exceptmask, excepts, checksign); \ +} while (0) +#define testall_odd(func, x, result, exceptmask, excepts, checksign) do { \ + testall(func, x, result, exceptmask, excepts, checksign); \ + testall(func, -x, -result, exceptmask, excepts, checksign); \ +} while (0) +#define testall_even(func, x, result, exceptmask, excepts, checksign) do { \ + testall(func, x, result, exceptmask, excepts, checksign); \ + testall(func, -x, result, exceptmask, excepts, checksign); \ +} while (0) + +/* + * Test the given function in all precisions, within a given tolerance. + * The tolerance is specified in ulps. + */ +#define testall_tol(func, x, result, tol) do { \ + test_tol(func, x, result, tol * DBL_ULP()); \ + test_tol(func##f, x, result, tol * FLT_ULP()); \ +} while (0) +#define testall_odd_tol(func, x, result, tol) do { \ + test_tol(func, x, result, tol * DBL_ULP()); \ + test_tol(func, -x, -result, tol * DBL_ULP()); \ +} while (0) +#define testall_even_tol(func, x, result, tol) do { \ + test_tol(func, x, result, tol * DBL_ULP()); \ + test_tol(func, -x, result, tol * DBL_ULP()); \ +} while (0) + +/* + * Determine whether x and y are equal, with two special rules: + * +0.0 != -0.0 + * NaN == NaN + * If checksign is 0, we compare the absolute values instead. + */ +static int +fpequal(long double x, long double y, int checksign) +{ + if (isnan(x) && isnan(y)) + return (1); + if (checksign) + return (x == y && !signbit(x) == !signbit(y)); + else + return (fabsl(x) == fabsl(y)); +} + +static int +fpequal_tol(long double x, long double y, long double tol) +{ + fenv_t env; + int ret; + + if (isnan(x) && isnan(y)) + return (1); + if (!signbit(x) != !signbit(y) && tol == 0) + return (0); + if (x == y) + return (1); + if (tol == 0) + return (0); + + /* Hard case: need to check the tolerance. */ + feholdexcept(&env); + /* + * For our purposes here, if y=0, we interpret tol as an absolute + * tolerance. This is to account for roundoff in the input, e.g., + * cos(Pi/2) ~= 0. + */ + if (y == 0.0) + ret = fabsl(x - y) <= fabsl(tol); + else + ret = fabsl(x - y) <= fabsl(y * tol); + fesetenv(&env); + return (ret); +} + +static int +cfpequal(long double complex x, long double complex y, int checksign) +{ + return (fpequal(creal(x), creal(y), checksign & CS_REAL) + && fpequal(cimag(x), cimag(y), checksign & CS_IMAG)); +} + +static int +cfpequal_tol(long double complex x, long double complex y, long double tol) +{ + return (fpequal_tol(creal(x), creal(y), tol) + && fpequal_tol(cimag(x), cimag(y), tol)); +} + + +/* Tests for 0 */ +void +test_zero(void) +{ + long double complex zero = cpackl(0.0, 0.0); + + /* csinh(0) = ctanh(0) = 0; ccosh(0) = 1 (no exceptions raised) */ + testall_odd(csinh, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); + testall_odd(csin, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); + testall_even(ccosh, zero, 1.0, ALL_STD_EXCEPT, 0, CS_BOTH); + testall_even(ccos, zero, cpackl(1.0, -0.0), ALL_STD_EXCEPT, 0, CS_BOTH); + testall_odd(ctanh, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); + testall_odd(ctan, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); +} + +/* + * Tests for NaN inputs. + */ +void +test_nan() +{ + long double complex nan_nan = cpackl(NAN, NAN); + long double complex z; + + /* + * IN CSINH CCOSH CTANH + * NaN,NaN NaN,NaN NaN,NaN NaN,NaN + * finite,NaN NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] + * NaN,finite NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] + * NaN,Inf NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] + * Inf,NaN +-Inf,NaN Inf,NaN 1,+-0 + * 0,NaN +-0,NaN NaN,+-0 NaN,NaN [inval] + * NaN,0 NaN,0 NaN,+-0 NaN,0 + */ + z = nan_nan; + testall_odd(csinh, z, nan_nan, ALL_STD_EXCEPT, 0, 0); + testall_even(ccosh, z, nan_nan, ALL_STD_EXCEPT, 0, 0); + testall_odd(ctanh, z, nan_nan, ALL_STD_EXCEPT, 0, 0); + testall_odd(csin, z, nan_nan, ALL_STD_EXCEPT, 0, 0); + testall_even(ccos, z, nan_nan, ALL_STD_EXCEPT, 0, 0); + testall_odd(ctan, z, nan_nan, ALL_STD_EXCEPT, 0, 0); + + z = cpackl(42, NAN); + testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0); + testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0); + /* XXX We allow a spurious inexact exception here. */ + testall_odd(ctanh, z, nan_nan, OPT_INVALID & ~FE_INEXACT, 0, 0); + testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0); + testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); + + z = cpackl(NAN, 42); + testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0); + testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0); + testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0); + /* XXX We allow a spurious inexact exception here. */ + testall_odd(ctan, z, nan_nan, OPT_INVALID & ~FE_INEXACT, 0, 0); + + z = cpackl(NAN, INFINITY); + testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0); + testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(csin, z, cpackl(NAN, INFINITY), ALL_STD_EXCEPT, 0, 0); + testall_even(ccos, z, cpackl(INFINITY, NAN), ALL_STD_EXCEPT, 0, + CS_IMAG); + testall_odd(ctan, z, cpackl(0, 1), ALL_STD_EXCEPT, 0, CS_IMAG); + + z = cpackl(INFINITY, NAN); + testall_odd(csinh, z, cpackl(INFINITY, NAN), ALL_STD_EXCEPT, 0, 0); + testall_even(ccosh, z, cpackl(INFINITY, NAN), ALL_STD_EXCEPT, 0, + CS_REAL); + testall_odd(ctanh, z, cpackl(1, 0), ALL_STD_EXCEPT, 0, CS_REAL); + testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0); + testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); + + z = cpackl(0, NAN); + testall_odd(csinh, z, cpackl(0, NAN), ALL_STD_EXCEPT, 0, 0); + testall_even(ccosh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0); + testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(csin, z, cpackl(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL); + testall_even(ccos, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0); + testall_odd(ctan, z, cpackl(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL); + + z = cpackl(NAN, 0); + testall_odd(csinh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG); + testall_even(ccosh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0); + testall_odd(ctanh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG); + testall_odd(csin, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0); + testall_even(ccos, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0); + testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); +} + +void +test_inf(void) +{ + static const long double finites[] = { + 0, M_PI / 4, 3 * M_PI / 4, 5 * M_PI / 4, + }; + long double complex z, c, s; + int i; + + /* + * IN CSINH CCOSH CTANH + * Inf,Inf +-Inf,NaN inval +-Inf,NaN inval 1,+-0 + * Inf,finite Inf cis(finite) Inf cis(finite) 1,0 sin(2 finite) + * 0,Inf +-0,NaN inval NaN,+-0 inval NaN,NaN inval + * finite,Inf NaN,NaN inval NaN,NaN inval NaN,NaN inval + */ + z = cpackl(INFINITY, INFINITY); + testall_odd(csinh, z, cpackl(INFINITY, NAN), + ALL_STD_EXCEPT, FE_INVALID, 0); + testall_even(ccosh, z, cpackl(INFINITY, NAN), + ALL_STD_EXCEPT, FE_INVALID, 0); + testall_odd(ctanh, z, cpackl(1, 0), ALL_STD_EXCEPT, 0, CS_REAL); + testall_odd(csin, z, cpackl(NAN, INFINITY), + ALL_STD_EXCEPT, FE_INVALID, 0); + testall_even(ccos, z, cpackl(INFINITY, NAN), + ALL_STD_EXCEPT, FE_INVALID, 0); + testall_odd(ctan, z, cpackl(0, 1), ALL_STD_EXCEPT, 0, CS_REAL); + + /* XXX We allow spurious inexact exceptions here (hard to avoid). */ + for (i = 0; i < sizeof(finites) / sizeof(finites[0]); i++) { + z = cpackl(INFINITY, finites[i]); + c = INFINITY * cosl(finites[i]); + s = finites[i] == 0 ? finites[i] : INFINITY * sinl(finites[i]); + testall_odd(csinh, z, cpackl(c, s), OPT_INEXACT, 0, CS_BOTH); + testall_even(ccosh, z, cpackl(c, s), OPT_INEXACT, 0, CS_BOTH); + testall_odd(ctanh, z, cpackl(1, 0 * sin(finites[i] * 2)), + OPT_INEXACT, 0, CS_BOTH); + z = cpackl(finites[i], INFINITY); + testall_odd(csin, z, cpackl(s, c), OPT_INEXACT, 0, CS_BOTH); + testall_even(ccos, z, cpackl(c, -s), OPT_INEXACT, 0, CS_BOTH); + testall_odd(ctan, z, cpackl(0 * sin(finites[i] * 2), 1), + OPT_INEXACT, 0, CS_BOTH); + } + + z = cpackl(0, INFINITY); + testall_odd(csinh, z, cpackl(0, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_even(ccosh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_odd(ctanh, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + z = cpackl(INFINITY, 0); + testall_odd(csin, z, cpackl(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_even(ccos, z, cpackl(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_odd(ctan, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + + z = cpackl(42, INFINITY); + testall_odd(csinh, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_even(ccosh, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + /* XXX We allow a spurious inexact exception here. */ + testall_odd(ctanh, z, cpackl(NAN, NAN), OPT_INEXACT, FE_INVALID, 0); + z = cpackl(INFINITY, 42); + testall_odd(csin, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_even(ccos, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + /* XXX We allow a spurious inexact exception here. */ + testall_odd(ctan, z, cpackl(NAN, NAN), OPT_INEXACT, FE_INVALID, 0); +} + +/* Tests along the real and imaginary axes. */ +void +test_axes(void) +{ + static const long double nums[] = { + M_PI / 4, M_PI / 2, 3 * M_PI / 4, + 5 * M_PI / 4, 3 * M_PI / 2, 7 * M_PI / 4, + }; + long double complex z; + int i; + + for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) { + /* Real axis */ + z = cpackl(nums[i], 0.0); + testall_odd_tol(csinh, z, cpackl(sinh(nums[i]), 0), 0); + testall_even_tol(ccosh, z, cpackl(cosh(nums[i]), 0), 0); + testall_odd_tol(ctanh, z, cpackl(tanh(nums[i]), 0), 1); + testall_odd_tol(csin, z, cpackl(sin(nums[i]), + copysign(0, cos(nums[i]))), 0); + testall_even_tol(ccos, z, cpackl(cos(nums[i]), + -copysign(0, sin(nums[i]))), 0); + testall_odd_tol(ctan, z, cpackl(tan(nums[i]), 0), 1); + + /* Imaginary axis */ + z = cpackl(0.0, nums[i]); + testall_odd_tol(csinh, z, cpackl(copysign(0, cos(nums[i])), + sin(nums[i])), 0); + testall_even_tol(ccosh, z, cpackl(cos(nums[i]), + copysign(0, sin(nums[i]))), 0); + testall_odd_tol(ctanh, z, cpackl(0, tan(nums[i])), 1); + testall_odd_tol(csin, z, cpackl(0, sinh(nums[i])), 0); + testall_even_tol(ccos, z, cpackl(cosh(nums[i]), -0.0), 0); + testall_odd_tol(ctan, z, cpackl(0, tanh(nums[i])), 1); + } +} + +void +test_small(void) +{ + /* + * z = 0.5 + i Pi/4 + * sinh(z) = (sinh(0.5) + i cosh(0.5)) * sqrt(2)/2 + * cosh(z) = (cosh(0.5) + i sinh(0.5)) * sqrt(2)/2 + * tanh(z) = (2cosh(0.5)sinh(0.5) + i) / (2 cosh(0.5)**2 - 1) + * z = -0.5 + i Pi/2 + * sinh(z) = cosh(0.5) + * cosh(z) = -i sinh(0.5) + * tanh(z) = -coth(0.5) + * z = 1.0 + i 3Pi/4 + * sinh(z) = (-sinh(1) + i cosh(1)) * sqrt(2)/2 + * cosh(z) = (-cosh(1) + i sinh(1)) * sqrt(2)/2 + * tanh(z) = (2cosh(1)sinh(1) - i) / (2cosh(1)**2 - 1) + */ + static const struct { + long double a, b; + long double sinh_a, sinh_b; + long double cosh_a, cosh_b; + long double tanh_a, tanh_b; + } tests[] = { + { 0.5L, + 0.78539816339744830961566084581987572L, + 0.36847002415910435172083660522240710L, + 0.79735196663945774996093142586179334L, + 0.79735196663945774996093142586179334L, + 0.36847002415910435172083660522240710L, + 0.76159415595576488811945828260479359L, + 0.64805427366388539957497735322615032L }, + { -0.5L, + 1.57079632679489661923132169163975144L, + 0.0L, + 1.12762596520638078522622516140267201L, + 0.0L, + -0.52109530549374736162242562641149156L, + -2.16395341373865284877000401021802312L, + 0.0L }, + { 1.0L, + 2.35619449019234492884698253745962716L, + -0.83099273328405698212637979852748608L, + 1.09112278079550143030545602018565236L, + -1.09112278079550143030545602018565236L, + 0.83099273328405698212637979852748609L, + 0.96402758007581688394641372410092315L, + -0.26580222883407969212086273981988897L } + }; + long double complex z; + int i; + + for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { + z = cpackl(tests[i].a, tests[i].b); + testall_odd_tol(csinh, z, + cpackl(tests[i].sinh_a, tests[i].sinh_b), 1.1); + testall_even_tol(ccosh, z, + cpackl(tests[i].cosh_a, tests[i].cosh_b), 1.1); + testall_odd_tol(ctanh, z, + cpackl(tests[i].tanh_a, tests[i].tanh_b), 1.1); + } +} + +/* Test inputs that might cause overflow in a sloppy implementation. */ +void +test_large(void) +{ + long double complex z; + + /* tanh() uses a threshold around x=22, so check both sides. */ + z = cpackl(21, 0.78539816339744830961566084581987572L); + testall_odd_tol(ctanh, z, + cpackl(1.0, 1.14990445285871196133287617611468468e-18L), 1); + z++; + testall_odd_tol(ctanh, z, + cpackl(1.0, 1.55622644822675930314266334585597964e-19L), 1); + + z = cpackl(355, 0.78539816339744830961566084581987572L); + testall_odd_tol(ctanh, z, + cpackl(1.0, 8.95257245135025991216632140458264468e-309L), 1); + z = cpackl(30, 0x1p1023L); + testall_odd_tol(ctanh, z, + cpackl(1.0, -1.62994325413993477997492170229268382e-26L), 1); + z = cpackl(1, 0x1p1023L); + testall_odd_tol(ctanh, z, + cpackl(0.878606311888306869546254022621986509L, + -0.225462792499754505792678258169527424L), 1); + + z = cpackl(710.6, 0.78539816339744830961566084581987572L); + testall_odd_tol(csinh, z, + cpackl(1.43917579766621073533185387499658944e308L, + 1.43917579766621073533185387499658944e308L), 1); + testall_even_tol(ccosh, z, + cpackl(1.43917579766621073533185387499658944e308L, + 1.43917579766621073533185387499658944e308L), 1); + + z = cpackl(1500, 0.78539816339744830961566084581987572L); + testall_odd(csinh, z, cpackl(INFINITY, INFINITY), OPT_INEXACT, + FE_OVERFLOW, CS_BOTH); + testall_even(ccosh, z, cpackl(INFINITY, INFINITY), OPT_INEXACT, + FE_OVERFLOW, CS_BOTH); +} + +int +main(int argc, char *argv[]) +{ + + printf("1..6\n"); + + test_zero(); + printf("ok 1 - ctrig zero\n"); + + test_nan(); + printf("ok 2 - ctrig nan\n"); + + test_inf(); + printf("ok 3 - ctrig inf\n"); + + test_axes(); + printf("ok 4 - ctrig axes\n"); + + test_small(); + printf("ok 5 - ctrig small\n"); + + test_large(); + printf("ok 6 - ctrig large\n"); + + return (0); +} Added: head/tools/regression/lib/msun/test-ctrig.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/msun/test-ctrig.t Fri Oct 21 06:34:38 2011 (r226603) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:35:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C36F21065715; Fri, 21 Oct 2011 06:35:58 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B228E8FC19; Fri, 21 Oct 2011 06:35:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6ZwJj010315; Fri, 21 Oct 2011 06:35:58 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6Zw2o010312; Fri, 21 Oct 2011 06:35:58 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210635.p9L6Zw2o010312@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226604 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:35:58 -0000 Author: das Date: Fri Oct 21 06:35:58 2011 New Revision: 226604 URL: http://svn.freebsd.org/changeset/base/226604 Log: Add support for the 'x' mode option in fopen() as specified in the C1X draft standard. The option is equivalent to O_EXCL. MFC after: 1 month Modified: head/lib/libc/stdio/flags.c head/lib/libc/stdio/fopen.3 Modified: head/lib/libc/stdio/flags.c ============================================================================== --- head/lib/libc/stdio/flags.c Fri Oct 21 06:34:38 2011 (r226603) +++ head/lib/libc/stdio/flags.c Fri Oct 21 06:35:58 2011 (r226604) @@ -80,11 +80,30 @@ __sflags(mode, optr) return (0); } - /* [rwa]\+ or [rwa]b\+ means read and write */ - if (*mode == '+' || (*mode == 'b' && mode[1] == '+')) { + /* 'b' (binary) is ignored */ + if (*mode == 'b') + mode++; + + /* [rwa][b]\+ means read and write */ + if (*mode == '+') { + mode++; ret = __SRW; m = O_RDWR; } + + /* 'b' (binary) can appear here, too -- and is ignored again */ + if (*mode == 'b') + mode++; + + /* 'x' means exclusive (fail if the file exists) */ + if (*mode == 'x') { + if (m == O_RDONLY) { + errno = EINVAL; + return (0); + } + o |= O_EXCL; + } + *optr = m | o; return (ret); } Modified: head/lib/libc/stdio/fopen.3 ============================================================================== --- head/lib/libc/stdio/fopen.3 Fri Oct 21 06:34:38 2011 (r226603) +++ head/lib/libc/stdio/fopen.3 Fri Oct 21 06:35:58 2011 (r226604) @@ -32,7 +32,7 @@ .\" @(#)fopen.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 26, 2003 +.Dd October 17, 2011 .Dt FOPEN 3 .Os .Sh NAME @@ -60,45 +60,51 @@ and associates a stream with it. .Pp The argument .Fa mode -points to a string beginning with one of the following -sequences (Additional characters may follow these sequences.): +points to a string beginning with one of the following letters: .Bl -tag -width indent .It Dq Li r -Open text file for reading. -The stream is positioned at the beginning of the file. -.It Dq Li r+ -Open for reading and writing. +Open for reading. The stream is positioned at the beginning of the file. +Fail if the file does not exist. .It Dq Li w -Truncate to zero length or create text file for writing. -The stream is positioned at the beginning of the file. -.It Dq Li w+ -Open for reading and writing. -The file is created if it does not exist, otherwise it is truncated. +Open for writing. The stream is positioned at the beginning of the file. +Create the file if it does not exist. .It Dq Li a Open for writing. -The file is created if it does not exist. -The stream is positioned at the end of the file. -Subsequent writes to the file will always end up at the then current -end of file, irrespective of any intervening -.Xr fseek 3 -or similar. -.It Dq Li a+ -Open for reading and writing. -The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening .Xr fseek 3 or similar. +Create the file if it does not exist. .El .Pp +An optional +.Dq Li + +following +.Dq Li r , +.Dq Li w , +or +.Dq Li a +opens the file for both reading and writing. +An optional +.Dq Li x +following +.Dq Li w +or +.Dq Li w+ +causes the +.Fn fopen +call to fail if the file already exists. +.Pp The .Fa mode -string can also include the letter ``b'' either as last character or -as a character between the characters in any of the two-character strings -described above. +string can also include the letter +.Dq Li b +after either the +.Dq Li + +or the first letter. This is strictly for compatibility with .St -isoC and has no effect; the ``b'' is ignored. @@ -135,6 +141,9 @@ function associates a stream with the ex .Fa fildes . The mode of the stream must be compatible with the mode of the file descriptor. +The +.Dq Li x +mode option is ignored. When the stream is closed via .Xr fclose 3 , .Fa fildes @@ -165,29 +174,12 @@ attempts to re-open the file associated with a new mode. The new mode must be compatible with the mode that the stream was originally opened with: -.Bl -bullet -offset indent -.It -Streams originally opened with mode -.Dq Li r -can only be reopened with that same mode. -.It -Streams originally opened with mode -.Dq Li a -can be reopened with the same mode, or mode -.Dq Li w . -.It -Streams originally opened with mode -.Dq Li w -can be reopened with the same mode, or mode -.Dq Li a . -.It -Streams originally opened with mode -.Dq Li r+ , -.Dq Li w+ , -or -.Dq Li a+ -can be reopened with any mode. -.El +Streams open for reading can only be re-opened for reading, +streams open for writing can only be re-opened for writing, +and streams open for reading and writing can be re-opened in any mode. +The +.Dq Li x +mode option is not meaningful in this context. .Pp The primary use of the .Fn freopen From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:36:40 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0BE2106566C; Fri, 21 Oct 2011 06:36:40 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF4A38FC1B; Fri, 21 Oct 2011 06:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6aeou010372; Fri, 21 Oct 2011 06:36:40 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6aeqq010370; Fri, 21 Oct 2011 06:36:40 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210636.p9L6aeqq010370@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226605 - head/tools/regression/lib/msun X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:36:40 -0000 Author: das Date: Fri Oct 21 06:36:40 2011 New Revision: 226605 URL: http://svn.freebsd.org/changeset/base/226605 Log: Add regression tests for modf{,f,l}(). Modified: head/tools/regression/lib/msun/test-nearbyint.c Modified: head/tools/regression/lib/msun/test-nearbyint.c ============================================================================== --- head/tools/regression/lib/msun/test-nearbyint.c Fri Oct 21 06:35:58 2011 (r226604) +++ head/tools/regression/lib/msun/test-nearbyint.c Fri Oct 21 06:36:40 2011 (r226605) @@ -30,7 +30,6 @@ * TODO: * - adapt tests for rint(3) * - tests for harder values (more mantissa bits than float) - * - tests in other rounding modes */ #include @@ -44,6 +43,27 @@ __FBSDID("$FreeBSD$"); #define ALL_STD_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \ FE_OVERFLOW | FE_UNDERFLOW) +static int testnum; + +static const int rmodes[] = { + FE_TONEAREST, FE_DOWNWARD, FE_UPWARD, FE_TOWARDZERO, +}; + +static const struct { + float in; + float out[3]; /* one answer per rounding mode except towardzero */ +} tests[] = { +/* input output (expected) */ + { 0.0, { 0.0, 0.0, 0.0 }}, + { 0.5, { 0.0, 0.0, 1.0 }}, + { M_PI, { 3.0, 3.0, 4.0 }}, + { 65536.5, { 65536, 65536, 65537 }}, + { INFINITY, { INFINITY, INFINITY, INFINITY }}, + { NAN, { NAN, NAN, NAN }}, +}; + +static const int ntests = sizeof(tests) / sizeof(tests[0]); + /* * Compare d1 and d2 using special rules: NaN == NaN and +0 != -0. * Fail an assertion if they differ. @@ -57,44 +77,106 @@ fpequal(long double d1, long double d2) return (copysignl(1.0, d1) == copysignl(1.0, d2)); } -static void testit(int testnum, float in, float out) +/* Get the appropriate result for the current rounding mode. */ +static float +get_output(int testindex, int rmodeindex, int negative) { + double out; - feclearexcept(ALL_STD_EXCEPT); - assert(fpequal(out, nearbyintf(in))); - assert(fpequal(-out, nearbyintf(-in))); - assert(fetestexcept(ALL_STD_EXCEPT) == 0); - - assert(fpequal(out, nearbyint(in))); - assert(fpequal(-out, nearbyint(-in))); - assert(fetestexcept(ALL_STD_EXCEPT) == 0); - - assert(fpequal(out, nearbyintl(in))); - assert(fpequal(-out, nearbyintl(-in))); - assert(fetestexcept(ALL_STD_EXCEPT) == 0); + if (negative) { /* swap downwards and upwards if input is negative */ + if (rmodeindex == 1) + rmodeindex = 2; + else if (rmodeindex == 2) + rmodeindex = 1; + } + if (rmodeindex == 3) /* FE_TOWARDZERO uses the value for downwards */ + rmodeindex = 1; + out = tests[testindex].out[rmodeindex]; + return (negative ? -out : out); +} - printf("ok %d\t\t# nearbyint(%g)\n", testnum, in); +static void +test_nearby(int testindex) +{ + float in, out; + int i; + + for (i = 0; i < sizeof(rmodes) / sizeof(rmodes[0]); i++) { + fesetround(rmodes[i]); + feclearexcept(ALL_STD_EXCEPT); + + in = tests[testindex].in; + out = get_output(testindex, i, 0); + assert(fpequal(out, nearbyintf(in))); + assert(fpequal(out, nearbyint(in))); + assert(fpequal(out, nearbyintl(in))); + assert(fetestexcept(ALL_STD_EXCEPT) == 0); + + in = -tests[testindex].in; + out = get_output(testindex, i, 1); + assert(fpequal(out, nearbyintf(in))); + assert(fpequal(out, nearbyint(in))); + assert(fpequal(out, nearbyintl(in))); + assert(fetestexcept(ALL_STD_EXCEPT) == 0); + } + + printf("ok %d\t\t# nearbyint(+%g)\n", testnum++, in); } -static const float tests[] = { -/* input output (expected) */ - 0.0, 0.0, - 0.5, 0.0, - M_PI, 3, - 65536.5, 65536, - INFINITY, INFINITY, - NAN, NAN, -}; +static void +test_modf(int testindex) +{ + float in, out; + float ipartf, ipart_expected; + double ipart; + long double ipartl; + int i; + + for (i = 0; i < sizeof(rmodes) / sizeof(rmodes[0]); i++) { + fesetround(rmodes[i]); + feclearexcept(ALL_STD_EXCEPT); + + in = tests[testindex].in; + ipart_expected = tests[testindex].out[1]; + out = copysignf( + isinf(ipart_expected) ? 0.0 : in - ipart_expected, in); + ipartl = ipart = ipartf = 42.0; + + assert(fpequal(out, modff(in, &ipartf))); + assert(fpequal(ipart_expected, ipartf)); + assert(fpequal(out, modf(in, &ipart))); + assert(fpequal(ipart_expected, ipart)); + assert(fpequal(out, modfl(in, &ipartl))); + assert(fpequal(ipart_expected, ipartl)); + assert(fetestexcept(ALL_STD_EXCEPT) == 0); + + in = -in; + ipart_expected = -ipart_expected; + out = -out; + ipartl = ipart = ipartf = 42.0; + assert(fpequal(out, modff(in, &ipartf))); + assert(fpequal(ipart_expected, ipartf)); + assert(fpequal(out, modf(in, &ipart))); + assert(fpequal(ipart_expected, ipart)); + assert(fpequal(out, modfl(in, &ipartl))); + assert(fpequal(ipart_expected, ipartl)); + assert(fetestexcept(ALL_STD_EXCEPT) == 0); + } + + printf("ok %d\t\t# modf(+%g)\n", testnum++, in); +} int main(int argc, char *argv[]) { - static const int ntests = sizeof(tests) / sizeof(tests[0]) / 2; int i; - printf("1..%d\n", ntests); - for (i = 0; i < ntests; i++) - testit(i + 1, tests[i * 2], tests[i * 2 + 1]); + printf("1..%d\n", ntests * 2); + testnum = 1; + for (i = 0; i < ntests; i++) { + test_nearby(i); + test_modf(i); + } return (0); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:40:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53CF91065675; Fri, 21 Oct 2011 06:40:37 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FCAA8FC16; Fri, 21 Oct 2011 06:40:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6ebL5010614; Fri, 21 Oct 2011 06:40:37 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6eaeC010594; Fri, 21 Oct 2011 06:40:36 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210640.p9L6eaeC010594@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226606 - in head/lib/libc: amd64 amd64/gen arm arm/gen gen i386 i386/gen ia64 ia64/gen mips mips/gen powerpc powerpc/gen powerpc64 powerpc64/gen sparc64 sparc64/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:40:37 -0000 Author: das Date: Fri Oct 21 06:40:36 2011 New Revision: 226606 URL: http://svn.freebsd.org/changeset/base/226606 Log: Replace a proliferation of buggy MD implementations of modf() with a working MI one. The MI one only needs to be overridden on machines with non-IEEE754 arithmetic. (The last supported one was the VAX.) It can also be overridden if someone comes up with a faster one that actually passes the regression tests -- but this is harder than it sounds. Added: head/lib/libc/gen/modf.c - copied, changed from r226410, head/lib/msun/src/s_modf.c Deleted: head/lib/libc/amd64/gen/modf.S head/lib/libc/arm/gen/modf.c head/lib/libc/i386/gen/modf.S head/lib/libc/ia64/gen/modf.c head/lib/libc/mips/gen/modf.S head/lib/libc/mips/gen/modf.c head/lib/libc/powerpc/gen/modf.c head/lib/libc/powerpc64/gen/modf.c head/lib/libc/sparc64/gen/modf.S Modified: head/lib/libc/amd64/Symbol.map head/lib/libc/amd64/gen/Makefile.inc head/lib/libc/arm/Symbol.map head/lib/libc/arm/gen/Makefile.inc head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/i386/Symbol.map head/lib/libc/i386/gen/Makefile.inc head/lib/libc/ia64/Symbol.map head/lib/libc/ia64/gen/Makefile.inc head/lib/libc/mips/Symbol.map head/lib/libc/mips/gen/Makefile.inc head/lib/libc/powerpc/Symbol.map head/lib/libc/powerpc/gen/Makefile.inc head/lib/libc/powerpc64/Symbol.map head/lib/libc/powerpc64/gen/Makefile.inc head/lib/libc/sparc64/Symbol.map head/lib/libc/sparc64/gen/Makefile.inc Modified: head/lib/libc/amd64/Symbol.map ============================================================================== --- head/lib/libc/amd64/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/amd64/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -26,7 +26,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - modf; rfork_thread; setjmp; longjmp; Modified: head/lib/libc/amd64/gen/Makefile.inc ============================================================================== --- head/lib/libc/amd64/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/amd64/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -2,7 +2,7 @@ # $FreeBSD$ SRCS+= _setjmp.S _set_tp.c rfork_thread.S setjmp.S sigsetjmp.S \ - fabs.S modf.S \ + fabs.S \ infinity.c ldexp.c makecontext.c signalcontext.c \ flt_rounds.c fpgetmask.c fpsetmask.c fpgetprec.c fpsetprec.c \ fpgetround.c fpsetround.c fpgetsticky.c Modified: head/lib/libc/arm/Symbol.map ============================================================================== --- head/lib/libc/arm/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/arm/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -19,7 +19,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - modf; setjmp; longjmp; sigsetjmp; Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/arm/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -2,5 +2,5 @@ # $FreeBSD$ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ - infinity.c ldexp.c makecontext.c modf.c \ + infinity.c ldexp.c makecontext.c \ setjmp.S signalcontext.c sigsetjmp.S divsi3.S Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -35,6 +35,8 @@ SRCS+= __getosreldate.c __xuname.c \ usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \ wordexp.c +MISRCS+=modf.c + CANCELPOINTS_SRCS=sem.c sem_new.c .for src in ${CANCELPOINTS_SRCS} SRCS+=cancelpoints_${src} Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/gen/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -213,6 +213,7 @@ FBSD_1.0 { ldexp; lockf; lrand48; + modf; mrand48; nftw; nice; Copied and modified: head/lib/libc/gen/modf.c (from r226410, head/lib/msun/src/s_modf.c) ============================================================================== --- head/lib/msun/src/s_modf.c Sat Oct 15 23:15:55 2011 (r226410, copy source) +++ head/lib/libc/gen/modf.c Fri Oct 21 06:40:36 2011 (r226606) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); /* * modf(double x, double *iptr) @@ -24,8 +23,68 @@ static char rcsid[] = "$FreeBSD$"; * No exception. */ -#include "math.h" -#include "math_private.h" +#include +#include +#include + +/* Bit fiddling routines copied from msun/src/math_private.h,v 1.15 */ + +#if BYTE_ORDER == BIG_ENDIAN + +typedef union +{ + double value; + struct + { + u_int32_t msw; + u_int32_t lsw; + } parts; +} ieee_double_shape_type; + +#endif + +#if BYTE_ORDER == LITTLE_ENDIAN + +typedef union +{ + double value; + struct + { + u_int32_t lsw; + u_int32_t msw; + } parts; +} ieee_double_shape_type; + +#endif + +/* Get two 32 bit ints from a double. */ + +#define EXTRACT_WORDS(ix0,ix1,d) \ +do { \ + ieee_double_shape_type ew_u; \ + ew_u.value = (d); \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ +} while (0) + +/* Get the more significant 32 bit int from a double. */ + +#define GET_HIGH_WORD(i,d) \ +do { \ + ieee_double_shape_type gh_u; \ + gh_u.value = (d); \ + (i) = gh_u.parts.msw; \ +} while (0) + +/* Set a double from two 32 bit ints. */ + +#define INSERT_WORDS(d,ix0,ix1) \ +do { \ + ieee_double_shape_type iw_u; \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ +} while (0) static const double one = 1.0; Modified: head/lib/libc/i386/Symbol.map ============================================================================== --- head/lib/libc/i386/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/i386/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -20,7 +20,6 @@ FBSD_1.0 { __nan; __infinity; makecontext; - modf; rfork_thread; setjmp; longjmp; Modified: head/lib/libc/i386/gen/Makefile.inc ============================================================================== --- head/lib/libc/i386/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/i386/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -2,5 +2,5 @@ # $FreeBSD$ SRCS+= _ctx_start.S _setjmp.S _set_tp.c fabs.S \ - flt_rounds.c infinity.c ldexp.c makecontext.c modf.S \ + flt_rounds.c infinity.c ldexp.c makecontext.c \ rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S Modified: head/lib/libc/ia64/Symbol.map ============================================================================== --- head/lib/libc/ia64/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/ia64/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -23,7 +23,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - modf; setjmp; longjmp; sigsetjmp; Modified: head/lib/libc/ia64/gen/Makefile.inc ============================================================================== --- head/lib/libc/ia64/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/ia64/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -3,7 +3,7 @@ SRCS+= __divdf3.S __divdi3.S __divsf3.S __divsi3.S __moddi3.S __modsi3.S \ __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S _mcount.S _set_tp.c \ _setjmp.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c fpsetmask.c \ - fpsetround.c infinity.c ldexp.c makecontext.c modf.c setjmp.S \ + fpsetround.c infinity.c ldexp.c makecontext.c setjmp.S \ signalcontext.c sigsetjmp.S # The following may go away if function _Unwind_FindTableEntry() Modified: head/lib/libc/mips/Symbol.map ============================================================================== --- head/lib/libc/mips/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/mips/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -18,7 +18,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - modf; setjmp; longjmp; sigsetjmp; Modified: head/lib/libc/mips/gen/Makefile.inc ============================================================================== --- head/lib/libc/mips/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/mips/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -1,7 +1,7 @@ # $NetBSD: Makefile.inc,v 1.27 2005/10/07 17:16:40 tsutsui Exp $ # $FreeBSD$ -SRCS+= infinity.c fabs.c ldexp.c modf.c +SRCS+= infinity.c fabs.c ldexp.c # SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ # fpsetround.c fpsetsticky.c Modified: head/lib/libc/powerpc/Symbol.map ============================================================================== --- head/lib/libc/powerpc/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/powerpc/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -24,7 +24,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - modf; setjmp; longjmp; sigsetjmp; Modified: head/lib/libc/powerpc/gen/Makefile.inc ============================================================================== --- head/lib/libc/powerpc/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/powerpc/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -2,7 +2,7 @@ SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ fpgetsticky.c fpsetmask.c fpsetround.c \ - infinity.c ldexp.c makecontext.c modf.c _setjmp.S \ + infinity.c ldexp.c makecontext.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ _set_tp.c Modified: head/lib/libc/powerpc64/Symbol.map ============================================================================== --- head/lib/libc/powerpc64/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/powerpc64/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -24,7 +24,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - modf; setjmp; longjmp; sigsetjmp; Modified: head/lib/libc/powerpc64/gen/Makefile.inc ============================================================================== --- head/lib/libc/powerpc64/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/powerpc64/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -2,7 +2,7 @@ SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ fpgetsticky.c fpsetmask.c fpsetround.c \ - infinity.c ldexp.c makecontext.c modf.c _setjmp.S \ + infinity.c ldexp.c makecontext.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ _set_tp.c Modified: head/lib/libc/sparc64/Symbol.map ============================================================================== --- head/lib/libc/sparc64/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/sparc64/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -24,7 +24,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - modf; setjmp; longjmp; sigsetjmp; Modified: head/lib/libc/sparc64/gen/Makefile.inc ============================================================================== --- head/lib/libc/sparc64/gen/Makefile.inc Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/sparc64/gen/Makefile.inc Fri Oct 21 06:40:36 2011 (r226606) @@ -2,5 +2,5 @@ SRCS+= _ctx_start.S _setjmp.S fabs.S fixunsdfsi.S flt_rounds.c fpgetmask.c \ fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c \ - infinity.c ldexp.c makecontext.c modf.S \ + infinity.c ldexp.c makecontext.c \ signalcontext.c setjmp.S sigsetjmp.S _set_tp.c From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 06:41:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E59F1065674; Fri, 21 Oct 2011 06:41:47 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B5DC8FC0A; Fri, 21 Oct 2011 06:41:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6fl60010701; Fri, 21 Oct 2011 06:41:47 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6fkuC010692; Fri, 21 Oct 2011 06:41:46 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210641.p9L6fkuC010692@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226607 - in head: include sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/powerpc/include sys/sparc64/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:41:47 -0000 Author: das Date: Fri Oct 21 06:41:46 2011 New Revision: 226607 URL: http://svn.freebsd.org/changeset/base/226607 Log: People porting FreeBSD to new architectures ought not have to implement a deprecated FPU control interface in addition to the standard one. To make this clearer, further deprecate ieeefp.h by not declaring the function prototypes except on architectures that implement them already. Currently i386 and amd64 implement the ieeefp.h interface for compatibility, and for fp[gs]etprec(), which doesn't exist on most other hardware. Powerpc, sparc64, and ia64 partially implement it and probably shouldn't, and other architectures don't implement it at all. Modified: head/include/ieeefp.h head/sys/amd64/include/ieeefp.h head/sys/arm/include/ieeefp.h head/sys/i386/include/ieeefp.h head/sys/ia64/include/ieeefp.h head/sys/mips/include/ieeefp.h head/sys/powerpc/include/ieeefp.h head/sys/sparc64/include/ieeefp.h Modified: head/include/ieeefp.h ============================================================================== --- head/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -12,15 +12,4 @@ #include #include -#if !defined(_IEEEFP_INLINED_) -__BEGIN_DECLS -extern fp_rnd_t fpgetround(void); -extern fp_rnd_t fpsetround(fp_rnd_t); -extern fp_except_t fpgetmask(void); -extern fp_except_t fpsetmask(fp_except_t); -extern fp_except_t fpgetsticky(void); -extern fp_except_t fpsetsticky(fp_except_t); -__END_DECLS -#endif /* !_IEEEFP_INLINED_ */ - #endif /* _IEEEFP_H_ */ Modified: head/sys/amd64/include/ieeefp.h ============================================================================== --- head/sys/amd64/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/sys/amd64/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -39,6 +39,8 @@ #define _MACHINE_IEEEFP_H_ /* + * Deprecated historical FPU control interface + * * IEEE floating point type, constant and function definitions. * XXX: {FP,SSE}*FLD and {FP,SSE}*OFF are undocumented pollution. */ @@ -287,13 +289,16 @@ __fpgetsticky(void) #define fpsetprec(m) __fpsetprec(m) #define fpsetround(m) __fpsetround(m) -/* Suppress prototypes in the MI header. */ -#define _IEEEFP_INLINED_ 1 - #else /* !(!__IEEEFP_NOINLINES__ && __GNUCLIKE_ASM) */ /* Augment the userland declarations. */ __BEGIN_DECLS +extern fp_rnd_t fpgetround(void); +extern fp_rnd_t fpsetround(fp_rnd_t); +extern fp_except_t fpgetmask(void); +extern fp_except_t fpsetmask(fp_except_t); +extern fp_except_t fpgetsticky(void); +extern fp_except_t fpsetsticky(fp_except_t); fp_prec_t fpgetprec(void); fp_prec_t fpsetprec(fp_prec_t); __END_DECLS Modified: head/sys/arm/include/ieeefp.h ============================================================================== --- head/sys/arm/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/sys/arm/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -8,6 +8,8 @@ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ +/* Deprecated historical FPU control interface */ + /* FP exception codes */ #define FP_EXCEPT_INV 0 #define FP_EXCEPT_DZ 1 Modified: head/sys/i386/include/ieeefp.h ============================================================================== --- head/sys/i386/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/sys/i386/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -39,6 +39,8 @@ #define _MACHINE_IEEEFP_H_ /* + * Deprecated historical FPU control interface + * * IEEE floating point type, constant and function definitions. * XXX: FP*FLD and FP*OFF are undocumented pollution. */ @@ -253,7 +255,4 @@ fpresetsticky(fp_except_t _m) #endif /* __GNUCLIKE_ASM */ -/* Suppress prototypes in the MI header. */ -#define _IEEEFP_INLINED_ 1 - #endif /* !_MACHINE_IEEEFP_H_ */ Modified: head/sys/ia64/include/ieeefp.h ============================================================================== --- head/sys/ia64/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/sys/ia64/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -29,6 +29,8 @@ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ +/* Deprecated historical FPU control interface */ + #include typedef int fp_except_t; @@ -45,4 +47,11 @@ typedef enum { FP_RZ /* round toward zero */ } fp_rnd_t; +__BEGIN_DECLS +extern fp_rnd_t fpgetround(void); +extern fp_rnd_t fpsetround(fp_rnd_t); +extern fp_except_t fpgetmask(void); +extern fp_except_t fpsetmask(fp_except_t); +__END_DECLS + #endif /* !_MACHINE_IEEEFP_H_ */ Modified: head/sys/mips/include/ieeefp.h ============================================================================== --- head/sys/mips/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/sys/mips/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -11,6 +11,8 @@ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ +/* Deprecated historical FPU control interface */ + typedef int fp_except; typedef int fp_except_t; Modified: head/sys/powerpc/include/ieeefp.h ============================================================================== --- head/sys/powerpc/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/sys/powerpc/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -8,6 +8,8 @@ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ +/* Deprecated historical FPU control interface */ + typedef int fp_except_t; #define FP_X_IMP 0x01 /* imprecise (loss of precision) */ #define FP_X_DZ 0x02 /* divide-by-zero exception */ @@ -22,4 +24,12 @@ typedef enum { FP_RM=3 /* round toward negative infinity */ } fp_rnd_t; +__BEGIN_DECLS +extern fp_rnd_t fpgetround(void); +extern fp_rnd_t fpsetround(fp_rnd_t); +extern fp_except_t fpgetmask(void); +extern fp_except_t fpsetmask(fp_except_t); +extern fp_except_t fpgetsticky(void); +__END_DECLS + #endif /* _MACHINE_IEEEFP_H_ */ Modified: head/sys/sparc64/include/ieeefp.h ============================================================================== --- head/sys/sparc64/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606) +++ head/sys/sparc64/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607) @@ -7,6 +7,8 @@ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ +/* Deprecated FPU control interface */ + #include typedef int fp_except_t; @@ -23,4 +25,13 @@ typedef enum { FP_RM = FSR_RD_NINF /* round toward negative infinity */ } fp_rnd_t; +__BEGIN_DECLS +extern fp_rnd_t fpgetround(void); +extern fp_rnd_t fpsetround(fp_rnd_t); +extern fp_except_t fpgetmask(void); +extern fp_except_t fpsetmask(fp_except_t); +extern fp_except_t fpgetsticky(void); +__END_DECLS + + #endif /* _MACHINE_IEEEFP_H_ */ From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 08:12:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02119106566B; Fri, 21 Oct 2011 08:12:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 756BE8FC14; Fri, 21 Oct 2011 08:12:06 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9L8C2fN081525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Oct 2011 11:12:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p9L8C2Rm072303; Fri, 21 Oct 2011 11:12:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p9L8C1oq072302; Fri, 21 Oct 2011 11:12:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 21 Oct 2011 11:12:01 +0300 From: Kostik Belousov To: David Schultz Message-ID: <20111021081201.GH50300@deviant.kiev.zoral.com.ua> References: <201110210640.p9L6eaeC010594@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6S+CllbbV/7E5K18" Content-Disposition: inline In-Reply-To: <201110210640.p9L6eaeC010594@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226606 - in head/lib/libc: amd64 amd64/gen arm arm/gen gen i386 i386/gen ia64 ia64/gen mips mips/gen powerpc powerpc/gen powerpc64 powerpc64/gen sparc64 sparc64/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 08:12:08 -0000 --6S+CllbbV/7E5K18 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 21, 2011 at 06:40:36AM +0000, David Schultz wrote: > Author: das > Date: Fri Oct 21 06:40:36 2011 > New Revision: 226606 > URL: http://svn.freebsd.org/changeset/base/226606 >=20 > Log: > Replace a proliferation of buggy MD implementations of modf() with a > working MI one. The MI one only needs to be overridden on machines > with non-IEEE754 arithmetic. (The last supported one was the VAX.) > It can also be overridden if someone comes up with a faster one that > actually passes the regression tests -- but this is harder than it soun= ds. >=20 > Added: > head/lib/libc/gen/modf.c > - copied, changed from r226410, head/lib/msun/src/s_modf.c > Deleted: > head/lib/libc/amd64/gen/modf.S > head/lib/libc/arm/gen/modf.c > head/lib/libc/i386/gen/modf.S > head/lib/libc/ia64/gen/modf.c > head/lib/libc/mips/gen/modf.S > head/lib/libc/mips/gen/modf.c > head/lib/libc/powerpc/gen/modf.c > head/lib/libc/powerpc64/gen/modf.c > head/lib/libc/sparc64/gen/modf.S > Modified: > head/lib/libc/amd64/Symbol.map > head/lib/libc/amd64/gen/Makefile.inc > head/lib/libc/arm/Symbol.map > head/lib/libc/arm/gen/Makefile.inc > head/lib/libc/gen/Makefile.inc > head/lib/libc/gen/Symbol.map > head/lib/libc/i386/Symbol.map > head/lib/libc/i386/gen/Makefile.inc > head/lib/libc/ia64/Symbol.map > head/lib/libc/ia64/gen/Makefile.inc > head/lib/libc/mips/Symbol.map > head/lib/libc/mips/gen/Makefile.inc > head/lib/libc/powerpc/Symbol.map > head/lib/libc/powerpc/gen/Makefile.inc > head/lib/libc/powerpc64/Symbol.map > head/lib/libc/powerpc64/gen/Makefile.inc > head/lib/libc/sparc64/Symbol.map > head/lib/libc/sparc64/gen/Makefile.inc >=20 > Modified: head/lib/libc/amd64/Symbol.map > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/amd64/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) > +++ head/lib/libc/amd64/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) > @@ -26,7 +26,6 @@ FBSD_1.0 { > __infinity; > __nan; > makecontext; > - modf; > rfork_thread; > setjmp; > longjmp; You cannot do this, you just completely broke the ABI. The symbols must not be removed from the versioned library. --6S+CllbbV/7E5K18 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6hKVEACgkQC3+MBN1Mb4hoHwCaAzYg7OCZsnLt1agmOvTjRvWA 0YEAn3Ei040IwZcCh9PqC/1SY1BbBeXv =BsBk -----END PGP SIGNATURE----- --6S+CllbbV/7E5K18-- From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 08:52:13 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 693D41065673; Fri, 21 Oct 2011 08:52:13 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id E10F48FC16; Fri, 21 Oct 2011 08:52:12 +0000 (UTC) Received: by ggnq2 with SMTP id q2so3029941ggn.13 for ; Fri, 21 Oct 2011 01:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WglLMEIZRmW6nER9LKsKd9wrx4EjeeeWRtqgMCA61XM=; b=xqF28T090zrgP7xj+lvIoSOF+tz9mVXzemRSUd0xgMT+dE9ylWB7b7TsCUCL4g3BiE l1M9wGhK3csgTCns+IR0hi6I4lXw9G+ecmCIxc7Ef9Ho4BIlLpXrsfzlwCUO+2utctV9 NwJbs903Pfq9aRslsgHCigy9BiczFw3iCiydY= MIME-Version: 1.0 Received: by 10.182.73.67 with SMTP id j3mr906839obv.46.1319187132240; Fri, 21 Oct 2011 01:52:12 -0700 (PDT) Received: by 10.182.122.33 with HTTP; Fri, 21 Oct 2011 01:52:11 -0700 (PDT) In-Reply-To: <201110081247.p98Cl06s063337@svn.freebsd.org> References: <201110081247.p98Cl06s063337@svn.freebsd.org> Date: Fri, 21 Oct 2011 01:52:11 -0700 Message-ID: From: Garrett Cooper To: Dag-Erling Smorgrav Content-Type: multipart/mixed; boundary=f46d0445187b68d3c404afcb30cd Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 08:52:13 -0000 --f46d0445187b68d3c404afcb30cd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sat, Oct 8, 2011 at 5:47 AM, Dag-Erling Smorgrav wrote= : > Author: des > Date: Sat Oct =A08 12:47:00 2011 > New Revision: 226157 > URL: http://svn.freebsd.org/changeset/base/226157 > > Log: > =A0Bring ioctlname() in line with all the other *name() functions, which > =A0actually print the name (or the numeric value, if they can't figure ou= t > =A0the correct name) instead of just returning a pointer to it. =A0Also, = since > =A0ioctl numbers are not and probably never will be unique, drop support = for > =A0using a switch statement instead of an if/else chain. This commit broke truss by changing the ioctlname API signature. Example: $ truss camcontrol devlist # ... Segmentation fault: 11 (core dumped) Reason being is that truss uses ioctlname via an extern, so the compiler doesn't note the difference (I assume because NO_WERROR=3D is set in the Makefile) things go down in flames when it tries to print out the ioctl call (dereferences a bad pointer with strdup) This patch fixes it (with some minor Makefile cleanup), at the cost of duplicating the mkioctls guts between kdump and truss (truss depended on the old API signature). Note: I did an `svn copy ../kdump/mkioctls .' beforehand in order to bootstrap the svn history; that will need to be done before committing my attached patch. Thanks! -Garrett --f46d0445187b68d3c404afcb30cd Content-Type: text/x-patch; charset=US-ASCII; name="fix-truss-ioctlname-segfault.patch" Content-Disposition: attachment; filename="fix-truss-ioctlname-segfault.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gu0xs3yf0 SW5kZXg6IHVzci5iaW4vdHJ1c3MvbWtpb2N0bHMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNyLmJpbi90cnVz cy9ta2lvY3Rscwkod29ya2luZyBjb3B5KQorKysgdXNyLmJpbi90cnVzcy9ta2lvY3Rscwkod29y a2luZyBjb3B5KQpAQCAtNTgsMTIgKzU4LDEyIEBACiAJcHJpbnQgIiNpbmNsdWRlIDxzdGRpby5o PiIKIAlwcmludCAiI2luY2x1ZGUgPGNhbS9jYW0uaD4iCiAJcHJpbnQgIiIKLQlwcmludCAidm9p ZCBpb2N0bG5hbWUodW5zaWduZWQgbG9uZyB2YWwsIGludCBkZWNpbWFsKTsiCisJcHJpbnQgImNv bnN0IGNoYXIJKmlvY3RsbmFtZSh1bnNpZ25lZCBsb25nIHZhbCk7IgogCXByaW50ICIiCiAJcHJp bnQgaW9jdGxfaW5jbHVkZXMKIAlwcmludCAiIgotCXByaW50ICJ2b2lkIgotCXByaW50ICJpb2N0 bG5hbWUodW5zaWduZWQgbG9uZyB2YWwsIGludCBkZWNpbWFsKSIKKwlwcmludCAiY29uc3QgY2hh cioiCisJcHJpbnQgImlvY3RsbmFtZSh1bnNpZ25lZCBsb25nIHZhbCkiCiAJcHJpbnQgInsiCiAJ cHJpbnQgIlx0Y29uc3QgY2hhciAqc3RyID0gTlVMTDsiCiAJcHJpbnQgIiIKQEAgLTg1LDEyICs4 NSw3IEBACiB9CiBFTkQgewogCXByaW50ICJcbiIKLQlwcmludCAiXHRpZiAoc3RyICE9IE5VTEwp XG4iCi0JcHJpbnQgIlx0XHRwcmludGYoXCIlc1wiLCBzdHIpO1xuIgotCXByaW50ICJcdGVsc2Ug aWYgKGRlY2ltYWwpXG4iCi0JcHJpbnQgIlx0XHRwcmludGYoXCIlbHVcIiwgdmFsKTtcbiIKLQlw cmludCAiXHRlbHNlXG4iCi0JcHJpbnQgIlx0XHRwcmludGYoXCIlI2x4XCIsIHZhbCk7XG4iCisJ cHJpbnQgIlx0cmV0dXJuIChzdHIpO1xuIgogCXByaW50ICJ9IgogfQogJwpJbmRleDogdXNyLmJp bi90cnVzcy9leHRlcm4uaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3IuYmluL3RydXNzL2V4dGVybi5oCShy ZXZpc2lvbiAyMjY1MjQpCisrKyB1c3IuYmluL3RydXNzL2V4dGVybi5oCSh3b3JraW5nIGNvcHkp CkBAIC0zNSw3ICszNSw3IEBACiBleHRlcm4gaW50IHN0YXJ0X3RyYWNpbmcoaW50KTsKIGV4dGVy biB2b2lkIHJlc3RvcmVfcHJvYyhpbnQpOwogZXh0ZXJuIHZvaWQgd2FpdGV2ZW50KHN0cnVjdCB0 cnVzc2luZm8gKik7Ci1leHRlcm4gY29uc3QgY2hhciAqaW9jdGxuYW1lKHJlZ2lzdGVyX3QgdmFs KTsKK2NvbnN0IGNoYXIgKmlvY3RsbmFtZSh1bnNpZ25lZCBsb25nIHZhbCk7CiBleHRlcm4gY2hh ciAqc3Ryc2lnKGludCBzaWcpOwogI2lmZGVmIF9fYW1kNjRfXwogZXh0ZXJuIHZvaWQgYW1kNjRf c3lzY2FsbF9lbnRyeShzdHJ1Y3QgdHJ1c3NpbmZvICosIGludCk7CkluZGV4OiB1c3IuYmluL3Ry dXNzL01ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHVzci5iaW4vdHJ1c3MvTWFrZWZpbGUJKHJldmlz aW9uIDIyNjUyNCkKKysrIHVzci5iaW4vdHJ1c3MvTWFrZWZpbGUJKHdvcmtpbmcgY29weSkKQEAg LTExLDcgKzExLDcgQEAKIC5lbmRpZgogCiBDRkxBR1MrPSAtSSR7LkNVUkRJUn0gLUkuCi1DTEVB TkZJTEVTPSBzeXNjYWxscy5tYXN0ZXIgc3lzY2FsbHMuaCBpb2N0bC5jCitDTEVBTkZJTEVTPSBz eXNjYWxscy5tYXN0ZXIKIAogLlNVRkZJWEVTOiAubWFzdGVyCiAKQEAgLTIyLDggKzIyLDggQEAK IAkvYmluL3NoICR7LkNVUkRJUn0vLi4vLi4vc3lzL2tlcm4vbWFrZXN5c2NhbGxzLnNoIHN5c2Nh bGxzLm1hc3RlciBcCiAJCSR7LkNVUkRJUn0vaTM4Ni5jb25mCiAKLWlvY3RsLmM6ICR7LkNVUkRJ Un0vLi4va2R1bXAvbWtpb2N0bHMKLQlzaCAkey5DVVJESVJ9Ly4uL2tkdW1wL21raW9jdGxzICR7 REVTVERJUn0vdXNyL2luY2x1ZGUgPiAkey5UQVJHRVR9Citpb2N0bC5jOiAkey5DVVJESVJ9L21r aW9jdGxzCisJc2ggJHsuQ1VSRElSfS9ta2lvY3RscyAke0RFU1RESVJ9L3Vzci9pbmNsdWRlID4g JHsuVEFSR0VUfQogCiAuaWYgJHtNQUNISU5FX0NQVUFSQ0h9ID09ICJpMzg2IgogU1JDUys9CWkz ODYtbGludXguYyBsaW51eF9zeXNjYWxscy5oCg== --f46d0445187b68d3c404afcb30cd-- From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 10:43:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997EE106566C; Fri, 21 Oct 2011 10:43:21 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 5905A8FC14; Fri, 21 Oct 2011 10:43:21 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 8CA471FFC33; Fri, 21 Oct 2011 10:43:20 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 75AEFB93C; Fri, 21 Oct 2011 12:43:20 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201110081247.p98Cl06s063337@svn.freebsd.org> Date: Fri, 21 Oct 2011 12:43:20 +0200 In-Reply-To: (Garrett Cooper's message of "Fri, 21 Oct 2011 01:52:11 -0700") Message-ID: <86r526lj5j.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 10:43:21 -0000 Garrett Cooper writes: > This commit broke truss by changing the ioctlname API signature. Example: I didn't realize truss used code from kdump... Thanks for the patch. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 11:08:26 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FBFE106566B; Fri, 21 Oct 2011 11:08:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5B28FC12; Fri, 21 Oct 2011 11:08:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LB8QsO021662; Fri, 21 Oct 2011 11:08:26 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LB8Qa0021657; Fri, 21 Oct 2011 11:08:26 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110211108.p9LB8Qa0021657@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 21 Oct 2011 11:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226608 - in head/usr.bin: kdump truss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 11:08:26 -0000 Author: des Date: Fri Oct 21 11:08:25 2011 New Revision: 226608 URL: http://svn.freebsd.org/changeset/base/226608 Log: It turns out that truss also used kdump's mkioctls script, and expected ioctlname() to return a pointer to the name rather than print it. This did not show up in testing because truss had its own prototype for ioctlname(), so it would build fine and run fine as long as the program being traced did not issue an ioctl. Teach mkioctls to generate different versions of ioctlname() based on its first command-line argument. Pointed out by: Garrett Cooper Modified: head/usr.bin/kdump/Makefile head/usr.bin/kdump/mkioctls head/usr.bin/truss/Makefile head/usr.bin/truss/extern.h Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Fri Oct 21 06:41:46 2011 (r226607) +++ head/usr.bin/kdump/Makefile Fri Oct 21 11:08:25 2011 (r226608) @@ -22,7 +22,7 @@ CLEANFILES= ioctl.c kdump_subr.c kdump_s ioctl.c: mkioctls env MACHINE=${MACHINE} \ - sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET} + sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET} kdump_subr.h: mksubr sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \ Modified: head/usr.bin/kdump/mkioctls ============================================================================== --- head/usr.bin/kdump/mkioctls Fri Oct 21 06:41:46 2011 (r226607) +++ head/usr.bin/kdump/mkioctls Fri Oct 21 11:08:25 2011 (r226608) @@ -1,20 +1,26 @@ #!/bin/sh # # $FreeBSD$ +# +# When editing this script, keep in mind that truss also uses it. +# set -e -if [ -z "$1" ]; then - echo "usage: sh $0 include-dir" +if [ $# -ne 2 -o \( $1 != "print" -a $1 != "return" \) ]; then + echo "usage: sh $0 print|return include-dir" exit 1 fi +style="$1" +includedir="$2" + LC_ALL=C; export LC_ALL # Build a list of headers that have ioctls in them. # XXX should we use an ANSI cpp? ioctl_includes=$( - cd $1 + cd $includedir find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \ xargs egrep -l \ '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | @@ -33,7 +39,7 @@ esac awk -v x="$ioctl_includes" 'BEGIN {print x}' | gcc -E -I$1 -dM -DCOMPAT_43TTY - | - awk -v ioctl_includes="$ioctl_includes" ' + awk -v ioctl_includes="$ioctl_includes" -v style="$style" ' BEGIN { print "/* XXX obnoxious prerequisites. */" print "#define COMPAT_43" @@ -58,12 +64,19 @@ BEGIN { print "#include " print "#include " print "" - print "void ioctlname(unsigned long val, int decimal);" - print "" print ioctl_includes print "" - print "void" - print "ioctlname(unsigned long val, int decimal)" + if (style == "print") { + print "void ioctlname(unsigned long val, int decimal);" + print "" + print "void" + print "ioctlname(unsigned long val, int decimal)" + } else { + print "const char *ioctlname(unsigned long val);" + print "" + print "const char *" + print "ioctlname(unsigned long val)" + } print "{" print "\tconst char *str = NULL;" print "" @@ -77,20 +90,24 @@ BEGIN { break; ++i; # - print("\t"); + printf("\t"); if (n++ > 0) - print("else "); + printf("else "); printf("if (val == %s)\n", $i); printf("\t\tstr = \"%s\";\n", $i); } END { - print "\n" - print "\tif (str != NULL)\n" - print "\t\tprintf(\"%s\", str);\n" - print "\telse if (decimal)\n" - print "\t\tprintf(\"%lu\", val);\n" - print "\telse\n" - print "\t\tprintf(\"%#lx\", val);\n" + print "" + if (style == "print") { + print "\tif (str != NULL)" + print "\t\tprintf(\"%s\", str);" + print "\telse if (decimal)" + print "\t\tprintf(\"%lu\", val);" + print "\telse" + print "\t\tprintf(\"%#lx\", val);" + } else { + print "\treturn (str);" + } print "}" } ' Modified: head/usr.bin/truss/Makefile ============================================================================== --- head/usr.bin/truss/Makefile Fri Oct 21 06:41:46 2011 (r226607) +++ head/usr.bin/truss/Makefile Fri Oct 21 11:08:25 2011 (r226608) @@ -23,7 +23,8 @@ syscalls.h: syscalls.master ${.CURDIR}/i386.conf ioctl.c: ${.CURDIR}/../kdump/mkioctls - sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET} + env MACHINE=${MACHINE} \ + /bin/sh ${.CURDIR}/../kdump/mkioctls return ${DESTDIR}/usr/include > ${.TARGET} .if ${MACHINE_CPUARCH} == "i386" SRCS+= i386-linux.c linux_syscalls.h Modified: head/usr.bin/truss/extern.h ============================================================================== --- head/usr.bin/truss/extern.h Fri Oct 21 06:41:46 2011 (r226607) +++ head/usr.bin/truss/extern.h Fri Oct 21 11:08:25 2011 (r226608) @@ -35,7 +35,7 @@ extern int setup_and_wait(char **); extern int start_tracing(int); extern void restore_proc(int); extern void waitevent(struct trussinfo *); -extern const char *ioctlname(register_t val); +extern const char *ioctlname(unsigned long val); extern char *strsig(int sig); #ifdef __amd64__ extern void amd64_syscall_entry(struct trussinfo *, int); From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 11:11:18 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF5FC106564A; Fri, 21 Oct 2011 11:11:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEA558FC1A; Fri, 21 Oct 2011 11:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LBBI8Q021798; Fri, 21 Oct 2011 11:11:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LBBInd021796; Fri, 21 Oct 2011 11:11:18 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110211111.p9LBBInd021796@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 21 Oct 2011 11:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226609 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 11:11:19 -0000 Author: glebius Date: Fri Oct 21 11:11:18 2011 New Revision: 226609 URL: http://svn.freebsd.org/changeset/base/226609 Log: In FreeBSD ip_output() expects ip_len and ip_off in host byte order PR: kern/159029 Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Fri Oct 21 11:08:25 2011 (r226608) +++ head/sys/contrib/pf/net/if_pfsync.c Fri Oct 21 11:11:18 2011 (r226609) @@ -1959,7 +1959,11 @@ pfsyncioctl(struct ifnet *ifp, u_long cm ip->ip_hl = sizeof(sc->sc_template) >> 2; ip->ip_tos = IPTOS_LOWDELAY; /* len and id are set later */ +#ifdef __FreeBSD__ + ip->ip_off = IP_DF; +#else ip->ip_off = htons(IP_DF); +#endif ip->ip_ttl = PFSYNC_DFLTTL; ip->ip_p = IPPROTO_PFSYNC; ip->ip_src.s_addr = INADDR_ANY; @@ -2211,7 +2215,11 @@ pfsync_sendout(void) bcopy(&sc->sc_template, ip, sizeof(*ip)); offset = sizeof(*ip); +#ifdef __FreeBSD__ + ip->ip_len = m->m_pkthdr.len; +#else ip->ip_len = htons(m->m_pkthdr.len); +#endif ip->ip_id = htons(ip_randomid()); /* build the pfsync header */ From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 12:58:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC8531065676; Fri, 21 Oct 2011 12:58:34 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BC0D8FC16; Fri, 21 Oct 2011 12:58:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LCwY47025205; Fri, 21 Oct 2011 12:58:34 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LCwYXs025202; Fri, 21 Oct 2011 12:58:34 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110211258.p9LCwYXs025202@svn.freebsd.org> From: Ed Schouten Date: Fri, 21 Oct 2011 12:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226610 - in head/sys: net netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 12:58:34 -0000 Author: ed Date: Fri Oct 21 12:58:34 2011 New Revision: 226610 URL: http://svn.freebsd.org/changeset/base/226610 Log: Add missing #includes. According to POSIX, these two header files should be able to be included by themselves, not depending on other headers. The header uses struct sockaddr when __BSD_VISIBLE=1, while uses integer datatypes (u_int32_t, u_short, etc). MFC after: 2 months Modified: head/sys/net/if.h head/sys/netinet/tcp.h Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Fri Oct 21 11:11:18 2011 (r226609) +++ head/sys/net/if.h Fri Oct 21 12:58:34 2011 (r226610) @@ -43,9 +43,11 @@ /* * does not depend on on most other systems. This * helps userland compatibility. (struct timeval ifi_lastchange) + * The same holds for . (struct sockaddr ifru_addr) */ #ifndef _KERNEL #include +#include #endif struct ifnet; Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Fri Oct 21 11:11:18 2011 (r226609) +++ head/sys/netinet/tcp.h Fri Oct 21 12:58:34 2011 (r226610) @@ -34,6 +34,7 @@ #define _NETINET_TCP_H_ #include +#include #if __BSD_VISIBLE From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:13:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 044D5106564A; Fri, 21 Oct 2011 13:13:19 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E725D8FC08; Fri, 21 Oct 2011 13:13:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LDDI2T025707; Fri, 21 Oct 2011 13:13:18 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LDDIYF025704; Fri, 21 Oct 2011 13:13:18 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110211313.p9LDDIYF025704@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 13:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226611 - head/tools/tools/zfsboottest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:13:19 -0000 Author: pjd Date: Fri Oct 21 13:13:18 2011 New Revision: 226611 URL: http://svn.freebsd.org/changeset/base/226611 Log: - Allow to specify multiple files to check, eg. zfsboottest gpt/system0 gpt/system1 - /boot/kernel/kernel /boot/zfsloader - Instead of printing file's content calculate MD5 hash of the file, so it can be easly compared to the hash calculated via file system. - Some other minor improvements. MFC after: 3 days Modified: head/tools/tools/zfsboottest/Makefile head/tools/tools/zfsboottest/zfsboottest.c Modified: head/tools/tools/zfsboottest/Makefile ============================================================================== --- head/tools/tools/zfsboottest/Makefile Fri Oct 21 12:58:34 2011 (r226610) +++ head/tools/tools/zfsboottest/Makefile Fri Oct 21 13:13:18 2011 (r226611) @@ -12,6 +12,7 @@ CFLAGS= -O1 \ -fdiagnostics-show-option \ -W -Wextra -Wno-sign-compare -Wno-unused-parameter \ -Werror +LDFLAGS+=-lmd .if ${MACHINE_CPUARCH} == "amd64" beforedepend zfsboottest.o: machine Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Fri Oct 21 12:58:34 2011 (r226610) +++ head/tools/tools/zfsboottest/zfsboottest.c Fri Oct 21 13:13:18 2011 (r226611) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2010 Doug Rabson * Copyright (c) 2011 Andriy Gapon + * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,8 +29,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -43,6 +46,7 @@ void pager_output(const char *line) { + fprintf(stderr, "%s", line); } @@ -54,7 +58,7 @@ pager_output(const char *line) static int vdev_read(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes) { - int fd = *(int *) priv; + int fd = *(int *)priv; if (pread(fd, buf, bytes, off) != bytes) return (-1); @@ -73,7 +77,7 @@ zfs_read(spa_t *spa, dnode_phys_t *dn, v n = zp->zp_size - off; rc = dnode_read(spa, dn, off, buf, n); - if (rc) + if (rc != 0) return (-rc); return (n); @@ -82,31 +86,49 @@ zfs_read(spa_t *spa, dnode_phys_t *dn, v int main(int argc, char** argv) { - char buf[512]; - int fd[100]; + char buf[512], hash[33]; + MD5_CTX ctx; struct stat sb; dnode_phys_t dn; spa_t *spa; off_t off; ssize_t n; - int i; + int i, failures, *fd; zfs_init(); if (argc == 1) { static char *av[] = { - "zfstest", "COPYRIGHT", - "/dev/da0p2", "/dev/da1p2", "/dev/da2p2", + "zfsboottest", + "/dev/gpt/system0", + "/dev/gpt/system1", + "-", + "/boot/zfsloader", + "/boot/support.4th", + "/boot/kernel/kernel", NULL, }; - argc = 5; + argc = sizeof(av) / sizeof(av[0]) - 1; argv = av; } - for (i = 2; i < argc; i++) { - fd[i] = open(argv[i], O_RDONLY); - if (fd[i] < 0) + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-") == 0) + break; + } + fd = malloc(sizeof(fd[0]) * (i - 1)); + if (fd == NULL) + errx(1, "Unable to allocate memory."); + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-") == 0) + break; + fd[i - 1] = open(argv[i], O_RDONLY); + if (fd[i - 1] == -1) { + warn("open(%s) failed", argv[i]); continue; - if (vdev_probe(vdev_read, &fd[i], NULL) != 0) - close(fd[i]); + } + if (vdev_probe(vdev_read, &fd[i - 1], NULL) != 0) { + warnx("vdev_probe(%s) failed", argv[i]); + close(fd[i - 1]); + } } spa_all_status(); @@ -121,29 +143,40 @@ main(int argc, char** argv) exit(1); } - if (zfs_lookup(spa, argv[1], &dn)) { - fprintf(stderr, "can't lookup\n"); - exit(1); - } - - if (zfs_dnode_stat(spa, &dn, &sb)) { - fprintf(stderr, "can't stat\n"); - exit(1); - } - + printf("\n"); + for (++i, failures = 0; i < argc; i++) { + if (zfs_lookup(spa, argv[i], &dn)) { + fprintf(stderr, "%s: can't lookup\n", argv[i]); + failures++; + continue; + } - off = 0; - do { - n = sb.st_size - off; - n = n > sizeof(buf) ? sizeof(buf) : n; - n = zfs_read(spa, &dn, buf, n, off); - if (n < 0) { - fprintf(stderr, "zfs_read failed\n"); - exit(1); + if (zfs_dnode_stat(spa, &dn, &sb)) { + fprintf(stderr, "%s: can't stat\n", argv[i]); + failures++; + continue; } - write(1, buf, n); - off += n; - } while (off < sb.st_size); - return (0); + off = 0; + MD5Init(&ctx); + do { + n = sb.st_size - off; + n = n > sizeof(buf) ? sizeof(buf) : n; + n = zfs_read(spa, &dn, buf, n, off); + if (n < 0) { + fprintf(stderr, "%s: zfs_read failed\n", + argv[i]); + failures++; + break; + } + MD5Update(&ctx, buf, n); + off += n; + } while (off < sb.st_size); + if (off < sb.st_size) + continue; + MD5End(&ctx, hash); + printf("%s %s\n", hash, argv[i]); + } + + return (failures == 0 ? 0 : 1); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:21:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 601EC106564A; Fri, 21 Oct 2011 13:21:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1EFA48FC13; Fri, 21 Oct 2011 13:21:38 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8E74046B23; Fri, 21 Oct 2011 09:21:35 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E59DE8A069; Fri, 21 Oct 2011 08:22:43 -0400 (EDT) From: John Baldwin To: Kostik Belousov Date: Fri, 21 Oct 2011 08:22:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <201110210640.p9L6eaeC010594@svn.freebsd.org> <20111021081201.GH50300@deviant.kiev.zoral.com.ua> In-Reply-To: <20111021081201.GH50300@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201110210822.42227.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 21 Oct 2011 08:22:44 -0400 (EDT) Cc: svn-src-head@freebsd.org, David Schultz , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r226606 - in head/lib/libc: amd64 amd64/gen arm arm/gen gen i386 i386/gen ia64 ia64/gen mips mips/gen powerpc powerpc/gen powerpc64 powerpc64/gen sparc64 sparc64/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:21:38 -0000 On Friday, October 21, 2011 4:12:01 am Kostik Belousov wrote: > On Fri, Oct 21, 2011 at 06:40:36AM +0000, David Schultz wrote: > > Author: das > > Date: Fri Oct 21 06:40:36 2011 > > New Revision: 226606 > > URL: http://svn.freebsd.org/changeset/base/226606 > > > > Log: > > Replace a proliferation of buggy MD implementations of modf() with a > > working MI one. The MI one only needs to be overridden on machines > > with non-IEEE754 arithmetic. (The last supported one was the VAX.) > > It can also be overridden if someone comes up with a faster one that > > actually passes the regression tests -- but this is harder than it sounds. > > > > Added: > > head/lib/libc/gen/modf.c > > - copied, changed from r226410, head/lib/msun/src/s_modf.c > > Deleted: > > head/lib/libc/amd64/gen/modf.S > > head/lib/libc/arm/gen/modf.c > > head/lib/libc/i386/gen/modf.S > > head/lib/libc/ia64/gen/modf.c > > head/lib/libc/mips/gen/modf.S > > head/lib/libc/mips/gen/modf.c > > head/lib/libc/powerpc/gen/modf.c > > head/lib/libc/powerpc64/gen/modf.c > > head/lib/libc/sparc64/gen/modf.S > > Modified: > > head/lib/libc/amd64/Symbol.map > > head/lib/libc/amd64/gen/Makefile.inc > > head/lib/libc/arm/Symbol.map > > head/lib/libc/arm/gen/Makefile.inc > > head/lib/libc/gen/Makefile.inc > > head/lib/libc/gen/Symbol.map > > head/lib/libc/i386/Symbol.map > > head/lib/libc/i386/gen/Makefile.inc > > head/lib/libc/ia64/Symbol.map > > head/lib/libc/ia64/gen/Makefile.inc > > head/lib/libc/mips/Symbol.map > > head/lib/libc/mips/gen/Makefile.inc > > head/lib/libc/powerpc/Symbol.map > > head/lib/libc/powerpc/gen/Makefile.inc > > head/lib/libc/powerpc64/Symbol.map > > head/lib/libc/powerpc64/gen/Makefile.inc > > head/lib/libc/sparc64/Symbol.map > > head/lib/libc/sparc64/gen/Makefile.inc > > > > Modified: head/lib/libc/amd64/Symbol.map > > ============================================================================== > > --- head/lib/libc/amd64/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) > > +++ head/lib/libc/amd64/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) > > @@ -26,7 +26,6 @@ FBSD_1.0 { > > __infinity; > > __nan; > > makecontext; > > - modf; > > rfork_thread; > > setjmp; > > longjmp; > You cannot do this, you just completely broke the ABI. > The symbols must not be removed from the versioned library. He just moved it to the MI Symbol.map, he didn't remove it: Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) +++ head/lib/libc/gen/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) @@ -213,6 +213,7 @@ FBSD_1.0 { ldexp; lockf; lrand48; + modf; mrand48; nftw; nice; -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:25:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A6B61065673; Fri, 21 Oct 2011 13:25:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id C480F8FC16; Fri, 21 Oct 2011 13:25:46 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9LDPcFh056861 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Oct 2011 16:25:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p9LDPcD6073519; Fri, 21 Oct 2011 16:25:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p9LDPch8073518; Fri, 21 Oct 2011 16:25:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 21 Oct 2011 16:25:37 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20111021132537.GJ50300@deviant.kiev.zoral.com.ua> References: <201110210640.p9L6eaeC010594@svn.freebsd.org> <20111021081201.GH50300@deviant.kiev.zoral.com.ua> <201110210822.42227.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6yxL3IctpgIvrN+d" Content-Disposition: inline In-Reply-To: <201110210822.42227.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, David Schultz , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r226606 - in head/lib/libc: amd64 amd64/gen arm arm/gen gen i386 i386/gen ia64 ia64/gen mips mips/gen powerpc powerpc/gen powerpc64 powerpc64/gen sparc64 sparc64/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:25:47 -0000 --6yxL3IctpgIvrN+d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 21, 2011 at 08:22:42AM -0400, John Baldwin wrote: > On Friday, October 21, 2011 4:12:01 am Kostik Belousov wrote: > > On Fri, Oct 21, 2011 at 06:40:36AM +0000, David Schultz wrote: > > > Author: das > > > Date: Fri Oct 21 06:40:36 2011 > > > New Revision: 226606 > > > URL: http://svn.freebsd.org/changeset/base/226606 > > >=20 > > > Log: > > > Replace a proliferation of buggy MD implementations of modf() with a > > > working MI one. The MI one only needs to be overridden on machines > > > with non-IEEE754 arithmetic. (The last supported one was the VAX.) > > > It can also be overridden if someone comes up with a faster one that > > > actually passes the regression tests -- but this is harder than it = sounds. > > >=20 > > > Added: > > > head/lib/libc/gen/modf.c > > > - copied, changed from r226410, head/lib/msun/src/s_modf.c > > > Deleted: > > > head/lib/libc/amd64/gen/modf.S > > > head/lib/libc/arm/gen/modf.c > > > head/lib/libc/i386/gen/modf.S > > > head/lib/libc/ia64/gen/modf.c > > > head/lib/libc/mips/gen/modf.S > > > head/lib/libc/mips/gen/modf.c > > > head/lib/libc/powerpc/gen/modf.c > > > head/lib/libc/powerpc64/gen/modf.c > > > head/lib/libc/sparc64/gen/modf.S > > > Modified: > > > head/lib/libc/amd64/Symbol.map > > > head/lib/libc/amd64/gen/Makefile.inc > > > head/lib/libc/arm/Symbol.map > > > head/lib/libc/arm/gen/Makefile.inc > > > head/lib/libc/gen/Makefile.inc > > > head/lib/libc/gen/Symbol.map > > > head/lib/libc/i386/Symbol.map > > > head/lib/libc/i386/gen/Makefile.inc > > > head/lib/libc/ia64/Symbol.map > > > head/lib/libc/ia64/gen/Makefile.inc > > > head/lib/libc/mips/Symbol.map > > > head/lib/libc/mips/gen/Makefile.inc > > > head/lib/libc/powerpc/Symbol.map > > > head/lib/libc/powerpc/gen/Makefile.inc > > > head/lib/libc/powerpc64/Symbol.map > > > head/lib/libc/powerpc64/gen/Makefile.inc > > > head/lib/libc/sparc64/Symbol.map > > > head/lib/libc/sparc64/gen/Makefile.inc > > >=20 > > > Modified: head/lib/libc/amd64/Symbol.map > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- head/lib/libc/amd64/Symbol.map Fri Oct 21 06:36:40 2011 (r226605) > > > +++ head/lib/libc/amd64/Symbol.map Fri Oct 21 06:40:36 2011 (r226606) > > > @@ -26,7 +26,6 @@ FBSD_1.0 { > > > __infinity; > > > __nan; > > > makecontext; > > > - modf; > > > rfork_thread; > > > setjmp; > > > longjmp; > > You cannot do this, you just completely broke the ABI. > > The symbols must not be removed from the versioned library. >=20 > He just moved it to the MI Symbol.map, he didn't remove it: Ah, sorry. >=20 > Modified: head/lib/libc/gen/Symbol.map > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/gen/Symbol.map Fri Oct 21 06:36:40 2011 (= r226605) > +++ head/lib/libc/gen/Symbol.map Fri Oct 21 06:40:36 2011 (= r226606) > @@ -213,6 +213,7 @@ FBSD_1.0 { > ldexp; > lockf; > lrand48; > + modf; > mrand48; > nftw; > nice; >=20 >=20 > --=20 > John Baldwin --6yxL3IctpgIvrN+d Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6hctEACgkQC3+MBN1Mb4hw6wCfeKFS6rUM5BMCe28rxaPtGhXh 9t0AoNHyUDD0ym3eRE1i/mvRUgENJgti =BrDh -----END PGP SIGNATURE----- --6yxL3IctpgIvrN+d-- From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:44:26 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7175E106566C; Fri, 21 Oct 2011 13:44:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9018FC0A; Fri, 21 Oct 2011 13:44:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LDiQaG026689; Fri, 21 Oct 2011 13:44:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LDiQuU026686; Fri, 21 Oct 2011 13:44:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110211344.p9LDiQuU026686@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 13:44:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226612 - head/tools/tools/zfsboottest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:44:26 -0000 Author: pjd Date: Fri Oct 21 13:44:26 2011 New Revision: 226612 URL: http://svn.freebsd.org/changeset/base/226612 Log: Because ZFS boot code was very fragile in the past and real PITA to debug, introduce zfsboottest.sh script that will verify if it will be possible to boot from the given pool. # zfsboottest.sh system Where "system" is pool name of the pool we want to boot from. What is being verified by the script: - Does the pool exist? - Does it have bootfs property configured? - Is mountpoint property of the boot dataset set to 'legacy'? Dataset configured in bootfs property has to be mounted to perform more checks: - Does the /boot directory in boot dataset exist? - Is this dataset configured as root file system in /etc/fstab or set in vfs.root.mountfrom variable in /boot/loader.conf? By using zfsboottest tool the script will read all the files in /boot directory using ZFS boot code and calculate their checksums. Then, it will walk /boot directory using find(1) though regular file sytem and also read all the files in /boot directory and calculate their checksums. If any of the files cannot be looked up, read or checksum is invalid it will be reported and booting off of this pool is probably not possible. Some additional checks may be interesting as well. For example if the disks contain proper pmbr and gptzfsboot code or if all expected files in /boot/ are present. When upgrading FreeBSD, one should snapshot datasets that contain operating system, upgrade (install new world and kernel) and use zfsboottest.sh to verify if it will be possible to boot from new configuration. If all is good one should upgrade boot blocks, by eg.: # gpart -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 If something is wrong, one should rollback datasets and report the problems. MFC after: 3 days Added: head/tools/tools/zfsboottest/zfsboottest.sh (contents, props changed) Modified: head/tools/tools/zfsboottest/Makefile Modified: head/tools/tools/zfsboottest/Makefile ============================================================================== --- head/tools/tools/zfsboottest/Makefile Fri Oct 21 13:13:18 2011 (r226611) +++ head/tools/tools/zfsboottest/Makefile Fri Oct 21 13:44:26 2011 (r226612) @@ -2,7 +2,12 @@ .PATH: ${.CURDIR}/../../../sys/boot/zfs ${.CURDIR}/../../../sys/cddl/boot/zfs +BINDIR?= /usr/bin +SCRIPTSDIR?= /usr/bin + PROG= zfsboottest +SCRIPTS= zfsboottest.sh +SCRIPTSNAME= zfsboottest.sh NO_MAN= CFLAGS= -O1 \ Added: head/tools/tools/zfsboottest/zfsboottest.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/zfsboottest/zfsboottest.sh Fri Oct 21 13:44:26 2011 (r226612) @@ -0,0 +1,130 @@ +#!/bin/sh +# +# Copyright (c) 2011 Pawel Jakub Dawidek +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +if [ $# -ne 1 ]; then + echo "usage: zfsboottest.sh " >&2 + exit 1 +fi + +which -s zfsboottest +if [ $? -eq 0 ]; then + zfsboottest="zfsboottest" +else + if [ ! -x "/usr/src/tools/tools/zfsboottest/zfsboottest" ]; then + echo "Unable to find \"zfsboottest\" utility." >&2 + exit 1 + fi + zfsboottest="/usr/src/tools/tools/zfsboottest/zfsboottest" +fi + +startdir="/boot" + +pool="${1}" +zpool list "${pool}" >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "No such pool \"${pool}\"." >&2 + exit 1 +fi +bootfs=`zpool get bootfs "${pool}" | tail -1 | awk '{print $3}'` +if [ "${bootfs}" = "-" ]; then + echo "The \"bootfs\" property is not configured for pool \"${pool}\"." >&2 + exit 1 +fi +# Dataset's mountpoint property should be set to 'legacy'. +if [ "`zfs get -H -o value mountpoint ${bootfs}`" != "legacy" ]; then + echo "The \"mountpoint\" property of dataset \"${bootfs}\" should be set to \"legacy\"." >&2 + exit 1 +fi +mountpoint=`df -t zfs "${bootfs}" 2>/dev/null | tail -1 | awk '{print $6}'` +if [ -z "${mountpoint}" ]; then + echo "The \"${bootfs}\" dataset is not mounted." >&2 + exit 1 +fi +if [ ! -d "${mountpoint}${startdir}" ]; then + echo "The \"${mountpoint}${startdir}\" directory doesn't exist." >&2 + exit 1 +fi +# To be able to mount root ZFS file system we need either /etc/fstab entry +# or vfs.root.mountfrom variable set in /boot/loader.conf. +egrep -q '^'"${bootfs}"'[[:space:]]+/[[:space:]]+zfs[[:space:]]+' "${mountpoint}/etc/fstab" 2>/dev/null +if [ $? -ne 0 ]; then + egrep -q 'vfs.root.mountfrom="?'"${bootfs}"'"?[[:space:]]*$' "${mountpoint}/boot/loader.conf" 2>/dev/null + if [ $? -ne 0 ]; then + echo "To be able to boot from \"${bootfs}\", you need to declare" >&2 + echo "\"${bootfs}\" as being root file system in ${mountpoint}/etc/fstab" >&2 + echo "or add \"vfs.root.mountfrom\" variable set to \"${bootfs}\" to" >&2 + echo "${mountpoint}/boot/loader.conf." >&2 + exit 1 + fi +fi +vdevs="" +for vdev in `zpool status "${pool}" | grep ONLINE | awk '{print $1}'`; do + vdev="/dev/${vdev#/dev/}" + if [ -c "${vdev}" ]; then + if [ -z "${vdevs}" ]; then + vdevs="${vdev}" + else + vdevs="${vdevs} ${vdev}" + fi + fi +done + +list0=`mktemp /tmp/zfsboottest.XXXXXXXXXX` +if [ $? -ne 0 ]; then + echo "Unable to create temporary file." >&2 + exit 1 +fi +list1=`mktemp /tmp/zfsboottest.XXXXXXXXXX` +if [ $? -ne 0 ]; then + echo "Unable to create temporary file." >&2 + rm -f "${list0}" + exit 1 +fi + +echo "zfsboottest.sh is reading all the files in ${mountpoint}${startdir} using" +echo "boot code and using file system code." +echo "It calculates MD5 checksums for all the files and will compare them." +echo "If all files can be properly read using boot code, it is very likely you" +echo "will be able to boot from \"${pool}\" pool>:> Good luck!" +echo + +"${zfsboottest}" ${vdevs} - `find "${mountpoint}${startdir}" -type f | sed "s@^${mountpoint}@@"` | egrep '^[0-9a-z]{32} /' | sort -k 2 >"${list0}" +find "${mountpoint}${startdir}" -type f | xargs md5 -r | sed "s@ ${mountpoint}@ @" | egrep '^[0-9a-z]{32} /' | sort -k 2 >"${list1}" + +diff -u "${list0}" "${list1}" +ec=$? + +rm -f "${list0}" "${list1}" + +if [ $? -ne 0 ]; then + echo >&2 + echo "You may not be able to boot." >&2 + exit 1 +fi + +echo "OK" From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:53:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7FF1106564A; Fri, 21 Oct 2011 13:53:06 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6B7D8FC0C; Fri, 21 Oct 2011 13:53:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LDr646026991; Fri, 21 Oct 2011 13:53:06 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LDr6kH026989; Fri, 21 Oct 2011 13:53:06 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110211353.p9LDr6kH026989@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 13:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226613 - head/cddl/contrib/opensolaris/lib/libzpool/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:53:08 -0000 Author: pjd Date: Fri Oct 21 13:53:06 2011 New Revision: 226613 URL: http://svn.freebsd.org/changeset/base/226613 Log: libzpool task_alloc: pass only valid flags to kmem_alloc tqflags may contain other flags besided those that are suitable for kmem_alloc == umem_alloc Submitted by: avg MFC after: 3 days Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Fri Oct 21 13:44:26 2011 (r226612) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Fri Oct 21 13:53:06 2011 (r226613) @@ -87,7 +87,7 @@ again: if ((t = tq->tq_freelist) != NULL } mutex_exit(&tq->tq_lock); - t = kmem_alloc(sizeof (task_t), tqflags); + t = kmem_alloc(sizeof (task_t), tqflags & KM_SLEEP); mutex_enter(&tq->tq_lock); if (t != NULL) From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:54:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE01C106564A; Fri, 21 Oct 2011 13:54:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD1948FC15; Fri, 21 Oct 2011 13:54:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LDsHme027060; Fri, 21 Oct 2011 13:54:17 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LDsHBD027058; Fri, 21 Oct 2011 13:54:17 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110211354.p9LDsHBD027058@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 21 Oct 2011 13:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226614 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:54:17 -0000 Author: glebius Date: Fri Oct 21 13:54:17 2011 New Revision: 226614 URL: http://svn.freebsd.org/changeset/base/226614 Log: Note that it is still not possible to guard special kind of allocations, those that have special relationships with uma(9). Currently only mbuf clusters. Modified: head/share/man/man9/memguard.9 Modified: head/share/man/man9/memguard.9 ============================================================================== --- head/share/man/man9/memguard.9 Fri Oct 21 13:53:06 2011 (r226613) +++ head/share/man/man9/memguard.9 Fri Oct 21 13:54:17 2011 (r226614) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2011 +.Dd October 21, 2011 .Dt MEMGUARD 9 .Os .Sh NAME @@ -204,3 +204,17 @@ Additions have been made by and .An Gleb Smirnoff Aq glebius@FreeBSD.org to both the implementation and the documentation. +.Sh BUGS +It is not possible to guard allocations that really expect theirselves to be +allocated from +.Xr uma 9 , +utilizing additional interfaces apart from +.Fn uma_zalloc +and +.Fn uma_free , +for example +.Fn uma_find_refcnt . +For the moment of writing only +.Xr mbuf 9 +cluster zones belong to that kind of allocations. +Attempt to guard them would lead to kernel panic. From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:54:58 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE6D1106566B; Fri, 21 Oct 2011 13:54:58 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD5A18FC21; Fri, 21 Oct 2011 13:54:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LDswoa027115; Fri, 21 Oct 2011 13:54:58 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LDswbZ027113; Fri, 21 Oct 2011 13:54:58 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110211354.p9LDswbZ027113@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 13:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226615 - head/cddl/contrib/opensolaris/head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:54:58 -0000 Author: pjd Date: Fri Oct 21 13:54:58 2011 New Revision: 226615 URL: http://svn.freebsd.org/changeset/base/226615 Log: thr_create: new_thread_ID may be NULL Submitted by: avg MFC after: 3 days Modified: head/cddl/contrib/opensolaris/head/thread.h Modified: head/cddl/contrib/opensolaris/head/thread.h ============================================================================== --- head/cddl/contrib/opensolaris/head/thread.h Fri Oct 21 13:54:17 2011 (r226614) +++ head/cddl/contrib/opensolaris/head/thread.h Fri Oct 21 13:54:58 2011 (r226615) @@ -76,6 +76,7 @@ static __inline int thr_create(void *stack_base, size_t stack_size, void *(*start_func) (void*), void *arg, long flags, thread_t *new_thread_ID) { + pthread_t dummy; int ret; assert(stack_base == NULL); @@ -85,9 +86,12 @@ thr_create(void *stack_base, size_t stac pthread_attr_t attr; pthread_attr_init(&attr); - if(flags & THR_DETACHED) + if (flags & THR_DETACHED) pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + if (new_thread_ID == NULL) + new_thread_ID = &dummy; + /* This function ignores the THR_BOUND flag, since NPTL doesn't seem to support PTHREAD_SCOPE_PROCESS */ ret = pthread_create(new_thread_ID, &attr, start_func, arg); From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 13:56:18 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02F02106566B; Fri, 21 Oct 2011 13:56:18 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E60748FC12; Fri, 21 Oct 2011 13:56:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LDuHp5027213; Fri, 21 Oct 2011 13:56:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LDuHHD027211; Fri, 21 Oct 2011 13:56:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110211356.p9LDuHHD027211@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 13:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226616 - head/cddl/contrib/opensolaris/cmd/zdb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 13:56:18 -0000 Author: pjd Date: Fri Oct 21 13:56:17 2011 New Revision: 226616 URL: http://svn.freebsd.org/changeset/base/226616 Log: zdb: access dp_free_bpobj only if pool version is >= SPA_VERSION_DEADLISTS Submitted by: avg MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Oct 21 13:54:58 2011 (r226615) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Oct 21 13:56:17 2011 (r226616) @@ -2190,8 +2190,10 @@ dump_block_stats(spa_t *spa) */ (void) bpobj_iterate_nofree(&spa->spa_deferred_bpobj, count_block_cb, &zcb, NULL); - (void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj, - count_block_cb, &zcb, NULL); + if (spa_version(spa) >= SPA_VERSION_DEADLISTS) { + (void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj, + count_block_cb, &zcb, NULL); + } if (dump_opt['c'] > 1) flags |= TRAVERSE_PREFETCH_DATA; From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 14:00:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73FB0106567B; Fri, 21 Oct 2011 14:00:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3678FC1A; Fri, 21 Oct 2011 14:00:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LE0nnE027400; Fri, 21 Oct 2011 14:00:49 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LE0npd027398; Fri, 21 Oct 2011 14:00:49 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110211400.p9LE0npd027398@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 14:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226617 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 14:00:49 -0000 Author: pjd Date: Fri Oct 21 14:00:48 2011 New Revision: 226617 URL: http://svn.freebsd.org/changeset/base/226617 Log: zfs vdev_file_io_start: validate vdev before using vdev_tsd vdev_tsd can be NULL for certain vdev states. At least in userland testing with ztest. Submitted by: avg MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Fri Oct 21 13:56:17 2011 (r226616) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Fri Oct 21 14:00:48 2011 (r226617) @@ -153,17 +153,19 @@ static int vdev_file_io_start(zio_t *zio) { vdev_t *vd = zio->io_vd; - vdev_file_t *vf = vd->vdev_tsd; - vnode_t *vp = vf->vf_vnode; + vdev_file_t *vf; + vnode_t *vp; ssize_t resid; - if (zio->io_type == ZIO_TYPE_IOCTL) { - /* XXPOLICY */ - if (!vdev_readable(vd)) { - zio->io_error = ENXIO; - return (ZIO_PIPELINE_CONTINUE); - } + if (!vdev_readable(vd)) { + zio->io_error = ENXIO; + return (ZIO_PIPELINE_CONTINUE); + } + + vf = vd->vdev_tsd; + vp = vf->vf_vnode; + if (zio->io_type == ZIO_TYPE_IOCTL) { switch (zio->io_cmd) { case DKIOCFLUSHWRITECACHE: zio->io_error = VOP_FSYNC(vp, FSYNC | FDSYNC, From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 14:24:00 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1319E1065670; Fri, 21 Oct 2011 14:24:00 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCE038FC0A; Fri, 21 Oct 2011 14:23:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LENx0X028135; Fri, 21 Oct 2011 14:23:59 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LENxv2028133; Fri, 21 Oct 2011 14:23:59 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110211423.p9LENxv2028133@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 14:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226618 - head/lib/msun/man X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 14:24:00 -0000 Author: das Date: Fri Oct 21 14:23:59 2011 New Revision: 226618 URL: http://svn.freebsd.org/changeset/base/226618 Log: Minor corrections and clarifications regarding exceptions. Modified: head/lib/msun/man/fenv.3 Modified: head/lib/msun/man/fenv.3 ============================================================================== --- head/lib/msun/man/fenv.3 Fri Oct 21 14:00:48 2011 (r226617) +++ head/lib/msun/man/fenv.3 Fri Oct 21 14:23:59 2011 (r226618) @@ -91,24 +91,35 @@ The following macros expand to bit flags representing the five standard floating-point exceptions. .Bl -tag -width ".Dv FE_DIVBYZERO" .It Dv FE_DIVBYZERO -A divide-by-zero exception occurs when the program attempts to -divide a finite non-zero number by zero. +A divide-by-zero exception occurs when the +.Em exact +result of a computation is infinite (according to the limit definition). +For example, dividing a finite non-zero number by zero or computing +.Fn log 0 +raises a divide-by-zero exception. .It Dv FE_INEXACT -An inexact exception is raised whenever there is a loss of precision +An inexact exception is raised whenever there is a loss of accuracy due to rounding. .It Dv FE_INVALID Invalid operation exceptions occur when a program attempts to perform calculations for which there is no reasonable representable answer. -For instance, subtraction of infinities, division of zero by zero, -ordered comparison involving \*(Nas, and taking the square root of a +For instance, subtraction of like-signed infinities, division of zero by zero, +ordered comparison involving \*(Nas, and taking the real square root of a negative number are all invalid operations. .It Dv FE_OVERFLOW -An overflow exception occurs when the magnitude of the result of a -computation is too large to fit in the destination type. +In contrast with divide-by-zero, +an overflow exception occurs when an infinity is produced because +the magnitude of the exact result is +.Em finite +but too large to fit in the destination type. +For example, computing +.Li DBL_MAX * 2 +raises an overflow exception. .It Dv FE_UNDERFLOW -Underflow occurs when the result of a computation is too close to zero -to be represented as a non-zero value in the destination type. +Underflow occurs when the result of a computation loses precision +because it is too close to zero. +The result is a subnormal number or zero. .El .Pp Additionally, the @@ -183,9 +194,9 @@ as usual, but no .Dv SIGFPE signals will be generated as a result. Non-stop mode is the default, but it may be altered by -non-standard mechanisms. -.\" XXX Mention fe[gs]etmask() here after the interface is finalized -.\" XXX and ready to be officially documented. +.Fn feenableexcept +and +.Fn fedisableexcept . The .Fn feupdateenv function restores a saved environment similarly to From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 19:24:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 824D3106566C; Fri, 21 Oct 2011 19:24:05 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8B68FC0C; Fri, 21 Oct 2011 19:24:04 +0000 (UTC) Received: by iaky10 with SMTP id y10so6287976iak.13 for ; Fri, 21 Oct 2011 12:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1xMKvmowJZIMOoXObfPAm1JFMipMrKY3SfLRezK2+7Y=; b=wo37feE/MMe23TL1w8gKj5mR0kPg0Fncdcy9ZYH30v1nrg/T58zkFTsfcrSpFLmbv2 fVIZI9Wbls03IB/JrOs5HVJwAU4pHoltHXw8vpV4DKWd1aaQOkPDqpkw6YVoUKrsk12h bnWa2oSF4nY8cpQfUGuDBPgN6lpyYt0lTyTBM= MIME-Version: 1.0 Received: by 10.231.69.146 with SMTP id z18mr6089076ibi.79.1319223467163; Fri, 21 Oct 2011 11:57:47 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.231.53.213 with HTTP; Fri, 21 Oct 2011 11:57:47 -0700 (PDT) In-Reply-To: <201110191104.p9JB4nlK021378@svn.freebsd.org> References: <201110191104.p9JB4nlK021378@svn.freebsd.org> Date: Fri, 21 Oct 2011 20:57:47 +0200 X-Google-Sender-Auth: tIv0lPO9hepT8ECJnopgHwjRkmk Message-ID: From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226536 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 19:24:05 -0000 On Wed, Oct 19, 2011 at 1:04 PM, Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Oct 19 11:04:49 2011 > New Revision: 226536 > URL: http://svn.freebsd.org/changeset/base/226536 > > Log: > =A0De-virtualize the pf_task_mtx lock. =A0At the current state of pf lock= ing > =A0and virtualization it is not helpful but complicates things. I would disagree with this since its a step backwards and different direction with pf(4) code in general. The patch to actually fix it for vimage enabled kernels was simpler! > > =A0Current state of art is to not virtualize these kinds of locks - > =A0inp_group/hash/info/.. are all not virtualized either. > > =A0MFC after: =A0 =A03 days > > Modified: > =A0head/sys/contrib/pf/net/pf_ioctl.c > =A0head/sys/contrib/pf/net/pfvar.h > > Modified: head/sys/contrib/pf/net/pf_ioctl.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/contrib/pf/net/pf_ioctl.c =A0Wed Oct 19 10:16:42 2011 =A0 = =A0 =A0 =A0(r226535) > +++ head/sys/contrib/pf/net/pf_ioctl.c =A0Wed Oct 19 11:04:49 2011 =A0 = =A0 =A0 =A0(r226536) > @@ -266,7 +266,7 @@ static struct cdevsw pf_cdevsw =3D { > =A0static volatile VNET_DEFINE(int, pf_pfil_hooked); > =A0#define V_pf_pfil_hooked =A0 =A0 =A0 VNET(pf_pfil_hooked) > =A0VNET_DEFINE(int, =A0 =A0 =A0 =A0 =A0 =A0 =A0 pf_end_threads); > -VNET_DEFINE(struct mtx, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pf_task_mtx); > +struct mtx =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pf_task_mtx; > > =A0/* pfsync */ > =A0pfsync_state_import_t =A0 =A0 =A0 =A0 =A0*pfsync_state_import_ptr =3D = NULL; > @@ -287,18 +287,18 @@ SYSCTL_VNET_INT(_debug, OID_AUTO, pfugid > =A0 =A0 =A0 =A0&VNET_NAME(debug_pfugidhack), 0, > =A0 =A0 =A0 =A0"Enable/disable pf user/group rules mpsafe hack"); > > -void > +static void > =A0init_pf_mutex(void) > =A0{ > > - =A0 =A0 =A0 mtx_init(&V_pf_task_mtx, "pf task mtx", NULL, MTX_DEF); > + =A0 =A0 =A0 mtx_init(&pf_task_mtx, "pf task mtx", NULL, MTX_DEF); > =A0} > > -void > +static void > =A0destroy_pf_mutex(void) > =A0{ > > - =A0 =A0 =A0 mtx_destroy(&V_pf_task_mtx); > + =A0 =A0 =A0 mtx_destroy(&pf_task_mtx); > =A0} > =A0void > =A0init_zone_var(void) > @@ -4381,11 +4381,8 @@ pf_load(void) > > =A0 =A0 =A0 =A0init_zone_var(); > =A0 =A0 =A0 =A0sx_init(&V_pf_consistency_lock, "pf_statetbl_lock"); > - =A0 =A0 =A0 init_pf_mutex(); > - =A0 =A0 =A0 if (pfattach() < 0) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 destroy_pf_mutex(); > + =A0 =A0 =A0 if (pfattach() < 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (ENOMEM); > - =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0return (0); > =A0} > @@ -4413,14 +4410,13 @@ pf_unload(void) > =A0 =A0 =A0 =A0V_pf_end_threads =3D 1; > =A0 =A0 =A0 =A0while (V_pf_end_threads < 2) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0wakeup_one(pf_purge_thread); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 msleep(pf_purge_thread, &V_pf_task_mtx, 0, = "pftmo", hz); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 msleep(pf_purge_thread, &pf_task_mtx, 0, "p= ftmo", hz); > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0pfi_cleanup(); > =A0 =A0 =A0 =A0pf_osfp_flush(); > =A0 =A0 =A0 =A0pf_osfp_cleanup(); > =A0 =A0 =A0 =A0cleanup_pf_zone(); > =A0 =A0 =A0 =A0PF_UNLOCK(); > - =A0 =A0 =A0 destroy_pf_mutex(); > =A0 =A0 =A0 =A0sx_destroy(&V_pf_consistency_lock); > =A0 =A0 =A0 =A0return error; > =A0} > @@ -4432,10 +4428,12 @@ pf_modevent(module_t mod, int type, void > > =A0 =A0 =A0 =A0switch(type) { > =A0 =A0 =A0 =A0case MOD_LOAD: > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 init_pf_mutex(); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pf_dev =3D make_dev(&pf_cdevsw, 0, 0, 0, 0= 600, PF_NAME); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0case MOD_UNLOAD: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0destroy_dev(pf_dev); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 destroy_pf_mutex(); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0default: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0error =3D EINVAL; > > Modified: head/sys/contrib/pf/net/pfvar.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/contrib/pf/net/pfvar.h =A0 =A0 Wed Oct 19 10:16:42 2011 =A0 = =A0 =A0 =A0(r226535) > +++ head/sys/contrib/pf/net/pfvar.h =A0 =A0 Wed Oct 19 11:04:49 2011 =A0 = =A0 =A0 =A0(r226536) > @@ -237,19 +237,18 @@ struct pfi_dynaddr { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0uma_zdestroy(var) > > =A0#ifdef __FreeBSD__ > -VNET_DECLARE(struct mtx, =A0 =A0 =A0 =A0pf_task_mtx); > -#define =A0 =A0 =A0 =A0V_pf_task_mtx =A0 =A0 =A0 =A0 =A0 =A0VNET(pf_task= _mtx) > +extern struct mtx pf_task_mtx; > > -#define =A0 =A0 =A0 =A0PF_LOCK_ASSERT() =A0 =A0 =A0 =A0mtx_assert(&V_pf_= task_mtx, MA_OWNED) > -#define =A0 =A0 =A0 =A0PF_UNLOCK_ASSERT() =A0 =A0 =A0mtx_assert(&V_pf_ta= sk_mtx, MA_NOTOWNED) > +#define =A0 =A0 =A0 =A0PF_LOCK_ASSERT() =A0 =A0 =A0 =A0mtx_assert(&pf_ta= sk_mtx, MA_OWNED) > +#define =A0 =A0 =A0 =A0PF_UNLOCK_ASSERT() =A0 =A0 =A0mtx_assert(&pf_task= _mtx, MA_NOTOWNED) > > =A0#define =A0 =A0 =A0 =A0PF_LOCK() =A0 =A0 =A0 do { =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0 =A0 =A0 =A0PF_UNLOCK_ASSERT(); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 \ > - =A0 =A0 =A0 mtx_lock(&V_pf_task_mtx); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 \ > + =A0 =A0 =A0 mtx_lock(&pf_task_mtx); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 \ > =A0} while(0) > =A0#define =A0 =A0 =A0 =A0PF_UNLOCK() =A0 =A0 do { =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0 =A0 =A0 =A0PF_LOCK_ASSERT(); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 \ > - =A0 =A0 =A0 mtx_unlock(&V_pf_task_mtx); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 \ > + =A0 =A0 =A0 mtx_unlock(&pf_task_mtx); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 \ > =A0} while(0) > =A0#else > =A0#define =A0 =A0 =A0 =A0PF_LOCK_ASSERT() > @@ -270,9 +269,6 @@ VNET_DECLARE(struct mtx, =A0 =A0 pf_task_mtx); > =A0 =A0 =A0 =A0PF_LOCK(); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0} while(0) > > -extern void init_pf_mutex(void); > -extern void destroy_pf_mutex(void); > - > =A0#define =A0 =A0 =A0 =A0PF_MODVER =A0 =A0 =A0 1 > =A0#define =A0 =A0 =A0 =A0PFLOG_MODVER =A0 =A01 > =A0#define =A0 =A0 =A0 =A0PFSYNC_MODVER =A0 1 > --=20 Ermal From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 20:15:22 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 24518106566B; Fri, 21 Oct 2011 20:15:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id C422D14D85D; Fri, 21 Oct 2011 20:15:20 +0000 (UTC) Message-ID: <4EA1D2D7.7050203@FreeBSD.org> Date: Fri, 21 Oct 2011 13:15:19 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Gleb Smirnoff References: <201110211354.p9LDsHBD027058@svn.freebsd.org> In-Reply-To: <201110211354.p9LDsHBD027058@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226614 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 20:15:22 -0000 On 10/21/2011 06:54, Gleb Smirnoff wrote: > +It is not possible to guard allocations that really expect theirselves to be s/theirselves/themselves/ Running this through aspell should have caught this. :) Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 20:23:40 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DE32106566B; Fri, 21 Oct 2011 20:23:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CE8D8FC08; Fri, 21 Oct 2011 20:23:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LKNeL7039448; Fri, 21 Oct 2011 20:23:40 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LKNeBq039446; Fri, 21 Oct 2011 20:23:40 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110212023.p9LKNeBq039446@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 21 Oct 2011 20:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226619 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 20:23:40 -0000 Author: glebius Date: Fri Oct 21 20:23:40 2011 New Revision: 226619 URL: http://svn.freebsd.org/changeset/base/226619 Log: Spelling. Submitted by: dougb Modified: head/share/man/man9/memguard.9 Modified: head/share/man/man9/memguard.9 ============================================================================== --- head/share/man/man9/memguard.9 Fri Oct 21 14:23:59 2011 (r226618) +++ head/share/man/man9/memguard.9 Fri Oct 21 20:23:40 2011 (r226619) @@ -205,7 +205,7 @@ and .An Gleb Smirnoff Aq glebius@FreeBSD.org to both the implementation and the documentation. .Sh BUGS -It is not possible to guard allocations that really expect theirselves to be +It is not possible to guard allocations that really expect themselves to be allocated from .Xr uma 9 , utilizing additional interfaces apart from From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 20:32:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 24962106566C; Fri, 21 Oct 2011 20:32:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id A3194151CA4; Fri, 21 Oct 2011 20:32:15 +0000 (UTC) Message-ID: <4EA1D6CF.4060104@FreeBSD.org> Date: Fri, 21 Oct 2011 13:32:15 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Gleb Smirnoff References: <201110212023.p9LKNeBq039446@svn.freebsd.org> In-Reply-To: <201110212023.p9LKNeBq039446@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226619 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 20:32:23 -0000 On 10/21/2011 13:23, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Oct 21 20:23:40 2011 > New Revision: 226619 > URL: http://svn.freebsd.org/changeset/base/226619 > > Log: > Spelling. Thanks. :) > Submitted by: dougb > > Modified: > head/share/man/man9/memguard.9 > > Modified: head/share/man/man9/memguard.9 > ============================================================================== > --- head/share/man/man9/memguard.9 Fri Oct 21 14:23:59 2011 (r226618) > +++ head/share/man/man9/memguard.9 Fri Oct 21 20:23:40 2011 (r226619) > @@ -205,7 +205,7 @@ and > .An Gleb Smirnoff Aq glebius@FreeBSD.org > to both the implementation and the documentation. > .Sh BUGS > -It is not possible to guard allocations that really expect theirselves to be > +It is not possible to guard allocations that really expect themselves to be > allocated from > .Xr uma 9 , > utilizing additional interfaces apart from > -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 21:49:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A57106564A; Fri, 21 Oct 2011 21:49:34 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7636F8FC16; Fri, 21 Oct 2011 21:49:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LLnYMZ042648; Fri, 21 Oct 2011 21:49:34 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LLnYTe042645; Fri, 21 Oct 2011 21:49:34 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110212149.p9LLnYTe042645@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 21:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226620 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 21:49:34 -0000 Author: pjd Date: Fri Oct 21 21:49:34 2011 New Revision: 226620 URL: http://svn.freebsd.org/changeset/base/226620 Log: Update per-thread I/O statistics collection in ZFS. This allows to see processes I/O activity in 'top -m io' output. PR kern/156218 Reported by: Marcus Reid Patch by: avg MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Oct 21 20:23:40 2011 (r226619) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Oct 21 21:49:34 2011 (r226620) @@ -627,6 +627,10 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio } else if (db->db_state == DB_UNCACHED) { spa_t *spa = dn->dn_objset->os_spa; +#ifdef _KERNEL + curthread->td_ru.ru_inblock++; +#endif + if (zio == NULL) zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); dbuf_read_impl(db, zio, &flags); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Oct 21 20:23:40 2011 (r226619) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Oct 21 21:49:34 2011 (r226620) @@ -397,9 +397,12 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, return (EIO); } /* initiate async i/o */ - if (read) { + if (read) (void) dbuf_read(db, zio, dbuf_flags); - } +#ifdef _KERNEL + else + curthread->td_ru.ru_oublock++; +#endif dbp[i] = &db->db; } rw_exit(&dn->dn_struct_rwlock); From owner-svn-src-head@FreeBSD.ORG Fri Oct 21 22:28:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59C7A106564A; Fri, 21 Oct 2011 22:28:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48FA68FC1B; Fri, 21 Oct 2011 22:28:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LMSGrf044258; Fri, 21 Oct 2011 22:28:16 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LMSGhn044256; Fri, 21 Oct 2011 22:28:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110212228.p9LMSGhn044256@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 21 Oct 2011 22:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226623 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 22:28:16 -0000 Author: glebius Date: Fri Oct 21 22:28:15 2011 New Revision: 226623 URL: http://svn.freebsd.org/changeset/base/226623 Log: Fix a race: we should update sc_len before dropping the pf lock, otherwise a number of packets can be queued on sc, while we are in ip_output(), and then we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to writing beyond our mbuf cluster. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Fri Oct 21 22:12:24 2011 (r226622) +++ head/sys/contrib/pf/net/if_pfsync.c Fri Oct 21 22:28:15 2011 (r226623) @@ -2354,6 +2354,7 @@ pfsync_sendout(void) sc->sc_if.if_obytes += m->m_pkthdr.len; #endif + sc->sc_len = PFSYNC_MINPKT; #ifdef __FreeBSD__ PF_UNLOCK(); #endif @@ -2375,9 +2376,6 @@ pfsync_sendout(void) #ifdef __FreeBSD__ } #endif - - /* start again */ - sc->sc_len = PFSYNC_MINPKT; } void From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 00:27:27 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B508106566C; Sat, 22 Oct 2011 00:27:27 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f07:14d3:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id 1BA078FC15; Sat, 22 Oct 2011 00:27:27 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f07:14d3:1::5]) by mail.farley.org (8.14.5/8.14.5) with ESMTP id p9M0RPgi082607; Fri, 21 Oct 2011 20:27:25 -0400 (EDT) (envelope-from scf@FreeBSD.org) Date: Fri, 21 Oct 2011 20:27:25 -0400 (EDT) From: "Sean C. Farley" To: Doug Barton In-Reply-To: <4EA1D2D7.7050203@FreeBSD.org> Message-ID: References: <201110211354.p9LDsHBD027058@svn.freebsd.org> <4EA1D2D7.7050203@FreeBSD.org> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-1.4 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.farley.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org Subject: Re: svn commit: r226614 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 00:27:27 -0000 On Fri, 21 Oct 2011, Doug Barton wrote: > On 10/21/2011 06:54, Gleb Smirnoff wrote: > >> +It is not possible to guard allocations that really expect >> theirselves to be > > s/theirselves/themselves/ Running this through aspell should have > caught this. :) ispell says it is OK. It is in /usr/share/dict/web2. Of course, "themselves" is much more commonly used while "theirselves" appears to be more logical[1]. :) Sean 1. http://color-connection.com/EngVW/Lessons/lesson1.htm -- scf@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 01:09:51 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 25D0E106568B; Sat, 22 Oct 2011 01:09:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 0BADA179EB9; Sat, 22 Oct 2011 01:09:40 +0000 (UTC) Message-ID: <4EA217D4.20601@FreeBSD.org> Date: Fri, 21 Oct 2011 18:09:40 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: "Sean C. Farley" References: <201110211354.p9LDsHBD027058@svn.freebsd.org> <4EA1D2D7.7050203@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org Subject: Re: svn commit: r226614 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 01:09:51 -0000 On 10/21/2011 17:27, Sean C. Farley wrote: > On Fri, 21 Oct 2011, Doug Barton wrote: > >> On 10/21/2011 06:54, Gleb Smirnoff wrote: >> >>> +It is not possible to guard allocations that really expect >>> theirselves to be >> >> s/theirselves/themselves/ Running this through aspell should have >> caught this. :) > > ispell says it is OK. That's why I specifically said aspell. :) It tends to do a better job identifying technically-acceptable-but-not-mainstream usage. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 04:39:12 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB7721065673; Sat, 22 Oct 2011 04:39:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB5418FC0C; Sat, 22 Oct 2011 04:39:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9M4dC80060019; Sat, 22 Oct 2011 04:39:12 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9M4dCxn060017; Sat, 22 Oct 2011 04:39:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110220439.p9M4dCxn060017@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 22 Oct 2011 04:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226625 - head/lib/libpam/libpam X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 04:39:12 -0000 Author: des Date: Sat Oct 22 04:39:12 2011 New Revision: 226625 URL: http://svn.freebsd.org/changeset/base/226625 Log: openpam_static.c isn't auto-generated. Modified: head/lib/libpam/libpam/Makefile Modified: head/lib/libpam/libpam/Makefile ============================================================================== --- head/lib/libpam/libpam/Makefile Sat Oct 22 01:29:35 2011 (r226624) +++ head/lib/libpam/libpam/Makefile Sat Oct 22 04:39:12 2011 (r226625) @@ -55,6 +55,7 @@ SRCS= openpam_borrow_cred.c \ openpam_readline.c \ openpam_restore_cred.c \ openpam_set_option.c \ + openpam_static.c \ openpam_ttyconv.c \ pam_acct_mgmt.c \ pam_authenticate.c \ @@ -153,15 +154,11 @@ MODULE_DIR= ../modules .include "${.CURDIR}/${MODULE_DIR}/modules.inc" STATIC_MODULES= ${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/} STATICOBJS+= openpam_static_modules.o -CLEANFILES+= openpam_static.o \ - openpam_static_modules.o +CLEANFILES+= openpam_static_modules.o openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC} -# Can't put openpam_static.c in SRCS but want .o in .depend. -DPSRCS= openpam_static.c - # Headers INCS= ${HEADERS} ${ADD_HEADERS} INCSDIR= ${INCLUDEDIR}/security From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 14:08:22 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A777106564A; Sat, 22 Oct 2011 14:08:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39DD48FC13; Sat, 22 Oct 2011 14:08:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ME8MN2082517; Sat, 22 Oct 2011 14:08:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ME8MI2082515; Sat, 22 Oct 2011 14:08:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110221408.p9ME8MI2082515@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 22 Oct 2011 14:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226632 - head/lib/libpam/libpam X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 14:08:22 -0000 Author: des Date: Sat Oct 22 14:08:21 2011 New Revision: 226632 URL: http://svn.freebsd.org/changeset/base/226632 Log: Revert the previous commit and add a comment explaining why it was wrong. Modified: head/lib/libpam/libpam/Makefile Modified: head/lib/libpam/libpam/Makefile ============================================================================== --- head/lib/libpam/libpam/Makefile Sat Oct 22 11:42:48 2011 (r226631) +++ head/lib/libpam/libpam/Makefile Sat Oct 22 14:08:21 2011 (r226632) @@ -55,7 +55,6 @@ SRCS= openpam_borrow_cred.c \ openpam_readline.c \ openpam_restore_cred.c \ openpam_set_option.c \ - openpam_static.c \ openpam_ttyconv.c \ pam_acct_mgmt.c \ pam_authenticate.c \ @@ -149,16 +148,29 @@ HEADERS= security/openpam.h \ ADD_HEADERS= security/pam_mod_misc.h +# # Static modules +# +# We build static versions of all modules and of openpam_static.o, +# then link them all together into openpam_static_modules.o. None of +# the modules export any symbols, but they store structures with +# pointers to their service functions in a linker set which the code +# in openpam_static.c traverses to locate the individual modules. +# MODULE_DIR= ../modules .include "${.CURDIR}/${MODULE_DIR}/modules.inc" STATIC_MODULES= ${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/} STATICOBJS+= openpam_static_modules.o -CLEANFILES+= openpam_static_modules.o +CLEANFILES+= openpam_static.o \ + openpam_static_modules.o openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC} +# We can't put openpam_static.c in SRCS, but we still want to scan it +# for dependencies. +DPSRCS= openpam_static.c + # Headers INCS= ${HEADERS} ${ADD_HEADERS} INCSDIR= ${INCLUDEDIR}/security From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 14:08:46 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32EDF106564A; Sat, 22 Oct 2011 14:08:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8BF8FC22; Sat, 22 Oct 2011 14:08:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ME8jC9082575; Sat, 22 Oct 2011 14:08:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ME8jPH082558; Sat, 22 Oct 2011 14:08:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201110221408.p9ME8jPH082558@svn.freebsd.org> From: Dimitry Andric Date: Sat, 22 Oct 2011 14:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226633 - in head: . contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llvm/include/llvm/Analysis contri... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 14:08:46 -0000 Author: dim Date: Sat Oct 22 14:08:43 2011 New Revision: 226633 URL: http://svn.freebsd.org/changeset/base/226633 Log: Upgrade our copy of llvm/clang to r142614, from upstream's release_30 branch. This brings us very close to the 3.0 release, which is expected in a week or two. MFC after: 1 week Added: head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm-c/Transforms/PassManagerBuilder.h head/contrib/llvm/include/llvm/ADT/TinyPtrVector.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/ADT/TinyPtrVector.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Analysis/BlockFrequencyInfo.h head/contrib/llvm/include/llvm/Analysis/LoopIterator.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Analysis/LoopIterator.h head/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/CodeGen/LexicalScopes.h head/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/CodeGen/MachineBlockFrequencyInfo.h head/contrib/llvm/include/llvm/DebugInfo/ - copied from r226587, vendor/llvm/dist/include/llvm/DebugInfo/ head/contrib/llvm/include/llvm/MC/MCAsmBackend.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h head/contrib/llvm/include/llvm/MC/MCAtom.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCAtom.h head/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCCodeGenInfo.h head/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCInstrAnalysis.h head/contrib/llvm/include/llvm/MC/MCModule.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCModule.h head/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCObjectFileInfo.h head/contrib/llvm/include/llvm/MC/MCTargetAsmLexer.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCTargetAsmLexer.h head/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MCTargetAsmParser.h head/contrib/llvm/include/llvm/MC/MachineLocation.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/MC/MachineLocation.h head/contrib/llvm/include/llvm/Object/Archive.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Object/Archive.h head/contrib/llvm/include/llvm/Object/MachO.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Object/MachO.h head/contrib/llvm/include/llvm/Support/BlockFrequency.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Support/BlockFrequency.h head/contrib/llvm/include/llvm/Support/Capacity.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Support/Capacity.h head/contrib/llvm/include/llvm/Support/CodeGen.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Support/CodeGen.h head/contrib/llvm/include/llvm/Support/DataExtractor.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Support/DataExtractor.h head/contrib/llvm/include/llvm/Support/GCOV.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Support/GCOV.h head/contrib/llvm/include/llvm/Support/TargetRegistry.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Support/TargetRegistry.h head/contrib/llvm/include/llvm/Support/TargetSelect.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Support/TargetSelect.h head/contrib/llvm/include/llvm/TableGen/ - copied from r226587, vendor/llvm/dist/include/llvm/TableGen/ head/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Transforms/IPO/PassManagerBuilder.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h - copied unchanged from r226587, vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyIndVar.h head/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Analysis/BlockFrequencyInfo.cpp head/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp head/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/CodeGen/ExpandPostRAPseudos.cpp head/contrib/llvm/lib/CodeGen/LexicalScopes.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/CodeGen/LexicalScopes.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.h - copied unchanged from r226587, vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.h head/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/CodeGen/MachineBlockFrequencyInfo.cpp head/contrib/llvm/lib/DebugInfo/ - copied from r226587, vendor/llvm/dist/lib/DebugInfo/ head/contrib/llvm/lib/MC/MCAsmBackend.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCAsmBackend.cpp head/contrib/llvm/lib/MC/MCAtom.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCAtom.cpp head/contrib/llvm/lib/MC/MCCodeGenInfo.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCCodeGenInfo.cpp head/contrib/llvm/lib/MC/MCInstrAnalysis.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCInstrAnalysis.cpp head/contrib/llvm/lib/MC/MCModule.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCModule.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCParser/MCTargetAsmParser.cpp head/contrib/llvm/lib/MC/MCTargetAsmLexer.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/MC/MCTargetAsmLexer.cpp head/contrib/llvm/lib/Object/Archive.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Object/Archive.cpp head/contrib/llvm/lib/Support/BlockFrequency.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Support/BlockFrequency.cpp head/contrib/llvm/lib/Support/DataExtractor.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Support/DataExtractor.cpp head/contrib/llvm/lib/TableGen/ - copied from r226587, vendor/llvm/dist/lib/TableGen/ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MipsCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MipsJITInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsJITInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MipsJITInfo.h head/contrib/llvm/lib/Target/Mips/MipsRelocations.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/Mips/MipsRelocations.h head/contrib/llvm/lib/Target/PTX/InstPrinter/ - copied from r226587, vendor/llvm/dist/lib/Target/PTX/InstPrinter/ head/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h head/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXAsmPrinter.h head/contrib/llvm/lib/Target/PTX/PTXFPRoundingModePass.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXFPRoundingModePass.cpp head/contrib/llvm/lib/Target/PTX/PTXInstrLoadStore.td - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXInstrLoadStore.td head/contrib/llvm/lib/Target/PTX/PTXMCInstLower.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXMCInstLower.cpp head/contrib/llvm/lib/Target/PTX/PTXParamManager.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXParamManager.cpp head/contrib/llvm/lib/Target/PTX/PTXParamManager.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXParamManager.h head/contrib/llvm/lib/Target/PTX/PTXRegAlloc.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXRegAlloc.cpp head/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PTX/PTXSelectionDAGInfo.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86BaseInfo.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h - copied unchanged from r226587, vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86FixupKinds.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp head/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Target/X86/X86VZeroUpper.cpp head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/Transforms/Utils/SimplifyIndVar.cpp head/contrib/llvm/lib/VMCore/GCOV.cpp - copied unchanged from r226587, vendor/llvm/dist/lib/VMCore/GCOV.cpp head/contrib/llvm/tools/clang/include/clang/AST/BaseSubobject.h - copied unchanged from r226607, vendor/clang/dist/include/clang/AST/BaseSubobject.h head/contrib/llvm/tools/clang/include/clang/AST/SelectorLocationsKind.h - copied unchanged from r226607, vendor/clang/dist/include/clang/AST/SelectorLocationsKind.h head/contrib/llvm/tools/clang/include/clang/AST/VTTBuilder.h - copied unchanged from r226607, vendor/clang/dist/include/clang/AST/VTTBuilder.h head/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h - copied unchanged from r226607, vendor/clang/dist/include/clang/AST/VTableBuilder.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafety.h head/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Basic/LLVM.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def - copied, changed from r226607, vendor/clang/dist/include/clang/Basic/LangOptions.def head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Frontend/ChainedDiagnosticConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Frontend/VerifyDiagnosticConsumer.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Lex/ModuleLoader.h head/contrib/llvm/tools/clang/include/clang/Sema/MultiInitializer.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Sema/MultiInitializer.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaFixItUtils.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Sema/SemaFixItUtils.h head/contrib/llvm/tools/clang/include/clang/Sema/Weak.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Sema/Weak.h head/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Serialization/ContinuousRangeMap.h head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Serialization/Module.h head/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h - copied unchanged from r226607, vendor/clang/dist/include/clang/Serialization/ModuleManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ClangCheckers.h - copied unchanged from r226607, vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/ClangCheckers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h - copied unchanged from r226607, vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerOptInfo.h - copied unchanged from r226607, vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerOptInfo.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h - copied unchanged from r226607, vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerRegistry.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h - copied unchanged from r226607, vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h - copied unchanged from r226607, vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h - copied unchanged from r226607, vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h head/contrib/llvm/tools/clang/lib/ARCMigrate/PlistReporter.cpp - copied unchanged from r226607, vendor/clang/dist/lib/ARCMigrate/PlistReporter.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransAPIUses.cpp - copied unchanged from r226607, vendor/clang/dist/lib/ARCMigrate/TransAPIUses.cpp head/contrib/llvm/tools/clang/lib/AST/SelectorLocationsKind.cpp - copied unchanged from r226607, vendor/clang/dist/lib/AST/SelectorLocationsKind.cpp head/contrib/llvm/tools/clang/lib/AST/VTTBuilder.cpp - copied unchanged from r226607, vendor/clang/dist/lib/AST/VTTBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp - copied unchanged from r226607, vendor/clang/dist/lib/AST/VTableBuilder.cpp head/contrib/llvm/tools/clang/lib/Analysis/ProgramPoint.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Analysis/ProgramPoint.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Analysis/ThreadSafety.cpp head/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Basic/LangOptions.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp - copied unchanged from r226607, vendor/clang/dist/lib/CodeGen/CGCUDANV.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.cpp - copied unchanged from r226607, vendor/clang/dist/lib/CodeGen/CGCUDARuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.h - copied unchanged from r226607, vendor/clang/dist/lib/CodeGen/CGCUDARuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp - copied unchanged from r226607, vendor/clang/dist/lib/CodeGen/CGOpenCLRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h - copied unchanged from r226607, vendor/clang/dist/lib/CodeGen/CGOpenCLRuntime.h head/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Frontend/VerifyDiagnosticConsumer.cpp head/contrib/llvm/tools/clang/lib/Headers/stdalign.h - copied unchanged from r226607, vendor/clang/dist/lib/Headers/stdalign.h head/contrib/llvm/tools/clang/lib/Sema/MultiInitializer.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Sema/MultiInitializer.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Sema/SemaCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Sema/SemaFixItUtils.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h - copied unchanged from r226607, vendor/clang/dist/lib/Serialization/ASTReaderInternals.h head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Serialization/Module.cpp head/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp - copied unchanged from r226607, vendor/clang/dist/lib/Serialization/ModuleManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Checker.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Core/Checker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Core/CheckerRegistry.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineC.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp - copied unchanged from r226607, vendor/clang/dist/lib/StaticAnalyzer/Core/ProgramState.cpp head/contrib/llvm/tools/clang/utils/ - copied from r226609, vendor/clang/dist/utils/ head/lib/clang/include/ARMGenDisassemblerTables.inc (contents, props changed) head/lib/clang/include/clang/Parse/ head/lib/clang/include/clang/Parse/AttrLateParsed.inc (contents, props changed) head/lib/clang/libllvmtablegen/ head/lib/clang/libllvmtablegen/Makefile (contents, props changed) head/usr.bin/clang/clang-tblgen/ head/usr.bin/clang/clang-tblgen/Makefile (contents, props changed) Deleted: head/contrib/llvm/include/llvm/Analysis/BlockFrequency.h head/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequency.h head/contrib/llvm/include/llvm/CodeGen/MachineLocation.h head/contrib/llvm/include/llvm/CompilerDriver/ head/contrib/llvm/include/llvm/Support/PassManagerBuilder.h head/contrib/llvm/include/llvm/Target/TargetAsmBackend.h head/contrib/llvm/include/llvm/Target/TargetAsmInfo.h head/contrib/llvm/include/llvm/Target/TargetAsmLexer.h head/contrib/llvm/include/llvm/Target/TargetAsmParser.h head/contrib/llvm/include/llvm/Target/TargetRegistry.h head/contrib/llvm/include/llvm/Target/TargetSelect.h head/contrib/llvm/lib/Analysis/BlockFrequency.cpp head/contrib/llvm/lib/CodeGen/LowerSubregs.cpp head/contrib/llvm/lib/CodeGen/MachineBlockFrequency.cpp head/contrib/llvm/lib/CompilerDriver/ head/contrib/llvm/lib/DebugInfo/CMakeLists.txt head/contrib/llvm/lib/DebugInfo/Makefile head/contrib/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt head/contrib/llvm/lib/ExecutionEngine/MCJIT/Makefile head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Makefile head/contrib/llvm/lib/MC/MCParser/TargetAsmParser.cpp head/contrib/llvm/lib/MC/TargetAsmBackend.cpp head/contrib/llvm/lib/Object/CMakeLists.txt head/contrib/llvm/lib/Object/Makefile head/contrib/llvm/lib/TableGen/CMakeLists.txt head/contrib/llvm/lib/TableGen/Makefile head/contrib/llvm/lib/Target/ARM/ARMAddressingModes.h head/contrib/llvm/lib/Target/ARM/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInfo.h head/contrib/llvm/lib/Target/ARM/ARMFixupKinds.h head/contrib/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/ARMMCExpr.cpp head/contrib/llvm/lib/Target/ARM/ARMMCExpr.h head/contrib/llvm/lib/Target/ARM/ARMMachObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.h head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h head/contrib/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h head/contrib/llvm/lib/Target/ARM/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/ARM/InstPrinter/Makefile head/contrib/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/ARM/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/ARM/NEONMoveFix.cpp head/contrib/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/Alpha/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/Blackfin/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/MBlaze/AsmParser/CMakeLists.txt head/contrib/llvm/lib/Target/MBlaze/AsmParser/Makefile head/contrib/llvm/lib/Target/MBlaze/Disassembler/CMakeLists.txt head/contrib/llvm/lib/Target/MBlaze/Disassembler/Makefile head/contrib/llvm/lib/Target/MBlaze/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/MBlaze/InstPrinter/Makefile head/contrib/llvm/lib/Target/MBlaze/MBlazeAsmBackend.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeMCCodeEmitter.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/MSP430/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/MSP430/InstPrinter/Makefile head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/Mips/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/Mips/InstPrinter/Makefile head/contrib/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/Mips/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/PTX/CMakeLists.txt head/contrib/llvm/lib/Target/PTX/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/PTX/InstPrinter/Makefile head/contrib/llvm/lib/Target/PTX/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/PTX/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/PTX/PTXCallingConv.td head/contrib/llvm/lib/Target/PTX/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/PTX/TargetInfo/Makefile head/contrib/llvm/lib/Target/PTX/generate-register-td.py head/contrib/llvm/lib/Target/PowerPC/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/PowerPC/InstPrinter/Makefile head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/PowerPC/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFixupKinds.h head/contrib/llvm/lib/Target/PowerPC/PPCMCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCPredicates.cpp head/contrib/llvm/lib/Target/PowerPC/PPCPredicates.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/TargetAsmInfo.cpp head/contrib/llvm/lib/Target/TargetAsmLexer.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/X86/InstPrinter/Makefile head/contrib/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/X86/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/X86/SSEDomainFix.cpp head/contrib/llvm/lib/Target/X86/Utils/CMakeLists.txt head/contrib/llvm/lib/Target/X86/Utils/Makefile head/contrib/llvm/lib/Target/X86/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/X86FixupKinds.h head/contrib/llvm/lib/Target/X86/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86MachObjectWriter.cpp head/contrib/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/XCore/MCTargetDesc/Makefile head/contrib/llvm/lib/Transforms/IPO/LowerSetJmp.cpp head/contrib/llvm/lib/Transforms/Scalar/TailDuplication.cpp head/contrib/llvm/tools/clang/include/clang/Config/ head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticClient.h head/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticsClient.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTSerializationListener.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerProvider.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticClients.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h head/contrib/llvm/tools/clang/lib/ARCMigrate/CMakeLists.txt head/contrib/llvm/tools/clang/lib/ARCMigrate/Makefile head/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticsClient.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXCast.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/CMakeLists.txt head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Makefile head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CMakeLists.txt head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CXXExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/FlatStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/GRState.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Makefile head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/Makefile head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Makefile head/contrib/llvm/tools/clang/lib/StaticAnalyzer/README.txt head/contrib/llvm/tools/clang/utils/ABITest/ head/contrib/llvm/tools/clang/utils/C++Tests/ head/contrib/llvm/tools/clang/utils/CIndex/ head/contrib/llvm/tools/clang/utils/CaptureCmd head/contrib/llvm/tools/clang/utils/CmpDriver head/contrib/llvm/tools/clang/utils/FindSpecRefs head/contrib/llvm/tools/clang/utils/FuzzTest head/contrib/llvm/tools/clang/utils/OptionalTests/ head/contrib/llvm/tools/clang/utils/SummarizeErrors head/contrib/llvm/tools/clang/utils/TestUtils/ head/contrib/llvm/tools/clang/utils/VtableTest/ head/contrib/llvm/tools/clang/utils/analyzer/ head/contrib/llvm/tools/clang/utils/builtin-defines.c head/contrib/llvm/tools/clang/utils/clang-completion-mode.el head/contrib/llvm/tools/clang/utils/clangVisualizers.txt head/contrib/llvm/tools/clang/utils/token-delta.py head/contrib/llvm/tools/clang/utils/valgrind/ head/contrib/llvm/utils/TableGen/ClangASTNodesEmitter.cpp head/contrib/llvm/utils/TableGen/ClangASTNodesEmitter.h head/contrib/llvm/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/utils/TableGen/ClangAttrEmitter.h head/contrib/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp head/contrib/llvm/utils/TableGen/ClangDiagnosticsEmitter.h head/contrib/llvm/utils/TableGen/ClangSACheckersEmitter.cpp head/contrib/llvm/utils/TableGen/ClangSACheckersEmitter.h head/contrib/llvm/utils/TableGen/Error.cpp head/contrib/llvm/utils/TableGen/Error.h head/contrib/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp head/contrib/llvm/utils/TableGen/LLVMCConfigurationEmitter.h head/contrib/llvm/utils/TableGen/NeonEmitter.cpp head/contrib/llvm/utils/TableGen/NeonEmitter.h head/contrib/llvm/utils/TableGen/OptParserEmitter.cpp head/contrib/llvm/utils/TableGen/OptParserEmitter.h head/contrib/llvm/utils/TableGen/Record.cpp head/contrib/llvm/utils/TableGen/Record.h head/contrib/llvm/utils/TableGen/TGLexer.cpp head/contrib/llvm/utils/TableGen/TGLexer.h head/contrib/llvm/utils/TableGen/TGParser.cpp head/contrib/llvm/utils/TableGen/TGParser.h head/contrib/llvm/utils/TableGen/TableGenBackend.cpp head/contrib/llvm/utils/TableGen/TableGenBackend.h head/lib/clang/include/ARMGenDecoderTables.inc Modified: head/Makefile.inc1 head/contrib/llvm/include/llvm-c/Core.h head/contrib/llvm/include/llvm-c/Disassembler.h head/contrib/llvm/include/llvm-c/Object.h head/contrib/llvm/include/llvm-c/Target.h head/contrib/llvm/include/llvm-c/Transforms/IPO.h head/contrib/llvm/include/llvm-c/Transforms/Scalar.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/ArrayRef.h head/contrib/llvm/include/llvm/ADT/DenseMap.h head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h head/contrib/llvm/include/llvm/ADT/DenseSet.h head/contrib/llvm/include/llvm/ADT/ImmutableMap.h head/contrib/llvm/include/llvm/ADT/ImmutableSet.h head/contrib/llvm/include/llvm/ADT/IntervalMap.h head/contrib/llvm/include/llvm/ADT/PointerUnion.h head/contrib/llvm/include/llvm/ADT/PostOrderIterator.h head/contrib/llvm/include/llvm/ADT/SCCIterator.h head/contrib/llvm/include/llvm/ADT/STLExtras.h head/contrib/llvm/include/llvm/ADT/SmallVector.h head/contrib/llvm/include/llvm/ADT/Statistic.h head/contrib/llvm/include/llvm/ADT/StringExtras.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/Twine.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyImpl.h head/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h head/contrib/llvm/include/llvm/Analysis/CodeMetrics.h head/contrib/llvm/include/llvm/Analysis/ConstantFolding.h head/contrib/llvm/include/llvm/Analysis/DIBuilder.h head/contrib/llvm/include/llvm/Analysis/DebugInfo.h head/contrib/llvm/include/llvm/Analysis/FindUsedTypes.h head/contrib/llvm/include/llvm/Analysis/IVUsers.h head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h head/contrib/llvm/include/llvm/Analysis/LoopInfo.h head/contrib/llvm/include/llvm/Analysis/LoopPass.h head/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h head/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/RegionPass.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h head/contrib/llvm/include/llvm/Argument.h head/contrib/llvm/include/llvm/Attributes.h head/contrib/llvm/include/llvm/AutoUpgrade.h head/contrib/llvm/include/llvm/BasicBlock.h head/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h head/contrib/llvm/include/llvm/CodeGen/Analysis.h head/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveStackAnalysis.h head/contrib/llvm/include/llvm/CodeGen/LiveVariables.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.h head/contrib/llvm/include/llvm/Constant.h head/contrib/llvm/include/llvm/Constants.h head/contrib/llvm/include/llvm/DerivedTypes.h head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/Function.h head/contrib/llvm/include/llvm/GlobalAlias.h head/contrib/llvm/include/llvm/GlobalValue.h head/contrib/llvm/include/llvm/GlobalVariable.h head/contrib/llvm/include/llvm/InitializePasses.h head/contrib/llvm/include/llvm/InlineAsm.h head/contrib/llvm/include/llvm/InstrTypes.h head/contrib/llvm/include/llvm/Instruction.def head/contrib/llvm/include/llvm/Instruction.h head/contrib/llvm/include/llvm/Instructions.h head/contrib/llvm/include/llvm/IntrinsicInst.h head/contrib/llvm/include/llvm/Intrinsics.h head/contrib/llvm/include/llvm/Intrinsics.td head/contrib/llvm/include/llvm/IntrinsicsXCore.td head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/Linker.h head/contrib/llvm/include/llvm/MC/EDInstInfo.h head/contrib/llvm/include/llvm/MC/MCAsmInfo.h head/contrib/llvm/include/llvm/MC/MCAsmInfoDarwin.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDirectives.h head/contrib/llvm/include/llvm/MC/MCDisassembler.h head/contrib/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm/include/llvm/MC/MCInst.h head/contrib/llvm/include/llvm/MC/MCInstPrinter.h head/contrib/llvm/include/llvm/MC/MCInstrDesc.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h head/contrib/llvm/include/llvm/MC/MCRegisterInfo.h head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/MCValue.h head/contrib/llvm/include/llvm/Module.h head/contrib/llvm/include/llvm/Object/COFF.h head/contrib/llvm/include/llvm/Object/MachOFormat.h head/contrib/llvm/include/llvm/Object/MachOObject.h head/contrib/llvm/include/llvm/Object/ObjectFile.h head/contrib/llvm/include/llvm/OperandTraits.h head/contrib/llvm/include/llvm/Operator.h head/contrib/llvm/include/llvm/PassManagers.h head/contrib/llvm/include/llvm/Support/BranchProbability.h head/contrib/llvm/include/llvm/Support/CallSite.h head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/ConstantFolder.h head/contrib/llvm/include/llvm/Support/DataTypes.h.in head/contrib/llvm/include/llvm/Support/Dwarf.h head/contrib/llvm/include/llvm/Support/DynamicLibrary.h head/contrib/llvm/include/llvm/Support/ELF.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/Format.h head/contrib/llvm/include/llvm/Support/GetElementPtrTypeIterator.h head/contrib/llvm/include/llvm/Support/IRBuilder.h head/contrib/llvm/include/llvm/Support/InstVisitor.h head/contrib/llvm/include/llvm/Support/MachO.h head/contrib/llvm/include/llvm/Support/MemoryBuffer.h head/contrib/llvm/include/llvm/Support/NoFolder.h head/contrib/llvm/include/llvm/Support/PathV1.h head/contrib/llvm/include/llvm/Support/PathV2.h head/contrib/llvm/include/llvm/Support/Process.h head/contrib/llvm/include/llvm/Support/SMLoc.h head/contrib/llvm/include/llvm/Support/SourceMgr.h head/contrib/llvm/include/llvm/Support/TargetFolder.h head/contrib/llvm/include/llvm/Support/TypeBuilder.h head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetData.h head/contrib/llvm/include/llvm/Target/TargetFrameLowering.h head/contrib/llvm/include/llvm/Target/TargetInstrInfo.h head/contrib/llvm/include/llvm/Target/TargetIntrinsicInfo.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/Target/TargetMachine.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td head/contrib/llvm/include/llvm/Transforms/IPO.h head/contrib/llvm/include/llvm/Transforms/Scalar.h head/contrib/llvm/include/llvm/Transforms/Utils/AddrModeMatcher.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/FunctionUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h head/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h head/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h head/contrib/llvm/include/llvm/Type.h head/contrib/llvm/include/llvm/User.h head/contrib/llvm/include/llvm/Value.h head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/Analysis.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/DIBuilder.cpp head/contrib/llvm/lib/Analysis/DbgInfoPrinter.cpp head/contrib/llvm/lib/Analysis/DebugInfo.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp head/contrib/llvm/lib/Analysis/IPA/FindUsedTypes.cpp head/contrib/llvm/lib/Analysis/IVUsers.cpp head/contrib/llvm/lib/Analysis/InlineCost.cpp head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/Loads.cpp head/contrib/llvm/lib/Analysis/LoopDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/LoopInfo.cpp head/contrib/llvm/lib/Analysis/LoopPass.cpp head/contrib/llvm/lib/Analysis/MemDepPrinter.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/PHITransAddr.cpp head/contrib/llvm/lib/Analysis/PathNumbering.cpp head/contrib/llvm/lib/Analysis/RegionPass.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/AsmParser/LLLexer.cpp head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/AsmParser/LLParser.h head/contrib/llvm/lib/AsmParser/LLToken.h head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h head/contrib/llvm/lib/CodeGen/Analysis.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp head/contrib/llvm/lib/CodeGen/CodeGen.cpp head/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp head/contrib/llvm/lib/CodeGen/ELFCodeEmitter.cpp head/contrib/llvm/lib/CodeGen/ELFCodeEmitter.h head/contrib/llvm/lib/CodeGen/ELFWriter.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.h head/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.h head/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp head/contrib/llvm/lib/CodeGen/LiveRangeEdit.h head/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineFunction.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp head/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp head/contrib/llvm/lib/CodeGen/RegAllocLinearScan.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp head/contrib/llvm/lib/CodeGen/RegisterClassInfo.h head/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.h head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.h head/contrib/llvm/lib/CodeGen/SplitKit.cpp head/contrib/llvm/lib/CodeGen/SplitKit.h head/contrib/llvm/lib/CodeGen/Splitter.cpp head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp head/contrib/llvm/lib/CodeGen/TailDuplication.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h head/contrib/llvm/lib/ExecutionEngine/JIT/Intercept.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.h head/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.h head/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/Intercept.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h head/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp head/contrib/llvm/lib/Linker/LinkModules.cpp head/contrib/llvm/lib/Linker/Linker.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.h head/contrib/llvm/lib/MC/MCAsmInfo.cpp head/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp head/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h head/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.h head/contrib/llvm/lib/MC/MCDisassembler/EDInst.h head/contrib/llvm/lib/MC/MCDisassembler/EDToken.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDToken.h head/contrib/llvm/lib/MC/MCDwarf.cpp head/contrib/llvm/lib/MC/MCELF.cpp head/contrib/llvm/lib/MC/MCELFStreamer.cpp head/contrib/llvm/lib/MC/MCELFStreamer.h head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCInstPrinter.cpp head/contrib/llvm/lib/MC/MCLoggingStreamer.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCNullStreamer.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp head/contrib/llvm/lib/MC/MCPureStreamer.cpp head/contrib/llvm/lib/MC/MCStreamer.cpp head/contrib/llvm/lib/MC/MCWin64EH.cpp head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFStreamer.cpp head/contrib/llvm/lib/Object/Binary.cpp head/contrib/llvm/lib/Object/COFFObjectFile.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Object/MachOObject.cpp head/contrib/llvm/lib/Object/MachOObjectFile.cpp head/contrib/llvm/lib/Object/Object.cpp head/contrib/llvm/lib/Object/ObjectFile.cpp head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/Atomic.cpp head/contrib/llvm/lib/Support/BranchProbability.cpp head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/ConstantRange.cpp head/contrib/llvm/lib/Support/CrashRecoveryContext.cpp head/contrib/llvm/lib/Support/Disassembler.cpp head/contrib/llvm/lib/Support/Dwarf.cpp head/contrib/llvm/lib/Support/DynamicLibrary.cpp head/contrib/llvm/lib/Support/FoldingSet.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Support/IncludeFile.cpp head/contrib/llvm/lib/Support/Memory.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/MemoryObject.cpp head/contrib/llvm/lib/Support/Mutex.cpp head/contrib/llvm/lib/Support/Path.cpp head/contrib/llvm/lib/Support/PathV2.cpp head/contrib/llvm/lib/Support/PrettyStackTrace.cpp head/contrib/llvm/lib/Support/RWMutex.cpp head/contrib/llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp head/contrib/llvm/lib/Support/StringExtras.cpp head/contrib/llvm/lib/Support/StringRef.cpp head/contrib/llvm/lib/Support/TargetRegistry.cpp head/contrib/llvm/lib/Support/ThreadLocal.cpp head/contrib/llvm/lib/Support/Threading.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/Twine.cpp head/contrib/llvm/lib/Support/Unix/Host.inc head/contrib/llvm/lib/Support/Unix/Path.inc head/contrib/llvm/lib/Support/Unix/PathV2.inc head/contrib/llvm/lib/Support/Unix/Process.inc head/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc head/contrib/llvm/lib/Support/Windows/Memory.inc head/contrib/llvm/lib/Support/Windows/PathV2.inc head/contrib/llvm/lib/Support/Windows/Process.inc head/contrib/llvm/lib/Support/Windows/RWMutex.inc head/contrib/llvm/lib/Support/Windows/Signals.inc head/contrib/llvm/lib/Support/Windows/Windows.h head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/Target/ARM/ARM.h head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMGlobalMerge.cpp head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h head/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h head/contrib/llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp head/contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Alpha/AlphaISelLowering.cpp head/contrib/llvm/lib/Target/Alpha/AlphaISelLowering.h head/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp head/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.td head/contrib/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp head/contrib/llvm/lib/Target/Alpha/AlphaRegisterInfo.h head/contrib/llvm/lib/Target/Alpha/AlphaSubtarget.cpp head/contrib/llvm/lib/Target/Alpha/AlphaTargetMachine.cpp head/contrib/llvm/lib/Target/Alpha/AlphaTargetMachine.h head/contrib/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp head/contrib/llvm/lib/Target/Alpha/TargetInfo/AlphaTargetInfo.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinAsmPrinter.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinFrameLowering.h head/contrib/llvm/lib/Target/Blackfin/BlackfinISelLowering.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinISelLowering.h head/contrib/llvm/lib/Target/Blackfin/BlackfinInstrInfo.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinIntrinsicInfo.h head/contrib/llvm/lib/Target/Blackfin/BlackfinRegisterInfo.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinRegisterInfo.h head/contrib/llvm/lib/Target/Blackfin/BlackfinSubtarget.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinTargetMachine.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinTargetMachine.h head/contrib/llvm/lib/Target/Blackfin/MCTargetDesc/BlackfinMCTargetDesc.cpp head/contrib/llvm/lib/Target/Blackfin/TargetInfo/BlackfinTargetInfo.cpp head/contrib/llvm/lib/Target/CBackend/CBackend.cpp head/contrib/llvm/lib/Target/CBackend/CTargetMachine.h head/contrib/llvm/lib/Target/CBackend/TargetInfo/CBackendTargetInfo.cpp head/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp head/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.h head/contrib/llvm/lib/Target/CellSPU/SPUAsmPrinter.cpp head/contrib/llvm/lib/Target/CellSPU/SPUFrameLowering.cpp head/contrib/llvm/lib/Target/CellSPU/SPUFrameLowering.h head/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.cpp head/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.h head/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp head/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.td head/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.cpp head/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.h head/contrib/llvm/lib/Target/CellSPU/SPUSubtarget.cpp head/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.cpp head/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.h head/contrib/llvm/lib/Target/CellSPU/TargetInfo/CellSPUTargetInfo.cpp head/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp head/contrib/llvm/lib/Target/CppBackend/CPPTargetMachine.h head/contrib/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp head/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp head/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp head/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp head/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.h head/contrib/llvm/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp head/contrib/llvm/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.h head/contrib/llvm/lib/Target/MBlaze/MBlaze.h head/contrib/llvm/lib/Target/MBlaze/MBlazeAsmPrinter.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeFrameLowering.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.h head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.td head/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.h head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h head/contrib/llvm/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp head/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp head/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h head/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.cpp head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h head/contrib/llvm/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp head/contrib/llvm/lib/Target/Mangler.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h head/contrib/llvm/lib/Target/Mips/Mips.h head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h head/contrib/llvm/lib/Target/Mips/MipsMCSymbolRefExpr.cpp head/contrib/llvm/lib/Target/Mips/MipsMCSymbolRefExpr.h head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp head/contrib/llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp head/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp head/contrib/llvm/lib/Target/PTX/PTX.h head/contrib/llvm/lib/Target/PTX/PTX.td head/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.cpp head/contrib/llvm/lib/Target/PTX/PTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PTX/PTXISelLowering.cpp head/contrib/llvm/lib/Target/PTX/PTXISelLowering.h head/contrib/llvm/lib/Target/PTX/PTXInstrFormats.td head/contrib/llvm/lib/Target/PTX/PTXInstrInfo.cpp head/contrib/llvm/lib/Target/PTX/PTXInstrInfo.td head/contrib/llvm/lib/Target/PTX/PTXIntrinsicInstrInfo.td head/contrib/llvm/lib/Target/PTX/PTXMCAsmStreamer.cpp head/contrib/llvm/lib/Target/PTX/PTXMFInfoExtract.cpp head/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.h head/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.cpp head/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.h head/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.td head/contrib/llvm/lib/Target/PTX/PTXSubtarget.cpp head/contrib/llvm/lib/Target/PTX/PTXSubtarget.h head/contrib/llvm/lib/Target/PTX/PTXTargetMachine.cpp head/contrib/llvm/lib/Target/PTX/PTXTargetMachine.h head/contrib/llvm/lib/Target/PTX/TargetInfo/PTXTargetInfo.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h head/contrib/llvm/lib/Target/PowerPC/PPC.h head/contrib/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h head/contrib/llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp head/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h head/contrib/llvm/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.h head/contrib/llvm/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp head/contrib/llvm/lib/Target/Target.cpp head/contrib/llvm/lib/Target/TargetData.cpp head/contrib/llvm/lib/Target/TargetFrameLowering.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/TargetRegisterInfo.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmLexer.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.h head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h head/contrib/llvm/lib/Target/X86/TargetInfo/X86TargetInfo.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86.td head/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86ELFWriterInfo.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.h head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrExtension.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86InstrVMX.td head/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp head/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.h head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.h head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp head/contrib/llvm/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h head/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h head/contrib/llvm/lib/Target/XCore/XCoreSubtarget.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp head/contrib/llvm/lib/Transforms/IPO/IPO.cpp head/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp head/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp head/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp head/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp head/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/LowerAtomic.cpp head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/ObjCARC.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp head/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Scalar/Sink.cpp head/contrib/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp head/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp head/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp head/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp head/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp head/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp head/contrib/llvm/lib/VMCore/AsmWriter.cpp head/contrib/llvm/lib/VMCore/Attributes.cpp head/contrib/llvm/lib/VMCore/AutoUpgrade.cpp head/contrib/llvm/lib/VMCore/BasicBlock.cpp head/contrib/llvm/lib/VMCore/ConstantFold.cpp head/contrib/llvm/lib/VMCore/ConstantFold.h head/contrib/llvm/lib/VMCore/Constants.cpp head/contrib/llvm/lib/VMCore/ConstantsContext.h head/contrib/llvm/lib/VMCore/Core.cpp head/contrib/llvm/lib/VMCore/DebugLoc.cpp head/contrib/llvm/lib/VMCore/Function.cpp head/contrib/llvm/lib/VMCore/Globals.cpp head/contrib/llvm/lib/VMCore/IRBuilder.cpp head/contrib/llvm/lib/VMCore/InlineAsm.cpp head/contrib/llvm/lib/VMCore/Instruction.cpp head/contrib/llvm/lib/VMCore/Instructions.cpp head/contrib/llvm/lib/VMCore/LLVMContextImpl.h head/contrib/llvm/lib/VMCore/Module.cpp head/contrib/llvm/lib/VMCore/PassManager.cpp head/contrib/llvm/lib/VMCore/PassRegistry.cpp head/contrib/llvm/lib/VMCore/Type.cpp head/contrib/llvm/lib/VMCore/Value.cpp head/contrib/llvm/lib/VMCore/ValueTypes.cpp head/contrib/llvm/lib/VMCore/Verifier.cpp head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h head/contrib/llvm/tools/clang/include/clang/AST/APValue.h head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h head/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h head/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/DeclVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/Mangle.h head/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h head/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h head/contrib/llvm/tools/clang/include/clang/AST/ParentMap.h head/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h head/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateName.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def head/contrib/llvm/tools/clang/include/clang/AST/TypeVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ReachableCode.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h head/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h head/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h head/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h head/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h head/contrib/llvm/tools/clang/include/clang/Analysis/Support/BlkExprDeclBitVector.h head/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h head/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtVisitor.h head/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGStmtVisitor.h head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h head/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/DelayedCleanupPool.h head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/MacroBuilder.h head/contrib/llvm/tools/clang/include/clang/Basic/OnDiskHashTable.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenCLExtensions.def head/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/PrettyStackTrace.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManagerInternals.h head/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h head/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenAction.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h head/contrib/llvm/tools/clang/include/clang/Driver/Action.h head/contrib/llvm/tools/clang/include/clang/Driver/Arg.h head/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Driver/Job.h head/contrib/llvm/tools/clang/include/clang/Driver/OptTable.h head/contrib/llvm/tools/clang/include/clang/Driver/Option.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Tool.h head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Driver/Types.def head/contrib/llvm/tools/clang/include/clang/Driver/Util.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/Analyses.def head/contrib/llvm/tools/clang/include/clang/Frontend/AnalyzerOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CommandLineSourceLoc.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandard.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def head/contrib/llvm/tools/clang/include/clang/Frontend/LogDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticBuffer.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Index/ASTLocation.h head/contrib/llvm/tools/clang/include/clang/Index/CallGraph.h head/contrib/llvm/tools/clang/include/clang/Index/Entity.h head/contrib/llvm/tools/clang/include/clang/Index/Handlers.h head/contrib/llvm/tools/clang/include/clang/Index/TranslationUnit.h head/contrib/llvm/tools/clang/include/clang/Lex/CodeCompletionHandler.h head/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h head/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h head/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h head/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h head/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/Token.h head/contrib/llvm/tools/clang/include/clang/Lex/TokenConcatenation.h head/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h head/contrib/llvm/tools/clang/include/clang/Parse/ParseAST.h head/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Rewrite/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Rewrite/FixItRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriters.h head/contrib/llvm/tools/clang/include/clang/Sema/AnalysisBasedWarnings.h head/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Sema/CXXFieldCollector.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/Designator.h head/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h head/contrib/llvm/tools/clang/include/clang/Sema/Overload.h head/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h head/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h head/contrib/llvm/tools/clang/include/clang/Sema/PrettyDeclStackTrace.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/Template.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h head/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/Serialization/ChainedIncludesSource.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/LocalCheckers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMTActions.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Internals.h head/contrib/llvm/tools/clang/lib/ARCMigrate/TransARCAssign.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransBlockObjCVariable.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransProperties.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h head/contrib/llvm/tools/clang/lib/AST/APValue.cpp head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp head/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp head/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp head/contrib/llvm/tools/clang/lib/AST/InheritViz.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/Mangle.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp head/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtDumper.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFGReachabilityAnalysis.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFGStmtMap.cpp head/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp head/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.h head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h head/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h head/contrib/llvm/tools/clang/lib/Driver/Action.cpp head/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/HostInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/Job.cpp head/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp head/contrib/llvm/tools/clang/lib/Driver/Option.cpp head/contrib/llvm/tools/clang/lib/Driver/Phases.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.h head/contrib/llvm/tools/clang/lib/Driver/Types.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp head/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/LangStandards.cpp head/contrib/llvm/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Warnings.cpp head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/avxintrin.h head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/float.h head/contrib/llvm/tools/clang/lib/Headers/mm_malloc.h head/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/tgmath.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp head/contrib/llvm/tools/clang/lib/Index/CallGraph.cpp head/contrib/llvm/tools/clang/lib/Index/Entity.cpp head/contrib/llvm/tools/clang/lib/Index/EntityImpl.h head/contrib/llvm/tools/clang/lib/Index/GlobalSelector.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.h head/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp head/contrib/llvm/tools/clang/lib/Lex/PPCaching.cpp head/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp head/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp head/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h head/contrib/llvm/tools/clang/lib/Rewrite/DeltaTree.cpp head/contrib/llvm/tools/clang/lib/Rewrite/FixItRewriter.cpp head/contrib/llvm/tools/clang/lib/Rewrite/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Rewrite/HTMLPrint.cpp head/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteTest.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp head/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp head/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp head/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/DelayedDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ChainedIncludesSource.cpp head/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AdjustedReturnValueChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AggExprVisitor.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ObjCMessage.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/utils/TableGen/ARMDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/ARMDecoderEmitter.h head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.h head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.h head/contrib/llvm/utils/TableGen/AsmWriterInst.cpp head/contrib/llvm/utils/TableGen/CallingConvEmitter.cpp head/contrib/llvm/utils/TableGen/CallingConvEmitter.h head/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp head/contrib/llvm/utils/TableGen/CodeEmitterGen.h head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.h head/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.h head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.h head/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelEmitter.h head/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp head/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp head/contrib/llvm/utils/TableGen/DisassemblerEmitter.h head/contrib/llvm/utils/TableGen/EDEmitter.cpp head/contrib/llvm/utils/TableGen/EDEmitter.h head/contrib/llvm/utils/TableGen/FastISelEmitter.cpp head/contrib/llvm/utils/TableGen/FastISelEmitter.h head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.h head/contrib/llvm/utils/TableGen/InstrEnumEmitter.cpp head/contrib/llvm/utils/TableGen/InstrEnumEmitter.h head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/InstrInfoEmitter.h head/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp head/contrib/llvm/utils/TableGen/IntrinsicEmitter.h head/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp head/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.h head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.h head/contrib/llvm/utils/TableGen/SetTheory.cpp head/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp head/contrib/llvm/utils/TableGen/SubtargetEmitter.h head/contrib/llvm/utils/TableGen/TableGen.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerTables.h head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.h head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/libclanganalysis/Makefile head/lib/clang/libclangarcmigrate/Makefile head/lib/clang/libclangast/Makefile head/lib/clang/libclangbasic/Makefile head/lib/clang/libclangcodegen/Makefile head/lib/clang/libclangfrontend/Makefile head/lib/clang/libclangparse/Makefile head/lib/clang/libclangsema/Makefile head/lib/clang/libclangserialization/Makefile head/lib/clang/libclangstaticanalyzercheckers/Makefile head/lib/clang/libclangstaticanalyzercore/Makefile head/lib/clang/libllvmarmcodegen/Makefile head/lib/clang/libllvmarmdesc/Makefile head/lib/clang/libllvmarmdisassembler/Makefile head/lib/clang/libllvmcodegen/Makefile head/lib/clang/libllvmipo/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmmcparser/Makefile head/lib/clang/libllvmmipscodegen/Makefile head/lib/clang/libllvmmipsdesc/Makefile head/lib/clang/libllvmpowerpccodegen/Makefile head/lib/clang/libllvmpowerpcdesc/Makefile head/lib/clang/libllvmscalaropts/Makefile head/lib/clang/libllvmtarget/Makefile head/lib/clang/libllvmtransformutils/Makefile head/lib/clang/libllvmx86codegen/Makefile head/lib/clang/libllvmx86desc/Makefile head/lib/clang/libllvmx86disassembler/Makefile head/usr.bin/clang/Makefile head/usr.bin/clang/clang/clang.1 head/usr.bin/clang/tblgen/Makefile Directory Properties: head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 22 14:08:21 2011 (r226632) +++ head/Makefile.inc1 Sat Oct 22 14:08:43 2011 (r226633) @@ -1030,7 +1030,9 @@ _crunchgen= usr.sbin/crunch/crunchgen .if ${MK_CLANG} != "no" _clang_tblgen= \ lib/clang/libllvmsupport \ - usr.bin/clang/tblgen + lib/clang/libllvmtablegen \ + usr.bin/clang/tblgen \ + usr.bin/clang/clang-tblgen .endif .if ${MK_CDDL} != "no" && \ Modified: head/contrib/llvm/include/llvm-c/Core.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Core.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm-c/Core.h Sat Oct 22 14:08:43 2011 (r226633) @@ -115,7 +115,10 @@ typedef enum { LLVMNoImplicitFloatAttribute = 1<<23, LLVMNakedAttribute = 1<<24, LLVMInlineHintAttribute = 1<<25, - LLVMStackAlignment = 7<<26 + LLVMStackAlignment = 7<<26, + LLVMReturnsTwice = 1 << 29, + LLVMUWTable = 1 << 30, + LLVMNonLazyBind = 1 << 31 } LLVMAttribute; typedef enum { @@ -125,7 +128,7 @@ typedef enum { LLVMSwitch = 3, LLVMIndirectBr = 4, LLVMInvoke = 5, - LLVMUnwind = 6, + /* removed 6 due to API changes */ LLVMUnreachable = 7, /* Standard Binary Operators */ @@ -176,14 +179,26 @@ typedef enum { LLVMPHI = 44, LLVMCall = 45, LLVMSelect = 46, - /* UserOp1 */ - /* UserOp2 */ + LLVMUserOp1 = 47, + LLVMUserOp2 = 48, LLVMVAArg = 49, LLVMExtractElement = 50, LLVMInsertElement = 51, LLVMShuffleVector = 52, LLVMExtractValue = 53, - LLVMInsertValue = 54 + LLVMInsertValue = 54, + + /* Atomic operators */ + LLVMFence = 55, + LLVMAtomicCmpXchg = 56, + LLVMAtomicRMW = 57, + + /* Exception Handling Operators */ + LLVMResume = 58, + LLVMLandingPad = 59, + LLVMUnwind = 60 + + } LLVMOpcode; typedef enum { @@ -274,6 +289,11 @@ typedef enum { LLVMRealPredicateTrue /**< Always true (always folded) */ } LLVMRealPredicate; +typedef enum { + LLVMLandingPadCatch, /**< A catch clause */ + LLVMLandingPadFilter /**< A filter clause */ +} LLVMLandingPadClauseTy; + void LLVMInitializeCore(LLVMPassRegistryRef R); @@ -340,6 +360,7 @@ LLVMContextRef LLVMGetModuleContext(LLVM /** See llvm::LLVMTypeKind::getTypeID. */ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty); +LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty); /** See llvm::LLVMType::getContext. */ LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty); @@ -388,6 +409,7 @@ LLVMTypeRef LLVMStructTypeInContext(LLVM LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed); LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name); +const char *LLVMGetStructName(LLVMTypeRef Ty); void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed); @@ -427,8 +449,11 @@ LLVMTypeRef LLVMX86MMXType(void); macro(Argument) \ macro(BasicBlock) \ macro(InlineAsm) \ + macro(MDNode) \ + macro(MDString) \ macro(User) \ macro(Constant) \ + macro(BlockAddress) \ macro(ConstantAggregateZero) \ macro(ConstantArray) \ macro(ConstantExpr) \ @@ -448,29 +473,32 @@ LLVMTypeRef LLVMX86MMXType(void); macro(IntrinsicInst) \ macro(DbgInfoIntrinsic) \ macro(DbgDeclareInst) \ + macro(EHExceptionInst) \ macro(EHSelectorInst) \ macro(MemIntrinsic) \ macro(MemCpyInst) \ macro(MemMoveInst) \ macro(MemSetInst) \ macro(CmpInst) \ - macro(FCmpInst) \ - macro(ICmpInst) \ + macro(FCmpInst) \ + macro(ICmpInst) \ macro(ExtractElementInst) \ macro(GetElementPtrInst) \ macro(InsertElementInst) \ macro(InsertValueInst) \ + macro(LandingPadInst) \ macro(PHINode) \ macro(SelectInst) \ macro(ShuffleVectorInst) \ macro(StoreInst) \ macro(TerminatorInst) \ macro(BranchInst) \ + macro(IndirectBrInst) \ macro(InvokeInst) \ macro(ReturnInst) \ macro(SwitchInst) \ macro(UnreachableInst) \ - macro(UnwindInst) \ + macro(ResumeInst) \ macro(UnaryInstruction) \ macro(AllocaInst) \ macro(CastInst) \ @@ -533,6 +561,11 @@ LLVMValueRef LLVMMDString(const char *St LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, unsigned Count); LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count); +const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len); +int LLVMGetMDNodeNumOperands(LLVMValueRef V); +LLVMValueRef *LLVMGetMDNodeOperand(LLVMValueRef V, unsigned i); +unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char* name); +void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRef *Dest); /* Operations on scalar constants */ LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, @@ -728,6 +761,7 @@ LLVMValueRef LLVMBasicBlockAsValue(LLVMB LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val); LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val); LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB); +LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB); unsigned LLVMCountBasicBlocks(LLVMValueRef Fn); void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks); LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn); @@ -747,16 +781,21 @@ LLVMBasicBlockRef LLVMAppendBasicBlock(L LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBB, const char *Name); void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB); +void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB); void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); -/* Operations on instructions */ -LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst); LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB); LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB); + +/* Operations on instructions */ +LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst); LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst); LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst); +void LLVMInstructionEraseFromParent(LLVMValueRef Inst); +LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst); +LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst); /* Operations on call sites */ void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC); @@ -771,6 +810,9 @@ void LLVMSetInstrParamAlignment(LLVMValu LLVMBool LLVMIsTailCall(LLVMValueRef CallInst); void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall); +/* Operations on switch instructions (only) */ +LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr); + /* Operations on phi nodes */ void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, LLVMBasicBlockRef *IncomingBlocks, unsigned Count); @@ -818,7 +860,10 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilder LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name); -LLVMValueRef LLVMBuildUnwind(LLVMBuilderRef); +LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, + LLVMValueRef PersFn, unsigned NumClauses, + const char *Name); +LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn); LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef); /* Add a case to the switch instruction */ @@ -828,6 +873,12 @@ void LLVMAddCase(LLVMValueRef Switch, LL /* Add a destination to the indirectbr instruction */ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest); +/* Add a catch or filter clause to the landingpad instruction */ +void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal); + +/* Set the 'cleanup' flag in the landingpad instruction */ +void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val); + /* Arithmetic */ LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name); @@ -1136,7 +1187,7 @@ namespace llvm { return reinterpret_cast(Tys); } - inline LLVMTypeRef *wrap(const Type **Tys) { + inline LLVMTypeRef *wrap(Type **Tys) { return reinterpret_cast(const_cast(Tys)); } Modified: head/contrib/llvm/include/llvm-c/Disassembler.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Disassembler.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm-c/Disassembler.h Sat Oct 22 14:08:43 2011 (r226633) @@ -66,7 +66,7 @@ typedef int (*LLVMOpInfoCallback)(void * */ struct LLVMOpInfoSymbol1 { uint64_t Present; /* 1 if this symbol is present */ - char *Name; /* symbol name if not NULL */ + const char *Name; /* symbol name if not NULL */ uint64_t Value; /* symbol value if name is NULL */ }; @@ -93,11 +93,35 @@ struct LLVMOpInfo1 { * disassembler for things like adding a comment for a PC plus a constant * offset load instruction to use a symbol name instead of a load address value. * It is passed the block information is saved when the disassembler context is - * created and a value of a symbol to look up. If no symbol is found NULL is - * returned. + * created and the ReferenceValue to look up as a symbol. If no symbol is found + * for the ReferenceValue NULL is returned. The ReferenceType of the + * instruction is passed indirectly as is the PC of the instruction in + * ReferencePC. If the output reference can be determined its type is returned + * indirectly in ReferenceType along with ReferenceName if any, or that is set + * to NULL. */ typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo, - uint64_t SymbolValue); + uint64_t ReferenceValue, + uint64_t *ReferenceType, + uint64_t ReferencePC, + const char **ReferenceName); +/** + * The reference types on input and output. + */ +/* No input reference type or no output reference type. */ +#define LLVMDisassembler_ReferenceType_InOut_None 0 + +/* The input reference is from a branch instruction. */ +#define LLVMDisassembler_ReferenceType_In_Branch 1 +/* The input reference is from a PC relative load instruction. */ +#define LLVMDisassembler_ReferenceType_In_PCrel_Load 2 + +/* The output reference is to as symbol stub. */ +#define LLVMDisassembler_ReferenceType_Out_SymbolStub 1 +/* The output reference is to a symbol address in a literal pool. */ +#define LLVMDisassembler_ReferenceType_Out_LitPool_SymAddr 2 +/* The output reference is to a cstring address in a literal pool. */ +#define LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr 3 #ifdef __cplusplus extern "C" { Modified: head/contrib/llvm/include/llvm-c/Object.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Object.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm-c/Object.h Sat Oct 22 14:08:43 2011 (r226633) @@ -59,14 +59,14 @@ namespace llvm { return reinterpret_cast(const_cast(OF)); } - inline ObjectFile::section_iterator *unwrap(LLVMSectionIteratorRef SI) { - return reinterpret_cast(SI); + inline section_iterator *unwrap(LLVMSectionIteratorRef SI) { + return reinterpret_cast(SI); } inline LLVMSectionIteratorRef - wrap(const ObjectFile::section_iterator *SI) { + wrap(const section_iterator *SI) { return reinterpret_cast - (const_cast(SI)); + (const_cast(SI)); } } } Modified: head/contrib/llvm/include/llvm-c/Target.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Target.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm-c/Target.h Sat Oct 22 14:08:43 2011 (r226633) @@ -29,6 +29,7 @@ extern "C" { enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian }; typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef; +typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef; typedef struct LLVMStructLayout *LLVMStructLayoutRef; /* Declare all of the target-initialization functions that are available. */ @@ -42,7 +43,7 @@ typedef struct LLVMStructLayout *LLVMStr #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ #define LLVM_TARGET(TargetName) \ - void LLVMInitialize##TargetName##MCAsmInfo(void); + void LLVMInitialize##TargetName##TargetMC(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ @@ -72,7 +73,7 @@ static inline LLVMBool LLVMInitializeNat #ifdef LLVM_NATIVE_TARGET LLVM_NATIVE_TARGETINFO(); LLVM_NATIVE_TARGET(); - LLVM_NATIVE_MCASMINFO(); + LLVM_NATIVE_TARGETMC(); return 0; #else return 1; @@ -90,6 +91,11 @@ LLVMTargetDataRef LLVMCreateTargetData(c See the method llvm::PassManagerBase::add. */ void LLVMAddTargetData(LLVMTargetDataRef, LLVMPassManagerRef); +/** Adds target library information to a pass manager. This does not take + ownership of the target library info. + See the method llvm::PassManagerBase::add. */ +void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef, LLVMPassManagerRef); + /** Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::TargetData::TargetData. */ @@ -157,6 +163,7 @@ void LLVMDisposeTargetData(LLVMTargetDat namespace llvm { class TargetData; + class TargetLibraryInfo; inline TargetData *unwrap(LLVMTargetDataRef P) { return reinterpret_cast(P); @@ -165,6 +172,15 @@ namespace llvm { inline LLVMTargetDataRef wrap(const TargetData *P) { return reinterpret_cast(const_cast(P)); } + + inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) { + return reinterpret_cast(P); + } + + inline LLVMTargetLibraryInfoRef wrap(const TargetLibraryInfo *P) { + TargetLibraryInfo *X = const_cast(P); + return reinterpret_cast(X); + } } #endif /* defined(__cplusplus) */ Modified: head/contrib/llvm/include/llvm-c/Transforms/IPO.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Transforms/IPO.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm-c/Transforms/IPO.h Sat Oct 22 14:08:43 2011 (r226633) @@ -36,6 +36,9 @@ void LLVMAddFunctionAttrsPass(LLVMPassMa /** See llvm::createFunctionInliningPass function. */ void LLVMAddFunctionInliningPass(LLVMPassManagerRef PM); +/** See llvm::createAlwaysInlinerPass function. */ +void LLVMAddAlwaysInlinerPass(LLVMPassManagerRef PM); + /** See llvm::createGlobalDCEPass function. */ void LLVMAddGlobalDCEPass(LLVMPassManagerRef PM); @@ -45,9 +48,6 @@ void LLVMAddGlobalOptimizerPass(LLVMPass /** See llvm::createIPConstantPropagationPass function. */ void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM); -/** See llvm::createLowerSetJmpPass function. */ -void LLVMAddLowerSetJmpPass(LLVMPassManagerRef PM); - /** See llvm::createPruneEHPass function. */ void LLVMAddPruneEHPass(LLVMPassManagerRef PM); @@ -57,9 +57,6 @@ void LLVMAddIPSCCPPass(LLVMPassManagerRe /** See llvm::createInternalizePass function. */ void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain); -// FIXME: Remove in LLVM 3.0. -void LLVMAddRaiseAllocationsPass(LLVMPassManagerRef PM); - /** See llvm::createStripDeadPrototypesPass function. */ void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM); Copied: head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h (from r226587, vendor/llvm/dist/include/llvm-c/Transforms/PassManagerBuilder.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h Sat Oct 22 14:08:43 2011 (r226633, copy of r226587, vendor/llvm/dist/include/llvm-c/Transforms/PassManagerBuilder.h) @@ -0,0 +1,90 @@ +/*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header declares the C interface to the PassManagerBuilder class. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_PASSMANAGERBUILDER +#define LLVM_C_PASSMANAGERBUILDER + +#include "llvm-c/Core.h" + +typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef; + +#ifdef __cplusplus +#include "llvm/Transforms/IPO/PassManagerBuilder.h" +extern "C" { +#endif + +/** See llvm::PassManagerBuilder. */ +LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void); +void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB); + +/** See llvm::PassManagerBuilder::OptLevel. */ +void +LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB, + unsigned OptLevel); + +/** See llvm::PassManagerBuilder::SizeLevel. */ +void +LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB, + unsigned SizeLevel); + +/** See llvm::PassManagerBuilder::DisableUnitAtATime. */ +void +LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB, + LLVMBool Value); + +/** See llvm::PassManagerBuilder::DisableUnrollLoops. */ +void +LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB, + LLVMBool Value); + +/** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */ +void +LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB, + LLVMBool Value); + +/** See llvm::PassManagerBuilder::Inliner. */ +void +LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB, + unsigned Threshold); + +/** See llvm::PassManagerBuilder::populateFunctionPassManager. */ +void +LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB, + LLVMPassManagerRef PM); + +/** See llvm::PassManagerBuilder::populateModulePassManager. */ +void +LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB, + LLVMPassManagerRef PM); + +/** See llvm::PassManagerBuilder::populateLTOPassManager. */ +void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB, + LLVMPassManagerRef PM, + bool Internalize, + bool RunInliner); + +#ifdef __cplusplus +} + +namespace llvm { + inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) { + return reinterpret_cast(P); + } + + inline LLVMPassManagerBuilderRef wrap(PassManagerBuilder *P) { + return reinterpret_cast(P); + } +} +#endif + +#endif Modified: head/contrib/llvm/include/llvm-c/Transforms/Scalar.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Transforms/Scalar.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm-c/Transforms/Scalar.h Sat Oct 22 14:08:43 2011 (r226633) @@ -107,6 +107,9 @@ void LLVMAddCorrelatedValuePropagationPa /** See llvm::createEarlyCSEPass function */ void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM); +/** See llvm::createLowerExpectIntrinsicPass function */ +void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM); + /** See llvm::createTypeBasedAliasAnalysisPass function */ void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM); Modified: head/contrib/llvm/include/llvm/ADT/APInt.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APInt.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm/ADT/APInt.h Sat Oct 22 14:08:43 2011 (r226633) @@ -15,6 +15,7 @@ #ifndef LLVM_APINT_H #define LLVM_APINT_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/Support/MathExtras.h" #include #include @@ -160,7 +161,7 @@ class APInt { /// not assume that the string is well-formed and (2) grows the /// result to hold the input. /// - /// @param radix 2, 8, 10, or 16 + /// @param radix 2, 8, 10, 16, or 36 /// @brief Convert a char array into an APInt void fromString(unsigned numBits, StringRef str, uint8_t radix); @@ -176,6 +177,9 @@ class APInt { /// out-of-line slow case for inline constructor void initSlowCase(unsigned numBits, uint64_t val, bool isSigned); + /// shared code between two array constructors + void initFromArray(ArrayRef array); + /// out-of-line slow case for inline copy constructor void initSlowCase(const APInt& that); @@ -230,19 +234,26 @@ public: clearUnusedBits(); } - /// Note that numWords can be smaller or larger than the corresponding bit - /// width but any extraneous bits will be dropped. + /// Note that bigVal.size() can be smaller or larger than the corresponding + /// bit width but any extraneous bits will be dropped. /// @param numBits the bit width of the constructed APInt - /// @param numWords the number of words in bigVal /// @param bigVal a sequence of words to form the initial value of the APInt /// @brief Construct an APInt of numBits width, initialized as bigVal[]. + APInt(unsigned numBits, ArrayRef bigVal); + /// Equivalent to APInt(numBits, ArrayRef(bigVal, numWords)), but + /// deprecated because this constructor is prone to ambiguity with the + /// APInt(unsigned, uint64_t, bool) constructor. + /// + /// If this overload is ever deleted, care should be taken to prevent calls + /// from being incorrectly captured by the APInt(unsigned, uint64_t, bool) + /// constructor. APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); /// This constructor interprets the string \arg str in the given radix. The /// interpretation stops when the first character that is not suitable for the /// radix is encountered, or the end of the string. Acceptable radix values - /// are 2, 8, 10 and 16. It is an error for the value implied by the string to - /// require more bits than numBits. + /// are 2, 8, 10, 16, and 36. It is an error for the value implied by the + /// string to require more bits than numBits. /// /// @param numBits the bit width of the constructed APInt /// @param str the string to be interpreted @@ -342,7 +353,8 @@ public: if (isSingleWord()) return isUIntN(N, VAL); - return APInt(N, getNumWords(), pVal).zext(getBitWidth()) == (*this); + return APInt(N, makeArrayRef(pVal, getNumWords())).zext(getBitWidth()) + == (*this); } /// @brief Check if this APInt has an N-bits signed integer value. @@ -1245,13 +1257,13 @@ public: bool formatAsCLiteral = false) const; /// Considers the APInt to be unsigned and converts it into a string in the - /// radix given. The radix can be 2, 8, 10 or 16. + /// radix given. The radix can be 2, 8, 10 16, or 36. void toStringUnsigned(SmallVectorImpl &Str, unsigned Radix = 10) const { toString(Str, Radix, false, false); } /// Considers the APInt to be signed and converts it into a string in the - /// radix given. The radix can be 2, 8, 10 or 16. + /// radix given. The radix can be 2, 8, 10, 16, or 36. void toStringSigned(SmallVectorImpl &Str, unsigned Radix = 10) const { toString(Str, Radix, true, false); } Modified: head/contrib/llvm/include/llvm/ADT/ArrayRef.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ArrayRef.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm/ADT/ArrayRef.h Sat Oct 22 14:08:43 2011 (r226633) @@ -147,7 +147,53 @@ namespace llvm { /// @} }; - + + /// @name ArrayRef Convenience constructors + /// @{ + + /// Construct an ArrayRef from a single element. + template + ArrayRef makeArrayRef(const T &OneElt) { + return OneElt; + } + + /// Construct an ArrayRef from a pointer and length. + template + ArrayRef makeArrayRef(const T *data, size_t length) { + return ArrayRef(data, length); + } + + /// Construct an ArrayRef from a range. + template + ArrayRef makeArrayRef(const T *begin, const T *end) { + return ArrayRef(begin, end); + } + + /// Construct an ArrayRef from a SmallVector. + template + ArrayRef makeArrayRef(const SmallVectorImpl &Vec) { + return Vec; + } + + /// Construct an ArrayRef from a SmallVector. + template + ArrayRef makeArrayRef(const SmallVector &Vec) { + return Vec; + } + + /// Construct an ArrayRef from a std::vector. + template + ArrayRef makeArrayRef(const std::vector &Vec) { + return Vec; + } + + /// Construct an ArrayRef from a C array. + template + ArrayRef makeArrayRef(const T (&Arr)[N]) { + return ArrayRef(Arr); + } + + /// @} /// @name ArrayRef Comparison Operators /// @{ Modified: head/contrib/llvm/include/llvm/ADT/DenseMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DenseMap.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm/ADT/DenseMap.h Sat Oct 22 14:08:43 2011 (r226633) @@ -540,6 +540,12 @@ private: ++Ptr; } }; + +template +static inline size_t +capacity_in_bytes(const DenseMap &X) { + return X.getMemorySize(); +} } // end namespace llvm Modified: head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h Sat Oct 22 14:08:43 2011 (r226633) @@ -51,7 +51,7 @@ struct DenseMapInfo { template<> struct DenseMapInfo { static inline char getEmptyKey() { return ~0; } static inline char getTombstoneKey() { return ~0 - 1; } - static unsigned getHashValue(const char& Val) { return Val * 37; } + static unsigned getHashValue(const char& Val) { return Val * 37U; } static bool isEqual(const char &LHS, const char &RHS) { return LHS == RHS; } @@ -61,7 +61,7 @@ template<> struct DenseMapInfo { template<> struct DenseMapInfo { static inline unsigned getEmptyKey() { return ~0; } static inline unsigned getTombstoneKey() { return ~0U - 1; } - static unsigned getHashValue(const unsigned& Val) { return Val * 37; } + static unsigned getHashValue(const unsigned& Val) { return Val * 37U; } static bool isEqual(const unsigned& LHS, const unsigned& RHS) { return LHS == RHS; } @@ -96,7 +96,7 @@ template<> struct DenseMapInfo struct DenseMapInfo { static inline int getEmptyKey() { return 0x7fffffff; } static inline int getTombstoneKey() { return -0x7fffffff - 1; } - static unsigned getHashValue(const int& Val) { return (unsigned)(Val * 37); } + static unsigned getHashValue(const int& Val) { return (unsigned)(Val * 37U); } static bool isEqual(const int& LHS, const int& RHS) { return LHS == RHS; } @@ -109,7 +109,7 @@ template<> struct DenseMapInfo { } static inline long getTombstoneKey() { return getEmptyKey() - 1L; } static unsigned getHashValue(const long& Val) { - return (unsigned)(Val * 37L); + return (unsigned)(Val * 37UL); } static bool isEqual(const long& LHS, const long& RHS) { return LHS == RHS; @@ -121,7 +121,7 @@ template<> struct DenseMapInfo > { } static inline Pair getTombstoneKey() { return std::make_pair(FirstInfo::getTombstoneKey(), - SecondInfo::getEmptyKey()); + SecondInfo::getTombstoneKey()); } static unsigned getHashValue(const Pair& PairVal) { uint64_t key = (uint64_t)FirstInfo::getHashValue(PairVal.first) << 32 @@ -158,7 +158,7 @@ struct DenseMapInfo > { return (unsigned)key; } static bool isEqual(const Pair &LHS, const Pair &RHS) { - return FirstInfo::isEqual(LHS.first, RHS.first) && + return FirstInfo::isEqual(LHS.first, RHS.first) && SecondInfo::isEqual(LHS.second, RHS.second); } }; Modified: head/contrib/llvm/include/llvm/ADT/DenseSet.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DenseSet.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm/ADT/DenseSet.h Sat Oct 22 14:08:43 2011 (r226633) @@ -28,7 +28,7 @@ class DenseSet { MapTy TheMap; public: DenseSet(const DenseSet &Other) : TheMap(Other.TheMap) {} - explicit DenseSet(unsigned NumInitBuckets = 64) : TheMap(NumInitBuckets) {} + explicit DenseSet(unsigned NumInitBuckets = 0) : TheMap(NumInitBuckets) {} bool empty() const { return TheMap.empty(); } unsigned size() const { return TheMap.size(); } Modified: head/contrib/llvm/include/llvm/ADT/ImmutableMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ImmutableMap.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm/ADT/ImmutableMap.h Sat Oct 22 14:08:43 2011 (r226633) @@ -117,6 +117,10 @@ public: return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T); } + typename TreeTy::Factory *getTreeFactory() const { + return const_cast(&F); + } + private: Factory(const Factory& RHS); // DO NOT IMPLEMENT void operator=(const Factory& RHS); // DO NOT IMPLEMENT @@ -256,6 +260,159 @@ public: } }; +// NOTE: This will possibly become the new implementation of ImmutableMap some day. +template > +class ImmutableMapRef { +public: + typedef typename ValInfo::value_type value_type; + typedef typename ValInfo::value_type_ref value_type_ref; + typedef typename ValInfo::key_type key_type; + typedef typename ValInfo::key_type_ref key_type_ref; + typedef typename ValInfo::data_type data_type; + typedef typename ValInfo::data_type_ref data_type_ref; + typedef ImutAVLTree TreeTy; + typedef typename TreeTy::Factory FactoryTy; + +protected: + TreeTy *Root; + FactoryTy *Factory; + +public: + /// Constructs a map from a pointer to a tree root. In general one + /// should use a Factory object to create maps instead of directly + /// invoking the constructor, but there are cases where make this + /// constructor public is useful. + explicit ImmutableMapRef(const TreeTy* R, FactoryTy *F) + : Root(const_cast(R)), + Factory(F) { + if (Root) { Root->retain(); } + } + + ImmutableMapRef(const ImmutableMapRef &X) + : Root(X.Root), + Factory(X.Factory) { + if (Root) { Root->retain(); } + } + + ImmutableMapRef &operator=(const ImmutableMapRef &X) { + if (Root != X.Root) { + if (X.Root) + X.Root->retain(); + + if (Root) + Root->release(); + + Root = X.Root; + Factory = X.Factory; + } + return *this; + } + + ~ImmutableMapRef() { + if (Root) + Root->release(); + } + + static inline ImmutableMapRef getEmptyMap(FactoryTy *F) { + return ImmutableMapRef(0, F); + } + + ImmutableMapRef add(key_type_ref K, data_type_ref D) { + TreeTy *NewT = Factory->add(Root, std::pair(K, D)); + return ImmutableMapRef(NewT, Factory); + } + + ImmutableMapRef remove(key_type_ref K) { + TreeTy *NewT = Factory->remove(Root, K); + return ImmutableMapRef(NewT, Factory); + } + + bool contains(key_type_ref K) const { + return Root ? Root->contains(K) : false; + } + + ImmutableMap asImmutableMap() const { + return ImmutableMap(Factory->getCanonicalTree(Root)); + } + + bool operator==(const ImmutableMapRef &RHS) const { + return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; + } + + bool operator!=(const ImmutableMapRef &RHS) const { + return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; + } + + bool isEmpty() const { return !Root; } + + //===--------------------------------------------------===// + // For testing. + //===--------------------------------------------------===// + + void verify() const { if (Root) Root->verify(); } + + //===--------------------------------------------------===// + // Iterators. + //===--------------------------------------------------===// + + class iterator { + typename TreeTy::iterator itr; + + iterator() {} + iterator(TreeTy* t) : itr(t) {} + friend class ImmutableMapRef; + + public: + value_type_ref operator*() const { return itr->getValue(); } + value_type* operator->() const { return &itr->getValue(); } + + key_type_ref getKey() const { return itr->getValue().first; } + data_type_ref getData() const { return itr->getValue().second; } + + + iterator& operator++() { ++itr; return *this; } + iterator operator++(int) { iterator tmp(*this); ++itr; return tmp; } + iterator& operator--() { --itr; return *this; } + iterator operator--(int) { iterator tmp(*this); --itr; return tmp; } + bool operator==(const iterator& RHS) const { return RHS.itr == itr; } + bool operator!=(const iterator& RHS) const { return RHS.itr != itr; } + }; + + iterator begin() const { return iterator(Root); } + iterator end() const { return iterator(); } + + data_type* lookup(key_type_ref K) const { + if (Root) { + TreeTy* T = Root->find(K); + if (T) return &T->getValue().second; + } + + return 0; + } + + /// getMaxElement - Returns the pair in the ImmutableMap for + /// which key is the highest in the ordering of keys in the map. This + /// method returns NULL if the map is empty. + value_type* getMaxElement() const { + return Root ? &(Root->getMaxElement()->getValue()) : 0; + } + + //===--------------------------------------------------===// + // Utility methods. + //===--------------------------------------------------===// + + unsigned getHeight() const { return Root ? Root->getHeight() : 0; } + + static inline void Profile(FoldingSetNodeID& ID, const ImmutableMapRef &M) { + ID.AddPointer(M.Root); + } + + inline void Profile(FoldingSetNodeID& ID) const { + return Profile(ID, *this); + } +}; + } // end namespace llvm #endif Modified: head/contrib/llvm/include/llvm/ADT/ImmutableSet.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ImmutableSet.h Sat Oct 22 14:08:21 2011 (r226632) +++ head/contrib/llvm/include/llvm/ADT/ImmutableSet.h Sat Oct 22 14:08:43 2011 (r226633) @@ -997,6 +997,10 @@ public: BumpPtrAllocator& getAllocator() { return F.getAllocator(); } + typename TreeTy::Factory *getTreeFactory() const { + return const_cast(&F); + } + private: Factory(const Factory& RHS); // DO NOT IMPLEMENT void operator=(const Factory& RHS); // DO NOT IMPLEMENT @@ -1021,6 +1025,10 @@ public: if (Root) { Root->retain(); } return Root; } + + TreeTy *getRootWithoutRetain() const { + return Root; + } /// isEmpty - Return true if the set contains no elements. bool isEmpty() const { return !Root; } @@ -1078,6 +1086,132 @@ public: void validateTree() const { if (Root) Root->validateTree(); } }; + +// NOTE: This may some day replace the current ImmutableSet. +template > +class ImmutableSetRef { +public: + typedef typename ValInfo::value_type value_type; + typedef typename ValInfo::value_type_ref value_type_ref; + typedef ImutAVLTree TreeTy; + typedef typename TreeTy::Factory FactoryTy; + +private: + TreeTy *Root; + FactoryTy *Factory; + +public: + /// Constructs a set from a pointer to a tree root. In general one + /// should use a Factory object to create sets instead of directly + /// invoking the constructor, but there are cases where make this + /// constructor public is useful. + explicit ImmutableSetRef(TreeTy* R, FactoryTy *F) + : Root(R), + Factory(F) { + if (Root) { Root->retain(); } + } + ImmutableSetRef(const ImmutableSetRef &X) + : Root(X.Root), + Factory(X.Factory) { + if (Root) { Root->retain(); } + } + ImmutableSetRef &operator=(const ImmutableSetRef &X) { + if (Root != X.Root) { + if (X.Root) { X.Root->retain(); } + if (Root) { Root->release(); } + Root = X.Root; + Factory = X.Factory; + } + return *this; + } + ~ImmutableSetRef() { + if (Root) { Root->release(); } + } + + static inline ImmutableSetRef getEmptySet(FactoryTy *F) { + return ImmutableSetRef(0, F); + } + + ImmutableSetRef add(value_type_ref V) { + return ImmutableSetRef(Factory->add(Root, V), Factory); + } + + ImmutableSetRef remove(value_type_ref V) { + return ImmutableSetRef(Factory->remove(Root, V), Factory); + } + + /// Returns true if the set contains the specified value. + bool contains(value_type_ref V) const { + return Root ? Root->contains(V) : false; + } + + ImmutableSet asImmutableSet(bool canonicalize = true) const { + return ImmutableSet(canonicalize ? + Factory->getCanonicalTree(Root) : Root); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 16:52:05 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49C7D106564A; Sat, 22 Oct 2011 16:52:05 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 393058FC14; Sat, 22 Oct 2011 16:52:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MGq5HQ087749; Sat, 22 Oct 2011 16:52:05 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MGq57j087743; Sat, 22 Oct 2011 16:52:05 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201110221652.p9MGq57j087743@svn.freebsd.org> From: Tim Kientzle Date: Sat, 22 Oct 2011 16:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226635 - head/usr.bin/tar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 16:52:05 -0000 Author: kientzle Date: Sat Oct 22 16:52:04 2011 New Revision: 226635 URL: http://svn.freebsd.org/changeset/base/226635 Log: Bring in the --gid --gname --uid and --uname implementation from libarchive.googlecode.com. MFC after: 3 days Modified: head/usr.bin/tar/bsdtar.c head/usr.bin/tar/bsdtar.h head/usr.bin/tar/cmdline.c head/usr.bin/tar/read.c head/usr.bin/tar/write.c Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sat Oct 22 16:03:45 2011 (r226634) +++ head/usr.bin/tar/bsdtar.c Sat Oct 22 16:52:04 2011 (r226635) @@ -147,6 +147,8 @@ main(int argc, char **argv) _bsdtar = bsdtar = &bsdtar_storage; memset(bsdtar, 0, sizeof(*bsdtar)); bsdtar->fd = -1; /* Mark as "unused" */ + bsdtar->gid = -1; + bsdtar->uid = -1; option_o = 0; #if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1)) @@ -262,14 +264,21 @@ main(int argc, char **argv) case OPTION_FORMAT: /* GNU tar, others */ bsdtar->create_format = bsdtar->optarg; break; - case OPTION_OPTIONS: - bsdtar->option_options = bsdtar->optarg; - break; case 'f': /* SUSv2 */ bsdtar->filename = bsdtar->optarg; if (strcmp(bsdtar->filename, "-") == 0) bsdtar->filename = NULL; break; + case OPTION_GID: /* cpio */ + t = atoi(bsdtar->optarg); + if (t < 0) + lafe_errc(1, 0, + "Argument to --gid must be positive"); + bsdtar->gid = t; + break; + case OPTION_GNAME: /* cpio */ + bsdtar->gname = bsdtar->optarg; + break; case 'H': /* BSD convention */ bsdtar->symlink_mode = 'H'; break; @@ -397,7 +406,8 @@ main(int argc, char **argv) bsdtar->option_null++; break; case OPTION_NUMERIC_OWNER: /* GNU tar */ - bsdtar->option_numeric_owner++; + bsdtar->uname = ""; + bsdtar->gname = ""; break; case 'O': /* GNU tar */ bsdtar->option_stdout = 1; @@ -408,6 +418,9 @@ main(int argc, char **argv) case OPTION_ONE_FILE_SYSTEM: /* GNU tar */ bsdtar->option_dont_traverse_mounts = 1; break; + case OPTION_OPTIONS: + bsdtar->option_options = bsdtar->optarg; + break; #if 0 /* * The common BSD -P option is not necessary, since @@ -473,6 +486,16 @@ main(int argc, char **argv) case 'u': /* SUSv2 */ set_mode(bsdtar, opt); break; + case OPTION_UID: /* cpio */ + t = atoi(bsdtar->optarg); + if (t < 0) + lafe_errc(1, 0, + "Argument to --uid must be positive"); + bsdtar->uid = t; + break; + case OPTION_UNAME: /* cpio */ + bsdtar->uname = bsdtar->optarg; + break; case 'v': /* SUSv2 */ bsdtar->verbose++; break; Modified: head/usr.bin/tar/bsdtar.h ============================================================================== --- head/usr.bin/tar/bsdtar.h Sat Oct 22 16:03:45 2011 (r226634) +++ head/usr.bin/tar/bsdtar.h Sat Oct 22 16:52:04 2011 (r226635) @@ -54,6 +54,10 @@ struct bsdtar { int verbose; /* -v */ int extract_flags; /* Flags for extract operation */ int strip_components; /* Remove this many leading dirs */ + int gid; /* --gid */ + const char *gname; /* --gname */ + int uid; /* --uid */ + const char *uname; /* --uname */ char mode; /* Program mode: 'c', 't', 'r', 'u', 'x' */ char symlink_mode; /* H or L, per BSD conventions */ char create_compression; /* j, y, or z */ @@ -68,7 +72,6 @@ struct bsdtar { char option_no_owner; /* -o */ char option_no_subdirs; /* -n */ char option_null; /* --null */ - char option_numeric_owner; /* --numeric-owner */ char option_stdout; /* -O */ char option_totals; /* --totals */ char option_unlink_first; /* -U */ @@ -111,7 +114,8 @@ enum { OPTION_CHROOT, OPTION_EXCLUDE, OPTION_FORMAT, - OPTION_OPTIONS, + OPTION_GID, + OPTION_GNAME, OPTION_HELP, OPTION_INCLUDE, OPTION_KEEP_NEWER_FILES, @@ -126,10 +130,13 @@ enum { OPTION_NULL, OPTION_NUMERIC_OWNER, OPTION_ONE_FILE_SYSTEM, + OPTION_OPTIONS, OPTION_POSIX, OPTION_SAME_OWNER, OPTION_STRIP_COMPONENTS, OPTION_TOTALS, + OPTION_UID, + OPTION_UNAME, OPTION_USE_COMPRESS_PROGRAM, OPTION_VERSION }; Modified: head/usr.bin/tar/cmdline.c ============================================================================== --- head/usr.bin/tar/cmdline.c Sat Oct 22 16:03:45 2011 (r226634) +++ head/usr.bin/tar/cmdline.c Sat Oct 22 16:52:04 2011 (r226635) @@ -84,7 +84,8 @@ static struct option { { "file", 1, 'f' }, { "files-from", 1, 'T' }, { "format", 1, OPTION_FORMAT }, - { "options", 1, OPTION_OPTIONS }, + { "gid", 1, OPTION_GID }, + { "gname", 1, OPTION_GNAME }, { "gunzip", 0, 'z' }, { "gzip", 0, 'z' }, { "help", 0, OPTION_HELP }, @@ -110,6 +111,7 @@ static struct option { { "null", 0, OPTION_NULL }, { "numeric-owner", 0, OPTION_NUMERIC_OWNER }, { "one-file-system", 0, OPTION_ONE_FILE_SYSTEM }, + { "options", 1, OPTION_OPTIONS }, { "posix", 0, OPTION_POSIX }, { "preserve-permissions", 0, 'p' }, { "read-full-blocks", 0, 'B' }, @@ -118,6 +120,8 @@ static struct option { { "strip-components", 1, OPTION_STRIP_COMPONENTS }, { "to-stdout", 0, 'O' }, { "totals", 0, OPTION_TOTALS }, + { "uid", 1, OPTION_UID }, + { "uname", 1, OPTION_UNAME }, { "uncompress", 0, 'Z' }, { "unlink", 0, 'U' }, { "unlink-first", 0, 'U' }, Modified: head/usr.bin/tar/read.c ============================================================================== --- head/usr.bin/tar/read.c Sat Oct 22 16:03:45 2011 (r226634) +++ head/usr.bin/tar/read.c Sat Oct 22 16:52:04 2011 (r226635) @@ -209,10 +209,18 @@ read_archive(struct bsdtar *bsdtar, char if (r == ARCHIVE_FATAL) break; - if (bsdtar->option_numeric_owner) { + if (bsdtar->uid >= 0) { + archive_entry_set_uid(entry, bsdtar->uid); archive_entry_set_uname(entry, NULL); + } + if (bsdtar->gid >= 0) { + archive_entry_set_gid(entry, bsdtar->gid); archive_entry_set_gname(entry, NULL); } + if (bsdtar->uname) + archive_entry_set_uname(entry, bsdtar->uname); + if (bsdtar->gname >= 0) + archive_entry_set_gname(entry, bsdtar->gname); /* * Exclude entries that are too old. Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Sat Oct 22 16:03:45 2011 (r226634) +++ head/usr.bin/tar/write.c Sat Oct 22 16:52:04 2011 (r226635) @@ -833,6 +833,24 @@ write_hierarchy(struct bsdtar *bsdtar, s #endif r = archive_read_disk_entry_from_file(bsdtar->diskreader, entry, -1, st); + if (bsdtar->uid >= 0) { + archive_entry_set_uid(entry, bsdtar->uid); + if (!bsdtar->uname) + archive_entry_set_uname(entry, + archive_read_disk_uname(bsdtar->diskreader, + bsdtar->uid)); + } + if (bsdtar->gid >= 0) { + archive_entry_set_gid(entry, bsdtar->gid); + if (!bsdtar->gname) + archive_entry_set_gname(entry, + archive_read_disk_gname(bsdtar->diskreader, + bsdtar->gid)); + } + if (bsdtar->uname) + archive_entry_set_uname(entry, bsdtar->uname); + if (bsdtar->gname) + archive_entry_set_gname(entry, bsdtar->gname); if (r != ARCHIVE_OK) lafe_warnc(archive_errno(bsdtar->diskreader), "%s", archive_error_string(bsdtar->diskreader)); From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 16:53:30 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 735C7106567A; Sat, 22 Oct 2011 16:53:30 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A6878FC14; Sat, 22 Oct 2011 16:53:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MGrTKZ087826; Sat, 22 Oct 2011 16:53:29 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MGrToa087824; Sat, 22 Oct 2011 16:53:29 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201110221653.p9MGrToa087824@svn.freebsd.org> From: Tim Kientzle Date: Sat, 22 Oct 2011 16:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226636 - head/usr.bin/tar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 16:53:30 -0000 Author: kientzle Date: Sat Oct 22 16:53:29 2011 New Revision: 226636 URL: http://svn.freebsd.org/changeset/base/226636 Log: Typo from previous commit. Urgh. Modified: head/usr.bin/tar/read.c Modified: head/usr.bin/tar/read.c ============================================================================== --- head/usr.bin/tar/read.c Sat Oct 22 16:52:04 2011 (r226635) +++ head/usr.bin/tar/read.c Sat Oct 22 16:53:29 2011 (r226636) @@ -219,7 +219,7 @@ read_archive(struct bsdtar *bsdtar, char } if (bsdtar->uname) archive_entry_set_uname(entry, bsdtar->uname); - if (bsdtar->gname >= 0) + if (bsdtar->gname) archive_entry_set_gname(entry, bsdtar->gname); /* From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 17:56:24 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 700081065674; Sat, 22 Oct 2011 17:56:24 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 605E38FC15; Sat, 22 Oct 2011 17:56:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MHuOJt089866; Sat, 22 Oct 2011 17:56:24 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MHuOtf089864; Sat, 22 Oct 2011 17:56:24 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201110221756.p9MHuOtf089864@svn.freebsd.org> From: Tim Kientzle Date: Sat, 22 Oct 2011 17:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226638 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 17:56:24 -0000 Author: kientzle Date: Sat Oct 22 17:56:24 2011 New Revision: 226638 URL: http://svn.freebsd.org/changeset/base/226638 Log: Correct the spelling of getgrgid and getpwuid in the man page. MFC after: 3 days Modified: head/lib/libarchive/archive_read_disk.3 Modified: head/lib/libarchive/archive_read_disk.3 ============================================================================== --- head/lib/libarchive/archive_read_disk.3 Sat Oct 22 17:51:45 2011 (r226637) +++ head/lib/libarchive/archive_read_disk.3 Sat Oct 22 17:56:24 2011 (r226638) @@ -133,16 +133,16 @@ object is destroyed or when new lookup f This convenience function installs a standard set of user and group name lookup functions. These functions use -.Xr getpwid 3 +.Xr getpwuid 3 and -.Xr getgrid 3 +.Xr getgrgid 3 to convert ids to names, defaulting to NULL if the names cannot be looked up. These functions also implement a simple memory cache to reduce the number of calls to -.Xr getpwid 3 +.Xr getpwuid 3 and -.Xr getgrid 3 . +.Xr getgrgid 3 . .It Fn archive_read_disk_entry_from_file Populates a .Tn struct archive_entry @@ -281,9 +281,9 @@ library was written by The .Dq standard user name and group name lookup functions are not the defaults because -.Xr getgrid 3 +.Xr getgrgid 3 and -.Xr getpwid 3 +.Xr getpwuid 3 are sometimes too large for particular applications. The current design allows the application author to use a more compact implementation when appropriate. From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 19:46:10 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94249106566C; Sat, 22 Oct 2011 19:46:10 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4502A8FC16; Sat, 22 Oct 2011 19:46:09 +0000 (UTC) Received: by gyd8 with SMTP id 8so6153313gyd.13 for ; Sat, 22 Oct 2011 12:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=gJQcNnyweJhQgQV+VvEubXmXK1DQ7PM8Wn/pCletSs0=; b=DNoBp+VD0oEFO5ke6oDvtuXSLaIHEY9lvK0LzHhIagPdNuZNXzqAIkWne7bRYnOHp4 x4nvKGCR3EvHarya1It92zf6pJvlYEhgkKNk6AIk8Fba0KTq58NZ5+0BTbBARfFFnO58 5RhdXhDycJ+i1iIQg2kffS2+9shJwzVHOVuRk= MIME-Version: 1.0 Received: by 10.236.168.2 with SMTP id j2mr27408173yhl.24.1319311249881; Sat, 22 Oct 2011 12:20:49 -0700 (PDT) Received: by 10.236.105.231 with HTTP; Sat, 22 Oct 2011 12:20:48 -0700 (PDT) In-Reply-To: <201110221652.p9MGq57j087743@svn.freebsd.org> References: <201110221652.p9MGq57j087743@svn.freebsd.org> Date: Sat, 22 Oct 2011 15:20:48 -0400 Message-ID: From: Ben Kaduk To: Tim Kientzle Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226635 - head/usr.bin/tar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 19:46:10 -0000 On Sat, Oct 22, 2011 at 12:52 PM, Tim Kientzle wrote= : > Author: kientzle > Date: Sat Oct 22 16:52:04 2011 > New Revision: 226635 > URL: http://svn.freebsd.org/changeset/base/226635 > > Log: > =A0Bring in the --gid --gname --uid and --uname implementation > =A0from libarchive.googlecode.com. > > MFC after: 3 days Thanks! (Your earlier mail was unclear whether you would actually get to it, so I had been planning to take a look, but hadn't had time, yet.) -Ben Kaduk From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 22:00:35 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7C1106566B; Sat, 22 Oct 2011 22:00:35 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF8858FC16; Sat, 22 Oct 2011 22:00:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MM0ZXK097643; Sat, 22 Oct 2011 22:00:35 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MM0ZJ6097641; Sat, 22 Oct 2011 22:00:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201110222200.p9MM0ZJ6097641@svn.freebsd.org> From: Attilio Rao Date: Sat, 22 Oct 2011 22:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226642 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 22:00:35 -0000 Author: attilio Date: Sat Oct 22 22:00:35 2011 New Revision: 226642 URL: http://svn.freebsd.org/changeset/base/226642 Log: VN_NRESERVLEVEL is used in this file but opt_vm is not included thus the stub switch won't be correctly handled. Include opt_vm.h. Submitted by: jeff MFC after: 3 days Modified: head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Sat Oct 22 18:23:32 2011 (r226641) +++ head/sys/vm/vm_phys.c Sat Oct 22 22:00:35 2011 (r226642) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_vm.h" #include #include From owner-svn-src-head@FreeBSD.ORG Sat Oct 22 22:22:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132D6106566B; Sat, 22 Oct 2011 22:22:47 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECC4C8FC12; Sat, 22 Oct 2011 22:22:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MMMkYi098364; Sat, 22 Oct 2011 22:22:46 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MMMkKS098361; Sat, 22 Oct 2011 22:22:46 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201110222222.p9MMMkKS098361@svn.freebsd.org> From: Tim Kientzle Date: Sat, 22 Oct 2011 22:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226643 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 22:22:47 -0000 Author: kientzle Date: Sat Oct 22 22:22:46 2011 New Revision: 226643 URL: http://svn.freebsd.org/changeset/base/226643 Log: Fix Buildworld WITHOUT_OPENSSL. PR: kern/160922 MFC after: 3 days Modified: head/lib/libarchive/archive_hash.h head/lib/libarchive/config_freebsd.h Modified: head/lib/libarchive/archive_hash.h ============================================================================== --- head/lib/libarchive/archive_hash.h Sat Oct 22 22:00:35 2011 (r226642) +++ head/lib/libarchive/archive_hash.h Sat Oct 22 22:22:46 2011 (r226643) @@ -79,6 +79,13 @@ typedef MD5_CTX archive_md5_ctx; # define archive_md5_init(ctx) MD5Init(ctx) # define archive_md5_final(ctx, buf) MD5Final(buf, ctx) # define archive_md5_update(ctx, buf, n) MD5Update(ctx, buf, n) +#elif defined(ARCHIVE_HASH_MD5_LIBMD) +# include +# define ARCHIVE_HAS_MD5 +typedef MD5_CTX archive_md5_ctx; +# define archive_md5_init(ctx) MD5Init(ctx) +# define archive_md5_final(ctx, buf) MD5Final(buf, ctx) +# define archive_md5_update(ctx, buf, n) MD5Update(ctx, buf, n) #elif defined(ARCHIVE_HASH_MD5_LIBSYSTEM) # include # define ARCHIVE_HAS_MD5 @@ -125,6 +132,13 @@ typedef SHA1_CTX archive_sha1_ctx; # define archive_sha1_init(ctx) SHA1Init(ctx) # define archive_sha1_final(ctx, buf) SHA1Final(buf, ctx) # define archive_sha1_update(ctx, buf, n) SHA1Update(ctx, buf, n) +#elif defined(ARCHIVE_HASH_SHA1_LIBMD) +# include +# define ARCHIVE_HAS_SHA1 +typedef SHA1_CTX archive_sha1_ctx; +# define archive_sha1_init(ctx) SHA1_Init(ctx) +# define archive_sha1_final(ctx, buf) SHA1_Final(buf, ctx) +# define archive_sha1_update(ctx, buf, n) SHA1_Update(ctx, buf, n) #elif defined(ARCHIVE_HASH_SHA1_LIBSYSTEM) # include # define ARCHIVE_HAS_SHA1 @@ -169,6 +183,13 @@ typedef SHA2_CTX archive_sha256_ctx; # define archive_sha256_init(ctx) SHA256Init(ctx) # define archive_sha256_final(ctx, buf) SHA256Final(buf, ctx) # define archive_sha256_update(ctx, buf, n) SHA256Update(ctx, buf, n) +#elif defined(ARCHIVE_HASH_SHA256_LIBMD) +# include +# define ARCHIVE_HAS_SHA256 +typedef SHA256_CTX archive_sha256_ctx; +# define archive_sha256_init(ctx) SHA256_Init(ctx) +# define archive_sha256_final(ctx, buf) SHA256_Final(buf, ctx) +# define archive_sha256_update(ctx, buf, n) SHA256_Update(ctx, buf, n) #elif defined(ARCHIVE_HASH_SHA256_LIBSYSTEM) # include # define ARCHIVE_HAS_SHA256 @@ -257,6 +278,13 @@ typedef SHA2_CTX archive_sha512_ctx; # define archive_sha512_init(ctx) SHA512Init(ctx) # define archive_sha512_final(ctx, buf) SHA512Final(buf, ctx) # define archive_sha512_update(ctx, buf, n) SHA512Update(ctx, buf, n) +#elif defined(ARCHIVE_HASH_SHA512_LIBMD) +# include +# define ARCHIVE_HAS_SHA512 +typedef SHA512_CTX archive_sha512_ctx; +# define archive_sha512_init(ctx) SHA512_Init(ctx) +# define archive_sha512_final(ctx, buf) SHA512_Final(buf, ctx) +# define archive_sha512_update(ctx, buf, n) SHA512_Update(ctx, buf, n) #elif defined(ARCHIVE_HASH_SHA512_LIBSYSTEM) # include # define ARCHIVE_HAS_SHA512 Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Sat Oct 22 22:00:35 2011 (r226642) +++ head/lib/libarchive/config_freebsd.h Sat Oct 22 22:22:46 2011 (r226643) @@ -176,8 +176,8 @@ #define ARCHIVE_HASH_SHA384_OPENSSL 1 #define ARCHIVE_HASH_SHA512_OPENSSL 1 #else -#define ARCHIVE_HASH_MD5_LIBC 1 -#define ARCHIVE_HASH_SHA1_LIBC 1 -#define ARCHIVE_HASH_SHA256_LIBC 1 -#define ARCHIVE_HASH_SHA512_LIBC 1 +#define ARCHIVE_HASH_MD5_LIBMD 1 +#define ARCHIVE_HASH_SHA1_LIBMD 1 +#define ARCHIVE_HASH_SHA256_LIBMD 1 +#define ARCHIVE_HASH_SHA512_LIBMD 1 #endif