From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 00:08:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09001CD1; Sun, 8 Dec 2013 00:08:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E994D134F; Sun, 8 Dec 2013 00:08:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB808333091178; Sun, 8 Dec 2013 00:08:03 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8083FA091175; Sun, 8 Dec 2013 00:08:03 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312080008.rB8083FA091175@svn.freebsd.org> From: Peter Wemm Date: Sun, 8 Dec 2013 00:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259088 - in head/contrib/nvi: cl common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 00:08:04 -0000 Author: peter Date: Sun Dec 8 00:08:03 2013 New Revision: 259088 URL: http://svnweb.freebsd.org/changeset/base/259088 Log: Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix PR: bin/182463 Modified: head/contrib/nvi/cl/cl_term.c head/contrib/nvi/common/key.c head/contrib/nvi/common/key.h Directory Properties: head/contrib/nvi/ (props changed) Modified: head/contrib/nvi/cl/cl_term.c ============================================================================== --- head/contrib/nvi/cl/cl_term.c Sun Dec 8 00:05:31 2013 (r259087) +++ head/contrib/nvi/cl/cl_term.c Sun Dec 8 00:08:03 2013 (r259088) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: cl_term.c,v 10.33 2012/04/21 23:51:46 zy Exp $"; +static const char sccsid[] = "$Id: cl_term.c,v 10.34 2013/12/07 16:21:14 wjenkner Exp $"; #endif /* not lint */ #include @@ -187,14 +187,18 @@ cl_term_init(SCR *sp) int cl_term_end(GS *gp) { - SEQ *qp, *nqp; + SEQ *qp, *nqp, *pre_qp = NULL; /* Delete screen specific mappings. */ SLIST_FOREACH_SAFE(qp, gp->seqq, q, nqp) if (F_ISSET(qp, SEQ_SCREEN)) { - SLIST_REMOVE_HEAD(gp->seqq, q); + if (qp == SLIST_FIRST(gp->seqq)) + SLIST_REMOVE_HEAD(gp->seqq, q); + else + SLIST_REMOVE_AFTER(pre_qp, q); (void)seq_free(qp); - } + } else + pre_qp = qp; return (0); } Modified: head/contrib/nvi/common/key.c ============================================================================== --- head/contrib/nvi/common/key.c Sun Dec 8 00:05:31 2013 (r259087) +++ head/contrib/nvi/common/key.c Sun Dec 8 00:08:03 2013 (r259088) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: key.c,v 10.53 2013/03/11 01:20:53 yamt Exp $"; +static const char sccsid[] = "$Id: key.c,v 10.54 2013/11/13 12:15:27 zy Exp $"; #endif /* not lint */ #include @@ -272,7 +272,7 @@ v_key_name( * The code prints non-printable wide characters in 4 or 5 digits * Unicode escape sequences, so only supports plane 0 to 15. */ - if (ISPRINT(ach)) + if (CAN_PRINT(sp, ach)) goto done; nopr: if (iscntrl(ch) && (ch < 0x20 || ch == 0x7f)) { sp->cname[0] = '^'; Modified: head/contrib/nvi/common/key.h ============================================================================== --- head/contrib/nvi/common/key.h Sun Dec 8 00:05:31 2013 (r259087) +++ head/contrib/nvi/common/key.h Sun Dec 8 00:08:03 2013 (r259088) @@ -6,7 +6,7 @@ * * See the LICENSE file for redistribution information. * - * $Id: key.h,v 10.55 2012/10/07 01:31:17 zy Exp $ + * $Id: key.h,v 10.56 2013/11/13 12:15:27 zy Exp $ */ #include "multibyte.h" @@ -23,8 +23,9 @@ #define INPUT2INT5(sp,cw,n,nlen,w,wlen) \ sp->conv.input2int(sp, n, nlen, &(cw), &wlen, &w) #define CONST +#define INTISWIDE(c) (wctob(c) == EOF) #define CHAR_WIDTH(sp, ch) wcwidth(ch) -#define INTISWIDE(c) (wctob(c) == EOF) +#define CAN_PRINT(sp, ch) (CHAR_WIDTH(sp, ch) > 0) #else #define FILE2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) @@ -36,9 +37,10 @@ (n = w, nlen = wlen, 0) #define INPUT2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) -#define CONST const -#define INTISWIDE(c) 0 +#define CONST const +#define INTISWIDE(c) 0 #define CHAR_WIDTH(sp, ch) 1 +#define CAN_PRINT(sp, ch) isprint(ch) #endif #define FILE2INT(sp,n,nlen,w,wlen) \ FILE2INT5(sp,sp->cw,n,nlen,w,wlen) From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 00:10:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09BCEE7D for ; Sun, 8 Dec 2013 00:10:25 +0000 (UTC) Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91F451368 for ; Sun, 8 Dec 2013 00:10:24 +0000 (UTC) Received: by mail-ee0-f41.google.com with SMTP id t10so924748eei.28 for ; Sat, 07 Dec 2013 16:10:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:from:date:to:cc :message-id; bh=gv/01Rl02xcC9MOIR7yuUYIA13GpHdk2AGPInEXybBA=; b=GUDWcGeKVjtJCj84qfgZxxQ8dm5SojSCidAnQw1jmc4dLyAR9/oO1a86zNArN5MLoC 8MtFM1BB+DMEa0sV7dIEYgpC7Y9oaICP4yNR7A3S8vvsdkumZn+phgBGvnH/Nr6LSDKS F64GMOi0qLjixvXCYg1TEenkNQulKj5U/nGla4kxjoPAq4IqsrgDHoBXiBdhZmfxgJt/ Uu8h4vfxLJpZERVOPe0KvSpspIaaFi2sAsKx/yTNKxwJZn81fkw0RYneei9iwy34E066 EBebTSGVgSBMoiOl/ex3dIYhmXO+xwD2BfwlnSLSARqTBHN5OZdukY8pEGKuzgQrBgqO rO3Q== X-Gm-Message-State: ALoCoQl6EsCaMunCU80SVvQ3txM4dvORpqhUb0HjNTqN0iCnkGLHJoEw11eEKAKLAhr/c9WI3Ul1 X-Received: by 10.15.45.135 with SMTP id b7mr1138970eew.88.1386461417313; Sat, 07 Dec 2013 16:10:17 -0800 (PST) Received: from [100.80.225.11] ([37.73.230.125]) by mx.google.com with ESMTPSA id g47sm11491277eeo.19.2013.12.07.16.10.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 07 Dec 2013 16:10:16 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <20131207153150.GN59496@kib.kiev.ua> References: <201312071524.rB7FOhWn008164@svn.freebsd.org> <20131207153150.GN59496@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: svn commit: r259071 - head/sys/conf From: Aleksandr Rybalko Date: Sun, 08 Dec 2013 02:10:02 +0200 To: Konstantin Belousov , Aleksandr Rybalko Message-ID: <357833a7-3088-4013-9376-89dfa9ca90fb@email.android.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 00:10:25 -0000 Konstantin Belousov написав(ла): >On Sat, Dec 07, 2013 at 03:24:43PM +0000, Aleksandr Rybalko wrote: >> Author: ray >> Date: Sat Dec 7 15:24:43 2013 >> New Revision: 259071 >> URL: http://svnweb.freebsd.org/changeset/base/259071 >> >> Log: >> Include dev/fb/fb_if.m in build always, without it kms modules >complain about >> lack of fb_getinfo_desc symbol. >> >> Submitted by: dumbbell >> >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/sys/conf/files >> >> Modified: head/sys/conf/files >> >============================================================================== >> --- head/sys/conf/files Sat Dec 7 13:11:50 2013 (r259070) >> +++ head/sys/conf/files Sat Dec 7 15:24:43 2013 (r259071) >> @@ -1397,7 +1397,7 @@ dev/ex/if_ex_pccard.c optional ex pccar >> dev/exca/exca.c optional cbb >> dev/fatm/if_fatm.c optional fatm pci >> dev/fb/fbd.c optional fbd | vt >> -dev/fb/fb_if.m optional fbd | vt >> +dev/fb/fb_if.m standard >> dev/fb/splash.c optional splash >> dev/fdt/fdt_common.c optional fdt >> dev/fdt/fdt_ic_if.m optional fdt > >As a tangentially related, I noted that logo_freebsd.c is compiled >in unconditional. Is it required, can it be made an option ? > >Also, is it possible to make the mouse cursor an option, same as it >was in syscons with SC_NO_CUTPASTE ? Hi Konstantin, Yeah, no problem for both questions. Working on that. Thanks a lot! WBW ------ Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 00:26:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06866EF for ; Sun, 8 Dec 2013 00:26:24 +0000 (UTC) Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com [209.85.215.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C3AB144E for ; Sun, 8 Dec 2013 00:26:23 +0000 (UTC) Received: by mail-ea0-f180.google.com with SMTP id f15so912671eak.25 for ; Sat, 07 Dec 2013 16:26:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:from:date:to :message-id; bh=Z0kvPdw/s3qtO35txmYg2aXdrBrSkSvinpcPkJqZJMs=; b=NcBTPOHlF7lq8Gmv5zhzekxfpDqYSY9ajmhmrZ493/D33lAgj8qIh3XABNkB84N355 Cn6Dlx6rfr+roiowy+76vtucd0fmNfLupo12ZP216qS3LdJShX9aGUdYAlsTLhDefk01 CPylqsRcpvluODpvmEW16M+EbrFdSqaKY6ijlYUQqS6fuzmaVvWaHRKXOxukT0QngbAI 68jw6fDuEbd1bpechX9+LDj2OKixK0XEp6b2cK9pBEkCTMpxQCIpttpICUCM1d7aGkQz IN4E10dIiGEya+Rij9jEgLnvtaJCYKCURLZtBq2X/1S67YsSTKoav1vvzpbKdlE1l+Wd G5pg== X-Gm-Message-State: ALoCoQlYYuAkKAIa2l0QWLaK3lvhQC+n00YGJ9XRoqNXHSkdpaI//pERknldmxdJYyPMWzeqZTBP X-Received: by 10.15.108.73 with SMTP id cc49mr1126880eeb.93.1386460872424; Sat, 07 Dec 2013 16:01:12 -0800 (PST) Received: from [100.80.225.11] ([37.73.230.125]) by mx.google.com with ESMTPSA id v1sm11465236eef.9.2013.12.07.16.01.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 07 Dec 2013 16:01:11 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <52A3A8DE.9090907@FreeBSD.org> References: <201312052238.rB5McsVN020719@svn.freebsd.org> <52A3A8DE.9090907@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken From: Aleksandr Rybalko Date: Sun, 08 Dec 2013 01:59:54 +0200 To: Andreas Tobler , Aleksandr Rybalko , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-ID: <2a683b40-1465-44f9-a9aa-d079f660529d@email.android.com> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 00:26:24 -0000 Andreas Tobler написав(ла): >On 05.12.13 23:38, Aleksandr Rybalko wrote: >> Author: ray >> Date: Thu Dec 5 22:38:53 2013 >> New Revision: 259016 >> URL: http://svnweb.freebsd.org/changeset/base/259016 >> >> Log: >> Merge VT(9) project (a.k.a. newcons). >> >> Reviewed by: nwhitehorn >> MFC_to_10_after: re approval >> >> Sponsored by: The FreeBSD Foundation > >Great! Thanks, gives a new look & feel on the console :) >Have it running on amd64/i386 and PowerMac(32/64-bit). >The only thing I need to figure is the mapping of the AltGr or in Mac >world, the alt key mapping. Iow, the third level mapping of the keys. >e.g. the @ here is on altgr-2... > >Again, thanks! >Andreas Hello Andreas, I'm glad to fix that, but I've to understand how it is should work :-) Thanks! WBW ------ Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 00:59:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F066B6; Sun, 8 Dec 2013 00:59:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E5C115B9; Sun, 8 Dec 2013 00:59:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB80x5YF008669; Sun, 8 Dec 2013 00:59:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB80x50a008668; Sun, 8 Dec 2013 00:59:05 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201312080059.rB80x50a008668@svn.freebsd.org> From: Rick Macklem Date: Sun, 8 Dec 2013 00:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259089 - head/sbin/mount_nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 00:59:05 -0000 Author: rmacklem Date: Sun Dec 8 00:59:04 2013 New Revision: 259089 URL: http://svnweb.freebsd.org/changeset/base/259089 Log: Document the noncontigwr NFS mount option. This is a content change. MFC after: 3 weeks Modified: head/sbin/mount_nfs/mount_nfs.8 Modified: head/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- head/sbin/mount_nfs/mount_nfs.8 Sun Dec 8 00:08:03 2013 (r259088) +++ head/sbin/mount_nfs/mount_nfs.8 Sun Dec 8 00:59:04 2013 (r259089) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd July 8, 2013 +.Dd December 7, 2013 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -257,6 +257,19 @@ servers on the client. Note that this option will only be honored when performing the initial mount, it will be silently ignored if used while updating the mount options. +.It Cm noncontigwr +This mount option allows the NFS client to +combine non-contiguous byte ranges being written +such that the dirty byte range becomes a superset of the bytes +that are dirty. +This reduces the number of writes significantly for software +builds. +The merging of byte ranges isn't done if the file has been file +locked, since most applications modifying a file from multiple +clients will use file locking. +As such, this option could result in a corrupted file for the +rare case of an application modifying the file from multiple +clients concurrently without using file locking. .It Cm principal For the RPCSEC_GSS security flavors, such as krb5, krb5i and krb5p, this option sets the name of the host based principal name expected From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 02:54:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84B50611; Sun, 8 Dec 2013 02:54:05 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 312B71AC2; Sun, 8 Dec 2013 02:54:04 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id EB8141A5541; Sun, 8 Dec 2013 13:53:55 +1100 (EST) Date: Sun, 8 Dec 2013 13:53:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits Subject: Re: svn commit: r259080 - in head/sys: dev/iicbus geom/cache geom/journal In-Reply-To: <201312071955.rB7JtYNH001792@svn.freebsd.org> Message-ID: <20131208123144.U883@besplex.bde.org> References: <201312071955.rB7JtYNH001792@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=3HaF-T8NxwoA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=ssdoF7uQumEA:10 a=-y4LA6a5D9EZghm1e9kA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 02:54:05 -0000 On Sat, 7 Dec 2013, Justin Hibbits wrote: > Log: > Fix some integer signs. These unsigned integers should all be signed. > > Found by: clang (powerpc64) Unsigned integers are indeed used excessively. They should only be used if values larger than INT_MAX need to be represented, but values larger than UINT_MAX need not be represented. This is a very small target (just 1 more bit). > Modified: head/sys/dev/iicbus/max6690.c > ============================================================================== > --- head/sys/dev/iicbus/max6690.c Sat Dec 7 19:39:38 2013 (r259079) > +++ head/sys/dev/iicbus/max6690.c Sat Dec 7 19:55:34 2013 (r259080) > @@ -362,7 +362,7 @@ max6690_sensor_sysctl(SYSCTL_HANDLER_ARG > struct max6690_softc *sc; > struct max6690_sensor *sens; > int error; > - unsigned int temp; > + int temp; > > dev = arg1; > sc = device_get_softc(dev); > This fixes one style bug (non-use of the BSD spelling u_int) but adds another (int declarations not grouped together). > Modified: head/sys/geom/cache/g_cache.c > ============================================================================== > --- head/sys/geom/cache/g_cache.c Sat Dec 7 19:39:38 2013 (r259079) > +++ head/sys/geom/cache/g_cache.c Sat Dec 7 19:55:34 2013 (r259080) > @@ -67,7 +67,7 @@ static u_int g_cache_used_hi = 20; > static int > sysctl_handle_pct(SYSCTL_HANDLER_ARGS) > { > - u_int val = *(u_int *)arg1; > + int val; > int error; > > error = sysctl_handle_int(oidp, &val, 0, req); > This adds the larger non-style bug that val is used uninitialized. Compilers should warn about this. This results in stack garbage being copied out instead of the "old" value. sysctl_handle_u_int() doesn't exist, so sysctl_handle_int() os often abused to handle u_int's and worse (sometimes "opaque" types, where it usually works accidentally if the type is 32 bits, and sometimes even works accidentally if the type is larger). clang seems to be complaining about this abuse. Why does it only complain here? Ah, maybe it is not smart enough to complain about this, but is just complaining about the (val < 0) range check. This adds 2 (lexical) style bugs: - the int declarations are not grouped together This misses fixing nearby bogus unsigned variables. The cast for these is more bogus than before. Indeed, the whole function is horrible, and this change is sort of backwards since it gives a sign mismatch with the underlying variables: % static u_int g_cache_used_lo = 5; % static u_int g_cache_used_hi = 20; Example of excessive use of unsigned types. These variables only need to handle percentages between 0 and 100. % static int Style bug (missing blank line); % sysctl_handle_pct(SYSCTL_HANDLER_ARGS) % { % u_int val = *(u_int *)arg1; This is the old version. It has another style bug (initialization in declaration). The initialization wouldn't have been lost so easily if it had been in the correct place. But the type was correct, since it is bug-for-bug constent with the underlying variables. % int error; % % error = sysctl_handle_int(oidp, &val, 0, req); sysctl_handle_int() was abused to handle the u_int (arg1 points to one of the above 2 variables). % if (error || !req->newptr) % return (error); 2 style bugs (2 boolean comparisions of non-booleans). Strict KNF doesn't even use the ! operator to test booleansl; it uses an explicit " == 0" test for this, though it sometimes doesn't write out "!= 0" for the reverse test. % if (val < 0 || val > 100) % return (EINVAL); The first test in this is redundant, This is apparently what clang was complaining about. The warning for that can be fixed by removing the test. However, I don't like this fix. It depends on the type being unsigned. The code becomes more fragile, and would break if the type were changed to the correct one (signed). % if ((arg1 == &g_cache_used_lo && val > g_cache_used_hi) || % (arg1 == &g_cache_used_hi && g_cache_used_lo > val)) % return (EINVAL); % *(u_int *)arg1 = val; There are only 2 variables handled by this function, so we use arg1 to set the correct one. However, the previous statement has decided which of the variables is being set, and we could use that to set it. Or better, convert arg1 from void * to u_int * up front, and use that throughout instead of several casts of arg1. % return (0); % } % SYSCTL_PROC(_kern_geom_cache, OID_AUTO, used_lo, CTLTYPE_UINT|CTLFLAG_RW, Style bugs: - missing blank line. This is intentional for grouping the function with its variables, as above, but still ugly. - missing spaces around binary operator '|'. This bug is too common for this operator, and for CTLFLAG*. But the spaces are even more needed for '|' than for '+' or '*', since '|' looks more like an alphanumeric character. % &g_cache_used_lo, 0, sysctl_handle_pct, "IU", ""); % SYSCTL_PROC(_kern_geom_cache, OID_AUTO, used_hi, CTLTYPE_UINT|CTLFLAG_RW, % &g_cache_used_hi, 0, sysctl_handle_pct, "IU", ""); Style bugs: - non-KNF continuation indent. This bug is too common for SYSCTL*(), although someone once did a fairly global sweep to fix it for them. - no description. This sysctl is over-engineered. A simple SYSCTL_UINT() is enough. There are many more-critical sysctls that don't have any range checking. The fix is not to bloat the kernel by adding range checking to them all. With several thousand sysctls, the range checking code could easily be over-engineered enough to double the size of an already massively bloated kernel. OTOH, there may still be runtime errors from sloppy caclulations using the percentage variables. The calculations are of the form (x * pct / 100) and not the more robust but fuzzier (x / 100 * pct). pct will normally be promoted to the type of x in these expressions (often to 64 bits, and then overflow is far off). Overflow is only affected by pct being unsigned if x is int or shorter. > Modified: head/sys/geom/journal/g_journal.c > ============================================================================== > --- head/sys/geom/journal/g_journal.c Sat Dec 7 19:39:38 2013 (r259079) > +++ head/sys/geom/journal/g_journal.c Sat Dec 7 19:55:34 2013 (r259080) > @@ -168,7 +168,7 @@ SYSCTL_UINT(_kern_geom_journal_cache, OI > static int > g_journal_cache_switch_sysctl(SYSCTL_HANDLER_ARGS) > { > - u_int cswitch; > + int cswitch; > int error; > > cswitch = g_journal_cache_switch; > 2 style bugs (int variables not grouped; int variables not sorted). This sysctl is missing most of the style bugs discussed above: - the transfer variable cswitch is not initialized in its declaration. Its initialization didn't get deleted. - the comparisons of the non-booleans are non-boolean. - the percentage variable is used in the robust way (x / 100 * pct). - the SYSCTL()s use KNF continuation indentation - there are spaces around the binary operator '|' - the SYSCTL()s have descriptions. This leaves mainly type errors (excessive use of unsigned variables). There is a different inconsistency: the u_int g_journal_cache_switch has formatting data "I" instead of "IU". Both will work due to the range checking and assumptions that the machine is not exotic, but there is no reason to not to use a consistent format. Another common style bug/API design error visible here is using sysctl_handle_int() on generic variables. You have to know that the variable type is int to use it or u_int, int32_t or uint32_t to abuse it. The width of the variable is in the sysctl data and is usually correct. sysctl_handle_opaque() is usable on generic variables but doesn't work so well (it prevents type checking and has more locking overheads). When sysctl_handle_int() is used, the width in the sysctl data should be used to detect size mismatches. It is used, but there are bugs in the error handling for this (something like ignoring size mismatches for short i/o's in only 1 direction). Bruce From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 03:02:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03C20934; Sun, 8 Dec 2013 03:02:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E3C8D1CB8; Sun, 8 Dec 2013 03:02:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB832j9g055783; Sun, 8 Dec 2013 03:02:45 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB832iiM055772; Sun, 8 Dec 2013 03:02:44 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312080302.rB832iiM055772@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 8 Dec 2013 03:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259092 - in head/contrib/gcc: . cp doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 03:02:46 -0000 Author: pfg Date: Sun Dec 8 03:02:44 2013 New Revision: 259092 URL: http://svnweb.freebsd.org/changeset/base/259092 Log: gcc: new fvisibility-ms-compat option Obtained from: gcc 4.3 (rev. 126088; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/c.opt head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/decl.c head/contrib/gcc/cp/decl2.c head/contrib/gcc/doc/invoke.texi Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Sun Dec 8 02:48:10 2013 (r259091) +++ head/contrib/gcc/ChangeLog.gcc43 Sun Dec 8 03:02:44 2013 (r259092) @@ -45,6 +45,12 @@ * flags.h (force_align_functions_log): Delete. * toplev.c (force_align_functions_log): Delete. +2007-06-28 Geoffrey Keating (r126088) + + * doc/invoke.texi (C++ Dialect Options): Document + fvisibility-ms-compat. + * c.opt (fvisibility-ms-compat): New. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 Modified: head/contrib/gcc/c.opt ============================================================================== --- head/contrib/gcc/c.opt Sun Dec 8 02:48:10 2013 (r259091) +++ head/contrib/gcc/c.opt Sun Dec 8 03:02:44 2013 (r259092) @@ -741,6 +741,10 @@ fvisibility-inlines-hidden C++ ObjC++ Marks all inlined methods as having hidden visibility +fvisibility-ms-compat +C++ ObjC++ Var(flag_visibility_ms_compat) +Changes visibility to match Microsoft Visual Studio by default + fvtable-gc C++ ObjC++ Discard unused virtual functions Modified: head/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/cp/ChangeLog.gcc43 Sun Dec 8 02:48:10 2013 (r259091) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Sun Dec 8 03:02:44 2013 (r259092) @@ -7,6 +7,13 @@ * typeck.c (cxx_alignof_expr): When alignof is used on a plain FUNCTION_DECL, return its alignment. +2007-06-28 Geoffrey Keating (r126088) + + * decl2.c (determine_visibility): Implement + flag_visibility_ms_compat effect on type info. + * decl.c (cxx_init_decl_processing): Implement + global effect of flag_visibility_ms_compat. + 2007-06-28 Geoffrey Keating (r126080) * decl2.c (start_objects): Mark constructor-runnning function Modified: head/contrib/gcc/cp/decl.c ============================================================================== --- head/contrib/gcc/cp/decl.c Sun Dec 8 02:48:10 2013 (r259091) +++ head/contrib/gcc/cp/decl.c Sun Dec 8 03:02:44 2013 (r259092) @@ -3157,6 +3157,9 @@ cxx_init_decl_processing (void) } if (flag_inline_functions) flag_inline_trees = 2; + + if (flag_visibility_ms_compat) + default_visibility = VISIBILITY_HIDDEN; /* Initially, C. */ current_lang_name = lang_name_c; Modified: head/contrib/gcc/cp/decl2.c ============================================================================== --- head/contrib/gcc/cp/decl2.c Sun Dec 8 02:48:10 2013 (r259091) +++ head/contrib/gcc/cp/decl2.c Sun Dec 8 03:02:44 2013 (r259092) @@ -1726,6 +1726,19 @@ determine_visibility (tree decl) but have no TEMPLATE_INFO, so don't try to check it. */ use_template = 0; } + else if (TREE_CODE (decl) == VAR_DECL && DECL_TINFO_P (decl) + && flag_visibility_ms_compat) + { + /* Under -fvisibility-ms-compat, types are visible by default, + even though their contents aren't. */ + tree underlying_type = TREE_TYPE (DECL_NAME (decl)); + int underlying_vis = type_visibility (underlying_type); + if (underlying_vis == VISIBILITY_ANON + || CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type)) + constrain_visibility (decl, underlying_vis); + else + DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT; + } else if (TREE_CODE (decl) == VAR_DECL && DECL_TINFO_P (decl)) { /* tinfo visibility is based on the type it's for. */ Modified: head/contrib/gcc/doc/invoke.texi ============================================================================== --- head/contrib/gcc/doc/invoke.texi Sun Dec 8 02:48:10 2013 (r259091) +++ head/contrib/gcc/doc/invoke.texi Sun Dec 8 03:02:44 2013 (r259092) @@ -186,6 +186,7 @@ in the following sections. -frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol -fno-default-inline -fvisibility-inlines-hidden @gol +-fvisibility-ms-compat @gol -Wabi -Wctor-dtor-privacy @gol -Wnon-virtual-dtor -Wreorder @gol -Weffc++ -Wno-deprecated -Wstrict-null-sentinel @gol @@ -1626,6 +1627,40 @@ Explicitly instantiated inline methods a as their linkage might otherwise cross a shared library boundary. @xref{Template Instantiation}. +@item -fvisibility-ms-compat +@opindex fvisibility-ms-compat +This flag attempts to use visibility settings to make GCC's C++ +linkage model compatible with that of Microsoft Visual Studio. + +The flag makes these changes to GCC's linkage model: + +@enumerate +@item +It sets the default visibility to @code{hidden}, like +@option{-fvisibility=hidden}. + +@item +Types, but not their members, are not hidden by default. + +@item +The One Definition Rule is relaxed for types without explicit +visibility specifications which are defined in more than one different +shared object: those declarations are permitted if they would have +been permitted when this option was not used. +@end enumerate + +In new code it is better to use @option{-fvisibility=hidden} and +export those classes which are intended to be externally visible. +Unfortunately it is possible for code to rely, perhaps accidentally, +on the Visual Studio behaviour. + +Among the consequences of these changes are that static data members +of the same type with the same name but defined in different shared +objects will be different, so changing one will not change the other; +and that pointers to function members defined in different shared +objects may not compare equal. When this flag is given, it is a +violation of the ODR to define types with the same name differently. + @item -fno-weak @opindex fno-weak Do not use weak symbol support, even if it is provided by the linker. From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 05:39:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BEE4B16; Sun, 8 Dec 2013 05:39:55 +0000 (UTC) Received: from mail-bk0-x234.google.com (mail-bk0-x234.google.com [IPv6:2a00:1450:4008:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E8241361; Sun, 8 Dec 2013 05:39:54 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id u14so877947bkz.25 for ; Sat, 07 Dec 2013 21:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=yiOH7KYEwFjHH+2LQIQO6j1IjErubz4pkQZNc5H985o=; b=YfufWuq8fwaBHa63BDH2lzBIp40CMFTaVLkaj1StaK5IqJMCoMrDhfYcswlNFlrmU6 kXTrHSK8d1ZLvFpkEh25XDoxffcIBiV9b8TlMeRoxJvucOnPJYNFg1E+iQvQH11oJxqv sicqfle0I7tfenU8jffaAGJSkfqpK+pZ90EufVbI0bFVsFI3NcDY35fV3EUKjdrJQdP0 2qsVeRLB5SOL//VUDqvY4Kwr3yvgK/tYDWPjUyJ84TT5I7F6u/oAEaBB7sTCnh3JNHCW rLOo6PvITeAcrAWhNZE+/d2xp8bgpk+0K1fAZxMk8Tjc+oIxWweJUZDqyaWZywrwYtYe nECw== MIME-Version: 1.0 X-Received: by 10.204.26.69 with SMTP id d5mr1185959bkc.47.1386481192380; Sat, 07 Dec 2013 21:39:52 -0800 (PST) Sender: chmeeedalf@gmail.com Received: by 10.205.90.136 with HTTP; Sat, 7 Dec 2013 21:39:52 -0800 (PST) Received: by 10.205.90.136 with HTTP; Sat, 7 Dec 2013 21:39:52 -0800 (PST) In-Reply-To: <20131208123144.U883@besplex.bde.org> References: <201312071955.rB7JtYNH001792@svn.freebsd.org> <20131208123144.U883@besplex.bde.org> Date: Sat, 7 Dec 2013 21:39:52 -0800 X-Google-Sender-Auth: tDGC97VU5SzD06P7kp5onp4wcVM Message-ID: Subject: Re: svn commit: r259080 - in head/sys: dev/iicbus geom/cache geom/journal From: Justin Hibbits To: Bruce Evans Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 05:39:55 -0000 On Dec 7, 2013 6:54 PM, "Bruce Evans" wrote: > > On Sat, 7 Dec 2013, Justin Hibbits wrote: > >> Log: >> Fix some integer signs. These unsigned integers should all be signed. >> >> Found by: clang (powerpc64) > > > Unsigned integers are indeed used excessively. They should only be used > if values larger than INT_MAX need to be represented, but values larger > than UINT_MAX need not be represented. This is a very small target > (just 1 more bit). > > >> Modified: head/sys/dev/iicbus/max6690.c >> ============================================================================== >> --- head/sys/dev/iicbus/max6690.c Sat Dec 7 19:39:38 2013 (r259079) >> +++ head/sys/dev/iicbus/max6690.c Sat Dec 7 19:55:34 2013 (r259080) >> @@ -362,7 +362,7 @@ max6690_sensor_sysctl(SYSCTL_HANDLER_ARG >> struct max6690_softc *sc; >> struct max6690_sensor *sens; >> int error; >> - unsigned int temp; >> + int temp; >> >> dev = arg1; >> sc = device_get_softc(dev); >> > > This fixes one style bug (non-use of the BSD spelling u_int) but adds > another (int declarations not grouped together). > > >> Modified: head/sys/geom/cache/g_cache.c >> ============================================================================== >> --- head/sys/geom/cache/g_cache.c Sat Dec 7 19:39:38 2013 (r259079) >> +++ head/sys/geom/cache/g_cache.c Sat Dec 7 19:55:34 2013 (r259080) >> @@ -67,7 +67,7 @@ static u_int g_cache_used_hi = 20; >> static int >> sysctl_handle_pct(SYSCTL_HANDLER_ARGS) >> { >> - u_int val = *(u_int *)arg1; >> + int val; >> int error; >> >> error = sysctl_handle_int(oidp, &val, 0, req); >> > > This adds the larger non-style bug that val is used uninitialized. > Compilers should warn about this. This results in stack garbage > being copied out instead of the "old" value. > Sorry, I missed that. I will fix it tonight when I get home. Very much a pointy hat to me. > sysctl_handle_u_int() doesn't exist, so sysctl_handle_int() os often > abused to handle u_int's and worse (sometimes "opaque" types, where > it usually works accidentally if the type is 32 bits, and sometimes > even works accidentally if the type is larger). clang seems to be > complaining about this abuse. Why does it only complain here? Ah, > maybe it is not smart enough to complain about this, but is just > complaining about the (val < 0) range check. > > This adds 2 (lexical) style bugs: > - the int declarations are not grouped together > > This misses fixing nearby bogus unsigned variables. The cast for these > is more bogus than before. Indeed, the whole function is horrible, and > this change is sort of backwards since it gives a sign mismatch with > the underlying variables: > > % static u_int g_cache_used_lo = 5; > > % static u_int g_cache_used_hi = 20; > > Example of excessive use of unsigned types. These variables only need > to handle percentages between 0 and 100. Only purpose was to fix the clang warning. I will look at this though. > > % static int > > Style bug (missing blank line); > > % sysctl_handle_pct(SYSCTL_HANDLER_ARGS) > % { > % u_int val = *(u_int *)arg1; > > This is the old version. It has another style bug (initialization in > declaration). The initialization wouldn't have been lost so easily > if it had been in the correct place. > > But the type was correct, since it is bug-for-bug constent with the > underlying variables. > > % int error; > % % error = sysctl_handle_int(oidp, &val, 0, req); > > sysctl_handle_int() was abused to handle the u_int (arg1 points to > one of the above 2 variables). > > % if (error || !req->newptr) > % return (error); > > 2 style bugs (2 boolean comparisions of non-booleans). Strict KNF doesn't > even use the ! operator to test booleansl; it uses an explicit " == 0" > test for this, though it sometimes doesn't write out "!= 0" for the reverse > test. > > % if (val < 0 || val > 100) > % return (EINVAL); > > The first test in this is redundant, This is apparently what clang was > complaining about. The warning for that can be fixed by removing the > test. However, I don't like this fix. It depends on the type being > unsigned. The code becomes more fragile, and would break if the type > were changed to the correct one (signed). > > % if ((arg1 == &g_cache_used_lo && val > g_cache_used_hi) || > % (arg1 == &g_cache_used_hi && g_cache_used_lo > val)) > % return (EINVAL); > % *(u_int *)arg1 = val; > > There are only 2 variables handled by this function, so we use arg1 to set the correct one. However, the previous statement has decided > which of the variables is being set, and we could use that to set it. > Or better, convert arg1 from void * to u_int * up front, and use that > throughout instead of several casts of arg1. > > % return (0); > % } > % SYSCTL_PROC(_kern_geom_cache, OID_AUTO, used_lo, CTLTYPE_UINT|CTLFLAG_RW, > > Style bugs: > - missing blank line. This is intentional for grouping the function with > its variables, as above, but still ugly. > - missing spaces around binary operator '|'. This bug is too common for > this operator, and for CTLFLAG*. But the spaces are even more needed > for '|' than for '+' or '*', since '|' looks more like an alphanumeric > character. > > % &g_cache_used_lo, 0, sysctl_handle_pct, "IU", ""); > % SYSCTL_PROC(_kern_geom_cache, OID_AUTO, used_hi, CTLTYPE_UINT|CTLFLAG_RW, > % &g_cache_used_hi, 0, sysctl_handle_pct, "IU", ""); > > Style bugs: > - non-KNF continuation indent. This bug is too common for SYSCTL*(), > although someone once did a fairly global sweep to fix it for them. > - no description. > > This sysctl is over-engineered. A simple SYSCTL_UINT() is enough. > There are many more-critical sysctls that don't have any range checking. > The fix is not to bloat the kernel by adding range checking to them > all. With several thousand sysctls, the range checking code could > easily be over-engineered enough to double the size of an already > massively bloated kernel. OTOH, there may still be runtime errors > from sloppy caclulations using the percentage variables. The > calculations are of the form (x * pct / 100) and not the more robust > but fuzzier (x / 100 * pct). pct will normally be promoted to the > type of x in these expressions (often to 64 bits, and then overflow > is far off). Overflow is only affected by pct being unsigned if x is > int or shorter. > > >> Modified: head/sys/geom/journal/g_journal.c >> ============================================================================== >> --- head/sys/geom/journal/g_journal.c Sat Dec 7 19:39:38 2013 (r259079) >> +++ head/sys/geom/journal/g_journal.c Sat Dec 7 19:55:34 2013 (r259080) >> @@ -168,7 +168,7 @@ SYSCTL_UINT(_kern_geom_journal_cache, OI >> static int >> g_journal_cache_switch_sysctl(SYSCTL_HANDLER_ARGS) >> { >> - u_int cswitch; >> + int cswitch; >> int error; >> >> cswitch = g_journal_cache_switch; >> > > 2 style bugs (int variables not grouped; int variables not sorted). > > This sysctl is missing most of the style bugs discussed above: > - the transfer variable cswitch is not initialized in its declaration. > Its initialization didn't get deleted. > - the comparisons of the non-booleans are non-boolean. > - the percentage variable is used in the robust way (x / 100 * pct). > - the SYSCTL()s use KNF continuation indentation > - there are spaces around the binary operator '|' > - the SYSCTL()s have descriptions. > > This leaves mainly type errors (excessive use of unsigned variables). > There is a different inconsistency: the u_int g_journal_cache_switch > has formatting data "I" instead of "IU". Both will work due to the > range checking and assumptions that the machine is not exotic, but there > is no reason to not to use a consistent format. > > Another common style bug/API design error visible here is using > sysctl_handle_int() on generic variables. You have to know that the > variable type is int to use it or u_int, int32_t or uint32_t to abuse > it. The width of the variable is in the sysctl data and is usually > correct. sysctl_handle_opaque() is usable on generic variables but > doesn't work so well (it prevents type checking and has more locking > overheads). When sysctl_handle_int() is used, the width in the sysctl > data should be used to detect size mismatches. It is used, but there > are bugs in the error handling for this (something like ignoring size > mismatches for short i/o's in only 1 direction). > > Bruce I will fix all the bugs I introduced tonight or tomorrow. The rest I will either look at or file for later. Sorry for the breakage. -Justin From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 05:55:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79D1FDA8; Sun, 8 Dec 2013 05:55:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64C60147D; Sun, 8 Dec 2013 05:55:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB85tutj016980; Sun, 8 Dec 2013 05:55:56 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB85tu8W016979; Sun, 8 Dec 2013 05:55:56 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312080555.rB85tu8W016979@svn.freebsd.org> From: Peter Wemm Date: Sun, 8 Dec 2013 05:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259094 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 05:55:56 -0000 Author: peter Date: Sun Dec 8 05:55:55 2013 New Revision: 259094 URL: http://svnweb.freebsd.org/changeset/base/259094 Log: Rev 256256 had an undocumented side effect of breaking existing behavior for ipv6 jails. Among the harmful side effects included putting a route to an entire /64 onto an interface even if you were in a smaller network - eg: /80. This broke the freebsd.org cluster hosted at ISC which has /80 networks. Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Sun Dec 8 03:49:45 2013 (r259093) +++ head/etc/rc.d/jail Sun Dec 8 05:55:55 2013 (r259094) @@ -319,8 +319,8 @@ jail_extract_address() _mask=${_mask:-/32} elif [ "${_type}" = "inet6" ]; then - # In case _maske is not set for IPv6, use /64. - _mask=${_mask:-/64} + # In case _maske is not set for IPv6, use /128. + _mask=${_mask:-/128} fi } From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 06:52:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A5AA3A3; Sun, 8 Dec 2013 06:52:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C5601799; Sun, 8 Dec 2013 06:52:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB86qMOJ037334; Sun, 8 Dec 2013 06:52:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB86qMvs037333; Sun, 8 Dec 2013 06:52:22 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312080652.rB86qMvs037333@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 8 Dec 2013 06:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259095 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 06:52:23 -0000 Author: hselasky Date: Sun Dec 8 06:52:22 2013 New Revision: 259095 URL: http://svnweb.freebsd.org/changeset/base/259095 Log: Fix typos. Found by: remko Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Sun Dec 8 05:55:55 2013 (r259094) +++ head/sys/dev/usb/controller/usb_controller.c Sun Dec 8 06:52:22 2013 (r259095) @@ -441,7 +441,7 @@ usb_bus_detach(struct usb_proc_msg *pm) /*------------------------------------------------------------------------* * usb_bus_suspend * - * This function is used to suspend the USB contoller. + * This function is used to suspend the USB controller. *------------------------------------------------------------------------*/ static void usb_bus_suspend(struct usb_proc_msg *pm) @@ -498,7 +498,7 @@ usb_bus_suspend(struct usb_proc_msg *pm) /*------------------------------------------------------------------------* * usb_bus_resume * - * This function is used to resume the USB contoller. + * This function is used to resume the USB controller. *------------------------------------------------------------------------*/ static void usb_bus_resume(struct usb_proc_msg *pm) @@ -561,7 +561,7 @@ usb_bus_resume(struct usb_proc_msg *pm) /*------------------------------------------------------------------------* * usb_bus_reset * - * This function is used to reset the USB contoller. + * This function is used to reset the USB controller. *------------------------------------------------------------------------*/ static void usb_bus_reset(struct usb_proc_msg *pm) @@ -583,7 +583,7 @@ usb_bus_reset(struct usb_proc_msg *pm) /*------------------------------------------------------------------------* * usb_bus_shutdown * - * This function is used to shutdown the USB contoller. + * This function is used to shutdown the USB controller. *------------------------------------------------------------------------*/ static void usb_bus_shutdown(struct usb_proc_msg *pm) From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 09:34:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB3DC478; Sun, 8 Dec 2013 09:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6AE31684; Sun, 8 Dec 2013 09:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB89YuXV095258; Sun, 8 Dec 2013 09:34:56 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB89YuAD095256; Sun, 8 Dec 2013 09:34:56 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312080934.rB89YuAD095256@svn.freebsd.org> From: Justin Hibbits Date: Sun, 8 Dec 2013 09:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259096 - in head/sys/geom: cache journal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 09:34:57 -0000 Author: jhibbits Date: Sun Dec 8 09:34:56 2013 New Revision: 259096 URL: http://svnweb.freebsd.org/changeset/base/259096 Log: Partially revert r259080. bde@ pointed out that there are a lot more style bugs going on in here than can be fixed, and I introduced some of my own. Rather than fix the whole host of them, back out my bugs. Found by: bde X-MFC with: r259080 Modified: head/sys/geom/cache/g_cache.c head/sys/geom/journal/g_journal.c Modified: head/sys/geom/cache/g_cache.c ============================================================================== --- head/sys/geom/cache/g_cache.c Sun Dec 8 06:52:22 2013 (r259095) +++ head/sys/geom/cache/g_cache.c Sun Dec 8 09:34:56 2013 (r259096) @@ -67,7 +67,7 @@ static u_int g_cache_used_hi = 20; static int sysctl_handle_pct(SYSCTL_HANDLER_ARGS) { - int val; + u_int val = *(u_int *)arg1; int error; error = sysctl_handle_int(oidp, &val, 0, req); Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Sun Dec 8 06:52:22 2013 (r259095) +++ head/sys/geom/journal/g_journal.c Sun Dec 8 09:34:56 2013 (r259096) @@ -168,7 +168,7 @@ SYSCTL_UINT(_kern_geom_journal_cache, OI static int g_journal_cache_switch_sysctl(SYSCTL_HANDLER_ARGS) { - int cswitch; + u_int cswitch; int error; cswitch = g_journal_cache_switch; From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 09:36:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C4E25C4; Sun, 8 Dec 2013 09:36:20 +0000 (UTC) Received: from mail-pd0-x22b.google.com (mail-pd0-x22b.google.com [IPv6:2607:f8b0:400e:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C8A21691; Sun, 8 Dec 2013 09:36:20 +0000 (UTC) Received: by mail-pd0-f171.google.com with SMTP id z10so3423837pdj.16 for ; Sun, 08 Dec 2013 01:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=UatvS/2IR+fy6XLXHua3Zid/YipF2AWCdKyzQ26WgMU=; b=fEs5kv4iLGXHI1yQ4+BXO4LK7IzN6w2ewwll7RykFBPzndQvRi6nUsNN3D+gIH8QTb zj7Xn1NznJ2Pjj38+J86qs/l4BEa7ZrMdXEP2KXcALaw3rr/0WLmTUHWXwnA5iNZeLsK LEvN2FwY0FWnPADwwb5C7rhmJKFpwu4BQHCiEa6L+EPNL5D3qeQfJfumboeoAyWZ1d77 yf95uPhI//yCVAfXn1qBSiaMP97Z5kgK6k7fSnwB/Vdgh3fYMybOvmKqSIOYmNG/FXM+ bIjbCECcGrOUU0l5n0lgQH6vaDrRUkrhPu+xjmRw+GZ5eULOCTWKQ/HX4MIwaKuG3caw xW9Q== X-Received: by 10.66.221.199 with SMTP id qg7mr14488223pac.13.1386495379607; Sun, 08 Dec 2013 01:36:19 -0800 (PST) Received: from zhabar.gateway.2wire.net (76-253-2-5.lightspeed.sntcca.sbcglobal.net. [76.253.2.5]) by mx.google.com with ESMTPSA id gh3sm9840028pbb.2.2013.12.08.01.36.18 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 08 Dec 2013 01:36:19 -0800 (PST) Date: Sun, 8 Dec 2013 01:36:14 -0800 From: Justin Hibbits To: Bruce Evans Subject: Re: svn commit: r259080 - in head/sys: dev/iicbus geom/cache geom/journal Message-ID: <20131208013614.6dc63ef9@zhabar.gateway.2wire.net> In-Reply-To: <20131208123144.U883@besplex.bde.org> References: <201312071955.rB7JtYNH001792@svn.freebsd.org> <20131208123144.U883@besplex.bde.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; powerpc64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 09:36:20 -0000 On Sun, 8 Dec 2013 13:53:30 +1100 (EST) Bruce Evans wrote: > On Sat, 7 Dec 2013, Justin Hibbits wrote: > > > Log: > > Fix some integer signs. These unsigned integers should all be > > signed. > > > > Found by: clang (powerpc64) > > Unsigned integers are indeed used excessively. They should only be > used if values larger than INT_MAX need to be represented, but values > larger than UINT_MAX need not be represented. This is a very small > target (just 1 more bit). > > > Modified: head/sys/dev/iicbus/max6690.c > > ============================================================================== > > --- head/sys/dev/iicbus/max6690.c Sat Dec 7 19:39:38 > > 2013 (r259079) +++ head/sys/dev/iicbus/max6690.c Sat > > Dec 7 19:55:34 2013 (r259080) @@ -362,7 +362,7 @@ > > max6690_sensor_sysctl(SYSCTL_HANDLER_ARG struct max6690_softc *sc; > > struct max6690_sensor *sens; > > int error; > > - unsigned int temp; > > + int temp; > > > > dev = arg1; > > sc = device_get_softc(dev); > > > > This fixes one style bug (non-use of the BSD spelling u_int) but adds > another (int declarations not grouped together). > > > Modified: head/sys/geom/cache/g_cache.c > > ============================================================================== > > --- head/sys/geom/cache/g_cache.c Sat Dec 7 19:39:38 > > 2013 (r259079) +++ head/sys/geom/cache/g_cache.c Sat > > Dec 7 19:55:34 2013 (r259080) @@ -67,7 +67,7 @@ static > > u_int g_cache_used_hi = 20; static int > > sysctl_handle_pct(SYSCTL_HANDLER_ARGS) > > { > > - u_int val = *(u_int *)arg1; > > + int val; > > int error; > > > > error = sysctl_handle_int(oidp, &val, 0, req); > > > > This adds the larger non-style bug that val is used uninitialized. > Compilers should warn about this. This results in stack garbage > being copied out instead of the "old" value. > > sysctl_handle_u_int() doesn't exist, so sysctl_handle_int() os often > abused to handle u_int's and worse (sometimes "opaque" types, where > it usually works accidentally if the type is 32 bits, and sometimes > even works accidentally if the type is larger). clang seems to be > complaining about this abuse. Why does it only complain here? Ah, > maybe it is not smart enough to complain about this, but is just > complaining about the (val < 0) range check. > > This adds 2 (lexical) style bugs: > - the int declarations are not grouped together > > This misses fixing nearby bogus unsigned variables. The cast for > these is more bogus than before. Indeed, the whole function is > horrible, and this change is sort of backwards since it gives a sign > mismatch with the underlying variables: > > % static u_int g_cache_used_lo = 5; > % static u_int g_cache_used_hi = 20; > > Example of excessive use of unsigned types. These variables only need > to handle percentages between 0 and 100. > > % static int > > Style bug (missing blank line); > > % sysctl_handle_pct(SYSCTL_HANDLER_ARGS) > % { > % u_int val = *(u_int *)arg1; > > This is the old version. It has another style bug (initialization in > declaration). The initialization wouldn't have been lost so easily > if it had been in the correct place. > > But the type was correct, since it is bug-for-bug constent with the > underlying variables. > > % int error; > % > % error = sysctl_handle_int(oidp, &val, 0, req); > > sysctl_handle_int() was abused to handle the u_int (arg1 points to > one of the above 2 variables). > > % if (error || !req->newptr) > % return (error); > > 2 style bugs (2 boolean comparisions of non-booleans). Strict KNF > doesn't even use the ! operator to test booleansl; it uses an > explicit " == 0" test for this, though it sometimes doesn't write out > "!= 0" for the reverse test. > > % if (val < 0 || val > 100) > % return (EINVAL); > > The first test in this is redundant, This is apparently what clang > was complaining about. The warning for that can be fixed by removing > the test. However, I don't like this fix. It depends on the type > being unsigned. The code becomes more fragile, and would break if > the type were changed to the correct one (signed). > > % if ((arg1 == &g_cache_used_lo && val > g_cache_used_hi) || > % (arg1 == &g_cache_used_hi && g_cache_used_lo > val)) > % return (EINVAL); > % *(u_int *)arg1 = val; > > There are only 2 variables handled by this function, so we use arg1 > to set the correct one. However, the previous statement has decided > which of the variables is being set, and we could use that to set it. > Or better, convert arg1 from void * to u_int * up front, and use that > throughout instead of several casts of arg1. > > % return (0); > % } > % SYSCTL_PROC(_kern_geom_cache, OID_AUTO, used_lo, > CTLTYPE_UINT|CTLFLAG_RW, > > Style bugs: > - missing blank line. This is intentional for grouping the function > with its variables, as above, but still ugly. > - missing spaces around binary operator '|'. This bug is too common > for this operator, and for CTLFLAG*. But the spaces are even more > needed for '|' than for '+' or '*', since '|' looks more like an > alphanumeric character. > > % &g_cache_used_lo, 0, sysctl_handle_pct, "IU", ""); > % SYSCTL_PROC(_kern_geom_cache, OID_AUTO, used_hi, > CTLTYPE_UINT|CTLFLAG_RW, % &g_cache_used_hi, 0, > sysctl_handle_pct, "IU", ""); > > Style bugs: > - non-KNF continuation indent. This bug is too common for SYSCTL*(), > although someone once did a fairly global sweep to fix it for them. > - no description. > > This sysctl is over-engineered. A simple SYSCTL_UINT() is enough. > There are many more-critical sysctls that don't have any range > checking. The fix is not to bloat the kernel by adding range checking > to them all. With several thousand sysctls, the range checking code > could easily be over-engineered enough to double the size of an > already massively bloated kernel. OTOH, there may still be runtime > errors from sloppy caclulations using the percentage variables. The > calculations are of the form (x * pct / 100) and not the more robust > but fuzzier (x / 100 * pct). pct will normally be promoted to the > type of x in these expressions (often to 64 bits, and then overflow > is far off). Overflow is only affected by pct being unsigned if x is > int or shorter. > > > Modified: head/sys/geom/journal/g_journal.c > > ============================================================================== > > --- head/sys/geom/journal/g_journal.c Sat Dec 7 19:39:38 > > 2013 (r259079) +++ head/sys/geom/journal/g_journal.c > > Sat Dec 7 19:55:34 2013 (r259080) @@ -168,7 +168,7 @@ > > SYSCTL_UINT(_kern_geom_journal_cache, OI static int > > g_journal_cache_switch_sysctl(SYSCTL_HANDLER_ARGS) > > { > > - u_int cswitch; > > + int cswitch; > > int error; > > > > cswitch = g_journal_cache_switch; > > > > 2 style bugs (int variables not grouped; int variables not sorted). > > This sysctl is missing most of the style bugs discussed above: > - the transfer variable cswitch is not initialized in its declaration. > Its initialization didn't get deleted. > - the comparisons of the non-booleans are non-boolean. > - the percentage variable is used in the robust way (x / 100 * pct). > - the SYSCTL()s use KNF continuation indentation > - there are spaces around the binary operator '|' > - the SYSCTL()s have descriptions. > > This leaves mainly type errors (excessive use of unsigned variables). > There is a different inconsistency: the u_int g_journal_cache_switch > has formatting data "I" instead of "IU". Both will work due to the > range checking and assumptions that the machine is not exotic, but > there is no reason to not to use a consistent format. > > Another common style bug/API design error visible here is using > sysctl_handle_int() on generic variables. You have to know that the > variable type is int to use it or u_int, int32_t or uint32_t to abuse > it. The width of the variable is in the sysctl data and is usually > correct. sysctl_handle_opaque() is usable on generic variables but > doesn't work so well (it prevents type checking and has more locking > overheads). When sysctl_handle_int() is used, the width in the sysctl > data should be used to detect size mismatches. It is used, but there > are bugs in the error handling for this (something like ignoring size > mismatches for short i/o's in only 1 direction). > > Bruce I just reverted these two changes in r259096. Rather than fix what I did and change the rest of the files, I'm leaving them for another day, and reverted my changes so they're at least back to the working order from before. - Justin From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 13:46:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB580FE4; Sun, 8 Dec 2013 13:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9739E13AB; Sun, 8 Dec 2013 13:46:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8DkRFQ086574; Sun, 8 Dec 2013 13:46:27 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8DkR0t086573; Sun, 8 Dec 2013 13:46:27 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312081346.rB8DkR0t086573@svn.freebsd.org> From: Luiz Otavio O Souza Date: Sun, 8 Dec 2013 13:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259099 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 13:46:27 -0000 Author: loos Date: Sun Dec 8 13:46:27 2013 New Revision: 259099 URL: http://svnweb.freebsd.org/changeset/base/259099 Log: Similar to r255816, fix the math for the DELAY() calculation. It was off by a really small amount because of the higher timer resolution. Approved by: adrian (mentor) Verified on: BBB Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtimer.c Sun Dec 8 11:13:37 2013 (r259098) +++ head/sys/arm/ti/am335x/am335x_dmtimer.c Sun Dec 8 13:46:27 2013 (r259099) @@ -359,7 +359,7 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * ((am335x_dmtimer_tc.tc_frequency / 1000000) + 1); + counts = usec * (am335x_dmtimer_tc.tc_frequency / 1000000) + 1; first = am335x_dmtimer_tc_read_4(DMTIMER_TCRR); From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 13:56:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41EEC390; Sun, 8 Dec 2013 13:56:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D9C3147D; Sun, 8 Dec 2013 13:56:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8DuRLR090021; Sun, 8 Dec 2013 13:56:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8DuQ4e090020; Sun, 8 Dec 2013 13:56:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312081356.rB8DuQ4e090020@svn.freebsd.org> From: Dimitry Andric Date: Sun, 8 Dec 2013 13:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259100 - head/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 13:56:27 -0000 Author: dim Date: Sun Dec 8 13:56:26 2013 New Revision: 259100 URL: http://svnweb.freebsd.org/changeset/base/259100 Log: Pull in r196658 from upstream clang trunk: CodeGen: Don't emit linkage on thunks that aren't emitted because they're vararg. This can happen when we're trying to emit a thunk with available_externally linkage with optimization enabled but bail because it doesn't make sense for vararg functions. [LLVM] PR18098. This should fix clang "Broken module found, compilation aborted" errors when building the qt4-based dvbcut port. Reported by: se MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Sun Dec 8 13:46:27 2013 (r259099) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Sun Dec 8 13:56:26 2013 (r259100) @@ -454,10 +454,9 @@ void CodeGenVTables::EmitThunk(GlobalDec } else { // Normal thunk body generation. CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk); + if (UseAvailableExternallyLinkage) + ThunkFn->setLinkage(llvm::GlobalValue::AvailableExternallyLinkage); } - - if (UseAvailableExternallyLinkage) - ThunkFn->setLinkage(llvm::GlobalValue::AvailableExternallyLinkage); } void CodeGenVTables::MaybeEmitThunkAvailableExternally(GlobalDecl GD, From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 14:21:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF67073; Sun, 8 Dec 2013 14:21:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B0DC16F9; Sun, 8 Dec 2013 14:21:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8ELsvb001077; Sun, 8 Dec 2013 14:21:54 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8ELsTt001076; Sun, 8 Dec 2013 14:21:54 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201312081421.rB8ELsTt001076@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 8 Dec 2013 14:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259101 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 14:21:54 -0000 Author: dumbbell Date: Sun Dec 8 14:21:54 2013 New Revision: 259101 URL: http://svnweb.freebsd.org/changeset/base/259101 Log: drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes This fixes radeon_agp_init() and gtt_size is now correct. However, this is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't implemented yet. Submitted by: tijl@ Modified: head/sys/dev/drm2/radeon/radeon_agp.c Modified: head/sys/dev/drm2/radeon/radeon_agp.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_agp.c Sun Dec 8 13:56:26 2013 (r259100) +++ head/sys/dev/drm2/radeon/radeon_agp.c Sun Dec 8 14:21:54 2013 (r259101) @@ -153,11 +153,11 @@ int radeon_agp_init(struct radeon_device return ret; } - if (rdev->ddev->agp->info.ai_aperture_size < 32) { + if ((rdev->ddev->agp->info.ai_aperture_size >> 20) < 32) { drm_agp_release(rdev->ddev); dev_warn(rdev->dev, "AGP aperture too small (%zuM) " "need at least 32M, disabling AGP\n", - rdev->ddev->agp->info.ai_aperture_size); + rdev->ddev->agp->info.ai_aperture_size >> 20); return -EINVAL; } @@ -246,7 +246,7 @@ int radeon_agp_init(struct radeon_device } rdev->mc.agp_base = rdev->ddev->agp->info.ai_aperture_base; - rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size << 20; + rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size; rdev->mc.gtt_start = rdev->mc.agp_base; rdev->mc.gtt_end = rdev->mc.gtt_start + rdev->mc.gtt_size - 1; dev_info(rdev->dev, "GTT: %juM 0x%08jX - 0x%08jX\n", From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 15:25:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B32E5CE1; Sun, 8 Dec 2013 15:25:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F5BD1A4C; Sun, 8 Dec 2013 15:25:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8FPJso023253; Sun, 8 Dec 2013 15:25:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8FPJK0023252; Sun, 8 Dec 2013 15:25:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312081525.rB8FPJK0023252@svn.freebsd.org> From: Marius Strobl Date: Sun, 8 Dec 2013 15:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259102 - head/sys/sparc64/sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 15:25:19 -0000 Author: marius Date: Sun Dec 8 15:25:19 2013 New Revision: 259102 URL: http://svnweb.freebsd.org/changeset/base/259102 Log: Restore a vital comment nuked in r259016. Modified: head/sys/sparc64/sparc64/machdep.c Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Sun Dec 8 14:21:54 2013 (r259101) +++ head/sys/sparc64/sparc64/machdep.c Sun Dec 8 15:25:19 2013 (r259102) @@ -553,6 +553,13 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * trigger a fatal reset error or worse things further down the road. * XXX it should be possible to use this solely instead of writing * %tba in cpu_setregs(). Doing so causes a hang however. + * + * NB: the low-level console drivers require a working DELAY() and + * some compiler optimizations may cause the curthread accesses of + * mutex(9) to be factored out even if the latter aren't actually + * called. Both of these require PCPU_REG to be set. However, we + * can't set PCPU_REG without also taking over the trap table or the + * firmware will overwrite it. */ sun4u_set_traptable(tl0_base); From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 15:36:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B1BFFAC; Sun, 8 Dec 2013 15:36:23 +0000 (UTC) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01E7B1ACD; Sun, 8 Dec 2013 15:36:22 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.7/8.14.7/ALCHEMY.FRANKEN.DE) with ESMTP id rB8FaKAR077487; Sun, 8 Dec 2013 16:36:21 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.7/8.14.7/Submit) id rB8FaKGY077486; Sun, 8 Dec 2013 16:36:20 +0100 (CET) (envelope-from marius) Date: Sun, 8 Dec 2013 16:36:20 +0100 From: Marius Strobl To: Aleksandr Rybalko Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken Message-ID: <20131208153620.GA21278@alchemy.franken.de> References: <201312052238.rB5McsVN020719@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312052238.rB5McsVN020719@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 15:36:23 -0000 On Thu, Dec 05, 2013 at 10:38:54PM +0000, Aleksandr Rybalko wrote: > Author: ray > Date: Thu Dec 5 22:38:53 2013 > New Revision: 259016 > URL: http://svnweb.freebsd.org/changeset/base/259016 > > Log: > Merge VT(9) project (a.k.a. newcons). > > Reviewed by: nwhitehorn > MFC_to_10_after: re approval Have you addressed any of the points raised in: http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045887.html to get VT(9) at least en par with syscons(4) regarding being able to use a hardware cursor, allowing different low-level console drivers to compete for the same hardware etc. in the meantime? Marius From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 17:47:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDDA17EE; Sun, 8 Dec 2013 17:47:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C14101269; Sun, 8 Dec 2013 17:47:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8HlcoS074479; Sun, 8 Dec 2013 17:47:38 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8Hlc0d074476; Sun, 8 Dec 2013 17:47:38 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201312081747.rB8Hlc0d074476@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 8 Dec 2013 17:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259103 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 17:47:39 -0000 Author: np Date: Sun Dec 8 17:47:37 2013 New Revision: 259103 URL: http://svnweb.freebsd.org/changeset/base/259103 Log: cxgbe(4): save a copy of the RSS map for each port for the driver's use. Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Sun Dec 8 15:25:19 2013 (r259102) +++ head/sys/dev/cxgbe/adapter.h Sun Dec 8 17:47:37 2013 (r259103) @@ -200,6 +200,7 @@ struct port_info { unsigned long flags; int if_flags; + uint16_t *rss; uint16_t viid; int16_t xact_addr_filt;/* index of exact MAC address filter */ uint16_t rss_size; /* size of VI's RSS table slice */ Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sun Dec 8 15:25:19 2013 (r259102) +++ head/sys/dev/cxgbe/t4_main.c Sun Dec 8 17:47:37 2013 (r259103) @@ -3157,7 +3157,7 @@ port_full_init(struct port_info *pi) struct ifnet *ifp = pi->ifp; uint16_t *rss; struct sge_rxq *rxq; - int rc, i; + int rc, i, j; ASSERT_SYNCHRONIZED_OP(sc); KASSERT((pi->flags & PORT_INIT_DONE) == 0, @@ -3174,21 +3174,25 @@ port_full_init(struct port_info *pi) goto done; /* error message displayed already */ /* - * Setup RSS for this port. + * Setup RSS for this port. Save a copy of the RSS table for later use. */ - rss = malloc(pi->nrxq * sizeof (*rss), M_CXGBE, - M_ZERO | M_WAITOK); - for_each_rxq(pi, i, rxq) { - rss[i] = rxq->iq.abs_id; + rss = malloc(pi->rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK); + for (i = 0; i < pi->rss_size;) { + for_each_rxq(pi, j, rxq) { + rss[i++] = rxq->iq.abs_id; + if (i == pi->rss_size) + break; + } } - rc = -t4_config_rss_range(sc, sc->mbox, pi->viid, 0, - pi->rss_size, rss, pi->nrxq); - free(rss, M_CXGBE); + + rc = -t4_config_rss_range(sc, sc->mbox, pi->viid, 0, pi->rss_size, rss, + pi->rss_size); if (rc != 0) { if_printf(ifp, "rss_config failed: %d\n", rc); goto done; } + pi->rss = rss; pi->flags |= PORT_INIT_DONE; done: if (rc != 0) @@ -3237,6 +3241,7 @@ port_full_uninit(struct port_info *pi) quiesce_fl(sc, &ofld_rxq->fl); } #endif + free(pi->rss, M_CXGBE); } t4_teardown_port_queues(pi); Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sun Dec 8 15:25:19 2013 (r259102) +++ head/sys/dev/cxgbe/t4_sge.c Sun Dec 8 17:47:37 2013 (r259103) @@ -1678,7 +1678,7 @@ t4_eth_rx(struct sge_iq *iq, const struc m0->m_pkthdr.rcvif = ifp; m0->m_flags |= M_FLOWID; - m0->m_pkthdr.flowid = rss->hash_val; + m0->m_pkthdr.flowid = be32toh(rss->hash_val); if (cpl->csum_calc && !cpl->err_vec) { if (ifp->if_capenable & IFCAP_RXCSUM && From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 18:48:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0FF084D; Sun, 8 Dec 2013 18:48:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BCE14165B; Sun, 8 Dec 2013 18:48:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8Im7Ls096183; Sun, 8 Dec 2013 18:48:07 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8Im7o7096182; Sun, 8 Dec 2013 18:48:07 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201312081848.rB8Im7o7096182@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 8 Dec 2013 18:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259104 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 18:48:07 -0000 Author: dumbbell Date: Sun Dec 8 18:48:07 2013 New Revision: 259104 URL: http://svnweb.freebsd.org/changeset/base/259104 Log: drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD The code was unmodified compared to Linux and returned the amount of received bytes from the i2c bus. This led to non-working i2c bus and failure to eg. read monitor's EDID, if connected to DisplayPort. MFC after: 3 days Tested by: Mikaël Urankar Modified: head/sys/dev/drm2/radeon/atombios_dp.c Modified: head/sys/dev/drm2/radeon/atombios_dp.c ============================================================================== --- head/sys/dev/drm2/radeon/atombios_dp.c Sun Dec 8 17:47:37 2013 (r259103) +++ head/sys/dev/drm2/radeon/atombios_dp.c Sun Dec 8 18:48:07 2013 (r259104) @@ -272,7 +272,7 @@ int radeon_dp_i2c_aux_ch(device_t dev, i case AUX_I2C_REPLY_ACK: if (mode == MODE_I2C_READ) *read_byte = reply[0]; - return ret; + return (0); /* Return ret on Linux. */ case AUX_I2C_REPLY_NACK: DRM_DEBUG_KMS("aux_i2c nack\n"); return -EREMOTEIO; From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 19:32:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADCA5AB4; Sun, 8 Dec 2013 19:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 99FB21919; Sun, 8 Dec 2013 19:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8JWTFO015413; Sun, 8 Dec 2013 19:32:29 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8JWTXt015412; Sun, 8 Dec 2013 19:32:29 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312081932.rB8JWTXt015412@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 8 Dec 2013 19:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259106 - head/sbin/casperd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 19:32:29 -0000 Author: pjd Date: Sun Dec 8 19:32:29 2013 New Revision: 259106 URL: http://svnweb.freebsd.org/changeset/base/259106 Log: Some improvements to the casperd manual page. Submitted by: emaste Modified: head/sbin/casperd/casperd.8 Modified: head/sbin/casperd/casperd.8 ============================================================================== --- head/sbin/casperd/casperd.8 Sun Dec 8 19:20:50 2013 (r259105) +++ head/sbin/casperd/casperd.8 Sun Dec 8 19:32:29 2013 (r259106) @@ -43,15 +43,15 @@ .Sh DESCRIPTION The .Nm -daemon provides various services in capability-like fashion to programs -running in capability mode sandbox. +daemon hosts various services that can be accessed through +libcapsicum's capabilities by programs running in sandboxes. For example it is prohibited to send UDP packets to arbitrary destinations when operating in capability mode, which makes DNS resolution impossible. To make it possible the .Nm -daemon provides +daemon provides the .Nm system.dns -service that allows to proxy DNS resolution requests through dedicated, +service that proxies DNS resolution requests through a dedicated, non-sandboxed process provided by .Nm . .Pp @@ -80,15 +80,15 @@ stored. The default location is .Pa /var/run/casperd.pid . .It Fl S Ar sockpath -Specify alternative location of a +Specify alternative location of the .Xr unix 4 -domain socket that can be used to connect to the +domain socket used to connect to the .Nm daemon. The default location is .Pa /var/run/casper . .It Fl v -Print or log verbose/debugging informations. +Print or log verbose/debugging information. This option can be specified multiple times to raise the verbosity level. .El From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 20:07:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B70F833; Sun, 8 Dec 2013 20:07:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E0501B18; Sun, 8 Dec 2013 20:07:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8K73Os028107; Sun, 8 Dec 2013 20:07:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8K72G3028102; Sun, 8 Dec 2013 20:07:02 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201312082007.rB8K72G3028102@svn.freebsd.org> From: Alan Cox Date: Sun, 8 Dec 2013 20:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259107 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 20:07:03 -0000 Author: alc Date: Sun Dec 8 20:07:02 2013 New Revision: 259107 URL: http://svnweb.freebsd.org/changeset/base/259107 Log: Eliminate a redundant parameter to vm_radix_replace(). Improve the wording of the comment describing vm_radix_replace(). Reviewed by: attilio MFC after: 6 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_page.c head/sys/vm/vm_radix.c head/sys/vm/vm_radix.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Dec 8 19:32:29 2013 (r259106) +++ head/sys/vm/vm_page.c Sun Dec 8 20:07:02 2013 (r259107) @@ -1200,7 +1200,7 @@ vm_page_replace(vm_page_t mnew, vm_objec mnew->object = object; mnew->pindex = pindex; - mold = vm_radix_replace(&object->rtree, mnew, pindex); + mold = vm_radix_replace(&object->rtree, mnew); KASSERT(mold->queue == PQ_NONE, ("vm_page_replace: mold is on a paging queue")); Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Sun Dec 8 19:32:29 2013 (r259106) +++ head/sys/vm/vm_radix.c Sun Dec 8 20:07:02 2013 (r259107) @@ -788,20 +788,18 @@ vm_radix_reclaim_allnodes(struct vm_radi } /* - * Replace an existing page into the trie with another one. - * Panics if the replacing page is not present or if the new page has an - * invalid key. + * Replace an existing page in the trie with another one. + * Panics if there is not an old page in the trie at the new page's index. */ vm_page_t -vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, vm_pindex_t index) +vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage) { struct vm_radix_node *rnode; vm_page_t m; + vm_pindex_t index; int slot; - KASSERT(newpage->pindex == index, ("%s: newpage index invalid", - __func__)); - + index = newpage->pindex; rnode = vm_radix_getroot(rtree); if (rnode == NULL) panic("%s: replacing page on an empty trie", __func__); Modified: head/sys/vm/vm_radix.h ============================================================================== --- head/sys/vm/vm_radix.h Sun Dec 8 19:32:29 2013 (r259106) +++ head/sys/vm/vm_radix.h Sun Dec 8 20:07:02 2013 (r259107) @@ -43,8 +43,7 @@ vm_page_t vm_radix_lookup_ge(struct vm_r vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index); void vm_radix_reclaim_allnodes(struct vm_radix *rtree); void vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index); -vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, - vm_pindex_t index); +vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage); #endif /* _KERNEL */ #endif /* !_VM_RADIX_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 20:09:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54A4397C for ; Sun, 8 Dec 2013 20:09:17 +0000 (UTC) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 249D91B24 for ; Sun, 8 Dec 2013 20:09:17 +0000 (UTC) Received: by mail-pd0-f170.google.com with SMTP id g10so3954121pdj.1 for ; Sun, 08 Dec 2013 12:09:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=NSGmaDTLRiRicDVaMwAkA2jkGNHbqmwC3z7j7bK6vOQ=; b=MOF77bIBjoNOzZGHofsfBPhlb782xlMdcsrF09Tq00A0jM37EZYnhaZ0Z319SxTBzU aEvefO21BApp7soPXONo/aJG3YZuZjkdpbN9c4SBG+tdNzCiEermWY+ACL9IwPbG6UAr 84C7HIlUQLI6k9nY0iTYhke7BBAiv9V7O8RsvgWWliQSuPPCgMAMfolVpwqeRTNG1w9e TZPy5pQL3G+RPL20tAFagyl9CLTEFfXJgCyJIQIBj/8hX54Cn3r4IJmkjXRzaTISoY/D IeAUU8XCrcFcP9ZQoxoy7RgT5xiZX6S1O8Tev6fq5NBNyF/KyUUhTIivCWoRtqt0iZHp P5aA== X-Gm-Message-State: ALoCoQlQWXAfNL5DvUYSjwakepxfxz16eXoB8+INT3C/8xhlSSHxwIH+iFWsTx6NyvhFE0YIAfeM X-Received: by 10.68.240.36 with SMTP id vx4mr16887069pbc.140.1386533349822; Sun, 08 Dec 2013 12:09:09 -0800 (PST) Received: from [192.168.2.123] (99-74-169-43.lightspeed.sntcca.sbcglobal.net. [99.74.169.43]) by mx.google.com with ESMTPSA id gv10sm12787425pbd.0.2013.12.08.12.09.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 12:09:08 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r259058 - head/usr.bin/bc From: Tim Kientzle In-Reply-To: <20131207170419.124ea16e.trhodes@FreeBSD.org> Date: Sun, 8 Dec 2013 12:08:13 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <9747EB0E-E798-4436-8969-A5B88765FADA@kientzle.com> References: <201312070627.rB76RtGr022954@svn.freebsd.org> <20131207170419.124ea16e.trhodes@FreeBSD.org> To: Tom Rhodes X-Mailer: Apple Mail (2.1822) Cc: svn-src-head@FreeBSD.org, delphij@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 20:09:17 -0000 On Dec 7, 2013, at 2:04 PM, Tom Rhodes wrote: > On Sat, 7 Dec 2013 01:44:19 -0500 > Eitan Adler wrote: >=20 >> On Sat, Dec 7, 2013 at 1:27 AM, Xin LI wrote: >>> Author: delphij >>> Date: Sat Dec 7 06:27:54 2013 >>> New Revision: 259058 >>> URL: http://svnweb.freebsd.org/changeset/base/259058 >>>=20 >>> Log: >>> Remove mention of the compatibility option 'q', which is >>> intentionally undocumented and its only purpose is that >>> we do not bail out when used as a drop-in replacement of >>> a different implementation. >>=20 >> As I mentioned in the reply to the PR this change goes in the wrong = direction. >>=20 >> We should instead document -q as a compatibility option. >> Undocumented flags, even as NOPS, are bugs. >=20 > It should be documented as a do-nothing option. It should be documented in the manpage as a do-nothing option. It should not be included in Usage. Tim From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 20:43:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39A29647; Sun, 8 Dec 2013 20:43:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 263911E72; Sun, 8 Dec 2013 20:43:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8Kh2J2042111; Sun, 8 Dec 2013 20:43:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8Kh2l1042110; Sun, 8 Dec 2013 20:43:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312082043.rB8Kh2l1042110@svn.freebsd.org> From: Alexander Motin Date: Sun, 8 Dec 2013 20:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259108 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 20:43:02 -0000 Author: mav Date: Sun Dec 8 20:43:01 2013 New Revision: 259108 URL: http://svnweb.freebsd.org/changeset/base/259108 Log: When comparing device IDs, make sure that they have the same type (like NAA assigned) and identify the same entity (like device or port). Otherwise there can be false positives since at least some models of Seagate disks use same IDs for the whole device and one of its ports. MFC after: 2 weeks Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Sun Dec 8 20:07:02 2013 (r259107) +++ head/sys/cam/scsi/scsi_all.c Sun Dec 8 20:43:01 2013 (r259108) @@ -6509,7 +6509,11 @@ scsi_devid_match(uint8_t *lhs, size_t lh while (rhs_id <= rhs_last && (rhs_id->identifier + rhs_id->length) <= rhs_end) { - if (rhs_id->length == lhs_id->length + if ((rhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) == + (lhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) + && rhs_id->length == lhs_id->length && memcmp(rhs_id->identifier, lhs_id->identifier, rhs_id->length) == 0) return (0); From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 21:45:20 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6381F4C0; Sun, 8 Dec 2013 21:45:20 +0000 (UTC) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CCA671212; Sun, 8 Dec 2013 21:45:19 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id rB8Lj9PJ091536; Sun, 8 Dec 2013 22:45:14 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <52A4E865.6080602@FreeBSD.org> Date: Sun, 08 Dec 2013 22:45:09 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Aleksandr Rybalko , Aleksandr Rybalko , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken References: <201312052238.rB5McsVN020719@svn.freebsd.org> <52A3A8DE.9090907@FreeBSD.org> <2a683b40-1465-44f9-a9aa-d079f660529d@email.android.com> In-Reply-To: <2a683b40-1465-44f9-a9aa-d079f660529d@email.android.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 21:45:20 -0000 Hi Aleksandr, On 08.12.13 00:59, Aleksandr Rybalko wrote: > Andreas Tobler написав(ла): >> On 05.12.13 23:38, Aleksandr Rybalko wrote: >>> Author: ray >>> Date: Thu Dec 5 22:38:53 2013 >>> New Revision: 259016 >>> URL: http://svnweb.freebsd.org/changeset/base/259016 >>> >>> Log: >>> Merge VT(9) project (a.k.a. newcons). >>> >>> Reviewed by: nwhitehorn >>> MFC_to_10_after: re approval >>> >>> Sponsored by: The FreeBSD Foundation >> >> Great! Thanks, gives a new look & feel on the console :) >> Have it running on amd64/i386 and PowerMac(32/64-bit). >> The only thing I need to figure is the mapping of the AltGr or in Mac >> world, the alt key mapping. Iow, the third level mapping of the keys. >> e.g. the @ here is on altgr-2... >> >> Again, thanks! >> Andreas > > I'm glad to fix that, but I've to understand how it is should work :-) Hehe :) So do I. I was playing a bit while comparing to syscons.c And with the below diff I'm able to get what I want. At least when I press RALT (Altgr) I get the third symbol printed on my keyboard. I have a couple of Thinkpads here where I play with. (The PowerMac's are currently to loud) For example, on the '2' I have the '"' as the second symbol and the '@' as third symbol. Yeah, these are european keyboards.... Now I do not prepend the 0x1b and then my RALT behaves as used to, at least for me. I do not know the fine details but LALT and RALT are different. What do you think, others? For me this is a really important thing since all the 'special' keys are not accesible w/o the 'hack' below. If I want the pipe (|), or writing code ({}, [], ...) I have to remote login to get the characters I need. But I guess I do not need to explain that ;) TIA, Andreas Index: vt_core.c =================================================================== --- vt_core.c (revision 259095) +++ vt_core.c (working copy) @@ -408,6 +408,7 @@ } else { switch (c & ~RELKEY) { case (SPCLKEY | RALT): + break; case (SPCLKEY | LALT): vd->vd_kbstate |= ALKED; } From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 21:59:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 603C08B7; Sun, 8 Dec 2013 21:59:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B62D12A4; Sun, 8 Dec 2013 21:59:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8LxlZG067741; Sun, 8 Dec 2013 21:59:47 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8Lxkpp067739; Sun, 8 Dec 2013 21:59:46 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312082159.rB8Lxkpp067739@svn.freebsd.org> From: Peter Wemm Date: Sun, 8 Dec 2013 21:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259109 - in head/sys: conf opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 21:59:47 -0000 Author: peter Date: Sun Dec 8 21:59:46 2013 New Revision: 259109 URL: http://svnweb.freebsd.org/changeset/base/259109 Log: Fix build with 'crypto' and 'zfs' in the same kernel. This was the path of least pain I could find. Added: head/sys/opencrypto/cryptodeflate.c - copied unchanged from r259108, head/sys/opencrypto/deflate.c Deleted: head/sys/opencrypto/deflate.c Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Dec 8 20:43:01 2013 (r259108) +++ head/sys/conf/files Sun Dec 8 21:59:46 2013 (r259109) @@ -3728,7 +3728,7 @@ opencrypto/crypto.c optional crypto opencrypto/cryptodev.c optional cryptodev opencrypto/cryptodev_if.m optional crypto opencrypto/cryptosoft.c optional crypto -opencrypto/deflate.c optional crypto +opencrypto/cryptodeflate.c optional crypto opencrypto/rmd160.c optional crypto | ipsec opencrypto/skipjack.c optional crypto opencrypto/xform.c optional crypto Copied: head/sys/opencrypto/cryptodeflate.c (from r259108, head/sys/opencrypto/deflate.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/opencrypto/cryptodeflate.c Sun Dec 8 21:59:46 2013 (r259109, copy of r259108, head/sys/opencrypto/deflate.c) @@ -0,0 +1,263 @@ +/* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */ + +/*- + * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file contains a wrapper around the deflate algo compression + * functions using the zlib library (see net/zlib.{c,h}) + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +SDT_PROVIDER_DECLARE(opencrypto); +SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, entry, + "int", "u_int32_t"); +SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, bad, + "int", "int", "int", "int", "int"); +SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, iter, + "int", "int", "int", "int", "int"); +SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, return, + "int", "u_int32_t"); + +int window_inflate = -1 * MAX_WBITS; +int window_deflate = -12; + +/* + * This function takes a block of data and (de)compress it using the deflate + * algorithm + */ + +u_int32_t +deflate_global(data, size, decomp, out) + u_int8_t *data; + u_int32_t size; + int decomp; + u_int8_t **out; +{ + /* decomp indicates whether we compress (0) or decompress (1) */ + + z_stream zbuf; + u_int8_t *output; + u_int32_t count, result; + int error, i; + struct deflate_buf *bufh, *bufp; + + SDT_PROBE2(opencrypto, deflate, deflate_global, entry, decomp, size); + + bufh = bufp = NULL; + if (!decomp) { + i = 1; + } else { + /* + * Choose a buffer with 4x the size of the input buffer + * for the size of the output buffer in the case of + * decompression. If it's not sufficient, it will need to be + * updated while the decompression is going on. + */ + i = 4; + } + /* + * Make sure we do have enough output space. Repeated calls to + * deflate need at least 6 bytes of output buffer space to avoid + * repeated markers. We will always provide at least 16 bytes. + */ + while ((size * i) < 16) + i++; + + bufh = bufp = malloc(sizeof(*bufp) + (size_t)(size * i), + M_CRYPTO_DATA, M_NOWAIT); + if (bufp == NULL) { + SDT_PROBE3(opencrypto, deflate, deflate_global, bad, + decomp, 0, __LINE__); + goto bad2; + } + bufp->next = NULL; + bufp->size = size * i; + + bzero(&zbuf, sizeof(z_stream)); + zbuf.zalloc = z_alloc; + zbuf.zfree = z_free; + zbuf.opaque = Z_NULL; + zbuf.next_in = data; /* Data that is going to be processed. */ + zbuf.avail_in = size; /* Total length of data to be processed. */ + zbuf.next_out = bufp->data; + zbuf.avail_out = bufp->size; + + error = decomp ? inflateInit2(&zbuf, window_inflate) : + deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD, + window_deflate, Z_MEMLEVEL, Z_DEFAULT_STRATEGY); + if (error != Z_OK) { + SDT_PROBE3(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__); + goto bad; + } + + for (;;) { + error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) : + deflate(&zbuf, Z_FINISH); + if (error != Z_OK && error != Z_STREAM_END) { + /* + * Unfortunately we are limited to 5 arguments, + * thus use two probes. + */ + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.avail_in, zbuf.avail_out); + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.state->dummy, zbuf.total_out); + goto bad; + } + SDT_PROBE5(opencrypto, deflate, deflate_global, iter, + decomp, error, __LINE__, + zbuf.avail_in, zbuf.avail_out); + SDT_PROBE5(opencrypto, deflate, deflate_global, iter, + decomp, error, __LINE__, + zbuf.state->dummy, zbuf.total_out); + if (decomp && zbuf.avail_in == 0 && error == Z_STREAM_END) { + /* Done. */ + break; + } else if (!decomp && error == Z_STREAM_END) { + /* Done. */ + break; + } else if (zbuf.avail_out == 0) { + struct deflate_buf *p; + + /* We need more output space for another iteration. */ + p = malloc(sizeof(*p) + (size_t)(size * i), + M_CRYPTO_DATA, M_NOWAIT); + if (p == NULL) { + SDT_PROBE3(opencrypto, deflate, deflate_global, + bad, decomp, 0, __LINE__); + goto bad; + } + p->next = NULL; + p->size = size * i; + bufp->next = p; + bufp = p; + zbuf.next_out = bufp->data; + zbuf.avail_out = bufp->size; + } else { + /* Unexpect result. */ + /* + * Unfortunately we are limited to 5 arguments, + * thus, again, use two probes. + */ + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.avail_in, zbuf.avail_out); + SDT_PROBE5(opencrypto, deflate, deflate_global, bad, + decomp, error, __LINE__, + zbuf.state->dummy, zbuf.total_out); + goto bad; + } + } + + result = count = zbuf.total_out; + + *out = malloc(result, M_CRYPTO_DATA, M_NOWAIT); + if (*out == NULL) { + SDT_PROBE3(opencrypto, deflate, deflate_global, bad, + decomp, 0, __LINE__); + goto bad; + } + if (decomp) + inflateEnd(&zbuf); + else + deflateEnd(&zbuf); + output = *out; + for (bufp = bufh; bufp != NULL; ) { + if (count > bufp->size) { + struct deflate_buf *p; + + bcopy(bufp->data, *out, bufp->size); + *out += bufp->size; + count -= bufp->size; + p = bufp; + bufp = bufp->next; + free(p, M_CRYPTO_DATA); + } else { + /* It should be the last buffer. */ + bcopy(bufp->data, *out, count); + *out += count; + free(bufp, M_CRYPTO_DATA); + bufp = NULL; + count = 0; + } + } + *out = output; + SDT_PROBE2(opencrypto, deflate, deflate_global, return, decomp, result); + return result; + +bad: + if (decomp) + inflateEnd(&zbuf); + else + deflateEnd(&zbuf); + for (bufp = bufh; bufp != NULL; ) { + struct deflate_buf *p; + + p = bufp; + bufp = bufp->next; + free(p, M_CRYPTO_DATA); + } +bad2: + *out = NULL; + return 0; +} + +void * +z_alloc(nil, type, size) + void *nil; + u_int type, size; +{ + void *ptr; + + ptr = malloc(type *size, M_CRYPTO_DATA, M_NOWAIT); + return ptr; +} + +void +z_free(nil, ptr) + void *nil, *ptr; +{ + free(ptr, M_CRYPTO_DATA); +} From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 22:49:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3394253; Sun, 8 Dec 2013 22:49:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3ACF15C2; Sun, 8 Dec 2013 22:49:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8MnDjA086351; Sun, 8 Dec 2013 22:49:13 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8MnD37086348; Sun, 8 Dec 2013 22:49:13 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312082249.rB8MnD37086348@svn.freebsd.org> From: Aleksandr Rybalko Date: Sun, 8 Dec 2013 22:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259110 - in head/sys: conf dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 22:49:13 -0000 Author: ray Date: Sun Dec 8 22:49:12 2013 New Revision: 259110 URL: http://svnweb.freebsd.org/changeset/base/259110 Log: o Build syscons(9)'s splash support if both sc and splash are enabled. o Include opt_splash.h for vt(9) to know when splash device is enabled. o Build logo_freebsd.c only if splash and vt are enabled. o Include opt_compat.h to know when we have to respect compatibility. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Dec 8 21:59:46 2013 (r259109) +++ head/sys/conf/files Sun Dec 8 22:49:12 2013 (r259110) @@ -1398,7 +1398,7 @@ dev/exca/exca.c optional cbb dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard -dev/fb/splash.c optional splash +dev/fb/splash.c optional sc splash dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_ic_if.m optional fdt dev/fdt/fdt_pci.c optional fdt pci @@ -2468,7 +2468,7 @@ dev/vt/font/vt_font_default.c optional v dev/vt/font/vt_mouse_cursor.c optional vt dev/vt/hw/fb/vt_fb.c optional vt dev/vt/hw/vga/vga.c optional vt vt_vga -dev/vt/logo/logo_freebsd.c optional vt +dev/vt/logo/logo_freebsd.c optional vt splash dev/vt/vt_buf.c optional vt dev/vt/vt_consolectl.c optional vt dev/vt/vt_core.c optional vt Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Sun Dec 8 21:59:46 2013 (r259109) +++ head/sys/dev/vt/vt.h Sun Dec 8 22:49:12 2013 (r259110) @@ -46,7 +46,9 @@ #include #include +#include "opt_compat.h" #include "opt_syscons.h" +#include "opt_splash.h" #ifndef VT_MAXWINDOWS #ifdef MAXCONS Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sun Dec 8 21:59:46 2013 (r259109) +++ head/sys/dev/vt/vt_core.c Sun Dec 8 22:49:12 2013 (r259110) @@ -794,6 +794,7 @@ vtterm_done(struct terminal *tm) } } +#ifdef DEV_SPLASH static void vtterm_splash(struct vt_device *vd) { @@ -813,6 +814,7 @@ vtterm_splash(struct vt_device *vd) vd->vd_flags |= VDF_SPLASH; } } +#endif static void vtterm_cnprobe(struct terminal *tm, struct consdev *cp) @@ -845,7 +847,9 @@ vtterm_cnprobe(struct terminal *tm, stru vt_winsize(vd, vw->vw_font, &wsz); terminal_set_winsize(tm, &wsz); +#ifdef DEV_SPLASH vtterm_splash(vd); +#endif vd->vd_flags |= VDF_INITIALIZED; main_vd = vd; @@ -1788,8 +1792,10 @@ vt_allocate(struct vt_driver *drv, void /* Refill settings with new sizes. */ vt_resize(vd); +#ifdef DEV_SPLASH if (vd->vd_flags & VDF_SPLASH) vtterm_splash(vd); +#endif if (vd->vd_curwindow != NULL) callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); From owner-svn-src-head@FreeBSD.ORG Sun Dec 8 23:24:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0904B6F; Sun, 8 Dec 2013 23:24:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C149181E; Sun, 8 Dec 2013 23:24:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB8NOWfP000719; Sun, 8 Dec 2013 23:24:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB8NOWLk000718; Sun, 8 Dec 2013 23:24:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312082324.rB8NOWLk000718@svn.freebsd.org> From: Dimitry Andric Date: Sun, 8 Dec 2013 23:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259111 - head/contrib/gcc/config/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 23:24:32 -0000 Author: dim Date: Sun Dec 8 23:24:32 2013 New Revision: 259111 URL: http://svnweb.freebsd.org/changeset/base/259111 Log: Use correct casts in gcc's emmintrin.h for the first arguments of the following builtin functions: * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi * __builtin_ia32_psradi128() takes __v4si instead of __v8hi This should fix the following errors when building the LINT kernel with gcc: sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of '__builtin_ia32_psradi128' sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of '__builtin_ia32_pslldi128' MFC after: 3 days Modified: head/contrib/gcc/config/i386/emmintrin.h Modified: head/contrib/gcc/config/i386/emmintrin.h ============================================================================== --- head/contrib/gcc/config/i386/emmintrin.h Sun Dec 8 22:49:12 2013 (r259110) +++ head/contrib/gcc/config/i386/emmintrin.h Sun Dec 8 23:24:32 2013 (r259111) @@ -1126,9 +1126,9 @@ _mm_slli_epi64 (__m128i __A, int __B) #define _mm_slli_epi16(__A, __B) \ ((__m128i)__builtin_ia32_psllwi128 ((__v8hi)(__A), __B)) #define _mm_slli_epi32(__A, __B) \ - ((__m128i)__builtin_ia32_pslldi128 ((__v8hi)(__A), __B)) + ((__m128i)__builtin_ia32_pslldi128 ((__v4si)(__A), __B)) #define _mm_slli_epi64(__A, __B) \ - ((__m128i)__builtin_ia32_psllqi128 ((__v8hi)(__A), __B)) + ((__m128i)__builtin_ia32_psllqi128 ((__v2di)(__A), __B)) #endif #if 0 @@ -1147,7 +1147,7 @@ _mm_srai_epi32 (__m128i __A, int __B) #define _mm_srai_epi16(__A, __B) \ ((__m128i)__builtin_ia32_psrawi128 ((__v8hi)(__A), __B)) #define _mm_srai_epi32(__A, __B) \ - ((__m128i)__builtin_ia32_psradi128 ((__v8hi)(__A), __B)) + ((__m128i)__builtin_ia32_psradi128 ((__v4si)(__A), __B)) #endif #if 0 From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 01:30:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C53C8AE; Mon, 9 Dec 2013 01:30:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB81F14A1; Mon, 9 Dec 2013 01:30:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB91UKMf045153; Mon, 9 Dec 2013 01:30:20 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB91UK5L045152; Mon, 9 Dec 2013 01:30:20 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312090130.rB91UK5L045152@svn.freebsd.org> From: Devin Teske Date: Mon, 9 Dec 2013 01:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259113 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 01:30:21 -0000 Author: dteske Date: Mon Dec 9 01:30:20 2013 New Revision: 259113 URL: http://svnweb.freebsd.org/changeset/base/259113 Log: Fix failed attempt to send pkg(8) stderr to /dev/null MFC after: 3 days Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Sun Dec 8 23:41:35 2013 (r259112) +++ head/usr.sbin/bsdconfig/share/common.subr Mon Dec 9 01:30:20 2013 (r259113) @@ -64,8 +64,8 @@ export UNAME_M="$( uname -m )" # Machine export UNAME_R="$( uname -r )" # Release Level (i.e. X.Y-RELEASE) if [ ! "${PKG_ABI+set}" ]; then export PKG_ABI="$( - ASSUME_ALWAYS_YES=1 pkg -vv | - awk '$1=="ABI"{print $3;exit}' 2> /dev/null + ASSUME_ALWAYS_YES=1 pkg -vv 2> /dev/null | + awk '$1=="ABI"{print $3;exit}' )" fi From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 02:06:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F13BD62; Mon, 9 Dec 2013 02:06:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE6F016C6; Mon, 9 Dec 2013 02:06:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB926qY2058828; Mon, 9 Dec 2013 02:06:52 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB926q8K058827; Mon, 9 Dec 2013 02:06:52 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201312090206.rB926q8K058827@svn.freebsd.org> From: Alfred Perlstein Date: Mon, 9 Dec 2013 02:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259114 - head/sys/modules/crypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 02:06:53 -0000 Author: alfred Date: Mon Dec 9 02:06:52 2013 New Revision: 259114 URL: http://svnweb.freebsd.org/changeset/base/259114 Log: Chase down cryptodeflate.c change from r259109. Modified: head/sys/modules/crypto/Makefile Modified: head/sys/modules/crypto/Makefile ============================================================================== --- head/sys/modules/crypto/Makefile Mon Dec 9 01:30:20 2013 (r259113) +++ head/sys/modules/crypto/Makefile Mon Dec 9 02:06:52 2013 (r259114) @@ -11,7 +11,7 @@ KMOD = crypto SRCS = crypto.c cryptodev_if.c SRCS += criov.c cryptosoft.c xform.c -SRCS += cast.c deflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c +SRCS += cast.c cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c SRCS += skipjack.c bf_enc.c bf_ecb.c bf_skey.c SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha2.c From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 03:38:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0AFDAF2; Mon, 9 Dec 2013 03:38:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC0521DEB; Mon, 9 Dec 2013 03:38:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB93cIux093836; Mon, 9 Dec 2013 03:38:18 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB93cIww093835; Mon, 9 Dec 2013 03:38:18 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312090338.rB93cIww093835@svn.freebsd.org> From: Devin Teske Date: Mon, 9 Dec 2013 03:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259115 - head/usr.sbin/bsdinstall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 03:38:19 -0000 Author: dteske Date: Mon Dec 9 03:38:18 2013 New Revision: 259115 URL: http://svnweb.freebsd.org/changeset/base/259115 Log: Forgot to utilize feature added in SVN r257782 to prevent truncating /tmp/bsdinstall_log each time we exec a module. MFC after: 3 days Modified: head/usr.sbin/bsdinstall/bsdinstall Modified: head/usr.sbin/bsdinstall/bsdinstall ============================================================================== --- head/usr.sbin/bsdinstall/bsdinstall Mon Dec 9 02:06:52 2013 (r259114) +++ head/usr.sbin/bsdinstall/bsdinstall Mon Dec 9 03:38:18 2013 (r259115) @@ -33,6 +33,7 @@ # re-processing of flags (all children log to the parent's log file). # export DEBUG_SELF_INITIALIZE= +export DEBUG_INITIALIZE_FILE= BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 03:40:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8470AC40; Mon, 9 Dec 2013 03:40:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63C061DFB; Mon, 9 Dec 2013 03:40:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB93e3tE094109; Mon, 9 Dec 2013 03:40:03 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB93e2T3094102; Mon, 9 Dec 2013 03:40:02 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312090340.rB93e2T3094102@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Dec 2013 03:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259116 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 03:40:03 -0000 Author: adrian Date: Mon Dec 9 03:40:02 2013 New Revision: 259116 URL: http://svnweb.freebsd.org/changeset/base/259116 Log: Add some initial support for the Intel 6235. Tested: * Intel 5100 * Intel 6235 Obtained from: mav, others Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwn_chip_cfg.h head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 9 03:38:18 2013 (r259115) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 9 03:40:02 2013 (r259116) @@ -124,15 +124,8 @@ static const struct iwn_ident iwn_ident_ { 0x8086, IWN_DID_5x50_2, "Intel WiMAX/WiFi Link 5350" }, { 0x8086, IWN_DID_5x50_3, "Intel WiMAX/WiFi Link 5150" }, { 0x8086, IWN_DID_5x50_4, "Intel WiMAX/WiFi Link 5150" }, - /* - * These currently don't function; the firmware crashes during - * the startup calibration request. - */ -#if 0 { 0x8086, IWN_DID_6035_1, "Intel Centrino Advanced 6235" }, - /* XXX TODO: figure out which ID this one is? */ { 0x8086, IWN_DID_6035_2, "Intel Centrino Advanced 6235" }, -#endif { 0, 0, NULL } }; @@ -837,8 +830,8 @@ iwn_config_specific(struct iwn_softc *sc case IWN_SDID_6035_3: case IWN_SDID_6035_4: sc->fwname = "iwn6000g2bfw"; - sc->limits = &iwn6000_sensitivity_limits; - sc->base_params = &iwn_6000g2b_base_params; + sc->limits = &iwn6235_sensitivity_limits; + sc->base_params = &iwn_6235_base_params; break; default: device_printf(sc->sc_dev, "adapter type id : 0x%04x sub id :" @@ -5815,7 +5808,7 @@ iwn_send_sensitivity(struct iwn_softc *s cmd.energy_cck = htole16(calib->energy_cck); /* Barker modulation: use default values. */ cmd.corr_barker = htole16(190); - cmd.corr_barker_mrc = htole16(390); + cmd.corr_barker_mrc = htole16(sc->limits->barker_mrc); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: set sensitivity %d/%d/%d/%d/%d/%d/%d\n", __func__, @@ -6648,7 +6641,7 @@ iwn_auth(struct iwn_softc *sc, struct ie sc->rxon->ofdm_mask = 0; } else { /* Assume 802.11b/g. */ - sc->rxon->cck_mask = 0x0f; + sc->rxon->cck_mask = 0x03; sc->rxon->ofdm_mask = 0x15; } DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x cck %x ofdm %x\n", Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h ============================================================================== --- head/sys/dev/iwn/if_iwn_chip_cfg.h Mon Dec 9 03:38:18 2013 (r259115) +++ head/sys/dev/iwn/if_iwn_chip_cfg.h Mon Dec 9 03:40:02 2013 (r259116) @@ -359,6 +359,34 @@ static const struct iwn_base_params iwn_ .bt_mode = IWN_BT_ADVANCED, .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; + +/* + * 6235 series NICs. + */ +static const struct iwn_base_params iwn_6235_base_params = { + .pll_cfg_val = 0, + .max_ll_items = IWN_OTP_MAX_LL_ITEMS_6x00, + .shadow_ram_support = true, + .shadow_reg_enable = true, + .bt_session_2 = false, + .bt_sco_disable = true, + .additional_nic_config = true, + .regulatory_bands = iwn6000_regulatory_bands, + .enhanced_TX_power = true, + .calib_need = + (IWN_FLG_NEED_PHY_CALIB_DC + | IWN_FLG_NEED_PHY_CALIB_LO + | IWN_FLG_NEED_PHY_CALIB_TX_IQ + | IWN_FLG_NEED_PHY_CALIB_BASE_BAND + | IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSET ), + .support_hostap = false, + .no_multi_vaps = true, + /* XXX 1x2? This NIC is 2x2, right? */ + .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2, + .bt_mode = IWN_BT_ADVANCED, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, +}; + static const struct iwn_base_params iwn_5x50_base_params = { .pll_cfg_val = IWN_ANA_PLL_INIT, .max_ll_items = IWN_OTP_MAX_LL_ITEMS_6x00, Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Mon Dec 9 03:38:18 2013 (r259115) +++ head/sys/dev/iwn/if_iwnreg.h Mon Dec 9 03:40:02 2013 (r259116) @@ -2001,6 +2001,7 @@ struct iwn_sensitivity_limits { uint32_t min_energy_cck; uint32_t energy_cck; uint32_t energy_ofdm; + uint32_t barker_mrc; }; /* @@ -2015,7 +2016,8 @@ static const struct iwn_sensitivity_limi 200, 400, 97, 100, - 100 + 100, + 390 }; static const struct iwn_sensitivity_limits iwn5000_sensitivity_limits = { @@ -2027,7 +2029,8 @@ static const struct iwn_sensitivity_limi 170, 400, 95, 95, - 95 + 95, + 390 }; static const struct iwn_sensitivity_limits iwn5150_sensitivity_limits = { @@ -2039,7 +2042,8 @@ static const struct iwn_sensitivity_limi 170, 400, 95, 95, - 95 + 95, + 390, }; static const struct iwn_sensitivity_limits iwn1000_sensitivity_limits = { @@ -2051,7 +2055,8 @@ static const struct iwn_sensitivity_limi 170, 400, 95, 95, - 95 + 95, + 390, }; static const struct iwn_sensitivity_limits iwn6000_sensitivity_limits = { @@ -2063,9 +2068,24 @@ static const struct iwn_sensitivity_limi 160, 310, 97, 97, - 100 + 100, + 390 }; +static const struct iwn_sensitivity_limits iwn6235_sensitivity_limits = { + 105, 110, + 192, 232, + 80, 145, + 128, 232, + 125, 175, + 160, 310, + 100, + 110, + 110, + 336 +}; + + /* Get value from linux kernel 3.2.+ in Drivers/net/wireless/iwlwifi/iwl-2000.c*/ static const struct iwn_sensitivity_limits iwn2030_sensitivity_limits = { 105,110, From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 04:26:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFA80982; Mon, 9 Dec 2013 04:26:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A89CC10D9; Mon, 9 Dec 2013 04:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB94QrAO012278; Mon, 9 Dec 2013 04:26:53 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB94QowN012257; Mon, 9 Dec 2013 04:26:50 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201312090426.rB94QowN012257@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Dec 2013 04:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259117 - head/include/rpcsvc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 04:26:53 -0000 Author: hrs Date: Mon Dec 9 04:26:50 2013 New Revision: 259117 URL: http://svnweb.freebsd.org/changeset/base/259117 Log: Replace Sun RPC license with a 3-clause BSD license. This license change was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. Modified: head/include/rpcsvc/bootparam_prot.x head/include/rpcsvc/key_prot.x head/include/rpcsvc/klm_prot.x head/include/rpcsvc/mount.x head/include/rpcsvc/nfs_prot.x head/include/rpcsvc/nis.x head/include/rpcsvc/nis_callback.x head/include/rpcsvc/nis_object.x head/include/rpcsvc/nis_tags.h head/include/rpcsvc/rex.x head/include/rpcsvc/rnusers.x head/include/rpcsvc/rstat.x head/include/rpcsvc/sm_inter.x head/include/rpcsvc/spray.x head/include/rpcsvc/yp.x head/include/rpcsvc/yppasswd.x Modified: head/include/rpcsvc/bootparam_prot.x ============================================================================== --- head/include/rpcsvc/bootparam_prot.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/bootparam_prot.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/key_prot.x ============================================================================== --- head/include/rpcsvc/key_prot.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/key_prot.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +% * * Redistributions of source code must retain the above copyright +% * notice, this list of conditions and the following disclaimer. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. -% * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. -% * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +% * COPYRIGHT HOLDER 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. % */ /* * Key server protocol definition Modified: head/include/rpcsvc/klm_prot.x ============================================================================== --- head/include/rpcsvc/klm_prot.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/klm_prot.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/mount.x ============================================================================== --- head/include/rpcsvc/mount.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/mount.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/nfs_prot.x ============================================================================== --- head/include/rpcsvc/nfs_prot.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/nfs_prot.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #ifndef RPC_HDR Modified: head/include/rpcsvc/nis.x ============================================================================== --- head/include/rpcsvc/nis.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/nis.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,31 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user or with the express written consent of -% * Sun Microsystems, Inc. -% * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -% * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. +% * * Redistributions of source code must retain the above copyright +% * notice, this list of conditions and the following disclaimer. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +% * COPYRIGHT HOLDER 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. % */ #ifndef RPC_HDR Modified: head/include/rpcsvc/nis_callback.x ============================================================================== --- head/include/rpcsvc/nis_callback.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/nis_callback.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,31 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user or with the express written consent of -% * Sun Microsystems, Inc. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +% * * Redistributions of source code must retain the above copyright +% * notice, this list of conditions and the following disclaimer. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. -% * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. -% * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +% * COPYRIGHT HOLDER 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. % */ /* Modified: head/include/rpcsvc/nis_object.x ============================================================================== --- head/include/rpcsvc/nis_object.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/nis_object.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,31 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user or with the express written consent of -% * Sun Microsystems, Inc. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +% * * Redistributions of source code must retain the above copyright +% * notice, this list of conditions and the following disclaimer. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. -% * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. -% * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +% * COPYRIGHT HOLDER 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. % */ /* @@ -35,6 +36,7 @@ * All Rights Reserved. */ +/* $FreeBSD$ */ /* From: %#pragma ident "@(#)nis_object.x 1.10 94/05/03 SMI" */ #if RPC_HDR Modified: head/include/rpcsvc/nis_tags.h ============================================================================== --- head/include/rpcsvc/nis_tags.h Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/nis_tags.h Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* @@ -41,6 +43,7 @@ #ifndef _RPCSVC_NIS_TAGS_H #define _RPCSVC_NIS_TAGS_H +/* $FreeBSD$ */ /* From: #pragma ident "@(#)nis_tags.h 1.10 94/05/03 SMI" */ /* from file: zns_tags.h 1.7 Copyright (c) 1990 Sun Microsystems */ Modified: head/include/rpcsvc/rex.x ============================================================================== --- head/include/rpcsvc/rex.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/rex.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/rnusers.x ============================================================================== --- head/include/rpcsvc/rnusers.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/rnusers.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/rstat.x ============================================================================== --- head/include/rpcsvc/rstat.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/rstat.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/sm_inter.x ============================================================================== --- head/include/rpcsvc/sm_inter.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/sm_inter.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,33 +1,35 @@ /* @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC */ /* @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/spray.x ============================================================================== --- head/include/rpcsvc/spray.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/spray.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/yp.x ============================================================================== --- head/include/rpcsvc/yp.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/yp.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,32 +1,34 @@ /* @(#)yp.x 2.1 88/08/01 4.0 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: head/include/rpcsvc/yppasswd.x ============================================================================== --- head/include/rpcsvc/yppasswd.x Mon Dec 9 03:40:02 2013 (r259116) +++ head/include/rpcsvc/yppasswd.x Mon Dec 9 04:26:50 2013 (r259117) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 05:01:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B115FF6; Mon, 9 Dec 2013 05:01:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 356F312C1; Mon, 9 Dec 2013 05:01:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB951e61025868; Mon, 9 Dec 2013 05:01:40 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB951c2L025859; Mon, 9 Dec 2013 05:01:38 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201312090501.rB951c2L025859@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Dec 2013 05:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259118 - head/lib/libc/xdr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 05:01:40 -0000 Author: hrs Date: Mon Dec 9 05:01:38 2013 New Revision: 259118 URL: http://svnweb.freebsd.org/changeset/base/259118 Log: Replace Sun RPC license with a 3-clause BSD license. This license change was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. Modified: head/lib/libc/xdr/xdr.c head/lib/libc/xdr/xdr_array.c head/lib/libc/xdr/xdr_float.c head/lib/libc/xdr/xdr_mem.c head/lib/libc/xdr/xdr_rec.c head/lib/libc/xdr/xdr_reference.c head/lib/libc/xdr/xdr_sizeof.c head/lib/libc/xdr/xdr_stdio.c Modified: head/lib/libc/xdr/xdr.c ============================================================================== --- head/lib/libc/xdr/xdr.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,32 +1,34 @@ /* $NetBSD: xdr.c,v 1.22 2000/07/06 03:10:35 christos Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +/*- + * Copyright (c) 2010, Oracle America, Inc. * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #if defined(LIBC_SCCS) && !defined(lint) @@ -39,8 +41,6 @@ __FBSDID("$FreeBSD$"); /* * xdr.c, Generic XDR routines implementation. * - * Copyright (C) 1986, Sun Microsystems, Inc. - * * These are the "generic" xdr routines used to serialize and de-serialize * most common data items. See xdr.h for more info on the interface to * xdr. Modified: head/lib/libc/xdr/xdr_array.c ============================================================================== --- head/lib/libc/xdr/xdr_array.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr_array.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,32 +1,34 @@ /* $NetBSD: xdr_array.c,v 1.12 2000/01/22 22:19:18 mycroft Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. +/*- + * Copyright (c) 2010, Oracle America, Inc. * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #if defined(LIBC_SCCS) && !defined(lint) @@ -39,8 +41,6 @@ __FBSDID("$FreeBSD$"); /* * xdr_array.c, Generic XDR routines impelmentation. * - * Copyright (C) 1984, Sun Microsystems, Inc. - * * These are the "non-trivial" xdr primitives used to serialize and de-serialize * arrays. See xdr.h for more info on the interface to xdr. */ Modified: head/lib/libc/xdr/xdr_float.c ============================================================================== --- head/lib/libc/xdr/xdr_float.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr_float.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,32 +1,34 @@ /* $NetBSD: xdr_float.c,v 1.23 2000/07/17 04:59:51 matt Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +/*- + * Copyright (c) 2010, Oracle America, Inc. * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #if defined(LIBC_SCCS) && !defined(lint) @@ -39,8 +41,6 @@ __FBSDID("$FreeBSD$"); /* * xdr_float.c, Generic XDR routines implementation. * - * Copyright (C) 1984, Sun Microsystems, Inc. - * * These are the "floating point" xdr routines used to (de)serialize * most common data items. See xdr.h for more info on the interface to * xdr. Modified: head/lib/libc/xdr/xdr_mem.c ============================================================================== --- head/lib/libc/xdr/xdr_mem.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr_mem.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,32 +1,34 @@ /* $NetBSD: xdr_mem.c,v 1.15 2000/01/22 22:19:18 mycroft Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +/*- + * Copyright (c) 2010, Oracle America, Inc. * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #if defined(LIBC_SCCS) && !defined(lint) @@ -39,8 +41,6 @@ __FBSDID("$FreeBSD$"); /* * xdr_mem.h, XDR implementation using memory buffers. * - * Copyright (C) 1984, Sun Microsystems, Inc. - * * If you have some data to be interpreted as external data representation * or to be converted to external data representation in a memory buffer, * then this is the package for you. Modified: head/lib/libc/xdr/xdr_rec.c ============================================================================== --- head/lib/libc/xdr/xdr_rec.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr_rec.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,32 +1,34 @@ /* $NetBSD: xdr_rec.c,v 1.18 2000/07/06 03:10:35 christos Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +/*- + * Copyright (c) 2010, Oracle America, Inc. * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #if defined(LIBC_SCCS) && !defined(lint) @@ -40,8 +42,6 @@ __FBSDID("$FreeBSD$"); * xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking" * layer above tcp (for rpc's use). * - * Copyright (C) 1984, Sun Microsystems, Inc. - * * These routines interface XDRSTREAMS to a tcp/ip connection. * There is a record marking layer between the xdr stream * and the tcp transport level. A record is composed on one or more Modified: head/lib/libc/xdr/xdr_reference.c ============================================================================== --- head/lib/libc/xdr/xdr_reference.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr_reference.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,32 +1,34 @@ /* $NetBSD: xdr_reference.c,v 1.13 2000/01/22 22:19:18 mycroft Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #if defined(LIBC_SCCS) && !defined(lint) @@ -39,8 +41,6 @@ __FBSDID("$FreeBSD$"); /* * xdr_reference.c, Generic XDR routines impelmentation. * - * Copyright (C) 1987, Sun Microsystems, Inc. - * * These are the "non-trivial" xdr primitives used to serialize and de-serialize * "pointers". See xdr.h for more info on the interface to xdr. */ Modified: head/lib/libc/xdr/xdr_sizeof.c ============================================================================== --- head/lib/libc/xdr/xdr_sizeof.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr_sizeof.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,36 +1,36 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* * xdr_sizeof.c * - * Copyright 1990 Sun Microsystems, Inc. - * * General purpose routine to see how much space something will use * when serialized using XDR. */ Modified: head/lib/libc/xdr/xdr_stdio.c ============================================================================== --- head/lib/libc/xdr/xdr_stdio.c Mon Dec 9 04:26:50 2013 (r259117) +++ head/lib/libc/xdr/xdr_stdio.c Mon Dec 9 05:01:38 2013 (r259118) @@ -1,32 +1,34 @@ /* $NetBSD: xdr_stdio.c,v 1.14 2000/01/22 22:19:19 mycroft Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. +/*- + * Copyright (c) 2010, Oracle America, Inc. * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ #if defined(LIBC_SCCS) && !defined(lint) @@ -39,8 +41,6 @@ __FBSDID("$FreeBSD$"); /* * xdr_stdio.c, XDR implementation on standard i/o file. * - * Copyright (C) 1984, Sun Microsystems, Inc. - * * This set of routines implements a XDR on a stdio stream. * XDR_ENCODE serializes onto the stream, XDR_DECODE de-serializes * from the stream. From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 07:14:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEA1159F; Mon, 9 Dec 2013 07:14:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE9611AAE; Mon, 9 Dec 2013 07:14:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB97ExMU073314; Mon, 9 Dec 2013 07:14:59 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB97ExFe073313; Mon, 9 Dec 2013 07:14:59 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201312090714.rB97ExFe073313@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Mon, 9 Dec 2013 07:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259121 - head/sys/arm/rockchip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 07:15:00 -0000 Author: ganbold (doc committer) Date: Mon Dec 9 07:14:59 2013 New Revision: 259121 URL: http://svnweb.freebsd.org/changeset/base/259121 Log: Add gpio parse routines according to sys/boot/fdt/dts/bindings-gpio.txt. Reviewed by: stas@ Modified: head/sys/arm/rockchip/rk30xx_gpio.c Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Mon Dec 9 07:00:39 2013 (r259120) +++ head/sys/arm/rockchip/rk30xx_gpio.c Mon Dec 9 07:14:59 2013 (r259121) @@ -86,6 +86,26 @@ struct rk30_gpio_softc { struct gpio_pin sc_gpio_pins[RK30_GPIO_PINS]; }; +static struct rk30_gpio_softc *rk30_gpio_sc = NULL; + +typedef int (*gpios_phandler_t)(phandle_t, pcell_t *, int); + +struct gpio_ctrl_entry { + const char *compat; + gpios_phandler_t handler; +}; + +int rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len); +int platform_gpio_init(void); + +struct gpio_ctrl_entry gpio_controllers[] = { + { "rockchip,rk30xx-gpio", &rk30_gpios_prop_handle }, + { "rockchip,rk30xx-gpio", &rk30_gpios_prop_handle }, + { "rockchip,rk30xx-gpio", &rk30_gpios_prop_handle }, + { "rockchip,rk30xx-gpio", &rk30_gpios_prop_handle }, + { NULL, NULL } +}; + #define RK30_GPIO_LOCK(_sc) mtx_lock(&_sc->sc_mtx) #define RK30_GPIO_UNLOCK(_sc) mtx_unlock(&_sc->sc_mtx) #define RK30_GPIO_LOCK_ASSERT(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) @@ -436,6 +456,9 @@ rk30_gpio_attach(device_t dev) int i, rid; phandle_t gpio; + if (rk30_gpio_sc) + return (ENXIO); + sc->sc_dev = dev; mtx_init(&sc->sc_mtx, "rk30 gpio", "gpio", MTX_DEF); @@ -480,6 +503,11 @@ rk30_gpio_attach(device_t dev) device_add_child(dev, "gpioc", device_get_unit(dev)); device_add_child(dev, "gpiobus", device_get_unit(dev)); + + rk30_gpio_sc = sc; + + platform_gpio_init(); + return (bus_generic_attach(dev)); fail: @@ -525,3 +553,121 @@ static driver_t rk30_gpio_driver = { }; DRIVER_MODULE(rk30_gpio, simplebus, rk30_gpio_driver, rk30_gpio_devclass, 0, 0); + +int +rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len) +{ + struct rk30_gpio_softc *sc; + pcell_t gpio_cells; + int inc, t, tuples, tuple_size; + int dir, flags, pin, i; + u_long gpio_ctrl, size; + + sc = rk30_gpio_sc; + if (sc == NULL) + return ENXIO; + + if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) + return (ENXIO); + + gpio_cells = fdt32_to_cpu(gpio_cells); + if (gpio_cells != 2) + return (ENXIO); + + tuple_size = gpio_cells * sizeof(pcell_t) + sizeof(phandle_t); + tuples = len / tuple_size; + + if (fdt_regsize(ctrl, &gpio_ctrl, &size)) + return (ENXIO); + + /* + * Skip controller reference, since controller's phandle is given + * explicitly (in a function argument). + */ + inc = sizeof(ihandle_t) / sizeof(pcell_t); + gpios += inc; + for (t = 0; t < tuples; t++) { + pin = fdt32_to_cpu(gpios[0]); + dir = fdt32_to_cpu(gpios[1]); + flags = fdt32_to_cpu(gpios[2]); + + for (i = 0; i < sc->sc_gpio_npins; i++) { + if (sc->sc_gpio_pins[i].gp_pin == pin) + break; + } + if (i >= sc->sc_gpio_npins) + return (EINVAL); + + rk30_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); + + if (dir == 1) { + /* Input. */ + rk30_gpio_pin_set(sc->sc_dev, pin, RK30_GPIO_INPUT); + } else { + /* Output. */ + rk30_gpio_pin_set(sc->sc_dev, pin, RK30_GPIO_OUTPUT); + } + gpios += gpio_cells + inc; + } + + return (0); +} + +#define MAX_PINS_PER_NODE 5 +#define GPIOS_PROP_CELLS 4 + +int +platform_gpio_init(void) +{ + phandle_t child, parent, root, ctrl; + pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; + struct gpio_ctrl_entry *e; + int len, rv; + + root = OF_finddevice("/"); + len = 0; + parent = root; + + /* Traverse through entire tree to find nodes with 'gpios' prop */ + for (child = OF_child(parent); child != 0; child = OF_peer(child)) { + + /* Find a 'leaf'. Start the search from this node. */ + while (OF_child(child)) { + parent = child; + child = OF_child(child); + } + if ((len = OF_getproplen(child, "gpios")) > 0) { + + if (len > sizeof(gpios)) + return (ENXIO); + + /* Get 'gpios' property. */ + OF_getprop(child, "gpios", &gpios, len); + + e = (struct gpio_ctrl_entry *)&gpio_controllers; + + /* Find and call a handler. */ + for (; e->compat; e++) { + /* + * First cell of 'gpios' property should + * contain a ref. to a node defining GPIO + * controller. + */ + ctrl = OF_xref_phandle(fdt32_to_cpu(gpios[0])); + + if (fdt_is_compatible(ctrl, e->compat)) + /* Call a handler. */ + if ((rv = e->handler(ctrl, + (pcell_t *)&gpios, len))) + return (rv); + } + } + + if (OF_peer(child) == 0) { + /* No more siblings. */ + child = parent; + parent = OF_parent(child); + } + } + return (0); +} From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 07:15:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3964B8CF; Mon, 9 Dec 2013 07:15:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25E761AD0; Mon, 9 Dec 2013 07:15:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB97FlQR073497; Mon, 9 Dec 2013 07:15:47 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB97FlBZ073496; Mon, 9 Dec 2013 07:15:47 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201312090715.rB97FlBZ073496@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Mon, 9 Dec 2013 07:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259122 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 07:15:47 -0000 Author: ganbold (doc committer) Date: Mon Dec 9 07:15:46 2013 New Revision: 259122 URL: http://svnweb.freebsd.org/changeset/base/259122 Log: Add gpio config for usb1 in dts. That way it gives power to other usb hub via gpio at boot time. Reviewed by: stas@ Modified: head/sys/boot/fdt/dts/rk3188.dtsi Modified: head/sys/boot/fdt/dts/rk3188.dtsi ============================================================================== --- head/sys/boot/fdt/dts/rk3188.dtsi Mon Dec 9 07:14:59 2013 (r259121) +++ head/sys/boot/fdt/dts/rk3188.dtsi Mon Dec 9 07:15:46 2013 (r259122) @@ -174,6 +174,7 @@ interrupt-parent = <&GIC>; #address-cells = <1>; #size-cells = <0>; + gpios = <&gpio0 3 2 2>; }; uart0: serial@10124000 { From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 07:26:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A434B6B; Mon, 9 Dec 2013 07:26:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 766601C8D; Mon, 9 Dec 2013 07:26:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB97QuKv077111; Mon, 9 Dec 2013 07:26:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB97QuVA077110; Mon, 9 Dec 2013 07:26:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312090726.rB97QuVA077110@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 9 Dec 2013 07:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259123 - head/sys/modules/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 07:26:56 -0000 Author: hselasky Date: Mon Dec 9 07:26:55 2013 New Revision: 259123 URL: http://svnweb.freebsd.org/changeset/base/259123 Log: Make it easier to test build the USB code having the debug flags set without having to build the complete kernel. MFC after: 2 weeks Modified: head/sys/modules/usb/Makefile Modified: head/sys/modules/usb/Makefile ============================================================================== --- head/sys/modules/usb/Makefile Mon Dec 9 07:15:46 2013 (r259122) +++ head/sys/modules/usb/Makefile Mon Dec 9 07:26:55 2013 (r259123) @@ -27,6 +27,18 @@ .include +# +# Check for common USB debug flags to pass when building the USB +# modules in this directory: +# +.if defined(USB_DEBUG) +MAKE+=" DEBUG_FLAGS+=-DUSB_DEBUG" +.endif + +.if defined(USB_DEBUG) && defined(USB_REQ_DEBUG) +MAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG" +.endif + # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 08:51:50 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5118EECE; Mon, 9 Dec 2013 08:51:50 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1139F129A; Mon, 9 Dec 2013 08:51:48 +0000 (UTC) Received: from alph.d.allbsd.org (p2106-ipbf2009funabasi.chiba.ocn.ne.jp [114.146.169.106]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id rB98pTs1084555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Dec 2013 17:51:39 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.7/8.14.5) with ESMTP id rB98pSDb068697; Mon, 9 Dec 2013 17:51:28 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 09 Dec 2013 17:51:19 +0900 (JST) Message-Id: <20131209.175119.597284254662875353.hrs@allbsd.org> To: peter@FreeBSD.org Subject: Re: svn commit: r259094 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <201312080555.rB85tu8W016979@svn.freebsd.org> References: <201312080555.rB85tu8W016979@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Dec__9_17_51_19_2013_503)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Mon, 09 Dec 2013 17:51:40 +0900 (JST) X-Spam-Status: No, score=-94.3 required=13.0 tests=CONTENT_TYPE_PRESENT, RCVD_IN_PBL,RCVD_IN_RP_RNBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 08:51:50 -0000 ----Security_Multipart(Mon_Dec__9_17_51_19_2013_503)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Peter, Peter Wemm wrote in <201312080555.rB85tu8W016979@svn.freebsd.org>: pe> Author: peter pe> Date: Sun Dec 8 05:55:55 2013 pe> New Revision: 259094 pe> URL: http://svnweb.freebsd.org/changeset/base/259094 pe> pe> Log: pe> Rev 256256 had an undocumented side effect of breaking existing behavior pe> for ipv6 jails. pe> pe> Among the harmful side effects included putting a route to an entire /64 pe> onto an interface even if you were in a smaller network - eg: /80. pe> This broke the freebsd.org cluster hosted at ISC which has /80 networks. pe> pe> Modified: pe> head/etc/rc.d/jail The reason why it was changed is that I think an IPv6 GUA with no prefix length information should always be interpret as a /64 because the other tools like ifconfig do so. IPv6 is designed to always use a correct prefix length and avoid using a /128 for aliases. Is there a problem with specifying a /80 address to ip6.addr if a box is on a /80 network? I know many people are using 2001:db8::1/80 + 2001:db8::2/128 on the same interface similar to 192.168.0.1/24 + 192.168.0.2/32. It certainly works, but the both should be /80.... -- Hiroki ----Security_Multipart(Mon_Dec__9_17_51_19_2013_503)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlKlhIcACgkQTyzT2CeTzy3wRgCbBu4WPPvfOg8c/bWpaYPug2e7 ne4AnjdqYfniXkm3rFTjj4ySHGUX/aTo =vPFj -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Dec__9_17_51_19_2013_503)---- From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 11:33:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21AF8D7; Mon, 9 Dec 2013 11:33:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 016A311B3; Mon, 9 Dec 2013 11:33:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9BXj9a068146; Mon, 9 Dec 2013 11:33:45 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9BXjjp068145; Mon, 9 Dec 2013 11:33:45 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312091133.rB9BXjjp068145@svn.freebsd.org> From: Luiz Otavio O Souza Date: Mon, 9 Dec 2013 11:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259125 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 11:33:46 -0000 Author: loos Date: Mon Dec 9 11:33:45 2013 New Revision: 259125 URL: http://svnweb.freebsd.org/changeset/base/259125 Log: Fix a few typos on the scm (control module) pin mux definitions. Approved by: adrian (mentor) Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.c Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_scm_padconf.c Mon Dec 9 08:39:33 2013 (r259124) +++ head/sys/arm/ti/am335x/am335x_scm_padconf.c Mon Dec 9 11:33:45 2013 (r259125) @@ -170,8 +170,8 @@ const struct ti_scm_padconf ti_padconf_d _PIN(0x948, "MDIO", 0, 7, "mdio_data", "timer6", "uart5_rxd", "uart3_ctsn", "mmc0_sdcd","mmc1_cmd", "mmc2_cmd","gpio0_0"), _PIN(0x94c, "MDC", 1, 7, "mdio_clk", "timer5", "uart5_txd", "uart3_rtsn", "mmc0_sdwp", "mmc1_clk", "mmc2_clk", "gpio0_1"), _PIN(0x950, "SPI0_SCLK", 2, 7, "spi0_sclk", "uart2_rxd", "I2C2_SDA", "ehrpwm0A", "pr1_uart0_cts_n", "pr1_edio_sof", "EMU2", "gpio0_2"), - _PIN(0x954, "SPI0_D0", 3, 7, "spi0_d0", "uart2_txd", "i2C2_SCL", "ehrpwm0B", "pr1_uart0_rts_n", "pr1_edio_latch_in", "EMU3", "gpio0_3"), - _PIN(0x958, "SPIO_D1", 4, 7, "spi0_d1", "mmc1_sdwp", "I2C1_SDA", "ehrpwm0_tripzone_input", "pr1_uart0_rxd", "pr1_edio_data_in0", "pr1_edio_data_out0", "gpio0_4"), + _PIN(0x954, "SPI0_D0", 3, 7, "spi0_d0", "uart2_txd", "I2C2_SCL", "ehrpwm0B", "pr1_uart0_rts_n", "pr1_edio_latch_in", "EMU3", "gpio0_3"), + _PIN(0x958, "SPI0_D1", 4, 7, "spi0_d1", "mmc1_sdwp", "I2C1_SDA", "ehrpwm0_tripzone_input", "pr1_uart0_rxd", "pr1_edio_data_in0", "pr1_edio_data_out0", "gpio0_4"), _PIN(0x95c, "SPI0_CS0", 5, 7, "spi0_cs0", "mmc2_sdwp", "I2C1_SCL", "ehrpwm0_synci", "pr1_uart0_txd", "pr1_edio_data_in1", "pr1_edio_data_out1", "gpio0_5"), _PIN(0x960, "SPI0_CS1", 6, 7, "spi0_cs1", "uart3_rxd", "eCAP1_in_PWM1_out", "mcc0_pow", "xdm_event_intr2", "mmc0_sdcd", "EMU4", "gpio0_6"), _PIN(0x964, "ECAP0_IN_PWM0_OUT",7, 7, "eCAP0_in_PWM0_out", "uart3_txd", "spi1_cs1", "pr1_ecap0_ecap_capin_apwm_o", "spi1_sclk", "mmc0_sdwp", "xdma_event_intr2", "gpio0_7"), @@ -180,7 +180,7 @@ const struct ti_scm_padconf ti_padconf_d _PIN(0x970, "UART0_rxd", 42, 7, "uart0_rxd", "spi1_cs0", "dcan0_tx", "I2C2_SDA", "eCAP2_in_PWM2_out", "pr1_pru1_pru_r30_14", "pr1_pru1_pru_r31_14", "gpio1_10"), _PIN(0x974, "UART0_txd", 43, 7, "uart0_txd", "spi1_cs1", "dcan0_rx", "I2C2_SCL", "eCAP1_in_PWM1_out", "pr1_pru1_pru_r30_15", "pr1_pru1_pru_r31_15", "gpio1_11"), _PIN(0x978, "UART1_CTSn", 12, 7, "uart1_ctsn", "timer6_mux1", "dcan0_tx", "I2C2_SDA", "spi1_cs0", "pr1_uart0_cts_n", "pr1_edc_latch0_in", "gpio0_12"), - _PIN(0x97c, "UART1_RTSn", 13, 7, "uart1_rtsn", "timer5_mux1", "dcan0_rx", "I2C2_SCL", "spi1_cs1", "pr1_uart0_rts_n ", "pr1_edc_latch1_in", "gpio0_13"), + _PIN(0x97c, "UART1_RTSn", 13, 7, "uart1_rtsn", "timer5_mux1", "dcan0_rx", "I2C2_SCL", "spi1_cs1", "pr1_uart0_rts_n", "pr1_edc_latch1_in", "gpio0_13"), _PIN(0x980, "UART1_RXD", 14, 7, "uart1_rxd", "mmc1_sdwp", "dcan1_tx", "I2C1_SDA", NULL, "pr1_uart0_rxd", "pr1_pru1_pru_r31_16", "gpio0_14"), _PIN(0x984, "UART1_TXD", 15, 7, "uart1_txd", "mmc2_sdwp", "dcan1_rx", "I2C1_SCL", NULL, "pr1_uart0_txd", "pr1_pru0_pru_r31_16", "gpio0_15"), _PIN(0x988, "I2C0_SDA", 101, 7, "I2C0_SDA", "timer4", "uart2_ctsn", "eCAP2_in_PWM2_out", NULL, NULL, NULL, "gpio3_5"), From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 11:51:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8070C99A; Mon, 9 Dec 2013 11:51:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B75C12ED; Mon, 9 Dec 2013 11:51:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9BpIXq075340; Mon, 9 Dec 2013 11:51:18 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9BpIOJ075339; Mon, 9 Dec 2013 11:51:18 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312091151.rB9BpIOJ075339@svn.freebsd.org> From: Luiz Otavio O Souza Date: Mon, 9 Dec 2013 11:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259126 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 11:51:18 -0000 Author: loos Date: Mon Dec 9 11:51:17 2013 New Revision: 259126 URL: http://svnweb.freebsd.org/changeset/base/259126 Log: Activate the device before attempt to access any of its registers. Without this change we may end up with a panic (Fatal kernel mode data abort: 'External Non-Linefetch Abort (S)') as described in http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx. It is now possible to bring up I2C1 and I2C2 on BBB. Approved by: adrian (mentor) Modified: head/sys/arm/ti/ti_i2c.c Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Mon Dec 9 11:33:45 2013 (r259125) +++ head/sys/arm/ti/ti_i2c.c Mon Dec 9 11:51:17 2013 (r259126) @@ -1076,20 +1076,20 @@ ti_i2c_attach(device_t dev) goto out; } - /* XXXOMAP3: FIXME get proper revision here */ - /* First read the version number of the I2C module */ - sc->sc_rev = ti_i2c_read_2(sc, I2C_REG_REVNB_HI) & 0xff; - - device_printf(dev, "I2C revision %d.%d\n", sc->sc_rev >> 4, - sc->sc_rev & 0xf); - - /* Activate the H/W */ + /* First we _must_ activate the H/W */ err = ti_i2c_activate(dev); if (err) { device_printf(dev, "ti_i2c_activate failed\n"); goto out; } + /* XXXOMAP3: FIXME get proper revision here */ + /* Read the version number of the I2C module */ + sc->sc_rev = ti_i2c_read_2(sc, I2C_REG_REVNB_HI) & 0xff; + + device_printf(dev, "I2C revision %d.%d\n", sc->sc_rev >> 4, + sc->sc_rev & 0xf); + /* activate the interrupt */ err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, ti_i2c_intr, sc, &sc->sc_irq_h); From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 12:01:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8F04D95; Mon, 9 Dec 2013 12:01:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A493013BA; Mon, 9 Dec 2013 12:01:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9C1Hbj079034; Mon, 9 Dec 2013 12:01:17 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9C1HhH079033; Mon, 9 Dec 2013 12:01:17 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312091201.rB9C1HhH079033@svn.freebsd.org> From: Luiz Otavio O Souza Date: Mon, 9 Dec 2013 12:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259127 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 12:01:17 -0000 Author: loos Date: Mon Dec 9 12:01:17 2013 New Revision: 259127 URL: http://svnweb.freebsd.org/changeset/base/259127 Log: Bring the RPi I2C driver in line with ti_i2c. Make it treat any slave address as a 7-bit address. Approved by: adrian (mentor) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Mon Dec 9 11:51:17 2013 (r259126) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Mon Dec 9 12:01:17 2013 (r259127) @@ -404,7 +404,7 @@ bcm_bsc_transfer(device_t dev, struct ii for (i = 0; i < nmsgs; i++) { /* Write the slave address. */ - BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, (msgs[i].slave >> 1) & 0x7f); + BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, msgs[i].slave); /* Write the data length. */ BCM_BSC_WRITE(sc, BCM_BSC_DLEN, msgs[i].len); From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 15:01:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD457FCA; Mon, 9 Dec 2013 15:01:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A88F11166; Mon, 9 Dec 2013 15:01:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9F1Z5C053012; Mon, 9 Dec 2013 15:01:35 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9F1YOJ053006; Mon, 9 Dec 2013 15:01:34 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312091501.rB9F1YOJ053006@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 9 Dec 2013 15:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259129 - in head/sys/dev/vt: . font X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 15:01:35 -0000 Author: ray Date: Mon Dec 9 15:01:34 2013 New Revision: 259129 URL: http://svnweb.freebsd.org/changeset/base/259129 Log: Respect SC_NO_CUTPASTE option. It disable mouse cursor and cut/paste support for vt(9). Note: /dev/sysmouse not affected. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/font/vt_mouse_cursor.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_buf.c head/sys/dev/vt/vt_core.c head/sys/dev/vt/vt_sysmouse.c Modified: head/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- head/sys/dev/vt/font/vt_mouse_cursor.c Mon Dec 9 13:44:07 2013 (r259128) +++ head/sys/dev/vt/font/vt_mouse_cursor.c Mon Dec 9 15:01:34 2013 (r259129) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#ifndef SC_NO_CUTPASTE struct mouse_cursor vt_default_mouse_pointer = { .map = { 0x00, /* "__ " */ @@ -66,3 +67,4 @@ struct mouse_cursor vt_default_mouse_poi .w = 8, .h = 13, }; +#endif Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Mon Dec 9 13:44:07 2013 (r259128) +++ head/sys/dev/vt/vt.h Mon Dec 9 15:01:34 2013 (r259129) @@ -181,15 +181,17 @@ void vtbuf_init(struct vt_buf *, const t void vtbuf_grow(struct vt_buf *, const term_pos_t *, int); void vtbuf_putchar(struct vt_buf *, const term_pos_t *, term_char_t); void vtbuf_cursor_position(struct vt_buf *, const term_pos_t *); -void vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row); -void vtbuf_cursor_visibility(struct vt_buf *, int); void vtbuf_scroll_mode(struct vt_buf *vb, int yes); void vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask *); void vtbuf_sethistory_size(struct vt_buf *, int); -int vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row); int vtbuf_iscursor(struct vt_buf *vb, int row, int col); +void vtbuf_cursor_visibility(struct vt_buf *, int); +#ifndef SC_NO_CUTPASTE +void vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row); +int vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row); int vtbuf_get_marked_len(struct vt_buf *vb); void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz); +#endif #define VTB_MARK_NONE 0 #define VTB_MARK_END 1 @@ -389,12 +391,14 @@ struct vt_font { unsigned int vf_refcount; }; +#ifndef SC_NO_CUTPASTE struct mouse_cursor { uint8_t map[64 * 64 / 8]; uint8_t mask[64 * 64 / 8]; uint8_t w; uint8_t h; }; +#endif const uint8_t *vtfont_lookup(const struct vt_font *vf, term_char_t c); struct vt_font *vtfont_ref(struct vt_font *vf); @@ -403,8 +407,10 @@ int vtfont_load(vfnt_t *f, struct vt_f /* Sysmouse. */ void sysmouse_process_event(mouse_info_t *mi); +#ifndef SC_NO_CUTPASTE void vt_mouse_event(int type, int x, int y, int event, int cnt); void vt_mouse_state(int show); +#endif #define VT_MOUSE_SHOW 1 #define VT_MOUSE_HIDE 0 Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Mon Dec 9 13:44:07 2013 (r259128) +++ head/sys/dev/vt/vt_buf.c Mon Dec 9 15:01:34 2013 (r259129) @@ -135,6 +135,7 @@ vthistory_getpos(const struct vt_buf *vb *offset = vb->vb_roffset; } +#ifndef SC_NO_CUTPASTE /* Only mouse support use it now. */ /* Translate current view row number to history row. */ static int vtbuf_wth(struct vt_buf *vb, int row) @@ -142,6 +143,7 @@ vtbuf_wth(struct vt_buf *vb, int row) return ((vb->vb_roffset + row) % vb->vb_history_size); } +#endif /* Translate history row to current view row number. */ static int @@ -531,6 +533,7 @@ vtbuf_cursor_position(struct vt_buf *vb, } } +#ifndef SC_NO_CUTPASTE void vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row) { @@ -691,6 +694,7 @@ vtbuf_set_mark(struct vt_buf *vb, int ty vtbuf_flush_mark(vb); return (1); } +#endif void vtbuf_cursor_visibility(struct vt_buf *vb, int yes) Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Mon Dec 9 13:44:07 2013 (r259128) +++ head/sys/dev/vt/vt_core.c Mon Dec 9 15:01:34 2013 (r259129) @@ -127,7 +127,9 @@ extern unsigned char vt_logo_image[]; /* Font. */ extern struct vt_font vt_font_default; +#ifndef SC_NO_CUTPASTE extern struct mouse_cursor vt_default_mouse_pointer; +#endif static int signal_vt_rel(struct vt_window *); static int signal_vt_acq(struct vt_window *); @@ -689,12 +691,14 @@ vt_flush(struct vt_device *vd) struct vt_window *vw = vd->vd_curwindow; struct vt_font *vf = vw->vw_font; struct vt_bufmask tmask; - struct mouse_cursor *m; unsigned int row, col; term_rect_t tarea; term_pos_t size; term_char_t *r; +#ifndef SC_NO_CUTPASTE + struct mouse_cursor *m; int bpl, h, w; +#endif if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; @@ -711,11 +715,13 @@ vt_flush(struct vt_device *vd) vd->vd_flags &= ~VDF_INVALID; } +#ifndef SC_NO_CUTPASTE if ((vw->vw_flags & VWF_MOUSE_HIDE) == 0) { /* Mark last mouse position as dirty to erase. */ vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_mdirtyx, vd->vd_mdirtyy); } +#endif for (row = tarea.tr_begin.tp_row; row < tarea.tr_end.tp_row; row++) { if (!VTBUF_DIRTYROW(&tmask, row)) @@ -731,6 +737,7 @@ vt_flush(struct vt_device *vd) } } +#ifndef SC_NO_CUTPASTE /* Mouse disabled. */ if (vw->vw_flags & VWF_MOUSE_HIDE) return; @@ -759,6 +766,7 @@ vt_flush(struct vt_device *vd) vd->vd_mdirtyx = vd->vd_mx / vf->vf_width; vd->vd_mdirtyy = vd->vd_my / vf->vf_height; } +#endif } static void @@ -1106,6 +1114,7 @@ finish_vt_acq(struct vt_window *vw) return (EINVAL); } +#ifndef SC_NO_CUTPASTE void vt_mouse_event(int type, int x, int y, int event, int cnt) { @@ -1265,6 +1274,7 @@ vt_mouse_state(int show) break; } } +#endif static int vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t data, Modified: head/sys/dev/vt/vt_sysmouse.c ============================================================================== --- head/sys/dev/vt/vt_sysmouse.c Mon Dec 9 13:44:07 2013 (r259128) +++ head/sys/dev/vt/vt_sysmouse.c Mon Dec 9 15:01:34 2013 (r259129) @@ -190,9 +190,11 @@ sysmouse_process_event(mouse_info_t *mi) sysmouse_buf_store(buf); +#ifndef SC_NO_CUTPASTE mtx_unlock(&sysmouse_lock); vt_mouse_event(mi->operation, x, y, mi->u.event.id, mi->u.event.value); return; +#endif done: mtx_unlock(&sysmouse_lock); } @@ -345,7 +347,9 @@ sysmouse_ioctl(struct cdev *dev, u_long return (EINVAL); sysmouse_level = level; +#ifndef SC_NO_CUTPASTE vt_mouse_state((level == 0)?VT_MOUSE_SHOW:VT_MOUSE_HIDE); +#endif return (0); } case MOUSE_SETMODE: { @@ -358,8 +362,10 @@ sysmouse_ioctl(struct cdev *dev, u_long case 0: case 1: sysmouse_level = mode->level; +#ifndef SC_NO_CUTPASTE vt_mouse_state((mode->level == 0)?VT_MOUSE_SHOW: VT_MOUSE_HIDE); +#endif break; default: return (EINVAL); From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 15:28:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66A73A52; Mon, 9 Dec 2013 15:28:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5292F1322; Mon, 9 Dec 2013 15:28:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9FSZ9Z061524; Mon, 9 Dec 2013 15:28:35 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9FSYFE061522; Mon, 9 Dec 2013 15:28:34 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312091528.rB9FSYFE061522@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 9 Dec 2013 15:28:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259130 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 15:28:35 -0000 Author: ray Date: Mon Dec 9 15:28:34 2013 New Revision: 259130 URL: http://svnweb.freebsd.org/changeset/base/259130 Log: o Compat options have to be defined before sys/ioccom.h included, so move inclusion of right after sys/param.h. o Only vt_core module use compat options, move it from common header to module. Reported by: Larry Rosenman ler at lerctr dot org Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Mon Dec 9 15:01:34 2013 (r259129) +++ head/sys/dev/vt/vt.h Mon Dec 9 15:28:34 2013 (r259130) @@ -46,7 +46,6 @@ #include #include -#include "opt_compat.h" #include "opt_syscons.h" #include "opt_splash.h" Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Mon Dec 9 15:01:34 2013 (r259129) +++ head/sys/dev/vt/vt_core.c Mon Dec 9 15:28:34 2013 (r259130) @@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$"); #include + +#include "opt_compat.h" + #include #include #include From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 15:39:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FA67242; Mon, 9 Dec 2013 15:39:17 +0000 (UTC) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id CF1831454; Mon, 9 Dec 2013 15:39:16 +0000 (UTC) Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id E9300C493D; Mon, 9 Dec 2013 17:39:15 +0200 (EET) Date: Mon, 9 Dec 2013 17:39:52 +0200 From: Aleksandr Rybalko To: Marius Strobl Subject: Re: svn commit: r259102 - head/sys/sparc64/sparc64 Message-Id: <20131209173952.d6e3d3fb0fb5c9e84bc41bfb@ddteam.net> In-Reply-To: <201312081525.rB8FPJK0023252@svn.freebsd.org> References: <201312081525.rB8FPJK0023252@svn.freebsd.org> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 15:39:17 -0000 On Sun, 8 Dec 2013 15:25:19 +0000 (UTC) Marius Strobl wrote: > Author: marius > Date: Sun Dec 8 15:25:19 2013 > New Revision: 259102 > URL: http://svnweb.freebsd.org/changeset/base/259102 > > Log: > Restore a vital comment nuked in r259016. > > Modified: > head/sys/sparc64/sparc64/machdep.c > > Modified: head/sys/sparc64/sparc64/machdep.c > ============================================================================== > --- head/sys/sparc64/sparc64/machdep.c Sun Dec 8 14:21:54 2013 (r259101) > +++ head/sys/sparc64/sparc64/machdep.c Sun Dec 8 15:25:19 2013 (r259102) > @@ -553,6 +553,13 @@ sparc64_init(caddr_t mdp, u_long o1, u_l > * trigger a fatal reset error or worse things further down the road. > * XXX it should be possible to use this solely instead of writing > * %tba in cpu_setregs(). Doing so causes a hang however. > + * > + * NB: the low-level console drivers require a working DELAY() and > + * some compiler optimizations may cause the curthread accesses of > + * mutex(9) to be factored out even if the latter aren't actually > + * called. Both of these require PCPU_REG to be set. However, we > + * can't set PCPU_REG without also taking over the trap table or the > + * firmware will overwrite it. > */ > sun4u_set_traptable(tl0_base); > Oh, I'm sorry. It was old fix. Seems it here since 2009. Thanks. WBW -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 18:52:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B62F38CE; Mon, 9 Dec 2013 18:52:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A22DD1554; Mon, 9 Dec 2013 18:52:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9IqLvJ038414; Mon, 9 Dec 2013 18:52:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9IqLp1038413; Mon, 9 Dec 2013 18:52:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312091852.rB9IqLp1038413@svn.freebsd.org> From: Xin LI Date: Mon, 9 Dec 2013 18:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259131 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 18:52:21 -0000 Author: delphij Date: Mon Dec 9 18:52:21 2013 New Revision: 259131 URL: http://svnweb.freebsd.org/changeset/base/259131 Log: Don't panic when we get ZPOOL_STATUS_NON_NATIVE_ASHIFT while listing importable pools. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Dec 9 15:28:34 2013 (r259130) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Dec 9 18:52:21 2013 (r259131) @@ -1702,6 +1702,12 @@ show_import(nvlist_t *config) "resilvered.\n")); break; + case ZPOOL_STATUS_NON_NATIVE_ASHIFT: + (void) printf(gettext("status: One or more devices were " + "configured to use a non-native block size.\n" + "\tExpect reduced performance.\n")); + break; + default: /* * No other status can be seen when importing pools. From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 18:57:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF41CDA7; Mon, 9 Dec 2013 18:57:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D50D315DB; Mon, 9 Dec 2013 18:57:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9IvKYL039119; Mon, 9 Dec 2013 18:57:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9IvKqo039117; Mon, 9 Dec 2013 18:57:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312091857.rB9IvKqo039117@svn.freebsd.org> From: Eitan Adler Date: Mon, 9 Dec 2013 18:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259132 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 18:57:21 -0000 Author: eadler Date: Mon Dec 9 18:57:20 2013 New Revision: 259132 URL: http://svnweb.freebsd.org/changeset/base/259132 Log: Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i' as a case insensitive flag. PR: standards/184641 Requested by: David A. Wheeler MFC After: 1 week Modified: head/usr.bin/sed/compile.c head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/compile.c ============================================================================== --- head/usr.bin/sed/compile.c Mon Dec 9 18:52:21 2013 (r259131) +++ head/usr.bin/sed/compile.c Mon Dec 9 18:57:20 2013 (r259132) @@ -582,6 +582,7 @@ compile_flags(char *p, struct s_subst *s case 'p': s->p = 1; break; + case 'i': case 'I': s->icase = 1; break; Modified: head/usr.bin/sed/sed.1 ============================================================================== --- head/usr.bin/sed/sed.1 Mon Dec 9 18:52:21 2013 (r259131) +++ head/usr.bin/sed/sed.1 Mon Dec 9 18:57:20 2013 (r259132) @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd May 24, 2009 +.Dd December 9, 2013 .Dt SED 1 .Os .Sh NAME @@ -196,7 +196,7 @@ option was specified); a context address that consists of a regular expression preceded and followed by a delimiter. The closing delimiter can also optionally be followed by the -.Dq I +.Dq i character, to indicate that the regular expression is to be matched in a case-insensitive way. .El @@ -507,7 +507,7 @@ Append the pattern space to if a replacement was made. If the replacement string is identical to that which it replaces, it is still considered to have been a replacement. -.It I +.It i or I Match the regular expression in a case-insensitive way. .El .Pp From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 19:13:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E0BE4B5; Mon, 9 Dec 2013 19:13:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6AC9717B1; Mon, 9 Dec 2013 19:13:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9JDHA7046279; Mon, 9 Dec 2013 19:13:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9JDHpP046277; Mon, 9 Dec 2013 19:13:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312091913.rB9JDHpP046277@svn.freebsd.org> From: Eitan Adler Date: Mon, 9 Dec 2013 19:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259133 - head/tools/regression/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 19:13:17 -0000 Author: eadler Date: Mon Dec 9 19:13:16 2013 New Revision: 259133 URL: http://svnweb.freebsd.org/changeset/base/259133 Log: Add regression test for recently added 'i' flag in r259132. PR: standards/184641 Added: head/tools/regression/usr.bin/sed/regress.icase4.out - copied unchanged from r259132, head/tools/regression/usr.bin/sed/regress.icase2.out Modified: head/tools/regression/usr.bin/sed/regress.sh Copied: head/tools/regression/usr.bin/sed/regress.icase4.out (from r259132, head/tools/regression/usr.bin/sed/regress.icase2.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/sed/regress.icase4.out Mon Dec 9 19:13:16 2013 (r259133, copy of r259132, head/tools/regression/usr.bin/sed/regress.icase2.out) @@ -0,0 +1,4 @@ +input +data +for validation +of Foo(1) Modified: head/tools/regression/usr.bin/sed/regress.sh ============================================================================== --- head/tools/regression/usr.bin/sed/regress.sh Mon Dec 9 18:57:20 2013 (r259132) +++ head/tools/regression/usr.bin/sed/regress.sh Mon Dec 9 19:13:16 2013 (r259133) @@ -66,6 +66,7 @@ REGRESSION_TEST_FREEFORM(`inplace5', `in REGRESSION_TEST(`icase1', `sed /SED/Id < regress.in') REGRESSION_TEST(`icase2', `sed s/SED/Foo/I < regress.in') REGRESSION_TEST(`icase3', `sed s/SED/Foo/ < regress.in') +REGRESSION_TEST(`icase4', `sed s/SED/Foo/i < regress.in') REGRESSION_TEST(`hanoi', `echo ":abcd: : :" | sed -f hanoi.sed') REGRESSION_TEST(`math', `echo "4+7*3+2^7/3" | sed -f math.sed') From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 19:31:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3B8F26D; Mon, 9 Dec 2013 19:31:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DE4FA194D; Mon, 9 Dec 2013 19:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9JVVYO054081; Mon, 9 Dec 2013 19:31:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9JVUFO054072; Mon, 9 Dec 2013 19:31:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312091931.rB9JVUFO054072@svn.freebsd.org> From: John Baldwin Date: Mon, 9 Dec 2013 19:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259134 - in head: tools/regression/usr.sbin/etcupdate usr.sbin/etcupdate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 19:31:32 -0000 Author: jhb Date: Mon Dec 9 19:31:30 2013 New Revision: 259134 URL: http://svnweb.freebsd.org/changeset/base/259134 Log: - Refresh /etc/localtime after each update using tzsetup -r. - Regenerate /var/db/services.db when /etc/services changes. MFC after: 1 week Added: head/tools/regression/usr.sbin/etcupdate/tzsetup.sh (contents, props changed) Modified: head/tools/regression/usr.sbin/etcupdate/preworld.sh head/tools/regression/usr.sbin/etcupdate/tests.sh head/usr.sbin/etcupdate/etcupdate.8 head/usr.sbin/etcupdate/etcupdate.sh Modified: head/tools/regression/usr.sbin/etcupdate/preworld.sh ============================================================================== --- head/tools/regression/usr.sbin/etcupdate/preworld.sh Mon Dec 9 19:13:16 2013 (r259133) +++ head/tools/regression/usr.sbin/etcupdate/preworld.sh Mon Dec 9 19:31:30 2013 (r259134) @@ -66,7 +66,7 @@ TEST=$WORKDIR/test build_trees() { - # Populate trees with pre-world files and an additional file + # Populate trees with pre-world files and additional files # that should not be touched. rm -rf $SRC $OLD $TEST $CONFLICTS @@ -126,6 +126,7 @@ polkit:*:562: haldaemon:*:560: EOF rm $TEST/etc/inetd.conf + touch $TEST/etc/localtime # Copy the "old" source tree to the new source tree and # make upstream modifications. Modified: head/tools/regression/usr.sbin/etcupdate/tests.sh ============================================================================== --- head/tools/regression/usr.sbin/etcupdate/tests.sh Mon Dec 9 19:13:16 2013 (r259133) +++ head/tools/regression/usr.sbin/etcupdate/tests.sh Mon Dec 9 19:31:30 2013 (r259134) @@ -628,6 +628,24 @@ root: someone@example.com MAILER-DAEMON: postmaster postmaster: root EOF + + # - Verify that updating an unmodified /etc/services builds + # /var/db/services.db. + cat > $OLD/etc/services < $NEW/etc/services < $WORKDIR/correct.out < +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# Various regression tests for the tzsetup handling in the 'update' command. + +WORKDIR=work + +usage() +{ + echo "Usage: tzsetup.sh [-s script] [-w workdir]" + exit 1 +} + +# Allow the user to specify an alternate work directory or script. +COMMAND=etcupdate +while getopts "s:w:" option; do + case $option in + s) + COMMAND="sh $OPTARG" + ;; + w) + WORKDIR=$OPTARG + ;; + *) + echo + usage + ;; + esac +done +shift $((OPTIND - 1)) +if [ $# -ne 0 ]; then + usage +fi + +CONFLICTS=$WORKDIR/conflicts +OLD=$WORKDIR/old +NEW=$WORKDIR/current +TEST=$WORKDIR/test + +build_trees() +{ + + # Build the base tree, but not /etc/localtime itself + local i j k + + rm -rf $OLD $NEW $TEST $CONFLICTS + mkdir -p $OLD $NEW $TEST + mkdir -p $TEST/etc + mkdir -p $TEST/var/db + mkdir -p $TEST/usr/share/zoneinfo + + # Create a dummy timezone file + echo "foo" > $TEST/usr/share/zoneinfo/foo + +} + +# $1 - relative path to file that should be missing from TEST +missing() +{ + if [ -e $TEST/$1 -o -L $TEST/$1 ]; then + echo "File $1 should be missing" + fi +} + +# $1 - relative path to file that should be a symlink in TEST +# $2 - optional value of the link +link() +{ + local val + + if ! [ -L $TEST/$1 ]; then + echo "File $1 should be a link" + elif [ $# -gt 1 ]; then + val=`readlink $TEST/$1` + if [ "$val" != "$2" ]; then + echo "Link $1 should link to \"$2\"" + fi + fi +} + +# $1 - relative path to regular file that should be present in TEST +# $2 - optional string that should match file contents +# $3 - optional MD5 of the flie contents, overrides $2 if present +file() +{ + local contents sum + + if ! [ -f $TEST/$1 ]; then + echo "File $1 should be a regular file" + elif [ $# -eq 2 ]; then + contents=`cat $TEST/$1` + if [ "$contents" != "$2" ]; then + echo "File $1 has wrong contents" + fi + elif [ $# -eq 3 ]; then + sum=`md5 -q $TEST/$1` + if [ "$sum" != "$3" ]; then + echo "File $1 has wrong contents" + fi + fi +} + +if [ `id -u` -ne 0 ]; then + echo "must be root" +fi + +if [ -r /etc/etcupdate.conf ]; then + echo "WARNING: /etc/etcupdate.conf settings may break some tests." +fi + +# First, test for /etc/localtime not existing + +build_trees + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for no /etc/localtime:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +missing /etc/localtime +missing /var/db/zoneinfo + +# Second, test for /etc/localtime being a symlink + +build_trees +ln -s /dev/null $TEST/etc/localtime + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for symlinked /etc/localtime:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +link /etc/localtime "/dev/null" +missing /var/db/zoneinfo + +# Third, test for /etc/localtime as a file and a missing /var/db/zoneinfo + +build_trees +echo "bar" > $TEST/etc/localtime + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for missing /var/db/zoneinfo:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +file /etc/localtime "bar" +missing /var/db/zoneinfo + +# Finally, test the case where it should update /etc/localtime + +build_trees +echo "bar" > $TEST/etc/localtime +echo "foo" > $TEST/var/db/zoneinfo + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for real update:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +file /etc/localtime "foo" +file /var/db/zoneinfo "foo" Modified: head/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.8 Mon Dec 9 19:13:16 2013 (r259133) +++ head/usr.sbin/etcupdate/etcupdate.8 Mon Dec 9 19:31:30 2013 (r259134) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2013 +.Dd December 9, 2013 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -695,6 +695,25 @@ has been removed from the tree, but it has been locally modified. The modified version of the file remains in the destination directory. +.It "Needs update: /etc/localtime (required manual update via tzsetup(1))" +The +.Fa /var/db/zoneinfo +file does not exist, +so +.Nm +was not able to refresh +.Fa /etc/localtime +from its source file in +.Fa /usr/share/zoneinfo . +Running +.Xr tzsetup 1 +will both refresh +.Fa /etc/localtime +and generate +.Fa /var/db/zoneinfo +permitting future updates to refresh +.Fa /etc/localtime +automatically. .It "Needs update: /etc/mail/aliases.db (required manual update via newaliases(1))" The file .Pa /etc/mail/aliases Modified: head/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Mon Dec 9 19:13:16 2013 (r259133) +++ head/usr.sbin/etcupdate/etcupdate.sh Mon Dec 9 19:31:30 2013 (r259134) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Advanced Computing Technologies LLC # Written by: John H. Baldwin # All rights reserved. # @@ -486,6 +486,39 @@ diffnode() esac } +# Run one-off commands after an update has completed. These commands +# are not tied to a specific file, so they cannot be handled by +# post_install_file(). +post_update() +{ + local args + + # None of these commands should be run for a pre-world update. + if [ -n "$preworld" ]; then + return + fi + + # If /etc/localtime exists and is not a symlink and /var/db/zoneinfo + # exists, run tzsetup -r to refresh /etc/localtime. + if [ -f ${DESTDIR}/etc/localtime -a \ + ! -L ${DESTDIR}/etc/localtime ]; then + if [ -f ${DESTDIR}/var/db/zoneinfo ]; then + if [ -n "${DESTDIR}" ]; then + args="-C ${DESTDIR}" + else + args="" + fi + log "tzsetup -r ${args}" + if [ -z "$dryrun" ]; then + tzsetup -r ${args} >&3 2>&1 + fi + else + warn "Needs update: /etc/localtime (required" \ + "manual update via tzsetup(1))" + fi + fi +} + # Create missing parent directories of a node in a target tree # preserving the owner, group, and permissions from a specified # template tree. @@ -583,6 +616,14 @@ post_install_file() fi fi ;; + /etc/services) + log "services_mkdb -q -o $DESTDIR/var/db/services.db" \ + "${DESTDIR}$1" + if [ -z "$dryrun" ]; then + services_mkdb -q -o $DESTDIR/var/db/services.db \ + ${DESTDIR}$1 >&3 2>&1 + fi + ;; esac } @@ -1506,6 +1547,9 @@ EOF "(requires manual update via newaliases(1))" fi + # Run any special one-off commands after an update has completed. + post_update + if [ -s $WARNINGS ]; then echo "Warnings:" cat $WARNINGS From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 19:35:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCDE0482; Mon, 9 Dec 2013 19:35:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A9615197A; Mon, 9 Dec 2013 19:35:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9JZgtl054638; Mon, 9 Dec 2013 19:35:42 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9JZgmG054637; Mon, 9 Dec 2013 19:35:42 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312091935.rB9JZgmG054637@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Dec 2013 19:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259135 - head/sys/modules/iwnfw/iwn6000g2b X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 19:35:42 -0000 Author: adrian Date: Mon Dec 9 19:35:42 2013 New Revision: 259135 URL: http://svnweb.freebsd.org/changeset/base/259135 Log: Bump the g2b firmware to 18.x. Tested: * Intel 6235 Modified: head/sys/modules/iwnfw/iwn6000g2b/Makefile Modified: head/sys/modules/iwnfw/iwn6000g2b/Makefile ============================================================================== --- head/sys/modules/iwnfw/iwn6000g2b/Makefile Mon Dec 9 19:31:30 2013 (r259134) +++ head/sys/modules/iwnfw/iwn6000g2b/Makefile Mon Dec 9 19:35:42 2013 (r259135) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwn6000g2bfw -IMG= iwlwifi-6000g2b-17.168.5.2 +IMG= iwlwifi-6000g2b-18.168.6.1 .include From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 20:04:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E7D7B84; Mon, 9 Dec 2013 20:04:58 +0000 (UTC) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ABF9B1CB3; Mon, 9 Dec 2013 20:04:57 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id k4so2976497qaq.8 for ; Mon, 09 Dec 2013 12:04:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=YvYeo7hRH9fK6KpBmdw+r/Ea1GZ7tc0bdmKxa+mPOx8=; b=s7RK05ztVyn8n0CDwTyv0iFMpw7IeuTTsH7KUhhWdwu/wn+ML23+SNLZmcdIK3OEh4 l2aQ0DGH26LPruyVyIq9zaboj6weEKz0Ih8p+1dbHxBWuzmhIQSQ+j8oDBo2l2W//CTw gxYrQ5DEZNp7MWvSBcF6ehClFMg4mdCbCYcAJC6rNhpHasZZtpAIFAraR7+KQTXLzRvX hTFMpXk85Dt1vlePv3AsGJb1DrxokF8/dfwOLznOfmAvLpZw/3Syl1NgKxv1g3D104M/ 85ewBGxaUoD+i0o4h8m2rCcm5jTk27ubvdwbgsior7bF+UXJ7u4lO7OfBgYzev/YUkR0 SjMg== MIME-Version: 1.0 X-Received: by 10.49.129.38 with SMTP id nt6mr28873467qeb.78.1386619496935; Mon, 09 Dec 2013 12:04:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Mon, 9 Dec 2013 12:04:56 -0800 (PST) In-Reply-To: <201312090726.rB97QuVA077110@svn.freebsd.org> References: <201312090726.rB97QuVA077110@svn.freebsd.org> Date: Mon, 9 Dec 2013 12:04:56 -0800 X-Google-Sender-Auth: zmfNWwtEb8MjV99dVN5tGC5cq7Q Message-ID: Subject: Re: svn commit: r259123 - head/sys/modules/usb From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 20:04:58 -0000 You don't have to build the whole kernel - you just need to have config run to spit out the opt_xxx files. -a On 8 December 2013 23:26, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Dec 9 07:26:55 2013 > New Revision: 259123 > URL: http://svnweb.freebsd.org/changeset/base/259123 > > Log: > Make it easier to test build the USB code having the debug flags set > without having to build the complete kernel. > > MFC after: 2 weeks > > Modified: > head/sys/modules/usb/Makefile > > Modified: head/sys/modules/usb/Makefile > ============================================================================== > --- head/sys/modules/usb/Makefile Mon Dec 9 07:15:46 2013 (r259122) > +++ head/sys/modules/usb/Makefile Mon Dec 9 07:26:55 2013 (r259123) > @@ -27,6 +27,18 @@ > > .include > > +# > +# Check for common USB debug flags to pass when building the USB > +# modules in this directory: > +# > +.if defined(USB_DEBUG) > +MAKE+=" DEBUG_FLAGS+=-DUSB_DEBUG" > +.endif > + > +.if defined(USB_DEBUG) && defined(USB_REQ_DEBUG) > +MAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG" > +.endif > + > # Modules that include binary-only blobs of microcode should be selectable by > # MK_SOURCELESS_UCODE option (see below). > From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 21:08:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC19B187; Mon, 9 Dec 2013 21:08:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B636C10C9; Mon, 9 Dec 2013 21:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9L8rbm088360; Mon, 9 Dec 2013 21:08:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9L8q00088353; Mon, 9 Dec 2013 21:08:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312092108.rB9L8q00088353@svn.freebsd.org> From: John Baldwin Date: Mon, 9 Dec 2013 21:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259140 - in head/sys: amd64/include i386/include x86/acpica x86/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 21:08:54 -0000 Author: jhb Date: Mon Dec 9 21:08:52 2013 New Revision: 259140 URL: http://svnweb.freebsd.org/changeset/base/259140 Log: Move constants for indices in the local APIC's local vector table from apicvar.h to apicreg.h. Modified: head/sys/amd64/include/apicvar.h head/sys/i386/include/apicvar.h head/sys/x86/acpica/madt.c head/sys/x86/include/apicreg.h head/sys/x86/x86/local_apic.c head/sys/x86/x86/mptable.c Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Mon Dec 9 21:07:57 2013 (r259139) +++ head/sys/amd64/include/apicvar.h Mon Dec 9 21:08:52 2013 (r259140) @@ -136,15 +136,6 @@ */ #define APIC_SPURIOUS_INT 255 -#define LVT_LINT0 0 -#define LVT_LINT1 1 -#define LVT_TIMER 2 -#define LVT_ERROR 3 -#define LVT_PMC 4 -#define LVT_THERMAL 5 -#define LVT_CMCI 6 -#define LVT_MAX LVT_CMCI - #ifndef LOCORE #define APIC_IPI_DEST_SELF -1 Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Mon Dec 9 21:07:57 2013 (r259139) +++ head/sys/i386/include/apicvar.h Mon Dec 9 21:08:52 2013 (r259140) @@ -135,15 +135,6 @@ */ #define APIC_SPURIOUS_INT 255 -#define LVT_LINT0 0 -#define LVT_LINT1 1 -#define LVT_TIMER 2 -#define LVT_ERROR 3 -#define LVT_PMC 4 -#define LVT_THERMAL 5 -#define LVT_CMCI 6 -#define LVT_MAX LVT_CMCI - #ifndef LOCORE #define APIC_IPI_DEST_SELF -1 Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Mon Dec 9 21:07:57 2013 (r259139) +++ head/sys/x86/acpica/madt.c Mon Dec 9 21:08:52 2013 (r259140) @@ -517,9 +517,9 @@ madt_parse_local_nmi(ACPI_MADT_LOCAL_API return; } if (nmi->Lint == 0) - pin = LVT_LINT0; + pin = APIC_LVT_LINT0; else - pin = LVT_LINT1; + pin = APIC_LVT_LINT1; lapic_set_lvt_mode(apic_id, pin, APIC_LVT_DM_NMI); if (!(nmi->IntiFlags & ACPI_MADT_TRIGGER_CONFORMS)) lapic_set_lvt_triggermode(apic_id, pin, Modified: head/sys/x86/include/apicreg.h ============================================================================== --- head/sys/x86/include/apicreg.h Mon Dec 9 21:07:57 2013 (r259139) +++ head/sys/x86/include/apicreg.h Mon Dec 9 21:08:52 2013 (r259140) @@ -357,6 +357,16 @@ typedef struct IOAPIC ioapic_t; #define APIC_TDCR_128 0x0a #define APIC_TDCR_1 0x0b +/* LVT table indices */ +#define APIC_LVT_LINT0 0 +#define APIC_LVT_LINT1 1 +#define APIC_LVT_TIMER 2 +#define APIC_LVT_ERROR 3 +#define APIC_LVT_PMC 4 +#define APIC_LVT_THERMAL 5 +#define APIC_LVT_CMCI 6 +#define APIC_LVT_MAX APIC_LVT_CMCI + /****************************************************************************** * I/O APIC defines */ Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Mon Dec 9 21:07:57 2013 (r259139) +++ head/sys/x86/x86/local_apic.c Mon Dec 9 21:08:52 2013 (r259140) @@ -111,7 +111,7 @@ struct lvt { }; struct lapic { - struct lvt la_lvts[LVT_MAX + 1]; + struct lvt la_lvts[APIC_LVT_MAX + 1]; u_int la_id:8; u_int la_cluster:4; u_int la_cluster_id:2; @@ -125,7 +125,7 @@ struct lapic { } static lapics[MAX_APIC_ID + 1]; /* Global defaults for local APIC LVT entries. */ -static struct lvt lvts[LVT_MAX + 1] = { +static struct lvt lvts[APIC_LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ @@ -179,7 +179,7 @@ lvt_mode(struct lapic *la, u_int pin, ui { struct lvt *lvt; - KASSERT(pin <= LVT_MAX, ("%s: pin %u out of range", __func__, pin)); + KASSERT(pin <= APIC_LVT_MAX, ("%s: pin %u out of range", __func__, pin)); if (la->la_lvts[pin].lvt_active) lvt = &la->la_lvts[pin]; else @@ -300,7 +300,7 @@ lapic_create(u_int apic_id, int boot_cpu */ lapics[apic_id].la_present = 1; lapics[apic_id].la_id = apic_id; - for (i = 0; i <= LVT_MAX; i++) { + for (i = 0; i <= APIC_LVT_MAX; i++) { lapics[apic_id].la_lvts[i] = lvts[i]; lapics[apic_id].la_lvts[i].lvt_active = 0; } @@ -339,10 +339,10 @@ lapic_dump(const char* str) lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error); - if (maxlvt >= LVT_PMC) + if (maxlvt >= APIC_LVT_PMC) printf(" pmc: 0x%08x", lapic->lvt_pcint); printf("\n"); - if (maxlvt >= LVT_CMCI) + if (maxlvt >= APIC_LVT_CMCI) printf(" cmci: 0x%08x\n", lapic->lvt_cmci); } @@ -366,16 +366,16 @@ lapic_setup(int boot) lapic_enable(); /* Program LINT[01] LVT entries. */ - lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); - lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + lapic->lvt_lint0 = lvt_mode(la, APIC_LVT_LINT0, lapic->lvt_lint0); + lapic->lvt_lint1 = lvt_mode(la, APIC_LVT_LINT1, lapic->lvt_lint1); /* Program the PMC LVT entry if present. */ - if (maxlvt >= LVT_PMC) - lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); + if (maxlvt >= APIC_LVT_PMC) + lapic->lvt_pcint = lvt_mode(la, APIC_LVT_PMC, lapic->lvt_pcint); /* Program timer LVT and setup handler. */ la->lvt_timer_cache = lapic->lvt_timer = - lvt_mode(la, LVT_TIMER, lapic->lvt_timer); + lvt_mode(la, APIC_LVT_TIMER, lapic->lvt_timer); if (boot) { snprintf(buf, sizeof(buf), "cpu%d:timer", PCPU_GET(cpuid)); intrcnt_add(buf, &la->la_timer_count); @@ -393,14 +393,14 @@ lapic_setup(int boot) } /* Program error LVT and clear any existing errors. */ - lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->lvt_error = lvt_mode(la, APIC_LVT_ERROR, lapic->lvt_error); lapic->esr = 0; /* XXX: Thermal LVT */ /* Program the CMCI LVT entry if present. */ - if (maxlvt >= LVT_CMCI) - lapic->lvt_cmci = lvt_mode(la, LVT_CMCI, lapic->lvt_cmci); + if (maxlvt >= APIC_LVT_CMCI) + lapic->lvt_cmci = lvt_mode(la, APIC_LVT_CMCI, lapic->lvt_cmci); intr_restore(saveintr); } @@ -424,7 +424,7 @@ lapic_update_pmc(void *dummy) struct lapic *la; la = &lapics[lapic_id()]; - lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); + lapic->lvt_pcint = lvt_mode(la, APIC_LVT_PMC, lapic->lvt_pcint); } #endif @@ -440,10 +440,10 @@ lapic_enable_pmc(void) /* Fail if the PMC LVT is not present. */ maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; - if (maxlvt < LVT_PMC) + if (maxlvt < APIC_LVT_PMC) return (0); - lvts[LVT_PMC].lvt_masked = 0; + lvts[APIC_LVT_PMC].lvt_masked = 0; #ifdef SMP /* @@ -474,10 +474,10 @@ lapic_disable_pmc(void) /* Fail if the PMC LVT is not present. */ maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; - if (maxlvt < LVT_PMC) + if (maxlvt < APIC_LVT_PMC) return; - lvts[LVT_PMC].lvt_masked = 1; + lvts[APIC_LVT_PMC].lvt_masked = 1; #ifdef SMP /* The APs should always be started when hwpmc is unloaded. */ @@ -617,7 +617,7 @@ int lapic_set_lvt_mask(u_int apic_id, u_int pin, u_char masked) { - if (pin > LVT_MAX) + if (pin > APIC_LVT_MAX) return (EINVAL); if (apic_id == APIC_ID_ALL) { lvts[pin].lvt_masked = masked; @@ -641,7 +641,7 @@ lapic_set_lvt_mode(u_int apic_id, u_int { struct lvt *lvt; - if (pin > LVT_MAX) + if (pin > APIC_LVT_MAX) return (EINVAL); if (apic_id == APIC_ID_ALL) { lvt = &lvts[pin]; @@ -696,7 +696,7 @@ int lapic_set_lvt_polarity(u_int apic_id, u_int pin, enum intr_polarity pol) { - if (pin > LVT_MAX || pol == INTR_POLARITY_CONFORM) + if (pin > APIC_LVT_MAX || pol == INTR_POLARITY_CONFORM) return (EINVAL); if (apic_id == APIC_ID_ALL) { lvts[pin].lvt_activehi = (pol == INTR_POLARITY_HIGH); @@ -721,7 +721,7 @@ int lapic_set_lvt_triggermode(u_int apic_id, u_int pin, enum intr_trigger trigger) { - if (pin > LVT_MAX || trigger == INTR_TRIGGER_CONFORM) + if (pin > APIC_LVT_MAX || trigger == INTR_TRIGGER_CONFORM) return (EINVAL); if (apic_id == APIC_ID_ALL) { lvts[pin].lvt_edgetrigger = (trigger == INTR_TRIGGER_EDGE); @@ -894,8 +894,8 @@ lapic_enable_cmc(void) apic_id = PCPU_GET(apic_id); KASSERT(lapics[apic_id].la_present, ("%s: missing APIC %u", __func__, apic_id)); - lapics[apic_id].la_lvts[LVT_CMCI].lvt_masked = 0; - lapics[apic_id].la_lvts[LVT_CMCI].lvt_active = 1; + lapics[apic_id].la_lvts[APIC_LVT_CMCI].lvt_masked = 0; + lapics[apic_id].la_lvts[APIC_LVT_CMCI].lvt_active = 1; if (bootverbose) printf("lapic%u: CMCI unmasked\n", apic_id); } Modified: head/sys/x86/x86/mptable.c ============================================================================== --- head/sys/x86/x86/mptable.c Mon Dec 9 21:07:57 2013 (r259139) +++ head/sys/x86/x86/mptable.c Mon Dec 9 21:08:52 2013 (r259140) @@ -786,9 +786,9 @@ mptable_parse_local_int(int_entry_ptr in else apic_id = intr->dst_apic_id; if (intr->dst_apic_int == 0) - pin = LVT_LINT0; + pin = APIC_LVT_LINT0; else - pin = LVT_LINT1; + pin = APIC_LVT_LINT1; switch (intr->int_type) { case INTENTRY_TYPE_INT: #if 1 @@ -902,8 +902,9 @@ mptable_parse_ints(void) /* Is this a pre-defined config? */ if (mpfps->config_type != 0) { /* Configure LINT pins. */ - lapic_set_lvt_mode(APIC_ID_ALL, LVT_LINT0, APIC_LVT_DM_EXTINT); - lapic_set_lvt_mode(APIC_ID_ALL, LVT_LINT1, APIC_LVT_DM_NMI); + lapic_set_lvt_mode(APIC_ID_ALL, APIC_LVT_LINT0, + APIC_LVT_DM_EXTINT); + lapic_set_lvt_mode(APIC_ID_ALL, APIC_LVT_LINT1, APIC_LVT_DM_NMI); /* Configure I/O APIC pins. */ mptable_parse_default_config_ints(); From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 21:47:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94FC967C; Mon, 9 Dec 2013 21:47:50 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 67F7612F9; Mon, 9 Dec 2013 21:47:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ED20EB98F; Mon, 9 Dec 2013 16:47:48 -0500 (EST) From: John Baldwin To: "=?iso-8859-15?q?Jean-S=E9bastien?= =?iso-8859-15?q?_P=E9dron?=" Subject: Re: svn commit: r258930 - head/sys/dev/drm2 Date: Mon, 9 Dec 2013 16:46:27 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312041904.rB4J4vbM043709@svn.freebsd.org> <201312051005.23197.jhb@freebsd.org> <52A266CF.90007@FreeBSD.org> In-Reply-To: <52A266CF.90007@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201312091646.27179.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Dec 2013 16:47:49 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 21:47:50 -0000 On Friday, December 06, 2013 7:07:43 pm Jean-S=E9bastien P=E9dron wrote: > Le 05/12/2013 16:05, John Baldwin a =E9crit : > >>> Eh, vgapci is the right place to read this. The LINK_CAP here is=20 telling > >>> you the width of the slot you are plugged into, not the width of the= =20 card > >>> that is plugged into the slot. > >> > >> I'm sorry, my knowledge of PCI is very limited (still learning) and I > >> don't understand your comment. Could you please expand on it? > > > > [explanation] >=20 > Thank you very much for the explanation! >=20 > > Can you provide pciconf -lc output from your machine >=20 > You'll find it attached. >=20 > > and tell me what you think the function should be returning (i.e. > > are you trying to determine the speed of the slot, or the speed of > > the card?) >=20 > The result of this function is used to initialize the card (ie. it does=20 > more steps if speed is 5.0). The debug message is "enabling PCIE gen 2=20 > link speeds" in this case. I admit I don't know what the code is doing=20 > exactly, so I haven't any expectation :) >=20 > What I see is that now, this part of the initialization is similar to=20 > Linux 3.8 on the same computer: in both OSes, the PCI ID of the bridge=20 > and the linkcap/linkcap2 values are logged, and the PCI ID/values are=20 > matching. Ok, after looking at the original version of this function in Linux, it does read the capabilities from the parent bridge of the slot, not from the card itself, so your change is correct. =2D-=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 21:54:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8E86865 for ; Mon, 9 Dec 2013 21:54:23 +0000 (UTC) Received: from mail-qc0-x22d.google.com (mail-qc0-x22d.google.com [IPv6:2607:f8b0:400d:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 560411393 for ; Mon, 9 Dec 2013 21:54:23 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id m20so3271873qcx.32 for ; Mon, 09 Dec 2013 13:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type; bh=P726SWhsszItDe1MR+c2LOUt4i+3I6J5zrf4i3C7cJ4=; b=bec2eVjXOhJ0MUNAi06uCsT7ZvJE/dHnToKpKDnnhvIDFafLZfxC04V43PM7ufuFRm MUFhTdw4ZuXljlCIJ3/eovSfiiL2qPfmm8IQlYvnRXpeUNw09rMK36loA/ZfjqA3usdQ Xr57VluQdSvZFgVtct/dmJ0iIO7q3W3Qoqpd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type; bh=P726SWhsszItDe1MR+c2LOUt4i+3I6J5zrf4i3C7cJ4=; b=OkLep9PEt/6/LExQAQrQhxbU5Erc1jUUI4ISkgVNfXe1WiFkB8EUWdnWxlbvP2Mdoc rpZ6D77rroYt8LZ7pvYHTrofmhl9kG3qktRl/MyATyu7/VRBRRr7EH+v4ClnIeReAQdU eHdnK3XHKgOzhg2O8AIaBIR35yRY8IymfQWe1pPHq3hgFHCDeTyW2JRJeOIvvAzKqs9s Toq8mPSunWE2Q5BvLo4AkKLrQcHKhj70Cv8QUNtg/wdcV9ncUFK61k8FqGyxpN6iCaXj b3+SDRVxrJh+W+pLmC7lUT5y/UPAoAuyN/ojZVBgPbHpIxb/f0AFrXyU40SxuuPIT5OD 7tqQ== X-Gm-Message-State: ALoCoQn29G4uQjkIgq3phXRf99D+PM7AetID38SxSPca3M5RZCPeFBrVGn2/h5HO1hbfCrf2etSs X-Received: by 10.49.71.34 with SMTP id r2mr162580319qeu.69.1386626062263; Mon, 09 Dec 2013 13:54:22 -0800 (PST) Received: from hackintosh.wemm.org ([2601:9:e80:d1:ece8:88ca:b1c6:e9cd]) by mx.google.com with ESMTPSA id o10sm37854547qaa.6.2013.12.09.13.54.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Dec 2013 13:54:20 -0800 (PST) Message-ID: <52A63C03.2030201@wemm.org> Date: Mon, 09 Dec 2013 13:54:11 -0800 From: Peter Wemm Organization: World Domination in progress. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Hiroki Sato , peter@FreeBSD.org Subject: Re: svn commit: r259094 - head/etc/rc.d References: <201312080555.rB85tu8W016979@svn.freebsd.org> <20131209.175119.597284254662875353.hrs@allbsd.org> In-Reply-To: <20131209.175119.597284254662875353.hrs@allbsd.org> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="80MvP1J1bf8dafClPrLbqErNKV2LKHNw9" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 21:54:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --80MvP1J1bf8dafClPrLbqErNKV2LKHNw9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 12/9/13, 12:51 AM, Hiroki Sato wrote: > Hi Peter, >=20 > Peter Wemm wrote > in <201312080555.rB85tu8W016979@svn.freebsd.org>: >=20 > pe> Author: peter > pe> Date: Sun Dec 8 05:55:55 2013 > pe> New Revision: 259094 > pe> URL: http://svnweb.freebsd.org/changeset/base/259094 > pe> > pe> Log: > pe> Rev 256256 had an undocumented side effect of breaking existing b= ehavior > pe> for ipv6 jails. > pe> > pe> Among the harmful side effects included putting a route to an ent= ire /64 > pe> onto an interface even if you were in a smaller network - eg: /80= =2E > pe> This broke the freebsd.org cluster hosted at ISC which has /80 ne= tworks. > pe> > pe> Modified: > pe> head/etc/rc.d/jail >=20 > The reason why it was changed is that I think an IPv6 GUA with no > prefix length information should always be interpret as a /64 because > the other tools like ifconfig do so. IPv6 is designed to always use > a correct prefix length and avoid using a /128 for aliases. Is there > a problem with specifying a /80 address to ip6.addr if a box is on a > /80 network? I'm all for issuing warnings and advising people to correct it. However = the problem is that the change silently breaks a working setup during an upgr= ade from 9.x to 10.x. At the ISC.org freebsd cluster site we lost the ability to talk to other services in nearby separate networks, including DNS. It had gone undetected until we tried to actually default to using IPv6 -= the first reaction from some of the other admins was to revert everything= back to IPv4. If breaking ipv6 jails leads to that outcome elsewhere the= n that would be sub-optimal for ipv6 adoption. --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6F= JV UTF-8: for when a ' just won\342\200\231t do. --80MvP1J1bf8dafClPrLbqErNKV2LKHNw9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKmPAgACgkQFRKuUnJ3cX8xIwCdE+i3QDsyv7s8a3BNABjW6atQ fIYAmgLWEd+b1tXRW/wWORQ4T7NX4xWo =Ia2w -----END PGP SIGNATURE----- --80MvP1J1bf8dafClPrLbqErNKV2LKHNw9-- From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 22:56:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3D907D5; Mon, 9 Dec 2013 22:56:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF921812; Mon, 9 Dec 2013 22:56:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9MuJao027963; Mon, 9 Dec 2013 22:56:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9MuJ1i027962; Mon, 9 Dec 2013 22:56:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312092256.rB9MuJ1i027962@svn.freebsd.org> From: Eitan Adler Date: Mon, 9 Dec 2013 22:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259143 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 22:56:19 -0000 Author: eadler Date: Mon Dec 9 22:56:19 2013 New Revision: 259143 URL: http://svnweb.freebsd.org/changeset/base/259143 Log: sed(1): Use /i instead of /I the i modifier was added in r259132 since POSIX recently agreed to add it. Switch uses of /I to /i. Modified: head/usr.sbin/bsdinstall/scripts/services Modified: head/usr.sbin/bsdinstall/scripts/services ============================================================================== --- head/usr.sbin/bsdinstall/scripts/services Mon Dec 9 22:40:22 2013 (r259142) +++ head/usr.sbin/bsdinstall/scripts/services Mon Dec 9 22:56:19 2013 (r259143) @@ -29,7 +29,7 @@ : ${DIALOG_OK=0} if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then - eval `sed -e s/YES/on/I -e s/NO/off/I $BSDINSTALL_TMPETC/rc.conf.services` + eval `sed -e s/YES/on/i -e s/NO/off/i $BSDINSTALL_TMPETC/rc.conf.services` else # Default service states. Everything is off if not enabled. sshd_enable="on" From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 22:58:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0B9E93D; Mon, 9 Dec 2013 22:58:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC930182A; Mon, 9 Dec 2013 22:58:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9MwQfk028293; Mon, 9 Dec 2013 22:58:26 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9MwQGL028292; Mon, 9 Dec 2013 22:58:26 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312092258.rB9MwQGL028292@svn.freebsd.org> From: Devin Teske Date: Mon, 9 Dec 2013 22:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259144 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 22:58:26 -0000 Author: dteske Date: Mon Dec 9 22:58:26 2013 New Revision: 259144 URL: http://svnweb.freebsd.org/changeset/base/259144 Log: Fix a regression introduced by SVN r257842. Result was that after successfully installing to encrypted ZFS root, the passphrase is not accepted and a message about "incorrect key" is displayed. MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 9 22:56:19 2013 (r259143) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 9 22:58:26 2013 (r259144) @@ -1203,7 +1203,7 @@ zfs_create_boot() return $FAILURE f_eval_catch $funcname printf "$PRINTF_CONF" \ geli_%s_keyfile0_type \ - '"$disk$targetpart" "$disk$targetpart"' \ + '"$disk$targetpart" "$disk$targetpart:geli_keyfile0"' \ \$BSDINSTALL_TMPBOOT/loader.conf.\$disk\$targetpart || return $FAILURE f_eval_catch $funcname printf "$PRINTF_CONF" \ From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 23:05:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E164DAC4; Mon, 9 Dec 2013 23:05:25 +0000 (UTC) Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A46A6189D; Mon, 9 Dec 2013 23:05:25 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id q10so6043382pdj.36 for ; Mon, 09 Dec 2013 15:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=QS3Fk+c012lDmIGhuWjBhpRPM1sGAv78pMkRHQEOjIk=; b=F6U/mwkg3Fq+42FflJ1HuFGgI30sUTwAnWJMYriCRV2aTiSY31sLvGVpZoauKbZuB5 YGGVRlTwP6pjxofH89B8TcoifeqQ8u0ArB8JqsWZXnuV4bKozbWSTh+xj+053XhJLfcx 7pTCF7IYloN8WcH9xMhslxqh/IztyR14jUvmuAPFElu4gx4rbk5hHTr5MJR90S28LDx6 MiaSzZLjvZUkOlV+45sp2GUtWBfDJsmaqb14oNSaxyanPgwFXDthH0sS8O+lHvC7vxP7 4kjBqNDxUm/Yjq5CDRbRpQl/OsOSV7LJUoCjT9xrTn3O4Ow4oMBoZHcZtR8OoMKUIpVt +sig== X-Received: by 10.68.125.198 with SMTP id ms6mr23646050pbb.98.1386630325258; Mon, 09 Dec 2013 15:05:25 -0800 (PST) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id bh6sm28755165pad.20.2013.12.09.15.05.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Dec 2013 15:05:23 -0800 (PST) Sender: Navdeep Parhar Message-ID: <52A64CB1.4060201@FreeBSD.org> Date: Mon, 09 Dec 2013 15:05:21 -0800 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259143 - head/usr.sbin/bsdinstall/scripts References: <201312092256.rB9MuJ1i027962@svn.freebsd.org> In-Reply-To: <201312092256.rB9MuJ1i027962@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 23:05:26 -0000 On 12/09/13 14:56, Eitan Adler wrote: > Author: eadler > Date: Mon Dec 9 22:56:19 2013 > New Revision: 259143 > URL: http://svnweb.freebsd.org/changeset/base/259143 > > Log: > sed(1): Use /i instead of /I > > the i modifier was added in r259132 since POSIX recently agreed to add > it. Switch uses of /I to /i. There doesn't seem to be any upside to this sort of change. The downside obviously is that it won't work with older sed's that don't understand /i. If you are considering sweeping over the entire tree looking for sed invocations and "fixing" them then please reconsider. Regards, Navdeep > > Modified: > head/usr.sbin/bsdinstall/scripts/services > > Modified: head/usr.sbin/bsdinstall/scripts/services > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/services Mon Dec 9 22:40:22 2013 (r259142) > +++ head/usr.sbin/bsdinstall/scripts/services Mon Dec 9 22:56:19 2013 (r259143) > @@ -29,7 +29,7 @@ > : ${DIALOG_OK=0} > > if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then > - eval `sed -e s/YES/on/I -e s/NO/off/I $BSDINSTALL_TMPETC/rc.conf.services` > + eval `sed -e s/YES/on/i -e s/NO/off/i $BSDINSTALL_TMPETC/rc.conf.services` > else > # Default service states. Everything is off if not enabled. > sshd_enable="on" > From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 23:08:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42E9EC32; Mon, 9 Dec 2013 23:08:55 +0000 (UTC) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05B3018BB; Mon, 9 Dec 2013 23:08:55 +0000 (UTC) Received: from 2a02-8428-011a-a000-e860-16a5-158a-a42a.rev.sfr.net ([2a02:8428:11a:a000:e860:16a5:158a:a42a]) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1Vq9wb-00044T-H1; Tue, 10 Dec 2013 00:08:53 +0100 Message-ID: <52A64D84.6070309@FreeBSD.org> Date: Tue, 10 Dec 2013 00:08:52 +0100 From: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r258930 - head/sys/dev/drm2 References: <201312041904.rB4J4vbM043709@svn.freebsd.org> <201312051005.23197.jhb@freebsd.org> <52A266CF.90007@FreeBSD.org> <201312091646.27179.jhb@freebsd.org> In-Reply-To: <201312091646.27179.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 23:08:55 -0000 Le 09/12/2013 22:46, John Baldwin a crit : > Ok, after looking at the original version of this function in Linux, it > does read the capabilities from the parent bridge of the slot, not > from the card itself, so your change is correct. Thank you for the review! -- Jean-Sbastien Pdron From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 23:11:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C78E0E26 for ; Mon, 9 Dec 2013 23:11:09 +0000 (UTC) Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [IPv6:2607:f8b0:400d:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F2421924 for ; Mon, 9 Dec 2013 23:11:09 +0000 (UTC) Received: by mail-qa0-f44.google.com with SMTP id i13so3156355qae.3 for ; Mon, 09 Dec 2013 15:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=au3ptS/QDd/yXz91gwkTZ5NBwHDhkmOa8p3Xk71vq+U=; b=sLugwoJlL7pO4zpNmZvno4x1ycJfutZLh7OmTKJjhZrbHZR7dF69rAvFncO9jO7Pxd a8cHfn+WnPUkYdT+jXUPqI7hNKtaI2XFtHC0reknMy+EktFwsPoFiG9ybYvyC5t7gdRt Lx8/smqoO7PHfs0wViuBmJa9NDDFZ1rFk7EIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=au3ptS/QDd/yXz91gwkTZ5NBwHDhkmOa8p3Xk71vq+U=; b=V9D5WaYbJilCzUm8uf4JScUlW7zbWgCoOmGGTWZKR8azwVjgl36RVwYyEBtMkwUtWL RAFzTDhlauojW+4jPXGAOn1RehOrW2ejr0nYYdpKq7mtsL58ubXKDRsYkXI6atCP2z4J l6fP9wuiuyH1zRHmDOQw5E/hAp+dnWWsPwsil97QBQZScp1WD0sbcMG+21M/2KIyb1oA ysSDYr9Nr77xTjFhtm+MRlrH1gOKsZvE0vJWU5VsSgkLc7sEpRu7vDYXDBvQsGDS31XN O7F+CfxkVrShjtD5R0nQbn/XU2eeRf7dEv+OXHasat3FHbOaz3tHFIRxhbNsVuAMDvXi YbOQ== X-Gm-Message-State: ALoCoQnr2A74Vkw/C5u2Yn07p2Xwj6iSQAjAh9+UGpTSgo/MKT237/h5Wwi6jtmnBnBHUlvzkl5J X-Received: by 10.49.81.206 with SMTP id c14mr87435518qey.79.1386630668546; Mon, 09 Dec 2013 15:11:08 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.86.42 with HTTP; Mon, 9 Dec 2013 15:10:38 -0800 (PST) In-Reply-To: <52A64CB1.4060201@FreeBSD.org> References: <201312092256.rB9MuJ1i027962@svn.freebsd.org> <52A64CB1.4060201@FreeBSD.org> From: Eitan Adler Date: Mon, 9 Dec 2013 18:10:38 -0500 X-Google-Sender-Auth: 4TAT5_AdsbRQi_eiozXHkhainuU Message-ID: Subject: Re: svn commit: r259143 - head/usr.sbin/bsdinstall/scripts To: Navdeep Parhar Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 23:11:09 -0000 On Mon, Dec 9, 2013 at 6:05 PM, Navdeep Parhar wrote: > On 12/09/13 14:56, Eitan Adler wrote: >> Author: eadler >> Date: Mon Dec 9 22:56:19 2013 >> New Revision: 259143 >> URL: http://svnweb.freebsd.org/changeset/base/259143 >> >> Log: >> sed(1): Use /i instead of /I >> >> the i modifier was added in r259132 since POSIX recently agreed to add >> it. Switch uses of /I to /i. > > There doesn't seem to be any upside to this sort of change. The > downside obviously is that it won't work with older sed's that don't > understand /i. > > If you are considering sweeping over the entire tree looking for sed > invocations and "fixing" them then please reconsider. Understood. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 23:33:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCBAE2F0; Mon, 9 Dec 2013 23:33:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A94DE1A93; Mon, 9 Dec 2013 23:33:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9NXvDt042990; Mon, 9 Dec 2013 23:33:57 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9NXvkk042989; Mon, 9 Dec 2013 23:33:57 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201312092333.rB9NXvkk042989@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 9 Dec 2013 23:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259145 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 23:33:57 -0000 Author: np Date: Mon Dec 9 23:33:57 2013 New Revision: 259145 URL: http://svnweb.freebsd.org/changeset/base/259145 Log: Unstaticize t4_list and t4_uld_list. This works around a clang annoyance[1] and allows kgdb to find these symbols. [1] http://lists.freebsd.org/pipermail/freebsd-hackers/2012-November/041166.html MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Dec 9 22:58:26 2013 (r259144) +++ head/sys/dev/cxgbe/t4_main.c Mon Dec 9 23:33:57 2013 (r259145) @@ -161,10 +161,10 @@ MALLOC_DEFINE(M_CXGBE, "cxgbe", "Chelsio * then ADAPTER_LOCK, then t4_uld_list_lock. */ static struct sx t4_list_lock; -static SLIST_HEAD(, adapter) t4_list; +SLIST_HEAD(, adapter) t4_list; #ifdef TCP_OFFLOAD static struct sx t4_uld_list_lock; -static SLIST_HEAD(, uld_info) t4_uld_list; +SLIST_HEAD(, uld_info) t4_uld_list; #endif /* From owner-svn-src-head@FreeBSD.ORG Mon Dec 9 23:58:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF08FAAF; Mon, 9 Dec 2013 23:58:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB2181D36; Mon, 9 Dec 2013 23:58:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9NwQ8s050867; Mon, 9 Dec 2013 23:58:26 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB9NwQ7D050866; Mon, 9 Dec 2013 23:58:26 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312092358.rB9NwQ7D050866@svn.freebsd.org> From: Devin Teske Date: Mon, 9 Dec 2013 23:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259148 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 23:58:26 -0000 Author: dteske Date: Mon Dec 9 23:58:26 2013 New Revision: 259148 URL: http://svnweb.freebsd.org/changeset/base/259148 Log: Fix a regression introduced by SVN r257842; resulting in mountroot prompt after attempting to install to encrypted ZFS root (caused by a typo in a variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME). MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 9 23:54:48 2013 (r259147) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 9 23:58:26 2013 (r259148) @@ -1190,7 +1190,7 @@ zfs_create_boot() f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_eli_load=\"YES\"' \ \$BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE f_eval_catch $funcname printf "$PRINTF_CONF" vfs.root.mountfrom \ - '"zfs:$poolname/$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOT_FSNAME"' \ + '"zfs:$poolname/$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME"' \ \$BSDINSTALL_TMPBOOT/loader.conf.root || return $FAILURE f_dprintf "$funcname: disks=[%s]" "$disks" for disk in $disks; do From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 00:07:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91484DF4; Tue, 10 Dec 2013 00:07:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D29A1E18; Tue, 10 Dec 2013 00:07:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBA074hw055580; Tue, 10 Dec 2013 00:07:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBA074Qq055579; Tue, 10 Dec 2013 00:07:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312100007.rBA074Qq055579@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Dec 2013 00:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259150 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 00:07:04 -0000 Author: adrian Date: Tue Dec 10 00:07:04 2013 New Revision: 259150 URL: http://svnweb.freebsd.org/changeset/base/259150 Log: Print out the full PCIe link negotiation during dmesg. I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot or not. Reviewed by: np Sponsored by: Netflix, inc. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Dec 9 23:59:16 2013 (r259149) +++ head/sys/dev/cxgbe/t4_main.c Tue Dec 10 00:07:04 2013 (r259150) @@ -549,6 +549,7 @@ t4_attach(device_t dev) #ifdef TCP_OFFLOAD int ofld_rqidx, ofld_tqidx; #endif + const char *pcie_ts; sc = device_get_softc(dev); sc->dev = dev; @@ -816,9 +817,24 @@ t4_attach(device_t dev) goto done; } + switch (sc->params.pci.speed) { + case 0x1: + pcie_ts = "2.5"; + break; + case 0x2: + pcie_ts = "5.0"; + break; + case 0x3: + pcie_ts = "8.0"; + break; + default: + pcie_ts = "??"; + break; + } device_printf(dev, - "PCIe x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", - sc->params.pci.width, sc->params.nports, sc->intr_count, + "PCIe x%d (%s GTS/s) (%d), %d ports, %d %s interrupt%s, %d eq, %d iq\n", + sc->params.pci.width, pcie_ts, sc->params.pci.speed, + sc->params.nports, sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" : (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), sc->intr_count > 1 ? "s" : "", sc->sge.neq, sc->sge.niq); From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 00:20:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 176292F5; Tue, 10 Dec 2013 00:20:31 +0000 (UTC) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id C2B661EEE; Tue, 10 Dec 2013 00:20:30 +0000 (UTC) Received: from rnote.ddteam.net (224-13-135-95.pool.ukrtel.net [95.135.13.224]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 25073C4930; Tue, 10 Dec 2013 02:20:29 +0200 (EET) Date: Tue, 10 Dec 2013 02:20:15 +0200 From: Aleksandr Rybalko To: Marius Strobl Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken Message-Id: <20131210022015.2a5a1ed3.ray@freebsd.org> In-Reply-To: <20131208153620.GA21278@alchemy.franken.de> References: <201312052238.rB5McsVN020719@svn.freebsd.org> <20131208153620.GA21278@alchemy.franken.de> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 00:20:31 -0000 On Sun, 8 Dec 2013 16:36:20 +0100 Marius Strobl wrote: > On Thu, Dec 05, 2013 at 10:38:54PM +0000, Aleksandr Rybalko wrote: > > Author: ray > > Date: Thu Dec 5 22:38:53 2013 > > New Revision: 259016 > > URL: http://svnweb.freebsd.org/changeset/base/259016 > > > > Log: > > Merge VT(9) project (a.k.a. newcons). > > > > Reviewed by: nwhitehorn > > MFC_to_10_after: re approval > > Have you addressed any of the points raised in: > http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045887.html > to get VT(9) at least en par with syscons(4) regarding being able to > use a hardware cursor, allowing different low-level console drivers > to compete for the same hardware etc. in the meantime? > > Marius > Hello Marius! Yes and No :) Lets make it as list with short items: 1. Making these drivers work as low-level console. 2. Drivers priority. 3. Using hardware acceleration. 4. Using the 12 x 22 gallant font. 5. Allowing Xorg to map the frame buffer. 6. (Part of 5) Other register banks as needed. 7. Allowing late attachment. Answers: 1. Works, I did testing on ARM board Efika MX with vt_fb_early driver. (Still have to discuss several things with arm@ guys, then commit) 2. Works. F.e. amd64 start with vt_vga driver, then vt_kms driver override it as more specific. 3. Not used at all yet. 4. I like that font. If you want more "gallant" - I will help. Thanks to Ed, newcons support any font dimensions. 5. It works, but only for those drivers which attach dev/fb/fbd, via fbd devfs node (not accessible via vt(9) ioctls yet). 6. IMO better to put it into some drm emulation. 7. Works in many combination. ( start w/ vga, load kms; (kms replace vga) start w/o driver, load kms; preload kms, start w/ vga; (kms replace vga) preload kms, start w/o driver; (kms attached after drm node initialized) ) Have to put your list on Newcons's wiki page too. As I remember such long list of requirement you provide was based on expectation that I want to replace syscons right now :) But, for now we (me and x11 team) want to see it 10.0 as disabled by default (just like in HEAD now), so peoples who want to help with debug of new xorg and drm drivers will be able to see messages after KMS-xorg starts. Oh, looks like I forget what I have to say more. :) So it will be said later, when I will less sleepy. Anyway. Thanks a lot for your comments!!! WBW -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 00:26:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1113252A; Tue, 10 Dec 2013 00:26:54 +0000 (UTC) Received: from i3mail.icecube.wisc.edu (i3mail.icecube.wisc.edu [128.104.255.23]) by mx1.freebsd.org (Postfix) with ESMTP id BAFDF1F78; Tue, 10 Dec 2013 00:26:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by i3mail.icecube.wisc.edu (Postfix) with ESMTP id DE2DF3820B; Mon, 9 Dec 2013 18:26:46 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from i3mail.icecube.wisc.edu ([127.0.0.1]) by localhost (i3mail.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id lqXHx0DBEp7m; Mon, 9 Dec 2013 18:26:46 -0600 (CST) Received: from terminus.icecube.wisc.edu (terminus.icecube.wisc.edu [172.16.223.97]) by i3mail.icecube.wisc.edu (Postfix) with ESMTPSA id CC0113810D; Mon, 9 Dec 2013 18:26:46 -0600 (CST) Message-ID: <52A65FC6.4000502@freebsd.org> Date: Mon, 09 Dec 2013 18:26:46 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Aleksandr Rybalko , Marius Strobl Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken References: <201312052238.rB5McsVN020719@svn.freebsd.org> <20131208153620.GA21278@alchemy.franken.de> <20131210022015.2a5a1ed3.ray@freebsd.org> In-Reply-To: <20131210022015.2a5a1ed3.ray@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 00:26:54 -0000 On 12/09/13 18:20, Aleksandr Rybalko wrote: > On Sun, 8 Dec 2013 16:36:20 +0100 > Marius Strobl wrote: > >> On Thu, Dec 05, 2013 at 10:38:54PM +0000, Aleksandr Rybalko wrote: >>> Author: ray >>> Date: Thu Dec 5 22:38:53 2013 >>> New Revision: 259016 >>> URL: http://svnweb.freebsd.org/changeset/base/259016 >>> >>> Log: >>> Merge VT(9) project (a.k.a. newcons). >>> >>> Reviewed by: nwhitehorn >>> MFC_to_10_after: re approval >> Have you addressed any of the points raised in: >> http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045887.html >> to get VT(9) at least en par with syscons(4) regarding being able to >> use a hardware cursor, allowing different low-level console drivers >> to compete for the same hardware etc. in the meantime? >> >> Marius >> > Hello Marius! > > Yes and No :) > > Lets make it as list with short items: > 1. Making these drivers work as low-level console. > 2. Drivers priority. > 3. Using hardware acceleration. > 4. Using the 12 x 22 gallant font. > 5. Allowing Xorg to map the frame buffer. > 6. (Part of 5) Other register banks as needed. > 7. Allowing late attachment. > > Answers: > 1. Works, I did testing on ARM board Efika MX with vt_fb_early driver. > (Still have to discuss several things with arm@ guys, then commit) As I mentioned in my review, this particular code is a really weird bug-filled copy of ofwfb.c, which already works as a low-level console early in the boot process. > 2. Works. F.e. amd64 start with vt_vga driver, then vt_kms driver > override it as more specific. I think Marius meant having early-boot drivers bid amongst each other for attachment.... > 3. Not used at all yet. > > 4. I like that font. If you want more "gallant" - I will help. Thanks > to Ed, newcons support any font dimensions. > > 5. It works, but only for those drivers which attach dev/fb/fbd, via > fbd devfs node (not accessible via vt(9) ioctls yet). Could you provide more detail about how this is supposed to work? X doesn't map at offset 0 in general, and that means that 100% of X UMS drivers are currently broken with newcons. > 6. IMO better to put it into some drm emulation. > > 7. Works in many combination. ( > start w/ vga, load kms; (kms replace vga) > start w/o driver, load kms; > preload kms, start w/ vga; (kms replace vga) > preload kms, start w/o driver; (kms attached after drm node initialized) > ) > > Have to put your list on Newcons's wiki page too. > > As I remember such long list of requirement you provide was based on > expectation that I want to replace syscons right now :) > But, for now we (me and x11 team) want to see it 10.0 as disabled by > default (just like in HEAD now), so peoples who want to help with debug > of new xorg and drm drivers will be able to see messages after KMS-xorg > starts. > > Oh, looks like I forget what I have to say more. :) > So it will be said later, when I will less sleepy. > > Anyway. Thanks a lot for your comments!!! > > WBW We should come up with a sunset plan for syscons, though. -Nathan From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 01:39:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C307148E; Tue, 10 Dec 2013 01:39:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AEEC91530; Tue, 10 Dec 2013 01:39:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBA1dMwn088862; Tue, 10 Dec 2013 01:39:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBA1dMK3088861; Tue, 10 Dec 2013 01:39:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312100139.rBA1dMK3088861@svn.freebsd.org> From: Eitan Adler Date: Tue, 10 Dec 2013 01:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259152 - head/usr.bin/calendar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 01:39:22 -0000 Author: eadler Date: Tue Dec 10 01:39:22 2013 New Revision: 259152 URL: http://svnweb.freebsd.org/changeset/base/259152 Log: calendar(1): Add support for #include with absolute paths Prior to the addition of cpp support into calendar itself #include was a legal construction in a calendar file. Permit this again Modified: head/usr.bin/calendar/calcpp.c Modified: head/usr.bin/calendar/calcpp.c ============================================================================== --- head/usr.bin/calendar/calcpp.c Tue Dec 10 00:35:33 2013 (r259151) +++ head/usr.bin/calendar/calcpp.c Tue Dec 10 01:39:22 2013 (r259152) @@ -155,8 +155,11 @@ tokenscpp(char *buf, char *string) s = p+1; if ((p = strchr(s, '>')) != NULL) *p = '\0'; - snprintf (string, MAXPATHLEN, "%s/%s", - _PATH_INCLUDE, s); + if (*s != '/') + snprintf (string, MAXPATHLEN, "%s/%s", + _PATH_INCLUDE, s); + else + strncpy(string, s, MAXPATHLEN); } else if (*p == '(') { s = p+1; if ((p = strchr(p, '>')) != NULL) From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 04:56:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 662B488E; Tue, 10 Dec 2013 04:56:34 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 2520111E6; Tue, 10 Dec 2013 04:56:33 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 59087D43CEB; Tue, 10 Dec 2013 15:56:24 +1100 (EST) Date: Tue, 10 Dec 2013 15:56:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits Subject: Re: svn commit: r259080 - in head/sys: dev/iicbus geom/cache geom/journal In-Reply-To: <20131208013614.6dc63ef9@zhabar.gateway.2wire.net> Message-ID: <20131210155324.R1022@besplex.bde.org> References: <201312071955.rB7JtYNH001792@svn.freebsd.org> <20131208123144.U883@besplex.bde.org> <20131208013614.6dc63ef9@zhabar.gateway.2wire.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=bpB1Wiqi c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=3HaF-T8NxwoA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=ssdoF7uQumEA:10 a=9pnJ-HnNXQN87wXru4sA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 04:56:34 -0000 On Sun, 8 Dec 2013, Justin Hibbits wrote: > On Sun, 8 Dec 2013 13:53:30 +1100 (EST) > Bruce Evans wrote: > >> On Sat, 7 Dec 2013, Justin Hibbits wrote: >[>]* [...] >>> Modified: head/sys/geom/cache/g_cache.c >>> ============================================================================== >>> --- head/sys/geom/cache/g_cache.c Sat Dec 7 19:39:38 >>> 2013 (r259079) +++ head/sys/geom/cache/g_cache.c Sat >>> Dec 7 19:55:34 2013 (r259080) @@ -67,7 +67,7 @@ static >>> u_int g_cache_used_hi = 20; static int >>> sysctl_handle_pct(SYSCTL_HANDLER_ARGS) >>> { >>> - u_int val = *(u_int *)arg1; >>> + int val; >>> int error; >>> >>> error = sysctl_handle_int(oidp, &val, 0, req); >> >> This adds the larger non-style bug that val is used uninitialized. >> Compilers should warn about this. This results in stack garbage >> being copied out instead of the "old" value. >> ... > I just reverted these two changes in r259096. Rather than fix what I > did and change the rest of the files, I'm leaving them for another day, > and reverted my changes so they're at least back to the working order > from before. Thanks. Does it work to just remove the check for val < 0? Bruce From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 05:01:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 758CBCB0; Tue, 10 Dec 2013 05:01:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 622761262; Tue, 10 Dec 2013 05:01:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBA5128R066212; Tue, 10 Dec 2013 05:01:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBA512AT066211; Tue, 10 Dec 2013 05:01:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312100501.rBA512AT066211@svn.freebsd.org> From: Eitan Adler Date: Tue, 10 Dec 2013 05:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259156 - head/usr.sbin/mtest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 05:01:02 -0000 Author: eadler Date: Tue Dec 10 05:01:01 2013 New Revision: 259156 URL: http://svnweb.freebsd.org/changeset/base/259156 Log: mtest(8): use correct macro in mdoc The An macros is used for authors while the Ar macro is used for arguments. AFAIK mcast-addr and ifname are not authors. PR: docs/184649 Submitted by: cnst++ MFC After: 3 days Modified: head/usr.sbin/mtest/mtest.8 Modified: head/usr.sbin/mtest/mtest.8 ============================================================================== --- head/usr.sbin/mtest/mtest.8 Tue Dec 10 04:57:56 2013 (r259155) +++ head/usr.sbin/mtest/mtest.8 Tue Dec 10 05:01:01 2013 (r259156) @@ -131,9 +131,9 @@ to allow traffic from source Print .Ar n source filter entries for -.An mcast-addr +.Ar mcast-addr on interface -.An ifname . +.Ar ifname . .\" .Pp .It Ic f Ar filename From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 09:38:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D159821; Tue, 10 Dec 2013 09:38:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18D97173E; Tue, 10 Dec 2013 09:38:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBA9cIaX066375; Tue, 10 Dec 2013 09:38:18 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBA9cIjR066373; Tue, 10 Dec 2013 09:38:18 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201312100938.rBA9cIjR066373@svn.freebsd.org> From: Juli Mallett Date: Tue, 10 Dec 2013 09:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259161 - head/sys/mips/cavium/octe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 09:38:19 -0000 Author: jmallett Date: Tue Dec 10 09:38:18 2013 New Revision: 259161 URL: http://svnweb.freebsd.org/changeset/base/259161 Log: Add missing includes. Modified: head/sys/mips/cavium/octe/cavium-ethernet.h head/sys/mips/cavium/octe/ethernet-mv88e61xx.c Modified: head/sys/mips/cavium/octe/cavium-ethernet.h ============================================================================== --- head/sys/mips/cavium/octe/cavium-ethernet.h Tue Dec 10 09:14:11 2013 (r259160) +++ head/sys/mips/cavium/octe/cavium-ethernet.h Tue Dec 10 09:38:18 2013 (r259161) @@ -38,7 +38,9 @@ AND WITH ALL FAULTS AND CAVIUM NETWORKS #ifndef CAVIUM_ETHERNET_H #define CAVIUM_ETHERNET_H +#include #include +#include /** * This is the definition of the Ethernet driver's private Modified: head/sys/mips/cavium/octe/ethernet-mv88e61xx.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-mv88e61xx.c Tue Dec 10 09:14:11 2013 (r259160) +++ head/sys/mips/cavium/octe/ethernet-mv88e61xx.c Tue Dec 10 09:38:18 2013 (r259161) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "wrapper-cvmx-includes.h" #include "ethernet-headers.h" From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 11:31:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F6F6E10; Tue, 10 Dec 2013 11:31:01 +0000 (UTC) Received: from mail-vc0-x230.google.com (mail-vc0-x230.google.com [IPv6:2607:f8b0:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C6900120F; Tue, 10 Dec 2013 11:31:00 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id lf12so4383532vcb.21 for ; Tue, 10 Dec 2013 03:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=lW0oB/8Jeo4frpKuJYDhMkXRulEGXJm2ycNXGj717KU=; b=r0Z6nMtG4WT7E6/f5eUv91i8Xa2PmVIQ+nmC0S4UJoFdxqWdOev3Jxhl7rPEqfikDb 0FBZlUnSBkvjkvszk8B3PCETyqeTThZBrKLVM2q5hCO8kcCOHBD5/L9g0G1xQKbvwA3f ga1Xeg6oebAwntw+CsGrSSJ4Gq29Mzny7LihPsNBZrWljSDZWpRqX6ua6Bg4g4i+ZK0N YLsXVW41pwvrb3nRldxFDxHvM9EhW4PXXePV6r6XlnbspxpWMv7R4A6ItyN82TSOY3gO DTlbSqEjNh2jYX59pa9fVWyWhHHA8fligezCXuMt7D6IGc4Y+slIcsc172Bs6OEIFBND l9hQ== MIME-Version: 1.0 X-Received: by 10.58.156.106 with SMTP id wd10mr13108023veb.7.1386675059969; Tue, 10 Dec 2013 03:30:59 -0800 (PST) Sender: edschouten@gmail.com Received: by 10.220.74.6 with HTTP; Tue, 10 Dec 2013 03:30:59 -0800 (PST) In-Reply-To: <20131210022015.2a5a1ed3.ray@freebsd.org> References: <201312052238.rB5McsVN020719@svn.freebsd.org> <20131208153620.GA21278@alchemy.franken.de> <20131210022015.2a5a1ed3.ray@freebsd.org> Date: Tue, 10 Dec 2013 22:30:59 +1100 X-Google-Sender-Auth: mABLlEaCttKHpLRs8dat-i_T7h0 Message-ID: Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken From: Ed Schouten To: Aleksandr Rybalko Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marius Strobl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 11:31:01 -0000 2013/12/10 Aleksandr Rybalko : > Thanks to Ed, [...] No, thanks to you! Thanks a lot for pushing forward something that I should have done years ago. Can't wait to buy you a beer. -- Ed Schouten From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 12:36:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C5231AD; Tue, 10 Dec 2013 12:36:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F20AD171A; Tue, 10 Dec 2013 12:36:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBACaib0031408; Tue, 10 Dec 2013 12:36:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBACaia2031406; Tue, 10 Dec 2013 12:36:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312101236.rBACaia2031406@svn.freebsd.org> From: Alexander Motin Date: Tue, 10 Dec 2013 12:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259168 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 12:36:45 -0000 Author: mav Date: Tue Dec 10 12:36:44 2013 New Revision: 259168 URL: http://svnweb.freebsd.org/changeset/base/259168 Log: Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZE (64MB). Even if we would find one somehow, ZFS kernel code rejects such devices. It is funny to look on attempts to read 4 256K vdev labels from 1.44MB floppy, though it is not very practical and quite slow. Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Dec 10 11:47:38 2013 (r259167) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Dec 10 12:36:44 2013 (r259168) @@ -995,10 +995,10 @@ nozpool_all_slices(avl_tree_t *r, const #endif /* sun */ } +#ifdef sun static void check_slices(avl_tree_t *r, int fd, const char *sname) { -#ifdef sun struct extvtoc vtoc; struct dk_gpt *gpt; char diskname[MAXNAMELEN]; @@ -1028,8 +1028,8 @@ check_slices(avl_tree_t *r, int fd, cons check_one_slice(r, diskname, i, 0, 1); efi_free(gpt); } -#endif /* sun */ } +#endif /* sun */ static void zpool_open_func(void *arg) @@ -1059,6 +1059,7 @@ zpool_open_func(void *arg) return; } /* this file is too small to hold a zpool */ +#ifdef sun if (S_ISREG(statbuf.st_mode) && statbuf.st_size < SPA_MINDEVSIZE) { (void) close(fd); @@ -1070,6 +1071,12 @@ zpool_open_func(void *arg) */ check_slices(rn->rn_avl, fd, rn->rn_name); } +#else /* !sun */ + if (statbuf.st_size < SPA_MINDEVSIZE) { + (void) close(fd); + return; + } +#endif /* sun */ if ((zpool_read_label(fd, &config)) != 0) { (void) close(fd); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Dec 10 11:47:38 2013 (r259167) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Dec 10 12:36:44 2013 (r259168) @@ -401,10 +401,16 @@ vdev_geom_attach_taster(struct g_consume if (pp->flags & G_PF_WITHER) return (EINVAL); - if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) - return (EINVAL); g_attach(cp, pp); error = g_access(cp, 1, 0, 0); + if (error == 0) { + if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) + error = EINVAL; + else if (pp->mediasize < SPA_MINDEVSIZE) + error = EINVAL; + if (error != 0) + g_access(cp, -1, 0, 0); + } if (error != 0) g_detach(cp); return (error); From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 13:10:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4469BA7B; Tue, 10 Dec 2013 13:10:57 +0000 (UTC) Received: from mail-qa0-x236.google.com (mail-qa0-x236.google.com [IPv6:2607:f8b0:400d:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B92C719F9; Tue, 10 Dec 2013 13:10:56 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id f11so3634653qae.20 for ; Tue, 10 Dec 2013 05:10:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AAvI5v0PeSZpbI9F3JE9qGFFfXbA9VScoZESuTRZyRQ=; b=UVYxhwVfj/2OFMH3I2jaNcMHGAkGzuUoBBldP5ulUCM6iOnGVBeEM/mHSULPr2b07U vtcXZTmLn/leDPzhVEUvpAvqs30cU+dSO5W4B/l88r5wyfUkz2pl7OkFnC5mj/zqeRIP JJG1ex6q6y1G3B3XBcXz478ZqAdw8klnwvoYsxd2353qcPz1kHeuZRcPQ5BHBtHlTzIh zI2BuWD0l5pyvqd+Yxcm4aDT1yi993ORht+CQ9xoLJWCHZwegG4oPdKfVrsXPhsMwfms dxjvgcWuDHM7gbBLDaK3PubS9qRfiegRBS2qoAvGuHuX1jaqVH0rPBAHenTM/IQqDt/w dZkw== X-Received: by 10.49.12.43 with SMTP id v11mr43739084qeb.50.1386681055908; Tue, 10 Dec 2013 05:10:55 -0800 (PST) Received: from [10.10.1.142] ([201.72.203.70]) by mx.google.com with ESMTPSA id n14sm45916789qav.8.2013.12.10.05.10.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Dec 2013 05:10:55 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken From: Luiz Otavio O Souza In-Reply-To: Date: Tue, 10 Dec 2013 11:10:50 -0200 Content-Transfer-Encoding: quoted-printable Message-Id: <70879E0A-FED3-4861-AAE8-C01C61BC193E@gmail.com> References: <201312052238.rB5McsVN020719@svn.freebsd.org> <20131208153620.GA21278@alchemy.franken.de> <20131210022015.2a5a1ed3.ray@freebsd.org> To: Aleksandr Rybalko X-Mailer: Apple Mail (2.1822) Cc: svn-src-head@freebsd.org, Ed Schouten , svn-src-all@freebsd.org, src-committers@freebsd.org, Marius Strobl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 13:10:57 -0000 On Dec 10, 2013, at 9:30 AM, Ed Schouten wrote: > 2013/12/10 Aleksandr Rybalko : >> Thanks to Ed, [...] >=20 > No, thanks to you! [=85] > Can't wait to buy you a beer. +1= From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 13:14:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1924BBF2; Tue, 10 Dec 2013 13:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDDE61A1D; Tue, 10 Dec 2013 13:14:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBADEs3k045711; Tue, 10 Dec 2013 13:14:54 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBADEsLh045710; Tue, 10 Dec 2013 13:14:54 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201312101314.rBADEsLh045710@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 10 Dec 2013 13:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259169 - head/usr.sbin/ndp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 13:14:55 -0000 Author: ae Date: Tue Dec 10 13:14:54 2013 New Revision: 259169 URL: http://svnweb.freebsd.org/changeset/base/259169 Log: Ansify function definitions. Modified: head/usr.sbin/ndp/ndp.c Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Tue Dec 10 12:36:44 2013 (r259168) +++ head/usr.sbin/ndp/ndp.c Tue Dec 10 13:14:54 2013 (r259169) @@ -168,9 +168,7 @@ int mode = 0; char *arg = NULL; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int ch; @@ -320,8 +318,7 @@ main(argc, argv) * Process a file to set standard ndp entries */ int -file(name) - char *name; +file(char *name) { FILE *fp; int i, retval; @@ -378,9 +375,7 @@ struct { * Set an individual neighbor cache entry */ int -set(argc, argv) - int argc; - char **argv; +set(int argc, char **argv) { register struct sockaddr_in6 *sin = &sin_m; register struct sockaddr_dl *sdl; @@ -455,8 +450,7 @@ overwrite: * Display an individual neighbor cache entry */ void -get(host) - char *host; +get(char *host) { struct sockaddr_in6 *sin = &sin_m; struct addrinfo hints, *res; @@ -486,8 +480,7 @@ get(host) * Delete a neighbor cache entry */ int -delete(host) - char *host; +delete(char *host) { struct sockaddr_in6 *sin = &sin_m; register struct rt_msghdr *rtm = &m_rtmsg.m_rtm; @@ -555,9 +548,7 @@ delete: * Dump the entire neighbor cache */ void -dump(addr, cflag) - struct in6_addr *addr; - int cflag; +dump(struct in6_addr *addr, int cflag) { int mib[6]; size_t needed; @@ -762,10 +753,7 @@ again:; } static struct in6_nbrinfo * -getnbrinfo(addr, ifindex, warning) - struct in6_addr *addr; - int ifindex; - int warning; +getnbrinfo(struct in6_addr *addr, int ifindex, int warning) { static struct in6_nbrinfo nbi; int s; @@ -806,9 +794,7 @@ ether_str(struct sockaddr_dl *sdl) } int -ndp_ether_aton(a, n) - char *a; - u_char *n; +ndp_ether_aton(char *a, u_char *n) { int i, o[6]; @@ -840,8 +826,7 @@ usage() } int -rtmsg(cmd) - int cmd; +rtmsg(int cmd) { static int seq; int rlen; @@ -906,10 +891,7 @@ doit: } void -ifinfo(ifname, argc, argv) - char *ifname; - int argc; - char **argv; +ifinfo(char *ifname, int argc, char **argv) { struct in6_ndireq nd; int i, s; @@ -1478,8 +1460,7 @@ harmonize_rtr() #ifdef SIOCSDEFIFACE_IN6 /* XXX: check SIOCGDEFIFACE_IN6 as well? */ static void -setdefif(ifname) - char *ifname; +setdefif(char *ifname) { struct in6_ndifreq ndifreq; unsigned int ifindex; @@ -1532,8 +1513,7 @@ getdefif() #endif static char * -sec2str(total) - time_t total; +sec2str(time_t total) { static char result[256]; int days, hours, mins, secs; @@ -1578,8 +1558,7 @@ sec2str(total) * from tcpdump/util.c */ static void -ts_print(tvp) - const struct timeval *tvp; +ts_print(const struct timeval *tvp) { int s; From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 13:31:06 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85E16151; Tue, 10 Dec 2013 13:31:06 +0000 (UTC) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 3D3891C7C; Tue, 10 Dec 2013 13:31:05 +0000 (UTC) Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id C9E51C4927; Tue, 10 Dec 2013 15:31:04 +0200 (EET) Date: Tue, 10 Dec 2013 15:31:44 +0200 From: Aleksandr Rybalko To: Andreas Tobler Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken Message-Id: <20131210153144.c46b74fa28253f3456aa2821@ddteam.net> In-Reply-To: <52A4E865.6080602@FreeBSD.org> References: <201312052238.rB5McsVN020719@svn.freebsd.org> <52A3A8DE.9090907@FreeBSD.org> <2a683b40-1465-44f9-a9aa-d079f660529d@email.android.com> <52A4E865.6080602@FreeBSD.org> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@FreeBSD.org, Aleksandr Rybalko , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 13:31:06 -0000 On Sun, 08 Dec 2013 22:45:09 +0100 Andreas Tobler wrote: > Hi Aleksandr, > > On 08.12.13 00:59, Aleksandr Rybalko wrote: > > Andreas Tobler написав(ла): > >> On 05.12.13 23:38, Aleksandr Rybalko wrote: > >>> Author: ray > >>> Date: Thu Dec 5 22:38:53 2013 > >>> New Revision: 259016 > >>> URL: http://svnweb.freebsd.org/changeset/base/259016 > >>> > >>> Log: > >>> Merge VT(9) project (a.k.a. newcons). > >>> > >>> Reviewed by: nwhitehorn > >>> MFC_to_10_after: re approval > >>> > >>> Sponsored by: The FreeBSD Foundation > >> > >> Great! Thanks, gives a new look & feel on the console :) > >> Have it running on amd64/i386 and PowerMac(32/64-bit). > >> The only thing I need to figure is the mapping of the AltGr or in Mac > >> world, the alt key mapping. Iow, the third level mapping of the keys. > >> e.g. the @ here is on altgr-2... > >> > >> Again, thanks! > >> Andreas > > > > > I'm glad to fix that, but I've to understand how it is should work :-) > > Hehe :) > > So do I. I was playing a bit while comparing to syscons.c > > And with the below diff I'm able to get what I want. At least when I > press RALT (Altgr) I get the third symbol printed on my keyboard. > I have a couple of Thinkpads here where I play with. (The PowerMac's are > currently to loud) > > For example, on the '2' I have the '"' as the second symbol and the '@' > as third symbol. Yeah, these are european keyboards.... > > Now I do not prepend the 0x1b and then my RALT behaves as used to, at > least for me. > > I do not know the fine details but LALT and RALT are different. > > What do you think, others? > > For me this is a really important thing since all the 'special' keys are > not accesible w/o the 'hack' below. If I want the pipe (|), or writing > code ({}, [], ...) I have to remote login to get the characters I need. > But I guess I do not need to explain that ;) > > TIA, > Andreas Hi Andreas! That keyboards have no Shift key for that? :) I will be glad to apply your changes, but I have to know how it should be controlled. RU and UA PC keyboards have same 3 symbols '2', '"', '@' To get '2' i have to press only '2' To get '@' I have to press Shift+'2' To get '"' I have to switch to UA or RU and press Shift+'2' Ahh, or use some called Third-Level (IIRC) in Xorg terms. Temporary lang switch. Which commonly mapped to one of Alt. Right? So R-Alt+Shift+'2'? > > Index: vt_core.c > =================================================================== > --- vt_core.c (revision 259095) > +++ vt_core.c (working copy) > @@ -408,6 +408,7 @@ > } else { > switch (c & ~RELKEY) { > case (SPCLKEY | RALT): > + break; > case (SPCLKEY | LALT): > vd->vd_kbstate |= ALKED; > } -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 13:34:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4A43515; Tue, 10 Dec 2013 13:34:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D190F1CA9; Tue, 10 Dec 2013 13:34:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBADYSCD052736; Tue, 10 Dec 2013 13:34:28 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBADYSlS052735; Tue, 10 Dec 2013 13:34:28 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201312101334.rBADYSlS052735@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 10 Dec 2013 13:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259171 - head/usr.sbin/ndp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 13:34:29 -0000 Author: ae Date: Tue Dec 10 13:34:28 2013 New Revision: 259171 URL: http://svnweb.freebsd.org/changeset/base/259171 Log: Remove unused macro ADVANCE() and replace ROUNDUP() macro with ALIGN(). They aren't the same, but in our use cases ALIGN gives the same results. Modified: head/usr.sbin/ndp/ndp.c Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Tue Dec 10 13:33:56 2013 (r259170) +++ head/usr.sbin/ndp/ndp.c Tue Dec 10 13:34:28 2013 (r259171) @@ -109,11 +109,6 @@ #include #include "gmt2local.h" -/* packing rule for routing socket */ -#define ROUNDUP(a) \ - ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) -#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) - #define NEXTADDR(w, s) \ if (rtm->rtm_addrs & (w)) { \ bcopy((char *)&s, cp, sizeof(s)); cp += SA_SIZE(&s);} @@ -421,7 +416,7 @@ set(int argc, char **argv) /* NOTREACHED */ } sin = (struct sockaddr_in6 *)(rtm + 1); - sdl = (struct sockaddr_dl *)(ROUNDUP(sin->sin6_len) + (char *)sin); + sdl = (struct sockaddr_dl *)(ALIGN(sin->sin6_len) + (char *)sin); if (IN6_ARE_ADDR_EQUAL(&sin->sin6_addr, &sin_m.sin6_addr)) { if (sdl->sdl_family == AF_LINK && !(rtm->rtm_flags & RTF_GATEWAY)) { @@ -508,7 +503,7 @@ delete(char *host) /* NOTREACHED */ } sin = (struct sockaddr_in6 *)(rtm + 1); - sdl = (struct sockaddr_dl *)(ROUNDUP(sin->sin6_len) + (char *)sin); + sdl = (struct sockaddr_dl *)(ALIGN(sin->sin6_len) + (char *)sin); if (IN6_ARE_ADDR_EQUAL(&sin->sin6_addr, &sin_m.sin6_addr)) { if (sdl->sdl_family == AF_LINK && !(rtm->rtm_flags & RTF_GATEWAY)) { @@ -598,7 +593,7 @@ again:; rtm = (struct rt_msghdr *)next; sin = (struct sockaddr_in6 *)(rtm + 1); - sdl = (struct sockaddr_dl *)((char *)sin + ROUNDUP(sin->sin6_len)); + sdl = (struct sockaddr_dl *)((char *)sin + ALIGN(sin->sin6_len)); /* * Some OSes can produce a route that has the LINK flag but From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 13:43:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B71ECAE; Tue, 10 Dec 2013 13:43:18 +0000 (UTC) Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be [195.238.6.176]) by mx1.freebsd.org (Postfix) with ESMTP id 6671E1D43; Tue, 10 Dec 2013 13:43:17 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgGAN0Zp1JbsKXL/2dsb2JhbABZgwc4uW6BGxd0giUBAQU6HCMQCw4KCRoLDyoeBogZAQjAchMEjwUHhDQEmBOSFIFrgT87gSwk Received: from 203.165-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.165.203]) by relay.skynet.be with ESMTP; 10 Dec 2013 14:43:09 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id rBADh7a1003488; Tue, 10 Dec 2013 14:43:08 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Tue, 10 Dec 2013 14:43:07 +0100 From: Tijl Coosemans To: Aleksandr Rybalko Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken Message-ID: <20131210144307.20d32075@kalimero.tijl.coosemans.org> In-Reply-To: <20131210153144.c46b74fa28253f3456aa2821@ddteam.net> References: <201312052238.rB5McsVN020719@svn.freebsd.org> <52A3A8DE.9090907@FreeBSD.org> <2a683b40-1465-44f9-a9aa-d079f660529d@email.android.com> <52A4E865.6080602@FreeBSD.org> <20131210153144.c46b74fa28253f3456aa2821@ddteam.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andreas Tobler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 13:43:18 -0000 On Tue, 10 Dec 2013 15:31:44 +0200 Aleksandr Rybalko wrote: > That keyboards have no Shift key for that? :) > I will be glad to apply your changes, but I have to know how it should > be controlled. > > RU and UA PC keyboards have same 3 symbols '2', '"', '@' > To get '2' i have to press only '2' > To get '@' I have to press Shift+'2' > To get '"' I have to switch to UA or RU and press Shift+'2' > > Ahh, or use some called Third-Level (IIRC) in Xorg terms. Temporary > lang switch. Which commonly mapped to one of Alt. Right? > So R-Alt+Shift+'2'? https://en.wikipedia.org/wiki/AltGr From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 14:17:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A6553E3; Tue, 10 Dec 2013 14:17:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E979F1FB0; Tue, 10 Dec 2013 14:17:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAEH7X1067811; Tue, 10 Dec 2013 14:17:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAEH74I067810; Tue, 10 Dec 2013 14:17:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201312101417.rBAEH74I067810@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 10 Dec 2013 14:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259176 - head/usr.sbin/ndp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 14:17:08 -0000 Author: ae Date: Tue Dec 10 14:17:07 2013 New Revision: 259176 URL: http://svnweb.freebsd.org/changeset/base/259176 Log: Change the type of addr argument in dump() function to be able disambiguate link-local addresses from different zones. Modified: head/usr.sbin/ndp/ndp.c Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Tue Dec 10 13:42:59 2013 (r259175) +++ head/usr.sbin/ndp/ndp.c Tue Dec 10 14:17:07 2013 (r259176) @@ -131,7 +131,7 @@ void getsocket(void); int set(int, char **); void get(char *); int delete(char *); -void dump(struct in6_addr *, int); +void dump(struct sockaddr_in6 *, int); static struct in6_nbrinfo *getnbrinfo(struct in6_addr *, int, int); static char *ether_str(struct sockaddr_dl *); int ndp_ether_aton(char *, u_char *); @@ -461,7 +461,9 @@ get(char *host) return; } sin->sin6_addr = ((struct sockaddr_in6 *)res->ai_addr)->sin6_addr; - dump(&sin->sin6_addr, 0); + sin->sin6_scope_id = + ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id; + dump(sin, 0); if (found_entry == 0) { getnameinfo((struct sockaddr *)sin, sin->sin6_len, host_buf, sizeof(host_buf), NULL ,0, @@ -543,7 +545,7 @@ delete: * Dump the entire neighbor cache */ void -dump(struct in6_addr *addr, int cflag) +dump(struct sockaddr_in6 *addr, int cflag) { int mib[6]; size_t needed; @@ -615,7 +617,9 @@ again:; continue; if (addr) { - if (!IN6_ARE_ADDR_EQUAL(addr, &sin->sin6_addr)) + if (IN6_ARE_ADDR_EQUAL(&addr->sin6_addr, + &sin->sin6_addr) == 0 || + addr->sin6_scope_id != sin->sin6_scope_id) continue; found_entry = 1; } else if (IN6_IS_ADDR_MULTICAST(&sin->sin6_addr)) From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 15:36:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E86116FC; Tue, 10 Dec 2013 15:36:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4F2D160E; Tue, 10 Dec 2013 15:36:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAFaTTn096420; Tue, 10 Dec 2013 15:36:29 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAFaTON096418; Tue, 10 Dec 2013 15:36:29 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312101536.rBAFaTON096418@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 10 Dec 2013 15:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259178 - in head/sys: conf dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 15:36:30 -0000 Author: ray Date: Tue Dec 10 15:36:29 2013 New Revision: 259178 URL: http://svnweb.freebsd.org/changeset/base/259178 Log: Break build with error in case when both syscons and newcons are enabled. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/options head/sys/dev/vt/vt.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Dec 10 14:54:11 2013 (r259177) +++ head/sys/conf/options Tue Dec 10 15:36:29 2013 (r259178) @@ -757,6 +757,9 @@ SC_NORM_REV_ATTR opt_syscons.h SC_PIXEL_MODE opt_syscons.h SC_RENDER_DEBUG opt_syscons.h SC_TWOBUTTON_MOUSE opt_syscons.h +DEV_SC opt_syscons.h +DEV_VT opt_syscons.h + # teken terminal emulator options TEKEN_CONS25 opt_teken.h Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Tue Dec 10 14:54:11 2013 (r259177) +++ head/sys/dev/vt/vt.h Tue Dec 10 15:36:29 2013 (r259178) @@ -49,6 +49,11 @@ #include "opt_syscons.h" #include "opt_splash.h" +#ifdef DEV_SC +#error "Build with both syscons and vt is not supported. Please enable only \ +one 'device sc' or 'device vt'" +#endif + #ifndef VT_MAXWINDOWS #ifdef MAXCONS #define VT_MAXWINDOWS MAXCONS From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 15:53:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DD17BAC; Tue, 10 Dec 2013 15:53:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F29591775; Tue, 10 Dec 2013 15:53:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAFr1mN003247; Tue, 10 Dec 2013 15:53:01 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAFr0jx003237; Tue, 10 Dec 2013 15:53:00 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312101553.rBAFr0jx003237@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 10 Dec 2013 15:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259179 - in head/sys: dev/drm2 modules/drm2/drm2 modules/drm2/i915kms modules/drm2/radeonkms X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 15:53:02 -0000 Author: ray Date: Tue Dec 10 15:53:00 2013 New Revision: 259179 URL: http://svnweb.freebsd.org/changeset/base/259179 Log: Disable error message about failed attempt to attach fbd when drm2 built with syscons. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_fb_helper.c head/sys/modules/drm2/drm2/Makefile head/sys/modules/drm2/i915kms/Makefile head/sys/modules/drm2/radeonkms/Makefile Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Tue Dec 10 15:36:29 2013 (r259178) +++ head/sys/dev/drm2/drmP.h Tue Dec 10 15:53:00 2013 (r259179) @@ -113,6 +113,7 @@ struct drm_device; #include "opt_compat.h" #include "opt_drm.h" +#include "opt_syscons.h" #ifdef DRM_DEBUG #undef DRM_DEBUG #define DRM_DEBUG_DEFAULT_ON 1 Modified: head/sys/dev/drm2/drm_fb_helper.c ============================================================================== --- head/sys/dev/drm2/drm_fb_helper.c Tue Dec 10 15:36:29 2013 (r259178) +++ head/sys/dev/drm2/drm_fb_helper.c Tue Dec 10 15:53:00 2013 (r259179) @@ -1044,8 +1044,10 @@ int drm_fb_helper_single_fb_probe(struct kdev = fb_helper->dev->device; fbd = device_add_child(kdev, "fbd", device_get_unit(kdev)); ret = device_probe_and_attach(fbd); +#ifdef DEV_VT if (ret != 0) DRM_ERROR("Failed to attach fbd device: %d\n", ret); +#endif } #else if (new_fb) { Modified: head/sys/modules/drm2/drm2/Makefile ============================================================================== --- head/sys/modules/drm2/drm2/Makefile Tue Dec 10 15:36:29 2013 (r259178) +++ head/sys/modules/drm2/drm2/Makefile Tue Dec 10 15:53:00 2013 (r259179) @@ -54,6 +54,6 @@ SRCS += drm_ioc32.c .endif SRCS +=device_if.h bus_if.h pci_if.h device_if.h iicbus_if.h opt_drm.h \ - opt_vm.h opt_compat.h + opt_vm.h opt_compat.h opt_syscons.h .include Modified: head/sys/modules/drm2/i915kms/Makefile ============================================================================== --- head/sys/modules/drm2/i915kms/Makefile Tue Dec 10 15:36:29 2013 (r259178) +++ head/sys/modules/drm2/i915kms/Makefile Tue Dec 10 15:53:00 2013 (r259179) @@ -35,6 +35,6 @@ SRCS += i915_ioc32.c .endif SRCS += device_if.h fb_if.h bus_if.h pci_if.h iicbus_if.h iicbb_if.h \ - opt_drm.h opt_compat.h + opt_drm.h opt_compat.h opt_syscons.h .include Modified: head/sys/modules/drm2/radeonkms/Makefile ============================================================================== --- head/sys/modules/drm2/radeonkms/Makefile Tue Dec 10 15:36:29 2013 (r259178) +++ head/sys/modules/drm2/radeonkms/Makefile Tue Dec 10 15:53:00 2013 (r259179) @@ -94,6 +94,7 @@ SRCS += \ opt_acpi.h \ opt_compat.h \ opt_drm.h \ + opt_syscons.h \ acpi_if.h \ bus_if.h \ fb_if.h \ From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 17:16:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D4B32EE; Tue, 10 Dec 2013 17:16:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 379CD1E75; Tue, 10 Dec 2013 17:16:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAHGETl033141; Tue, 10 Dec 2013 17:16:14 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAHGESo033140; Tue, 10 Dec 2013 17:16:14 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201312101716.rBAHGESo033140@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 10 Dec 2013 17:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259180 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 17:16:14 -0000 Author: pjd Date: Tue Dec 10 17:16:13 2013 New Revision: 259180 URL: http://svnweb.freebsd.org/changeset/base/259180 Log: Fix missing new line after: Netvsc initializing... during boot. Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Dec 10 15:53:00 2013 (r259179) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Dec 10 17:16:13 2013 (r259180) @@ -190,6 +190,7 @@ netvsc_init(void) if (!cold && !g_netvsc_drv.drv_inited) { g_netvsc_drv.drv_inited = 1; netvsc_drv_init(); + printf("done!\n"); } else { printf("Already initialized!\n"); } From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 17:27:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6128C7A9; Tue, 10 Dec 2013 17:27:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7641F20; Tue, 10 Dec 2013 17:27:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAHRCbR036895; Tue, 10 Dec 2013 17:27:12 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAHRC79036894; Tue, 10 Dec 2013 17:27:12 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312101727.rBAHRC79036894@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 10 Dec 2013 17:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259182 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 17:27:12 -0000 Author: trasz Date: Tue Dec 10 17:27:11 2013 New Revision: 259182 URL: http://svnweb.freebsd.org/changeset/base/259182 Log: Fix handling for empty auth-groups. Without it, ctld child process would either exit on assertion, or, if assertions are not enabled, fail to authenticate the target. MFC after: 2 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Dec 10 17:26:52 2013 (r259181) +++ head/usr.sbin/ctld/login.c Tue Dec 10 17:27:11 2013 (r259182) @@ -1007,6 +1007,14 @@ login(struct connection *conn) return; } + if (ag->ag_type == AG_TYPE_UNKNOWN) { + /* + * This can happen with empty auth-group. + */ + login_send_error(request, 0x02, 0x01); + log_errx(1, "auth-group type not set, denying access"); + } + log_debugx("CHAP authentication required"); auth_method = keys_find(request_keys, "AuthMethod"); From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 18:18:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1497926; Tue, 10 Dec 2013 18:18:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD58312D0; Tue, 10 Dec 2013 18:18:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAIId3O055279; Tue, 10 Dec 2013 18:18:39 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAIId6U055278; Tue, 10 Dec 2013 18:18:39 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312101818.rBAIId6U055278@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 10 Dec 2013 18:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259183 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 18:18:39 -0000 Author: trasz Date: Tue Dec 10 18:18:39 2013 New Revision: 259183 URL: http://svnweb.freebsd.org/changeset/base/259183 Log: Properly refuse handoff requests on already connected sessions. Previously this would result in dropping the session. MFC after: 2 days Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Tue Dec 10 17:27:11 2013 (r259182) +++ head/sys/dev/iscsi/iscsi.c Tue Dec 10 18:18:39 2013 (r259183) @@ -1247,6 +1247,18 @@ iscsi_ioctl_daemon_handoff(struct iscsi_ sx_sunlock(&sc->sc_lock); return (EINVAL); } + if (is->is_connected) { + /* + * This might have happened because another iscsid(8) + * instance handed off the connection in the meantime. + * Just return. + */ + ISCSI_SESSION_WARN(is, "handoff on already connected " + "session"); + ISCSI_SESSION_UNLOCK(is); + sx_sunlock(&sc->sc_lock); + return (EBUSY); + } strlcpy(is->is_target_alias, handoff->idh_target_alias, sizeof(is->is_target_alias)); From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 19:15:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DD881A9; Tue, 10 Dec 2013 19:15:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7001762; Tue, 10 Dec 2013 19:15:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAJFRDe077574; Tue, 10 Dec 2013 19:15:27 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAJFRWp077573; Tue, 10 Dec 2013 19:15:27 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201312101915.rBAJFRWp077573@svn.freebsd.org> From: Joel Dahl Date: Tue, 10 Dec 2013 19:15:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259186 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 19:15:27 -0000 Author: joel (doc committer) Date: Tue Dec 10 19:15:26 2013 New Revision: 259186 URL: http://svnweb.freebsd.org/changeset/base/259186 Log: Minor mdoc fixes. Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Tue Dec 10 19:14:19 2013 (r259185) +++ head/share/man/man4/netmap.4 Tue Dec 10 19:15:26 2013 (r259186) @@ -77,7 +77,6 @@ sockets or BPF/pcap). For a list of devices with native .Nm support, see the end of this manual page. -.Pp .Sh OPERATION - THE NETMAP API .Nm clients must first @@ -99,7 +98,6 @@ interface or on a port of a switch, as indicated below. Additional fields in the .Pa struct nmreq control the details of operation. -.Pp .Bl -tag -width XXXX .It Dv Interface name (e.g. 'em0', 'eth1', ... ) The data path of the interface is disconnected from the host stack. @@ -237,7 +235,6 @@ accordingly, as shown in the figure belo |-- avail --| (before syscall) cur .Ed - In receive rings, after a system call 'cur' indicates the first slot that contains a valid packet, and 'avail' reports how many of them are available. @@ -289,7 +286,6 @@ are normally fixed size (2 Kbyte) buffer that contain packet data. Buffers addresses are computed through macros. .El -.Pp .Bl -tag -width XXX Some macros support the access to objects in the shared memory region. In particular, From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 19:26:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DAB5970; Tue, 10 Dec 2013 19:26:54 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9842A183B; Tue, 10 Dec 2013 19:26:52 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rBAJQoNA009224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Dec 2013 23:26:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rBAJQoMH009223; Tue, 10 Dec 2013 23:26:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 10 Dec 2013 23:26:50 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r259150 - head/sys/dev/cxgbe Message-ID: <20131210192650.GK4615@FreeBSD.org> References: <201312100007.rBA074Qq055579@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312100007.rBA074Qq055579@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 19:26:54 -0000 On Tue, Dec 10, 2013 at 12:07:04AM +0000, Adrian Chadd wrote: A> Author: adrian A> Date: Tue Dec 10 00:07:04 2013 A> New Revision: 259150 A> URL: http://svnweb.freebsd.org/changeset/base/259150 A> A> Log: A> Print out the full PCIe link negotiation during dmesg. A> A> I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot A> or not. A> A> Reviewed by: np A> Sponsored by: Netflix, inc. Shouldn't this be done with common code for all drivers on PCI bus(es)? This is definitely useful for all devices, not to cxgbe(4) only. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 19:30:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69899B28; Tue, 10 Dec 2013 19:30:12 +0000 (UTC) Received: from mail-ea0-x233.google.com (mail-ea0-x233.google.com [IPv6:2a00:1450:4013:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3A9185C; Tue, 10 Dec 2013 19:30:11 +0000 (UTC) Received: by mail-ea0-f179.google.com with SMTP id r15so2461842ead.24 for ; Tue, 10 Dec 2013 11:30:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=W6xCtS2rF97H5U+L8kYWZJS2Tdi1xpEz2DwnfkWGOwQ=; b=p2f7oRoMyJbnsgsgAplYQEE9J2ukH8k5sWH8Y79lGpApxozrqG1P1Wz/OvQi4AwUGG eqHlNbIExTgZOIRApfxCxbJnme2jAuerMMSG/nAfZt7JS5A2NjkbIF/5R40WYifTtAQ8 MEU0anyGk6zspGNgfBqG1j3XJ85QYkdmYesGYvRUHvdW5a/H3qEF5mSSR6DbDMw1KmGb Q+2or2u8a9dQ0sKbE6B/2mMpZGzE/Z/OtFA5s80fNPxOL09FVdZHysJEfo2p1r99a74d Hd+1SXswQFd+k0NsxcBPajgUEUo9477IDV2owBp4qxbBqGSbYpbUzJq+usH600rEgxe2 7hMQ== X-Received: by 10.14.215.67 with SMTP id d43mr3988965eep.108.1386703809667; Tue, 10 Dec 2013 11:30:09 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([178.137.150.35]) by mx.google.com with ESMTPSA id 4sm14860693eed.14.2013.12.10.11.30.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Dec 2013 11:30:08 -0800 (PST) Sender: Alexander Motin Message-ID: <52A76BBE.5030903@FreeBSD.org> Date: Tue, 10 Dec 2013 21:30:06 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Gleb Smirnoff , Adrian Chadd Subject: Re: svn commit: r259150 - head/sys/dev/cxgbe References: <201312100007.rBA074Qq055579@svn.freebsd.org> <20131210192650.GK4615@FreeBSD.org> In-Reply-To: <20131210192650.GK4615@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 19:30:12 -0000 On 10.12.2013 21:26, Gleb Smirnoff wrote: > On Tue, Dec 10, 2013 at 12:07:04AM +0000, Adrian Chadd wrote: > A> Author: adrian > A> Date: Tue Dec 10 00:07:04 2013 > A> New Revision: 259150 > A> URL: http://svnweb.freebsd.org/changeset/base/259150 > A> > A> Log: > A> Print out the full PCIe link negotiation during dmesg. > A> > A> I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot > A> or not. > A> > A> Reviewed by: np > A> Sponsored by: Netflix, inc. > > Shouldn't this be done with common code for all drivers > on PCI bus(es)? > > This is definitely useful for all devices, not to cxgbe(4) only. Why not just read `pciconf -lc` output for that? -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 19:30:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A099B23; Tue, 10 Dec 2013 19:30:08 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 71377185A; Tue, 10 Dec 2013 19:30:08 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4D38EB91E; Tue, 10 Dec 2013 14:30:06 -0500 (EST) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r259150 - head/sys/dev/cxgbe Date: Tue, 10 Dec 2013 14:29:57 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312100007.rBA074Qq055579@svn.freebsd.org> <20131210192650.GK4615@FreeBSD.org> In-Reply-To: <20131210192650.GK4615@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201312101429.58025.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 10 Dec 2013 14:30:06 -0500 (EST) Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 19:30:08 -0000 On Tuesday, December 10, 2013 2:26:50 pm Gleb Smirnoff wrote: > On Tue, Dec 10, 2013 at 12:07:04AM +0000, Adrian Chadd wrote: > A> Author: adrian > A> Date: Tue Dec 10 00:07:04 2013 > A> New Revision: 259150 > A> URL: http://svnweb.freebsd.org/changeset/base/259150 > A> > A> Log: > A> Print out the full PCIe link negotiation during dmesg. > A> > A> I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot > A> or not. > A> > A> Reviewed by: np > A> Sponsored by: Netflix, inc. > > Shouldn't this be done with common code for all drivers > on PCI bus(es)? > > This is definitely useful for all devices, not to cxgbe(4) only. It's already done in pciconf -lc which is the right place to put this instead of adding more noise to dmesg. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 19:42:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 611D1752; Tue, 10 Dec 2013 19:42:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D73C1984; Tue, 10 Dec 2013 19:42:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAJgaNo088727; Tue, 10 Dec 2013 19:42:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAJgar8088726; Tue, 10 Dec 2013 19:42:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201312101942.rBAJgar8088726@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 10 Dec 2013 19:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259189 - head/games/fortune/datfiles X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 19:42:36 -0000 Author: gavin Date: Tue Dec 10 19:42:35 2013 New Revision: 259189 URL: http://svnweb.freebsd.org/changeset/base/259189 Log: Fix typo in fortune (go -> to) Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Tue Dec 10 19:22:02 2013 (r259188) +++ head/games/fortune/datfiles/fortunes Tue Dec 10 19:42:35 2013 (r259189) @@ -46677,7 +46677,7 @@ they had just discovered that he lived i taken another one of those damned Vermont winters!" % THE OLD POOL SHOOTER had won many a game in his life. But now it was time -to hang up the cue. When he did, all the other cues came crashing go the +to hang up the cue. When he did, all the other cues came crashing to the floor. "Sorry," he said with a smile. From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 19:56:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21DA81A9; Tue, 10 Dec 2013 19:56:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 018E11AA1; Tue, 10 Dec 2013 19:56:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAJuQhd093519; Tue, 10 Dec 2013 19:56:26 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAJuQ26093518; Tue, 10 Dec 2013 19:56:26 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312101956.rBAJuQ26093518@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 10 Dec 2013 19:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259191 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 19:56:27 -0000 Author: trociny Date: Tue Dec 10 19:56:26 2013 New Revision: 259191 URL: http://svnweb.freebsd.org/changeset/base/259191 Log: For memsync replication, hio_countdown is used not only as an indication when a request can be moved to done queue, but also for detecting the current state of memsync request. This approach has problems, e.g. leaking a request if memsynk ack from the secondary failed, or racy usage of write_complete, which should be called only once per write request, but for memsync can be entered by local_send_thread and ggate_send_thread simultaneously. So the following approach is implemented instead: 1) Use hio_countdown only for counting components we waiting to complete, i.e. initially it is always 2 for any replication mode. 2) To distinguish between "memsync ack" and "memsync fin" responses from the secondary, add and use hio_memsyncacked field. 3) write_complete() in component threads is called only before releasing hio_countdown (i.e. before the hio may be returned to the done queue). 4) Add and use hio_writecount refcounter to detect when write_complete() can be called in memsync case. Reported by: Pete French petefrench ingresso.co.uk Tested by: Pete French petefrench ingresso.co.uk MFC after: 2 weeks Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Dec 10 19:48:48 2013 (r259190) +++ head/sbin/hastd/primary.c Tue Dec 10 19:56:26 2013 (r259191) @@ -94,6 +94,15 @@ struct hio { */ bool hio_done; /* + * Number of components we are still waiting before sending write + * completion ack to GEOM Gate. Used for memsync. + */ + refcnt_t hio_writecount; + /* + * Memsync request was acknowleged by remote. + */ + bool hio_memsyncacked; + /* * Remember replication from the time the request was initiated, * so we won't get confused when replication changes on reload. */ @@ -231,6 +240,9 @@ static pthread_mutex_t metadata_lock; #define ISSYNCREQ(hio) ((hio)->hio_ggio.gctl_unit == -1) #define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0) #define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2) +#define ISMEMSYNCWRITE(hio) \ + (((hio)->hio_replication == HAST_REPLICATION_MEMSYNC && \ + (hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio))) static struct hast_resource *gres; @@ -1344,6 +1356,10 @@ ggate_recv_thread(void *arg) } else { mtx_unlock(&res->hr_amp_lock); } + if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) { + hio->hio_memsyncacked = false; + refcnt_init(&hio->hio_writecount, ncomps); + } break; case BIO_DELETE: res->hr_stat_delete++; @@ -1354,13 +1370,7 @@ ggate_recv_thread(void *arg) } pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE) { - /* Each remote request needs two responses in memsync. */ - refcnt_init(&hio->hio_countdown, ncomps + 1); - } else { - refcnt_init(&hio->hio_countdown, ncomps); - } + refcnt_init(&hio->hio_countdown, ncomps); for (ii = ncomp; ii < ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } @@ -1470,42 +1480,13 @@ local_send_thread(void *arg) } break; } - - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - ggio->gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * 0: remote memsync, remote final, local write - * 1: remote memsync, local write, (remote final) - * 2: local write, (remote memsync), (remote final) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Local write finished as last. - */ - break; - case 1: - /* - * Local write finished after remote memsync - * reply arrvied. We can complete the write now. - */ - if (hio->hio_errors[0] == 0) - write_complete(res, hio); - continue; - case 2: - /* - * Local write finished as first. - */ - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + write_complete(res, hio); } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1627,10 +1608,8 @@ remote_send_thread(void *arg) nv_add_uint64(nv, (uint64_t)ggio->gctl_seq, "seq"); nv_add_uint64(nv, offset, "offset"); nv_add_uint64(nv, length, "length"); - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) { + if (ISMEMSYNCWRITE(hio)) nv_add_uint8(nv, 1, "memsync"); - } if (nv_error(nv) != 0) { hio->hio_errors[ncomp] = nv_error(nv); pjdlog_debug(2, @@ -1709,8 +1688,12 @@ done_queue: } else { mtx_unlock(&res->hr_amp_lock); } - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) - (void)refcnt_release(&hio->hio_countdown); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + } + } } if (refcnt_release(&hio->hio_countdown) > 0) continue; @@ -1768,6 +1751,7 @@ remote_recv_thread(void *arg) hio_next[ncomp]); hio_recv_list_size[ncomp]--; mtx_unlock(&hio_recv_list_lock[ncomp]); + hio->hio_errors[ncomp] = ENOTCONN; goto done_queue; } if (hast_proto_recv_hdr(res->hr_remotein, &nv) == -1) { @@ -1841,82 +1825,34 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - hio->hio_ggio.gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * - * 0: local write, remote memsync, remote final - * or - * 0: remote memsync, local write, remote final - * - * 1: local write, remote memsync, (remote final) - * or - * 1: remote memsync, remote final, (local write) - * - * 2: remote memsync, (local write), (remote final) - * or - * 2: remote memsync, (remote final), (local write) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Remote final reply arrived. - */ - PJDLOG_ASSERT(!memsyncack); - break; - case 1: - if (memsyncack) { - /* - * Local request already finished, so we - * can complete the write. - */ + if (ISMEMSYNCWRITE(hio)) { + if (!hio->hio_memsyncacked) { + PJDLOG_ASSERT(memsyncack || + hio->hio_errors[ncomp] != 0); + /* Remote ack arrived. */ + if (refcnt_release(&hio->hio_writecount) == 0) { if (hio->hio_errors[0] == 0) write_complete(res, hio); - /* - * We still need to wait for final - * remote reply. - */ + } + hio->hio_memsyncacked = true; + if (hio->hio_errors[ncomp] == 0) { pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); + "remote_recv: (%p) Moving request " + "back to the recv queue.", hio); mtx_lock(&hio_recv_list_lock[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); - } else { - /* - * Remote final reply arrived before - * local write finished. - * Nothing to do in such case. - */ + continue; } - continue; - case 2: - /* - * We received remote memsync reply even before - * local write finished. - */ - PJDLOG_ASSERT(memsyncack); - - pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - hio_recv_list_size[ncomp]++; - mtx_unlock(&hio_recv_list_lock[ncomp]); - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + } else { + PJDLOG_ASSERT(!memsyncack); + /* Remote final reply arrived. */ } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 19:58:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD3392FF; Tue, 10 Dec 2013 19:58:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80F011AB0; Tue, 10 Dec 2013 19:58:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAJwAUY093731; Tue, 10 Dec 2013 19:58:10 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAJwAKI093730; Tue, 10 Dec 2013 19:58:10 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312101958.rBAJwAKI093730@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 10 Dec 2013 19:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259192 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 19:58:10 -0000 Author: trociny Date: Tue Dec 10 19:58:10 2013 New Revision: 259192 URL: http://svnweb.freebsd.org/changeset/base/259192 Log: Add some macros to make the code more readable (no functional chages). MFC after: 2 weeks Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Dec 10 19:56:26 2013 (r259191) +++ head/sbin/hastd/primary.c Tue Dec 10 19:58:10 2013 (r259192) @@ -233,6 +233,10 @@ static pthread_mutex_t metadata_lock; mtx_unlock(&hio_##name##_list_lock); \ } while (0) +#define ISFULLSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_FULLSYNC) +#define ISMEMSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_MEMSYNC) +#define ISASYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_ASYNC) + #define SYNCREQ(hio) do { \ (hio)->hio_ggio.gctl_unit = -1; \ (hio)->hio_ggio.gctl_seq = 1; \ @@ -240,9 +244,9 @@ static pthread_mutex_t metadata_lock; #define ISSYNCREQ(hio) ((hio)->hio_ggio.gctl_unit == -1) #define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0) #define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2) -#define ISMEMSYNCWRITE(hio) \ - (((hio)->hio_replication == HAST_REPLICATION_MEMSYNC && \ - (hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio))) + +#define ISMEMSYNCWRITE(hio) (ISMEMSYNC(hio) && \ + (hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) static struct hast_resource *gres; @@ -1356,7 +1360,7 @@ ggate_recv_thread(void *arg) } else { mtx_unlock(&res->hr_amp_lock); } - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) { + if (ISMEMSYNC(hio)) { hio->hio_memsyncacked = false; refcnt_init(&hio->hio_writecount, ncomps); } @@ -1441,8 +1445,7 @@ local_send_thread(void *arg) ret, (intmax_t)ggio->gctl_length); } else { hio->hio_errors[ncomp] = 0; - if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + if (ISASYNC(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 20:02:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A5AD480; Tue, 10 Dec 2013 20:02:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 370D91B17; Tue, 10 Dec 2013 20:02:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAK2A6R096924; Tue, 10 Dec 2013 20:02:10 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAK29nF096921; Tue, 10 Dec 2013 20:02:09 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312102002.rBAK29nF096921@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 10 Dec 2013 20:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259193 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 20:02:10 -0000 Author: trociny Date: Tue Dec 10 20:02:09 2013 New Revision: 259193 URL: http://svnweb.freebsd.org/changeset/base/259193 Log: Fix compiler warnings. MFC after: 2 weeks Modified: head/sbin/hastd/nv.c head/sbin/hastd/proto.c Modified: head/sbin/hastd/nv.c ============================================================================== --- head/sbin/hastd/nv.c Tue Dec 10 19:58:10 2013 (r259192) +++ head/sbin/hastd/nv.c Tue Dec 10 20:02:09 2013 (r259193) @@ -566,7 +566,7 @@ nv_get_string(struct nv *nv, const char return (NULL); PJDLOG_ASSERT((nvh->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST); PJDLOG_ASSERT(nvh->nvh_dsize >= 1); - str = NVH_DATA(nvh); + str = (char *)NVH_DATA(nvh); PJDLOG_ASSERT(str[nvh->nvh_dsize - 1] == '\0'); PJDLOG_ASSERT(strlen(str) == nvh->nvh_dsize - 1); return (str); Modified: head/sbin/hastd/proto.c ============================================================================== --- head/sbin/hastd/proto.c Tue Dec 10 19:58:10 2013 (r259192) +++ head/sbin/hastd/proto.c Tue Dec 10 20:02:09 2013 (r259193) @@ -298,8 +298,8 @@ proto_connection_send(const struct proto protoname = mconn->pc_proto->prt_name; PJDLOG_ASSERT(protoname != NULL); - ret = conn->pc_proto->prt_send(conn->pc_ctx, protoname, - strlen(protoname) + 1, fd); + ret = conn->pc_proto->prt_send(conn->pc_ctx, + (const unsigned char *)protoname, strlen(protoname) + 1, fd); proto_close(mconn); if (ret != 0) { errno = ret; @@ -325,7 +325,7 @@ proto_connection_recv(const struct proto bzero(protoname, sizeof(protoname)); - ret = conn->pc_proto->prt_recv(conn->pc_ctx, protoname, + ret = conn->pc_proto->prt_recv(conn->pc_ctx, (unsigned char *)protoname, sizeof(protoname) - 1, &fd); if (ret != 0) { errno = ret; From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 20:05:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B6406C0; Tue, 10 Dec 2013 20:05:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 37F701B32; Tue, 10 Dec 2013 20:05:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAK58DS097486; Tue, 10 Dec 2013 20:05:08 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAK58cV097485; Tue, 10 Dec 2013 20:05:08 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312102005.rBAK58cV097485@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 10 Dec 2013 20:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259194 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 20:05:08 -0000 Author: trociny Date: Tue Dec 10 20:05:07 2013 New Revision: 259194 URL: http://svnweb.freebsd.org/changeset/base/259194 Log: In remote_send_thread, if sending a request fails don't take the request back from the receive queue -- it might already be processed by remote_recv_thread, which lead to crashes like below: (primary) Unable to receive reply header: Connection reset by peer. (primary) Unable to send request (Connection reset by peer): WRITE(954662912, 131072). (primary) Disconnected from kopusha:7772. (primary) Increasing localcnt to 1. (primary) Assertion failed: (old > 0), function refcnt_release, file refcnt.h, line 62. Taking the request back was not necessary (it would properly be processed by the remote_recv_thread) and only complicated things. MFC after: 2 weeks Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Dec 10 20:02:09 2013 (r259193) +++ head/sbin/hastd/primary.c Tue Dec 10 20:05:07 2013 (r259194) @@ -1656,18 +1656,9 @@ remote_send_thread(void *arg) "Unable to send request (%s): ", strerror(hio->hio_errors[ncomp])); remote_close(res, ncomp); - /* - * Take request back from the receive queue and move - * it immediately to the done queue. - */ - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_REMOVE(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - hio_recv_list_size[ncomp]--; - mtx_unlock(&hio_recv_list_lock[ncomp]); - goto done_queue; + } else { + rw_unlock(&hio_remote_lock[ncomp]); } - rw_unlock(&hio_remote_lock[ncomp]); nv_free(nv); if (wakeup) cv_signal(&hio_recv_list_cond[ncomp]); From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 20:06:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 203C9813; Tue, 10 Dec 2013 20:06:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E76E61B44; Tue, 10 Dec 2013 20:06:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAK6foI097747; Tue, 10 Dec 2013 20:06:41 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAK6fZM097744; Tue, 10 Dec 2013 20:06:41 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312102006.rBAK6fZM097744@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 10 Dec 2013 20:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259195 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 20:06:42 -0000 Author: trociny Date: Tue Dec 10 20:06:41 2013 New Revision: 259195 URL: http://svnweb.freebsd.org/changeset/base/259195 Log: Send wakeup to threads waiting on empty queue before releasing the lock to decrease spurious wakeups. Submitted by: davidxu MFC after: 2 weeks Modified: head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Dec 10 20:05:07 2013 (r259194) +++ head/sbin/hastd/primary.c Tue Dec 10 20:06:41 2013 (r259195) @@ -180,27 +180,21 @@ static pthread_mutex_t metadata_lock; ((res)->hr_remotein != NULL && (res)->hr_remoteout != NULL) #define QUEUE_INSERT1(hio, name, ncomp) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock[(ncomp)]); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list[(ncomp)]); \ + if (TAILQ_EMPTY(&hio_##name##_list[(ncomp)])) \ + cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ TAILQ_INSERT_TAIL(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ hio_##name##_list_size[(ncomp)]++; \ - mtx_unlock(&hio_##name##_list_lock[ncomp]); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ + mtx_unlock(&hio_##name##_list_lock[(ncomp)]); \ } while (0) #define QUEUE_INSERT2(hio, name) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_##name##_next);\ hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE1(hio, name, ncomp, timeout) do { \ bool _last; \ Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Tue Dec 10 20:05:07 2013 (r259194) +++ head/sbin/hastd/secondary.c Tue Dec 10 20:06:41 2013 (r259195) @@ -110,15 +110,12 @@ static void *disk_thread(void *arg); static void *send_thread(void *arg); #define QUEUE_INSERT(name, hio) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_next); \ hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE(name, hio) do { \ mtx_lock(&hio_##name##_list_lock); \ From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 20:09:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC1F89B5; Tue, 10 Dec 2013 20:09:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B861C1B7B; Tue, 10 Dec 2013 20:09:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAK9nsC098209; Tue, 10 Dec 2013 20:09:49 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAK9n0b098208; Tue, 10 Dec 2013 20:09:49 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312102009.rBAK9n0b098208@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 10 Dec 2013 20:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259196 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 20:09:49 -0000 Author: trociny Date: Tue Dec 10 20:09:49 2013 New Revision: 259196 URL: http://svnweb.freebsd.org/changeset/base/259196 Log: Check remote protocol version only for the first connection (when it is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection. MFC after: 2 weeks Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Tue Dec 10 20:06:41 2013 (r259195) +++ head/sbin/hastd/hastd.c Tue Dec 10 20:09:49 2013 (r259196) @@ -806,12 +806,6 @@ listen_accept(struct hastd_listen *lst) */ version = 1; } - if (version > HAST_PROTO_VERSION) { - pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", - version, (unsigned char)HAST_PROTO_VERSION); - version = HAST_PROTO_VERSION; - } - pjdlog_debug(1, "Negotiated protocol version %hhu.", version); token = nv_get_uint8_array(nvin, &size, "token"); /* * NULL token means that this is first connection. @@ -925,6 +919,12 @@ listen_accept(struct hastd_listen *lst) */ if (token == NULL) { + if (version > HAST_PROTO_VERSION) { + pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", + version, (unsigned char)HAST_PROTO_VERSION); + version = HAST_PROTO_VERSION; + } + pjdlog_debug(1, "Negotiated protocol version %hhu.", version); res->hr_version = version; arc4random_buf(res->hr_token, sizeof(res->hr_token)); nvout = nv_alloc(); From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 20:25:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 940F1D77; Tue, 10 Dec 2013 20:25:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80BAF1DA5; Tue, 10 Dec 2013 20:25:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAKPinp005302; Tue, 10 Dec 2013 20:25:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAKPiNh005301; Tue, 10 Dec 2013 20:25:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312102025.rBAKPiNh005301@svn.freebsd.org> From: Alexander Motin Date: Tue, 10 Dec 2013 20:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259197 - head/sys/x86/cpufreq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 20:25:44 -0000 Author: mav Date: Tue Dec 10 20:25:43 2013 New Revision: 259197 URL: http://svnweb.freebsd.org/changeset/base/259197 Log: Do not DELAY() for P-state transition unless we want to see the result. Intel manual says: "If a transition is already in progress, transition to a new value will subsequently take effect. Reads of IA32_PERF_CTL determine the last targeted operating point." So seems it should be fine to just trigger wanted transition and go. Linux does the same. MFC after: 1 month Modified: head/sys/x86/cpufreq/est.c Modified: head/sys/x86/cpufreq/est.c ============================================================================== --- head/sys/x86/cpufreq/est.c Tue Dec 10 20:09:49 2013 (r259196) +++ head/sys/x86/cpufreq/est.c Tue Dec 10 20:25:43 2013 (r259197) @@ -1288,10 +1288,9 @@ est_set_id16(device_t dev, uint16_t id16 msr = (msr & ~0xffff) | id16; wrmsr(MSR_PERF_CTL, msr); - /* Wait a short while for the new setting. XXX Is this necessary? */ - DELAY(EST_TRANS_LAT); - if (need_check) { + /* Wait a short while and read the new status. */ + DELAY(EST_TRANS_LAT); est_get_id16(&new_id16); if (new_id16 != id16) { if (bootverbose) From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 20:52:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAE7A649; Tue, 10 Dec 2013 20:52:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A52FE1F76; Tue, 10 Dec 2013 20:52:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAKqVAU015839; Tue, 10 Dec 2013 20:52:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAKqVYO015838; Tue, 10 Dec 2013 20:52:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312102052.rBAKqVYO015838@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 10 Dec 2013 20:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259198 - head/sys/dev/md X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 20:52:31 -0000 Author: kib Date: Tue Dec 10 20:52:31 2013 New Revision: 259198 URL: http://svnweb.freebsd.org/changeset/base/259198 Log: Only assert the length of the passed bio in the mdstart_vnode() when the bio is unmapped, so we must map the bio pages into pbuf. This works around the geom classes which do not follow the MAXPHYS limit on the i/o size, since such classes do not know about unmapped bios either. Reported by: Paolo Pinto Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Tue Dec 10 20:25:43 2013 (r259197) +++ head/sys/dev/md/md.c Tue Dec 10 20:52:31 2013 (r259198) @@ -746,12 +746,12 @@ mdstart_vnode(struct md_s *sc, struct bi return (error); } - KASSERT(bp->bio_length <= MAXPHYS, ("bio_length %jd", - (uintmax_t)bp->bio_length)); if ((bp->bio_flags & BIO_UNMAPPED) == 0) { pb = NULL; aiov.iov_base = bp->bio_data; } else { + KASSERT(bp->bio_length <= MAXPHYS, ("bio_length %jd", + (uintmax_t)bp->bio_length)); pb = getpbuf(&md_vnode_pbuf_freecnt); pmap_qenter((vm_offset_t)pb->b_data, bp->bio_ma, bp->bio_ma_n); aiov.iov_base = (void *)((vm_offset_t)pb->b_data + From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 21:01:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7B5BD04; Tue, 10 Dec 2013 21:01:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B44EB105B; Tue, 10 Dec 2013 21:01:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAL1SFn019554; Tue, 10 Dec 2013 21:01:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAL1SN1019553; Tue, 10 Dec 2013 21:01:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312102101.rBAL1SN1019553@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 10 Dec 2013 21:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259199 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 21:01:28 -0000 Author: nwhitehorn Date: Tue Dec 10 21:01:28 2013 New Revision: 259199 URL: http://svnweb.freebsd.org/changeset/base/259199 Log: Return the correct IEEE 1275 code for "nextprop". Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Tue Dec 10 20:52:31 2013 (r259198) +++ head/sys/dev/ofw/ofw_fdt.c Tue Dec 10 21:01:28 2013 (r259199) @@ -267,8 +267,10 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac } /* - * Get the next property of a package. Return the actual len of retrieved - * prop name. + * Get the next property of a package. Return values: + * -1: package or previous property does not exist + * 0: no more properties + * 1: success */ static int ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf, @@ -310,7 +312,7 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa strncpy(buf, fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)), size); - return (strlen(buf)); + return (1); } /* Set the value of a property of a package. */ From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 21:15:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0AC771B; Tue, 10 Dec 2013 21:15:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8D1CC1138; Tue, 10 Dec 2013 21:15:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBALFIY6024384; Tue, 10 Dec 2013 21:15:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBALFIDx024383; Tue, 10 Dec 2013 21:15:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312102115.rBALFIDx024383@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 10 Dec 2013 21:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259200 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 21:15:18 -0000 Author: kib Date: Tue Dec 10 21:15:18 2013 New Revision: 259200 URL: http://svnweb.freebsd.org/changeset/base/259200 Log: Fix detection of EOF in kern_physio(). If bio_length was clipped by the excess code in g_io_check(), bio_resid is also truncated by g_io_deliver(). As result, bufdonebio() assigns truncated value to the buffer b_resid field. Use the residual bio_completed to calculate buffer b_resid from b_bcount in bufdonebio(), instead of bio_resid, calculated from bio_length in g_io_deliver(). The issue is seemingly caused by the code rearrange into g_io_check(), which is not present in stable/10. The change still looks as the useful change to have in 10 nevertheless. Reported by: Stefan Hegnauer Tested by: pho, Stefan Hegnauer Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Dec 10 21:01:28 2013 (r259199) +++ head/sys/kern/vfs_bio.c Tue Dec 10 21:15:18 2013 (r259200) @@ -3679,7 +3679,6 @@ bufdonebio(struct bio *bip) bp = bip->bio_caller2; bp->b_resid = bp->b_bcount - bip->bio_completed; - bp->b_resid = bip->bio_resid; /* XXX: remove */ bp->b_ioflags = bip->bio_flags; bp->b_error = bip->bio_error; if (bp->b_error) From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 22:13:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F14A85B; Tue, 10 Dec 2013 22:13:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F8F4158A; Tue, 10 Dec 2013 22:13:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAMDbt2045412; Tue, 10 Dec 2013 22:13:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAMDa17045409; Tue, 10 Dec 2013 22:13:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312102213.rBAMDa17045409@svn.freebsd.org> From: John Baldwin Date: Tue, 10 Dec 2013 22:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259202 - in head/sys/arm: arm versatile xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 22:13:37 -0000 Author: jhb Date: Tue Dec 10 22:13:36 2013 New Revision: 259202 URL: http://svnweb.freebsd.org/changeset/base/259202 Log: Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c. Approved by: core Modified: head/sys/arm/arm/bus_space-v6.c head/sys/arm/versatile/bus_space.c head/sys/arm/xilinx/zy7_bus_space.c Modified: head/sys/arm/arm/bus_space-v6.c ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Tue Dec 10 22:03:59 2013 (r259201) +++ head/sys/arm/arm/bus_space-v6.c Tue Dec 10 22:13:36 2013 (r259202) @@ -1,7 +1,9 @@ /*- - * Copyright (c) 2012 Damjan Marion + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. * All rights reserved. * + * Developed by Semihalf. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -10,11 +12,14 @@ * 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. Neither the name of MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) Modified: head/sys/arm/versatile/bus_space.c ============================================================================== --- head/sys/arm/versatile/bus_space.c Tue Dec 10 22:03:59 2013 (r259201) +++ head/sys/arm/versatile/bus_space.c Tue Dec 10 22:13:36 2013 (r259202) @@ -1,7 +1,9 @@ /*- - * Copyright (C) 2012 FreeBSD Foundation + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. * All rights reserved. * + * Developed by Semihalf. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: head/sys/arm/xilinx/zy7_bus_space.c ============================================================================== --- head/sys/arm/xilinx/zy7_bus_space.c Tue Dec 10 22:03:59 2013 (r259201) +++ head/sys/arm/xilinx/zy7_bus_space.c Tue Dec 10 22:13:36 2013 (r259202) @@ -1,7 +1,9 @@ /*- - * Copyright (C) 2012 FreeBSD Foundation + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. * All rights reserved. * + * Developed by Semihalf. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 22:33:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 744BCCDB; Tue, 10 Dec 2013 22:33:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 607B816D3; Tue, 10 Dec 2013 22:33:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAMX3FX052737; Tue, 10 Dec 2013 22:33:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAMX3AB052736; Tue, 10 Dec 2013 22:33:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312102233.rBAMX3AB052736@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 10 Dec 2013 22:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259203 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 22:33:03 -0000 Author: kib Date: Tue Dec 10 22:33:02 2013 New Revision: 259203 URL: http://svnweb.freebsd.org/changeset/base/259203 Log: The opt_*.h headers must be included before any system header, except sys/cdefs.h. In particular, in case of COMPAT_43, param.h includes sys/types.h, which includes sys/select.h, which includes sys/_sigset.h. The _sigset.h customizes the provided definions based on COMPAT_43, eliminating osigset_t if symbol is not defined. The sys/proc.h is included after opt_compat.h and needs osigset_t. Move opt_compat.h inclusion into the right place. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Dec 10 22:13:36 2013 (r259202) +++ head/sys/dev/vt/vt_core.c Tue Dec 10 22:33:02 2013 (r259203) @@ -33,10 +33,9 @@ #include __FBSDID("$FreeBSD$"); -#include - #include "opt_compat.h" +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 22:49:52 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84AD7399; Tue, 10 Dec 2013 22:49:52 +0000 (UTC) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B9B017C7; Tue, 10 Dec 2013 22:49:51 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id rBAMncqB018454; Tue, 10 Dec 2013 23:49:44 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <52A79A82.7050801@FreeBSD.org> Date: Tue, 10 Dec 2013 23:49:38 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Tijl Coosemans , Aleksandr Rybalko Subject: Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken References: <201312052238.rB5McsVN020719@svn.freebsd.org> <52A3A8DE.9090907@FreeBSD.org> <2a683b40-1465-44f9-a9aa-d079f660529d@email.android.com> <52A4E865.6080602@FreeBSD.org> <20131210153144.c46b74fa28253f3456aa2821@ddteam.net> <20131210144307.20d32075@kalimero.tijl.coosemans.org> In-Reply-To: <20131210144307.20d32075@kalimero.tijl.coosemans.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andreas Tobler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 22:49:52 -0000 On 10.12.13 14:43, Tijl Coosemans wrote: > On Tue, 10 Dec 2013 15:31:44 +0200 Aleksandr Rybalko wrote: >> That keyboards have no Shift key for that? :) >> I will be glad to apply your changes, but I have to know how it should >> be controlled. >> >> RU and UA PC keyboards have same 3 symbols '2', '"', '@' >> To get '2' i have to press only '2' >> To get '@' I have to press Shift+'2' >> To get '"' I have to switch to UA or RU and press Shift+'2' >> >> Ahh, or use some called Third-Level (IIRC) in Xorg terms. Temporary >> lang switch. Which commonly mapped to one of Alt. Right? >> So R-Alt+Shift+'2'? > > https://en.wikipedia.org/wiki/AltGr Thanks Tijl! To get the @ I have to press AltGr + '2'. There are combinations where I have to press AltGr+Shift. e.g to get the 'broken bar, ', AltGr+Shift+'7'. Andreas From owner-svn-src-head@FreeBSD.ORG Tue Dec 10 22:56:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5A76739; Tue, 10 Dec 2013 22:56:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5B951859; Tue, 10 Dec 2013 22:56:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBAMurO2060280; Tue, 10 Dec 2013 22:56:53 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBAMupqe060270; Tue, 10 Dec 2013 22:56:51 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201312102256.rBAMupqe060270@svn.freebsd.org> From: Neel Natu Date: Tue, 10 Dec 2013 22:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259205 - in head/sys/amd64/vmm: . intel io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 22:56:53 -0000 Author: neel Date: Tue Dec 10 22:56:51 2013 New Revision: 259205 URL: http://svnweb.freebsd.org/changeset/base/259205 Log: Fix x2apic support in bhyve. When the guest is bringing up the APs in the x2APIC mode a write to the ICR register will now trigger a return to userspace with an exitcode of VM_EXITCODE_SPINUP_AP. This gets SMP guests working again with x2APIC. Change the vlapic timer lock to be a spinlock because the vlapic can be accessed from within a critical section (vm run loop) when guest is using x2apic mode. Reviewed by: grehan@ Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_lapic.c head/sys/amd64/vmm/vmm_lapic.h head/sys/amd64/vmm/vmm_msr.c head/sys/amd64/vmm/vmm_msr.h Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/intel/vmx.c Tue Dec 10 22:56:51 2013 (r259205) @@ -1337,6 +1337,7 @@ vmx_exit_process(struct vmx *vmx, int vc struct vmxctx *vmxctx; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, reason; uint64_t qual, gpa, rflags; + bool retu; handled = 0; vmcs = &vmx->vmcs[vcpu]; @@ -1382,27 +1383,39 @@ vmx_exit_process(struct vmx *vmx, int vc break; case EXIT_REASON_RDMSR: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_RDMSR, 1); + retu = false; ecx = vmxctx->guest_rcx; - error = emulate_rdmsr(vmx->vm, vcpu, ecx); + error = emulate_rdmsr(vmx->vm, vcpu, ecx, &retu); if (error) { vmexit->exitcode = VM_EXITCODE_RDMSR; vmexit->u.msr.code = ecx; - } else + } else if (!retu) { handled = 1; + } else { + /* Return to userspace with a valid exitcode */ + KASSERT(vmexit->exitcode != VM_EXITCODE_BOGUS, + ("emulate_wrmsr retu with bogus exitcode")); + } break; case EXIT_REASON_WRMSR: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_WRMSR, 1); + retu = false; eax = vmxctx->guest_rax; ecx = vmxctx->guest_rcx; edx = vmxctx->guest_rdx; error = emulate_wrmsr(vmx->vm, vcpu, ecx, - (uint64_t)edx << 32 | eax); + (uint64_t)edx << 32 | eax, &retu); if (error) { vmexit->exitcode = VM_EXITCODE_WRMSR; vmexit->u.msr.code = ecx; vmexit->u.msr.wval = (uint64_t)edx << 32 | eax; - } else + } else if (!retu) { handled = 1; + } else { + /* Return to userspace with a valid exitcode */ + KASSERT(vmexit->exitcode != VM_EXITCODE_BOGUS, + ("emulate_wrmsr retu with bogus exitcode")); + } break; case EXIT_REASON_HLT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_HLT, 1); Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/io/vlapic.c Tue Dec 10 22:56:51 2013 (r259205) @@ -139,8 +139,8 @@ struct vlapic { * Note that the vlapic_callout_handler() does not write to any of these * registers so they can be safely read from the vcpu context without locking. */ -#define VLAPIC_TIMER_LOCK(vlapic) mtx_lock(&((vlapic)->timer_mtx)) -#define VLAPIC_TIMER_UNLOCK(vlapic) mtx_unlock(&((vlapic)->timer_mtx)) +#define VLAPIC_TIMER_LOCK(vlapic) mtx_lock_spin(&((vlapic)->timer_mtx)) +#define VLAPIC_TIMER_UNLOCK(vlapic) mtx_unlock_spin(&((vlapic)->timer_mtx)) #define VLAPIC_TIMER_LOCKED(vlapic) mtx_owned(&((vlapic)->timer_mtx)) #define VLAPIC_BUS_FREQ tsc_freq @@ -613,7 +613,7 @@ vlapic_set_icr_timer(struct vlapic *vlap static VMM_STAT_ARRAY(IPIS_SENT, VM_MAXCPU, "ipis sent to vcpu"); static int -lapic_process_icr(struct vlapic *vlapic, uint64_t icrval) +lapic_process_icr(struct vlapic *vlapic, uint64_t icrval, bool *retu) { int i; cpuset_t dmask; @@ -688,17 +688,18 @@ lapic_process_icr(struct vlapic *vlapic, if (vlapic2->boot_state != BS_SIPI) return (0); - vmexit = vm_exitinfo(vlapic->vm, vlapic->vcpuid); - vmexit->exitcode = VM_EXITCODE_SPINUP_AP; - vmexit->u.spinup_ap.vcpu = dest; - vmexit->u.spinup_ap.rip = vec << PAGE_SHIFT; - /* * XXX this assumes that the startup IPI always succeeds */ vlapic2->boot_state = BS_RUNNING; vm_activate_cpu(vlapic2->vm, dest); + *retu = true; + vmexit = vm_exitinfo(vlapic->vm, vlapic->vcpuid); + vmexit->exitcode = VM_EXITCODE_SPINUP_AP; + vmexit->u.spinup_ap.vcpu = dest; + vmexit->u.spinup_ap.rip = vec << PAGE_SHIFT; + return (0); } } @@ -804,7 +805,7 @@ lapic_set_svr(struct vlapic *vlapic, uin } int -vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data) +vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data, bool *retu) { struct LAPIC *lapic = &vlapic->apic; uint32_t *reg; @@ -895,7 +896,7 @@ done: } int -vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data) +vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data, bool *retu) { struct LAPIC *lapic = &vlapic->apic; int retval; @@ -931,7 +932,7 @@ vlapic_write(struct vlapic *vlapic, uint data &= 0xffffffff; data |= (uint64_t)lapic->icr_hi << 32; } - retval = lapic_process_icr(vlapic, data); + retval = lapic_process_icr(vlapic, data, retu); break; case APIC_OFFSET_ICR_HI: if (!x2apic(vlapic)) { @@ -978,7 +979,14 @@ vlapic_init(struct vm *vm, int vcpuid) vlapic->vm = vm; vlapic->vcpuid = vcpuid; - mtx_init(&vlapic->timer_mtx, "vlapic timer mtx", NULL, MTX_DEF); + /* + * If the vlapic is configured in x2apic mode then it will be + * accessed in the critical section via the MSR emulation code. + * + * Therefore the timer mutex must be a spinlock because blockable + * mutexes cannot be acquired in a critical section. + */ + mtx_init(&vlapic->timer_mtx, "vlapic timer mtx", NULL, MTX_SPIN); callout_init(&vlapic->callout, 1); vlapic->msr_apicbase = DEFAULT_APIC_BASE | APICBASE_ENABLED; Modified: head/sys/amd64/vmm/io/vlapic.h ============================================================================== --- head/sys/amd64/vmm/io/vlapic.h Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/io/vlapic.h Tue Dec 10 22:56:51 2013 (r259205) @@ -90,8 +90,10 @@ enum x2apic_state; struct vlapic *vlapic_init(struct vm *vm, int vcpuid); void vlapic_cleanup(struct vlapic *vlapic); -int vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data); -int vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data); +int vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data, + bool *retu); +int vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data, + bool *retu); int vlapic_pending_intr(struct vlapic *vlapic); void vlapic_intr_accepted(struct vlapic *vlapic, int vector); void vlapic_set_intr_ready(struct vlapic *vlapic, int vector, bool level); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/vmm.c Tue Dec 10 22:56:51 2013 (r259205) @@ -860,8 +860,7 @@ vcpu_require_state_locked(struct vcpu *v * Emulate a guest 'hlt' by sleeping until the vcpu is ready to run. */ static int -vm_handle_hlt(struct vm *vm, int vcpuid, boolean_t intr_disabled, - boolean_t *retu) +vm_handle_hlt(struct vm *vm, int vcpuid, bool intr_disabled, bool *retu) { struct vm_exit *vmexit; struct vcpu *vcpu; @@ -894,7 +893,7 @@ vm_handle_hlt(struct vm *vm, int vcpuid, * Spindown the vcpu if the apic is disabled and it * had entered the halted state. */ - *retu = TRUE; + *retu = true; vmexit = vm_exitinfo(vm, vcpuid); vmexit->exitcode = VM_EXITCODE_SPINDOWN_CPU; VCPU_CTR0(vm, vcpuid, "spinning down cpu"); @@ -908,7 +907,7 @@ vm_handle_hlt(struct vm *vm, int vcpuid, } static int -vm_handle_paging(struct vm *vm, int vcpuid, boolean_t *retu) +vm_handle_paging(struct vm *vm, int vcpuid, bool *retu) { int rv, ftype; struct vm_map *map; @@ -946,7 +945,7 @@ done: } static int -vm_handle_inst_emul(struct vm *vm, int vcpuid, boolean_t *retu) +vm_handle_inst_emul(struct vm *vm, int vcpuid, bool *retu) { struct vie *vie; struct vcpu *vcpu; @@ -987,15 +986,12 @@ vm_handle_inst_emul(struct vm *vm, int v mread = vhpet_mmio_read; mwrite = vhpet_mmio_write; } else { - *retu = TRUE; + *retu = true; return (0); } - error = vmm_emulate_instruction(vm, vcpuid, gpa, vie, mread, mwrite, 0); - - /* return to userland to spin up the AP */ - if (error == 0 && vme->exitcode == VM_EXITCODE_SPINUP_AP) - *retu = TRUE; + error = vmm_emulate_instruction(vm, vcpuid, gpa, vie, mread, mwrite, + retu); return (error); } @@ -1008,7 +1004,7 @@ vm_run(struct vm *vm, struct vm_run *vmr struct pcb *pcb; uint64_t tscval, rip; struct vm_exit *vme; - boolean_t retu, intr_disabled; + bool retu, intr_disabled; pmap_t pmap; vcpuid = vmrun->cpuid; @@ -1048,13 +1044,10 @@ restart: critical_exit(); if (error == 0) { - retu = FALSE; + retu = false; switch (vme->exitcode) { case VM_EXITCODE_HLT: - if ((vme->u.hlt.rflags & PSL_I) == 0) - intr_disabled = TRUE; - else - intr_disabled = FALSE; + intr_disabled = ((vme->u.hlt.rflags & PSL_I) == 0); error = vm_handle_hlt(vm, vcpuid, intr_disabled, &retu); break; case VM_EXITCODE_PAGING: @@ -1064,12 +1057,12 @@ restart: error = vm_handle_inst_emul(vm, vcpuid, &retu); break; default: - retu = TRUE; /* handled in userland */ + retu = true; /* handled in userland */ break; } } - if (error == 0 && retu == FALSE) { + if (error == 0 && retu == false) { rip = vme->rip + vme->inst_length; goto restart; } Modified: head/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.c Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/vmm_lapic.c Tue Dec 10 22:56:51 2013 (r259205) @@ -107,7 +107,7 @@ lapic_msr(u_int msr) } int -lapic_rdmsr(struct vm *vm, int cpu, u_int msr, uint64_t *rval) +lapic_rdmsr(struct vm *vm, int cpu, u_int msr, uint64_t *rval, bool *retu) { int error; u_int offset; @@ -120,14 +120,14 @@ lapic_rdmsr(struct vm *vm, int cpu, u_in error = 0; } else { offset = x2apic_msr_to_regoff(msr); - error = vlapic_read(vlapic, offset, rval); + error = vlapic_read(vlapic, offset, rval, retu); } return (error); } int -lapic_wrmsr(struct vm *vm, int cpu, u_int msr, uint64_t val) +lapic_wrmsr(struct vm *vm, int cpu, u_int msr, uint64_t val, bool *retu) { int error; u_int offset; @@ -140,7 +140,7 @@ lapic_wrmsr(struct vm *vm, int cpu, u_in error = 0; } else { offset = x2apic_msr_to_regoff(msr); - error = vlapic_write(vlapic, offset, val); + error = vlapic_write(vlapic, offset, val, retu); } return (error); @@ -164,7 +164,7 @@ lapic_mmio_write(void *vm, int cpu, uint return (EINVAL); vlapic = vm_lapic(vm, cpu); - error = vlapic_write(vlapic, off, wval); + error = vlapic_write(vlapic, off, wval, arg); return (error); } @@ -186,6 +186,6 @@ lapic_mmio_read(void *vm, int cpu, uint6 return (EINVAL); vlapic = vm_lapic(vm, cpu); - error = vlapic_read(vlapic, off, rval); + error = vlapic_read(vlapic, off, rval, arg); return (error); } Modified: head/sys/amd64/vmm/vmm_lapic.h ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.h Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/vmm_lapic.h Tue Dec 10 22:56:51 2013 (r259205) @@ -32,8 +32,10 @@ struct vm; boolean_t lapic_msr(u_int num); -int lapic_rdmsr(struct vm *vm, int cpu, u_int msr, uint64_t *rval); -int lapic_wrmsr(struct vm *vm, int cpu, u_int msr, uint64_t wval); +int lapic_rdmsr(struct vm *vm, int cpu, u_int msr, uint64_t *rval, + bool *retu); +int lapic_wrmsr(struct vm *vm, int cpu, u_int msr, uint64_t wval, + bool *retu); int lapic_mmio_read(void *vm, int cpu, uint64_t gpa, uint64_t *rval, int size, void *arg); Modified: head/sys/amd64/vmm/vmm_msr.c ============================================================================== --- head/sys/amd64/vmm/vmm_msr.c Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/vmm_msr.c Tue Dec 10 22:56:51 2013 (r259205) @@ -154,13 +154,13 @@ msr_num_to_idx(u_int num) } int -emulate_wrmsr(struct vm *vm, int cpu, u_int num, uint64_t val) +emulate_wrmsr(struct vm *vm, int cpu, u_int num, uint64_t val, bool *retu) { int idx; uint64_t *guest_msrs; if (lapic_msr(num)) - return (lapic_wrmsr(vm, cpu, num, val)); + return (lapic_wrmsr(vm, cpu, num, val, retu)); idx = msr_num_to_idx(num); if (idx < 0 || invalid_msr(idx)) @@ -181,14 +181,14 @@ emulate_wrmsr(struct vm *vm, int cpu, u_ } int -emulate_rdmsr(struct vm *vm, int cpu, u_int num) +emulate_rdmsr(struct vm *vm, int cpu, u_int num, bool *retu) { int error, idx; uint32_t eax, edx; uint64_t result, *guest_msrs; if (lapic_msr(num)) { - error = lapic_rdmsr(vm, cpu, num, &result); + error = lapic_rdmsr(vm, cpu, num, &result, retu); goto done; } Modified: head/sys/amd64/vmm/vmm_msr.h ============================================================================== --- head/sys/amd64/vmm/vmm_msr.h Tue Dec 10 22:55:22 2013 (r259204) +++ head/sys/amd64/vmm/vmm_msr.h Tue Dec 10 22:56:51 2013 (r259205) @@ -33,8 +33,9 @@ struct vm; void vmm_msr_init(void); -int emulate_wrmsr(struct vm *vm, int vcpu, u_int msr, uint64_t val); -int emulate_rdmsr(struct vm *vm, int vcpu, u_int msr); +int emulate_wrmsr(struct vm *vm, int vcpu, u_int msr, uint64_t val, + bool *retu); +int emulate_rdmsr(struct vm *vm, int vcpu, u_int msr, bool *retu); void guest_msrs_init(struct vm *vm, int cpu); void guest_msr_valid(int msr); void restore_host_msrs(struct vm *vm, int cpu); From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 03:39:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E2AB4B2; Wed, 11 Dec 2013 03:39:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F9DC1E3D; Wed, 11 Dec 2013 03:39:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB3dpeO064051; Wed, 11 Dec 2013 03:39:51 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB3doVs064049; Wed, 11 Dec 2013 03:39:51 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312110339.rBB3doVs064049@svn.freebsd.org> From: Julio Merino Date: Wed, 11 Dec 2013 03:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259208 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 03:39:51 -0000 Author: jmmv Date: Wed Dec 11 03:39:50 2013 New Revision: 259208 URL: http://svnweb.freebsd.org/changeset/base/259208 Log: Add tap.test.mk. This file provides support to build test programs that comply with the Test Anything Protocol. Its main goal is to support the painless integration of existing tests from tools/regression/ into the Kyua-based test suite. Approved by: rpaulo (mentor) Added: head/share/mk/tap.test.mk (contents, props changed) Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Wed Dec 11 00:39:56 2013 (r259207) +++ head/share/mk/Makefile Wed Dec 11 03:39:50 2013 (r259208) @@ -46,6 +46,7 @@ FILESDIR= ${BINDIR}/mk .if ${MK_TESTS} != "no" FILES+= atf.test.mk FILES+= plain.test.mk +FILES+= tap.test.mk .endif .include Added: head/share/mk/tap.test.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/tap.test.mk Wed Dec 11 03:39:50 2013 (r259208) @@ -0,0 +1,64 @@ +# $FreeBSD$ +# +# Logic to build and install TAP-compliant test programs. +# +# This is provided to support existing tests in the FreeBSD source tree +# (particularly those coming from tools/regression/) that comply with the +# Test Anything Protocol. It should not be used for new tests. + +.include + +# List of C, C++ and shell test programs to build. +# +# Programs listed here are built according to the semantics of bsd.prog.mk for +# PROGS, PROGS_CXX and SCRIPTS, respectively. +# +# Test programs registered in this manner are set to be installed into TESTSDIR +# (which should be overriden by the Makefile) and are not required to provide a +# manpage. +TAP_TESTS_C?= +TAP_TESTS_CXX?= +TAP_TESTS_SH?= + +.if !empty(TAP_TESTS_C) +PROGS+= ${TAP_TESTS_C} +_TESTS+= ${TAP_TESTS_C} +.for _T in ${TAP_TESTS_C} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.c +TEST_INTERFACE.${_T}= tap +.endfor +.endif + +.if !empty(TAP_TESTS_CXX) +PROGS_CXX+= ${TAP_TESTS_CXX} +_TESTS+= ${TAP_TESTS_CXX} +.for _T in ${TAP_TESTS_CXX} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.cc +TEST_INTERFACE.${_T}= tap +.endfor +.endif + +.if !empty(TAP_TESTS_SH) +SCRIPTS+= ${TAP_TESTS_SH} +_TESTS+= ${TAP_TESTS_SH} +.for _T in ${TAP_TESTS_SH} +SCRIPTSDIR_${_T}= ${TESTSDIR} +TEST_INTERFACE.${_T}= tap +CLEANFILES+= ${_T} ${_T}.tmp +# TODO(jmmv): It seems to me that this SED and SRC functionality should +# exist in bsd.prog.mk along the support for SCRIPTS. Move it there if +# this proves to be useful within the tests. +TAP_TESTS_SH_SED_${_T}?= # empty +TAP_TESTS_SH_SRC_${_T}?= ${_T}.sh +${_T}: ${TAP_TESTS_SH_SRC_${_T}} + cat ${.ALLSRC} | sed ${TAP_TESTS_SH_SED_${_T}} >${.TARGET}.tmp + chmod +x ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} +.endfor +.endif + +.include From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 03:41:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F11095FD; Wed, 11 Dec 2013 03:41:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD53F1E8F; Wed, 11 Dec 2013 03:41:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB3f7E8066618; Wed, 11 Dec 2013 03:41:07 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB3f7xU066617; Wed, 11 Dec 2013 03:41:07 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312110341.rBB3f7xU066617@svn.freebsd.org> From: Julio Merino Date: Wed, 11 Dec 2013 03:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259209 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 03:41:08 -0000 Author: jmmv Date: Wed Dec 11 03:41:07 2013 New Revision: 259209 URL: http://svnweb.freebsd.org/changeset/base/259209 Log: Make bsd.progs.mk work in directories with SCRIPTS but no PROGS. This change fixes some cases where bsd.progs.mk would fail to handle directories with SCRIPTS but no PROGS. In particular, "install" did not handle such scripts nor dependent files when bsd.subdir.mk was added to the mix. This is "make tinderbox" clean. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Wed Dec 11 03:39:50 2013 (r259208) +++ head/share/mk/bsd.progs.mk Wed Dec 11 03:41:07 2013 (r259209) @@ -73,7 +73,7 @@ UPDATE_DEPENDFILE = NO # handle being called [bsd.]progs.mk .include -.ifndef PROG +.ifndef _RECURSING_PROGS # tell progs.mk we might want to install things PROGS_TARGETS+= cleandepend cleandir cleanobj depend install @@ -84,11 +84,13 @@ x.$p= PROG_CXX=$p .endif $p ${p}_p: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} PROG=$p ${x.$p}) + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= PROG=$p ${x.$p}) .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} PROG=$p ${x.$p} ${@:E}) + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= PROG=$p ${x.$p} ${@:E}) .endfor .endfor @@ -96,4 +98,18 @@ $p.$t: .PHONY .MAKE $t: ${PROGS:%=%.$t} .endfor +SCRIPTS_TARGETS+= cleandepend cleandir cleanobj depend install + +.for p in ${SCRIPTS} +.for t in ${SCRIPTS_TARGETS:O:u} +$p.$t: .PHONY .MAKE + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= SCRIPT=$p ${x.$p} ${@:E}) +.endfor +.endfor + +.for t in ${SCRIPTS_TARGETS:O:u} +$t: ${SCRIPTS:%=%.$t} +.endfor + .endif From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 04:09:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39CE8BD0; Wed, 11 Dec 2013 04:09:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 231DA1039; Wed, 11 Dec 2013 04:09:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB49MVo074987; Wed, 11 Dec 2013 04:09:22 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB49Ir6074961; Wed, 11 Dec 2013 04:09:18 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312110409.rBB49Ir6074961@svn.freebsd.org> From: Julio Merino Date: Wed, 11 Dec 2013 04:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259210 - in head: bin bin/date bin/date/tests bin/mv bin/mv/tests bin/pax bin/pax/tests bin/sh bin/sh/tests bin/sh/tests/builtins bin/sh/tests/errors bin/sh/tests/execution bin/sh/test... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 04:09:22 -0000 Author: jmmv Date: Wed Dec 11 04:09:17 2013 New Revision: 259210 URL: http://svnweb.freebsd.org/changeset/base/259210 Log: Migrate tools/regression/bin/ tests to the new layout. This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin// to bin//tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Added: head/bin/date/tests/ head/bin/date/tests/Makefile (contents, props changed) head/bin/date/tests/legacy_test.sh - copied unchanged from r259205, head/tools/regression/bin/date/regress.sh head/bin/mv/tests/ head/bin/mv/tests/Makefile (contents, props changed) head/bin/mv/tests/legacy_test.sh - copied unchanged from r258552, head/tools/regression/bin/mv/regress.sh head/bin/pax/tests/ head/bin/pax/tests/Makefile (contents, props changed) - copied unchanged from r258552, head/tools/regression/bin/pax/regress.t head/bin/sh/tests/ head/bin/sh/tests/Makefile (contents, props changed) head/bin/sh/tests/builtins/ - copied from r258552, head/tools/regression/bin/sh/builtins/ head/bin/sh/tests/builtins/Makefile (contents, props changed) head/bin/sh/tests/errors/ - copied from r258552, head/tools/regression/bin/sh/errors/ head/bin/sh/tests/errors/Makefile (contents, props changed) head/bin/sh/tests/execution/ - copied from r258552, head/tools/regression/bin/sh/execution/ head/bin/sh/tests/execution/Makefile (contents, props changed) head/bin/sh/tests/expansion/ - copied from r258552, head/tools/regression/bin/sh/expansion/ head/bin/sh/tests/expansion/Makefile (contents, props changed) head/bin/sh/tests/legacy_test.sh - copied, changed from r258552, head/tools/regression/bin/sh/regress.sh head/bin/sh/tests/parameters/ - copied from r258552, head/tools/regression/bin/sh/parameters/ head/bin/sh/tests/parameters/Makefile (contents, props changed) head/bin/sh/tests/parser/ - copied from r258552, head/tools/regression/bin/sh/parser/ head/bin/sh/tests/parser/Makefile (contents, props changed) head/bin/sh/tests/set-e/ - copied from r258552, head/tools/regression/bin/sh/set-e/ head/bin/sh/tests/set-e/Makefile (contents, props changed) head/bin/test/tests/ head/bin/test/tests/Makefile (contents, props changed) head/bin/test/tests/legacy_test.sh - copied unchanged from r258552, head/tools/regression/bin/test/regress.sh head/bin/tests/ head/bin/tests/Makefile (contents, props changed) Directory Properties: head/bin/pax/tests/legacy_test.sh (props changed) Deleted: head/tools/regression/bin/ Modified: head/bin/Makefile head/bin/date/Makefile head/bin/mv/Makefile head/bin/pax/Makefile head/bin/sh/Makefile head/bin/test/Makefile head/etc/mtree/BSD.tests.dist Modified: head/bin/Makefile ============================================================================== --- head/bin/Makefile Wed Dec 11 03:41:07 2013 (r259209) +++ head/bin/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -52,6 +52,10 @@ SUBDIR+= rmail SUBDIR+= csh .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include SUBDIR:= ${SUBDIR:O} Modified: head/bin/date/Makefile ============================================================================== --- head/bin/date/Makefile Wed Dec 11 03:41:07 2013 (r259209) +++ head/bin/date/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -1,7 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PROG= date SRCS= date.c netdate.c vary.c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/bin/date/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/date/tests/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/bin/date + +TAP_TESTS_SH= legacy_test + +.include Copied: head/bin/date/tests/legacy_test.sh (from r259205, head/tools/regression/bin/date/regress.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/date/tests/legacy_test.sh Wed Dec 11 04:09:17 2013 (r259210, copy of r259205, head/tools/regression/bin/date/regress.sh) @@ -0,0 +1,91 @@ +#!/bin/sh + +# +# Regression tests for date(1) +# +# Submitted by Edwin Groothuis +# +# $FreeBSD$ +# + +# +# These two date/times have been chosen carefully, they +# create both the single digit and double/multidigit version of +# the values. +# +# To create a new one, make sure you are using the UTC timezone! +# + +TEST1=3222243 # 1970-02-07 07:04:03 +TEST2=1005600000 # 2001-11-12 21:11:12 + +export LC_ALL=C +export TZ=UTC +count=0 + +check() +{ + S=$1 + A1=$2 + A2=$3 + + count=`expr ${count} + 1` + + if [ -z "${A2}" ]; then A2=${A1}; fi + + R=`date -r ${TEST1} +%${S}` + if [ "${R}" = "${A1}" ]; then + echo "ok ${S}{t1}" + else + echo "no ok ${S}{t1} - (got ${R}, expected ${A1})" + fi + + R=`date -r ${TEST2} +%${S}` + if [ "${R}" = "${A2}" ]; then + echo "ok ${S}{t2}" + else + echo "no ok ${S}{t2} - (got ${R}, expected ${A2})" + fi +} + +echo "1..78" + +check A Saturday Monday +check a Sat Mon +check B February November +check b Feb Nov +check C 19 20 +check c "Sat Feb 7 07:04:03 1970" "Mon Nov 12 21:20:00 2001" +check D 02/07/70 11/12/01 +check d 07 12 +check e " 7" 12 +check F "1970-02-07" "2001-11-12" +check G 1970 2001 +check g 70 01 +check H 07 21 +check h Feb Nov +check I 07 09 +check j 038 316 +check k " 7" 21 +check l " 7" " 9" +check M 04 20 +check m 02 11 +check p AM PM +check R 07:04 21:20 +check r "07:04:03 AM" "09:20:00 PM" +check S 03 00 +check s ${TEST1} ${TEST2} +check U 05 45 +check u 6 1 +check V 06 46 +check v " 7-Feb-1970" "12-Nov-2001" +check W 05 46 +check w 6 1 +check X "07:04:03" "21:20:00" +check x "02/07/70" "11/12/01" +check Y 1970 2001 +check y 70 01 +check Z UTC UTC +check z +0000 +0000 +check % % % +check + "Sat Feb 7 07:04:03 UTC 1970" "Mon Nov 12 21:20:00 UTC 2001" Modified: head/bin/mv/Makefile ============================================================================== --- head/bin/mv/Makefile Wed Dec 11 03:41:07 2013 (r259209) +++ head/bin/mv/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -1,6 +1,12 @@ # @(#)Makefile 8.2 (Berkeley) 4/2/94 # $FreeBSD$ +.include + PROG= mv +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/bin/mv/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/mv/tests/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/bin/mv + +TAP_TESTS_SH= legacy_test + +.include Copied: head/bin/mv/tests/legacy_test.sh (from r258552, head/tools/regression/bin/mv/regress.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/mv/tests/legacy_test.sh Wed Dec 11 04:09:17 2013 (r259210, copy of r258552, head/tools/regression/bin/mv/regress.sh) @@ -0,0 +1,296 @@ +#!/bin/sh +# $FreeBSD$ + +# A directory in a device different from that where the tests are run +TMPDIR=/tmp/regress.$$ +COUNT=0 + +# Begin an individual test +begin() +{ + COUNT=`expr $COUNT + 1` + OK=1 + if [ -z "$FS" ] + then + NAME="$1" + else + NAME="$1 (cross device)" + fi + rm -rf testdir $TMPDIR/testdir + mkdir -p testdir $TMPDIR/testdir + cd testdir +} + +# End an individual test +end() +{ + if [ $OK = 1 ] + then + printf 'ok ' + else + printf 'not ok ' + fi + echo "$COUNT - $NAME" + cd .. + rm -rf testdir $TMPDIR/testdir +} + +# Make a file that can later be verified +mkf() +{ + CN=`basename $1` + echo "$CN-$CN" >$1 +} + +# Verify that the file specified is correct +ckf() +{ + if [ -f $2 ] && echo "$1-$1" | diff - $2 >/dev/null + then + ok + else + notok + fi +} + +# Make a fifo that can later be verified +mkp() +{ + mkfifo $1 +} + +# Verify that the file specified is correct +ckp() +{ + if [ -p $2 ] + then + ok + else + notok + fi +} + +# Make a directory that can later be verified +mkd() +{ + CN=`basename $1` + mkdir -p $1/"$CN-$CN" +} + +# Verify that the directory specified is correct +ckd() +{ + if [ -d $2/$1-$1 ] + then + ok + else + notok + fi +} + +# Verify that the specified file does not exist +# (is not there) +cknt() +{ + if [ -r $1 ] + then + notok + else + ok + fi +} + +# A part of a test succeeds +ok() +{ + : +} + +# A part of a test fails +notok() +{ + OK=0 +} + +# Verify that the exit code passed is for unsuccessful termination +ckfail() +{ + if [ $1 -gt 0 ] + then + ok + else + notok + fi +} + +# Verify that the exit code passed is for successful termination +ckok() +{ + if [ $1 -eq 0 ] + then + ok + else + notok + fi +} + +# Run all tests locally and across devices +echo 1..32 +for FS in '' $TMPDIR/testdir/ +do + begin 'Rename file' + mkf fa + mv fa ${FS}fb + ckok $? + ckf fa ${FS}fb + cknt fa + end + + begin 'Move files into directory' + mkf fa + mkf fb + mkdir -p ${FS}1/2/3 + mv fa fb ${FS}1/2/3 + ckok $? + ckf fa ${FS}1/2/3/fa + ckf fb ${FS}1/2/3/fb + cknt fa + cknt fb + end + + begin 'Move file from directory to file' + mkdir -p 1/2/3 + mkf 1/2/3/fa + mv 1/2/3/fa ${FS}fb + ckok $? + ckf fa ${FS}fb + cknt 1/2/3/fa + end + + begin 'Move file from directory to existing file' + mkdir -p 1/2/3 + mkf 1/2/3/fa + :> ${FS}fb + mv 1/2/3/fa ${FS}fb + ckok $? + ckf fa ${FS}fb + cknt 1/2/3/fa + end + + begin 'Move file from directory to existing directory' + mkdir -p 1/2/3 + mkf 1/2/3/fa + mkdir -p ${FS}db/fa + # Should fail per POSIX step 3a: + # Destination path is a file of type directory and + # source_file is not a file of type directory + mv 1/2/3/fa ${FS}db 2>/dev/null + ckfail $? + ckf fa 1/2/3/fa + end + + begin 'Move file from directory to directory' + mkdir -p da1/da2/da3 + mkdir -p ${FS}db1/db2/db3 + mkf da1/da2/da3/fa + mv da1/da2/da3/fa ${FS}db1/db2/db3/fb + ckok $? + ckf fa ${FS}db1/db2/db3/fb + cknt da1/da2/da3/fa + end + + begin 'Rename directory' + mkd da + mv da ${FS}db + ckok $? + ckd da ${FS}db + cknt da + end + + begin 'Move directory to directory name' + mkd da1/da2/da3/da + mkdir -p ${FS}db1/db2/db3 + mv da1/da2/da3/da ${FS}db1/db2/db3/db + ckok $? + ckd da ${FS}db1/db2/db3/db + cknt da1/da2/da3/da + end + + begin 'Move directory to directory' + mkd da1/da2/da3/da + mkdir -p ${FS}db1/db2/db3 + mv da1/da2/da3/da ${FS}db1/db2/db3 + ckok $? + ckd da ${FS}db1/db2/db3/da + cknt da1/da2/da3/da + end + + begin 'Move directory to existing empty directory' + mkd da1/da2/da3/da + mkdir -p ${FS}db1/db2/db3/da + mv da1/da2/da3/da ${FS}db1/db2/db3 + ckok $? + ckd da ${FS}db1/db2/db3/da + cknt da1/da2/da3/da + end + + begin 'Move directory to existing non-empty directory' + mkd da1/da2/da3/da + mkdir -p ${FS}db1/db2/db3/da/full + # Should fail (per the semantics of rename(2)) + mv da1/da2/da3/da ${FS}db1/db2/db3 2>/dev/null + ckfail $? + ckd da da1/da2/da3/da + end + + begin 'Move directory to existing file' + mkd da1/da2/da3/da + mkdir -p ${FS}db1/db2/db3 + :> ${FS}db1/db2/db3/da + # Should fail per POSIX step 3b: + # Destination path is a file not of type directory + # and source_file is a file of type directory + mv da1/da2/da3/da ${FS}db1/db2/db3/da 2>/dev/null + ckfail $? + ckd da da1/da2/da3/da + end + + begin 'Rename fifo' + mkp fa + mv fa ${FS}fb + ckok $? + ckp fa ${FS}fb + cknt fa + end + + begin 'Move fifos into directory' + mkp fa + mkp fb + mkdir -p ${FS}1/2/3 + mv fa fb ${FS}1/2/3 + ckok $? + ckp fa ${FS}1/2/3/fa + ckp fb ${FS}1/2/3/fb + cknt fa + cknt fb + end + + begin 'Move fifo from directory to fifo' + mkdir -p 1/2/3 + mkp 1/2/3/fa + mv 1/2/3/fa ${FS}fb + ckok $? + ckp fa ${FS}fb + cknt 1/2/3/fa + end + + begin 'Move fifo from directory to directory' + mkdir -p da1/da2/da3 + mkdir -p ${FS}db1/db2/db3 + mkp da1/da2/da3/fa + mv da1/da2/da3/fa ${FS}db1/db2/db3/fb + ckok $? + ckp fa ${FS}db1/db2/db3/fb + cknt da1/da2/da3/fa + end +done Modified: head/bin/pax/Makefile ============================================================================== --- head/bin/pax/Makefile Wed Dec 11 03:41:07 2013 (r259209) +++ head/bin/pax/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + # To install on versions prior to BSD 4.4 the following may have to be # defined with CFLAGS += # @@ -30,4 +32,8 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \ tables.c tar.c tty_subs.c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/bin/pax/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pax/tests/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/bin/pax + +TAP_TESTS_SH= legacy_test + +.include Copied: head/bin/pax/tests/legacy_test.sh (from r258552, head/tools/regression/bin/pax/regress.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pax/tests/legacy_test.sh Wed Dec 11 04:09:17 2013 (r259210, copy of r258552, head/tools/regression/bin/pax/regress.t) @@ -0,0 +1,91 @@ +#! /usr/bin/perl +# +# $FreeBSD$ + +use strict; +use warnings; + +use Test::More tests => 6; +use File::Path qw(rmtree mkpath); +use Cwd; + +my $n = 0; +sub create_file { + my $fn = shift; + + $n++; + (my $dir = $fn) =~ s,/[^/]+$,,; + mkpath $dir; + open my $fd, ">", $fn or die "$fn: $!"; + print $fd "file $n\n"; +} + + +ustar_pathnames: { SKIP: { + # Prove that pax breaks up ustar pathnames properly + + my $top = getcwd . "/ustar-pathnames-1"; + skip "Current path is too long", 6 if length $top > 92; + rmtree $top; + my $subdir = "x" . "x" x (92 - length $top); + my $work94 = "$top/$subdir"; + mkpath $work94; # $work is 94 characters long + + my $x49 = "x" x 49; + my $x50 = "x" x 50; + my $x60 = "x" x 60; + my $x95 = "x" x 95; + + my @paths = ( + "$work94/x099", # 99 chars + "$work94/xx100", # 100 chars + "$work94/xxx101", # 101 chars + "$work94/$x49/${x50}x199", # 199 chars + "$work94/$x49/${x50}xx200", # 200 chars + "$work94/$x49/${x50}xxx201", # 201 chars + "$work94/$x60/${x95}254", # 254 chars + "$work94/$x60/${x95}x255", # 255 chars + ); + + my @l = map { length } @paths; + + my $n = 0; + create_file $_ for @paths; + system "pax -wf ustar.ok $work94"; + ok($? == 0, "Wrote 'ustar.ok' containing files with lengths @l"); + + (my $orig = $top) =~ s,1$,2,; + rmtree $orig; + rename $top, $orig; + + system "pax -rf ustar.ok"; + ok($? == 0, "Restored 'ustar.ok' containing files with lengths @l"); + + system "diff -ru $orig $top"; + ok($? == 0, "Restored files are identical"); + + rmtree $top; + rename $orig, $top; + + # 256 chars (with components < 100 chars) should not work + push @paths, "$work94/x$x60/${x95}x256"; # 256 chars + push @l, length $paths[-1]; + create_file $paths[-1]; + system "pax -wf ustar.fail1 $work94"; + ok($?, "Failed to write 'ustar.fail1' containing files with lengths @l"); + + # Components with 100 chars shouldn't work + unlink $paths[-1]; + $paths[-1] = "$work94/${x95}xc100"; # 100 char filename + $l[-1] = length $paths[-1]; + create_file $paths[-1]; + system "pax -wf ustar.fail2 $work94"; + ok($?, "Failed to write 'ustar.fail2' with a 100 char filename"); + + unlink $paths[-1]; + $paths[-1] = "$work94/${x95}xc100/x"; # 100 char component + $l[-1] = length $paths[-1]; + create_file $paths[-1]; + system "pax -wf ustar.fail3 $work94"; + ok($?, "Failed to write 'ustar.fail3' with a 100 char component"); +}} Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Wed Dec 11 03:41:07 2013 (r259209) +++ head/bin/sh/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -1,6 +1,8 @@ # @(#)Makefile 8.4 (Berkeley) 5/5/95 # $FreeBSD$ +.include + PROG= sh INSTALLFLAGS= -S SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \ @@ -59,7 +61,8 @@ syntax.c syntax.h: mksyntax token.h: mktokens sh ${.CURDIR}/mktokens -regress: - cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Added: head/bin/sh/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/bin/sh + +TAP_TESTS_SH= legacy_test +TAP_TESTS_SH_SED_legacy_test= -e 's,__SH__,/bin/sh,g' + +SUBDIR+= builtins errors execution expansion parameters parser set-e + +.include Added: head/bin/sh/tests/builtins/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,147 @@ +# $FreeBSD$ + +.include + +FILESDIR= ${TESTSBASE}/bin/sh/builtins +KYUAFILE= no + +FILES= alias.0 alias.0.stdout +FILES+= alias.1 alias.1.stderr +FILES+= alias3.0 alias3.0.stdout +FILES+= alias4.0 +FILES+= break1.0 +FILES+= break2.0 break2.0.stdout +FILES+= break3.0 +FILES+= break4.4 +FILES+= break5.4 +FILES+= builtin1.0 +FILES+= case1.0 +FILES+= case2.0 +FILES+= case3.0 +FILES+= case4.0 +FILES+= case5.0 +FILES+= case6.0 +FILES+= case7.0 +FILES+= case8.0 +FILES+= case9.0 +FILES+= case10.0 +FILES+= case11.0 +FILES+= case12.0 +FILES+= case13.0 +FILES+= case14.0 +FILES+= case15.0 +FILES+= case16.0 +FILES+= case17.0 +FILES+= case18.0 +FILES+= case19.0 +FILES+= cd1.0 +FILES+= cd2.0 +FILES+= cd3.0 +FILES+= cd4.0 +FILES+= cd5.0 +FILES+= cd6.0 +FILES+= cd7.0 +FILES+= cd8.0 +FILES+= command1.0 +FILES+= command2.0 +FILES+= command3.0 +FILES+= command3.0.stdout +FILES+= command4.0 +FILES+= command5.0 +FILES+= command5.0.stdout +FILES+= command6.0 +FILES+= command6.0.stdout +FILES+= command7.0 +FILES+= command8.0 +FILES+= command9.0 +FILES+= command10.0 +FILES+= command11.0 +FILES+= command12.0 +FILES+= dot1.0 +FILES+= dot2.0 +FILES+= dot3.0 +FILES+= dot4.0 +FILES+= eval1.0 +FILES+= eval2.0 +FILES+= eval3.0 +FILES+= eval4.0 +FILES+= eval5.0 +FILES+= eval6.0 +FILES+= exec1.0 +FILES+= exec2.0 +FILES+= exit1.0 +FILES+= exit2.8 +FILES+= exit3.0 +FILES+= export1.0 +FILES+= fc1.0 +FILES+= fc2.0 +FILES+= for1.0 +FILES+= for2.0 +FILES+= for3.0 +FILES+= getopts1.0 getopts1.0.stdout +FILES+= getopts2.0 getopts2.0.stdout +FILES+= hash1.0 hash1.0.stdout +FILES+= hash2.0 hash2.0.stdout +FILES+= hash3.0 hash3.0.stdout +FILES+= hash4.0 +FILES+= jobid1.0 +FILES+= jobid2.0 +FILES+= lineno.0 lineno.0.stdout +FILES+= local1.0 +FILES+= local2.0 +FILES+= local3.0 +FILES+= local4.0 +FILES+= locale1.0 +FILES+= printf1.0 +FILES+= printf2.0 +FILES+= printf3.0 +FILES+= printf4.0 +FILES+= read1.0 read1.0.stdout +FILES+= read2.0 +FILES+= read3.0 read3.0.stdout +FILES+= read4.0 read4.0.stdout +FILES+= read5.0 +FILES+= read6.0 +FILES+= read7.0 +FILES+= return1.0 +FILES+= return2.1 +FILES+= return3.1 +FILES+= return4.0 +FILES+= return5.0 +FILES+= return6.4 +FILES+= return7.4 +FILES+= return8.0 +FILES+= set1.0 +FILES+= set2.0 +FILES+= trap1.0 +FILES+= trap10.0 +FILES+= trap11.0 +FILES+= trap12.0 +FILES+= trap13.0 +FILES+= trap14.0 +FILES+= trap2.0 +FILES+= trap3.0 +FILES+= trap4.0 +FILES+= trap5.0 +FILES+= trap6.0 +FILES+= trap7.0 +FILES+= trap8.0 +FILES+= trap9.0 +FILES+= type1.0 type1.0.stderr +FILES+= type2.0 +FILES+= type3.0 +FILES+= unalias.0 +FILES+= var-assign.0 +FILES+= var-assign2.0 +FILES+= wait1.0 +FILES+= wait2.0 +FILES+= wait3.0 +FILES+= wait4.0 +FILES+= wait5.0 +FILES+= wait6.0 +FILES+= wait7.0 +FILES+= wait8.0 +FILES+= wait9.127 +FILES+= wait10.0 + +.include Added: head/bin/sh/tests/errors/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/errors/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +.include + +FILESDIR= ${TESTSBASE}/bin/sh/errors +KYUAFILE= no + +FILES= assignment-error1.0 +FILES+= assignment-error2.0 +FILES+= backquote-error1.0 +FILES+= backquote-error2.0 +FILES+= bad-binary1.126 +FILES+= bad-keyword1.0 +FILES+= bad-parm-exp1.0 +FILES+= bad-parm-exp2.2 bad-parm-exp2.2.stderr +FILES+= bad-parm-exp3.2 bad-parm-exp3.2.stderr +FILES+= bad-parm-exp4.2 bad-parm-exp4.2.stderr +FILES+= bad-parm-exp5.2 bad-parm-exp5.2.stderr +FILES+= bad-parm-exp6.2 bad-parm-exp6.2.stderr +FILES+= option-error.0 +FILES+= redirection-error.0 +FILES+= redirection-error2.2 +FILES+= redirection-error3.0 +FILES+= redirection-error4.0 +FILES+= redirection-error5.0 +FILES+= redirection-error6.0 +FILES+= redirection-error7.0 +FILES+= write-error1.0 + +.include Added: head/bin/sh/tests/execution/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/execution/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,53 @@ +# $FreeBSD$ + +.include + +FILESDIR= ${TESTSBASE}/bin/sh/execution +KYUAFILE= no + +FILES= bg1.0 +FILES+= bg2.0 +FILES+= bg3.0 +FILES+= bg4.0 +FILES+= bg5.0 +FILES+= bg6.0 bg6.0.stdout +FILES+= bg7.0 +FILES+= bg8.0 +FILES+= bg9.0 +FILES+= bg10.0 bg10.0.stdout +FILES+= fork1.0 +FILES+= fork2.0 +FILES+= fork3.0 +FILES+= func1.0 +FILES+= func2.0 +FILES+= func3.0 +FILES+= hash1.0 +FILES+= int-cmd1.0 +FILES+= killed1.0 +FILES+= killed2.0 +FILES+= not1.0 +FILES+= not2.0 +FILES+= path1.0 +FILES+= redir1.0 +FILES+= redir2.0 +FILES+= redir3.0 +FILES+= redir4.0 +FILES+= redir5.0 +FILES+= redir6.0 +FILES+= redir7.0 +FILES+= set-n1.0 +FILES+= set-n2.0 +FILES+= set-n3.0 +FILES+= set-n4.0 +FILES+= set-x1.0 +FILES+= set-x2.0 +FILES+= set-x3.0 +FILES+= shellproc1.0 +FILES+= subshell1.0 subshell1.0.stdout +FILES+= subshell2.0 +FILES+= subshell3.0 +FILES+= subshell4.0 +FILES+= unknown1.0 +FILES+= var-assign1.0 + +.include Added: head/bin/sh/tests/expansion/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,86 @@ +# $FreeBSD$ + +.include + +FILESDIR= ${TESTSBASE}/bin/sh/expansion +KYUAFILE= no + +FILES= arith1.0 +FILES+= arith2.0 +FILES+= arith3.0 +FILES+= arith4.0 +FILES+= arith5.0 +FILES+= arith6.0 +FILES+= arith7.0 +FILES+= arith8.0 +FILES+= arith9.0 +FILES+= arith10.0 +FILES+= arith11.0 +FILES+= arith12.0 +FILES+= arith13.0 +FILES+= assign1.0 +FILES+= cmdsubst1.0 +FILES+= cmdsubst2.0 +FILES+= cmdsubst3.0 +FILES+= cmdsubst4.0 +FILES+= cmdsubst5.0 +FILES+= cmdsubst6.0 +FILES+= cmdsubst7.0 +FILES+= cmdsubst8.0 +FILES+= cmdsubst9.0 +FILES+= cmdsubst10.0 +FILES+= cmdsubst11.0 +FILES+= cmdsubst12.0 +FILES+= cmdsubst13.0 +FILES+= cmdsubst14.0 +FILES+= cmdsubst15.0 +FILES+= cmdsubst16.0 +FILES+= cmdsubst17.0 +FILES+= export1.0 +FILES+= export2.0 +FILES+= export3.0 +FILES+= heredoc1.0 +FILES+= heredoc2.0 +FILES+= ifs1.0 +FILES+= ifs2.0 +FILES+= ifs3.0 +FILES+= ifs4.0 +FILES+= length1.0 +FILES+= length2.0 +FILES+= length3.0 +FILES+= length4.0 +FILES+= length5.0 +FILES+= length6.0 +FILES+= length7.0 +FILES+= length8.0 +FILES+= local1.0 +FILES+= local2.0 +FILES+= pathname1.0 +FILES+= pathname2.0 +FILES+= pathname3.0 +FILES+= pathname4.0 +FILES+= plus-minus1.0 +FILES+= plus-minus2.0 +FILES+= plus-minus3.0 +FILES+= plus-minus4.0 +FILES+= plus-minus5.0 +FILES+= plus-minus6.0 +FILES+= plus-minus7.0 +FILES+= plus-minus8.0 +FILES+= question1.0 +FILES+= readonly1.0 +FILES+= set-u1.0 +FILES+= set-u2.0 +FILES+= set-u3.0 +FILES+= tilde1.0 +FILES+= tilde2.0 +FILES+= trim1.0 +FILES+= trim2.0 +FILES+= trim3.0 +FILES+= trim4.0 +FILES+= trim5.0 +FILES+= trim6.0 +FILES+= trim7.0 +FILES+= trim8.0 + +.include Copied and modified: head/bin/sh/tests/legacy_test.sh (from r258552, head/tools/regression/bin/sh/regress.sh) ============================================================================== --- head/tools/regression/bin/sh/regress.sh Mon Nov 25 13:30:06 2013 (r258552, copy source) +++ head/bin/sh/tests/legacy_test.sh Wed Dec 11 04:09:17 2013 (r259210) @@ -1,10 +1,13 @@ # $FreeBSD$ -if [ -z "${SH}" ]; then - echo '${SH} is not set, please correct and re-run.' - exit 1 -fi -export SH=${SH} +: ${SH:="__SH__"} +export SH + +# TODO(jmmv): The Kyua TAP interface should be passing us the value of +# "srcdir" as an environment variable, just as it does with the ATF +# interface in the form of a configuration variable. For now, just try +# to guess this. +: ${TESTS_DATA:=$(dirname ${0})} COUNTER=1 @@ -17,6 +20,7 @@ do_test() { rm tmp.stdout tmp.stderr return fi + sed -I '' -e "s|^${TESTS_DATA}|.|" tmp.stderr for i in stdout stderr; do if [ -f ${1}.${i} ]; then if ! cmp -s tmp.${i} ${1}.${i}; then @@ -34,7 +38,7 @@ do_test() { rm tmp.stdout tmp.stderr } -TESTS=$(find -Es . -regex ".*\.[0-9]+") +TESTS=$(find -Es ${TESTS_DATA} -regex ".*\.[0-9]+") printf "1..%d\n" $(echo ${TESTS} | wc -w) for i in ${TESTS} ; do Added: head/bin/sh/tests/parameters/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parameters/Makefile Wed Dec 11 04:09:17 2013 (r259210) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.include + +FILESDIR= ${TESTSBASE}/bin/sh/parameters +KYUAFILE= no + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 04:31:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19F6A16C; Wed, 11 Dec 2013 04:31:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 060301201; Wed, 11 Dec 2013 04:31:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB4Veh3084907; Wed, 11 Dec 2013 04:31:40 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB4Ve2b084905; Wed, 11 Dec 2013 04:31:40 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312110431.rBB4Ve2b084905@svn.freebsd.org> From: Mark Johnston Date: Wed, 11 Dec 2013 04:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259211 - in head/sys/cddl/contrib/opensolaris/uts: intel/dtrace powerpc/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 04:31:41 -0000 Author: markj Date: Wed Dec 11 04:31:40 2013 New Revision: 259211 URL: http://svnweb.freebsd.org/changeset/base/259211 Log: Correct the check for errors from proc_rwmem(). MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Wed Dec 11 04:09:17 2013 (r259210) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Wed Dec 11 04:31:40 2013 (r259211) @@ -75,7 +75,7 @@ proc_ops(int op, proc_t *p, void *kaddr, uio.uio_td = curthread; uio.uio_rw = op; PHOLD(p); - if (proc_rwmem(p, &uio) < 0) { + if (proc_rwmem(p, &uio) != 0) { PRELE(p); return (-1); } Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Wed Dec 11 04:09:17 2013 (r259210) +++ head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Wed Dec 11 04:31:40 2013 (r259211) @@ -60,7 +60,7 @@ proc_ops(int op, proc_t *p, void *kaddr, uio.uio_td = curthread; uio.uio_rw = op; PHOLD(p); - if (proc_rwmem(p, &uio) < 0) { + if (proc_rwmem(p, &uio) != 0) { PRELE(p); return (-1); } From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 05:32:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0956E64; Wed, 11 Dec 2013 05:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9162316EF; Wed, 11 Dec 2013 05:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB5WTiC006662; Wed, 11 Dec 2013 05:32:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB5WTk0006661; Wed, 11 Dec 2013 05:32:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312110532.rBB5WTk0006661@svn.freebsd.org> From: Warner Losh Date: Wed, 11 Dec 2013 05:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259212 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 05:32:29 -0000 Author: imp Date: Wed Dec 11 05:32:29 2013 New Revision: 259212 URL: http://svnweb.freebsd.org/changeset/base/259212 Log: Fix one race and one fence post error. When the TX buffer was completely full, we'd not complete any of the mbufs due to the fence post error (this creates a large leak). When this is fixed, we still leak, but at a much smaller rate due to a race between ateintr and atestart_locked as well as an asymmetry where atestart_locked is called from elsewhere. Ensure that we free in-flight packets that have completed there as well. Also remove needless check for NULL on mb, checked earlier in the loop and simplify a redundant if. MFC after: 3 days Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Wed Dec 11 04:31:40 2013 (r259211) +++ head/sys/arm/at91/if_ate.c Wed Dec 11 05:32:29 2013 (r259212) @@ -947,10 +947,8 @@ ate_intr(void *xsc) } while (!done); - if (mb != NULL) { - ifp->if_ipackets++; - (*ifp->if_input)(ifp, mb); - } + ifp->if_ipackets++; + (*ifp->if_input)(ifp, mb); } } @@ -974,16 +972,14 @@ ate_intr(void *xsc) sc->tx_descs[sc->txtail + 1].status |= ETHB_TX_USED; } - while (sc->txtail != sc->txhead && - sc->tx_descs[sc->txtail].status & ETHB_TX_USED ) { - + while ((sc->tx_descs[sc->txtail].status & ETHB_TX_USED) && + sc->sent_mbuf[sc->txtail] != NULL) { bus_dmamap_sync(sc->mtag, sc->tx_map[sc->txtail], BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->mtag, sc->tx_map[sc->txtail]); m_freem(sc->sent_mbuf[sc->txtail]); sc->tx_descs[sc->txtail].addr = 0; sc->sent_mbuf[sc->txtail] = NULL; - ifp->if_opackets++; sc->txtail = NEXT_TX_IDX(sc, sc->txtail); } @@ -1118,12 +1114,10 @@ atestart_locked(struct ifnet *ifp) * xmit packets. We use OACTIVE to indicate "we can stuff more * into our buffers (clear) or not (set)." */ - if (!sc->is_emacb) { - /* RM9200 has only two hardware entries */ - if (!sc->is_emacb && (RD4(sc, ETH_TSR) & ETH_TSR_BNQ) == 0) { - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - return; - } + /* RM9200 has only two hardware entries */ + if (!sc->is_emacb && (RD4(sc, ETH_TSR) & ETH_TSR_BNQ) == 0) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + return; } IFQ_DRV_DEQUEUE(&ifp->if_snd, m); @@ -1146,6 +1140,21 @@ atestart_locked(struct ifnet *ifp) m_freem(m); continue; } + + /* + * There's a small race between the loop in ate_intr finishing + * and the check above to see if the packet was finished, as well + * as when atestart gets called via other paths. Loose the race + * gracefully and free the mbuf... + */ + if (sc->sent_mbuf[sc->txhead] != NULL) { + bus_dmamap_sync(sc->mtag, sc->tx_map[sc->txtail], + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->mtag, sc->tx_map[sc->txtail]); + m_free(sc->sent_mbuf[sc->txhead]); + ifp->if_opackets++; + } + sc->sent_mbuf[sc->txhead] = m; bus_dmamap_sync(sc->mtag, sc->tx_map[sc->txhead], From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 06:28:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4F17C84; Wed, 11 Dec 2013 06:28:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1F041B5D; Wed, 11 Dec 2013 06:28:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB6Sia7025338; Wed, 11 Dec 2013 06:28:44 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB6SiBZ025337; Wed, 11 Dec 2013 06:28:44 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201312110628.rBB6SiBZ025337@svn.freebsd.org> From: Neel Natu Date: Wed, 11 Dec 2013 06:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259213 - head/sys/amd64/vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 06:28:44 -0000 Author: neel Date: Wed Dec 11 06:28:44 2013 New Revision: 259213 URL: http://svnweb.freebsd.org/changeset/base/259213 Log: Fix typo when initializing the vlapic version register ('<<' instead of '<'). Modified: head/sys/amd64/vmm/io/vlapic.c Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Wed Dec 11 05:32:29 2013 (r259212) +++ head/sys/amd64/vmm/io/vlapic.c Wed Dec 11 06:28:44 2013 (r259213) @@ -260,7 +260,7 @@ vlapic_init_ipi(struct vlapic *vlapic) { struct LAPIC *lapic = &vlapic->apic; lapic->version = VLAPIC_VERSION; - lapic->version |= (VLAPIC_MAXLVT_ENTRIES < MAXLVTSHIFT); + lapic->version |= (VLAPIC_MAXLVT_ENTRIES << MAXLVTSHIFT); lapic->dfr = 0xffffffff; lapic->svr = APIC_SVR_VECTOR; vlapic_mask_lvts(&lapic->lvt_timer, VLAPIC_MAXLVT_ENTRIES+1); From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 13:20:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BE23C83; Wed, 11 Dec 2013 13:20:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 172BC18D7; Wed, 11 Dec 2013 13:20:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBDKaG3076937; Wed, 11 Dec 2013 13:20:36 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBDKWDw076917; Wed, 11 Dec 2013 13:20:32 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312111320.rBBDKWDw076917@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 11 Dec 2013 13:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259218 - in head/sys/dev/usb: . controller template X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 13:20:36 -0000 Author: hselasky Date: Wed Dec 11 13:20:32 2013 New Revision: 259218 URL: http://svnweb.freebsd.org/changeset/base/259218 Log: USB method structures for USB controllers and USB pipes should be constant and does not need to be modified. This also saves a small amount of RAM. Modified: head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/avr32dci.c head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/usb_bus.h head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_device.h head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_transfer.c head/sys/dev/usb/usbdi.h Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/at91dci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -103,11 +103,11 @@ SYSCTL_INT(_hw_usb_at91dci, OID_AUTO, de /* prototypes */ -struct usb_bus_methods at91dci_bus_methods; -struct usb_pipe_methods at91dci_device_bulk_methods; -struct usb_pipe_methods at91dci_device_ctrl_methods; -struct usb_pipe_methods at91dci_device_intr_methods; -struct usb_pipe_methods at91dci_device_isoc_fs_methods; +static const struct usb_bus_methods at91dci_bus_methods; +static const struct usb_pipe_methods at91dci_device_bulk_methods; +static const struct usb_pipe_methods at91dci_device_ctrl_methods; +static const struct usb_pipe_methods at91dci_device_intr_methods; +static const struct usb_pipe_methods at91dci_device_isoc_fs_methods; static at91dci_cmd_t at91dci_setup_rx; static at91dci_cmd_t at91dci_data_rx; @@ -1515,7 +1515,7 @@ at91dci_device_bulk_start(struct usb_xfe at91dci_start_standard_chain(xfer); } -struct usb_pipe_methods at91dci_device_bulk_methods = +static const struct usb_pipe_methods at91dci_device_bulk_methods = { .open = at91dci_device_bulk_open, .close = at91dci_device_bulk_close, @@ -1552,7 +1552,7 @@ at91dci_device_ctrl_start(struct usb_xfe at91dci_start_standard_chain(xfer); } -struct usb_pipe_methods at91dci_device_ctrl_methods = +static const struct usb_pipe_methods at91dci_device_ctrl_methods = { .open = at91dci_device_ctrl_open, .close = at91dci_device_ctrl_close, @@ -1589,7 +1589,7 @@ at91dci_device_intr_start(struct usb_xfe at91dci_start_standard_chain(xfer); } -struct usb_pipe_methods at91dci_device_intr_methods = +static const struct usb_pipe_methods at91dci_device_intr_methods = { .open = at91dci_device_intr_open, .close = at91dci_device_intr_close, @@ -1671,7 +1671,7 @@ at91dci_device_isoc_fs_start(struct usb_ at91dci_start_standard_chain(xfer); } -struct usb_pipe_methods at91dci_device_isoc_fs_methods = +static const struct usb_pipe_methods at91dci_device_isoc_fs_methods = { .open = at91dci_device_isoc_fs_open, .close = at91dci_device_isoc_fs_close, @@ -2318,7 +2318,7 @@ at91dci_set_hw_power_sleep(struct usb_bu } } -struct usb_bus_methods at91dci_bus_methods = +static const struct usb_bus_methods at91dci_bus_methods = { .endpoint_init = &at91dci_ep_init, .xfer_setup = &at91dci_xfer_setup, Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/atmegadci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -96,9 +96,9 @@ SYSCTL_INT(_hw_usb_atmegadci, OID_AUTO, /* prototypes */ -struct usb_bus_methods atmegadci_bus_methods; -struct usb_pipe_methods atmegadci_device_non_isoc_methods; -struct usb_pipe_methods atmegadci_device_isoc_fs_methods; +static const struct usb_bus_methods atmegadci_bus_methods; +static const struct usb_pipe_methods atmegadci_device_non_isoc_methods; +static const struct usb_pipe_methods atmegadci_device_isoc_fs_methods; static atmegadci_cmd_t atmegadci_setup_rx; static atmegadci_cmd_t atmegadci_data_rx; @@ -1410,7 +1410,7 @@ atmegadci_device_non_isoc_start(struct u atmegadci_start_standard_chain(xfer); } -struct usb_pipe_methods atmegadci_device_non_isoc_methods = +static const struct usb_pipe_methods atmegadci_device_non_isoc_methods = { .open = atmegadci_device_non_isoc_open, .close = atmegadci_device_non_isoc_close, @@ -1496,7 +1496,7 @@ atmegadci_device_isoc_fs_start(struct us atmegadci_start_standard_chain(xfer); } -struct usb_pipe_methods atmegadci_device_isoc_fs_methods = +static const struct usb_pipe_methods atmegadci_device_isoc_fs_methods = { .open = atmegadci_device_isoc_fs_open, .close = atmegadci_device_isoc_fs_close, @@ -2140,7 +2140,7 @@ atmegadci_set_hw_power_sleep(struct usb_ } } -struct usb_bus_methods atmegadci_bus_methods = +static const struct usb_bus_methods atmegadci_bus_methods = { .endpoint_init = &atmegadci_ep_init, .xfer_setup = &atmegadci_xfer_setup, Modified: head/sys/dev/usb/controller/avr32dci.c ============================================================================== --- head/sys/dev/usb/controller/avr32dci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/avr32dci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -94,9 +94,9 @@ SYSCTL_INT(_hw_usb_avr32dci, OID_AUTO, d /* prototypes */ -struct usb_bus_methods avr32dci_bus_methods; -struct usb_pipe_methods avr32dci_device_non_isoc_methods; -struct usb_pipe_methods avr32dci_device_isoc_fs_methods; +static const struct usb_bus_methods avr32dci_bus_methods; +static const struct usb_pipe_methods avr32dci_device_non_isoc_methods; +static const struct usb_pipe_methods avr32dci_device_isoc_fs_methods; static avr32dci_cmd_t avr32dci_setup_rx; static avr32dci_cmd_t avr32dci_data_rx; @@ -1340,7 +1340,7 @@ avr32dci_device_non_isoc_start(struct us avr32dci_start_standard_chain(xfer); } -struct usb_pipe_methods avr32dci_device_non_isoc_methods = +static const struct usb_pipe_methods avr32dci_device_non_isoc_methods = { .open = avr32dci_device_non_isoc_open, .close = avr32dci_device_non_isoc_close, @@ -1425,7 +1425,7 @@ avr32dci_device_isoc_fs_start(struct usb avr32dci_start_standard_chain(xfer); } -struct usb_pipe_methods avr32dci_device_isoc_fs_methods = +static const struct usb_pipe_methods avr32dci_device_isoc_fs_methods = { .open = avr32dci_device_isoc_fs_open, .close = avr32dci_device_isoc_fs_close, @@ -2084,7 +2084,7 @@ avr32dci_set_hw_power_sleep(struct usb_b } } -struct usb_bus_methods avr32dci_bus_methods = +static const struct usb_bus_methods avr32dci_bus_methods = { .endpoint_init = &avr32dci_ep_init, .xfer_setup = &avr32dci_xfer_setup, Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/dwc_otg.c Wed Dec 11 13:20:32 2013 (r259218) @@ -122,9 +122,9 @@ SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, de /* prototypes */ -struct usb_bus_methods dwc_otg_bus_methods; -struct usb_pipe_methods dwc_otg_device_non_isoc_methods; -struct usb_pipe_methods dwc_otg_device_isoc_methods; +static const struct usb_bus_methods dwc_otg_bus_methods; +static const struct usb_pipe_methods dwc_otg_device_non_isoc_methods; +static const struct usb_pipe_methods dwc_otg_device_isoc_methods; static dwc_otg_cmd_t dwc_otg_setup_rx; static dwc_otg_cmd_t dwc_otg_data_rx; @@ -3327,7 +3327,7 @@ dwc_otg_device_non_isoc_start(struct usb dwc_otg_start_standard_chain(xfer); } -struct usb_pipe_methods dwc_otg_device_non_isoc_methods = +static const struct usb_pipe_methods dwc_otg_device_non_isoc_methods = { .open = dwc_otg_device_non_isoc_open, .close = dwc_otg_device_non_isoc_close, @@ -3422,7 +3422,7 @@ dwc_otg_device_isoc_start(struct usb_xfe dwc_otg_start_standard_chain(xfer); } -struct usb_pipe_methods dwc_otg_device_isoc_methods = +static const struct usb_pipe_methods dwc_otg_device_isoc_methods = { .open = dwc_otg_device_isoc_open, .close = dwc_otg_device_isoc_close, @@ -4201,7 +4201,7 @@ dwc_otg_device_suspend(struct usb_device USB_BUS_UNLOCK(udev->bus); } -struct usb_bus_methods dwc_otg_bus_methods = +static const struct usb_bus_methods dwc_otg_bus_methods = { .endpoint_init = &dwc_otg_ep_init, .xfer_setup = &dwc_otg_xfer_setup, Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/ehci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -119,12 +119,12 @@ static void ehci_dump_sqh(ehci_softc_t * #define EHCI_INTR_ENDPT 1 -extern struct usb_bus_methods ehci_bus_methods; -extern struct usb_pipe_methods ehci_device_bulk_methods; -extern struct usb_pipe_methods ehci_device_ctrl_methods; -extern struct usb_pipe_methods ehci_device_intr_methods; -extern struct usb_pipe_methods ehci_device_isoc_fs_methods; -extern struct usb_pipe_methods ehci_device_isoc_hs_methods; +static const struct usb_bus_methods ehci_bus_methods; +static const struct usb_pipe_methods ehci_device_bulk_methods; +static const struct usb_pipe_methods ehci_device_ctrl_methods; +static const struct usb_pipe_methods ehci_device_intr_methods; +static const struct usb_pipe_methods ehci_device_isoc_fs_methods; +static const struct usb_pipe_methods ehci_device_isoc_hs_methods; static void ehci_do_poll(struct usb_bus *); static void ehci_device_done(struct usb_xfer *, usb_error_t); @@ -1275,7 +1275,7 @@ done: static uint8_t ehci_check_transfer(struct usb_xfer *xfer) { - struct usb_pipe_methods *methods = xfer->endpoint->methods; + const struct usb_pipe_methods *methods = xfer->endpoint->methods; ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); uint32_t status; @@ -1756,7 +1756,7 @@ static void ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_qh_t **qh_last) { struct ehci_std_temp temp; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; ehci_qh_t *qh; ehci_qtd_t *td; uint32_t qh_endp; @@ -2164,7 +2164,7 @@ ehci_isoc_hs_done(ehci_softc_t *sc, stru static void ehci_device_done(struct usb_xfer *xfer, usb_error_t error) { - struct usb_pipe_methods *methods = xfer->endpoint->methods; + const struct usb_pipe_methods *methods = xfer->endpoint->methods; ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); @@ -2258,7 +2258,7 @@ ehci_device_bulk_start(struct usb_xfer * EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); } -struct usb_pipe_methods ehci_device_bulk_methods = +static const struct usb_pipe_methods ehci_device_bulk_methods = { .open = ehci_device_bulk_open, .close = ehci_device_bulk_close, @@ -2299,7 +2299,7 @@ ehci_device_ctrl_start(struct usb_xfer * ehci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ehci_device_ctrl_methods = +static const struct usb_pipe_methods ehci_device_ctrl_methods = { .open = ehci_device_ctrl_open, .close = ehci_device_ctrl_close, @@ -2380,7 +2380,7 @@ ehci_device_intr_start(struct usb_xfer * ehci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ehci_device_intr_methods = +static const struct usb_pipe_methods ehci_device_intr_methods = { .open = ehci_device_intr_open, .close = ehci_device_intr_close, @@ -2672,7 +2672,7 @@ ehci_device_isoc_fs_start(struct usb_xfe ehci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ehci_device_isoc_fs_methods = +static const struct usb_pipe_methods ehci_device_isoc_fs_methods = { .open = ehci_device_isoc_fs_open, .close = ehci_device_isoc_fs_close, @@ -2952,7 +2952,7 @@ ehci_device_isoc_hs_start(struct usb_xfe ehci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ehci_device_isoc_hs_methods = +static const struct usb_pipe_methods ehci_device_isoc_hs_methods = { .open = ehci_device_isoc_hs_open, .close = ehci_device_isoc_hs_close, @@ -3759,7 +3759,7 @@ ehci_device_resume(struct usb_device *ud { ehci_softc_t *sc = EHCI_BUS2SC(udev->bus); struct usb_xfer *xfer; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; DPRINTF("\n"); @@ -3793,7 +3793,7 @@ ehci_device_suspend(struct usb_device *u { ehci_softc_t *sc = EHCI_BUS2SC(udev->bus); struct usb_xfer *xfer; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; DPRINTF("\n"); @@ -3872,7 +3872,7 @@ ehci_set_hw_power(struct usb_bus *bus) return; } -struct usb_bus_methods ehci_bus_methods = +static const struct usb_bus_methods ehci_bus_methods = { .endpoint_init = ehci_ep_init, .xfer_setup = ehci_xfer_setup, Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/musb_otg.c Wed Dec 11 13:20:32 2013 (r259218) @@ -99,11 +99,11 @@ SYSCTL_INT(_hw_usb_musbotg, OID_AUTO, de /* prototypes */ -struct usb_bus_methods musbotg_bus_methods; -struct usb_pipe_methods musbotg_device_bulk_methods; -struct usb_pipe_methods musbotg_device_ctrl_methods; -struct usb_pipe_methods musbotg_device_intr_methods; -struct usb_pipe_methods musbotg_device_isoc_methods; +static const struct usb_bus_methods musbotg_bus_methods; +static const struct usb_pipe_methods musbotg_device_bulk_methods; +static const struct usb_pipe_methods musbotg_device_ctrl_methods; +static const struct usb_pipe_methods musbotg_device_intr_methods; +static const struct usb_pipe_methods musbotg_device_isoc_methods; /* Control transfers: Device mode */ static musbotg_cmd_t musbotg_dev_ctrl_setup_rx; @@ -3335,7 +3335,7 @@ musbotg_device_bulk_start(struct usb_xfe musbotg_start_standard_chain(xfer); } -struct usb_pipe_methods musbotg_device_bulk_methods = +static const struct usb_pipe_methods musbotg_device_bulk_methods = { .open = musbotg_device_bulk_open, .close = musbotg_device_bulk_close, @@ -3372,7 +3372,7 @@ musbotg_device_ctrl_start(struct usb_xfe musbotg_start_standard_chain(xfer); } -struct usb_pipe_methods musbotg_device_ctrl_methods = +static const struct usb_pipe_methods musbotg_device_ctrl_methods = { .open = musbotg_device_ctrl_open, .close = musbotg_device_ctrl_close, @@ -3409,7 +3409,7 @@ musbotg_device_intr_start(struct usb_xfe musbotg_start_standard_chain(xfer); } -struct usb_pipe_methods musbotg_device_intr_methods = +static const struct usb_pipe_methods musbotg_device_intr_methods = { .open = musbotg_device_intr_open, .close = musbotg_device_intr_close, @@ -3498,7 +3498,7 @@ musbotg_device_isoc_start(struct usb_xfe musbotg_start_standard_chain(xfer); } -struct usb_pipe_methods musbotg_device_isoc_methods = +static const struct usb_pipe_methods musbotg_device_isoc_methods = { .open = musbotg_device_isoc_open, .close = musbotg_device_isoc_close, @@ -4218,7 +4218,7 @@ musbotg_set_hw_power_sleep(struct usb_bu } } -struct usb_bus_methods musbotg_bus_methods = +static const struct usb_bus_methods musbotg_bus_methods = { .endpoint_init = &musbotg_ep_init, .get_dma_delay = &musbotg_get_dma_delay, Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/ohci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -111,11 +111,11 @@ static void ohci_dump_itds(ohci_itd_t *) #define OHCI_INTR_ENDPT 1 -extern struct usb_bus_methods ohci_bus_methods; -extern struct usb_pipe_methods ohci_device_bulk_methods; -extern struct usb_pipe_methods ohci_device_ctrl_methods; -extern struct usb_pipe_methods ohci_device_intr_methods; -extern struct usb_pipe_methods ohci_device_isoc_methods; +static const struct usb_bus_methods ohci_bus_methods; +static const struct usb_pipe_methods ohci_device_bulk_methods; +static const struct usb_pipe_methods ohci_device_ctrl_methods; +static const struct usb_pipe_methods ohci_device_intr_methods; +static const struct usb_pipe_methods ohci_device_isoc_methods; static void ohci_do_poll(struct usb_bus *bus); static void ohci_device_done(struct usb_xfer *xfer, usb_error_t error); @@ -1393,7 +1393,7 @@ static void ohci_setup_standard_chain(struct usb_xfer *xfer, ohci_ed_t **ed_last) { struct ohci_std_temp temp; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; ohci_ed_t *ed; ohci_td_t *td; uint32_t ed_flags; @@ -1632,7 +1632,7 @@ ohci_root_intr(ohci_softc_t *sc) static void ohci_device_done(struct usb_xfer *xfer, usb_error_t error) { - struct usb_pipe_methods *methods = xfer->endpoint->methods; + const struct usb_pipe_methods *methods = xfer->endpoint->methods; ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus); ohci_ed_t *ed; @@ -1698,7 +1698,7 @@ ohci_device_bulk_start(struct usb_xfer * ohci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ohci_device_bulk_methods = +static const struct usb_pipe_methods ohci_device_bulk_methods = { .open = ohci_device_bulk_open, .close = ohci_device_bulk_close, @@ -1739,7 +1739,7 @@ ohci_device_ctrl_start(struct usb_xfer * ohci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ohci_device_ctrl_methods = +static const struct usb_pipe_methods ohci_device_ctrl_methods = { .open = ohci_device_ctrl_open, .close = ohci_device_ctrl_close, @@ -1811,7 +1811,7 @@ ohci_device_intr_start(struct usb_xfer * ohci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ohci_device_intr_methods = +static const struct usb_pipe_methods ohci_device_intr_methods = { .open = ohci_device_intr_open, .close = ohci_device_intr_close, @@ -2019,7 +2019,7 @@ ohci_device_isoc_start(struct usb_xfer * ohci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods ohci_device_isoc_methods = +static const struct usb_pipe_methods ohci_device_isoc_methods = { .open = ohci_device_isoc_open, .close = ohci_device_isoc_close, @@ -2598,7 +2598,7 @@ ohci_device_resume(struct usb_device *ud { struct ohci_softc *sc = OHCI_BUS2SC(udev->bus); struct usb_xfer *xfer; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; ohci_ed_t *ed; DPRINTF("\n"); @@ -2636,7 +2636,7 @@ ohci_device_suspend(struct usb_device *u { struct ohci_softc *sc = OHCI_BUS2SC(udev->bus); struct usb_xfer *xfer; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; ohci_ed_t *ed; DPRINTF("\n"); @@ -2720,7 +2720,7 @@ ohci_set_hw_power(struct usb_bus *bus) return; } -struct usb_bus_methods ohci_bus_methods = +static const struct usb_bus_methods ohci_bus_methods = { .endpoint_init = ohci_ep_init, .xfer_setup = ohci_xfer_setup, Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/uhci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -151,11 +151,11 @@ struct uhci_std_temp { uint8_t last_frame; }; -extern struct usb_bus_methods uhci_bus_methods; -extern struct usb_pipe_methods uhci_device_bulk_methods; -extern struct usb_pipe_methods uhci_device_ctrl_methods; -extern struct usb_pipe_methods uhci_device_intr_methods; -extern struct usb_pipe_methods uhci_device_isoc_methods; +static const struct usb_bus_methods uhci_bus_methods; +static const struct usb_pipe_methods uhci_device_bulk_methods; +static const struct usb_pipe_methods uhci_device_ctrl_methods; +static const struct usb_pipe_methods uhci_device_intr_methods; +static const struct usb_pipe_methods uhci_device_isoc_methods; static uint8_t uhci_restart(uhci_softc_t *sc); static void uhci_do_poll(struct usb_bus *); @@ -1840,7 +1840,7 @@ uhci_setup_standard_chain(struct usb_xfe static void uhci_device_done(struct usb_xfer *xfer, usb_error_t error) { - struct usb_pipe_methods *methods = xfer->endpoint->methods; + const struct usb_pipe_methods *methods = xfer->endpoint->methods; uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus); uhci_qh_t *qh; @@ -1935,7 +1935,7 @@ uhci_device_bulk_start(struct usb_xfer * uhci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods uhci_device_bulk_methods = +static const struct usb_pipe_methods uhci_device_bulk_methods = { .open = uhci_device_bulk_open, .close = uhci_device_bulk_close, @@ -1997,7 +1997,7 @@ uhci_device_ctrl_start(struct usb_xfer * uhci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods uhci_device_ctrl_methods = +static const struct usb_pipe_methods uhci_device_ctrl_methods = { .open = uhci_device_ctrl_open, .close = uhci_device_ctrl_close, @@ -2084,7 +2084,7 @@ uhci_device_intr_start(struct usb_xfer * uhci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods uhci_device_intr_methods = +static const struct usb_pipe_methods uhci_device_intr_methods = { .open = uhci_device_intr_open, .close = uhci_device_intr_close, @@ -2292,7 +2292,7 @@ uhci_device_isoc_start(struct usb_xfer * uhci_transfer_intr_enqueue(xfer); } -struct usb_pipe_methods uhci_device_isoc_methods = +static const struct usb_pipe_methods uhci_device_isoc_methods = { .open = uhci_device_isoc_open, .close = uhci_device_isoc_close, @@ -3076,7 +3076,7 @@ uhci_device_resume(struct usb_device *ud { struct uhci_softc *sc = UHCI_BUS2SC(udev->bus); struct usb_xfer *xfer; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; uhci_qh_t *qh; DPRINTF("\n"); @@ -3118,7 +3118,7 @@ uhci_device_suspend(struct usb_device *u { struct uhci_softc *sc = UHCI_BUS2SC(udev->bus); struct usb_xfer *xfer; - struct usb_pipe_methods *methods; + const struct usb_pipe_methods *methods; uhci_qh_t *qh; DPRINTF("\n"); @@ -3213,7 +3213,7 @@ uhci_set_hw_power(struct usb_bus *bus) } -struct usb_bus_methods uhci_bus_methods = +static const struct usb_bus_methods uhci_bus_methods = { .endpoint_init = uhci_ep_init, .xfer_setup = uhci_xfer_setup, Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/uss820dci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -94,11 +94,11 @@ SYSCTL_INT(_hw_usb_uss820dci, OID_AUTO, /* prototypes */ -struct usb_bus_methods uss820dci_bus_methods; -struct usb_pipe_methods uss820dci_device_bulk_methods; -struct usb_pipe_methods uss820dci_device_ctrl_methods; -struct usb_pipe_methods uss820dci_device_intr_methods; -struct usb_pipe_methods uss820dci_device_isoc_fs_methods; +static const struct usb_bus_methods uss820dci_bus_methods; +static const struct usb_pipe_methods uss820dci_device_bulk_methods; +static const struct usb_pipe_methods uss820dci_device_ctrl_methods; +static const struct usb_pipe_methods uss820dci_device_intr_methods; +static const struct usb_pipe_methods uss820dci_device_isoc_fs_methods; static uss820dci_cmd_t uss820dci_setup_rx; static uss820dci_cmd_t uss820dci_data_rx; @@ -1571,7 +1571,7 @@ uss820dci_device_bulk_start(struct usb_x uss820dci_start_standard_chain(xfer); } -struct usb_pipe_methods uss820dci_device_bulk_methods = +static const struct usb_pipe_methods uss820dci_device_bulk_methods = { .open = uss820dci_device_bulk_open, .close = uss820dci_device_bulk_close, @@ -1608,7 +1608,7 @@ uss820dci_device_ctrl_start(struct usb_x uss820dci_start_standard_chain(xfer); } -struct usb_pipe_methods uss820dci_device_ctrl_methods = +static const struct usb_pipe_methods uss820dci_device_ctrl_methods = { .open = uss820dci_device_ctrl_open, .close = uss820dci_device_ctrl_close, @@ -1645,7 +1645,7 @@ uss820dci_device_intr_start(struct usb_x uss820dci_start_standard_chain(xfer); } -struct usb_pipe_methods uss820dci_device_intr_methods = +static const struct usb_pipe_methods uss820dci_device_intr_methods = { .open = uss820dci_device_intr_open, .close = uss820dci_device_intr_close, @@ -1727,7 +1727,7 @@ uss820dci_device_isoc_fs_start(struct us uss820dci_start_standard_chain(xfer); } -struct usb_pipe_methods uss820dci_device_isoc_fs_methods = +static const struct usb_pipe_methods uss820dci_device_isoc_fs_methods = { .open = uss820dci_device_isoc_fs_open, .close = uss820dci_device_isoc_fs_close, @@ -2376,7 +2376,7 @@ uss820dci_set_hw_power_sleep(struct usb_ } } -struct usb_bus_methods uss820dci_bus_methods = +static const struct usb_bus_methods uss820dci_bus_methods = { .endpoint_init = &uss820dci_ep_init, .xfer_setup = &uss820dci_xfer_setup, Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/controller/xhci.c Wed Dec 11 13:20:32 2013 (r259218) @@ -160,7 +160,7 @@ static void xhci_ctx_set_le64(struct xhc static uint64_t xhci_ctx_get_le64(struct xhci_softc *sc, volatile uint64_t *ptr); #endif -extern struct usb_bus_methods xhci_bus_methods; +static const struct usb_bus_methods xhci_bus_methods; #ifdef USB_DEBUG static void @@ -3069,7 +3069,7 @@ xhci_device_generic_start(struct usb_xfe usbd_transfer_timeout_ms(xfer, &xhci_timeout, xfer->timeout); } -struct usb_pipe_methods xhci_device_generic_methods = +static const struct usb_pipe_methods xhci_device_generic_methods = { .open = xhci_device_generic_open, .close = xhci_device_generic_close, @@ -4235,7 +4235,7 @@ xhci_set_endpoint_mode(struct usb_device } } -struct usb_bus_methods xhci_bus_methods = { +static const struct usb_bus_methods xhci_bus_methods = { .endpoint_init = xhci_ep_init, .endpoint_uninit = xhci_ep_uninit, .xfer_setup = xhci_xfer_setup, Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/template/usb_template.c Wed Dec 11 13:20:32 2013 (r259218) @@ -846,7 +846,7 @@ usb_hw_ep_resolve(struct usb_device *ude struct usb_hw_ep_scratch *ues; struct usb_hw_ep_scratch_sub *ep; const struct usb_hw_ep_profile *pf; - struct usb_bus_methods *methods; + const struct usb_bus_methods *methods; struct usb_device_descriptor *dd; uint16_t mps; Modified: head/sys/dev/usb/usb_bus.h ============================================================================== --- head/sys/dev/usb/usb_bus.h Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/usb_bus.h Wed Dec 11 13:20:32 2013 (r259218) @@ -97,7 +97,7 @@ struct usb_bus { struct usb_dma_parent_tag dma_parent_tag[1]; struct usb_dma_tag dma_tags[USB_BUS_DMA_TAG_MAX]; #endif - struct usb_bus_methods *methods; /* filled by HC driver */ + const struct usb_bus_methods *methods; /* filled by HC driver */ struct usb_device **devices; struct ifnet *ifp; /* only for USB Packet Filter */ Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/usb_device.c Wed Dec 11 13:20:32 2013 (r259218) @@ -376,7 +376,7 @@ usb_init_endpoint(struct usb_device *ude struct usb_endpoint_ss_comp_descriptor *ecomp, struct usb_endpoint *ep) { - struct usb_bus_methods *methods; + const struct usb_bus_methods *methods; usb_stream_t x; methods = udev->bus->methods; Modified: head/sys/dev/usb/usb_device.h ============================================================================== --- head/sys/dev/usb/usb_device.h Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/usb_device.h Wed Dec 11 13:20:32 2013 (r259218) @@ -139,7 +139,7 @@ struct usb_hw_ep_scratch { struct usb_hw_ep_scratch_sub *ep_max; struct usb_config_descriptor *cd; struct usb_device *udev; - struct usb_bus_methods *methods; + const struct usb_bus_methods *methods; uint8_t bmOutAlloc[(USB_EP_MAX + 15) / 16]; uint8_t bmInAlloc[(USB_EP_MAX + 15) / 16]; }; Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/usb_hub.c Wed Dec 11 13:20:32 2013 (r259218) @@ -2541,7 +2541,7 @@ usbd_set_power_mode(struct usb_device *u uint8_t usbd_filter_power_mode(struct usb_device *udev, uint8_t power_mode) { - struct usb_bus_methods *mtod; + const struct usb_bus_methods *mtod; int8_t temp; mtod = udev->bus->methods; Modified: head/sys/dev/usb/usb_transfer.c ============================================================================== --- head/sys/dev/usb/usb_transfer.c Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/usb_transfer.c Wed Dec 11 13:20:32 2013 (r259218) @@ -160,7 +160,7 @@ usbd_update_max_frame_size(struct usb_xf usb_timeout_t usbd_get_dma_delay(struct usb_device *udev) { - struct usb_bus_methods *mtod; + const struct usb_bus_methods *mtod; uint32_t temp; mtod = udev->bus->methods; Modified: head/sys/dev/usb/usbdi.h ============================================================================== --- head/sys/dev/usb/usbdi.h Wed Dec 11 08:46:18 2013 (r259217) +++ head/sys/dev/usb/usbdi.h Wed Dec 11 13:20:32 2013 (r259218) @@ -140,7 +140,7 @@ struct usb_endpoint { struct usb_endpoint_descriptor *edesc; struct usb_endpoint_ss_comp_descriptor *ecomp; - struct usb_pipe_methods *methods; /* set by HC driver */ + const struct usb_pipe_methods *methods; /* set by HC driver */ uint16_t isoc_next; From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 14:54:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C238B14; Wed, 11 Dec 2013 14:54:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18EEE1285; Wed, 11 Dec 2013 14:54:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBEswCq013676; Wed, 11 Dec 2013 14:54:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBEswxF013675; Wed, 11 Dec 2013 14:54:58 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312111454.rBBEswxF013675@svn.freebsd.org> From: Eitan Adler Date: Wed, 11 Dec 2013 14:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259219 - head/usr.bin/calendar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 14:54:59 -0000 Author: eadler Date: Wed Dec 11 14:54:58 2013 New Revision: 259219 URL: http://svnweb.freebsd.org/changeset/base/259219 Log: calendar(1): use strlcpy instead of strncpy use strlcpy instead of strncpy which avoids non-null-termination if the string is MAXPATHLEN bytes or longer. Modified: head/usr.bin/calendar/calcpp.c Modified: head/usr.bin/calendar/calcpp.c ============================================================================== --- head/usr.bin/calendar/calcpp.c Wed Dec 11 13:20:32 2013 (r259218) +++ head/usr.bin/calendar/calcpp.c Wed Dec 11 14:54:58 2013 (r259219) @@ -133,7 +133,7 @@ tokenscpp(char *buf, char *string) s = p; while(!isspace((unsigned char)*p)) p++; - strncpy(string, s, MAXPATHLEN); + strlcpy(string, s, MAXPATHLEN); return(T_DEFINE); } else if ((p = strstr(buf, "#ifndef")) != NULL) { p += 8; From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 15:32:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 185A88DD; Wed, 11 Dec 2013 15:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 047EE1637; Wed, 11 Dec 2013 15:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBFWS9U029103; Wed, 11 Dec 2013 15:32:28 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBFWSbS029102; Wed, 11 Dec 2013 15:32:28 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312111532.rBBFWSbS029102@svn.freebsd.org> From: Warner Losh Date: Wed, 11 Dec 2013 15:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259220 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 15:32:29 -0000 Author: imp Date: Wed Dec 11 15:32:28 2013 New Revision: 259220 URL: http://svnweb.freebsd.org/changeset/base/259220 Log: Loose -> Lose so this sentence makes sense. MFC after: 3 days Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Wed Dec 11 14:54:58 2013 (r259219) +++ head/sys/arm/at91/if_ate.c Wed Dec 11 15:32:28 2013 (r259220) @@ -1144,7 +1144,7 @@ atestart_locked(struct ifnet *ifp) /* * There's a small race between the loop in ate_intr finishing * and the check above to see if the packet was finished, as well - * as when atestart gets called via other paths. Loose the race + * as when atestart gets called via other paths. Lose the race * gracefully and free the mbuf... */ if (sc->sent_mbuf[sc->txhead] != NULL) { From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 17:18:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE3BBD8D; Wed, 11 Dec 2013 17:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA5D211FC; Wed, 11 Dec 2013 17:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBHIAYH065187; Wed, 11 Dec 2013 17:18:10 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBHIAgM065186; Wed, 11 Dec 2013 17:18:10 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201312111718.rBBHIAgM065186@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 11 Dec 2013 17:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259221 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 17:18:10 -0000 Author: gnn Date: Wed Dec 11 17:18:10 2013 New Revision: 259221 URL: http://svnweb.freebsd.org/changeset/base/259221 Log: Fix a panic when booting with kernels that have FREEBBSD_COMPAT 4, 5, 6 or 43 by only thunking the data parameter for old ioctls compatability ioctls instead of doing it for all of them. Submitted by: jhb@ Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Wed Dec 11 15:32:28 2013 (r259220) +++ head/sys/dev/vt/vt_core.c Wed Dec 11 17:18:10 2013 (r259221) @@ -1321,9 +1321,12 @@ vtterm_ioctl(struct terminal *tm, u_long case _IO('c', 110): cmd = CONS_SETKBD; break; + default: + goto skip_thunk; } ival = IOCPARM_IVAL(data); data = (caddr_t)&ival; +skip_thunk: #endif switch (cmd) { From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 17:40:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96CE3557; Wed, 11 Dec 2013 17:40:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8384E14C9; Wed, 11 Dec 2013 17:40:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBHea7A073967; Wed, 11 Dec 2013 17:40:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBHeaOP073966; Wed, 11 Dec 2013 17:40:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312111740.rBBHeaOP073966@svn.freebsd.org> From: Alexander Motin Date: Wed, 11 Dec 2013 17:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259222 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 17:40:36 -0000 Author: mav Date: Wed Dec 11 17:40:35 2013 New Revision: 259222 URL: http://svnweb.freebsd.org/changeset/base/259222 Log: Destroy mtx lock when failed to allocate memory during attach. Submitted by: Dmitry Luhtionov MFC after: 2 weeks Modified: head/sys/dev/ahci/ahciem.c Modified: head/sys/dev/ahci/ahciem.c ============================================================================== --- head/sys/dev/ahci/ahciem.c Wed Dec 11 17:18:10 2013 (r259221) +++ head/sys/dev/ahci/ahciem.c Wed Dec 11 17:40:35 2013 (r259222) @@ -85,8 +85,10 @@ ahci_em_attach(device_t dev) mtx_init(&enc->mtx, "AHCI enclosure lock", NULL, MTX_DEF); rid = 0; if (!(enc->r_memc = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE))) + &rid, RF_ACTIVE))) { + mtx_destroy(&enc->mtx); return (ENXIO); + } enc->capsem = ATA_INL(enc->r_memc, 0); rid = 1; if (!(enc->r_memt = bus_alloc_resource_any(dev, SYS_RES_MEMORY, From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 21:19:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 812F3225; Wed, 11 Dec 2013 21:19:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D4B818CB; Wed, 11 Dec 2013 21:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBLJ5TF055408; Wed, 11 Dec 2013 21:19:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBLJ55r055406; Wed, 11 Dec 2013 21:19:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312112119.rBBLJ55r055406@svn.freebsd.org> From: John Baldwin Date: Wed, 11 Dec 2013 21:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259228 - in head/sys/x86: include x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 21:19:05 -0000 Author: jhb Date: Wed Dec 11 21:19:04 2013 New Revision: 259228 URL: http://svnweb.freebsd.org/changeset/base/259228 Log: Use fixed-width types for all fields in MP Table structures and pack all the structures. While here, move a helper struct only used in the kernel parser out of this header since it is not part of the MP specification itself. Modified: head/sys/x86/include/mptable.h head/sys/x86/x86/mptable.c Modified: head/sys/x86/include/mptable.h ============================================================================== --- head/sys/x86/include/mptable.h Wed Dec 11 20:56:23 2013 (r259227) +++ head/sys/x86/include/mptable.h Wed Dec 11 21:19:04 2013 (r259228) @@ -30,47 +30,50 @@ enum busTypes { NOBUS = 0, + CBUS = 1, + CBUSII = 2, EISA = 3, ISA = 6, MCA = 9, PCI = 13, + XPRESS = 18, MAX_BUSTYPE = 18, UNKNOWN_BUSTYPE = 0xff }; /* MP Floating Pointer Structure */ typedef struct MPFPS { - char signature[4]; - u_int32_t pap; - u_char length; - u_char spec_rev; - u_char checksum; - u_char config_type; - u_char mpfb2; - u_char mpfb3; - u_char mpfb4; - u_char mpfb5; -} *mpfps_t; + uint8_t signature[4]; + uint32_t pap; + uint8_t length; + uint8_t spec_rev; + uint8_t checksum; + uint8_t config_type; + uint8_t mpfb2; + uint8_t mpfb3; + uint8_t mpfb4; + uint8_t mpfb5; +} __packed *mpfps_t; #define MPFB2_IMCR_PRESENT 0x80 #define MPFB2_MUL_CLK_SRCS 0x40 /* MP Configuration Table Header */ typedef struct MPCTH { - char signature[4]; - u_short base_table_length; - u_char spec_rev; - u_char checksum; - u_char oem_id[8]; - u_char product_id[12]; - u_int32_t oem_table_pointer; - u_short oem_table_size; - u_short entry_count; - u_int32_t apic_address; - u_short extended_table_length; - u_char extended_table_checksum; - u_char reserved; -} *mpcth_t; + uint8_t signature[4]; + uint16_t base_table_length; + uint8_t spec_rev; + uint8_t checksum; + uint8_t oem_id[8]; + uint8_t product_id[12]; + uint32_t oem_table_pointer; + uint16_t oem_table_size; + uint16_t entry_count; + uint32_t apic_address; + uint16_t extended_table_length; + uint8_t extended_table_checksum; + uint8_t reserved; +} __packed *mpcth_t; /* Base table entries */ @@ -81,44 +84,44 @@ typedef struct MPCTH { #define MPCT_ENTRY_LOCAL_INT 4 typedef struct PROCENTRY { - u_char type; - u_char apic_id; - u_char apic_version; - u_char cpu_flags; - u_int32_t cpu_signature; - u_int32_t feature_flags; - u_int32_t reserved1; - u_int32_t reserved2; -} *proc_entry_ptr; + uint8_t type; + uint8_t apic_id; + uint8_t apic_version; + uint8_t cpu_flags; + uint32_t cpu_signature; + uint32_t feature_flags; + uint32_t reserved1; + uint32_t reserved2; +} __packed *proc_entry_ptr; #define PROCENTRY_FLAG_EN 0x01 #define PROCENTRY_FLAG_BP 0x02 typedef struct BUSENTRY { - u_char type; - u_char bus_id; - char bus_type[6]; -} *bus_entry_ptr; + uint8_t type; + uint8_t bus_id; + uint8_t bus_type[6]; +} __packed *bus_entry_ptr; typedef struct IOAPICENTRY { - u_char type; - u_char apic_id; - u_char apic_version; - u_char apic_flags; - u_int32_t apic_address; -} *io_apic_entry_ptr; + uint8_t type; + uint8_t apic_id; + uint8_t apic_version; + uint8_t apic_flags; + uint32_t apic_address; +} __packed *io_apic_entry_ptr; #define IOAPICENTRY_FLAG_EN 0x01 typedef struct INTENTRY { - u_char type; - u_char int_type; - u_short int_flags; - u_char src_bus_id; - u_char src_bus_irq; - u_char dst_apic_id; - u_char dst_apic_int; -} *int_entry_ptr; + uint8_t type; + uint8_t int_type; + uint16_t int_flags; + uint8_t src_bus_id; + uint8_t src_bus_irq; + uint8_t dst_apic_id; + uint8_t dst_apic_int; +} __packed *int_entry_ptr; #define INTENTRY_TYPE_INT 0 #define INTENTRY_TYPE_NMI 1 @@ -137,45 +140,45 @@ typedef struct INTENTRY { /* Extended table entries */ typedef struct EXTENTRY { - u_char type; - u_char length; -} *ext_entry_ptr; + uint8_t type; + uint8_t length; +} __packed *ext_entry_ptr; #define MPCT_EXTENTRY_SAS 0x80 #define MPCT_EXTENTRY_BHD 0x81 #define MPCT_EXTENTRY_CBASM 0x82 typedef struct SASENTRY { - u_char type; - u_char length; - u_char bus_id; - u_char address_type; + uint8_t type; + uint8_t length; + uint8_t bus_id; + uint8_t address_type; uint64_t address_base; uint64_t address_length; -} __attribute__((__packed__)) *sas_entry_ptr; +} __packed *sas_entry_ptr; #define SASENTRY_TYPE_IO 0 #define SASENTRY_TYPE_MEMORY 1 #define SASENTRY_TYPE_PREFETCH 2 typedef struct BHDENTRY { - u_char type; - u_char length; - u_char bus_id; - u_char bus_info; - u_char parent_bus; - u_char reserved[3]; -} *bhd_entry_ptr; + uint8_t type; + uint8_t length; + uint8_t bus_id; + uint8_t bus_info; + uint8_t parent_bus; + uint8_t reserved[3]; +} __packed *bhd_entry_ptr; #define BHDENTRY_INFO_SUBTRACTIVE_DECODE 0x1 typedef struct CBASMENTRY { - u_char type; - u_char length; - u_char bus_id; - u_char address_mod; - u_int predefined_range; -} *cbasm_entry_ptr; + uint8_t type; + uint8_t length; + uint8_t bus_id; + uint8_t address_mod; + uint32_t predefined_range; +} __packed *cbasm_entry_ptr; #define CBASMENTRY_ADDRESS_MOD_ADD 0x0 #define CBASMENTRY_ADDRESS_MOD_SUBTRACT 0x1 @@ -183,13 +186,6 @@ typedef struct CBASMENTRY { #define CBASMENTRY_RANGE_ISA_IO 0 #define CBASMENTRY_RANGE_VGA_IO 1 -/* descriptions of MP table entries */ -typedef struct BASETABLE_ENTRY { - u_char type; - u_char length; - char name[16]; -} basetable_entry; - #ifdef _KERNEL struct mptable_hostb_softc { #ifdef NEW_PCIB Modified: head/sys/x86/x86/mptable.c ============================================================================== --- head/sys/x86/x86/mptable.c Wed Dec 11 20:56:23 2013 (r259227) +++ head/sys/x86/x86/mptable.c Wed Dec 11 21:19:04 2013 (r259228) @@ -78,6 +78,13 @@ __FBSDID("$FreeBSD$"); typedef void mptable_entry_handler(u_char *entry, void *arg); typedef void mptable_extended_entry_handler(ext_entry_ptr entry, void *arg); +/* descriptions of MP table entries */ +typedef struct BASETABLE_ENTRY { + uint8_t type; + uint8_t length; + uint8_t name[16]; +} basetable_entry; + static basetable_entry basetable_entry_types[] = { {0, 20, "Processor"}, From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 21:21:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 061414F7; Wed, 11 Dec 2013 21:21:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E58A51940; Wed, 11 Dec 2013 21:21:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBLL3FG058099; Wed, 11 Dec 2013 21:21:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBLL3Hr058098; Wed, 11 Dec 2013 21:21:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312112121.rBBLL3Hr058098@svn.freebsd.org> From: John Baldwin Date: Wed, 11 Dec 2013 21:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259229 - head/usr.sbin/mptable X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 21:21:04 -0000 Author: jhb Date: Wed Dec 11 21:21:03 2013 New Revision: 259229 URL: http://svnweb.freebsd.org/changeset/base/259229 Log: - Use instead of duplicating its definitions. - Switch to mmaping the table from RAM instead of reading it out of /dev/mem via read(2). Modified: head/usr.sbin/mptable/mptable.c Modified: head/usr.sbin/mptable/mptable.c ============================================================================== --- head/usr.sbin/mptable/mptable.c Wed Dec 11 21:19:04 2013 (r259228) +++ head/usr.sbin/mptable/mptable.c Wed Dec 11 21:21:03 2013 (r259229) @@ -43,9 +43,12 @@ static const char rcsid[] = #define OEM_PROCESSING_READY_NOT #include +#include +#include #include #include #include +#include #include #include #include @@ -74,23 +77,8 @@ static const char rcsid[] = #define GROPE_AREA2 0x90000 #define GROPE_SIZE 0x10000 -#define PROCENTRY_FLAG_EN 0x01 -#define PROCENTRY_FLAG_BP 0x02 -#define IOAPICENTRY_FLAG_EN 0x01 - #define MAXPNSTR 132 -enum busTypes { - CBUS = 1, - CBUSII = 2, - EISA = 3, - ISA = 6, - PCI = 13, - XPRESS = 18, - MAX_BUSTYPE = 18, - UNKNOWN_BUSTYPE = 0xff -}; - typedef struct BUSTYPENAME { u_char type; char name[ 7 ]; @@ -129,140 +117,25 @@ static const char *whereStrings[] = { "GROPE AREA #2" }; -typedef struct TABLE_ENTRY { - u_char type; - u_char length; - char name[ 32 ]; -} tableEntry; - -static const tableEntry extendedtableEntryTypes[] = -{ - { 128, 20, "System Address Space" }, - { 129, 8, "Bus Hierarchy" }, - { 130, 8, "Compatibility Bus Address" } -}; - -/* MP Floating Pointer Structure */ -typedef struct MPFPS { - char signature[ 4 ]; - u_int32_t pap; - u_char length; - u_char spec_rev; - u_char checksum; - u_char mpfb1; - u_char mpfb2; - u_char mpfb3; - u_char mpfb4; - u_char mpfb5; -} mpfps_t; - -/* MP Configuration Table Header */ -typedef struct MPCTH { - char signature[ 4 ]; - u_short base_table_length; - u_char spec_rev; - u_char checksum; - u_char oem_id[ 8 ]; - u_char product_id[ 12 ]; - u_int32_t oem_table_pointer; - u_short oem_table_size; - u_short entry_count; - u_int32_t apic_address; - u_short extended_table_length; - u_char extended_table_checksum; - u_char reserved; -} mpcth_t; - - -typedef struct PROCENTRY { - u_char type; - u_char apicID; - u_char apicVersion; - u_char cpuFlags; - u_int32_t cpuSignature; - u_int32_t featureFlags; - u_int32_t reserved1; - u_int32_t reserved2; -} ProcEntry; - -typedef struct BUSENTRY { - u_char type; - u_char busID; - char busType[ 6 ]; -} BusEntry; - -typedef struct IOAPICENTRY { - u_char type; - u_char apicID; - u_char apicVersion; - u_char apicFlags; - u_int32_t apicAddress; -} IOApicEntry; - -typedef struct INTENTRY { - u_char type; - u_char intType; - u_short intFlags; - u_char srcBusID; - u_char srcBusIRQ; - u_char dstApicID; - u_char dstApicINT; -} IntEntry; - - -/* - * extended entry type structures - */ - -typedef struct SASENTRY { - u_char type; - u_char length; - u_char busID; - u_char addressType; - u_int64_t addressBase; - u_int64_t addressLength; -} __attribute__((__packed__)) SasEntry; - - -typedef struct BHDENTRY { - u_char type; - u_char length; - u_char busID; - u_char busInfo; - u_char busParent; - u_char reserved[ 3 ]; -} BhdEntry; - - -typedef struct CBASMENTRY { - u_char type; - u_char length; - u_char busID; - u_char addressMod; - u_int predefinedRange; -} CbasmEntry; - - - static void apic_probe( u_int32_t* paddr, int* where ); static void MPConfigDefault( int featureByte ); -static void MPFloatingPointer( u_int32_t paddr, int where, mpfps_t* mpfps ); +static void MPFloatingPointer( u_int32_t paddr, int where, mpfps_t* mpfpsp ); static void MPConfigTableHeader( u_int32_t pap ); -static int readType( void ); static void seekEntry( u_int32_t addr ); static void readEntry( void* entry, int size ); +static void *mapEntry( u_int32_t addr, int size ); -static void processorEntry( void ); -static void busEntry( void ); -static void ioApicEntry( void ); -static void intEntry( void ); - -static void sasEntry( void ); -static void bhdEntry( void ); -static void cbasmEntry( void ); +static void processorEntry( proc_entry_ptr entry ); +static void busEntry( bus_entry_ptr entry ); +static void ioApicEntry( io_apic_entry_ptr entry ); +static void intEntry( int_entry_ptr entry ); + +static void sasEntry( sas_entry_ptr entry ); +static void bhdEntry( bhd_entry_ptr entry ); +static void cbasmEntry( cbasm_entry_ptr entry ); static void doDmesg( void ); static void pnstr( char* s, int c ); @@ -360,10 +233,10 @@ main( int argc, char *argv[] ) puts( SEP_LINE ); /* check whether an MP config table exists */ - if ( (defaultConfig = mpfps.mpfb1) ) + if ( (defaultConfig = mpfps->config_type) ) MPConfigDefault( defaultConfig ); else - MPConfigTableHeader( mpfps.pap ); + MPConfigTableHeader( mpfps->pap ); /* do a dmesg output */ if ( dmesg ) @@ -524,12 +397,12 @@ apic_probe( u_int32_t* paddr, int* where * */ static void -MPFloatingPointer( u_int32_t paddr, int where, mpfps_t* mpfps ) +MPFloatingPointer( u_int32_t paddr, int where, mpfps_t* mpfpsp ) { - - /* read in mpfps structure*/ - seekEntry( paddr ); - readEntry( mpfps, sizeof( mpfps_t ) ); + mpfps_t mpfps; + + /* map in mpfps structure*/ + *mpfpsp = mpfps = mapEntry( paddr, sizeof( mpfps ) ); /* show its contents */ printf( "MP Floating Pointer Structure:\n\n" ); @@ -576,7 +449,7 @@ MPFloatingPointer( u_int32_t paddr, int } /* bit 7 is IMCRP */ - printf( " mode:\t\t\t\t%s\n", (mpfps->mpfb2 & 0x80) ? + printf( " mode:\t\t\t\t%s\n", (mpfps->mpfb2 & MPFB2_IMCR_PRESENT) ? "PIC" : "Virtual Wire" ); /* MP feature bytes 3-5 are expected to be ZERO */ @@ -652,59 +525,53 @@ MPConfigDefault( int featureByte ) static void MPConfigTableHeader( u_int32_t pap ) { - u_int32_t paddr; mpcth_t cth; int x; int totalSize; - int count, c; - int type; + int c; int oldtype, entrytype; + u_int8_t *entry; if ( pap == 0 ) { printf( "MP Configuration Table Header MISSING!\n" ); exit( 1 ); } - /* convert physical address to virtual address */ - paddr = pap; - - /* read in cth structure */ - seekEntry( paddr ); - readEntry( &cth, sizeof( cth ) ); + /* map in cth structure */ + cth = mapEntry( pap, sizeof( *cth ) ); printf( "MP Config Table Header:\n\n" ); printf( " physical address:\t\t0x%08x\n", pap ); printf( " signature:\t\t\t'" ); - pnstr( cth.signature, 4 ); + pnstr( cth->signature, 4 ); printf( "'\n" ); - printf( " base table length:\t\t%d\n", cth.base_table_length ); + printf( " base table length:\t\t%d\n", cth->base_table_length ); - printf( " version:\t\t\t1.%1d\n", cth.spec_rev ); - printf( " checksum:\t\t\t0x%02x\n", cth.checksum ); + printf( " version:\t\t\t1.%1d\n", cth->spec_rev ); + printf( " checksum:\t\t\t0x%02x\n", cth->checksum ); printf( " OEM ID:\t\t\t'" ); - pnstr( cth.oem_id, 8 ); + pnstr( cth->oem_id, 8 ); printf( "'\n" ); printf( " Product ID:\t\t\t'" ); - pnstr( cth.product_id, 12 ); + pnstr( cth->product_id, 12 ); printf( "'\n" ); - printf( " OEM table pointer:\t\t0x%08x\n", cth.oem_table_pointer ); - printf( " OEM table size:\t\t%d\n", cth.oem_table_size ); + printf( " OEM table pointer:\t\t0x%08x\n", cth->oem_table_pointer ); + printf( " OEM table size:\t\t%d\n", cth->oem_table_size ); - printf( " entry count:\t\t\t%d\n", cth.entry_count ); + printf( " entry count:\t\t\t%d\n", cth->entry_count ); - printf( " local APIC address:\t\t0x%08x\n", cth.apic_address ); + printf( " local APIC address:\t\t0x%08x\n", cth->apic_address ); - printf( " extended table length:\t%d\n", cth.extended_table_length ); - printf( " extended table checksum:\t%d\n", cth.extended_table_checksum ); + printf( " extended table length:\t%d\n", cth->extended_table_length ); + printf( " extended table checksum:\t%d\n", cth->extended_table_checksum ); - totalSize = cth.base_table_length - sizeof( struct MPCTH ); - count = cth.entry_count; + totalSize = cth->base_table_length - sizeof( struct MPCTH ); puts( SEP_LINE ); @@ -723,101 +590,99 @@ MPConfigTableHeader( u_int32_t pap ) nintr = 0; oldtype = -1; - for (c = count; c; c--) { - entrytype = readType(); + entry = mapEntry(pap + sizeof(*cth), cth->base_table_length); + for (c = cth->entry_count; c; c--) { + entrytype = *entry; if (entrytype != oldtype) printf("--\n"); if (entrytype < oldtype) printf("MPTABLE OUT OF ORDER!\n"); switch (entrytype) { - case 0: - if (oldtype != 0) + case MPCT_ENTRY_PROCESSOR: + if (oldtype != MPCT_ENTRY_PROCESSOR) printf( "Processors:\tAPIC ID\tVersion\tState" "\t\tFamily\tModel\tStep\tFlags\n" ); - oldtype = 0; - processorEntry(); + processorEntry((proc_entry_ptr)entry); + entry += sizeof(struct PROCENTRY); break; - case 1: - if (oldtype != 1) + case MPCT_ENTRY_BUS: + if (oldtype != MPCT_ENTRY_BUS) printf( "Bus:\t\tBus ID\tType\n" ); - oldtype = 1; - busEntry(); + busEntry((bus_entry_ptr)entry); + entry += sizeof(struct BUSENTRY); break; - case 2: - if (oldtype != 2) + case MPCT_ENTRY_IOAPIC: + if (oldtype != MPCT_ENTRY_IOAPIC) printf( "I/O APICs:\tAPIC ID\tVersion\tState\t\tAddress\n" ); - oldtype = 2; - ioApicEntry(); + ioApicEntry((io_apic_entry_ptr)entry); + entry += sizeof(struct IOAPICENTRY); break; - case 3: - if (oldtype != 3) + case MPCT_ENTRY_INT: + if (oldtype != MPCT_ENTRY_INT) printf( "I/O Ints:\tType\tPolarity Trigger\tBus ID\t IRQ\tAPIC ID\tPIN#\n" ); - oldtype = 3; - intEntry(); + intEntry((int_entry_ptr)entry); + entry += sizeof(struct INTENTRY); break; - case 4: - if (oldtype != 4) + case MPCT_ENTRY_LOCAL_INT: + if (oldtype != MPCT_ENTRY_LOCAL_INT) printf( "Local Ints:\tType\tPolarity Trigger\tBus ID\t IRQ\tAPIC ID\tPIN#\n" ); - oldtype = 4; - intEntry(); + intEntry((int_entry_ptr)entry); + entry += sizeof(struct INTENTRY); break; default: printf("MPTABLE HOSED! record type = %d\n", entrytype); exit(1); } + oldtype = entrytype; } #if defined( EXTENDED_PROCESSING_READY ) /* process any extended data */ - if ( (totalSize = cth.extended_table_length) ) { + if ( cth->extended_table_length ) { + ext_entry_ptr ext_entry, end; + puts( SEP_LINE ); printf( "MP Config Extended Table Entries:\n\n" ); - while ( totalSize > 0 ) { - switch ( type = readType() ) { - case 128: - sasEntry(); + ext_entry = mapEntry(pap + cth->base_table_length, + cth->extended_table_length); + end = (ext_entry_ptr)((char *)ext_entry + cth->extended_table_length); + while (ext_entry < end) { + switch (ext_entry->type) { + case MPCT_EXTENTRY_SAS: + sasEntry((sas_entry_ptr)ext_entry); break; - case 129: - bhdEntry(); + case MPCT_EXTENTRY_BHD: + bhdEntry((bhd_entry_ptr)ext_entry); break; - case 130: - cbasmEntry(); + case MPCT_EXTENTRY_CBASM: + cbasmEntry((cbasm_entry_ptr)ext_entry); break; default: printf( "Extended Table HOSED!\n" ); exit( 1 ); } - totalSize -= extendedtableEntryTypes[ type-128 ].length; + ext_entry = (ext_entry_ptr)((char *)ext_entry + ext_entry->length); } } #endif /* EXTENDED_PROCESSING_READY */ /* process any OEM data */ - if ( cth.oem_table_pointer && (cth.oem_table_size > 0) ) { + if ( cth->oem_table_pointer && (cth->oem_table_size > 0) ) { #if defined( OEM_PROCESSING_READY ) # error your on your own here! - /* convert OEM table pointer to virtual address */ - poemtp = (u_int32_t)cth.oem_table_pointer; - - /* read in oem table structure */ - if ( (oemdata = (void*)malloc( cth.oem_table_size )) == NULL ) - err( 1, "oem malloc" ); - - seekEntry( poemtp ); - readEntry( oemdata, cth.oem_table_size ); + /* map in oem table structure */ + oemdata = mapEntry( cth->oem_table_pointer, cth->oem_table_size); /** process it */ - - free( oemdata ); #else printf( "\nyou need to modify the source to handle OEM data!\n\n" ); #endif /* OEM_PROCESSING_READY */ @@ -828,11 +693,11 @@ MPConfigTableHeader( u_int32_t pap ) #if defined( RAW_DUMP ) { int ofd; - u_char dumpbuf[ 4096 ]; + void *dumpbuf; ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR, 0666 ); - seekEntry( paddr ); - readEntry( dumpbuf, 1024 ); + + dumpbuf = mapEntry( paddr, 1024 ); write( ofd, dumpbuf, 1024 ); close( ofd ); } @@ -843,24 +708,6 @@ MPConfigTableHeader( u_int32_t pap ) /* * */ -static int -readType( void ) -{ - u_char type; - - if ( read( pfd, &type, sizeof( u_char ) ) != sizeof( u_char ) ) - err( 1, "type read; pfd: %d", pfd ); - - if ( lseek( pfd, -1, SEEK_CUR ) < 0 ) - err( 1, "type seek" ); - - return (int)type; -} - - -/* - * - */ static void seekEntry( u_int32_t addr ) { @@ -879,31 +726,37 @@ readEntry( void* entry, int size ) err( 1, "readEntry" ); } +static void * +mapEntry( u_int32_t addr, int size ) +{ + void *p; + + p = mmap( NULL, size, PROT_READ, MAP_SHARED, pfd, addr ); + if (p == MAP_FAILED) + err( 1, "mapEntry" ); + return (p); +} static void -processorEntry( void ) +processorEntry( proc_entry_ptr entry ) { - ProcEntry entry; - - /* read it into local memory */ - readEntry( &entry, sizeof( entry ) ); /* count it */ ++ncpu; - printf( "\t\t%2d", entry.apicID ); - printf( "\t 0x%2x", entry.apicVersion ); + printf( "\t\t%2d", entry->apic_id ); + printf( "\t 0x%2x", entry->apic_version ); printf( "\t %s, %s", - (entry.cpuFlags & PROCENTRY_FLAG_BP) ? "BSP" : "AP", - (entry.cpuFlags & PROCENTRY_FLAG_EN) ? "usable" : "unusable" ); + (entry->cpu_flags & PROCENTRY_FLAG_BP) ? "BSP" : "AP", + (entry->cpu_flags & PROCENTRY_FLAG_EN) ? "usable" : "unusable" ); printf( "\t %d\t %d\t %d", - (entry.cpuSignature >> 8) & 0x0f, - (entry.cpuSignature >> 4) & 0x0f, - entry.cpuSignature & 0x0f ); + (entry->cpu_signature >> 8) & 0x0f, + (entry->cpu_signature >> 4) & 0x0f, + entry->cpu_signature & 0x0f ); - printf( "\t 0x%04x\n", entry.featureFlags ); + printf( "\t 0x%04x\n", entry->feature_flags ); } @@ -924,50 +777,42 @@ lookupBusType( char* name ) static void -busEntry( void ) +busEntry( bus_entry_ptr entry ) { int x; char name[ 8 ]; char c; - BusEntry entry; - - /* read it into local memory */ - readEntry( &entry, sizeof( entry ) ); /* count it */ ++nbus; - printf( "\t\t%2d", entry.busID ); - printf( "\t " ); pnstr( entry.busType, 6 ); printf( "\n" ); + printf( "\t\t%2d", entry->bus_id ); + printf( "\t " ); pnstr( entry->bus_type, 6 ); printf( "\n" ); for ( x = 0; x < 6; ++x ) { - if ( (c = entry.busType[ x ]) == ' ' ) + if ( (c = entry->bus_type[ x ]) == ' ' ) break; name[ x ] = c; } name[ x ] = '\0'; - busses[ entry.busID ] = lookupBusType( name ); + busses[ entry->bus_id ] = lookupBusType( name ); } static void -ioApicEntry( void ) +ioApicEntry( io_apic_entry_ptr entry ) { - IOApicEntry entry; - - /* read it into local memory */ - readEntry( &entry, sizeof( entry ) ); /* count it */ ++napic; - printf( "\t\t%2d", entry.apicID ); - printf( "\t 0x%02x", entry.apicVersion ); + printf( "\t\t%2d", entry->apic_id ); + printf( "\t 0x%02x", entry->apic_version ); printf( "\t %s", - (entry.apicFlags & IOAPICENTRY_FLAG_EN) ? "usable" : "unusable" ); - printf( "\t\t 0x%x\n", entry.apicAddress ); + (entry->apic_flags & IOAPICENTRY_FLAG_EN) ? "usable" : "unusable" ); + printf( "\t\t 0x%x\n", entry->apic_address ); - apics[ entry.apicID ] = entry.apicID; + apics[ entry->apic_id ] = entry->apic_id; } @@ -983,53 +828,45 @@ static const char *triggerMode[] = { }; static void -intEntry( void ) +intEntry( int_entry_ptr entry ) { - IntEntry entry; - - /* read it into local memory */ - readEntry( &entry, sizeof( entry ) ); /* count it */ - if ( (int)entry.type == 3 ) + if ( entry->type == MPCT_ENTRY_INT ) ++nintr; - printf( "\t\t%s", intTypes[ (int)entry.intType ] ); + printf( "\t\t%s", intTypes[ entry->int_type ] ); - printf( "\t%9s", polarityMode[ (int)entry.intFlags & 0x03 ] ); - printf( "%12s", triggerMode[ ((int)entry.intFlags >> 2) & 0x03 ] ); + printf( "\t%9s", polarityMode[ entry->int_flags & INTENTRY_FLAGS_POLARITY ] ); + printf( "%12s", triggerMode[ (entry->int_flags & INTENTRY_FLAGS_TRIGGER) >> 2 ] ); - printf( "\t %5d", (int)entry.srcBusID ); - if ( busses[ (int)entry.srcBusID ] == PCI ) + printf( "\t %5d", entry->src_bus_id ); + if ( busses[ entry->src_bus_id ] == PCI ) printf( "\t%2d:%c", - ((int)entry.srcBusIRQ >> 2) & 0x1f, - ((int)entry.srcBusIRQ & 0x03) + 'A' ); + (entry->src_bus_irq >> 2) & 0x1f, + (entry->src_bus_irq & 0x03) + 'A' ); else - printf( "\t %3d", (int)entry.srcBusIRQ ); - printf( "\t %6d", (int)entry.dstApicID ); - printf( "\t %3d\n", (int)entry.dstApicINT ); + printf( "\t %3d", entry->src_bus_irq ); + printf( "\t %6d", entry->dst_apic_id ); + printf( "\t %3d\n", entry->dst_apic_int ); } static void -sasEntry( void ) +sasEntry( sas_entry_ptr entry ) { - SasEntry entry; - - /* read it into local memory */ - readEntry( &entry, sizeof( entry ) ); - printf( "--\n%s\n", extendedtableEntryTypes[entry.type - 128].name ); - printf( " bus ID: %d", entry.busID ); + printf( "--\nSystem Address Space\n"); + printf( " bus ID: %d", entry->bus_id ); printf( " address type: " ); - switch ( entry.addressType ) { - case 0: + switch ( entry->address_type ) { + case SASENTRY_TYPE_IO: printf( "I/O address\n" ); break; - case 1: + case SASENTRY_TYPE_MEMORY: printf( "memory address\n" ); break; - case 2: + case SASENTRY_TYPE_PREFETCH: printf( "prefetch address\n" ); break; default: @@ -1037,39 +874,32 @@ sasEntry( void ) break; } - printf( " address base: 0x%llx\n", (long long)entry.addressBase ); - printf( " address range: 0x%llx\n", (long long)entry.addressLength ); + printf( " address base: 0x%jx\n", (uintmax_t)entry->address_base ); + printf( " address range: 0x%jx\n", (uintmax_t)entry->address_length ); } static void -bhdEntry( void ) +bhdEntry( bhd_entry_ptr entry ) { - BhdEntry entry; - - /* read it into local memory */ - readEntry( &entry, sizeof( entry ) ); - printf( "--\n%s\n", extendedtableEntryTypes[entry.type - 128].name ); - printf( " bus ID: %d", entry.busID ); - printf( " bus info: 0x%02x", entry.busInfo ); - printf( " parent bus ID: %d\n", entry.busParent ); + printf( "--\nBus Hierarchy\n" ); + printf( " bus ID: %d", entry->bus_id ); + printf( " bus info: 0x%02x", entry->bus_info ); + printf( " parent bus ID: %d\n", entry->parent_bus ); } static void -cbasmEntry( void ) +cbasmEntry( cbasm_entry_ptr entry ) { - CbasmEntry entry; - - /* read it into local memory */ - readEntry( &entry, sizeof( entry ) ); - printf( "--\n%s\n", extendedtableEntryTypes[entry.type - 128].name ); - printf( " bus ID: %d", entry.busID ); - printf( " address modifier: %s\n", (entry.addressMod & 0x01) ? - "subtract" : "add" ); - printf( " predefined range: 0x%08x\n", entry.predefinedRange ); + printf( "--\nCompatibility Bus Address\n" ); + printf( " bus ID: %d", entry->bus_id ); + printf( " address modifier: %s\n", + (entry->address_mod & CBASMENTRY_ADDRESS_MOD_SUBTRACT) ? + "subtract" : "add" ); + printf( " predefined range: 0x%08x\n", entry->predefined_range ); } From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 21:48:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39FA8FAB; Wed, 11 Dec 2013 21:48:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2694B1B2E; Wed, 11 Dec 2013 21:48:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBLm5dA066055; Wed, 11 Dec 2013 21:48:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBLm5vP066054; Wed, 11 Dec 2013 21:48:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312112148.rBBLm5vP066054@svn.freebsd.org> From: Alexander Motin Date: Wed, 11 Dec 2013 21:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259232 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 21:48:05 -0000 Author: mav Date: Wed Dec 11 21:48:04 2013 New Revision: 259232 URL: http://svnweb.freebsd.org/changeset/base/259232 Log: Create own free list for each of the first 32 possible allocation sizes. In case of 4K allocation quantum that means for allocations up to 128K. With growth of memory fragmentation these lists may grow to quite a large sizes (tenths and hundreds of thousands items). Having in one list items of different sizes in worst case may require full linear list traversal, that may be very expensive. Having lists for items of single size means that unless user specify some alignment or border requirements (that are very rare cases) first item found on the list should satisfy the request. While running SPEC NFS benchmark on top of ZFS on 24-core machine with 84GB RAM this change reduces CPU time spent in vmem_xalloc() from 8% and lock congestion spinning around it from 20% to invisible levels. And that all is by the cost of just 26 more pointers per vmem instance. If at some point our kernel will start to actively use KVA allocations with odd sizes above 128K, something may need to be done to bigger lists also. Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Wed Dec 11 21:41:21 2013 (r259231) +++ head/sys/kern/subr_vmem.c Wed Dec 11 21:48:04 2013 (r259232) @@ -70,7 +70,10 @@ __FBSDID("$FreeBSD$"); #include #include -#define VMEM_MAXORDER (sizeof(vmem_size_t) * NBBY) +#define VMEM_OPTORDER 5 +#define VMEM_OPTVALUE (1 << VMEM_OPTORDER) +#define VMEM_MAXORDER \ + (VMEM_OPTVALUE - 1 + sizeof(vmem_size_t) * NBBY - VMEM_OPTORDER) #define VMEM_HASHSIZE_MIN 16 #define VMEM_HASHSIZE_MAX 131072 @@ -200,8 +203,10 @@ static LIST_HEAD(, vmem) vmem_list = LIS #define VMEM_CROSS_P(addr1, addr2, boundary) \ ((((addr1) ^ (addr2)) & -(boundary)) != 0) -#define ORDER2SIZE(order) ((vmem_size_t)1 << (order)) -#define SIZE2ORDER(size) ((int)flsl(size) - 1) +#define ORDER2SIZE(order) ((order) < VMEM_OPTVALUE ? ((order) + 1) : \ + (vmem_size_t)1 << ((order) - (VMEM_OPTVALUE - VMEM_OPTORDER - 1))) +#define SIZE2ORDER(size) ((size) <= VMEM_OPTVALUE ? ((size) - 1) : \ + (flsl(size) + (VMEM_OPTVALUE - VMEM_OPTORDER - 2))) /* * Maximum number of boundary tags that may be required to satisfy an @@ -334,11 +339,14 @@ bt_free(vmem_t *vm, bt_t *bt) /* * freelist[0] ... [1, 1] - * freelist[1] ... [2, 3] - * freelist[2] ... [4, 7] - * freelist[3] ... [8, 15] + * freelist[1] ... [2, 2] * : - * freelist[n] ... [(1 << n), (1 << (n + 1)) - 1] + * freelist[29] ... [30, 30] + * freelist[30] ... [31, 31] + * freelist[31] ... [32, 63] + * freelist[33] ... [64, 127] + * : + * freelist[n] ... [(1 << (n - 26)), (1 << (n - 25)) - 1] * : */ @@ -979,6 +987,7 @@ vmem_init(vmem_t *vm, const char *name, int i; MPASS(quantum > 0); + MPASS((quantum & (quantum - 1)) == 0); bzero(vm, sizeof(*vm)); @@ -988,8 +997,7 @@ vmem_init(vmem_t *vm, const char *name, LIST_INIT(&vm->vm_freetags); strlcpy(vm->vm_name, name, sizeof(vm->vm_name)); vm->vm_quantum_mask = quantum - 1; - vm->vm_quantum_shift = SIZE2ORDER(quantum); - MPASS(ORDER2SIZE(vm->vm_quantum_shift) == quantum); + vm->vm_quantum_shift = flsl(quantum) - 1; vm->vm_nbusytag = 0; vm->vm_size = 0; vm->vm_inuse = 0; From owner-svn-src-head@FreeBSD.ORG Wed Dec 11 23:05:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44F98BC4; Wed, 11 Dec 2013 23:05:06 +0000 (UTC) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id EFE2011E4; Wed, 11 Dec 2013 23:05:05 +0000 (UTC) Received: from rnote.ddteam.net (144-60-135-95.pool.ukrtel.net [95.135.60.144]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 05DCCC4927; Thu, 12 Dec 2013 01:04:57 +0200 (EET) Date: Thu, 12 Dec 2013 01:04:43 +0200 From: Aleksandr Rybalko To: "George V. Neville-Neil" , John Baldwin Subject: Re: svn commit: r259221 - head/sys/dev/vt Message-Id: <20131212010443.2ab8e926.ray@freebsd.org> In-Reply-To: <201312111718.rBBHIAgM065186@svn.freebsd.org> References: <201312111718.rBBHIAgM065186@svn.freebsd.org> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 23:05:06 -0000 On Wed, 11 Dec 2013 17:18:10 +0000 (UTC) "George V. Neville-Neil" wrote: > Author: gnn > Date: Wed Dec 11 17:18:10 2013 > New Revision: 259221 > URL: http://svnweb.freebsd.org/changeset/base/259221 > > Log: > Fix a panic when booting with kernels that have FREEBBSD_COMPAT > 4, 5, 6 or 43 by only thunking the data parameter for old ioctls > compatability ioctls instead of doing it for all of them. > > Submitted by: jhb@ > > Modified: > head/sys/dev/vt/vt_core.c > > Modified: head/sys/dev/vt/vt_core.c > ============================================================================== > --- head/sys/dev/vt/vt_core.c Wed Dec 11 15:32:28 2013 > (r259220) +++ head/sys/dev/vt/vt_core.c Wed Dec 11 17:18:10 > 2013 (r259221) @@ -1321,9 +1321,12 @@ vtterm_ioctl(struct > terminal *tm, u_long case _IO('c', 110): > cmd = CONS_SETKBD; > break; > + default: > + goto skip_thunk; > } > ival = IOCPARM_IVAL(data); > data = (caddr_t)&ival; > +skip_thunk: > #endif > > switch (cmd) { Many thanks George and John! Next time I will just copy old code instead of try to optimize it :-D Thanks! WBW -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 00:27:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83694989; Thu, 12 Dec 2013 00:27:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 55642181F; Thu, 12 Dec 2013 00:27:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC0RNCZ025672; Thu, 12 Dec 2013 00:27:23 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC0RN9k025671; Thu, 12 Dec 2013 00:27:23 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201312120027.rBC0RN9k025671@svn.freebsd.org> From: Alan Somers Date: Thu, 12 Dec 2013 00:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259240 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 00:27:23 -0000 Author: asomers Date: Thu Dec 12 00:27:22 2013 New Revision: 259240 URL: http://svnweb.freebsd.org/changeset/base/259240 Log: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c When a da or ada device dissappears, outstanding IOs fail with ENXIO, not EIO. The check for EIO was probably copied from Illumos, where that is indeed the correct errno. Without this change, pulling a busy drive from a zpool would usually turn it into UNAVAIL, even though pulling an idle drive would turn it into REMOVED. With this change, it is REMOVED every time. Also, vdev_geom_io_intr shouldn't do zfs_post_remove, because that results in devd getting two resource.fs.zfs.removed events. The comment said that the event had to be sent directly instead of through the async removal thread because "the DE engine is using this information to discard prevoius I/O errors". However, the fact that vdev_geom_io_intr was never actually sending the events until now, and that vdev_geom_orphan never sent them at all, and that vdev_geom_orphan usually gets called about 2 seconds after the actual removal, means that FreeBSD's userland can cope with a late event just fine. Approved by: ken (mentor) Sponsored by: Spectra Logic Corporation MFC after: 4 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Dec 12 00:01:45 2013 (r259239) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Dec 12 00:27:22 2013 (r259240) @@ -770,20 +770,12 @@ vdev_geom_io_intr(struct bio *bp) */ vd->vdev_notrim = B_TRUE; } - if (zio->io_error == EIO && !vd->vdev_remove_wanted) { + if (zio->io_error == ENXIO && !vd->vdev_remove_wanted) { /* * If provider's error is set we assume it is being * removed. */ if (bp->bio_to->error != 0) { - /* - * We post the resource as soon as possible, instead of - * when the async removal actually happens, because the - * DE is using this information to discard previous I/O - * errors. - */ - /* XXX: zfs_post_remove() can sleep. */ - zfs_post_remove(zio->io_spa, vd); vd->vdev_remove_wanted = B_TRUE; spa_async_request(zio->io_spa, SPA_ASYNC_REMOVE); } else if (!vd->vdev_delayed_close) { From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 03:04:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C4E1845; Thu, 12 Dec 2013 03:04:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28E521305; Thu, 12 Dec 2013 03:04:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC341x0082629; Thu, 12 Dec 2013 03:04:01 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC340cW082628; Thu, 12 Dec 2013 03:04:00 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201312120304.rBC340cW082628@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 12 Dec 2013 03:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259244 - head/sys/ia64/ia64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 03:04:01 -0000 Author: marcel Date: Thu Dec 12 03:04:00 2013 New Revision: 259244 URL: http://svnweb.freebsd.org/changeset/base/259244 Log: Allow pmap_remove_pages() to be called for physical maps not associated with the current thread. Obtained from: alc@ Modified: head/sys/ia64/ia64/pmap.c Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Thu Dec 12 02:04:59 2013 (r259243) +++ head/sys/ia64/ia64/pmap.c Thu Dec 12 03:04:00 2013 (r259244) @@ -2103,19 +2103,16 @@ pmap_remove_pages(pmap_t pmap) { struct pv_chunk *pc, *npc; struct ia64_lpte *pte; + pmap_t oldpmap; pv_entry_t pv; vm_offset_t va; vm_page_t m; u_long inuse, bitmask; int allfree, bit, field, idx; - if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { - printf("warning: %s called with non-current pmap\n", - __func__); - return; - } rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); + oldpmap = pmap_switch(pmap); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { @@ -2155,8 +2152,9 @@ pmap_remove_pages(pmap_t pmap) free_pv_chunk(pc); } } - rw_wunlock(&pvh_global_lock); + pmap_switch(oldpmap); PMAP_UNLOCK(pmap); + rw_wunlock(&pvh_global_lock); } /* From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 04:12:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89578F92; Thu, 12 Dec 2013 04:12:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2F21750; Thu, 12 Dec 2013 04:12:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC4CKrc007850; Thu, 12 Dec 2013 04:12:20 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC4CJNZ007847; Thu, 12 Dec 2013 04:12:19 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312120412.rBC4CJNZ007847@svn.freebsd.org> From: Justin Hibbits Date: Thu, 12 Dec 2013 04:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259245 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 04:12:20 -0000 Author: jhibbits Date: Thu Dec 12 04:12:19 2013 New Revision: 259245 URL: http://svnweb.freebsd.org/changeset/base/259245 Log: FBT now does work fully on PowerPC. MFC after: 2 weeks Modified: head/sys/powerpc/aim/trap.c head/sys/powerpc/aim/trap_subr32.S head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Thu Dec 12 03:04:00 2013 (r259244) +++ head/sys/powerpc/aim/trap.c Thu Dec 12 04:12:19 2013 (r259245) @@ -297,7 +297,7 @@ trap(struct trapframe *frame) #ifdef KDTRACE_HOOKS case EXC_PGM: if (frame->srr1 & EXC_PGM_TRAP) { - if (*(uintptr_t *)frame->srr0 == 0x7c810808) { + if (*(uint32_t *)frame->srr0 == 0x7c810808) { if (dtrace_invop_jump_addr != NULL) { dtrace_invop_jump_addr(frame); return; Modified: head/sys/powerpc/aim/trap_subr32.S ============================================================================== --- head/sys/powerpc/aim/trap_subr32.S Thu Dec 12 03:04:00 2013 (r259244) +++ head/sys/powerpc/aim/trap_subr32.S Thu Dec 12 04:12:19 2013 (r259245) @@ -883,8 +883,8 @@ CNAME(dblow): mfcr %r29 /* save CR in r29 */ mfsrr1 %r1 mtcr %r1 - bf 17,1f /* branch if privileged */ - + bf 17,2f /* branch if privileged */ +1: /* Unprivileged case */ mtcr %r29 /* put the condition register back */ mfsprg2 %r29 /* ... and r29 */ @@ -893,7 +893,17 @@ CNAME(dblow): li %r1, 0 /* How to get the vector from LR */ bla generictrap /* and we look like a generic trap */ -1: +2: +#ifdef KDTRACE_HOOKS + /* Privileged, so drop to KDB */ + mfsrr0 %r1 + lwz %r4,0(%r1) + /* Check if it's a DTrace trap. */ + li %r3,0x0808 + addis %r3,%r3,0x7c81 + cmplw %cr0,%r3,%r4 + beq %cr0,1b +#endif /* Privileged, so drop to KDB */ GET_CPUINFO(%r1) stw %r28,(PC_DBSAVE+CPUSAVE_R28)(%r1) /* free r28 */ Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Thu Dec 12 03:04:00 2013 (r259244) +++ head/sys/powerpc/aim/trap_subr64.S Thu Dec 12 04:12:19 2013 (r259245) @@ -789,8 +789,9 @@ CNAME(dblow): mfcr %r29 /* save CR in r29 */ mfsrr1 %r1 mtcr %r1 - bf 17,1f /* branch if privileged */ + bf 17,2f /* branch if privileged */ +1: /* Unprivileged case */ mtcr %r29 /* put the condition register back */ mfsprg2 %r29 /* ... and r29 */ @@ -799,8 +800,17 @@ CNAME(dblow): li %r1, 0 /* How to get the vector from LR */ bla generictrap /* and we look like a generic trap */ -1: +2: +#ifdef KDTRACE_HOOKS /* Privileged, so drop to KDB */ + mfsrr0 %r1 + lwz %r4,0(%r1) + /* Check if it's a DTrace trap. */ + li %r3,0x0808 + addis %r3,%r3,0x7c81 + cmplw %cr0,%r3,%r4 + beq %cr0,1b +#endif GET_CPUINFO(%r1) std %r27,(PC_DBSAVE+CPUSAVE_R27)(%r1) /* free r27 */ std %r28,(PC_DBSAVE+CPUSAVE_R28)(%r1) /* free r28 */ From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 05:49:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BF3F50B; Thu, 12 Dec 2013 05:49:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47D801DFC; Thu, 12 Dec 2013 05:49:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC5nSHl040760; Thu, 12 Dec 2013 05:49:28 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC5nSWN040759; Thu, 12 Dec 2013 05:49:28 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312120549.rBC5nSWN040759@svn.freebsd.org> From: Glen Barber Date: Thu, 12 Dec 2013 05:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259246 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 05:49:28 -0000 Author: gjb Date: Thu Dec 12 05:49:27 2013 New Revision: 259246 URL: http://svnweb.freebsd.org/changeset/base/259246 Log: Prevent release build errors found during snapshot builds where if NOPORTS=1, pkg-stage.sh cannot build the ports-mgmt/pkg port if WITH_DVD=1. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Thu Dec 12 04:12:19 2013 (r259245) +++ head/release/scripts/pkg-stage.sh Thu Dec 12 05:49:27 2013 (r259246) @@ -24,6 +24,11 @@ fi REVISION="${2}" . "${1}" || exit 1 +# If NOPORTS is set for the release, do not attempt to build pkg(8). +if [ ! -f /usr/ports/Makefile ]; then + exit 0 +fi + if [ ! -x /usr/local/sbin/pkg ]; then /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 08:23:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9ED04DD; Thu, 12 Dec 2013 08:23:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C574F17EA; Thu, 12 Dec 2013 08:23:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC8NSkl005668; Thu, 12 Dec 2013 08:23:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC8NSfk005667; Thu, 12 Dec 2013 08:23:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312120823.rBC8NSfk005667@svn.freebsd.org> From: Alexander Motin Date: Thu, 12 Dec 2013 08:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259247 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 08:23:28 -0000 Author: mav Date: Thu Dec 12 08:23:28 2013 New Revision: 259247 URL: http://svnweb.freebsd.org/changeset/base/259247 Log: Fix bug introduced at r256607. We have to recalculate bp_resid here since sizes of original and completed requests may differ due to end of media. Bisected by: pho Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Thu Dec 12 05:49:27 2013 (r259246) +++ head/sys/geom/geom_dev.c Thu Dec 12 08:23:28 2013 (r259247) @@ -487,7 +487,7 @@ g_dev_done(struct bio *bp2) bp = bp2->bio_parent; bp->bio_error = bp2->bio_error; bp->bio_completed = bp2->bio_completed; - bp->bio_resid = bp2->bio_resid; + bp->bio_resid = bp->bio_length - bp2->bio_completed; if (bp2->bio_error != 0) { g_trace(G_T_BIO, "g_dev_done(%p) had error %d", bp2, bp2->bio_error); From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 08:34:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99BC678F; Thu, 12 Dec 2013 08:34:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85A1318B3; Thu, 12 Dec 2013 08:34:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC8YqAt009334; Thu, 12 Dec 2013 08:34:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC8YqZQ009333; Thu, 12 Dec 2013 08:34:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201312120834.rBC8YqZQ009333@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 12 Dec 2013 08:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259248 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 08:34:52 -0000 Author: hselasky Date: Thu Dec 12 08:34:51 2013 New Revision: 259248 URL: http://svnweb.freebsd.org/changeset/base/259248 Log: Set chain bit correctly. This will fix some problems sending and receiving Zero Length Packets, ZLPs. See comment in code for more information. MFC after: 1 week Reported by: Kohji Okuno Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Thu Dec 12 08:23:28 2013 (r259247) +++ head/sys/dev/usb/controller/xhci.c Thu Dec 12 08:34:51 2013 (r259248) @@ -1892,7 +1892,16 @@ restart: td->td_trb[x].dwTrb2 = htole32(dword); dword = XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_LINK) | - XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_IOC_BIT; + XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_IOC_BIT | + /* + * CHAIN-BIT: Ensure that a multi-TRB IN-endpoint + * frame only receives a single short packet event + * by setting the CHAIN bit in the LINK field. In + * addition some XHCI controllers have problems + * sending a ZLP unless the CHAIN-BIT is set in + * the LINK TRB. + */ + XHCI_TRB_3_CHAIN_BIT; td->td_trb[x].dwTrb3 = htole32(dword); @@ -1930,7 +1939,7 @@ restart: } /* clear TD SIZE to zero, hence this is the last TRB */ - /* remove chain bit because this is the last TRB in the chain */ + /* remove chain bit because this is the last data TRB in the chain */ td->td_trb[td->ntrb - 1].dwTrb2 &= ~htole32(XHCI_TRB_2_TDSZ_SET(15)); td->td_trb[td->ntrb - 1].dwTrb3 &= ~htole32(XHCI_TRB_3_CHAIN_BIT); From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 08:48:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79556CCB; Thu, 12 Dec 2013 08:48:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 647211984; Thu, 12 Dec 2013 08:48:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC8mkaf013265; Thu, 12 Dec 2013 08:48:46 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC8mkVB013264; Thu, 12 Dec 2013 08:48:46 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201312120848.rBC8mkVB013264@svn.freebsd.org> From: David Chisnall Date: Thu, 12 Dec 2013 08:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259249 - head/usr.bin/dtc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 08:48:46 -0000 Author: theraven Date: Thu Dec 12 08:48:45 2013 New Revision: 259249 URL: http://svnweb.freebsd.org/changeset/base/259249 Log: Fix the version string in dts emission. Reported by: Patrick Wildt MFC after: 1 week Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Thu Dec 12 08:34:51 2013 (r259248) +++ head/usr.bin/dtc/fdt.cc Thu Dec 12 08:48:45 2013 (r259249) @@ -1181,7 +1181,7 @@ void device_tree::write_dts(int fd) { FILE *file = fdopen(fd, "w"); - fputs("/dtc-v1/;\n\n", file); + fputs("/dts-v1/;\n\n", file); if (!reservations.empty()) { From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 08:55:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 074F4EB1; Thu, 12 Dec 2013 08:55:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E79A91A35; Thu, 12 Dec 2013 08:55:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBC8tOa2016420; Thu, 12 Dec 2013 08:55:24 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBC8tO02016419; Thu, 12 Dec 2013 08:55:24 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201312120855.rBC8tO02016419@svn.freebsd.org> From: David Chisnall Date: Thu, 12 Dec 2013 08:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259250 - head/usr.bin/dtc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 08:55:25 -0000 Author: theraven Date: Thu Dec 12 08:55:24 2013 New Revision: 259250 URL: http://svnweb.freebsd.org/changeset/base/259250 Log: Some more cleanups and bug fixes in dtc for property printing / parsing. Submitted by: Patrick Wildt Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Thu Dec 12 08:48:45 2013 (r259249) +++ head/usr.bin/dtc/fdt.cc Thu Dec 12 08:55:24 2013 (r259250) @@ -137,7 +137,7 @@ property_value::resolve_type() break; } } - if (is_all_printable && (bytes > nuls)) + if ((is_all_printable && (bytes > nuls)) || bytes == 0) { type = STRING; if (nuls > 0) @@ -204,7 +204,7 @@ property_value::write_as_bytes(FILE *fil putc('[', file); for (byte_buffer::iterator i=byte_data.begin(), e=byte_data.end(); i!=e ; i++) { - fprintf(file, "%hhx", *i); + fprintf(file, "%02hhx", *i); if (i+1 != e) { putc(' ', file); @@ -367,6 +367,11 @@ property::property(input_buffer &structs return; } key = string(name_buffer); + + // If we're empty, do not push anything as value. + if (!length) + return; + // Read the value uint8_t byte; property_value v; From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 11:05:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7CCADEF; Thu, 12 Dec 2013 11:05:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9412D1471; Thu, 12 Dec 2013 11:05:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCB5m55064302; Thu, 12 Dec 2013 11:05:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCB5mEs064301; Thu, 12 Dec 2013 11:05:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312121105.rBCB5mEs064301@svn.freebsd.org> From: Alexander Motin Date: Thu, 12 Dec 2013 11:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259254 - head/sys/fs/devfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 11:05:48 -0000 Author: mav Date: Thu Dec 12 11:05:48 2013 New Revision: 259254 URL: http://svnweb.freebsd.org/changeset/base/259254 Log: Fix long known bug with handling device aliases residing not in devfs root. Historically creation of device aliases created symbolic links using only name of target device as a link target, not considering current directory. Fix that by adding number of "../" chunks to the terget device name, required to get out of the current directory to devfs root first. MFC after: 1 month Modified: head/sys/fs/devfs/devfs_devs.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Thu Dec 12 10:57:16 2013 (r259253) +++ head/sys/fs/devfs/devfs_devs.c Thu Dec 12 11:05:48 2013 (r259254) @@ -486,9 +486,9 @@ devfs_populate_loop(struct devfs_mount * { struct cdev_priv *cdp; struct devfs_dirent *de; - struct devfs_dirent *dd; + struct devfs_dirent *dd, *dt; struct cdev *pdev; - int de_flags, j; + int de_flags, depth, j; char *q, *s; sx_assert(&dm->dm_lock, SX_XLOCKED); @@ -589,9 +589,17 @@ devfs_populate_loop(struct devfs_mount * de->de_mode = 0755; de->de_dirent->d_type = DT_LNK; pdev = cdp->cdp_c.si_parent; - j = strlen(pdev->si_name) + 1; + dt = dd; + depth = 0; + while (dt != dm->dm_rootdir && + (dt = devfs_parent_dirent(dt)) != NULL) + depth++; + j = depth * 3 + strlen(pdev->si_name) + 1; de->de_symlink = malloc(j, M_DEVFS, M_WAITOK); - bcopy(pdev->si_name, de->de_symlink, j); + de->de_symlink[0] = 0; + while (depth-- > 0) + strcat(de->de_symlink, "../"); + strcat(de->de_symlink, pdev->si_name); } else { de->de_uid = cdp->cdp_c.si_uid; de->de_gid = cdp->cdp_c.si_gid; From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 14:49:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BE27A5; Thu, 12 Dec 2013 14:49:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 480F117D1; Thu, 12 Dec 2013 14:49:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCEnRoK045691; Thu, 12 Dec 2013 14:49:27 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCEnRRQ045690; Thu, 12 Dec 2013 14:49:27 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312121449.rBCEnRRQ045690@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 12 Dec 2013 14:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259261 - head/sys/dev/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 14:49:27 -0000 Author: ray Date: Thu Dec 12 14:49:26 2013 New Revision: 259261 URL: http://svnweb.freebsd.org/changeset/base/259261 Log: Do not try to probe/attach if attempt to add fbd child are failed. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/drm2/drm_fb_helper.c Modified: head/sys/dev/drm2/drm_fb_helper.c ============================================================================== --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 2013 (r259260) +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 2013 (r259261) @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct kdev = fb_helper->dev->device; fbd = device_add_child(kdev, "fbd", device_get_unit(kdev)); - ret = device_probe_and_attach(fbd); + if (fbd != NULL) + ret = device_probe_and_attach(fbd); + else + ret = ENODEV; #ifdef DEV_VT if (ret != 0) DRM_ERROR("Failed to attach fbd device: %d\n", ret); From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 17:48:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BA5C1C2; Thu, 12 Dec 2013 17:48:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8835C1745; Thu, 12 Dec 2013 17:48:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCHmX93011091; Thu, 12 Dec 2013 17:48:33 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCHmXdR011090; Thu, 12 Dec 2013 17:48:33 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312121748.rBCHmXdR011090@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 12 Dec 2013 17:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259265 - head/sys/mips/beri X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 17:48:33 -0000 Author: bz Date: Thu Dec 12 17:48:33 2013 New Revision: 259265 URL: http://svnweb.freebsd.org/changeset/base/259265 Log: Use correct value pointing to previously selected FDT DTB. Reviewed by: brooks Sponsored by: DARPA, AFRL MFC after: 1 week Modified: head/sys/mips/beri/beri_machdep.c Modified: head/sys/mips/beri/beri_machdep.c ============================================================================== --- head/sys/mips/beri/beri_machdep.c Thu Dec 12 16:58:45 2013 (r259264) +++ head/sys/mips/beri/beri_machdep.c Thu Dec 12 17:48:33 2013 (r259265) @@ -178,7 +178,7 @@ platform_start(__register_t a0, __regist if (OF_install(OFW_FDT, 0) == FALSE) while (1); - if (OF_init(&fdt_static_dtb) != 0) + if (OF_init((void *)dtbp) != 0) while (1); #endif From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 17:59:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84C514FB; Thu, 12 Dec 2013 17:59:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64DFB180B; Thu, 12 Dec 2013 17:59:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCHxA80014635; Thu, 12 Dec 2013 17:59:10 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCHx98F014632; Thu, 12 Dec 2013 17:59:09 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201312121759.rBCHx98F014632@svn.freebsd.org> From: Bryan Drewery Date: Thu, 12 Dec 2013 17:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259266 - head/usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 17:59:10 -0000 Author: bdrewery (ports committer) Date: Thu Dec 12 17:59:09 2013 New Revision: 259266 URL: http://svnweb.freebsd.org/changeset/base/259266 Log: Fix multi-repository support by properly respecting 'enabled' flag. This will read the REPOS_DIR env/config setting (default is /etc/pkg and /usr/local/etc/pkg/repos) and use the last enabled repository. This can be changed in the environment using a comma-separated list, or in /usr/local/etc/pkg.conf with JSON array syntax of: REPOS_DIR: ["/etc/pkg", "/usr/local/etc/pkg/repos"] Approved by: bapt MFC after: 1 week Modified: head/usr.sbin/pkg/config.c head/usr.sbin/pkg/config.h head/usr.sbin/pkg/pkg.7 Modified: head/usr.sbin/pkg/config.c ============================================================================== --- head/usr.sbin/pkg/config.c Thu Dec 12 17:48:33 2013 (r259265) +++ head/usr.sbin/pkg/config.c Thu Dec 12 17:59:09 2013 (r259266) @@ -32,8 +32,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -51,11 +53,17 @@ __FBSDID("$FreeBSD$"); #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ +struct config_value { + char *value; + STAILQ_ENTRY(config_value) next; +}; + struct config_entry { uint8_t type; const char *key; const char *val; char *value; + STAILQ_HEAD(, config_value) *list; bool envset; }; @@ -65,6 +73,7 @@ static struct config_entry c[] = { "PACKAGESITE", URL_SCHEME_PREFIX "http://pkg.FreeBSD.org/${ABI}/latest", NULL, + NULL, false, }, [ABI] = { @@ -72,6 +81,7 @@ static struct config_entry c[] = { "ABI", NULL, NULL, + NULL, false, }, [MIRROR_TYPE] = { @@ -79,6 +89,7 @@ static struct config_entry c[] = { "MIRROR_TYPE", "SRV", NULL, + NULL, false, }, [ASSUME_ALWAYS_YES] = { @@ -86,6 +97,7 @@ static struct config_entry c[] = { "ASSUME_ALWAYS_YES", "NO", NULL, + NULL, false, }, [SIGNATURE_TYPE] = { @@ -93,6 +105,7 @@ static struct config_entry c[] = { "SIGNATURE_TYPE", NULL, NULL, + NULL, false, }, [FINGERPRINTS] = { @@ -100,6 +113,15 @@ static struct config_entry c[] = { "FINGERPRINTS", NULL, NULL, + NULL, + false, + }, + [REPOS_DIR] = { + PKG_CONFIG_LIST, + "REPOS_DIR", + NULL, + NULL, + NULL, false, }, }; @@ -474,17 +496,34 @@ subst_packagesite(const char *abi) c[PACKAGESITE].value = strdup(sbuf_data(newval)); } +static int +boolstr_to_bool(const char *str) +{ + if (str != NULL && (strcasecmp(str, "true") == 0 || + strcasecmp(str, "yes") == 0 || strcasecmp(str, "on") == 0 || + str[0] == '1')) + return (true); + + return (false); +} + static void config_parse(yaml_document_t *doc, yaml_node_t *node, pkg_conf_file_t conftype) { + yaml_node_item_t *item; yaml_node_pair_t *pair; - yaml_node_t *key, *val; + yaml_node_t *key, *val, *item_val; struct sbuf *buf = sbuf_new_auto(); + struct config_entry *temp_config; + struct config_value *cv; int i; size_t j; pair = node->data.mapping.pairs.start; + /* Temporary config for configs that may be disabled. */ + temp_config = calloc(CONFIG_SIZE, sizeof(struct config_entry)); + while (pair < node->data.mapping.pairs.top) { key = yaml_document_get_node(doc, pair->key); val = yaml_document_get_node(doc, pair->value); @@ -530,7 +569,12 @@ config_parse(yaml_document_t *doc, yaml_ else if (strcasecmp(key->data.scalar.value, "fingerprints") == 0) sbuf_cpy(buf, "FINGERPRINTS"); - else { /* Skip unknown entries for future use. */ + else if (strcasecmp(key->data.scalar.value, + "enabled") == 0) { + /* Skip disabled repos. */ + if (!boolstr_to_bool(val->data.scalar.value)) + goto cleanup; + } else { /* Skip unknown entries for future use. */ ++pair; continue; } @@ -554,10 +598,58 @@ config_parse(yaml_document_t *doc, yaml_ continue; } - c[i].value = strdup(val->data.scalar.value); + /* Parse sequence value ["item1", "item2"] */ + switch (c[i].type) { + case PKG_CONFIG_LIST: + if (val->type != YAML_SEQUENCE_NODE) { + fprintf(stderr, "Skipping invalid array " + "value for %s.\n", c[i].key); + ++pair; + continue; + } + item = val->data.sequence.items.start; + temp_config[i].list = + malloc(sizeof(*temp_config[i].list)); + STAILQ_INIT(temp_config[i].list); + + while (item < val->data.sequence.items.top) { + item_val = yaml_document_get_node(doc, *item); + if (item_val->type != YAML_SCALAR_NODE) { + ++item; + continue; + } + cv = malloc(sizeof(struct config_value)); + cv->value = + strdup(item_val->data.scalar.value); + STAILQ_INSERT_TAIL(temp_config[i].list, cv, + next); + ++item; + } + break; + default: + /* Normal string value. */ + temp_config[i].value = strdup(val->data.scalar.value); + break; + } ++pair; } + /* Repo is enabled, copy over all settings from temp_config. */ + for (i = 0; i < CONFIG_SIZE; i++) { + if (c[i].envset) + continue; + switch (c[i].type) { + case PKG_CONFIG_LIST: + c[i].list = temp_config[i].list; + break; + default: + c[i].value = temp_config[i].value; + break; + } + } + +cleanup: + free(temp_config); sbuf_delete(buf); } @@ -632,23 +724,84 @@ read_conf_file(const char *confpath, pkg return (0); } +static int +load_repositories(const char *repodir) +{ + struct dirent *ent; + DIR *d; + char *p; + size_t n; + char path[MAXPATHLEN]; + int ret; + + ret = 0; + + if ((d = opendir(repodir)) == NULL) + return (1); + + while ((ent = readdir(d))) { + /* Trim out 'repos'. */ + if ((n = strlen(ent->d_name)) <= 5) + continue; + p = &ent->d_name[n - 5]; + if (strcmp(p, ".conf") == 0) { + snprintf(path, sizeof(path), "%s%s%s", + repodir, + repodir[strlen(repodir) - 1] == '/' ? "" : "/", + ent->d_name); + if (access(path, F_OK) == 0 && + read_conf_file(path, CONFFILE_REPO)) { + ret = 1; + goto cleanup; + } + } + } + +cleanup: + closedir(d); + + return (ret); +} + int config_init(void) { - const char *val; + char *val; int i; const char *localbase; + char *env_list_item; char confpath[MAXPATHLEN]; + struct config_value *cv; char abi[BUFSIZ]; for (i = 0; i < CONFIG_SIZE; i++) { val = getenv(c[i].key); if (val != NULL) { - c[i].val = val; c[i].envset = true; + switch (c[i].type) { + case PKG_CONFIG_LIST: + /* Split up comma-separated items from env. */ + c[i].list = malloc(sizeof(*c[i].list)); + STAILQ_INIT(c[i].list); + for (env_list_item = strtok(val, ","); + env_list_item != NULL; + env_list_item = strtok(NULL, ",")) { + cv = + malloc(sizeof(struct config_value)); + cv->value = + strdup(env_list_item); + STAILQ_INSERT_TAIL(c[i].list, cv, + next); + } + break; + default: + c[i].val = val; + break; + } } } + /* Read LOCALBASE/etc/pkg.conf first. */ localbase = getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE; snprintf(confpath, sizeof(confpath), "%s/etc/pkg.conf", localbase); @@ -657,10 +810,22 @@ config_init(void) CONFFILE_PKG)) goto finalize; - snprintf(confpath, sizeof(confpath), "/etc/pkg/FreeBSD.conf"); - if (access(confpath, F_OK) == 0 && read_conf_file(confpath, - CONFFILE_REPO)) - goto finalize; + /* Then read in all repos from REPOS_DIR list of directories. */ + if (c[REPOS_DIR].list == NULL) { + c[REPOS_DIR].list = malloc(sizeof(*c[REPOS_DIR].list)); + STAILQ_INIT(c[REPOS_DIR].list); + cv = malloc(sizeof(struct config_value)); + cv->value = strdup("/etc/pkg"); + STAILQ_INSERT_TAIL(c[REPOS_DIR].list, cv, next); + cv = malloc(sizeof(struct config_value)); + if (asprintf(&cv->value, "%s/etc/pkg/repos", localbase) < 0) + goto finalize; + STAILQ_INSERT_TAIL(c[REPOS_DIR].list, cv, next); + } + + STAILQ_FOREACH(cv, c[REPOS_DIR].list, next) + if (load_repositories(cv->value)) + goto finalize; finalize: if (c[ABI].val == NULL && c[ABI].value == NULL) { @@ -704,10 +869,7 @@ config_bool(pkg_config_key k, bool *val) else value = c[k].val; - if (strcasecmp(value, "true") == 0 || - strcasecmp(value, "yes") == 0 || - strcasecmp(value, "on") == 0 || - *value == '1') + if (boolstr_to_bool(value)) *val = true; return (0); Modified: head/usr.sbin/pkg/config.h ============================================================================== --- head/usr.sbin/pkg/config.h Thu Dec 12 17:48:33 2013 (r259265) +++ head/usr.sbin/pkg/config.h Thu Dec 12 17:59:09 2013 (r259266) @@ -39,12 +39,14 @@ typedef enum { ASSUME_ALWAYS_YES, SIGNATURE_TYPE, FINGERPRINTS, + REPOS_DIR, CONFIG_SIZE } pkg_config_key; typedef enum { PKG_CONFIG_STRING=0, PKG_CONFIG_BOOL, + PKG_CONFIG_LIST, } pkg_config_t; typedef enum { Modified: head/usr.sbin/pkg/pkg.7 ============================================================================== --- head/usr.sbin/pkg/pkg.7 Thu Dec 12 17:48:33 2013 (r259265) +++ head/usr.sbin/pkg/pkg.7 Thu Dec 12 17:59:09 2013 (r259266) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2013 +.Dd December 12, 2013 .Dt PKG 7 .Os .Sh NAME @@ -152,6 +152,7 @@ MIRROR_TYPE: "srv", SIGNATURE_TYPE: "none", FINGERPRINTS: "/usr/share/keys/pkg", ASSUME_ALWAYS_YES: "yes" +REPOS_DIR: ["/etc/pkg", "/usr/local/etc/pkg/repos"] .Ed .Pp Reference @@ -194,14 +195,20 @@ The URL that .Xr pkg 8 and other packages will be fetched from. +.It Ev REPOS_DIR +Comma-separated list of directories that should be searched for repository +configuration files. .El .Sh FILES Configuration is read from the files in the listed order. -The first enabled repository is the one used for bootstrapping +This path can be changed by setting +.Sy REPOS_DIR . +The last enabled repository is the one used for bootstrapping .Xr pkg 8 . .Bl -tag -width "/usr/local/etc/pkg/repos/*.conf" .It Pa /usr/local/etc/pkg.conf .It Pa /etc/pkg/FreeBSD.conf +.It Pa /usr/local/etc/pkg/repos/*.conf .El .Sh EXAMPLES Some examples are listed here. From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 18:08:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 254D0A16; Thu, 12 Dec 2013 18:08:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 063051901; Thu, 12 Dec 2013 18:08:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCI8VBw018607; Thu, 12 Dec 2013 18:08:31 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCI8V3X018604; Thu, 12 Dec 2013 18:08:31 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312121808.rBCI8V3X018604@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 12 Dec 2013 18:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259267 - in head/sys: boot/fdt/dts mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 18:08:32 -0000 Author: bz Date: Thu Dec 12 18:08:31 2013 New Revision: 259267 URL: http://svnweb.freebsd.org/changeset/base/259267 Log: Add an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA. At this point we only support one CPU, the PIC, and a UART console. Reviewed by: brooks Sponsored by: DARPA, AFRL MFC after: 5 days Added: head/sys/boot/fdt/dts/beri-netfpga.dts (contents, props changed) head/sys/mips/conf/BERI_NETFPGA_MDROOT (contents, props changed) Added: head/sys/boot/fdt/dts/beri-netfpga.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/beri-netfpga.dts Thu Dec 12 18:08:31 2013 (r259267) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2012-2013 Robert N. M. Watson + * Copyright (c) 2013 SRI International + * Copyright (c) 2013 Bjoern A. Zeeb + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-11-C-0249) + * ("MRC2"), as part of the DARPA MRC research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/* + * Device names here have been largely made up on the spot, especially for the + * "compatible" strings, and might want to be revised. + */ + +/ { + model = "SRI/Cambridge Beri (NetFPGA)"; + compatible = "sri-cambridge,beri-netfpga"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <1>; + + /* + * Secondary CPUs all start disabled and use the + * spin-table enable method. cpu-release-addr must be + * specified for each cpu other than cpu@0. Values of + * cpu-release-addr grow down from 0x100000 (kernel). + */ + status = "disabled"; + enable-method = "spin-table"; + + cpu@0 { + device-type = "cpu"; + compatible = "sri-cambridge,beri"; + + reg = <0>; + status = "okay"; + }; + +/* + cpu@1 { + device-type = "cpu"; + compatible = "sri-cambridge,beri"; + + reg = <1>; + // XXX: should we need cached prefix? + cpu-release-addr = <0xffffffff 0x800fffe0>; + }; +*/ + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + #interrupt-cells = <1>; + + /* + * Declare mips,mips4k since BERI doesn't (yet) have a PIC, so + * we use mips4k coprocessor 0 interrupt management directly. + */ + compatible = "simple-bus", "mips,mips4k"; + ranges = <>; + + memory { + device_type = "memory"; + reg = <0x0 0x0FFFFFFF>; // ~256M at 0x0 + }; + + beripic: beripic@7f804000 { + compatible = "sri-cambridge,beri-pic"; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x7f804000 0x400 + 0x7f806000 0x10 + 0x7f806080 0x10 + 0x7f806100 0x10>; + interrupts = <0 1 2 3 4>; + hard-interrupt-sources = <64>; + soft-interrupt-sources = <64>; + }; + + serial0: serial@7f002100 { + compatible = "ns16550"; + reg = <0x7f002100 0x20>; + reg-shift = <2>; + clock-frequency = <100000000>; + interrupts = <8>; + interrupt-parent = <&beripic>; + }; + }; + + aliases { + serial0 = &serial0; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + bootargs = "-v"; + }; +}; Added: head/sys/mips/conf/BERI_NETFPGA_MDROOT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/BERI_NETFPGA_MDROOT Thu Dec 12 18:08:31 2013 (r259267) @@ -0,0 +1,28 @@ +# +# BERI_NETFPGA_MDROOT -- Kernel for the SRI/Cambridge "BERI" (Bluespec Extensible +# RISC Implementation) FPGA soft core, as configured in its NetFPGA reference +# configuration. +# +# $FreeBSD$ +# + +include "BERI_TEMPLATE" + +ident BERI_NETFPGA_MDROOT + +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=beri-netfpga.dts + +device uart + +# +# This kernel configuration uses an embedded memory root file system. +# Adjust the following path and size based on local requirements. +# +options MD_ROOT # MD is a potential root device +options MD_ROOT_SIZE=26112 # 25.5MB +options ROOTDEVNAME=\"ufs:md0\" +#makeoptions MFS_IMAGE=/foo/baz/baz/mdroot.img + +# end From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 18:29:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5EE633B; Thu, 12 Dec 2013 18:29:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 784B21AC5; Thu, 12 Dec 2013 18:29:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCITbQo026020; Thu, 12 Dec 2013 18:29:37 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCITa3f026016; Thu, 12 Dec 2013 18:29:36 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201312121829.rBCITa3f026016@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 12 Dec 2013 18:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259270 - in head/sys/arm: freescale/imx ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 18:29:37 -0000 Author: loos Date: Thu Dec 12 18:29:36 2013 New Revision: 259270 URL: http://svnweb.freebsd.org/changeset/base/259270 Log: After r256961 ofw_iicbuc.c will be built for any kernel which includes options 'iicbus' and 'fdt'. Remove the (now) unnecessary entries. Verified on BBB (am335x), EFIKA_MX (imx51 - by ray@), DIGI-CCWMX53 (imx53 - kernel build). Approved by: adrian (mentor) Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/ti/files.ti Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Thu Dec 12 18:16:46 2013 (r259269) +++ head/sys/arm/freescale/imx/files.imx51 Thu Dec 12 18:29:36 2013 (r259270) @@ -46,7 +46,6 @@ arm/freescale/imx/imx_wdog.c optional i # i2c arm/freescale/imx/i2c.c optional fsliic -dev/ofw/ofw_iicbus.c optional fsliic # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.c optional sc Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Thu Dec 12 18:16:46 2013 (r259269) +++ head/sys/arm/freescale/imx/files.imx53 Thu Dec 12 18:29:36 2013 (r259270) @@ -46,7 +46,6 @@ arm/freescale/imx/imx_wdog.c optional i # i2c arm/freescale/imx/i2c.c optional fsliic -dev/ofw/ofw_iicbus.c optional fsliic # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.c optional sc Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Thu Dec 12 18:16:46 2013 (r259269) +++ head/sys/arm/freescale/imx/files.imx6 Thu Dec 12 18:29:36 2013 (r259270) @@ -51,6 +51,5 @@ arm/freescale/imx/imx6_usbphy.c optiona #arm/freescale/imx/imx51_gpio.c optional gpio #dev/ata/chipsets/ata-fsl.c optional imxata #arm/freescale/imx/i2c.c optional fsliic -#dev/ofw/ofw_iicbus.c optional fsliic #arm/freescale/imx/imx51_ipuv3.c optional sc Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Thu Dec 12 18:16:46 2013 (r259269) +++ head/sys/arm/ti/files.ti Thu Dec 12 18:29:36 2013 (r259270) @@ -22,7 +22,6 @@ arm/ti/ti_pruss.c standard arm/ti/ti_gpio.c optional gpio arm/ti/ti_i2c.c optional ti_i2c -dev/ofw/ofw_iicbus.c optional iicbus dev/uart/uart_dev_ti8250.c optional uart dev/uart/uart_dev_ns8250.c optional uart From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 19:02:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84712F68; Thu, 12 Dec 2013 19:02:42 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08DD71E57; Thu, 12 Dec 2013 19:02:38 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBCJ2UsW095290; Thu, 12 Dec 2013 21:02:30 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBCJ2UsW095290 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBCJ2Uoo095289; Thu, 12 Dec 2013 21:02:30 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 12 Dec 2013 21:02:30 +0200 From: Konstantin Belousov To: Aleksandr Rybalko Subject: Re: svn commit: r259261 - head/sys/dev/drm2 Message-ID: <20131212190230.GU59496@kib.kiev.ua> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BhuKUG3dHSy3oxDJ" Content-Disposition: inline In-Reply-To: <201312121449.rBCEnRRQ045690@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 19:02:42 -0000 --BhuKUG3dHSy3oxDJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote: > Author: ray > Date: Thu Dec 12 14:49:26 2013 > New Revision: 259261 > URL: http://svnweb.freebsd.org/changeset/base/259261 >=20 > Log: > Do not try to probe/attach if attempt to add fbd child are failed. > =20 > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/sys/dev/drm2/drm_fb_helper.c >=20 > Modified: head/sys/dev/drm2/drm_fb_helper.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 2013 (r259260) > +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 2013 (r259261) > @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct > =20 > kdev =3D fb_helper->dev->device; > fbd =3D device_add_child(kdev, "fbd", device_get_unit(kdev)); > - ret =3D device_probe_and_attach(fbd); > + if (fbd !=3D NULL)=20 > + ret =3D device_probe_and_attach(fbd); > + else > + ret =3D ENODEV; This must be -ENODEV, since linux layer operates on negative values for error. The error is negated in the drm layer, which would result in non-existent errno returned to FreeBSD code. Also, the #ifdef __FreeBSD braces in the file are not useful, please remove them. > #ifdef DEV_VT > if (ret !=3D 0) > DRM_ERROR("Failed to attach fbd device: %d\n", ret); --BhuKUG3dHSy3oxDJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSqghFAAoJEJDCuSvBvK1B6X0P/1UOq9aWIYUxjzMDG4HVXa6u +v9WI63f4yCHMKX/HtmZTX5rLI0amcNXXzJ4VFIKyytVEbZWem/5BY7KOUe8tnqK +AR5ArCD5lqRl4jVYPv/L862dXnHQc0P2T3x0kupGETGbA/ImL9QPTUXXJc8deGD i5tcQL6IyxtGFbBgfQMl8XnNkuvCqAt4JmEMi3WVy1neXjzSRobsOzW06hZNVxhb GN3x131o5GoLSP05zjg+VAbE0OtOJrQ78hTvFq6mED7SBIQpXhrSNgdUVuHzQcgm p2it9diWKvOW6O7eRkfVLaYUjnmpXW1ORxCwc2C2QDp7WhdaZXQTpZqT4HoST8Ij 3yWlRvuN1ug1DsAOF6cSXEPTYrp4JThKTDFrIV9FqoNRyevWIghCnxAJJ29yYUij j8psf80Jl510DHRfaAnnxTU2I998r7PpkC3a7FzaSv8J7gLvao2XgE+4cyplN9l+ 0+iB9c07hJ9DC4/rzaxr/MtXegPA+Lp+eBLkdSNztzDLNx+BJ/GBo/4beCfXJEYy /mgoXwBN18XbKgLJhaQ2Hy0zqqxnI8ShtJmCW7BreIorVqS0Vd4yplU5Sb5EAsHy 4n++aljh2rgxjW97fbErAw74v69FhSeX7f3IhWgfoY2Hzhlz6FL7sY1+YJyR2HOY P+IiOmY/gRgCvvaaz3Xb =zl8g -----END PGP SIGNATURE----- --BhuKUG3dHSy3oxDJ-- From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 20:20:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96DA6BF3; Thu, 12 Dec 2013 20:20:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8175914C3; Thu, 12 Dec 2013 20:20:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCKKkDi066710; Thu, 12 Dec 2013 20:20:46 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCKKk5a066709; Thu, 12 Dec 2013 20:20:46 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312122020.rBCKKk5a066709@svn.freebsd.org> From: Craig Rodrigues Date: Thu, 12 Dec 2013 20:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259274 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 20:20:46 -0000 Author: rodrigc Date: Thu Dec 12 20:20:46 2013 New Revision: 259274 URL: http://svnweb.freebsd.org/changeset/base/259274 Log: Mention BIND removal in release notes. Submitted by: skreuzer Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 12 19:02:42 2013 (r259273) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 12 20:20:46 2013 (r259274) @@ -328,6 +328,13 @@ Userland Changes + BIND has been replaced by &man.unbound.8; for + local dns resolution in the base system. With this change, nslookup + and dig are no longer a part of the base system. Users should + instead use &man.host.1; and &man.drill.1; Alternatively, + nslookup and dig can be obtained by installing the + dns/bind-tools port. + The &man.adduser.8; utility now supports a option to set the mode of a new user's home directory. From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 20:34:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78C66FB5; Thu, 12 Dec 2013 20:34:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 658C515CC; Thu, 12 Dec 2013 20:34:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCKY5MH072456; Thu, 12 Dec 2013 20:34:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCKY5hq072455; Thu, 12 Dec 2013 20:34:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312122034.rBCKY5hq072455@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Dec 2013 20:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259275 - head/usr.sbin/bhyvectl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 20:34:05 -0000 Author: jhb Date: Thu Dec 12 20:34:04 2013 New Revision: 259275 URL: http://svnweb.freebsd.org/changeset/base/259275 Log: Add a command to inject an NMI on a specific vcpu. It is a simple wrapper around the existing vm_inject_nmi(). Reviewed by: grehan, neel Modified: head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- head/usr.sbin/bhyvectl/bhyvectl.c Thu Dec 12 20:20:46 2013 (r259274) +++ head/usr.sbin/bhyvectl/bhyvectl.c Thu Dec 12 20:34:04 2013 (r259275) @@ -189,12 +189,14 @@ usage(void) " [--set-mem=]\n" " [--get-lowmem]\n" " [--get-highmem]\n" - " [--get-gpa-pmap]\n", + " [--get-gpa-pmap]\n" + " [--inject-nmi]\n", progname); exit(1); } static int get_stats, getcap, setcap, capval, get_gpa_pmap; +static int inject_nmi; static const char *capname; static int create, destroy, get_lowmem, get_highmem; static uint64_t memsize; @@ -557,6 +559,7 @@ main(int argc, char *argv[]) { "run", NO_ARG, &run, 1 }, { "create", NO_ARG, &create, 1 }, { "destroy", NO_ARG, &destroy, 1 }, + { "inject-nmi", NO_ARG, &inject_nmi, 1 }, { NULL, 0, NULL, 0 } }; @@ -825,6 +828,10 @@ main(int argc, char *argv[]) vmcs_entry_interruption_info); } + if (!error && inject_nmi) { + error = vm_inject_nmi(ctx, vcpu); + } + if (!error && (get_lowmem || get_all)) { gpa = 0; error = vm_get_memory_seg(ctx, gpa, &len, &wired); From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 20:47:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1AF2A26; Thu, 12 Dec 2013 20:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE2A0174F; Thu, 12 Dec 2013 20:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCKlIGb076373; Thu, 12 Dec 2013 20:47:18 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCKlIre076372; Thu, 12 Dec 2013 20:47:18 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312122047.rBCKlIre076372@svn.freebsd.org> From: Devin Teske Date: Thu, 12 Dec 2013 20:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259276 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 20:47:19 -0000 Author: dteske Date: Thu Dec 12 20:47:18 2013 New Revision: 259276 URL: http://svnweb.freebsd.org/changeset/base/259276 Log: I caught the following snippet at the end of my /var/log/bsdinstall_log: === DEBUG: Running installation step: services local: Not in a function /usr/libexec/bsdinstall/services: cannot create : Read-only file system /usr/libexec/bsdinstall/services: /tmp/bsdinstall/etc/rc.conf.services: \ Permission denied === The `local: Not in a function' is obvious, and was introduced by myself in SVN revision 256348. The latter two are caused by the attempt to use "\" to continue the line after using the ">>" redirect. This appears to attempt to write a file with the name " " in the current directory and subsequently attempts to execute the file that was originally intended for writing (which is not executable; hence the `Permission denied'). That was introduced in SVN r228192 about 2 years ago, apparently unnoticed until I started going over the debug outputs very carefully. MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/services Modified: head/usr.sbin/bsdinstall/scripts/services ============================================================================== --- head/usr.sbin/bsdinstall/scripts/services Thu Dec 12 20:34:04 2013 (r259275) +++ head/usr.sbin/bsdinstall/scripts/services Thu Dec 12 20:47:18 2013 (r259276) @@ -50,13 +50,12 @@ DAEMONS=$(dialog --backtitle "FreeBSD In 2>&1 1>&3) exec 3>&- -local havedump= +havedump= for daemon in $DAEMONS; do if [ "$daemon" == "dumpdev" ]; then havedump=1 - echo \# Set dumpdev to \"AUTO\" to enable crash dumps, \ - \"NO\" to disable >> \ - $BSDINSTALL_TMPETC/rc.conf.services + echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \ + 'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services continue fi From owner-svn-src-head@FreeBSD.ORG Thu Dec 12 22:33:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE72AA7A; Thu, 12 Dec 2013 22:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A4C11031; Thu, 12 Dec 2013 22:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCMXWFM015942; Thu, 12 Dec 2013 22:33:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCMXW2Z015941; Thu, 12 Dec 2013 22:33:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201312122233.rBCMXW2Z015941@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 12 Dec 2013 22:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259280 - head/sbin/growfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 22:33:32 -0000 Author: glebius Date: Thu Dec 12 22:33:32 2013 New Revision: 259280 URL: http://svnweb.freebsd.org/changeset/base/259280 Log: Somehow stable/10 branch contains correct version, but head doesn't. Modified: head/sbin/growfs/growfs.8 Modified: head/sbin/growfs/growfs.8 ============================================================================== --- head/sbin/growfs/growfs.8 Thu Dec 12 22:04:47 2013 (r259279) +++ head/sbin/growfs/growfs.8 Thu Dec 12 22:33:32 2013 (r259280) @@ -116,7 +116,7 @@ The utility first appeared in .Fx 4.4 . The ability to resize mounted filesystems was added in -.Fx 9.2 . +.Fx 10.0 . .Sh AUTHORS .An Christoph Herrmann Aq chm@FreeBSD.org .An Thomas-Henning von Kamptz Aq tomsoft@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 02:37:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE69C419; Fri, 13 Dec 2013 02:37:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 97CCA124B; Fri, 13 Dec 2013 02:37:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBD2bcHp003847; Fri, 13 Dec 2013 02:37:38 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBD2bZm6003830; Fri, 13 Dec 2013 02:37:35 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312130237.rBD2bZm6003830@svn.freebsd.org> From: Justin Hibbits Date: Fri, 13 Dec 2013 02:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259284 - in head/sys: conf powerpc/aim powerpc/cpufreq powerpc/include powerpc/powermac powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 02:37:38 -0000 Author: jhibbits Date: Fri Dec 13 02:37:35 2013 New Revision: 259284 URL: http://svnweb.freebsd.org/changeset/base/259284 Log: Add PMU-based CPU frequency scaling. This method is used on most Titanium PowerBooks. MFC after: 1 month Added: head/sys/powerpc/cpufreq/pmufreq.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/aim/mp_cpudep.c head/sys/powerpc/include/cpu.h head/sys/powerpc/include/dbdma.h head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/spr.h head/sys/powerpc/powermac/platform_powermac.c head/sys/powerpc/powermac/pmu.c head/sys/powerpc/powermac/pmuvar.h head/sys/powerpc/powermac/uninorth.c head/sys/powerpc/powermac/uninorthvar.h head/sys/powerpc/powermac/viareg.h head/sys/powerpc/powerpc/mp_machdep.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/conf/files.powerpc Fri Dec 13 02:37:35 2013 (r259284) @@ -107,6 +107,7 @@ powerpc/booke/pmap.c optional booke powerpc/booke/trap.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim +powerpc/cpufreq/pmufreq.c optional cpufreq aim pmu powerpc/fpu/fpu_add.c optional fpu_emu powerpc/fpu/fpu_compare.c optional fpu_emu powerpc/fpu/fpu_div.c optional fpu_emu Modified: head/sys/powerpc/aim/mp_cpudep.c ============================================================================== --- head/sys/powerpc/aim/mp_cpudep.c Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/aim/mp_cpudep.c Fri Dec 13 02:37:35 2013 (r259284) @@ -322,17 +322,13 @@ cpudep_ap_setup() mtspr(SPR_CELL_TSRL, bsp_state[5]); break; - case MPC7450: - case MPC7455: - case MPC7457: - /* Only MPC745x CPUs have an L3 cache. */ - reg = mpc745x_l3_enable(bsp_state[3]); - - /* Fallthrough */ case MPC7400: case MPC7410: case MPC7447A: case MPC7448: + case MPC7450: + case MPC7455: + case MPC7457: /* XXX: Program the CPU ID into PIR */ __asm __volatile("mtspr 1023,%0" :: "r"(PCPU_GET(cpuid))); @@ -342,6 +338,17 @@ cpudep_ap_setup() mtspr(SPR_HID0, bsp_state[0]); isync(); mtspr(SPR_HID1, bsp_state[1]); isync(); + /* Now enable the L3 cache. */ + switch (vers) { + case MPC7450: + case MPC7455: + case MPC7457: + /* Only MPC745x CPUs have an L3 cache. */ + reg = mpc745x_l3_enable(bsp_state[3]); + default: + break; + } + reg = mpc74xx_l2_enable(bsp_state[2]); reg = mpc74xx_l1d_enable(); reg = mpc74xx_l1i_enable(); Added: head/sys/powerpc/cpufreq/pmufreq.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/cpufreq/pmufreq.c Fri Dec 13 02:37:35 2013 (r259284) @@ -0,0 +1,222 @@ +/*- + * Copyright (c) 2011 Justin Hibbits + * Copyright (c) 2009 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "cpufreq_if.h" +#include "powerpc/powermac/pmuvar.h" + +struct pmufreq_softc { + device_t dev; + uint32_t minfreq; + uint32_t maxfreq; + uint32_t curfreq; +}; + +static void pmufreq_identify(driver_t *driver, device_t parent); +static int pmufreq_probe(device_t dev); +static int pmufreq_attach(device_t dev); +static int pmufreq_settings(device_t dev, struct cf_setting *sets, int *count); +static int pmufreq_set(device_t dev, const struct cf_setting *set); +static int pmufreq_get(device_t dev, struct cf_setting *set); +static int pmufreq_type(device_t dev, int *type); + +static device_method_t pmufreq_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, pmufreq_identify), + DEVMETHOD(device_probe, pmufreq_probe), + DEVMETHOD(device_attach, pmufreq_attach), + + /* cpufreq interface */ + DEVMETHOD(cpufreq_drv_set, pmufreq_set), + DEVMETHOD(cpufreq_drv_get, pmufreq_get), + DEVMETHOD(cpufreq_drv_type, pmufreq_type), + DEVMETHOD(cpufreq_drv_settings, pmufreq_settings), + + {0, 0} +}; + +static driver_t pmufreq_driver = { + "pmufreq", + pmufreq_methods, + sizeof(struct pmufreq_softc) +}; + +static devclass_t pmufreq_devclass; +DRIVER_MODULE(pmufreq, cpu, pmufreq_driver, pmufreq_devclass, 0, 0); + +static void +pmufreq_identify(driver_t *driver, device_t parent) +{ + phandle_t node; + uint32_t min_freq; + + node = ofw_bus_get_node(parent); + if (OF_getprop(node, "min-clock-frequency", &min_freq, sizeof(min_freq)) == -1) + return; + + /* Make sure we're not being doubly invoked. */ + if (device_find_child(parent, "pmufreq", -1) != NULL) + return; + + /* + * We attach a child for every CPU since settings need to + * be performed on every CPU in the SMP case. + */ + if (BUS_ADD_CHILD(parent, 10, "pmufreq", -1) == NULL) + device_printf(parent, "add pmufreq child failed\n"); +} + +static int +pmufreq_probe(device_t dev) +{ + uint32_t min_freq; + struct pmufreq_softc *sc; + phandle_t node; + + if (resource_disabled("pmufreq", 0)) + return (ENXIO); + + sc = device_get_softc(dev); + node = ofw_bus_get_node(device_get_parent(dev)); + /* + * A scalable MPC7455 has min-clock-frequency/max-clock-frequency as OFW + * properties of the 'cpu' node. + */ + if (OF_getprop(node, "min-clock-frequency", &min_freq, sizeof(min_freq)) == -1) + return (ENXIO); + device_set_desc(dev, "PMU-based frequency scaling"); + return (0); +} + +static int +pmufreq_attach(device_t dev) +{ + struct pmufreq_softc *sc; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + + node = ofw_bus_get_node(device_get_parent(dev)); + OF_getprop(node, "min-clock-frequency", &sc->minfreq, sizeof(sc->minfreq)); + OF_getprop(node, "max-clock-frequency", &sc->maxfreq, sizeof(sc->maxfreq)); + OF_getprop(node, "rounded-clock-frequency", &sc->curfreq, sizeof(sc->curfreq)); + sc->minfreq /= 1000000; + sc->maxfreq /= 1000000; + sc->curfreq /= 1000000; + + cpufreq_register(dev); + return (0); +} + +static int +pmufreq_settings(device_t dev, struct cf_setting *sets, int *count) +{ + struct pmufreq_softc *sc; + + sc = device_get_softc(dev); + if (sets == NULL || count == NULL) + return (EINVAL); + if (*count < 2) + return (E2BIG); + + /* Return a list of valid settings for this driver. */ + memset(sets, CPUFREQ_VAL_UNKNOWN, sizeof(*sets) * 2); + + sets[0].freq = sc->maxfreq; sets[0].dev = dev; + sets[1].freq = sc->minfreq; sets[1].dev = dev; + /* Set high latency for CPU frequency changes, it's a tedious process. */ + sets[0].lat = INT_MAX; + sets[1].lat = INT_MAX; + *count = 2; + + return (0); +} + +static int +pmufreq_set(device_t dev, const struct cf_setting *set) +{ + struct pmufreq_softc *sc; + int speed_sel; + int error; + + if (set == NULL) + return (EINVAL); + + sc = device_get_softc(dev); + + if (set->freq == sc->maxfreq) + speed_sel = 0; + else + speed_sel = 1; + + error = pmu_set_speed(speed_sel); + if (error == 0) + sc->curfreq = set->freq; + + return error; +} + +static int +pmufreq_get(device_t dev, struct cf_setting *set) +{ + struct pmufreq_softc *sc; + + if (set == NULL) + return (EINVAL); + sc = device_get_softc(dev); + + set->freq = sc->curfreq; + set->dev = dev; + + return (0); +} + +static int +pmufreq_type(device_t dev, int *type) +{ + + if (type == NULL) + return (EINVAL); + + *type = CPUFREQ_TYPE_ABSOLUTE; + return (0); +} + Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/include/cpu.h Fri Dec 13 02:37:35 2013 (r259284) @@ -98,4 +98,6 @@ void cpu_reset(void); void fork_trampoline(void); void swi_vm(void *); +void flush_disable_caches(void); + #endif /* _MACHINE_CPU_H_ */ Modified: head/sys/powerpc/include/dbdma.h ============================================================================== --- head/sys/powerpc/include/dbdma.h Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/include/dbdma.h Fri Dec 13 02:37:35 2013 (r259284) @@ -147,4 +147,7 @@ void dbdma_insert_branch(dbdma_channel_t void dbdma_sync_commands(dbdma_channel_t *chan, bus_dmasync_op_t op); +void dbdma_save_state(dbdma_channel_t *chan); +void dbdma_restore_state(dbdma_channel_t *chan); + #endif /* _MACHINE_DBDMA_H_ */ Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/include/pcpu.h Fri Dec 13 02:37:35 2013 (r259284) @@ -49,7 +49,8 @@ struct pmap; uint32_t pc_ipimask; \ register_t pc_tempsave[CPUSAVE_LEN]; \ register_t pc_disisave[CPUSAVE_LEN]; \ - register_t pc_dbsave[CPUSAVE_LEN]; + register_t pc_dbsave[CPUSAVE_LEN]; \ + void *pc_restore; #define PCPU_MD_AIM32_FIELDS \ /* char __pad[0] */ Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/include/spr.h Fri Dec 13 02:37:35 2013 (r259284) @@ -519,6 +519,8 @@ #define MSSCR0_EMODE 0x00200000 /* 10: MPX bus mode (read-only) */ #define MSSCR0_ABD 0x00100000 /* 11: address bus driven (read-only) */ #define MSSCR0_MBZ 0x000fffff /* 12-31: must be zero */ +#define MSSCR0_L2PFE 0x00000003 /* 30-31: L2 prefetch enable */ +#define SPR_LDSTCR 0x3f8 /* .6. Load/Store Control Register */ #define SPR_L2PM 0x3f8 /* .6. L2 Private Memory Control Register */ #define SPR_L2CR 0x3f9 /* .6. L2 Control Register */ #define L2CR_L2E 0x80000000 /* 0: L2 enable */ @@ -543,12 +545,14 @@ Setting this bit disables instruction caching. */ #define L2CR_L2I 0x00200000 /* 10: L2 global invalidate. */ +#define L2CR_L2IO_7450 0x00010000 /* 11: L2 instruction-only (MPC745x). */ #define L2CR_L2CTL 0x00100000 /* 11: L2 RAM control (ZZ enable). Enables automatic operation of the L2ZZ (low-power mode) signal. */ #define L2CR_L2WT 0x00080000 /* 12: L2 write-through. */ #define L2CR_L2TS 0x00040000 /* 13: L2 test support. */ #define L2CR_L2OH 0x00030000 /* 14-15: L2 output hold. */ +#define L2CR_L2DO_7450 0x00010000 /* 15: L2 data-only (MPC745x). */ #define L2CR_L2SL 0x00008000 /* 16: L2 DLL slow. */ #define L2CR_L2DF 0x00004000 /* 17: L2 differential clock. */ #define L2CR_L2BYP 0x00002000 /* 18: L2 DLL bypass. */ Modified: head/sys/powerpc/powermac/platform_powermac.c ============================================================================== --- head/sys/powerpc/powermac/platform_powermac.c Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/powermac/platform_powermac.c Fri Dec 13 02:37:35 2013 (r259284) @@ -376,6 +376,110 @@ powermac_smp_start_cpu(platform_t plat, #endif } +/* From p3-53 of the MPC7450 RISC Microprocessor Family Reference Manual */ +void +flush_disable_caches(void) +{ + register_t msr; + register_t msscr0; + register_t cache_reg; + volatile uint32_t *memp; + uint32_t temp; + int i; + int x; + + msr = mfmsr(); + powerpc_sync(); + mtmsr(msr & ~(PSL_EE | PSL_DR)); + msscr0 = mfspr(SPR_MSSCR0); + msscr0 &= ~MSSCR0_L2PFE; + mtspr(SPR_MSSCR0, msscr0); + powerpc_sync(); + isync(); + __asm__ __volatile__("dssall; sync"); + powerpc_sync(); + isync(); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + + /* Lock the L1 Data cache. */ + mtspr(SPR_LDSTCR, mfspr(SPR_LDSTCR) | 0xFF); + powerpc_sync(); + isync(); + + mtspr(SPR_LDSTCR, 0); + + /* + * Perform this in two stages: Flush the cache starting in RAM, then do it + * from ROM. + */ + memp = (volatile uint32_t *)0x00000000; + for (i = 0; i < 128 * 1024; i++) { + temp = *memp; + __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); + memp += 32/sizeof(*memp); + } + + memp = (volatile uint32_t *)0xfff00000; + x = 0xfe; + + for (; x != 0xff;) { + mtspr(SPR_LDSTCR, x); + for (i = 0; i < 128; i++) { + temp = *memp; + __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); + memp += 32/sizeof(*memp); + } + x = ((x << 1) | 1) & 0xff; + } + mtspr(SPR_LDSTCR, 0); + + cache_reg = mfspr(SPR_L2CR); + if (cache_reg & L2CR_L2E) { + cache_reg &= ~(L2CR_L2IO_7450 | L2CR_L2DO_7450); + mtspr(SPR_L2CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L2CR, cache_reg | L2CR_L2HWF); + while (mfspr(SPR_L2CR) & L2CR_L2HWF) + ; /* Busy wait for cache to flush */ + powerpc_sync(); + cache_reg &= ~L2CR_L2E; + mtspr(SPR_L2CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L2CR, cache_reg | L2CR_L2I); + powerpc_sync(); + while (mfspr(SPR_L2CR) & L2CR_L2I) + ; /* Busy wait for L2 cache invalidate */ + powerpc_sync(); + } + + cache_reg = mfspr(SPR_L3CR); + if (cache_reg & L3CR_L3E) { + cache_reg &= ~(L3CR_L3IO | L3CR_L3DO); + mtspr(SPR_L3CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L3CR, cache_reg | L3CR_L3HWF); + while (mfspr(SPR_L3CR) & L3CR_L3HWF) + ; /* Busy wait for cache to flush */ + powerpc_sync(); + cache_reg &= ~L3CR_L3E; + mtspr(SPR_L3CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L3CR, cache_reg | L3CR_L3I); + powerpc_sync(); + while (mfspr(SPR_L3CR) & L3CR_L3I) + ; /* Busy wait for L3 cache invalidate */ + powerpc_sync(); + } + + mtspr(SPR_HID0, mfspr(SPR_HID0) & ~HID0_DCE); + powerpc_sync(); + isync(); + + mtmsr(msr); +} + static void powermac_reset(platform_t platform) { Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/powermac/pmu.c Fri Dec 13 02:37:35 2013 (r259284) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -43,11 +44,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include /* For save_vec() */ #include +#include +#include /* For save_fpu() */ +#include #include #include +#include #include #include +#include #include #include @@ -59,6 +67,11 @@ __FBSDID("$FreeBSD$"); #include "clock_if.h" #include "pmuvar.h" #include "viareg.h" +#include "uninorthvar.h" /* For unin_chip_sleep()/unin_chip_wake() */ + +#define PMU_DEFAULTS PMU_INT_TICK | PMU_INT_ADB | \ + PMU_INT_PCEJECT | PMU_INT_SNDBRT | \ + PMU_INT_BATTERY | PMU_INT_ENVIRONMENT /* * Bus interface @@ -93,6 +106,7 @@ static int pmu_acline_state(SYSCTL_HANDL static int pmu_query_battery(struct pmu_softc *sc, int batt, struct pmu_battstate *info); static int pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS); +static void pmu_sleep_int(void); /* * List of battery-related sysctls we might ask for @@ -115,8 +129,6 @@ static device_method_t pmu_methods[] = DEVMETHOD(device_attach, pmu_attach), DEVMETHOD(device_detach, pmu_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* ADB bus interface */ DEVMETHOD(adb_hb_send_raw_packet, pmu_adb_send), @@ -193,7 +205,7 @@ static signed char pm_send_cmd_type[] = 0x02, -1, -1, -1, -1, -1, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1, -1, 0x01, 0x01, 0x01, -1, -1, -1, -1, -1, - 0x00, 0x00, -1, -1, -1, -1, 0x04, 0x04, + 0x00, 0x00, -1, -1, -1, 0x05, 0x04, 0x04, 0x04, -1, 0x00, -1, -1, -1, -1, -1, 0x00, -1, -1, -1, -1, -1, -1, -1, 0x01, 0x02, -1, -1, -1, -1, -1, -1, @@ -229,7 +241,7 @@ static signed char pm_receive_cmd_type[] 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x03, 0x09, -1, -1, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - -1, -1, -1, -1, -1, -1, 0x01, 0x01, + -1, -1, -1, -1, -1, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, -1, -1, -1, -1, -1, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -357,12 +369,13 @@ pmu_attach(device_t dev) /* Init PMU */ - reg = PMU_INT_TICK | PMU_INT_ADB | PMU_INT_PCEJECT | PMU_INT_SNDBRT; - reg |= PMU_INT_BATTERY; - reg |= PMU_INT_ENVIRONMENT; + pmu_write_reg(sc, vBufB, pmu_read_reg(sc, vBufB) | vPB4); + pmu_write_reg(sc, vDirB, (pmu_read_reg(sc, vDirB) | vPB4) & ~vPB3); + + reg = PMU_DEFAULTS; pmu_send(sc, PMU_SET_IMASK, 1, ®, 16, resp); - pmu_write_reg(sc, vIER, 0x90); /* make sure VIA interrupts are on */ + pmu_write_reg(sc, vIER, 0x94); /* make sure VIA interrupts are on */ pmu_send(sc, PMU_SYSTEM_READY, 1, cmd, 16, resp); pmu_send(sc, PMU_GET_VERSION, 1, cmd, 16, resp); @@ -1018,3 +1031,95 @@ pmu_settime(device_t dev, struct timespe return (0); } +static register_t sprgs[4]; +static register_t srrs[2]; +extern void *ap_pcpu; + +void pmu_sleep_int(void) +{ + static u_quad_t timebase = 0; + jmp_buf resetjb; + struct thread *fputd; + struct thread *vectd; + register_t hid0; + register_t msr; + register_t saved_msr; + + ap_pcpu = pcpup; + + PCPU_SET(restore, &resetjb); + + *(unsigned long *)0x80 = 0x100; + saved_msr = mfmsr(); + fputd = PCPU_GET(fputhread); + vectd = PCPU_GET(vecthread); + if (fputd != NULL) + save_fpu(fputd); + if (vectd != NULL) + save_vec(vectd); + if (setjmp(resetjb) == 0) { + sprgs[0] = mfspr(SPR_SPRG0); + sprgs[1] = mfspr(SPR_SPRG1); + sprgs[2] = mfspr(SPR_SPRG2); + sprgs[3] = mfspr(SPR_SPRG3); + srrs[0] = mfspr(SPR_SRR0); + srrs[1] = mfspr(SPR_SRR1); + timebase = mftb(); + powerpc_sync(); + flush_disable_caches(); + hid0 = mfspr(SPR_HID0); + hid0 = (hid0 & ~(HID0_DOZE | HID0_NAP)) | HID0_SLEEP; + powerpc_sync(); + isync(); + msr = mfmsr() | PSL_POW; + mtspr(SPR_HID0, hid0); + powerpc_sync(); + + while (1) + mtmsr(msr); + } + mttb(timebase); + PCPU_SET(curthread, curthread); + PCPU_SET(curpcb, curthread->td_pcb); + pmap_activate(curthread); + powerpc_sync(); + mtspr(SPR_SPRG0, sprgs[0]); + mtspr(SPR_SPRG1, sprgs[1]); + mtspr(SPR_SPRG2, sprgs[2]); + mtspr(SPR_SPRG3, sprgs[3]); + mtspr(SPR_SRR0, srrs[0]); + mtspr(SPR_SRR1, srrs[1]); + mtmsr(saved_msr); + if (fputd == curthread) + enable_fpu(curthread); + if (vectd == curthread) + enable_vec(curthread); + powerpc_sync(); +} + +int +pmu_set_speed(int low_speed) +{ + struct pmu_softc *sc; + uint8_t sleepcmd[] = {'W', 'O', 'O', 'F', 0}; + uint8_t resp[16]; + + sc = device_get_softc(pmu); + pmu_write_reg(sc, vIER, 0x10); + spinlock_enter(); + mtdec(0x7fffffff); + mb(); + mtdec(0x7fffffff); + + sleepcmd[4] = low_speed; + pmu_send(sc, PMU_CPU_SPEED, 5, sleepcmd, 16, resp); + unin_chip_sleep(NULL, 1); + pmu_sleep_int(); + unin_chip_wake(NULL); + + mtdec(1); /* Force a decrementer exception */ + spinlock_exit(); + pmu_write_reg(sc, vIER, 0x90); + + return (0); +} Modified: head/sys/powerpc/powermac/pmuvar.h ============================================================================== --- head/sys/powerpc/powermac/pmuvar.h Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/powermac/pmuvar.h Fri Dec 13 02:37:35 2013 (r259284) @@ -160,7 +160,8 @@ struct pmu_softc { volatile int sc_autopoll; int sc_batteries; struct cdev *sc_leddev; - int lid_closed; + int lid_closed; + uint8_t saved_regs[9]; }; struct pmu_battstate { @@ -172,4 +173,6 @@ struct pmu_battstate { int voltage; }; +int pmu_set_speed(int low_speed); + #endif /* PMUVAR_H */ Modified: head/sys/powerpc/powermac/uninorth.c ============================================================================== --- head/sys/powerpc/powermac/uninorth.c Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/powermac/uninorth.c Fri Dec 13 02:37:35 2013 (r259284) @@ -136,6 +136,13 @@ static driver_t unin_chip_driver = { static devclass_t unin_chip_devclass; +/* + * Assume there is only one unin chip in a PowerMac, so that pmu.c functions can + * suspend the chip after the whole rest of the device tree is suspended, not + * earlier. + */ +static device_t unin_chip; + DRIVER_MODULE(unin, nexus, unin_chip_driver, unin_chip_devclass, 0, 0); /* @@ -210,31 +217,30 @@ unin_chip_add_reg(phandle_t devnode, str } static void -unin_enable_gmac(device_t dev) +unin_update_reg(device_t dev, uint32_t regoff, uint32_t set, uint32_t clr) { - volatile u_int *clkreg; + volatile u_int *reg; struct unin_chip_softc *sc; u_int32_t tmpl; sc = device_get_softc(dev); - clkreg = (void *)(sc->sc_addr + UNIN_CLOCKCNTL); - tmpl = inl(clkreg); - tmpl |= UNIN_CLOCKCNTL_GMAC; - outl(clkreg, tmpl); + reg = (void *)(sc->sc_addr + regoff); + tmpl = inl(reg); + tmpl &= ~clr; + tmpl |= set; + outl(reg, tmpl); } static void -unin_enable_mpic(device_t dev) +unin_enable_gmac(device_t dev) { - volatile u_int *toggle; - struct unin_chip_softc *sc; - u_int32_t tmpl; + unin_update_reg(dev, UNIN_CLOCKCNTL, UNIN_CLOCKCNTL_GMAC, 0); +} - sc = device_get_softc(dev); - toggle = (void *)(sc->sc_addr + UNIN_TOGGLE_REG); - tmpl = inl(toggle); - tmpl |= UNIN_MPIC_RESET | UNIN_MPIC_OUTPUT_ENABLE; - outl(toggle, tmpl); +static void +unin_enable_mpic(device_t dev) +{ + unin_update_reg(dev, UNIN_TOGGLE_REG, UNIN_MPIC_RESET | UNIN_MPIC_OUTPUT_ENABLE, 0); } static int @@ -311,6 +317,9 @@ unin_chip_attach(device_t dev) return (error); } + if (unin_chip == NULL) + unin_chip = dev; + /* * Iterate through the sub-devices */ @@ -631,3 +640,33 @@ unin_chip_get_devinfo(device_t dev, devi return (&dinfo->udi_obdinfo); } +int +unin_chip_wake(device_t dev) +{ + + if (dev == NULL) + dev = unin_chip; + unin_update_reg(dev, UNIN_PWR_MGMT, UNIN_PWR_NORMAL, UNIN_PWR_MASK); + DELAY(10); + unin_update_reg(dev, UNIN_HWINIT_STATE, UNIN_RUNNING, 0); + DELAY(100); + + return (0); +} + +int +unin_chip_sleep(device_t dev, int idle) +{ + if (dev == NULL) + dev = unin_chip; + + unin_update_reg(dev, UNIN_HWINIT_STATE, UNIN_SLEEPING, 0); + DELAY(10); + if (idle) + unin_update_reg(dev, UNIN_PWR_MGMT, UNIN_PWR_IDLE2, UNIN_PWR_MASK); + else + unin_update_reg(dev, UNIN_PWR_MGMT, UNIN_PWR_SLEEP, UNIN_PWR_MASK); + DELAY(10); + + return (0); +} Modified: head/sys/powerpc/powermac/uninorthvar.h ============================================================================== --- head/sys/powerpc/powermac/uninorthvar.h Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/powermac/uninorthvar.h Fri Dec 13 02:37:35 2013 (r259284) @@ -28,6 +28,8 @@ #ifndef _POWERPC_POWERMAC_UNINORTHVAR_H_ #define _POWERPC_POWERMAC_UNINORTHVAR_H_ +#include +#include #include struct uninorth_softc { @@ -76,10 +78,30 @@ struct unin_chip_devinfo { #define UNIN_CLOCKCNTL_GMAC 0x2 /* + * Power management register + */ +#define UNIN_PWR_MGMT 0x30 +#define UNIN_PWR_NORMAL 0x00 +#define UNIN_PWR_IDLE2 0x01 +#define UNIN_PWR_SLEEP 0x02 +#define UNIN_PWR_SAVE 0x03 +#define UNIN_PWR_MASK 0x03 + +/* + * Hardware initialization state register + */ +#define UNIN_HWINIT_STATE 0x70 +#define UNIN_SLEEPING 0x01 +#define UNIN_RUNNING 0x02 + + +/* * Toggle registers */ #define UNIN_TOGGLE_REG 0xe0 #define UNIN_MPIC_RESET 0x2 #define UNIN_MPIC_OUTPUT_ENABLE 0x4 +extern int unin_chip_sleep(device_t dev, int idle); +extern int unin_chip_wake(device_t dev); #endif /* _POWERPC_POWERMAC_UNINORTHVAR_H_ */ Modified: head/sys/powerpc/powermac/viareg.h ============================================================================== --- head/sys/powerpc/powermac/viareg.h Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/powermac/viareg.h Fri Dec 13 02:37:35 2013 (r259284) @@ -30,14 +30,16 @@ /* VIA interface registers */ #define vBufB 0x0000 /* register B */ -#define vBufA 0x0200 /* register A */ #define vDirB 0x0400 /* data direction register */ #define vDirA 0x0600 /* data direction register */ +#define vT1C 0x0800 /* Timer 1 counter Lo */ +#define vT1CH 0x0a00 /* Timer 1 counter Hi */ #define vSR 0x1400 /* shift register */ #define vACR 0x1600 /* aux control register */ #define vPCR 0x1800 /* peripheral control register */ #define vIFR 0x1a00 /* interrupt flag register */ #define vIER 0x1c00 /* interrupt enable register */ +#define vBufA 0x1e00 /* register A */ #define vPB 0x0000 #define vPB3 0x08 Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Fri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/powerpc/mp_machdep.c Fri Dec 13 02:37:35 2013 (r259284) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "pic_if.h" @@ -66,10 +67,21 @@ volatile static u_quad_t ap_timebase; static u_int ipi_msg_cnt[32]; static struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; +int longfault(faultbuf, int); void machdep_ap_bootstrap(void) { + jmp_buf *restore; + + /* The following is needed for restoring from sleep. */ +#ifdef __powerpc64__ + /* Writing to the time base register is hypervisor-privileged */ + if (mfmsr() & PSL_HV) + mttb(0); +#else + mttb(0); +#endif /* Set up important bits on the CPU (HID registers, etc.) */ cpudep_ap_setup(); @@ -78,6 +90,11 @@ machdep_ap_bootstrap(void) PCPU_SET(awake, 1); __asm __volatile("msync; isync"); + restore = PCPU_GET(restore); + if (restore != NULL) { + longjmp(*restore, 1); + } + while (ap_letgo == 0) ; From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 03:09:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F9511B8; Fri, 13 Dec 2013 03:09:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 128921584; Fri, 13 Dec 2013 03:09:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBD39TJr016017; Fri, 13 Dec 2013 03:09:29 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBD39TTm016016; Fri, 13 Dec 2013 03:09:29 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201312130309.rBD39TTm016016@svn.freebsd.org> From: Benjamin Kaduk Date: Fri, 13 Dec 2013 03:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259286 - head/crypto/heimdal/lib/gssapi/krb5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 03:09:30 -0000 Author: bjk (doc committer) Date: Fri Dec 13 03:09:29 2013 New Revision: 259286 URL: http://svnweb.freebsd.org/changeset/base/259286 Log: Apply patch from upstream Heimdal for encoding fix RFC 4402 specifies the implementation of the gss_pseudo_random() function for the krb5 mechanism (and the C bindings therein). The implementation uses a PRF+ function that concatenates the output of individual krb5 pseudo-random operations produced with a counter and seed. The original implementation of this function in Heimdal incorrectly encoded the counter as a little-endian integer, but the RFC specifies the counter encoding as big-endian. The implementation initializes the counter to zero, so the first block of output (16 octets, for the modern AES enctypes 17 and 18) is unchanged. (RFC 4402 specifies that the counter should begin at 1, but both existing implementations begin with zero and it looks like the standard will be re-issued, with test vectors, to begin at zero.) This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6, from 13 October, 2013: % Fix krb5's gss_pseudo_random() (n is big-endian) % % The first enctype RFC3961 prf output length's bytes are correct because % the little- and big-endian representations of unsigned zero are the % same. The second block of output was wrong because the counter was not % being encoded as big-endian. % % This change could break applications. But those applications would not % have been interoperating with other implementations anyways (in % particular: MIT's). Approved by: hrs (mentor, src committer) MFC after: 3 days Modified: head/crypto/heimdal/lib/gssapi/krb5/prf.c Modified: head/crypto/heimdal/lib/gssapi/krb5/prf.c ============================================================================== --- head/crypto/heimdal/lib/gssapi/krb5/prf.c Fri Dec 13 02:47:41 2013 (r259285) +++ head/crypto/heimdal/lib/gssapi/krb5/prf.c Fri Dec 13 03:09:29 2013 (r259286) @@ -119,7 +119,7 @@ _gsskrb5_pseudo_random(OM_uint32 *minor_ while(dol > 0) { size_t tsize; - _gsskrb5_encode_om_uint32(num, input.data); + _gsskrb5_encode_be_om_uint32(num, input.data); ret = krb5_crypto_prf(context, crypto, &input, &output); if (ret) { @@ -133,7 +133,7 @@ _gsskrb5_pseudo_random(OM_uint32 *minor_ tsize = min(dol, output.length); memcpy(p, output.data, tsize); - p += output.length; + p += tsize; dol -= tsize; krb5_data_free(&output); num++; From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 05:54:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60EC3832; Fri, 13 Dec 2013 05:54:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D2C6149F; Fri, 13 Dec 2013 05:54:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBD5sQBe075549; Fri, 13 Dec 2013 05:54:26 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBD5sQTa075548; Fri, 13 Dec 2013 05:54:26 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312130554.rBD5sQTa075548@svn.freebsd.org> From: Justin Hibbits Date: Fri, 13 Dec 2013 05:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259287 - head/sys/powerpc/cpufreq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 05:54:26 -0000 Author: jhibbits Date: Fri Dec 13 05:54:25 2013 New Revision: 259287 URL: http://svnweb.freebsd.org/changeset/base/259287 Log: Some style(9) fixes MFC after: 1 month X-MFC with: r259284 Modified: head/sys/powerpc/cpufreq/pmufreq.c Modified: head/sys/powerpc/cpufreq/pmufreq.c ============================================================================== --- head/sys/powerpc/cpufreq/pmufreq.c Fri Dec 13 03:09:29 2013 (r259286) +++ head/sys/powerpc/cpufreq/pmufreq.c Fri Dec 13 05:54:25 2013 (r259287) @@ -106,9 +106,9 @@ pmufreq_identify(driver_t *driver, devic static int pmufreq_probe(device_t dev) { - uint32_t min_freq; struct pmufreq_softc *sc; phandle_t node; + uint32_t min_freq; if (resource_disabled("pmufreq", 0)) return (ENXIO); @@ -174,8 +174,7 @@ static int pmufreq_set(device_t dev, const struct cf_setting *set) { struct pmufreq_softc *sc; - int speed_sel; - int error; + int error, speed_sel; if (set == NULL) return (EINVAL); @@ -191,7 +190,7 @@ pmufreq_set(device_t dev, const struct c if (error == 0) sc->curfreq = set->freq; - return error; + return (error); } static int From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 07:56:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32E98E35; Fri, 13 Dec 2013 07:56:02 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 53AF21EF4; Fri, 13 Dec 2013 07:56:01 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id y10so1598434wgg.4 for ; Thu, 12 Dec 2013 23:55:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=YhLXsgppWYp/1pLjqocHuhfVuIXg/VrGvoGZKLfBZ5Y=; b=Vx+HGX+YtKiwUPrIUyDNqR9ghQCh9eDuZUWcUBXwMEhLoLHmGokz6fCbFh167nN1Ww crJBVae5aeMJGamtGPm0yS0s6a/M1AhFs2cnn/LnA1G4zy+SheK4gNkK6mrHQRyNo84g o8J/x9LRR2vEt5yjwdic2MFClDg6IpRC3KwENubTI3FEV4mKY18biVzEYG1AeIxY1p1h yZ3ICnmbK4LtH5Fa+2SP/eUVGNdJ9cudZS4CdFFlvPnmCeBuQ2ZltDkZthz12LI8b/Dv pPBTmcjIX9byqT2mDJsmYP3rV3aH+nihGUknHG2PMzxhmaB5lCR3CTv5Xy1d7XHzNHdI fsCA== MIME-Version: 1.0 X-Received: by 10.194.61.211 with SMTP id s19mr886995wjr.73.1386921359725; Thu, 12 Dec 2013 23:55:59 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.217.64.198 with HTTP; Thu, 12 Dec 2013 23:55:59 -0800 (PST) In-Reply-To: <201312122233.rBCMXW2Z015941@svn.freebsd.org> References: <201312122233.rBCMXW2Z015941@svn.freebsd.org> Date: Fri, 13 Dec 2013 11:55:59 +0400 X-Google-Sender-Auth: 6zhkMDtzAjb-QW3LTlyR8WqkCd0 Message-ID: Subject: Re: svn commit: r259280 - head/sbin/growfs From: Sergey Kandaurov To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 07:56:02 -0000 On 13 December 2013 02:33, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Dec 12 22:33:32 2013 > New Revision: 259280 > URL: http://svnweb.freebsd.org/changeset/base/259280 > > Log: > Somehow stable/10 branch contains correct version, but head doesn't. > > Modified: > head/sbin/growfs/growfs.8 > > Modified: head/sbin/growfs/growfs.8 > ============================================================================== > --- head/sbin/growfs/growfs.8 Thu Dec 12 22:04:47 2013 (r259279) > +++ head/sbin/growfs/growfs.8 Thu Dec 12 22:33:32 2013 (r259280) > @@ -116,7 +116,7 @@ The > utility first appeared in > .Fx 4.4 . > The ability to resize mounted filesystems was added in > -.Fx 9.2 . > +.Fx 10.0 . > .Sh AUTHORS > .An Christoph Herrmann Aq chm@FreeBSD.org > .An Thomas-Henning von Kamptz Aq tomsoft@FreeBSD.org It was merged in stable/9 before 9.2 in r246235. -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 08:14:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5527B6B7; Fri, 13 Dec 2013 08:14:54 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C58F5107F; Fri, 13 Dec 2013 08:14:52 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rBD8EoGn026386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 13 Dec 2013 12:14:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rBD8EooP026385; Fri, 13 Dec 2013 12:14:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 13 Dec 2013 12:14:50 +0400 From: Gleb Smirnoff To: Sergey Kandaurov Subject: Re: svn commit: r259280 - head/sbin/growfs Message-ID: <20131213081450.GK21368@FreeBSD.org> References: <201312122233.rBCMXW2Z015941@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 08:14:54 -0000 On Fri, Dec 13, 2013 at 11:55:59AM +0400, Sergey Kandaurov wrote: S> On 13 December 2013 02:33, Gleb Smirnoff wrote: S> > Author: glebius S> > Date: Thu Dec 12 22:33:32 2013 S> > New Revision: 259280 S> > URL: http://svnweb.freebsd.org/changeset/base/259280 S> > S> > Log: S> > Somehow stable/10 branch contains correct version, but head doesn't. S> > S> > Modified: S> > head/sbin/growfs/growfs.8 S> > S> > Modified: head/sbin/growfs/growfs.8 S> > ============================================================================== S> > --- head/sbin/growfs/growfs.8 Thu Dec 12 22:04:47 2013 (r259279) S> > +++ head/sbin/growfs/growfs.8 Thu Dec 12 22:33:32 2013 (r259280) S> > @@ -116,7 +116,7 @@ The S> > utility first appeared in S> > .Fx 4.4 . S> > The ability to resize mounted filesystems was added in S> > -.Fx 9.2 . S> > +.Fx 10.0 . S> > .Sh AUTHORS S> > .An Christoph Herrmann Aq chm@FreeBSD.org S> > .An Thomas-Henning von Kamptz Aq tomsoft@FreeBSD.org S> S> It was merged in stable/9 before 9.2 in r246235. After 9.2: http://svnweb.freebsd.org/base/release/9.2.0/sbin/growfs/ Thus, it first appeared in 10.0. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 08:31:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21B9BE0F; Fri, 13 Dec 2013 08:31:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02F6411D3; Fri, 13 Dec 2013 08:31:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBD8VDfX033832; Fri, 13 Dec 2013 08:31:13 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBD8VDpF033830; Fri, 13 Dec 2013 08:31:13 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201312130831.rBD8VDpF033830@svn.freebsd.org> From: Peter Grehan Date: Fri, 13 Dec 2013 08:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259302 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 08:31:14 -0000 Author: grehan Date: Fri Dec 13 08:31:13 2013 New Revision: 259302 URL: http://svnweb.freebsd.org/changeset/base/259302 Log: bhyve(8) man page. mdoc formatting and much input and review from Warren Block (wblock@). Reviewed by: many MFC after: 3 days Added: head/usr.sbin/bhyve/bhyve.8 (contents, props changed) Modified: head/usr.sbin/bhyve/Makefile Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Fri Dec 13 06:59:18 2013 (r259301) +++ head/usr.sbin/bhyve/Makefile Fri Dec 13 08:31:13 2013 (r259302) @@ -6,6 +6,7 @@ PROG= bhyve DEBUG_FLAGS= -g -O0 +MAN= bhyve.8 SRCS= acpi.c atpic.c bhyverun.c block_if.c consport.c dbgport.c elcr.c SRCS+= inout.c legacy_irq.c mem.c mevent.c mptbl.c pci_ahci.c SRCS+= pci_emul.c pci_hostbridge.c pci_lpc.c pci_passthru.c pci_virtio_block.c @@ -15,8 +16,6 @@ SRCS+= uart_emul.c virtio.c xmsr.c spinu .PATH: ${.CURDIR}/../../sys/amd64/vmm SRCS+= vmm_instruction_emul.c -NO_MAN= - DPADD= ${LIBVMMAPI} ${LIBMD} ${LIBUTIL} ${LIBPTHREAD} LDADD= -lvmmapi -lmd -lutil -lpthread Added: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/bhyve.8 Fri Dec 13 08:31:13 2013 (r259302) @@ -0,0 +1,299 @@ +.\" Copyright (c) 2013 Peter Grehan +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 12, 2013 +.Dt BHYVE 8 +.Os +.Sh NAME +.Nm bhyve +.Nd "run a guest operating system inside a virtual machine" +.Sh SYNOPSIS +.Nm +.Op Fl aehAHPW +.Op Fl c Ar numcpus +.Op Fl g Ar gdbport +.Op Fl p Ar pinnedcpu +.Op Fl s Ar slot,emulation Ns Op , Ns Ar conf +.Op Fl S Ar slot,emulation Ns Op , Ns Ar conf +.Op Fl l Ar lpcdev Ns Op , Ns Ar conf +.Ar vmname +.Sh DESCRIPTION +.Nm +is an experimental hypervisor that runs guest operating systems inside a +virtual machine. +.Pp +Parameters such as the number of virtual CPUs, amount of guest memory, and +I/O connectivity can be specified with command-line parameters. +.Pp +The guest operating system must be loaded with +.Xr bhyveload 4 +or a similar boot loader before running +.Nm . +.Pp +.Nm +runs until the guest operating system reboots or an unhandled hypervisor +exit is detected. +.Sh OPTIONS +.Bl -tag -width 10n +.It Fl a +Disallow use of the local APIC in X2APIC mode. +.It Fl A +Generate ACPI tables. +Required for +.Fx Ns /amd64 +guests. +.It Fl c Ar numcpus +Number of guest virtual CPUs. +The default is 1 and the maximum is 16. +.It Fl H +Yield the virtual CPU thread when a HLT instruction is detected. +If this option is not specified, virtual CPUs will use 100% of a host CPU. +.It Fl g Ar gdbport +For +.Fx Ns /amd64 kernels compiled with +.Cd "option bvmdebug" , +allow a remote kernel kgdb to be relayed to the guest kernel gdb stub +via a local IPv4 address and this port. +This option will be deprecated in a future version. +.It Fl p Ar pinnedcpu +Force guest virtual CPUs to be pinned to host CPUs. +Virtual CPU +.Em n +is pinned to host CPU +.Em pinnedcpu+n . +.It Fl P +Force the guest virtual CPU to exit when a PAUSE instruction is detected. +.It Fl W +Force virtio PCI device emulations to use MSI interrupts instead of MSI-X +interrupts. +.It Fl s Ar slot,emulation Ns Op , Ns Ar conf +Configure a virtual PCI slot and function. +.Pp +.Nm bhyve +provides PCI bus emulation and virtual devices that can be attached to +slots on the bus. +There are 32 available slots, with the option of providing up to 8 functions +per slot. +.Bl -tag -width 10n +.It Ar slot +.Ar pcislot Ns Op Ar :function +.Pp +The +.Ar pcislot +value is 0 to 31 and the optional function value is 0 to 7. +If not specified, the function value defaults to 0. +.It Ar emulation +.Bl -tag -width 10n +.It Li hostbridge | Li amd_hostbridge +.Pp +Provide a simple host bridge. +This is usually configured at slot 0, and is required by most guest +operating systems. +The +.Li amd_hostbridge +emulation is identical but uses a PCI vendor ID of +.Li AMD . +.It Li passthru +PCI pass-through device. +.It Li virtio-net +Virtio network interface. +.It Li virtio-block +Virtio block storage interface. +.It Li ahci-cd +AHCI controller attached to an ATAPI CD/DVD. +.It Li ahci-hd +AHCI controller attached to a SATA hard-drive. +.It Li uart +PCI 16550 serial device. +.It Li lpc +LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports. +.El +.It Op Ar conf +This optional parameter describes the backend for device emulations. +If +.Ar conf +is not specified, the device emulation has no backend and can be +considered unconnected. +.Pp +Network devices: +.Bl -tag -width 10n +.It Ar tapN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx +.It Ar vmnetN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx +.Pp +If +.Ar mac +is not specified, the MAC address is derived from a fixed OUI and the +remaining bytes from an MD5 hash of the slot and function numbers and +the device name. +.Pp +The MAC address is an ASCII string in +.Xr ethers 5 +format. +.El +.Pp +Block storage devices: +.Bl -tag -width 10n +.It Pa /filename Ns Oo , Ns Li nocache Oc Ns Oo , Ns Li direct Oc Ns Oo , Ns Li ro Oc +.It Pa /dev/xxx Ns Oo , Ns Ar nocache Oc Ns Oo , Ns Ar direct Oc Ns Oo , Ns Ar ro Oc +.Bl -tag -width 8n +.It Li nocache +Open the file with +.Dv O_DIRECT . +.It Li direct +Open the file using +.Dv O_SYNC . +.It Li ro +Force the file to be opened read-only. +.El +.Pp +The +.Li nocache , +.Li direct , +and +.Li ro +options are not available for virtio block devices. +.El +.Pp +TTY devices: +.Bl -tag -width 10n +.It Li stdio +Connect the serial port to the standard input and output of +the bhyve process. +.It Pa /dev/xxx +Use the host TTY device for serial port I/O. +.El +.Pp +Pass-through devices: +.Bl -tag -width 10n +.It Ns Ar slot Ns / Ns Ar bus Ns / Ns Ar function +Connect to a PCI device on the host at the selector described by +.Ar slot , +.Ar bus , +and +.Ar function +numbers. +.El +.Pp +The host device must have been reserved at boot-time using the +.Va pptdev +loader variable as described in +.Xr vmm 4 . +.El +.It Fl S Ar slot , Ns Ar emulation Ns Op , Ns Ar conf +Identical to the -s option except the device is instructed to use legacy +ISA addresses if possible. +Currently this only has an effect with the +.Li uart +device emulation. +This option will be deprecated in a future version. +.It Fl l Ar lpcdev Ns Op , Ns Ar conf +Allow devices behind the LPC PCI-ISA bridge to be configured. +The only supported devices are the TTY-class devices, +.Li com1 +and +.Li com2 . +.It Fl m Ar size Ns Op Ar K|k|M|m|G|g|T|t +Guest physical memory size in bytes. +This must be the same size that was given to +.Xr bhyveload 8 . +.Pp +The size argument may be suffixed with one of K, M, G or T (either upper +or lower case) to indicate a multiple of kilobytes, megabytes, gigabytes, +or terabytes. +If no suffix is given, the value is assumed to be in megabytes. +.It Fl e +Force +.Nm +to exit when a guest issues an access to an I/O port that is not emulated. +This is intended for debug purposes. +.It Fl h +Print help message and exit. +.It Ar vmname +Alphanumeric name of the guest. +This should be the same as that created by +.Xr bhyveload 8 . +.El +.Sh EXAMPLES +The guest operating system must have been loaded with +.Xr bhyveload 4 +or a similar boot loader before +.Xr bhyve 4 +can be run. +.Pp +To run a virtual machine with 1GB of memory, two virtual CPUs, a virtio +block device backed by the +.Pa /my/image +filesystem image, and a serial port for the console: +.Bd -literal -offset indent +bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ + -l com1,stdio -A -H -P -m 1G vm1 +.Ed +.Pp +Run a 24GB single-CPU virtual machine with three network ports, one of which +has a MAC address specified: +.Bd -literal -offset indent +bhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\ + -s 2:1,virtio-net,tap1 \\ + -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\ + -s 3,virtio-blk,/my/image -l com1,stdio \\ + -A -H -P -m 24G bigvm +.Ed +.Pp +Run an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI +CD-ROM, a single virtio network port, an AMD hostbridge, and the console +port connected to an +.Xr nmdm 4 +null-model device. +.Bd -literal -offset indent +bhyve -c 4 \e\ + -s 0,amd_hostbridge -s 1,lpc \\ + -s 1:0,ahci-hd,/images/disk.1 \\ + -s 1:1,ahci-hd,/images/disk.2 \\ + -s 1:2,ahci-hd,/images/disk.3 \\ + -s 1:3,ahci-hd,/images/disk.4 \\ + -s 1:4,ahci-hd,/images/disk.5 \\ + -s 1:5,ahci-hd,/images/disk.6 \\ + -s 1:6,ahci-hd,/images/disk.7 \\ + -s 1:7,ahci-hd,/images/disk.8 \\ + -s 2,ahci-cd,/images.install.iso \\ + -s 3,virtio-net,tap0 \\ + -l com1,/dev/nmdm0A \\ + -A -H -P -m 8G +.Ed +.Sh SEE ALSO +.Xr bhyve 4 , +.Xr nmdm 4 , +.Xr vmm 4 , +.Xr ethers 5 , +.Xr bhyveload 8 , +.Xr bhyvectl 8 +.Sh HISTORY +.Nm +first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Neel Natu Aq neel@freebsd.org +.An Peter Grehan Aq grehan@freebsd.org From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 08:48:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B2756A5; Fri, 13 Dec 2013 08:48:11 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0868912E2; Fri, 13 Dec 2013 08:48:10 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id D7F29730C; Fri, 13 Dec 2013 08:48:09 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 712051ACB; Fri, 13 Dec 2013 09:48:12 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin Subject: Re: svn commit: r259010 - in head/sys: conf powerpc/fpu References: <201312052149.rB5LnEcT011811@svn.freebsd.org> <201312051650.26379.jhb@freebsd.org> Date: Fri, 13 Dec 2013 09:48:12 +0100 In-Reply-To: <201312051650.26379.jhb@freebsd.org> (John Baldwin's message of "Thu, 5 Dec 2013 16:50:26 -0500") Message-ID: <86a9g5uofn.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 08:48:11 -0000 > LINT64 is yet another kernel config covered by 'make tinderbox', but not = by > the periodic tinderbox. It is probably worth adding to the periodic tind= erbox=20 > (someday it'd be nice if the two tinderboxes built the same set of things= ). Some day it would be nice if people talked to me directly instead of sniping from the sidelines. The root issue here is that "make LINT" is poorly implemented, so under some circumstances (including the tinderbox and, if I read the code correctly, 'make universe'), the LINT64 config is never generated. Oh, and 'make tinderbox' should die. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 18:46:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C14AACE for ; Fri, 13 Dec 2013 18:46:09 +0000 (UTC) Received: from nm32-vm0.bullet.mail.bf1.yahoo.com (nm32-vm0.bullet.mail.bf1.yahoo.com [72.30.239.136]) by mx1.freebsd.org (Postfix) with SMTP id B3331119E for ; Fri, 13 Dec 2013 18:46:08 +0000 (UTC) Received: from [98.139.212.150] by nm32.bullet.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 18:40:45 -0000 Received: from [98.139.211.203] by tm7.bullet.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 18:40:44 -0000 Received: from [127.0.0.1] by smtp212.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 18:40:44 -0000 X-Yahoo-Newman-Id: 975621.43504.bm@smtp212.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: dlvXta0VM1mki.5HzK8wPr0yOGktjPOy1boRaBPcidBeEFF HFAZWVz4LcQKmrTLwst6iShr7goiReWOnu3WPUlXjeeFJ72zUPtRu0BfRH4w Yob4zaUASW5I.mmj5UyBSw4lDE87s9oS2IK_mZ3xoorFAfG9gwvmuZ5nf67U VnDo2fMRhx.Q5An1NDiMvT1iJp7dc4xqRDzrOU3C5oIe_0jQ_nnZBBAKUoUD CRABBIHfV3stGS8JmBJgCWcLWiRPziQYA7CAytplSaeE2c2OGxMQHFrSvUQb .7vvEXU1NR40FzIGc2M42ZqIg.e3sPj79teTRMyC8jwXdsFDkYWMvsLqm1_G w7HgeMK4LgLk9Rq8ScRnN9SCFiX3smxR285iXk1Z0YeiGx5iVesp_6CdrZF5 WckBw0RJXxcpPvvLJ16cJe28Vk3nLuwGcG5diNmy3HL06kQL0_gfSkJqv2xi 1P35W44FaNm2d6s7x7FwH9W9HL2cu2SI1mWkiF3WlCKwSing1P3NetNvPfC5 339k.h80uEmYB2GaYgiYGlLaZ6NejjpSX23I2NMkElSFi7VKDJCEg3MdAH4y LHwI_KRckURzrQr5_ozj.S6054yiKil0oULJSVWXBeQqKzlxtzqS9iN0aNEd AIhAl8RFtJ6AXcC7ZSVeLlJHQzPnEc.UCYISzkY0E6E1SMYM4Wk_P90_WrHI 00wQ4dk9LYvcNI2Mnpis_ X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp212.mail.bf1.yahoo.com with SMTP; 13 Dec 2013 10:40:44 -0800 PST Message-ID: <52AB54A9.6040306@FreeBSD.org> Date: Fri, 13 Dec 2013 13:40:41 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Bruce Evans , Sean Bruno Subject: Re: svn commit: r258139 - head/contrib/gperf/src References: <201311141841.rAEIfwFU040620@svn.freebsd.org> <20131115145452.G954@besplex.bde.org> In-Reply-To: <20131115145452.G954@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 18:46:09 -0000 Hello; Sorry for the delay in looking into this issue. On 15.11.2013 00:06, Bruce Evans wrote: > On Thu, 14 Nov 2013, Sean Bruno wrote: > >> Log: >> Repair build after svn r258115 >> >> options.get_size_type() appears to return a const char *, so assume >> that >> its a string as oppose to *nothing*. I have no idea what apple's >> code is >> trying to do here: >> >> http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch >> > > It is trying to add an arg to a printf, while retaining the old behaviour > of printing nothing (now including the new arg) in some cases. The > compiler doesn't like this, since the new arg is unconditional while > the format is conditional. I think it is a compiler bug to warn in > this case. > > This commit replaces the warning (which is really about the compiler bug) > by a bug in gperf. But I think the bug is harmless because it is in > unreachable code. But then why have the unreachable code? (It is for > a default case which I think is unreacheable because all possible cases > that occur are handled individually.) > I decided not to merge that patch from Apple, after all it has limited (no) use at this time. For the code in current, I agree the warning is bogus and I think it would be better to revert Sean's workaround and set the WARNS level to zero. This code is unlikely to evolve further before it is removed from the tree and we won't really need extra warnings for it. Does that sound acceptable? The alternative would be, of course, just reverting the Apple patch. Regards, Pedro. >> Modified: head/contrib/gperf/src/output.cc >> ============================================================================== >> >> --- head/contrib/gperf/src/output.cc Thu Nov 14 16:10:21 2013 >> (r258138) >> +++ head/contrib/gperf/src/output.cc Thu Nov 14 18:41:58 2013 >> (r258139) >> @@ -779,7 +779,7 @@ Output::output_hash_function () const >> " register %s len;\n" : >> option[ANSIC] | option[CPLUSPLUS] ? >> "(register const char *str, register %s len)\n" : >> - "", option.get_size_type()); >> + "%s", option.get_size_type()); >> >> /* Note that when the hash function is called, it has already been >> verified >> that min_key_len <= len <= max_key_len. */ >> ... > > The old code hard-coded the type of the integer arg as "unsigned > int". This > is now spelled "%s" with a new arg. When there is no declaration at all, > then there is no integer arg and the declaration was spelled "". This is > still the correct spelling. Changing it to "%s" gives a syntax error > like > a bare "unsigned int" in the output. However, this case seems to be > unreachable. > > The printf() is rather complicated and fancily formatted, with the fancy > format partly destroyed by the svn mail bug of not quoting patches and > mail > programs then sometimes removing leading whitespace. It uses a nice > conditional ladder of the following form: > > printf( > case1 ? "decl1 %s len" : > case2 ? "decl2 %s len" : > case3 ? "decl3 %s len" : > /* default (unreachable?) */ "", typestr); > > where the formatting is much fancier than this (but is perfectly > consistent > except for the default case and now for the option at the end (the option > should be on a line by itself and not grouped with the complicated > conditional ladder, especially not with its unreachable part). > > The cases are: > > case1: K&R C > case2: plain C > case3: ANSI (sic) C or C++ > default: unreachable? > > and the generated code is now: > > K&R C: "register len'\n" > plain C: "register len;\n" > ANSI (sic) C or C++: "register len;\n" > unreachable?: "" /* syntax error */ > > Before this commit, the generated code was: > > K&R C: "register len'\n" > plain C: "register len;\n" > ANSI (sic) C or C++: "register len;\n" > unreachable?: "" /* no syntax error */ > > and a few days ago it was: > > K&R C: "register unsigned len'\n" > plain C: "register unsigned len;\n" > ANSI (sic) C or C++: "register unsigned len;\n" > unreachable?: "" /* no syntax error */ > > This particular declaration doesn't even depend on the language. The > printf() just groups it with another one for a pointer because this used > to be convenient. > > The supported languages are sort of documented in the man page. ANSI C > doesn't exist, and there have been several versions of Standard C since > it existed, but there is no special version-dependent support. It is > even less clear what plain C is. It seems to be for a 1980's C that > is not quite as old as K&R C -- according to the generated code, plain C > has const but not signed char, while K&R C has neither. I get the lack > of signed char from smallest_integral_type(). smallest_integral_type() > is fundamentally wrong since it uses the host SCHAR_MIN for building > K&R and plain C targets that don't have SCHAR_MIN and might even have > a different character size when running on the same hardware as gperf. > > Bruce From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 20:53:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BA65800; Fri, 13 Dec 2013 20:53:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48C131C9C; Fri, 13 Dec 2013 20:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBDKrWRj017932; Fri, 13 Dec 2013 20:53:32 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBDKrW1w017931; Fri, 13 Dec 2013 20:53:32 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201312132053.rBDKrW1w017931@svn.freebsd.org> From: Mateusz Guzik Date: Fri, 13 Dec 2013 20:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259330 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 20:53:32 -0000 Author: mjg Date: Fri Dec 13 20:53:31 2013 New Revision: 259330 URL: http://svnweb.freebsd.org/changeset/base/259330 Log: rlimit: add and utilize lim_shared MFC after: 2 weeks Modified: head/sys/kern/kern_resource.c Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Fri Dec 13 20:43:11 2013 (r259329) +++ head/sys/kern/kern_resource.c Fri Dec 13 20:53:31 2013 (r259330) @@ -80,6 +80,8 @@ static int donice(struct thread *td, str static struct uidinfo *uilookup(uid_t uid); static void ruxagg_locked(struct rusage_ext *rux, struct thread *td); +static __inline int lim_shared(struct plimit *limp); + /* * Resource controls and accounting. */ @@ -1129,6 +1131,14 @@ lim_hold(limp) return (limp); } +static __inline int +lim_shared(limp) + struct plimit *limp; +{ + + return (limp->pl_refcnt > 1); +} + void lim_fork(struct proc *p1, struct proc *p2) { @@ -1162,7 +1172,7 @@ lim_copy(dst, src) struct plimit *dst, *src; { - KASSERT(dst->pl_refcnt == 1, ("lim_copy to shared limit")); + KASSERT(!lim_shared(dst), ("lim_copy to shared limit")); bcopy(src->pl_rlimit, dst->pl_rlimit, sizeof(src->pl_rlimit)); } From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 20:54:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B95B2979; Fri, 13 Dec 2013 20:54:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A66A91CA5; Fri, 13 Dec 2013 20:54:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBDKsjtR018151; Fri, 13 Dec 2013 20:54:45 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBDKsjBN018150; Fri, 13 Dec 2013 20:54:45 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201312132054.rBDKsjBN018150@svn.freebsd.org> From: Mateusz Guzik Date: Fri, 13 Dec 2013 20:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259331 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 20:54:45 -0000 Author: mjg Date: Fri Dec 13 20:54:45 2013 New Revision: 259331 URL: http://svnweb.freebsd.org/changeset/base/259331 Log: rlimit: avoid unnecessary copying of rlimits If refcount is 1 just modify rlimits in place. MFC after: 2 weeks Modified: head/sys/kern/kern_resource.c Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Fri Dec 13 20:53:31 2013 (r259330) +++ head/sys/kern/kern_resource.c Fri Dec 13 20:54:45 2013 (r259331) @@ -679,21 +679,29 @@ kern_proc_setrlimit(struct thread *td, s limp->rlim_max = RLIM_INFINITY; oldssiz.rlim_cur = 0; - newlim = lim_alloc(); + newlim = NULL; PROC_LOCK(p); + if (lim_shared(p->p_limit)) { + PROC_UNLOCK(p); + newlim = lim_alloc(); + PROC_LOCK(p); + } oldlim = p->p_limit; alimp = &oldlim->pl_rlimit[which]; if (limp->rlim_cur > alimp->rlim_max || limp->rlim_max > alimp->rlim_max) if ((error = priv_check(td, PRIV_PROC_SETRLIMIT))) { PROC_UNLOCK(p); - lim_free(newlim); + if (newlim != NULL) + lim_free(newlim); return (error); } if (limp->rlim_cur > limp->rlim_max) limp->rlim_cur = limp->rlim_max; - lim_copy(newlim, oldlim); - alimp = &newlim->pl_rlimit[which]; + if (newlim != NULL) { + lim_copy(newlim, oldlim); + alimp = &newlim->pl_rlimit[which]; + } switch (which) { @@ -743,9 +751,11 @@ kern_proc_setrlimit(struct thread *td, s if (p->p_sysent->sv_fixlimit != NULL) p->p_sysent->sv_fixlimit(limp, which); *alimp = *limp; - p->p_limit = newlim; + if (newlim != NULL) + p->p_limit = newlim; PROC_UNLOCK(p); - lim_free(oldlim); + if (newlim != NULL) + lim_free(oldlim); if (which == RLIMIT_STACK) { /* From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 20:57:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7239DB60; Fri, 13 Dec 2013 20:57:39 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4744B1CC7; Fri, 13 Dec 2013 20:57:39 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D36C9B9A3; Fri, 13 Dec 2013 15:57:37 -0500 (EST) From: John Baldwin To: "Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?=" Subject: Re: svn commit: r259010 - in head/sys: conf powerpc/fpu Date: Fri, 13 Dec 2013 12:31:04 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201312052149.rB5LnEcT011811@svn.freebsd.org> <201312051650.26379.jhb@freebsd.org> <86a9g5uofn.fsf@nine.des.no> In-Reply-To: <86a9g5uofn.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201312131231.04749.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 13 Dec 2013 15:57:37 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 20:57:39 -0000 On Friday, December 13, 2013 3:48:12 am Dag-Erling Sm=C3=B8rgrav wrote: > > LINT64 is yet another kernel config covered by 'make tinderbox', but no= t by > > the periodic tinderbox. It is probably worth adding to the periodic ti= nderbox=20 > > (someday it'd be nice if the two tinderboxes built the same set of thin= gs). >=20 > Some day it would be nice if people talked to me directly instead of > sniping from the sidelines. Ah, but when people have raised this exact issue before (that tcbuild and 'make tinderbox' build different things), you have blown them off repeatedl= y. > The root issue here is that "make LINT" is poorly implemented, so under > some circumstances (including the tinderbox and, if I read the code > correctly, 'make universe'), the LINT64 config is never generated. Agreed on that front. > Oh, and 'make tinderbox' should die. No, it is very developer friendly as it Just Works(tm) as a single command from an existing source tree checkout. It also happens to build more of the tree than the periodic tinderbox (by building more kernel configs, albeit doing quite a bit of duplicate work for platforms like arm in the process). =2D-=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 21:49:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32640CD1; Fri, 13 Dec 2013 21:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 04E4010FF; Fri, 13 Dec 2013 21:49:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBDLnfEo036923; Fri, 13 Dec 2013 21:49:41 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBDLnfYB036922; Fri, 13 Dec 2013 21:49:41 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201312132149.rBDLnfYB036922@svn.freebsd.org> From: Alan Somers Date: Fri, 13 Dec 2013 21:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259339 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 21:49:42 -0000 Author: asomers Date: Fri Dec 13 21:49:41 2013 New Revision: 259339 URL: http://svnweb.freebsd.org/changeset/base/259339 Log: sbin/devd/devd.cc Increase the size of devd's client socket's send buffer from the default (8k) to 128k. This prevents clients from getting POLLHUPped during event storms. For example, during zpool creation, the kernel emits a resource.fs.zfs.statechange event for every vdev in the pool. A 128k buffer is large enough to hold the statechange events for a pool with nearly 800 drives. Reviewed by: ian, imp Approved by: ken (mentor) Sponsored by: Spectra Logic Corp MFC after: 4 weeks Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Fri Dec 13 21:46:53 2013 (r259338) +++ head/sbin/devd/devd.cc Fri Dec 13 21:49:41 2013 (r259339) @@ -104,6 +104,19 @@ __FBSDID("$FreeBSD$"); #define CF "/etc/devd.conf" #define SYSCTL "hw.bus.devctl_disable" +/* + * Since the client socket is nonblocking, we must increase its send buffer to + * handle brief event storms. On FreeBSD, AF_UNIX sockets don't have a receive + * buffer, so the client can't increate the buffersize by itself. + * + * For example, when creating a ZFS pool, devd emits one 165 character + * resource.fs.zfs.statechange message for each vdev in the pool. A 64k + * buffer has enough space for almost 400 drives, which would be very large but + * not impossibly large pool. A 128k buffer has enough space for 794 drives, + * which is more than can fit in a rack with modern technology. + */ +#define CLIENT_BUFSIZE 131072 + using namespace std; extern FILE *yyin; @@ -892,6 +905,7 @@ void new_client(int fd) { int s; + int sndbuf_size; /* * First go reap any zombie clients, then accept the connection, and @@ -901,10 +915,15 @@ new_client(int fd) check_clients(); s = accept(fd, NULL, NULL); if (s != -1) { + sndbuf_size = CLIENT_BUFSIZE; + if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, + sizeof(sndbuf_size))) + err(1, "setsockopt"); shutdown(s, SHUT_RD); clients.push_back(s); ++num_clients; - } + } else + err(1, "accept"); } static void From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 21:50:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31DEEE0C; Fri, 13 Dec 2013 21:50:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1EAC01106; Fri, 13 Dec 2013 21:50:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBDLo3Oj037079; Fri, 13 Dec 2013 21:50:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBDLo3b8037078; Fri, 13 Dec 2013 21:50:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201312132150.rBDLo3b8037078@svn.freebsd.org> From: Eitan Adler Date: Fri, 13 Dec 2013 21:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259340 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 21:50:04 -0000 Author: eadler Date: Fri Dec 13 21:50:03 2013 New Revision: 259340 URL: http://svnweb.freebsd.org/changeset/base/259340 Log: getopt_long.3: wording quibbles - Make wording more clear: "is expect" vs "is expected" [1] - Remove extraneous trailing period.. Reported by: dim [1] Modified: head/lib/libc/stdlib/getopt_long.3 Modified: head/lib/libc/stdlib/getopt_long.3 ============================================================================== --- head/lib/libc/stdlib/getopt_long.3 Fri Dec 13 21:49:41 2013 (r259339) +++ head/lib/libc/stdlib/getopt_long.3 Fri Dec 13 21:50:03 2013 (r259340) @@ -130,11 +130,11 @@ field should be one of: .Pp .Bl -tag -width ".Dv optional_argument" -offset indent -compact .It Dv no_argument -no argument to the option is expect +no argument to the option is expected .It Dv required_argument an argument to the option is required .It Dv optional_argument -an argument to the option may be presented. +an argument to the option may be presented .El .Pp If From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 22:11:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51348AA1 for ; Fri, 13 Dec 2013 22:11:27 +0000 (UTC) Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com [209.85.215.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA0E612BD for ; Fri, 13 Dec 2013 22:11:26 +0000 (UTC) Received: by mail-ea0-f171.google.com with SMTP id h10so1123690eak.2 for ; Fri, 13 Dec 2013 14:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:from:date:to:cc :message-id; bh=7fs/zRRESkn1VuT3YP+pcixHx2+VcTXfMjkINF1dBkI=; b=KcSghzD+DqUFsYgAtWiHoWyy00GxXBE9fFx5nOhfWTuz9Eq/hRMcaP55Q6/UdxXq9i h8IMag5WFgBVcjhFnKWqJybYUzotNeviAKtwA1XFGbx423i7WR2sNbVK6tK9fkzfjmDI NC/CnloXyP8p93IQTul4avWavog+bYRBDNKC7XtnBPPxYqCwIQ9OdSuN91Yszq4e7BFW EFN0krKD9VF52lQ3y2J8CoFMOVE0JkU8tDqYU74tT82Li8LcCV0qay/eQFHd9AUZuwCG fxJtTYmFpVJQqWSqS+PFDBya4plmFvoyICC5T6MlYTW7jXCjs+ABhNv3k8dUl8OiFxDe nWgg== X-Gm-Message-State: ALoCoQlSWqOqKP95jm/mQDoNDYh142KxOwZPFBRRI0Rb4NUPRzqE4DGta9we8d4UJaeFj4Y3oltU X-Received: by 10.14.204.135 with SMTP id h7mr5092385eeo.104.1386972679221; Fri, 13 Dec 2013 14:11:19 -0800 (PST) Received: from [46.96.136.173] ([46.96.136.173]) by mx.google.com with ESMTPSA id v1sm11452290eef.9.2013.12.13.14.11.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:11:18 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <20131212190230.GU59496@kib.kiev.ua> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> <20131212190230.GU59496@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: svn commit: r259261 - head/sys/dev/drm2 From: Aleksandr Rybalko Date: Sat, 14 Dec 2013 00:11:01 +0200 To: Konstantin Belousov , Aleksandr Rybalko Message-ID: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 22:11:27 -0000 Konstantin Belousov написав(ла): >On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote: >> Author: ray >> Date: Thu Dec 12 14:49:26 2013 >> New Revision: 259261 >> URL: http://svnweb.freebsd.org/changeset/base/259261 >> >> Log: >> Do not try to probe/attach if attempt to add fbd child are failed. >> >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/sys/dev/drm2/drm_fb_helper.c >> >> Modified: head/sys/dev/drm2/drm_fb_helper.c >> >============================================================================== >> --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 >2013 (r259260) >> +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 >2013 (r259261) >> @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct >> >> kdev = fb_helper->dev->device; >> fbd = device_add_child(kdev, "fbd", device_get_unit(kdev)); >> - ret = device_probe_and_attach(fbd); >> + if (fbd != NULL) >> + ret = device_probe_and_attach(fbd); >> + else >> + ret = ENODEV; >This must be -ENODEV, since linux layer operates on negative values for >error. The error is negated in the drm layer, which would result in >non-existent errno returned to FreeBSD code. It is not actually return code, but only value to show in error message few lines later. ENODEV just value for case no device attached. That error message appear only if kernel configuration include device vt. (planning for syscons too, maybe). > >Also, the #ifdef __FreeBSD braces in the file are not useful, please >remove them. >> #ifdef DEV_VT >> if (ret != 0) >> DRM_ERROR("Failed to attach fbd device: %d\n", ret); Should we with Jean have to remove all #ifdef __FreeBSD and __Linux over whole DRM2 code, to reduce differences with linux code? Thanks! WBW ------ Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 22:58:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3F34B18; Fri, 13 Dec 2013 22:58:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A683216F0; Fri, 13 Dec 2013 22:58:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBDMwwPN063200; Fri, 13 Dec 2013 22:58:58 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBDMwwI3063198; Fri, 13 Dec 2013 22:58:58 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201312132258.rBDMwwI3063198@svn.freebsd.org> From: Alan Somers Date: Fri, 13 Dec 2013 22:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259362 - in head: etc sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 22:58:58 -0000 Author: asomers Date: Fri Dec 13 22:58:57 2013 New Revision: 259362 URL: http://svnweb.freebsd.org/changeset/base/259362 Log: sbin/devd/devd.cc Promoting the SIGINFO handler's log message from LOG_INFO to LOG_NOTICE, and promoting the "Processing event ..." message from LOG_DEBUG to LOG_INFO. Setting the logfile to LOG_NOTICE with this change will have the same result as setting it to LOG_INFO without this change. Setting it to LOG_INFO with this change will include the useful "Processing event ..." messages that were previously at LOG_DEBUG, without including useless messages like "Pushing table". The intent of this change is that one can log "Processing event ..." without logging "Pushing table" and related messages that are sent for every event. The number of lines actually logged is reduced by about 75% by making this change and setting syslog to LOG_INFO vs setting syslog to LOG_DEBUG. etc/syslog.conf Changing the recommended loglevel to notice instead of info. Sponsored by: Spectra Logic Corp MFC after: 4 weeks Modified: head/etc/syslog.conf head/sbin/devd/devd.cc Modified: head/etc/syslog.conf ============================================================================== --- head/etc/syslog.conf Fri Dec 13 22:52:59 2013 (r259361) +++ head/etc/syslog.conf Fri Dec 13 22:58:57 2013 (r259362) @@ -30,7 +30,7 @@ cron.* /var/log/cron # news.notice /var/log/news/news.notice # Uncomment this if you wish to see messages produced by devd # !devd -# *.>=info /var/log/devd.log +# *.>=notice /var/log/devd.log !ppp *.* /var/log/ppp.log !* Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Fri Dec 13 22:52:59 2013 (r259361) +++ head/sbin/devd/devd.cc Fri Dec 13 22:58:57 2013 (r259362) @@ -772,7 +772,7 @@ process_event(char *buffer) char *sp; sp = buffer + 1; - devdlog(LOG_DEBUG, "Processing event '%s'\n", buffer); + devdlog(LOG_INFO, "Processing event '%s'\n", buffer); type = *buffer++; cfg.push_var_table(); // No match doesn't have a device, and the format is a little @@ -989,7 +989,7 @@ event_loop(void) } rv = select(max_fd, &fds, NULL, NULL, &tv); if (got_siginfo) { - devdlog(LOG_INFO, "Events received so far=%u\n", + devdlog(LOG_NOTICE, "Events received so far=%u\n", total_events); got_siginfo = 0; } From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 03:08:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E654720; Sat, 14 Dec 2013 03:08:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 89DF41A14; Sat, 14 Dec 2013 03:08:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBE384jQ061688; Sat, 14 Dec 2013 03:08:04 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBE3835p061682; Sat, 14 Dec 2013 03:08:03 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201312140308.rBE3835p061682@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 14 Dec 2013 03:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259382 - in head/sys/dev/cxgbe: . common tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 03:08:04 -0000 Author: np Date: Sat Dec 14 03:08:03 2013 New Revision: 259382 URL: http://svnweb.freebsd.org/changeset/base/259382 Log: Read card capabilities after firmware initialization, instead of setting them up as part of firmware initialization (which the driver gets to do only if it's the master driver). Read the range of tids available for the ETHOFLD functionality if it's enabled. New is_ftid() and is_etid() functions to test whether a tid falls within the range of filter tids or ETHOFLD tids respectively. MFC after: 2 weeks Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Sat Dec 14 01:35:57 2013 (r259381) +++ head/sys/dev/cxgbe/common/common.h Sat Dec 14 03:08:03 2013 (r259382) @@ -267,8 +267,10 @@ struct adapter_params { unsigned short a_wnd[NCCTRL_WIN]; unsigned short b_wnd[NCCTRL_WIN]; - unsigned int mc_size; /* MC memory size */ - unsigned int nfilters; /* size of filter region */ + u_int ftid_min; + u_int ftid_max; + u_int etid_min; + u_int netids; unsigned int cim_la_size; @@ -280,8 +282,10 @@ struct adapter_params { unsigned int offload:1; /* hw is TOE capable, fw has divvied up card resources for TOE operation. */ unsigned int bypass:1; /* this is a bypass card */ + unsigned int ethoffload:1; unsigned int ofldq_wr_cred; + unsigned int eo_wr_cred; }; #define CHELSIO_T4 0x4 @@ -318,11 +322,28 @@ struct link_config { #define for_each_port(adapter, iter) \ for (iter = 0; iter < (adapter)->params.nports; ++iter) +static inline int is_ftid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.ftid_min && tid <= sc->params.ftid_max); +} + +static inline int is_etid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.etid_min); +} + static inline int is_offload(const struct adapter *adap) { return adap->params.offload; } +static inline int is_ethoffload(const struct adapter *adap) +{ + return adap->params.ethoffload; +} + static inline int chip_id(struct adapter *adap) { return adap->params.chipid; Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Sat Dec 14 01:35:57 2013 (r259381) +++ head/sys/dev/cxgbe/offload.h Sat Dec 14 03:08:03 2013 (r259382) @@ -101,6 +101,11 @@ struct tid_info { u_int nftids; u_int ftid_base; u_int ftids_in_use; + + struct mtx etid_lock __aligned(CACHE_LINE_SIZE); + struct etid_entry *etid_tab; + u_int netids; + u_int etid_base; }; struct t4_range { Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Dec 14 01:35:57 2013 (r259381) +++ head/sys/dev/cxgbe/t4_main.c Sat Dec 14 03:08:03 2013 (r259382) @@ -2359,7 +2359,6 @@ use_config_on_flash: #define LIMIT_CAPS(x) do { \ caps.x &= htobe16(t4_##x##_allowed); \ - sc->x = htobe16(caps.x); \ } while (0) /* @@ -2461,6 +2460,8 @@ get_params__post_init(struct adapter *sc sc->sge.eq_start = val[1]; sc->tids.ftid_base = val[2]; sc->tids.nftids = val[3] - val[2] + 1; + sc->params.ftid_min = val[2]; + sc->params.ftid_max = val[3]; sc->vres.l2t.start = val[4]; sc->vres.l2t.size = val[5] - val[4] + 1; KASSERT(sc->vres.l2t.size <= L2T_SIZE, @@ -2479,7 +2480,35 @@ get_params__post_init(struct adapter *sc return (rc); } - if (caps.toecaps) { +#define READ_CAPS(x) do { \ + sc->x = htobe16(caps.x); \ +} while (0) + READ_CAPS(linkcaps); + READ_CAPS(niccaps); + READ_CAPS(toecaps); + READ_CAPS(rdmacaps); + READ_CAPS(iscsicaps); + READ_CAPS(fcoecaps); + + if (sc->niccaps & FW_CAPS_CONFIG_NIC_ETHOFLD) { + param[0] = FW_PARAM_PFVF(ETHOFLD_START); + param[1] = FW_PARAM_PFVF(ETHOFLD_END); + param[2] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 3, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query NIC parameters: %d.\n", rc); + return (rc); + } + sc->tids.etid_base = val[0]; + sc->params.etid_min = val[0]; + sc->tids.netids = val[1] - val[0] + 1; + sc->params.netids = sc->tids.netids; + sc->params.eo_wr_cred = val[2]; + sc->params.ethoffload = 1; + } + + if (sc->toecaps) { /* query offload-related parameters */ param[0] = FW_PARAM_DEV(NTID); param[1] = FW_PARAM_PFVF(SERVER_START); @@ -2502,7 +2531,7 @@ get_params__post_init(struct adapter *sc sc->params.ofldq_wr_cred = val[5]; sc->params.offload = 1; } - if (caps.rdmacaps) { + if (sc->rdmacaps) { param[0] = FW_PARAM_PFVF(STAG_START); param[1] = FW_PARAM_PFVF(STAG_END); param[2] = FW_PARAM_PFVF(RQ_START); @@ -2541,7 +2570,7 @@ get_params__post_init(struct adapter *sc sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; } - if (caps.iscsicaps) { + if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); param[1] = FW_PARAM_PFVF(ISCSI_END); rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); @@ -4487,6 +4516,7 @@ cxgbe_sysctls(struct port_info *pi) struct sysctl_ctx_list *ctx; struct sysctl_oid *oid; struct sysctl_oid_list *children; + struct adapter *sc = pi->adapter; ctx = device_get_sysctl_ctx(pi->dev); @@ -4516,7 +4546,7 @@ cxgbe_sysctls(struct port_info *pi) &pi->first_txq, 0, "index of first tx queue"); #ifdef TCP_OFFLOAD - if (is_offload(pi->adapter)) { + if (is_offload(sc)) { SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD, &pi->nofldrxq, 0, "# of rx queues for offloaded TCP connections"); @@ -4555,7 +4585,7 @@ cxgbe_sysctls(struct port_info *pi) #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ - CTLTYPE_U64 | CTLFLAG_RD, pi->adapter, reg, \ + CTLTYPE_U64 | CTLFLAG_RD, sc, reg, \ sysctl_handle_t4_reg64, "QU", desc) SYSCTL_ADD_T4_REG64(pi, "tx_octets", "# of octets in good frames", @@ -6125,6 +6155,11 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) t->ftid_base + t->nftids - 1); } + if (t->netids) { + sbuf_printf(sb, "ETID range: %u-%u\n", t->etid_base, + t->etid_base + t->netids - 1); + } + sbuf_printf(sb, "HW TID usage: %u IP users, %u IPv6 users", t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV4), t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV6)); @@ -7156,14 +7191,17 @@ t4_filter_rpl(struct sge_iq *iq, const s struct adapter *sc = iq->adapter; const struct cpl_set_tcb_rpl *rpl = (const void *)(rss + 1); unsigned int idx = GET_TID(rpl); + unsigned int rc; + struct filter_entry *f; KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__, rss->opcode)); - if (idx >= sc->tids.ftid_base && - (idx -= sc->tids.ftid_base) < sc->tids.nftids) { - unsigned int rc = G_COOKIE(rpl->cookie); - struct filter_entry *f = &sc->tids.ftid_tab[idx]; + if (is_ftid(sc, idx)) { + + idx -= sc->tids.ftid_base; + f = &sc->tids.ftid_tab[idx]; + rc = G_COOKIE(rpl->cookie); mtx_lock(&sc->tids.ftid_lock); if (rc == FW_FILTER_WR_FLT_ADDED) { Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sat Dec 14 01:35:57 2013 (r259381) +++ head/sys/dev/cxgbe/t4_sge.c Sat Dec 14 03:08:03 2013 (r259382) @@ -2901,7 +2901,6 @@ alloc_wrq(struct adapter *sc, struct por SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "unstalled", CTLFLAG_RD, &wrq->eq.unstalled, 0, "# of times queue recovered after stall"); - return (rc); } Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Dec 14 01:35:57 2013 (r259381) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Dec 14 03:08:03 2013 (r259382) @@ -1299,18 +1299,18 @@ do_rx_data(struct sge_iq *iq, const stru #define V_CPL_FW4_ACK_OPCODE(x) ((x) << S_CPL_FW4_ACK_OPCODE) #define G_CPL_FW4_ACK_OPCODE(x) \ (((x) >> S_CPL_FW4_ACK_OPCODE) & M_CPL_FW4_ACK_OPCODE) - + #define S_CPL_FW4_ACK_FLOWID 0 #define M_CPL_FW4_ACK_FLOWID 0xffffff #define V_CPL_FW4_ACK_FLOWID(x) ((x) << S_CPL_FW4_ACK_FLOWID) #define G_CPL_FW4_ACK_FLOWID(x) \ (((x) >> S_CPL_FW4_ACK_FLOWID) & M_CPL_FW4_ACK_FLOWID) - + #define S_CPL_FW4_ACK_CR 24 #define M_CPL_FW4_ACK_CR 0xff #define V_CPL_FW4_ACK_CR(x) ((x) << S_CPL_FW4_ACK_CR) #define G_CPL_FW4_ACK_CR(x) (((x) >> S_CPL_FW4_ACK_CR) & M_CPL_FW4_ACK_CR) - + #define S_CPL_FW4_ACK_SEQVAL 0 #define M_CPL_FW4_ACK_SEQVAL 0x1 #define V_CPL_FW4_ACK_SEQVAL(x) ((x) << S_CPL_FW4_ACK_SEQVAL) @@ -1437,8 +1437,7 @@ do_set_tcb_rpl(struct sge_iq *iq, const ("%s: unexpected opcode 0x%x", __func__, opcode)); KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); - if (tid >= sc->tids.ftid_base && - tid < sc->tids.ftid_base + sc->tids.nftids) + if (is_ftid(sc, tid)) return (t4_filter_rpl(iq, rss, m)); /* TCB is a filter */ CXGBE_UNIMPLEMENTED(__func__); From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 11:27:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AED6D11; Sat, 14 Dec 2013 11:27:22 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A30B1AEF; Sat, 14 Dec 2013 11:27:21 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBEBRGpk017902; Sat, 14 Dec 2013 13:27:16 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBEBRGpk017902 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBEBRF6d017901; Sat, 14 Dec 2013 13:27:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 14 Dec 2013 13:27:15 +0200 From: Konstantin Belousov To: Aleksandr Rybalko Subject: Re: svn commit: r259261 - head/sys/dev/drm2 Message-ID: <20131214112715.GA59496@kib.kiev.ua> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> <20131212190230.GU59496@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sXL3peJHel3veXWV" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 11:27:22 -0000 --sXL3peJHel3veXWV Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 14, 2013 at 12:11:01AM +0200, Aleksandr Rybalko wrote: > Konstantin Belousov =CE=C1=D0=C9=D3=C1=D7(=CC=C1): > >On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote: > >> Author: ray > >> Date: Thu Dec 12 14:49:26 2013 > >> New Revision: 259261 > >> URL: http://svnweb.freebsd.org/changeset/base/259261 > >>=20 > >> Log: > >> Do not try to probe/attach if attempt to add fbd child are failed. > >> =20 > >> Sponsored by: The FreeBSD Foundation > >>=20 > >> Modified: > >> head/sys/dev/drm2/drm_fb_helper.c > >>=20 > >> Modified: head/sys/dev/drm2/drm_fb_helper.c > >> > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > >> --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 > >2013 (r259260) > >> +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 > >2013 (r259261) > >> @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct > >> =20 > >> kdev =3D fb_helper->dev->device; > >> fbd =3D device_add_child(kdev, "fbd", device_get_unit(kdev)); > >> - ret =3D device_probe_and_attach(fbd); > >> + if (fbd !=3D NULL)=20 > >> + ret =3D device_probe_and_attach(fbd); > >> + else > >> + ret =3D ENODEV; > >This must be -ENODEV, since linux layer operates on negative values for > >error. The error is negated in the drm layer, which would result in > >non-existent errno returned to FreeBSD code. >=20 > It is not actually return code, but only value to show in error message f= ew lines later. ENODEV just value for case no device attached. > That error message appear only if kernel configuration include device vt.= (planning for syscons too, maybe). Ok. I looked around some more, and I think that the call to drm_fb_helper_set_par() is required to properly initialize crtc. See the #ifdef-ed Linux code. >=20 > > > >Also, the #ifdef __FreeBSD braces in the file are not useful, please > >remove them. > >> #ifdef DEV_VT > >> if (ret !=3D 0) > >> DRM_ERROR("Failed to attach fbd device: %d\n", ret); >=20 > Should we with Jean have to remove all #ifdef __FreeBSD and __Linux over = whole DRM2 code, to reduce differences with linux code? >=20 The #ifdefs should be removed. The removal would not reduce difference with the upstream, but this is not the point anyway. --sXL3peJHel3veXWV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSrECTAAoJEJDCuSvBvK1BkDsP/3lIek0TkT5/6knpoiTx4fBf jJkSPcNrdBCxVM8LYfTyOnkpVyiNCzKQyWrDmbu0r2mo547adv194vqD6bW0ENJB n91ZSuneCv6QS6RPSMU6MwPZDCPudTfwZSVMp9qeozvLsSvndWDXXMYHJ8PSVn6L VT+mMZ/pUgPhw9h8WKtnH8/e+OBj9sMuWdgLFfM7PwWho1uLd9Z/kcWbw8A6KeQo YDzHJzjPddq2IEpa3bBfqJTWEdsnkCW2BT9RF29ZMxfc+y9wMZbeKuwmnsEJDqka /pP77/K47JefiufEtG7alYII7tVqOaY7aeU1cnTmpePsoGhxz9178529AQ/DxzNS owRaKkOtCyWU5w+jSZq0kPQOoyR5aiJDJKvUa0mNW334iH0lKSWhBUI1T24eUI9r VORfqcLha4zvAUj7m5USRc5xTMcjMxLFZVroJ3or3QIBO4GnlQUU9Ki1ig5HGFfs 55wmXrteM9qhT/TGHODR9U50B7V01ihrh5I754ptJlXbh9jSlhECIS3cxNg4D0xN L+XEpmqi7yuoOWYgLEfkCQoo+NYxpe6qaJdRHffYA+4WgewN2YV5vkTZSKbSvct5 CL3nxtLgIcEJry/5BgFBowFLjM/8wpSIb4E/zXVpUYEvpkzF2eyEfm/lq4cPXKcP ShVFAbv5PcS+fz6Yup5G =4J5O -----END PGP SIGNATURE----- --sXL3peJHel3veXWV-- From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 18:50:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B77C7715; Sat, 14 Dec 2013 18:50:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A08F15C0; Sat, 14 Dec 2013 18:50:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBEIo0ui003116; Sat, 14 Dec 2013 18:50:00 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBEIo06F003098; Sat, 14 Dec 2013 18:50:00 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201312141850.rBEIo06F003098@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 14 Dec 2013 18:50:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259393 - head/sys/dev/an X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 18:50:00 -0000 Author: gavin Date: Sat Dec 14 18:49:59 2013 New Revision: 259393 URL: http://svnweb.freebsd.org/changeset/base/259393 Log: Fix several panics when initialization of an ISA or PC-CARD device fails: o Assign sc->an_dev in an_probe() (which isn't really a probe function in the standard newbus sense) as we may need it for printing errors. o Use device_printf() rather than if_printf() in an_reset() - this is called from an_probe() long before the ifp structure is initialised in an_attach(). o Initialize the ifp structure early in an_attach() as we use if_printf() in cases where allocation of descriptors etc fails. MFC after: 3 days Modified: head/sys/dev/an/if_an.c head/sys/dev/an/if_an_pccard.c Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Sat Dec 14 17:46:58 2013 (r259392) +++ head/sys/dev/an/if_an.c Sat Dec 14 18:49:59 2013 (r259393) @@ -358,6 +358,7 @@ an_probe(device_t dev) CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), 0); CSR_WRITE_2(sc, AN_EVENT_ACK(sc->mpi350), 0xFFFF); + sc->an_dev = dev; mtx_init(&sc->an_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); AN_LOCK(sc); @@ -686,6 +687,9 @@ an_attach(struct an_softc *sc, int flags device_printf(sc->an_dev, "can not if_alloc()\n"); goto fail; } + ifp->if_softc = sc; + if_initname(ifp, device_get_name(sc->an_dev), + device_get_unit(sc->an_dev)); sc->an_gone = 0; sc->an_associated = 0; @@ -759,9 +763,6 @@ an_attach(struct an_softc *sc, int flags #endif AN_UNLOCK(sc); - ifp->if_softc = sc; - if_initname(ifp, device_get_name(sc->an_dev), - device_get_unit(sc->an_dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = an_ioctl; ifp->if_start = an_start; @@ -1388,7 +1389,7 @@ an_reset(struct an_softc *sc) an_cmd(sc, AN_CMD_NOOP2, 0); if (an_cmd(sc, AN_CMD_FORCE_SYNCLOSS, 0) == ETIMEDOUT) - if_printf(sc->an_ifp, "reset failed\n"); + device_printf(sc->an_dev, "reset failed\n"); an_cmd(sc, AN_CMD_DISABLE, 0); Modified: head/sys/dev/an/if_an_pccard.c ============================================================================== --- head/sys/dev/an/if_an_pccard.c Sat Dec 14 17:46:58 2013 (r259392) +++ head/sys/dev/an/if_an_pccard.c Sat Dec 14 18:49:59 2013 (r259393) @@ -141,8 +141,6 @@ an_pccard_attach(device_t dev) an_alloc_irq(dev, sc->irq_rid, 0); - sc->an_dev = dev; - error = an_attach(sc, flags); if (error) goto fail; From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 19:01:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F03B7930; Sat, 14 Dec 2013 19:01:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC988168C; Sat, 14 Dec 2013 19:01:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBEJ1O59009247; Sat, 14 Dec 2013 19:01:24 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBEJ1ONI009246; Sat, 14 Dec 2013 19:01:24 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312141901.rBEJ1ONI009246@svn.freebsd.org> From: Justin Hibbits Date: Sat, 14 Dec 2013 19:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259394 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 19:01:25 -0000 Author: jhibbits Date: Sat Dec 14 19:01:24 2013 New Revision: 259394 URL: http://svnweb.freebsd.org/changeset/base/259394 Log: Rebase the PMC indices at 1, since PMC_SOFT is at 0. MFC after: 1 week Modified: head/sys/powerpc/include/pmc_mdep.h Modified: head/sys/powerpc/include/pmc_mdep.h ============================================================================== --- head/sys/powerpc/include/pmc_mdep.h Sat Dec 14 18:49:59 2013 (r259393) +++ head/sys/powerpc/include/pmc_mdep.h Sat Dec 14 19:01:24 2013 (r259394) @@ -7,8 +7,8 @@ #ifndef _MACHINE_PMC_MDEP_H_ #define _MACHINE_PMC_MDEP_H_ -#define PMC_MDEP_CLASS_INDEX_PPC7450 0 -#define PMC_MDEP_CLASS_INDEX_PPC970 0 +#define PMC_MDEP_CLASS_INDEX_PPC7450 1 +#define PMC_MDEP_CLASS_INDEX_PPC970 1 union pmc_md_op_pmcallocate { uint64_t __pad[4]; From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 20:12:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AAD8CCF; Sat, 14 Dec 2013 20:12:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 168361AB7; Sat, 14 Dec 2013 20:12:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBEKCSMm035855; Sat, 14 Dec 2013 20:12:28 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBEKCS3m035854; Sat, 14 Dec 2013 20:12:28 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312142012.rBEKCS3m035854@svn.freebsd.org> From: Justin Hibbits Date: Sat, 14 Dec 2013 20:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259395 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 20:12:29 -0000 Author: jhibbits Date: Sat Dec 14 20:12:28 2013 New Revision: 259395 URL: http://svnweb.freebsd.org/changeset/base/259395 Log: Add userland PMC backtracing, and use the PMC trapframe macros for kernel backtraces. MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Sat Dec 14 19:01:24 2013 (r259394) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Sat Dec 14 20:12:28 2013 (r259395) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #define INKERNEL(x) (((vm_offset_t)(x)) <= VM_MAX_KERNEL_ADDRESS && \ ((vm_offset_t)(x)) >= VM_MIN_KERNEL_ADDRESS) +#define INUSER(x) (((vm_offset_t)(x)) <= VM_MAXUSER_ADDRESS && \ + ((vm_offset_t)(x)) >= VM_MIN_ADDRESS) struct powerpc_cpu **powerpc_pcpu; @@ -55,13 +57,13 @@ pmc_save_kernel_callchain(uintptr_t *cc, int frames = 0; uintptr_t *sp; - cc[frames++] = tf->srr0; - sp = (uintptr_t *)tf->fixreg[1]; + cc[frames++] = PMC_TRAPFRAME_TO_PC(tf); + sp = (uintptr_t *)PMC_TRAPFRAME_TO_FP(tf); for (frames = 1; frames < maxsamples; frames++) { if (!INKERNEL(sp)) break; - cc[frames++] = *(sp + 1); + cc[frames++] = sp[1]; sp = (uintptr_t *)*sp; } return (frames); @@ -172,8 +174,17 @@ int pmc_save_user_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { - (void) cc; - (void) maxsamples; - (void) tf; - return (0); + uintptr_t *sp; + int frames = 0; + + cc[frames++] = PMC_TRAPFRAME_TO_PC(tf); + sp = (uintptr_t *)PMC_TRAPFRAME_TO_FP(tf); + + for (frames = 1; frames < maxsamples; frames++) { + if (!INUSER(sp)) + break; + cc[frames++] = fuword(sp + 1); + sp = (uintptr_t *)fuword(sp); + } + return (frames); } From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 22:07:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B95B4DC; Sat, 14 Dec 2013 22:07:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C6E01204; Sat, 14 Dec 2013 22:07:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBEM7fgu075569; Sat, 14 Dec 2013 22:07:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBEM7fnW075560; Sat, 14 Dec 2013 22:07:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312142207.rBEM7fnW075560@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 14 Dec 2013 22:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259397 - in head/sys/cam: . scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 22:07:42 -0000 Author: nwhitehorn Date: Sat Dec 14 22:07:40 2013 New Revision: 259397 URL: http://svnweb.freebsd.org/changeset/base/259397 Log: Widen lun_id_t to 64 bits. This is a follow-on to r257345 to let the kernel support all valid SAM-5 LUN IDs. CAM_VERSION is bumped, as the CAM ABI (though not API) is changed. No behavior is changed relative to r257345 except that LUNs with non-zero high 32 bits will no longer be ignored during device enumeration for SIMs that have set PIM_EXTLUNS. Reviewed by: scottl Modified: head/sys/cam/cam.h head/sys/cam/cam_ccb.h head/sys/cam/cam_compat.c head/sys/cam/cam_compat.h head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Sat Dec 14 20:55:53 2013 (r259396) +++ head/sys/cam/cam.h Sat Dec 14 22:07:40 2013 (r259397) @@ -39,16 +39,12 @@ typedef u_int path_id_t; typedef u_int target_id_t; -typedef u_int lun_id_t; -typedef union { - u_int64_t lun64; - u_int8_t lun[8]; -} lun64_id_t; +typedef u_int64_t lun_id_t; #define CAM_XPT_PATH_ID ((path_id_t)~0) #define CAM_BUS_WILDCARD ((path_id_t)~0) #define CAM_TARGET_WILDCARD ((target_id_t)~0) -#define CAM_LUN_WILDCARD ((lun_id_t)~0) +#define CAM_LUN_WILDCARD (~(u_int)0) #define CAM_EXTLUN_BYTE_SWIZZLE(lun) ( \ ((((u_int64_t)lun) & 0xffff000000000000L) >> 48) | \ Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Sat Dec 14 20:55:53 2013 (r259396) +++ head/sys/cam/cam_ccb.h Sat Dec 14 22:07:40 2013 (r259397) @@ -109,10 +109,6 @@ typedef enum { CAM_UNLOCKED = 0x80000000 /* Call callback without lock. */ } ccb_flags; -typedef enum { - CAM_EXTLUN_VALID = 0x00000001,/* 64bit lun field is valid */ -} ccb_xflags; - /* XPT Opcodes for xpt_action */ typedef enum { /* Function code flags are bits greater than 0xff */ @@ -326,7 +322,6 @@ struct ccb_hdr { path_id_t path_id; /* Path ID for the request */ target_id_t target_id; /* Target device ID */ lun_id_t target_lun; /* Target LUN number */ - lun64_id_t ext_lun; /* 64bit extended/multi-level LUNs */ u_int32_t flags; /* ccb_flags */ u_int32_t xflags; /* Extended flags */ ccb_ppriv_area periph_priv; @@ -555,7 +550,7 @@ struct ccb_dev_match { /* * Definitions for the path inquiry CCB fields. */ -#define CAM_VERSION 0x18 /* Hex value for current version */ +#define CAM_VERSION 0x19 /* Hex value for current version */ typedef enum { PI_MDP_ABLE = 0x80, /* Supports MDP message */ Modified: head/sys/cam/cam_compat.c ============================================================================== --- head/sys/cam/cam_compat.c Sat Dec 14 20:55:53 2013 (r259396) +++ head/sys/cam/cam_compat.c Sat Dec 14 22:07:40 2013 (r259397) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -53,6 +54,9 @@ __FBSDID("$FreeBSD$"); static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp); +static int cam_compat_handle_0x18(struct cdev *dev, u_long cmd, caddr_t addr, + int flag, struct thread *td, d_ioctl_t *cbfnp); +static int cam_compat_translate_dev_match_0x18(union ccb *ccb); int cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, @@ -63,28 +67,28 @@ cam_compat_ioctl(struct cdev *dev, u_lon switch (cmd) { case CAMIOCOMMAND_0x16: { - union ccb *ccb; + struct ccb_hdr_0x17 *hdr17; - ccb = (union ccb *)addr; - if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS_0x16) { - ccb->ccb_h.flags &= ~CAM_SG_LIST_PHYS_0x16; - ccb->ccb_h.flags |= CAM_DATA_SG_PADDR; + hdr17 = (struct ccb_hdr_0x17 *)addr; + if (hdr17->flags & CAM_SG_LIST_PHYS_0x16) { + hdr17->flags &= ~CAM_SG_LIST_PHYS_0x16; + hdr17->flags |= CAM_DATA_SG_PADDR; } - if (ccb->ccb_h.flags & CAM_DATA_PHYS_0x16) { - ccb->ccb_h.flags &= ~CAM_DATA_PHYS_0x16; - ccb->ccb_h.flags |= CAM_DATA_PADDR; + if (hdr17->flags & CAM_DATA_PHYS_0x16) { + hdr17->flags &= ~CAM_DATA_PHYS_0x16; + hdr17->flags |= CAM_DATA_PADDR; } - if (ccb->ccb_h.flags & CAM_SCATTER_VALID_0x16) { - ccb->ccb_h.flags &= CAM_SCATTER_VALID_0x16; - ccb->ccb_h.flags |= CAM_DATA_SG; + if (hdr17->flags & CAM_SCATTER_VALID_0x16) { + hdr17->flags &= CAM_SCATTER_VALID_0x16; + hdr17->flags |= CAM_DATA_SG; } cmd = CAMIOCOMMAND; - error = (cbfnp)(dev, cmd, addr, flag, td); + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); break; } case CAMGETPASSTHRU_0x16: cmd = CAMGETPASSTHRU; - error = (cbfnp)(dev, cmd, addr, flag, td); + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); break; case CAMIOCOMMAND_0x17: cmd = CAMIOCOMMAND; @@ -94,6 +98,14 @@ cam_compat_ioctl(struct cdev *dev, u_lon cmd = CAMGETPASSTHRU; error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); break; + case CAMIOCOMMAND_0x18: + cmd = CAMIOCOMMAND; + error = cam_compat_handle_0x18(dev, cmd, addr, flag, td, cbfnp); + break; + case CAMGETPASSTHRU_0x18: + cmd = CAMGETPASSTHRU; + error = cam_compat_handle_0x18(dev, cmd, addr, flag, td, cbfnp); + break; default: error = ENOTTY; } @@ -127,7 +139,6 @@ cam_compat_handle_0x17(struct cdev *dev, hdr->path_id = hdr17->path_id; hdr->target_id = hdr17->target_id; hdr->target_lun = hdr17->target_lun; - hdr->ext_lun.lun64 = 0; hdr->flags = hdr17->flags; hdr->xflags = 0; hdr->periph_priv = hdr17->periph_priv; @@ -159,13 +170,11 @@ cam_compat_handle_0x17(struct cdev *dev, hdr17->sim_priv = hdr->sim_priv; hdr17->timeout = hdr->timeout; - /* The PATH_INQ only needs special handling on the way out */ - if (ccb->ccb_h.func_code != XPT_PATH_INQ) { - bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); - } else { + if (ccb->ccb_h.func_code == XPT_PATH_INQ) { struct ccb_pathinq *cpi; struct ccb_pathinq_0x17 *cpi17; + /* The PATH_INQ only needs special handling on the way out */ cpi = &ccb->cpi; cpi17 = (struct ccb_pathinq_0x17 *)hdr17; cpi17->version_num = cpi->version_num; @@ -196,9 +205,151 @@ cam_compat_handle_0x17(struct cdev *dev, cpi17->hba_device = cpi->hba_device; cpi17->hba_subvendor = cpi->hba_subvendor; cpi17->hba_subdevice = cpi->hba_subdevice; + } else if (ccb->ccb_h.func_code == XPT_DEV_MATCH) { + /* Copy the rest of the header over */ + bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); + + cam_compat_translate_dev_match_0x18(ccb); + } else { + bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); } xpt_free_ccb(ccb); return (error); } + +static int +cam_compat_handle_0x18(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td, d_ioctl_t *cbfnp) +{ + union ccb *ccb; + struct ccb_hdr *hdr; + struct ccb_hdr_0x18 *hdr18; + uint8_t *ccbb, *ccbb18; + u_int error; + + hdr18 = (struct ccb_hdr_0x18 *)addr; + ccb = xpt_alloc_ccb(); + hdr = &ccb->ccb_h; + + hdr->pinfo = hdr18->pinfo; + hdr->xpt_links = hdr18->xpt_links; + hdr->sim_links = hdr18->sim_links; + hdr->periph_links = hdr18->periph_links; + hdr->retry_count = hdr18->retry_count; + hdr->cbfcnp = hdr18->cbfcnp; + hdr->func_code = hdr18->func_code; + hdr->status = hdr18->status; + hdr->path = hdr18->path; + hdr->path_id = hdr18->path_id; + hdr->target_id = hdr18->target_id; + hdr->target_lun = hdr18->target_lun; + if (hdr18->xflags & CAM_EXTLUN_VALID_0x18) + hdr->target_lun = hdr18->ext_lun; + hdr->flags = hdr18->flags; + hdr->xflags = hdr18->xflags; + hdr->periph_priv = hdr18->periph_priv; + hdr->sim_priv = hdr18->sim_priv; + hdr->timeout = hdr18->timeout; + hdr->softtimeout.tv_sec = 0; + hdr->softtimeout.tv_usec = 0; + + ccbb = (uint8_t *)&hdr[1]; + ccbb18 = (uint8_t *)&hdr18[1]; + bcopy(ccbb18, ccbb, CAM_0X18_DATA_LEN); + + error = (cbfnp)(dev, cmd, (caddr_t)ccb, flag, td); + + hdr18->pinfo = hdr->pinfo; + hdr18->xpt_links = hdr->xpt_links; + hdr18->sim_links = hdr->sim_links; + hdr18->periph_links = hdr->periph_links; + hdr18->retry_count = hdr->retry_count; + hdr18->cbfcnp = hdr->cbfcnp; + hdr18->func_code = hdr->func_code; + hdr18->status = hdr->status; + hdr18->path = hdr->path; + hdr18->path_id = hdr->path_id; + hdr18->target_id = hdr->target_id; + hdr18->target_lun = hdr->target_lun; + hdr18->ext_lun = hdr->target_lun; + hdr18->flags = hdr->flags; + hdr18->xflags = hdr->xflags | CAM_EXTLUN_VALID_0x18; + hdr18->periph_priv = hdr->periph_priv; + hdr18->sim_priv = hdr->sim_priv; + hdr18->timeout = hdr->timeout; + + bcopy(ccbb, ccbb18, CAM_0X18_DATA_LEN); + + if (ccb->ccb_h.func_code == XPT_DEV_MATCH) + cam_compat_translate_dev_match_0x18(ccb); + + xpt_free_ccb(ccb); + + return (error); +} + +static int +cam_compat_translate_dev_match_0x18(union ccb *ccb) +{ + struct dev_match_result *dm; + struct dev_match_result_0x18 *dm18; + struct cam_periph_map_info mapinfo; + int i; + + /* Remap the CCB into kernel address space */ + bzero(&mapinfo, sizeof(mapinfo)); + cam_periph_mapmem(ccb, &mapinfo); + + dm = ccb->cdm.matches; + /* Translate in-place: old fields are smaller */ + dm18 = (struct dev_match_result_0x18 *)(dm); + + for (i = 0; i < ccb->cdm.num_matches; i++) { + dm18[i].type = dm[i].type; + switch (dm[i].type) { + case DEV_MATCH_PERIPH: + memcpy(&dm18[i].result.periph_result.periph_name, + &dm[i].result.periph_result.periph_name, + DEV_IDLEN); + dm18[i].result.periph_result.unit_number = + dm[i].result.periph_result.unit_number; + dm18[i].result.periph_result.path_id = + dm[i].result.periph_result.path_id; + dm18[i].result.periph_result.target_id = + dm[i].result.periph_result.target_id; + dm18[i].result.periph_result.target_lun = + dm[i].result.periph_result.target_lun; + break; + case DEV_MATCH_DEVICE: + dm18[i].result.device_result.path_id = + dm[i].result.device_result.path_id; + dm18[i].result.device_result.target_id = + dm[i].result.device_result.target_id; + dm18[i].result.device_result.target_lun = + dm[i].result.device_result.target_lun; + dm18[i].result.device_result.protocol = + dm[i].result.device_result.protocol; + memcpy(&dm18[i].result.device_result.inq_data, + &dm[i].result.device_result.inq_data, + sizeof(struct scsi_inquiry_data)); + memcpy(&dm18[i].result.device_result.ident_data, + &dm[i].result.device_result.ident_data, + sizeof(struct ata_params)); + dm18[i].result.device_result.flags = + dm[i].result.device_result.flags; + break; + case DEV_MATCH_BUS: + memcpy(&dm18[i].result.bus_result, + &dm[i].result.bus_result, + sizeof(struct bus_match_result)); + break; + } + } + + cam_periph_unmapmem(ccb, &mapinfo); + + return (0); +} + Modified: head/sys/cam/cam_compat.h ============================================================================== --- head/sys/cam/cam_compat.h Sat Dec 14 20:55:53 2013 (r259396) +++ head/sys/cam/cam_compat.h Sat Dec 14 22:07:40 2013 (r259397) @@ -65,7 +65,7 @@ struct ccb_hdr_0x17 { struct cam_path *path; /* Compiled path for this ccb */ path_id_t path_id; /* Path ID for the request */ target_id_t target_id; /* Target device ID */ - lun_id_t target_lun; /* Target LUN number */ + u_int target_lun; /* Target LUN number */ u_int32_t flags; /* ccb_flags */ ccb_ppriv_area periph_priv; ccb_spriv_area sim_priv; @@ -116,5 +116,64 @@ struct ccb_pathinq_0x17 { #define CAMIOCOMMAND_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 2, CAM_0X17_LEN) #define CAMGETPASSTHRU_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 3, CAM_0X17_LEN) +/* Version 0x18 compatibility */ +#define CAM_VERSION_0x18 0x18 + +struct ccb_hdr_0x18 { + cam_pinfo pinfo; /* Info for priority scheduling */ + camq_entry xpt_links; /* For chaining in the XPT layer */ + camq_entry sim_links; /* For chaining in the SIM layer */ + camq_entry periph_links; /* For chaining in the type driver */ + u_int32_t retry_count; + void (*cbfcnp)(struct cam_periph *, union ccb *); + xpt_opcode func_code; /* XPT function code */ + u_int32_t status; /* Status returned by CAM subsystem */ + struct cam_path *path; /* Compiled path for this ccb */ + path_id_t path_id; /* Path ID for the request */ + target_id_t target_id; /* Target device ID */ + u_int target_lun; /* Target LUN number */ + u_int64_t ext_lun; /* 64-bit LUN, more or less */ + u_int32_t flags; /* ccb_flags */ + u_int32_t xflags; /* extended ccb_flags */ + ccb_ppriv_area periph_priv; + ccb_spriv_area sim_priv; + ccb_qos_area qos; + u_int32_t timeout; /* Hard timeout value in seconds */ + struct timeval softtimeout; /* Soft timeout value in sec + usec */ +}; + +typedef enum { + CAM_EXTLUN_VALID_0x18 = 0x00000001,/* 64bit lun field is valid */ +} ccb_xflags_0x18; + +struct dev_match_result_0x18 { + dev_match_type type; + union { + struct { + char periph_name[DEV_IDLEN]; + u_int32_t unit_number; + path_id_t path_id; + target_id_t target_id; + u_int target_lun; + } periph_result; + struct { + path_id_t path_id; + target_id_t target_id; + u_int target_lun; + cam_proto protocol; + struct scsi_inquiry_data inq_data; + struct ata_params ident_data; + dev_result_flags flags; + } device_result; + struct bus_match_result bus_result; + } result; +}; + +#define CAM_0X18_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr) + sizeof(struct ccb_hdr_0x18)) +#define CAM_0X18_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr_0x18)) + +#define CAMIOCOMMAND_0x18 _IOC(IOC_INOUT, CAM_VERSION_0x18, 2, CAM_0X18_LEN) +#define CAMGETPASSTHRU_0x18 _IOC(IOC_INOUT, CAM_VERSION_0x18, 3, CAM_0X18_LEN) + #endif #endif Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Sat Dec 14 20:55:53 2013 (r259396) +++ head/sys/cam/scsi/scsi_xpt.c Sat Dec 14 22:07:40 2013 (r259397) @@ -101,10 +101,8 @@ SYSCTL_PROC(_kern_cam, OID_AUTO, cam_src (lval) |= (lp)->luns[(i)].lundata[1]; \ } #define CAM_GET_LUN(lp, i, lval) \ - (lval) = scsi_4btoul((lp)->luns[(i)].lundata); \ - (lval) = ((lval) >> 16) | ((lval) << 16); -#define CAM_LUN_ONLY_32BITS(lp, i) \ - (scsi_4btoul(&((lp)->luns[(i)].lundata[4])) == 0) + (lval) = scsi_8btou64((lp)->luns[(i)].lundata); \ + (lval) = CAM_EXTLUN_BYTE_SWIZZLE(lval); /* * If we're not quirked to search <= the first 8 luns @@ -1766,8 +1764,6 @@ probe_purge_old(struct cam_path *path, s continue; CAM_GET_SIMPLE_LUN(old, idx1, this_lun); } - if (!CAM_LUN_ONLY_32BITS(old, idx1)) - continue; if (xpt_create_path(&tp, NULL, xpt_path_path_id(path), xpt_path_target_id(path), this_lun) == CAM_REQ_CMP) { @@ -2038,10 +2034,6 @@ scsi_scan_bus(struct cam_periph *periph, break; } - /* XXX print warning? */ - if (!CAM_LUN_ONLY_32BITS(target->luns, - scan_info->lunindex[target_id])) - continue; if (CAM_CAN_GET_SIMPLE_LUN(target->luns, scan_info->lunindex[target_id])) { CAM_GET_SIMPLE_LUN(target->luns, From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 22:28:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15C0EBC7; Sat, 14 Dec 2013 22:28:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01048130F; Sat, 14 Dec 2013 22:28:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBEMSWH2083029; Sat, 14 Dec 2013 22:28:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBEMSWq2083028; Sat, 14 Dec 2013 22:28:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201312142228.rBEMSWq2083028@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 14 Dec 2013 22:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259398 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 22:28:33 -0000 Author: nwhitehorn Date: Sat Dec 14 22:28:32 2013 New Revision: 259398 URL: http://svnweb.freebsd.org/changeset/base/259398 Log: Avoid warning about insecure format with clang. Modified: head/sys/dev/ofw/ofw_console.c Modified: head/sys/dev/ofw/ofw_console.c ============================================================================== --- head/sys/dev/ofw/ofw_console.c Sat Dec 14 22:07:40 2013 (r259397) +++ head/sys/dev/ofw/ofw_console.c Sat Dec 14 22:28:32 2013 (r259398) @@ -100,7 +100,7 @@ cn_drvinit(void *unused) sizeof(output)) == -1) return; if (strlen(output) > 0) - tty_makealias(tp, output); + tty_makealias(tp, "%s", output); } } From owner-svn-src-head@FreeBSD.ORG Sat Dec 14 22:41:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C33C5E7C; Sat, 14 Dec 2013 22:41:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFAA513CA; Sat, 14 Dec 2013 22:41:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBEMfHwb090210; Sat, 14 Dec 2013 22:41:17 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBEMfHJu090209; Sat, 14 Dec 2013 22:41:17 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312142241.rBEMfHJu090209@svn.freebsd.org> From: Glen Barber Date: Sat, 14 Dec 2013 22:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259400 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 22:41:17 -0000 Author: gjb Date: Sat Dec 14 22:41:17 2013 New Revision: 259400 URL: http://svnweb.freebsd.org/changeset/base/259400 Log: Reduce disc1.iso size by 74MB by removing lib32 libraries, sendmail, and atf. MFC after: 3 days X-MFC-To-10: immediate (-RC2 requirement) Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Sat Dec 14 22:39:01 2013 (r259399) +++ head/release/Makefile Sat Dec 14 22:41:17 2013 (r259400) @@ -142,7 +142,7 @@ system: packagesystem mkdir -p release cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ DESTDIR=${.OBJDIR}/release WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1 \ - WITHOUT_PROFILE=1 + WITHOUT_PROFILE=1 WITHOUT_SENDMAIL=1 WITHOUT_ATF=1 WITHOUT_LIB32=1 # Copy distfiles mkdir -p release/usr/freebsd-dist cp *.txz MANIFEST release/usr/freebsd-dist