From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 08:49:44 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2CE7106566C; Sun, 6 Mar 2011 08:49:44 +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 AF1398FC12; Sun, 6 Mar 2011 08:49:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p268niGU091301; Sun, 6 Mar 2011 08:49:44 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p268nitH091290; Sun, 6 Mar 2011 08:49:44 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201103060849.p268nitH091290@svn.freebsd.org> From: David Schultz Date: Sun, 6 Mar 2011 08:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219323 - in stable/8/lib/msun: . man src X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 08:49:44 -0000 Author: das Date: Sun Mar 6 08:49:44 2011 New Revision: 219323 URL: http://svn.freebsd.org/changeset/base/219323 Log: MFC r216210: refactor log(3) r216211: add log2(3) and log2f(3) Added: stable/8/lib/msun/src/e_log2.c - copied unchanged from r216211, head/lib/msun/src/e_log2.c stable/8/lib/msun/src/e_log2f.c - copied unchanged from r216211, head/lib/msun/src/e_log2f.c stable/8/lib/msun/src/k_log.h - copied unchanged from r216210, head/lib/msun/src/k_log.h stable/8/lib/msun/src/k_logf.h - copied unchanged from r216210, head/lib/msun/src/k_logf.h Modified: stable/8/lib/msun/Makefile stable/8/lib/msun/Symbol.map stable/8/lib/msun/man/log.3 stable/8/lib/msun/man/math.3 stable/8/lib/msun/src/math.h stable/8/lib/msun/src/math_private.h Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/Makefile ============================================================================== --- stable/8/lib/msun/Makefile Sun Mar 6 08:35:50 2011 (r219322) +++ stable/8/lib/msun/Makefile Sun Mar 6 08:49:44 2011 (r219323) @@ -45,7 +45,8 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c e_expf.c e_fmod.c e_fmodf.c e_gamma.c e_gamma_r.c e_gammaf.c \ e_gammaf_r.c e_hypot.c e_hypotf.c e_j0.c e_j0f.c e_j1.c e_j1f.c \ e_jn.c e_jnf.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \ - e_log.c e_log10.c e_log10f.c e_logf.c e_pow.c e_powf.c e_rem_pio2.c \ + e_log.c e_log10.c e_log10f.c e_log2.c e_log2f.c e_logf.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 \ @@ -164,7 +165,7 @@ MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0 MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3 MLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 lgammaf.3 \ lgamma.3 tgamma.3 lgamma.3 tgammaf.3 -MLINKS+=log.3 log10.3 log.3 log10f.3 log.3 log1p.3 log.3 log1pf.3 log.3 logf.3 +MLINKS+=log.3 log10.3 log.3 log10f.3 log.3 log1p.3 log.3 log1pf.3 log.3 logf.3 log.3 log2.3 log.3 log2f.3 MLINKS+=lrint.3 llrint.3 lrint.3 llrintf.3 lrint.3 llrintl.3 \ lrint.3 lrintf.3 lrint.3 lrintl.3 MLINKS+=lround.3 llround.3 lround.3 llroundf.3 lround.3 llroundl.3 \ Modified: stable/8/lib/msun/Symbol.map ============================================================================== --- stable/8/lib/msun/Symbol.map Sun Mar 6 08:35:50 2011 (r219322) +++ stable/8/lib/msun/Symbol.map Sun Mar 6 08:49:44 2011 (r219323) @@ -218,3 +218,10 @@ FBSD_1.1 { cprojf; cprojl; }; + +/* First added in 9.0-CURRENT */ +FBSD_1.2 { + __isnanf; + log2; + log2f; +}; Modified: stable/8/lib/msun/man/log.3 ============================================================================== --- stable/8/lib/msun/man/log.3 Sun Mar 6 08:35:50 2011 (r219322) +++ stable/8/lib/msun/man/log.3 Sun Mar 6 08:49:44 2011 (r219323) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2008 David Schultz +.\" Copyright (c) 2008-2010 David Schultz .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2008 +.Dd December 5, 2010 .Dt LOG 3 .Os .Sh NAME @@ -33,6 +33,8 @@ .Nm logl , .Nm log10 , .Nm log10f , +.Nm log2 , +.Nm log2f , .Nm log1p , .Nm log1pf .Nd logarithm functions @@ -49,6 +51,10 @@ .Ft float .Fn log10f "float x" .Ft double +.Fn log2 "double x" +.Ft float +.Fn log2f "float x" +.Ft double .Fn log1p "double x" .Ft float .Fn log1pf "float x" @@ -65,6 +71,12 @@ The and .Fn log10f functions compute the logarithm base 10 of +.Fa x , +while +.Fn log2 +and +.Fn log2f +compute the logarithm base 2 of .Fa x . .Pp The @@ -97,6 +109,8 @@ The .Fn logf , .Fn log10 , .Fn log10f , +.Fn log2 , +.Fn log2f , .Fn log1p , and .Fn log1pf Modified: stable/8/lib/msun/man/math.3 ============================================================================== --- stable/8/lib/msun/man/math.3 Sun Mar 6 08:35:50 2011 (r219322) +++ stable/8/lib/msun/man/math.3 Sun Mar 6 08:49:44 2011 (r219323) @@ -28,7 +28,7 @@ .\" from: @(#)math.3 6.10 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd December 16, 2007 +.Dd December 5, 2010 .Dt MATH 3 .Os .if n \{\ @@ -185,7 +185,7 @@ lgamma log gamma function log natural logarithm log10 logarithm to base 10 log1p log(1+x) -.\" log2 base 2 logarithm +log2 base 2 logarithm pow exponential x**y sin trigonometric function sinh hyperbolic function @@ -197,7 +197,7 @@ y1 Bessel function of the second kind of yn Bessel function of the second kind of the order n .El .Pp -Unlike the algebraic functions listed earlier, the routines +The routines in this section may not produce a result that is correctly rounded, so reproducible results cannot be guaranteed across platforms. For most of these functions, however, incorrect rounding occurs @@ -224,18 +224,20 @@ and values, were written for or imported into subsequent versions of FreeBSD. .Sh BUGS The -.Fn log2 -function is missing, and many functions are not available in their +.Fn cbrt +function and many of the transcendental functions +are not available in their .Vt "long double" variants. .Pp Many of the routines to compute transcendental functions produce inaccurate results in other than the default rounding mode. .Pp -On some architectures, trigonometric argument reduction is not -performed accurately, resulting in errors greater than 1 +On the i386 platform, trigonometric argument reduction is not +performed accurately for very large arguments, resulting in errors +greater than 1 .Em ulp -for large arguments to +for such arguments to .Fn cos , .Fn sin , and Copied: stable/8/lib/msun/src/e_log2.c (from r216211, head/lib/msun/src/e_log2.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/msun/src/e_log2.c Sun Mar 6 08:49:44 2011 (r219323, copy of r216211, head/lib/msun/src/e_log2.c) @@ -0,0 +1,60 @@ + +/* @(#)e_log10.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +__FBSDID("$FreeBSD$"); + +/* log2(x) + * Return the base 2 logarithm of x. + */ + +#include "math.h" +#include "math_private.h" +#include "k_log.h" + +static const double +two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ +ivln2hi = 0x1.71547652000p+0, +ivln2lo = 0x1.705fc2eefa2p-33; + +static const double zero = 0.0; + +double +__ieee754_log2(double x) +{ + double f,hi,lo; + int32_t i,k,hx; + u_int32_t lx; + + EXTRACT_WORDS(hx,lx,x); + + k=0; + if (hx < 0x00100000) { /* x < 2**-1022 */ + if (((hx&0x7fffffff)|lx)==0) + return -two54/zero; /* log(+-0)=-inf */ + if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ + k -= 54; x *= two54; /* subnormal number, scale up x */ + GET_HIGH_WORD(hx,x); + } + if (hx >= 0x7ff00000) return x+x; + k += (hx>>20)-1023; + hx &= 0x000fffff; + i = (hx+0x95f64)&0x100000; + SET_HIGH_WORD(x,hx|(i^0x3ff00000)); /* normalize x or x/2 */ + k += (i>>20); + f = __kernel_log(x); + hi = x = x - 1; + SET_LOW_WORD(hi,0); + lo = x - hi; + return (x+f)*ivln2lo + (lo+f)*ivln2hi + hi*ivln2hi + k; +} Copied: stable/8/lib/msun/src/e_log2f.c (from r216211, head/lib/msun/src/e_log2f.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/msun/src/e_log2f.c Sun Mar 6 08:49:44 2011 (r219323, copy of r216211, head/lib/msun/src/e_log2f.c) @@ -0,0 +1,54 @@ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "math.h" +#include "math_private.h" +#include "k_logf.h" + +static const float +two25 = 3.3554432000e+07, /* 0x4c000000 */ +ivln2hi = 0x1.716p+0f, +ivln2lo = -0x1.7135a8fa03d11p-13; + +static const float zero = 0.0; + +float +__ieee754_log2f(float x) +{ + float f,hi,lo; + int32_t i,k,hx; + + GET_FLOAT_WORD(hx,x); + + k=0; + if (hx < 0x00800000) { /* x < 2**-126 */ + if ((hx&0x7fffffff)==0) + return -two25/zero; /* log(+-0)=-inf */ + if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ + k -= 25; x *= two25; /* subnormal number, scale up x */ + GET_FLOAT_WORD(hx,x); + } + if (hx >= 0x7f800000) return x+x; + k += (hx>>23)-127; + hx &= 0x007fffff; + i = (hx+(0x4afb0d))&0x800000; + SET_FLOAT_WORD(x,hx|(i^0x3f800000)); /* normalize x or x/2 */ + k += (i>>23); + f = __kernel_logf(x); + x = x - 1; + GET_FLOAT_WORD(hx,x); + SET_FLOAT_WORD(hi,hx&0xfffff000); + lo = x - hi; + return (x+f)*ivln2lo + (lo+f)*ivln2hi + hi*ivln2hi + k; +} Copied: stable/8/lib/msun/src/k_log.h (from r216210, head/lib/msun/src/k_log.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/msun/src/k_log.h Sun Mar 6 08:49:44 2011 (r219323, copy of r216210, head/lib/msun/src/k_log.h) @@ -0,0 +1,116 @@ + +/* @(#)e_log.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +__FBSDID("$FreeBSD$"); + +/* __kernel_log(x) + * Return log(x) - (x-1) for x in ~[sqrt(2)/2, sqrt(2)]. + * + * The following describes the overall strategy for computing + * logarithms in base e. The argument reduction and adding the final + * term of the polynomial are done by the caller for increased accuracy + * when different bases are used. + * + * Method : + * 1. Argument Reduction: find k and f such that + * x = 2^k * (1+f), + * where sqrt(2)/2 < 1+f < sqrt(2) . + * + * 2. Approximation of log(1+f). + * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s) + * = 2s + 2/3 s**3 + 2/5 s**5 + ....., + * = 2s + s*R + * We use a special Reme algorithm on [0,0.1716] to generate + * a polynomial of degree 14 to approximate R The maximum error + * of this polynomial approximation is bounded by 2**-58.45. In + * other words, + * 2 4 6 8 10 12 14 + * R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s +Lg6*s +Lg7*s + * (the values of Lg1 to Lg7 are listed in the program) + * and + * | 2 14 | -58.45 + * | Lg1*s +...+Lg7*s - R(z) | <= 2 + * | | + * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2. + * In order to guarantee error in log below 1ulp, we compute log + * by + * log(1+f) = f - s*(f - R) (if f is not too large) + * log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy) + * + * 3. Finally, log(x) = k*ln2 + log(1+f). + * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo))) + * Here ln2 is split into two floating point number: + * ln2_hi + ln2_lo, + * where n*ln2_hi is always exact for |n| < 2000. + * + * Special cases: + * log(x) is NaN with signal if x < 0 (including -INF) ; + * log(+INF) is +INF; log(0) is -INF with signal; + * log(NaN) is that NaN with no signal. + * + * Accuracy: + * according to an error analysis, the error is always less than + * 1 ulp (unit in the last place). + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +static const double +Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */ +Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */ +Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */ +Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */ +Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */ +Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */ +Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ + +/* + * We always inline __kernel_log(), since doing so produces a + * substantial performance improvement (~40% on amd64). + */ +static inline double +__kernel_log(double x) +{ + double hfsq,f,s,z,R,w,t1,t2; + int32_t hx,i,j; + u_int32_t lx; + + EXTRACT_WORDS(hx,lx,x); + + f = x-1.0; + if((0x000fffff&(2+hx))<3) { /* -2**-20 <= f < 2**-20 */ + if(f==0.0) return 0.0; + return f*f*(0.33333333333333333*f-0.5); + } + s = f/(2.0+f); + z = s*s; + hx &= 0x000fffff; + i = hx-0x6147a; + w = z*z; + j = 0x6b851-hx; + t1= w*(Lg2+w*(Lg4+w*Lg6)); + t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); + i |= j; + R = t2+t1; + if (i>0) { + hfsq=0.5*f*f; + return s*(hfsq+R) - hfsq; + } else { + return s*(R-f); + } +} Copied: stable/8/lib/msun/src/k_logf.h (from r216210, head/lib/msun/src/k_logf.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/msun/src/k_logf.h Sun Mar 6 08:49:44 2011 (r219323, copy of r216210, head/lib/msun/src/k_logf.h) @@ -0,0 +1,55 @@ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +__FBSDID("$FreeBSD$"); + +/* __kernel_logf(x) + * Return log(x) - (x-1) for x in ~[sqrt(2)/2, sqrt(2)]. + */ + +static const float +/* |(log(1+s)-log(1-s))/s - Lg(s)| < 2**-34.24 (~[-4.95e-11, 4.97e-11]). */ +Lg1 = 0xaaaaaa.0p-24, /* 0.66666662693 */ +Lg2 = 0xccce13.0p-25, /* 0.40000972152 */ +Lg3 = 0x91e9ee.0p-25, /* 0.28498786688 */ +Lg4 = 0xf89e26.0p-26; /* 0.24279078841 */ + +static inline float +__kernel_logf(float x) +{ + float hfsq,f,s,z,R,w,t1,t2; + int32_t ix,i,j; + + GET_FLOAT_WORD(ix,x); + + f = x-(float)1.0; + if((0x007fffff&(0x8000+ix))<0xc000) { /* -2**-9 <= f < 2**-9 */ + if(f==0.0) return 0.0; + return f*f*((float)0.33333333333333333*f-(float)0.5); + } + s = f/((float)2.0+f); + z = s*s; + ix &= 0x007fffff; + i = ix-(0x6147a<<3); + w = z*z; + j = (0x6b851<<3)-ix; + t1= w*(Lg2+w*Lg4); + t2= z*(Lg1+w*Lg3); + i |= j; + R = t2+t1; + if(i>0) { + hfsq=(float)0.5*f*f; + return s*(hfsq+R) - hfsq; + } else { + return s*(R-f); + } +} Modified: stable/8/lib/msun/src/math.h ============================================================================== --- stable/8/lib/msun/src/math.h Sun Mar 6 08:35:50 2011 (r219322) +++ stable/8/lib/msun/src/math.h Sun Mar 6 08:49:44 2011 (r219323) @@ -235,6 +235,7 @@ double lgamma(double); long long llrint(double); long long llround(double); double log1p(double); +double log2(double); double logb(double); long lrint(double); long lround(double); @@ -318,6 +319,7 @@ int ilogbf(float) __pure2; float ldexpf(float, int); float log10f(float); float log1pf(float); +float log2f(float); float logf(float); float modff(float, float *); /* fundamentally !__pure2 */ Modified: stable/8/lib/msun/src/math_private.h ============================================================================== --- stable/8/lib/msun/src/math_private.h Sun Mar 6 08:35:50 2011 (r219322) +++ stable/8/lib/msun/src/math_private.h Sun Mar 6 08:49:44 2011 (r219323) @@ -292,6 +292,7 @@ irint(double x) #define __ieee754_acos acos #define __ieee754_acosh acosh #define __ieee754_log log +#define __ieee754_log2 log2 #define __ieee754_atanh atanh #define __ieee754_asin asin #define __ieee754_atan2 atan2 @@ -330,6 +331,7 @@ irint(double x) #define __ieee754_lgammaf_r lgammaf_r #define __ieee754_gammaf_r gammaf_r #define __ieee754_log10f log10f +#define __ieee754_log2f log2f #define __ieee754_sinhf sinhf #define __ieee754_hypotf hypotf #define __ieee754_j0f j0f From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 08:50:16 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ED3E1065741; Sun, 6 Mar 2011 08:50:16 +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 1D2EF8FC1C; Sun, 6 Mar 2011 08:50:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p268oGr5091355; Sun, 6 Mar 2011 08:50:16 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p268oFm3091353; Sun, 6 Mar 2011 08:50:16 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201103060850.p268oFm3091353@svn.freebsd.org> From: David Schultz Date: Sun, 6 Mar 2011 08:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219324 - stable/8/sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 08:50:16 -0000 Author: das Date: Sun Mar 6 08:50:15 2011 New Revision: 219324 URL: http://svn.freebsd.org/changeset/base/219324 Log: Bump __FreeBSD_version for the MFC of log2(), for the benefit of ports such as opencity and inkscape that have workarounds for the lack of a log2() in the base system. Modified: stable/8/sys/sys/param.h Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Sun Mar 6 08:49:44 2011 (r219323) +++ stable/8/sys/sys/param.h Sun Mar 6 08:50:15 2011 (r219324) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 802501 /* Master, propagated to newvers */ +#define __FreeBSD_version 802502 /* Master, propagated to newvers */ #ifdef _KERNEL #define P_OSREL_SIGSEGV 700004 From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 08:52:23 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5765D106568B; Sun, 6 Mar 2011 08:52: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 45CE88FC1C; Sun, 6 Mar 2011 08:52:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p268qN1F091455; Sun, 6 Mar 2011 08:52:23 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p268qNsj091453; Sun, 6 Mar 2011 08:52:23 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201103060852.p268qNsj091453@svn.freebsd.org> From: David Schultz Date: Sun, 6 Mar 2011 08:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219325 - stable/8/lib/msun X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 08:52:23 -0000 Author: das Date: Sun Mar 6 08:52:23 2011 New Revision: 219325 URL: http://svn.freebsd.org/changeset/base/219325 Log: MFC r216137: Disable gcc's built-in rint() function when compiling s_nearbyint.c. It results in incorrect optimizations that break nearbyint(). Modified: stable/8/lib/msun/Makefile Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/Makefile ============================================================================== --- stable/8/lib/msun/Makefile Sun Mar 6 08:50:15 2011 (r219324) +++ stable/8/lib/msun/Makefile Sun Mar 6 08:52:23 2011 (r219325) @@ -109,6 +109,12 @@ COMMON_SRCS:= ${COMMON_SRCS:N${i:R}.c} .endfor .endif +# Some files need certain gcc built-in functions to be disabled, since gcc's +# model of the functions bogusly assumes -fno-trapping-math. +XRINT_CFLAGS= -fno-builtin-rint -fno-builtin-rintf -fno-builtin-rintl +CFLAGS+= ${XRINT_CFLAGS} +XRINT_CFLAGS:= ${.IMPSRC:M*/s_nearbyint.c:C/^.+$/${XRINT_CFLAGS}/:C/^$//} + SRCS= ${COMMON_SRCS} ${ARCH_SRCS} INCS= fenv.h math.h From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 09:01:30 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A45221065672; Sun, 6 Mar 2011 09:01:30 +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 917DE8FC1E; Sun, 6 Mar 2011 09:01:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2691Uhp091863; Sun, 6 Mar 2011 09:01:30 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2691UQF091859; Sun, 6 Mar 2011 09:01:30 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201103060901.p2691UQF091859@svn.freebsd.org> From: Martin Matuska Date: Sun, 6 Mar 2011 09:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219329 - in stable/8/contrib/gcc: config/i386 doc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 09:01:30 -0000 Author: mm Date: Sun Mar 6 09:01:29 2011 New Revision: 219329 URL: http://svn.freebsd.org/changeset/base/219329 Log: MFC r218895: Backport svn r124339 from gcc 4.3 and add opteron-sse3, athlon64-sse3 and k8-sse3 cpu-types for -march=/-mtune= gcc options. These new cpu-types include the SSE3 instruction set that is supported by all newer AMD Athlon 64 and Opteron processors. All three cpu-types are supported by clang and all gcc versions starting with 4.3 SVN rev 124339 (at that time GPLv2 licensed). PR: gnu/154906 Discussed with: kib, kan, dim Obtained from: gcc 4.3 (r124339, GPLv2 licensed) Modified: stable/8/contrib/gcc/config/i386/i386.c stable/8/contrib/gcc/doc/gcc.1 stable/8/contrib/gcc/doc/invoke.texi Directory Properties: stable/8/contrib/gcc/ (props changed) Modified: stable/8/contrib/gcc/config/i386/i386.c ============================================================================== --- stable/8/contrib/gcc/config/i386/i386.c Sun Mar 6 08:56:44 2011 (r219328) +++ stable/8/contrib/gcc/config/i386/i386.c Sun Mar 6 09:01:29 2011 (r219329) @@ -1523,10 +1523,19 @@ override_options (void) | PTA_SSE | PTA_SSE2 }, {"k8", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT | PTA_3DNOW_A | PTA_SSE | PTA_SSE2}, + {"k8-sse3", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT + | PTA_3DNOW_A | PTA_SSE | PTA_SSE2 + | PTA_SSE3 }, {"opteron", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT | PTA_3DNOW_A | PTA_SSE | PTA_SSE2}, + {"opteron-sse3", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT + | PTA_3DNOW_A | PTA_SSE | PTA_SSE2 + | PTA_SSE3 }, {"athlon64", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT | PTA_3DNOW_A | PTA_SSE | PTA_SSE2}, + {"athlon64-sse3", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT + | PTA_3DNOW_A | PTA_SSE | PTA_SSE2 + | PTA_SSE3 }, {"athlon-fx", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT | PTA_3DNOW_A | PTA_SSE | PTA_SSE2}, {"generic32", PROCESSOR_GENERIC32, 0 /* flags are only used for -march switch. */ }, Modified: stable/8/contrib/gcc/doc/gcc.1 ============================================================================== --- stable/8/contrib/gcc/doc/gcc.1 Sun Mar 6 08:56:44 2011 (r219328) +++ stable/8/contrib/gcc/doc/gcc.1 Sun Mar 6 09:01:29 2011 (r219329) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "GCC 1" -.TH GCC 1 "2007-07-19" "gcc-4.2.1" "GNU" +.TH GCC 1 "2011-02-20" "gcc-4.2.1" "GNU" .SH "NAME" gcc \- GNU project C and C++ compiler .SH "SYNOPSIS" @@ -8751,6 +8751,9 @@ instruction set support. .IX Item "k8, opteron, athlon64, athlon-fx" \&\s-1AMD\s0 K8 core based CPUs with x86\-64 instruction set support. (This supersets \&\s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, 3dNOW!, enhanced 3dNOW! and 64\-bit instruction set extensions.) +.IP "\fIk8-sse3, opteron-sse3, athlon64-sse3\fR" 4 +.IX Item "k8-sse3, opteron-sse3, athlon64-sse3" +Improved versions of k8, opteron and athlon64 with \s-1SSE3\s0 instruction set support. .IP "\fIwinchip\-c6\fR" 4 .IX Item "winchip-c6" \&\s-1IDT\s0 Winchip C6 \s-1CPU\s0, dealt in same way as i486 with additional \s-1MMX\s0 instruction Modified: stable/8/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/8/contrib/gcc/doc/invoke.texi Sun Mar 6 08:56:44 2011 (r219328) +++ stable/8/contrib/gcc/doc/invoke.texi Sun Mar 6 09:01:29 2011 (r219329) @@ -9382,6 +9382,8 @@ instruction set support. @item k8, opteron, athlon64, athlon-fx AMD K8 core based CPUs with x86-64 instruction set support. (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and 64-bit instruction set extensions.) +@item k8-sse3, opteron-sse3, athlon64-sse3 +Improved versions of k8, opteron and athlon64 with SSE3 instruction set support. @item winchip-c6 IDT Winchip C6 CPU, dealt in same way as i486 with additional MMX instruction set support. From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 09:02:35 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4F97106566B; Sun, 6 Mar 2011 09:02:35 +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 A9CCE8FC14; Sun, 6 Mar 2011 09:02:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2692ZCe091923; Sun, 6 Mar 2011 09:02:35 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2692Z0G091921; Sun, 6 Mar 2011 09:02:35 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201103060902.p2692Z0G091921@svn.freebsd.org> From: Martin Matuska Date: Sun, 6 Mar 2011 09:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219330 - stable/8/share/mk X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 09:02:35 -0000 Author: mm Date: Sun Mar 6 09:02:35 2011 New Revision: 219330 URL: http://svn.freebsd.org/changeset/base/219330 Log: MFC r218896: Add opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk. - add "sse3" to MACHINE_CPU for the new cpu types - for i386, default to CPUTYPE=prescott for the new cpu types PR: gnu/154906 Discussed with: kib, kan, dim Modified: stable/8/share/mk/bsd.cpu.mk Directory Properties: stable/8/share/mk/ (props changed) Modified: stable/8/share/mk/bsd.cpu.mk ============================================================================== --- stable/8/share/mk/bsd.cpu.mk Sun Mar 6 09:01:29 2011 (r219329) +++ stable/8/share/mk/bsd.cpu.mk Sun Mar 6 09:02:35 2011 (r219330) @@ -49,6 +49,9 @@ CPUTYPE = pentiumpro CPUTYPE = pentium-mmx . elif ${CPUTYPE} == "i586" CPUTYPE = pentium +. elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" || \ + ${CPUTYPE} == "k8-sse3" +CPUTYPE = prescott . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "k8" CPUTYPE = athlon-mp @@ -156,7 +159,9 @@ _CPUCFLAGS = -mcpu=ultrasparc3 # presence of a CPU feature. . if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" +. if ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" +MACHINE_CPU = athlon-xp athlon k7 3dnow sse3 sse2 sse mmx k6 k5 i586 i486 i386 +. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ ${CPUTYPE} == "athlon-4" @@ -195,7 +200,9 @@ MACHINE_CPU = i486 i386 MACHINE_CPU = i386 . endif . elif ${MACHINE_ARCH} == "amd64" -. if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8" +. if ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" || ${CPUTYPE} == "k8-sse3" +MACHINE_CPU = k8 3dnow sse3 +. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow . elif ${CPUTYPE} == "nocona" MACHINE_CPU = sse3 From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 10:32:58 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A21EC106566B; Sun, 6 Mar 2011 10:32:58 +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 903D88FC0C; Sun, 6 Mar 2011 10:32:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p26AWwNW095214; Sun, 6 Mar 2011 10:32:58 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p26AWwn8095212; Sun, 6 Mar 2011 10:32:58 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201103061032.p26AWwn8095212@svn.freebsd.org> From: Martin Matuska Date: Sun, 6 Mar 2011 10:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219331 - stable/8/share/examples/etc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 10:32:58 -0000 Author: mm Date: Sun Mar 6 10:32:58 2011 New Revision: 219331 URL: http://svn.freebsd.org/changeset/base/219331 Log: MFC r218896 (share/examples part): Add opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk. - add "sse3" to MACHINE_CPU for the new cpu types - for i386, default to CPUTYPE=prescott for the new cpu types PR: gnu/154906 Discussed with: kib, kan, dim Modified: stable/8/share/examples/etc/make.conf Directory Properties: stable/8/share/examples/ (props changed) stable/8/share/examples/etc/ (props changed) stable/8/share/examples/kld/syscall/ (props changed) Modified: stable/8/share/examples/etc/make.conf ============================================================================== --- stable/8/share/examples/etc/make.conf Sun Mar 6 09:02:35 2011 (r219330) +++ stable/8/share/examples/etc/make.conf Sun Mar 6 10:32:58 2011 (r219331) @@ -30,8 +30,9 @@ # NO_CPU_CFLAGS variable below. # Currently the following CPU types are recognized: # Intel x86 architecture: -# (AMD CPUs) opteron athlon64 athlon-mp athlon-xp athlon-4 -# athlon-tbird athlon k8 k6-3 k6-2 k6 k5 +# (AMD CPUs) opteron-sse3 opteron athlon64-sse3 athlon64 athlon-mp +# athlon-xp athlon-4 athlon-tbird athlon k8-sse3 k8 +# k6-3 k6-2 k6 k5 # (Intel CPUs) core2 core nocona pentium4m pentium4 prescott # pentium3m pentium3 pentium-m pentium2 # pentiumpro pentium-mmx pentium i486 i386 From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 11:43:02 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A12A81065675; Sun, 6 Mar 2011 11:43:02 +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 8DA918FC19; Sun, 6 Mar 2011 11:43:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p26Bh2UH096904; Sun, 6 Mar 2011 11:43:02 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p26Bh2od096896; Sun, 6 Mar 2011 11:43:02 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103061143.p26Bh2od096896@svn.freebsd.org> From: Marius Strobl Date: Sun, 6 Mar 2011 11:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219332 - stable/8/sys/dev/isp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 11:43:02 -0000 Author: marius Date: Sun Mar 6 11:43:02 2011 New Revision: 219332 URL: http://svn.freebsd.org/changeset/base/219332 Log: - Use the correct DMA tag/map pair for synchronize the FC scratch area. - Allocate coherent DMA memory for the request/response queue area and and the FC scratch area. These changes allow isp(4) to work properly on sparc64 with usage of the IOMMU streaming buffers enabled. Approved by: mjacob Modified: stable/8/sys/dev/isp/isp.c stable/8/sys/dev/isp/isp_freebsd.c stable/8/sys/dev/isp/isp_freebsd.h stable/8/sys/dev/isp/isp_library.c stable/8/sys/dev/isp/isp_pci.c stable/8/sys/dev/isp/isp_sbus.c stable/8/sys/dev/isp/ispvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/isp/isp.c ============================================================================== --- stable/8/sys/dev/isp/isp.c Sun Mar 6 10:32:58 2011 (r219331) +++ stable/8/sys/dev/isp/isp.c Sun Mar 6 11:43:02 2011 (r219332) @@ -777,7 +777,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_IOXPUT_32(isp, ptr[wi++], &cp[i]); wl--; } - MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp))); + MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); ISP_MEMZERO(&mbs, sizeof (mbs)); if (la < 0x10000 && nw < 0x10000) { mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; @@ -846,7 +846,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_IOXPUT_16(isp, ptr[wi++], &cp[i]); wl--; } - MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp))); + MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); ISP_MEMZERO(&mbs, sizeof (mbs)); if (la < 0x10000) { mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; @@ -1716,7 +1716,7 @@ isp_fibre_init(ispsoftc_t *isp) isp_prt(isp, ISP_LOGDEBUG0, "INIT F/W from %p (%08x%08x)", fcp->isp_scratch, (uint32_t) ((uint64_t)fcp->isp_scdma >> 32), (uint32_t) fcp->isp_scdma); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (*icbp)); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (*icbp), 0); isp_mboxcmd(isp, &mbs); FC_SCRATCH_RELEASE(isp, 0); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -2008,7 +2008,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); isp_prt(isp, ISP_LOGDEBUG0, "INIT F/W from %04x%04x%04x%04x", DMA_WD3(fcp->isp_scdma), DMA_WD2(fcp->isp_scdma), DMA_WD1(fcp->isp_scdma), DMA_WD0(fcp->isp_scdma)); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (*icbp)); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (*icbp), 0); isp_mboxcmd(isp, &mbs); FC_SCRATCH_RELEASE(isp, 0); @@ -2125,13 +2125,13 @@ isp_plogx(ispsoftc_t *isp, int chan, uin mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN, chan); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { rval = mbs.param[0]; goto out; } - MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN, chan); scp += QENTRY_LEN; isp_get_plogx(isp, (isp_plogx_t *) scp, plp); if (isp->isp_dblev & ISP_LOGDEBUG1) { @@ -2324,7 +2324,7 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui return (-1); } } - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (un)); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (un), chan); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { if (dolock) { @@ -3215,7 +3215,7 @@ isp_gid_ft_sns(ispsoftc_t *isp, int chan rq->snscb_fc4_type = FC4_SCSI; isp_put_gid_ft_request(isp, rq, fcp->isp_scratch); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_GID_FT_REQ_SIZE); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_GID_FT_REQ_SIZE, chan); MBSINIT(&mbs, MBOX_SEND_SNS, MBLOGALL, 10000000); mbs.param[0] = MBOX_SEND_SNS; @@ -3310,12 +3310,12 @@ isp_gid_ft_ct_passthru(ispsoftc_t *isp, mbs.param[3] = DMA_WD0(fcp->isp_scdma + CTXOFF); mbs.param[6] = DMA_WD3(fcp->isp_scdma + CTXOFF); mbs.param[7] = DMA_WD2(fcp->isp_scdma + CTXOFF); - MEMORYBARRIER(isp, SYNC_SFORDEV, XTXOFF, 2 * QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORDEV, XTXOFF, 2 * QENTRY_LEN, chan); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return (-1); } - MEMORYBARRIER(isp, SYNC_SFORCPU, ZTXOFF, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORCPU, ZTXOFF, QENTRY_LEN, chan); pt = &un.plocal; isp_get_ct_pt(isp, (isp_ct_pt_t *) &scp[ZTXOFF], pt); if (isp->isp_dblev & ISP_LOGDEBUG1) { @@ -3328,7 +3328,7 @@ isp_gid_ft_ct_passthru(ispsoftc_t *isp, chan, pt->ctp_status); return (-1); } - MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN + 16); + MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN + 16, chan); if (isp->isp_dblev & ISP_LOGDEBUG1) { isp_print_bytes(isp, "CT response", GIDLEN+16, &scp[IGPOFF]); } @@ -3414,7 +3414,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha return (0); } - MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN); + MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN, chan); rs0 = (sns_gid_ft_rsp_t *) ((uint8_t *)fcp->isp_scratch+IGPOFF); rs1 = (sns_gid_ft_rsp_t *) ((uint8_t *)fcp->isp_scratch+OGPOFF); isp_get_gid_ft_response(isp, rs0, rs1, NGENT); @@ -4008,7 +4008,7 @@ isp_register_fc4_type(ispsoftc_t *isp, i mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_RFT_ID_REQ_SIZE); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_RFT_ID_REQ_SIZE, chan); isp_mboxcmd(isp, &mbs); FC_SCRATCH_RELEASE(isp, chan); if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { @@ -4094,13 +4094,13 @@ isp_register_fc4_type_24xx(ispsoftc_t *i mbs.param[3] = DMA_WD0(fcp->isp_scdma + CTXOFF); mbs.param[6] = DMA_WD3(fcp->isp_scdma + CTXOFF); mbs.param[7] = DMA_WD2(fcp->isp_scdma + CTXOFF); - MEMORYBARRIER(isp, SYNC_SFORDEV, XTXOFF, 2 * QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORDEV, XTXOFF, 2 * QENTRY_LEN, chan); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { FC_SCRATCH_RELEASE(isp, chan); return (-1); } - MEMORYBARRIER(isp, SYNC_SFORCPU, ZTXOFF, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORCPU, ZTXOFF, QENTRY_LEN, chan); pt = &un.plocal; isp_get_ct_pt(isp, (isp_ct_pt_t *) &scp[ZTXOFF], pt); if (isp->isp_dblev & ISP_LOGDEBUG1) { @@ -4552,7 +4552,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct break; } isp_put_24xx_tmf(isp, tmf, fcp->isp_scratch); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN, chan); fcp->sendmarker = 1; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -4560,7 +4560,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct break; } MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, - QENTRY_LEN); + QENTRY_LEN, chan); sp = (isp24xx_statusreq_t *) local; isp_get_24xx_response(isp, &((isp24xx_statusreq_t *)fcp->isp_scratch)[1], sp); @@ -4656,14 +4656,14 @@ isp_control(ispsoftc_t *isp, ispctl_t ct ab2 = (isp24xx_abrt_t *) &((uint8_t *)fcp->isp_scratch)[QENTRY_LEN]; ab2->abrt_nphdl = 0xdeaf; - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, 2 * QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, 2 * QENTRY_LEN, chan); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { FC_SCRATCH_RELEASE(isp, chan); break; } MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, - QENTRY_LEN); + QENTRY_LEN, chan); isp_get_24xx_abrt(isp, ab2, ab); FC_SCRATCH_RELEASE(isp, chan); if (ab->abrt_nphdl == ISP24XX_ABRT_OKAY) { @@ -4936,7 +4936,7 @@ again: void *addr; oop = optr; - MEMORYBARRIER(isp, SYNC_ATIOQ, oop, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_ATIOQ, oop, QENTRY_LEN, -1); addr = ISP_QUEUE_ENTRY(isp->isp_atioq, oop); isp_get_hdr(isp, addr, (isphdr_t *)qe); hp = (isphdr_t *)qe; @@ -5053,7 +5053,7 @@ again: /* * Synchronize our view of this response queue entry. */ - MEMORYBARRIER(isp, SYNC_RESULT, oop, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_RESULT, oop, QENTRY_LEN, -1); isp_get_hdr(isp, hp, &sp->req_header); etype = sp->req_header.rqs_entry_type; Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Sun Mar 6 10:32:58 2011 (r219331) +++ stable/8/sys/dev/isp/isp_freebsd.c Sun Mar 6 11:43:02 2011 (r219332) @@ -604,11 +604,11 @@ ispioctl(struct cdev *dev, u_long c, cad break; } isp_put_24xx_tmf(isp, tmf, fcp->isp_scratch); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN, chan); sp = (isp24xx_statusreq_t *) local; sp->req_completion_status = 1; retval = isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs); - MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN, chan); isp_get_24xx_response(isp, &((isp24xx_statusreq_t *)fcp->isp_scratch)[1], sp); FC_SCRATCH_RELEASE(isp, chan); if (retval || sp->req_completion_status != 0) { Modified: stable/8/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.h Sun Mar 6 10:32:58 2011 (r219331) +++ stable/8/sys/dev/isp/isp_freebsd.h Sun Mar 6 11:43:02 2011 (r219332) @@ -338,15 +338,27 @@ struct isposinfo { #define MAXISPREQUEST(isp) ((IS_FC(isp) || IS_ULTRA2(isp))? 1024 : 256) -#define MEMORYBARRIER(isp, type, offset, size) \ +#define MEMORYBARRIER(isp, type, offset, size, chan) \ switch (type) { \ case SYNC_SFORDEV: \ +{ \ + struct isp_fc *fc = ISP_FC_PC(isp, chan); \ + bus_dmamap_sync(fc->tdmat, fc->tdmap, \ + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \ + break; \ +} \ case SYNC_REQUEST: \ bus_dmamap_sync(isp->isp_osinfo.cdmat, \ isp->isp_osinfo.cdmap, \ BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \ break; \ case SYNC_SFORCPU: \ +{ \ + struct isp_fc *fc = ISP_FC_PC(isp, chan); \ + bus_dmamap_sync(fc->tdmat, fc->tdmap, \ + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \ + break; \ +} \ case SYNC_RESULT: \ bus_dmamap_sync(isp->isp_osinfo.cdmat, \ isp->isp_osinfo.cdmap, \ Modified: stable/8/sys/dev/isp/isp_library.c ============================================================================== --- stable/8/sys/dev/isp/isp_library.c Sun Mar 6 10:32:58 2011 (r219331) +++ stable/8/sys/dev/isp/isp_library.c Sun Mar 6 11:43:02 2011 (r219332) @@ -591,13 +591,13 @@ isp_fc_change_role(ispsoftc_t *isp, int mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, 2 * QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, 2 * QENTRY_LEN, chan); isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { FC_SCRATCH_RELEASE(isp, chan); return (EIO); } - MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN); + MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN, chan); isp_get_vp_modify(isp, (vp_modify_t *)&scp[QENTRY_LEN], vp); #ifdef ISP_TARGET_MODE Modified: stable/8/sys/dev/isp/isp_pci.c ============================================================================== --- stable/8/sys/dev/isp/isp_pci.c Sun Mar 6 10:32:58 2011 (r219331) +++ stable/8/sys/dev/isp/isp_pci.c Sun Mar 6 11:43:02 2011 (r219332) @@ -1180,12 +1180,12 @@ isp_pci_rd_reg(ispsoftc_t *isp, int rego */ oldconf = BXR2(isp, IspVirt2Off(isp, BIU_CONF1)); BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oldconf | BIU_PCI_CONF1_SXP); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } rv = BXR2(isp, IspVirt2Off(isp, regoff)); if ((regoff & _BLK_REG_MASK) == SXP_BLOCK) { BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oldconf); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } return (rv); } @@ -1202,13 +1202,13 @@ isp_pci_wr_reg(ispsoftc_t *isp, int rego oldconf = BXR2(isp, IspVirt2Off(isp, BIU_CONF1)); BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oldconf | BIU_PCI_CONF1_SXP); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } BXW2(isp, IspVirt2Off(isp, regoff), val); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 2, -1); if ((regoff & _BLK_REG_MASK) == SXP_BLOCK) { BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oldconf); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } } @@ -1231,17 +1231,17 @@ isp_pci_rd_reg_1080(ispsoftc_t *isp, int else tc |= BIU_PCI1080_CONF1_SXP0; BXW2(isp, IspVirt2Off(isp, BIU_CONF1), tc); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } else if ((regoff & _BLK_REG_MASK) == DMA_BLOCK) { oc = BXR2(isp, IspVirt2Off(isp, BIU_CONF1)); BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oc | BIU_PCI1080_CONF1_DMA); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } rv = BXR2(isp, IspVirt2Off(isp, regoff)); if (oc) { BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oc); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } return (rv); } @@ -1264,18 +1264,18 @@ isp_pci_wr_reg_1080(ispsoftc_t *isp, int else tc |= BIU_PCI1080_CONF1_SXP0; BXW2(isp, IspVirt2Off(isp, BIU_CONF1), tc); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } else if ((regoff & _BLK_REG_MASK) == DMA_BLOCK) { oc = BXR2(isp, IspVirt2Off(isp, BIU_CONF1)); BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oc | BIU_PCI1080_CONF1_DMA); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } BXW2(isp, IspVirt2Off(isp, regoff), val); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 2, -1); if (oc) { BXW2(isp, IspVirt2Off(isp, BIU_CONF1), oc); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, BIU_CONF1), 2, -1); } } @@ -1350,7 +1350,7 @@ isp_pci_wr_reg_2400(ispsoftc_t *isp, int break; case MBOX_BLOCK: BXW2(isp, IspVirt2Off(isp, regoff), val); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 2); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 2, -1); return; case SXP_BLOCK: isp_prt(isp, ISP_LOGWARN, "SXP_BLOCK write at 0x%x", regoff); @@ -1386,7 +1386,7 @@ isp_pci_wr_reg_2400(ispsoftc_t *isp, int case BIU2400_GPIOE: case BIU2400_HSEMA: BXW4(isp, IspVirt2Off(isp, regoff), val); - MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 4); + MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 4, -1); break; default: isp_prt(isp, ISP_LOGERR, @@ -1574,7 +1574,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) return (1); } - if (bus_dmamem_alloc(isp->isp_osinfo.cdmat, (void **)&base, BUS_DMA_NOWAIT, &isp->isp_osinfo.cdmap) != 0) { + if (bus_dmamem_alloc(isp->isp_osinfo.cdmat, (void **)&base, BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &isp->isp_osinfo.cdmap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate %d bytes of CCB memory", len); bus_dma_tag_destroy(isp->isp_osinfo.cdmat); free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); @@ -1603,7 +1603,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) if (isp_dma_tag_create(isp->isp_osinfo.dmat, 64, slim, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, ISP_FC_SCRLEN, 1, slim, 0, &fc->tdmat)) { goto bad; } - if (bus_dmamem_alloc(fc->tdmat, (void **)&base, BUS_DMA_NOWAIT, &fc->tdmap) != 0) { + if (bus_dmamem_alloc(fc->tdmat, (void **)&base, BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &fc->tdmap) != 0) { bus_dma_tag_destroy(fc->tdmat); goto bad; } Modified: stable/8/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/8/sys/dev/isp/isp_sbus.c Sun Mar 6 10:32:58 2011 (r219331) +++ stable/8/sys/dev/isp/isp_sbus.c Sun Mar 6 11:43:02 2011 (r219332) @@ -401,7 +401,7 @@ isp_sbus_wr_reg(ispsoftc_t *isp, int reg isp_prt(isp, ISP_LOGDEBUG3, "isp_sbus_wr_reg(off %x) = %x", regoff, val); bus_space_write_2(isp->isp_bus_tag, isp->isp_bus_handle, offset, val); - MEMORYBARRIER(isp, SYNC_REG, offset, 2); + MEMORYBARRIER(isp, SYNC_REG, offset, 2, -1); } struct imush { @@ -496,7 +496,7 @@ isp_sbus_mbxdma(ispsoftc_t *isp) return (1); } - if (bus_dmamem_alloc(isp->isp_osinfo.cdmat, (void **)&base, BUS_DMA_NOWAIT, + if (bus_dmamem_alloc(isp->isp_osinfo.cdmat, (void **)&base, BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &isp->isp_osinfo.cdmap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate %d bytes of CCB memory", len); Modified: stable/8/sys/dev/isp/ispvar.h ============================================================================== --- stable/8/sys/dev/isp/ispvar.h Sun Mar 6 10:32:58 2011 (r219331) +++ stable/8/sys/dev/isp/ispvar.h Sun Mar 6 11:43:02 2011 (r219332) @@ -154,13 +154,13 @@ struct ispmdvec { #define ISP_QAVAIL(isp) \ ISP_QFREE(isp->isp_reqidx, isp->isp_reqodx, RQUEST_QUEUE_LEN(isp)) -#define ISP_ADD_REQUEST(isp, nxti) \ - MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN); \ - ISP_WRITE(isp, isp->isp_rqstinrp, nxti); \ +#define ISP_ADD_REQUEST(isp, nxti) \ + MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN, -1); \ + ISP_WRITE(isp, isp->isp_rqstinrp, nxti); \ isp->isp_reqidx = nxti #define ISP_SYNC_REQUEST(isp) \ - MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN); \ + MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN, -1); \ isp->isp_reqidx = ISP_NXT_QENTRY(isp->isp_reqidx, RQUEST_QUEUE_LEN(isp)); \ ISP_WRITE(isp, isp->isp_rqstinrp, isp->isp_reqidx) @@ -1010,7 +1010,7 @@ void isp_async(ispsoftc_t *, ispasync_t, * MAXISPREQUEST(ispsoftc_t *) maximum request queue size * for this particular board type * - * MEMORYBARRIER(ispsoftc_t *, barrier_type, offset, size) + * MEMORYBARRIER(ispsoftc_t *, barrier_type, offset, size, chan) * * Function/Macro the provides memory synchronization on * various objects so that the ISP's and the system's view From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 11:51:39 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 797C9106566B; Sun, 6 Mar 2011 11:51:39 +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 663BC8FC12; Sun, 6 Mar 2011 11:51:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p26BpdY5097150; Sun, 6 Mar 2011 11:51:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p26Bpd12097140; Sun, 6 Mar 2011 11:51:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103061151.p26Bpd12097140@svn.freebsd.org> From: Marius Strobl Date: Sun, 6 Mar 2011 11:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219333 - in stable/8/sys: dev/ata dev/ata/chipsets powerpc/powermac X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 11:51:39 -0000 Author: marius Date: Sun Mar 6 11:51:39 2011 New Revision: 219333 URL: http://svn.freebsd.org/changeset/base/219333 Log: MFC: r216013, r216083 Several chipset drivers alter parameters relevant for the DMA tag creation, i.e. alignment, max_address, max_iosize and segsize (only max_address is thought to have an negative impact regarding this issue though), after calling ata_dmainit() either directly or indirectly so these values have no effect or at least no effect on the DMA tags and the defaults are used for the latter instead. So change the drivers to set these parameters up-front and ata_dmainit() to honor them. Reviewd by: mav Modified: stable/8/sys/dev/ata/ata-dma.c stable/8/sys/dev/ata/chipsets/ata-ahci.c stable/8/sys/dev/ata/chipsets/ata-cyrix.c stable/8/sys/dev/ata/chipsets/ata-marvell.c stable/8/sys/dev/ata/chipsets/ata-national.c stable/8/sys/dev/ata/chipsets/ata-promise.c stable/8/sys/dev/ata/chipsets/ata-serverworks.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c stable/8/sys/powerpc/powermac/ata_dbdma.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ata/ata-dma.c ============================================================================== --- stable/8/sys/dev/ata/ata-dma.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/ata-dma.c Sun Mar 6 11:51:39 2011 (r219333) @@ -68,17 +68,28 @@ ata_dmainit(device_t dev) struct ata_channel *ch = device_get_softc(dev); struct ata_dc_cb_args dcba; - ch->dma.alloc = ata_dmaalloc; - ch->dma.free = ata_dmafree; - ch->dma.setprd = ata_dmasetprd; - ch->dma.load = ata_dmaload; - ch->dma.unload = ata_dmaunload; - ch->dma.alignment = 2; - ch->dma.boundary = 65536; - ch->dma.segsize = 65536; - ch->dma.max_iosize = MIN((ATA_DMA_ENTRIES - 1) * PAGE_SIZE, MAXPHYS); - ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT; - ch->dma.dma_slots = 1; + if (ch->dma.alloc == NULL) + ch->dma.alloc = ata_dmaalloc; + if (ch->dma.free == NULL) + ch->dma.free = ata_dmafree; + if (ch->dma.setprd == NULL) + ch->dma.setprd = ata_dmasetprd; + if (ch->dma.load == NULL) + ch->dma.load = ata_dmaload; + if (ch->dma.unload == NULL) + ch->dma.unload = ata_dmaunload; + if (ch->dma.alignment == 0) + ch->dma.alignment = 2; + if (ch->dma.boundary == 0) + ch->dma.boundary = 65536; + if (ch->dma.segsize == 0) + ch->dma.segsize = 65536; + if (ch->dma.max_iosize == 0) + ch->dma.max_iosize = MIN((ATA_DMA_ENTRIES - 1) * PAGE_SIZE, MAXPHYS); + if (ch->dma.max_address == 0) + ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT; + if (ch->dma.dma_slots == 0) + ch->dma.dma_slots = 1; if (bus_dma_tag_create(bus_get_dma_tag(dev), ch->dma.alignment, 0, ch->dma.max_address, BUS_SPACE_MAXADDR, Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ahci.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/chipsets/ata-ahci.c Sun Mar 6 11:51:39 2011 (r219333) @@ -1005,12 +1005,12 @@ ata_ahci_dmainit(device_t dev) struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); - ata_dmainit(dev); /* note start and stop are not used here */ ch->dma.setprd = ata_ahci_dmasetprd; ch->dma.max_iosize = (ATA_AHCI_DMA_ENTRIES - 1) * PAGE_SIZE; if (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_64BIT) ch->dma.max_address = BUS_SPACE_MAXADDR; + ata_dmainit(dev); } static int Modified: stable/8/sys/dev/ata/chipsets/ata-cyrix.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-cyrix.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/chipsets/ata-cyrix.c Sun Mar 6 11:51:39 2011 (r219333) @@ -56,7 +56,6 @@ static int ata_cyrix_chipinit(device_t d static int ata_cyrix_ch_attach(device_t dev); static int ata_cyrix_setmode(device_t dev, int target, int mode); - /* * Cyrix chipset support functions */ @@ -89,15 +88,12 @@ static int ata_cyrix_ch_attach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); - int error; - error = ata_pci_ch_attach(dev); ch->dma.alignment = 16; ch->dma.max_iosize = 64 * DEV_BSIZE; - return (error); + return (ata_pci_ch_attach(dev)); } - static int ata_cyrix_setmode(device_t dev, int target, int mode) { Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Mar 6 11:51:39 2011 (r219333) @@ -614,7 +614,6 @@ ata_marvell_edma_dmainit(device_t dev) struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); - ata_dmainit(dev); /* note start and stop are not used here */ ch->dma.setprd = ata_marvell_edma_dmasetprd; @@ -625,6 +624,7 @@ ata_marvell_edma_dmainit(device_t dev) /* chip does not reliably do 64K DMA transfers */ if (ctlr->chip->cfg2 == MV_50XX || ctlr->chip->cfg2 == MV_60XX) ch->dma.max_iosize = 64 * DEV_BSIZE; + ata_dmainit(dev); } ATA_DECLARE_DRIVER(ata_marvell); Modified: stable/8/sys/dev/ata/chipsets/ata-national.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-national.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/chipsets/ata-national.c Sun Mar 6 11:51:39 2011 (r219333) @@ -90,12 +90,10 @@ static int ata_national_ch_attach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); - int error; - error = ata_pci_ch_attach(dev); ch->dma.alignment = 16; ch->dma.max_iosize = 64 * DEV_BSIZE; - return (error); + return (ata_pci_ch_attach(dev)); } static int Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Mar 6 11:51:39 2011 (r219333) @@ -979,13 +979,12 @@ ata_promise_mio_dmainit(device_t dev) { struct ata_channel *ch = device_get_softc(dev); - ata_dmainit(dev); /* note start and stop are not used here */ ch->dma.setprd = ata_promise_mio_setprd; ch->dma.max_iosize = 65536; + ata_dmainit(dev); } - #define MAXLASTSGSIZE (32 * sizeof(u_int32_t)) static void ata_promise_mio_setprd(void *xsc, bus_dma_segment_t *segs, int nsegs, int error) Modified: stable/8/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-serverworks.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/chipsets/ata-serverworks.c Sun Mar 6 11:51:39 2011 (r219333) @@ -182,8 +182,6 @@ ata_serverworks_ch_attach(device_t dev) int ch_offset; int i; - ata_pci_dmainit(dev); - ch_offset = ch->unit * 0x100; for (i = ATA_DATA; i < ATA_MAX_RES; i++) @@ -253,6 +251,8 @@ ata_serverworks_ch_attach(device_t dev) /* chip does not reliably do 64K DMA transfers */ ch->dma.max_iosize = 64 * DEV_BSIZE; + ata_pci_dmainit(dev); + return 0; } Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Mar 6 11:51:39 2011 (r219333) @@ -289,8 +289,6 @@ ata_sii_ch_attach(device_t dev) int unit01 = (ch->unit & 1), unit10 = (ch->unit & 2); int i; - ata_pci_dmainit(dev); - for (i = ATA_DATA; i <= ATA_COMMAND; i++) { ch->r_io[i].res = ctlr->r_res2; ch->r_io[i].offset = 0x80 + i + (unit01 << 6) + (unit10 << 8); @@ -332,6 +330,9 @@ ata_sii_ch_attach(device_t dev) ch->hw.status = ata_sii_status; if (ctlr->chip->cfg2 & SII_SETCLK) ch->flags |= ATA_CHECKS_CABLE; + + ata_pci_dmainit(dev); + return 0; } @@ -915,11 +916,11 @@ ata_siiprb_dmainit(device_t dev) { struct ata_channel *ch = device_get_softc(dev); - ata_dmainit(dev); /* note start and stop are not used here */ ch->dma.setprd = ata_siiprb_dmasetprd; ch->dma.max_address = BUS_SPACE_MAXADDR; ch->dma.max_iosize = (ATA_SIIPRB_DMA_ENTRIES - 1) * PAGE_SIZE; + ata_dmainit(dev); } ATA_DECLARE_DRIVER(ata_sii); Modified: stable/8/sys/powerpc/powermac/ata_dbdma.c ============================================================================== --- stable/8/sys/powerpc/powermac/ata_dbdma.c Sun Mar 6 11:43:02 2011 (r219332) +++ stable/8/sys/powerpc/powermac/ata_dbdma.c Sun Mar 6 11:51:39 2011 (r219333) @@ -268,7 +268,6 @@ ata_dbdma_dmainit(device_t dev) dbdma_insert_stop(sc->dbdma,0); sc->next_dma_slot=1; - ata_dmainit(dev); sc->sc_ch.dma.start = ata_dbdma_start; sc->sc_ch.dma.stop = ata_dbdma_stop; sc->sc_ch.dma.load = ata_dbdma_load; @@ -279,9 +278,9 @@ ata_dbdma_dmainit(device_t dev) * if we try to do a 64K transfer, so stop short of 64K. */ sc->sc_ch.dma.segsize = 126 * DEV_BSIZE; + ata_dmainit(dev); sc->sc_ch.hw.status = ata_dbdma_status; mtx_init(&sc->dbdma_mtx, "ATA DBDMA", NULL, MTX_DEF); } - From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 11:56:08 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA528106566B; Sun, 6 Mar 2011 11:56:07 +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 D86148FC16; Sun, 6 Mar 2011 11:56:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p26Bu7tu097300; Sun, 6 Mar 2011 11:56:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p26Bu7Vc097298; Sun, 6 Mar 2011 11:56:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103061156.p26Bu7Vc097298@svn.freebsd.org> From: Marius Strobl Date: Sun, 6 Mar 2011 11:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219334 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 11:56:08 -0000 Author: marius Date: Sun Mar 6 11:56:07 2011 New Revision: 219334 URL: http://svn.freebsd.org/changeset/base/219334 Log: MFC: r218468 Set td_kstack_pages for thread0. Modified: stable/8/sys/sparc64/sparc64/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Sun Mar 6 11:51:39 2011 (r219333) +++ stable/8/sys/sparc64/sparc64/machdep.c Sun Mar 6 11:56:07 2011 (r219334) @@ -548,6 +548,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l proc0.p_md.md_sigtramp = NULL; proc0.p_md.md_utrap = NULL; thread0.td_kstack = kstack0; + thread0.td_kstack_pages = KSTACK_PAGES; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; frame0.tf_tstate = TSTATE_IE | TSTATE_PEF | TSTATE_PRIV; From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 6 18:43:59 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73D4D1065673; Sun, 6 Mar 2011 18:43:59 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 618158FC17; Sun, 6 Mar 2011 18:43:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p26Ihx1w006517; Sun, 6 Mar 2011 18:43:59 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p26Ihx8S006515; Sun, 6 Mar 2011 18:43:59 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103061843.p26Ihx8S006515@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 6 Mar 2011 18:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219345 - stable/8/sys/geom X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 18:43:59 -0000 Author: jh Date: Sun Mar 6 18:43:59 2011 New Revision: 219345 URL: http://svn.freebsd.org/changeset/base/219345 Log: MFC r208927 by mjacob: Try and narrow the gap in which you act on an event that has been canceled. Modified: stable/8/sys/geom/geom_event.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/geom/geom_event.c ============================================================================== --- stable/8/sys/geom/geom_event.c Sun Mar 6 17:46:06 2011 (r219344) +++ stable/8/sys/geom/geom_event.c Sun Mar 6 18:43:59 2011 (r219345) @@ -76,6 +76,7 @@ struct g_event { #define EV_DONE 0x80000 #define EV_WAKEUP 0x40000 #define EV_CANCELED 0x20000 +#define EV_INPROGRESS 0x10000 void g_waitidle(void) @@ -206,12 +207,19 @@ one_event(void) g_topology_unlock(); return (0); } + if (ep->flag & EV_INPROGRESS) { + mtx_unlock(&g_eventlock); + g_topology_unlock(); + return (1); + } + ep->flag |= EV_INPROGRESS; mtx_unlock(&g_eventlock); g_topology_assert(); ep->func(ep->arg, 0); g_topology_assert(); mtx_lock(&g_eventlock); TAILQ_REMOVE(&g_events, ep, events); + ep->flag &= ~EV_INPROGRESS; if (ep->flag & EV_WAKEUP) { ep->flag |= EV_DONE; mtx_unlock(&g_eventlock); @@ -256,6 +264,8 @@ g_cancel_event(void *ref) break; } TAILQ_FOREACH_SAFE(ep, &g_events, events, epn) { + if (ep->flag & EV_INPROGRESS) + continue; for (n = 0; n < G_N_EVENTREFS; n++) { if (ep->ref[n] == NULL) break; From owner-svn-src-stable-8@FreeBSD.ORG Mon Mar 7 00:42:23 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 258F4106567A; Mon, 7 Mar 2011 00:42:23 +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 ED6B48FC08; Mon, 7 Mar 2011 00:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p270gMQL014432; Mon, 7 Mar 2011 00:42:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p270gMND014429; Mon, 7 Mar 2011 00:42:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103070042.p270gMND014429@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 7 Mar 2011 00:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219356 - stable/8/sys/dev/sis X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 00:42:23 -0000 Author: yongari Date: Mon Mar 7 00:42:22 2011 New Revision: 219356 URL: http://svn.freebsd.org/changeset/base/219356 Log: MFC r219102: Make sure changing ownership of RX descriptor to be done as last operation. Previously ownership was transferred to hardware before setting address of new RX buffer such that it was possible for hardware to use wrong RX buffer address. While here keep compiler from re-ordering instructions by declaring descriptor members volatile. Memory barriers would do the same job but volatile is supposed to be cheaper than using memory barriers, especially on MP systems. Submitted by: marius Modified: stable/8/sys/dev/sis/if_sis.c stable/8/sys/dev/sis/if_sisreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/sis/if_sis.c ============================================================================== --- stable/8/sys/dev/sis/if_sis.c Sun Mar 6 23:15:24 2011 (r219355) +++ stable/8/sys/dev/sis/if_sis.c Mon Mar 7 00:42:22 2011 (r219356) @@ -1568,8 +1568,8 @@ sis_newbuf(struct sis_softc *sc, struct sc->sis_rx_sparemap = map; bus_dmamap_sync(sc->sis_rx_tag, rxd->rx_dmamap, BUS_DMASYNC_PREREAD); rxd->rx_m = m; - rxd->rx_desc->sis_cmdsts = htole32(SIS_RXLEN); rxd->rx_desc->sis_ptr = htole32(SIS_ADDR_LO(segs[0].ds_addr)); + rxd->rx_desc->sis_cmdsts = htole32(SIS_RXLEN); return (0); } Modified: stable/8/sys/dev/sis/if_sisreg.h ============================================================================== --- stable/8/sys/dev/sis/if_sisreg.h Sun Mar 6 23:15:24 2011 (r219355) +++ stable/8/sys/dev/sis/if_sisreg.h Mon Mar 7 00:42:22 2011 (r219356) @@ -337,8 +337,8 @@ struct sis_desc { /* SiS hardware descriptor section */ uint32_t sis_next; - uint32_t sis_cmdsts; - uint32_t sis_ptr; + volatile uint32_t sis_cmdsts; + volatile uint32_t sis_ptr; }; #define SIS_CMDSTS_BUFLEN 0x00000FFF From owner-svn-src-stable-8@FreeBSD.ORG Mon Mar 7 09:04:07 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C8E1106564A; Mon, 7 Mar 2011 09:04:07 +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 2A3FA8FC13; Mon, 7 Mar 2011 09:04:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p27947H9027801; Mon, 7 Mar 2011 09:04:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p27947jE027799; Mon, 7 Mar 2011 09:04:07 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201103070904.p27947jE027799@svn.freebsd.org> From: Xin LI Date: Mon, 7 Mar 2011 09:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219367 - in stable: 7/usr.sbin/faithd 8/usr.sbin/faithd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 09:04:07 -0000 Author: delphij Date: Mon Mar 7 09:04:06 2011 New Revision: 219367 URL: http://svn.freebsd.org/changeset/base/219367 Log: MFC r219158: Correct a typo. PR: bin/155175 Submitted by: Peter J. Philipp Modified: stable/8/usr.sbin/faithd/faithd.c Directory Properties: stable/8/usr.sbin/faithd/ (props changed) Changes in other areas also in this revision: Modified: stable/7/usr.sbin/faithd/faithd.c Directory Properties: stable/7/usr.sbin/faithd/ (props changed) Modified: stable/8/usr.sbin/faithd/faithd.c ============================================================================== --- stable/8/usr.sbin/faithd/faithd.c Mon Mar 7 08:54:20 2011 (r219366) +++ stable/8/usr.sbin/faithd/faithd.c Mon Mar 7 09:04:06 2011 (r219367) @@ -340,7 +340,7 @@ daemon_main(int argc, char **argv) snprintf(logname, sizeof(logname), "faithd %s", service); snprintf(procname, sizeof(procname), "accepting port %s", service); openlog(logname, LOG_PID | LOG_NOWAIT, LOG_DAEMON); - syslog(LOG_INFO, "Staring faith daemon for %s port", service); + syslog(LOG_INFO, "Starting faith daemon for %s port", service); play_service(s_wld); /* NOTREACHED */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Mar 7 15:24:36 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13413106566C; Mon, 7 Mar 2011 15:24:36 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 021D08FC16; Mon, 7 Mar 2011 15:24:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p27FOZhg039339; Mon, 7 Mar 2011 15:24:35 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p27FOZrp039336; Mon, 7 Mar 2011 15:24:35 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103071524.p27FOZrp039336@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 7 Mar 2011 15:24:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219378 - stable/8/sys/geom X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 15:24:36 -0000 Author: jh Date: Mon Mar 7 15:24:35 2011 New Revision: 219378 URL: http://svn.freebsd.org/changeset/base/219378 Log: MFC r215687: Use g_eventlock to protect against losing wakeups in the g_event process and replace tsleep(9) with msleep(9) which doesn't use a timeout. The previously used timeout caused the event process to wake up ten times per second on an idle system. one_event() is now called with the topology lock held and it returns with both the topology and event locks held when there are no more events in the queue. Modified: stable/8/sys/geom/geom_event.c stable/8/sys/geom/geom_kern.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/geom/geom_event.c ============================================================================== --- stable/8/sys/geom/geom_event.c Mon Mar 7 15:19:17 2011 (r219377) +++ stable/8/sys/geom/geom_event.c Mon Mar 7 15:24:35 2011 (r219378) @@ -183,33 +183,27 @@ one_event(void) struct g_event *ep; struct g_provider *pp; - g_topology_lock(); - for (;;) { - mtx_lock(&g_eventlock); - TAILQ_FOREACH(pp, &g_doorstep, orphan) { - if (pp->nstart == pp->nend) - break; - } - if (pp != NULL) { - G_VALID_PROVIDER(pp); - TAILQ_REMOVE(&g_doorstep, pp, orphan); - } - mtx_unlock(&g_eventlock); - if (pp == NULL) + g_topology_assert(); + mtx_lock(&g_eventlock); + TAILQ_FOREACH(pp, &g_doorstep, orphan) { + if (pp->nstart == pp->nend) break; + } + if (pp != NULL) { + G_VALID_PROVIDER(pp); + TAILQ_REMOVE(&g_doorstep, pp, orphan); + mtx_unlock(&g_eventlock); g_orphan_register(pp); + return (1); } - mtx_lock(&g_eventlock); + ep = TAILQ_FIRST(&g_events); if (ep == NULL) { wakeup(&g_pending_events); - mtx_unlock(&g_eventlock); - g_topology_unlock(); return (0); } if (ep->flag & EV_INPROGRESS) { mtx_unlock(&g_eventlock); - g_topology_unlock(); return (1); } ep->flag |= EV_INPROGRESS; @@ -228,7 +222,6 @@ one_event(void) mtx_unlock(&g_eventlock); g_free(ep); } - g_topology_unlock(); return (1); } @@ -237,16 +230,27 @@ g_run_events() { int i; - while (one_event()) - ; - g_topology_lock(); - i = g_wither_work; - while (i) { - i = g_wither_washer(); - g_wither_work = i & 1; - i &= 2; + for (;;) { + g_topology_lock(); + while (one_event()) + ; + mtx_assert(&g_eventlock, MA_OWNED); + i = g_wither_work; + if (i) { + mtx_unlock(&g_eventlock); + while (i) { + i = g_wither_washer(); + g_wither_work = i & 1; + i &= 2; + } + g_topology_unlock(); + } else { + g_topology_unlock(); + msleep(&g_wait_event, &g_eventlock, PRIBIO | PDROP, + "-", 0); + } } - g_topology_unlock(); + /* NOTREACHED */ } void @@ -338,9 +342,12 @@ g_post_event(g_event_t *func, void *arg, } void -g_do_wither() { +g_do_wither() +{ + mtx_lock(&g_eventlock); g_wither_work = 1; + mtx_unlock(&g_eventlock); wakeup(&g_wait_event); } Modified: stable/8/sys/geom/geom_kern.c ============================================================================== --- stable/8/sys/geom/geom_kern.c Mon Mar 7 15:19:17 2011 (r219377) +++ stable/8/sys/geom/geom_kern.c Mon Mar 7 15:24:35 2011 (r219378) @@ -137,10 +137,8 @@ g_event_procbody(void) thread_lock(tp); sched_prio(tp, PRIBIO); thread_unlock(tp); - for(;;) { - g_run_events(); - tsleep(&g_wait_event, PRIBIO, "-", hz/10); - } + g_run_events(); + /* NOTREACHED */ } static struct kproc_desc g_event_kp = { From owner-svn-src-stable-8@FreeBSD.ORG Mon Mar 7 17:15:10 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 711751065672; Mon, 7 Mar 2011 17:15:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7408FC14; Mon, 7 Mar 2011 17:15:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p27HFAMK041831; Mon, 7 Mar 2011 17:15:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p27HFAMT041828; Mon, 7 Mar 2011 17:15:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103071715.p27HFAMT041828@svn.freebsd.org> From: John Baldwin Date: Mon, 7 Mar 2011 17:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219381 - in stable/8/sys: compat/linux sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 17:15:10 -0000 Author: jhb Date: Mon Mar 7 17:15:10 2011 New Revision: 219381 URL: http://svn.freebsd.org/changeset/base/219381 Log: MFC 218970,219240: Use umtx_key objects to uniquely identify futexes. Private futexes in different processes that happen to use the same user address in the separate processes will now be treated as distinct futexes rather than the same futex. We can now honor shared futexes properly by mapping them to a AUTO_SHARED umtx_key. Private futexes use THREAD_SHARED umtx_key objects. Modified: stable/8/sys/compat/linux/linux_futex.c stable/8/sys/sys/umtx.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/linux/linux_futex.c ============================================================================== --- stable/8/sys/compat/linux/linux_futex.c Mon Mar 7 17:14:18 2011 (r219380) +++ stable/8/sys/compat/linux/linux_futex.c Mon Mar 7 17:15:10 2011 (r219381) @@ -52,6 +52,7 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex. #include #include #include +#include #ifdef COMPAT_LINUX32 #include @@ -77,7 +78,8 @@ struct waiting_proc { struct futex { struct sx f_lck; - uint32_t *f_uaddr; + uint32_t *f_uaddr; /* user-supplied value, for debug */ + struct umtx_key f_key; uint32_t f_refcount; uint32_t f_bitset; LIST_ENTRY(futex) f_list; @@ -100,6 +102,7 @@ struct mtx futex_mtx; /* protects the #define FUTEX_CREATE_WP 0x1 /* create waiting_proc */ #define FUTEX_DONTCREATE 0x2 /* don't create futex if not exists */ #define FUTEX_DONTEXISTS 0x4 /* return EINVAL if futex exists */ +#define FUTEX_SHARED 0x8 /* shared futex */ /* wp_flags */ #define FUTEX_WP_REQUEUED 0x1 /* wp requeued - wp moved from wp_list @@ -136,6 +139,7 @@ futex_put(struct futex *f, struct waitin LINUX_CTR2(sys_futex, "futex_put destroy uaddr %p ref %d", f->f_uaddr, f->f_refcount); + umtx_key_release(&f->f_key); FUTEX_DESTROY(f); free(f, M_FUTEX); return; @@ -151,13 +155,19 @@ static int futex_get0(uint32_t *uaddr, struct futex **newf, uint32_t flags) { struct futex *f, *tmpf; + struct umtx_key key; + int error; *newf = tmpf = NULL; + error = umtx_key_get(uaddr, TYPE_FUTEX, (flags & FUTEX_SHARED) ? + AUTO_SHARE : THREAD_SHARE, &key); + if (error) + return (error); retry: FUTEXES_LOCK; LIST_FOREACH(f, &futex_list, f_list) { - if (f->f_uaddr == uaddr) { + if (umtx_key_match(&f->f_key, &key)) { if (tmpf != NULL) { FUTEX_UNLOCK(tmpf); FUTEX_DESTROY(tmpf); @@ -165,6 +175,7 @@ retry: } if (flags & FUTEX_DONTEXISTS) { FUTEXES_UNLOCK; + umtx_key_release(&key); return (EINVAL); } @@ -174,6 +185,7 @@ retry: */ ++f->f_refcount; FUTEXES_UNLOCK; + umtx_key_release(&key); FUTEX_LOCK(f); *newf = f; @@ -185,6 +197,7 @@ retry: if (flags & FUTEX_DONTCREATE) { FUTEXES_UNLOCK; + umtx_key_release(&key); LINUX_CTR1(sys_futex, "futex_get uaddr %p null", uaddr); return (0); } @@ -193,6 +206,7 @@ retry: FUTEXES_UNLOCK; tmpf = malloc(sizeof(*tmpf), M_FUTEX, M_WAITOK | M_ZERO); tmpf->f_uaddr = uaddr; + tmpf->f_key = key; tmpf->f_refcount = 1; tmpf->f_bitset = FUTEX_BITSET_MATCH_ANY; FUTEX_INIT(tmpf); @@ -450,15 +464,13 @@ linux_sys_futex(struct thread *td, struc struct waiting_proc *wp; struct futex *f, *f2; int error; + uint32_t flags; - /* - * Our implementation provides only privates futexes. Most of the apps - * should use private futexes but don't claim so. Therefore we treat - * all futexes as private by clearing the FUTEX_PRIVATE_FLAG. It works - * in most cases (ie. when futexes are not shared on file descriptor - * or between different processes.). - */ - args->op = args->op & ~LINUX_FUTEX_PRIVATE_FLAG; + if (args->op & LINUX_FUTEX_PRIVATE_FLAG) { + flags = 0; + args->op &= ~LINUX_FUTEX_PRIVATE_FLAG; + } else + flags = FUTEX_SHARED; /* * Currently support for switching between CLOCK_MONOTONIC and @@ -490,7 +502,8 @@ linux_sys_futex(struct thread *td, struc "futex_wait uaddr %p val %d val3 %d"), args->uaddr, args->val, args->val3); #endif - error = futex_get(args->uaddr, &wp, &f, FUTEX_CREATE_WP); + error = futex_get(args->uaddr, &wp, &f, + flags | FUTEX_CREATE_WP); if (error) return (error); error = copyin(args->uaddr, &val, sizeof(val)); @@ -530,7 +543,8 @@ linux_sys_futex(struct thread *td, struc printf(ARGS(sys_futex, "futex_wake uaddr %p val %d val3 %d"), args->uaddr, args->val, args->val3); #endif - error = futex_get(args->uaddr, NULL, &f, FUTEX_DONTCREATE); + error = futex_get(args->uaddr, NULL, &f, + flags | FUTEX_DONTCREATE); if (error) return (error); if (f == NULL) { @@ -562,7 +576,7 @@ linux_sys_futex(struct thread *td, struc */ if (args->uaddr == args->uaddr2) return (EINVAL); - error = futex_get0(args->uaddr, &f, 0); + error = futex_get(args->uaddr, NULL, &f, flags); if (error) return (error); @@ -573,7 +587,8 @@ linux_sys_futex(struct thread *td, struc * Glibc fall back to FUTEX_WAKE in case of any error * returned by FUTEX_CMP_REQUEUE. */ - error = futex_get0(args->uaddr2, &f2, FUTEX_DONTEXISTS); + error = futex_get(args->uaddr2, NULL, &f2, + flags | FUTEX_DONTEXISTS); if (error) { futex_put(f, NULL); return (error); @@ -614,11 +629,11 @@ linux_sys_futex(struct thread *td, struc args->uaddr, args->op, args->val, args->uaddr2, args->val3); #endif - error = futex_get0(args->uaddr, &f, 0); + error = futex_get(args->uaddr, NULL, &f, flags); if (error) return (error); if (args->uaddr != args->uaddr2) - error = futex_get0(args->uaddr2, &f2, 0); + error = futex_get(args->uaddr2, NULL, &f2, flags); if (error) { futex_put(f, NULL); return (error); @@ -812,7 +827,7 @@ retry: if (!pi && (uval & FUTEX_WAITERS)) { error = futex_get(uaddr, NULL, &f, - FUTEX_DONTCREATE); + FUTEX_DONTCREATE | FUTEX_SHARED); if (error) return (error); if (f != NULL) { Modified: stable/8/sys/sys/umtx.h ============================================================================== --- stable/8/sys/sys/umtx.h Mon Mar 7 17:14:18 2011 (r219380) +++ stable/8/sys/sys/umtx.h Mon Mar 7 17:15:10 2011 (r219381) @@ -203,6 +203,7 @@ enum { TYPE_PI_UMUTEX, TYPE_PP_UMUTEX, TYPE_RWLOCK, + TYPE_FUTEX }; /* Key to represent a unique userland synchronous object */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Mar 7 18:00:59 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C8F4106566C; Mon, 7 Mar 2011 18:00:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 115F58FC0A; Mon, 7 Mar 2011 18:00:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p27I0w55042836; Mon, 7 Mar 2011 18:00:58 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p27I0w6e042834; Mon, 7 Mar 2011 18:00:58 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201103071800.p27I0w6e042834@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 7 Mar 2011 18:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219382 - stable/8/usr.sbin/pw X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 18:00:59 -0000 Author: jkim Date: Mon Mar 7 18:00:58 2011 New Revision: 219382 URL: http://svn.freebsd.org/changeset/base/219382 Log: MFC: r218293 Do not let pw.conf(5) or -M option affect creation of basehome, e.g., /home. When the basehome does not exist, it creates all intermediate directories as required, which is logically equivalent to mkdir(1) with -m and -p options. However, it modifies all intermediate directories, not just the final home directory unlike mkdir. This problem was introduced in two revisions, i.e., r1.59 (SVN r167919) and r1.60 (SVN r168044). Modified: stable/8/usr.sbin/pw/pw_user.c Directory Properties: stable/8/usr.sbin/pw/ (props changed) Modified: stable/8/usr.sbin/pw/pw_user.c ============================================================================== --- stable/8/usr.sbin/pw/pw_user.c Mon Mar 7 17:15:10 2011 (r219381) +++ stable/8/usr.sbin/pw/pw_user.c Mon Mar 7 18:00:58 2011 (r219382) @@ -156,14 +156,14 @@ pw_user(struct userconf * cnf, int mode, cnf->home = arg->val; } + dmode = S_IRWXU | S_IRWXG | S_IRWXO; if ((arg = getarg(args, 'M')) != NULL) { dmode_c = arg->val; if ((set = setmode(dmode_c)) == NULL) errx(EX_DATAERR, "invalid directory creation mode '%s'", dmode_c); - dmode = getmode(set, S_IRWXU | S_IRWXG | S_IRWXO); + cnf->homemode = getmode(set, dmode); free(set); - cnf->homemode = dmode; } /* @@ -191,7 +191,7 @@ pw_user(struct userconf * cnf, int mode, if (strchr(cnf->home+1, '/') == NULL) { strcpy(dbuf, "/usr"); strncat(dbuf, cnf->home, MAXPATHLEN-5); - if (mkdir(dbuf, cnf->homemode) != -1 || errno == EEXIST) { + if (mkdir(dbuf, dmode) != -1 || errno == EEXIST) { chown(dbuf, 0, 0); /* * Skip first "/" and create symlink: @@ -207,7 +207,7 @@ pw_user(struct userconf * cnf, int mode, while ((p = strchr(++p, '/')) != NULL) { *p = '\0'; if (stat(dbuf, &st) == -1) { - if (mkdir(dbuf, cnf->homemode) == -1) + if (mkdir(dbuf, dmode) == -1) goto direrr; chown(dbuf, 0, 0); } else if (!S_ISDIR(st.st_mode)) @@ -216,7 +216,7 @@ pw_user(struct userconf * cnf, int mode, } } if (stat(dbuf, &st) == -1) { - if (mkdir(dbuf, cnf->homemode) == -1) { + if (mkdir(dbuf, dmode) == -1) { direrr: err(EX_OSFILE, "mkdir '%s'", dbuf); } chown(dbuf, 0, 0); From owner-svn-src-stable-8@FreeBSD.ORG Tue Mar 8 17:27:37 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34438106564A; Tue, 8 Mar 2011 17:27:37 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 211E38FC19; Tue, 8 Mar 2011 17:27:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p28HRb5i081173; Tue, 8 Mar 2011 17:27:37 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p28HRaVu081169; Tue, 8 Mar 2011 17:27:36 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103081727.p28HRaVu081169@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 8 Mar 2011 17:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219401 - stable/8/sys/fs/tmpfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 17:27:37 -0000 Author: jh Date: Tue Mar 8 17:27:36 2011 New Revision: 219401 URL: http://svn.freebsd.org/changeset/base/219401 Log: MFC r201773: - Change the type of size_max to u_quad_t because its value is converted with vfs_scanopt(9) using the "%qu" format string. - Limit the maximum value of size_max to (SIZE_MAX - PAGE_SIZE) to prevent overflow in howmany() macro. PR: kern/141194 MFC r202187: - Fix some style bugs in tmpfs_mount(). - Remove a stale comment about tmpfs_mem_info() 'total' argument. MFC r202708: - Change the type of nodes_max to u_int and use "%u" format string to convert its value. - Set default tm_nodes_max to min(pages + 3, UINT32_MAX). It's more reasonable than the old four nodes per page (with page size 4096) because non-empty regular files always use at least one page. This fixes possible overflow in the calculation. - Don't allow more than tm_nodes_max nodes allocated in tmpfs_alloc_node(). PR: kern/138367 Modified: stable/8/sys/fs/tmpfs/tmpfs.h stable/8/sys/fs/tmpfs/tmpfs_subr.c stable/8/sys/fs/tmpfs/tmpfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/8/sys/fs/tmpfs/tmpfs.h Tue Mar 8 17:00:31 2011 (r219400) +++ stable/8/sys/fs/tmpfs/tmpfs.h Tue Mar 8 17:27:36 2011 (r219401) @@ -476,10 +476,6 @@ int tmpfs_truncate(struct vnode *, off_t * Returns information about the number of available memory pages, * including physical and virtual ones. * - * If 'total' is TRUE, the value returned is the total amount of memory - * pages configured for the system (either in use or free). - * If it is FALSE, the value returned is the amount of free memory pages. - * * Remember to remove TMPFS_PAGES_RESERVED from the returned value to avoid * excessive memory usage. * Modified: stable/8/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/8/sys/fs/tmpfs/tmpfs_subr.c Tue Mar 8 17:00:31 2011 (r219400) +++ stable/8/sys/fs/tmpfs/tmpfs_subr.c Tue Mar 8 17:27:36 2011 (r219401) @@ -93,7 +93,7 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp MPASS(IFF(type == VLNK, target != NULL)); MPASS(IFF(type == VBLK || type == VCHR, rdev != VNOVAL)); - if (tmp->tm_nodes_inuse > tmp->tm_nodes_max) + if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max) return (ENOSPC); nnode = (struct tmpfs_node *)uma_zalloc_arg( Modified: stable/8/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/8/sys/fs/tmpfs/tmpfs_vfsops.c Tue Mar 8 17:00:31 2011 (r219400) +++ stable/8/sys/fs/tmpfs/tmpfs_vfsops.c Tue Mar 8 17:27:36 2011 (r219401) @@ -182,18 +182,18 @@ tmpfs_mount(struct mount *mp) struct tmpfs_mount *tmp; struct tmpfs_node *root; size_t pages, mem_size; - ino_t nodes; + uint32_t nodes; int error; /* Size counters. */ - ino_t nodes_max; - size_t size_max; + u_int nodes_max; + u_quad_t size_max; /* Root node attributes. */ - uid_t root_uid; - gid_t root_gid; - mode_t root_mode; + uid_t root_uid; + gid_t root_gid; + mode_t root_mode; - struct vattr va; + struct vattr va; if (vfs_filteropt(mp->mnt_optnew, tmpfs_opts)) return (EINVAL); @@ -223,7 +223,7 @@ tmpfs_mount(struct mount *mp) if (mp->mnt_cred->cr_ruid != 0 || vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) root_mode = va.va_mode; - if (vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) + if (vfs_scanopt(mp->mnt_optnew, "inodes", "%u", &nodes_max) != 1) nodes_max = 0; if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1) size_max = 0; @@ -239,15 +239,18 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * maximum available space was requested. */ - if (size_max < PAGE_SIZE || size_max >= SIZE_MAX) + if (size_max < PAGE_SIZE || size_max > SIZE_MAX - PAGE_SIZE) pages = SIZE_MAX; else pages = howmany(size_max, PAGE_SIZE); MPASS(pages > 0); - if (nodes_max <= 3) - nodes = 3 + pages * PAGE_SIZE / 1024; - else + if (nodes_max <= 3) { + if (pages > UINT32_MAX - 3) + nodes = UINT32_MAX; + else + nodes = pages + 3; + } else nodes = nodes_max; MPASS(nodes >= 3); From owner-svn-src-stable-8@FreeBSD.ORG Tue Mar 8 17:41:07 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D282106564A; Tue, 8 Mar 2011 17:41:07 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A1A38FC24; Tue, 8 Mar 2011 17:41:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p28Hf7Oq081632; Tue, 8 Mar 2011 17:41:07 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p28Hf7vn081630; Tue, 8 Mar 2011 17:41:07 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103081741.p28Hf7vn081630@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 8 Mar 2011 17:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219402 - stable/8/share/man/man5 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 17:41:07 -0000 Author: jh Date: Tue Mar 8 17:41:07 2011 New Revision: 219402 URL: http://svn.freebsd.org/changeset/base/219402 Log: MFC r196526 by delphij: Add a missing .El. Modified: stable/8/share/man/man5/tmpfs.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/tmpfs.5 ============================================================================== --- stable/8/share/man/man5/tmpfs.5 Tue Mar 8 17:27:36 2011 (r219401) +++ stable/8/share/man/man5/tmpfs.5 Tue Mar 8 17:41:07 2011 (r219402) @@ -70,6 +70,7 @@ permissions in octal format. maximum number of inodes. .It Cm size maximum size (in bytes) for the file system. +.El .Sh EXAMPLES To mount a .Nm From owner-svn-src-stable-8@FreeBSD.ORG Tue Mar 8 21:14:02 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA7FA106566C; Tue, 8 Mar 2011 21:14:02 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B57E48FC1A; Tue, 8 Mar 2011 21:14:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p28LE2RT087118; Tue, 8 Mar 2011 21:14:02 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p28LE2Jv087113; Tue, 8 Mar 2011 21:14:02 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201103082114.p28LE2Jv087113@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 8 Mar 2011 21:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219412 - stable/8/share/zoneinfo X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 21:14:02 -0000 Author: edwin Date: Tue Mar 8 21:14:02 2011 New Revision: 219412 URL: http://svn.freebsd.org/changeset/base/219412 Log: MFC of tzdata2011c, r219411 - No leapsecond in June 2011 - Add and update timezones for America/Juneau, America/Sitka, America/Metlakatla - Change of Summer time to Winter time in Chili happens in April 2011, not in March 2011. Modified: stable/8/share/zoneinfo/leapseconds stable/8/share/zoneinfo/northamerica stable/8/share/zoneinfo/southamerica stable/8/share/zoneinfo/zone.tab Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/leapseconds ============================================================================== --- stable/8/share/zoneinfo/leapseconds Tue Mar 8 21:11:31 2011 (r219411) +++ stable/8/share/zoneinfo/leapseconds Tue Mar 8 21:14:02 2011 (r219412) @@ -1,5 +1,5 @@ #
-# @(#)leapseconds	8.10
+# @(#)leapseconds	8.11
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -56,13 +56,13 @@ Leap	2008	Dec	31	23:59:60	+	S
 # SERVICE DE LA ROTATION TERRESTRE
 # OBSERVATOIRE DE PARIS
 # 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel.      : 33 (0) 1 40 51 22 26
+# Tel.      : 33 (0) 1 40 51 22 29
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 14 July 2010
+# Paris, 2 February 2011
 #
-# Bulletin C 40
+# Bulletin C 41
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2010.
+# NO positive leap second will be introduced at the end of June 2011.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :
+# International Atomic Time TAI is :		
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director
-# Earth Orientation Center of IERS
+# Head			
+# Earth Orientation Center of the IERS
 # Observatoire de Paris, France

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Tue Mar  8 21:11:31 2011	(r219411)
+++ stable/8/share/zoneinfo/northamerica	Tue Mar  8 21:14:02 2011	(r219412)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.40
+# @(#)northamerica	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -426,15 +426,74 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # were nearby inhabitants in some cases and for our purposes perhaps
 # it's best to simply use the official transition.
 #
+
+# From Steve Ferguson (2011-01-31):
+# The author lives in Alaska and many of the references listed are only
+# available to Alaskan residents.
+#
+# 
+# http://www.alaskahistoricalsociety.org/index.cfm?section=discover%20alaska&page=Glimpses%20of%20the%20Past&viewpost=2&ContentId=98
+# 
+
+# From Arthur David Olson (2011-02-01):
+# Here's database-relevant material from the 2001 "Alaska History" article:
+#
+# On September 20 [1979]...DOT...officials decreed that on April 27,
+# 1980, Juneau and other nearby communities would move to Yukon Time.
+# Sitka, Petersburg, Wrangell, and Ketchikan, however, would remain on
+# Pacific Time.
+#
+# ...on September 22, 1980, DOT Secretary Neil E. Goldschmidt rescinded the
+# Department's September 1979 decision. Juneau and other communities in
+# northern Southeast reverted to Pacific Time on October 26.
+#
+# On October 28 [1983]...the Metlakatla Indian Community Council voted
+# unanimously to keep the reservation on Pacific Time.
+#
+# According to DOT official Joanne Petrie, Indian reservations are not
+# bound to follow time zones imposed by neighboring jurisdictions.
+#
+# (The last is consistent with how the database now handles the Navajo
+# Nation.)
+
+# From Arthur David Olson (2011-02-09):
+# I just spoke by phone with a staff member at the Metlakatla Indian
+# Community office (using contact information available at
+# 
+# http://www.commerce.state.ak.us/dca/commdb/CIS.cfm?Comm_Boro_name=Metlakatla
+# ).
+# It's shortly after 1:00 here on the east coast of the United States;
+# the staffer said it was shortly after 10:00 there. When I asked whether
+# that meant they were on Pacific time, they said no--they were on their
+# own time. I asked about daylight saving; they said it wasn't used. I
+# did not inquire about practices in the past.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
+			 -8:00	US	P%sT	1980 Apr 27 2:00
+			 -9:00	US	Y%sT	1980 Oct 26 2:00	
+			 -8:00	US	P%sT	1983 Oct 30 2:00
+			 -9:00	US	Y%sT	1983 Nov 30
+			 -9:00	US	AK%sT
+Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+			 -9:01:13 -	LMT	1900 Aug 20 12:00
+			 -8:00	-	PST	1942
+			 -8:00	US	P%sT	1946
+			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
+Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 18
+			 -8:46:18 -	LMT	1900 Aug 20 12:00
+			 -8:00	-	PST	1942
+			 -8:00	US	P%sT	1946
+			 -8:00	-	PST	1969
+			 -8:00	US	P%sT	1983 Oct 30 2:00
+			 -8:00	US	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942

Modified: stable/8/share/zoneinfo/southamerica
==============================================================================
--- stable/8/share/zoneinfo/southamerica	Tue Mar  8 21:11:31 2011	(r219411)
+++ stable/8/share/zoneinfo/southamerica	Tue Mar  8 21:14:02 2011	(r219412)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.44
+# @(#)southamerica	8.45
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1154,6 +1154,23 @@ Zone America/Rio_Branco	-4:31:12 -	LMT	1
 # From Arthur Daivd Olson (2010-03-06):
 # Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch.
 
+# From Glenn Eychaner (2011-03-02): [geychaner@mac.com]
+# It appears that the Chilean government has decided to postpone the
+# change from summer time to winter time again, by three weeks to April
+# 2nd:
+# 
+# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
+# 
+#
+# This is not yet reflected in the offical "cambio de hora" site, but
+# probably will be soon:
+# 
+# http://www.horaoficial.cl/cambio.htm
+# 
+
+# From Arthur David Olson (2011-03-02):
+# The emol.com article mentions a water shortage as the cause of the
+# postponement, which may mean that it's not a permanent change.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1932	-	Sep	 1	0:00	1:00	S
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -1189,8 +1206,8 @@ Rule	Chile	2000	2007	-	Mar	Sun>=9	3:00u	
 # which is used below in specifying the transition.
 Rule	Chile	2008	only	-	Mar	30	3:00u	0	-
 Rule	Chile	2009	only	-	Mar	Sun>=9	3:00u	0	-
-Rule	Chile	2010	only	-	Apr	 4	3:00u	0	-
-Rule	Chile	2011	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2010	2011	-	Apr	Sun>=1	3:00u	0	-
+Rule	Chile	2012	max	-	Mar	Sun>=9	3:00u	0	-
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Tue Mar  8 21:11:31 2011	(r219411)
+++ stable/8/share/zoneinfo/zone.tab	Tue Mar  8 21:14:02 2011	(r219412)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.40
+# @(#)zone.tab	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -412,9 +412,11 @@ US	+332654-1120424	America/Phoenix	Mount
 US	+340308-1181434	America/Los_Angeles	Pacific Time
 US	+611305-1495401	America/Anchorage	Alaska Time
 US	+581807-1342511	America/Juneau	Alaska Time - Alaska panhandle
+US	+571035-1351807	America/Sitka	Alaska Time - southeast Alaska panhandle
 US	+593249-1394338	America/Yakutat	Alaska Time - Alaska panhandle neck
 US	+643004-1652423	America/Nome	Alaska Time - west Alaska
 US	+515248-1763929	America/Adak	Aleutian Islands
+US	+550737-1313435	America/Metlakatla	Metlakatla Time - Annette Island
 US	+211825-1575130	Pacific/Honolulu	Hawaii
 UY	-3453-05611	America/Montevideo
 UZ	+3940+06648	Asia/Samarkand	west Uzbekistan

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar  9 12:14:49 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E4A06106566C;
	Wed,  9 Mar 2011 12:14:49 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D2CDE8FC1B;
	Wed,  9 Mar 2011 12:14:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p29CEnGg008509;
	Wed, 9 Mar 2011 12:14:49 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p29CEnsA008505;
	Wed, 9 Mar 2011 12:14:49 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201103091214.p29CEnsA008505@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Wed, 9 Mar 2011 12:14:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219425 - in stable/8/sys: amd64/amd64 vm
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 09 Mar 2011 12:14:50 -0000

Author: pluknet
Date: Wed Mar  9 12:14:49 2011
New Revision: 219425
URL: http://svn.freebsd.org/changeset/base/219425

Log:
  MFC r202897,r208164,r212174: msgbufp mapping changes on amd64.
  
  r202897 by alc:
  
   Simplify the mapping of the system message buffer.  Use the direct map just
   like ia64 does.
  
  r208164 by alc:
  
   Correct an error of omission in r202897: Now that amd64 uses the direct map
   to access the message buffer, we must explicitly request that the underlying
   physical pages are included in a crash dump.
  
  r212174 by avg:
  
   vm_page.c: include opt_msgbuf.h for MSGBUF_SIZE use in vm_page_startup
  
  Approved by:	alc, kib (mentor), avg (mentor)

Modified:
  stable/8/sys/amd64/amd64/machdep.c
  stable/8/sys/amd64/amd64/pmap.c
  stable/8/sys/vm/vm_page.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/amd64/machdep.c
==============================================================================
--- stable/8/sys/amd64/amd64/machdep.c	Wed Mar  9 07:43:51 2011	(r219424)
+++ stable/8/sys/amd64/amd64/machdep.c	Wed Mar  9 12:14:49 2011	(r219425)
@@ -157,6 +157,8 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST,
 extern vm_offset_t ksym_start, ksym_end;
 #endif
 
+struct msgbuf *msgbufp;
+
 /* Intel ICH registers */
 #define ICH_PMBASE	0x400
 #define ICH_SMI_EN	ICH_PMBASE + 0x30
@@ -1288,7 +1290,7 @@ add_smap_entry(struct bios_smap *smap, v
 static void
 getmemsize(caddr_t kmdp, u_int64_t first)
 {
-	int i, off, physmap_idx, pa_indx, da_indx;
+	int i, physmap_idx, pa_indx, da_indx;
 	vm_paddr_t pa, physmap[PHYSMAP_SIZE];
 	u_long physmem_tunable;
 	pt_entry_t *pte;
@@ -1521,9 +1523,7 @@ do_next:
 	phys_avail[pa_indx] -= round_page(MSGBUF_SIZE);
 
 	/* Map the message buffer. */
-	for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE)
-		pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] +
-		    off);
+	msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]);
 }
 
 u_int64_t

Modified: stable/8/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/8/sys/amd64/amd64/pmap.c	Wed Mar  9 07:43:51 2011	(r219424)
+++ stable/8/sys/amd64/amd64/pmap.c	Wed Mar  9 12:14:49 2011	(r219425)
@@ -105,7 +105,6 @@ __FBSDID("$FreeBSD$");
  *	and to when physical maps must be made correct.
  */
 
-#include "opt_msgbuf.h"
 #include "opt_pmap.h"
 #include "opt_vm.h"
 
@@ -116,7 +115,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -211,7 +209,6 @@ static int shpgperproc = PMAP_SHPGPERPRO
  */
 pt_entry_t *CMAP1 = 0;
 caddr_t CADDR1 = 0;
-struct msgbuf *msgbufp = 0;
 
 /*
  * Crashdump maps.
@@ -578,11 +575,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr)
 	 */
 	SYSMAP(caddr_t, unused, crashdumpmap, MAXDUMPPGS)
 
-	/*
-	 * msgbufp is used to map the system message buffer.
-	 */
-	SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE)))
-
 	virtual_avail = va;
 
 	*CMAP1 = 0;

Modified: stable/8/sys/vm/vm_page.c
==============================================================================
--- stable/8/sys/vm/vm_page.c	Wed Mar  9 07:43:51 2011	(r219424)
+++ stable/8/sys/vm/vm_page.c	Wed Mar  9 12:14:49 2011	(r219425)
@@ -100,6 +100,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_msgbuf.h"
 #include "opt_vm.h"
 
 #include 
@@ -108,6 +109,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -313,6 +315,19 @@ vm_page_startup(vm_offset_t vaddr)
 	    new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE);
 	bzero((void *)vm_page_dump, vm_page_dump_size);
 #endif
+#ifdef __amd64__
+	/*
+	 * Request that the physical pages underlying the message buffer be
+	 * included in a crash dump.  Since the message buffer is accessed
+	 * through the direct map, they are not automatically included.
+	 */
+	pa = DMAP_TO_PHYS((vm_offset_t)msgbufp->msg_ptr);
+	last_pa = pa + round_page(MSGBUF_SIZE);
+	while (pa < last_pa) {
+		dump_add_page(pa);
+		pa += PAGE_SIZE;
+	}
+#endif
 	/*
 	 * Compute the number of pages of memory that will be available for
 	 * use (taking into account the overhead of a page structure per

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar  9 15:27:12 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2B0A11065670;
	Wed,  9 Mar 2011 15:27:12 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 18D108FC0C;
	Wed,  9 Mar 2011 15:27:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p29FRB3I013018;
	Wed, 9 Mar 2011 15:27:11 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p29FRB82013015;
	Wed, 9 Mar 2011 15:27:11 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201103091527.p29FRB82013015@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Wed, 9 Mar 2011 15:27:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219429 - in stable/8: share/man/man5 sys/fs/tmpfs
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 09 Mar 2011 15:27:12 -0000

Author: jh
Date: Wed Mar  9 15:27:11 2011
New Revision: 219429
URL: http://svn.freebsd.org/changeset/base/219429

Log:
  MFC r203164:
  
  Add "maxfilesize" mount option for tmpfs to allow specifying the
  maximum file size limit. Default is UINT64_MAX when the option is
  not specified. It was useless to set the limit to the total amount of
  memory and swap in the system.
  
  Use tmpfs_mem_info() rather than get_swpgtotal() in tmpfs_mount() to
  check if there is enough memory available.
  
  Remove now unused get_swpgtotal().
  
  MFC r203169:
  
  Bump .Dd for r203164.

Modified:
  stable/8/share/man/man5/tmpfs.5
  stable/8/sys/fs/tmpfs/tmpfs_vfsops.c
Directory Properties:
  stable/8/share/man/man5/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/share/man/man5/tmpfs.5
==============================================================================
--- stable/8/share/man/man5/tmpfs.5	Wed Mar  9 15:03:42 2011	(r219428)
+++ stable/8/share/man/man5/tmpfs.5	Wed Mar  9 15:27:11 2011	(r219429)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 12, 2008
+.Dd January 29, 2010
 .Dt TMPFS 5
 .Os
 .Sh NAME
@@ -70,6 +70,8 @@ permissions in octal format.
 maximum number of inodes.
 .It Cm size
 maximum size (in bytes) for the file system.
+.It Cm maxfilesize
+maximum file size (in bytes).
 .El
 .Sh EXAMPLES
 To mount a

Modified: stable/8/sys/fs/tmpfs/tmpfs_vfsops.c
==============================================================================
--- stable/8/sys/fs/tmpfs/tmpfs_vfsops.c	Wed Mar  9 15:03:42 2011	(r219428)
+++ stable/8/sys/fs/tmpfs/tmpfs_vfsops.c	Wed Mar  9 15:27:11 2011	(r219429)
@@ -77,62 +77,12 @@ static int	tmpfs_statfs(struct mount *, 
 /* --------------------------------------------------------------------- */
 
 static const char *tmpfs_opts[] = {
-	"from", "size", "inodes", "uid", "gid", "mode", "export",
+	"from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export",
 	NULL
 };
 
 /* --------------------------------------------------------------------- */
 
-#define SWI_MAXMIB	3
-
-static u_int
-get_swpgtotal(void)
-{
-	struct xswdev xsd;
-	char *sname = "vm.swap_info";
-	int soid[SWI_MAXMIB], oid[2];
-	u_int unswdev, total, dmmax, nswapdev;
-	size_t mibi, len;
-
-	total = 0;
-
-	len = sizeof(dmmax);
-	if (kernel_sysctlbyname(curthread, "vm.dmmax", &dmmax, &len,
-				NULL, 0, NULL, 0) != 0)
-		return total;
-
-	len = sizeof(nswapdev);
-	if (kernel_sysctlbyname(curthread, "vm.nswapdev",
-				&nswapdev, &len,
-				NULL, 0, NULL, 0) != 0)
-		return total;
-
-	mibi = (SWI_MAXMIB - 1) * sizeof(int);
-	oid[0] = 0;
-	oid[1] = 3;
-
-	if (kernel_sysctl(curthread, oid, 2,
-			soid, &mibi, (void *)sname, strlen(sname),
-			NULL, 0) != 0)
-		return total;
-
-	mibi = (SWI_MAXMIB - 1);
-	for (unswdev = 0; unswdev < nswapdev; ++unswdev) {
-		soid[mibi] = unswdev;
-		len = sizeof(struct xswdev);
-		if (kernel_sysctl(curthread,
-				soid, mibi + 1, &xsd, &len, NULL, 0,
-				NULL, 0) != 0)
-			return total;
-		if (len == sizeof(struct xswdev))
-			total += (xsd.xsw_nblks - dmmax);
-	}
-
-	/* Not Reached */
-	return total;
-}
-
-/* --------------------------------------------------------------------- */
 static int
 tmpfs_node_ctor(void *mem, int size, void *arg, int flags)
 {
@@ -181,12 +131,12 @@ tmpfs_mount(struct mount *mp)
 {
 	struct tmpfs_mount *tmp;
 	struct tmpfs_node *root;
-	size_t pages, mem_size;
+	size_t pages;
 	uint32_t nodes;
 	int error;
 	/* Size counters. */
 	u_int nodes_max;
-	u_quad_t size_max;
+	u_quad_t size_max, maxfilesize;
 
 	/* Root node attributes. */
 	uid_t root_uid;
@@ -227,12 +177,13 @@ tmpfs_mount(struct mount *mp)
 		nodes_max = 0;
 	if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1)
 		size_max = 0;
+	if (vfs_scanopt(mp->mnt_optnew, "maxfilesize", "%qu",
+	    &maxfilesize) != 1)
+		maxfilesize = 0;
 
 	/* Do not allow mounts if we do not have enough memory to preserve
 	 * the minimum reserved pages. */
-	mem_size = cnt.v_free_count + cnt.v_inactive_count + get_swpgtotal();
-	mem_size -= mem_size > cnt.v_wire_count ? cnt.v_wire_count : mem_size;
-	if (mem_size < TMPFS_PAGES_RESERVED)
+	if (tmpfs_mem_info() < TMPFS_PAGES_RESERVED)
 		return ENOSPC;
 
 	/* Get the maximum number of memory pages this file system is
@@ -261,7 +212,7 @@ tmpfs_mount(struct mount *mp)
 	mtx_init(&tmp->allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF);
 	tmp->tm_nodes_max = nodes;
 	tmp->tm_nodes_inuse = 0;
-	tmp->tm_maxfilesize = (u_int64_t)(cnt.v_page_count + get_swpgtotal()) * PAGE_SIZE;
+	tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : UINT64_MAX;
 	LIST_INIT(&tmp->tm_nodes_used);
 
 	tmp->tm_pages_max = pages;

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar  9 16:52:55 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3F091065672;
	Wed,  9 Mar 2011 16:52:55 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B1DE08FC1D;
	Wed,  9 Mar 2011 16:52:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p29GqtxI014979;
	Wed, 9 Mar 2011 16:52:55 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p29Gqtn6014977;
	Wed, 9 Mar 2011 16:52:55 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201103091652.p29Gqtn6014977@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Wed, 9 Mar 2011 16:52:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219431 - stable/8/share/man/man5
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 09 Mar 2011 16:52:55 -0000

Author: jh
Date: Wed Mar  9 16:52:55 2011
New Revision: 219431
URL: http://svn.freebsd.org/changeset/base/219431

Log:
  MFC r203951 by delphij:
  
  Remove clause 3 from my license.

Modified:
  stable/8/share/man/man5/tmpfs.5
Directory Properties:
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/share/man/man5/tmpfs.5
==============================================================================
--- stable/8/share/man/man5/tmpfs.5	Wed Mar  9 16:16:38 2011	(r219430)
+++ stable/8/share/man/man5/tmpfs.5	Wed Mar  9 16:52:55 2011	(r219431)
@@ -10,8 +10,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. The name of the author may not be used to endorse or promote products
-.\"    derived from this software without specific prior written permission
 .\"
 .\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar  9 16:55:17 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B970C1065678;
	Wed,  9 Mar 2011 16:55:17 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A70198FC1C;
	Wed,  9 Mar 2011 16:55:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p29GtHDL015097;
	Wed, 9 Mar 2011 16:55:17 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p29GtHtL015095;
	Wed, 9 Mar 2011 16:55:17 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201103091655.p29GtHtL015095@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Wed, 9 Mar 2011 16:55:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219432 - stable/8/share/man/man5
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 09 Mar 2011 16:55:17 -0000

Author: jh
Date: Wed Mar  9 16:55:17 2011
New Revision: 219432
URL: http://svn.freebsd.org/changeset/base/219432

Log:
  MFC r203966:
  
  Improve descriptions for tmpfs mount options. The descriptions have
  been mostly obtained from NetBSD mount_tmpfs(8) manual page.

Modified:
  stable/8/share/man/man5/tmpfs.5
Directory Properties:
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/share/man/man5/tmpfs.5
==============================================================================
--- stable/8/share/man/man5/tmpfs.5	Wed Mar  9 16:52:55 2011	(r219431)
+++ stable/8/share/man/man5/tmpfs.5	Wed Mar  9 16:55:17 2011	(r219432)
@@ -1,4 +1,4 @@
-.\"
+.\"-
 .\" Copyright (c) 2007 Xin LI
 .\" All rights reserved.
 .\"
@@ -22,9 +22,34 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
+.\"-
+.\" Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
 .\" $FreeBSD$
 .\"
-.Dd January 29, 2010
+.Dd February 16, 2010
 .Dt TMPFS 5
 .Os
 .Sh NAME
@@ -59,17 +84,28 @@ mounting
 file systems:
 .Bl -tag -width indent
 .It Cm gid
-root group id.
+Specifies the group ID of the root inode of the file system.
+Defaults to the mount point's GID.
 .It Cm uid
-root user id.
+Specifies the user ID of the root inode of the file system.
+Defaults to the mount point's UID.
 .It Cm mode
-permissions in octal format.
+Specifies the mode (in octal notation) of the root inode of the file system.
+Defaults to the mount point's mode.
 .It Cm inodes
-maximum number of inodes.
+Specifies the maximum number of nodes available to the file system.
+If not specified, the file system chooses a reasonable maximum based on
+the file system size, which can be limited with the
+.Cm size
+option.
 .It Cm size
-maximum size (in bytes) for the file system.
+Specifies the total file system size in bytes.
+If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE
+is given, the available amount of memory (including
+main memory and swap space) will be used.
 .It Cm maxfilesize
-maximum file size (in bytes).
+Specifies the maximum file size in bytes.
+Defaults to the maximum possible value.
 .El
 .Sh EXAMPLES
 To mount a

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar  9 16:56:51 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 88624106564A;
	Wed,  9 Mar 2011 16:56:51 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 76A1A8FC1C;
	Wed,  9 Mar 2011 16:56:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p29GupN6015177;
	Wed, 9 Mar 2011 16:56:51 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p29Gup5K015175;
	Wed, 9 Mar 2011 16:56:51 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201103091656.p29Gup5K015175@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Wed, 9 Mar 2011 16:56:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219433 - stable/8/share/man/man5
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 09 Mar 2011 16:56:51 -0000

Author: jh
Date: Wed Mar  9 16:56:51 2011
New Revision: 219433
URL: http://svn.freebsd.org/changeset/base/219433

Log:
  MFC r203967:
  
  Xref mdmfs(8).

Modified:
  stable/8/share/man/man5/tmpfs.5
Directory Properties:
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/share/man/man5/tmpfs.5
==============================================================================
--- stable/8/share/man/man5/tmpfs.5	Wed Mar  9 16:55:17 2011	(r219432)
+++ stable/8/share/man/man5/tmpfs.5	Wed Mar  9 16:56:51 2011	(r219433)
@@ -117,6 +117,7 @@ memory file system:
 .Xr nmount 2 ,
 .Xr unmount 2 ,
 .Xr fstab 5 ,
+.Xr mdmfs 8 ,
 .Xr mount 8
 .Sh HISTORY
 The

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Mar 10 01:02:54 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A2D3D106566C;
	Thu, 10 Mar 2011 01:02:54 +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 7506D8FC17;
	Thu, 10 Mar 2011 01:02:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2A12sT0026154;
	Thu, 10 Mar 2011 01:02:54 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2A12sS3026152;
	Thu, 10 Mar 2011 01:02:54 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201103100102.p2A12sS3026152@svn.freebsd.org>
From: Xin LI 
Date: Thu, 10 Mar 2011 01:02:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219440 - in stable: 7/usr.sbin/diskinfo
	8/usr.sbin/diskinfo
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 10 Mar 2011 01:02:54 -0000

Author: delphij
Date: Thu Mar 10 01:02:53 2011
New Revision: 219440
URL: http://svn.freebsd.org/changeset/base/219440

Log:
  MFC r218432:
  
  Don't consider ioctl returning error as a fatal error and move on to next
  disk.  When multiple devices are specified, a non-supporting ioctl will
  cause diskinfo(8) to stop at the point which does not seem to be necessary.

Modified:
  stable/8/usr.sbin/diskinfo/diskinfo.c
Directory Properties:
  stable/8/usr.sbin/diskinfo/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/7/usr.sbin/diskinfo/diskinfo.c
Directory Properties:
  stable/7/usr.sbin/diskinfo/   (props changed)

Modified: stable/8/usr.sbin/diskinfo/diskinfo.c
==============================================================================
--- stable/8/usr.sbin/diskinfo/diskinfo.c	Wed Mar  9 23:11:30 2011	(r219439)
+++ stable/8/usr.sbin/diskinfo/diskinfo.c	Thu Mar 10 01:02:53 2011	(r219440)
@@ -56,7 +56,7 @@ static void commandtime(int fd, off_t me
 int
 main(int argc, char **argv)
 {
-	int i, ch, fd, error;
+	int i, ch, fd, error, exitval = 0;
 	char buf[BUFSIZ], ident[DISK_IDENT_SIZE];
 	off_t	mediasize, stripesize, stripeoffset;
 	u_int	sectorsize, fwsectors, fwheads;
@@ -90,14 +90,23 @@ main(int argc, char **argv)
 			sprintf(buf, "%s%s", _PATH_DEV, argv[i]);
 			fd = open(buf, O_RDONLY);
 		}
-		if (fd < 0)
-			err(1, argv[i]);
+		if (fd < 0) {
+			warn("%s", argv[i]);
+			exitval = 1;
+			goto out;
+		}
 		error = ioctl(fd, DIOCGMEDIASIZE, &mediasize);
-		if (error)
-			err(1, "%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]);
+		if (error) {
+			warn("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]);
+			exitval = 1;
+			goto out;
+		}
 		error = ioctl(fd, DIOCGSECTORSIZE, §orsize);
-		if (error)
-			err(1, "%s: DIOCGSECTORSIZE failed, probably not a disk.", argv[i]);
+		if (error) {
+			warn("%s: DIOCGSECTORSIZE failed, probably not a disk.", argv[i]);
+			exitval = 1;
+			goto out;
+		}
 		error = ioctl(fd, DIOCGFWSECTORS, &fwsectors);
 		if (error)
 			fwsectors = 0;
@@ -148,9 +157,10 @@ main(int argc, char **argv)
 			commandtime(fd, mediasize, sectorsize);
 		if (opt_t)
 			speeddisk(fd, mediasize, sectorsize);
+out:
 		close(fd);
 	}
-	exit (0);
+	exit (exitval);
 }
 
 

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Mar 10 17:26:36 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 63C1C106564A;
	Thu, 10 Mar 2011 17:26:36 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 520EE8FC17;
	Thu, 10 Mar 2011 17:26:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2AHQaKg050458;
	Thu, 10 Mar 2011 17:26:36 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2AHQaxd050456;
	Thu, 10 Mar 2011 17:26:36 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201103101726.p2AHQaxd050456@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Thu, 10 Mar 2011 17:26:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219454 - stable/8/sys/mips/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 10 Mar 2011 17:26:36 -0000

Author: pluknet
Date: Thu Mar 10 17:26:36 2011
New Revision: 219454
URL: http://svn.freebsd.org/changeset/base/219454

Log:
  Unbreak mips OCTEON1: there's no options MALLOC_DEBUG_MAXZONES in stable/8.
  
  This is a direct commit to 8.
  
  Approved by:	avg (mentor)

Modified:
  stable/8/sys/mips/conf/OCTEON1

Modified: stable/8/sys/mips/conf/OCTEON1
==============================================================================
--- stable/8/sys/mips/conf/OCTEON1	Thu Mar 10 16:51:28 2011	(r219453)
+++ stable/8/sys/mips/conf/OCTEON1	Thu Mar 10 17:26:36 2011	(r219454)
@@ -91,7 +91,6 @@ options 	INVARIANTS		# Enable calls of e
 options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
 options 	WITNESS			# Enable checks to detect deadlocks and cycles
 options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
-options 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
 
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 14:38:36 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 29B591065673;
	Fri, 11 Mar 2011 14:38:36 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1743C8FC12;
	Fri, 11 Mar 2011 14:38:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BEcZsn081532;
	Fri, 11 Mar 2011 14:38:35 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BEcZ5s081529;
	Fri, 11 Mar 2011 14:38:35 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111438.p2BEcZ5s081529@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 14:38:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219484 - in stable/8/sys: amd64/include i386/include
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 14:38:36 -0000

Author: avg
Date: Fri Mar 11 14:38:35 2011
New Revision: 219484
URL: http://svn.freebsd.org/changeset/base/219484

Log:
  MFC r215522: specialreg.h: add definition for AMD Core Performance Boost bit

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==============================================================================
--- stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 13:11:15 2011	(r219483)
+++ stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 14:38:35 2011	(r219484)
@@ -206,6 +206,7 @@
 #define	AMDPM_100MHZ_STEPS	0x00000040
 #define	AMDPM_HW_PSTATE		0x00000080
 #define	AMDPM_TSC_INVARIANT	0x00000100
+#define	AMDPM_CPB		0x00000200
 
 /*
  * AMD extended function 8000_0008h ecx info

Modified: stable/8/sys/i386/include/specialreg.h
==============================================================================
--- stable/8/sys/i386/include/specialreg.h	Fri Mar 11 13:11:15 2011	(r219483)
+++ stable/8/sys/i386/include/specialreg.h	Fri Mar 11 14:38:35 2011	(r219484)
@@ -205,6 +205,7 @@
 #define	AMDPM_100MHZ_STEPS	0x00000040
 #define	AMDPM_HW_PSTATE		0x00000080
 #define	AMDPM_TSC_INVARIANT	0x00000100
+#define	AMDPM_CPB		0x00000200
 
 /*
  * AMD extended function 8000_0008h ecx info

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 14:53:35 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2EFEC106566B;
	Fri, 11 Mar 2011 14:53:35 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 02E9C8FC19;
	Fri, 11 Mar 2011 14:53:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BErYiP082053;
	Fri, 11 Mar 2011 14:53:34 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BErYN8082048;
	Fri, 11 Mar 2011 14:53:34 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111453.p2BErYN8082048@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 14:53:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219486 - in stable/8/sys: amd64/include i386/i386
	i386/include
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 14:53:35 -0000

Author: avg
Date: Fri Mar 11 14:53:34 2011
New Revision: 219486
URL: http://svn.freebsd.org/changeset/base/219486

Log:
  MFC r215523: specialreg.h: add AMD-specific "Hardware Configuration
  Register" MSR

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/i386/initcpu.c
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==============================================================================
--- stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 14:46:27 2011	(r219485)
+++ stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 14:53:34 2011	(r219486)
@@ -504,6 +504,7 @@
 #define	MSR_PERFCTR2	0xc0010006
 #define	MSR_PERFCTR3	0xc0010007
 #define	MSR_SYSCFG	0xc0010010
+#define	MSR_HWCR	0xc0010015
 #define	MSR_IORRBASE0	0xc0010016
 #define	MSR_IORRMASK0	0xc0010017
 #define	MSR_IORRBASE1	0xc0010018

Modified: stable/8/sys/i386/i386/initcpu.c
==============================================================================
--- stable/8/sys/i386/i386/initcpu.c	Fri Mar 11 14:46:27 2011	(r219485)
+++ stable/8/sys/i386/i386/initcpu.c	Fri Mar 11 14:53:34 2011	(r219486)
@@ -672,7 +672,7 @@ initializecpu(void)
 			     (cpu_id & ~0xf) == 0x670 ||
 			     (cpu_id & ~0xf) == 0x680)) {
 				u_int regs[4];
-				wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000);
+				wrmsr(MSR_HWCR, rdmsr(MSR_HWCR) & ~0x08000);
 				do_cpuid(1, regs);
 				cpu_feature = regs[3];
 			}

Modified: stable/8/sys/i386/include/specialreg.h
==============================================================================
--- stable/8/sys/i386/include/specialreg.h	Fri Mar 11 14:46:27 2011	(r219485)
+++ stable/8/sys/i386/include/specialreg.h	Fri Mar 11 14:53:34 2011	(r219486)
@@ -554,7 +554,8 @@
 #define	AMD_WT_ALLOC_FRE	0x10000	/* fixed (A0000-FFFFF) range enable */
 
 /* AMD64 MSR's */
-#define	MSR_EFER	0xc0000080	/* extended features */
+#define	MSR_EFER		0xc0000080	/* extended features */
+#define	MSR_HWCR		0xc0010015
 #define	MSR_K8_UCODE_UPDATE	0xc0010020	/* update microcode */
 #define	MSR_MC0_CTL_MASK	0xc0010044
 

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 14:58:17 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9D0A5106566B;
	Fri, 11 Mar 2011 14:58:17 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8AB858FC0C;
	Fri, 11 Mar 2011 14:58:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BEwH6h082295;
	Fri, 11 Mar 2011 14:58:17 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BEwH1w082292;
	Fri, 11 Mar 2011 14:58:17 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111458.p2BEwH1w082292@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 14:58:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219488 - in stable/8/sys: amd64/include i386/include
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 14:58:17 -0000

Author: avg
Date: Fri Mar 11 14:58:17 2011
New Revision: 219488
URL: http://svn.freebsd.org/changeset/base/219488

Log:
  MFC r215524: specialreg.h: add definitions for MPERF/APERF pair of MSRs

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==============================================================================
--- stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 14:55:23 2011	(r219487)
+++ stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 14:58:17 2011	(r219488)
@@ -240,6 +240,8 @@
 #define	MSR_BIOS_SIGN		0x08b
 #define	MSR_PERFCTR0		0x0c1
 #define	MSR_PERFCTR1		0x0c2
+#define	MSR_MPERF		0x0e7
+#define	MSR_APERF		0x0e8
 #define	MSR_IA32_EXT_CONFIG	0x0ee	/* Undocumented. Core Solo/Duo only */
 #define	MSR_MTRRcap		0x0fe
 #define	MSR_BBL_CR_ADDR		0x116

Modified: stable/8/sys/i386/include/specialreg.h
==============================================================================
--- stable/8/sys/i386/include/specialreg.h	Fri Mar 11 14:55:23 2011	(r219487)
+++ stable/8/sys/i386/include/specialreg.h	Fri Mar 11 14:58:17 2011	(r219488)
@@ -246,6 +246,8 @@
 #define	MSR_BIOS_SIGN		0x08b
 #define	MSR_PERFCTR0		0x0c1
 #define	MSR_PERFCTR1		0x0c2
+#define	MSR_MPERF		0x0e7
+#define	MSR_APERF		0x0e8
 #define	MSR_IA32_EXT_CONFIG	0x0ee	/* Undocumented. Core Solo/Duo only */
 #define	MSR_MTRRcap		0x0fe
 #define	MSR_BBL_CR_ADDR		0x116

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 15:05:24 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3DCA4106566B;
	Fri, 11 Mar 2011 15:05:24 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B4078FC08;
	Fri, 11 Mar 2011 15:05:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BF5OId082950;
	Fri, 11 Mar 2011 15:05:24 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BF5O4f082947;
	Fri, 11 Mar 2011 15:05:24 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111505.p2BF5O4f082947@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 15:05:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219490 - in stable/8/sys: amd64/include i386/include
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 15:05:24 -0000

Author: avg
Date: Fri Mar 11 15:05:23 2011
New Revision: 219490
URL: http://svn.freebsd.org/changeset/base/219490

Log:
  MFC r215748: specialreg.h: add definitions for some useful bits found in
  CPUID.6 EAX and ECX

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==============================================================================
--- stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 15:01:54 2011	(r219489)
+++ stable/8/sys/amd64/include/specialreg.h	Fri Mar 11 15:05:23 2011	(r219490)
@@ -136,6 +136,15 @@
 #define	CPUID2_AESNI	0x02000000
 
 /*
+ * Important bits in the Thermal and Power Management flags
+ * CPUID.6 EAX and ECX.
+ */
+#define	CPUTPM1_SENSOR	0x00000001
+#define	CPUTPM1_TURBO	0x00000002
+#define	CPUTPM1_ARAT	0x00000004
+#define	CPUTPM2_EFFREQ	0x00000001
+
+/*
  * Important bits in the AMD extended cpuid flags
  */
 #define	AMDID_SYSCALL	0x00000800

Modified: stable/8/sys/i386/include/specialreg.h
==============================================================================
--- stable/8/sys/i386/include/specialreg.h	Fri Mar 11 15:01:54 2011	(r219489)
+++ stable/8/sys/i386/include/specialreg.h	Fri Mar 11 15:05:23 2011	(r219490)
@@ -133,6 +133,15 @@
 #define	CPUID2_AESNI	0x02000000
 
 /*
+ * Important bits in the Thermal and Power Management flags
+ * CPUID.6 EAX and ECX.
+ */
+#define	CPUTPM1_SENSOR	0x00000001
+#define	CPUTPM1_TURBO	0x00000002
+#define	CPUTPM1_ARAT	0x00000004
+#define	CPUTPM2_EFFREQ	0x00000001
+
+/*
  * Important bits in the AMD extended cpuid flags
  */
 #define	AMDID_SYSCALL	0x00000800

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 15:14:40 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8AE251065670;
	Fri, 11 Mar 2011 15:14:40 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 78A998FC0C;
	Fri, 11 Mar 2011 15:14:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BFEeRW083792;
	Fri, 11 Mar 2011 15:14:40 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BFEeaH083790;
	Fri, 11 Mar 2011 15:14:40 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111514.p2BFEeaH083790@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 15:14:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219492 - stable/8/sys/kern
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 15:14:40 -0000

Author: avg
Date: Fri Mar 11 15:14:40 2011
New Revision: 219492
URL: http://svn.freebsd.org/changeset/base/219492

Log:
  MFC r215750: taskqueue: drop unused tq_name field

Modified:
  stable/8/sys/kern/subr_taskqueue.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/subr_taskqueue.c
==============================================================================
--- stable/8/sys/kern/subr_taskqueue.c	Fri Mar 11 15:06:56 2011	(r219491)
+++ stable/8/sys/kern/subr_taskqueue.c	Fri Mar 11 15:14:40 2011	(r219492)
@@ -53,7 +53,6 @@ struct taskqueue_busy {
 
 struct taskqueue {
 	STAILQ_HEAD(, task)	tq_queue;
-	const char		*tq_name;
 	taskqueue_enqueue_fn	tq_enqueue;
 	void			*tq_context;
 	TAILQ_HEAD(, taskqueue_busy) tq_active;
@@ -98,7 +97,7 @@ TQ_SLEEP(struct taskqueue *tq, void *p, 
 }
 
 static struct taskqueue *
-_taskqueue_create(const char *name, int mflags,
+_taskqueue_create(const char *name __unused, int mflags,
 		 taskqueue_enqueue_fn enqueue, void *context,
 		 int mtxflags, const char *mtxname)
 {
@@ -110,7 +109,6 @@ _taskqueue_create(const char *name, int 
 
 	STAILQ_INIT(&queue->tq_queue);
 	TAILQ_INIT(&queue->tq_active);
-	queue->tq_name = name;
 	queue->tq_enqueue = enqueue;
 	queue->tq_context = context;
 	queue->tq_spin = (mtxflags & MTX_SPIN) != 0;

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 15:34:07 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 73E9C106564A;
	Fri, 11 Mar 2011 15:34:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2A1D68FC0C;
	Fri, 11 Mar 2011 15:34:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BFY7r1084321;
	Fri, 11 Mar 2011 15:34:07 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BFY7DI084319;
	Fri, 11 Mar 2011 15:34:07 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103111534.p2BFY7DI084319@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 11 Mar 2011 15:34:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219493 - stable/8/sys/kern
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 15:34:07 -0000

Author: jhb
Date: Fri Mar 11 15:34:06 2011
New Revision: 219493
URL: http://svn.freebsd.org/changeset/base/219493

Log:
  MFC 208898:
  Call BUS_PROBE_NOMATCH() when device detached due to driver unload.
  This allows bus to power-down device when driver unloaded on-flight.

Modified:
  stable/8/sys/kern/subr_bus.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/subr_bus.c
==============================================================================
--- stable/8/sys/kern/subr_bus.c	Fri Mar 11 15:14:40 2011	(r219492)
+++ stable/8/sys/kern/subr_bus.c	Fri Mar 11 15:34:06 2011	(r219493)
@@ -1180,6 +1180,9 @@ devclass_delete_driver(devclass_t buscla
 				if ((error = device_detach(dev)) != 0)
 					return (error);
 				device_set_driver(dev, NULL);
+				BUS_PROBE_NOMATCH(dev->parent, dev);
+				devnomatch(dev);
+				dev->flags |= DF_DONENOMATCH;
 			}
 		}
 	}
@@ -2674,6 +2677,7 @@ device_attach(device_t dev)
 	}
 	device_sysctl_update(dev);
 	dev->state = DS_ATTACHED;
+	dev->flags &= ~DF_DONENOMATCH;
 	devadded(dev);
 	return (0);
 }

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 15:38:43 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 32F8D1065672;
	Fri, 11 Mar 2011 15:38:43 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 06F9F8FC0A;
	Fri, 11 Mar 2011 15:38:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BFcg2M084472;
	Fri, 11 Mar 2011 15:38:42 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BFcgql084469;
	Fri, 11 Mar 2011 15:38:42 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111538.p2BFcgql084469@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 15:38:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219494 - in stable/8/sys/cddl/dev/dtrace: amd64 i386
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 15:38:43 -0000

Author: avg
Date: Fri Mar 11 15:38:42 2011
New Revision: 219494
URL: http://svn.freebsd.org/changeset/base/219494

Log:
  MFC r216250: dtrace_gethrtime_init: pin to master while examining other CPUs

Modified:
  stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==============================================================================
--- stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	Fri Mar 11 15:34:06 2011	(r219493)
+++ stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	Fri Mar 11 15:38:42 2011	(r219494)
@@ -405,6 +405,7 @@ dtrace_gethrtime_init_cpu(void *arg)
 static void
 dtrace_gethrtime_init(void *arg)
 {
+	struct pcpu *pc;
 	uint64_t tsc_f;
 	cpumask_t map;
 	int i;
@@ -437,15 +438,14 @@ dtrace_gethrtime_init(void *arg)
 	nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f;
 
 	/* The current CPU is the reference one. */
+	sched_pin();
 	tsc_skew[curcpu] = 0;
-
 	CPU_FOREACH(i) {
 		if (i == curcpu)
 			continue;
 
-		map = 0;
-		map |= (1 << curcpu);
-		map |= (1 << i);
+		pc = pcpu_find(i);
+		map = PCPU_GET(cpumask) | pc->pc_cpumask;
 
 		smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
 		    dtrace_gethrtime_init_cpu,
@@ -453,6 +453,7 @@ dtrace_gethrtime_init(void *arg)
 
 		tsc_skew[i] = tgt_cpu_tsc - hst_cpu_tsc;
 	}
+	sched_unpin();
 }
 
 SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, dtrace_gethrtime_init, NULL);

Modified: stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==============================================================================
--- stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c	Fri Mar 11 15:34:06 2011	(r219493)
+++ stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c	Fri Mar 11 15:38:42 2011	(r219494)
@@ -405,6 +405,7 @@ dtrace_gethrtime_init_cpu(void *arg)
 static void
 dtrace_gethrtime_init(void *arg)
 {
+	struct pcpu *pc;
 	uint64_t tsc_f;
 	cpumask_t map;
 	int i;
@@ -437,15 +438,14 @@ dtrace_gethrtime_init(void *arg)
 	nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f;
 
 	/* The current CPU is the reference one. */
+	sched_pin();
 	tsc_skew[curcpu] = 0;
-
 	CPU_FOREACH(i) {
 		if (i == curcpu)
 			continue;
 
-		map = 0;
-		map |= (1 << curcpu);
-		map |= (1 << i);
+		pc = pcpu_find(i);
+		map = PCPU_GET(cpumask) | pc->pc_cpumask;
 
 		smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
 		    dtrace_gethrtime_init_cpu,
@@ -453,6 +453,7 @@ dtrace_gethrtime_init(void *arg)
 
 		tsc_skew[i] = tgt_cpu_tsc - hst_cpu_tsc;
 	}
+	sched_unpin();
 }
 
 SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, dtrace_gethrtime_init, NULL);

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 15:50:45 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2DB2106566B;
	Fri, 11 Mar 2011 15:50:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C0BA78FC08;
	Fri, 11 Mar 2011 15:50:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BFojBl084785;
	Fri, 11 Mar 2011 15:50:45 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BFojOe084783;
	Fri, 11 Mar 2011 15:50:45 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111550.p2BFojOe084783@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 15:50:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219495 - stable/8/sys/dev/cxgb/ulp/tom
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 15:50:45 -0000

Author: avg
Date: Fri Mar 11 15:50:45 2011
New Revision: 219495
URL: http://svn.freebsd.org/changeset/base/219495

Log:
  MFC r216373: fix incorrect use of atomic_set_xxx in cxgb

Modified:
  stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.c
==============================================================================
--- stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.c	Fri Mar 11 15:38:42 2011	(r219494)
+++ stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.c	Fri Mar 11 15:50:45 2011	(r219495)
@@ -269,7 +269,7 @@ init_tid_tabs(struct tid_info *t, unsign
 	t->atid_base = atid_base;
 	t->afree = NULL;
 	t->stids_in_use = t->atids_in_use = 0;
-	atomic_set_int(&t->tids_in_use, 0);
+	t->tids_in_use = 0;
 	mtx_init(&t->stid_lock, "stid", NULL, MTX_DUPOK|MTX_DEF);
 	mtx_init(&t->atid_lock, "atid", NULL, MTX_DUPOK|MTX_DEF);
 

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 16:00:57 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 282991065670;
	Fri, 11 Mar 2011 16:00:57 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F08978FC13;
	Fri, 11 Mar 2011 16:00:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BG0uNT085100;
	Fri, 11 Mar 2011 16:00:56 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BG0uxB085097;
	Fri, 11 Mar 2011 16:00:56 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111600.p2BG0uxB085097@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 16:00:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219497 - in stable/8/sys/cddl/dev/dtrace: amd64 i386
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 16:00:57 -0000

Author: avg
Date: Fri Mar 11 16:00:56 2011
New Revision: 219497
URL: http://svn.freebsd.org/changeset/base/219497

Log:
  MFC r216251: dtrace_xcall: no need for special handling of curcpu

Modified:
  stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==============================================================================
--- stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	Fri Mar 11 15:53:11 2011	(r219496)
+++ stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	Fri Mar 11 16:00:56 2011	(r219497)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
 	cpumask_t cpus;
 
-	critical_enter();
-
 	if (cpu == DTRACE_CPUALL)
 		cpus = all_cpus;
 	else
-		cpus = (cpumask_t) (1 << cpu);
-
-	/* If the current CPU is in the set, call the function directly: */
-	if ((cpus & (1 << curcpu)) != 0) {
-		(*func)(arg);
-
-		/* Mask the current CPU from the set */
-		cpus &= ~(1 << curcpu);
-	}
-
-	/* If there are any CPUs in the set, cross-call to those CPUs */
-	if (cpus != 0)
-		smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, arg);
+		cpus = (cpumask_t)1 << cpu;
 
-	critical_exit();
+	smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+	    smp_no_rendevous_barrier, arg);
 }
 
 static void

Modified: stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==============================================================================
--- stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c	Fri Mar 11 15:53:11 2011	(r219496)
+++ stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c	Fri Mar 11 16:00:56 2011	(r219497)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
 	cpumask_t cpus;
 
-	critical_enter();
-
 	if (cpu == DTRACE_CPUALL)
 		cpus = all_cpus;
 	else
-		cpus = (cpumask_t) (1 << cpu);
-
-	/* If the current CPU is in the set, call the function directly: */
-	if ((cpus & (1 << curcpu)) != 0) {
-		(*func)(arg);
-
-		/* Mask the current CPU from the set */
-		cpus &= ~(1 << curcpu);
-	}
-
-	/* If there are any CPUs in the set, cross-call to those CPUs */
-	if (cpus != 0)
-		smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, arg);
+		cpus = (cpumask_t)1 << cpu;
 
-	critical_exit();
+	smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+	    smp_no_rendevous_barrier, arg);
 }
 
 static void

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 16:05:36 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D8CFB1065672;
	Fri, 11 Mar 2011 16:05:36 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C665F8FC17;
	Fri, 11 Mar 2011 16:05:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BG5aqG085299;
	Fri, 11 Mar 2011 16:05:36 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BG5aJS085297;
	Fri, 11 Mar 2011 16:05:36 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111605.p2BG5aJS085297@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 16:05:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219499 - stable/8/sys/cddl/dev/cyclic/i386
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 16:05:37 -0000

Author: avg
Date: Fri Mar 11 16:05:36 2011
New Revision: 219499
URL: http://svn.freebsd.org/changeset/base/219499

Log:
  MFC r216252: opensolaris cyclic xcall: no need for special handling of curcpu

Modified:
  stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
==============================================================================
--- stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c	Fri Mar 11 16:02:38 2011	(r219498)
+++ stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c	Fri Mar 11 16:05:36 2011	(r219499)
@@ -121,13 +121,7 @@ static void reprogram(cyb_arg_t arg, hrt
 
 static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
 {
-	/*
-	 * If the target CPU is the current one, just call the
-	 * function. This covers the non-SMP case.
-	 */
-	if (c == &solaris_cpu[curcpu])
-		(*func)(param);
-	else
-		smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
-		    func, smp_no_rendevous_barrier, param);
+
+	smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
+	    func, smp_no_rendevous_barrier, param);
 }

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 16:11:42 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A7DF1065672;
	Fri, 11 Mar 2011 16:11:42 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 86A9A8FC0C;
	Fri, 11 Mar 2011 16:11:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BGBgkj085573;
	Fri, 11 Mar 2011 16:11:42 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BGBgC0085570;
	Fri, 11 Mar 2011 16:11:42 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111611.p2BGBgC0085570@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 16:11:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219501 - in stable/8/sys/cddl: compat/opensolaris/sys
	dev/cyclic
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 16:11:42 -0000

Author: avg
Date: Fri Mar 11 16:11:42 2011
New Revision: 219501
URL: http://svn.freebsd.org/changeset/base/219501

Log:
  MFC r216254: opensolaris cyclic: fix deadlock and make a little bit
  closer to upstream

Modified:
  stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h
  stable/8/sys/cddl/dev/cyclic/cyclic.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h
==============================================================================
--- stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h	Fri Mar 11 16:07:20 2011	(r219500)
+++ stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h	Fri Mar 11 16:11:42 2011	(r219501)
@@ -288,7 +288,14 @@ typedef struct cyc_id {
 
 typedef struct cyc_xcallarg {
 	cyc_cpu_t *cyx_cpu;
-	hrtime_t cyx_exp;
+	cyc_handler_t *cyx_hdlr;
+	cyc_time_t *cyx_when;
+	cyc_index_t cyx_ndx;
+	cyc_index_t *cyx_heap;
+	cyclic_t *cyx_cyclics;
+	cyc_index_t cyx_size;
+	uint16_t cyx_flags;
+	int cyx_wait;
 } cyc_xcallarg_t;
 
 #define	CY_DEFAULT_PERCPU	1

Modified: stable/8/sys/cddl/dev/cyclic/cyclic.c
==============================================================================
--- stable/8/sys/cddl/dev/cyclic/cyclic.c	Fri Mar 11 16:07:20 2011	(r219500)
+++ stable/8/sys/cddl/dev/cyclic/cyclic.c	Fri Mar 11 16:11:42 2011	(r219501)
@@ -473,73 +473,6 @@ cyclic_expire(cyc_cpu_t *cpu, cyc_index_
 	(*handler)(arg);
 }
 
-static void
-cyclic_enable_xcall(void *v)
-{
-	cyc_xcallarg_t *argp = v;
-	cyc_cpu_t *cpu = argp->cyx_cpu;
-	cyc_backend_t *be = cpu->cyp_backend;
-
-	be->cyb_enable(be->cyb_arg);
-}
-
-static void
-cyclic_enable(cyc_cpu_t *cpu)
-{
-	cyc_backend_t *be = cpu->cyp_backend;
-	cyc_xcallarg_t arg;
-
-	arg.cyx_cpu = cpu;
-
-	/* Cross call to the target CPU */
-	be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_enable_xcall, &arg);
-}
-
-static void
-cyclic_disable_xcall(void *v)
-{
-	cyc_xcallarg_t *argp = v;
-	cyc_cpu_t *cpu = argp->cyx_cpu;
-	cyc_backend_t *be = cpu->cyp_backend;
-
-	be->cyb_disable(be->cyb_arg);
-}
-
-static void
-cyclic_disable(cyc_cpu_t *cpu)
-{
-	cyc_backend_t *be = cpu->cyp_backend;
-	cyc_xcallarg_t arg;
-
-	arg.cyx_cpu = cpu;
-
-	/* Cross call to the target CPU */
-	be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_disable_xcall, &arg);
-}
-
-static void
-cyclic_reprogram_xcall(void *v)
-{
-	cyc_xcallarg_t *argp = v;
-	cyc_cpu_t *cpu = argp->cyx_cpu;
-	cyc_backend_t *be = cpu->cyp_backend;
-
-	be->cyb_reprogram(be->cyb_arg, argp->cyx_exp);
-}
-
-static void
-cyclic_reprogram(cyc_cpu_t *cpu, hrtime_t exp)
-{
-	cyc_backend_t *be = cpu->cyp_backend;
-	cyc_xcallarg_t arg;
-
-	arg.cyx_cpu = cpu;
-	arg.cyx_exp = exp;
-
-	/* Cross call to the target CPU */
-	be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_reprogram_xcall, &arg);
-}
-
 /*
  *  cyclic_fire(cpu_t *)
  *
@@ -570,17 +503,15 @@ static void
 cyclic_fire(cpu_t *c)
 {
 	cyc_cpu_t *cpu = c->cpu_cyclic;
-
-	mtx_lock_spin(&cpu->cyp_mtx);
-
+	cyc_backend_t *be = cpu->cyp_backend;
 	cyc_index_t *heap = cpu->cyp_heap;
 	cyclic_t *cyclic, *cyclics = cpu->cyp_cyclics;
+	void *arg = be->cyb_arg;
 	hrtime_t now = gethrtime();
 	hrtime_t exp;
 
 	if (cpu->cyp_nelems == 0) {
 		/* This is a spurious fire. */
-		mtx_unlock_spin(&cpu->cyp_mtx);
 		return;
 	}
 
@@ -631,8 +562,45 @@ cyclic_fire(cpu_t *c)
 	 * Now we have a cyclic in the root slot which isn't in the past;
 	 * reprogram the interrupt source.
 	 */
-	cyclic_reprogram(cpu, exp);
+	be->cyb_reprogram(arg, exp);
+}
+
+static void
+cyclic_expand_xcall(cyc_xcallarg_t *arg)
+{
+	cyc_cpu_t *cpu = arg->cyx_cpu;
+	cyc_index_t new_size = arg->cyx_size, size = cpu->cyp_size, i;
+	cyc_index_t *new_heap = arg->cyx_heap;
+	cyclic_t *cyclics = cpu->cyp_cyclics, *new_cyclics = arg->cyx_cyclics;
+
+	/* Disable preemption and interrupts. */
+	mtx_lock_spin(&cpu->cyp_mtx);
+
+	/*
+	 * Assert that the new size is a power of 2.
+	 */
+	ASSERT((new_size & (new_size - 1)) == 0);
+	ASSERT(new_size == (size << 1));
+	ASSERT(cpu->cyp_heap != NULL && cpu->cyp_cyclics != NULL);
+
+	bcopy(cpu->cyp_heap, new_heap, sizeof (cyc_index_t) * size);
+	bcopy(cyclics, new_cyclics, sizeof (cyclic_t) * size);
+
+	/*
+	 * Set up the free list, and set all of the new cyclics to be CYF_FREE.
+	 */
+	for (i = size; i < new_size; i++) {
+		new_heap[i] = i;
+		new_cyclics[i].cy_flags = CYF_FREE;
+	}
 
+	/*
+	 * We can go ahead and plow the value of cyp_heap and cyp_cyclics;
+	 * cyclic_expand() has kept a copy.
+	 */
+	cpu->cyp_heap = new_heap;
+	cpu->cyp_cyclics = new_cyclics;
+	cpu->cyp_size = new_size;
 	mtx_unlock_spin(&cpu->cyp_mtx);
 }
 
@@ -643,102 +611,70 @@ cyclic_fire(cpu_t *c)
 static void
 cyclic_expand(cyc_cpu_t *cpu)
 {
-	cyc_index_t new_size, old_size, i;
+	cyc_index_t new_size, old_size;
 	cyc_index_t *new_heap, *old_heap;
 	cyclic_t *new_cyclics, *old_cyclics;
+	cyc_xcallarg_t arg;
+	cyc_backend_t *be = cpu->cyp_backend;
 
 	ASSERT(MUTEX_HELD(&cpu_lock));
 
-	if ((new_size = ((old_size = cpu->cyp_size) << 1)) == 0)
+	old_heap = cpu->cyp_heap;
+	old_cyclics = cpu->cyp_cyclics;
+
+	if ((new_size = ((old_size = cpu->cyp_size) << 1)) == 0) {
 		new_size = CY_DEFAULT_PERCPU;
+		ASSERT(old_heap == NULL && old_cyclics == NULL);
+	}
 
 	/*
 	 * Check that the new_size is a power of 2.
 	 */
 	ASSERT(((new_size - 1) & new_size) == 0);
 
-	/* Unlock the mutex while allocating memory so we can wait... */
-	mtx_unlock_spin(&cpu->cyp_mtx);
-
 	new_heap = malloc(sizeof(cyc_index_t) * new_size, M_CYCLIC, M_WAITOK);
 	new_cyclics = malloc(sizeof(cyclic_t) * new_size, M_CYCLIC, M_ZERO | M_WAITOK);
 
-	/* Grab the lock again now we've got the memory... */
-	mtx_lock_spin(&cpu->cyp_mtx);
-
-	/* Check if another thread beat us while the mutex was unlocked. */
-	if (old_size != cpu->cyp_size) {
-		/* Oh well, he won. */
-		mtx_unlock_spin(&cpu->cyp_mtx);
-
-		free(new_heap, M_CYCLIC);
-		free(new_cyclics, M_CYCLIC);
-
-		mtx_lock_spin(&cpu->cyp_mtx);
-		return;
-	}
-
-	old_heap = cpu->cyp_heap;
-	old_cyclics = cpu->cyp_cyclics;
-
-	bcopy(cpu->cyp_heap, new_heap, sizeof (cyc_index_t) * old_size);
-	bcopy(old_cyclics, new_cyclics, sizeof (cyclic_t) * old_size);
-
-	/*
-	 * Set up the free list, and set all of the new cyclics to be CYF_FREE.
-	 */
-	for (i = old_size; i < new_size; i++) {
-		new_heap[i] = i;
-		new_cyclics[i].cy_flags = CYF_FREE;
-	}
+	arg.cyx_cpu = cpu;
+	arg.cyx_heap = new_heap;
+	arg.cyx_cyclics = new_cyclics;
+	arg.cyx_size = new_size;
 
-	/*
-	 * We can go ahead and plow the value of cyp_heap and cyp_cyclics;
-	 * cyclic_expand() has kept a copy.
-	 */
-	cpu->cyp_heap = new_heap;
-	cpu->cyp_cyclics = new_cyclics;
-	cpu->cyp_size = new_size;
+	be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu,
+	    (cyc_func_t)cyclic_expand_xcall, &arg);
 
 	if (old_cyclics != NULL) {
 		ASSERT(old_heap != NULL);
 		ASSERT(old_size != 0);
-		mtx_unlock_spin(&cpu->cyp_mtx);
-
 		free(old_cyclics, M_CYCLIC);
 		free(old_heap, M_CYCLIC);
-
-		mtx_lock_spin(&cpu->cyp_mtx);
 	}
 }
 
-static cyc_index_t
-cyclic_add_here(cyc_cpu_t *cpu, cyc_handler_t *hdlr,
-    cyc_time_t *when, uint16_t flags)
+static void
+cyclic_add_xcall(cyc_xcallarg_t *arg)
 {
+	cyc_cpu_t *cpu = arg->cyx_cpu;
+	cyc_handler_t *hdlr = arg->cyx_hdlr;
+	cyc_time_t *when = arg->cyx_when;
+	cyc_backend_t *be = cpu->cyp_backend;
 	cyc_index_t ndx, nelems;
+	cyb_arg_t bar = be->cyb_arg;
 	cyclic_t *cyclic;
 
-	ASSERT(MUTEX_HELD(&cpu_lock));
-
-	mtx_lock_spin(&cpu->cyp_mtx);
-
-	ASSERT(!(cpu->cyp_cpu->cpu_flags & CPU_OFFLINE));
-	ASSERT(when->cyt_when >= 0 && when->cyt_interval > 0);
-
-	while (cpu->cyp_nelems == cpu->cyp_size)
-		cyclic_expand(cpu);
-
 	ASSERT(cpu->cyp_nelems < cpu->cyp_size);
 
+	/* Disable preemption and interrupts. */
+	mtx_lock_spin(&cpu->cyp_mtx);
 	nelems = cpu->cyp_nelems++;
 
-	if (nelems == 0)
+	if (nelems == 0) {
 		/*
 		 * If this is the first element, we need to enable the
 		 * backend on this CPU.
 		 */
-		cyclic_enable(cpu);
+		be->cyb_enable(bar);
+	}
 
 	ndx = cpu->cyp_heap[nelems];
 	cyclic = &cpu->cyp_cyclics[ndx];
@@ -746,14 +682,20 @@ cyclic_add_here(cyc_cpu_t *cpu, cyc_hand
 	ASSERT(cyclic->cy_flags == CYF_FREE);
 	cyclic->cy_interval = when->cyt_interval;
 
-	if (when->cyt_when == 0)
-		cyclic->cy_expire = gethrtime() + cyclic->cy_interval;
-	else
+	if (when->cyt_when == 0) {
+		/*
+		 * If a start time hasn't been explicitly specified, we'll
+		 * start on the next interval boundary.
+		 */
+		cyclic->cy_expire = (gethrtime() / cyclic->cy_interval + 1) *
+		    cyclic->cy_interval;
+	} else {
 		cyclic->cy_expire = when->cyt_when;
+	}
 
 	cyclic->cy_handler = hdlr->cyh_func;
 	cyclic->cy_arg = hdlr->cyh_arg;
-	cyclic->cy_flags = flags;
+	cyclic->cy_flags = arg->cyx_flags;
 
 	if (cyclic_upheap(cpu, nelems)) {
 		hrtime_t exp = cyclic->cy_expire;
@@ -762,31 +704,63 @@ cyclic_add_here(cyc_cpu_t *cpu, cyc_hand
 		 * If our upheap propagated to the root, we need to
 		 * reprogram the interrupt source.
 		 */
-		cyclic_reprogram(cpu, exp);
+		be->cyb_reprogram(bar, exp);
 	}
-
 	mtx_unlock_spin(&cpu->cyp_mtx);
 
-	return (ndx);
+	arg->cyx_ndx = ndx;
 }
 
-
-static int
-cyclic_remove_here(cyc_cpu_t *cpu, cyc_index_t ndx, cyc_time_t *when, int wait)
+static cyc_index_t
+cyclic_add_here(cyc_cpu_t *cpu, cyc_handler_t *hdlr,
+    cyc_time_t *when, uint16_t flags)
 {
-	cyc_index_t nelems, i;
-	cyclic_t *cyclic;
-	cyc_index_t *heap, last;
+	cyc_backend_t *be = cpu->cyp_backend;
+	cyb_arg_t bar = be->cyb_arg;
+	cyc_xcallarg_t arg;
 
 	ASSERT(MUTEX_HELD(&cpu_lock));
-	ASSERT(wait == CY_WAIT || wait == CY_NOWAIT);
+	ASSERT(!(cpu->cyp_cpu->cpu_flags & CPU_OFFLINE));
+	ASSERT(when->cyt_when >= 0 && when->cyt_interval > 0);
 
-	mtx_lock_spin(&cpu->cyp_mtx);
+	if (cpu->cyp_nelems == cpu->cyp_size) {
+		/*
+		 * This is expensive; it will cross call onto the other
+		 * CPU to perform the expansion.
+		 */
+		cyclic_expand(cpu);
+		ASSERT(cpu->cyp_nelems < cpu->cyp_size);
+	}
+
+	/*
+	 * By now, we know that we're going to be able to successfully
+	 * perform the add.  Now cross call over to the CPU of interest to
+	 * actually add our cyclic.
+	 */
+	arg.cyx_cpu = cpu;
+	arg.cyx_hdlr = hdlr;
+	arg.cyx_when = when;
+	arg.cyx_flags = flags;
+
+	be->cyb_xcall(bar, cpu->cyp_cpu, (cyc_func_t)cyclic_add_xcall, &arg);
+
+	return (arg.cyx_ndx);
+}
 
-	heap = cpu->cyp_heap;
+static void
+cyclic_remove_xcall(cyc_xcallarg_t *arg)
+{
+	cyc_cpu_t *cpu = arg->cyx_cpu;
+	cyc_backend_t *be = cpu->cyp_backend;
+	cyb_arg_t bar = be->cyb_arg;
+	cyc_index_t ndx = arg->cyx_ndx, nelems = cpu->cyp_nelems, i;
+	cyc_index_t *heap = cpu->cyp_heap, last;
+	cyclic_t *cyclic;
 
-	nelems = cpu->cyp_nelems;
+	ASSERT(nelems > 0);
 
+	/* Disable preemption and interrupts. */
+	mtx_lock_spin(&cpu->cyp_mtx);
 	cyclic = &cpu->cyp_cyclics[ndx];
 
 	/*
@@ -794,11 +768,17 @@ cyclic_remove_here(cyc_cpu_t *cpu, cyc_i
 	 * removed as part of a juggling operation, the expiration time
 	 * will be used when the cyclic is added to the new CPU.
 	 */
-	if (when != NULL) {
-		when->cyt_when = cyclic->cy_expire;
-		when->cyt_interval = cyclic->cy_interval;
+	if (arg->cyx_when != NULL) {
+		arg->cyx_when->cyt_when = cyclic->cy_expire;
+		arg->cyx_when->cyt_interval = cyclic->cy_interval;
 	}
 
+	/*
+	 * Now set the flags to CYF_FREE.  We don't need a membar_enter()
+	 * between zeroing pend and setting the flags because we're at
+	 * CY_HIGH_LEVEL (that is, the zeroing of pend and the setting
+	 * of cy_flags appear atomic to softints).
+	 */
 	cyclic->cy_flags = CYF_FREE;
 
 	for (i = 0; i < nelems; i++) {
@@ -811,19 +791,21 @@ cyclic_remove_here(cyc_cpu_t *cpu, cyc_i
 
 	cpu->cyp_nelems = --nelems;
 
-	if (nelems == 0)
+	if (nelems == 0) {
 		/*
 		 * If we just removed the last element, then we need to
 		 * disable the backend on this CPU.
 		 */
-		cyclic_disable(cpu);
+		be->cyb_disable(bar);
+	}
 
-	if (i == nelems)
+	if (i == nelems) {
 		/*
 		 * If we just removed the last element of the heap, then
 		 * we don't have to downheap.
 		 */
-		goto done;
+		goto out;
+	}
 
 	/*
 	 * Swap the last element of the heap with the one we want to
@@ -833,17 +815,18 @@ cyclic_remove_here(cyc_cpu_t *cpu, cyc_i
 	heap[i] = (last = heap[nelems]);
 	heap[nelems] = ndx;
 
-	if (i == 0)
+	if (i == 0) {
 		cyclic_downheap(cpu, 0);
-	else {
+	} else {
 		if (cyclic_upheap(cpu, i) == 0) {
 			/*
 			 * The upheap didn't propagate to the root; if it
 			 * didn't propagate at all, we need to downheap.
 			 */
-			if (heap[i] == last)
+			if (heap[i] == last) {
 				cyclic_downheap(cpu, i);
-			goto done;
+			}
+			goto out;
 		}
 	}
 
@@ -854,10 +837,27 @@ cyclic_remove_here(cyc_cpu_t *cpu, cyc_i
 	cyclic = &cpu->cyp_cyclics[heap[0]];
 
 	ASSERT(nelems != 0);
-	cyclic_reprogram(cpu, cyclic->cy_expire);
-
-done:
+	be->cyb_reprogram(bar, cyclic->cy_expire);
+out:
 	mtx_unlock_spin(&cpu->cyp_mtx);
+}
+
+static int
+cyclic_remove_here(cyc_cpu_t *cpu, cyc_index_t ndx, cyc_time_t *when, int wait)
+{
+	cyc_backend_t *be = cpu->cyp_backend;
+	cyc_xcallarg_t arg;
+
+	ASSERT(MUTEX_HELD(&cpu_lock));
+	ASSERT(wait == CY_WAIT || wait == CY_NOWAIT);
+
+	arg.cyx_ndx = ndx;
+	arg.cyx_cpu = cpu;
+	arg.cyx_when = when;
+	arg.cyx_wait = wait;
+
+	be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu,
+	    (cyc_func_t)cyclic_remove_xcall, &arg);
 
 	return (1);
 }
@@ -1214,15 +1214,10 @@ cyclic_add_omni(cyc_omni_handler_t *omni
 
 	idp->cyi_omni_hdlr = *omni;
 
-	for (i = 0; i < MAXCPU; i++) {
-		if (pcpu_find(i) == NULL)
-			continue;
-
+	CPU_FOREACH(i) {
 		c = &solaris_cpu[i];
-
 		if ((cpu = c->cpu_cyclic) == NULL)
 			continue;
-
 		cyclic_omni_start(idp, cpu);
 	}
 
@@ -1325,12 +1320,8 @@ cyclic_mp_init(void)
 
 	mutex_enter(&cpu_lock);
 
-	for (i = 0; i <= mp_maxid; i++) {
-		if (pcpu_find(i) == NULL)
-			continue;
-
+	CPU_FOREACH(i) {
 		c = &solaris_cpu[i];
-
 		if (c->cpu_cyclic == NULL)
 			cyclic_configure(c);
 	}
@@ -1346,10 +1337,8 @@ cyclic_uninit(void)
 
 	CPU_FOREACH(id) {
 		c = &solaris_cpu[id];
-
 		if (c->cpu_cyclic == NULL)
 			continue;
-
 		cyclic_unconfigure(c);
 	}
 

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 16:14:06 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E04741065676;
	Fri, 11 Mar 2011 16:14:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CDEC68FC18;
	Fri, 11 Mar 2011 16:14:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BGE6li085720;
	Fri, 11 Mar 2011 16:14:06 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BGE6MX085718;
	Fri, 11 Mar 2011 16:14:06 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103111614.p2BGE6MX085718@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 11 Mar 2011 16:14:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219503 - stable/8/sys/kern
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 16:14:07 -0000

Author: jhb
Date: Fri Mar 11 16:14:06 2011
New Revision: 219503
URL: http://svn.freebsd.org/changeset/base/219503

Log:
  MFC 219135:
  Similar to 189574, properly handle subclasses of bus drivers when deleting
  a driver during kldunload.  Specifically, recursively walk the tree of
  subclasses of a given driver attachment's bus device class detaching all
  instances of that driver for each class and its subclasses.

Modified:
  stable/8/sys/kern/subr_bus.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/subr_bus.c
==============================================================================
--- stable/8/sys/kern/subr_bus.c	Fri Mar 11 16:13:26 2011	(r219502)
+++ stable/8/sys/kern/subr_bus.c	Fri Mar 11 16:14:06 2011	(r219503)
@@ -1023,10 +1023,12 @@ devclass_find(const char *classname)
  * is called by devclass_add_driver to accomplish the recursive
  * notification of all the children classes of dc, as well as dc.
  * Each layer will have BUS_DRIVER_ADDED() called for all instances of
- * the devclass.  We do a full search here of the devclass list at
- * each iteration level to save storing children-lists in the devclass
- * structure.  If we ever move beyond a few dozen devices doing this,
- * we may need to reevaluate...
+ * the devclass.
+ *
+ * We do a full search here of the devclass list at each iteration
+ * level to save storing children-lists in the devclass structure.  If
+ * we ever move beyond a few dozen devices doing this, we may need to
+ * reevaluate...
  *
  * @param dc		the devclass to edit
  * @param driver	the driver that was just added
@@ -1121,6 +1123,78 @@ devclass_add_driver(devclass_t dc, drive
 }
 
 /**
+ * @brief Register that a device driver has been deleted from a devclass
+ *
+ * Register that a device driver has been removed from a devclass.
+ * This is called by devclass_delete_driver to accomplish the
+ * recursive notification of all the children classes of busclass, as
+ * well as busclass.  Each layer will attempt to detach the driver
+ * from any devices that are children of the bus's devclass.  The function
+ * will return an error if a device fails to detach.
+ * 
+ * We do a full search here of the devclass list at each iteration
+ * level to save storing children-lists in the devclass structure.  If
+ * we ever move beyond a few dozen devices doing this, we may need to
+ * reevaluate...
+ *
+ * @param busclass	the devclass of the parent bus
+ * @param dc		the devclass of the driver being deleted
+ * @param driver	the driver being deleted
+ */
+static int
+devclass_driver_deleted(devclass_t busclass, devclass_t dc, driver_t *driver)
+{
+	devclass_t parent;
+	device_t dev;
+	int error, i;
+
+	/*
+	 * Disassociate from any devices.  We iterate through all the
+	 * devices in the devclass of the driver and detach any which are
+	 * using the driver and which have a parent in the devclass which
+	 * we are deleting from.
+	 *
+	 * Note that since a driver can be in multiple devclasses, we
+	 * should not detach devices which are not children of devices in
+	 * the affected devclass.
+	 */
+	for (i = 0; i < dc->maxunit; i++) {
+		if (dc->devices[i]) {
+			dev = dc->devices[i];
+			if (dev->driver == driver && dev->parent &&
+			    dev->parent->devclass == busclass) {
+				if ((error = device_detach(dev)) != 0)
+					return (error);
+				device_set_driver(dev, NULL);
+				BUS_PROBE_NOMATCH(dev->parent, dev);
+				devnomatch(dev);
+				dev->flags |= DF_DONENOMATCH;
+			}
+		}
+	}
+
+	/*
+	 * Walk through the children classes.  Since we only keep a
+	 * single parent pointer around, we walk the entire list of
+	 * devclasses looking for children.  We set the
+	 * DC_HAS_CHILDREN flag when a child devclass is created on
+	 * the parent, so we only walk the list for those devclasses
+	 * that have children.
+	 */
+	if (!(busclass->flags & DC_HAS_CHILDREN))
+		return (0);
+	parent = busclass;
+	TAILQ_FOREACH(busclass, &devclasses, link) {
+		if (busclass->parent == parent) {
+			error = devclass_driver_deleted(busclass, dc, driver);
+			if (error)
+				return (error);
+		}
+	}
+	return (0);
+}
+
+/**
  * @brief Delete a device driver from a device class
  *
  * Delete a device driver from a devclass. This is normally called
@@ -1139,8 +1213,6 @@ devclass_delete_driver(devclass_t buscla
 {
 	devclass_t dc = devclass_find(driver->name);
 	driverlink_t dl;
-	device_t dev;
-	int i;
 	int error;
 
 	PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass)));
@@ -1162,30 +1234,9 @@ devclass_delete_driver(devclass_t buscla
 		return (ENOENT);
 	}
 
-	/*
-	 * Disassociate from any devices.  We iterate through all the
-	 * devices in the devclass of the driver and detach any which are
-	 * using the driver and which have a parent in the devclass which
-	 * we are deleting from.
-	 *
-	 * Note that since a driver can be in multiple devclasses, we
-	 * should not detach devices which are not children of devices in
-	 * the affected devclass.
-	 */
-	for (i = 0; i < dc->maxunit; i++) {
-		if (dc->devices[i]) {
-			dev = dc->devices[i];
-			if (dev->driver == driver && dev->parent &&
-			    dev->parent->devclass == busclass) {
-				if ((error = device_detach(dev)) != 0)
-					return (error);
-				device_set_driver(dev, NULL);
-				BUS_PROBE_NOMATCH(dev->parent, dev);
-				devnomatch(dev);
-				dev->flags |= DF_DONENOMATCH;
-			}
-		}
-	}
+	error = devclass_driver_deleted(busclass, dc, driver);
+	if (error != 0)
+		return (error);
 
 	TAILQ_REMOVE(&busclass->drivers, dl, link);
 	free(dl, M_BUS);

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 16:21:46 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0453E1065672;
	Fri, 11 Mar 2011 16:21:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CD0738FC15;
	Fri, 11 Mar 2011 16:21:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BGLjcG086002;
	Fri, 11 Mar 2011 16:21:45 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BGLjTo086000;
	Fri, 11 Mar 2011 16:21:45 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103111621.p2BGLjTo086000@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 11 Mar 2011 16:21:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219504 - stable/8
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 16:21:46 -0000

Author: jhb
Date: Fri Mar 11 16:21:45 2011
New Revision: 219504
URL: http://svn.freebsd.org/changeset/base/219504

Log:
  MFC 219136:
  Use a suitable DIRPRFX for each invocation of make in the build32 and
  install32 targets so that the full path to each program or library is
  displayed in the make output.

Modified:
  stable/8/Makefile.inc1   (contents, props changed)

Modified: stable/8/Makefile.inc1
==============================================================================
--- stable/8/Makefile.inc1	Fri Mar 11 16:14:06 2011	(r219503)
+++ stable/8/Makefile.inc1	Fri Mar 11 16:21:45 2011	(r219504)
@@ -445,36 +445,38 @@ build32:
 .for _t in obj depend all
 	cd ${.CURDIR}/kerberos5/tools; \
 	    MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
-	    ${_t}
+	    DIRPRFX=kerberos5/tools/ ${_t}
 .endfor
 .endif
 .for _t in obj includes
-	cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t}
-	cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t}
+	cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t}
 .if ${MK_CDDL} != "no"
-	cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t}
 .endif
-	cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t}
 .if ${MK_CRYPT} != "no"
-	cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t}
 .endif
 .if ${MK_KERBEROS} != "no"
-	cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t}
 .endif
 .endfor
 .for _dir in usr.bin/lex/lib
-	cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj
+	cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj
 .endfor
 .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
 	cd ${.CURDIR}/${_dir}; \
 	    MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
-	    build-tools
+	    DIRPRFX=${_dir}/ build-tools
 .endfor
 	cd ${.CURDIR}; \
 	    ${LIB32WMAKE} -f Makefile.inc1 libraries
 .for _t in obj depend all
-	cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
-	cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \
+	    DIRPRFX=libexec/rtld-elf/ ${_t}
+	cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \
+	    DIRPRFX=usr.bin/ldd ${_t}
 .endfor
 
 distribute32 install32:

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 16:24:49 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6C3BE106564A;
	Fri, 11 Mar 2011 16:24:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A41B8FC1C;
	Fri, 11 Mar 2011 16:24:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BGOn2v086115;
	Fri, 11 Mar 2011 16:24:49 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BGOnDC086113;
	Fri, 11 Mar 2011 16:24:49 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103111624.p2BGOnDC086113@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 11 Mar 2011 16:24:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219505 - stable/8
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 16:24:49 -0000

Author: jhb
Date: Fri Mar 11 16:24:49 2011
New Revision: 219505
URL: http://svn.freebsd.org/changeset/base/219505

Log:
  MFC 219137: Fully honor KERNSRCDIR for 'make universe' if it is set.

Modified:
  stable/8/Makefile   (contents, props changed)

Modified: stable/8/Makefile
==============================================================================
--- stable/8/Makefile	Fri Mar 11 16:21:45 2011	(r219504)
+++ stable/8/Makefile	Fri Mar 11 16:24:49 2011	(r219505)
@@ -289,6 +289,7 @@ MAKE_JUST_WORLDS=	YES
 .else
 UNIVERSE_TARGET?=	buildworld
 .endif
+KERNSRCDIR?=		${.CURDIR}/sys
 
 .if defined(DOING_TINDERBOX)
 FAILFILE=tinderbox.failed
@@ -321,8 +322,8 @@ universe_${target}:
 	@echo ">> ${target} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
 .endif
 .if !defined(MAKE_JUST_WORLDS)
-.if exists(${.CURDIR}/sys/${target}/conf/NOTES)
-	@(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
+.if exists(${KERNSRCDIR}/${target}/conf/NOTES)
+	@(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
 	    ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
 	    (echo "${target} 'make LINT' failed," \
 	    "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
@@ -336,7 +337,7 @@ universe_kernels: universe_kernconfs
 .if !defined(TARGET)
 TARGET!=	uname -m
 .endif
-KERNCONFS!=	cd ${.CURDIR}/sys/${TARGET}/conf && \
+KERNCONFS!=	cd ${KERNSRCDIR}/${TARGET}/conf && \
 		find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
 		! -name DEFAULTS ! -name NOTES
 universe_kernconfs:

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 16:43:39 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9DA5A1065689;
	Fri, 11 Mar 2011 16:43:39 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B3B48FC08;
	Fri, 11 Mar 2011 16:43:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BGhdBW086627;
	Fri, 11 Mar 2011 16:43:39 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BGhdG6086622;
	Fri, 11 Mar 2011 16:43:39 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111643.p2BGhdG6086622@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 16:43:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219507 - stable/8/sys/dev/acpica
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 16:43:39 -0000

Author: avg
Date: Fri Mar 11 16:43:39 2011
New Revision: 219507
URL: http://svn.freebsd.org/changeset/base/219507

Log:
  MFC r216503: small cleanup of acpi battery status setting and checking
  
  PR:		kern/124744

Modified:
  stable/8/sys/dev/acpica/acpi_battery.c
  stable/8/sys/dev/acpica/acpi_cmbat.c
  stable/8/sys/dev/acpica/acpi_smbat.c
  stable/8/sys/dev/acpica/acpiio.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/acpica/acpi_battery.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi_battery.c	Fri Mar 11 16:30:30 2011	(r219506)
+++ stable/8/sys/dev/acpica/acpi_battery.c	Fri Mar 11 16:43:39 2011	(r219507)
@@ -102,8 +102,9 @@ acpi_battery_get_info_expire(void)
 int
 acpi_battery_bst_valid(struct acpi_bst *bst)
 {
-    return (bst->state < ACPI_BATT_STAT_MAX && bst->cap != ACPI_BATT_UNKNOWN &&
-	bst->volt != ACPI_BATT_UNKNOWN);
+
+    return (bst->state != ACPI_BATT_STAT_NOT_PRESENT &&
+	bst->cap != ACPI_BATT_UNKNOWN && bst->volt != ACPI_BATT_UNKNOWN);
 }
 
 /* Check _BIF results for validity. */

Modified: stable/8/sys/dev/acpica/acpi_cmbat.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi_cmbat.c	Fri Mar 11 16:30:30 2011	(r219506)
+++ stable/8/sys/dev/acpica/acpi_cmbat.c	Fri Mar 11 16:43:39 2011	(r219507)
@@ -279,6 +279,12 @@ acpi_cmbat_get_bst(void *arg)
 	goto end;
     acpi_cmbat_info_updated(&sc->bst_lastupdated);
 
+    /* Clear out undefined/extended bits that might be set by hardware. */
+    sc->bst.state &= ACPI_BATT_STAT_BST_MASK;
+    if ((sc->bst.state & ACPI_BATT_STAT_INVALID) == ACPI_BATT_STAT_INVALID)
+	ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
+	    "battery reports simultaneous charging and discharging\n");
+
     /* XXX If all batteries are critical, perhaps we should suspend. */
     if (sc->bst.state & ACPI_BATT_STAT_CRITICAL) {
     	if ((sc->flags & ACPI_BATT_STAT_CRITICAL) == 0) {

Modified: stable/8/sys/dev/acpica/acpi_smbat.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi_smbat.c	Fri Mar 11 16:30:30 2011	(r219506)
+++ stable/8/sys/dev/acpica/acpi_smbat.c	Fri Mar 11 16:43:39 2011	(r219507)
@@ -390,6 +390,7 @@ acpi_smbat_get_bst(device_t dev, struct 
 
 	if (val > 0) {
 		sc->bst.rate = val * factor;
+		sc->bst.state &= ~SMBATT_BS_DISCHARGING;
 		sc->bst.state |= ACPI_BATT_STAT_CHARGING;
 	} else if (val < 0)
 		sc->bst.rate = (-val) * factor;

Modified: stable/8/sys/dev/acpica/acpiio.h
==============================================================================
--- stable/8/sys/dev/acpica/acpiio.h	Fri Mar 11 16:30:30 2011	(r219506)
+++ stable/8/sys/dev/acpica/acpiio.h	Fri Mar 11 16:43:39 2011	(r219507)
@@ -74,11 +74,22 @@ struct acpi_bst {
     uint32_t volt;			/* Present Voltage */
 };
 
+/*
+ * Note that the following definitions represent status bits for internal
+ * driver state.  The first three of them (charging, discharging and critical)
+ * conveninetly conform to ACPI specification of status returned by _BST
+ * method.  Other definitions (not present, etc) are synthetic.
+ * Also note that according to the specification the charging and discharging
+ * status bits must not be set at the same time.
+ */
 #define ACPI_BATT_STAT_DISCHARG		0x0001
 #define ACPI_BATT_STAT_CHARGING		0x0002
 #define ACPI_BATT_STAT_CRITICAL		0x0004
-#define ACPI_BATT_STAT_NOT_PRESENT	0x0007
-#define ACPI_BATT_STAT_MAX		0x0007
+#define ACPI_BATT_STAT_INVALID					\
+    (ACPI_BATT_STAT_DISCHARG | ACPI_BATT_STAT_CHARGING)
+#define ACPI_BATT_STAT_BST_MASK					\
+    (ACPI_BATT_STAT_INVALID | ACPI_BATT_STAT_CRITICAL)
+#define ACPI_BATT_STAT_NOT_PRESENT	ACPI_BATT_STAT_BST_MASK
 
 union acpi_battery_ioctl_arg {
     int			 unit;	/* Device unit or ACPI_BATTERY_ALL_UNITS. */

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 18:07:49 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 737C01065670;
	Fri, 11 Mar 2011 18:07:49 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 60F8F8FC19;
	Fri, 11 Mar 2011 18:07:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BI7nuJ088618;
	Fri, 11 Mar 2011 18:07:49 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BI7nXd088616;
	Fri, 11 Mar 2011 18:07:49 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111807.p2BI7nXd088616@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 18:07:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219513 - stable/8/sys/dev/acpi_support
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 18:07:49 -0000

Author: avg
Date: Fri Mar 11 18:07:49 2011
New Revision: 219513
URL: http://svn.freebsd.org/changeset/base/219513

Log:
  MFC r216376: acpi_fujitsu: update for P8010
  
  PR:		kern/121102

Modified:
  stable/8/sys/dev/acpi_support/acpi_fujitsu.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/acpi_support/acpi_fujitsu.c
==============================================================================
--- stable/8/sys/dev/acpi_support/acpi_fujitsu.c	Fri Mar 11 17:47:59 2011	(r219512)
+++ stable/8/sys/dev/acpi_support/acpi_fujitsu.c	Fri Mar 11 18:07:49 2011	(r219513)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2002 Sean Bullington 
- *               2003-2006 Anish Mistry 
+ *               2003-2008 Anish Mistry 
  *               2004 Mark Santcroos 
  * All Rights Reserved.
  *
@@ -86,6 +86,7 @@ ACPI_MODULE_NAME("Fujitsu")
 #define METHOD_RVOL	6
 #define METHOD_GSIF	7
 #define METHOD_GHKS	8
+#define METHOD_GBLS	9
 
 /* Notify event */
 #define	ACPI_NOTIFY_STATUS_CHANGED	0x80
@@ -110,6 +111,7 @@ struct acpi_fujitsu_softc {
 	/* Control methods */
 	struct int_nameval	_sta,	/* unused */
 				gbll,	/* brightness */
+				gbls,	/* get brightness state */
 				ghks,	/* hotkey selector */
 				gbuf,	/* unused (buffer?) */
 				gmou,	/* mouse */
@@ -191,6 +193,11 @@ static struct {
 		.description	= "Brightness level of the LCD panel"
 	},
 	{
+		.name		= "lcd_brightness",
+		.method		= METHOD_GBLS,
+		.description	= "Brightness level of the LCD panel"
+	},
+	{
 		.name		= "volume",
 		.method		= METHOD_GVOL,
 		.description	= "Speakers/headphones volume level"
@@ -360,6 +367,7 @@ acpi_fujitsu_init(struct acpi_fujitsu_so
 	/* Setup all of the names for each control method */
 	sc->_sta.name = "_STA";
 	sc->gbll.name = "GBLL";
+	sc->gbls.name = "GBLS";
 	sc->ghks.name = "GHKS";
 	sc->gmou.name = "GMOU";
 	sc->gsif.name = "GSIF";
@@ -387,6 +395,9 @@ acpi_fujitsu_init(struct acpi_fujitsu_so
 			case METHOD_GBLL:
 				exists = sc->gbll.exists;
 				break;
+			case METHOD_GBLS:
+				exists = sc->gbls.exists;
+				break;
 			case METHOD_GVOL:
 			case METHOD_MUTE:
 				exists = sc->gvol.exists;
@@ -463,6 +474,9 @@ acpi_fujitsu_method_get(struct acpi_fuji
 		case METHOD_GBLL:
 			nv = sc->gbll;
 			break;
+		case METHOD_GBLS:
+			nv = sc->gbls;
+			break;
 		case METHOD_GMOU:
 			nv = sc->gmou;
 			break;
@@ -520,6 +534,11 @@ acpi_fujitsu_method_set(struct acpi_fuji
 			control = "SBLL";
 			nv = sc->gbll;
 			break;
+		case METHOD_GBLS:
+			changed = BRIGHT_CHANGED;
+			control = "SBL2";
+			nv = sc->gbls;
+			break;
 		case METHOD_GMOU:
 			changed = MOUSE_CHANGED;
 			control = "SMOU";
@@ -585,6 +604,14 @@ acpi_fujitsu_check_hardware(struct acpi_
 	}
 
 	if (ACPI_FAILURE(acpi_GetInteger(sc->handle,
+		sc->gbls.name, &val))) {
+		sc->gbls.exists = 0;
+	} else {
+		sc->gbls.exists = 1;
+	}
+
+	// don't add if we can use the new method
+	if (sc->gbls.exists || ACPI_FAILURE(acpi_GetInteger(sc->handle,
 	    sc->gbll.name, &val))) {
 		sc->gbll.exists = 0;
 	} else {
@@ -681,6 +708,9 @@ acpi_fujitsu_update(struct acpi_fujitsu_
 			/* Clear the modification bit */
 			sc->gmou.value &= MOUSE_SETTING_BITS;
 			
+			/* Set the value in case it is not hardware controlled */
+                        acpi_fujitsu_method_set(sc, METHOD_GMOU, sc->gmou.value);
+
 			acpi_UserNotify("FUJITSU", sc->handle, FN_POINTER_ENABLE);
 	
 			ACPI_VPRINT(sc->dev, acpi_sc, "Internal pointer is now %s\n",
@@ -688,6 +718,29 @@ acpi_fujitsu_update(struct acpi_fujitsu_
 		}
 	}
 
+	/* Screen Brightness Level P8XXX */
+	if(sc->gbls.exists) {
+		if (ACPI_FAILURE(acpi_GetInteger(sc->handle,
+                sc->gbls.name, &(sc->gbls.value)))) {
+                        device_printf(sc->dev, "Couldn't query P8XXX brightness level\n");
+                        return (FALSE);
+                }
+		if (changed & BRIGHT_CHANGED) {
+			/* No state to record here. */
+
+			/* Clear the modification bit */
+			sc->gbls.value &= BRIGHTNESS_SETTING_BITS;
+
+			/* Set the value in case it is not hardware controlled */
+			acpi_fujitsu_method_set(sc, METHOD_GBLS, sc->gbls.value);
+
+			acpi_UserNotify("FUJITSU", sc->handle, FN_LCD_BRIGHTNESS);
+
+			ACPI_VPRINT(sc->dev, acpi_sc, "P8XXX Brightness level is now %d\n",
+			sc->gbls.value);
+                }
+	}
+
 	/* Screen Brightness Level */
 	if(sc->gbll.exists) {
 		if (ACPI_FAILURE(acpi_GetInteger(sc->handle,

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 18:15:31 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4FFFB106564A;
	Fri, 11 Mar 2011 18:15:31 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3DD408FC14;
	Fri, 11 Mar 2011 18:15:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BIFVr8088902;
	Fri, 11 Mar 2011 18:15:31 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BIFV16088900;
	Fri, 11 Mar 2011 18:15:31 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111815.p2BIFV16088900@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 18:15:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219515 - stable/8/sys/dev/drm
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 18:15:31 -0000

Author: avg
Date: Fri Mar 11 18:15:30 2011
New Revision: 219515
URL: http://svn.freebsd.org/changeset/base/219515

Log:
  MFC r216374: fix atomic_set_xxx misuse in drm

Modified:
  stable/8/sys/dev/drm/drm_irq.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/drm/drm_irq.c
==============================================================================
--- stable/8/sys/dev/drm/drm_irq.c	Fri Mar 11 18:10:37 2011	(r219514)
+++ stable/8/sys/dev/drm/drm_irq.c	Fri Mar 11 18:15:30 2011	(r219515)
@@ -140,7 +140,7 @@ int drm_vblank_init(struct drm_device *d
 	for (i = 0; i < num_crtcs; i++) {
 		DRM_INIT_WAITQUEUE(&dev->vblank[i].queue);
 		dev->vblank[i].refcount = 0;
-		atomic_set_rel_32(&dev->vblank[i].count, 0);
+		atomic_store_rel_32(&dev->vblank[i].count, 0);
 	}
 	dev->vblank_disable_allowed = 0;
 	DRM_SPINUNLOCK(&dev->vbl_lock);

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 18:28:20 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DED501065670;
	Fri, 11 Mar 2011 18:28:20 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCE6B8FC1A;
	Fri, 11 Mar 2011 18:28:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BISKQL089258;
	Fri, 11 Mar 2011 18:28:20 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BISKRN089256;
	Fri, 11 Mar 2011 18:28:20 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111828.p2BISKRN089256@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 18:28:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219517 - stable/8/sys/mips/rmi/dev/xlr
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 18:28:21 -0000

Author: avg
Date: Fri Mar 11 18:28:20 2011
New Revision: 219517
URL: http://svn.freebsd.org/changeset/base/219517

Log:
  MFC r216375,r216408: fix atomic_set_xxx misuse in rge

Modified:
  stable/8/sys/mips/rmi/dev/xlr/rge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/mips/rmi/dev/xlr/rge.c
==============================================================================
--- stable/8/sys/mips/rmi/dev/xlr/rge.c	Fri Mar 11 18:21:16 2011	(r219516)
+++ stable/8/sys/mips/rmi/dev/xlr/rge.c	Fri Mar 11 18:28:20 2011	(r219517)
@@ -170,10 +170,8 @@ extern uint32_t cpu_ltop_map[32];
 static int port_counters[4][8] __aligned(XLR_CACHELINE_SIZE);
 
 #define port_inc_counter(port, counter) 	atomic_add_int(&port_counters[port][(counter)], 1)
-#define port_set_counter(port, counter, value) 	atomic_set_int(&port_counters[port][(counter)], (value))
 #else
 #define port_inc_counter(port, counter)	/* Nothing */
-#define port_set_counter(port, counter, value)	/* Nothing */
 #endif
 
 int xlr_rge_tx_prepend[MAXCPU];
@@ -2281,7 +2279,7 @@ rmi_xlr_mac_open(struct rge_softc *sc)
 	mtx_unlock_spin(&priv->lock);
 
 	for (i = 0; i < 8; i++) {
-		atomic_set_int(&(priv->frin_to_be_sent[i]), 0);
+		priv->frin_to_be_sent[i] = 0;
 	}
 
 	return 0;

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 18:46:12 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1A3E0106564A;
	Fri, 11 Mar 2011 18:46:12 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0808E8FC15;
	Fri, 11 Mar 2011 18:46:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BIkBOU089877;
	Fri, 11 Mar 2011 18:46:11 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BIkBKA089875;
	Fri, 11 Mar 2011 18:46:11 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111846.p2BIkBKA089875@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 18:46:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219520 - stable/8/sys/cddl/dev/cyclic/i386
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 18:46:12 -0000

Author: avg
Date: Fri Mar 11 18:46:11 2011
New Revision: 219520
URL: http://svn.freebsd.org/changeset/base/219520

Log:
  MFC r216505: cyclic xcall: use smp_no_rendevous_barrier as setup
  function parameter

Modified:
  stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
==============================================================================
--- stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c	Fri Mar 11 18:44:16 2011	(r219519)
+++ stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c	Fri Mar 11 18:46:11 2011	(r219520)
@@ -122,6 +122,6 @@ static void reprogram(cyb_arg_t arg, hrt
 static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
 {
 
-	smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
-	    func, smp_no_rendevous_barrier, param);
+	smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid),
+	    smp_no_rendevous_barrier, func, smp_no_rendevous_barrier, param);
 }

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 19:27:31 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 93FDE106564A;
	Fri, 11 Mar 2011 19:27:31 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 817BD8FC08;
	Fri, 11 Mar 2011 19:27:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BJRVZY091031;
	Fri, 11 Mar 2011 19:27:31 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BJRVu3091029;
	Fri, 11 Mar 2011 19:27:31 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201103111927.p2BJRVu3091029@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 11 Mar 2011 19:27:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219526 -
	stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 19:27:31 -0000

Author: avg
Date: Fri Mar 11 19:27:31 2011
New Revision: 219526
URL: http://svn.freebsd.org/changeset/base/219526

Log:
  use even larger stack size for ZFS txg_sync_thread
  
  While the stack size was larger than the default stack size on i386, it
  was smaller than the default stack size on amd64 and apparently that
  wasn't enough.  So, bump the size to 4 pages.  Upcoming ZFSv28 code uses
  8 pages for this stack size.
  
  This is a direct commit to stable/8.
  
  PR:		kern/154681
  Discussed with:	pjd

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Mar 11 19:21:42 2011	(r219525)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Mar 11 19:27:31 2011	(r219526)
@@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp)
 	 * 32-bit x86.  This is due in part to nested pools and
 	 * scrub_visitbp() recursion.
 	 */
-	tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread,
+	tx->tx_sync_thread = thread_create(NULL, 16<<10, txg_sync_thread,
 	    dp, 0, &p0, TS_RUN, minclsyspri);
 
 	mutex_exit(&tx->tx_sync_lock);

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 19:44:06 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A15AE1065678;
	Fri, 11 Mar 2011 19:44:06 +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 8F8518FC18;
	Fri, 11 Mar 2011 19:44:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BJi66T091517;
	Fri, 11 Mar 2011 19:44:06 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BJi6B0091515;
	Fri, 11 Mar 2011 19:44:06 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201103111944.p2BJi6B0091515@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 11 Mar 2011 19:44:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219529 - stable/8/share/termcap
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 19:44:06 -0000

Author: ed
Date: Fri Mar 11 19:44:06 2011
New Revision: 219529
URL: http://svn.freebsd.org/changeset/base/219529

Log:
  MFC r218844:
  
    Improve 256 color support.
  
    - Add screen-256color,
    - Improve rxvt-256color to set pa and op properly.
    - Add rxvt-unicode-256color as an alias to rxvt-256color.
  
    PR:           conf/152713, conf/153164
    Submitted by: Alexander Verbod and Frédéric Perrin

Modified:
  stable/8/share/termcap/termcap.src
Directory Properties:
  stable/8/share/termcap/   (props changed)

Modified: stable/8/share/termcap/termcap.src
==============================================================================
--- stable/8/share/termcap/termcap.src	Fri Mar 11 19:40:49 2011	(r219528)
+++ stable/8/share/termcap/termcap.src	Fri Mar 11 19:44:06 2011	(r219529)
@@ -2784,6 +2784,9 @@ SH|screen-s|VT 100/ANSI X3.64 virtual te
 	:ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
 SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\
 	:co#132:tc=screen:
+screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\
+	:Co#256:pa#32767:\
+	:AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen:
 # $Xorg: termcap,v 1.3 2000/08/17 19:55:10 cpqbld Exp $
 #
 # Note:
@@ -4586,7 +4589,11 @@ rxvt|rxvt terminal emulator (X Window Sy
 	:pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:tc=rxvt-mono:
 
 rxvt-256color|rxvt terminal emulator with 256 colors:\
-	:Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt-unicode:
+	:Co#256:pa#32767:\
+	:AB=\E[48;5;%dm:AF=\E[38;5;%dm:op=\E[39;49m:tc=rxvt-unicode:
+
+rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
+	:tc=rxvt-256color:
 
 # Termcap entry for Eterm, taken from the sources of Eterm-0.9.2
 Eterm|Eterm Terminal Emulator (X11 Window System):\

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 19:50:51 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8495D1065672;
	Fri, 11 Mar 2011 19:50:51 +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 008458FC0C;
	Fri, 11 Mar 2011 19:50:50 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p2BJolnj082014
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 11 Mar 2011 21:50:47 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id
	p2BJokJh027683; Fri, 11 Mar 2011 21:50:46 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p2BJokCY027682; 
	Fri, 11 Mar 2011 21:50:46 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Fri, 11 Mar 2011 21:50:46 +0200
From: Kostik Belousov 
To: Andriy Gapon 
Message-ID: <20110311195046.GQ78089@deviant.kiev.zoral.com.ua>
References: <201103111927.p2BJRVu3091029@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="aaUKsgtkw/mqWK8Q"
Content-Disposition: inline
In-Reply-To: <201103111927.p2BJRVu3091029@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
X-Spam-Status: No, score=-3.4 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-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r219526 -
	stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 19:50:51 -0000


--aaUKsgtkw/mqWK8Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 11, 2011 at 07:27:31PM +0000, Andriy Gapon wrote:
> Author: avg
> Date: Fri Mar 11 19:27:31 2011
> New Revision: 219526
> URL: http://svn.freebsd.org/changeset/base/219526
>=20
> Log:
>   use even larger stack size for ZFS txg_sync_thread
>  =20
>   While the stack size was larger than the default stack size on i386, it
>   was smaller than the default stack size on amd64 and apparently that
>   wasn't enough.  So, bump the size to 4 pages.  Upcoming ZFSv28 code uses
>   8 pages for this stack size.
>  =20
>   This is a direct commit to stable/8.
>  =20
>   PR:		kern/154681
>   Discussed with:	pjd
>=20
> Modified:
>   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
>=20
> Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.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
> --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Mar=
 11 19:21:42 2011	(r219525)
> +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Mar=
 11 19:27:31 2011	(r219526)
> @@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp)
>  	 * 32-bit x86.  This is due in part to nested pools and
>  	 * scrub_visitbp() recursion.
>  	 */
> -	tx->tx_sync_thread =3D thread_create(NULL, 12<<10, txg_sync_thread,
> +	tx->tx_sync_thread =3D thread_create(NULL, 16<<10, txg_sync_thread,
>  	    dp, 0, &p0, TS_RUN, minclsyspri);
> =20
>  	mutex_exit(&tx->tx_sync_lock);
What about architectures where PAGE_SIZE !=3D 4096 ?
We have ptoa() macro.

--aaUKsgtkw/mqWK8Q
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk16fRYACgkQC3+MBN1Mb4gi7QCg0sJ2PyZ/Du7929rnHMao1uVl
Z1UAoKPEFlJlJDayywH0I0tkb2giKM7u
=9Efe
-----END PGP SIGNATURE-----

--aaUKsgtkw/mqWK8Q--

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 22:07:29 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3FA09106564A;
	Fri, 11 Mar 2011 22:07:29 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 237C08FC08;
	Fri, 11 Mar 2011 22:07:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BM7Tbq095199;
	Fri, 11 Mar 2011 22:07:29 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BM7T0l095195;
	Fri, 11 Mar 2011 22:07:29 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201103112207.p2BM7T0l095195@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 11 Mar 2011 22:07:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219539 - in stable/8: lib/libelf usr.sbin/ntp/doc
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 22:07:29 -0000

Author: uqs
Date: Fri Mar 11 22:07:28 2011
New Revision: 219539
URL: http://svn.freebsd.org/changeset/base/219539

Log:
  MFH r210933,219210: Typo fixes

Modified:
  stable/8/lib/libelf/elf_cntl.3
  stable/8/usr.sbin/ntp/doc/ntp.conf.5
  stable/8/usr.sbin/ntp/doc/ntpq.8
Directory Properties:
  stable/8/lib/libelf/   (props changed)
  stable/8/usr.sbin/ntp/   (props changed)

Modified: stable/8/lib/libelf/elf_cntl.3
==============================================================================
--- stable/8/lib/libelf/elf_cntl.3	Fri Mar 11 22:00:45 2011	(r219538)
+++ stable/8/lib/libelf/elf_cntl.3	Fri Mar 11 22:07:28 2011	(r219539)
@@ -75,7 +75,7 @@ archive, an ELF file, or other data file
 .Sh IMPLEMENTATION NOTES
 Due to use of
 .Xr mmap 2
-internally, this function is a no-op for for ELF objects opened in
+internally, this function is a no-op for ELF objects opened in
 .Dv ELF_C_READ
 mode.
 .Sh RETURN VALUES

Modified: stable/8/usr.sbin/ntp/doc/ntp.conf.5
==============================================================================
--- stable/8/usr.sbin/ntp/doc/ntp.conf.5	Fri Mar 11 22:00:45 2011	(r219538)
+++ stable/8/usr.sbin/ntp/doc/ntp.conf.5	Fri Mar 11 22:07:28 2011	(r219539)
@@ -317,7 +317,7 @@ the
 option to a lower limit of 4 (16 s).
 .It Cm noselect
 Marks the server as unused, except for display purposes.
-The server is discarded by the selection algroithm.
+The server is discarded by the selection algorithm.
 .It Cm prefer
 Marks the server as preferred.
 All other things being equal,
@@ -1368,7 +1368,7 @@ The
 daemon implements a general purpose address/mask based restriction
 list.
 The list contains address/match entries sorted first
-by increasing address values and and then by increasing mask values.
+by increasing address values and then by increasing mask values.
 A match occurs when the bitwise AND of the mask and the packet
 source address is equal to the bitwise AND of the mask and
 address in the list.
@@ -1405,9 +1405,9 @@ at abusive rates.
 Some violations cause denied service
 only for the offending packet, others cause denied service
 for a timed period and others cause the denied service for
-an indefinate period.
+an indefinite period.
 When a client or network is denied access
-for an indefinate period, the only way at present to remove
+for an indefinite period, the only way at present to remove
 the restrictions is by restarting the server.
 .Ss The Kiss-of-Death Packet
 Ordinarily, packets denied service are simply dropped with no

Modified: stable/8/usr.sbin/ntp/doc/ntpq.8
==============================================================================
--- stable/8/usr.sbin/ntp/doc/ntpq.8	Fri Mar 11 22:00:45 2011	(r219538)
+++ stable/8/usr.sbin/ntp/doc/ntpq.8	Fri Mar 11 22:07:28 2011	(r219539)
@@ -269,7 +269,7 @@ Exit
 .It Ic raw
 Causes all output from query commands is printed as received
 from the remote server.
-The only formating/interpretation done on
+The only formatting/interpretation done on
 the data is to transform nonascii data into a printable (but barely
 understandable) form.
 .It Ic timeout Ar milliseconds

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 23:08:13 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 50AC5106564A
	for ;
	Fri, 11 Mar 2011 23:08: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 8E1298FC0C
	for ;
	Fri, 11 Mar 2011 23:08:12 +0000 (UTC)
Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua
	[212.40.38.100])
	by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA17865;
	Sat, 12 Mar 2011 00:53:55 +0200 (EET) (envelope-from avg@freebsd.org)
Received: from localhost.topspin.kiev.ua ([127.0.0.1])
	by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
	id 1PyBDX-000JqL-1p; Sat, 12 Mar 2011 00:53:55 +0200
Message-ID: <4D7AA801.5050503@freebsd.org>
Date: Sat, 12 Mar 2011 00:53:53 +0200
From: Andriy Gapon 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.2.15) Gecko/20110308 Lightning/1.0b2 Thunderbird/3.1.9
MIME-Version: 1.0
To: Kostik Belousov 
References: <201103111927.p2BJRVu3091029@svn.freebsd.org>
	<20110311195046.GQ78089@deviant.kiev.zoral.com.ua>
In-Reply-To: <20110311195046.GQ78089@deviant.kiev.zoral.com.ua>
X-Enigmail-Version: 1.1.2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r219526 -
	stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 23:08:13 -0000

on 11/03/2011 21:50 Kostik Belousov said the following:
> On Fri, Mar 11, 2011 at 07:27:31PM +0000, Andriy Gapon wrote:
>> Author: avg
>> Date: Fri Mar 11 19:27:31 2011
>> New Revision: 219526
>> URL: http://svn.freebsd.org/changeset/base/219526
>>
>> Log:
>>   use even larger stack size for ZFS txg_sync_thread
>>   
>>   While the stack size was larger than the default stack size on i386, it
>>   was smaller than the default stack size on amd64 and apparently that
>>   wasn't enough.  So, bump the size to 4 pages.  Upcoming ZFSv28 code uses
>>   8 pages for this stack size.
>>   
>>   This is a direct commit to stable/8.
>>   
>>   PR:		kern/154681
>>   Discussed with:	pjd
>>
>> Modified:
>>   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
>>
>> Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
>> ==============================================================================
>> --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Mar 11 19:21:42 2011	(r219525)
>> +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Mar 11 19:27:31 2011	(r219526)
>> @@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp)
>>  	 * 32-bit x86.  This is due in part to nested pools and
>>  	 * scrub_visitbp() recursion.
>>  	 */
>> -	tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread,
>> +	tx->tx_sync_thread = thread_create(NULL, 16<<10, txg_sync_thread,
>>  	    dp, 0, &p0, TS_RUN, minclsyspri);
>>  
>>  	mutex_exit(&tx->tx_sync_lock);
> What about architectures where PAGE_SIZE != 4096 ?
> We have ptoa() macro.

I agree, but this is not the moment when the style that you comment on was
introduced.  So, it's better to review (and fix) the code in head.

-- 
Andriy Gapon

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 23:12:20 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CD35D1065673;
	Fri, 11 Mar 2011 23:12:20 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A126E8FC08;
	Fri, 11 Mar 2011 23:12:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BNCKdA097246;
	Fri, 11 Mar 2011 23:12:20 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BNCKe3097245;
	Fri, 11 Mar 2011 23:12:20 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201103112312.p2BNCKe3097245@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 11 Mar 2011 23:12:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219549 - in stable/8/share/examples: . etc kld/syscall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 23:12:20 -0000

Author: dougb
Date: Fri Mar 11 23:12:20 2011
New Revision: 219549
URL: http://svn.freebsd.org/changeset/base/219549

Log:
  Pull up mergeinfo from r209199,210482,212138,217826

Modified:
Directory Properties:
  stable/8/share/examples/   (props changed)
  stable/8/share/examples/etc/   (props changed)
  stable/8/share/examples/kld/syscall/   (props changed)

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 11 23:13:22 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EEF62106566C;
	Fri, 11 Mar 2011 23:13:22 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DCD388FC0A;
	Fri, 11 Mar 2011 23:13:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2BNDM7w097320;
	Fri, 11 Mar 2011 23:13:22 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2BNDMoR097317;
	Fri, 11 Mar 2011 23:13:22 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201103112313.p2BNDMoR097317@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 11 Mar 2011 23:13:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219550 - stable/8/share/examples/cvsup
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 11 Mar 2011 23:13:23 -0000

Author: dougb
Date: Fri Mar 11 23:13:22 2011
New Revision: 219550
URL: http://svn.freebsd.org/changeset/base/219550

Log:
  MFC r219353:
  
  mbone is no longer a physical category
  
  Submitted by:	pav

Modified:
  stable/8/share/examples/cvsup/cvs-supfile
  stable/8/share/examples/cvsup/ports-supfile
Directory Properties:
  stable/8/share/examples/   (props changed)

Modified: stable/8/share/examples/cvsup/cvs-supfile
==============================================================================
--- stable/8/share/examples/cvsup/cvs-supfile	Fri Mar 11 23:12:20 2011	(r219549)
+++ stable/8/share/examples/cvsup/cvs-supfile	Fri Mar 11 23:13:22 2011	(r219550)
@@ -140,7 +140,6 @@ ports-all
 #ports-lang
 #ports-mail
 #ports-math
-#ports-mbone
 #ports-misc
 #ports-multimedia
 #ports-net

Modified: stable/8/share/examples/cvsup/ports-supfile
==============================================================================
--- stable/8/share/examples/cvsup/ports-supfile	Fri Mar 11 23:12:20 2011	(r219549)
+++ stable/8/share/examples/cvsup/ports-supfile	Fri Mar 11 23:13:22 2011	(r219550)
@@ -104,7 +104,6 @@ ports-all
 #ports-lang
 #ports-mail
 #ports-math
-#ports-mbone
 #ports-misc
 #ports-multimedia
 #ports-net

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 12 14:57:11 2011
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1C189106566B;
	Sat, 12 Mar 2011 14:57:11 +0000 (UTC) (envelope-from osa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 09CC28FC13;
	Sat, 12 Mar 2011 14:57:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2CEvAUG022191;
	Sat, 12 Mar 2011 14:57:10 GMT (envelope-from osa@svn.freebsd.org)
Received: (from osa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2CEvAhK022184;
	Sat, 12 Mar 2011 14:57:10 GMT (envelope-from osa@svn.freebsd.org)
Message-Id: <201103121457.p2CEvAhK022184@svn.freebsd.org>
From: "Sergey A. Osokin" 
Date: Sat, 12 Mar 2011 14:57:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219569 - in stable/8/usr.bin/calendar: .
	calendars/ru_RU.KOI8-R
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 12 Mar 2011 14:57:11 -0000

Author: osa (ports committer)
Date: Sat Mar 12 14:57:10 2011
New Revision: 219569
URL: http://svn.freebsd.org/changeset/base/219569

Log:
  MFC r216697:
  
  Fix typo (Pashka -> Paskha).
  
  MFC r217025:
  
  Fix typo: March -> September.
  
  MFC r218471:
  
  Fix Paskha and Paskha-specific holidays.
  
  MFC r218473:
  
  Always convert Paskha day from Julian (old) to Gregorian (new)
  style by adding 13 days.  Bug introduced in 1.13 revision.
  
  MFC r218771:
  
  Fix the beginning day of the Great Lent, it starts on Monday
  for 7 weeks before Paskha.
  Fix the Exaltation of the Holy Cross day.
  Add more Twelve holidays (dvunadesyatye prazdniki).
  
  MFC r218797:
  
  Replace hard-coded value by Julian2Gregorian converter function.
  
  MFC r219174:
  
  Fix beginning day of the Carnival.
  
  MFC r219175:
  
  Expand the name of Palm Sunday holiday with more canonical Entry
  of the Lord into Jerusalem.
  Merge the Pentecost and Trinity Sunday holidays, they are synonyms.
  Remove Body of Christ day, nonexistent holiday for Orthodox Church.
  Fix typo in the name of Ioann The Baptist, introduced in previous
  commit.

Modified:
  stable/8/usr.bin/calendar/calendar.1
  stable/8/usr.bin/calendar/calendar.h
  stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox   (contents, props changed)
  stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan   (contents, props changed)
  stable/8/usr.bin/calendar/parsedata.c
  stable/8/usr.bin/calendar/paskha.c
Directory Properties:
  stable/8/usr.bin/calendar/   (props changed)

Modified: stable/8/usr.bin/calendar/calendar.1
==============================================================================
--- stable/8/usr.bin/calendar/calendar.1	Sat Mar 12 14:47:54 2011	(r219568)
+++ stable/8/usr.bin/calendar/calendar.1	Sat Mar 12 14:57:10 2011	(r219569)
@@ -128,7 +128,7 @@ The solar equinox in March.
 .It JunSolstice
 The solar solstice in June.
 .It SepEquinox
-The solar equinox in March.
+The solar equinox in September.
 .It DecSolstice
 The solar solstice in December.
 .It ChineseNewYear
@@ -155,7 +155,7 @@ The names of the recognized special days
 positive or negative integer, like:
 .Dq Easter+3
 or
-.Dq Pashka-4 .
+.Dq Paskha-4 .
 .Pp
 Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for
 last, first, second, third, fourth) for moving events like

Modified: stable/8/usr.bin/calendar/calendar.h
==============================================================================
--- stable/8/usr.bin/calendar/calendar.h	Sat Mar 12 14:47:54 2011	(r219568)
+++ stable/8/usr.bin/calendar/calendar.h	Sat Mar 12 14:57:10 2011	(r219569)
@@ -167,9 +167,10 @@ void	cal(void);
 void	closecal(FILE *);
 FILE	*opencal(void);
 
-/* ostern.c / pashka.c */
+/* ostern.c / paskha.c */
 int	paskha(int);
 int	easter(int);
+int	j2g(int);
 
 /* dates.c */
 extern int cumdaytab[][14];

Modified: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox
==============================================================================
--- stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox	Sat Mar 12 14:47:54 2011	(r219568)
+++ stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox	Sat Mar 12 14:57:10 2011	(r219569)
@@ -11,24 +11,26 @@ LANG=ru_RU.KOI8-R
 Paskha=ðÁÓÈÁ
 
 21 ÓÅÎ	òÏÖÄÅÓÔ×Ï ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
-28 ÓÅÎ	÷ÏÚÄ×ÉÖÅÎÉÅ ëÒÅÓÔÁ çÏÓÐÏÄÎÑ
+27 ÓÅÎ	÷ÏÚÄ×ÉÖÅÎÉÅ ëÒÅÓÔÁ çÏÓÐÏÄÎÑ
 14 ÏËÔ	ðÏËÒÏ× ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
  4 ÄÅË	÷×ÅÄÅÎÉÅ ×Ï ÈÒÁÍ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
  7 ÑÎ×	òÏÖÄÅÓÔ×Ï èÒÉÓÔÏ×Ï
+14 ÑÎ×	ïÂÒÅÚÁÎÉÅ çÏÓÐÏÄÎÅ
 19 ÑÎ×	âÏÇÏÑ×ÌÅÎÉÅ ÉÌÉ ëÒÅÝÅÎÉÅ çÏÓÐÏÄÎÅ
 15 ÆÅ×	óÒÅÔÅÎÉÅ çÏÓÐÏÄÎÅ
-ðÁÓÈÁ-46	÷ÅÌÉËÉÊ ðÏÓÔ
-ðÁÓÈÁ-7	÷ÅÒÂÎÏÅ ÷ÏÓËÒÅÓÅÎØÅ
+ðÁÓÈÁ-48	÷ÅÌÉËÉÊ ðÏÓÔ
+ðÁÓÈÁ-7	÷ÈÏÄ çÏÓÐÏÄÅÎØ × éÅÒÕÓÁÌÉÍ. ÷ÅÒÂÎÏÅ ÷ÏÓËÒÅÓÅÎØÅ
 ðÁÓÈÁ-3	÷ÅÌÉËÉÊ þÅÔ×ÅÒÇ
 ðÁÓÈÁ-2	óÔÒÁÓÔÎÁÑ ðÑÔÎÉÃÁ
 ðÁÓÈÁ	÷ÏÓËÒÅÓÅÎÉÅ èÒÉÓÔÏ×Ï
 ðÁÓÈÁ+39	÷ÏÚÎÅÓÅÎÉÅ
-ðÁÓÈÁ+49	ðÑÔÉÄÅÓÑÔÎÉÃÁ
-ðÁÓÈÁ+56	ôÒÏÉÃÉÎ äÅÎØ
-ðÁÓÈÁ+60	ðÒÁÚÄÎÉË ôÅÌÁ èÒÉÓÔÏ×Á
+ðÁÓÈÁ+49	äÅÎØ ó×ÑÔÏÊ ôÒÏÉÃÙ. ðÑÔÉÄÅÓÑÔÎÉÃÁ
  7 ÁÐÒ	âÌÁÇÏ×ÅÝÅÎÉÅ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
+ 7 ÉÀÌ	òÏÖÄÅÓÔ×Ï éÏÁÎÎÁ ðÒÅÄÔÅÞÉ
+12 ÉÀÌ	äÅÎØ Ó×ÑÔÙÈ ÐÅÒ×Ï×ÅÒÈÏ×ÎÙÈ ÁÐÏÓÔÏÌÏ× ðÅÔÒÁ É ðÁ×ÌÁ
 19 Á×Ç	ðÒÅÏÂÒÁÖÅÎÉÅ çÏÓÐÏÄÎÅ
 28 Á×Ç	õÓÐÅÎÉÅ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
+11 ÓÅÎ	õÓÅËÎÏ×ÅÎÉÅ ÇÌÁ×Ù éÏÁÎÎÁ ðÒÅÄÔÅÞÉ
 
 #endif /* !_ru_RU_KOI8_R_orthodox_ */
 

Modified: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan
==============================================================================
--- stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan	Sat Mar 12 14:47:54 2011	(r219568)
+++ stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan	Sat Mar 12 14:57:10 2011	(r219569)
@@ -17,7 +17,7 @@ Paskha=ðÁÓÈÁ
 29 ÆÅ×	äÅÎØ ëÁÝÅÑ
  1 ÍÁÒ	äÅÎØ íÁÒÅÎÙ
 14 ÍÁÒ	îÏ×ÙÊ çÏÄ, ï×ÓÅÎØ ÍÁÌÙÊ
-ðÁÓÈÁ-47	íÁÓÌÅÎÉÃÁ
+ðÁÓÈÁ-55	íÁÓÌÅÎÉÃÁ
 ðÁÓÈÁ+7	ëÒÁÓÎÁÑ çÏÒËÁ
 ðÁÓÈÁ+16	òÁÄÕÎÉÃÁ
 20 ÍÁÒ*	÷ÅÓÅÎÎÉÅ ÒÁ×ÎÏÄÅÎÓÔ×ÉÅ

Modified: stable/8/usr.bin/calendar/parsedata.c
==============================================================================
--- stable/8/usr.bin/calendar/parsedata.c	Sat Mar 12 14:47:54 2011	(r219568)
+++ stable/8/usr.bin/calendar/parsedata.c	Sat Mar 12 14:57:10 2011	(r219569)
@@ -80,7 +80,7 @@ static char *floattotime(double f);
  * ModifierIndex	::=	'Second' | 'Third' | 'Fourth' | 'Fifth' |
  *				'First' | 'Last'
  * 
- * SpecialDay		::=	'Easter' | 'Pashka' | 'ChineseNewYear'
+ * SpecialDay		::=	'Easter' | 'Paskha' | 'ChineseNewYear'
  *
  */
 static int
@@ -459,6 +459,7 @@ parsedaymonth(char *date, int *yearp, in
 
 			yearinfo->mondays = mondaytab[isleap(year)];
 			yearinfo->ieaster = easter(year);
+			yearinfo->ipaskha = paskha(year);
 			fpom(year, UTCOffset, yearinfo->ffullmoon,
 			    yearinfo->fnewmoon);
 			fpom(year, UTCOFFSET_CNY, yearinfo->ffullmooncny,

Modified: stable/8/usr.bin/calendar/paskha.c
==============================================================================
--- stable/8/usr.bin/calendar/paskha.c	Sat Mar 12 14:47:54 2011	(r219568)
+++ stable/8/usr.bin/calendar/paskha.c	Sat Mar 12 14:57:10 2011	(r219569)
@@ -36,8 +36,17 @@ __FBSDID("$FreeBSD$");
 #define	PASKHA		"paskha"
 #define	PASKHALEN	(sizeof(PASKHA) - 1)
 
+/* return difference in days between Julian and Gregorian calendars */
+int
+j2g(int year)
+{
+	return (year < 1500) ?
+		0 :
+		10 + (year/100 - 16) - ((year/100 - 16) / 4);
+}
+
 /* return year day for Orthodox Easter using Gauss formula */
-/* (old style result) */
+/* (new style result) */
 
 int
 paskha(int R) /*year*/
@@ -53,5 +62,5 @@ paskha(int R) /*year*/
 	d = (19 * a + x) % 30;
 	e = (2 * b + 4 * c + 6 * d + y) % 7;
 	cumday = cumdaytab[isleap(R)];
-	return (((cumday[3] + 1) + 22) + (d + e));
+	return (((cumday[3] + 1) + 22) + (d + e) + j2g(R));
 }