From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 00:03:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6349D1065673; Sun, 12 Sep 2010 00:03:39 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 006D58FC14; Sun, 12 Sep 2010 00:03:38 +0000 (UTC) Received: by iwn34 with SMTP id 34so4220222iwn.13 for ; Sat, 11 Sep 2010 17:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=52d1vFD9fzD/SQZwI1jKka+ezOwVmF3lD+RIJcOcXio=; b=IwPi1wk+Ow4Mwtdr9Rf2fYIO+HwLGATMZDwNbK/2DQB46L+5ERNuwYL7z2wuhweMFh v9WTdEVEr5sStA+K81XBZxRwfUC59k+QtnjhJak7L1nU4YeUVqM1RPc1qC2Kizhb+6pC wMXRIb6KUHiuzxDLmlKIkp7CHQqeBIUAsv8VU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=a5TnQaWflSl0IpVpvbuIze8jQQzkiWyPk5h/MeUwH08ve3idj8DFPWg9EPMUXYJu+k 0N1foN/umKrsb4zYnjYOq091I5p41KPnS0l9mEyYfFzI6ADArDza+Sgz/8iEHWYrPjR3 S8gkzzRxBhfe23hb/7U+f4NlW/TEK3q1OcAgU= MIME-Version: 1.0 Received: by 10.231.58.201 with SMTP id i9mr3502674ibh.98.1284249818139; Sat, 11 Sep 2010 17:03:38 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.231.130.34 with HTTP; Sat, 11 Sep 2010 17:03:38 -0700 (PDT) In-Reply-To: <201009111942.o8BJgocS032974@svn.freebsd.org> References: <201009111942.o8BJgocS032974@svn.freebsd.org> Date: Sun, 12 Sep 2010 00:03:38 +0000 X-Google-Sender-Auth: POnPdDsVBz7nimoS8vLO1etMwwY Message-ID: From: mdf@FreeBSD.org To: Alexander Kabaev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212478 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 00:03:39 -0000 On Sat, Sep 11, 2010 at 7:42 PM, Alexander Kabaev wrote: > Author: kan > Date: Sat Sep 11 19:42:50 2010 > New Revision: 212478 > URL: http://svn.freebsd.org/changeset/base/212478 > > Log: > =A0Add missing pointer increment to sbuf_cat. > > Modified: > =A0head/sys/kern/subr_sbuf.c > > Modified: head/sys/kern/subr_sbuf.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/kern/subr_sbuf.c =A0 Sat Sep 11 18:55:00 2010 =A0 =A0 =A0 = =A0(r212477) > +++ head/sys/kern/subr_sbuf.c =A0 Sat Sep 11 19:42:50 2010 =A0 =A0 =A0 = =A0(r212478) > @@ -441,7 +441,7 @@ sbuf_cat(struct sbuf *s, const char *str > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (-1); > > =A0 =A0 =A0 =A0while (*str !=3D '\0') { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 sbuf_put_byte(*str, s); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 sbuf_put_byte(*str++, s); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (s->s_error !=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (-1); > =A0 =A0 =A0 =A0} D'oh! Yeah, this looks right. I guess the sbuf functions that ran when I tested didn't use sbuf_cat. Sorry, matthew From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 00:41:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 466EA106566B; Sun, 12 Sep 2010 00:41:25 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id ACF0D8FC08; Sun, 12 Sep 2010 00:41:24 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEALe+i0yDaFvO/2dsb2JhbACDGJ8hrRqRBoEigyd0BIog X-IronPort-AV: E=Sophos;i="4.56,353,1280721600"; d="scan'208";a="93571162" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 11 Sep 2010 20:41:22 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 9F181B3EA8; Sat, 11 Sep 2010 20:41:22 -0400 (EDT) Date: Sat, 11 Sep 2010 20:41:22 -0400 (EDT) From: Rick Macklem To: Kostik Belousov Message-ID: <1300087421.776986.1284252082593.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20100911060111.GT2465@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [24.65.230.102] X-Mailer: Zimbra 6.0.7_GA_2476.RHEL4 (ZimbraWebClient - SAF3 (Mac)/6.0.7_GA_2473.RHEL4_64) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212439 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 00:41:25 -0000 > Then, fid_reserved is no more reserved ? Should we rename it ? > > Comment for fid_reserved about longword alignment is wrong. Well, it's actually more broken than that. fid_len - Most file systems set it to the size of their variant of the entire structure, including the Xfid_len field. ZFS sets it to the size of the structure - sizeof(uint16_t) { presumably subtracting out the size if Xfid_len? }. And xfs, well, it does weird stuff with it I can't figure out, but it is definitely not the size of the entire struct. As such, exposing fid_len above the VOP_xxx() doesn't make much sense. (After my commit yesterday, nothing above the VOP_VPTOFH() uses it.) Personally, I'd lean towards a generic struct fid like... struct fid { uint8_t fid_data[MAXFIDSZ]; }; with MAXFIDSZ increased appropriately, but this will require changes to xfs and zfs, since they both set the generic fid_len. If you go with... struct fid { uint16_t fid_len; uint8_t fid_data[MAXFIDSZ]; }; then the hash functions in the two NFS servers need to be changed (they assume 32bit alignment of fid_data), but they should be fixed anyhow, since they mostly hash to 0 for ZFS at this time. (From what I see ZFS file handles looking like.) Or, you could just rename fid_reserved to fid_pad and not worry about it. Maybe the ZFS folks could decide what they would prefer? rick From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 03:04:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D43B106564A; Sun, 12 Sep 2010 03:04:24 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id A9C5C8FC12; Sun, 12 Sep 2010 03:04:23 +0000 (UTC) Received: by iwn34 with SMTP id 34so4333155iwn.13 for ; Sat, 11 Sep 2010 20:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=CFLTq4cyofDKMZYgo8WYoidVABqWc6Jnp2TaakudrcA=; b=nLBI/eh6YAn3zBD/jUy1y4bDM5YXueKCmxYgeQSTXa9v0R2+NJzPZjQ5FVj5VuRQK5 ukmEY/BaqnBlO6uEgthXj8lgcZIT6YdlSRRRPC4Ul5TEkoQy+ZnOnLPoiDBXlTFV3HJJ UucuV4eyk4oZHRt3m0pxjLKJBySqdWFp1Upd4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Owe4i4UvSapdSmvulpOlubH1OsuUwq+l+wmXwG84+8o8X5m/BrrjcIXQ8nUbHCXeN/ eXe1U8KDfvkIPhSZWOIUeOLHKU996qto7vZOFBRN9upkrtPgtCKhm07j0xVQceV/cVYg Y9s7EJEpvaoITTazvZ359yOCMgnWgI9AZyg+s= MIME-Version: 1.0 Received: by 10.231.162.2 with SMTP id t2mr3748164ibx.57.1284260662922; Sat, 11 Sep 2010 20:04:22 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.231.130.34 with HTTP; Sat, 11 Sep 2010 20:04:22 -0700 (PDT) In-Reply-To: <1300087421.776986.1284252082593.JavaMail.root@erie.cs.uoguelph.ca> References: <20100911060111.GT2465@deviant.kiev.zoral.com.ua> <1300087421.776986.1284252082593.JavaMail.root@erie.cs.uoguelph.ca> Date: Sun, 12 Sep 2010 03:04:22 +0000 X-Google-Sender-Auth: smkW1GnVZf6nUs70Q7PEyZJT9r4 Message-ID: From: mdf@FreeBSD.org To: Rick Macklem Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rick Macklem Subject: Re: svn commit: r212439 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 03:04:25 -0000 On Sun, Sep 12, 2010 at 12:41 AM, Rick Macklem wrote= : >> Then, fid_reserved is no more reserved ? Should we rename it ? >> >> Comment for fid_reserved about longword alignment is wrong. > > Well, it's actually more broken than that. > fid_len - Most file systems set it to the size of their variant > =A0 =A0 =A0 =A0 =A0of the entire structure, including the Xfid_len field. > =A0 =A0 =A0 =A0 =A0ZFS sets it to the size of the structure - sizeof(uint= 16_t) > =A0 =A0 =A0 =A0 =A0{ presumably subtracting out the size if Xfid_len? }. > =A0 =A0 =A0 =A0 =A0And xfs, well, it does weird stuff with it I can't fig= ure > =A0 =A0 =A0 =A0 =A0out, but it is definitely not the size of the entire s= truct. > > As such, exposing fid_len above the VOP_xxx() doesn't make much sense. > (After my commit yesterday, nothing above the VOP_VPTOFH() uses it.) > > Personally, I'd lean towards a generic struct fid like... > struct fid { > =A0 =A0 =A0 uint8_t fid_data[MAXFIDSZ]; > }; Isilon would love a generic struct like this, as to fit our filesystem we had to make such a change locally anyways. :-) Cheers, matthew > with MAXFIDSZ increased appropriately, but this will require changes > to xfs and zfs, since they both set the generic fid_len. > > If you go with... > struct fid { > =A0 =A0 =A0 uint16_t fid_len; > =A0 =A0 =A0 uint8_t fid_data[MAXFIDSZ]; > }; > then the hash functions in the two NFS servers need to be changed > (they assume 32bit alignment of fid_data), but they should be fixed > anyhow, since they mostly hash to 0 for ZFS at this time. (From what > I see ZFS file handles looking like.) > > Or, you could just rename fid_reserved to fid_pad and not worry about it. > > Maybe the ZFS folks could decide what they would prefer? rick > From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 06:19:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56E38106566B; Sun, 12 Sep 2010 06:19:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 455758FC0C; Sun, 12 Sep 2010 06:19:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8C6Ja91093526; Sun, 12 Sep 2010 06:19:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8C6JaQd093513; Sun, 12 Sep 2010 06:19:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201009120619.o8C6JaQd093513@svn.freebsd.org> From: Xin LI Date: Sun, 12 Sep 2010 06:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212490 - stable/8/sys/dev/twa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 06:19:36 -0000 Author: delphij Date: Sun Sep 12 06:19:35 2010 New Revision: 212490 URL: http://svn.freebsd.org/changeset/base/212490 Log: MFC r212008, 212028, 212210: Vendor update to version 3.80.06.003 to fix panic with ZFS under heavy I/O load. PR: kern/149968 Submitted by: LSI (Tom Couch) Reported by: Kai Kockro Tested by: Kai Kockro, jpaetzel Modified: stable/8/sys/dev/twa/tw_cl.h stable/8/sys/dev/twa/tw_cl_externs.h stable/8/sys/dev/twa/tw_cl_fwif.h stable/8/sys/dev/twa/tw_cl_init.c stable/8/sys/dev/twa/tw_cl_intr.c stable/8/sys/dev/twa/tw_cl_io.c stable/8/sys/dev/twa/tw_cl_misc.c stable/8/sys/dev/twa/tw_cl_share.h stable/8/sys/dev/twa/tw_osl.h stable/8/sys/dev/twa/tw_osl_cam.c stable/8/sys/dev/twa/tw_osl_freebsd.c stable/8/sys/dev/twa/tw_osl_share.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/twa/tw_cl.h ============================================================================== --- stable/8/sys/dev/twa/tw_cl.h Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl.h Sun Sep 12 06:19:35 2010 (r212490) @@ -88,7 +88,8 @@ struct tw_cli_q_stats { #define TW_CLI_BUSY_Q 1 /* q of reqs submitted to fw */ #define TW_CLI_PENDING_Q 2 /* q of reqs deferred due to 'q full' */ #define TW_CLI_COMPLETE_Q 3 /* q of reqs completed by fw */ -#define TW_CLI_Q_COUNT 4 /* total number of queues */ +#define TW_CLI_RESET_Q 4 /* q of reqs reset by timeout */ +#define TW_CLI_Q_COUNT 5 /* total number of queues */ /* CL's internal request context. */ @@ -133,6 +134,7 @@ struct tw_cli_ctlr_context { TW_UINT8 interrupts_enabled; /* Interrupts on controller enabled. */ TW_UINT8 internal_req_busy; /* Data buffer for internal requests in use. */ TW_UINT8 get_more_aens; /* More AEN's need to be retrieved. */ + TW_UINT8 reset_needed; /* Controller needs a soft reset. */ TW_UINT8 reset_in_progress; /* Controller is being reset. */ TW_UINT8 reset_phase1_in_progress; /* In 'phase 1' of reset. */ TW_UINT32 flags; /* controller settings */ Modified: stable/8/sys/dev/twa/tw_cl_externs.h ============================================================================== --- stable/8/sys/dev/twa/tw_cl_externs.h Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl_externs.h Sun Sep 12 06:19:35 2010 (r212490) @@ -86,6 +86,8 @@ extern TW_INT32 tw_cli_submit_and_poll_r /* Soft reset the controller. */ extern TW_INT32 tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr); +extern int twa_setup_intr(struct twa_softc *sc); +extern int twa_teardown_intr(struct twa_softc *sc); /* Send down a SCSI command to the firmware (usually, an internal Req Sense. */ extern TW_INT32 tw_cli_send_scsi_cmd(struct tw_cli_req_context *req, Modified: stable/8/sys/dev/twa/tw_cl_fwif.h ============================================================================== --- stable/8/sys/dev/twa/tw_cl_fwif.h Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl_fwif.h Sun Sep 12 06:19:35 2010 (r212490) @@ -89,7 +89,7 @@ #define TWA_STATUS_MINOR_VERSION_MASK 0x0F000000 #define TWA_STATUS_MAJOR_VERSION_MASK 0xF0000000 -#define TWA_STATUS_UNEXPECTED_BITS 0x00F00000 +#define TWA_STATUS_UNEXPECTED_BITS 0x00D00000 /* PCI related defines. */ Modified: stable/8/sys/dev/twa/tw_cl_init.c ============================================================================== --- stable/8/sys/dev/twa/tw_cl_init.c Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl_init.c Sun Sep 12 06:19:35 2010 (r212490) @@ -315,6 +315,7 @@ tw_cl_init_ctlr(struct tw_cl_ctlr_handle tw_cli_req_q_init(ctlr, TW_CLI_BUSY_Q); tw_cli_req_q_init(ctlr, TW_CLI_PENDING_Q); tw_cli_req_q_init(ctlr, TW_CLI_COMPLETE_Q); + tw_cli_req_q_init(ctlr, TW_CLI_RESET_Q); /* Initialize all locks used by CL. */ ctlr->gen_lock = &(ctlr->gen_lock_handle); @@ -675,15 +676,14 @@ tw_cli_init_connection(struct tw_cli_ctl /* Submit the command, and wait for it to complete. */ error = tw_cli_submit_and_poll_request(req, TW_CLI_REQUEST_TIMEOUT_PERIOD); - if (error == TW_OSL_ETIMEDOUT) - /* Clean-up done by tw_cli_submit_and_poll_request. */ - return(error); if (error) goto out; if ((error = init_connect->status)) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 goto out; } if (set_features & TWA_EXTENDED_INIT_CONNECT) { Modified: stable/8/sys/dev/twa/tw_cl_intr.c ============================================================================== --- stable/8/sys/dev/twa/tw_cl_intr.c Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl_intr.c Sun Sep 12 06:19:35 2010 (r212490) @@ -248,8 +248,7 @@ tw_cli_process_resp_intr(struct tw_cli_c #ifdef TW_OSL_DEBUG tw_cl_print_ctlr_stats(ctlr->ctlr_handle); #endif /* TW_OSL_DEBUG */ - tw_cl_reset_ctlr(ctlr->ctlr_handle); - return(TW_OSL_EIO); + continue; } /* @@ -402,9 +401,7 @@ tw_cli_complete_io(struct tw_cli_req_con #ifdef TW_OSL_DEBUG tw_cl_print_ctlr_stats(ctlr->ctlr_handle); #endif /* TW_OSL_DEBUG */ - tw_cl_reset_ctlr(ctlr->ctlr_handle); - req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - goto out; + return; } if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { @@ -483,6 +480,7 @@ tw_cli_scsi_complete(struct tw_cli_req_c cdb[8], cdb[9], cdb[10], cdb[11], cdb[12], cdb[13], cdb[14], cdb[15]); +#if 0 /* * Print the error. Firmware doesn't yet support * the 'Mode Sense' cmd. Don't print if the cmd @@ -493,6 +491,7 @@ tw_cli_scsi_complete(struct tw_cli_req_c tw_cli_create_ctlr_event(req->ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, cmd_hdr); +#endif // 0 } if (scsi_req->sense_data) { @@ -530,9 +529,11 @@ tw_cli_param_callback(struct tw_cli_req_ */ if (! req->error_code) if (cmd->param.status) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 tw_cl_create_event(ctlr->ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_ERROR, 0x1204, 0x1, TW_CL_SEVERITY_ERROR_STRING, @@ -590,9 +591,11 @@ tw_cli_aen_callback(struct tw_cli_req_co if ((error = cmd->status)) { cmd_hdr = (struct tw_cl_command_header *) (&(req->cmd_pkt->cmd_hdr)); +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, cmd_hdr); +#endif // 0 tw_cl_create_event(ctlr->ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_ERROR, 0x1206, 0x1, TW_CL_SEVERITY_ERROR_STRING, Modified: stable/8/sys/dev/twa/tw_cl_io.c ============================================================================== --- stable/8/sys/dev/twa/tw_cl_io.c Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl_io.c Sun Sep 12 06:19:35 2010 (r212490) @@ -74,18 +74,12 @@ tw_cl_start_io(struct tw_cl_ctlr_handle struct tw_cli_req_context *req; struct tw_cl_command_9k *cmd; struct tw_cl_scsi_req_packet *scsi_req; - TW_INT32 error; + TW_INT32 error = TW_CL_ERR_REQ_SUCCESS; tw_cli_dbg_printf(10, ctlr_handle, tw_osl_cur_func(), "entered"); ctlr = (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); - if (ctlr->reset_in_progress) { - tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), - "I/O during reset: returning busy."); - return(TW_OSL_EBUSY); - } - /* * If working with a firmware version that does not support multiple * luns, and this request is directed at a non-zero lun, error it @@ -145,7 +139,12 @@ tw_cl_start_io(struct tw_cl_ctlr_handle cmd->sg_list, scsi_req->sgl_entries); } - if ((error = tw_cli_submit_cmd(req))) { + if (((TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[TW_CLI_PENDING_Q]))) != TW_CL_NULL) || + (ctlr->reset_in_progress)) { + tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); + TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, + TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); + } else if ((error = tw_cli_submit_cmd(req))) { tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), "Could not start request. request = %p, error = %d", req, error); @@ -171,7 +170,7 @@ tw_cli_submit_cmd(struct tw_cli_req_cont struct tw_cli_ctlr_context *ctlr = req->ctlr; struct tw_cl_ctlr_handle *ctlr_handle = ctlr->ctlr_handle; TW_UINT32 status_reg; - TW_INT32 error; + TW_INT32 error = 0; tw_cli_dbg_printf(10, ctlr_handle, tw_osl_cur_func(), "entered"); @@ -185,11 +184,7 @@ tw_cli_submit_cmd(struct tw_cli_req_cont TWA_COMMAND_QUEUE_OFFSET_LOW, (TW_UINT32)(req->cmd_pkt_phys + sizeof(struct tw_cl_command_header)), 4); - /* Check to see if we can post a command. */ status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr_handle); - if ((error = tw_cli_check_ctlr_state(ctlr, status_reg))) - goto out; - if (status_reg & TWA_STATUS_COMMAND_QUEUE_FULL) { struct tw_cl_req_packet *req_pkt = (struct tw_cl_req_packet *)(req->orig_req); @@ -207,14 +202,12 @@ tw_cli_submit_cmd(struct tw_cli_req_cont "pending internal/ioctl request"); req->state = TW_CLI_REQ_STATE_PENDING; tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); - error = 0; /* Unmask command interrupt. */ TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); } else error = TW_OSL_EBUSY; } else { - tw_osl_ctlr_busy(ctlr_handle, req->req_handle); error = TW_OSL_EBUSY; } } else { @@ -246,7 +239,7 @@ tw_cli_submit_cmd(struct tw_cli_req_cont (TW_UINT32)(req->cmd_pkt_phys + sizeof(struct tw_cl_command_header)), 4); } } -out: + tw_osl_free_lock(ctlr_handle, ctlr->io_lock); return(error); @@ -277,18 +270,12 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_hand TW_UINT8 opcode; TW_UINT8 sgl_offset; TW_VOID *sgl = TW_CL_NULL; - TW_INT32 error; + TW_INT32 error = TW_CL_ERR_REQ_SUCCESS; tw_cli_dbg_printf(5, ctlr_handle, tw_osl_cur_func(), "entered"); ctlr = (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); - if (ctlr->reset_in_progress) { - tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), - "Passthru request during reset: returning busy."); - return(TW_OSL_EBUSY); - } - if ((req = tw_cli_get_request(ctlr )) == TW_CL_NULL) { tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), @@ -301,7 +288,7 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_hand req->orig_req = req_pkt; req->tw_cli_callback = tw_cli_complete_io; - req->flags |= (TW_CLI_REQ_FLAGS_EXTERNAL | TW_CLI_REQ_FLAGS_PASSTHRU); + req->flags |= TW_CLI_REQ_FLAGS_PASSTHRU; pt_req = &(req_pkt->gen_req_pkt.pt_req); @@ -348,7 +335,12 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_hand tw_cli_fill_sg_list(ctlr, pt_req->sg_list, sgl, pt_req->sgl_entries); - if ((error = tw_cli_submit_cmd(req))) { + if (((TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[TW_CLI_PENDING_Q]))) != TW_CL_NULL) || + (ctlr->reset_in_progress)) { + tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); + TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, + TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); + } else if ((error = tw_cli_submit_cmd(req))) { tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_ERROR, 0x1100, 0x1, TW_CL_SEVERITY_ERROR_STRING, @@ -760,8 +752,7 @@ tw_cli_get_param(struct tw_cli_ctlr_cont cmd->param.sgl_off__opcode = BUILD_SGL_OFF__OPCODE(2, TWA_FW_CMD_GET_PARAM); - cmd->param.request_id = - (TW_UINT8)(TW_CL_SWAP16(req->request_id)); + cmd->param.request_id = (TW_UINT8)(TW_CL_SWAP16(req->request_id)); cmd->param.host_id__unit = BUILD_HOST_ID__UNIT(0, 0); cmd->param.param_count = TW_CL_SWAP16(1); @@ -789,15 +780,14 @@ tw_cli_get_param(struct tw_cli_ctlr_cont /* There's no call back; wait till the command completes. */ error = tw_cli_submit_and_poll_request(req, TW_CLI_REQUEST_TIMEOUT_PERIOD); - if (error == TW_OSL_ETIMEDOUT) - /* Clean-up done by tw_cli_submit_and_poll_request. */ - return(error); if (error) goto out; if ((error = cmd->param.status)) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 goto out; } tw_osl_memcpy(param_data, param->data, param_size); @@ -905,18 +895,17 @@ tw_cli_set_param(struct tw_cli_ctlr_cont /* Submit the command. */ if (callback == TW_CL_NULL) { - /* There's no call back; wait till the command completes. */ + /* There's no call back; wait till the command completes. */ error = tw_cli_submit_and_poll_request(req, - TW_CLI_REQUEST_TIMEOUT_PERIOD); - if (error == TW_OSL_ETIMEDOUT) - /* Clean-up done by tw_cli_submit_and_poll_request. */ - return(error); + TW_CLI_REQUEST_TIMEOUT_PERIOD); if (error) goto out; if ((error = cmd->param.status)) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 goto out; } ctlr->internal_req_busy = TW_CL_FALSE; @@ -1022,9 +1011,7 @@ tw_cli_submit_and_poll_request(struct tw * tw_cli_submit_pending_queue. There could be a race in that case. * Need to revisit. */ - if (req->state != TW_CLI_REQ_STATE_PENDING) - tw_cl_reset_ctlr(ctlr->ctlr_handle); - else { + if (req->state == TW_CLI_REQ_STATE_PENDING) { tw_cli_dbg_printf(3, ctlr->ctlr_handle, tw_osl_cur_func(), "Removing request from pending queue"); /* @@ -1053,6 +1040,7 @@ tw_cli_submit_and_poll_request(struct tw * drains any incomplete requests. * * Input: ctlr -- ptr to per ctlr structure + * req_handle -- ptr to request handle * Output: None * Return value: 0 -- success * non-zero-- failure @@ -1063,15 +1051,15 @@ tw_cl_reset_ctlr(struct tw_cl_ctlr_handl struct tw_cli_ctlr_context *ctlr = (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); struct twa_softc *sc = ctlr_handle->osl_ctlr_ctxt; + struct tw_cli_req_context *req; TW_INT32 reset_attempt = 1; - TW_INT32 error; + TW_INT32 error = 0; tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), "entered"); ctlr->reset_in_progress = TW_CL_TRUE; - xpt_freeze_simq(sc->sim, 1); + twa_teardown_intr(sc); - tw_cli_disable_interrupts(ctlr); /* * Error back all requests in the complete, busy, and pending queues. @@ -1080,8 +1068,6 @@ tw_cl_reset_ctlr(struct tw_cl_ctlr_handl * will continue its course and get submitted to the controller after * the reset is done (and io_lock is released). */ - tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), - "Draining all queues following reset"); tw_cli_drain_complete_queue(ctlr); tw_cli_drain_busy_queue(ctlr); tw_cli_drain_pending_queue(ctlr); @@ -1089,53 +1075,88 @@ tw_cl_reset_ctlr(struct tw_cl_ctlr_handl ctlr->get_more_aens = TW_CL_FALSE; /* Soft reset the controller. */ -try_reset: - if ((error = tw_cli_soft_reset(ctlr))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1105, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Controller reset failed", - "error = %d; attempt %d", error, reset_attempt++); - if (reset_attempt <= TW_CLI_MAX_RESET_ATTEMPTS) - goto try_reset; - else - goto out; - } + while (reset_attempt <= TW_CLI_MAX_RESET_ATTEMPTS) { + if ((error = tw_cli_soft_reset(ctlr))) { + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, + TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, + 0x1105, 0x1, TW_CL_SEVERITY_ERROR_STRING, + "Controller reset failed", + "error = %d; attempt %d", error, reset_attempt++); + reset_attempt++; + continue; + } - /* Re-establish logical connection with the controller. */ - if ((error = tw_cli_init_connection(ctlr, - (TW_UINT16)(ctlr->max_simult_reqs), - 0, 0, 0, 0, 0, TW_CL_NULL, TW_CL_NULL, TW_CL_NULL, - TW_CL_NULL, TW_CL_NULL))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + /* Re-establish logical connection with the controller. */ + if ((error = tw_cli_init_connection(ctlr, + (TW_UINT16)(ctlr->max_simult_reqs), + 0, 0, 0, 0, 0, TW_CL_NULL, TW_CL_NULL, TW_CL_NULL, + TW_CL_NULL, TW_CL_NULL))) { + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, + TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, + 0x1106, 0x1, TW_CL_SEVERITY_ERROR_STRING, + "Can't initialize connection after reset", + "error = %d", error); + reset_attempt++; + continue; + } + +#ifdef TW_OSL_DEBUG + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1106, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Can't initialize connection after reset", - "error = %d", error); - goto out; - } + 0x1107, 0x3, TW_CL_SEVERITY_INFO_STRING, + "Controller reset done!", " "); +#endif /* TW_OSL_DEBUG */ + break; + } /* End of while */ - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1107, 0x3, TW_CL_SEVERITY_INFO_STRING, - "Controller reset done!", - " "); + /* Move commands from the reset queue to the pending queue. */ + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_RESET_Q)) != TW_CL_NULL) { + tw_osl_timeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); + } -out: + twa_setup_intr(sc); + tw_cli_enable_interrupts(ctlr); + if ((TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[TW_CLI_PENDING_Q]))) != TW_CL_NULL) + TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, + TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); ctlr->reset_in_progress = TW_CL_FALSE; - xpt_release_simq(sc->sim, 1); + ctlr->reset_needed = TW_CL_FALSE; - /* - * Enable interrupts, and also clear attention and response interrupts. - */ - tw_cli_enable_interrupts(ctlr); - /* Request for a bus re-scan. */ - if (!error) - tw_osl_scan_bus(ctlr_handle); + tw_osl_scan_bus(ctlr_handle); + return(error); } +TW_VOID +tw_cl_set_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle) +{ + struct tw_cli_ctlr_context *ctlr = + (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); + + ctlr->reset_needed = TW_CL_TRUE; +} + +TW_INT32 +tw_cl_is_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle) +{ + struct tw_cli_ctlr_context *ctlr = + (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); + + return(ctlr->reset_needed); +} + +TW_INT32 +tw_cl_is_active(struct tw_cl_ctlr_handle *ctlr_handle) +{ + struct tw_cli_ctlr_context *ctlr = + (struct tw_cli_ctlr_context *) + (ctlr_handle->cl_ctlr_ctxt); + + return(ctlr->active); +} + /* @@ -1151,14 +1172,13 @@ TW_INT32 tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr) { struct tw_cl_ctlr_handle *ctlr_handle = ctlr->ctlr_handle; - TW_UINT32 status_reg; int found; int loop_count; TW_UINT32 error; tw_cli_dbg_printf(1, ctlr_handle, tw_osl_cur_func(), "entered"); - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1108, 0x3, TW_CL_SEVERITY_INFO_STRING, "Resetting controller...", @@ -1193,7 +1213,7 @@ tw_cli_soft_reset(struct tw_cli_ctlr_con } while (!found && (loop_count < 6000000)); /* Loop for no more than 60 seconds */ if (!found) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1109, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Missed firmware handshake after soft-reset", @@ -1210,7 +1230,7 @@ tw_cli_soft_reset(struct tw_cli_ctlr_con TWA_STATUS_MICROCONTROLLER_READY | TWA_STATUS_ATTENTION_INTERRUPT, TW_CLI_RESET_TIMEOUT_PERIOD))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1109, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Micro-ctlr not ready/No attn intr after reset", @@ -1244,26 +1264,14 @@ tw_cli_soft_reset(struct tw_cli_ctlr_con } if ((error = tw_cli_find_aen(ctlr, TWA_AEN_SOFT_RESET))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x110C, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Reset not reported by controller", "error = %d", error); return(error); } - - status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr_handle); - - if ((error = TW_CLI_STATUS_ERRORS(status_reg)) || - (error = tw_cli_check_ctlr_state(ctlr, status_reg))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x110D, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Controller errors detected after reset", - "error = %d", error); - return(error); - } - + return(TW_OSL_ESUCCESS); } Modified: stable/8/sys/dev/twa/tw_cl_misc.c ============================================================================== --- stable/8/sys/dev/twa/tw_cl_misc.c Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl_misc.c Sun Sep 12 06:19:35 2010 (r212490) @@ -83,7 +83,8 @@ tw_cli_drain_complete_queue(struct tw_cl tw_cli_dbg_printf(3, ctlr->ctlr_handle, tw_osl_cur_func(), "entered"); /* Walk the busy queue. */ - while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_COMPLETE_Q))) { + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_COMPLETE_Q)) != + TW_CL_NULL) { if (req->flags & TW_CLI_REQ_FLAGS_INTERNAL) { /* * It's an internal request. Set the appropriate @@ -97,20 +98,21 @@ tw_cli_drain_complete_queue(struct tw_cl req->error_code = TW_CL_ERR_REQ_BUS_RESET; if (req->tw_cli_callback) req->tw_cli_callback(req); - } else { - if ((req_pkt = req->orig_req)) { - /* It's a SCSI request. Complete it. */ - tw_cli_dbg_printf(2, ctlr->ctlr_handle, - tw_osl_cur_func(), - "Completing complete request %p " - "on reset", - req); + } else if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { + /* It's a passthru request. Complete it. */ + if ((req_pkt = req->orig_req) != TW_CL_NULL) { req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - req_pkt->tw_osl_callback(req->req_handle); + + if (req_pkt->tw_osl_callback) + req_pkt->tw_osl_callback(req->req_handle); } tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q); + } else { + /* It's an external (SCSI) request. Add it to the reset queue. */ + tw_osl_untimeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_RESET_Q); } - } + } /* End of while loop */ } @@ -135,7 +137,8 @@ tw_cli_drain_busy_queue(struct tw_cli_ct tw_cli_dbg_printf(3, ctlr->ctlr_handle, tw_osl_cur_func(), "entered"); /* Walk the busy queue. */ - while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_BUSY_Q))) { + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_BUSY_Q)) != + TW_CL_NULL) { if (req->flags & TW_CLI_REQ_FLAGS_INTERNAL) { /* * It's an internal request. Set the appropriate @@ -149,19 +152,21 @@ tw_cli_drain_busy_queue(struct tw_cli_ct req->error_code = TW_CL_ERR_REQ_BUS_RESET; if (req->tw_cli_callback) req->tw_cli_callback(req); - } else { - if ((req_pkt = req->orig_req)) { - /* It's a SCSI request. Complete it. */ - tw_cli_dbg_printf(2, ctlr->ctlr_handle, - tw_osl_cur_func(), - "Completing busy request %p on reset", - req); + } else if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { + /* It's a passthru request. Complete it. */ + if ((req_pkt = req->orig_req) != TW_CL_NULL) { req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - req_pkt->tw_osl_callback(req->req_handle); + + if (req_pkt->tw_osl_callback) + req_pkt->tw_osl_callback(req->req_handle); } tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q); + } else { + /* It's an external (SCSI) request. Add it to the reset queue. */ + tw_osl_untimeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_RESET_Q); } - } + } /* End of while loop */ } @@ -188,7 +193,8 @@ tw_cli_drain_pending_queue(struct tw_cli /* * Pull requests off the pending queue, and complete them. */ - while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_PENDING_Q))) { + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_PENDING_Q)) != + TW_CL_NULL) { if (req->flags & TW_CLI_REQ_FLAGS_INTERNAL) { /* * It's an internal request. Set the appropriate @@ -202,19 +208,21 @@ tw_cli_drain_pending_queue(struct tw_cli req->error_code = TW_CL_ERR_REQ_BUS_RESET; if (req->tw_cli_callback) req->tw_cli_callback(req); - } else { - if ((req_pkt = req->orig_req)) { - /* It's an external request. Complete it. */ - tw_cli_dbg_printf(2, ctlr->ctlr_handle, - tw_osl_cur_func(), - "Completing pending request %p " - "on reset", req); + } else if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { + /* It's a passthru request. Complete it. */ + if ((req_pkt = req->orig_req) != TW_CL_NULL) { req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - req_pkt->tw_osl_callback(req->req_handle); + + if (req_pkt->tw_osl_callback) + req_pkt->tw_osl_callback(req->req_handle); } tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q); + } else { + /* It's an external (SCSI) request. Add it to the reset queue. */ + tw_osl_untimeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_RESET_Q); } - } + } /* End of while loop */ } @@ -239,9 +247,6 @@ tw_cli_drain_response_queue(struct tw_cl for (;;) { status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr->ctlr_handle); - if (tw_cli_check_ctlr_state(ctlr, status_reg)) - return(TW_OSL_EGENFAILURE); - if (status_reg & TWA_STATUS_RESPONSE_QUEUE_EMPTY) return(TW_OSL_ESUCCESS); /* no more response queue entries */ @@ -273,9 +278,6 @@ tw_cli_find_response(struct tw_cli_ctlr_ for (;;) { status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr->ctlr_handle); - if (tw_cli_check_ctlr_state(ctlr, status_reg)) - return(TW_OSL_EGENFAILURE); - if (status_reg & TWA_STATUS_RESPONSE_QUEUE_EMPTY) return(TW_OSL_ENOTTY); /* no more response queue entries */ @@ -356,9 +358,11 @@ tw_cli_drain_aen_queue(struct tw_cli_ctl if ((error = req->cmd_pkt->command.cmd_pkt_9k.status)) { cmd_hdr = &req->cmd_pkt->cmd_hdr; +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, cmd_hdr); +#endif // 0 break; } @@ -714,7 +718,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct tw_osl_memzero(desc, 200); if (!(ctlr->reset_phase1_in_progress)) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1301, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Missing expected status bit(s)", @@ -738,7 +742,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct (ctlr->device_id != TW_CL_DEVICE_ID_9K_SA)) || (!(ctlr->reset_in_progress)) || ((status_reg & TWA_STATUS_QUEUE_ERROR_INTERRUPT) == 0)) - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1302, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Unexpected status bit(s)", @@ -748,7 +752,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct TWA_STATUS_UNEXPECTED_BITS, desc)); if (status_reg & TWA_STATUS_PCI_PARITY_ERROR_INTERRUPT) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1303, 0x1, TW_CL_SEVERITY_ERROR_STRING, "PCI parity error: clearing... " @@ -768,7 +772,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct } if (status_reg & TWA_STATUS_PCI_ABORT_INTERRUPT) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1304, 0x1, TW_CL_SEVERITY_ERROR_STRING, "PCI abort: clearing... ", @@ -791,7 +795,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct if (((ctlr->device_id != TW_CL_DEVICE_ID_9K_E) && (ctlr->device_id != TW_CL_DEVICE_ID_9K_SA)) || (!(ctlr->reset_in_progress))) - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1305, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Controller queue error: clearing... ", @@ -801,17 +805,6 @@ tw_cli_check_ctlr_state(struct tw_cli_ct TW_CLI_WRITE_CONTROL_REGISTER(ctlr->ctlr_handle, TWA_CONTROL_CLEAR_QUEUE_ERROR); } - - if (status_reg & TWA_STATUS_MICROCONTROLLER_ERROR) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1307, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Micro-controller error! ", - "status reg = 0x%x %s", - status_reg, - tw_cli_describe_bits(status_reg, desc)); - error = TW_OSL_EGENFAILURE; - } } return(error); } @@ -850,8 +843,6 @@ tw_cli_describe_bits(TW_UINT32 reg, TW_I tw_osl_strcpy(&str[tw_osl_strlen(str)], "HOST_INTR,"); if (reg & TWA_STATUS_PCI_ABORT_INTERRUPT) tw_osl_strcpy(&str[tw_osl_strlen(str)], "PCI_ABRT,"); - if (reg & TWA_STATUS_MICROCONTROLLER_ERROR) - tw_osl_strcpy(&str[tw_osl_strlen(str)], "MC_ERR,"); if (reg & TWA_STATUS_QUEUE_ERROR_INTERRUPT) tw_osl_strcpy(&str[tw_osl_strlen(str)], "Q_ERR,"); if (reg & TWA_STATUS_PCI_PARITY_ERROR_INTERRUPT) Modified: stable/8/sys/dev/twa/tw_cl_share.h ============================================================================== --- stable/8/sys/dev/twa/tw_cl_share.h Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_cl_share.h Sun Sep 12 06:19:35 2010 (r212490) @@ -349,10 +349,14 @@ extern TW_VOID tw_osl_breakpoint(TW_VOID #endif -#ifndef tw_osl_ctlr_busy -/* Called when CL is too busy to accept new requests. */ -extern TW_VOID tw_osl_ctlr_busy(struct tw_cl_ctlr_handle *ctlr_handle, - struct tw_cl_req_handle *req_handle); +#ifndef tw_osl_timeout +/* Start OS timeout() routine after controller reset sequence */ +extern TW_VOID tw_osl_timeout(struct tw_cl_req_handle *req_handle); +#endif + +#ifndef tw_osl_untimeout +/* Stop OS timeout() routine during controller reset sequence */ +extern TW_VOID tw_osl_untimeout(struct tw_cl_req_handle *req_handle); #endif @@ -552,6 +556,10 @@ extern TW_INT32 tw_cl_init_ctlr(struct t ); +extern TW_VOID tw_cl_set_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle); +extern TW_INT32 tw_cl_is_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle); +extern TW_INT32 tw_cl_is_active(struct tw_cl_ctlr_handle *ctlr_handle); + /* CL's interrupt handler. */ extern TW_INT32 tw_cl_interrupt(struct tw_cl_ctlr_handle *ctlr_handle); Modified: stable/8/sys/dev/twa/tw_osl.h ============================================================================== --- stable/8/sys/dev/twa/tw_osl.h Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_osl.h Sun Sep 12 06:19:35 2010 (r212490) @@ -77,6 +77,7 @@ EINPROGRESS */ #define TW_OSLI_REQ_FLAGS_PASSTHRU (1<<5) /* pass through request */ #define TW_OSLI_REQ_FLAGS_SLEEPING (1<<6) /* owner sleeping on this cmd */ +#define TW_OSLI_REQ_FLAGS_FAILED (1<<7) /* bus_dmamap_load() failed */ #ifdef TW_OSL_DEBUG @@ -100,6 +101,7 @@ struct tw_osli_req_context { struct twa_softc *ctlr; /* ptr to OSL's controller context */ TW_VOID *data; /* ptr to data being passed to CL */ TW_UINT32 length; /* length of buf being passed to CL */ + TW_UINT64 deadline;/* request timeout (in absolute time) */ /* * ptr to, and length of data passed to us from above, in case a buffer @@ -151,6 +153,9 @@ struct twa_softc { struct mtx sim_lock_handle;/* sim lock shared with cam */ struct mtx *sim_lock;/* ptr to sim lock */ + struct callout watchdog_callout[2]; /* For command timout */ + TW_UINT32 watchdog_index; + #ifdef TW_OSL_DEBUG struct tw_osli_q_stats q_stats[TW_OSLI_Q_COUNT];/* queue statistics */ #endif /* TW_OSL_DEBUG */ Modified: stable/8/sys/dev/twa/tw_osl_cam.c ============================================================================== --- stable/8/sys/dev/twa/tw_osl_cam.c Sun Sep 12 00:53:10 2010 (r212489) +++ stable/8/sys/dev/twa/tw_osl_cam.c Sun Sep 12 06:19:35 2010 (r212490) @@ -55,7 +55,6 @@ static TW_VOID twa_action(struct cam_sim *sim, union ccb *ccb); static TW_VOID twa_poll(struct cam_sim *sim); -static TW_VOID twa_timeout(TW_VOID *arg); static TW_INT32 tw_osli_execute_scsi(struct tw_osli_req_context *req, union ccb *ccb); @@ -81,7 +80,7 @@ tw_osli_cam_attach(struct twa_softc *sc) /* * Create the device queue for our SIM. */ - if ((devq = cam_simq_alloc(TW_OSLI_MAX_NUM_REQUESTS)) == NULL) { + if ((devq = cam_simq_alloc(TW_OSLI_MAX_NUM_IOS)) == NULL) { tw_osli_printf(sc, "error = %d", TW_CL_SEVERITY_ERROR_STRING, TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, @@ -275,6 +274,7 @@ tw_osli_execute_scsi(struct tw_osli_req_ "I/O size too big", csio->dxfer_len); ccb_h->status = CAM_REQ_TOO_BIG; + ccb_h->status &= ~CAM_SIM_QUEUED; xpt_done(ccb); return(1); } @@ -290,6 +290,7 @@ tw_osli_execute_scsi(struct tw_osli_req_ 0x2107, "XPT_SCSI_IO: Got SGList"); ccb_h->status = CAM_REQ_INVALID; + ccb_h->status &= ~CAM_SIM_QUEUED; xpt_done(ccb); return(1); } @@ -306,13 +307,20 @@ tw_osli_execute_scsi(struct tw_osli_req_ return(1); } - ccb_h->timeout_ch = timeout(twa_timeout, req, - (ccb_h->timeout * hz) / 1000); + req->deadline = tw_osl_get_local_time() + (ccb_h->timeout / 1000); + + /* * twa_map_load_data_callback will fill in the SGL, * and submit the I/O. */ error = tw_osli_map_request(req); + if ((error) && (req->flags & TW_OSLI_REQ_FLAGS_FAILED)) { + req->deadline = 0; + ccb_h->status = CAM_REQ_CMP_ERR; + ccb_h->status &= ~CAM_SIM_QUEUED; + xpt_done(ccb); + } return(error); } @@ -345,10 +353,20 @@ twa_action(struct cam_sim *sim, union cc * Freeze the simq to maintain ccb ordering. The next * ccb that gets completed will unfreeze the simq. */ + ccb_h->status &= ~CAM_SIM_QUEUED; + ccb_h->status |= CAM_REQUEUE_REQ; + xpt_done(ccb); + break; + } + + if ((tw_cl_is_reset_needed(&(req->ctlr->ctlr_handle)))) { + ccb_h->status &= ~CAM_SIM_QUEUED; ccb_h->status |= CAM_REQUEUE_REQ; xpt_done(ccb); + tw_osli_req_q_insert_tail(req, TW_OSLI_FREE_Q); break; } + req->req_handle.osl_req_ctxt = req; req->req_handle.is_io = TW_CL_TRUE; req->orig_req = ccb; @@ -364,25 +382,14 @@ twa_action(struct cam_sim *sim, union cc break; case XPT_RESET_BUS: - tw_cl_create_event(&(sc->ctlr_handle), TW_CL_TRUE, + tw_cl_create_event(&(sc->ctlr_handle), TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, 0x2108, 0x3, TW_CL_SEVERITY_INFO_STRING, "Received Reset Bus request from CAM", " "); - mtx_unlock(sc->sim_lock); - if (tw_cl_reset_ctlr(&sc->ctlr_handle)) { - tw_cl_create_event(&(sc->ctlr_handle), TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, - 0x2109, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Failed to reset bus", - " "); - ccb_h->status = CAM_REQ_CMP_ERR; - } - else - ccb_h->status = CAM_REQ_CMP; - - mtx_lock(sc->sim_lock); + tw_cl_set_reset_needed(&(sc->ctlr_handle)); + ccb_h->status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -450,6 +457,7 @@ twa_action(struct cam_sim *sim, union cc path_inq->transport_version = 2; path_inq->protocol = PROTO_SCSI; path_inq->protocol_version = SCSI_REV_2; + path_inq->maxio = TW_CL_MAX_IO_SIZE; ccb_h->status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -487,31 +495,6 @@ twa_poll(struct cam_sim *sim) /* - * Function name: twa_timeout - * Description: Driver entry point for being alerted on a request - * timing out. - * - * Input: arg -- ptr to timed out request - * Output: None - * Return value: None - */ -static TW_VOID -twa_timeout(TW_VOID *arg) -{ - struct tw_osli_req_context *req = - (struct tw_osli_req_context *)arg; - - tw_cl_create_event(&(req->ctlr->ctlr_handle), TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, - 0x210B, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Request timed out!", - "request = %p", req); - tw_cl_reset_ctlr(&(req->ctlr->ctlr_handle)); -} - - - -/* * Function name: tw_osli_request_bus_scan * Description: Requests CAM for a scan of the bus. * @@ -574,20 +557,39 @@ tw_osli_disallow_new_requests(struct twa /* - * Function name: tw_osl_ctlr_busy - * Description: CL calls this function on cmd queue full or otherwise, - * when it is too busy to accept new requests. + * Function name: tw_osl_timeout + * Description: Call to timeout(). * - * Input: ctlr_handle -- ptr to controller handle - * req_handle -- ptr to request handle sent by OSL. + * Input: req_handle -- ptr to request handle sent by OSL. * Output: None * Return value: None */ TW_VOID -tw_osl_ctlr_busy(struct tw_cl_ctlr_handle *ctlr_handle, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 11:11:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 922A91065672; Sun, 12 Sep 2010 11:11:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 810B68FC13; Sun, 12 Sep 2010 11:11:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CBBrpw025915; Sun, 12 Sep 2010 11:11:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CBBrW0025912; Sun, 12 Sep 2010 11:11:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009121111.o8CBBrW0025912@svn.freebsd.org> From: Alexander Motin Date: Sun, 12 Sep 2010 11:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212491 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 11:11:53 -0000 Author: mav Date: Sun Sep 12 11:11:53 2010 New Revision: 212491 URL: http://svn.freebsd.org/changeset/base/212491 Log: Instead of storing last event timestamp, store the next event timestamp. It corrects handling of the first event offset in emulated periodic mode. Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Sun Sep 12 06:19:35 2010 (r212490) +++ head/sys/dev/acpica/acpi_hpet.c Sun Sep 12 11:11:53 2010 (r212491) @@ -98,7 +98,7 @@ struct hpet_softc { uint32_t caps; uint32_t vectors; uint32_t div; - uint32_t last; + uint32_t next; char name[8]; } t[32]; int num_timers; @@ -149,7 +149,7 @@ hpet_start(struct eventtimer *et, struct hpet_timer *mt = (struct hpet_timer *)et->et_priv; struct hpet_timer *t; struct hpet_softc *sc = mt->sc; - uint32_t fdiv, cmp; + uint32_t fdiv, now; t = (mt->pcpu_master < 0) ? mt : &sc->t[mt->pcpu_slaves[curcpu]]; if (period != NULL) { @@ -170,24 +170,28 @@ hpet_start(struct eventtimer *et, if (t->irq < 0) bus_write_4(sc->mem_res, HPET_ISR, 1 << t->num); t->caps |= HPET_TCNF_INT_ENB; - t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); + now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); restart: - cmp = t->last + fdiv; + t->next = now + fdiv; if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) { t->caps |= HPET_TCNF_TYPE; bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps | HPET_TCNF_VAL_SET); - bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), cmp); - bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), t->div); + bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), + t->next); + bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), + t->div); } else { t->caps &= ~HPET_TCNF_TYPE; - bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps); - bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), cmp); + bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), + t->caps); + bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), + t->next); } if (fdiv < 5000) { bus_read_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num)); - t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); - if ((int32_t)(t->last - cmp) >= 0) { + now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); + if ((int32_t)(now - t->next) >= 0) { fdiv *= 2; goto restart; } @@ -217,6 +221,8 @@ hpet_intr_single(void *arg) struct hpet_softc *sc = t->sc; uint32_t now; + if (t->mode == 0) + return (FILTER_STRAY); /* Check that per-CPU timer interrupt reached right CPU. */ if (t->pcpu_cpu >= 0 && t->pcpu_cpu != curcpu) { if ((++t->pcpu_misrouted) % 32 == 0) { @@ -231,20 +237,21 @@ hpet_intr_single(void *arg) */ if ((t->mode == 1 && (t->caps & HPET_TCAP_PER_INT) == 0) || t->mode == 2) { - t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); + t->next = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER) + + sc->freq / 8; bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), - t->last + sc->freq / 8); + t->next); } return (FILTER_HANDLED); } if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT) == 0) { - t->last += t->div; + t->next += t->div; now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); - if ((int32_t)(now - (t->last + t->div / 2)) > 0) - t->last = now - t->div / 2; + if ((int32_t)((now + t->div / 2) - t->next) > 0) + t->next = now + t->div / 2; bus_write_4(sc->mem_res, - HPET_TIMER_COMPARATOR(t->num), t->last + t->div); + HPET_TIMER_COMPARATOR(t->num), t->next); } else if (t->mode == 2) t->mode = 0; mt = (t->pcpu_master < 0) ? t : &sc->t[t->pcpu_master]; @@ -713,19 +720,21 @@ hpet_resume(device_t dev) #endif if (t->mode == 0) continue; - t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); + t->next = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) { t->caps |= HPET_TCNF_TYPE; + t->next += t->div; bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps | HPET_TCNF_VAL_SET); bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), - t->last + t->div); + t->next); bus_read_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num)); bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), t->div); } else { + t->next += sc->freq / 1024; bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), - t->last + sc->freq / 1024); + t->next); } bus_write_4(sc->mem_res, HPET_ISR, 1 << t->num); bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps); From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 14:04:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F9571065695; Sun, 12 Sep 2010 14:04:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EA018FC1A; Sun, 12 Sep 2010 14:04:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CE46lg049403; Sun, 12 Sep 2010 14:04:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CE46o4049399; Sun, 12 Sep 2010 14:04:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009121404.o8CE46o4049399@svn.freebsd.org> From: Glen Barber Date: Sun, 12 Sep 2010 14:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212492 - in head/lib/libc: db/man sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 14:04:06 -0000 Author: gjb (doc committer) Date: Sun Sep 12 14:04:05 2010 New Revision: 212492 URL: http://svn.freebsd.org/changeset/base/212492 Log: Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 and r212438, repectively. Approved by: keramida (mentor) MFC after: 1 week Modified: head/lib/libc/db/man/dbopen.3 head/lib/libc/sys/cpuset_getaffinity.2 Modified: head/lib/libc/db/man/dbopen.3 ============================================================================== --- head/lib/libc/db/man/dbopen.3 Sun Sep 12 11:11:53 2010 (r212491) +++ head/lib/libc/db/man/dbopen.3 Sun Sep 12 14:04:05 2010 (r212492) @@ -28,7 +28,7 @@ .\" @(#)dbopen.3 8.5 (Berkeley) 1/2/94 .\" $FreeBSD$ .\" -.Dd January 2, 1994 +.Dd September 10, 2010 .Dt DBOPEN 3 .Os .Sh NAME Modified: head/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- head/lib/libc/sys/cpuset_getaffinity.2 Sun Sep 12 11:11:53 2010 (r212491) +++ head/lib/libc/sys/cpuset_getaffinity.2 Sun Sep 12 14:04:05 2010 (r212492) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd September 10, 2010 .Dt CPUSET 2 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 14:04:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73C21106564A; Sun, 12 Sep 2010 14:04:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 633BA8FC15; Sun, 12 Sep 2010 14:04:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CE4sG6049491; Sun, 12 Sep 2010 14:04:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CE4sti049488; Sun, 12 Sep 2010 14:04:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009121404.o8CE4sti049488@svn.freebsd.org> From: Glen Barber Date: Sun, 12 Sep 2010 14:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212493 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 14:04:54 -0000 Author: gjb (doc committer) Date: Sun Sep 12 14:04:54 2010 New Revision: 212493 URL: http://svn.freebsd.org/changeset/base/212493 Log: Bump date from r212440. Approved by: keramida (mentor) MFC after: 1 week Modified: head/share/man/man9/devclass_get_maxunit.9 Modified: head/share/man/man9/devclass_get_maxunit.9 ============================================================================== --- head/share/man/man9/devclass_get_maxunit.9 Sun Sep 12 14:04:05 2010 (r212492) +++ head/share/man/man9/devclass_get_maxunit.9 Sun Sep 12 14:04:54 2010 (r212493) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 3, 2005 +.Dd September 10, 2005 .Dt DEVCLASS_GET_MAXUNIT 9 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 14:12:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B9A0106564A; Sun, 12 Sep 2010 14:12:16 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6EE28FC19; Sun, 12 Sep 2010 14:12:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CECG1e051008; Sun, 12 Sep 2010 14:12:16 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CECG9U051005; Sun, 12 Sep 2010 14:12:16 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009121412.o8CECG9U051005@svn.freebsd.org> From: Rui Paulo Date: Sun, 12 Sep 2010 14:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212494 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace intel/dtrace X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 14:12:17 -0000 Author: rpaulo Date: Sun Sep 12 14:12:16 2010 New Revision: 212494 URL: http://svn.freebsd.org/changeset/base/212494 Log: Revamp locking a bit. This fixes three problems: * processes now can't go away while we are inserting probes (fixes a panic) * if a trap happens, we won't be holding the process lock (fixes a hang) * fix a LOR between the process lock and the fasttrap bucket list lock Thanks to kib for pointing some problems. Sponsored by: The FreeBSD Foundation Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sun Sep 12 14:04:54 2010 (r212493) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sun Sep 12 14:12:16 2010 (r212494) @@ -460,11 +460,13 @@ fasttrap_fork(proc_t *p, proc_t *cp) /* * dtrace_helpers_duplicate() allocates memory. */ + _PHOLD(cp); PROC_UNLOCK(p); PROC_UNLOCK(cp); dtrace_helpers_duplicate(p, cp); PROC_LOCK(cp); PROC_LOCK(p); + _PRELE(cp); } /* * This check is purposely here instead of in kern_fork.c because, @@ -494,6 +496,8 @@ fasttrap_fork(proc_t *p, proc_t *cp) mtx_lock_spin(&cp->p_slock); sprlock_proc(cp); mtx_unlock_spin(&cp->p_slock); +#else + _PHOLD(cp); #endif /* @@ -527,6 +531,8 @@ fasttrap_fork(proc_t *p, proc_t *cp) #if defined(sun) mutex_enter(&cp->p_lock); sprunlock(cp); +#else + _PRELE(cp); #endif } @@ -542,6 +548,7 @@ fasttrap_exec_exit(proc_t *p) ASSERT(p == curproc); #endif PROC_LOCK_ASSERT(p, MA_OWNED); + _PHOLD(p); PROC_UNLOCK(p); /* @@ -554,6 +561,7 @@ fasttrap_exec_exit(proc_t *p) dtrace_helpers_destroy(p); #endif PROC_LOCK(p); + _PRELE(p); } @@ -591,9 +599,7 @@ fasttrap_tracepoint_enable(proc_t *p, fa * Before we make any modifications, make sure we've imposed a barrier * on the generation in which this probe was last modified. */ - PROC_UNLOCK(p); fasttrap_mod_barrier(probe->ftp_gen); - PROC_LOCK(p); bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)]; @@ -695,8 +701,6 @@ again: */ #if defined(sun) ASSERT(p->p_proc_flag & P_PR_LOCK); -#else - PROC_LOCK_ASSERT(p, MA_OWNED); #endif p->p_dtrace_count++; @@ -889,8 +893,6 @@ fasttrap_tracepoint_disable(proc_t *p, f */ #if defined(sun) ASSERT(p->p_proc_flag & P_PR_LOCK); -#else - PROC_LOCK_ASSERT(p, MA_OWNED); #endif p->p_dtrace_count--; } @@ -1044,9 +1046,14 @@ fasttrap_pid_enable(void *arg, dtrace_id * the chance to execute the trap instruction we're about to place * in their process's text. */ +#ifdef __FreeBSD__ + /* + * pfind() returns a locked process. + */ + _PHOLD(p); PROC_UNLOCK(p); +#endif fasttrap_enable_callbacks(); - PROC_LOCK(p); /* * Enable all the tracepoints and add this probe's id to each @@ -1077,7 +1084,7 @@ fasttrap_pid_enable(void *arg, dtrace_id mutex_enter(&p->p_lock); sprunlock(p); #else - PROC_UNLOCK(p); + PRELE(p); #endif /* @@ -1092,7 +1099,7 @@ fasttrap_pid_enable(void *arg, dtrace_id mutex_enter(&p->p_lock); sprunlock(p); #else - PROC_UNLOCK(p); + PRELE(p); #endif probe->ftp_enabled = 1; @@ -1121,6 +1128,10 @@ fasttrap_pid_disable(void *arg, dtrace_i mutex_exit(&provider->ftp_mtx); return; } +#ifdef __FreeBSD__ + _PHOLD(p); + PROC_UNLOCK(p); +#endif /* * Disable all the associated tracepoints (for fully enabled probes). @@ -1152,13 +1163,13 @@ fasttrap_pid_disable(void *arg, dtrace_i whack = provider->ftp_marked = 1; mutex_exit(&provider->ftp_mtx); } -#if !defined(sun) - PROC_UNLOCK(p); -#endif if (whack) fasttrap_pid_cleanup(); +#ifdef __FreeBSD__ + PRELE(p); +#endif if (!probe->ftp_enabled) return; Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sun Sep 12 14:04:54 2010 (r212493) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sun Sep 12 14:12:16 2010 (r212494) @@ -74,15 +74,12 @@ proc_ops(int op, proc_t *p, void *kaddr, uio.uio_segflg = UIO_SYSSPACE; uio.uio_td = curthread; uio.uio_rw = op; - _PHOLD(p); - PROC_UNLOCK(p); + PHOLD(p); if (proc_rwmem(p, &uio) < 0) { - PROC_LOCK(p); - _PRELE(p); + PRELE(p); return (-1); } - PROC_LOCK(p); - _PRELE(p); + PRELE(p); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 14:34:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3B86106564A for ; Sun, 12 Sep 2010 14:34:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (aries.glenbarber.us [204.109.63.207]) by mx1.freebsd.org (Postfix) with SMTP id 92AB88FC08 for ; Sun, 12 Sep 2010 14:34:10 +0000 (UTC) Received: (qmail 47835 invoked by uid 0); 12 Sep 2010 10:07:28 -0400 Received: from unknown (HELO schism.local) (gjb@71.230.240.241) by 0 with SMTP; 12 Sep 2010 10:07:28 -0400 Message-ID: <4C8CDE9F.9030806@FreeBSD.org> Date: Sun, 12 Sep 2010 10:07:27 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: src-committers@freebsd.org References: <201009121404.o8CE4sti049488@svn.freebsd.org> In-Reply-To: <201009121404.o8CE4sti049488@svn.freebsd.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r212493 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 14:34:10 -0000 On 9/12/10 10:04 AM, Glen Barber wrote: > Author: gjb (doc committer) [snip] > -.Dd April 3, 2005 > +.Dd September 10, 2005 Bah! Fixing this now... :( -- Glen Barber FreeBSD Documentation Project From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 15:59:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77030106564A; Sun, 12 Sep 2010 15:59:14 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65A078FC1A; Sun, 12 Sep 2010 15:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CFxEU8070652; Sun, 12 Sep 2010 15:59:14 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CFxEIx070650; Sun, 12 Sep 2010 15:59:14 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009121559.o8CFxEIx070650@svn.freebsd.org> From: Rui Paulo Date: Sun, 12 Sep 2010 15:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212495 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 15:59:14 -0000 Author: rpaulo Date: Sun Sep 12 15:59:14 2010 New Revision: 212495 URL: http://svn.freebsd.org/changeset/base/212495 Log: Give a chance to the target binary to run the ctors by waiting until it has reached main(). This allows plockstat to work. Sponsored by: The FreeBSD Foundation Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Sep 12 14:12:16 2010 (r212494) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Sep 12 15:59:14 2010 (r212495) @@ -1103,7 +1103,7 @@ alloc: #if defined(sun) dtp->dt_prcmode = DT_PROC_STOP_PREINIT; #else - dtp->dt_prcmode = DT_PROC_STOP_POSTINIT; + dtp->dt_prcmode = DT_PROC_STOP_MAIN; #endif dtp->dt_linkmode = DT_LINK_KERNEL; dtp->dt_linktype = DT_LTYP_ELF; From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 16:14:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A5FE1065673; Sun, 12 Sep 2010 16:14:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 435F98FC14; Sun, 12 Sep 2010 16:14:45 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8CGEfI4095079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Sep 2010 19:14:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8CGEfe4006222; Sun, 12 Sep 2010 19:14:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8CGEfQc006221; Sun, 12 Sep 2010 19:14:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 12 Sep 2010 19:14:41 +0300 From: Kostik Belousov To: Rick Macklem Message-ID: <20100912161441.GC2465@deviant.kiev.zoral.com.ua> References: <20100911060111.GT2465@deviant.kiev.zoral.com.ua> <1300087421.776986.1284252082593.JavaMail.root@erie.cs.uoguelph.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YjUCIDG0UL7zSTfa" Content-Disposition: inline In-Reply-To: <1300087421.776986.1284252082593.JavaMail.root@erie.cs.uoguelph.ca> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212439 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 16:14:47 -0000 --YjUCIDG0UL7zSTfa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 11, 2010 at 08:41:22PM -0400, Rick Macklem wrote: > > Then, fid_reserved is no more reserved ? Should we rename it ? > >=20 > > Comment for fid_reserved about longword alignment is wrong. >=20 > Well, it's actually more broken than that. > fid_len - Most file systems set it to the size of their variant > of the entire structure, including the Xfid_len field. > ZFS sets it to the size of the structure - sizeof(uint16_t) > { presumably subtracting out the size if Xfid_len? }. > And xfs, well, it does weird stuff with it I can't figure > out, but it is definitely not the size of the entire struct. >=20 > As such, exposing fid_len above the VOP_xxx() doesn't make much sense. > (After my commit yesterday, nothing above the VOP_VPTOFH() uses it.) >=20 > Personally, I'd lean towards a generic struct fid like... > struct fid { > uint8_t fid_data[MAXFIDSZ]; > }; > with MAXFIDSZ increased appropriately, but this will require changes > to xfs and zfs, since they both set the generic fid_len. >=20 > If you go with... > struct fid { > uint16_t fid_len; > uint8_t fid_data[MAXFIDSZ]; > }; > then the hash functions in the two NFS servers need to be changed > (they assume 32bit alignment of fid_data), but they should be fixed > anyhow, since they mostly hash to 0 for ZFS at this time. (From what > I see ZFS file handles looking like.) >=20 > Or, you could just rename fid_reserved to fid_pad and not worry about it. >=20 > Maybe the ZFS folks could decide what they would prefer? rick Let at least rename the field. And I propose the name like fid_data0 or similar, not the fid_pad, to signify that it is used. --YjUCIDG0UL7zSTfa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyM/HEACgkQC3+MBN1Mb4ia1wCghknTOCGYyrBGOXm2fpwRBI6b tfAAn3OnmFhDJgHNJg3q1dc117Wsx8f0 =4iR1 -----END PGP SIGNATURE----- --YjUCIDG0UL7zSTfa-- From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 16:28:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A69CC1065694; Sun, 12 Sep 2010 16:28:26 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95DE08FC0A; Sun, 12 Sep 2010 16:28:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CGSQPX077591; Sun, 12 Sep 2010 16:28:26 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CGSQog077589; Sun, 12 Sep 2010 16:28:26 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201009121628.o8CGSQog077589@svn.freebsd.org> From: Ivan Voras Date: Sun, 12 Sep 2010 16:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212496 - head/sys/modules/crypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 16:28:26 -0000 Author: ivoras Date: Sun Sep 12 16:28:26 2010 New Revision: 212496 URL: http://svn.freebsd.org/changeset/base/212496 Log: List low-level Blowfish ECB module in the SRCS. It looks like it was dropped by accident (and it would be inconvenient to implement it otherwise because it uses internal non-published headers). MFC after: 1 week Modified: head/sys/modules/crypto/Makefile Modified: head/sys/modules/crypto/Makefile ============================================================================== --- head/sys/modules/crypto/Makefile Sun Sep 12 15:59:14 2010 (r212495) +++ head/sys/modules/crypto/Makefile Sun Sep 12 16:28:26 2010 (r212496) @@ -12,7 +12,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 += skipjack.c bf_enc.c bf_skey.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 SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 17:04:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9DDC1065674; Sun, 12 Sep 2010 17:04:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F66D8FC1E; Sun, 12 Sep 2010 17:04:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CH4pnL081651; Sun, 12 Sep 2010 17:04:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CH4pVT081646; Sun, 12 Sep 2010 17:04:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201009121704.o8CH4pVT081646@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 12 Sep 2010 17:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212497 - in head/libexec/rtld-elf: . powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 17:04:51 -0000 Author: nwhitehorn Date: Sun Sep 12 17:04:51 2010 New Revision: 212497 URL: http://svn.freebsd.org/changeset/base/212497 Log: Check for undefined weak symbols during PLT binding on powerpc64, and do not attempt to copy NULL function descriptors. This fixes LD_BIND_NOW on powerpc64 after r211706. Reviewed by: kib Modified: head/libexec/rtld-elf/powerpc64/reloc.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Sun Sep 12 16:28:26 2010 (r212496) +++ head/libexec/rtld-elf/powerpc64/reloc.c Sun Sep 12 17:04:51 2010 (r212497) @@ -405,8 +405,13 @@ reloc_jmpslots(Obj_Entry *obj) (void *)target, basename(defobj->path)); #endif - reloc_jmpslot(where, target, defobj, obj, - (const Elf_Rel *) rela); + if (def == &sym_zero) { + /* Zero undefined weak symbols */ + bzero(where, sizeof(struct funcdesc)); + } else { + reloc_jmpslot(where, target, defobj, obj, + (const Elf_Rel *) rela); + } } obj->jmpslots_done = true; Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Sep 12 16:28:26 2010 (r212496) +++ head/libexec/rtld-elf/rtld.c Sun Sep 12 17:04:51 2010 (r212497) @@ -183,7 +183,7 @@ static Objlist list_main = /* Objects lo static Objlist list_fini = /* Objects needing fini() calls */ STAILQ_HEAD_INITIALIZER(list_fini); -static Elf_Sym sym_zero; /* For resolving undefined weak refs. */ +Elf_Sym sym_zero; /* For resolving undefined weak refs. */ #define GDB_STATE(s,m) r_debug.r_state = s; r_debug_state(&r_debug,m); Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Sun Sep 12 16:28:26 2010 (r212496) +++ head/libexec/rtld-elf/rtld.h Sun Sep 12 17:04:51 2010 (r212497) @@ -261,6 +261,7 @@ extern void *xcalloc(size_t); extern void *xmalloc(size_t); extern char *xstrdup(const char *); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; +extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ extern void dump_relocations (Obj_Entry *); extern void dump_obj_relocations (Obj_Entry *); From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 17:50:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 106F5106564A; Sun, 12 Sep 2010 17:50:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F40B58FC0C; Sun, 12 Sep 2010 17:50:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CHo73R089683; Sun, 12 Sep 2010 17:50:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CHo7ts089681; Sun, 12 Sep 2010 17:50:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009121750.o8CHo7ts089681@svn.freebsd.org> From: Glen Barber Date: Sun, 12 Sep 2010 17:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212498 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 17:50:08 -0000 Author: gjb (doc committer) Date: Sun Sep 12 17:50:07 2010 New Revision: 212498 URL: http://svn.freebsd.org/changeset/base/212498 Log: Rewording and typo fixes in newfs(8). PR: 150490 Submitted by: Eitan Adler Additional fixes by: Warren Block , keramida Approved by: keramida (mentor) MFC after: 1 week Modified: head/sbin/newfs/newfs.8 Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Sun Sep 12 17:04:51 2010 (r212497) +++ head/sbin/newfs/newfs.8 Sun Sep 12 17:50:07 2010 (r212498) @@ -79,10 +79,10 @@ The following options define the general Erase the content of the disk before making the filesystem. The reserved area in front of the superblock (for bootcode) will not be erased. .Pp -This is a relevant option for flash based storage devices that use -wear levelling algorithms. +This option is only relevant for flash based storage devices that use +wear-leveling algorithms. .Pp -NB: Erasing may take as long time as writing every sector on the disk. +Erasing may take a long time as it writes to every sector on the disk. .It Fl J Enable journaling on the new file system via gjournal. See From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 17:53:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 466AC10656B7; Sun, 12 Sep 2010 17:53:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35FCA8FC17; Sun, 12 Sep 2010 17:53:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CHrWM7090039; Sun, 12 Sep 2010 17:53:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CHrWSq090037; Sun, 12 Sep 2010 17:53:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009121753.o8CHrWSq090037@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 12 Sep 2010 17:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212499 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 17:53:32 -0000 Author: kib Date: Sun Sep 12 17:53:31 2010 New Revision: 212499 URL: http://svn.freebsd.org/changeset/base/212499 Log: Fix typo. MFC after: 3 days Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sun Sep 12 17:50:07 2010 (r212498) +++ head/sys/sys/elf_common.h Sun Sep 12 17:53:31 2010 (r212499) @@ -388,7 +388,7 @@ typedef struct { #define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING and less than DT_LOOS follow the rules for the interpretation of the d_un union - as follows: even == 'd_ptr', even == 'd_val' + as follows: even == 'd_ptr', odd == 'd_val' or none */ #define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to pre-initialization functions. */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 17:53:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3314310657D8; Sun, 12 Sep 2010 17:53:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22C1F8FC1E; Sun, 12 Sep 2010 17:53:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CHrbqr090080; Sun, 12 Sep 2010 17:53:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CHrbXF090078; Sun, 12 Sep 2010 17:53:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009121753.o8CHrbXF090078@svn.freebsd.org> From: Glen Barber Date: Sun, 12 Sep 2010 17:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212500 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 17:53:37 -0000 Author: gjb (doc committer) Date: Sun Sep 12 17:53:36 2010 New Revision: 212500 URL: http://svn.freebsd.org/changeset/base/212500 Log: I believe the majority of Gregorian calendars would agree the current year is 2010, not 2005. Approved by: keramida (mentor) Pointy hat to: gjb MFC after: 1 week Modified: head/share/man/man9/devclass_get_maxunit.9 Modified: head/share/man/man9/devclass_get_maxunit.9 ============================================================================== --- head/share/man/man9/devclass_get_maxunit.9 Sun Sep 12 17:53:31 2010 (r212499) +++ head/share/man/man9/devclass_get_maxunit.9 Sun Sep 12 17:53:36 2010 (r212500) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2005 +.Dd September 10, 2010 .Dt DEVCLASS_GET_MAXUNIT 9 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 17:55:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD5931065675; Sun, 12 Sep 2010 17:55:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD6418FC0C; Sun, 12 Sep 2010 17:55:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CHtuG2090215; Sun, 12 Sep 2010 17:55:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CHtu9L090213; Sun, 12 Sep 2010 17:55:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009121755.o8CHtu9L090213@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 12 Sep 2010 17:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212501 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 17:55:57 -0000 Author: kib Date: Sun Sep 12 17:55:56 2010 New Revision: 212501 URL: http://svn.freebsd.org/changeset/base/212501 Log: Add DF_1_LOADFLTR. MFC after: 3 days Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sun Sep 12 17:53:36 2010 (r212500) +++ head/sys/sys/elf_common.h Sun Sep 12 17:55:56 2010 (r212501) @@ -471,6 +471,7 @@ typedef struct { #define DF_1_BIND_NOW 0x00000001 /* Same as DF_BIND_NOW */ #define DF_1_GLOBAL 0x00000002 /* Set the RTLD_GLOBAL for object */ #define DF_1_NODELETE 0x00000008 /* Set the RTLD_NODELETE for object */ +#define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */ #define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */ #define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 18:04:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAEC71065670; Sun, 12 Sep 2010 18:04:47 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9ACA08FC14; Sun, 12 Sep 2010 18:04:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CI4lMP090859; Sun, 12 Sep 2010 18:04:47 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CI4lfN090857; Sun, 12 Sep 2010 18:04:47 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201009121804.o8CI4lfN090857@svn.freebsd.org> From: Qing Li Date: Sun, 12 Sep 2010 18:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212502 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 18:04:47 -0000 Author: qingli Date: Sun Sep 12 18:04:47 2010 New Revision: 212502 URL: http://svn.freebsd.org/changeset/base/212502 Log: Adding an address on an interface also requires the loopback route to that address be installed. PR: kern/150481 Submitted by: Ingo Flaschberger MFC after: 5 days Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Sun Sep 12 17:55:56 2010 (r212501) +++ head/sys/netinet/raw_ip.c Sun Sep 12 18:04:47 2010 (r212502) @@ -741,6 +741,8 @@ rip_ctlinput(int cmd, struct sockaddr *s if (err == 0) ia->ia_flags |= IFA_ROUTE; err = ifa_add_loopback_route((struct ifaddr *)ia, sa); + if (err == 0) + ia->ia_flags |= IFA_RTSELF; ifa_free(&ia->ia_ifa); break; } From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 18:37:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1EFB106564A; Sun, 12 Sep 2010 18:37:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90D868FC16; Sun, 12 Sep 2010 18:37:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CIbYfS096865; Sun, 12 Sep 2010 18:37:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CIbYes096863; Sun, 12 Sep 2010 18:37:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009121837.o8CIbYes096863@svn.freebsd.org> From: Glen Barber Date: Sun, 12 Sep 2010 18:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212503 - stable/8/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 18:37:34 -0000 Author: gjb (doc committer) Date: Sun Sep 12 18:37:34 2010 New Revision: 212503 URL: http://svn.freebsd.org/changeset/base/212503 Log: MFC 212241. Note that jail_list should contain alphanumeric characters only. PR: 150098 Approved by: keramida (mentor) Modified: stable/8/share/man/man5/rc.conf.5 Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Sun Sep 12 18:04:47 2010 (r212502) +++ stable/8/share/man/man5/rc.conf.5 Sun Sep 12 18:37:34 2010 (r212503) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd September 4, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -3402,7 +3402,8 @@ A space separated list of names for jail This is purely a configuration aid to help identify and configure multiple jails. The names specified in this list will be used to -identify settings common to an instance of a jail. +identify settings common to an instance of a jail, +and should contain alphanumeric characters only. Assuming that the jail in question was named .Li vjail , you would have the following dependent variables: From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 18:50:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC888106564A; Sun, 12 Sep 2010 18:50:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB8278FC18; Sun, 12 Sep 2010 18:50:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CIovjs099280; Sun, 12 Sep 2010 18:50:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CIovmf099278; Sun, 12 Sep 2010 18:50:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009121850.o8CIovmf099278@svn.freebsd.org> From: Glen Barber Date: Sun, 12 Sep 2010 18:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212504 - stable/7/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 18:50:58 -0000 Author: gjb (doc committer) Date: Sun Sep 12 18:50:57 2010 New Revision: 212504 URL: http://svn.freebsd.org/changeset/base/212504 Log: MFC 212241. Note that jail_list should contain alphanumeric characters only. PR: 150098 Approved by: keramida (mentor) Modified: stable/7/share/man/man5/rc.conf.5 Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Sun Sep 12 18:37:34 2010 (r212503) +++ stable/7/share/man/man5/rc.conf.5 Sun Sep 12 18:50:57 2010 (r212504) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2009 +.Dd September 4, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -3369,7 +3369,8 @@ A space separated list of names for jail This is purely a configuration aid to help identify and configure multiple jails. The names specified in this list will be used to -identify settings common to an instance of a jail. +identify settings common to an instance of a jail, +and should contain alphanumeric characters only. Assuming that the jail in question was named .Li vjail , you would have the following dependent variables: From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 18:53:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91D88106566C; Sun, 12 Sep 2010 18:53:44 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8185E8FC26; Sun, 12 Sep 2010 18:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CIriw7099958; Sun, 12 Sep 2010 18:53:44 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CIriSY099956; Sun, 12 Sep 2010 18:53:44 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201009121853.o8CIriSY099956@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 12 Sep 2010 18:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212505 - head/usr.sbin/freebsd-update X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 18:53:44 -0000 Author: jh Date: Sun Sep 12 18:53:44 2010 New Revision: 212505 URL: http://svn.freebsd.org/changeset/base/212505 Log: In backup_kernel(), support backing up subdirectories and handle files with spaces correctly. Approved by: cperciva MFC after: 1 month Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Sun Sep 12 18:50:57 2010 (r212504) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Sun Sep 12 18:53:44 2010 (r212505) @@ -2638,11 +2638,13 @@ backup_kernel () { # "not ours", backup_kernel_finddir would have exited, so # deleting the directory content is as safe as we can make it. if [ -d $BACKUPKERNELDIR ]; then - rm -f $BACKUPKERNELDIR/* + rm -fr $BACKUPKERNELDIR fi - # Create directory for backup if it doesn't exist. + # Create directories for backup. mkdir -p $BACKUPKERNELDIR + mtree -cdn -p "${KERNELDIR}" | \ + mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null # Mark the directory as having been created by freebsd-update. touch $BACKUPKERNELDIR/.freebsd-update @@ -2663,9 +2665,8 @@ backup_kernel () { fi # Backup all the kernel files using hardlinks. - find $KERNELDIR -type f $FINDFILTER | \ - sed -Ee "s,($KERNELDIR)/?(.*),\1/\2 ${BACKUPKERNELDIR}/\2," | \ - xargs -n 2 cp -pl + (cd $KERNELDIR && find . -type f $FINDFILTER -exec \ + cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;) # Re-enable patchname expansion. set +f From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 19:06:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F58106564A; Sun, 12 Sep 2010 19:06:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22FB68FC16; Sun, 12 Sep 2010 19:06:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CJ69SQ002604; Sun, 12 Sep 2010 19:06:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CJ68vQ002600; Sun, 12 Sep 2010 19:06:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009121906.o8CJ68vQ002600@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 12 Sep 2010 19:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212506 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 19:06:09 -0000 Author: kib Date: Sun Sep 12 19:06:08 2010 New Revision: 212506 URL: http://svn.freebsd.org/changeset/base/212506 Log: Do not fork nfsiod directly from the vop methods. This causes LORs between vnode lock and several locks needed during fork, like fd lock. Instead, schedule the task to be executed in the taskqueue context. We still waiting for the fork to finish, but the context of the thread executing the task does not make real LORs with our vnode lock. Submitted by: pluknet at gmail com Reviewed by: jhb Tested by: pho MFC after: 3 weeks Modified: head/sys/nfsclient/nfs.h head/sys/nfsclient/nfs_nfsiod.c head/sys/nfsclient/nfs_subs.c Modified: head/sys/nfsclient/nfs.h ============================================================================== --- head/sys/nfsclient/nfs.h Sun Sep 12 18:53:44 2010 (r212505) +++ head/sys/nfsclient/nfs.h Sun Sep 12 19:06:08 2010 (r212506) @@ -125,6 +125,7 @@ extern struct uma_zone *nfsmount_zone; extern struct nfsstats nfsstats; extern struct mtx nfs_iod_mtx; +extern struct task nfs_nfsiodnew_task; extern int nfs_numasync; extern unsigned int nfs_iodmax; @@ -253,6 +254,7 @@ int nfs_commit(struct vnode *vp, u_quad_ struct ucred *cred, struct thread *td); int nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *); int nfs_nfsiodnew(int); +void nfs_nfsiodnew_tq(__unused void *, int); int nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *); int nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *); void nfs_doio_directwrite (struct buf *); Modified: head/sys/nfsclient/nfs_nfsiod.c ============================================================================== --- head/sys/nfsclient/nfs_nfsiod.c Sun Sep 12 18:53:44 2010 (r212505) +++ head/sys/nfsclient/nfs_nfsiod.c Sun Sep 12 19:06:08 2010 (r212506) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -75,6 +76,16 @@ static MALLOC_DEFINE(M_NFSSVC, "nfsclien static void nfssvc_iod(void *); +struct nfsiod_str { + STAILQ_ENTRY(nfsiod_str) ni_links; + int *ni_inst; + int ni_iod; + int ni_error; + int ni_done; +}; +static STAILQ_HEAD(, nfsiod_str) nfsiodhead = + STAILQ_HEAD_INITIALIZER(nfsiodhead); + static int nfs_asyncdaemon[NFS_MAXASYNCDAEMON]; SYSCTL_DECL(_vfs_nfs); @@ -159,11 +170,30 @@ SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmax, sizeof (nfs_iodmax), sysctl_iodmax, "IU", "Max number of nfsiod kthreads"); +void +nfs_nfsiodnew_tq(__unused void *arg, int pending) +{ + struct nfsiod_str *nip; + + mtx_lock(&nfs_iod_mtx); + while ((nip = STAILQ_FIRST(&nfsiodhead)) != NULL) { + STAILQ_REMOVE_HEAD(&nfsiodhead, ni_links); + mtx_unlock(&nfs_iod_mtx); + nip->ni_error = kproc_create(nfssvc_iod, nip->ni_inst, NULL, + RFHIGHPID, 0, "nfsiod %d", nip->ni_iod); + nip->ni_done = 1; + mtx_lock(&nfs_iod_mtx); + wakeup(nip); + } + mtx_unlock(&nfs_iod_mtx); +} + int nfs_nfsiodnew(int set_iodwant) { int error, i; int newiod; + struct nfsiod_str *nip; if (nfs_numasync >= nfs_iodmax) return (-1); @@ -179,9 +209,16 @@ nfs_nfsiodnew(int set_iodwant) if (set_iodwant > 0) nfs_iodwant[i] = NFSIOD_CREATED_FOR_NFS_ASYNCIO; mtx_unlock(&nfs_iod_mtx); - error = kproc_create(nfssvc_iod, nfs_asyncdaemon + i, NULL, RFHIGHPID, - 0, "nfsiod %d", newiod); + nip = malloc(sizeof(*nip), M_TEMP, M_WAITOK | M_ZERO); + nip->ni_inst = nfs_asyncdaemon + i; + nip->ni_iod = newiod; mtx_lock(&nfs_iod_mtx); + STAILQ_INSERT_TAIL(&nfsiodhead, nip, ni_links); + taskqueue_enqueue(taskqueue_thread, &nfs_nfsiodnew_task); + while (!nip->ni_done) + mtx_sleep(nip, &nfs_iod_mtx, 0, "niwt", 0); + error = nip->ni_error; + free(nip, M_TEMP); if (error) { if (set_iodwant > 0) nfs_iodwant[i] = NFSIOD_NOT_AVAILABLE; Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Sun Sep 12 18:53:44 2010 (r212505) +++ head/sys/nfsclient/nfs_subs.c Sun Sep 12 19:06:08 2010 (r212506) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -117,6 +118,7 @@ int nfs_pbuf_freecnt = -1; /* start out struct nfs_bufq nfs_bufq; static struct mtx nfs_xid_mtx; +struct task nfs_nfsiodnew_task; /* * and the reverse mapping from generic to Version 2 procedure numbers @@ -354,6 +356,7 @@ nfs_init(struct vfsconf *vfsp) */ mtx_init(&nfs_iod_mtx, "NFS iod lock", NULL, MTX_DEF); mtx_init(&nfs_xid_mtx, "NFS xid lock", NULL, MTX_DEF); + TASK_INIT(&nfs_nfsiodnew_task, 0, nfs_nfsiodnew_tq, NULL); nfs_pbuf_freecnt = nswbuf / 2 + 1; @@ -368,9 +371,13 @@ nfs_uninit(struct vfsconf *vfsp) /* * Tell all nfsiod processes to exit. Clear nfs_iodmax, and wakeup * any sleeping nfsiods so they check nfs_iodmax and exit. + * Drain nfsiodnew task before we wait for them to finish. */ mtx_lock(&nfs_iod_mtx); nfs_iodmax = 0; + mtx_unlock(&nfs_iod_mtx); + taskqueue_drain(taskqueue_thread, &nfs_nfsiodnew_task); + mtx_lock(&nfs_iod_mtx); for (i = 0; i < nfs_numasync; i++) if (nfs_iodwant[i] == NFSIOD_AVAILABLE) wakeup(&nfs_iodwant[i]); From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 20:41:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A885106564A; Sun, 12 Sep 2010 20:41:47 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 622A98FC0C; Sun, 12 Sep 2010 20:41:47 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E477946B8D; Sun, 12 Sep 2010 16:41:46 -0400 (EDT) Date: Sun, 12 Sep 2010 21:41:46 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Konstantin Belousov In-Reply-To: <201009121906.o8CJ68vQ002600@svn.freebsd.org> Message-ID: References: <201009121906.o8CJ68vQ002600@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212506 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 20:41:47 -0000 On Sun, 12 Sep 2010, Konstantin Belousov wrote: > Do not fork nfsiod directly from the vop methods. This causes LORs between > vnode lock and several locks needed during fork, like fd lock. > > Instead, schedule the task to be executed in the taskqueue context. We > still waiting for the fork to finish, but the context of the thread > executing the task does not make real LORs with our vnode lock. Does this actually functionally improve things, or is all this complexity about suppressing the lock order reversal? If we're waiting synchronously for the other thread to launch from the task queue, then the lock order reversal still exists, it's just not visible to WITNESS... If we had a static analysis tool that could run on lock and sleep/wakeup traces, it would still show a deadlock opportunity. Robert From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 20:46:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65CAF106566B; Sun, 12 Sep 2010 20:46:32 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 558658FC27; Sun, 12 Sep 2010 20:46:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CKkWlO015757; Sun, 12 Sep 2010 20:46:32 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CKkWCM015755; Sun, 12 Sep 2010 20:46:32 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201009122046.o8CKkWCM015755@svn.freebsd.org> From: Olivier Houchard Date: Sun, 12 Sep 2010 20:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212507 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 20:46:32 -0000 Author: cognet Date: Sun Sep 12 20:46:32 2010 New Revision: 212507 URL: http://svn.freebsd.org/changeset/base/212507 Log: In pmap_remove_all(), do not decrease pm_stats.wired_count if the mapping was wired, as it's been done later in pmap_nuke_pv(). Submitted by: Mark Tinguely Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sun Sep 12 19:06:08 2010 (r212506) +++ head/sys/arm/arm/pmap.c Sun Sep 12 20:46:32 2010 (r212507) @@ -3158,8 +3158,6 @@ pmap_remove_all(vm_page_t m) *ptep = 0; PTE_SYNC_CURRENT(pv->pv_pmap, ptep); pmap_free_l2_bucket(pv->pv_pmap, l2b, 1); - if (pv->pv_flags & PVF_WIRED) - pv->pv_pmap->pm_stats.wired_count--; pv->pv_pmap->pm_stats.resident_count--; flags |= pv->pv_flags; } From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 20:53:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B021065670; Sun, 12 Sep 2010 20:53:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1D08FC13; Sun, 12 Sep 2010 20:53:14 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8CKrB0R013329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Sep 2010 23:53:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8CKrBmQ010695; Sun, 12 Sep 2010 23:53:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8CKrBcE010694; Sun, 12 Sep 2010 23:53:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 12 Sep 2010 23:53:11 +0300 From: Kostik Belousov To: Robert Watson Message-ID: <20100912205311.GG2465@deviant.kiev.zoral.com.ua> References: <201009121906.o8CJ68vQ002600@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lqtP4FxvQo6hb6bg" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212506 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 20:53:15 -0000 --lqtP4FxvQo6hb6bg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 12, 2010 at 09:41:46PM +0100, Robert Watson wrote: >=20 > On Sun, 12 Sep 2010, Konstantin Belousov wrote: >=20 > > Do not fork nfsiod directly from the vop methods. This causes LORs betw= een > > vnode lock and several locks needed during fork, like fd lock. > > > > Instead, schedule the task to be executed in the taskqueue context. We > > still waiting for the fork to finish, but the context of the thread > > executing the task does not make real LORs with our vnode lock. >=20 > Does this actually functionally improve things, or is all this complexity= =20 > about suppressing the lock order reversal? If we're waiting synchronousl= y=20 > for the other thread to launch from the task queue, then the lock order= =20 > reversal still exists, it's just not visible to WITNESS... If we had a= =20 > static analysis tool that could run on lock and sleep/wakeup traces, it= =20 > would still show a deadlock opportunity. As I said in commit message, the deadlock should be fixed, because the taskq thread is executed in the kernel process that should even not have file descriptors at all. --lqtP4FxvQo6hb6bg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyNPbYACgkQC3+MBN1Mb4horACdEfBPBECx7PKyITCdgySMJXtg i+8AoMowsZKPz3IJIAjmZin4Ba6dD3YN =Qiid -----END PGP SIGNATURE----- --lqtP4FxvQo6hb6bg-- From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 21:02:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAAC7106566B; Sun, 12 Sep 2010 21:02:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B09848FC0A; Sun, 12 Sep 2010 21:02:24 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 57F2346B0C; Sun, 12 Sep 2010 17:02:24 -0400 (EDT) Date: Sun, 12 Sep 2010 22:02:24 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Kostik Belousov In-Reply-To: <20100912205311.GG2465@deviant.kiev.zoral.com.ua> Message-ID: References: <201009121906.o8CJ68vQ002600@svn.freebsd.org> <20100912205311.GG2465@deviant.kiev.zoral.com.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212506 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 21:02:25 -0000 On Sun, 12 Sep 2010, Kostik Belousov wrote: > On Sun, Sep 12, 2010 at 09:41:46PM +0100, Robert Watson wrote: >> >> On Sun, 12 Sep 2010, Konstantin Belousov wrote: >> >>> Do not fork nfsiod directly from the vop methods. This causes LORs between >>> vnode lock and several locks needed during fork, like fd lock. >>> >>> Instead, schedule the task to be executed in the taskqueue context. We >>> still waiting for the fork to finish, but the context of the thread >>> executing the task does not make real LORs with our vnode lock. >> >> Does this actually functionally improve things, or is all this complexity >> about suppressing the lock order reversal? If we're waiting synchronously >> for the other thread to launch from the task queue, then the lock order >> reversal still exists, it's just not visible to WITNESS... If we had a >> static analysis tool that could run on lock and sleep/wakeup traces, it >> would still show a deadlock opportunity. > > As I said in commit message, the deadlock should be fixed, because the taskq > thread is executed in the kernel process that should even not have file > descriptors at all. Ah, I think I see where my misunderstanding arose: the behavior of kernel process fork is changed as a result of running in a different (specific) context, and hence never acquires the file descriptor lock class? Robert From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 21:12:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81F9E106566C; Sun, 12 Sep 2010 21:12:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 1C30D8FC15; Sun, 12 Sep 2010 21:12:12 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8CLC9Pj014641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Sep 2010 00:12:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8CLC9uV010838; Mon, 13 Sep 2010 00:12:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8CLC9NP010837; Mon, 13 Sep 2010 00:12:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 13 Sep 2010 00:12:09 +0300 From: Kostik Belousov To: Robert Watson Message-ID: <20100912211209.GH2465@deviant.kiev.zoral.com.ua> References: <201009121906.o8CJ68vQ002600@svn.freebsd.org> <20100912205311.GG2465@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sjel/IY1pyoUgMMX" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212506 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 21:12:13 -0000 --sjel/IY1pyoUgMMX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 12, 2010 at 10:02:24PM +0100, Robert Watson wrote: >=20 > On Sun, 12 Sep 2010, Kostik Belousov wrote: >=20 > >On Sun, Sep 12, 2010 at 09:41:46PM +0100, Robert Watson wrote: > >> > >>On Sun, 12 Sep 2010, Konstantin Belousov wrote: > >> > >>>Do not fork nfsiod directly from the vop methods. This causes LORs=20 > >>>between vnode lock and several locks needed during fork, like fd lock. > >>> > >>>Instead, schedule the task to be executed in the taskqueue context. We= =20 > >>>still waiting for the fork to finish, but the context of the thread=20 > >>>executing the task does not make real LORs with our vnode lock. > >> > >>Does this actually functionally improve things, or is all this complexi= ty=20 > >>about suppressing the lock order reversal? If we're waiting=20 > >>synchronously for the other thread to launch from the task queue, then= =20 > >>the lock order reversal still exists, it's just not visible to WITNESS.= ..=20 > >>If we had a static analysis tool that could run on lock and sleep/wakeu= p=20 > >>traces, it would still show a deadlock opportunity. > > > >As I said in commit message, the deadlock should be fixed, because the= =20 > >taskq thread is executed in the kernel process that should even not have= =20 > >file descriptors at all. >=20 > Ah, I think I see where my misunderstanding arose: the behavior of kernel= =20 > process fork is changed as a result of running in a different (specific)= =20 > context, and hence never acquires the file descriptor lock class? The original code created nfsiod by forking inside the vop, that happens to execute in the context of whatever user process that initiated the operation. Taskqueue is executing in the intr process context, that should not have file descriptors allocated at all. Actually, even if the intr process had fd allocated, then it still should not lock the table. --sjel/IY1pyoUgMMX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyNQicACgkQC3+MBN1Mb4h+7wCgkHSYVd8gyeqpVPKMmgGMQHMK slMAnjF43/L7m0JmEhk3EDZmYurrEz8L =zw7A -----END PGP SIGNATURE----- --sjel/IY1pyoUgMMX-- From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 22:00:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E43E8106566C; Sun, 12 Sep 2010 22:00:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3EEE8FC15; Sun, 12 Sep 2010 22:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CM0VRU026040; Sun, 12 Sep 2010 22:00:31 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CM0VCV026038; Sun, 12 Sep 2010 22:00:31 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201009122200.o8CM0VCV026038@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 12 Sep 2010 22:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212508 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 22:00:32 -0000 Author: jilles Date: Sun Sep 12 22:00:31 2010 New Revision: 212508 URL: http://svn.freebsd.org/changeset/base/212508 Log: sh: Add __dead2 to two functions that do not return. Apart from helping static analyzers, this also appears to reduce the size of the binary slightly. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sun Sep 12 20:46:32 2010 (r212507) +++ head/bin/sh/parser.c Sun Sep 12 22:00:31 2010 (r212508) @@ -118,8 +118,8 @@ STATIC int readtoken(void); STATIC int xxreadtoken(void); STATIC int readtoken1(int, char const *, char *, int); STATIC int noexpand(char *); -STATIC void synexpect(int); -STATIC void synerror(const char *); +STATIC void synexpect(int) __dead2; +STATIC void synerror(const char *) __dead2; STATIC void setprompt(int); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 00:42:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF289106566B; Mon, 13 Sep 2010 00:42:07 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD7F88FC0A; Mon, 13 Sep 2010 00:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D0g7Bc040409; Mon, 13 Sep 2010 00:42:07 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D0g7hi040407; Mon, 13 Sep 2010 00:42:07 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201009130042.o8D0g7hi040407@svn.freebsd.org> From: Jamie Gritton Date: Mon, 13 Sep 2010 00:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212510 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 00:42:07 -0000 Author: jamie Date: Mon Sep 13 00:42:07 2010 New Revision: 212510 URL: http://svn.freebsd.org/changeset/base/212510 Log: MFC r212436: Don't exit kern_jail_set without freeing options when enforce_statfs has an illegal value. Modified: stable/8/sys/kern/kern_jail.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Mon Sep 13 00:38:46 2010 (r212509) +++ stable/8/sys/kern/kern_jail.c Mon Sep 13 00:42:07 2010 (r212510) @@ -584,12 +584,15 @@ kern_jail_set(struct thread *td, struct gotchildmax = 1; error = vfs_copyopt(opts, "enforce_statfs", &enforce, sizeof(enforce)); - gotenforce = (error == 0); - if (gotenforce) { - if (enforce < 0 || enforce > 2) - return (EINVAL); - } else if (error != ENOENT) + if (error == ENOENT) + gotenforce = 0; + else if (error != 0) goto done_free; + else if (enforce < 0 || enforce > 2) { + error = EINVAL; + goto done_free; + } else + gotenforce = 1; pr_flags = ch_flags = 0; for (fi = 0; fi < sizeof(pr_flag_names) / sizeof(pr_flag_names[0]); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 00:57:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 576F8106564A; Mon, 13 Sep 2010 00:57:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 468198FC14; Mon, 13 Sep 2010 00:57:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D0vmX3041782; Mon, 13 Sep 2010 00:57:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D0vmtv041780; Mon, 13 Sep 2010 00:57:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130057.o8D0vmtv041780@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 00:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212511 - head/usr.sbin/crunch/crunchide X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 00:57:48 -0000 Author: imp Date: Mon Sep 13 00:57:48 2010 New Revision: 212511 URL: http://svn.freebsd.org/changeset/base/212511 Log: Use TARGET_CPUARCH instead of TARGET_ARCH here. Define TARGET_CPUARCH based on TARGET_ARCH. Use TARGET_ARCH still for a powerpc64 test. Futureproof for coming mipsel/mipseb and arm/armeb rename. Modified: head/usr.sbin/crunch/crunchide/Makefile Modified: head/usr.sbin/crunch/crunchide/Makefile ============================================================================== --- head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 00:42:07 2010 (r212510) +++ head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 00:57:48 2010 (r212511) @@ -3,6 +3,14 @@ PROG= crunchide SRCS= crunchide.c +# These assignments duplicate much of the functionality of +# MACHINE_CPUARCH, but there's no easy way to export make functions... + +.if defined(TARGET_ARCH) +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +.else +TARGET_CPUARCH=${MACHINE_CPUARCH} +.endif TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == i386 && ${MACHINE_ARCH} == i386 @@ -10,8 +18,9 @@ CFLAGS+=-DNLIST_AOUT SRCS+= exec_aout.c .endif -.if ${TARGET_ARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ - ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 +# nb: TARGET_ARCH for powerpc64 is correct here +.if ${TARGET_CPUARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ + ${TARGET_CPUARCH} == sparc64 || ${TARGET_CPUARCH} == amd64 CFLAGS+=-DNLIST_ELF64 SRCS+= exec_elf64.c exec_elf64.o: exec_elf32.c From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 01:00:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F250B106566C; Mon, 13 Sep 2010 01:00:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1A678FC0C; Mon, 13 Sep 2010 01:00:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D10m0g042076; Mon, 13 Sep 2010 01:00:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D10mQY042074; Mon, 13 Sep 2010 01:00:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130100.o8D10mQY042074@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 01:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212512 - head/usr.bin/xlint X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 01:00:49 -0000 Author: imp Date: Mon Sep 13 01:00:48 2010 New Revision: 212512 URL: http://svn.freebsd.org/changeset/base/212512 Log: Move to using TARGET_CPUARCH instead of TARGET_ARCH. Modified: head/usr.bin/xlint/Makefile.inc Modified: head/usr.bin/xlint/Makefile.inc ============================================================================== --- head/usr.bin/xlint/Makefile.inc Mon Sep 13 00:57:48 2010 (r212511) +++ head/usr.bin/xlint/Makefile.inc Mon Sep 13 01:00:48 2010 (r212512) @@ -5,8 +5,16 @@ WARNS?= 0 .PATH: ${.CURDIR}/../common +# These assignments duplicate much of the functionality of +# MACHINE_CPUARCH, but there's no easy way to export make functions... + +.if defined(TARGET_ARCH) +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +.else +TARGET_CPUARCH=${MACHINE_CPUARCH} +.endif TARGET_ARCH?= ${MACHINE_ARCH} -CFLAGS+= -I${.CURDIR}/../arch/${TARGET_ARCH} +CFLAGS+= -I${.CURDIR}/../arch/${TARGET_CPUARCH} CFLAGS+= -I${.CURDIR}/../common OBJECT_FMT= ELF From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 01:20:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA9E61065673; Mon, 13 Sep 2010 01:20:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C987E8FC17; Mon, 13 Sep 2010 01:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D1KrnN043446; Mon, 13 Sep 2010 01:20:53 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D1KrJM043444; Mon, 13 Sep 2010 01:20:53 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130120.o8D1KrJM043444@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 01:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212513 - in head/usr.bin/xlint/arch: powerpc powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 01:20:54 -0000 Author: imp Date: Mon Sep 13 01:20:53 2010 New Revision: 212513 URL: http://svn.freebsd.org/changeset/base/212513 Log: merge powerpc and powerpc64 now that we use TARGET_CPUARCH Deleted: head/usr.bin/xlint/arch/powerpc64/ Modified: head/usr.bin/xlint/arch/powerpc/targparam.h Modified: head/usr.bin/xlint/arch/powerpc/targparam.h ============================================================================== --- head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 01:00:48 2010 (r212512) +++ head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 01:20:53 2010 (r212513) @@ -29,13 +29,19 @@ * 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$ */ /* * Machine-dependent target parameters for lint1. */ +#ifdef __powerpc64__ +#include "lp64.h" +#else #include "ilp32.h" +#endif /* * Should be set to 1 if the difference of two pointers is of type long @@ -43,8 +49,13 @@ * kept in sync with the compiler! */ +#ifdef __powerpc64__ +#define PTRDIFF_IS_LONG 1 +#define SIZEOF_IS_ULONG 1 +#else #define PTRDIFF_IS_LONG 0 #define SIZEOF_IS_ULONG 0 +#endif #define FLOAT_SIZE (4 * CHAR_BIT) #define DOUBLE_SIZE (8 * CHAR_BIT) From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 01:29:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88CBC106566B; Mon, 13 Sep 2010 01:29:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7858F8FC0C; Mon, 13 Sep 2010 01:29:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D1Tpww044106; Mon, 13 Sep 2010 01:29:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D1TpCL044104; Mon, 13 Sep 2010 01:29:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130129.o8D1TpCL044104@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 01:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212515 - head/bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 01:29:51 -0000 Author: imp Date: Mon Sep 13 01:29:51 2010 New Revision: 212515 URL: http://svn.freebsd.org/changeset/base/212515 Log: Merge from tbemd: Add directory names directly and sort at the end. Include bsd.arch.inc.mk so we can, in the future, more easily make arch dependent changes in /bin (unlikely, but is needed for symmetry). Modified: head/bin/Makefile Modified: head/bin/Makefile ============================================================================== --- head/bin/Makefile Mon Sep 13 01:27:54 2010 (r212514) +++ head/bin/Makefile Mon Sep 13 01:29:51 2010 (r212515) @@ -8,7 +8,6 @@ SUBDIR= cat \ chio \ chmod \ cp \ - ${_csh} \ date \ dd \ df \ @@ -29,10 +28,8 @@ SUBDIR= cat \ ps \ pwait \ pwd \ - ${_rcp} \ realpath \ rm \ - ${_rmail} \ rmdir \ setfacl \ sh \ @@ -43,15 +40,19 @@ SUBDIR= cat \ uuidgen .if ${MK_RCMDS} != "no" -_rcp= rcp +SUBDIR+= rcp .endif .if ${MK_SENDMAIL} != "no" -_rmail= rmail +SUBDIR+= rmail .endif .if ${MK_TCSH} != "no" -_csh= csh +SUBDIR+= csh .endif +.include + +SUBDIR:= ${SUBDIR:O} + .include From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 01:43:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ECA5106564A; Mon, 13 Sep 2010 01:43:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2F48FC08; Mon, 13 Sep 2010 01:43:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D1hAYG045131; Mon, 13 Sep 2010 01:43:10 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D1hAiU045121; Mon, 13 Sep 2010 01:43:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130143.o8D1hAiU045121@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 01:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212516 - in head/lib/libthr: . arch/amd64 arch/arm arch/i386 arch/ia64 arch/mips arch/powerpc arch/sparc64 support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 01:43:11 -0000 Author: imp Date: Mon Sep 13 01:43:10 2010 New Revision: 212516 URL: http://svn.freebsd.org/changeset/base/212516 Log: Merge from tbemd, with a small amount of rework: For all libthr contexts, use ${MACHINE_CPUARCH} for all libc contexts, use ${MACHINE_ARCH} if it exists, otherwise use ${MACHINE_CPUARCH} Move some common code up a layer (the .PATH statement was the same in all the arch submakefiles). # Hope she hasn't busted powerpc64 with this... Modified: head/lib/libthr/Makefile head/lib/libthr/arch/amd64/Makefile.inc head/lib/libthr/arch/arm/Makefile.inc head/lib/libthr/arch/i386/Makefile.inc head/lib/libthr/arch/ia64/Makefile.inc head/lib/libthr/arch/mips/Makefile.inc head/lib/libthr/arch/powerpc/Makefile.inc head/lib/libthr/arch/sparc64/Makefile.inc head/lib/libthr/support/Makefile.inc Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/Makefile Mon Sep 13 01:43:10 2010 (r212516) @@ -22,7 +22,7 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I$ CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} +CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline LDFLAGS+=-Wl,-znodelete @@ -38,6 +38,8 @@ CFLAGS+=-D_PTHREADS_INVARIANTS PRECIOUSLIB= +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} + .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" Modified: head/lib/libthr/arch/amd64/Makefile.inc ============================================================================== --- head/lib/libthr/arch/amd64/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/arch/amd64/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,5 +1,3 @@ #$FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - SRCS+= pthread_md.c _umtx_op_err.S Modified: head/lib/libthr/arch/arm/Makefile.inc ============================================================================== --- head/lib/libthr/arch/arm/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/arch/arm/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,5 +1,3 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - SRCS+= pthread_md.c Modified: head/lib/libthr/arch/i386/Makefile.inc ============================================================================== --- head/lib/libthr/arch/i386/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/arch/i386/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,5 +1,3 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - SRCS+= pthread_md.c _umtx_op_err.S Modified: head/lib/libthr/arch/ia64/Makefile.inc ============================================================================== --- head/lib/libthr/arch/ia64/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/arch/ia64/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,5 +1,3 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - SRCS+= _umtx_op_err.S pthread_md.c Modified: head/lib/libthr/arch/mips/Makefile.inc ============================================================================== --- head/lib/libthr/arch/mips/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/arch/mips/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,5 +1,3 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - SRCS+= pthread_md.c Modified: head/lib/libthr/arch/powerpc/Makefile.inc ============================================================================== --- head/lib/libthr/arch/powerpc/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/arch/powerpc/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,5 +1,3 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} - SRCS+= pthread_md.c Modified: head/lib/libthr/arch/sparc64/Makefile.inc ============================================================================== --- head/lib/libthr/arch/sparc64/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/arch/sparc64/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,5 +1,3 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} - SRCS+= pthread_md.c Modified: head/lib/libthr/support/Makefile.inc ============================================================================== --- head/lib/libthr/support/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515) +++ head/lib/libthr/support/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516) @@ -1,9 +1,16 @@ # $FreeBSD$ .PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string -.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys +# libc must search machine_arch, then machine_cpuarch, but libthr has all its +# code implemented in machine_cpuarch. Cope. +.if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys) +.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} +.else +.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys +CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} +.endif SYSCALLS= thr_new From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 01:44:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AAC91065670; Mon, 13 Sep 2010 01:44:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FFB78FC1A; Mon, 13 Sep 2010 01:44:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D1i7V2045220; Mon, 13 Sep 2010 01:44:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D1i7jr045217; Mon, 13 Sep 2010 01:44:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130144.o8D1i7jr045217@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 01:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212517 - head/lib/libz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 01:44:07 -0000 Author: imp Date: Mon Sep 13 01:44:07 2010 New Revision: 212517 URL: http://svn.freebsd.org/changeset/base/212517 Log: Include FreeBSD svn tag Modified: head/lib/libz/minigzip.c Modified: head/lib/libz/minigzip.c ============================================================================== --- head/lib/libz/minigzip.c Mon Sep 13 01:43:10 2010 (r212516) +++ head/lib/libz/minigzip.c Mon Sep 13 01:44:07 2010 (r212517) @@ -13,6 +13,8 @@ * or in pipe mode. */ +#include +__FBSDID("$FreeBSD$"); /* @(#) $Id$ */ #include "zlib.h" From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 01:44:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A04841065672; Mon, 13 Sep 2010 01:44:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 900478FC17; Mon, 13 Sep 2010 01:44:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D1iu2T045292; Mon, 13 Sep 2010 01:44:56 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D1iuDX045290; Mon, 13 Sep 2010 01:44:56 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130144.o8D1iuDX045290@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 01:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212518 - head/lib/msun X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 01:44:56 -0000 Author: imp Date: Mon Sep 13 01:44:56 2010 New Revision: 212518 URL: http://svn.freebsd.org/changeset/base/212518 Log: MFtbemd: Move to using MACHINE_CPUARCH, now that it is safe. Modified: head/lib/msun/Makefile Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Mon Sep 13 01:44:07 2010 (r212517) +++ head/lib/msun/Makefile Mon Sep 13 01:44:56 2010 (r212518) @@ -12,12 +12,12 @@ # # -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" ARCH_SUBDIR= i387 .elif ${MACHINE_ARCH} == "powerpc64" ARCH_SUBDIR= powerpc .else -ARCH_SUBDIR= ${MACHINE_ARCH} +ARCH_SUBDIR= ${MACHINE_CPUARCH} .endif .include "${ARCH_SUBDIR}/Makefile.inc" From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:02:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C779106564A; Mon, 13 Sep 2010 02:02:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF028FC08; Mon, 13 Sep 2010 02:02:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D22Ld6046881; Mon, 13 Sep 2010 02:02:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D22K0b046879; Mon, 13 Sep 2010 02:02:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130202.o8D22K0b046879@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 02:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212521 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:02:21 -0000 Author: imp Date: Mon Sep 13 02:02:20 2010 New Revision: 212521 URL: http://svn.freebsd.org/changeset/base/212521 Log: Use :T:Micc here like everywhere else we test icc Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Sep 13 02:01:29 2010 (r212520) +++ head/sys/conf/kern.pre.mk Mon Sep 13 02:02:20 2010 (r212521) @@ -42,7 +42,7 @@ COPTFLAGS+= -fno-strict-aliasing . endif .endif .if !defined(NO_CPU_COPTFLAGS) -. if ${CC} == "icc" +. if ${CC:T:Micc} == "icc" COPTFLAGS+= ${_ICC_CPUCFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/} . else COPTFLAGS+= ${_CPUCFLAGS} From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:05:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D8CA1065675; Mon, 13 Sep 2010 02:05:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CD058FC1B; Mon, 13 Sep 2010 02:05:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D25gRj047233; Mon, 13 Sep 2010 02:05:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D25gaM047230; Mon, 13 Sep 2010 02:05:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130205.o8D25gaM047230@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 02:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212523 - in head/sys/modules: scc sound/sound X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:05:42 -0000 Author: imp Date: Mon Sep 13 02:05:42 2010 New Revision: 212523 URL: http://svn.freebsd.org/changeset/base/212523 Log: MFtbemd: use MACHINE_CPUARCH Modified: head/sys/modules/scc/Makefile head/sys/modules/sound/sound/Makefile Modified: head/sys/modules/scc/Makefile ============================================================================== --- head/sys/modules/scc/Makefile Mon Sep 13 02:04:02 2010 (r212522) +++ head/sys/modules/scc/Makefile Mon Sep 13 02:05:42 2010 (r212523) @@ -5,7 +5,7 @@ .if ${MACHINE} == "sparc64" scc_bfe= scc_bfe_ebus.c scc_bfe_sbus.c .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" scc_bfe= scc_bfe_macio.c scc_bfe_quicc.c .endif Modified: head/sys/modules/sound/sound/Makefile ============================================================================== --- head/sys/modules/sound/sound/Makefile Mon Sep 13 02:04:02 2010 (r212522) +++ head/sys/modules/sound/sound/Makefile Mon Sep 13 02:05:42 2010 (r212523) @@ -44,7 +44,7 @@ CLEANFILES+= feeder_eq_gen.h feeder_rate EXPORT_SYMS= YES # XXX evaluate -.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc" # Create an empty opt_isa.h in order to keep kmod.mk from linking in an # existing one from KERNBUILDDIR which possibly has DEV_ISA defined so # sound.ko is always built without isadma support. From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:21:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 692871065695; Mon, 13 Sep 2010 02:21:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57B0E8FC08; Mon, 13 Sep 2010 02:21:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D2L7gW048708; Mon, 13 Sep 2010 02:21:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D2L7IY048699; Mon, 13 Sep 2010 02:21:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130221.o8D2L7IY048699@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 02:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212525 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:21:07 -0000 Author: imp Date: Mon Sep 13 02:21:07 2010 New Revision: 212525 URL: http://svn.freebsd.org/changeset/base/212525 Log: Merge from tbemd: use Makefile.arch to control building. Reviewed by: arch@ (many times, no objection) Added: head/usr.sbin/Makefile.amd64 (contents, props changed) head/usr.sbin/Makefile.arm (contents, props changed) head/usr.sbin/Makefile.i386 (contents, props changed) head/usr.sbin/Makefile.ia64 (contents, props changed) head/usr.sbin/Makefile.mips (contents, props changed) head/usr.sbin/Makefile.orig (contents, props changed) head/usr.sbin/Makefile.powerpc (contents, props changed) head/usr.sbin/Makefile.sparc64 (contents, props changed) Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Mon Sep 13 02:10:29 2010 (r212524) +++ head/usr.sbin/Makefile Mon Sep 13 02:21:07 2010 (r212525) @@ -3,27 +3,9 @@ .include -SUBDIR= ${_ac} \ - ${_accton} \ - ${_acpi} \ - adduser \ - ${_amd} \ - ${_ancontrol} \ - ${_apm} \ - ${_apmd} \ +SUBDIR= adduser \ arp \ - ${_asf} \ - ${_atm} \ - ${_audit} \ - ${_auditd} \ - ${_auditreduce} \ - ${_authpf} \ - ${_bluetooth} \ - ${_boot0cfg} \ - ${_boot98cfg} \ bootparamd \ - ${_bsnmpd} \ - ${_btxld} \ burncd \ cdcontrol \ chkgrp \ @@ -31,153 +13,71 @@ SUBDIR= ${_ac} \ chroot \ ckdist \ clear_locks \ - ${_config} \ - ${_cpucontrol} \ crashinfo \ cron \ - ${_crunch} \ - ${_ctm} \ daemon \ dconschat \ devinfo \ digictl \ diskinfo \ - ${_dnssec-dsfromkey} \ - ${_dnssec-keyfromlabel} \ - ${_dnssec-keygen} \ - ${_dnssec-signzone} \ dumpcis \ - ${_editmap} \ - ${_edquota} \ - ${_eeprom} \ extattr \ extattrctl \ - ${_faithd} \ - ${_fdcontrol} \ - ${_fdformat} \ - ${_fdread} \ - ${_fdwrite} \ fifolog \ - ${_flowctl} \ - ${_freebsd-update} \ - ${_ftp-proxy} \ fwcontrol \ getfmac \ getpmac \ gstat \ - ${_gssd} \ i2c \ ifmcstat \ inetd \ iostat \ - ${_ip6addrctl} \ - ${_ipfwpcap} \ - ${_IPXrouted} \ - ${_jail} \ - ${_jexec} \ - ${_jls} \ - ${_kbdcontrol} \ - ${_kbdmap} \ - ${_keyserv} \ - ${_kgmon} \ - ${_kgzip} \ kldxref \ lastlogin \ - ${_lmcconfig} \ - ${_lpr} \ - ${_lptcontrol} \ - ${_mailstats} \ mailwrapper \ makefs \ - ${_makemap} \ - ${_manctl} \ + manctl \ memcontrol \ mergemaster \ mfiutil \ mixer \ - ${_mld6query} \ mlxcontrol \ mountd \ - ${_mount_nwfs} \ mount_portalfs \ - ${_mount_smbfs} \ - ${_moused} \ - ${_mptable} \ mptutil \ mtest \ mtree \ - ${_named} \ - ${_named-checkconf} \ - ${_named-checkzone} \ - ${_named.reload} \ - ${_ndiscvt} \ - ${_ndp} \ newsyslog \ nfscbd \ nfsd \ nfsdumpstate \ nfsrevoke \ nfsuserd \ - ${_ngctl} \ - ${_nghook} \ nologin \ - ${_nscd} \ - ${_ntp} \ - ${_nvram} \ - ${_ofwdump} \ pc-sysinstall \ pciconf \ periodic \ - ${_pkg_install} \ - ${_pmcannotate} \ - ${_pmccontrol} \ - ${_pmcstat} \ - ${_pnpinfo} \ - ${_portsnap} \ powerd \ - ${_ppp} \ - ${_pppctl} \ - ${_praliases} \ - ${_praudit} \ procctl \ pstat \ pw \ pwd_mkdb \ quot \ - ${_quotaon} \ rarpd \ - ${_repquota} \ - ${_rip6query} \ rmt \ - ${_rndc} \ - ${_rndc-confgen} \ - ${_route6d} \ rpcbind \ rpc.lockd \ rpc.statd \ rpc.umntall \ - ${_rpc.yppasswdd} \ - ${_rpc.ypupdated} \ - ${_rpc.ypxfrd} \ - ${_rrenumd} \ - ${_rtadvd} \ rtprio \ - ${_rtsold} \ - ${_rwhod} \ - ${_sa} \ - ${_sade} \ - ${_sendmail} \ service \ services_mkdb \ setfib \ setfmac \ setpmac \ - ${_sicontrol} \ smbmsg \ snapinfo \ - ${_spkrtest} \ spray \ - ${_sysinstall} \ syslogd \ tcpdchk \ tcpdmatch \ @@ -185,344 +85,220 @@ SUBDIR= ${_ac} \ tcpdump \ timed \ traceroute \ - ${_traceroute6} \ trpt \ tzsetup \ - ${_uathload} \ ugidfw \ - ${_uhsoctl} \ - ${_usbdevs} \ - ${_usbconfig} \ - ${_vidcontrol} \ vipw \ wake \ watch \ watchdogd \ - ${_wlandebug} \ - ${_wlconfig} \ - ${_wpa} \ - ${_ypbind} \ - ${_yp_mkdb} \ - ${_yppoll} \ - ${_yppush} \ - ${_ypserv} \ - ${_ypset} \ - zic \ - ${_zzz} + zic # NB: keep these sorted by MK_* knobs .if ${MK_ACCT} != "no" -_ac= ac -_accton= accton -_sa= sa +SUBDIR+= ac +SUBDIR+= accton +SUBDIR+= sa .endif .if ${MK_AMD} != "no" -_amd= amd +SUBDIR+= amd .endif .if ${MK_AUDIT} != "no" -_audit= audit -_auditd= auditd -_auditreduce= auditreduce -_praudit= praudit +SUBDIR+= audit +SUBDIR+= auditd +SUBDIR+= auditreduce +SUBDIR+= praudit .endif .if ${MK_AUTHPF} != "no" -_authpf= authpf +SUBDIR+= authpf .endif .if ${MK_BIND_DNSSEC} != "no" && ${MK_OPENSSL} != "no" -_dnssec-dsfromkey= dnssec-dsfromkey -_dnssec-keyfromlabel= dnssec-keyfromlabel -_dnssec-keygen= dnssec-keygen -_dnssec-signzone= dnssec-signzone +SUBDIR+= dnssec-dsfromkey +SUBDIR+= dnssec-keyfromlabel +SUBDIR+= dnssec-keygen +SUBDIR+= dnssec-signzone .endif .if ${MK_BIND_NAMED} != "no" -_named= named -_named-checkconf= named-checkconf -_named-checkzone= named-checkzone -_named.reload= named.reload -_rndc= rndc -_rndc-confgen= rndc-confgen +SUBDIR+= named +SUBDIR+= named-checkconf +SUBDIR+= named-checkzone +SUBDIR+= named.reload +SUBDIR+= rndc +SUBDIR+= rndc-confgen .endif .if ${MK_BLUETOOTH} != "no" -_bluetooth= bluetooth +SUBDIR+= bluetooth .endif .if ${MK_BSNMP} != "no" -_bsnmpd= bsnmpd +SUBDIR+= bsnmpd .endif .if ${MK_CTM} != "no" -_ctm= ctm +SUBDIR+= ctm .endif .if ${MK_FLOPPY} != "no" -_fdcontrol= fdcontrol -_fdformat= fdformat -_fdread= fdread -_fdwrite= fdwrite +SUBDIR+= fdcontrol +SUBDIR+= fdformat +SUBDIR+= fdread +SUBDIR+= fdwrite .endif .if ${MK_FREEBSD_UPDATE} != "no" -_freebsd-update= freebsd-update +SUBDIR+= freebsd-update .endif .if ${MK_GSSAPI} != no -_gssd= gssd +SUBDIR+= gssd .endif .if ${MK_INET6} != "no" -_faithd= faithd -_ip6addrctl= ip6addrctl -_mld6query= mld6query -_ndp= ndp -_rip6query= rip6query -_route6d= route6d -_rrenumd= rrenumd -_rtadvd= rtadvd -_rtsold= rtsold -_traceroute6= traceroute6 +SUBDIR+= faithd +SUBDIR+= ip6addrctl +SUBDIR+= mld6query +SUBDIR+= ndp +SUBDIR+= rip6query +SUBDIR+= route6d +SUBDIR+= rrenumd +SUBDIR+= rtadvd +SUBDIR+= rtsold +SUBDIR+= traceroute6 .endif .if ${MK_IPFW} != "no" -_ipfwpcap= ipfwpcap +SUBDIR+= ipfwpcap .endif .if ${MK_IPX} != "no" -_IPXrouted= IPXrouted +SUBDIR+= IPXrouted .endif .if ${MK_JAIL} != "no" -_jail= jail -_jexec= jexec -_jls= jls +SUBDIR+= jail +SUBDIR+= jexec +SUBDIR+= jls .endif # XXX MK_SYSCONS .if ${MK_LEGACY_CONSOLE} != "no" -_kbdcontrol= kbdcontrol -_kbdmap= kbdmap -_moused= moused -_vidcontrol= vidcontrol +SUBDIR+= kbdcontrol +SUBDIR+= kbdmap +SUBDIR+= moused +SUBDIR+= vidcontrol .endif .if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" .if ${MK_PPP} != "no" -_pppctl= pppctl +SUBDIR+= pppctl .endif .if ${MK_NS_CACHING} != "no" -_nscd= nscd +SUBDIR+= nscd .endif .endif .if ${MK_LPR} != "no" -_lpr= lpr +SUBDIR+= lpr .endif .if ${MK_MAN_UTILS} != "no" -_manctl= manctl +SUBDIR+= manctl .endif .if ${MK_NETGRAPH} != "no" -_flowctl= flowctl -_lmcconfig= lmcconfig -_ngctl= ngctl -_nghook= nghook +SUBDIR+= flowctl +SUBDIR+= lmcconfig +SUBDIR+= ngctl +SUBDIR+= nghook .endif .if ${MK_NIS} != "no" -_rpc.yppasswdd= rpc.yppasswdd -_rpc.ypupdated= rpc.ypupdated -_rpc.ypxfrd= rpc.ypxfrd -_ypbind= ypbind -_yp_mkdb= yp_mkdb -_yppoll= yppoll -_yppush= yppush -_ypserv= ypserv -_ypset= ypset +SUBDIR+= rpc.yppasswdd +SUBDIR+= rpc.ypupdated +SUBDIR+= rpc.ypxfrd +SUBDIR+= ypbind +SUBDIR+= yp_mkdb +SUBDIR+= yppoll +SUBDIR+= yppush +SUBDIR+= ypserv +SUBDIR+= ypset .endif .if ${MK_NTP} != "no" -_ntp= ntp +SUBDIR+= ntp .endif .if ${MK_OPENSSL} != "no" -_keyserv= keyserv +SUBDIR+= keyserv .endif .if ${MK_PF} != "no" -_ftp-proxy= ftp-proxy +SUBDIR+= ftp-proxy .endif .if ${MK_PKGTOOLS} != "no" -_pkg_install= pkg_install +SUBDIR+= pkg_install .endif # XXX MK_TOOLCHAIN? .if ${MK_PMC} != "no" -_pmcannotate= pmcannotate -_pmccontrol= pmccontrol -_pmcstat= pmcstat +SUBDIR+= pmcannotate +SUBDIR+= pmccontrol +SUBDIR+= pmcstat .endif .if ${MK_PORTSNAP} != "no" -_portsnap= portsnap +SUBDIR+= portsnap .endif .if ${MK_PPP} != "no" -_ppp= ppp -#_pppctl handled below +SUBDIR+= ppp .endif .if ${MK_QUOTAS} != "no" -_edquota= edquota -_quotaon= quotaon -_repquota= repquota +SUBDIR+= edquota +SUBDIR+= quotaon +SUBDIR+= repquota .endif .if ${MK_RCMDS} != "no" -_rwhod= rwhod +SUBDIR+= rwhod .endif .if ${MK_SENDMAIL} != "no" -_editmap= editmap -_mailstats= mailstats -_makemap= makemap -_praliases= praliases -_sendmail= sendmail +SUBDIR+= editmap +SUBDIR+= mailstats +SUBDIR+= makemap +SUBDIR+= praliases +SUBDIR+= sendmail .endif -.if ${MK_SYSINSTALL} != "no" -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ - ${MACHINE_ARCH} == "sparc64" -_sade= sade -.endif -.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" -_sysinstall= sysinstall -.endif -.endif +SUBDIR+= sysinstall .if ${MK_TOOLCHAIN} != "no" -_config= config -_crunch= crunch +SUBDIR+= config +SUBDIR+= crunch .endif .if ${MK_USB} != "no" -.if ${MACHINE_ARCH} != "ia64" && \ - !(${MACHINE_ARCH} == "mips" && defined(TARGET_ABI) && ${TARGET_ABI} == "n64") -_uathload= uathload -.endif -_uhsoctl= uhsoctl -#_usbdevs= usbdevs -_usbconfig= usbconfig +SUBDIR+= uhsoctl +SUBDIR+= usbconfig .endif .if ${MK_WIRELESS} != "no" -_ancontrol= ancontrol -_wlandebug= wlandebug -_wpa= wpa +SUBDIR+= ancontrol +SUBDIR+= wlandebug +SUBDIR+= wpa .endif -.if ${MACHINE_ARCH} == "arm" -_kgmon= kgmon -.endif +.include -.if ${MACHINE_ARCH} == "i386" -.if ${MK_APM} != "no" -_apm= apm -_apmd= apmd -.endif -_asf= asf -.if ${MK_TOOLCHAIN} != "no" -_btxld= btxld -.endif -_cpucontrol= cpucontrol -_kgmon= kgmon -_kgzip= kgzip -_lptcontrol= lptcontrol -.if ${MK_NCP} != "no" -_mount_nwfs= mount_nwfs -.endif -_mount_smbfs= mount_smbfs -_mptable= mptable -.if ${MK_NDIS} != "no" -_ndiscvt= ndiscvt -.endif -_pnpinfo= pnpinfo -_sicontrol= sicontrol -_spkrtest= spkrtest -_zzz= zzz -.if ${MACHINE} == "i386" -.if ${MK_ACPI} != "no" -_acpi= acpi -.endif -_boot0cfg= boot0cfg -.if ${MK_WIRELESS} != "no" -_wlconfig= wlconfig -.endif -.elif ${MACHINE} == "pc98" -_boot98cfg= boot98cfg -.endif -.endif - -# kgzip: builds, but missing support files -# mptable: broken (not 64 bit clean) -# pnpinfo: crashes (not really useful anyway) -.if ${MACHINE_ARCH} == "amd64" -.if ${MK_ACPI} != "no" -_acpi= acpi -.endif -.if ${MK_APM} != "no" -_apm= apm -.endif -_asf= asf -_boot0cfg= boot0cfg -.if ${MK_TOOLCHAIN} != "no" -_btxld= btxld -.endif -_cpucontrol= cpucontrol -_kgmon= kgmon -_lptcontrol= lptcontrol -.if ${MK_NCP} != "no" -_mount_nwfs= mount_nwfs -.endif -_mount_smbfs= mount_smbfs -_mptable= mptable -.if ${MK_NDIS} != "no" -_ndiscvt= ndiscvt -.endif -_sicontrol= sicontrol -_spkrtest= spkrtest -_zzz= zzz -.endif - -.if ${MACHINE_ARCH} == "arm" -_ofwdump= ofwdump -.endif - -.if ${MACHINE_ARCH} == "ia64" -.if ${MK_ACPI} != "no" -_acpi= acpi -.endif -_kgmon= kgmon -_mount_smbfs= mount_smbfs -_zzz= zzz -.endif - -.if ${MACHINE_CPUARCH} == "powerpc" -_mount_smbfs= mount_smbfs -_nvram= nvram -_ofwdump= ofwdump -.endif - -.if ${MACHINE_ARCH} == "sparc64" -_eeprom= eeprom -_mount_smbfs= mount_smbfs -_ofwdump= ofwdump -.endif +SUBDIR:= ${SUBDIR:O} .include Added: head/usr.sbin/Makefile.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/Makefile.amd64 Mon Sep 13 02:21:07 2010 (r212525) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +# kgzip: builds, but missing support files +# mptable: broken (not 64 bit clean) +# pnpinfo: crashes (not really useful anyway) +.if ${MK_ACPI} != "no" +SUBDIR+= acpi +.endif +.if ${MK_APM} != "no" +SUBDIR+= apm +.endif +SUBDIR+= asf +SUBDIR+= boot0cfg +.if ${MK_TOOLCHAIN} != "no" +SUBDIR+= btxld +.endif +SUBDIR+= cpucontrol +SUBDIR+= kgmon +SUBDIR+= lptcontrol +.if ${MK_NCP} != "no" +SUBDIR+= mount_nwfs +.endif +SUBDIR+= mount_smbfs +SUBDIR+= mptable +.if ${MK_NDIS} != "no" +SUBDIR+= ndiscvt +.endif +SUBDIR+= sicontrol +SUBDIR+= spkrtest +SUBDIR+= zzz Added: head/usr.sbin/Makefile.arm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/Makefile.arm Mon Sep 13 02:21:07 2010 (r212525) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR+= ofwdump +SUBDIR+= kgmon +SUBDIR:= ${SUBDIR:Nsysinstall} Added: head/usr.sbin/Makefile.i386 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/Makefile.i386 Mon Sep 13 02:21:07 2010 (r212525) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +.if ${MK_APM} != "no" +SUBDIR+= apm +SUBDIR+= apmd +.endif +SUBDIR+= asf +.if ${MK_TOOLCHAIN} != "no" +SUBDIR+= btxld +.endif +SUBDIR+= cpucontrol +SUBDIR+= kgmon +SUBDIR+= kgzip +SUBDIR+= lptcontrol +.if ${MK_NCP} != "no" +SUBDIR+= mount_nwfs +.endif +SUBDIR+= mount_smbfs +SUBDIR+= mptable +.if ${MK_NDIS} != "no" +SUBDIR+= ndiscvt +.endif +SUBDIR+= pnpinfo +.if ${MK_SYSINSTALL} != "no" +SUBDIR+= sade +.endif +SUBDIR+= sicontrol +SUBDIR+= spkrtest +SUBDIR+= zzz + +# Differentiate between FreeBSD/i386 and FreeBSD/pc98 +.if ${MACHINE} == "i386" +.if ${MK_ACPI} != "no" +SUBDIR+= acpi +.endif +SUBDIR+= boot0cfg +.if ${MK_WIRELESS} != "no" +SUBDIR+= wlconfig +.endif +.elif ${MACHINE} == "pc98" +SUBDIR+= boot98cfg +.endif Added: head/usr.sbin/Makefile.ia64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/Makefile.ia64 Mon Sep 13 02:21:07 2010 (r212525) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.if ${MK_ACPI} != "no" +SUBDIR+= acpi +.endif +SUBDIR+= kgmon +SUBDIR+= mount_smbfs +SUBDIR:= ${SUBDIR:Nuathload} +SUBDIR+= zzz Added: head/usr.sbin/Makefile.mips ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/Makefile.mips Mon Sep 13 02:21:07 2010 (r212525) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +SUBDIR:= ${SUBDIR:Nsysinstall} +.if defined(TARGET_ABI) && ${TARGET_ABI} == "n64" +SUBDIR:= ${SUBDIR:Nuathload} +.endif Added: head/usr.sbin/Makefile.orig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/Makefile.orig Mon Sep 13 02:21:07 2010 (r212525) @@ -0,0 +1,528 @@ +# From: @(#)Makefile 5.20 (Berkeley) 6/12/93 +# $FreeBSD$ + +.include + +SUBDIR= ${_ac} \ + ${_accton} \ + ${_acpi} \ + adduser \ + ${_amd} \ + ${_ancontrol} \ + ${_apm} \ + ${_apmd} \ + arp \ + ${_asf} \ + ${_atm} \ + ${_audit} \ + ${_auditd} \ + ${_auditreduce} \ + ${_authpf} \ + ${_bluetooth} \ + ${_boot0cfg} \ + ${_boot98cfg} \ + bootparamd \ + ${_bsnmpd} \ + ${_btxld} \ + burncd \ + cdcontrol \ + chkgrp \ + chown \ + chroot \ + ckdist \ + clear_locks \ + ${_config} \ + ${_cpucontrol} \ + crashinfo \ + cron \ + ${_crunch} \ + ${_ctm} \ + daemon \ + dconschat \ + devinfo \ + digictl \ + diskinfo \ + ${_dnssec-dsfromkey} \ + ${_dnssec-keyfromlabel} \ + ${_dnssec-keygen} \ + ${_dnssec-signzone} \ + dumpcis \ + ${_editmap} \ + ${_edquota} \ + ${_eeprom} \ + extattr \ + extattrctl \ + ${_faithd} \ + ${_fdcontrol} \ + ${_fdformat} \ + ${_fdread} \ + ${_fdwrite} \ + fifolog \ + ${_flowctl} \ + ${_freebsd-update} \ + ${_ftp-proxy} \ + fwcontrol \ + getfmac \ + getpmac \ + gstat \ + ${_gssd} \ + i2c \ + ifmcstat \ + inetd \ + iostat \ + ${_ip6addrctl} \ + ${_ipfwpcap} \ + ${_IPXrouted} \ + ${_jail} \ + ${_jexec} \ + ${_jls} \ + ${_kbdcontrol} \ + ${_kbdmap} \ + ${_keyserv} \ + ${_kgmon} \ + ${_kgzip} \ + kldxref \ + lastlogin \ + ${_lmcconfig} \ + ${_lpr} \ + ${_lptcontrol} \ + ${_mailstats} \ + mailwrapper \ + makefs \ + ${_makemap} \ + ${_manctl} \ + memcontrol \ + mergemaster \ + mfiutil \ + mixer \ + ${_mld6query} \ + mlxcontrol \ + mountd \ + ${_mount_nwfs} \ + mount_portalfs \ + ${_mount_smbfs} \ + ${_moused} \ + ${_mptable} \ + mptutil \ + mtest \ + mtree \ + ${_named} \ + ${_named-checkconf} \ + ${_named-checkzone} \ + ${_named.reload} \ + ${_ndiscvt} \ + ${_ndp} \ + newsyslog \ + nfscbd \ + nfsd \ + nfsdumpstate \ + nfsrevoke \ + nfsuserd \ + ${_ngctl} \ + ${_nghook} \ + nologin \ + ${_nscd} \ + ${_ntp} \ + ${_nvram} \ + ${_ofwdump} \ + pc-sysinstall \ + pciconf \ + periodic \ + ${_pkg_install} \ + ${_pmcannotate} \ + ${_pmccontrol} \ + ${_pmcstat} \ + ${_pnpinfo} \ + ${_portsnap} \ + powerd \ + ${_ppp} \ + ${_pppctl} \ + ${_praliases} \ + ${_praudit} \ + procctl \ + pstat \ + pw \ + pwd_mkdb \ + quot \ + ${_quotaon} \ + rarpd \ + ${_repquota} \ + ${_rip6query} \ + rmt \ + ${_rndc} \ + ${_rndc-confgen} \ + ${_route6d} \ + rpcbind \ + rpc.lockd \ + rpc.statd \ + rpc.umntall \ + ${_rpc.yppasswdd} \ + ${_rpc.ypupdated} \ + ${_rpc.ypxfrd} \ + ${_rrenumd} \ + ${_rtadvd} \ + rtprio \ + ${_rtsold} \ + ${_rwhod} \ + ${_sa} \ + ${_sade} \ + ${_sendmail} \ + service \ + services_mkdb \ + setfib \ + setfmac \ + setpmac \ + ${_sicontrol} \ + smbmsg \ + snapinfo \ + ${_spkrtest} \ + spray \ + ${_sysinstall} \ + syslogd \ + tcpdchk \ + tcpdmatch \ + tcpdrop \ + tcpdump \ + timed \ + traceroute \ + ${_traceroute6} \ + trpt \ + tzsetup \ + ${_uathload} \ + ugidfw \ + ${_uhsoctl} \ + ${_usbdevs} \ + ${_usbconfig} \ + ${_vidcontrol} \ + vipw \ + wake \ + watch \ + watchdogd \ + ${_wlandebug} \ + ${_wlconfig} \ + ${_wpa} \ + ${_ypbind} \ + ${_yp_mkdb} \ + ${_yppoll} \ + ${_yppush} \ + ${_ypserv} \ + ${_ypset} \ + zic \ + ${_zzz} + +# NB: keep these sorted by MK_* knobs + +.if ${MK_ACCT} != "no" +_ac= ac +_accton= accton +_sa= sa +.endif + +.if ${MK_AMD} != "no" +_amd= amd +.endif + +.if ${MK_AUDIT} != "no" +_audit= audit +_auditd= auditd +_auditreduce= auditreduce +_praudit= praudit +.endif + +.if ${MK_AUTHPF} != "no" +_authpf= authpf +.endif + +.if ${MK_BIND_DNSSEC} != "no" && ${MK_OPENSSL} != "no" +_dnssec-dsfromkey= dnssec-dsfromkey +_dnssec-keyfromlabel= dnssec-keyfromlabel +_dnssec-keygen= dnssec-keygen +_dnssec-signzone= dnssec-signzone +.endif +.if ${MK_BIND_NAMED} != "no" +_named= named +_named-checkconf= named-checkconf +_named-checkzone= named-checkzone +_named.reload= named.reload +_rndc= rndc +_rndc-confgen= rndc-confgen +.endif + +.if ${MK_BLUETOOTH} != "no" +_bluetooth= bluetooth +.endif + +.if ${MK_BSNMP} != "no" +_bsnmpd= bsnmpd +.endif + +.if ${MK_CTM} != "no" +_ctm= ctm +.endif + +.if ${MK_FLOPPY} != "no" +_fdcontrol= fdcontrol +_fdformat= fdformat +_fdread= fdread *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:23:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFE0E106564A; Mon, 13 Sep 2010 02:23:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 952D78FC2A; Mon, 13 Sep 2010 02:23:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D2N3hj048963; Mon, 13 Sep 2010 02:23:03 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D2N3aH048957; Mon, 13 Sep 2010 02:23:03 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130223.o8D2N3aH048957@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 02:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212526 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:23:03 -0000 Author: imp Date: Mon Sep 13 02:23:03 2010 New Revision: 212526 URL: http://svn.freebsd.org/changeset/base/212526 Log: Merge from tbemd: Move to using Makefile.arch to control what's build. Reviewed by: (arch@, no objection) Added: head/usr.bin/Makefile.amd64 (contents, props changed) head/usr.bin/Makefile.arm (contents, props changed) head/usr.bin/Makefile.i386 (contents, props changed) head/usr.bin/Makefile.ia64 (contents, props changed) head/usr.bin/Makefile.powerpc (contents, props changed) head/usr.bin/Makefile.sparc64 (contents, props changed) Added: head/usr.bin/Makefile.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/Makefile.amd64 Mon Sep 13 02:23:03 2010 (r212526) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.if ${MK_NCP} != "no" +SUBDIR+= ncplist +SUBDIR+= ncplogin +.endif +SUBDIR+= smbutil Added: head/usr.bin/Makefile.arm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/Makefile.arm Mon Sep 13 02:23:03 2010 (r212526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +SUBDIR:= ${SUBDIR:Ntruss} Added: head/usr.bin/Makefile.i386 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/Makefile.i386 Mon Sep 13 02:23:03 2010 (r212526) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.if ${MK_NCP} != "no" +SUBDIR+= ncplist +SUBDIR+= ncplogin +.endif +SUBDIR+= smbutil Added: head/usr.bin/Makefile.ia64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/Makefile.ia64 Mon Sep 13 02:23:03 2010 (r212526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +SUBDIR+= smbutil Added: head/usr.bin/Makefile.powerpc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/Makefile.powerpc Mon Sep 13 02:23:03 2010 (r212526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +SUBDIR+= smbutil Added: head/usr.bin/Makefile.sparc64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/Makefile.sparc64 Mon Sep 13 02:23:03 2010 (r212526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +SUBDIR+= smbutil From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:24:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBB0F1065673; Mon, 13 Sep 2010 02:24:14 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 19AE28FC17; Mon, 13 Sep 2010 02:24:13 +0000 (UTC) Received: by wwb18 with SMTP id 18so6694875wwb.31 for ; Sun, 12 Sep 2010 19:24:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.69.78 with SMTP id y14mr2373831wbi.212.1284344650539; Sun, 12 Sep 2010 19:24:10 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.227.147.76 with HTTP; Sun, 12 Sep 2010 19:24:10 -0700 (PDT) In-Reply-To: <201009130221.o8D2L7IY048699@svn.freebsd.org> References: <201009130221.o8D2L7IY048699@svn.freebsd.org> Date: Mon, 13 Sep 2010 14:24:10 +1200 X-Google-Sender-Auth: S0pjQEKQpl0cZXbVmUa6ejdx1ck Message-ID: From: Andrew Thompson To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212525 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:24:15 -0000 On 13 September 2010 14:21, Warner Losh wrote: > Author: imp > Date: Mon Sep 13 02:21:07 2010 > New Revision: 212525 > URL: http://svn.freebsd.org/changeset/base/212525 > > Log: > =A0Merge from tbemd: use Makefile.arch to control building. > > =A0Reviewed by: =A0arch@ (many times, no objection) > > Added: > =A0head/usr.sbin/Makefile.amd64 =A0 (contents, props changed) > =A0head/usr.sbin/Makefile.arm =A0 (contents, props changed) > =A0head/usr.sbin/Makefile.i386 =A0 (contents, props changed) > =A0head/usr.sbin/Makefile.ia64 =A0 (contents, props changed) > =A0head/usr.sbin/Makefile.mips =A0 (contents, props changed) > =A0head/usr.sbin/Makefile.orig =A0 (contents, props changed) ^^ oops. > =A0head/usr.sbin/Makefile.powerpc =A0 (contents, props changed) > =A0head/usr.sbin/Makefile.sparc64 =A0 (contents, props changed) > Modified: > =A0head/usr.sbin/Makefile From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:25:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E844A106564A; Mon, 13 Sep 2010 02:25:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D75D98FC1B; Mon, 13 Sep 2010 02:25:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D2PL6c049204; Mon, 13 Sep 2010 02:25:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D2PL6A049195; Mon, 13 Sep 2010 02:25:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130225.o8D2PL6A049195@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 02:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212527 - head/sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:25:22 -0000 Author: imp Date: Mon Sep 13 02:25:21 2010 New Revision: 212527 URL: http://svn.freebsd.org/changeset/base/212527 Log: MF tbemd: Move to using Makefile.arch to select what to build. Reviewed by: arch@ (no objection) Added: head/sbin/Makefile.amd64 (contents, props changed) head/sbin/Makefile.arm (contents, props changed) head/sbin/Makefile.i386 (contents, props changed) head/sbin/Makefile.ia64 (contents, props changed) head/sbin/Makefile.mips (contents, props changed) head/sbin/Makefile.pc98 (contents, props changed) head/sbin/Makefile.sparc64 (contents, props changed) Modified: head/sbin/Makefile Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Mon Sep 13 02:23:03 2010 (r212526) +++ head/sbin/Makefile Mon Sep 13 02:25:21 2010 (r212527) @@ -5,26 +5,21 @@ # XXX MISSING: icheck ncheck -SUBDIR= adjkerntz \ +SUBDIR=adjkerntz \ atacontrol \ - ${_atm} \ badsect \ - ${_bsdlabel} \ camcontrol \ ccdconfig \ clri \ comcontrol \ conscontrol \ ddb \ - ${_devd} \ devfs \ dhclient \ dmesg \ dump \ dumpfs \ dumpon \ - ${_fdisk} \ - ${_fdisk_pc98} \ ffsinfo \ fsck \ fsck_ffs \ @@ -40,15 +35,12 @@ SUBDIR= adjkerntz \ hastd \ ifconfig \ init \ - ${_ipf} \ - ${_ipfw} \ iscontrol \ kldconfig \ kldload \ kldstat \ kldunload \ ldconfig \ - ${_mca} \ md5 \ mdconfig \ mdmfs \ @@ -62,96 +54,62 @@ SUBDIR= adjkerntz \ mount_nullfs \ mount_udf \ mount_unionfs \ - ${_natd} \ newfs \ newfs_msdos \ nfsiod \ nos-tun \ - ${_pfctl} \ - ${_pflogd} \ ping \ - ${_ping6} \ - ${_quotacheck} \ rcorder \ reboot \ recoverdisk \ restore \ route \ - ${_routed} \ - ${_rtsol} \ savecore \ - ${_sconfig} \ setkey \ shutdown \ spppcontrol \ - ${_sunlabel} \ swapon \ sysctl \ tunefs \ umount \ .if ${MK_ATM} != "no" -_atm= atm +SUBDIR+= atm .endif .if ${MK_CXX} != "no" -_devd= devd +SUBDIR+= devd .endif .if ${MK_IPFILTER} != "no" -_ipf= ipf +SUBDIR+= ipf .endif .if ${MK_IPFW} != "no" -_ipfw= ipfw -_natd= natd +SUBDIR+= ipfw +SUBDIR+= natd .endif .if ${MK_PF} != "no" -_pfctl= pfctl -_pflogd= pflogd +SUBDIR+= pfctl +SUBDIR+= pflogd .endif .if ${MK_INET6} != "no" -_ping6= ping6 -_rtsol= rtsol -.endif - -.if ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "powerpc" -_bsdlabel= bsdlabel +SUBDIR+= ping6 +SUBDIR+= rtsol .endif .if ${MK_QUOTAS} != "no" -_quotacheck= quotacheck +SUBDIR+= quotacheck .endif .if ${MK_ROUTED} != "no" -_routed= routed -.endif - -.if ${MACHINE_ARCH} == "i386" -.if ${MACHINE} == "i386" -_fdisk= fdisk -.elif ${MACHINE} == "pc98" -_fdisk_pc98= fdisk_pc98 -.endif -_sconfig= sconfig +SUBDIR+= routed .endif -.if ${MACHINE_ARCH} == "amd64" -_fdisk= fdisk -.endif +.include -.if ${MACHINE_ARCH} == "arm" -_fdisk= fdisk -.endif - -.if ${MACHINE_ARCH} == "ia64" -_mca= mca -.endif - -.if ${MACHINE_ARCH} == "sparc64" -_sunlabel= sunlabel -.endif +SUBDIR:= ${SUBDIR:O} .include Added: head/sbin/Makefile.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/Makefile.amd64 Mon Sep 13 02:25:21 2010 (r212527) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +SUBDIR += bsdlabel +SUBDIR += fdisk Added: head/sbin/Makefile.arm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/Makefile.arm Mon Sep 13 02:25:21 2010 (r212527) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +SUBDIR += bsdlabel +SUBDIR += fdisk Added: head/sbin/Makefile.i386 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/Makefile.i386 Mon Sep 13 02:25:21 2010 (r212527) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR += bsdlabel +SUBDIR += fdisk +SUBDIR += sconfig Added: head/sbin/Makefile.ia64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/Makefile.ia64 Mon Sep 13 02:25:21 2010 (r212527) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +SUBDIR += mca Added: head/sbin/Makefile.mips ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/Makefile.mips Mon Sep 13 02:25:21 2010 (r212527) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +SUBDIR += bsdlabel +SUBDIR += fdisk Added: head/sbin/Makefile.pc98 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/Makefile.pc98 Mon Sep 13 02:25:21 2010 (r212527) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR += bsdlabel +SUBDIR += fdisk_pc98 +SUBDIR += sconfig Added: head/sbin/Makefile.sparc64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/Makefile.sparc64 Mon Sep 13 02:25:21 2010 (r212527) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +SUBDIR += bsdlabel +SUBDIR += sunlabel From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:26:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA587106564A; Mon, 13 Sep 2010 02:26:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B007B8FC1B; Mon, 13 Sep 2010 02:26:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D2QaVr049348; Mon, 13 Sep 2010 02:26:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D2QaMS049347; Mon, 13 Sep 2010 02:26:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130226.o8D2QaMS049347@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 02:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212528 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:26:36 -0000 Author: imp Date: Mon Sep 13 02:26:36 2010 New Revision: 212528 URL: http://svn.freebsd.org/changeset/base/212528 Log: Ooops! Shouldn't have committed this Deleted: head/usr.sbin/Makefile.orig From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 02:32:52 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EA101065673; Mon, 13 Sep 2010 02:32:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2DC8D8FC0C; Mon, 13 Sep 2010 02:32:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o8D2Tfo8054414; Sun, 12 Sep 2010 20:29:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 12 Sep 2010 20:29:47 -0600 (MDT) Message-Id: <20100912.202947.503161978555406698.imp@bsdimp.com> To: thompsa@FreeBSD.ORG From: "M. Warner Losh" In-Reply-To: References: <201009130221.o8D2L7IY048699@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r212525 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 02:32:52 -0000 In message: Andrew Thompson writes: : On 13 September 2010 14:21, Warner Losh wrote: : > Author: imp : > Date: Mon Sep 13 02:21:07 2010 : > New Revision: 212525 : > URL: http://svn.freebsd.org/changeset/base/212525 : > : > Log: : > =A0Merge from tbemd: use Makefile.arch to control building. : > : > =A0Reviewed by: =A0arch@ (many times, no objection) : > : > Added: : > =A0head/usr.sbin/Makefile.amd64 =A0 (contents, props changed) : > =A0head/usr.sbin/Makefile.arm =A0 (contents, props changed) : > =A0head/usr.sbin/Makefile.i386 =A0 (contents, props changed) : > =A0head/usr.sbin/Makefile.ia64 =A0 (contents, props changed) : > =A0head/usr.sbin/Makefile.mips =A0 (contents, props changed) : > =A0head/usr.sbin/Makefile.orig =A0 (contents, props changed) : = : ^^ oops. Yea, noticed when I almost made the mistake again. Fixed. Thanks! Others? Warner From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 04:23:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9C30106564A; Mon, 13 Sep 2010 04:23:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4048FC08; Mon, 13 Sep 2010 04:23:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D4NNb2059157; Mon, 13 Sep 2010 04:23:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D4NNaW059155; Mon, 13 Sep 2010 04:23:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130423.o8D4NNaW059155@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 04:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212531 - head/lib/msun X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 04:23:23 -0000 Author: imp Date: Mon Sep 13 04:23:23 2010 New Revision: 212531 URL: http://svn.freebsd.org/changeset/base/212531 Log: This is exactly the same as the .else, so remove it. Modified: head/lib/msun/Makefile Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Mon Sep 13 02:35:48 2010 (r212530) +++ head/lib/msun/Makefile Mon Sep 13 04:23:23 2010 (r212531) @@ -14,8 +14,6 @@ .if ${MACHINE_CPUARCH} == "i386" ARCH_SUBDIR= i387 -.elif ${MACHINE_ARCH} == "powerpc64" -ARCH_SUBDIR= powerpc .else ARCH_SUBDIR= ${MACHINE_CPUARCH} .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 05:03:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F1751065675; Mon, 13 Sep 2010 05:03:37 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53B438FC14; Mon, 13 Sep 2010 05:03:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D53bbx062320; Mon, 13 Sep 2010 05:03:37 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D53bxm062316; Mon, 13 Sep 2010 05:03:37 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009130503.o8D53bxm062316@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 13 Sep 2010 05:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212532 - in head/sys: conf mips/include mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 05:03:37 -0000 Author: jchandra Date: Mon Sep 13 05:03:37 2010 New Revision: 212532 URL: http://svn.freebsd.org/changeset/base/212532 Log: The functions in sys/mips/mips/psraccess.S can be implemented with mips_rd_status/mips_wr_status. Implement them in mips/include/cpufunc.h, and remove psraccess.S. Reviewed by: neel, imp Deleted: head/sys/mips/mips/psraccess.S Modified: head/sys/conf/files.mips head/sys/mips/include/cpufunc.h head/sys/mips/include/md_var.h Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Mon Sep 13 04:23:23 2010 (r212531) +++ head/sys/conf/files.mips Mon Sep 13 05:03:37 2010 (r212532) @@ -22,7 +22,6 @@ mips/mips/machdep.c standard mips/mips/mp_machdep.c optional smp mips/mips/mpboot.S optional smp -mips/mips/psraccess.S standard # ---------------------------------------------------------------------- # Phase 3 # ---------------------------------------------------------------------- Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Mon Sep 13 04:23:23 2010 (r212531) +++ head/sys/mips/include/cpufunc.h Mon Sep 13 05:03:37 2010 (r212532) @@ -266,6 +266,24 @@ intr_restore(register_t ie) } } +static __inline uint32_t +set_intr_mask(uint32_t mask) +{ + uint32_t ostatus; + + ostatus = mips_rd_status(); + mask = (ostatus & ~MIPS_SR_INT_MASK) | (~mask & MIPS_SR_INT_MASK); + mips_wr_status(mask); + return (ostatus); +} + +static __inline uint32_t +get_intr_mask(void) +{ + + return (mips_rd_status() & MIPS_SR_INT_MASK); +} + static __inline void breakpoint(void) { Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Mon Sep 13 04:23:23 2010 (r212531) +++ head/sys/mips/include/md_var.h Mon Sep 13 05:03:37 2010 (r212532) @@ -75,9 +75,5 @@ void mips_postboot_fixup(void); void platform_identify(void); extern int busdma_swi_pending; -void busdma_swi(void); - -u_int32_t set_intr_mask(u_int32_t); -u_int32_t get_intr_mask(void); - +void busdma_swi(void); #endif /* !_MACHINE_MD_VAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 06:32:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB993106566C; Mon, 13 Sep 2010 06:32:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB1FD8FC0C; Mon, 13 Sep 2010 06:32:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D6Wu6j068980; Mon, 13 Sep 2010 06:32:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D6WuWr068978; Mon, 13 Sep 2010 06:32:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009130632.o8D6WuWr068978@svn.freebsd.org> From: Alexander Motin Date: Mon, 13 Sep 2010 06:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212533 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 06:32:56 -0000 Author: mav Date: Mon Sep 13 06:32:56 2010 New Revision: 212533 URL: http://svn.freebsd.org/changeset/base/212533 Log: Add tunable 'hint.hpet.X.per_cpu' to specify how much per-CPU timers driver should provide if there is sufficient hardware. Default is 1. Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 05:03:37 2010 (r212532) +++ head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 06:32:56 2010 (r212533) @@ -74,6 +74,7 @@ struct hpet_softc { int irq; int useirq; int legacy_route; + int per_cpu; uint32_t allowed_irqs; struct resource *mem_res; struct resource *intr_res; @@ -501,6 +502,11 @@ hpet_attach(device_t dev) resource_int_value(device_get_name(dev), device_get_unit(dev), "allowed_irqs", &sc->allowed_irqs); + /* Get how much per-CPU timers we should try to provide. */ + sc->per_cpu = 1; + resource_int_value(device_get_name(dev), device_get_unit(dev), + "per_cpu", &sc->per_cpu); + num_msi = 0; sc->useirq = 0; /* Find IRQ vectors for all timers. */ @@ -556,7 +562,7 @@ hpet_attach(device_t dev) if (sc->legacy_route) hpet_enable(sc); /* Group timers for per-CPU operation. */ - num_percpu_et = min(num_msi / mp_ncpus, 1); + num_percpu_et = min(num_msi / mp_ncpus, sc->per_cpu); num_percpu_t = num_percpu_et * mp_ncpus; pcpu_master = 0; cur_cpu = CPU_FIRST(); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 06:35:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73179106566B; Mon, 13 Sep 2010 06:35:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47C918FC17; Mon, 13 Sep 2010 06:35:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D6ZZL1069206; Mon, 13 Sep 2010 06:35:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D6ZZIl069203; Mon, 13 Sep 2010 06:35:35 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130635.o8D6ZZIl069203@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 06:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212534 - in head/usr.bin/xlint: . arch/powerpc arch/powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 06:35:35 -0000 Author: imp Date: Mon Sep 13 06:35:35 2010 New Revision: 212534 URL: http://svn.freebsd.org/changeset/base/212534 Log: Revert r212513 and reimplement the search order to be ARCH, CPUARCH Added: head/usr.bin/xlint/arch/powerpc64/ - copied from r212512, head/usr.bin/xlint/arch/powerpc64/ Modified: head/usr.bin/xlint/Makefile.inc head/usr.bin/xlint/arch/powerpc/targparam.h Modified: head/usr.bin/xlint/Makefile.inc ============================================================================== --- head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:32:56 2010 (r212533) +++ head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:35:35 2010 (r212534) @@ -7,14 +7,17 @@ WARNS?= 0 # These assignments duplicate much of the functionality of # MACHINE_CPUARCH, but there's no easy way to export make functions... - .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH= ${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} .else -TARGET_CPUARCH=${MACHINE_CPUARCH} +TARGET_CPUARCH= ${MACHINE_CPUARCH} +TARGET_ARCH= ${MACHINE_ARCH} .endif -TARGET_ARCH?= ${MACHINE_ARCH} +.if exists(${.CURDIR}/../arch/${TARGET_ARCH} +CFLAGS+= -I${.CURDIR}/../arch/${TARGET_ARCH} +.else CFLAGS+= -I${.CURDIR}/../arch/${TARGET_CPUARCH} +.enidf CFLAGS+= -I${.CURDIR}/../common OBJECT_FMT= ELF Modified: head/usr.bin/xlint/arch/powerpc/targparam.h ============================================================================== --- head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 06:32:56 2010 (r212533) +++ head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 06:35:35 2010 (r212534) @@ -37,11 +37,7 @@ * Machine-dependent target parameters for lint1. */ -#ifdef __powerpc64__ -#include "lp64.h" -#else #include "ilp32.h" -#endif /* * Should be set to 1 if the difference of two pointers is of type long @@ -49,13 +45,8 @@ * kept in sync with the compiler! */ -#ifdef __powerpc64__ -#define PTRDIFF_IS_LONG 1 -#define SIZEOF_IS_ULONG 1 -#else #define PTRDIFF_IS_LONG 0 #define SIZEOF_IS_ULONG 0 -#endif #define FLOAT_SIZE (4 * CHAR_BIT) #define DOUBLE_SIZE (8 * CHAR_BIT) From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 06:50:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFF32106566B; Mon, 13 Sep 2010 06:50:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F9D28FC25; Mon, 13 Sep 2010 06:50:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D6o7qH070201; Mon, 13 Sep 2010 06:50:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D6o7Jx070199; Mon, 13 Sep 2010 06:50:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130650.o8D6o7Jx070199@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 06:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212535 - head/usr.bin/xlint X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 06:50:07 -0000 Author: imp Date: Mon Sep 13 06:50:07 2010 New Revision: 212535 URL: http://svn.freebsd.org/changeset/base/212535 Log: Doh! two last second refactoring typos crept in. Fix. Modified: head/usr.bin/xlint/Makefile.inc Modified: head/usr.bin/xlint/Makefile.inc ============================================================================== --- head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:35:35 2010 (r212534) +++ head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:50:07 2010 (r212535) @@ -13,11 +13,11 @@ TARGET_CPUARCH= ${TARGET_ARCH:C/mipse[bl TARGET_CPUARCH= ${MACHINE_CPUARCH} TARGET_ARCH= ${MACHINE_ARCH} .endif -.if exists(${.CURDIR}/../arch/${TARGET_ARCH} +.if exists(${.CURDIR}/../arch/${TARGET_ARCH}) CFLAGS+= -I${.CURDIR}/../arch/${TARGET_ARCH} .else CFLAGS+= -I${.CURDIR}/../arch/${TARGET_CPUARCH} -.enidf +.endif CFLAGS+= -I${.CURDIR}/../common OBJECT_FMT= ELF From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:03:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DC32106566B; Mon, 13 Sep 2010 07:03:01 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BFB18FC08; Mon, 13 Sep 2010 07:03:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D731s9071304; Mon, 13 Sep 2010 07:03:01 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D731Tm071288; Mon, 13 Sep 2010 07:03:01 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009130703.o8D731Tm071288@svn.freebsd.org> From: David Xu Date: Mon, 13 Sep 2010 07:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212536 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:03:01 -0000 Author: davidxu Date: Mon Sep 13 07:03:01 2010 New Revision: 212536 URL: http://svn.freebsd.org/changeset/base/212536 Log: Convert thread list lock from mutex to rwlock. Modified: head/lib/libthr/thread/thr_affinity.c head/lib/libthr/thread/thr_attr.c head/lib/libthr/thread/thr_cancel.c head/lib/libthr/thread/thr_create.c head/lib/libthr/thread/thr_detach.c head/lib/libthr/thread/thr_exit.c head/lib/libthr/thread/thr_fork.c head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_join.c head/lib/libthr/thread/thr_kill.c head/lib/libthr/thread/thr_list.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_resume_np.c head/lib/libthr/thread/thr_stack.c head/lib/libthr/thread/thr_suspend_np.c Modified: head/lib/libthr/thread/thr_affinity.c ============================================================================== --- head/lib/libthr/thread/thr_affinity.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_affinity.c Mon Sep 13 07:03:01 2010 (r212536) @@ -50,8 +50,7 @@ _pthread_setaffinity_np(pthread_t td, si -1, cpusetsize, cpusetp); if (error == -1) error = errno; - } else { - THR_THREAD_LOCK(curthread, td); + } else if ((error = _thr_find_thread(curthread, td, 0)) == 0) { if (td->state == PS_DEAD) { THR_THREAD_UNLOCK(curthread, td); return (EINVAL); @@ -73,10 +72,18 @@ _pthread_getaffinity_np(pthread_t td, si lwpid_t tid; int error; - tid = TID(td); - error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, - (td == curthread) ? -1 : tid, cpusetsize, cpusetp); - if (error == -1) - error = errno; + if (td == curthread) { + error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + (td == curthread) ? -1 : tid, cpusetsize, cpusetp); + if (error == -1) + error = errno; + } else if ((error = _thr_find_thread(curthread, td, 0)) == 0) { + tid = TID(td); + error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + (td == curthread) ? -1 : tid, cpusetsize, cpusetp); + if (error == -1) + error = errno; + THR_THREAD_UNLOCK(curthread, td); + } return (error); } Modified: head/lib/libthr/thread/thr_attr.c ============================================================================== --- head/lib/libthr/thread/thr_attr.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_attr.c Mon Sep 13 07:03:01 2010 (r212536) @@ -132,22 +132,23 @@ _pthread_attr_destroy(pthread_attr_t *at __weak_reference(_pthread_attr_get_np, pthread_attr_get_np); int -_pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst) +_pthread_attr_get_np(pthread_t pthread, pthread_attr_t *dst) { struct pthread *curthread; struct pthread_attr attr; int ret; - if (pid == NULL || dst == NULL || *dst == NULL) + if (pthread == NULL || dst == NULL || *dst == NULL) return (EINVAL); curthread = _get_curthread(); - if ((ret = _thr_ref_add(curthread, pid, /*include dead*/0)) != 0) + if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) != 0) return (ret); - attr = pid->attr; - if (pid->tlflags & TLFLAGS_DETACHED) + attr = pthread->attr; + if (pthread->flags & THR_FLAGS_DETACHED) attr.flags |= PTHREAD_DETACHED; - _thr_ref_delete(curthread, pid); + THR_THREAD_UNLOCK(curthread, pthread); + memcpy(*dst, &attr, sizeof(struct pthread_attr)); /* XXX */ (*dst)->cpuset = NULL; Modified: head/lib/libthr/thread/thr_cancel.c ============================================================================== --- head/lib/libthr/thread/thr_cancel.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_cancel.c Mon Sep 13 07:03:01 2010 (r212536) @@ -60,18 +60,16 @@ _pthread_cancel(pthread_t pthread) /* * POSIX says _pthread_cancel should be async cancellation safe. - * _thr_ref_add and _thr_ref_delete will enter and leave critical + * _thr_find_thread and THR_THREAD_UNLOCK will enter and leave critical * region automatically. */ - if ((ret = _thr_ref_add(curthread, pthread, 0)) == 0) { - THR_THREAD_LOCK(curthread, pthread); + if ((ret = _thr_find_thread(curthread, pthread, 0)) == 0) { if (!pthread->cancel_pending) { pthread->cancel_pending = 1; if (pthread->state != PS_DEAD) _thr_send_sig(pthread, SIGCANCEL); } THR_THREAD_UNLOCK(curthread, pthread); - _thr_ref_delete(curthread, pthread); } return (ret); } Modified: head/lib/libthr/thread/thr_create.c ============================================================================== --- head/lib/libthr/thread/thr_create.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_create.c Mon Sep 13 07:03:01 2010 (r212536) @@ -125,7 +125,7 @@ _pthread_create(pthread_t * thread, cons new_thread->state = PS_RUNNING; if (new_thread->attr.flags & PTHREAD_CREATE_DETACHED) - new_thread->tlflags |= TLFLAGS_DETACHED; + new_thread->flags |= THR_FLAGS_DETACHED; /* Add the new thread. */ new_thread->refcount = 1; @@ -185,16 +185,14 @@ _pthread_create(pthread_t * thread, cons THR_THREAD_LOCK(curthread, new_thread); new_thread->state = PS_DEAD; new_thread->tid = TID_TERMINATED; + new_thread->flags |= THR_FLAGS_DETACHED; + new_thread->refcount--; if (new_thread->flags & THR_FLAGS_NEED_SUSPEND) { new_thread->cycle++; _thr_umtx_wake(&new_thread->cycle, INT_MAX, 0); } - THR_THREAD_UNLOCK(curthread, new_thread); - THREAD_LIST_LOCK(curthread); - _thread_active_threads--; - new_thread->tlflags |= TLFLAGS_DETACHED; - _thr_ref_delete_unlocked(curthread, new_thread); - THREAD_LIST_UNLOCK(curthread); + _thr_try_gc(curthread, new_thread); /* thread lock released */ + atomic_add_int(&_thread_active_threads, -1); } else if (locked) { if (cpusetp != NULL) { if (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, @@ -202,22 +200,17 @@ _pthread_create(pthread_t * thread, cons ret = errno; /* kill the new thread */ new_thread->force_exit = 1; - THR_THREAD_UNLOCK(curthread, new_thread); + new_thread->flags |= THR_FLAGS_DETACHED; + _thr_try_gc(curthread, new_thread); + /* thread lock released */ goto out; } } _thr_report_creation(curthread, new_thread); THR_THREAD_UNLOCK(curthread, new_thread); -out: - if (ret) { - THREAD_LIST_LOCK(curthread); - new_thread->tlflags |= TLFLAGS_DETACHED; - THR_GCLIST_ADD(new_thread); - THREAD_LIST_UNLOCK(curthread); - } } - +out: if (ret) (*thread) = 0; return (ret); Modified: head/lib/libthr/thread/thr_detach.c ============================================================================== --- head/lib/libthr/thread/thr_detach.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_detach.c Mon Sep 13 07:03:01 2010 (r212536) @@ -47,25 +47,21 @@ _pthread_detach(pthread_t pthread) if (pthread == NULL) return (EINVAL); - THREAD_LIST_LOCK(curthread); if ((rval = _thr_find_thread(curthread, pthread, /*include dead*/1)) != 0) { - THREAD_LIST_UNLOCK(curthread); return (rval); } /* Check if the thread is already detached or has a joiner. */ - if ((pthread->tlflags & TLFLAGS_DETACHED) != 0 || + if ((pthread->flags & THR_FLAGS_DETACHED) != 0 || (pthread->joiner != NULL)) { - THREAD_LIST_UNLOCK(curthread); + THR_THREAD_UNLOCK(curthread, pthread); return (EINVAL); } /* Flag the thread as detached. */ - pthread->tlflags |= TLFLAGS_DETACHED; - if (pthread->state == PS_DEAD) - THR_GCLIST_ADD(pthread); - THREAD_LIST_UNLOCK(curthread); + pthread->flags |= THR_FLAGS_DETACHED; + _thr_try_gc(curthread, pthread); /* thread lock released */ return (0); } Modified: head/lib/libthr/thread/thr_exit.c ============================================================================== --- head/lib/libthr/thread/thr_exit.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_exit.c Mon Sep 13 07:03:01 2010 (r212536) @@ -108,37 +108,34 @@ _pthread_exit_mask(void *status, sigset_ if (!_thr_isthreaded()) exit(0); - THREAD_LIST_LOCK(curthread); - _thread_active_threads--; - if (_thread_active_threads == 0) { - THREAD_LIST_UNLOCK(curthread); + if (atomic_fetchadd_int(&_thread_active_threads, -1) == 1) { exit(0); /* Never reach! */ } - THREAD_LIST_UNLOCK(curthread); /* Tell malloc that the thread is exiting. */ _malloc_thread_cleanup(); - THREAD_LIST_LOCK(curthread); THR_LOCK(curthread); curthread->state = PS_DEAD; if (curthread->flags & THR_FLAGS_NEED_SUSPEND) { curthread->cycle++; _thr_umtx_wake(&curthread->cycle, INT_MAX, 0); } - THR_UNLOCK(curthread); /* * Thread was created with initial refcount 1, we drop the * reference count to allow it to be garbage collected. */ curthread->refcount--; - if (curthread->tlflags & TLFLAGS_DETACHED) - THR_GCLIST_ADD(curthread); - THREAD_LIST_UNLOCK(curthread); + _thr_try_gc(curthread, curthread); /* thread lock released */ + if (!curthread->force_exit && SHOULD_REPORT_EVENT(curthread, TD_DEATH)) _thr_report_death(curthread); +#if defined(_PTHREADS_INVARIANTS) + if (THR_IN_CRITICAL(curthread)) + PANIC("thread exits with resources held!"); +#endif /* * Kernel will do wakeup at the address, so joiner thread * will be resumed if it is sleeping at the address. Modified: head/lib/libthr/thread/thr_fork.c ============================================================================== --- head/lib/libthr/thread/thr_fork.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_fork.c Mon Sep 13 07:03:01 2010 (r212536) @@ -178,13 +178,13 @@ _fork(void) /* Child process */ errsave = errno; curthread->cancel_pending = 0; - curthread->flags &= ~THR_FLAGS_NEED_SUSPEND; + curthread->flags &= ~(THR_FLAGS_NEED_SUSPEND|THR_FLAGS_DETACHED); /* * Thread list will be reinitialized, and later we call * _libpthread_init(), it will add us back to list. */ - curthread->tlflags &= ~(TLFLAGS_IN_TDLIST | TLFLAGS_DETACHED); + curthread->tlflags &= ~TLFLAGS_IN_TDLIST; /* child is a new kernel thread. */ thr_self(&curthread->tid); Modified: head/lib/libthr/thread/thr_init.c ============================================================================== --- head/lib/libthr/thread/thr_init.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_init.c Mon Sep 13 07:03:01 2010 (r212536) @@ -111,7 +111,7 @@ struct umutex _mutex_static_lock = DEFAU struct umutex _cond_static_lock = DEFAULT_UMUTEX; struct umutex _rwlock_static_lock = DEFAULT_UMUTEX; struct umutex _keytable_lock = DEFAULT_UMUTEX; -struct umutex _thr_list_lock = DEFAULT_UMUTEX; +struct urwlock _thr_list_lock = DEFAULT_URWLOCK; struct umutex _thr_event_lock = DEFAULT_UMUTEX; int __pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *); Modified: head/lib/libthr/thread/thr_join.c ============================================================================== --- head/lib/libthr/thread/thr_join.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_join.c Mon Sep 13 07:03:01 2010 (r212536) @@ -43,12 +43,12 @@ __weak_reference(_pthread_timedjoin_np, static void backout_join(void *arg) { - struct pthread *curthread = _get_curthread(); struct pthread *pthread = (struct pthread *)arg; + struct pthread *curthread = _get_curthread(); - THREAD_LIST_LOCK(curthread); + THR_THREAD_LOCK(curthread, pthread); pthread->joiner = NULL; - THREAD_LIST_UNLOCK(curthread); + THR_THREAD_LOCK(curthread, pthread); } int @@ -88,23 +88,23 @@ join_common(pthread_t pthread, void **th if (pthread == curthread) return (EDEADLK); - THREAD_LIST_LOCK(curthread); - if ((ret = _thr_find_thread(curthread, pthread, 1)) != 0) { - ret = ESRCH; - } else if ((pthread->tlflags & TLFLAGS_DETACHED) != 0) { + if ((ret = _thr_find_thread(curthread, pthread, 1)) != 0) + return (ESRCH); + + if ((pthread->flags & THR_FLAGS_DETACHED) != 0) { ret = EINVAL; } else if (pthread->joiner != NULL) { /* Multiple joiners are not supported. */ ret = ENOTSUP; } if (ret) { - THREAD_LIST_UNLOCK(curthread); + THR_THREAD_UNLOCK(curthread, pthread); return (ret); } /* Set the running thread to be the joiner: */ pthread->joiner = curthread; - THREAD_LIST_UNLOCK(curthread); + THR_THREAD_UNLOCK(curthread, pthread); THR_CLEANUP_PUSH(curthread, backout_join, pthread); _thr_cancel_enter(curthread); @@ -131,17 +131,16 @@ join_common(pthread_t pthread, void **th THR_CLEANUP_POP(curthread, 0); if (ret == ETIMEDOUT) { - THREAD_LIST_LOCK(curthread); + THR_THREAD_LOCK(curthread, pthread); pthread->joiner = NULL; - THREAD_LIST_UNLOCK(curthread); + THR_THREAD_UNLOCK(curthread, pthread); } else { ret = 0; tmp = pthread->ret; - THREAD_LIST_LOCK(curthread); - pthread->tlflags |= TLFLAGS_DETACHED; + THR_THREAD_LOCK(curthread, pthread); + pthread->flags |= THR_FLAGS_DETACHED; pthread->joiner = NULL; - THR_GCLIST_ADD(pthread); - THREAD_LIST_UNLOCK(curthread); + _thr_try_gc(curthread, pthread); /* thread lock released */ if (thread_return != NULL) *thread_return = tmp; Modified: head/lib/libthr/thread/thr_kill.c ============================================================================== --- head/lib/libthr/thread/thr_kill.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_kill.c Mon Sep 13 07:03:01 2010 (r212536) @@ -54,11 +54,15 @@ _pthread_kill(pthread_t pthread, int sig * signal is valid (signal 0 specifies error checking only) and * not being ignored: */ - else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0)) + else if (curthread == pthread) { + if (sig > 0) + _thr_send_sig(pthread, sig); + ret = 0; + } if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) == 0) { if (sig > 0) _thr_send_sig(pthread, sig); - _thr_ref_delete(curthread, pthread); + THR_THREAD_UNLOCK(curthread, pthread); } /* Return the completion status: */ Modified: head/lib/libthr/thread/thr_list.c ============================================================================== --- head/lib/libthr/thread/thr_list.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_list.c Mon Sep 13 07:03:01 2010 (r212536) @@ -79,7 +79,7 @@ _thr_list_init(void) _gc_count = 0; total_threads = 1; - _thr_umutex_init(&_thr_list_lock); + _thr_urwlock_init(&_thr_list_lock); TAILQ_INIT(&_thread_list); TAILQ_INIT(&free_threadq); _thr_umutex_init(&free_thread_lock); @@ -98,7 +98,7 @@ _thr_gc(struct pthread *curthread) TAILQ_HEAD(, pthread) worklist; TAILQ_INIT(&worklist); - THREAD_LIST_LOCK(curthread); + THREAD_LIST_WRLOCK(curthread); /* Check the threads waiting for GC. */ TAILQ_FOREACH_SAFE(td, &_thread_gc_list, gcle, td_next) { @@ -107,17 +107,8 @@ _thr_gc(struct pthread *curthread) continue; } _thr_stack_free(&td->attr); - if (((td->tlflags & TLFLAGS_DETACHED) != 0) && - (td->refcount == 0)) { - THR_GCLIST_REMOVE(td); - /* - * The thread has detached and is no longer - * referenced. It is safe to remove all - * remnants of the thread. - */ - THR_LIST_REMOVE(td); - TAILQ_INSERT_HEAD(&worklist, td, gcle); - } + THR_GCLIST_REMOVE(td); + TAILQ_INSERT_HEAD(&worklist, td, gcle); } THREAD_LIST_UNLOCK(curthread); @@ -228,10 +219,10 @@ thr_destroy(struct pthread *curthread __ void _thr_link(struct pthread *curthread, struct pthread *thread) { - THREAD_LIST_LOCK(curthread); + THREAD_LIST_WRLOCK(curthread); THR_LIST_ADD(thread); - _thread_active_threads++; THREAD_LIST_UNLOCK(curthread); + atomic_add_int(&_thread_active_threads, 1); } /* @@ -240,10 +231,10 @@ _thr_link(struct pthread *curthread, str void _thr_unlink(struct pthread *curthread, struct pthread *thread) { - THREAD_LIST_LOCK(curthread); + THREAD_LIST_WRLOCK(curthread); THR_LIST_REMOVE(thread); - _thread_active_threads--; THREAD_LIST_UNLOCK(curthread); + atomic_add_int(&_thread_active_threads, -1); } void @@ -290,12 +281,11 @@ _thr_ref_add(struct pthread *curthread, /* Invalid thread: */ return (EINVAL); - THREAD_LIST_LOCK(curthread); if ((ret = _thr_find_thread(curthread, thread, include_dead)) == 0) { thread->refcount++; THR_CRITICAL_ENTER(curthread); + THR_THREAD_UNLOCK(curthread, thread); } - THREAD_LIST_UNLOCK(curthread); /* Return zero if the thread exists: */ return (ret); @@ -304,41 +294,56 @@ _thr_ref_add(struct pthread *curthread, void _thr_ref_delete(struct pthread *curthread, struct pthread *thread) { - THREAD_LIST_LOCK(curthread); - _thr_ref_delete_unlocked(curthread, thread); - THREAD_LIST_UNLOCK(curthread); + THR_THREAD_LOCK(curthread, thread); + thread->refcount--; + _thr_try_gc(curthread, thread); + THR_CRITICAL_LEAVE(curthread); } +/* entered with thread lock held, exit with thread lock released */ void -_thr_ref_delete_unlocked(struct pthread *curthread, - struct pthread *thread) +_thr_try_gc(struct pthread *curthread, struct pthread *thread) { - if (thread != NULL) { - thread->refcount--; - if ((thread->refcount == 0) && thread->state == PS_DEAD && - (thread->tlflags & TLFLAGS_DETACHED) != 0) + if (THR_SHOULD_GC(thread)) { + THR_REF_ADD(curthread, thread); + THR_THREAD_UNLOCK(curthread, thread); + THREAD_LIST_WRLOCK(curthread); + THR_THREAD_LOCK(curthread, thread); + THR_REF_DEL(curthread, thread); + if (THR_SHOULD_GC(thread)) { + THR_LIST_REMOVE(thread); THR_GCLIST_ADD(thread); - THR_CRITICAL_LEAVE(curthread); + } + THR_THREAD_UNLOCK(curthread, thread); + THREAD_LIST_UNLOCK(curthread); + } else { + THR_THREAD_UNLOCK(curthread, thread); } } +/* return with thread lock held if thread is found */ int -_thr_find_thread(struct pthread *curthread __unused, struct pthread *thread, +_thr_find_thread(struct pthread *curthread, struct pthread *thread, int include_dead) { struct pthread *pthread; + int ret; if (thread == NULL) - /* Invalid thread: */ return (EINVAL); + ret = 0; + THREAD_LIST_RDLOCK(curthread); pthread = _thr_hash_find(thread); if (pthread) { + THR_THREAD_LOCK(curthread, pthread); if (include_dead == 0 && pthread->state == PS_DEAD) { - pthread = NULL; - } + THR_THREAD_UNLOCK(curthread, pthread); + ret = ESRCH; + } + } else { + ret = ESRCH; } - - /* Return zero if the thread exists: */ - return ((pthread != NULL) ? 0 : ESRCH); + THREAD_LIST_UNLOCK(curthread); + return (ret); } Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_private.h Mon Sep 13 07:03:01 2010 (r212536) @@ -415,13 +415,13 @@ struct pthread { #define THR_FLAGS_PRIVATE 0x0001 #define THR_FLAGS_NEED_SUSPEND 0x0002 /* thread should be suspended */ #define THR_FLAGS_SUSPENDED 0x0004 /* thread is suspended */ +#define THR_FLAGS_IN_GCLIST 0x0004 /* thread in gc list */ +#define THR_FLAGS_DETACHED 0x0008 /* thread is detached */ /* Thread list flags; only set with thread list lock held. */ int tlflags; #define TLFLAGS_GC_SAFE 0x0001 /* thread safe for cleaning */ #define TLFLAGS_IN_TDLIST 0x0002 /* thread in all thread list */ -#define TLFLAGS_IN_GCLIST 0x0004 /* thread in gc list */ -#define TLFLAGS_DETACHED 0x0008 /* thread is detached */ /* Queue of currently owned NORMAL or PRIO_INHERIT type mutexes. */ struct mutex_queue mutexq; @@ -463,6 +463,10 @@ struct pthread { td_event_msg_t event_buf; }; +#define THR_SHOULD_GC(thrd) \ + ((thrd)->refcount == 0 && (thrd)->state == PS_DEAD && \ + ((thrd)->flags & THR_FLAGS_DETACHED) != 0) + #define THR_IN_CRITICAL(thrd) \ (((thrd)->locklevel > 0) || \ ((thrd)->critical_count > 0)) @@ -517,14 +521,23 @@ do { \ #define THR_THREAD_LOCK(curthrd, thr) THR_LOCK_ACQUIRE(curthrd, &(thr)->lock) #define THR_THREAD_UNLOCK(curthrd, thr) THR_LOCK_RELEASE(curthrd, &(thr)->lock) -#define THREAD_LIST_LOCK(curthrd) \ +#define THREAD_LIST_RDLOCK(curthrd) \ +do { \ + (curthrd)->locklevel++; \ + _thr_rwl_rdlock(&_thr_list_lock); \ +} while (0) + +#define THREAD_LIST_WRLOCK(curthrd) \ do { \ - THR_LOCK_ACQUIRE((curthrd), &_thr_list_lock); \ + (curthrd)->locklevel++; \ + _thr_rwl_wrlock(&_thr_list_lock); \ } while (0) #define THREAD_LIST_UNLOCK(curthrd) \ do { \ - THR_LOCK_RELEASE((curthrd), &_thr_list_lock); \ + _thr_rwl_unlock(&_thr_list_lock); \ + (curthrd)->locklevel--; \ + _thr_ast(curthrd); \ } while (0) /* @@ -546,20 +559,30 @@ do { \ } \ } while (0) #define THR_GCLIST_ADD(thrd) do { \ - if (((thrd)->tlflags & TLFLAGS_IN_GCLIST) == 0) { \ + if (((thrd)->flags & THR_FLAGS_IN_GCLIST) == 0) { \ TAILQ_INSERT_HEAD(&_thread_gc_list, thrd, gcle);\ - (thrd)->tlflags |= TLFLAGS_IN_GCLIST; \ + (thrd)->flags |= THR_FLAGS_IN_GCLIST; \ _gc_count++; \ } \ } while (0) #define THR_GCLIST_REMOVE(thrd) do { \ - if (((thrd)->tlflags & TLFLAGS_IN_GCLIST) != 0) { \ + if (((thrd)->flags & THR_FLAGS_IN_GCLIST) != 0) { \ TAILQ_REMOVE(&_thread_gc_list, thrd, gcle); \ - (thrd)->tlflags &= ~TLFLAGS_IN_GCLIST; \ + (thrd)->flags &= ~THR_FLAGS_IN_GCLIST; \ _gc_count--; \ } \ } while (0) +#define THR_REF_ADD(curthread, pthread) { \ + THR_CRITICAL_ENTER(curthread); \ + pthread->refcount++; \ +} while (0) + +#define THR_REF_DEL(curthread, pthread) { \ + pthread->refcount--; \ + THR_CRITICAL_LEAVE(curthread); \ +} while (0) + #define GC_NEEDED() (_gc_count >= 5) #define SHOULD_REPORT_EVENT(curthr, e) \ @@ -618,7 +641,7 @@ extern struct umutex _mutex_static_lock extern struct umutex _cond_static_lock __hidden; extern struct umutex _rwlock_static_lock __hidden; extern struct umutex _keytable_lock __hidden; -extern struct umutex _thr_list_lock __hidden; +extern struct urwlock _thr_list_lock __hidden; extern struct umutex _thr_event_lock __hidden; /* @@ -673,6 +696,7 @@ int _thr_setscheduler(lwpid_t, int, cons void _thr_signal_prefork(void) __hidden; void _thr_signal_postfork(void) __hidden; void _thr_signal_postfork_child(void) __hidden; +void _thr_try_gc(struct pthread *, struct pthread *) __hidden; int _rtp_to_schedparam(const struct rtprio *rtp, int *policy, struct sched_param *param) __hidden; int _schedparam_to_rtp(int policy, const struct sched_param *param, Modified: head/lib/libthr/thread/thr_resume_np.c ============================================================================== --- head/lib/libthr/thread/thr_resume_np.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_resume_np.c Mon Sep 13 07:03:01 2010 (r212536) @@ -50,12 +50,10 @@ _pthread_resume_np(pthread_t thread) int ret; /* Add a reference to the thread: */ - if ((ret = _thr_ref_add(curthread, thread, /*include dead*/0)) == 0) { + if ((ret = _thr_find_thread(curthread, thread, /*include dead*/0)) == 0) { /* Lock the threads scheduling queue: */ - THR_THREAD_LOCK(curthread, thread); resume_common(thread); THR_THREAD_UNLOCK(curthread, thread); - _thr_ref_delete(curthread, thread); } return (ret); } @@ -67,7 +65,7 @@ _pthread_resume_all_np(void) struct pthread *thread; /* Take the thread list lock: */ - THREAD_LIST_LOCK(curthread); + THREAD_LIST_RDLOCK(curthread); TAILQ_FOREACH(thread, &_thread_list, tle) { if (thread != curthread) { Modified: head/lib/libthr/thread/thr_stack.c ============================================================================== --- head/lib/libthr/thread/thr_stack.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_stack.c Mon Sep 13 07:03:01 2010 (r212536) @@ -154,7 +154,7 @@ _thr_stack_alloc(struct pthread_attr *at * Use the garbage collector lock for synchronization of the * spare stack lists and allocations from usrstack. */ - THREAD_LIST_LOCK(curthread); + THREAD_LIST_WRLOCK(curthread); /* * If the stack and guard sizes are default, try to allocate a stack * from the default-size stack cache: Modified: head/lib/libthr/thread/thr_suspend_np.c ============================================================================== --- head/lib/libthr/thread/thr_suspend_np.c Mon Sep 13 06:50:07 2010 (r212535) +++ head/lib/libthr/thread/thr_suspend_np.c Mon Sep 13 07:03:01 2010 (r212536) @@ -76,7 +76,7 @@ _pthread_suspend_all_np(void) struct pthread *thread; int ret; - THREAD_LIST_LOCK(curthread); + THREAD_LIST_RDLOCK(curthread); TAILQ_FOREACH(thread, &_thread_list, tle) { if (thread != curthread) { @@ -96,13 +96,15 @@ restart: THR_THREAD_LOCK(curthread, thread); ret = suspend_common(curthread, thread, 0); if (ret == 0) { - /* Can not suspend, try to wait */ - thread->refcount++; THREAD_LIST_UNLOCK(curthread); + /* Can not suspend, try to wait */ + THR_REF_ADD(curthread, thread); suspend_common(curthread, thread, 1); - THR_THREAD_UNLOCK(curthread, thread); - THREAD_LIST_LOCK(curthread); - _thr_ref_delete_unlocked(curthread, thread); + THR_REF_DEL(curthread, thread); + _thr_try_gc(curthread, thread); + /* thread lock released */ + + THREAD_LIST_RDLOCK(curthread); /* * Because we were blocked, things may have * been changed, we have to restart the @@ -127,8 +129,8 @@ suspend_common(struct pthread *curthread !(thread->flags & THR_FLAGS_SUSPENDED)) { thread->flags |= THR_FLAGS_NEED_SUSPEND; tmp = thread->cycle; - THR_THREAD_UNLOCK(curthread, thread); _thr_send_sig(thread, SIGCANCEL); + THR_THREAD_UNLOCK(curthread, thread); if (waitok) { _thr_umtx_wait_uint(&thread->cycle, tmp, NULL, 0); THR_THREAD_LOCK(curthread, thread); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:15:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64E37106564A; Mon, 13 Sep 2010 07:15:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52F5C8FC14; Mon, 13 Sep 2010 07:15:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D7F1mV072293; Mon, 13 Sep 2010 07:15:01 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D7F1DU072292; Mon, 13 Sep 2010 07:15:01 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130715.o8D7F1DU072292@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 07:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212537 - head/usr.sbin/crunch/crunchide X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:15:01 -0000 Author: imp Date: Mon Sep 13 07:15:01 2010 New Revision: 212537 URL: http://svn.freebsd.org/changeset/base/212537 Log: It turns out that TARGET_CPUARCH doesn't buy us much here, if anything, but costs us another copy of the transform. Revert it. # Maybe makefile.inc1 should set TARGET_CPUARCH for the cross-tools, but # it doesn't now. That would solve problems in other places too. Submitted by: jmallet@ Modified: head/usr.sbin/crunch/crunchide/Makefile Modified: head/usr.sbin/crunch/crunchide/Makefile ============================================================================== --- head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 07:03:01 2010 (r212536) +++ head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 07:15:01 2010 (r212537) @@ -3,14 +3,6 @@ PROG= crunchide SRCS= crunchide.c -# These assignments duplicate much of the functionality of -# MACHINE_CPUARCH, but there's no easy way to export make functions... - -.if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} -.else -TARGET_CPUARCH=${MACHINE_CPUARCH} -.endif TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == i386 && ${MACHINE_ARCH} == i386 @@ -18,9 +10,8 @@ CFLAGS+=-DNLIST_AOUT SRCS+= exec_aout.c .endif -# nb: TARGET_ARCH for powerpc64 is correct here -.if ${TARGET_CPUARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ - ${TARGET_CPUARCH} == sparc64 || ${TARGET_CPUARCH} == amd64 +.if ${TARGET_ARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ + ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 CFLAGS+=-DNLIST_ELF64 SRCS+= exec_elf64.c exec_elf64.o: exec_elf32.c From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:16:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 990141065670; Mon, 13 Sep 2010 07:16:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA908FC27; Mon, 13 Sep 2010 07:16:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D7GmIj072504; Mon, 13 Sep 2010 07:16:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D7GmKP072502; Mon, 13 Sep 2010 07:16:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130716.o8D7GmKP072502@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 07:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212538 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:16:48 -0000 Author: imp Date: Mon Sep 13 07:16:48 2010 New Revision: 212538 URL: http://svn.freebsd.org/changeset/base/212538 Log: Use MACHINE_CPUARCH as appropriate Define __KLD_SHARED to be yes or no depending on if the target uses shared binaries for klds or not (this also eliminates 4 uses of MACHINE_ARCH). Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Mon Sep 13 07:15:01 2010 (r212537) +++ head/sys/conf/kmod.mk Mon Sep 13 07:16:48 2010 (r212538) @@ -81,6 +81,13 @@ OBJCOPY?= objcopy .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S +# amd64 and mips use direct linking for kmod, all others use shared binaries +.if ${MACHINE_CPUARCH} != amd64 && ${MACHINE_CPUARCH} != mips +__KLD_SHARED=yes +.else +__KLD_SHARED=no +.endif + .if ${CC:T:Micc} == "icc" CFLAGS:= ${CFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/} .else @@ -128,15 +135,15 @@ CFLAGS+= -fno-common LDFLAGS+= -d -warn-common CFLAGS+= ${DEBUG_FLAGS} -.if ${MACHINE_ARCH} == amd64 +.if ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == powerpc CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif -.if ${MACHINE_ARCH} == "mips" +.if ${MACHINE_CPUARCH} == mips CFLAGS+= -G0 -fno-pic -mno-abicalls -mlong-calls .endif @@ -190,7 +197,7 @@ ${PROG}.symbols: ${FULLPROG} ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} .endif -.if ${MACHINE_ARCH} != amd64 && ${MACHINE_ARCH} != mips +.if ${__KLD_SHARED} == yes ${FULLPROG}: ${KMOD}.kld ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld .if !defined(DEBUG_FLAGS) @@ -203,7 +210,7 @@ EXPORT_SYMS?= NO CLEANFILES+= export_syms .endif -.if ${MACHINE_ARCH} != amd64 && ${MACHINE_ARCH} != mips +.if ${__KLD_SHARED} == yes ${KMOD}.kld: ${OBJS} .else ${FULLPROG}: ${OBJS} @@ -223,8 +230,7 @@ ${FULLPROG}: ${OBJS} export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .endif -.if !defined(DEBUG_FLAGS) && \ - (${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == mips) +.if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no ${OBJCOPY} --strip-debug ${.TARGET} .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:18:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F703106564A; Mon, 13 Sep 2010 07:18:01 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F1F08FC13; Mon, 13 Sep 2010 07:18:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D7I1pe072629; Mon, 13 Sep 2010 07:18:01 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D7I1jT072627; Mon, 13 Sep 2010 07:18:01 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009130718.o8D7I1jT072627@svn.freebsd.org> From: David Xu Date: Mon, 13 Sep 2010 07:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212539 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:18:01 -0000 Author: davidxu Date: Mon Sep 13 07:18:00 2010 New Revision: 212539 URL: http://svn.freebsd.org/changeset/base/212539 Log: PS_DEAD state needs not be checked because _thr_find_thread() has already checked it. Modified: head/lib/libthr/thread/thr_affinity.c Modified: head/lib/libthr/thread/thr_affinity.c ============================================================================== --- head/lib/libthr/thread/thr_affinity.c Mon Sep 13 07:16:48 2010 (r212538) +++ head/lib/libthr/thread/thr_affinity.c Mon Sep 13 07:18:00 2010 (r212539) @@ -51,10 +51,6 @@ _pthread_setaffinity_np(pthread_t td, si if (error == -1) error = errno; } else if ((error = _thr_find_thread(curthread, td, 0)) == 0) { - if (td->state == PS_DEAD) { - THR_THREAD_UNLOCK(curthread, td); - return (EINVAL); - } tid = TID(td); error = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, tid, cpusetsize, cpusetp); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:22:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F2F11065695; Mon, 13 Sep 2010 07:22:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EBED8FC15; Mon, 13 Sep 2010 07:22:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D7ME7R073113; Mon, 13 Sep 2010 07:22:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D7MEtu073111; Mon, 13 Sep 2010 07:22:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130722.o8D7MEtu073111@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 07:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212540 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:22:15 -0000 Author: imp Date: Mon Sep 13 07:22:14 2010 New Revision: 212540 URL: http://svn.freebsd.org/changeset/base/212540 Log: Prefer MACHINE_CPUARCH to MACHINE_ARCH unless there's a good reason... Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Mon Sep 13 07:18:00 2010 (r212539) +++ head/share/mk/bsd.cpu.mk Mon Sep 13 07:22:14 2010 (r212540) @@ -6,18 +6,18 @@ .if !defined(CPUTYPE) || empty(CPUTYPE) _CPUCFLAGS = -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" MACHINE_CPU = i486 -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" MACHINE_CPU = amd64 sse2 sse mmx -. elif ${MACHINE_ARCH} == "ia64" +. elif ${MACHINE_CPUARCH} == "ia64" MACHINE_CPU = itanium -. elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +. elif ${MACHINE_CPUARCH} == "powerpc" MACHINE_CPU = aim -. elif ${MACHINE_ARCH} == "sparc64" -. elif ${MACHINE_ARCH} == "arm" +. elif ${MACHINE_CPUARCH} == "sparc64" +. elif ${MACHINE_CPUARCH} == "arm" MACHINE_CPU = arm -. elif ${MACHINE_ARCH} == "mips" +. elif ${MACHINE_CPUARCH} == "mips" MACHINE_CPU = mips . endif .else @@ -25,7 +25,7 @@ MACHINE_CPU = mips # Handle aliases (not documented in make.conf to avoid user confusion # between e.g. i586 and pentium) -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "nocona" CPUTYPE = prescott . elif ${CPUTYPE} == "core" || ${CPUTYPE} == "core2" @@ -54,7 +54,7 @@ CPUTYPE = athlon-mp . elif ${CPUTYPE} == "k7" CPUTYPE = athlon . endif -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" . if ${CPUTYPE} == "prescott" || ${CPUTYPE} == "core2" CPUTYPE = nocona . endif @@ -71,7 +71,7 @@ CPUTYPE = nocona # http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html # http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "crusoe" _CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 . elif ${CPUTYPE} == "k5" @@ -104,9 +104,9 @@ _ICC_CPUCFLAGS = -tpp5 . else _ICC_CPUCFLAGS = . endif # ICC on 'i386' -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" _CPUCFLAGS = -march=${CPUTYPE} -. elif ${MACHINE_ARCH} == "arm" +. elif ${MACHINE_CPUARCH} == "arm" . if ${CPUTYPE} == "xscale" #XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself #_CPUCFLAGS = -mcpu=xscale @@ -123,7 +123,7 @@ _CPUCFLAGS = -mcpu=${CPUTYPE} -mno-power . endif . elif ${MACHINE_ARCH} == "powerpc64" _CPUCFLAGS = -mcpu=${CPUTYPE} -. elif ${MACHINE_ARCH} == "mips" +. elif ${MACHINE_CPUARCH} == "mips" . if ${CPUTYPE} == "mips32" _CPUCFLAGS = -march=mips32 . elif ${CPUTYPE} == "mips32r2" @@ -143,7 +143,7 @@ _CPUCFLAGS = -march=24kc # unordered list to make it easy for client makefiles to test for the # presence of a CPU feature. -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ @@ -182,27 +182,27 @@ MACHINE_CPU = i486 i386 . elif ${CPUTYPE} == "i386" MACHINE_CPU = i386 . endif -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" . if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow . elif ${CPUTYPE} == "nocona" MACHINE_CPU = sse3 . endif MACHINE_CPU += amd64 sse2 sse mmx -. elif ${MACHINE_ARCH} == "ia64" +. elif ${MACHINE_CPUARCH} == "ia64" . if ${CPUTYPE} == "itanium" MACHINE_CPU = itanium . endif . endif .endif -.if ${MACHINE_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) +.if ${MACHINE_CPUARCH} == "arm" && defined(TARGET_BIG_ENDIAN) CFLAGS += -mbig-endian LDFLAGS += -mbig-endian LD += -EB .endif -.if ${MACHINE_ARCH} == "mips" +.if ${MACHINE_CPUARCH} == "mips" CFLAGS += -G0 .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:25:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F811065673; Mon, 13 Sep 2010 07:25:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FBE08FC17; Mon, 13 Sep 2010 07:25:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D7Pa5K073410; Mon, 13 Sep 2010 07:25:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D7PZX8073399; Mon, 13 Sep 2010 07:25:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009130725.o8D7PZX8073399@svn.freebsd.org> From: Alexander Motin Date: Mon, 13 Sep 2010 07:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212541 - in head/sys: amd64/amd64 amd64/include dev/acpica i386/i386 i386/include kern mips/include mips/mips pc98/pc98 powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc6... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:25:36 -0000 Author: mav Date: Mon Sep 13 07:25:35 2010 New Revision: 212541 URL: http://svn.freebsd.org/changeset/base/212541 Log: Refactor timer management code with priority to one-shot operation mode. The main goal of this is to generate timer interrupts only when there is some work to do. When CPU is busy interrupts are generating at full rate of hz + stathz to fullfill scheduler and timekeeping requirements. But when CPU is idle, only minimum set of interrupts (down to 8 interrupts per second per CPU now), needed to handle scheduled callouts is executed. This allows significantly increase idle CPU sleep time, increasing effect of static power-saving technologies. Also it should reduce host CPU load on virtualized systems, when guest system is idle. There is set of tunables, also available as writable sysctls, allowing to control wanted event timer subsystem behavior: kern.eventtimer.timer - allows to choose event timer hardware to use. On x86 there is up to 4 different kinds of timers. Depending on whether chosen timer is per-CPU, behavior of other options slightly differs. kern.eventtimer.periodic - allows to choose periodic and one-shot operation mode. In periodic mode, current timer hardware taken as the only source of time for time events. This mode is quite alike to previous kernel behavior. One-shot mode instead uses currently selected time counter hardware to schedule all needed events one by one and program timer to generate interrupt exactly in specified time. Default value depends of chosen timer capabilities, but one-shot mode is preferred, until other is forced by user or hardware. kern.eventtimer.singlemul - in periodic mode specifies how much times higher timer frequency should be, to not strictly alias hardclock() and statclock() events. Default values are 2 and 4, but could be reduced to 1 if extra interrupts are unwanted. kern.eventtimer.idletick - makes each CPU to receive every timer interrupt independently of whether they busy or not. By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are generating. As soon as this patch modifies cpu_idle() on some platforms, I have also refactored one on x86. Now it makes use of MONITOR/MWAIT instrunctions (if supported) under high sleep/wakeup rate, as fast alternative to other methods. It allows SMP scheduler to wake up sleeping CPUs much faster without using IPI, significantly increasing performance on some highly task-switching loads. Tested by: many (on i386, amd64, sparc64 and powerc) H/W donated by: Gheorghe Ardelean Sponsored by: iXsystems, Inc. Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/apicvar.h head/sys/dev/acpica/acpi_cpu.c head/sys/dev/acpica/acpi_hpet.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_machdep.c head/sys/i386/include/apicvar.h head/sys/kern/kern_clock.c head/sys/kern/kern_clocksource.c head/sys/kern/kern_et.c head/sys/kern/kern_tc.c head/sys/kern/kern_timeout.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/mips/include/smp.h head/sys/mips/mips/mp_machdep.c head/sys/pc98/pc98/machdep.c head/sys/powerpc/aim/machdep.c head/sys/powerpc/booke/machdep.c head/sys/powerpc/include/smp.h head/sys/powerpc/powerpc/mp_machdep.c head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/include/smp.h head/sys/sparc64/sparc64/intr_machdep.c head/sys/sparc64/sparc64/mp_machdep.c head/sys/sun4v/include/intr_machdep.h head/sys/sun4v/include/smp.h head/sys/sun4v/sun4v/intr_machdep.c head/sys/sun4v/sun4v/mp_machdep.c head/sys/sys/callout.h head/sys/sys/sched.h head/sys/sys/systm.h head/sys/sys/timeet.h head/sys/sys/timetc.h head/sys/x86/x86/local_apic.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/amd64/amd64/machdep.c Mon Sep 13 07:25:35 2010 (r212541) @@ -585,59 +585,89 @@ cpu_halt(void) } void (*cpu_idle_hook)(void) = NULL; /* ACPI idle hook. */ +static int cpu_ident_amdc1e = 0; /* AMD C1E supported. */ +static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ +TUNABLE_INT("machdep.idle_mwait", &idle_mwait); +SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RW, &idle_mwait, + 0, "Use MONITOR/MWAIT for short idle"); + +#define STATE_RUNNING 0x0 +#define STATE_MWAIT 0x1 +#define STATE_SLEEPING 0x2 static void -cpu_idle_hlt(int busy) +cpu_idle_acpi(int busy) { - /* - * we must absolutely guarentee that hlt is the next instruction - * after sti or we introduce a timing window. - */ + int *state; + + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_SLEEPING; disable_intr(); - if (sched_runnable()) + if (sched_runnable()) enable_intr(); + else if (cpu_idle_hook) + cpu_idle_hook(); else __asm __volatile("sti; hlt"); + *state = STATE_RUNNING; } static void -cpu_idle_acpi(int busy) +cpu_idle_hlt(int busy) { + int *state; + + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_SLEEPING; + /* + * We must absolutely guarentee that hlt is the next instruction + * after sti or we introduce a timing window. + */ disable_intr(); - if (sched_runnable()) + if (sched_runnable()) enable_intr(); - else if (cpu_idle_hook) - cpu_idle_hook(); else __asm __volatile("sti; hlt"); + *state = STATE_RUNNING; } -static int cpu_ident_amdc1e = 0; +/* + * MWAIT cpu power states. Lower 4 bits are sub-states. + */ +#define MWAIT_C0 0xf0 +#define MWAIT_C1 0x00 +#define MWAIT_C2 0x10 +#define MWAIT_C3 0x20 +#define MWAIT_C4 0x30 -static int -cpu_probe_amdc1e(void) +static void +cpu_idle_mwait(int busy) { - int i; + int *state; - /* - * Forget it, if we're not using local APIC timer. - */ - if (resource_disabled("apic", 0) || - (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0)) - return (0); - - /* - * Detect the presence of C1E capability mostly on latest - * dual-cores (or future) k8 family. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - (cpu_id & 0x00000f00) == 0x00000f00 && - (cpu_id & 0x0fff0000) >= 0x00040000) { - cpu_ident_amdc1e = 1; - return (1); + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_MWAIT; + if (!sched_runnable()) { + cpu_monitor(state, 0, 0); + if (*state == STATE_MWAIT) + cpu_mwait(0, MWAIT_C1); } + *state = STATE_RUNNING; +} - return (0); +static void +cpu_idle_spin(int busy) +{ + int *state; + int i; + + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_RUNNING; + for (i = 0; i < 1000; i++) { + if (sched_runnable()) + return; + cpu_spinwait(); + } } /* @@ -655,110 +685,83 @@ cpu_probe_amdc1e(void) #define AMDK8_CMPHALT (AMDK8_SMIONCMPHALT | AMDK8_C1EONCMPHALT) static void -cpu_idle_amdc1e(int busy) +cpu_probe_amdc1e(void) { - disable_intr(); - if (sched_runnable()) - enable_intr(); - else { - uint64_t msr; - - msr = rdmsr(MSR_AMDK8_IPM); - if (msr & AMDK8_CMPHALT) - wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); - - if (cpu_idle_hook) - cpu_idle_hook(); - else - __asm __volatile("sti; hlt"); + /* + * Detect the presence of C1E capability mostly on latest + * dual-cores (or future) k8 family. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + (cpu_id & 0x00000f00) == 0x00000f00 && + (cpu_id & 0x0fff0000) >= 0x00040000) { + cpu_ident_amdc1e = 1; } } -static void -cpu_idle_spin(int busy) -{ - return; -} - void (*cpu_idle_fn)(int) = cpu_idle_acpi; void cpu_idle(int busy) { + uint64_t msr; + + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", + busy, curcpu); #ifdef SMP if (mp_grab_cpu_hlt()) return; #endif - cpu_idle_fn(busy); -} - -/* - * mwait cpu power states. Lower 4 bits are sub-states. - */ -#define MWAIT_C0 0xf0 -#define MWAIT_C1 0x00 -#define MWAIT_C2 0x10 -#define MWAIT_C3 0x20 -#define MWAIT_C4 0x30 - -#define MWAIT_DISABLED 0x0 -#define MWAIT_WOKEN 0x1 -#define MWAIT_WAITING 0x2 + /* If we are busy - try to use fast methods. */ + if (busy) { + if ((cpu_feature2 & CPUID2_MON) && idle_mwait) { + cpu_idle_mwait(busy); + goto out; + } + } -static void -cpu_idle_mwait(int busy) -{ - int *mwait; + /* If we have time - switch timers into idle mode. */ + if (!busy) { + critical_enter(); + cpu_idleclock(); + } - mwait = (int *)PCPU_PTR(monitorbuf); - *mwait = MWAIT_WAITING; - if (sched_runnable()) - return; - cpu_monitor(mwait, 0, 0); - if (*mwait == MWAIT_WAITING) - cpu_mwait(0, MWAIT_C1); -} + /* Apply AMD APIC timer C1E workaround. */ + if (cpu_ident_amdc1e && cpu_disable_deep_sleep) { + msr = rdmsr(MSR_AMDK8_IPM); + if (msr & AMDK8_CMPHALT) + wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); + } -static void -cpu_idle_mwait_hlt(int busy) -{ - int *mwait; + /* Call main idle method. */ + cpu_idle_fn(busy); - mwait = (int *)PCPU_PTR(monitorbuf); - if (busy == 0) { - *mwait = MWAIT_DISABLED; - cpu_idle_hlt(busy); - return; - } - *mwait = MWAIT_WAITING; - if (sched_runnable()) - return; - cpu_monitor(mwait, 0, 0); - if (*mwait == MWAIT_WAITING) - cpu_mwait(0, MWAIT_C1); + /* Switch timers mack into active mode. */ + if (!busy) { + cpu_activeclock(); + critical_exit(); + } +out: + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", + busy, curcpu); } int cpu_idle_wakeup(int cpu) { struct pcpu *pcpu; - int *mwait; + int *state; - if (cpu_idle_fn == cpu_idle_spin) - return (1); - if (cpu_idle_fn != cpu_idle_mwait && cpu_idle_fn != cpu_idle_mwait_hlt) - return (0); pcpu = pcpu_find(cpu); - mwait = (int *)pcpu->pc_monitorbuf; + state = (int *)pcpu->pc_monitorbuf; /* * This doesn't need to be atomic since missing the race will * simply result in unnecessary IPIs. */ - if (cpu_idle_fn == cpu_idle_mwait_hlt && *mwait == MWAIT_DISABLED) + if (*state == STATE_SLEEPING) return (0); - *mwait = MWAIT_WOKEN; - + if (*state == STATE_MWAIT) + *state = STATE_RUNNING; return (1); } @@ -771,8 +774,6 @@ struct { } idle_tbl[] = { { cpu_idle_spin, "spin" }, { cpu_idle_mwait, "mwait" }, - { cpu_idle_mwait_hlt, "mwait_hlt" }, - { cpu_idle_amdc1e, "amdc1e" }, { cpu_idle_hlt, "hlt" }, { cpu_idle_acpi, "acpi" }, { NULL, NULL } @@ -791,8 +792,8 @@ idle_sysctl_available(SYSCTL_HANDLER_ARG if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; - if (strcmp(idle_tbl[i].id_name, "amdc1e") == 0 && - cpu_ident_amdc1e == 0) + if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && + cpu_idle_hook == NULL) continue; p += sprintf(p, "%s, ", idle_tbl[i].id_name); } @@ -801,6 +802,9 @@ idle_sysctl_available(SYSCTL_HANDLER_ARG return (error); } +SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, + 0, 0, idle_sysctl_available, "A", "list of available idle functions"); + static int idle_sysctl(SYSCTL_HANDLER_ARGS) { @@ -824,8 +828,8 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; - if (strcmp(idle_tbl[i].id_name, "amdc1e") == 0 && - cpu_ident_amdc1e == 0) + if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && + cpu_idle_hook == NULL) continue; if (strcmp(idle_tbl[i].id_name, buf)) continue; @@ -835,9 +839,6 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) return (EINVAL); } -SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, idle_sysctl_available, "A", "list of available idle functions"); - SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, idle_sysctl, "A", "currently selected idle function"); @@ -1743,8 +1744,7 @@ hammer_time(u_int64_t modulep, u_int64_t } #endif - if (cpu_probe_amdc1e()) - cpu_idle_fn = cpu_idle_amdc1e; + cpu_probe_amdc1e(); /* Location of kernel stack for locore */ return ((u_int64_t)thread0.td_pcb); Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/amd64/amd64/mp_machdep.c Mon Sep 13 07:25:35 2010 (r212541) @@ -118,7 +118,6 @@ u_long *ipi_invlcache_counts[MAXCPU]; u_long *ipi_rendezvous_counts[MAXCPU]; u_long *ipi_lazypmap_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; -static u_long *ipi_statclock_counts[MAXCPU]; #endif extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); @@ -1196,16 +1195,22 @@ smp_masked_invlpg_range(cpumask_t mask, void ipi_bitmap_handler(struct trapframe frame) { + struct trapframe *oldframe; + struct thread *td; int cpu = PCPU_GET(cpuid); u_int ipi_bitmap; + critical_enter(); + td = curthread; + td->td_intr_nesting_level++; + oldframe = td->td_intr_frame; + td->td_intr_frame = &frame; ipi_bitmap = atomic_readandclear_int(&cpu_ipi_pending[cpu]); - if (ipi_bitmap & (1 << IPI_PREEMPT)) { #ifdef COUNT_IPIS (*ipi_preempt_counts[cpu])++; #endif - sched_preempt(curthread); + sched_preempt(td); } if (ipi_bitmap & (1 << IPI_AST)) { #ifdef COUNT_IPIS @@ -1217,14 +1222,11 @@ ipi_bitmap_handler(struct trapframe fram #ifdef COUNT_IPIS (*ipi_hardclock_counts[cpu])++; #endif - hardclockintr(&frame); - } - if (ipi_bitmap & (1 << IPI_STATCLOCK)) { -#ifdef COUNT_IPIS - (*ipi_statclock_counts[cpu])++; -#endif - statclockintr(&frame); + hardclockintr(); } + td->td_intr_frame = oldframe; + td->td_intr_nesting_level--; + critical_exit(); } /* @@ -1579,8 +1581,6 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, &ipi_lazypmap_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:hardclock", i); intrcnt_add(buf, &ipi_hardclock_counts[i]); - snprintf(buf, sizeof(buf), "cpu%d:statclock", i); - intrcnt_add(buf, &ipi_statclock_counts[i]); } } SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ORDER_MIDDLE, mp_ipi_intrcnt, NULL); Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/amd64/include/apicvar.h Mon Sep 13 07:25:35 2010 (r212541) @@ -123,8 +123,7 @@ #define IPI_AST 0 /* Generate software trap. */ #define IPI_PREEMPT 1 #define IPI_HARDCLOCK 2 -#define IPI_STATCLOCK 3 -#define IPI_BITMAP_LAST IPI_STATCLOCK +#define IPI_BITMAP_LAST IPI_HARDCLOCK #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/dev/acpica/acpi_cpu.c Mon Sep 13 07:25:35 2010 (r212541) @@ -900,7 +900,13 @@ acpi_cpu_idle() /* Find the lowest state that has small enough latency. */ cx_next_idx = 0; - for (i = sc->cpu_cx_lowest; i >= 0; i--) { +#ifndef __ia64__ + if (cpu_disable_deep_sleep) + i = sc->cpu_non_c3; + else +#endif + i = sc->cpu_cx_lowest; + for (; i >= 0; i--) { if (sc->cpu_cx_states[i].trans_lat * 3 <= sc->cpu_prev_sleep) { cx_next_idx = i; break; @@ -929,15 +935,17 @@ acpi_cpu_idle() /* * Execute HLT (or equivalent) and wait for an interrupt. We can't * precisely calculate the time spent in C1 since the place we wake up - * is an ISR. Assume we slept no more then half of quantum. + * is an ISR. Assume we slept no more then half of quantum, unless + * we are called inside critical section, delaying context switch. */ if (cx_next->type == ACPI_STATE_C1) { AcpiHwRead(&start_time, &AcpiGbl_FADT.XPmTimerBlock); acpi_cpu_c1(); AcpiHwRead(&end_time, &AcpiGbl_FADT.XPmTimerBlock); - end_time = acpi_TimerDelta(end_time, start_time); - sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + - min(PM_USEC(end_time), 500000 / hz)) / 4; + end_time = PM_USEC(acpi_TimerDelta(end_time, start_time)); + if (curthread->td_critnest == 0) + end_time = min(end_time, 500000 / hz); + sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + end_time) / 4; return; } Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 07:25:35 2010 (r212541) @@ -683,15 +683,15 @@ hpet_detach(device_t dev) static int hpet_suspend(device_t dev) { - struct hpet_softc *sc; +// struct hpet_softc *sc; /* * Disable the timer during suspend. The timer will not lose * its state in S1 or S2, but we are required to disable * it. */ - sc = device_get_softc(dev); - hpet_disable(sc); +// sc = device_get_softc(dev); +// hpet_disable(sc); return (0); } Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/i386/i386/machdep.c Mon Sep 13 07:25:35 2010 (r212541) @@ -1175,9 +1175,6 @@ cpu_est_clockrate(int cpu_id, uint64_t * return (0); } - -void (*cpu_idle_hook)(void) = NULL; /* ACPI idle hook. */ - #ifdef XEN void @@ -1208,60 +1205,94 @@ cpu_halt(void) __asm__ ("hlt"); } +#endif + +void (*cpu_idle_hook)(void) = NULL; /* ACPI idle hook. */ +static int cpu_ident_amdc1e = 0; /* AMD C1E supported. */ +static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ +TUNABLE_INT("machdep.idle_mwait", &idle_mwait); +SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RW, &idle_mwait, + 0, "Use MONITOR/MWAIT for short idle"); + +#define STATE_RUNNING 0x0 +#define STATE_MWAIT 0x1 +#define STATE_SLEEPING 0x2 + static void -cpu_idle_hlt(int busy) +cpu_idle_acpi(int busy) { - /* - * we must absolutely guarentee that hlt is the next instruction - * after sti or we introduce a timing window. - */ + int *state; + + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_SLEEPING; disable_intr(); - if (sched_runnable()) + if (sched_runnable()) enable_intr(); + else if (cpu_idle_hook) + cpu_idle_hook(); else __asm __volatile("sti; hlt"); + *state = STATE_RUNNING; } -#endif +#ifndef XEN static void -cpu_idle_acpi(int busy) +cpu_idle_hlt(int busy) { + int *state; + + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_SLEEPING; + /* + * We must absolutely guarentee that hlt is the next instruction + * after sti or we introduce a timing window. + */ disable_intr(); - if (sched_runnable()) + if (sched_runnable()) enable_intr(); - else if (cpu_idle_hook) - cpu_idle_hook(); else __asm __volatile("sti; hlt"); + *state = STATE_RUNNING; } +#endif -static int cpu_ident_amdc1e = 0; +/* + * MWAIT cpu power states. Lower 4 bits are sub-states. + */ +#define MWAIT_C0 0xf0 +#define MWAIT_C1 0x00 +#define MWAIT_C2 0x10 +#define MWAIT_C3 0x20 +#define MWAIT_C4 0x30 -static int -cpu_probe_amdc1e(void) -{ -#ifdef DEV_APIC - int i; +static void +cpu_idle_mwait(int busy) +{ + int *state; - /* - * Forget it, if we're not using local APIC timer. - */ - if (resource_disabled("apic", 0) || - (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0)) - return (0); + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_MWAIT; + if (!sched_runnable()) { + cpu_monitor(state, 0, 0); + if (*state == STATE_MWAIT) + cpu_mwait(0, MWAIT_C1); + } + *state = STATE_RUNNING; +} - /* - * Detect the presence of C1E capability mostly on latest - * dual-cores (or future) k8 family. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - (cpu_id & 0x00000f00) == 0x00000f00 && - (cpu_id & 0x0fff0000) >= 0x00040000) { - cpu_ident_amdc1e = 1; - return (1); +static void +cpu_idle_spin(int busy) +{ + int *state; + int i; + + state = (int *)PCPU_PTR(monitorbuf); + *state = STATE_RUNNING; + for (i = 0; i < 1000; i++) { + if (sched_runnable()) + return; + cpu_spinwait(); } -#endif - return (0); } /* @@ -1279,32 +1310,20 @@ cpu_probe_amdc1e(void) #define AMDK8_CMPHALT (AMDK8_SMIONCMPHALT | AMDK8_C1EONCMPHALT) static void -cpu_idle_amdc1e(int busy) +cpu_probe_amdc1e(void) { - disable_intr(); - if (sched_runnable()) - enable_intr(); - else { - uint64_t msr; - - msr = rdmsr(MSR_AMDK8_IPM); - if (msr & AMDK8_CMPHALT) - wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); - - if (cpu_idle_hook) - cpu_idle_hook(); - else - __asm __volatile("sti; hlt"); + /* + * Detect the presence of C1E capability mostly on latest + * dual-cores (or future) k8 family. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + (cpu_id & 0x00000f00) == 0x00000f00 && + (cpu_id & 0x0fff0000) >= 0x00040000) { + cpu_ident_amdc1e = 1; } } -static void -cpu_idle_spin(int busy) -{ - return; -} - #ifdef XEN void (*cpu_idle_fn)(int) = cpu_idle_hlt; #else @@ -1314,79 +1333,72 @@ void (*cpu_idle_fn)(int) = cpu_idle_acpi void cpu_idle(int busy) { + uint64_t msr; + + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", + busy, curcpu); #if defined(SMP) && !defined(XEN) if (mp_grab_cpu_hlt()) return; #endif - cpu_idle_fn(busy); -} - -/* - * mwait cpu power states. Lower 4 bits are sub-states. - */ -#define MWAIT_C0 0xf0 -#define MWAIT_C1 0x00 -#define MWAIT_C2 0x10 -#define MWAIT_C3 0x20 -#define MWAIT_C4 0x30 - -#define MWAIT_DISABLED 0x0 -#define MWAIT_WOKEN 0x1 -#define MWAIT_WAITING 0x2 + /* If we are busy - try to use fast methods. */ + if (busy) { + if ((cpu_feature2 & CPUID2_MON) && idle_mwait) { + cpu_idle_mwait(busy); + goto out; + } + } -static void -cpu_idle_mwait(int busy) -{ - int *mwait; +#ifndef XEN + /* If we have time - switch timers into idle mode. */ + if (!busy) { + critical_enter(); + cpu_idleclock(); + } +#endif - mwait = (int *)PCPU_PTR(monitorbuf); - *mwait = MWAIT_WAITING; - if (sched_runnable()) - return; - cpu_monitor(mwait, 0, 0); - if (*mwait == MWAIT_WAITING) - cpu_mwait(0, MWAIT_C1); -} + /* Apply AMD APIC timer C1E workaround. */ + if (cpu_ident_amdc1e +#ifndef XEN + && cpu_disable_deep_sleep +#endif + ) { + msr = rdmsr(MSR_AMDK8_IPM); + if (msr & AMDK8_CMPHALT) + wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); + } -static void -cpu_idle_mwait_hlt(int busy) -{ - int *mwait; + /* Call main idle method. */ + cpu_idle_fn(busy); - mwait = (int *)PCPU_PTR(monitorbuf); - if (busy == 0) { - *mwait = MWAIT_DISABLED; - cpu_idle_hlt(busy); - return; +#ifndef XEN + /* Switch timers mack into active mode. */ + if (!busy) { + cpu_activeclock(); + critical_exit(); } - *mwait = MWAIT_WAITING; - if (sched_runnable()) - return; - cpu_monitor(mwait, 0, 0); - if (*mwait == MWAIT_WAITING) - cpu_mwait(0, MWAIT_C1); +#endif +out: + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", + busy, curcpu); } int cpu_idle_wakeup(int cpu) { struct pcpu *pcpu; - int *mwait; + int *state; - if (cpu_idle_fn == cpu_idle_spin) - return (1); - if (cpu_idle_fn != cpu_idle_mwait && cpu_idle_fn != cpu_idle_mwait_hlt) - return (0); pcpu = pcpu_find(cpu); - mwait = (int *)pcpu->pc_monitorbuf; + state = (int *)pcpu->pc_monitorbuf; /* * This doesn't need to be atomic since missing the race will * simply result in unnecessary IPIs. */ - if (cpu_idle_fn == cpu_idle_mwait_hlt && *mwait == MWAIT_DISABLED) + if (*state == STATE_SLEEPING) return (0); - *mwait = MWAIT_WOKEN; - + if (*state == STATE_MWAIT) + *state = STATE_RUNNING; return (1); } @@ -1399,8 +1411,6 @@ struct { } idle_tbl[] = { { cpu_idle_spin, "spin" }, { cpu_idle_mwait, "mwait" }, - { cpu_idle_mwait_hlt, "mwait_hlt" }, - { cpu_idle_amdc1e, "amdc1e" }, { cpu_idle_hlt, "hlt" }, { cpu_idle_acpi, "acpi" }, { NULL, NULL } @@ -1419,8 +1429,8 @@ idle_sysctl_available(SYSCTL_HANDLER_ARG if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; - if (strcmp(idle_tbl[i].id_name, "amdc1e") == 0 && - cpu_ident_amdc1e == 0) + if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && + cpu_idle_hook == NULL) continue; p += sprintf(p, "%s, ", idle_tbl[i].id_name); } @@ -1429,6 +1439,9 @@ idle_sysctl_available(SYSCTL_HANDLER_ARG return (error); } +SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, + 0, 0, idle_sysctl_available, "A", "list of available idle functions"); + static int idle_sysctl(SYSCTL_HANDLER_ARGS) { @@ -1452,8 +1465,8 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; - if (strcmp(idle_tbl[i].id_name, "amdc1e") == 0 && - cpu_ident_amdc1e == 0) + if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && + cpu_idle_hook == NULL) continue; if (strcmp(idle_tbl[i].id_name, buf)) continue; @@ -1463,9 +1476,6 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) return (EINVAL); } -SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, idle_sysctl_available, "A", "list of available idle functions"); - SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, idle_sysctl, "A", "currently selected idle function"); @@ -2695,8 +2705,7 @@ init386(first) thread0.td_pcb->pcb_fsd = PCPU_GET(fsgs_gdt)[0]; thread0.td_pcb->pcb_gsd = PCPU_GET(fsgs_gdt)[1]; - if (cpu_probe_amdc1e()) - cpu_idle_fn = cpu_idle_amdc1e; + cpu_probe_amdc1e(); } #else @@ -2970,8 +2979,7 @@ init386(first) thread0.td_pcb->pcb_ext = 0; thread0.td_frame = &proc0_tf; - if (cpu_probe_amdc1e()) - cpu_idle_fn = cpu_idle_amdc1e; + cpu_probe_amdc1e(); } #endif Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/i386/i386/mp_machdep.c Mon Sep 13 07:25:35 2010 (r212541) @@ -167,7 +167,6 @@ u_long *ipi_invlcache_counts[MAXCPU]; u_long *ipi_rendezvous_counts[MAXCPU]; u_long *ipi_lazypmap_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; -static u_long *ipi_statclock_counts[MAXCPU]; #endif /* @@ -1284,16 +1283,22 @@ smp_masked_invlpg_range(cpumask_t mask, void ipi_bitmap_handler(struct trapframe frame) { + struct trapframe *oldframe; + struct thread *td; int cpu = PCPU_GET(cpuid); u_int ipi_bitmap; + critical_enter(); + td = curthread; + td->td_intr_nesting_level++; + oldframe = td->td_intr_frame; + td->td_intr_frame = &frame; ipi_bitmap = atomic_readandclear_int(&cpu_ipi_pending[cpu]); - if (ipi_bitmap & (1 << IPI_PREEMPT)) { #ifdef COUNT_IPIS (*ipi_preempt_counts[cpu])++; #endif - sched_preempt(curthread); + sched_preempt(td); } if (ipi_bitmap & (1 << IPI_AST)) { #ifdef COUNT_IPIS @@ -1305,14 +1310,11 @@ ipi_bitmap_handler(struct trapframe fram #ifdef COUNT_IPIS (*ipi_hardclock_counts[cpu])++; #endif - hardclockintr(&frame); - } - if (ipi_bitmap & (1 << IPI_STATCLOCK)) { -#ifdef COUNT_IPIS - (*ipi_statclock_counts[cpu])++; -#endif - statclockintr(&frame); + hardclockintr(); } + td->td_intr_frame = oldframe; + td->td_intr_nesting_level--; + critical_exit(); } /* @@ -1627,8 +1629,6 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, &ipi_lazypmap_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:hardclock", i); intrcnt_add(buf, &ipi_hardclock_counts[i]); - snprintf(buf, sizeof(buf), "cpu%d:statclock", i); - intrcnt_add(buf, &ipi_statclock_counts[i]); } } SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ORDER_MIDDLE, mp_ipi_intrcnt, NULL); Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/i386/include/apicvar.h Mon Sep 13 07:25:35 2010 (r212541) @@ -124,8 +124,7 @@ #define IPI_AST 0 /* Generate software trap. */ #define IPI_PREEMPT 1 #define IPI_HARDCLOCK 2 -#define IPI_STATCLOCK 3 -#define IPI_BITMAP_LAST IPI_STATCLOCK +#define IPI_BITMAP_LAST IPI_HARDCLOCK #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ @@ -152,8 +151,7 @@ #define IPI_AST 0 /* Generate software trap. */ #define IPI_PREEMPT 1 #define IPI_HARDCLOCK 2 -#define IPI_STATCLOCK 3 -#define IPI_BITMAP_LAST IPI_STATCLOCK +#define IPI_BITMAP_LAST IPI_HARDCLOCK #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Mon Sep 13 07:22:14 2010 (r212540) +++ head/sys/kern/kern_clock.c Mon Sep 13 07:25:35 2010 (r212541) @@ -373,11 +373,9 @@ int profprocs; int ticks; int psratio; -int timer1hz; -int timer2hz; -static DPCPU_DEFINE(u_int, hard_cnt); -static DPCPU_DEFINE(u_int, stat_cnt); -static DPCPU_DEFINE(u_int, prof_cnt); +static DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */ +static struct mtx global_hardclock_mtx; +MTX_SYSINIT(global_hardclock_mtx, &global_hardclock_mtx, "ghc_mtx", MTX_SPIN); /* * Initialize clock frequencies and start both clocks running. @@ -408,52 +406,6 @@ initclocks(dummy) #endif } -void -timer1clock(int usermode, uintfptr_t pc) -{ - u_int *cnt; - - cnt = DPCPU_PTR(hard_cnt); - *cnt += hz; - if (*cnt >= timer1hz) { - *cnt -= timer1hz; - if (*cnt >= timer1hz) - *cnt = 0; - if (PCPU_GET(cpuid) == 0) - hardclock(usermode, pc); - else - hardclock_cpu(usermode); - } - if (timer2hz == 0) - timer2clock(usermode, pc); -} - -void -timer2clock(int usermode, uintfptr_t pc) -{ - u_int *cnt; - int t2hz = timer2hz ? timer2hz : timer1hz; - - cnt = DPCPU_PTR(stat_cnt); - *cnt += stathz; - if (*cnt >= t2hz) { - *cnt -= t2hz; - if (*cnt >= t2hz) - *cnt = 0; - statclock(usermode); - } - if (profprocs == 0) - return; - cnt = DPCPU_PTR(prof_cnt); - *cnt += profhz; - if (*cnt >= t2hz) { - *cnt -= t2hz; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:27:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9AF81065673; Mon, 13 Sep 2010 07:27:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FEFD8FC12; Mon, 13 Sep 2010 07:27:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D7R3f3073554; Mon, 13 Sep 2010 07:27:03 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D7R3WP073552; Mon, 13 Sep 2010 07:27:03 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130727.o8D7R3WP073552@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 07:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212542 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:27:03 -0000 Author: imp Date: Mon Sep 13 07:27:03 2010 New Revision: 212542 URL: http://svn.freebsd.org/changeset/base/212542 Log: Prefer MACHINE_CPUARCH over MACHINE_ARCH Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Sep 13 07:25:35 2010 (r212541) +++ head/sys/conf/kern.mk Mon Sep 13 07:27:03 2010 (r212542) @@ -29,7 +29,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # operations inside the kernel itself. These operations are exclusively # reserved for user applications. # -.if ${MACHINE_ARCH} == "i386" && ${CC:T:Micc} != "icc" +.if ${MACHINE_CPUARCH} == "i386" && ${CC:T:Micc} != "icc" .if ${CC:T:Mclang} != "clang" CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 .endif @@ -37,14 +37,14 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -m INLINE_LIMIT?= 8000 .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" INLINE_LIMIT?= 8000 .endif # # For IA-64, we use r13 for the kernel globals pointer and we only use # a very small subset of float registers for integer divides. # -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127 -fpic #-mno-sdata INLINE_LIMIT?= 15000 .endif @@ -54,7 +54,7 @@ INLINE_LIMIT?= 15000 # point emulation. This avoids using floating point registers for integer # operations which it has a tendency to do. # -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -mcmodel=medany -msoft-float INLINE_LIMIT?= 15000 .endif @@ -64,7 +64,7 @@ INLINE_LIMIT?= 15000 # operations inside the kernel itself. These operations are exclusively # reserved for user applications. # -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mcmodel=kernel -mno-red-zone \ -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow \ -msoft-float -fno-asynchronous-unwind-tables @@ -76,7 +76,7 @@ INLINE_LIMIT?= 8000 # floating point registers for integer operations which it has a tendency to do. # Also explicitly disable Altivec instructions inside the kernel. # -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -mno-altivec INLINE_LIMIT?= 15000 .endif @@ -84,7 +84,7 @@ INLINE_LIMIT?= 15000 # # For MIPS we also tell gcc to use floating point emulation # -.if ${MACHINE_ARCH} == "mips" +.if ${MACHINE_CPUARCH} == "mips" CFLAGS+= -msoft-float INLINE_LIMIT?= 8000 .endif @@ -106,8 +106,9 @@ CFLAGS+= -restrict # # GCC SSP support. # -.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && \ + ${MACHINE_CPUARCH} != "ia64" && ${MACHINE_CPUARCH} != "arm" && \ + ${MACHINE_CPUARCH} != "mips" CFLAGS+= -fstack-protector .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 07:29:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99D431065674; Mon, 13 Sep 2010 07:29:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EF2F8FC1C; Mon, 13 Sep 2010 07:29:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D7T2LC073717; Mon, 13 Sep 2010 07:29:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D7T2WA073714; Mon, 13 Sep 2010 07:29:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130729.o8D7T2WA073714@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 07:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212543 - in head/sys/modules: opensolaris zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:29:02 -0000 Author: imp Date: Mon Sep 13 07:29:02 2010 New Revision: 212543 URL: http://svn.freebsd.org/changeset/base/212543 Log: Simplify atomic selection Modified: head/sys/modules/opensolaris/Makefile head/sys/modules/zfs/Makefile Modified: head/sys/modules/opensolaris/Makefile ============================================================================== --- head/sys/modules/opensolaris/Makefile Mon Sep 13 07:27:03 2010 (r212542) +++ head/sys/modules/opensolaris/Makefile Mon Sep 13 07:29:02 2010 (r212543) @@ -8,8 +8,12 @@ SRCS= opensolaris.c \ opensolaris_kmem.c \ opensolaris_misc.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" -.PATH: ${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +_A=${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic +.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S) +.PATH: ${_A}/${MACHINE_CPUARCH} +SRCS+= opensolaris_atomic.S +.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S) +.PATH: ${_A}/${MACHINE_ARCH} SRCS+= opensolaris_atomic.S .else SRCS+= opensolaris_atomic.c Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Mon Sep 13 07:27:03 2010 (r212542) +++ head/sys/modules/zfs/Makefile Mon Sep 13 07:29:02 2010 (r212543) @@ -27,12 +27,15 @@ SRCS+= opensolaris_uio.c SRCS+= opensolaris_vfs.c SRCS+= opensolaris_zone.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" -.PATH: ${SUNW}/common/atomic/${MACHINE_ARCH} -SRCS+= opensolaris_atomic.S +_A=${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic +.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S) +.PATH: ${_A}/${MACHINE_CPUARCH} +SRCS+= opensolaris_atomic.S +.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S) +.PATH: ${_A}/${MACHINE_ARCH} +SRCS+= opensolaris_atomic.S .else -.PATH: ${.CURDIR}/../../cddl/compat/opensolaris/kern -SRCS+= opensolaris_atomic.c +SRCS+= opensolaris_atomic.c .endif .PATH: ${SUNW}/uts/common/fs From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 08:34:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 555BD1065670; Mon, 13 Sep 2010 08:34:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 145AA8FC0C; Mon, 13 Sep 2010 08:34:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D8YKoA079018; Mon, 13 Sep 2010 08:34:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D8YKTr079016; Mon, 13 Sep 2010 08:34:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009130834.o8D8YKTr079016@svn.freebsd.org> From: Andriy Gapon Date: Mon, 13 Sep 2010 08:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 08:34:21 -0000 Author: avg Date: Mon Sep 13 08:34:20 2010 New Revision: 212544 URL: http://svn.freebsd.org/changeset/base/212544 Log: bus_add_child: add specialized default implementation that calls panic If a kobj method doesn't have any explicitly provided default implementation, then it is auto-assigned kobj_error_method. kobj_error_method is proper only for methods that return error code, because it just returns ENXIO. So, in the case of unimplemented bus_add_child caller would get (device_t)ENXIO as a return value, which would cause the mistake to go unnoticed, because return value is typically checked for NULL. Thus, a specialized null_add_child is added. It would have sufficied for correctness to return NULL, but this type of mistake was deemed to be rare and serious enough to call panic instead. Watch out for this kind of problem with other kobj methods. Suggested by: jhb, imp MFC after: 2 weeks Modified: head/sys/kern/bus_if.m Modified: head/sys/kern/bus_if.m ============================================================================== --- head/sys/kern/bus_if.m Mon Sep 13 07:29:02 2010 (r212543) +++ head/sys/kern/bus_if.m Mon Sep 13 08:34:20 2010 (r212544) @@ -26,6 +26,8 @@ # $FreeBSD$ # +#include +#include #include /** @@ -56,6 +58,14 @@ CODE { return (BUS_REMAP_INTR(dev, NULL, irq)); return (ENXIO); } + + static device_t + null_add_child(device_t bus, int order, const char *name, + int unit) + { + + panic("bus_add_child is not implemented"); + } }; /** @@ -203,7 +213,7 @@ METHOD device_t add_child { u_int _order; const char *_name; int _unit; -}; +} DEFAULT null_add_child; /** * @brief Allocate a system resource From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 08:49:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387D2106566B; Mon, 13 Sep 2010 08:49:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 270CD8FC16; Mon, 13 Sep 2010 08:49:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D8n9FJ080164; Mon, 13 Sep 2010 08:49:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D8n9Ze080162; Mon, 13 Sep 2010 08:49:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009130849.o8D8n9Ze080162@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 13 Sep 2010 08:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212545 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 08:49:09 -0000 Author: kib Date: Mon Sep 13 08:49:08 2010 New Revision: 212545 URL: http://svn.freebsd.org/changeset/base/212545 Log: MFC r211998: Make the syscalls reserved for AFS usable by OpenAFS port. The 'NOTSTATIC' flag is removed on merge, since corresponding functionality is not implemented in the RELENG_8. Modified: stable/8/sys/kern/syscalls.master Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/syscalls.master ============================================================================== --- stable/8/sys/kern/syscalls.master Mon Sep 13 08:34:20 2010 (r212544) +++ stable/8/sys/kern/syscalls.master Mon Sep 13 08:49:08 2010 (r212545) @@ -595,7 +595,9 @@ 337 AUE_NULL STD { int kldsym(int fileid, int cmd, \ void *data); } 338 AUE_JAIL STD { int jail(struct jail *jail); } -339 AUE_NULL UNIMPL pioctl +339 AUE_NULL NOSTD { int nnpfs_syscall(int operation, \ + char *a_pathP, int a_opcode, \ + void *a_paramsP, int a_followSymlinks); } 340 AUE_SIGPROCMASK STD { int sigprocmask(int how, \ const sigset_t *set, sigset_t *oset); } 341 AUE_SIGSUSPEND STD { int sigsuspend(const sigset_t *sigmask); } @@ -671,7 +673,9 @@ 374 AUE_NULL STD { int __setugid(int flag); } 375 AUE_NULL UNIMPL nfsclnt 376 AUE_EACCESS STD { int eaccess(char *path, int flags); } -377 AUE_NULL UNIMPL afs_syscall +377 AUE_NULL NOSTD { int afs3_syscall(long syscall, \ + long parm1, long parm2, long parm3, \ + long parm4, long parm5, long parm6); } 378 AUE_NMOUNT STD { int nmount(struct iovec *iovp, \ unsigned int iovcnt, int flags); } 379 AUE_NULL UNIMPL kse_exit From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 08:49:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15605106564A; Mon, 13 Sep 2010 08:49:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED3408FC0A; Mon, 13 Sep 2010 08:49:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D8npqE080251; Mon, 13 Sep 2010 08:49:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D8np5P080243; Mon, 13 Sep 2010 08:49:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009130849.o8D8np5P080243@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 13 Sep 2010 08:49:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212546 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 08:49:52 -0000 Author: kib Date: Mon Sep 13 08:49:51 2010 New Revision: 212546 URL: http://svn.freebsd.org/changeset/base/212546 Log: Regen Modified: stable/8/sys/kern/init_sysent.c stable/8/sys/kern/syscalls.c stable/8/sys/kern/systrace_args.c stable/8/sys/sys/syscall.h stable/8/sys/sys/syscall.mk stable/8/sys/sys/sysproto.h Modified: stable/8/sys/kern/init_sysent.c ============================================================================== --- stable/8/sys/kern/init_sysent.c Mon Sep 13 08:49:08 2010 (r212545) +++ stable/8/sys/kern/init_sysent.c Mon Sep 13 08:49:51 2010 (r212546) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/kern/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/kern/syscalls.master 212545 2010-09-13 08:49:08Z kib */ #include "opt_compat.h" @@ -373,7 +373,7 @@ struct sysent sysent[] = { { compat4(AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE, NULL, 0, 0, 0 }, /* 336 = freebsd4 sendfile */ { AS(kldsym_args), (sy_call_t *)kldsym, AUE_NULL, NULL, 0, 0, 0 }, /* 337 = kldsym */ { AS(jail_args), (sy_call_t *)jail, AUE_JAIL, NULL, 0, 0, 0 }, /* 338 = jail */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 339 = pioctl */ + { AS(nnpfs_syscall_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 339 = nnpfs_syscall */ { AS(sigprocmask_args), (sy_call_t *)sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, 0 }, /* 340 = sigprocmask */ { AS(sigsuspend_args), (sy_call_t *)sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0, 0 }, /* 341 = sigsuspend */ { compat4(AS(freebsd4_sigaction_args),sigaction), AUE_SIGACTION, NULL, 0, 0, 0 }, /* 342 = freebsd4 sigaction */ @@ -411,7 +411,7 @@ struct sysent sysent[] = { { AS(__setugid_args), (sy_call_t *)__setugid, AUE_NULL, NULL, 0, 0, 0 }, /* 374 = __setugid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 375 = nfsclnt */ { AS(eaccess_args), (sy_call_t *)eaccess, AUE_EACCESS, NULL, 0, 0, 0 }, /* 376 = eaccess */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 377 = afs_syscall */ + { AS(afs3_syscall_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 377 = afs3_syscall */ { AS(nmount_args), (sy_call_t *)nmount, AUE_NMOUNT, NULL, 0, 0, 0 }, /* 378 = nmount */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 379 = kse_exit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 380 = kse_wakeup */ Modified: stable/8/sys/kern/syscalls.c ============================================================================== --- stable/8/sys/kern/syscalls.c Mon Sep 13 08:49:08 2010 (r212545) +++ stable/8/sys/kern/syscalls.c Mon Sep 13 08:49:51 2010 (r212546) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/kern/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/kern/syscalls.master 212545 2010-09-13 08:49:08Z kib */ const char *syscallnames[] = { @@ -346,7 +346,7 @@ const char *syscallnames[] = { "compat4.sendfile", /* 336 = freebsd4 sendfile */ "kldsym", /* 337 = kldsym */ "jail", /* 338 = jail */ - "#339", /* 339 = pioctl */ + "nnpfs_syscall", /* 339 = nnpfs_syscall */ "sigprocmask", /* 340 = sigprocmask */ "sigsuspend", /* 341 = sigsuspend */ "compat4.sigaction", /* 342 = freebsd4 sigaction */ @@ -384,7 +384,7 @@ const char *syscallnames[] = { "__setugid", /* 374 = __setugid */ "#375", /* 375 = nfsclnt */ "eaccess", /* 376 = eaccess */ - "#377", /* 377 = afs_syscall */ + "afs3_syscall", /* 377 = afs3_syscall */ "nmount", /* 378 = nmount */ "#379", /* 379 = kse_exit */ "#380", /* 380 = kse_wakeup */ Modified: stable/8/sys/kern/systrace_args.c ============================================================================== --- stable/8/sys/kern/systrace_args.c Mon Sep 13 08:49:08 2010 (r212545) +++ stable/8/sys/kern/systrace_args.c Mon Sep 13 08:49:51 2010 (r212546) @@ -1770,6 +1770,17 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } + /* nnpfs_syscall */ + case 339: { + struct nnpfs_syscall_args *p = params; + iarg[0] = p->operation; /* int */ + uarg[1] = (intptr_t) p->a_pathP; /* char * */ + iarg[2] = p->a_opcode; /* int */ + uarg[3] = (intptr_t) p->a_paramsP; /* void * */ + iarg[4] = p->a_followSymlinks; /* int */ + *n_args = 5; + break; + } /* sigprocmask */ case 340: { struct sigprocmask_args *p = params; @@ -2011,6 +2022,19 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } + /* afs3_syscall */ + case 377: { + struct afs3_syscall_args *p = params; + iarg[0] = p->syscall; /* long */ + iarg[1] = p->parm1; /* long */ + iarg[2] = p->parm2; /* long */ + iarg[3] = p->parm3; /* long */ + iarg[4] = p->parm4; /* long */ + iarg[5] = p->parm5; /* long */ + iarg[6] = p->parm6; /* long */ + *n_args = 7; + break; + } /* nmount */ case 378: { struct nmount_args *p = params; @@ -5900,6 +5924,28 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; + /* nnpfs_syscall */ + case 339: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "void *"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; /* sigprocmask */ case 340: switch(ndx) { @@ -6325,6 +6371,34 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; + /* afs3_syscall */ + case 377: + switch(ndx) { + case 0: + p = "long"; + break; + case 1: + p = "long"; + break; + case 2: + p = "long"; + break; + case 3: + p = "long"; + break; + case 4: + p = "long"; + break; + case 5: + p = "long"; + break; + case 6: + p = "long"; + break; + default: + break; + }; + break; /* nmount */ case 378: switch(ndx) { Modified: stable/8/sys/sys/syscall.h ============================================================================== --- stable/8/sys/sys/syscall.h Mon Sep 13 08:49:08 2010 (r212545) +++ stable/8/sys/sys/syscall.h Mon Sep 13 08:49:51 2010 (r212546) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/kern/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/kern/syscalls.master 212545 2010-09-13 08:49:08Z kib */ #define SYS_syscall 0 @@ -277,6 +277,7 @@ #define SYS_freebsd4_sendfile 336 #define SYS_kldsym 337 #define SYS_jail 338 +#define SYS_nnpfs_syscall 339 #define SYS_sigprocmask 340 #define SYS_sigsuspend 341 #define SYS_freebsd4_sigaction 342 @@ -306,6 +307,7 @@ #define SYS_extattr_delete_fd 373 #define SYS___setugid 374 #define SYS_eaccess 376 +#define SYS_afs3_syscall 377 #define SYS_nmount 378 #define SYS___mac_get_proc 384 #define SYS___mac_set_proc 385 Modified: stable/8/sys/sys/syscall.mk ============================================================================== --- stable/8/sys/sys/syscall.mk Mon Sep 13 08:49:08 2010 (r212545) +++ stable/8/sys/sys/syscall.mk Mon Sep 13 08:49:51 2010 (r212546) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/8/sys/kern/syscalls.master 200725 2009-12-19 11:47:00Z kib +# created from FreeBSD: stable/8/sys/kern/syscalls.master 212545 2010-09-13 08:49:08Z kib MIASM = \ syscall.o \ exit.o \ @@ -226,6 +226,7 @@ MIASM = \ freebsd4_sendfile.o \ kldsym.o \ jail.o \ + nnpfs_syscall.o \ sigprocmask.o \ sigsuspend.o \ freebsd4_sigaction.o \ @@ -255,6 +256,7 @@ MIASM = \ extattr_delete_fd.o \ __setugid.o \ eaccess.o \ + afs3_syscall.o \ nmount.o \ __mac_get_proc.o \ __mac_set_proc.o \ Modified: stable/8/sys/sys/sysproto.h ============================================================================== --- stable/8/sys/sys/sysproto.h Mon Sep 13 08:49:08 2010 (r212545) +++ stable/8/sys/sys/sysproto.h Mon Sep 13 08:49:51 2010 (r212546) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/kern/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/kern/syscalls.master 212545 2010-09-13 08:49:08Z kib */ #ifndef _SYS_SYSPROTO_H_ @@ -933,6 +933,13 @@ struct kldsym_args { struct jail_args { char jail_l_[PADL_(struct jail *)]; struct jail * jail; char jail_r_[PADR_(struct jail *)]; }; +struct nnpfs_syscall_args { + char operation_l_[PADL_(int)]; int operation; char operation_r_[PADR_(int)]; + char a_pathP_l_[PADL_(char *)]; char * a_pathP; char a_pathP_r_[PADR_(char *)]; + char a_opcode_l_[PADL_(int)]; int a_opcode; char a_opcode_r_[PADR_(int)]; + char a_paramsP_l_[PADL_(void *)]; void * a_paramsP; char a_paramsP_r_[PADR_(void *)]; + char a_followSymlinks_l_[PADL_(int)]; int a_followSymlinks; char a_followSymlinks_r_[PADR_(int)]; +}; struct sigprocmask_args { char how_l_[PADL_(int)]; int how; char how_r_[PADR_(int)]; char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; @@ -1068,6 +1075,15 @@ struct eaccess_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct afs3_syscall_args { + char syscall_l_[PADL_(long)]; long syscall; char syscall_r_[PADR_(long)]; + char parm1_l_[PADL_(long)]; long parm1; char parm1_r_[PADR_(long)]; + char parm2_l_[PADL_(long)]; long parm2; char parm2_r_[PADR_(long)]; + char parm3_l_[PADL_(long)]; long parm3; char parm3_r_[PADR_(long)]; + char parm4_l_[PADL_(long)]; long parm4; char parm4_r_[PADR_(long)]; + char parm5_l_[PADL_(long)]; long parm5; char parm5_r_[PADR_(long)]; + char parm6_l_[PADL_(long)]; long parm6; char parm6_r_[PADR_(long)]; +}; struct nmount_args { char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)]; char iovcnt_l_[PADL_(unsigned int)]; unsigned int iovcnt; char iovcnt_r_[PADR_(unsigned int)]; @@ -1858,6 +1874,7 @@ int sched_rr_get_interval(struct thread int utrace(struct thread *, struct utrace_args *); int kldsym(struct thread *, struct kldsym_args *); int jail(struct thread *, struct jail_args *); +int nnpfs_syscall(struct thread *, struct nnpfs_syscall_args *); int sigprocmask(struct thread *, struct sigprocmask_args *); int sigsuspend(struct thread *, struct sigsuspend_args *); int sigpending(struct thread *, struct sigpending_args *); @@ -1885,6 +1902,7 @@ int extattr_get_fd(struct thread *, stru int extattr_delete_fd(struct thread *, struct extattr_delete_fd_args *); int __setugid(struct thread *, struct __setugid_args *); int eaccess(struct thread *, struct eaccess_args *); +int afs3_syscall(struct thread *, struct afs3_syscall_args *); int nmount(struct thread *, struct nmount_args *); int __mac_get_proc(struct thread *, struct __mac_get_proc_args *); int __mac_set_proc(struct thread *, struct __mac_set_proc_args *); @@ -2529,6 +2547,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_freebsd4_sendfile AUE_SENDFILE #define SYS_AUE_kldsym AUE_NULL #define SYS_AUE_jail AUE_JAIL +#define SYS_AUE_nnpfs_syscall AUE_NULL #define SYS_AUE_sigprocmask AUE_SIGPROCMASK #define SYS_AUE_sigsuspend AUE_SIGSUSPEND #define SYS_AUE_freebsd4_sigaction AUE_SIGACTION @@ -2558,6 +2577,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_extattr_delete_fd AUE_EXTATTR_DELETE_FD #define SYS_AUE___setugid AUE_NULL #define SYS_AUE_eaccess AUE_EACCESS +#define SYS_AUE_afs3_syscall AUE_NULL #define SYS_AUE_nmount AUE_NMOUNT #define SYS_AUE___mac_get_proc AUE_NULL #define SYS_AUE___mac_set_proc AUE_NULL From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 08:56:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65FBA106566C; Mon, 13 Sep 2010 08:56:07 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51C218FC18; Mon, 13 Sep 2010 08:56:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D8u7qe080934; Mon, 13 Sep 2010 08:56:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D8u7iB080925; Mon, 13 Sep 2010 08:56:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009130856.o8D8u7iB080925@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 13 Sep 2010 08:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212547 - in head: sbin/geom/class/eli sbin/geom/class/mirror sbin/geom/class/part sbin/geom/class/sched sbin/geom/core sys/geom/eli sys/geom/mirror X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 08:56:07 -0000 Author: pjd Date: Mon Sep 13 08:56:07 2010 New Revision: 212547 URL: http://svn.freebsd.org/changeset/base/212547 Log: - Allow to specify value as const pointers. - Make optional string values always an empty string. Modified: head/sbin/geom/class/eli/geom_eli.c head/sbin/geom/class/mirror/geom_mirror.c head/sbin/geom/class/part/geom_part.c head/sbin/geom/class/sched/geom_sched.c head/sbin/geom/core/geom.c head/sbin/geom/core/geom.h head/sys/geom/eli/g_eli_ctl.c head/sys/geom/mirror/g_mirror_ctl.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Mon Sep 13 08:49:51 2010 (r212546) +++ head/sbin/geom/class/eli/geom_eli.c Mon Sep 13 08:56:07 2010 (r212547) @@ -55,15 +55,12 @@ uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_ELI_VERSION; #define GELI_BACKUP_DIR "/var/backups/" +#define GELI_ENC_ALGO "aes" -static char aalgo[] = "none"; -static char ealgo[] = "aes"; static intmax_t keylen = 0; static intmax_t keyno = -1; static intmax_t iterations = -1; static intmax_t sectorsize = 0; -static char keyfile[] = "", newkeyfile[] = ""; -static char backupfile[] = ""; static void eli_main(struct gctl_req *req, unsigned flags); static void eli_init(struct gctl_req *req); @@ -101,12 +98,12 @@ static int eli_backup_create(struct gctl struct g_command class_commands[] = { { "init", G_FLAG_VERBOSE, eli_main, { - { 'a', "aalgo", aalgo, G_TYPE_STRING }, + { 'a', "aalgo", "", G_TYPE_STRING }, { 'b', "boot", NULL, G_TYPE_BOOL }, - { 'B', "backupfile", backupfile, G_TYPE_STRING }, - { 'e', "ealgo", ealgo, G_TYPE_STRING }, + { 'B', "backupfile", "", G_TYPE_STRING }, + { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, { 'i', "iterations", &iterations, G_TYPE_NUMBER }, - { 'K', "newkeyfile", newkeyfile, G_TYPE_STRING }, + { 'K', "newkeyfile", "", G_TYPE_STRING }, { 'l', "keylen", &keylen, G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, @@ -116,12 +113,12 @@ struct g_command class_commands[] = { }, { "label", G_FLAG_VERBOSE, eli_main, { - { 'a', "aalgo", aalgo, G_TYPE_STRING }, + { 'a', "aalgo", "", G_TYPE_STRING }, { 'b', "boot", NULL, G_TYPE_BOOL }, - { 'B', "backupfile", backupfile, G_TYPE_STRING }, - { 'e', "ealgo", ealgo, G_TYPE_STRING }, + { 'B', "backupfile", "", G_TYPE_STRING }, + { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, { 'i', "iterations", &iterations, G_TYPE_NUMBER }, - { 'K', "newkeyfile", newkeyfile, G_TYPE_STRING }, + { 'K', "newkeyfile", "", G_TYPE_STRING }, { 'l', "keylen", &keylen, G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, @@ -132,7 +129,7 @@ struct g_command class_commands[] = { { "attach", G_FLAG_VERBOSE | G_FLAG_LOADKLD, eli_main, { { 'd', "detach", NULL, G_TYPE_BOOL }, - { 'k', "keyfile", keyfile, G_TYPE_STRING }, + { 'k', "keyfile", "", G_TYPE_STRING }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'r', "readonly", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL @@ -157,9 +154,9 @@ struct g_command class_commands[] = { }, { "onetime", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { - { 'a', "aalgo", aalgo, G_TYPE_STRING }, + { 'a', "aalgo", "", G_TYPE_STRING }, { 'd', "detach", NULL, G_TYPE_BOOL }, - { 'e', "ealgo", ealgo, G_TYPE_STRING }, + { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, { 'l', "keylen", &keylen, G_TYPE_NUMBER }, { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, G_OPT_SENTINEL @@ -177,8 +174,8 @@ struct g_command class_commands[] = { { "setkey", G_FLAG_VERBOSE, eli_main, { { 'i', "iterations", &iterations, G_TYPE_NUMBER }, - { 'k', "keyfile", keyfile, G_TYPE_STRING }, - { 'K', "newkeyfile", newkeyfile, G_TYPE_STRING }, + { 'k', "keyfile", "", G_TYPE_STRING }, + { 'K', "newkeyfile", "", G_TYPE_STRING }, { 'n', "keyno", &keyno, G_TYPE_NUMBER }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, @@ -551,7 +548,7 @@ eli_init(struct gctl_req *req) md.md_flags |= G_ELI_FLAG_BOOT; md.md_ealgo = CRYPTO_ALGORITHM_MIN - 1; str = gctl_get_ascii(req, "aalgo"); - if (strcmp(str, "none") != 0) { + if (*str != '\0') { md.md_aalgo = g_eli_str2aalgo(str); if (md.md_aalgo >= CRYPTO_ALGORITHM_MIN && md.md_aalgo <= CRYPTO_ALGORITHM_MAX) { Modified: head/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- head/sbin/geom/class/mirror/geom_mirror.c Mon Sep 13 08:49:51 2010 (r212546) +++ head/sbin/geom/class/mirror/geom_mirror.c Mon Sep 13 08:56:07 2010 (r212547) @@ -44,7 +44,8 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_MIRROR_VERSION; -static char label_balance[] = "load", configure_balance[] = "none"; +#define GMIRROR_BALANCE "load" + static intmax_t label_slice = 4096, configure_slice = -1; static intmax_t insert_priority = 0, configure_priority = -1; @@ -64,7 +65,7 @@ struct g_command class_commands[] = { { "configure", G_FLAG_VERBOSE, NULL, { { 'a', "autosync", NULL, G_TYPE_BOOL }, - { 'b', "balance", configure_balance, G_TYPE_STRING }, + { 'b', "balance", "", G_TYPE_STRING }, { 'd', "dynamic", NULL, G_TYPE_BOOL }, { 'f', "failsync", NULL, G_TYPE_BOOL }, { 'F', "nofailsync", NULL, G_TYPE_BOOL }, @@ -88,7 +89,7 @@ struct g_command class_commands[] = { }, { "label", G_FLAG_VERBOSE, mirror_main, { - { 'b', "balance", label_balance, G_TYPE_STRING }, + { 'b', "balance", GMIRROR_BALANCE, G_TYPE_STRING }, { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Mon Sep 13 08:49:51 2010 (r212546) +++ head/sbin/geom/class/part/geom_part.c Mon Sep 13 08:56:07 2010 (r212547) @@ -59,7 +59,6 @@ uint32_t PUBSYM(lib_version) = G_LIB_VER uint32_t PUBSYM(version) = 0; static char autofill[] = "*"; -static char optional[] = ""; static char flags[] = "C"; static char sstart[32]; @@ -91,16 +90,16 @@ struct g_command PUBSYM(class_commands)[ { 'b', "start", autofill, G_TYPE_STRING }, { 's', "size", autofill, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, - { 'i', index_param, optional, G_TYPE_ASCNUM }, - { 'l', "label", optional, G_TYPE_STRING }, + { 'i', index_param, "", G_TYPE_ASCNUM }, + { 'l', "label", "", G_TYPE_STRING }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "geom", NULL }, { "bootcode", 0, gpart_bootcode, { - { 'b', bootcode_param, optional, G_TYPE_STRING }, - { 'p', partcode_param, optional, G_TYPE_STRING }, - { 'i', index_param, optional, G_TYPE_ASCNUM }, + { 'b', bootcode_param, "", G_TYPE_STRING }, + { 'p', partcode_param, "", G_TYPE_STRING }, + { 'i', index_param, "", G_TYPE_ASCNUM }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "geom", NULL @@ -108,7 +107,7 @@ struct g_command PUBSYM(class_commands)[ { "commit", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, { "create", 0, gpart_issue, { { 's', "scheme", NULL, G_TYPE_STRING }, - { 'n', "entries", optional, G_TYPE_ASCNUM }, + { 'n', "entries", "", G_TYPE_ASCNUM }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "provider", NULL @@ -125,8 +124,8 @@ struct g_command PUBSYM(class_commands)[ "geom", NULL }, { "modify", 0, gpart_issue, { { 'i', index_param, NULL, G_TYPE_ASCNUM }, - { 'l', "label", optional, G_TYPE_STRING }, - { 't', "type", optional, G_TYPE_STRING }, + { 'l', "label", "", G_TYPE_STRING }, + { 't', "type", "", G_TYPE_STRING }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "geom", NULL Modified: head/sbin/geom/class/sched/geom_sched.c ============================================================================== --- head/sbin/geom/class/sched/geom_sched.c Mon Sep 13 08:49:51 2010 (r212546) +++ head/sbin/geom/class/sched/geom_sched.c Mon Sep 13 08:56:07 2010 (r212547) @@ -54,7 +54,7 @@ uint32_t version = G_SCHED_VERSION; * storage for parameters used by this geom class. * Right now only the scheduler name is used. */ -static char algo[] = "rr"; /* default scheduler */ +#define GSCHED_ALGO "rr" /* default scheduler */ /* * Adapt to differences in geom library. @@ -76,7 +76,7 @@ gcmd_createinsert(struct gctl_req *req, if (gctl_has_param(req, "algo")) reqalgo = gctl_get_ascii(req, "algo"); else - reqalgo = algo; + reqalgo = GSCHED_ALGO; snprintf(name, sizeof(name), "gsched_%s", reqalgo); /* @@ -91,21 +91,21 @@ gcmd_createinsert(struct gctl_req *req, struct g_command class_commands[] = { { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, gcmd_createinsert, { - { 'a', "algo", algo, G_TYPE_STRING }, + { 'a', "algo", GSCHED_ALGO, G_TYPE_STRING }, G_OPT_SENTINEL }, G_ARGNAME "[-v] [-a algorithm_name] dev ..." }, { "insert", G_FLAG_VERBOSE | G_FLAG_LOADKLD, gcmd_createinsert, { - { 'a', "algo", algo, G_TYPE_STRING }, + { 'a', "algo", GSCHED_ALGO, G_TYPE_STRING }, G_OPT_SENTINEL }, G_ARGNAME "[-v] [-a algorithm_name] dev ..." }, { "configure", G_FLAG_VERBOSE, NULL, { - { 'a', "algo", algo, G_TYPE_STRING }, + { 'a', "algo", GSCHED_ALGO, G_TYPE_STRING }, G_OPT_SENTINEL }, G_ARGNAME "[-v] [-a algorithm_name] prov ..." Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Mon Sep 13 08:49:51 2010 (r212546) +++ head/sbin/geom/core/geom.c Mon Sep 13 08:56:07 2010 (r212547) @@ -236,8 +236,8 @@ find_option(struct g_command *cmd, char static void set_option(struct gctl_req *req, struct g_option *opt, const char *val) { - char *s; uint64_t number; + void *ptr; if (G_OPT_TYPE(opt) == G_TYPE_NUMBER || G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { @@ -245,27 +245,29 @@ set_option(struct gctl_req *req, struct err(EXIT_FAILURE, "Invalid value for '%c' argument.", opt->go_char); } - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) - opt->go_val = malloc(sizeof(intmax_t)); - else { - asprintf(&s, "%jd", number); - opt->go_val = s; - } - if (opt->go_val == NULL) - errx(EXIT_FAILURE, "No memory."); if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { - *(intmax_t *)opt->go_val = number; + ptr = malloc(sizeof(intmax_t)); + if (ptr == NULL) + errx(EXIT_FAILURE, "No memory."); + *(intmax_t *)ptr = number; + opt->go_val = ptr; gctl_ro_param(req, opt->go_name, sizeof(intmax_t), opt->go_val); - } else + } else { + asprintf((void *)(&ptr), "%jd", number); + if (ptr == NULL) + errx(EXIT_FAILURE, "No memory."); + opt->go_val = ptr; gctl_ro_param(req, opt->go_name, -1, opt->go_val); + } } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { gctl_ro_param(req, opt->go_name, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { - opt->go_val = malloc(sizeof(int)); - if (opt->go_val == NULL) + ptr = malloc(sizeof(int)); + if (ptr == NULL) errx(EXIT_FAILURE, "No memory."); - *(int *)opt->go_val = *val - '0'; + *(int *)ptr = *val - '0'; + opt->go_val = ptr; gctl_ro_param(req, opt->go_name, sizeof(int), opt->go_val); } else { assert(!"Invalid type"); @@ -354,7 +356,7 @@ parse_arguments(struct g_command *cmd, s G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { if (cmd->gc_argname == NULL || opt->go_val == NULL || - *(char *)opt->go_val != '\0') + *(const char *)opt->go_val != '\0') gctl_ro_param(req, opt->go_name, -1, opt->go_val); } else { Modified: head/sbin/geom/core/geom.h ============================================================================== --- head/sbin/geom/core/geom.h Mon Sep 13 08:49:51 2010 (r212546) +++ head/sbin/geom/core/geom.h Mon Sep 13 08:56:07 2010 (r212547) @@ -54,7 +54,7 @@ struct g_option { char go_char; const char *go_name; - void *go_val; + const void *go_val; unsigned go_type; }; Modified: head/sys/geom/eli/g_eli_ctl.c ============================================================================== --- head/sys/geom/eli/g_eli_ctl.c Mon Sep 13 08:49:51 2010 (r212546) +++ head/sys/geom/eli/g_eli_ctl.c Mon Sep 13 08:56:07 2010 (r212547) @@ -269,7 +269,7 @@ g_eli_ctl_onetime(struct gctl_req *req, gctl_error(req, "No '%s' argument.", "aalgo"); return; } - if (strcmp(name, "none") != 0) { + if (*name != '\0') { md.md_aalgo = g_eli_str2aalgo(name); if (md.md_aalgo >= CRYPTO_ALGORITHM_MIN && md.md_aalgo <= CRYPTO_ALGORITHM_MAX) { Modified: head/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- head/sys/geom/mirror/g_mirror_ctl.c Mon Sep 13 08:49:51 2010 (r212546) +++ head/sys/geom/mirror/g_mirror_ctl.c Mon Sep 13 08:56:07 2010 (r212547) @@ -192,7 +192,7 @@ g_mirror_ctl_configure(struct gctl_req * gctl_error(req, "No such device: %s.", name); return; } - if (strcmp(balancep, "none") == 0) + if (*balancep == '\0') balance = sc->sc_balance; else { if (balance_id(balancep) == -1) { @@ -215,7 +215,7 @@ g_mirror_ctl_configure(struct gctl_req * /* Enforce usage() of -p not allowing any other options. */ if (do_priority && (*autosync || *noautosync || *failsync || *nofailsync || *hardcode || *dynamic || *slicep != -1 || - strcmp(balancep, "none") != 0)) { + *balancep != '\0')) { sx_xunlock(&sc->sc_lock); gctl_error(req, "only -p accepted when setting priority"); return; From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 09:23:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B78BD106564A; Mon, 13 Sep 2010 09:23:38 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A71498FC12; Mon, 13 Sep 2010 09:23:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D9NcIL083035; Mon, 13 Sep 2010 09:23:38 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D9Ncxw083033; Mon, 13 Sep 2010 09:23:38 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009130923.o8D9Ncxw083033@svn.freebsd.org> From: David Xu Date: Mon, 13 Sep 2010 09:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212548 - head/lib/libthr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 09:23:38 -0000 Author: davidxu Date: Mon Sep 13 09:23:38 2010 New Revision: 212548 URL: http://svn.freebsd.org/changeset/base/212548 Log: Update symbol. Modified: head/lib/libthr/pthread.map Modified: head/lib/libthr/pthread.map ============================================================================== --- head/lib/libthr/pthread.map Mon Sep 13 08:56:07 2010 (r212547) +++ head/lib/libthr/pthread.map Mon Sep 13 09:23:38 2010 (r212548) @@ -173,6 +173,7 @@ FBSDprivate_1.0 { ___creat; ___pause; ___pselect; + ___sigwait; ___sleep; ___system; ___tcdrain; @@ -206,7 +207,6 @@ FBSDprivate_1.0 { __sendto; __sigsuspend; __sigtimedwait; - __sigwait; __sigwaitinfo; __wait3; __wait4; From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 09:25:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA045106566C; Mon, 13 Sep 2010 09:25:55 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 7A2648FC15; Mon, 13 Sep 2010 09:25:55 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 0587745C9C; Mon, 13 Sep 2010 11:25:54 +0200 (CEST) Received: from localhost (pdawidek.whl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 32FD945683; Mon, 13 Sep 2010 11:25:49 +0200 (CEST) Date: Mon, 13 Sep 2010 11:25:36 +0200 From: Pawel Jakub Dawidek To: Warner Losh Message-ID: <20100913092536.GC2098@garage.freebsd.pl> References: <201009130729.o8D7T2WA073714@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mvpLiMfbWzRoNl4x" Content-Disposition: inline In-Reply-To: <201009130729.o8D7T2WA073714@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212543 - in head/sys/modules: opensolaris zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 09:25:56 -0000 --mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 13, 2010 at 07:29:02AM +0000, Warner Losh wrote: > Author: imp > Date: Mon Sep 13 07:29:02 2010 > New Revision: 212543 > URL: http://svn.freebsd.org/changeset/base/212543 >=20 > Log: > Simplify atomic selection Could you also update libzpool Makefile? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --mvpLiMfbWzRoNl4x Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyN7g8ACgkQForvXbEpPzSTfACgrKCqtioGtnU68PK+wJoR7tsK 1OgAoK32dLI+EJF6qjAdozvao6WoLjjt =qX8T -----END PGP SIGNATURE----- --mvpLiMfbWzRoNl4x-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 09:51:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A73CD106564A; Mon, 13 Sep 2010 09:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9696B8FC1F; Mon, 13 Sep 2010 09:51:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D9pOWI085095; Mon, 13 Sep 2010 09:51:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D9pOsr085093; Mon, 13 Sep 2010 09:51:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009130951.o8D9pOsr085093@svn.freebsd.org> From: Andriy Gapon Date: Mon, 13 Sep 2010 09:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212549 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 09:51:24 -0000 Author: avg Date: Mon Sep 13 09:51:24 2010 New Revision: 212549 URL: http://svn.freebsd.org/changeset/base/212549 Log: acpi_cpu: do not apply P_LVLx_LAT rules to latencies returned by _CST ACPI specification sates that if P_LVL2_LAT > 100, then a system doesn't support C2; if P_LVL3_LAT > 1000, then C3 is not supported. But there are no such rules for Cx state data returned by _CST. If a state is not supported it should not be included into the return package. In other words, any latency value returned by _CST is valid, it's up to the OS and/or user to decide whether to use it. Submitted by: nork Suggested by: mav MFC after: 1 week Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Mon Sep 13 09:23:38 2010 (r212548) +++ head/sys/dev/acpica/acpi_cpu.c Mon Sep 13 09:51:24 2010 (r212549) @@ -690,19 +690,11 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s sc->cpu_cx_count++; continue; case ACPI_STATE_C2: - if (cx_ptr->trans_lat > 100) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "acpi_cpu%d: C2[%d] not available.\n", - device_get_unit(sc->cpu_dev), i)); - continue; - } sc->cpu_non_c3 = i; break; case ACPI_STATE_C3: default: - if (cx_ptr->trans_lat > 1000 || - (cpu_quirks & CPU_QUIRK_NO_C3) != 0) { - + if ((cpu_quirks & CPU_QUIRK_NO_C3) != 0) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "acpi_cpu%d: C3[%d] not available.\n", device_get_unit(sc->cpu_dev), i)); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 11:47:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FB91106566C; Mon, 13 Sep 2010 11:47:36 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E09C8FC17; Mon, 13 Sep 2010 11:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DBlaxD095591; Mon, 13 Sep 2010 11:47:36 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DBla8x095589; Mon, 13 Sep 2010 11:47:36 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009131147.o8DBla8x095589@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 13 Sep 2010 11:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212550 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 11:47:36 -0000 Author: jchandra Date: Mon Sep 13 11:47:35 2010 New Revision: 212550 URL: http://svn.freebsd.org/changeset/base/212550 Log: bus_add_child method is needed now. Modified: head/sys/mips/rmi/iodi.c Modified: head/sys/mips/rmi/iodi.c ============================================================================== --- head/sys/mips/rmi/iodi.c Mon Sep 13 09:51:24 2010 (r212549) +++ head/sys/mips/rmi/iodi.c Mon Sep 13 11:47:35 2010 (r212550) @@ -305,6 +305,7 @@ static device_method_t iodi_methods[] = DEVMETHOD(device_identify, iodi_identify), DEVMETHOD(bus_alloc_resource, iodi_alloc_resource), DEVMETHOD(bus_activate_resource, iodi_activate_resource), + DEVMETHOD(bus_add_child, bus_generic_add_child), DEVMETHOD(bus_setup_intr, iodi_setup_intr), {0, 0}, }; From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 11:57:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D9D2106564A; Mon, 13 Sep 2010 11:57:46 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BFBB8FC24; Mon, 13 Sep 2010 11:57:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DBvkjt096308; Mon, 13 Sep 2010 11:57:46 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DBvk84096306; Mon, 13 Sep 2010 11:57:46 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009131157.o8DBvk84096306@svn.freebsd.org> From: David Xu Date: Mon, 13 Sep 2010 11:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212551 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 11:57:46 -0000 Author: davidxu Date: Mon Sep 13 11:57:46 2010 New Revision: 212551 URL: http://svn.freebsd.org/changeset/base/212551 Log: Fix copy&paste problem. Modified: head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Mon Sep 13 11:47:35 2010 (r212550) +++ head/lib/libthr/thread/thr_private.h Mon Sep 13 11:57:46 2010 (r212551) @@ -415,8 +415,8 @@ struct pthread { #define THR_FLAGS_PRIVATE 0x0001 #define THR_FLAGS_NEED_SUSPEND 0x0002 /* thread should be suspended */ #define THR_FLAGS_SUSPENDED 0x0004 /* thread is suspended */ -#define THR_FLAGS_IN_GCLIST 0x0004 /* thread in gc list */ -#define THR_FLAGS_DETACHED 0x0008 /* thread is detached */ +#define THR_FLAGS_IN_GCLIST 0x0008 /* thread in gc list */ +#define THR_FLAGS_DETACHED 0x0010 /* thread is detached */ /* Thread list flags; only set with thread list lock held. */ int tlflags; From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 11:58:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C34D5106564A; Mon, 13 Sep 2010 11:58:42 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B18F28FC0A; Mon, 13 Sep 2010 11:58:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DBwgwh096399; Mon, 13 Sep 2010 11:58:42 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DBwgSO096397; Mon, 13 Sep 2010 11:58:42 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009131158.o8DBwgSO096397@svn.freebsd.org> From: David Xu Date: Mon, 13 Sep 2010 11:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212552 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 11:58:42 -0000 Author: davidxu Date: Mon Sep 13 11:58:42 2010 New Revision: 212552 URL: http://svn.freebsd.org/changeset/base/212552 Log: Don't compare thread pointers again. Modified: head/lib/libthr/thread/thr_affinity.c Modified: head/lib/libthr/thread/thr_affinity.c ============================================================================== --- head/lib/libthr/thread/thr_affinity.c Mon Sep 13 11:57:46 2010 (r212551) +++ head/lib/libthr/thread/thr_affinity.c Mon Sep 13 11:58:42 2010 (r212552) @@ -70,13 +70,13 @@ _pthread_getaffinity_np(pthread_t td, si if (td == curthread) { error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, - (td == curthread) ? -1 : tid, cpusetsize, cpusetp); + -1, cpusetsize, cpusetp); if (error == -1) error = errno; } else if ((error = _thr_find_thread(curthread, td, 0)) == 0) { tid = TID(td); - error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, - (td == curthread) ? -1 : tid, cpusetsize, cpusetp); + error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, tid, + cpusetsize, cpusetp); if (error == -1) error = errno; THR_THREAD_UNLOCK(curthread, td); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 12:08:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF29F1065670; Mon, 13 Sep 2010 12:08:47 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 91D0C8FC08; Mon, 13 Sep 2010 12:08:46 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA18190; Mon, 13 Sep 2010 15:08:45 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Ov7q0-000J3p-Rl; Mon, 13 Sep 2010 15:08:44 +0300 Message-ID: <4C8E144C.3030405@freebsd.org> Date: Mon, 13 Sep 2010 15:08:44 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100912 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: "Jayachandran C." References: <201009131147.o8DBla8x095589@svn.freebsd.org> In-Reply-To: <201009131147.o8DBla8x095589@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212550 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 12:08:48 -0000 on 13/09/2010 14:47 Jayachandran C. said the following: > Author: jchandra > Date: Mon Sep 13 11:47:35 2010 > New Revision: 212550 > URL: http://svn.freebsd.org/changeset/base/212550 > > Log: > bus_add_child method is needed now. Just a note: bus_add_child method needs to be defined only if it's actually used, i.e. a device/bus has at least one child that calls BUS_ADD_CHILD. > Modified: > head/sys/mips/rmi/iodi.c > > Modified: head/sys/mips/rmi/iodi.c > ============================================================================== > --- head/sys/mips/rmi/iodi.c Mon Sep 13 09:51:24 2010 (r212549) > +++ head/sys/mips/rmi/iodi.c Mon Sep 13 11:47:35 2010 (r212550) > @@ -305,6 +305,7 @@ static device_method_t iodi_methods[] = > DEVMETHOD(device_identify, iodi_identify), > DEVMETHOD(bus_alloc_resource, iodi_alloc_resource), > DEVMETHOD(bus_activate_resource, iodi_activate_resource), > + DEVMETHOD(bus_add_child, bus_generic_add_child), > DEVMETHOD(bus_setup_intr, iodi_setup_intr), > {0, 0}, > }; -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 12:32:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 2F15E1065670; Mon, 13 Sep 2010 12:32:23 +0000 (UTC) Date: Mon, 13 Sep 2010 12:32:23 +0000 From: Alexander Best To: Alexander Motin Message-ID: <20100913123223.GA99507@freebsd.org> References: <201009130725.o8D7PZX8073399@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009130725.o8D7PZX8073399@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212541 - in head/sys: amd64/amd64 amd64/include dev/acpica i386/i386 i386/include kern mips/include mips/mips pc98/pc98 powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc6... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 12:32:23 -0000 On Mon Sep 13 10, Alexander Motin wrote: > [snip] > > There is set of tunables, also available as writable sysctls, allowing to > control wanted event timer subsystem behavior: > kern.eventtimer.timer - allows to choose event timer hardware to use. > On x86 there is up to 4 different kinds of timers. Depending on whether > chosen timer is per-CPU, behavior of other options slightly differs. > kern.eventtimer.periodic - allows to choose periodic and one-shot > operation mode. In periodic mode, current timer hardware taken as the only > source of time for time events. This mode is quite alike to previous kernel > behavior. One-shot mode instead uses currently selected time counter > hardware to schedule all needed events one by one and program timer to > generate interrupt exactly in specified time. Default value depends of > chosen timer capabilities, but one-shot mode is preferred, until other is > forced by user or hardware. > kern.eventtimer.singlemul - in periodic mode specifies how much times > higher timer frequency should be, to not strictly alias hardclock() and > statclock() events. Default values are 2 and 4, but could be reduced to 1 > if extra interrupts are unwanted. > kern.eventtimer.idletick - makes each CPU to receive every timer interrupt > independently of whether they busy or not. By default this options is > disabled. If chosen timer is per-CPU and runs in periodic mode, this option > has no effect - all interrupts are generating. > > [snip] great! :) would it be possible to document these tunables in a new manual or add them to an existing one? sorry if i missed this and they are already documented somewhere. -- a13x From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 12:37:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 3D6D1106566C; Mon, 13 Sep 2010 12:37:27 +0000 (UTC) Date: Mon, 13 Sep 2010 12:37:27 +0000 From: Alexander Best To: Glen Barber Message-ID: <20100913123727.GB99507@freebsd.org> References: <201009121750.o8CHo7ts089681@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009121750.o8CHo7ts089681@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212498 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 12:37:27 -0000 On Sun Sep 12 10, Glen Barber wrote: > [snip] > > Modified: > head/sbin/newfs/newfs.8 > > [snip] could you also have a look at PR #61716? thanks. -- a13x From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 12:59:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E26361065675 for ; Mon, 13 Sep 2010 12:59:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (aries.glenbarber.us [204.109.63.207]) by mx1.freebsd.org (Postfix) with SMTP id 860628FC1A for ; Mon, 13 Sep 2010 12:59:26 +0000 (UTC) Received: (qmail 69336 invoked by uid 0); 13 Sep 2010 08:59:25 -0400 Received: from unknown (HELO schism.local) (gjb@173.161.130.225) by 0 with SMTP; 13 Sep 2010 08:59:25 -0400 Message-ID: <4C8E202D.1080407@FreeBSD.org> Date: Mon, 13 Sep 2010 08:59:25 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: Alexander Best References: <201009121750.o8CHo7ts089681@svn.freebsd.org> <20100913123727.GB99507@freebsd.org> In-Reply-To: <20100913123727.GB99507@freebsd.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212498 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 12:59:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 9/13/10 8:37 AM, Alexander Best wrote: > On Sun Sep 12 10, Glen Barber wrote: >> [snip] >> >> Modified: >> head/sbin/newfs/newfs.8 >> >> [snip] > > could you also have a look at PR #61716? > thanks. > Sure will. Cheers, - -- Glen Barber FreeBSD Documentation Project -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iQEcBAEBAgAGBQJMjiAsAAoJEFJPDDeguUajOlwIAJh21AvsgRqtknz12ZrQwP7k mPAp+ymxUtL/38xv45x0m6KgpIePCtdUPoVki1VY6CO7Av/QxLbP6cDHGecvc2Dz qhAkKWVdkxmNKKaCBoMupr+LwVaUbhJL8O7ohbuUiBaTF72niYBDevx2NLiwMOtH GFG2cd5gOXYaxfuo6YZpLmwHARMYfH7yUfEnQZAAwH+Zay5LMDFhtnlfGXOvDGZh dBEQ+4xXZTp2mUhL3BD3jTOgbZ2KAT+wxSQtPRktrs/uFeTB/j2GREINX9l1aGlu 2gPUACCTnwsk6dxP/2LNYLVNrck5v17Tndpj3A9J7usHuaMN7kxOh+5XB0jeHzs= =e7wm -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 13:11:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D72B31065697; Mon, 13 Sep 2010 13:11:50 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C423D8FC1E; Mon, 13 Sep 2010 13:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DDBoRc002103; Mon, 13 Sep 2010 13:11:50 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DDBo3u002099; Mon, 13 Sep 2010 13:11:50 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009131311.o8DDBo3u002099@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 13 Sep 2010 13:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212553 - in head/sys/mips/rmi: . dev/nlge dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 13:11:50 -0000 Author: jchandra Date: Mon Sep 13 13:11:50 2010 New Revision: 212553 URL: http://svn.freebsd.org/changeset/base/212553 Log: sys/mips/rmi/msgring.h - fixes and clean up. - Remove sync from msgrng_send, sync needs to be called just once before sending. - Fix retry logic - don't reload registers when retrying in message_send, also fix check for send pending fail. - remove unused message_send_block_fast() - merge message_receive_fast() to message_receive - style(9) fixes, and comments - rge and nlge updated for the sys/mips/rmi/msgring.h changes Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c head/sys/mips/rmi/dev/xlr/rge.c head/sys/mips/rmi/msgring.h Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c ============================================================================== --- head/sys/mips/rmi/dev/nlge/if_nlge.c Mon Sep 13 11:58:42 2010 (r212552) +++ head/sys/mips/rmi/dev/nlge/if_nlge.c Mon Sep 13 13:11:50 2010 (r212553) @@ -1035,7 +1035,7 @@ nlna_submit_rx_free_desc(struct nlna_sof n = 0; do { msgrng_flags = msgrng_access_enable(); - ret = message_send_retry(1, code, stid, &msg); + ret = message_send(1, code, stid, &msg); msgrng_restore(msgrng_flags); KASSERT(n++ < 100000, ("Too many credit fails\n")); } while (ret != 0); @@ -1960,7 +1960,7 @@ send_fmn_msg_tx(struct nlge_softc *sc, s do { msgrng_flags = msgrng_access_enable(); - ret = message_send_retry(n_entries, MSGRNG_CODE_MAC, + ret = message_send(n_entries, MSGRNG_CODE_MAC, sc->tx_bucket_id, msg); msgrng_restore(msgrng_flags); KASSERT(i++ < 100000, ("Too many credit fails\n")); Modified: head/sys/mips/rmi/dev/xlr/rge.c ============================================================================== --- head/sys/mips/rmi/dev/xlr/rge.c Mon Sep 13 11:58:42 2010 (r212552) +++ head/sys/mips/rmi/dev/xlr/rge.c Mon Sep 13 13:11:50 2010 (r212553) @@ -731,7 +731,7 @@ xlr_mac_send_fr(struct driver_data *priv do { msgrng_flags = msgrng_access_enable(); - ret = message_send_retry(1, code, stid, &msg); + ret = message_send(1, code, stid, &msg); msgrng_restore(msgrng_flags); KASSERT(i++ < 100000, ("Too many credit fails\n")); } while (ret != 0); @@ -1468,7 +1468,7 @@ mac_xmit(struct mbuf *m, struct rge_soft else { mflags = msgrng_access_enable(); - if ((rv = message_send_retry(1, MSGRNG_CODE_MAC, stid, &msg)) != 0) { + if ((rv = message_send(1, MSGRNG_CODE_MAC, stid, &msg)) != 0) { msg_snd_failed++; msgrng_restore(mflags); release_tx_desc(&msg, 0); Modified: head/sys/mips/rmi/msgring.h ============================================================================== --- head/sys/mips/rmi/msgring.h Mon Sep 13 11:58:42 2010 (r212552) +++ head/sys/mips/rmi/msgring.h Mon Sep 13 13:11:50 2010 (r212553) @@ -46,16 +46,16 @@ #define MSGRNG_MSG_CONFIG_REG 3 #define MSGRNG_MSG_BUCKSIZE_REG 4 -#define MSGRNG_CC_0_REG 16 -#define MSGRNG_CC_1_REG 17 -#define MSGRNG_CC_2_REG 18 -#define MSGRNG_CC_3_REG 19 -#define MSGRNG_CC_4_REG 20 -#define MSGRNG_CC_5_REG 21 -#define MSGRNG_CC_6_REG 22 -#define MSGRNG_CC_7_REG 23 -#define MSGRNG_CC_8_REG 24 -#define MSGRNG_CC_9_REG 25 +#define MSGRNG_CC_0_REG 16 +#define MSGRNG_CC_1_REG 17 +#define MSGRNG_CC_2_REG 18 +#define MSGRNG_CC_3_REG 19 +#define MSGRNG_CC_4_REG 20 +#define MSGRNG_CC_5_REG 21 +#define MSGRNG_CC_6_REG 22 +#define MSGRNG_CC_7_REG 23 +#define MSGRNG_CC_8_REG 24 +#define MSGRNG_CC_9_REG 25 #define MSGRNG_CC_10_REG 26 #define MSGRNG_CC_11_REG 27 #define MSGRNG_CC_12_REG 28 @@ -64,173 +64,170 @@ #define MSGRNG_CC_15_REG 31 /* Station IDs */ -#define MSGRNG_STNID_CPU0 0x00 -#define MSGRNG_STNID_CPU1 0x08 -#define MSGRNG_STNID_CPU2 0x10 -#define MSGRNG_STNID_CPU3 0x18 -#define MSGRNG_STNID_CPU4 0x20 -#define MSGRNG_STNID_CPU5 0x28 -#define MSGRNG_STNID_CPU6 0x30 -#define MSGRNG_STNID_CPU7 0x38 -#define MSGRNG_STNID_XGS0_TX 64 -#define MSGRNG_STNID_XMAC0_00_TX 64 -#define MSGRNG_STNID_XMAC0_01_TX 65 -#define MSGRNG_STNID_XMAC0_02_TX 66 -#define MSGRNG_STNID_XMAC0_03_TX 67 -#define MSGRNG_STNID_XMAC0_04_TX 68 -#define MSGRNG_STNID_XMAC0_05_TX 69 -#define MSGRNG_STNID_XMAC0_06_TX 70 -#define MSGRNG_STNID_XMAC0_07_TX 71 -#define MSGRNG_STNID_XMAC0_08_TX 72 -#define MSGRNG_STNID_XMAC0_09_TX 73 -#define MSGRNG_STNID_XMAC0_10_TX 74 -#define MSGRNG_STNID_XMAC0_11_TX 75 -#define MSGRNG_STNID_XMAC0_12_TX 76 -#define MSGRNG_STNID_XMAC0_13_TX 77 -#define MSGRNG_STNID_XMAC0_14_TX 78 -#define MSGRNG_STNID_XMAC0_15_TX 79 - -#define MSGRNG_STNID_XGS1_TX 80 -#define MSGRNG_STNID_XMAC1_00_TX 80 -#define MSGRNG_STNID_XMAC1_01_TX 81 -#define MSGRNG_STNID_XMAC1_02_TX 82 -#define MSGRNG_STNID_XMAC1_03_TX 83 -#define MSGRNG_STNID_XMAC1_04_TX 84 -#define MSGRNG_STNID_XMAC1_05_TX 85 -#define MSGRNG_STNID_XMAC1_06_TX 86 -#define MSGRNG_STNID_XMAC1_07_TX 87 -#define MSGRNG_STNID_XMAC1_08_TX 88 -#define MSGRNG_STNID_XMAC1_09_TX 89 -#define MSGRNG_STNID_XMAC1_10_TX 90 -#define MSGRNG_STNID_XMAC1_11_TX 91 -#define MSGRNG_STNID_XMAC1_12_TX 92 -#define MSGRNG_STNID_XMAC1_13_TX 93 -#define MSGRNG_STNID_XMAC1_14_TX 94 -#define MSGRNG_STNID_XMAC1_15_TX 95 - -#define MSGRNG_STNID_GMAC 96 -#define MSGRNG_STNID_GMACJFR_0 96 -#define MSGRNG_STNID_GMACRFR_0 97 -#define MSGRNG_STNID_GMACTX0 98 -#define MSGRNG_STNID_GMACTX1 99 -#define MSGRNG_STNID_GMACTX2 100 -#define MSGRNG_STNID_GMACTX3 101 -#define MSGRNG_STNID_GMACJFR_1 102 -#define MSGRNG_STNID_GMACRFR_1 103 - -#define MSGRNG_STNID_DMA 104 -#define MSGRNG_STNID_DMA_0 104 -#define MSGRNG_STNID_DMA_1 105 -#define MSGRNG_STNID_DMA_2 106 -#define MSGRNG_STNID_DMA_3 107 - -#define MSGRNG_STNID_XGS0FR 112 -#define MSGRNG_STNID_XMAC0JFR 112 -#define MSGRNG_STNID_XMAC0RFR 113 - -#define MSGRNG_STNID_XGS1FR 114 -#define MSGRNG_STNID_XMAC1JFR 114 -#define MSGRNG_STNID_XMAC1RFR 115 -#define MSGRNG_STNID_SEC 120 -#define MSGRNG_STNID_SEC0 120 -#define MSGRNG_STNID_SEC1 121 -#define MSGRNG_STNID_SEC2 122 -#define MSGRNG_STNID_SEC3 123 -#define MSGRNG_STNID_PK0 124 -#define MSGRNG_STNID_SEC_RSA 124 -#define MSGRNG_STNID_SEC_RSVD0 125 -#define MSGRNG_STNID_SEC_RSVD1 126 -#define MSGRNG_STNID_SEC_RSVD2 127 - -#define MSGRNG_STNID_GMAC1 80 -#define MSGRNG_STNID_GMAC1_FR_0 81 -#define MSGRNG_STNID_GMAC1_TX0 82 -#define MSGRNG_STNID_GMAC1_TX1 83 -#define MSGRNG_STNID_GMAC1_TX2 84 -#define MSGRNG_STNID_GMAC1_TX3 85 -#define MSGRNG_STNID_GMAC1_FR_1 87 -#define MSGRNG_STNID_GMAC0 96 -#define MSGRNG_STNID_GMAC0_FR_0 97 -#define MSGRNG_STNID_GMAC0_TX0 98 -#define MSGRNG_STNID_GMAC0_TX1 99 -#define MSGRNG_STNID_GMAC0_TX2 100 -#define MSGRNG_STNID_GMAC0_TX3 101 -#define MSGRNG_STNID_GMAC0_FR_1 103 -#define MSGRNG_STNID_CMP_0 108 -#define MSGRNG_STNID_CMP_1 109 -#define MSGRNG_STNID_CMP_2 110 -#define MSGRNG_STNID_CMP_3 111 -#define MSGRNG_STNID_PCIE_0 116 -#define MSGRNG_STNID_PCIE_1 117 -#define MSGRNG_STNID_PCIE_2 118 -#define MSGRNG_STNID_PCIE_3 119 -#define MSGRNG_STNID_XLS_PK0 121 - -#define MSGRNG_CODE_MAC 0 -#define MSGRNG_CODE_XGMAC 2 -#define MSGRNG_CODE_SEC 0 -#define MSGRNG_CODE_BOOT_WAKEUP 200 -#define MSGRNG_CODE_SPI4 3 -#define msgrng_read_status() read_c2_register32(MSGRNG_MSG_STATUS_REG, 0) - -#define msgrng_read_config() read_c2_register32(MSGRNG_MSG_CONFIG_REG, 0) -#define msgrng_write_config(value) write_c2_register32(MSGRNG_MSG_CONFIG_REG, 0, value) - -#define msgrng_read_bucksize(bucket) read_c2_register32(MSGRNG_MSG_BUCKSIZE_REG, bucket) -#define msgrng_write_bucksize(bucket, value) write_c2_register32(MSGRNG_MSG_BUCKSIZE_REG, bucket, value) - -#define msgrng_read_cc(reg, pri) read_c2_register32(reg, pri) -#define msgrng_write_cc(reg, value, pri) write_c2_register32(reg, pri, value) - -#define msgrng_load_rx_msg0() read_c2_register64(MSGRNG_RX_BUF_REG, 0) -#define msgrng_load_rx_msg1() read_c2_register64(MSGRNG_RX_BUF_REG, 1) -#define msgrng_load_rx_msg2() read_c2_register64(MSGRNG_RX_BUF_REG, 2) -#define msgrng_load_rx_msg3() read_c2_register64(MSGRNG_RX_BUF_REG, 3) - -#define msgrng_load_tx_msg0(value) write_c2_register64(MSGRNG_TX_BUF_REG, 0, value) -#define msgrng_load_tx_msg1(value) write_c2_register64(MSGRNG_TX_BUF_REG, 1, value) -#define msgrng_load_tx_msg2(value) write_c2_register64(MSGRNG_TX_BUF_REG, 2, value) -#define msgrng_load_tx_msg3(value) write_c2_register64(MSGRNG_TX_BUF_REG, 3, value) +#define MSGRNG_STNID_CPU0 0x00 +#define MSGRNG_STNID_CPU1 0x08 +#define MSGRNG_STNID_CPU2 0x10 +#define MSGRNG_STNID_CPU3 0x18 +#define MSGRNG_STNID_CPU4 0x20 +#define MSGRNG_STNID_CPU5 0x28 +#define MSGRNG_STNID_CPU6 0x30 +#define MSGRNG_STNID_CPU7 0x38 +#define MSGRNG_STNID_XGS0_TX 64 +#define MSGRNG_STNID_XMAC0_00_TX 64 +#define MSGRNG_STNID_XMAC0_01_TX 65 +#define MSGRNG_STNID_XMAC0_02_TX 66 +#define MSGRNG_STNID_XMAC0_03_TX 67 +#define MSGRNG_STNID_XMAC0_04_TX 68 +#define MSGRNG_STNID_XMAC0_05_TX 69 +#define MSGRNG_STNID_XMAC0_06_TX 70 +#define MSGRNG_STNID_XMAC0_07_TX 71 +#define MSGRNG_STNID_XMAC0_08_TX 72 +#define MSGRNG_STNID_XMAC0_09_TX 73 +#define MSGRNG_STNID_XMAC0_10_TX 74 +#define MSGRNG_STNID_XMAC0_11_TX 75 +#define MSGRNG_STNID_XMAC0_12_TX 76 +#define MSGRNG_STNID_XMAC0_13_TX 77 +#define MSGRNG_STNID_XMAC0_14_TX 78 +#define MSGRNG_STNID_XMAC0_15_TX 79 + +#define MSGRNG_STNID_XGS1_TX 80 +#define MSGRNG_STNID_XMAC1_00_TX 80 +#define MSGRNG_STNID_XMAC1_01_TX 81 +#define MSGRNG_STNID_XMAC1_02_TX 82 +#define MSGRNG_STNID_XMAC1_03_TX 83 +#define MSGRNG_STNID_XMAC1_04_TX 84 +#define MSGRNG_STNID_XMAC1_05_TX 85 +#define MSGRNG_STNID_XMAC1_06_TX 86 +#define MSGRNG_STNID_XMAC1_07_TX 87 +#define MSGRNG_STNID_XMAC1_08_TX 88 +#define MSGRNG_STNID_XMAC1_09_TX 89 +#define MSGRNG_STNID_XMAC1_10_TX 90 +#define MSGRNG_STNID_XMAC1_11_TX 91 +#define MSGRNG_STNID_XMAC1_12_TX 92 +#define MSGRNG_STNID_XMAC1_13_TX 93 +#define MSGRNG_STNID_XMAC1_14_TX 94 +#define MSGRNG_STNID_XMAC1_15_TX 95 + +#define MSGRNG_STNID_GMAC 96 +#define MSGRNG_STNID_GMACJFR_0 96 +#define MSGRNG_STNID_GMACRFR_0 97 +#define MSGRNG_STNID_GMACTX0 98 +#define MSGRNG_STNID_GMACTX1 99 +#define MSGRNG_STNID_GMACTX2 100 +#define MSGRNG_STNID_GMACTX3 101 +#define MSGRNG_STNID_GMACJFR_1 102 +#define MSGRNG_STNID_GMACRFR_1 103 + +#define MSGRNG_STNID_DMA 104 +#define MSGRNG_STNID_DMA_0 104 +#define MSGRNG_STNID_DMA_1 105 +#define MSGRNG_STNID_DMA_2 106 +#define MSGRNG_STNID_DMA_3 107 + +#define MSGRNG_STNID_XGS0FR 112 +#define MSGRNG_STNID_XMAC0JFR 112 +#define MSGRNG_STNID_XMAC0RFR 113 + +#define MSGRNG_STNID_XGS1FR 114 +#define MSGRNG_STNID_XMAC1JFR 114 +#define MSGRNG_STNID_XMAC1RFR 115 +#define MSGRNG_STNID_SEC 120 +#define MSGRNG_STNID_SEC0 120 +#define MSGRNG_STNID_SEC1 121 +#define MSGRNG_STNID_SEC2 122 +#define MSGRNG_STNID_SEC3 123 +#define MSGRNG_STNID_PK0 124 +#define MSGRNG_STNID_SEC_RSA 124 +#define MSGRNG_STNID_SEC_RSVD0 125 +#define MSGRNG_STNID_SEC_RSVD1 126 +#define MSGRNG_STNID_SEC_RSVD2 127 + +#define MSGRNG_STNID_GMAC1 80 +#define MSGRNG_STNID_GMAC1_FR_0 81 +#define MSGRNG_STNID_GMAC1_TX0 82 +#define MSGRNG_STNID_GMAC1_TX1 83 +#define MSGRNG_STNID_GMAC1_TX2 84 +#define MSGRNG_STNID_GMAC1_TX3 85 +#define MSGRNG_STNID_GMAC1_FR_1 87 +#define MSGRNG_STNID_GMAC0 96 +#define MSGRNG_STNID_GMAC0_FR_0 97 +#define MSGRNG_STNID_GMAC0_TX0 98 +#define MSGRNG_STNID_GMAC0_TX1 99 +#define MSGRNG_STNID_GMAC0_TX2 100 +#define MSGRNG_STNID_GMAC0_TX3 101 +#define MSGRNG_STNID_GMAC0_FR_1 103 +#define MSGRNG_STNID_CMP_0 108 +#define MSGRNG_STNID_CMP_1 109 +#define MSGRNG_STNID_CMP_2 110 +#define MSGRNG_STNID_CMP_3 111 +#define MSGRNG_STNID_PCIE_0 116 +#define MSGRNG_STNID_PCIE_1 117 +#define MSGRNG_STNID_PCIE_2 118 +#define MSGRNG_STNID_PCIE_3 119 +#define MSGRNG_STNID_XLS_PK0 121 + +#define MSGRNG_CODE_MAC 0 +#define MSGRNG_CODE_XGMAC 2 +#define MSGRNG_CODE_SEC 0 +#define MSGRNG_CODE_BOOT_WAKEUP 200 +#define MSGRNG_CODE_SPI4 3 +#define msgrng_read_status() read_c2_register32(MSGRNG_MSG_STATUS_REG, 0) + +#define msgrng_read_config() read_c2_register32(MSGRNG_MSG_CONFIG_REG, 0) +#define msgrng_write_config(v) write_c2_register32(MSGRNG_MSG_CONFIG_REG, 0, v) + +#define msgrng_read_bucksize(b) read_c2_register32(MSGRNG_MSG_BUCKSIZE_REG, b) +#define msgrng_write_bucksize(b, v) write_c2_register32(MSGRNG_MSG_BUCKSIZE_REG, b, v) + +#define msgrng_read_cc(r, s) read_c2_register32(r, s) +#define msgrng_write_cc(r, v, s) write_c2_register32(r, s, v) + +#define msgrng_load_rx_msg0() read_c2_register64(MSGRNG_RX_BUF_REG, 0) +#define msgrng_load_rx_msg1() read_c2_register64(MSGRNG_RX_BUF_REG, 1) +#define msgrng_load_rx_msg2() read_c2_register64(MSGRNG_RX_BUF_REG, 2) +#define msgrng_load_rx_msg3() read_c2_register64(MSGRNG_RX_BUF_REG, 3) + +#define msgrng_load_tx_msg0(v) write_c2_register64(MSGRNG_TX_BUF_REG, 0, v) +#define msgrng_load_tx_msg1(v) write_c2_register64(MSGRNG_TX_BUF_REG, 1, v) +#define msgrng_load_tx_msg2(v) write_c2_register64(MSGRNG_TX_BUF_REG, 2, v) +#define msgrng_load_tx_msg3(v) write_c2_register64(MSGRNG_TX_BUF_REG, 3, v) -static inline void +static __inline void msgrng_send(unsigned int stid) { __asm__ volatile ( - ".set push\n" - ".set noreorder\n" - "sync\n" - // "msgsnd %0\n" - "move $8, %0\n" - "c2 0x80001\n" - ".set pop\n" - :: "r" (stid):"$8" + ".set push\n" + ".set noreorder\n" + "move $8, %0\n" + "c2 0x80001\n" /* msgsnd $8 */ + ".set pop\n" + :: "r" (stid): "$8" ); } -static inline void +static __inline void msgrng_receive(unsigned int pri) { __asm__ volatile ( - ".set push\n" - ".set noreorder\n" - // "msgld %0\n" - "move $8, %0\n" - "c2 0x80002\n" - ".set pop\n" - :: "r" (pri):"$8" + ".set push\n" + ".set noreorder\n" + "move $8, %0\n" + "c2 0x80002\n" /* msgld $8 */ + ".set pop\n" + :: "r" (pri): "$8" ); } -static inline void + +static __inline void msgrng_wait(unsigned int mask) { __asm__ volatile ( - ".set push\n" - ".set noreorder\n" - // "msgwait %0\n" - "move $8, %0\n" - "c2 0x80003\n" - ".set pop\n" - :: "r" (mask):"$8" + ".set push\n" + ".set noreorder\n" + "move $8, %0\n" + "c2 0x80003\n" /* msgwait $8 */ + ".set pop\n" + :: "r" (mask): "$8" ); } @@ -251,111 +248,77 @@ msgrng_restore(uint32_t sr) } struct msgrng_msg { - __uint64_t msg0; - __uint64_t msg1; - __uint64_t msg2; - __uint64_t msg3; + uint64_t msg0; + uint64_t msg1; + uint64_t msg2; + uint64_t msg3; }; -static inline void -message_send_block_fast(int size, unsigned int code, unsigned int stid, - unsigned long long msg0, unsigned long long msg1, - unsigned long long msg2, unsigned long long msg3) -{ - __asm__ __volatile__(".set push\n" - ".set noreorder\n" - ".set mips64\n" - "dmtc2 %1, $0, 0\n" - "dmtc2 %2, $0, 1\n" - "dmtc2 %3, $0, 2\n" - "dmtc2 %4, $0, 3\n" - "move $8, %0\n" - "1: c2 0x80001\n" - "mfc2 $8, $2\n" - "andi $8, $8, 0x6\n" - "bnez $8, 1b\n" - "move $8, %0\n" - ".set pop\n" - : - : "r"(((size - 1) << 16) | (code << 8) | stid), "r"(msg0), "r"(msg1), "r"(msg2), "r"(msg3) - : "$8" - ); -} - -#define message_receive_fast(bucket, size, code, stid, msg0, msg1, msg2, msg3) \ - ( { unsigned int _status=0, _tmp=0; \ - msgrng_receive(bucket); \ - while ( (_status=msgrng_read_status()) & 0x08) ; \ - _tmp = _status & 0x30; \ - if (__builtin_expect((!_tmp), 1)) { \ - (size)=((_status & 0xc0)>>6)+1; \ - (code)=(_status & 0xff00)>>8; \ - (stid)=(_status & 0x7f0000)>>16; \ - (msg0)=msgrng_load_rx_msg0(); \ - (msg1)=msgrng_load_rx_msg1(); \ - (msg2)=msgrng_load_rx_msg2(); \ - (msg3)=msgrng_load_rx_msg3(); \ - _tmp=0; \ - } \ - _tmp; \ - } ) - -static __inline int +static __inline int message_send(unsigned int size, unsigned int code, unsigned int stid, struct msgrng_msg *msg) { unsigned int dest = 0; unsigned long long status = 0; -#ifdef INVARIANTS int i = 0; -#endif + /* + * Make sure that all the writes pending at the cpu are flushed. + * Any writes pending on CPU will not be see by devices. L1/L2 + * caches are coherent with IO, so no cache flush needed. + */ + __asm __volatile ("sync"); + + /* Load TX message buffers */ msgrng_load_tx_msg0(msg->msg0); msgrng_load_tx_msg1(msg->msg1); msgrng_load_tx_msg2(msg->msg2); msgrng_load_tx_msg3(msg->msg3); - - dest = ((size - 1) << 16) | (code << 8) | (stid); - msgrng_send(dest); - - /* Wait for the thread pending to clear */ - do { - status = msgrng_read_status(); - KASSERT(i++ < 10000, ("Too many fails\n")); - } while ((status & 0x2) != 0); - - /* If there is a credit failure, return error */ - return status & 0x06; -} - -static __inline int -message_send_retry(unsigned int size, unsigned int code, - unsigned int stid, struct msgrng_msg *msg) -{ - int i, ret; + dest = ((size - 1) << 16) | (code << 8) | stid; /* - * we are in with interrupt disabled, retrying too many - * times is not good + * Retry a few times on credit fail, this should be a + * transient condition, unless there is a configuration + * failure, or the receiver is stuck. */ - for (i = 0; i < 16; i++) { - ret = message_send(size, code, stid, msg); - if (ret == 0) + for (i = 0; i < 8; i++) { + msgrng_send(dest); + status = msgrng_read_status(); + KASSERT((status & 0x2) == 0, ("Send pending fail!")); + if ((status & 0x4) == 0) return (0); } - return (1); + /* If there is a credit failure, return error */ + return (status & 0x06); } -static __inline__ int -message_receive(int pri, int *size, int *code, int *src_id, +static __inline int +message_receive(int bucket, int *size, int *code, int *stid, struct msgrng_msg *msg) { - int res; + uint32_t status = 0, tmp = 0; - res = message_receive_fast(pri, *size, *code, *src_id, - msg->msg0, msg->msg1, msg->msg2, msg->msg3); - return res; + msgrng_receive(bucket); + + /* wait for load pending to clear */ + do { + status = msgrng_read_status(); + } while ((status & 0x08) != 0); + + /* receive error bits */ + tmp = status & 0x30; + if (tmp != 0) + return (tmp); + + *size = ((status & 0xc0) >> 6) + 1; + *code = (status & 0xff00) >> 8; + *stid = (status & 0x7f0000) >> 16; + msg->msg0 = msgrng_load_rx_msg0(); + msg->msg1 = msgrng_load_rx_msg1(); + msg->msg2 = msgrng_load_rx_msg2(); + msg->msg3 = msgrng_load_rx_msg3(); + return (0); } #define MSGRNG_STN_RX_QSIZE 256 From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 13:48:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D833106564A; Mon, 13 Sep 2010 13:48:19 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 572608FC0C; Mon, 13 Sep 2010 13:48:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DDmJTf004176; Mon, 13 Sep 2010 13:48:19 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DDmJL8004159; Mon, 13 Sep 2010 13:48:19 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009131348.o8DDmJL8004159@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 13 Sep 2010 13:48:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212554 - in head: sbin/geom/class/cache sbin/geom/class/concat sbin/geom/class/eli sbin/geom/class/journal sbin/geom/class/label sbin/geom/class/mirror sbin/geom/class/mountver sbin/ge... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 13:48:19 -0000 Author: pjd Date: Mon Sep 13 13:48:18 2010 New Revision: 212554 URL: http://svn.freebsd.org/changeset/base/212554 Log: - Remove gc_argname field. It was introduced for gpart(8), but if I understand everything correctly, we don't really need it. - Provide default numeric value as strings. This allows to simplify a lot of code. - Bump version number. Modified: head/sbin/geom/class/cache/geom_cache.c head/sbin/geom/class/concat/geom_concat.c head/sbin/geom/class/eli/geom_eli.c head/sbin/geom/class/journal/geom_journal.c head/sbin/geom/class/label/geom_label.c head/sbin/geom/class/mirror/geom_mirror.c head/sbin/geom/class/mountver/geom_mountver.c head/sbin/geom/class/multipath/geom_multipath.c head/sbin/geom/class/nop/geom_nop.c head/sbin/geom/class/part/geom_part.c head/sbin/geom/class/raid3/geom_raid3.c head/sbin/geom/class/sched/geom_sched.c head/sbin/geom/class/shsec/geom_shsec.c head/sbin/geom/class/stripe/geom_stripe.c head/sbin/geom/class/virstor/geom_virstor.c head/sbin/geom/core/geom.c head/sbin/geom/core/geom.h head/sys/geom/part/g_part.c Modified: head/sbin/geom/class/cache/geom_cache.c ============================================================================== --- head/sbin/geom/class/cache/geom_cache.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/cache/geom_cache.c Mon Sep 13 13:48:18 2010 (r212554) @@ -42,10 +42,8 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_CACHE_VERSION; -static intmax_t blocksize_label = 65536; -static intmax_t size_label = 100; -static intmax_t blocksize_configure = 0; -static intmax_t size_configure = 0; +#define GCACHE_BLOCKSIZE "65536" +#define GCACHE_SIZE "100" static void cache_main(struct gctl_req *req, unsigned flags); static void cache_clear(struct gctl_req *req); @@ -53,44 +51,44 @@ static void cache_dump(struct gctl_req * static void cache_label(struct gctl_req *req); struct g_command class_commands[] = { - { "clear", G_FLAG_VERBOSE, cache_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, cache_main, G_NULL_OPTS, "[-v] prov ..." }, { "configure", G_FLAG_VERBOSE, NULL, { - { 'b', "blocksize", &blocksize_configure, G_TYPE_NUMBER }, - { 's', "size", &size_configure, G_TYPE_NUMBER }, + { 'b', "blocksize", "0", G_TYPE_NUMBER }, + { 's', "size", "0", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-v] [-b blocksize] [-s size] name" + "[-v] [-b blocksize] [-s size] name" }, { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { - { 'b', "blocksize", &blocksize_label, G_TYPE_NUMBER }, - { 's', "size", &size_label, G_TYPE_NUMBER }, + { 'b', "blocksize", GCACHE_BLOCKSIZE, G_TYPE_NUMBER }, + { 's', "size", GCACHE_SIZE, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-v] [-b blocksize] [-s size] name prov" + "[-v] [-b blocksize] [-s size] name prov" }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, - { "dump", 0, cache_main, G_NULL_OPTS, NULL, + { "dump", 0, cache_main, G_NULL_OPTS, "prov ..." }, { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, cache_main, { - { 'b', "blocksize", &blocksize_label, G_TYPE_NUMBER }, - { 's', "size", &size_label, G_TYPE_NUMBER }, + { 'b', "blocksize", GCACHE_BLOCKSIZE, G_TYPE_NUMBER }, + { 's', "size", GCACHE_SIZE, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-v] [-b blocksize] [-s size] name prov" + "[-v] [-b blocksize] [-s size] name prov" }, - { "reset", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "reset", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name ..." }, { "stop", G_FLAG_VERBOSE, NULL, @@ -98,7 +96,7 @@ struct g_command class_commands[] = { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/concat/geom_concat.c ============================================================================== --- head/sbin/geom/class/concat/geom_concat.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/concat/geom_concat.c Mon Sep 13 13:48:18 2010 (r212554) @@ -51,20 +51,20 @@ static void concat_dump(struct gctl_req static void concat_label(struct gctl_req *req); struct g_command class_commands[] = { - { "clear", G_FLAG_VERBOSE, concat_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, concat_main, G_NULL_OPTS, "[-v] prov ..." }, { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, G_NULL_OPTS, - NULL, "[-v] name prov ..." + "[-v] name prov ..." }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, - { "dump", 0, concat_main, G_NULL_OPTS, NULL, + { "dump", 0, concat_main, G_NULL_OPTS, "prov ..." }, { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, concat_main, @@ -72,14 +72,14 @@ struct g_command class_commands[] = { { 'h', "hardcode", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-hv] name prov ..." + "[-hv] name prov ..." }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/eli/geom_eli.c Mon Sep 13 13:48:18 2010 (r212554) @@ -57,11 +57,6 @@ uint32_t version = G_ELI_VERSION; #define GELI_BACKUP_DIR "/var/backups/" #define GELI_ENC_ALGO "aes" -static intmax_t keylen = 0; -static intmax_t keyno = -1; -static intmax_t iterations = -1; -static intmax_t sectorsize = 0; - static void eli_main(struct gctl_req *req, unsigned flags); static void eli_init(struct gctl_req *req); static void eli_attach(struct gctl_req *req); @@ -102,14 +97,14 @@ struct g_command class_commands[] = { { 'b', "boot", NULL, G_TYPE_BOOL }, { 'B', "backupfile", "", G_TYPE_STRING }, { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, - { 'i', "iterations", &iterations, G_TYPE_NUMBER }, + { 'i', "iterations", "-1", G_TYPE_NUMBER }, { 'K', "newkeyfile", "", G_TYPE_STRING }, - { 'l', "keylen", &keylen, G_TYPE_NUMBER }, + { 'l', "keylen", "0", G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, - { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, + { 's', "sectorsize", "0", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-bPv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] [-s sectorsize] prov" + "[-bPv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] [-s sectorsize] prov" }, { "label", G_FLAG_VERBOSE, eli_main, { @@ -117,14 +112,14 @@ struct g_command class_commands[] = { { 'b', "boot", NULL, G_TYPE_BOOL }, { 'B', "backupfile", "", G_TYPE_STRING }, { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, - { 'i', "iterations", &iterations, G_TYPE_NUMBER }, + { 'i', "iterations", "-1", G_TYPE_NUMBER }, { 'K', "newkeyfile", "", G_TYPE_STRING }, - { 'l', "keylen", &keylen, G_TYPE_NUMBER }, + { 'l', "keylen", "0", G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, - { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, + { 's', "sectorsize", "0", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "- an alias for 'init'" + "- an alias for 'init'" }, { "attach", G_FLAG_VERBOSE | G_FLAG_LOADKLD, eli_main, { @@ -134,7 +129,7 @@ struct g_command class_commands[] = { { 'r', "readonly", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-dprv] [-k keyfile] prov" + "[-dprv] [-k keyfile] prov" }, { "detach", 0, NULL, { @@ -142,7 +137,7 @@ struct g_command class_commands[] = { { 'l', "last", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fl] prov ..." + "[-fl] prov ..." }, { "stop", 0, NULL, { @@ -150,18 +145,18 @@ struct g_command class_commands[] = { { 'l', "last", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "- an alias for 'detach'" + "- an alias for 'detach'" }, { "onetime", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { { 'a', "aalgo", "", G_TYPE_STRING }, { 'd', "detach", NULL, G_TYPE_BOOL }, { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, - { 'l', "keylen", &keylen, G_TYPE_NUMBER }, - { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, + { 'l', "keylen", "0", G_TYPE_NUMBER }, + { 's', "sectorsize", "0", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-d] [-a aalgo] [-e ealgo] [-l keylen] [-s sectorsize] prov" + "[-d] [-a aalgo] [-e ealgo] [-l keylen] [-s sectorsize] prov" }, { "configure", G_FLAG_VERBOSE, eli_main, { @@ -169,46 +164,46 @@ struct g_command class_commands[] = { { 'B', "noboot", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-bB] prov ..." + "[-bB] prov ..." }, { "setkey", G_FLAG_VERBOSE, eli_main, { - { 'i', "iterations", &iterations, G_TYPE_NUMBER }, + { 'i', "iterations", "-1", G_TYPE_NUMBER }, { 'k', "keyfile", "", G_TYPE_STRING }, { 'K', "newkeyfile", "", G_TYPE_STRING }, - { 'n', "keyno", &keyno, G_TYPE_NUMBER }, + { 'n', "keyno", "-1", G_TYPE_NUMBER }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-pPv] [-n keyno] [-i iterations] [-k keyfile] [-K newkeyfile] prov" + "[-pPv] [-n keyno] [-i iterations] [-k keyfile] [-K newkeyfile] prov" }, { "delkey", G_FLAG_VERBOSE, eli_main, { { 'a', "all", NULL, G_TYPE_BOOL }, { 'f', "force", NULL, G_TYPE_BOOL }, - { 'n', "keyno", &keyno, G_TYPE_NUMBER }, + { 'n', "keyno", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-afv] [-n keyno] prov" + "[-afv] [-n keyno] prov" }, { "kill", G_FLAG_VERBOSE, eli_main, { { 'a', "all", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-av] [prov ...]" + "[-av] [prov ...]" }, - { "backup", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, NULL, + { "backup", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, "[-v] prov file" }, - { "restore", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, NULL, + { "restore", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, "[-v] file prov" }, - { "clear", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, "[-v] prov ..." }, - { "dump", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, NULL, + { "dump", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, "[-v] prov ..." }, G_CMD_SENTINEL Modified: head/sbin/geom/class/journal/geom_journal.c ============================================================================== --- head/sbin/geom/class/journal/geom_journal.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/journal/geom_journal.c Mon Sep 13 13:48:18 2010 (r212554) @@ -47,18 +47,16 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_JOURNAL_VERSION; -static intmax_t default_jsize = -1; - static void journal_main(struct gctl_req *req, unsigned flags); static void journal_clear(struct gctl_req *req); static void journal_dump(struct gctl_req *req); static void journal_label(struct gctl_req *req); struct g_command class_commands[] = { - { "clear", G_FLAG_VERBOSE, journal_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, journal_main, G_NULL_OPTS, "[-v] prov ..." }, - { "dump", 0, journal_main, G_NULL_OPTS, NULL, + { "dump", 0, journal_main, G_NULL_OPTS, "prov ..." }, { "label", G_FLAG_VERBOSE, journal_main, @@ -66,19 +64,19 @@ struct g_command class_commands[] = { { 'c', "checksum", NULL, G_TYPE_BOOL }, { 'f', "force", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, - { 's', "jsize", &default_jsize, G_TYPE_NUMBER }, + { 's', "jsize", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-cfhv] [-s jsize] dataprov [jprov]" + "[-cfhv] [-s jsize] dataprov [jprov]" }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, - { "sync", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "sync", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v]" }, G_CMD_SENTINEL Modified: head/sbin/geom/class/label/geom_label.c ============================================================================== --- head/sbin/geom/class/label/geom_label.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/label/geom_label.c Mon Sep 13 13:48:18 2010 (r212554) @@ -55,31 +55,31 @@ static void label_dump(struct gctl_req * static void label_label(struct gctl_req *req); struct g_command PUBSYM(class_commands)[] = { - { "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS, "[-v] dev ..." }, { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, G_NULL_OPTS, - NULL, "[-v] name dev" + "[-v] name dev" }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, - { "dump", 0, label_main, G_NULL_OPTS, NULL, + { "dump", 0, label_main, G_NULL_OPTS, "dev ..." }, { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, label_main, G_NULL_OPTS, - NULL, "[-v] name dev" + "[-v] name dev" }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- head/sbin/geom/class/mirror/geom_mirror.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/mirror/geom_mirror.c Mon Sep 13 13:48:18 2010 (r212554) @@ -44,10 +44,9 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_MIRROR_VERSION; -#define GMIRROR_BALANCE "load" - -static intmax_t label_slice = 4096, configure_slice = -1; -static intmax_t insert_priority = 0, configure_priority = -1; +#define GMIRROR_BALANCE "load" +#define GMIRROR_SLICE "4096" +#define GMIRROR_PRIORITY "0" static void mirror_main(struct gctl_req *req, unsigned flags); static void mirror_activate(struct gctl_req *req); @@ -56,10 +55,10 @@ static void mirror_dump(struct gctl_req static void mirror_label(struct gctl_req *req); struct g_command class_commands[] = { - { "activate", G_FLAG_VERBOSE, mirror_main, G_NULL_OPTS, NULL, + { "activate", G_FLAG_VERBOSE, mirror_main, G_NULL_OPTS, "[-v] name prov ..." }, - { "clear", G_FLAG_VERBOSE, mirror_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, mirror_main, G_NULL_OPTS, "[-v] prov ..." }, { "configure", G_FLAG_VERBOSE, NULL, @@ -71,20 +70,20 @@ struct g_command class_commands[] = { { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, - { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, - { 's', "slice", &configure_slice, G_TYPE_NUMBER }, + { 'p', "priority", "-1", G_TYPE_NUMBER }, + { 's', "slice", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-adfFhnv] [-b balance] [-s slice] name\n" - "[-v] -p priority name prov" + "[-adfFhnv] [-b balance] [-s slice] name\n" + "[-v] -p priority name prov" }, - { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov ..." }, - { "dump", 0, mirror_main, G_NULL_OPTS, NULL, + { "dump", 0, mirror_main, G_NULL_OPTS, "prov ..." }, - { "forget", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "forget", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "name ..." }, { "label", G_FLAG_VERBOSE, mirror_main, @@ -93,24 +92,24 @@ struct g_command class_commands[] = { { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, - { 's', "slice", &label_slice, G_TYPE_NUMBER }, + { 's', "slice", GMIRROR_SLICE, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-Fhnv] [-b balance] [-s slice] name prov ..." + "[-Fhnv] [-b balance] [-s slice] name prov ..." }, { "insert", G_FLAG_VERBOSE, NULL, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'i', "inactive", NULL, G_TYPE_BOOL }, - { 'p', "priority", &insert_priority, G_TYPE_NUMBER }, + { 'p', "priority", GMIRROR_PRIORITY, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-hiv] [-p priority] name prov ..." + "[-hiv] [-p priority] name prov ..." }, - { "rebuild", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "rebuild", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov ..." }, - { "remove", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "remove", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov ..." }, { "stop", G_FLAG_VERBOSE, NULL, @@ -118,7 +117,7 @@ struct g_command class_commands[] = { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/mountver/geom_mountver.c ============================================================================== --- head/sbin/geom/class/mountver/geom_mountver.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/mountver/geom_mountver.c Mon Sep 13 13:48:18 2010 (r212554) @@ -43,14 +43,14 @@ struct g_command class_commands[] = { { G_OPT_SENTINEL }, - NULL, "[-v] dev ..." + "[-v] dev ..." }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] prov ..." + "[-fv] prov ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- head/sbin/geom/class/multipath/geom_multipath.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/multipath/geom_multipath.c Mon Sep 13 13:48:18 2010 (r212554) @@ -53,27 +53,27 @@ static void mp_add(struct gctl_req *); struct g_command class_commands[] = { { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, mp_main, G_NULL_OPTS, - NULL, "[-v] name prov ..." + "[-v] name prov ..." }, { "add", G_FLAG_VERBOSE | G_FLAG_LOADKLD, mp_main, G_NULL_OPTS, - NULL, "[-v] name prov ..." + "[-v] name prov ..." }, { "destroy", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, - NULL, "[-v] prov ..." + "[-v] prov ..." }, { "clear", G_FLAG_VERBOSE, mp_main, G_NULL_OPTS, - NULL, "[-v] prov ..." + "[-v] prov ..." }, { "rotate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, - NULL, "[-v] prov ..." + "[-v] prov ..." }, { "getactive", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, - NULL, "[-v] prov ..." + "[-v] prov ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/nop/geom_nop.c ============================================================================== --- head/sbin/geom/class/nop/geom_nop.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/nop/geom_nop.c Mon Sep 13 13:48:18 2010 (r212554) @@ -38,44 +38,37 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_NOP_VERSION; -static intmax_t error = -1; -static intmax_t rfailprob = -1; -static intmax_t wfailprob = -1; -static intmax_t offset = 0; -static intmax_t secsize = 0; -static intmax_t size = 0; - struct g_command class_commands[] = { { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { - { 'e', "error", &error, G_TYPE_NUMBER }, - { 'o', "offset", &offset, G_TYPE_NUMBER }, - { 'r', "rfailprob", &rfailprob, G_TYPE_NUMBER }, - { 's', "size", &size, G_TYPE_NUMBER }, - { 'S', "secsize", &secsize, G_TYPE_NUMBER }, - { 'w', "wfailprob", &wfailprob, G_TYPE_NUMBER }, + { 'e', "error", "-1", G_TYPE_NUMBER }, + { 'o', "offset", "0", G_TYPE_NUMBER }, + { 'r', "rfailprob", "-1", G_TYPE_NUMBER }, + { 's', "size", "0", G_TYPE_NUMBER }, + { 'S', "secsize", "0", G_TYPE_NUMBER }, + { 'w', "wfailprob", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] " + "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] " "[-S secsize] [-w wfailprob] dev ..." }, { "configure", G_FLAG_VERBOSE, NULL, { - { 'e', "error", &error, G_TYPE_NUMBER }, - { 'r', "rfailprob", &rfailprob, G_TYPE_NUMBER }, - { 'w', "wfailprob", &wfailprob, G_TYPE_NUMBER }, + { 'e', "error", "-1", G_TYPE_NUMBER }, + { 'r', "rfailprob", "-1", G_TYPE_NUMBER }, + { 'w', "wfailprob", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-v] [-e error] [-r rfailprob] [-w wfailprob] prov ..." + "[-v] [-e error] [-r rfailprob] [-w wfailprob] prov ..." }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] prov ..." + "[-fv] prov ..." }, - { "reset", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "reset", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] prov ..." }, G_CMD_SENTINEL Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/part/geom_part.c Mon Sep 13 13:48:18 2010 (r212554) @@ -58,15 +58,15 @@ __FBSDID("$FreeBSD$"); uint32_t PUBSYM(lib_version) = G_LIB_VERSION; uint32_t PUBSYM(version) = 0; -static char autofill[] = "*"; -static char flags[] = "C"; - static char sstart[32]; static char ssize[32]; -static const char const bootcode_param[] = "bootcode"; -static const char const index_param[] = "index"; -static const char const partcode_param[] = "partcode"; +#define GPART_AUTOFILL "*" +#define GPART_FLAGS "C" + +#define GPART_PARAM_BOOTCODE "bootcode" +#define GPART_PARAM_INDEX "index" +#define GPART_PARAM_PARTCODE "partcode" static struct gclass *find_class(struct gmesh *, const char *); static struct ggeom * find_geom(struct gclass *, const char *); @@ -87,76 +87,81 @@ static void gpart_write_partcode_vtoc8(s struct g_command PUBSYM(class_commands)[] = { { "add", 0, gpart_issue, { - { 'b', "start", autofill, G_TYPE_STRING }, - { 's', "size", autofill, G_TYPE_STRING }, + { 'b', "start", GPART_AUTOFILL, G_TYPE_STRING }, + { 's', "size", GPART_AUTOFILL, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, - { 'i', index_param, "", G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, "", G_TYPE_ASCNUM }, { 'l', "label", "", G_TYPE_STRING }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL + "[-b start] [-s size] -t type [-i index] [-l label] [-f flags] geom" }, { "bootcode", 0, gpart_bootcode, { - { 'b', bootcode_param, "", G_TYPE_STRING }, - { 'p', partcode_param, "", G_TYPE_STRING }, - { 'i', index_param, "", G_TYPE_ASCNUM }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 'b', GPART_PARAM_BOOTCODE, "", G_TYPE_STRING }, + { 'p', GPART_PARAM_PARTCODE, "", G_TYPE_STRING }, + { 'i', GPART_PARAM_INDEX, "", G_TYPE_ASCNUM }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL + "bootcode [-b bootcode] [-p partcode] [-i index] [-f flags] geom" + }, + { "commit", 0, gpart_issue, G_NULL_OPTS, + "geom" }, - { "commit", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, { "create", 0, gpart_issue, { { 's', "scheme", NULL, G_TYPE_STRING }, { 'n', "entries", "", G_TYPE_ASCNUM }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "provider", NULL + "-s scheme [-n entries] [-f flags] provider" }, { "delete", 0, gpart_issue, { - { 'i', index_param, NULL, G_TYPE_ASCNUM }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL + "-i index [-f flags] geom" }, { "destroy", 0, gpart_issue, { - { 'f', "flags", flags, G_TYPE_STRING }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL }, + "[-f flags] geom" + }, { "modify", 0, gpart_issue, { - { 'i', index_param, NULL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, { 'l', "label", "", G_TYPE_STRING }, { 't', "type", "", G_TYPE_STRING }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL + "-i index [-l label] [-t type] [-f flags] geom" }, { "set", 0, gpart_issue, { { 'a', "attrib", NULL, G_TYPE_STRING }, - { 'i', index_param, NULL, G_TYPE_ASCNUM }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL + "-a attrib -i index [-f flags] geom" }, { "show", 0, gpart_show, { { 'l', "show_label", NULL, G_TYPE_BOOL }, { 'r', "show_rawtype", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-lr] [geom ...]" + "[-lr] [geom ...]" + }, + { "undo", 0, gpart_issue, G_NULL_OPTS, + "geom" }, - { "undo", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, { "unset", 0, gpart_issue, { { 'a', "attrib", NULL, G_TYPE_STRING }, - { 'i', index_param, NULL, G_TYPE_ASCNUM }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL + "-a attrib -i index [-f flags] geom" }, { "resize", 0, gpart_issue, { - { 's', "size", autofill, G_TYPE_STRING }, - { 'i', index_param, NULL, G_TYPE_ASCNUM }, - { 'f', "flags", flags, G_TYPE_STRING }, + { 's', "size", GPART_AUTOFILL, G_TYPE_STRING }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "geom", NULL + "[-s size] -i index [-f flags] geom" }, G_CMD_SENTINEL }; @@ -281,7 +286,7 @@ gpart_autofill_resize(struct gctl_req *r char *val; int error, idx; - s = gctl_get_ascii(req, index_param); + s = gctl_get_ascii(req, GPART_PARAM_INDEX); idx = strtol(s, &val, 10); if (idx < 1 || *s == '\0' || *val != '\0') errx(EXIT_FAILURE, "invalid partition index"); @@ -773,11 +778,11 @@ gpart_bootcode(struct gctl_req *req, uns size_t bootsize, partsize; int error, idx, vtoc8; - if (gctl_has_param(req, bootcode_param)) { - s = gctl_get_ascii(req, bootcode_param); + if (gctl_has_param(req, GPART_PARAM_BOOTCODE)) { + s = gctl_get_ascii(req, GPART_PARAM_BOOTCODE); bootsize = 800 * 1024; /* Arbitrary limit. */ bootcode = gpart_bootfile_read(s, &bootsize); - error = gctl_change_param(req, bootcode_param, bootsize, + error = gctl_change_param(req, GPART_PARAM_BOOTCODE, bootsize, bootcode); if (error) errc(EXIT_FAILURE, error, "internal error"); @@ -797,7 +802,7 @@ gpart_bootcode(struct gctl_req *req, uns geom_deletetree(&mesh); errx(EXIT_FAILURE, "Class %s not found.", s); } - s = gctl_get_ascii(req, "geom"); + s = gctl_get_ascii(req, "arg0"); if (s == NULL) abort(); gp = find_geom(classp, s); @@ -808,11 +813,11 @@ gpart_bootcode(struct gctl_req *req, uns if (strcmp(s, "VTOC8") == 0) vtoc8 = 1; - if (gctl_has_param(req, partcode_param)) { - s = gctl_get_ascii(req, partcode_param); + if (gctl_has_param(req, GPART_PARAM_PARTCODE)) { + s = gctl_get_ascii(req, GPART_PARAM_PARTCODE); partsize = vtoc8 != 0 ? VTOC_BOOTSIZE : bootsize * 1024; partcode = gpart_bootfile_read(s, &partsize); - error = gctl_delete_param(req, partcode_param); + error = gctl_delete_param(req, GPART_PARAM_PARTCODE); if (error) errc(EXIT_FAILURE, error, "internal error"); } else { @@ -820,14 +825,14 @@ gpart_bootcode(struct gctl_req *req, uns partsize = 0; } - if (gctl_has_param(req, index_param)) { + if (gctl_has_param(req, GPART_PARAM_INDEX)) { if (partcode == NULL) errx(EXIT_FAILURE, "-i is only valid with -p"); - s = gctl_get_ascii(req, index_param); + s = gctl_get_ascii(req, GPART_PARAM_INDEX); idx = strtol(s, &sp, 10); if (idx < 1 || *s == '\0' || *sp != '\0') errx(EXIT_FAILURE, "invalid partition index"); - error = gctl_delete_param(req, index_param); + error = gctl_delete_param(req, GPART_PARAM_INDEX); if (error) errc(EXIT_FAILURE, error, "internal error"); } else @@ -858,6 +863,10 @@ gpart_issue(struct gctl_req *req, unsign const char *errstr; int error, status; + if (gctl_get_int(req, "nargs") != 1) + errx(EXIT_FAILURE, "Invalid number of arguments."); + (void)gctl_delete_param(req, "nargs"); + /* autofill parameters (if applicable). */ error = gpart_autofill(req); if (error) { Modified: head/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- head/sbin/geom/class/raid3/geom_raid3.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/raid3/geom_raid3.c Mon Sep 13 13:48:18 2010 (r212554) @@ -45,15 +45,13 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_RAID3_VERSION; -static intmax_t default_blocksize = 0; - static void raid3_main(struct gctl_req *req, unsigned f); static void raid3_clear(struct gctl_req *req); static void raid3_dump(struct gctl_req *req); static void raid3_label(struct gctl_req *req); struct g_command class_commands[] = { - { "clear", G_FLAG_VERBOSE, raid3_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, raid3_main, G_NULL_OPTS, "[-v] prov ..." }, { "configure", G_FLAG_VERBOSE, NULL, @@ -70,9 +68,9 @@ struct g_command class_commands[] = { { 'W', "noverify", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-adfFhnrRvwW] name" + "[-adfFhnrRvwW] name" }, - { "dump", 0, raid3_main, G_NULL_OPTS, NULL, + { "dump", 0, raid3_main, G_NULL_OPTS, "prov ..." }, { "insert", G_FLAG_VERBOSE, NULL, @@ -81,7 +79,7 @@ struct g_command class_commands[] = { { 'n', "number", NULL, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-hv] <-n number> name prov" + "[-hv] <-n number> name prov" }, { "label", G_FLAG_VERBOSE, raid3_main, { @@ -89,13 +87,13 @@ struct g_command class_commands[] = { { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, { 'r', "round_robin", NULL, G_TYPE_BOOL }, - { 's', "blocksize", &default_blocksize, G_TYPE_NUMBER }, + { 's', "sectorsize", "0", G_TYPE_NUMBER }, { 'w', "verify", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-hFnrvw] [-s blocksize] name prov prov prov ..." + "[-hFnrvw] [-s blocksize] name prov prov prov ..." }, - { "rebuild", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, + { "rebuild", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov" }, { "remove", G_FLAG_VERBOSE, NULL, @@ -103,14 +101,14 @@ struct g_command class_commands[] = { { 'n', "number", NULL, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-v] <-n number> name" + "[-v] <-n number> name" }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, G_CMD_SENTINEL }; @@ -193,7 +191,7 @@ raid3_label(struct gctl_req *req) * sectorsizes of every disk and find the smallest mediasize. */ mediasize = 0; - sectorsize = gctl_get_intmax(req, "blocksize"); + sectorsize = gctl_get_intmax(req, "sectorsize"); for (i = 1; i < nargs; i++) { str = gctl_get_ascii(req, "arg%d", i); msize = g_get_mediasize(str); Modified: head/sbin/geom/class/sched/geom_sched.c ============================================================================== --- head/sbin/geom/class/sched/geom_sched.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/sched/geom_sched.c Mon Sep 13 13:48:18 2010 (r212554) @@ -60,11 +60,13 @@ uint32_t version = G_SCHED_VERSION; * Adapt to differences in geom library. * in V1 struct g_command misses gc_argname, eld, and G_BOOL is undefined */ -#if G_LIB_VERSION == 1 -#define G_ARGNAME +#if G_LIB_VERSION <= 1 #define G_TYPE_BOOL G_TYPE_NUMBER -#else +#endif +#if G_LIB_VERSION >= 3 && G_LIB_VERSION <= 4 #define G_ARGNAME NULL, +#else +#define G_ARGNAME #endif static void Modified: head/sbin/geom/class/shsec/geom_shsec.c ============================================================================== --- head/sbin/geom/class/shsec/geom_shsec.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/shsec/geom_shsec.c Mon Sep 13 13:48:18 2010 (r212554) @@ -52,10 +52,10 @@ static void shsec_dump(struct gctl_req * static void shsec_label(struct gctl_req *req); struct g_command class_commands[] = { - { "clear", G_FLAG_VERBOSE, shsec_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, shsec_main, G_NULL_OPTS, "[-v] prov ..." }, - { "dump", 0, shsec_main, G_NULL_OPTS, NULL, + { "dump", 0, shsec_main, G_NULL_OPTS, "prov ..." }, { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, shsec_main, @@ -63,14 +63,14 @@ struct g_command class_commands[] = { { 'h', "hardcode", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-hv] name prov prov ..." + "[-hv] name prov prov ..." }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/stripe/geom_stripe.c ============================================================================== --- head/sbin/geom/class/stripe/geom_stripe.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/stripe/geom_stripe.c Mon Sep 13 13:48:18 2010 (r212554) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_STRIPE_VERSION; -static intmax_t default_stripesize = 65536; +#define GSTRIPE_STRIPESIZE "65536" static void stripe_main(struct gctl_req *req, unsigned flags); static void stripe_clear(struct gctl_req *req); @@ -54,40 +54,40 @@ static void stripe_dump(struct gctl_req static void stripe_label(struct gctl_req *req); struct g_command class_commands[] = { - { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS, NULL, + { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS, "[-v] prov ..." }, { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { - { 's', "stripesize", &default_stripesize, G_TYPE_NUMBER }, + { 's', "stripesize", GSTRIPE_STRIPESIZE, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-hv] [-s stripesize] name prov prov ..." + "[-hv] [-s stripesize] name prov prov ..." }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, - { "dump", 0, stripe_main, G_NULL_OPTS, NULL, + { "dump", 0, stripe_main, G_NULL_OPTS, "prov ..." }, { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, stripe_main, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, - { 's', "stripesize", &default_stripesize, G_TYPE_NUMBER }, + { 's', "stripesize", GSTRIPE_STRIPESIZE, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-hv] [-s stripesize] name prov prov ..." + "[-hv] [-s stripesize] name prov prov ..." }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-fv] name ..." + "[-fv] name ..." }, G_CMD_SENTINEL }; Modified: head/sbin/geom/class/virstor/geom_virstor.c ============================================================================== --- head/sbin/geom/class/virstor/geom_virstor.c Mon Sep 13 13:11:50 2010 (r212553) +++ head/sbin/geom/class/virstor/geom_virstor.c Mon Sep 13 13:48:18 2010 (r212554) @@ -48,8 +48,9 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_VIRSTOR_VERSION; -static intmax_t chunk_size = 4 * 1024 * 1024; /* in kB (default: 4 MB) */ -static intmax_t vir_size = 2ULL << 40; /* in MB (default: 2 TB) */ + +#define GVIRSTOR_CHUNK_SIZE "4M" +#define GVIRSTOR_VIR_SIZE "2T" #if G_LIB_VERSION == 1 /* Support RELENG_6 */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 13:59:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAC8A1065672; Mon, 13 Sep 2010 13:59:28 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98A3D8FC15; Mon, 13 Sep 2010 13:59:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DDxS5M004701; Mon, 13 Sep 2010 13:59:28 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DDxSLm004698; Mon, 13 Sep 2010 13:59:28 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009131359.o8DDxSLm004698@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 13 Sep 2010 13:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212555 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 13:59:28 -0000 Author: pjd Date: Mon Sep 13 13:59:28 2010 New Revision: 212555 URL: http://svn.freebsd.org/changeset/base/212555 Log: Add G_TYPE_MULTI flag, which when set for the given option, will allow the option to be specified multiple times. This will help to implement things like passing multiple keyfiles to geli(8) instead of cat(1)ing them all into stdin and reading from there using one '-k -' option. Modified: head/sbin/geom/core/geom.c head/sbin/geom/core/geom.h Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Mon Sep 13 13:48:18 2010 (r212554) +++ head/sbin/geom/core/geom.c Mon Sep 13 13:59:28 2010 (r212555) @@ -234,9 +234,31 @@ find_option(struct g_command *cmd, char static void set_option(struct gctl_req *req, struct g_option *opt, const char *val) { + const char *optname; uint64_t number; void *ptr; + if (G_OPT_ISMULTI(opt)) { + size_t optnamesize; + + if (G_OPT_NUM(opt) == UCHAR_MAX) + errx(EXIT_FAILURE, "Too many -%c options.", opt->go_char); + + /* + * Base option name length plus 3 bytes for option number + * (max. 255 options) plus 1 byte for terminating '\0'. + */ + optnamesize = strlen(opt->go_name) + 3 + 1; + ptr = malloc(optnamesize); + if (ptr == NULL) + errx(EXIT_FAILURE, "No memory."); + snprintf(ptr, optnamesize, "%s%u", opt->go_name, G_OPT_NUM(opt)); + G_OPT_NUMINC(opt); + optname = ptr; + } else { + optname = opt->go_name; + } + if (G_OPT_TYPE(opt) == G_TYPE_NUMBER || G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { if (expand_number(val, &number) == -1) { @@ -249,27 +271,30 @@ set_option(struct gctl_req *req, struct errx(EXIT_FAILURE, "No memory."); *(intmax_t *)ptr = number; opt->go_val = ptr; - gctl_ro_param(req, opt->go_name, sizeof(intmax_t), + gctl_ro_param(req, optname, sizeof(intmax_t), opt->go_val); } else { asprintf((void *)(&ptr), "%jd", number); if (ptr == NULL) errx(EXIT_FAILURE, "No memory."); opt->go_val = ptr; - gctl_ro_param(req, opt->go_name, -1, opt->go_val); + gctl_ro_param(req, optname, -1, opt->go_val); } } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { - gctl_ro_param(req, opt->go_name, -1, val); + gctl_ro_param(req, optname, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { ptr = malloc(sizeof(int)); if (ptr == NULL) errx(EXIT_FAILURE, "No memory."); *(int *)ptr = *val - '0'; opt->go_val = ptr; - gctl_ro_param(req, opt->go_name, sizeof(int), opt->go_val); + gctl_ro_param(req, optname, sizeof(int), opt->go_val); } else { assert(!"Invalid type"); } + + if (G_OPT_ISMULTI(opt)) + free(__DECONST(char *, optname)); } /* @@ -294,7 +319,10 @@ parse_arguments(struct g_command *cmd, s if (opt->go_name == NULL) break; assert(G_OPT_TYPE(opt) != 0); - assert((opt->go_type & ~G_TYPE_MASK) == 0); + assert((opt->go_type & ~(G_TYPE_MASK | G_TYPE_MULTI)) == 0); + /* Multiple bool arguments makes no sense. */ + assert(G_OPT_TYPE(opt) != G_TYPE_BOOL || + (opt->go_type & G_TYPE_MULTI) == 0); strlcatf(opts, sizeof(opts), "%c", opt->go_char); if (G_OPT_TYPE(opt) != G_TYPE_BOOL) strlcat(opts, ":", sizeof(opts)); @@ -314,7 +342,7 @@ parse_arguments(struct g_command *cmd, s opt = find_option(cmd, ch); if (opt == NULL) usage(); - if (G_OPT_ISDONE(opt)) { + if (!G_OPT_ISMULTI(opt) && G_OPT_ISDONE(opt)) { warnx("Option '%c' specified twice.", opt->go_char); usage(); } Modified: head/sbin/geom/core/geom.h ============================================================================== --- head/sbin/geom/core/geom.h Mon Sep 13 13:48:18 2010 (r212554) +++ head/sbin/geom/core/geom.h Mon Sep 13 13:59:28 2010 (r212555) @@ -41,11 +41,17 @@ #define G_TYPE_ASCNUM 0x04 #define G_TYPE_MASK 0x0f #define G_TYPE_DONE 0x10 +#define G_TYPE_MULTI 0x20 +#define G_TYPE_NUMMASK 0xff00 +#define G_TYPE_NUMSHIFT 8 #define G_OPT_MAX 16 #define G_OPT_DONE(opt) do { (opt)->go_type |= G_TYPE_DONE; } while (0) #define G_OPT_ISDONE(opt) ((opt)->go_type & G_TYPE_DONE) +#define G_OPT_ISMULTI(opt) ((opt)->go_type & G_TYPE_MULTI) #define G_OPT_TYPE(opt) ((opt)->go_type & G_TYPE_MASK) +#define G_OPT_NUM(opt) (((opt)->go_type & G_TYPE_NUMMASK) >> G_TYPE_NUMSHIFT) +#define G_OPT_NUMINC(opt) ((opt)->go_type += (1 << G_TYPE_NUMSHIFT)) #define G_OPT_SENTINEL { '\0', NULL, NULL, G_TYPE_NONE } #define G_NULL_OPTS { G_OPT_SENTINEL } From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 14:11:29 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id E575F106564A; Mon, 13 Sep 2010 14:11:28 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Mon, 13 Sep 2010 23:11:28 +0900 From: Norikatsu Shigemura To: Andriy Gapon Message-Id: <20100913231128.c674dfe8.nork@FreeBSD.org> In-Reply-To: <201009130951.o8D9pOsr085093@svn.freebsd.org> References: <201009130951.o8D9pOsr085093@svn.freebsd.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.20.1; i386-portbld-freebsd8.1) 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 Subject: Re: svn commit: r212549 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 14:11:29 -0000 Hi avg! On Mon, 13 Sep 2010 09:51:24 +0000 (UTC) Andriy Gapon wrote: > Author: avg > Date: Mon Sep 13 09:51:24 2010 > New Revision: 212549 > URL: http://svn.freebsd.org/changeset/base/212549 > Log: > acpi_cpu: do not apply P_LVLx_LAT rules to latencies returned by _CST > ACPI specification sates that if P_LVL2_LAT > 100, then a system doesn't > support C2; if P_LVL3_LAT > 1000, then C3 is not supported. > But there are no such rules for Cx state data returned by _CST. If a > state is not supported it should not be included into the return > package. In other words, any latency value returned by _CST is valid, > it's up to the OS and/or user to decide whether to use it. > Submitted by: nork > Suggested by: mav > MFC after: 1 week Thank you! > Modified: > head/sys/dev/acpica/acpi_cpu.c > > Modified: head/sys/dev/acpica/acpi_cpu.c > ============================================================================== > --- head/sys/dev/acpica/acpi_cpu.c Mon Sep 13 09:23:38 2010 (r212548) > +++ head/sys/dev/acpica/acpi_cpu.c Mon Sep 13 09:51:24 2010 (r212549) > @@ -690,19 +690,11 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s > sc->cpu_cx_count++; > continue; > case ACPI_STATE_C2: > - if (cx_ptr->trans_lat > 100) { > - ACPI_DEBUG_PRINT((ACPI_DB_INFO, > - "acpi_cpu%d: C2[%d] not available.\n", > - device_get_unit(sc->cpu_dev), i)); > - continue; > - } > sc->cpu_non_c3 = i; > break; > case ACPI_STATE_C3: > default: > - if (cx_ptr->trans_lat > 1000 || > - (cpu_quirks & CPU_QUIRK_NO_C3) != 0) { > - > + if ((cpu_quirks & CPU_QUIRK_NO_C3) != 0) { > ACPI_DEBUG_PRINT((ACPI_DB_INFO, > "acpi_cpu%d: C3[%d] not available.\n", > device_get_unit(sc->cpu_dev), i)); -- Norikatsu Shigemura From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 14:25:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3042E106564A; Mon, 13 Sep 2010 14:25:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9CC8FC0C; Mon, 13 Sep 2010 14:25:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DEP8jN006434; Mon, 13 Sep 2010 14:25:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DEP89A006432; Mon, 13 Sep 2010 14:25:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009131425.o8DEP89A006432@svn.freebsd.org> From: Alexander Motin Date: Mon, 13 Sep 2010 14:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212556 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 14:25:08 -0000 Author: mav Date: Mon Sep 13 14:25:07 2010 New Revision: 212556 URL: http://svn.freebsd.org/changeset/base/212556 Log: Change call order to enable interrupts only after timer being programmed. Submitted by: nwhitehorn Modified: head/sys/powerpc/powerpc/mp_machdep.c Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Mon Sep 13 13:59:28 2010 (r212555) +++ head/sys/powerpc/powerpc/mp_machdep.c Mon Sep 13 14:25:07 2010 (r212556) @@ -91,12 +91,12 @@ machdep_ap_bootstrap(void) PCPU_SET(curthread, PCPU_GET(idlethread)); PCPU_SET(curpcb, curthread->td_pcb); - /* Let the DEC and external interrupts go */ - mtmsr(mfmsr() | PSL_EE); - /* Start per-CPU event timers. */ cpu_initclocks_ap(); + /* Let the DEC and external interrupts go */ + mtmsr(mfmsr() | PSL_EE); + /* Announce ourselves awake, and enter the scheduler */ sched_throw(NULL); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 15:06:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 059071065670; Mon, 13 Sep 2010 15:06:55 +0000 (UTC) Date: Mon, 13 Sep 2010 15:06:55 +0000 From: Alexander Best To: Pawel Jakub Dawidek Message-ID: <20100913150654.GA23703@freebsd.org> References: <201009131348.o8DDmJL8004159@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009131348.o8DDmJL8004159@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212554 - in head: sbin/geom/class/cache sbin/geom/class/concat sbin/geom/class/eli sbin/geom/class/journal sbin/geom/class/label sbin/geom/class/mirror sbin/geom/class/mountver sbin/ge... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 15:06:55 -0000 hi there, could you take a quick peek at PR #150239 to see if the patch for g_part.c is a reasonable change? thanks. alex -- a13x From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 15:10:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B87151065679; Mon, 13 Sep 2010 15:10:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 88DCC8FC14; Mon, 13 Sep 2010 15:10:31 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2393146C0D; Mon, 13 Sep 2010 11:10:31 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3F47A8A03C; Mon, 13 Sep 2010 11:10:30 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Mon, 13 Sep 2010 08:48:33 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201009131147.o8DBla8x095589@svn.freebsd.org> <4C8E144C.3030405@freebsd.org> In-Reply-To: <4C8E144C.3030405@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201009130848.34144.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Sep 2010 11:10:30 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: "Jayachandran C." , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212550 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 15:10:31 -0000 On Monday, September 13, 2010 8:08:44 am Andriy Gapon wrote: > on 13/09/2010 14:47 Jayachandran C. said the following: > > Author: jchandra > > Date: Mon Sep 13 11:47:35 2010 > > New Revision: 212550 > > URL: http://svn.freebsd.org/changeset/base/212550 > > > > Log: > > bus_add_child method is needed now. > > Just a note: bus_add_child method needs to be defined only if it's actually > used, i.e. a device/bus has at least one child that calls BUS_ADD_CHILD. And that generally only happens in device_identify() methods of drivers that live on the bus. If a bus can self-enumerate devices (e.g. PCI) it should use device_add_child() directly. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 15:30:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEDFF106566B; Mon, 13 Sep 2010 15:30:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD1968FC13; Mon, 13 Sep 2010 15:30:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DFU95p010736; Mon, 13 Sep 2010 15:30:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DFU9f5010734; Mon, 13 Sep 2010 15:30:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009131530.o8DFU9f5010734@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 15:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212558 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 15:30:09 -0000 Author: imp Date: Mon Sep 13 15:30:09 2010 New Revision: 212558 URL: http://svn.freebsd.org/changeset/base/212558 Log: Move to using Makefile.arch to include the proper target-specific programs. Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Sep 13 15:19:49 2010 (r212557) +++ head/usr.bin/Makefile Mon Sep 13 15:30:09 2010 (r212558) @@ -11,48 +11,29 @@ SUBDIR= alias \ apply \ - ${_ar} \ asa \ - ${_at} \ - ${_atm} \ awk \ banner \ basename \ - ${_bc} \ - ${_biff} \ - ${_bluetooth} \ brandelf \ bsdiff \ bzip2 \ bzip2recover \ - ${_c89} \ - ${_c99} \ - ${_calendar} \ cap_mkdb \ - ${_catman} \ chat \ - ${_checknr} \ - ${_chkey} \ chpass \ cksum \ ${_clang} \ cmp \ col \ - ${_colcrt} \ colldef \ colrm \ column \ comm \ - ${_compile_et} \ compress \ - ${_cpio} \ cpuset \ csplit \ - ${_csup} \ - ${_ctags} \ cut \ - ${_dc} \ - ${_dig} \ dirname \ du \ ee \ @@ -64,12 +45,10 @@ SUBDIR= alias \ false \ fetch \ file \ - ${_file2c} \ find \ finger \ fmt \ fold \ - ${_from} \ fstat \ fsync \ ftp \ @@ -78,15 +57,11 @@ SUBDIR= alias \ getconf \ getent \ getopt \ - ${_gprof} \ ${_grep} \ gzip \ head \ - ${_hesinfo} \ hexdump \ - ${_host} \ id \ - ${_indent} \ ipcrm \ ipcs \ join \ @@ -105,10 +80,8 @@ SUBDIR= alias \ less \ lessecho \ lesskey \ - ${_lex} \ limits \ locale \ - ${_locate} \ lock \ lockf \ logger \ @@ -120,8 +93,6 @@ SUBDIR= alias \ lsvfs \ lzmainfo \ m4 \ - ${_mail} \ - ${_make} \ ${_makewhatis} \ mesg \ minigzip \ @@ -129,24 +100,16 @@ SUBDIR= alias \ mkdep \ mkfifo \ mklocale \ - ${_mkstr} \ mktemp \ mkuzip \ - ${_msgs} \ mt \ - ${_nc} \ ncal \ - ${_ncplist} \ - ${_ncplogin} \ netstat \ newgrp \ - ${_newkey} \ nfsstat \ nice \ nl \ nohup \ - ${_nslookup} \ - ${_nsupdate} \ opieinfo \ opiekey \ opiepasswd \ @@ -159,26 +122,19 @@ SUBDIR= alias \ printenv \ printf \ procstat \ - ${_quota} \ renice \ rev \ revoke \ - ${_rlogin} \ - ${_rpcgen} \ rpcinfo \ rs \ - ${_rsh} \ rup \ - ${_ruptime} \ rusers \ rwall \ - ${_rwho} \ script \ sed \ seq \ shar \ showmount \ - ${_smbutil} \ sockstat \ split \ stat \ @@ -190,7 +146,6 @@ SUBDIR= alias \ tar \ tcopy \ tee \ - ${_telnet} \ tftp \ time \ tip \ @@ -200,25 +155,19 @@ SUBDIR= alias \ tr \ true \ truncate \ - ${_truss} \ + truss \ tset \ tsort \ tty \ - ${_ul} \ uname \ unexpand \ - ${_unifdef} \ uniq \ unzip \ units \ unvis \ - ${_usbhidaction} \ - ${_usbhidctl} \ users \ uudecode \ uuencode \ - ${_vacation} \ - ${_vgrind} \ vi \ vis \ vmstat \ @@ -244,37 +193,33 @@ SUBDIR= alias \ ${_ypmatch} \ ${_ypwhich} -.if ${MACHINE_ARCH} != "arm" -_truss= truss -.endif - # NB: keep these sorted by MK_* knobs .if ${MK_AT} != "no" -_at= at +SUBDIR+= at .endif .if ${MK_ATM} != "no" -_atm= atm +SUBDIR+= atm .endif .if ${MK_MAN_UTILS} != "no" -_catman= catman +SUBDIR+= catman .endif .if ${MK_BIND_UTILS} != "no" -_dig= dig -_host= host -_nslookup= nslookup -_nsupdate= nsupdate +SUBDIR+= dig +SUBDIR+= host +SUBDIR+= nslookup +SUBDIR+= nsupdate .endif .if ${MK_BLUETOOTH} != "no" -_bluetooth= bluetooth +SUBDIR+= bluetooth .endif .if ${MK_BSD_CPIO} != "no" -_cpio= cpio +SUBDIR+= cpio .endif .if ${MK_BSD_GREP} != "no" @@ -282,7 +227,7 @@ _grep= grep .endif .if ${MK_CALENDAR} != "no" -_calendar= calendar +SUBDIR+= calendar .endif .if ${MK_CLANG} != "no" @@ -290,33 +235,33 @@ _clang= clang .endif .if ${MK_HESIOD} != "no" -_hesinfo= hesinfo +SUBDIR+= hesinfo .endif .if ${MK_OPENSSL} != "no" -_bc= bc -_chkey= chkey -_dc= dc -_newkey= newkey +SUBDIR+= bc +SUBDIR+= chkey +SUBDIR+= dc +SUBDIR+= newkey .if ${MK_LIBTHR} != "no" -_csup= csup +SUBDIR+= csup .endif .endif .if ${MK_LOCATE} != "no" -_locate= locate +SUBDIR+= locate .endif # XXX msgs? .if ${MK_MAIL} != "no" -_biff= biff -_from= from -_mail= mail -_msgs= msgs +SUBDIR+= biff +SUBDIR+= from +SUBDIR+= mail +SUBDIR+= msgs .endif .if ${MK_MAKE} != "no" -_make= make +SUBDIR+= make .endif .if ${MK_MAN_UTILS} != "no" @@ -324,91 +269,67 @@ _makewhatis= makewhatis .endif .if ${MK_NETCAT} != "no" -_nc= nc +SUBDIR+= nc .endif .if ${MK_NIS} != "no" -_ypcat= ypcat -_ypmatch= ypmatch -_ypwhich= ypwhich +SUBDIR+= ypcat +SUBDIR+= ypmatch +SUBDIR+= ypwhich .endif .if ${MK_QUOTAS} != "no" -_quota= quota +SUBDIR+= quota .endif .if ${MK_RCMDS} != "no" -_rlogin= rlogin -_rsh= rsh -_ruptime= ruptime -_rwho= rwho +SUBDIR+= rlogin +SUBDIR+= rsh +SUBDIR+= ruptime +SUBDIR+= rwho .endif .if ${MK_SENDMAIL} != "no" -_vacation= vacation +SUBDIR+= vacation .endif .if ${MK_TELNET} != "no" -_telnet= telnet +SUBDIR+= telnet .endif .if ${MK_TEXTPROC} != "no" -_checknr= checknr -_colcrt= colcrt -_ul= ul +SUBDIR+= checknr +SUBDIR+= colcrt +SUBDIR+= ul .endif .if ${MK_TOOLCHAIN} != "no" -_ar= ar -_c89= c89 -_c99= c99 -_compile_et= compile_et -_ctags= ctags -_file2c= file2c -_gprof= gprof -_indent= indent -_lex= lex -_mkstr= mkstr -_rpcgen= rpcgen -_unifdef= unifdef -_xlint= xlint -_xstr= xstr +SUBDIR+= ar +SUBDIR+= c89 +SUBDIR+= c99 +SUBDIR+= compile_et +SUBDIR+= ctags +SUBDIR+= file2c +SUBDIR+= gprof +SUBDIR+= indent +SUBDIR+= lex +SUBDIR+= mkstr +SUBDIR+= rpcgen +SUBDIR+= unifdef +SUBDIR+= xlint +SUBDIR+= xstr # XXX maybe under textproc? -_vgrind= vgrind -_yacc= yacc +SUBDIR+= vgrind +SUBDIR+= yacc .endif .if ${MK_USB} != "no" -_usbhidaction= usbhidaction -_usbhidctl= usbhidctl -.endif - -.if ${MACHINE_ARCH} == "i386" -.if ${MK_NCP} != "no" -_ncplist= ncplist -_ncplogin= ncplogin -.endif -_smbutil= smbutil -.endif - -.if ${MACHINE_ARCH} == "ia64" -_smbutil= smbutil -.endif - -.if ${MACHINE_ARCH} == "amd64" -.if ${MK_NCP} != "no" -_ncplist= ncplist -_ncplogin= ncplogin -.endif -_smbutil= smbutil +SUBDIR+= usbhidaction +SUBDIR+= usbhidctl .endif -.if ${MACHINE_ARCH} == "powerpc" -_smbutil= smbutil -.endif +.include -.if ${MACHINE_ARCH} == "sparc64" -_smbutil= smbutil -.endif +SUBDIR:= ${SUBDIR:O} .include From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 15:36:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81DE81065672; Mon, 13 Sep 2010 15:36:42 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 702698FC0A; Mon, 13 Sep 2010 15:36:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DFagu2011229; Mon, 13 Sep 2010 15:36:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DFagHW011227; Mon, 13 Sep 2010 15:36:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201009131536.o8DFagHW011227@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 13 Sep 2010 15:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212559 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 15:36:42 -0000 Author: nwhitehorn Date: Mon Sep 13 15:36:42 2010 New Revision: 212559 URL: http://svn.freebsd.org/changeset/base/212559 Log: Fix a subtle bug uncovered by the recent one-shot timer import in which any spin locks acquired between the enabling of interrupts in machdep_ap_bootstrap() and the invocation of the scheduler would fail to have interrupts disabled due to the fake spinlock already held by the idle thread. sched_throw(NULL) will enable interrupts by itself when exiting this spinlock, so just let it do that and don't enable interrupts here. Modified: head/sys/powerpc/powerpc/mp_machdep.c Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Mon Sep 13 15:30:09 2010 (r212558) +++ head/sys/powerpc/powerpc/mp_machdep.c Mon Sep 13 15:36:42 2010 (r212559) @@ -94,9 +94,6 @@ machdep_ap_bootstrap(void) /* Start per-CPU event timers. */ cpu_initclocks_ap(); - /* Let the DEC and external interrupts go */ - mtmsr(mfmsr() | PSL_EE); - /* Announce ourselves awake, and enter the scheduler */ sched_throw(NULL); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 16:39:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3381E106564A; Mon, 13 Sep 2010 16:39:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 223288FC0C; Mon, 13 Sep 2010 16:39:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DGdYNb015259; Mon, 13 Sep 2010 16:39:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DGdYeG015255; Mon, 13 Sep 2010 16:39:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009131639.o8DGdYeG015255@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 16:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212560 - in head/sys: conf mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 16:39:34 -0000 Author: imp Date: Mon Sep 13 16:39:33 2010 New Revision: 212560 URL: http://svn.freebsd.org/changeset/base/212560 Log: TARGET_64BIT isn't needed anymore, GC it (partial merge from tbemd). Modified: head/sys/conf/Makefile.mips head/sys/mips/conf/MALTA64 head/sys/mips/conf/OCTEON1 Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Mon Sep 13 15:36:42 2010 (r212559) +++ head/sys/conf/Makefile.mips Mon Sep 13 16:39:33 2010 (r212560) @@ -54,20 +54,12 @@ SYSTEM_LD+=-EB EXTRA_FLAGS+=-EB TRAMP_LDFLAGS+=-Wl,-EB HACK_EXTRA_FLAGS+=-EB -Wl,-EB -.if defined(TARGET_64BIT) -SYSTEM_LD+=-m elf64btsmip_fbsd -HACK_EXTRA_FLAGS+=-Wl,-m,elf64btsmip_fbsd -.endif .else CFLAGS+=-EL SYSTEM_LD+=-EL EXTRA_FLAGS+=-EL TRAMP_LDFLAGS+=-Wl,-EL HACK_EXTRA_FLAGS+=-EL -Wl,-EL -.if defined(TARGET_64BIT) -SYSTEM_LD+=-m elf64ltsmip_fbsd -HACK_EXTRA_FLAGS+=-Wl,-m,elf64ltsmip_fbsd -.endif .endif Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Mon Sep 13 15:36:42 2010 (r212559) +++ head/sys/mips/conf/MALTA64 Mon Sep 13 16:39:33 2010 (r212560) @@ -21,7 +21,6 @@ ident MALTA makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" makeoptions MIPS_LITTLE_ENDIAN=defined -makeoptions TARGET_64BIT=t makeoptions LDSCRIPT_NAME= ldscript.mips.mips64 options YAMON Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Mon Sep 13 15:36:42 2010 (r212559) +++ head/sys/mips/conf/OCTEON1 Mon Sep 13 16:39:33 2010 (r212560) @@ -34,7 +34,6 @@ makeoptions LDSCRIPT_NAME=ldscript.mips. # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" makeoptions TARGET_BIG_ENDIAN=defined -makeoptions TARGET_64BIT=defined makeoptions KERNLOADADDR=0xffffffff80100000 include "../cavium/std.octeon1" From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:18:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F640106564A; Mon, 13 Sep 2010 17:18:50 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6788FC19; Mon, 13 Sep 2010 17:18:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DHInJr018135; Mon, 13 Sep 2010 17:18:49 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DHInpI018132; Mon, 13 Sep 2010 17:18:49 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009131718.o8DHInpI018132@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 13 Sep 2010 17:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212562 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:18:50 -0000 Author: mdf Date: Mon Sep 13 17:18:49 2010 New Revision: 212562 URL: http://svn.freebsd.org/changeset/base/212562 Log: MFC r209053: Add INVARIANTS checking that numfreebufs values are sane. Also add a per-buf flag to catch if a buf is double-counted in the free count. This code was useful to debug an instance where a local patch at Isilon was incorrectly managing numfreebufs for a new buf state. Requested by: Kostic Belousov Modified: stable/8/sys/kern/vfs_bio.c stable/8/sys/sys/buf.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_bio.c ============================================================================== --- stable/8/sys/kern/vfs_bio.c Mon Sep 13 16:43:41 2010 (r212561) +++ stable/8/sys/kern/vfs_bio.c Mon Sep 13 17:18:49 2010 (r212562) @@ -385,10 +385,16 @@ runningbufwakeup(struct buf *bp) */ static __inline void -bufcountwakeup(void) +bufcountwakeup(struct buf *bp) { + int old; - atomic_add_int(&numfreebuffers, 1); + KASSERT((bp->b_vflags & BV_INFREECNT) == 0, + ("buf %p already counted as free", bp)); + bp->b_vflags |= BV_INFREECNT; + old = atomic_fetchadd_int(&numfreebuffers, 1); + KASSERT(old >= 0 && old < nbuf, + ("numfreebuffers climbed to %d", old + 1)); mtx_lock(&nblock); if (needsbuffer) { needsbuffer &= ~VFS_BIO_NEED_ANY; @@ -576,7 +582,7 @@ bufinit(void) bp->b_rcred = NOCRED; bp->b_wcred = NOCRED; bp->b_qindex = QUEUE_EMPTY; - bp->b_vflags = 0; + bp->b_vflags = BV_INFREECNT; /* buf is counted as free */ bp->b_xflags = 0; LIST_INIT(&bp->b_dep); BUF_LOCKINIT(bp); @@ -670,6 +676,7 @@ bfreekva(struct buf *bp) void bremfree(struct buf *bp) { + int old; CTR3(KTR_BUF, "bremfree(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); KASSERT((bp->b_flags & B_REMFREE) == 0, @@ -680,8 +687,13 @@ bremfree(struct buf *bp) bp->b_flags |= B_REMFREE; /* Fixup numfreebuffers count. */ - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) - atomic_subtract_int(&numfreebuffers, 1); + if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { + KASSERT((bp->b_vflags & BV_INFREECNT) != 0, + ("buf %p not counted in numfreebuffers", bp)); + bp->b_vflags &= ~BV_INFREECNT; + old = atomic_fetchadd_int(&numfreebuffers, -1); + KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); + } } /* @@ -707,6 +719,8 @@ bremfreef(struct buf *bp) static void bremfreel(struct buf *bp) { + int old; + CTR3(KTR_BUF, "bremfreel(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); KASSERT(bp->b_qindex != QUEUE_NONE, @@ -729,8 +743,13 @@ bremfreel(struct buf *bp) * delayed-write, the buffer was free and we must decrement * numfreebuffers. */ - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) - atomic_subtract_int(&numfreebuffers, 1); + if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { + KASSERT((bp->b_vflags & BV_INFREECNT) != 0, + ("buf %p not counted in numfreebuffers", bp)); + bp->b_vflags &= ~BV_INFREECNT; + old = atomic_fetchadd_int(&numfreebuffers, -1); + KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); + } } @@ -1434,7 +1453,7 @@ brelse(struct buf *bp) */ if (!(bp->b_flags & B_DELWRI)) - bufcountwakeup(); + bufcountwakeup(bp); /* * Something we can maybe free or reuse @@ -1523,7 +1542,7 @@ bqrelse(struct buf *bp) mtx_unlock(&bqlock); if ((bp->b_flags & B_INVAL) || !(bp->b_flags & B_DELWRI)) - bufcountwakeup(); + bufcountwakeup(bp); /* * Something we can maybe free or reuse. @@ -1904,6 +1923,8 @@ restart: bp->b_flags = 0; bp->b_ioflags = 0; bp->b_xflags = 0; + KASSERT((bp->b_vflags & BV_INFREECNT) == 0, + ("buf %p still counted as free?", bp)); bp->b_vflags = 0; bp->b_vp = NULL; bp->b_blkno = bp->b_lblkno = 0; @@ -4084,4 +4105,27 @@ DB_SHOW_COMMAND(vnodebufs, db_show_vnode db_printf("\n"); } } + +DB_COMMAND(countfreebufs, db_coundfreebufs) +{ + struct buf *bp; + int i, used = 0, nfree = 0; + + if (have_addr) { + db_printf("usage: countfreebufs\n"); + return; + } + + for (i = 0; i < nbuf; i++) { + bp = &buf[i]; + if ((bp->b_vflags & BV_INFREECNT) != 0) + nfree++; + else + used++; + } + + db_printf("Counted %d free, %d used (%d tot)\n", nfree, used, + nfree + used); + db_printf("numfreebuffers is %d\n", numfreebuffers); +} #endif /* DDB */ Modified: stable/8/sys/sys/buf.h ============================================================================== --- stable/8/sys/sys/buf.h Mon Sep 13 16:43:41 2010 (r212561) +++ stable/8/sys/sys/buf.h Mon Sep 13 17:18:49 2010 (r212562) @@ -247,6 +247,7 @@ struct buf { #define BV_SCANNED 0x00000001 /* VOP_FSYNC funcs mark written bufs */ #define BV_BKGRDINPROG 0x00000002 /* Background write in progress */ #define BV_BKGRDWAIT 0x00000004 /* Background write waiting */ +#define BV_INFREECNT 0x80000000 /* buf is counted in numfreebufs */ #ifdef _KERNEL /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:23:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFFBC106566B; Mon, 13 Sep 2010 17:23:18 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D33C98FC1E; Mon, 13 Sep 2010 17:23:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DHNIGE018553; Mon, 13 Sep 2010 17:23:18 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DHNIPI018550; Mon, 13 Sep 2010 17:23:18 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009131723.o8DHNIPI018550@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 13 Sep 2010 17:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212563 - in stable/7/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:23:19 -0000 Author: mdf Date: Mon Sep 13 17:23:18 2010 New Revision: 212563 URL: http://svn.freebsd.org/changeset/base/212563 Log: MFC r209053: Add INVARIANTS checking that numfreebufs values are sane. Also add a per-buf flag to catch if a buf is double-counted in the free count. This code was useful to debug an instance where a local patch at Isilon was incorrectly managing numfreebufs for a new buf state. Modified: stable/7/sys/kern/vfs_bio.c stable/7/sys/sys/buf.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_bio.c ============================================================================== --- stable/7/sys/kern/vfs_bio.c Mon Sep 13 17:18:49 2010 (r212562) +++ stable/7/sys/kern/vfs_bio.c Mon Sep 13 17:23:18 2010 (r212563) @@ -381,10 +381,16 @@ runningbufwakeup(struct buf *bp) */ static __inline void -bufcountwakeup(void) +bufcountwakeup(struct buf *bp) { + int old; - atomic_add_int(&numfreebuffers, 1); + KASSERT((bp->b_vflags & BV_INFREECNT) == 0, + ("buf %p already counted as free", bp)); + bp->b_vflags |= BV_INFREECNT; + old = atomic_fetchadd_int(&numfreebuffers, 1); + KASSERT(old >= 0 && old < nbuf, + ("numfreebuffers climbed to %d", old + 1)); mtx_lock(&nblock); if (needsbuffer) { needsbuffer &= ~VFS_BIO_NEED_ANY; @@ -587,7 +593,7 @@ bufinit(void) bp->b_rcred = NOCRED; bp->b_wcred = NOCRED; bp->b_qindex = QUEUE_EMPTY; - bp->b_vflags = 0; + bp->b_vflags = BV_INFREECNT; /* buf is counted as free */ bp->b_xflags = 0; LIST_INIT(&bp->b_dep); BUF_LOCKINIT(bp); @@ -688,6 +694,7 @@ bfreekva(struct buf *bp) void bremfree(struct buf *bp) { + int old; CTR3(KTR_BUF, "bremfree(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); KASSERT(BUF_REFCNT(bp), ("bremfree: buf must be locked.")); @@ -698,8 +705,13 @@ bremfree(struct buf *bp) bp->b_flags |= B_REMFREE; /* Fixup numfreebuffers count. */ - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) - atomic_subtract_int(&numfreebuffers, 1); + if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { + KASSERT((bp->b_vflags & BV_INFREECNT) != 0, + ("buf %p not counted in numfreebuffers", bp)); + bp->b_vflags &= ~BV_INFREECNT; + old = atomic_fetchadd_int(&numfreebuffers, -1); + KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); + } } /* @@ -725,6 +737,8 @@ bremfreef(struct buf *bp) static void bremfreel(struct buf *bp) { + int old; + CTR3(KTR_BUF, "bremfreel(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); KASSERT(BUF_REFCNT(bp), ("bremfreel: buffer %p not locked.", bp)); @@ -747,8 +761,13 @@ bremfreel(struct buf *bp) * delayed-write, the buffer was free and we must decrement * numfreebuffers. */ - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) - atomic_subtract_int(&numfreebuffers, 1); + if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { + KASSERT((bp->b_vflags & BV_INFREECNT) != 0, + ("buf %p not counted in numfreebuffers", bp)); + bp->b_vflags &= ~BV_INFREECNT; + old = atomic_fetchadd_int(&numfreebuffers, -1); + KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); + } } @@ -1452,7 +1471,7 @@ brelse(struct buf *bp) */ if (!(bp->b_flags & B_DELWRI)) - bufcountwakeup(); + bufcountwakeup(bp); /* * Something we can maybe free or reuse @@ -1542,7 +1561,7 @@ bqrelse(struct buf *bp) mtx_unlock(&bqlock); if ((bp->b_flags & B_INVAL) || !(bp->b_flags & B_DELWRI)) - bufcountwakeup(); + bufcountwakeup(bp); /* * Something we can maybe free or reuse. @@ -1922,6 +1941,8 @@ restart: bp->b_flags = 0; bp->b_ioflags = 0; bp->b_xflags = 0; + KASSERT((bp->b_vflags & BV_INFREECNT) == 0, + ("buf %p still counted as free?", bp)); bp->b_vflags = 0; bp->b_vp = NULL; bp->b_blkno = bp->b_lblkno = 0; @@ -4083,4 +4104,27 @@ DB_SHOW_COMMAND(vnodebufs, db_show_vnode db_printf("\n"); } } + +DB_COMMAND(countfreebufs, db_coundfreebufs) +{ + struct buf *bp; + int i, used = 0, nfree = 0; + + if (have_addr) { + db_printf("usage: countfreebufs\n"); + return; + } + + for (i = 0; i < nbuf; i++) { + bp = &buf[i]; + if ((bp->b_vflags & BV_INFREECNT) != 0) + nfree++; + else + used++; + } + + db_printf("Counted %d free, %d used (%d tot)\n", nfree, used, + nfree + used); + db_printf("numfreebuffers is %d\n", numfreebuffers); +} #endif /* DDB */ Modified: stable/7/sys/sys/buf.h ============================================================================== --- stable/7/sys/sys/buf.h Mon Sep 13 17:18:49 2010 (r212562) +++ stable/7/sys/sys/buf.h Mon Sep 13 17:23:18 2010 (r212563) @@ -247,6 +247,7 @@ struct buf { #define BV_SCANNED 0x00000001 /* VOP_FSYNC funcs mark written bufs */ #define BV_BKGRDINPROG 0x00000002 /* Background write in progress */ #define BV_BKGRDWAIT 0x00000004 /* Background write waiting */ +#define BV_INFREECNT 0x80000000 /* buf is counted in numfreebufs */ #ifdef _KERNEL /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:27:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBC6C106567A; Mon, 13 Sep 2010 17:27:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA6E58FC19; Mon, 13 Sep 2010 17:27:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DHRh3t018970; Mon, 13 Sep 2010 17:27:43 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DHRh8q018968; Mon, 13 Sep 2010 17:27:43 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009131727.o8DHRh8q018968@svn.freebsd.org> From: Glen Barber Date: Mon, 13 Sep 2010 17:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212564 - stable/8/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:27:44 -0000 Author: gjb (doc committer) Date: Mon Sep 13 17:27:43 2010 New Revision: 212564 URL: http://svn.freebsd.org/changeset/base/212564 Log: MFC 212269. Add ECONNRESET to connect(2). Approved by: keramida (mentor) Modified: stable/8/lib/libc/sys/connect.2 Modified: stable/8/lib/libc/sys/connect.2 ============================================================================== --- stable/8/lib/libc/sys/connect.2 Mon Sep 13 17:23:18 2010 (r212563) +++ stable/8/lib/libc/sys/connect.2 Mon Sep 13 17:27:43 2010 (r212564) @@ -28,7 +28,7 @@ .\" @(#)connect.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 16, 2006 +.Dd September 5, 2010 .Dt CONNECT 2 .Os .Sh NAME @@ -95,6 +95,8 @@ The socket is already connected. Connection establishment timed out without establishing a connection. .It Bq Er ECONNREFUSED The attempt to connect was forcefully rejected. +.It Bq Er ECONNRESET +The connection was reset by the remote host. .It Bq Er ENETUNREACH The network is not reachable from this host. .It Bq Er EHOSTUNREACH From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:28:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9115106566B; Mon, 13 Sep 2010 17:28:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7C4A8FC17; Mon, 13 Sep 2010 17:28:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DHSZCA019093; Mon, 13 Sep 2010 17:28:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DHSZub019091; Mon, 13 Sep 2010 17:28:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009131728.o8DHSZub019091@svn.freebsd.org> From: Glen Barber Date: Mon, 13 Sep 2010 17:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212565 - stable/7/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:28:36 -0000 Author: gjb (doc committer) Date: Mon Sep 13 17:28:35 2010 New Revision: 212565 URL: http://svn.freebsd.org/changeset/base/212565 Log: MFC 212269. Add ECONNRESET to connect(2). Approved by: keramida (mentor) Modified: stable/7/lib/libc/sys/connect.2 Modified: stable/7/lib/libc/sys/connect.2 ============================================================================== --- stable/7/lib/libc/sys/connect.2 Mon Sep 13 17:27:43 2010 (r212564) +++ stable/7/lib/libc/sys/connect.2 Mon Sep 13 17:28:35 2010 (r212565) @@ -28,7 +28,7 @@ .\" @(#)connect.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 16, 2006 +.Dd September 5, 2010 .Dt CONNECT 2 .Os .Sh NAME @@ -95,6 +95,8 @@ The socket is already connected. Connection establishment timed out without establishing a connection. .It Bq Er ECONNREFUSED The attempt to connect was forcefully rejected. +.It Bq Er ECONNRESET +The connection was reset by the remote host. .It Bq Er ENETUNREACH The network is not reachable from this host. .It Bq Er EHOSTUNREACH From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:30:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CDFA1065674; Mon, 13 Sep 2010 17:30:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B73C8FC17; Mon, 13 Sep 2010 17:30:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DHUUuG019299; Mon, 13 Sep 2010 17:30:30 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DHUUHV019297; Mon, 13 Sep 2010 17:30:30 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009131730.o8DHUUHV019297@svn.freebsd.org> From: Glen Barber Date: Mon, 13 Sep 2010 17:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212566 - stable/8/usr.bin/cpio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:30:30 -0000 Author: gjb (doc committer) Date: Mon Sep 13 17:30:29 2010 New Revision: 212566 URL: http://svn.freebsd.org/changeset/base/212566 Log: MFC 212263. Fix typo in bsdcpio(1). Approved by: keramida (mentor) Modified: stable/8/usr.bin/cpio/bsdcpio.1 Modified: stable/8/usr.bin/cpio/bsdcpio.1 ============================================================================== --- stable/8/usr.bin/cpio/bsdcpio.1 Mon Sep 13 17:28:35 2010 (r212565) +++ stable/8/usr.bin/cpio/bsdcpio.1 Mon Sep 13 17:30:29 2010 (r212566) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2007 +.Dd September 5, 2010 .Dt BSDCPIO 1 .Os .Sh NAME @@ -137,7 +137,7 @@ The POSIX.1 tar format. The default format is .Ar odc . See -.Xr libarchive_formats 5 +.Xr libarchive-formats 5 for more complete information about the formats currently supported by the underlying .Xr libarchive 3 From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:30:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEF651065777; Mon, 13 Sep 2010 17:30:31 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by mx1.freebsd.org (Postfix) with ESMTP id 8177C8FC1D; Mon, 13 Sep 2010 17:30:31 +0000 (UTC) Received: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id 904A428F6FE; Mon, 13 Sep 2010 12:30:30 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh2.mail.rice.edu, auth channel Received: from mh2.mail.rice.edu ([127.0.0.1]) by mh2.mail.rice.edu (mh2.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id k0nIjkv6JAHP; Mon, 13 Sep 2010 12:30:30 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh2.mail.rice.edu (Postfix) with ESMTPSA id B4BE228F6D6; Mon, 13 Sep 2010 12:30:29 -0500 (CDT) Message-ID: <4C8E5FB5.9070009@rice.edu> Date: Mon, 13 Sep 2010 12:30:29 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.24 (X11/20100725) MIME-Version: 1.0 To: Kostik Belousov , Ryan Stone References: <201009070023.o870Njtg072607@svn.freebsd.org> <20100907080446.GA2853@deviant.kiev.zoral.com.ua> In-Reply-To: <20100907080446.GA2853@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212281 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:30:34 -0000 Kostik Belousov wrote: > On Tue, Sep 07, 2010 at 12:23:45AM +0000, Ryan Stone wrote: > >> Author: rstone >> Date: Tue Sep 7 00:23:45 2010 >> New Revision: 212281 >> URL: http://svn.freebsd.org/changeset/base/212281 >> >> Log: >> In munmap() downgrade the vm_map_lock to a read lock before taking a read >> lock on the pmc-sx lock. This prevents a deadlock with >> pmc_log_process_mappings, which has an exclusive lock on pmc-sx and tries >> to get a read lock on a vm_map. Downgrading the vm_map_lock in munmap >> allows pmc_log_process_mappings to continue, preventing the deadlock. >> >> Without this change I could cause a deadlock on a multicore 8.1-RELEASE >> system by having one thread constantly mmap'ing and then munmap'ing a >> PROT_EXEC mapping in a loop while I repeatedly invoked and stopped pmcstat >> in system-wide sampling mode. >> >> Reviewed by: fabient >> Approved by: emaste (mentor) >> MFC after: 2 weeks >> >> Modified: >> head/sys/vm/vm_mmap.c >> >> Modified: head/sys/vm/vm_mmap.c >> ============================================================================== >> --- head/sys/vm/vm_mmap.c Mon Sep 6 23:52:04 2010 (r212280) >> +++ head/sys/vm/vm_mmap.c Tue Sep 7 00:23:45 2010 (r212281) >> @@ -579,6 +579,7 @@ munmap(td, uap) >> * Inform hwpmc if the address range being unmapped contains >> * an executable region. >> */ >> + pkm.pm_address = (uintptr_t) NULL; >> if (vm_map_lookup_entry(map, addr, &entry)) { >> for (; >> entry != &map->header && entry->start < addr + size; >> @@ -587,16 +588,23 @@ munmap(td, uap) >> entry->end, VM_PROT_EXECUTE) == TRUE) { >> pkm.pm_address = (uintptr_t) addr; >> pkm.pm_size = (size_t) size; >> - PMC_CALL_HOOK(td, PMC_FN_MUNMAP, >> - (void *) &pkm); >> break; >> } >> } >> } >> #endif >> - /* returns nothing but KERN_SUCCESS anyway */ >> vm_map_delete(map, addr, addr + size); >> + >> +#ifdef HWPMC_HOOKS >> + /* downgrade the lock to prevent a LOR with the pmc-sx lock */ >> + vm_map_lock_downgrade(map); >> + if (pkm.pm_address != (uintptr) NULL) >> + PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *) &pkm); >> + vm_map_unlock_read(map); >> +#else >> vm_map_unlock(map); >> +#endif >> + /* vm_map_delete returns nothing but KERN_SUCCESS anyway */ >> return (0); >> } >> >> > Note that vm_map_unlock() is more then just dropping the lock on the map. > Due to ordering of the vnode lock before vm map lock, vm_map_unlock() > processes the deferred free entries after map lock is dropped. After your > change, the deferred list might keep entries for some time until next > unlock is performed. > > I'm afraid that this understates the effect. Over the weekend, when I updated one of my amd64 machines to include this change, I found that the delay in object and page deallocation is leading to severe fragmentation within the physical memory allocator. As a result, the time spent in the kernel during a "buildworld" increased by about 8%. Moreover, superpage promotion by applications effectively stopped. For now, I think it would be best to back out r212281 and r212282. Ultimately, the fix may be to change the vm map synchronization primitives, and simply reinstate r212281 and r212282, but I'd like some time to consider the options. Regards, Alan From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:49:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EBF41065672; Mon, 13 Sep 2010 17:49:40 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E1068FC0A; Mon, 13 Sep 2010 17:49:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DHnecJ020667; Mon, 13 Sep 2010 17:49:40 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DHneFS020665; Mon, 13 Sep 2010 17:49:40 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009131749.o8DHneFS020665@svn.freebsd.org> From: Rui Paulo Date: Mon, 13 Sep 2010 17:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212567 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:49:40 -0000 Author: rpaulo Date: Mon Sep 13 17:49:39 2010 New Revision: 212567 URL: http://svn.freebsd.org/changeset/base/212567 Log: Add a note about userland DTracing. Sponsored by: The FreeBSD Foundation > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M UPDATING Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Sep 13 17:30:29 2010 (r212566) +++ head/UPDATING Mon Sep 13 17:49:39 2010 (r212567) @@ -22,6 +22,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100913: + DTrace has grown support for userland tracing. Due to this, DTrace is + now i386 and amd64 only. + dtruss(1) is now installed by default on those systems and a new + kernel module is needed for userland tracing: fasttrap. + No changes to your kernel config file are necessary to enable + userland tracing, but you might consider adding 'STRIP=' and + 'CFLAGS+=-fno-omit-frame-pointer' to your make.conf if you want + to have informative userland stack traces in DTrace (ustack). + 20100725: The acpi_aiboost(4) driver has been removed in favor of the new aibs(4) driver. You should update your kernel configuration file. From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 17:53:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD114106564A; Mon, 13 Sep 2010 17:53:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC3CD8FC16; Mon, 13 Sep 2010 17:53:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DHrhGl021006; Mon, 13 Sep 2010 17:53:43 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DHrh0j021004; Mon, 13 Sep 2010 17:53:43 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009131753.o8DHrh0j021004@svn.freebsd.org> From: Rui Paulo Date: Mon, 13 Sep 2010 17:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212568 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 17:53:43 -0000 Author: rpaulo Date: Mon Sep 13 17:53:43 2010 New Revision: 212568 URL: http://svn.freebsd.org/changeset/base/212568 Log: Bump __FreeBSD_version to reflect the userland DTrace changes. Sponsored by: The FreeBSD Foundation > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M param.h Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Sep 13 17:49:39 2010 (r212567) +++ head/sys/sys/param.h Mon Sep 13 17:53:43 2010 (r212568) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900020 /* Master, propagated to newvers */ +#define __FreeBSD_version 900021 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 18:26:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71931106571F; Mon, 13 Sep 2010 18:26:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 729B48FC16; Mon, 13 Sep 2010 18:26:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DIQYjk023365; Mon, 13 Sep 2010 18:26:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DIQYwn023363; Mon, 13 Sep 2010 18:26:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201009131826.o8DIQYwn023363@svn.freebsd.org> From: Ed Maste Date: Mon, 13 Sep 2010 18:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212570 - head/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 18:26:35 -0000 Author: emaste Date: Mon Sep 13 18:26:34 2010 New Revision: 212570 URL: http://svn.freebsd.org/changeset/base/212570 Log: Allow a kernel config to specify a set but empty value via 'makeoptions OPTION=' for consistency with the make commandline. Previously 'makeoptions WERROR=' would result in a syntax error; now it produces the same effect as 'makeoptions WERROR'. Both forms now result in 'WERROR=' in the generated Makefile. Modified: head/usr.sbin/config/config.y Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Mon Sep 13 18:26:32 2010 (r212569) +++ head/usr.sbin/config/config.y Mon Sep 13 18:26:34 2010 (r212570) @@ -261,6 +261,7 @@ Mkopt_list: Mkoption: Save_id { newopt(&mkopt, $1, ns(""), 0); } | + Save_id EQUALS { newopt(&mkopt, $1, ns(""), 0); } | Save_id EQUALS Opt_value { newopt(&mkopt, $1, $3, 0); } | Save_id PLUSEQUALS Opt_value { newopt(&mkopt, $1, $3, 1); } ; From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 18:48:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070F5106566C; Mon, 13 Sep 2010 18:48:24 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8C448FC17; Mon, 13 Sep 2010 18:48:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DImNSx025004; Mon, 13 Sep 2010 18:48:23 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DImNU6024992; Mon, 13 Sep 2010 18:48:23 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009131848.o8DImNU6024992@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 13 Sep 2010 18:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212572 - in head/sys: dev/cxgb kern sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 18:48:24 -0000 Author: mdf Date: Mon Sep 13 18:48:23 2010 New Revision: 212572 URL: http://svn.freebsd.org/changeset/base/212572 Log: Revert r212370, as it causes a LOR on powerpc. powerpc does a few unexpected things in copyout(9) and so wiring the user buffer is not sufficient to perform a copyout(9) while holding a random mutex. Requested by: nwhitehorn Modified: head/sys/dev/cxgb/cxgb_sge.c head/sys/kern/kern_malloc.c head/sys/kern/kern_sysctl.c head/sys/kern/subr_lock.c head/sys/kern/subr_sbuf.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_witness.c head/sys/sys/sysctl.h head/sys/vm/uma_core.c head/sys/vm/vm_phys.c head/sys/vm/vm_reserv.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/dev/cxgb/cxgb_sge.c Mon Sep 13 18:48:23 2010 (r212572) @@ -3227,6 +3227,7 @@ t3_dump_rspq(SYSCTL_HANDLER_ARGS) struct sge_rspq *rspq; struct sge_qset *qs; int i, err, dump_end, idx; + static int multiplier = 1; struct sbuf *sb; struct rsp_desc *rspd; uint32_t data[4]; @@ -3251,8 +3252,8 @@ t3_dump_rspq(SYSCTL_HANDLER_ARGS) err = t3_sge_read_rspq(qs->port->adapter, rspq->cntxt_id, data); if (err) return (err); - - sb = sbuf_new_for_sysctl(NULL, NULL, QDUMP_SBUF_SIZE, req); +retry_sbufops: + sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); sbuf_printf(sb, " \n index=%u size=%u MSI-X/RspQ=%u intr enable=%u intr armed=%u\n", (data[0] & 0xffff), data[0] >> 16, ((data[2] >> 20) & 0x3f), @@ -3275,11 +3276,13 @@ t3_dump_rspq(SYSCTL_HANDLER_ARGS) rspd->rss_hdr.rss_hash_val, be32toh(rspd->flags), be32toh(rspd->len_cq), rspd->intr_gen); } - - err = sbuf_finish(sb); - /* Output a trailing NUL. */ - if (err == 0) - err = SYSCTL_OUT(req, "", 1); + if (sbuf_error(sb) != 0) { + sbuf_delete(sb); + multiplier++; + goto retry_sbufops; + } + sbuf_finish(sb); + err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (err); } @@ -3290,6 +3293,7 @@ t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) struct sge_txq *txq; struct sge_qset *qs; int i, j, err, dump_end; + static int multiplier = 1; struct sbuf *sb; struct tx_desc *txd; uint32_t *WR, wr_hi, wr_lo, gen; @@ -3317,7 +3321,9 @@ t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) if (err) return (err); - sb = sbuf_new_for_sysctl(NULL, NULL, QDUMP_SBUF_SIZE, req); + +retry_sbufops: + sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); sbuf_printf(sb, " \n credits=%u GTS=%u index=%u size=%u rspq#=%u cmdq#=%u\n", (data[0] & 0x7fff), ((data[0] >> 15) & 1), (data[0] >> 16), @@ -3344,10 +3350,13 @@ t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) WR[j], WR[j + 1], WR[j + 2], WR[j + 3]); } - err = sbuf_finish(sb); - /* Output a trailing NUL. */ - if (err == 0) - err = SYSCTL_OUT(req, "", 1); + if (sbuf_error(sb) != 0) { + sbuf_delete(sb); + multiplier++; + goto retry_sbufops; + } + sbuf_finish(sb); + err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (err); } @@ -3358,6 +3367,7 @@ t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) struct sge_txq *txq; struct sge_qset *qs; int i, j, err, dump_end; + static int multiplier = 1; struct sbuf *sb; struct tx_desc *txd; uint32_t *WR, wr_hi, wr_lo, gen; @@ -3381,7 +3391,8 @@ t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) return (EINVAL); } - sb = sbuf_new_for_sysctl(NULL, NULL, QDUMP_SBUF_SIZE, req); +retry_sbufops: + sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); sbuf_printf(sb, " qid=%d start=%d -> end=%d\n", qs->idx, txq->txq_dump_start, (txq->txq_dump_start + txq->txq_dump_count) & 255); @@ -3401,10 +3412,13 @@ t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) WR[j], WR[j + 1], WR[j + 2], WR[j + 3]); } - err = sbuf_finish(sb); - /* Output a trailing NUL. */ - if (err == 0) - err = SYSCTL_OUT(req, "", 1); + if (sbuf_error(sb) != 0) { + sbuf_delete(sb); + multiplier++; + goto retry_sbufops; + } + sbuf_finish(sb); + err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (err); } Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/kern/kern_malloc.c Mon Sep 13 18:48:23 2010 (r212572) @@ -828,11 +828,25 @@ sysctl_kern_malloc_stats(SYSCTL_HANDLER_ struct malloc_type_internal *mtip; struct malloc_type_header mth; struct malloc_type *mtp; - int error, i; + int buflen, count, error, i; struct sbuf sbuf; + char *buffer; - sbuf_new_for_sysctl(&sbuf, NULL, 128, req); mtx_lock(&malloc_mtx); +restart: + mtx_assert(&malloc_mtx, MA_OWNED); + count = kmemcount; + mtx_unlock(&malloc_mtx); + buflen = sizeof(mtsh) + count * (sizeof(mth) + + sizeof(struct malloc_type_stats) * MAXCPU) + 1; + buffer = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); + mtx_lock(&malloc_mtx); + if (count < kmemcount) { + free(buffer, M_TEMP); + goto restart; + } + + sbuf_new(&sbuf, buffer, buflen, SBUF_FIXEDLEN); /* * Insert stream header. @@ -841,7 +855,11 @@ sysctl_kern_malloc_stats(SYSCTL_HANDLER_ mtsh.mtsh_version = MALLOC_TYPE_STREAM_VERSION; mtsh.mtsh_maxcpus = MAXCPU; mtsh.mtsh_count = kmemcount; - (void)sbuf_bcat(&sbuf, &mtsh, sizeof(mtsh)); + if (sbuf_bcat(&sbuf, &mtsh, sizeof(mtsh)) < 0) { + mtx_unlock(&malloc_mtx); + error = ENOMEM; + goto out; + } /* * Insert alternating sequence of type headers and type statistics. @@ -854,19 +872,30 @@ sysctl_kern_malloc_stats(SYSCTL_HANDLER_ */ bzero(&mth, sizeof(mth)); strlcpy(mth.mth_name, mtp->ks_shortdesc, MALLOC_MAX_NAME); - (void)sbuf_bcat(&sbuf, &mth, sizeof(mth)); + if (sbuf_bcat(&sbuf, &mth, sizeof(mth)) < 0) { + mtx_unlock(&malloc_mtx); + error = ENOMEM; + goto out; + } /* * Insert type statistics for each CPU. */ for (i = 0; i < MAXCPU; i++) { - (void)sbuf_bcat(&sbuf, &mtip->mti_stats[i], - sizeof(mtip->mti_stats[i])); + if (sbuf_bcat(&sbuf, &mtip->mti_stats[i], + sizeof(mtip->mti_stats[i])) < 0) { + mtx_unlock(&malloc_mtx); + error = ENOMEM; + goto out; + } } } mtx_unlock(&malloc_mtx); - error = sbuf_finish(&sbuf); + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); +out: sbuf_delete(&sbuf); + free(buffer, M_TEMP); return (error); } @@ -976,19 +1005,26 @@ DB_SHOW_COMMAND(multizone_matches, db_sh static int sysctl_kern_mprof(SYSCTL_HANDLER_ARGS) { + int linesize = 64; struct sbuf sbuf; uint64_t count; uint64_t waste; uint64_t mem; + int bufsize; int error; + char *buf; int rsize; int size; int i; + bufsize = linesize * (KMEM_ZSIZE + 1); + bufsize += 128; /* For the stats line */ + bufsize += 128; /* For the banner line */ waste = 0; mem = 0; - sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + buf = malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); + sbuf_new(&sbuf, buf, bufsize, SBUF_FIXEDLEN); sbuf_printf(&sbuf, "\n Size Requests Real Size\n"); for (i = 0; i < KMEM_ZSIZE; i++) { @@ -1006,8 +1042,12 @@ sysctl_kern_mprof(SYSCTL_HANDLER_ARGS) sbuf_printf(&sbuf, "\nTotal memory used:\t%30llu\nTotal Memory wasted:\t%30llu\n", (unsigned long long)mem, (unsigned long long)waste); - error = sbuf_finish(&sbuf); + sbuf_finish(&sbuf); + + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); + sbuf_delete(&sbuf); + free(buf, M_TEMP); return (error); } Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/kern/kern_sysctl.c Mon Sep 13 18:48:23 2010 (r212572) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1545,30 +1544,3 @@ userland_sysctl(struct thread *td, int * } return (error); } - -/* - * Drain into a sysctl struct. The user buffer must be wired. - */ -static int -sbuf_sysctl_drain(void *arg, const char *data, int len) -{ - struct sysctl_req *req = arg; - int error; - - error = SYSCTL_OUT(req, data, len); - KASSERT(error >= 0, ("Got unexpected negative value %d", error)); - return (error == 0 ? len : -error); -} - -struct sbuf * -sbuf_new_for_sysctl(struct sbuf *s, char *buf, int length, - struct sysctl_req *req) -{ - - /* Wire the user buffer, so we can write without blocking. */ - sysctl_wire_old_buffer(req, 0); - - s = sbuf_new(s, buf, length, SBUF_FIXEDLEN); - sbuf_set_drain(s, sbuf_sysctl_drain, req); - return (s); -} Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/kern/subr_lock.c Mon Sep 13 18:48:23 2010 (r212572) @@ -191,7 +191,8 @@ struct lock_prof_cpu *lp_cpu[MAXCPU]; volatile int lock_prof_enable = 0; static volatile int lock_prof_resetting; -#define LPROF_SBUF_SIZE 256 +/* SWAG: sbuf size = avg stat. line size * number of locks */ +#define LPROF_SBUF_SIZE 256 * 400 static int lock_prof_rejected; static int lock_prof_skipspin; @@ -383,6 +384,8 @@ lock_prof_type_stats(struct lock_prof_ty continue; lock_prof_sum(l, &lp, i, spin, t); lock_prof_output(&lp, sb); + if (sbuf_error(sb) != 0) + return; } } } @@ -390,11 +393,13 @@ lock_prof_type_stats(struct lock_prof_ty static int dump_lock_prof_stats(SYSCTL_HANDLER_ARGS) { + static int multiplier = 1; struct sbuf *sb; int error, cpu, t; int enabled; - sb = sbuf_new_for_sysctl(NULL, NULL, LPROF_SBUF_SIZE, req); +retry_sbufops: + sb = sbuf_new(NULL, NULL, LPROF_SBUF_SIZE * multiplier, SBUF_FIXEDLEN); sbuf_printf(sb, "\n%8s %9s %11s %11s %11s %6s %6s %2s %6s %s\n", "max", "wait_max", "total", "wait_total", "count", "avg", "wait_avg", "cnt_hold", "cnt_lock", "name"); enabled = lock_prof_enable; @@ -406,13 +411,16 @@ dump_lock_prof_stats(SYSCTL_HANDLER_ARGS continue; lock_prof_type_stats(&lp_cpu[cpu]->lpc_types[0], sb, 0, t); lock_prof_type_stats(&lp_cpu[cpu]->lpc_types[1], sb, 1, t); + if (sbuf_error(sb) != 0) { + sbuf_delete(sb); + multiplier++; + goto retry_sbufops; + } } lock_prof_enable = enabled; - error = sbuf_finish(sb); - /* Output a trailing NUL. */ - if (error == 0) - error = SYSCTL_OUT(req, "", 1); + sbuf_finish(sb); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (error); } Modified: head/sys/kern/subr_sbuf.c ============================================================================== --- head/sys/kern/subr_sbuf.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/kern/subr_sbuf.c Mon Sep 13 18:48:23 2010 (r212572) @@ -303,8 +303,8 @@ sbuf_drain(struct sbuf *s) s->s_error = -len; return (s->s_error); } - KASSERT(len > 0 && len <= s->s_len, - ("Bad drain amount %d for sbuf %p", len, s)); + + KASSERT(len > 0, ("Drain must either error or work!")); s->s_len -= len; /* * Fast path for the expected case where all the data was Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/kern/subr_sleepqueue.c Mon Sep 13 18:48:23 2010 (r212572) @@ -1018,7 +1018,7 @@ sleepq_abort(struct thread *td, int intr #ifdef SLEEPQUEUE_PROFILING #define SLEEPQ_PROF_LOCATIONS 1024 -#define SLEEPQ_SBUFSIZE 512 +#define SLEEPQ_SBUFSIZE (40 * 512) struct sleepq_prof { LIST_ENTRY(sleepq_prof) sp_link; const char *sp_wmesg; @@ -1123,13 +1123,15 @@ reset_sleepq_prof_stats(SYSCTL_HANDLER_A static int dump_sleepq_prof_stats(SYSCTL_HANDLER_ARGS) { + static int multiplier = 1; struct sleepq_prof *sp; struct sbuf *sb; int enabled; int error; int i; - sb = sbuf_new_for_sysctl(NULL, NULL, SLEEPQ_SBUFSIZE, req); +retry_sbufops: + sb = sbuf_new(NULL, NULL, SLEEPQ_SBUFSIZE * multiplier, SBUF_FIXEDLEN); sbuf_printf(sb, "\nwmesg\tcount\n"); enabled = prof_enabled; mtx_lock_spin(&sleepq_prof_lock); @@ -1139,13 +1141,19 @@ dump_sleepq_prof_stats(SYSCTL_HANDLER_AR LIST_FOREACH(sp, &sleepq_hash[i], sp_link) { sbuf_printf(sb, "%s\t%ld\n", sp->sp_wmesg, sp->sp_count); + if (sbuf_error(sb) != 0) { + sbuf_delete(sb); + multiplier++; + goto retry_sbufops; + } } } mtx_lock_spin(&sleepq_prof_lock); prof_enabled = enabled; mtx_unlock_spin(&sleepq_prof_lock); - error = sbuf_finish(sb); + sbuf_finish(sb); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (error); } Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/kern/subr_witness.c Mon Sep 13 18:48:23 2010 (r212572) @@ -154,7 +154,8 @@ __FBSDID("$FreeBSD$"); #define MAX_W_NAME 64 #define BADSTACK_SBUF_SIZE (256 * WITNESS_COUNT) -#define FULLGRAPH_SBUF_SIZE 512 +#define CYCLEGRAPH_SBUF_SIZE 8192 +#define FULLGRAPH_SBUF_SIZE 32768 /* * These flags go in the witness relationship matrix and describe the @@ -2544,7 +2545,7 @@ sysctl_debug_witness_fullgraph(SYSCTL_HA return (error); } error = 0; - sb = sbuf_new_for_sysctl(NULL, NULL, FULLGRAPH_SBUF_SIZE, req); + sb = sbuf_new(NULL, NULL, FULLGRAPH_SBUF_SIZE, SBUF_FIXEDLEN); if (sb == NULL) return (ENOMEM); sbuf_printf(sb, "\n"); @@ -2557,9 +2558,19 @@ sysctl_debug_witness_fullgraph(SYSCTL_HA mtx_unlock_spin(&w_mtx); /* + * While using SBUF_FIXEDLEN, check if the sbuf overflowed. + */ + if (sbuf_error(sb) != 0) { + sbuf_delete(sb); + panic("%s: sbuf overflowed, bump FULLGRAPH_SBUF_SIZE value\n", + __func__); + } + + /* * Close the sbuf and return to userland. */ - error = sbuf_finish(sb); + sbuf_finish(sb); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (error); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/sys/sysctl.h Mon Sep 13 18:48:23 2010 (r212572) @@ -710,9 +710,6 @@ void sysctl_lock(void); void sysctl_unlock(void); int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len); -struct sbuf; -struct sbuf *sbuf_new_for_sysctl(struct sbuf *, char *, int, - struct sysctl_req *); #else /* !_KERNEL */ #include Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/vm/uma_core.c Mon Sep 13 18:48:23 2010 (r212572) @@ -3175,16 +3175,36 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS uma_keg_t kz; uma_zone_t z; uma_keg_t k; - int count, error, i; + char *buffer; + int buflen, count, error, i; - sbuf_new_for_sysctl(&sbuf, NULL, 128, req); - - count = 0; mtx_lock(&uma_mtx); +restart: + mtx_assert(&uma_mtx, MA_OWNED); + count = 0; LIST_FOREACH(kz, &uma_kegs, uk_link) { LIST_FOREACH(z, &kz->uk_zones, uz_link) count++; } + mtx_unlock(&uma_mtx); + + buflen = sizeof(ush) + count * (sizeof(uth) + sizeof(ups) * + (mp_maxid + 1)) + 1; + buffer = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); + + mtx_lock(&uma_mtx); + i = 0; + LIST_FOREACH(kz, &uma_kegs, uk_link) { + LIST_FOREACH(z, &kz->uk_zones, uz_link) + i++; + } + if (i > count) { + free(buffer, M_TEMP); + goto restart; + } + count = i; + + sbuf_new(&sbuf, buffer, buflen, SBUF_FIXEDLEN); /* * Insert stream header. @@ -3193,7 +3213,11 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS ush.ush_version = UMA_STREAM_VERSION; ush.ush_maxcpus = (mp_maxid + 1); ush.ush_count = count; - (void)sbuf_bcat(&sbuf, &ush, sizeof(ush)); + if (sbuf_bcat(&sbuf, &ush, sizeof(ush)) < 0) { + mtx_unlock(&uma_mtx); + error = ENOMEM; + goto out; + } LIST_FOREACH(kz, &uma_kegs, uk_link) { LIST_FOREACH(z, &kz->uk_zones, uz_link) { @@ -3226,7 +3250,12 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS uth.uth_frees = z->uz_frees; uth.uth_fails = z->uz_fails; uth.uth_sleeps = z->uz_sleeps; - (void)sbuf_bcat(&sbuf, &uth, sizeof(uth)); + if (sbuf_bcat(&sbuf, &uth, sizeof(uth)) < 0) { + ZONE_UNLOCK(z); + mtx_unlock(&uma_mtx); + error = ENOMEM; + goto out; + } /* * While it is not normally safe to access the cache * bucket pointers while not on the CPU that owns the @@ -3251,14 +3280,21 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS ups.ups_allocs = cache->uc_allocs; ups.ups_frees = cache->uc_frees; skip: - (void)sbuf_bcat(&sbuf, &ups, sizeof(ups)); + if (sbuf_bcat(&sbuf, &ups, sizeof(ups)) < 0) { + ZONE_UNLOCK(z); + mtx_unlock(&uma_mtx); + error = ENOMEM; + goto out; + } } ZONE_UNLOCK(z); } } mtx_unlock(&uma_mtx); - error = sbuf_finish(&sbuf); - sbuf_delete(&sbuf); + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); +out: + free(buffer, M_TEMP); return (error); } Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/vm/vm_phys.c Mon Sep 13 18:48:23 2010 (r212572) @@ -123,9 +123,12 @@ sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; struct vm_freelist *fl; + char *cbuf; + const int cbufsize = vm_nfreelists*(VM_NFREEORDER + 1)*81; int error, flind, oind, pind; - sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); + sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); for (flind = 0; flind < vm_nfreelists; flind++) { sbuf_printf(&sbuf, "\nFREE LIST %d:\n" "\n ORDER (SIZE) | NUMBER" @@ -146,8 +149,10 @@ sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS) sbuf_printf(&sbuf, "\n"); } } - error = sbuf_finish(&sbuf); + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); sbuf_delete(&sbuf); + free(cbuf, M_TEMP); return (error); } @@ -159,9 +164,12 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; struct vm_phys_seg *seg; + char *cbuf; + const int cbufsize = VM_PHYSSEG_MAX*(VM_NFREEORDER + 1)*81; int error, segind; - sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); + sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); for (segind = 0; segind < vm_phys_nsegs; segind++) { sbuf_printf(&sbuf, "\nSEGMENT %d:\n\n", segind); seg = &vm_phys_segs[segind]; @@ -172,8 +180,10 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) sbuf_printf(&sbuf, "domain: %d\n", seg->domain); sbuf_printf(&sbuf, "free list: %p\n", seg->free_queues); } - error = sbuf_finish(&sbuf); + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); sbuf_delete(&sbuf); + free(cbuf, M_TEMP); return (error); } @@ -185,18 +195,23 @@ static int sysctl_vm_phys_lookup_lists(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; + char *cbuf; + const int cbufsize = (vm_nfreelists + 1) * VM_NDOMAIN * 81; int domain, error, flind, ndomains; ndomains = vm_nfreelists - VM_NFREELIST + 1; - sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); + sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); for (domain = 0; domain < ndomains; domain++) { sbuf_printf(&sbuf, "\nDOMAIN %d:\n\n", domain); for (flind = 0; flind < vm_nfreelists; flind++) sbuf_printf(&sbuf, " [%d]:\t%p\n", flind, vm_phys_lookup_lists[domain][flind]); } - error = sbuf_finish(&sbuf); + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); sbuf_delete(&sbuf); + free(cbuf, M_TEMP); return (error); } #endif Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Mon Sep 13 18:32:49 2010 (r212571) +++ head/sys/vm/vm_reserv.c Mon Sep 13 18:48:23 2010 (r212572) @@ -180,9 +180,12 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER { struct sbuf sbuf; vm_reserv_t rv; + char *cbuf; + const int cbufsize = (VM_NRESERVLEVEL + 1) * 81; int counter, error, level, unused_pages; - sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); + sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); sbuf_printf(&sbuf, "\nLEVEL SIZE NUMBER\n\n"); for (level = -1; level <= VM_NRESERVLEVEL - 2; level++) { counter = 0; @@ -196,8 +199,10 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER sbuf_printf(&sbuf, "%5.5d: %6.6dK, %6.6d\n", level, unused_pages * (PAGE_SIZE / 1024), counter); } - error = sbuf_finish(&sbuf); + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); sbuf_delete(&sbuf); + free(cbuf, M_TEMP); return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:12:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B1CB106567A; Mon, 13 Sep 2010 19:12:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id A512A8FC1C; Mon, 13 Sep 2010 19:12:53 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8DJClPn028197 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Sep 2010 22:12:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8DJClTQ084253; Mon, 13 Sep 2010 22:12:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8DJClHE084252; Mon, 13 Sep 2010 22:12:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 13 Sep 2010 22:12:47 +0300 From: Kostik Belousov To: Alan Cox Message-ID: <20100913191247.GN2465@deviant.kiev.zoral.com.ua> References: <201009070023.o870Njtg072607@svn.freebsd.org> <20100907080446.GA2853@deviant.kiev.zoral.com.ua> <4C8E5FB5.9070009@rice.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vRCs+Tj6pwiFrQdW" Content-Disposition: inline In-Reply-To: <4C8E5FB5.9070009@rice.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r212281 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:12:54 -0000 --vRCs+Tj6pwiFrQdW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 13, 2010 at 12:30:29PM -0500, Alan Cox wrote: > Kostik Belousov wrote: > >On Tue, Sep 07, 2010 at 12:23:45AM +0000, Ryan Stone wrote: > > =20 > >>Author: rstone > >>Date: Tue Sep 7 00:23:45 2010 > >>New Revision: 212281 > >>URL: http://svn.freebsd.org/changeset/base/212281 > >> > >>Log: > >> In munmap() downgrade the vm_map_lock to a read lock before taking a= =20 > >> read > >> lock on the pmc-sx lock. This prevents a deadlock with > >> pmc_log_process_mappings, which has an exclusive lock on pmc-sx and= =20 > >> tries > >> to get a read lock on a vm_map. Downgrading the vm_map_lock in munmap > >> allows pmc_log_process_mappings to continue, preventing the deadlock. > >> =20 > >> Without this change I could cause a deadlock on a multicore 8.1-RELEA= SE > >> system by having one thread constantly mmap'ing and then munmap'ing a > >> PROT_EXEC mapping in a loop while I repeatedly invoked and stopped=20 > >> pmcstat > >> in system-wide sampling mode. > >> =20 > >> Reviewed by: fabient > >> Approved by: emaste (mentor) > >> MFC after: 2 weeks > >> > >>Modified: > >> head/sys/vm/vm_mmap.c > >> > >>Modified: head/sys/vm/vm_mmap.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/vm/vm_mmap.c Mon Sep 6 23:52:04 2010 (r212280) > >>+++ head/sys/vm/vm_mmap.c Tue Sep 7 00:23:45 2010 (r212281) > >>@@ -579,6 +579,7 @@ munmap(td, uap) > >> * Inform hwpmc if the address range being unmapped contains > >> * an executable region. > >> */ > >>+ pkm.pm_address =3D (uintptr_t) NULL; > >> if (vm_map_lookup_entry(map, addr, &entry)) { > >> for (; > >> entry !=3D &map->header && entry->start < addr + size; > >>@@ -587,16 +588,23 @@ munmap(td, uap) > >> entry->end, VM_PROT_EXECUTE) =3D=3D TRUE) { > >> pkm.pm_address =3D (uintptr_t) addr; > >> pkm.pm_size =3D (size_t) size; > >>- PMC_CALL_HOOK(td, PMC_FN_MUNMAP, > >>- (void *) &pkm); > >> break; > >> } > >> } > >> } > >> #endif > >>- /* returns nothing but KERN_SUCCESS anyway */ > >> vm_map_delete(map, addr, addr + size); > >>+ > >>+#ifdef HWPMC_HOOKS > >>+ /* downgrade the lock to prevent a LOR with the pmc-sx lock */ > >>+ vm_map_lock_downgrade(map); > >>+ if (pkm.pm_address !=3D (uintptr) NULL) > >>+ PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *) &pkm); > >>+ vm_map_unlock_read(map); > >>+#else > >> vm_map_unlock(map); > >>+#endif > >>+ /* vm_map_delete returns nothing but KERN_SUCCESS anyway */ > >> return (0); > >> } > >>=20 > >> =20 > >Note that vm_map_unlock() is more then just dropping the lock on the map. > >Due to ordering of the vnode lock before vm map lock, vm_map_unlock() > >processes the deferred free entries after map lock is dropped. After your > >change, the deferred list might keep entries for some time until next > >unlock is performed. > > > > =20 >=20 > I'm afraid that this understates the effect. Over the weekend, when I=20 > updated one of my amd64 machines to include this change, I found that=20 > the delay in object and page deallocation is leading to severe=20 > fragmentation within the physical memory allocator. As a result, the=20 > time spent in the kernel during a "buildworld" increased by about 8%. =20 > Moreover, superpage promotion by applications effectively stopped. >=20 > For now, I think it would be best to back out r212281 and r212282. =20 > Ultimately, the fix may be to change the vm map synchronization=20 > primitives, and simply reinstate r212281 and r212282, but I'd like some= =20 > time to consider the options. Did you noted the thread on current@ about r212281 ? The submitter claims that the rev. causes panics in unrelated code pathes when vnode_create_vobject() locks vm object lock. I cannot understand how this can happen, with or without the rev. More, when I suggested the following change, that is intended to minimize the window, the answer was that it makes the situation worse. diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 63dfb67..d13e488 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -597,13 +597,15 @@ munmap(td, uap) =20 #ifdef HWPMC_HOOKS /* downgrade the lock to prevent a LOR with the pmc-sx lock */ - vm_map_lock_downgrade(map); - if (pkm.pm_address !=3D (uintptr_t) NULL) - PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *) &pkm); - vm_map_unlock_read(map); -#else - vm_map_unlock(map); + if (pkm.pm_address !=3D (uintptr_t)NULL) { + vm_map_lock_downgrade(map); + if (pkm.pm_address !=3D (uintptr_t)NULL) + PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *)&pkm); + vm_map_unlock_read(map); + vm_map_lock(map); + } #endif + vm_map_unlock(map); /* vm_map_delete returns nothing but KERN_SUCCESS anyway */ return (0); } --vRCs+Tj6pwiFrQdW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyOd68ACgkQC3+MBN1Mb4h4YACg5VBzgUZtyKq6f5N0W1fl4pik YpoAoOCtlCJjs5Lq+dkjEHegFUvZwEXl =wtoz -----END PGP SIGNATURE----- --vRCs+Tj6pwiFrQdW-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:24:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFF27106566C; Mon, 13 Sep 2010 19:24:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B1A898FC0C; Mon, 13 Sep 2010 19:24:26 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 613C046B5C; Mon, 13 Sep 2010 15:24:26 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7B9AA8A03C; Mon, 13 Sep 2010 15:24:25 -0400 (EDT) From: John Baldwin To: Matthew D Fleming Date: Mon, 13 Sep 2010 15:18:38 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201009131848.o8DImNU6024992@svn.freebsd.org> In-Reply-To: <201009131848.o8DImNU6024992@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201009131518.38829.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Sep 2010 15:24:25 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212572 - in head/sys: dev/cxgb kern sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:24:27 -0000 On Monday, September 13, 2010 2:48:23 pm Matthew D Fleming wrote: > Author: mdf > Date: Mon Sep 13 18:48:23 2010 > New Revision: 212572 > URL: http://svn.freebsd.org/changeset/base/212572 > > Log: > Revert r212370, as it causes a LOR on powerpc. powerpc does a few > unexpected things in copyout(9) and so wiring the user buffer is not > sufficient to perform a copyout(9) while holding a random mutex. > > Requested by: nwhitehorn Hmmm, that is going to break several other sysctls as well then. Many sysctls use sysctl_wire_old_buffer() explicitly so that they can then call SYSCTL_OUT() without dropping a lock. The pcblist sysctls do this for example I think. In general code in the kernel assumes that copyout(9) to/from a wired buffer is safe while holding mutexes or rwlocks. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:32:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BABE4106564A; Mon, 13 Sep 2010 19:32:19 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABFB8FC14; Mon, 13 Sep 2010 19:32:19 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0L8P00506A9U3O00@smtpauth3.wiscmail.wisc.edu>; Mon, 13 Sep 2010 14:32:19 -0500 (CDT) Received: from anacreon.physics.wisc.edu (anacreon.physics.wisc.edu [128.104.160.176]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0L8P000PCA9QQ560@smtpauth3.wiscmail.wisc.edu>; Mon, 13 Sep 2010 14:32:14 -0500 (CDT) Date: Mon, 13 Sep 2010 14:32:13 -0500 From: Nathan Whitehorn In-reply-to: <201009131518.38829.jhb@freebsd.org> To: John Baldwin Message-id: <20100913143213.420ec5c6@anacreon.physics.wisc.edu> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; powerpc64-portbld-freebsd9.0) X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.160.176 X-Spam-PmxInfo: Server=avs-14, Version=5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2010.9.13.192414, SenderIP=128.104.160.176 References: <201009131848.o8DImNU6024992@svn.freebsd.org> <201009131518.38829.jhb@freebsd.org> Cc: svn-src-head@freebsd.org, Matthew D Fleming , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212572 - in head/sys: dev/cxgb kern sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:32:19 -0000 On Mon, 13 Sep 2010 15:18:38 -0400 John Baldwin wrote: > On Monday, September 13, 2010 2:48:23 pm Matthew D Fleming wrote: > > Author: mdf > > Date: Mon Sep 13 18:48:23 2010 > > New Revision: 212572 > > URL: http://svn.freebsd.org/changeset/base/212572 > > > > Log: > > Revert r212370, as it causes a LOR on powerpc. powerpc does a few > > unexpected things in copyout(9) and so wiring the user buffer is > > not sufficient to perform a copyout(9) while holding a random mutex. > > > > Requested by: nwhitehorn > > Hmmm, that is going to break several other sysctls as well then. > Many sysctls use sysctl_wire_old_buffer() explicitly so that they can > then call SYSCTL_OUT() without dropping a lock. The pcblist sysctls > do this for example I think. In general code in the kernel assumes > that copyout(9) to/from a wired buffer is safe while holding mutexes > or rwlocks. > Yes. The issue here is that powerpc64 copyin/out() needs to acquire the PMAP lock, so holding normal mutexes is fine, but calling into copyout() with non-sleepable locks like this code did is not. Matthew and I are working on a better solution that fixes this on the powerpc copyout() side, but it is tricky for a variety of reasons and will take a little while. In the meantime, this keeps powerpc64 systems bootable. -Nathan From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:47:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91B2A106566C; Mon, 13 Sep 2010 19:47:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80BDA8FC22; Mon, 13 Sep 2010 19:47:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJl96w028099; Mon, 13 Sep 2010 19:47:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJl98t028097; Mon, 13 Sep 2010 19:47:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009131947.o8DJl98t028097@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 13 Sep 2010 19:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212573 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:47:09 -0000 Author: pjd Date: Mon Sep 13 19:47:09 2010 New Revision: 212573 URL: http://svn.freebsd.org/changeset/base/212573 Log: Remove the page queues lock around vm_page_undirty() - it is no longer needed. Reviewed by: alc Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Sep 13 18:48:23 2010 (r212572) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Sep 13 19:47:09 2010 (r212573) @@ -326,9 +326,7 @@ page_lookup(vnode_t *vp, int64_t start, if (vm_page_sleep_if_busy(pp, FALSE, "zfsmwb")) continue; vm_page_busy(pp); - vm_page_lock_queues(); vm_page_undirty(pp); - vm_page_unlock_queues(); } else { if (__predict_false(obj->cache != NULL)) { vm_page_cache_free(obj, OFF_TO_IDX(start), From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:51:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F40E1065696; Mon, 13 Sep 2010 19:51:15 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DBE58FC27; Mon, 13 Sep 2010 19:51:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJpFCI028325; Mon, 13 Sep 2010 19:51:15 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJpFLh028318; Mon, 13 Sep 2010 19:51:15 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201009131951.o8DJpFLh028318@svn.freebsd.org> From: Hiroki Sato Date: Mon, 13 Sep 2010 19:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212574 - in head: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:51:15 -0000 Author: hrs Date: Mon Sep 13 19:51:15 2010 New Revision: 212574 URL: http://svn.freebsd.org/changeset/base/212574 Log: Revert changes in r206408. Discussed with: dougb, core.5, and core.6 Modified: head/etc/defaults/rc.conf head/etc/network.subr head/etc/rc.d/ip6addrctl head/etc/rc.d/netif head/etc/rc.d/netoptions head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 13 19:47:09 2010 (r212573) +++ head/etc/defaults/rc.conf Mon Sep 13 19:51:15 2010 (r212574) @@ -210,8 +210,6 @@ cloned_interfaces="" # List of cloned n ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. -#ifconfig_ed0_ipv6="RTADV" # Sample IPv6 entry for RA/rtsol(8) -#ifconfig_ed0_ipv6="inet6 auto_linklocal" # To configure only link-local #ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" # Sample IPv6 addr entry #ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" # Sample IPv6 alias #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0. @@ -446,9 +444,8 @@ ubthidhci_enable="NO" # Switch an USB B icmp_bmcastecho="NO" # respond to broadcast ping packets ### IPv6 options: ### -ipv6_network_interfaces="AUTO" # List of IPv6 network interfaces -ipv6_prefer="YES" # Use IPv6 when both IPv4 and IPv6 can be used -ipv6_privacy="NO" # Use privacy addresses with RTADV (RFC 4193) +ipv6_network_interfaces="none" # List of IPv6 network interfaces + # (or "auto" or "none"). ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO). #ipv6_defaultrouter="2002:c058:6301::" # Use this for 6to4 (RFC 3068) ipv6_static_routes="" # Set to static route list (or leave empty). @@ -507,6 +504,7 @@ ipv6_ipfilter_rules="/etc/ipf6.rules" # # for examples ip6addrctl_enable="YES" # Set to YES to enable default address selection ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages +ipv6_prefer="NO" # Use IPv6 when both IPv4 and IPv6 can be used ############################################################## ### System console options ################################# Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Mon Sep 13 19:47:09 2010 (r212573) +++ head/etc/network.subr Mon Sep 13 19:51:15 2010 (r212574) @@ -96,32 +96,44 @@ ifconfig_up() # inet6 specific if afexists inet6; then if ipv6if $1; then - # Implicitly handles ipv6_gateway_enable - _ipv6_opts='-ifdisabled -accept_rtadv' - - if ipv6_autoconfif $1; then - _ipv6_opts='-ifdisabled accept_rtadv' - fi - - ifconfig $1 inet6 $_ipv6_opts - - # ifconfig_IF_ipv6 - ifconfig_args=`ifconfig_getargs $1 ipv6` - - if [ -n "$ifconfig_args" ]; then - ifconfig $1 $ifconfig_args - _cfg=0 + if checkyesno ipv6_gateway_enable; then + _ipv6_opts="-accept_rtadv" fi else - # Remove in FreeBSD 10.x - # Explicit test is necessary here to avoid nonexistence error - case "$ipv6_enable" in - [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - warn "Interface $1 will NOT be configured for IPv6" + if checkyesno ipv6_prefer; then + _ipv6_opts="-ifdisabled" + else + _ipv6_opts="ifdisabled" + fi + + # backward compatibility: $ipv6_enable + case $ipv6_enable in + [Yy][Ee][Ss]) + _ipv6_opts="${_ipv6_opts} accept_rtadv" ;; esac + fi - ifconfig $1 inet6 ifdisabled + if [ -n "${_ipv6_opts}" ]; then + ifconfig $1 inet6 ${_ipv6_opts} + fi + + # ifconfig_IF_ipv6 + ifconfig_args=`ifconfig_getargs $1 ipv6` + if [ -n "${ifconfig_args}" ]; then + ifconfig $1 inet6 -ifdisabled + ifconfig $1 ${ifconfig_args} + _cfg=0 + fi + + # backward compatiblity: $ipv6_ifconfig_IF + ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF` + if [ -n "${ifconfig_args}" ]; then + warn "\$ipv6_ifconfig_$1 is obsolete." \ + " Use ifconfig_$1_ipv6 instead." + ifconfig $1 inet6 -ifdisabled + ifconfig $1 inet6 ${ifconfig_args} + _cfg=0 fi fi @@ -182,7 +194,7 @@ ifconfig_down() # $default if given. get_if_var() { - local _if _punct _punct_c _var _default prefix suffix + local _if _punct _var _default prefix suffix if [ $# -ne 2 -a $# -ne 3 ]; then err 3 'USAGE: get_if_var name var [default]' @@ -207,7 +219,7 @@ get_if_var() # outside this file. _ifconfig_getargs() { - local _ifn _af value + local _ifn _af _ifn=$1 _af=${2+_$2} @@ -215,18 +227,7 @@ _ifconfig_getargs() return 1 fi - value=`get_if_var $_ifn ifconfig_IF$_af "$ifconfig_DEFAULT"` - - # Remove in FreeBSD 10.x - if [ "$_af" = _ipv6 -a -z "$value" ]; then - value=`get_if_var $_ifn ipv6_ifconfig_IF "$ifconfig_DEFAULT"` - if [ -n "$value" ]; then - warn "\$ipv6_ifconfig_$1 is obsolete." \ - " Use ifconfig_$1_ipv6 instead." - fi - fi - - echo $value + get_if_var $_ifn ifconfig_IF$_af "$ifconfig_DEFAULT" } # ifconfig_getargs if [af] @@ -248,8 +249,6 @@ ifconfig_getargs() [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;; [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;; [Ww][Pp][Aa]) ;; - [Rr][Tt][Aa][Dd][Vv]) ;; - [Nn][Oo][Rr][Tt][Aa][Dd][Vv]) ;; *) _args="$_args $_arg" ;; @@ -373,47 +372,77 @@ afexists() esac } +# noafif if +# Returns 0 if the interface has no af configuration and 1 otherwise. +noafif() +{ + local _if + _if=$1 + + case $_if in + pflog[0-9]*|\ + pfsync[0-9]*|\ + an[0-9]*|\ + ath[0-9]*|\ + ipw[0-9]*|\ + iwi[0-9]*|\ + iwn[0-9]*|\ + ral[0-9]*|\ + wi[0-9]*|\ + wl[0-9]*|\ + wpi[0-9]*) + return 0 + ;; + esac + + return 1 +} + # ipv6if if # Returns 0 if the interface should be configured for IPv6 and # 1 otherwise. ipv6if() { + local _if _tmpargs i + _if=$1 + if ! afexists inet6; then return 1 fi # lo0 is always IPv6-enabled - case $1 in + case $_if in lo0) return 0 ;; esac - local _if _tmpargs i - _if=$1 + # True if $ifconfig_IF_ipv6 is defined. + _tmpargs=`_ifconfig_getargs $_if ipv6` + if [ -n "${_tmpargs}" ]; then + return 0 + fi + + # backward compatibility: True if $ipv6_ifconfig_IF is defined. + _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` + if [ -n "${_tmpargs}" ]; then + return 0 + fi - case "$ipv6_network_interfaces" in + case "${ipv6_network_interfaces}" in + [Aa][Uu][Tt][Oo]) + return 0 + ;; ''|[Nn][Oo][Nn][Ee]) return 1 ;; - $_if|"$_if "*|*" $_if"|*" $_if "*|[Aa][Uu][Tt][Oo]) - # True if $ifconfig_IF_ipv6 is defined. - _tmpargs=`_ifconfig_getargs $_if ipv6` - # Also true if ipv6_prefix_IF is defined - [ -n "$_tmpargs" ] || _tmpargs=`get_if_var $_if ipv6_prefix_IF` - ;; esac - if [ -n "$_tmpargs" ]; then - # Remove in FreeBSD 10.x - # Explicit test is necessary here to avoid nonexistence error - case "$ipv6_enable" in - [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) - ;; - *) return 0 - ;; - esac - fi + for i in ${ipv6_network_interfaces}; do + if [ "$i" = "$_if" ]; then + return 0 + fi + done return 1 } @@ -423,24 +452,15 @@ ipv6if() # Stateless Address Configuration, 1 otherwise. ipv6_autoconfif() { - case $1 in - lo0|\ - stf[0-9]*|\ - faith[0-9]*|\ - lp[0-9]*|\ - sl[0-9]*|\ - pflog[0-9]*|\ - pfsync[0-9]*) - return 1 - ;; - esac - local _if _tmpargs _arg _if=$1 if ! ipv6if $_if; then return 1 fi + if noafif $_if; then + return 1 + fi if checkyesno ipv6_gateway_enable; then return 1 fi @@ -448,24 +468,45 @@ ipv6_autoconfif() if [ -n "${_tmpargs}" ]; then return 1 fi - if ! is_wired_interface $_if; then - case $_if in - wlan[0-9]*) ;; # Allow test to continue - *) return 1 - ;; - esac - fi - _tmpargs=`_ifconfig_getargs $_if ipv6` - case "$_tmpargs" in - *inet6\ *|*[Nn][Oo][Rr][Tt][Aa][Dd][Vv]*|*-accept_rtadv*) + case $_if in + lo0|\ + stf[0-9]*|\ + faith[0-9]*|\ + lp[0-9]*|\ + sl[0-9]*|\ + pflog[0-9]*|\ + pfsync[0-9]*) return 1 ;; - *[Rr][Tt][Aa][Dd][Vv]*|*accept_rtadv*) + esac + + # backward compatibility: $ipv6_enable + case $ipv6_enable in + [Yy][Ee][Ss]) return 0 ;; esac + _tmpargs=`_ifconfig_getargs $_if ipv6` + for _arg in $_tmpargs; do + case $_arg in + accept_rtadv) + return 0 + ;; + esac + done + + # backward compatibility: $ipv6_ifconfig_IF + _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` + for _arg in $_tmpargs; do + case $_arg in + accept_rtadv) + return 0 + ;; + esac + done + return 1 } @@ -478,7 +519,7 @@ ifexists() } # ipv4_up if -# add IPv4 addresses to the interface $if +# add IPv4 addresses to the interface $if ipv4_up() { local _if _ret @@ -588,14 +629,14 @@ ipv6_down() ipv4_addrs_common() { local _ret _if _action _cidr _cidr_addr - local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount + local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount _ret=1 _if=$1 _action=$2 - + # get ipv4-addresses cidr_addr=`get_if_var $_if ipv4_addrs_IF` - + for _cidr in ${cidr_addr}; do _ipaddr=${_cidr%%/*} _netmask="/"${_cidr##*/} @@ -608,7 +649,7 @@ ipv4_addrs_common() if [ "${_action}" = "-alias" ]; then _netmask="" fi - + _ipcount=${_iplow} while [ "${_ipcount}" -le "${_iphigh}" ]; do eval "ifconfig ${_if} ${_action} ${_ipnet}.${_ipcount}${_netmask}" Modified: head/etc/rc.d/ip6addrctl ============================================================================== --- head/etc/rc.d/ip6addrctl Mon Sep 13 19:47:09 2010 (r212573) +++ head/etc/rc.d/ip6addrctl Mon Sep 13 19:51:15 2010 (r212574) @@ -20,6 +20,8 @@ status_cmd="ip6addrctl" prefer_ipv6_cmd="ip6addrctl_prefer_ipv6" prefer_ipv4_cmd="ip6addrctl_prefer_ipv4" +set_rcvar_obsolete ipv6_enable ipv6_prefer + ip6addrctl_prefer_ipv6() { afexists inet6 || return 0 Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Mon Sep 13 19:47:09 2010 (r212573) +++ head/etc/rc.d/netif Mon Sep 13 19:51:15 2010 (r212574) @@ -34,7 +34,6 @@ . /etc/network.subr name="network" -start_precmd="network_prestart" start_cmd="network_start" stop_cmd="network_stop" cloneup_cmd="clone_up" @@ -42,13 +41,7 @@ clonedown_cmd="clone_down" extra_commands="cloneup clonedown" cmdifn= -network_prestart() -{ - if [ -n "$ipv6_enable" ]; then - warn 'The ipv6_enable option is deprecated.' - warn 'See rc.conf(5) for information on disabling IPv6.' - fi -} +set_rcvar_obsolete ipv6_enable ipv6_prefer network_start() { Modified: head/etc/rc.d/netoptions ============================================================================== --- head/etc/rc.d/netoptions Mon Sep 13 19:47:09 2010 (r212573) +++ head/etc/rc.d/netoptions Mon Sep 13 19:51:15 2010 (r212574) @@ -99,13 +99,6 @@ netoptions_inet6() else ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null fi - - if checkyesno ipv6_privacy; then - netoptions_init - echo -n " IPv6 Privacy Addresses" - ${SYSCTL_W} net.inet6.ip6.use_tempaddr=1 >/dev/null - ${SYSCTL_W} net.inet6.ip6.prefer_tempaddr=1 >/dev/null - fi } load_rc_config $name Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Sep 13 19:47:09 2010 (r212573) +++ head/share/man/man5/rc.conf.5 Mon Sep 13 19:51:15 2010 (r212574) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 4, 2010 +.Dd September 13, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -1261,86 +1261,26 @@ It is also possible to rename an interfa ifconfig_ed0_name="net0" ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00" .Ed -.\" Remove in FreeBSD 10.x .It Va ipv6_enable .Pq Vt bool -.Pp -This option is deprecated. -.Pp -If the variable is -.Dq Li YES -it has no effect. -To configure IPv6 for an interface see -.Va ipv6_network_interfaces -below. -.Pp If the variable is -.Dq Li NO -then other than -.Dq Li lo0 -IPv6 will be disabled for each interface, -however the same effect can be achieved by -not configuring the interface. -.It Va ipv6_network_interfaces -.Pq Vt str -This is the IPv6 equivalent of -.Va network_interfaces . -Normally configuration of this variable is not needed, -the value should be left as -.Dq Li AUTO . -.Pp -If -.Dq Li INET6 -is configured in the kernel configuration for the -.Dq Li lo0 -interface will always be performed. -It is not necessary to list it in -.Va ipv6_network_interfaces . -.Pp -Example configuration to accept Router Advertisements (RA) for the -.Dq Li ed0 -interface: -.Bd -literal -ifconfig_ed0_ipv6="RTADV" -.Ed -.Pp -To configure only a link-local address on the -.Dq Li ed0 -interface: -.Bd -literal -ifconfig_ed0_ipv6="inet6 auto_linklocal" -.Ed -.Pp -To disable RA the -.Dq Li NORTADV -option is available, although not required if manual -configuration is performed as described below. +.Dq Li YES , +.Dq Li inet6 accept_rtadv +is added to all of +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +and the +.Va ipv6_prefer +is defined as +.Dq Li YES . .Pp -An IPv6 interface can be configured manually with +This variable is deprecated. Use +.Va ipv6_prefer +and .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 . -For example: -.Bd -literal -ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" -.Ed -.Pp -Manual configuration of an IPv6 address will also -require configuration of the -.Va ipv6_defaultrouter -option. -.Pp -Aliases should be set by -.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n -with the -.Dq Li inet6 -keyword. -For example: -.Pp -.Bd -literal -ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" -.Ed -.Pp .It Va ipv6_prefer .Pq Vt bool +This variable does the following: +.Pp If the variable is .Dq Li YES , the default policy of the source address selection set by @@ -1351,15 +1291,49 @@ If the variable is .Dq Li NO , the default policy of the source address selection set by .Xr ip6addrctl 8 -will be IPv4-preferred. +will be IPv4-preferred, and all of interfaces which does not have the +corrsponding +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +variable will be marked as +.Dq Li IFDISABLED . +This means only IPv6 functionality on that interface is completely +disabled. For more details of +.Dq Li IFDISABLED +flag and keywords +.Dq Li inet6 ifdisabled , +see +.Xr ifconfig 8 . .Pp -.It Va ipv6_privacy -.Pq Vt bool -If the variable is -.Dq Li YES -privacy addresses will be generated for each IPv6 -interface as described in RFC 4193. +.It Va ipv6_network_interfaces +.Pq Vt str +This is the IPv6 equivalent of +.Va network_interfaces . +Normally manual configuration of this variable is not needed. .Pp +IPv6 functionality on an interface should be configured by +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 , +instead of setting ifconfig parameters in +.Va ifconfig_ Ns Aq Ar interface . +Aliases should be set by +.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n +with +.Dq Li inet6 +keyword. For example: +.Bd -literal +ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" +ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" +.Ed +.Pp +Interfaces that have an +.Dq Li inet6 accept_rtadv +keyword in +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +setting will be automatically configured by +.Xr rtsol 8 . +Note that this automatic configuration is disabled if the +.Va ipv6_gateway_enable +is set to +.Dq Li YES . .It Va ipv6_prefix_ Ns Aq Ar interface .Pq Vt str If one or more prefixes are defined in From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:52:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 861191065693; Mon, 13 Sep 2010 19:52:04 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4448FC0A; Mon, 13 Sep 2010 19:52:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJq4UA028400; Mon, 13 Sep 2010 19:52:04 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJq4JA028397; Mon, 13 Sep 2010 19:52:04 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201009131952.o8DJq4JA028397@svn.freebsd.org> From: Hiroki Sato Date: Mon, 13 Sep 2010 19:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212575 - in head/etc: . defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:52:04 -0000 Author: hrs Date: Mon Sep 13 19:52:04 2010 New Revision: 212575 URL: http://svn.freebsd.org/changeset/base/212575 Log: Fix $ipv6_network_interfaces and set it as AUTO by default. Based on: changes in r206408 by dougb Modified: head/etc/defaults/rc.conf head/etc/network.subr Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 13 19:51:15 2010 (r212574) +++ head/etc/defaults/rc.conf Mon Sep 13 19:52:04 2010 (r212575) @@ -444,7 +444,7 @@ ubthidhci_enable="NO" # Switch an USB B icmp_bmcastecho="NO" # respond to broadcast ping packets ### IPv6 options: ### -ipv6_network_interfaces="none" # List of IPv6 network interfaces +ipv6_network_interfaces="auto" # List of IPv6 network interfaces # (or "auto" or "none"). ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO). #ipv6_defaultrouter="2002:c058:6301::" # Use this for 6to4 (RFC 3068) Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Mon Sep 13 19:51:15 2010 (r212574) +++ head/etc/network.subr Mon Sep 13 19:52:04 2010 (r212575) @@ -417,32 +417,21 @@ ipv6if() ;; esac - # True if $ifconfig_IF_ipv6 is defined. - _tmpargs=`_ifconfig_getargs $_if ipv6` - if [ -n "${_tmpargs}" ]; then - return 0 - fi - - # backward compatibility: True if $ipv6_ifconfig_IF is defined. - _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` - if [ -n "${_tmpargs}" ]; then - return 0 - fi - case "${ipv6_network_interfaces}" in - [Aa][Uu][Tt][Oo]) - return 0 - ;; - ''|[Nn][Oo][Nn][Ee]) - return 1 - ;; - esac + $_if|"$_if "*|*" $_if"|*" $_if "*|[Aa][Uu][Tt][Oo]) + # True if $ifconfig_IF_ipv6 is defined. + _tmpargs=`_ifconfig_getargs $_if ipv6` + if [ -n "${_tmpargs}" ]; then + return 0 + fi - for i in ${ipv6_network_interfaces}; do - if [ "$i" = "$_if" ]; then + # backward compatibility: True if $ipv6_ifconfig_IF is defined. + _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` + if [ -n "${_tmpargs}" ]; then return 0 fi - done + ;; + esac return 1 } From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:52:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59A0A1065670; Mon, 13 Sep 2010 19:52:47 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E81F8FC12; Mon, 13 Sep 2010 19:52:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJqlj4028466; Mon, 13 Sep 2010 19:52:47 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJql40028462; Mon, 13 Sep 2010 19:52:47 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201009131952.o8DJql40028462@svn.freebsd.org> From: Hiroki Sato Date: Mon, 13 Sep 2010 19:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212576 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:52:47 -0000 Author: hrs Date: Mon Sep 13 19:52:46 2010 New Revision: 212576 URL: http://svn.freebsd.org/changeset/base/212576 Log: Add $ipv6_privacy to support net.inet6.ip6.use_tempaddr. Note that this will be replaced with a per-IF version later. Based on: changes in r206408 by dougb Modified: head/etc/defaults/rc.conf head/etc/rc.d/netoptions head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 13 19:52:04 2010 (r212575) +++ head/etc/defaults/rc.conf Mon Sep 13 19:52:46 2010 (r212576) @@ -453,6 +453,8 @@ ipv6_static_routes="" # Set to static r # route toward loopback interface. #ipv6_route_xxx="fec0:0000:0000:0006:: -prefixlen 64 ::1" ipv6_gateway_enable="NO" # Set to YES if this host will be a gateway. +ipv6_privacy="NO" # Use privacy address on RA-receiving IFs + # (RFC 4193) route6d_enable="NO" # Set to YES to enable an IPv6 routing daemon. route6d_program="/usr/sbin/route6d" # Name of IPv6 routing daemon. Modified: head/etc/rc.d/netoptions ============================================================================== --- head/etc/rc.d/netoptions Mon Sep 13 19:52:04 2010 (r212575) +++ head/etc/rc.d/netoptions Mon Sep 13 19:52:46 2010 (r212576) @@ -99,6 +99,13 @@ netoptions_inet6() else ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null fi + + if checkyesno ipv6_privacy; then + netoptions_init + echo -n " IPv6 Privacy Addresses" + ${SYSCTL_W} net.inet6.ip6.use_tempaddr=1 >/dev/null + ${SYSCTL_W} net.inet6.ip6.prefer_tempaddr=1 >/dev/null + fi } load_rc_config $name Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Sep 13 19:52:04 2010 (r212575) +++ head/share/man/man5/rc.conf.5 Mon Sep 13 19:52:46 2010 (r212576) @@ -1304,6 +1304,12 @@ flag and keywords see .Xr ifconfig 8 . .Pp +.It Va ipv6_privacy +.Pq Vt bool +If the variable is +.Dq Li YES +privacy addresses will be generated for each IPv6 +interface as described in RFC 4193. .It Va ipv6_network_interfaces .Pq Vt str This is the IPv6 equivalent of From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:53:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2E241065674; Mon, 13 Sep 2010 19:53:22 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2E1A8FC24; Mon, 13 Sep 2010 19:53:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJrMoo028547; Mon, 13 Sep 2010 19:53:22 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJrMhO028545; Mon, 13 Sep 2010 19:53:22 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201009131953.o8DJrMhO028545@svn.freebsd.org> From: Hiroki Sato Date: Mon, 13 Sep 2010 19:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212577 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:53:22 -0000 Author: hrs Date: Mon Sep 13 19:53:22 2010 New Revision: 212577 URL: http://svn.freebsd.org/changeset/base/212577 Log: - Check some specific IFs first in ipv6_autoconfif(). - $ipv6_enable supports YES|TRUE|ON|1 as in checkyesno(). Based on: changes in r206408 by dougb Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Mon Sep 13 19:52:46 2010 (r212576) +++ head/etc/network.subr Mon Sep 13 19:53:22 2010 (r212577) @@ -108,7 +108,7 @@ ifconfig_up() # backward compatibility: $ipv6_enable case $ipv6_enable in - [Yy][Ee][Ss]) + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) _ipv6_opts="${_ipv6_opts} accept_rtadv" ;; esac @@ -385,6 +385,7 @@ noafif() an[0-9]*|\ ath[0-9]*|\ ipw[0-9]*|\ + ipfw[0-9]*|\ iwi[0-9]*|\ iwn[0-9]*|\ ral[0-9]*|\ @@ -444,12 +445,21 @@ ipv6_autoconfif() local _if _tmpargs _arg _if=$1 - if ! ipv6if $_if; then + case $_if in + lo0|\ + stf[0-9]*|\ + faith[0-9]*|\ + lp[0-9]*|\ + sl[0-9]*) return 1 - fi + ;; + esac if noafif $_if; then return 1 fi + if ! ipv6if $_if; then + return 1 + fi if checkyesno ipv6_gateway_enable; then return 1 fi @@ -457,24 +467,11 @@ ipv6_autoconfif() if [ -n "${_tmpargs}" ]; then return 1 fi - - case $_if in - lo0|\ - stf[0-9]*|\ - faith[0-9]*|\ - lp[0-9]*|\ - sl[0-9]*|\ - pflog[0-9]*|\ - pfsync[0-9]*) - return 1 - ;; - esac - # backward compatibility: $ipv6_enable case $ipv6_enable in - [Yy][Ee][Ss]) + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) return 0 - ;; + ;; esac _tmpargs=`_ifconfig_getargs $_if ipv6` From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:53:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 809E810656A8; Mon, 13 Sep 2010 19:53:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70A978FC12; Mon, 13 Sep 2010 19:53:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJrsYO028616; Mon, 13 Sep 2010 19:53:54 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJrsl2028614; Mon, 13 Sep 2010 19:53:54 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201009131953.o8DJrsl2028614@svn.freebsd.org> From: Hiroki Sato Date: Mon, 13 Sep 2010 19:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212578 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:53:54 -0000 Author: hrs Date: Mon Sep 13 19:53:54 2010 New Revision: 212578 URL: http://svn.freebsd.org/changeset/base/212578 Log: Localize $_punct_c in get_if_var() and whitespace clean-ups. Based on: changes in r206408 by dougb Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Mon Sep 13 19:53:22 2010 (r212577) +++ head/etc/network.subr Mon Sep 13 19:53:54 2010 (r212578) @@ -194,7 +194,7 @@ ifconfig_down() # $default if given. get_if_var() { - local _if _punct _var _default prefix suffix + local _if _punct _punct_c _var _default prefix suffix if [ $# -ne 2 -a $# -ne 3 ]; then err 3 'USAGE: get_if_var name var [default]' @@ -505,7 +505,7 @@ ifexists() } # ipv4_up if -# add IPv4 addresses to the interface $if +# add IPv4 addresses to the interface $if ipv4_up() { local _if _ret @@ -615,14 +615,14 @@ ipv6_down() ipv4_addrs_common() { local _ret _if _action _cidr _cidr_addr - local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount + local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount _ret=1 _if=$1 _action=$2 - + # get ipv4-addresses cidr_addr=`get_if_var $_if ipv4_addrs_IF` - + for _cidr in ${cidr_addr}; do _ipaddr=${_cidr%%/*} _netmask="/"${_cidr##*/} @@ -635,7 +635,7 @@ ipv4_addrs_common() if [ "${_action}" = "-alias" ]; then _netmask="" fi - + _ipcount=${_iplow} while [ "${_ipcount}" -le "${_iphigh}" ]; do eval "ifconfig ${_if} ${_action} ${_ipnet}.${_ipcount}${_netmask}" From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:55:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E73F1065672; Mon, 13 Sep 2010 19:55:40 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8208FC19; Mon, 13 Sep 2010 19:55:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJteHM028754; Mon, 13 Sep 2010 19:55:40 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJteMC028747; Mon, 13 Sep 2010 19:55:40 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201009131955.o8DJteMC028747@svn.freebsd.org> From: Hiroki Sato Date: Mon, 13 Sep 2010 19:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212579 - in head: . etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:55:40 -0000 Author: hrs Date: Mon Sep 13 19:55:40 2010 New Revision: 212579 URL: http://svn.freebsd.org/changeset/base/212579 Log: Split $ipv6_prefer into $ip6addrctl_policy and $ipv6_activate_all_interfaces. The $ip6addrctl_policy is a variable to choose a pre-defined address selection policy set by ip6addrctl(8). The keyword "ipv4_prefer" sets IPv4-preferred one described in Section 10.3, the keyword "ipv6_prefer" sets IPv6-preferred one in Section 2.1 in RFC 3484, respectively. When "AUTO" is specified, it attempts to read /etc/ip6addrctl.conf first. If it is found, it reads and installs it as a policy table. If not, either of the two pre-defined policy tables is chosen automatically according to $ipv6_activate_all_interfaces. When $ipv6_activate_all_interfaces=NO, interfaces which have no corresponding $ifconfig_IF_ipv6 is marked as IFDISABLED for security reason. The default values are ip6addrctl_policy=AUTO and ipv6_activate_all_interfaces=NO. Discussed with: ume and bz Modified: head/UPDATING head/etc/defaults/rc.conf head/etc/network.subr head/etc/rc.d/ip6addrctl head/etc/rc.d/netif head/share/man/man5/rc.conf.5 Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Sep 13 19:53:54 2010 (r212578) +++ head/UPDATING Mon Sep 13 19:55:40 2010 (r212579) @@ -23,6 +23,25 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. ln -s aj /etc/malloc.conf.) 20100913: + The $ipv6_prefer variable in rc.conf(5) has been split into + $ip6addrctl_policy and $ipv6_activate_all_interfaces. + + The $ip6addrctl_policy is a variable to choose a pre-defined + address selection policy set by ip6addrctl(8). A value + "ipv4_prefer", "ipv6_prefer" or "AUTO" can be specified. The + default is "AUTO". + + The $ipv6_activate_all_interfaces specifies whether IFDISABLED + flag (see an entry of 20090926) is set on an interface with no + corresponding $ifconfig_IF_ipv6 line. The default is "NO" for + security reason. If you want IPv6 link-local address on all + interfaces by default, set this to "YES". + + The old ipv6_prefer="YES" is equivalent to + ipv6_activate_all_interfaces="YES" and + ip6addrctl_policy="ipv6_prefer". + +20100913: DTrace has grown support for userland tracing. Due to this, DTrace is now i386 and amd64 only. dtruss(1) is now installed by default on those systems and a new Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 13 19:53:54 2010 (r212578) +++ head/etc/defaults/rc.conf Mon Sep 13 19:55:40 2010 (r212579) @@ -446,6 +446,10 @@ icmp_bmcastecho="NO" # respond to broadc ### IPv6 options: ### ipv6_network_interfaces="auto" # List of IPv6 network interfaces # (or "auto" or "none"). +ipv6_activate_all_interfaces="NO" # If NO, interfaces which have no + # corresponding $ifconfig_IF_ipv6 is + # marked as IFDISABLED for security + # reason. ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO). #ipv6_defaultrouter="2002:c058:6301::" # Use this for 6to4 (RFC 3068) ipv6_static_routes="" # Set to static route list (or leave empty). @@ -506,7 +510,8 @@ ipv6_ipfilter_rules="/etc/ipf6.rules" # # for examples ip6addrctl_enable="YES" # Set to YES to enable default address selection ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages -ipv6_prefer="NO" # Use IPv6 when both IPv4 and IPv6 can be used +ip6addrctl_policy="AUTO" # A pre-defined address selection policy + # (ipv4_prefer, ipv6_prefer, or AUTO) ############################################################## ### System console options ################################# Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Mon Sep 13 19:53:54 2010 (r212578) +++ head/etc/network.subr Mon Sep 13 19:55:40 2010 (r212579) @@ -100,7 +100,7 @@ ifconfig_up() _ipv6_opts="-accept_rtadv" fi else - if checkyesno ipv6_prefer; then + if checkyesno ipv6_activate_all_interfaces; then _ipv6_opts="-ifdisabled" else _ipv6_opts="ifdisabled" Modified: head/etc/rc.d/ip6addrctl ============================================================================== --- head/etc/rc.d/ip6addrctl Mon Sep 13 19:53:54 2010 (r212578) +++ head/etc/rc.d/ip6addrctl Mon Sep 13 19:55:40 2010 (r212579) @@ -19,8 +19,10 @@ extra_commands="status prefer_ipv6 prefe status_cmd="ip6addrctl" prefer_ipv6_cmd="ip6addrctl_prefer_ipv6" prefer_ipv4_cmd="ip6addrctl_prefer_ipv4" +config_file="/etc/ip6addrctl.conf" -set_rcvar_obsolete ipv6_enable ipv6_prefer +set_rcvar_obsolete ipv6_enable ipv6_activate_all_interfaces +set_rcvar_obsolete ipv6_prefer ip6addrctl_policy ip6addrctl_prefer_ipv6() { @@ -53,17 +55,40 @@ ip6addrctl_start() afexists inet6 || return 0 # install the policy of the address selection algorithm. - if [ -f /etc/ip6addrctl.conf ]; then - ip6addrctl flush >/dev/null 2>&1 - ip6addrctl install /etc/ip6addrctl.conf - checkyesno ip6addrctl_verbose && ip6addrctl - else - if checkyesno ipv6_prefer; then - ip6addrctl_prefer_ipv6 + case "${ip6addrctl_policy}" in + [Aa][Uu][Tt][Oo]) + if [ -r "${config_file}" -a -s "${config_file}" ]; then + ip6addrctl flush >/dev/null 2>&1 + ip6addrctl install "${config_file}" + checkyesno ip6addrctl_verbose && ip6addrctl else - ip6addrctl_prefer_ipv4 + if checkyesno ipv6_activate_all_interfaces; then + ip6addrctl_prefer_ipv6 + else + ip6addrctl_prefer_ipv4 + fi fi - fi + ;; + ipv4_prefer) + ip6addrctl_prefer_ipv4 + ;; + ipv6_prefer) + ip6addrctl_prefer_ipv6 + ;; + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + # Backward compatibility when ipv6_prefer=YES + ip6addrctl_prefer_ipv6 + ;; + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + # Backward compatibility when ipv6_prefer=NO + ip6addrctl_prefer_ipv4 + ;; + *) + warn "\$ip6addrctl_policy is invalid: ${ip6addrctl_policy}. " \ + " \"ipv4_prefer\" is used instead." + ip6addrctl_prefer_ipv4 + ;; + esac } ip6addrctl_stop() Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Mon Sep 13 19:53:54 2010 (r212578) +++ head/etc/rc.d/netif Mon Sep 13 19:55:40 2010 (r212579) @@ -41,7 +41,8 @@ clonedown_cmd="clone_down" extra_commands="cloneup clonedown" cmdifn= -set_rcvar_obsolete ipv6_enable ipv6_prefer +set_rcvar_obsolete ipv6_enable ipv6_activate_all_interfaces +set_rcvar_obsolete ipv6_prefer network_start() { Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Sep 13 19:53:54 2010 (r212578) +++ head/share/man/man5/rc.conf.5 Mon Sep 13 19:55:40 2010 (r212579) @@ -1269,41 +1269,49 @@ If the variable is is added to all of .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 and the -.Va ipv6_prefer +.Va ipv6_activate_all_interfaces is defined as .Dq Li YES . .Pp This variable is deprecated. Use -.Va ipv6_prefer +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 and -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 . +.Va ipv6_activate_all_interfaces +if necessary. .It Va ipv6_prefer .Pq Vt bool -This variable does the following: -.Pp If the variable is .Dq Li YES , -the default policy of the source address selection set by +the default address selection policy table set by .Xr ip6addrctl 8 will be IPv6-preferred. .Pp If the variable is .Dq Li NO , -the default policy of the source address selection set by +the default address selection policy table set by .Xr ip6addrctl 8 -will be IPv4-preferred, and all of interfaces which does not have the -corrsponding +will be IPv4-preferred. +.Pp +This variable is deprecated. Use +.Va ip6addtctl_policy +instead. +.It Va ipv6_activate_all_interfaces +If the variable is +.Dq Li NO , +all of interfaces which do not have the corrsponding .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 variable will be marked as -.Dq Li IFDISABLED . -This means only IPv6 functionality on that interface is completely -disabled. For more details of +.Dq Li IFDISABLED +for security reason. This means only IPv6 functionality on that interface +is completely disabled. For more details of .Dq Li IFDISABLED flag and keywords .Dq Li inet6 ifdisabled , see .Xr ifconfig 8 . .Pp +Default is +.Dq Li NO . .It Va ipv6_privacy .Pq Vt bool If the variable is @@ -1316,6 +1324,8 @@ This is the IPv6 equivalent of .Va network_interfaces . Normally manual configuration of this variable is not needed. .Pp +.It Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +.Pq Vt str IPv6 functionality on an interface should be configured by .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 , instead of setting ifconfig parameters in @@ -1354,22 +1364,52 @@ this is the default output interface for This works only with ipv6_gateway_enable="NO". .It Va ip6addrctl_enable .Pq Vt bool -If set to -.Dq Li YES , -install default address selection policy table +This variable is to enable configuring default address selection policy table .Pq RFC 3484 . -If a file +The table can be specified in another variable +.Va ip6addrctl_policy . +For +.Va ip6addrctl_policy +the following keywords can be specified: +.Dq Li ipv4_prefer , +.Dq Li ipv6_prefer , +or +.Dq Li AUTO . +.Pp +If +.Dq Li ipv4_prefer +or +.Dq Li ipv6_prefer +is specified, +.Xr ip6addrctl 8 +installs a pre-defined policy table described in Section 2.1 +.Pq IPv6-preferred +or 10.3 +.Pq IPv4-preferred +of RFC 3484. +.Pp +If +.Dq Li AUTO +is specified, it attempts to read a file .Pa /etc/ip6addrctl.conf -is found the +first. If this file is found, .Xr ip6addrctl 8 -reads and installs it. -If not, a pre-defined policy table will be installed. -There are two pre-defined ones; IPv4-preferred and IPv6-preferred. -If set -.Va ipv6_prefer -variable to +reads and installs it. If not found, a policy is automatically set +according to +.Va ipv6_activate_all_interfaces +variable; if the variable is set to +.Dq Li YES +the IPv6-preferred one is used. Otherwise IPv4-preferred. +.Pp +The default value of +.Va ip6addrctl_enable +and +.Va ip6addrctl_policy +are .Dq Li YES -the IPv6-preferred one is used. Default is IPv4-preferred. +and +.Dq Li AUTO , +respectively. .It Va cloned_interfaces .Pq Vt str Set to the list of clonable network interfaces to create on this host. From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 19:58:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A01BE1065670; Mon, 13 Sep 2010 19:58:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FF1D8FC12; Mon, 13 Sep 2010 19:58:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DJwk8S028910; Mon, 13 Sep 2010 19:58:46 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DJwkUr028908; Mon, 13 Sep 2010 19:58:46 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009131958.o8DJwkUr028908@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 13 Sep 2010 19:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212580 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 19:58:46 -0000 Author: jkim Date: Mon Sep 13 19:58:46 2010 New Revision: 212580 URL: http://svn.freebsd.org/changeset/base/212580 Log: Fix segment:offset calculation of interrupt vector for relocated video BIOS when the original offset is bigger than size of one page. X86BIOS macros cannot be used here because it is assumed address is only linear in a page. Tested by: netchild Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Mon Sep 13 19:55:40 2010 (r212579) +++ head/sys/dev/fb/vesa.c Mon Sep 13 19:58:46 2010 (r212580) @@ -804,18 +804,16 @@ vesa_bios_init(void) vbios = x86bios_get_orm(vesa_bios_offs); if (vbios != NULL) { vesa_bios_size = vbios[2] * 512; - offs = BIOS_SADDRTOLADDR(vesa_bios_int10); - if (offs > vesa_bios_offs && - offs < vesa_bios_offs + vesa_bios_size) { + if (((VESA_BIOS_OFFSET << 12) & 0xffff0000) == + (vesa_bios_int10 & 0xffff0000) && + vesa_bios_size > (vesa_bios_int10 & 0xffff)) { vesa_bios = x86bios_alloc(&vesa_bios_offs, vesa_bios_size, M_WAITOK); memcpy(vesa_bios, vbios, vesa_bios_size); - offs = offs - VESA_BIOS_OFFSET + vesa_bios_offs; - offs = (X86BIOS_PHYSTOSEG(offs) << 16) + - X86BIOS_PHYSTOOFF(offs); + offs = ((vesa_bios_offs << 12) & 0xffff0000) + + (vesa_bios_int10 & 0xffff); x86bios_set_intr(0x10, offs); - } else - offs = vesa_bios_int10; + } } if (vesa_bios == NULL) printf("VESA: failed to shadow video ROM\n"); From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 20:29:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F578106566C; Mon, 13 Sep 2010 20:29:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DC5E8FC1C; Mon, 13 Sep 2010 20:29:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DKTAr4030351; Mon, 13 Sep 2010 20:29:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DKTAUa030348; Mon, 13 Sep 2010 20:29:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009132029.o8DKTAUa030348@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 13 Sep 2010 20:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212583 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 20:29:10 -0000 Author: kib Date: Mon Sep 13 20:29:09 2010 New Revision: 212583 URL: http://svn.freebsd.org/changeset/base/212583 Log: MFC r211213: The buffers b_vflags field is not always properly protected by bufobj lock. If b_bufobj is not NULL, then bufobj lock should be held when manipulating the flags. Not doing this sometimes leaves BV_BKGRDINPROG to be erronously set, causing softdep' getdirtybuf() to stuck indefinitely in "getbuf" sleep, waiting for background write to finish which is not actually performed. Add BO_LOCK() in the cases where it was missed. Modified: stable/8/sys/kern/vfs_bio.c stable/8/sys/kern/vfs_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_bio.c ============================================================================== --- stable/8/sys/kern/vfs_bio.c Mon Sep 13 20:11:18 2010 (r212582) +++ stable/8/sys/kern/vfs_bio.c Mon Sep 13 20:29:09 2010 (r212583) @@ -391,6 +391,8 @@ bufcountwakeup(struct buf *bp) KASSERT((bp->b_vflags & BV_INFREECNT) == 0, ("buf %p already counted as free", bp)); + if (bp->b_bufobj != NULL) + mtx_assert(BO_MTX(bp->b_bufobj), MA_OWNED); bp->b_vflags |= BV_INFREECNT; old = atomic_fetchadd_int(&numfreebuffers, 1); KASSERT(old >= 0 && old < nbuf, @@ -690,6 +692,8 @@ bremfree(struct buf *bp) if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { KASSERT((bp->b_vflags & BV_INFREECNT) != 0, ("buf %p not counted in numfreebuffers", bp)); + if (bp->b_bufobj != NULL) + mtx_assert(BO_MTX(bp->b_bufobj), MA_OWNED); bp->b_vflags &= ~BV_INFREECNT; old = atomic_fetchadd_int(&numfreebuffers, -1); KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); @@ -746,6 +750,8 @@ bremfreel(struct buf *bp) if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { KASSERT((bp->b_vflags & BV_INFREECNT) != 0, ("buf %p not counted in numfreebuffers", bp)); + if (bp->b_bufobj != NULL) + mtx_assert(BO_MTX(bp->b_bufobj), MA_OWNED); bp->b_vflags &= ~BV_INFREECNT; old = atomic_fetchadd_int(&numfreebuffers, -1); KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); @@ -1390,8 +1396,16 @@ brelse(struct buf *bp) /* enqueue */ mtx_lock(&bqlock); /* Handle delayed bremfree() processing. */ - if (bp->b_flags & B_REMFREE) + if (bp->b_flags & B_REMFREE) { + struct bufobj *bo; + + bo = bp->b_bufobj; + if (bo != NULL) + BO_LOCK(bo); bremfreel(bp); + if (bo != NULL) + BO_UNLOCK(bo); + } if (bp->b_qindex != QUEUE_NONE) panic("brelse: free buffer onto another queue???"); @@ -1452,8 +1466,16 @@ brelse(struct buf *bp) * if B_INVAL is set ). */ - if (!(bp->b_flags & B_DELWRI)) + if (!(bp->b_flags & B_DELWRI)) { + struct bufobj *bo; + + bo = bp->b_bufobj; + if (bo != NULL) + BO_LOCK(bo); bufcountwakeup(bp); + if (bo != NULL) + BO_UNLOCK(bo); + } /* * Something we can maybe free or reuse @@ -1482,6 +1504,8 @@ brelse(struct buf *bp) void bqrelse(struct buf *bp) { + struct bufobj *bo; + CTR3(KTR_BUF, "bqrelse(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); KASSERT(!(bp->b_flags & (B_CLUSTER|B_PAGING)), ("bqrelse: inappropriate B_PAGING or B_CLUSTER bp %p", bp)); @@ -1492,10 +1516,15 @@ bqrelse(struct buf *bp) return; } + bo = bp->b_bufobj; if (bp->b_flags & B_MANAGED) { if (bp->b_flags & B_REMFREE) { mtx_lock(&bqlock); + if (bo != NULL) + BO_LOCK(bo); bremfreel(bp); + if (bo != NULL) + BO_UNLOCK(bo); mtx_unlock(&bqlock); } bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_AGE | B_RELBUF); @@ -1505,8 +1534,13 @@ bqrelse(struct buf *bp) mtx_lock(&bqlock); /* Handle delayed bremfree() processing. */ - if (bp->b_flags & B_REMFREE) + if (bp->b_flags & B_REMFREE) { + if (bo != NULL) + BO_LOCK(bo); bremfreel(bp); + if (bo != NULL) + BO_UNLOCK(bo); + } if (bp->b_qindex != QUEUE_NONE) panic("bqrelse: free buffer onto another queue???"); /* buffers with stale but valid contents */ @@ -1541,8 +1575,13 @@ bqrelse(struct buf *bp) } mtx_unlock(&bqlock); - if ((bp->b_flags & B_INVAL) || !(bp->b_flags & B_DELWRI)) + if ((bp->b_flags & B_INVAL) || !(bp->b_flags & B_DELWRI)) { + if (bo != NULL) + BO_LOCK(bo); bufcountwakeup(bp); + if (bo != NULL) + BO_UNLOCK(bo); + } /* * Something we can maybe free or reuse. @@ -1878,7 +1917,11 @@ restart: KASSERT((bp->b_flags & B_DELWRI) == 0, ("delwri buffer %p found in queue %d", bp, qindex)); + if (bp->b_bufobj != NULL) + BO_LOCK(bp->b_bufobj); bremfreel(bp); + if (bp->b_bufobj != NULL) + BO_UNLOCK(bp->b_bufobj); mtx_unlock(&bqlock); if (qindex == QUEUE_CLEAN) { @@ -2613,7 +2656,9 @@ loop: bp->b_flags &= ~B_CACHE; else if ((bp->b_flags & (B_VMIO | B_INVAL)) == 0) bp->b_flags |= B_CACHE; + BO_LOCK(bo); bremfree(bp); + BO_UNLOCK(bo); /* * check for size inconsistancies for non-VMIO case. Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Mon Sep 13 20:11:18 2010 (r212582) +++ stable/8/sys/kern/vfs_subr.c Mon Sep 13 20:29:09 2010 (r212583) @@ -1249,13 +1249,17 @@ flushbuflist( struct bufv *bufv, int fla */ if (((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI) && (flags & V_SAVE)) { + BO_LOCK(bo); bremfree(bp); + BO_UNLOCK(bo); bp->b_flags |= B_ASYNC; bwrite(bp); BO_LOCK(bo); return (EAGAIN); /* XXX: why not loop ? */ } + BO_LOCK(bo); bremfree(bp); + BO_UNLOCK(bo); bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; brelse(bp); @@ -1307,7 +1311,9 @@ restart: BO_MTX(bo)) == ENOLCK) goto restart; + BO_LOCK(bo); bremfree(bp); + BO_UNLOCK(bo); bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; brelse(bp); @@ -1329,7 +1335,9 @@ restart: LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK, BO_MTX(bo)) == ENOLCK) goto restart; + BO_LOCK(bo); bremfree(bp); + BO_UNLOCK(bo); bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; brelse(bp); @@ -1361,7 +1369,9 @@ restartsync: VNASSERT((bp->b_flags & B_DELWRI), vp, ("buf(%p) on dirty queue without DELWRI", bp)); + BO_LOCK(bo); bremfree(bp); + BO_UNLOCK(bo); bawrite(bp); BO_LOCK(bo); goto restartsync; From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 22:50:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37656106564A; Mon, 13 Sep 2010 22:50:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2652B8FC16; Mon, 13 Sep 2010 22:50:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8DMo6iI038849; Mon, 13 Sep 2010 22:50:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8DMo6DB038847; Mon, 13 Sep 2010 22:50:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201009132250.o8DMo6DB038847@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 13 Sep 2010 22:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212586 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 22:50:06 -0000 Author: nwhitehorn Date: Mon Sep 13 22:50:05 2010 New Revision: 212586 URL: http://svn.freebsd.org/changeset/base/212586 Log: Fix a missing set of parantheses that could cause recent versions of libthr to crash deferencing a NULL pointer to the user context on powerpc64 systems with COMPAT_FREEBSD32 defined. Modified: head/sys/powerpc/powerpc/exec_machdep.c Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Mon Sep 13 22:40:10 2010 (r212585) +++ head/sys/powerpc/powerpc/exec_machdep.c Mon Sep 13 22:50:05 2010 (r212586) @@ -251,9 +251,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, tf->fixreg[FIRSTARG] = sig; #ifdef COMPAT_FREEBSD32 tf->fixreg[FIRSTARG+2] = (register_t)usfp + - (p->p_sysent->sv_flags & SV_ILP32) ? + ((p->p_sysent->sv_flags & SV_ILP32) ? offsetof(struct sigframe32, sf_uc) : - offsetof(struct sigframe, sf_uc); + offsetof(struct sigframe, sf_uc)); #else tf->fixreg[FIRSTARG+2] = (register_t)usfp + offsetof(struct sigframe, sf_uc); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 00:32:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB5A6106566B; Tue, 14 Sep 2010 00:32:29 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B97F48FC08; Tue, 14 Sep 2010 00:32:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E0WTWV046954; Tue, 14 Sep 2010 00:32:29 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E0WTvV046952; Tue, 14 Sep 2010 00:32:29 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201009140032.o8E0WTvV046952@svn.freebsd.org> From: Maksim Yevmenkin Date: Tue, 14 Sep 2010 00:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212587 - stable/8/usr.sbin/bluetooth/bthidcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 00:32:29 -0000 Author: emax Date: Tue Sep 14 00:32:29 2010 New Revision: 212587 URL: http://svn.freebsd.org/changeset/base/212587 Log: MFC r212296 Do not request SDP attributes using ranges. Apparently some devices do not like it. Tested by: Buganini < buganini at gmail dot com > Modified: stable/8/usr.sbin/bluetooth/bthidcontrol/sdp.c Directory Properties: stable/8/usr.sbin/bluetooth/bthidcontrol/ (props changed) Modified: stable/8/usr.sbin/bluetooth/bthidcontrol/sdp.c ============================================================================== --- stable/8/usr.sbin/bluetooth/bthidcontrol/sdp.c Mon Sep 13 22:50:05 2010 (r212586) +++ stable/8/usr.sbin/bluetooth/bthidcontrol/sdp.c Tue Sep 14 00:32:29 2010 (r212587) @@ -54,7 +54,9 @@ SDP_ATTR_RANGE( SDP_ATTR_PROTOCOL_DESCRI SDP_ATTR_RANGE (SDP_ATTR_ADDITIONAL_PROTOCOL_DESCRIPTOR_LISTS, SDP_ATTR_ADDITIONAL_PROTOCOL_DESCRIPTOR_LISTS), SDP_ATTR_RANGE( 0x0205, /* HIDReconnectInitiate */ - 0x0206), /* HIDDescriptorList */ + 0x0205), +SDP_ATTR_RANGE( 0x0206, /* HIDDescriptorList */ + 0x0206), SDP_ATTR_RANGE( 0x0209, /* HIDBatteryPower */ 0x0209), SDP_ATTR_RANGE( 0x020d, /* HIDNormallyConnectable */ @@ -149,7 +151,7 @@ hid_sdp_query(bdaddr_t const *local, str } if (control_psm == -1 || interrupt_psm == -1 || - reconnect_initiate == -1 || normally_connectable == -1 || + reconnect_initiate == -1 || hid_descriptor == NULL || hid_descriptor_length == -1) hid_sdp_query_exit(ENOATTR); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 01:27:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07084106564A; Tue, 14 Sep 2010 01:27:54 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA58C8FC0C; Tue, 14 Sep 2010 01:27:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E1Rro9051805; Tue, 14 Sep 2010 01:27:53 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E1RroP051803; Tue, 14 Sep 2010 01:27:53 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201009140127.o8E1RroP051803@svn.freebsd.org> From: Neel Natu Date: Tue, 14 Sep 2010 01:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212589 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:27:54 -0000 Author: neel Date: Tue Sep 14 01:27:53 2010 New Revision: 212589 URL: http://svn.freebsd.org/changeset/base/212589 Log: Enforce that pmap_mapdev() always returns uncacheable mappings. Reviewed by: imp, jchandra, jmallett Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Tue Sep 14 01:10:30 2010 (r212588) +++ head/sys/mips/mips/pmap.c Tue Sep 14 01:27:53 2010 (r212589) @@ -828,8 +828,8 @@ retry: /* * add a wired page to the kva */ - /* PMAP_INLINE */ void -pmap_kenter(vm_offset_t va, vm_paddr_t pa) +static void +pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int attr) { pt_entry_t *pte; pt_entry_t opte, npte; @@ -837,12 +837,7 @@ pmap_kenter(vm_offset_t va, vm_paddr_t p #ifdef PMAP_DEBUG printf("pmap_kenter: va: %p -> pa: %p\n", (void *)va, (void *)pa); #endif - npte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | PTE_W; - - if (is_cacheable_mem(pa)) - npte |= PTE_C_CACHE; - else - npte |= PTE_C_UNCACHED; + npte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | PTE_W | attr; pte = pmap_pte(kernel_pmap, va); opte = *pte; @@ -851,6 +846,19 @@ pmap_kenter(vm_offset_t va, vm_paddr_t p pmap_update_page(kernel_pmap, va, npte); } +void +pmap_kenter(vm_offset_t va, vm_paddr_t pa) +{ + int attr; + + if (is_cacheable_mem(pa)) + attr = PTE_C_CACHE; + else + attr = PTE_C_UNCACHED; + + pmap_kenter_attr(va, pa, attr); +} + /* * remove a page from the kernel pagetables */ @@ -2863,7 +2871,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); pa = trunc_page(pa); for (tmpva = va; size > 0;) { - pmap_kenter(tmpva, pa); + pmap_kenter_attr(tmpva, pa, PTE_C_UNCACHED); size -= PAGE_SIZE; tmpva += PAGE_SIZE; pa += PAGE_SIZE; From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 01:28:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C7F81065673; Tue, 14 Sep 2010 01:28:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D45768FC19; Tue, 14 Sep 2010 01:28:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E1S5SX051865; Tue, 14 Sep 2010 01:28:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E1S5ZV051863; Tue, 14 Sep 2010 01:28:05 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201009140128.o8E1S5ZV051863@svn.freebsd.org> From: Rick Macklem Date: Tue, 14 Sep 2010 01:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212590 - stable/8/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:28:06 -0000 Author: rmacklem Date: Tue Sep 14 01:28:05 2010 New Revision: 212590 URL: http://svn.freebsd.org/changeset/base/212590 Log: MFC: r212043 Add a null_remove() function to nullfs, so that the v_usecount of the lower level vnode is incremented to greater than 1 when the upper level vnode's v_usecount is greater than one. This is necessary for the NFS clients, so that they will do a silly rename of the file instead of actually removing it when the file is still in use. It is "racy", since the v_usecount is incremented in many places in the kernel with minimal synchronization, but an extraneous silly rename is preferred to not doing a silly rename when it is required. The only other file systems that currently check the value of v_usecount in their VOP_REMOVE() functions are nwfs and smbfs. These file systems choose to fail a remove when the v_usecount is greater than 1 and I believe will function more correctly with this patch, as well. Modified: stable/8/sys/fs/nullfs/null_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/8/sys/fs/nullfs/null_vnops.c Tue Sep 14 01:27:53 2010 (r212589) +++ stable/8/sys/fs/nullfs/null_vnops.c Tue Sep 14 01:28:05 2010 (r212590) @@ -499,6 +499,32 @@ null_accessx(struct vop_accessx_args *ap } /* + * Increasing refcount of lower vnode is needed at least for the case + * when lower FS is NFS to do sillyrename if the file is in use. + * Unfortunately v_usecount is incremented in many places in + * the kernel and, as such, there may be races that result in + * the NFS client doing an extraneous silly rename, but that seems + * preferable to not doing a silly rename when it is needed. + */ +static int +null_remove(struct vop_remove_args *ap) +{ + int retval, vreleit; + struct vnode *lvp; + + if (vrefcnt(ap->a_vp) > 1) { + lvp = NULLVPTOLOWERVP(ap->a_vp); + VREF(lvp); + vreleit = 1; + } else + vreleit = 0; + retval = null_bypass(&ap->a_gen); + if (vreleit != 0) + vrele(lvp); + return (retval); +} + +/* * We handle this to eliminate null FS to lower FS * file moving. Don't know why we don't allow this, * possibly we should. @@ -808,6 +834,7 @@ struct vop_vector null_vnodeops = { .vop_open = null_open, .vop_print = null_print, .vop_reclaim = null_reclaim, + .vop_remove = null_remove, .vop_rename = null_rename, .vop_setattr = null_setattr, .vop_strategy = VOP_EOPNOTSUPP, From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 01:33:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9736D1065673; Tue, 14 Sep 2010 01:33:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 866668FC12; Tue, 14 Sep 2010 01:33:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E1XLGw052355; Tue, 14 Sep 2010 01:33:21 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E1XLGC052353; Tue, 14 Sep 2010 01:33:21 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201009140133.o8E1XLGC052353@svn.freebsd.org> From: Ed Maste Date: Tue, 14 Sep 2010 01:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212591 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:33:21 -0000 Author: emaste Date: Tue Sep 14 01:33:21 2010 New Revision: 212591 URL: http://svn.freebsd.org/changeset/base/212591 Log: Remove extra ; Modified: head/usr.bin/calendar/parsedata.c Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Tue Sep 14 01:28:05 2010 (r212590) +++ head/usr.bin/calendar/parsedata.c Tue Sep 14 01:33:21 2010 (r212591) @@ -971,7 +971,7 @@ floattoday(int year, double f) int *cumdays = cumdaytab[isleap(year)]; for (i = 0; 1 + cumdays[i] < f; i++) - ;; + ; m = --i; d = floor(f - 1 - cumdays[i]); f -= floor(f); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 01:41:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 601E21065670; Tue, 14 Sep 2010 01:41:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 353FD8FC08; Tue, 14 Sep 2010 01:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E1f0X3053026; Tue, 14 Sep 2010 01:41:00 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E1f0HE053025; Tue, 14 Sep 2010 01:41:00 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201009140141.o8E1f0HE053025@svn.freebsd.org> From: Ed Maste Date: Tue, 14 Sep 2010 01:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212592 - head/contrib/libf2c X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:41:00 -0000 Author: emaste Date: Tue Sep 14 01:40:59 2010 New Revision: 212592 URL: http://svn.freebsd.org/changeset/base/212592 Log: Remove libf2c. It hasn't been used for more than 11 years, since revision 1.90 (CVS; SVN r45770) of lib/Makefile. Deleted: head/contrib/libf2c/ From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 01:48:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B8D5106566C; Tue, 14 Sep 2010 01:48:01 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ADA58FC17; Tue, 14 Sep 2010 01:48:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E1m1mQ053744; Tue, 14 Sep 2010 01:48:01 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E1m1tn053742; Tue, 14 Sep 2010 01:48:01 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201009140148.o8E1m1tn053742@svn.freebsd.org> From: Neel Natu Date: Tue, 14 Sep 2010 01:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212593 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:48:01 -0000 Author: neel Date: Tue Sep 14 01:48:01 2010 New Revision: 212593 URL: http://svn.freebsd.org/changeset/base/212593 Log: Port r212559 to mips. Do not explicitly enable interrupts in smp_init_secondary() because it renders any spinlock protected code after that point to run with interrupts enabled. This is because the processor is executing in the context of idlethread whose 'md_spinlock_count' is already set to 1. Instead just let sched_throw() re-enable interrupts when it releases the spinlock. The original powerpc commit log for r212559 is available here: http://svn.freebsd.org/viewvc/base?view=revision&revision=212559 Modified: head/sys/mips/mips/mp_machdep.c Modified: head/sys/mips/mips/mp_machdep.c ============================================================================== --- head/sys/mips/mips/mp_machdep.c Tue Sep 14 01:40:59 2010 (r212592) +++ head/sys/mips/mips/mp_machdep.c Tue Sep 14 01:48:01 2010 (r212593) @@ -310,8 +310,6 @@ smp_init_secondary(u_int32_t cpuid) while (smp_started == 0) ; /* nothing */ - intr_enable(); - /* Start per-CPU event timers. */ cpu_initclocks_ap(); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 01:51:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8CAB1065675; Tue, 14 Sep 2010 01:51:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D84988FC1B; Tue, 14 Sep 2010 01:51:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E1p4J4054108; Tue, 14 Sep 2010 01:51:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E1p49P054106; Tue, 14 Sep 2010 01:51:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201009140151.o8E1p49P054106@svn.freebsd.org> From: Ed Maste Date: Tue, 14 Sep 2010 01:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212594 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:51:05 -0000 Author: emaste Date: Tue Sep 14 01:51:04 2010 New Revision: 212594 URL: http://svn.freebsd.org/changeset/base/212594 Log: Avoid repeatedly spamming the console while a timed out command is waiting to complete. Instead, print one message after the timeout period expires, and one more when (if) the command eventually completes. MFC after: 1 month Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Tue Sep 14 01:48:01 2010 (r212593) +++ head/sys/dev/aac/aac.c Tue Sep 14 01:51:04 2010 (r212594) @@ -1129,6 +1129,11 @@ aac_complete(void *context, int pending) AAC_PRINT_FIB(sc, fib); break; } + if ((cm->cm_flags & AAC_CMD_TIMEDOUT) != 0) + device_printf(sc->aac_dev, + "COMMAND %p COMPLETED AFTER %d SECONDS\n", + cm, (int)(time_uptime-cm->cm_timestamp)); + aac_remove_busy(cm); aac_unmap_command(cm); @@ -2348,7 +2353,7 @@ aac_timeout(struct aac_softc *sc) deadline = time_uptime - AAC_CMD_TIMEOUT; TAILQ_FOREACH(cm, &sc->aac_busy, cm_link) { if ((cm->cm_timestamp < deadline) - /* && !(cm->cm_flags & AAC_CMD_TIMEDOUT) */) { + && !(cm->cm_flags & AAC_CMD_TIMEDOUT)) { cm->cm_flags |= AAC_CMD_TIMEDOUT; device_printf(sc->aac_dev, "COMMAND %p (TYPE %d) TIMEOUT AFTER %d SECONDS\n", From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 03:18:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2508B1065673; Tue, 14 Sep 2010 03:18:12 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 144318FC13; Tue, 14 Sep 2010 03:18:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E3IB3F062964; Tue, 14 Sep 2010 03:18:11 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E3IBaj062962; Tue, 14 Sep 2010 03:18:11 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201009140318.o8E3IBaj062962@svn.freebsd.org> From: Peter Grehan Date: Tue, 14 Sep 2010 03:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212597 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 03:18:12 -0000 Author: grehan Date: Tue Sep 14 03:18:11 2010 New Revision: 212597 URL: http://svn.freebsd.org/changeset/base/212597 Log: Resurrect PSIM support by moving the cacheline size-detection warning printf outside of the MMU-disabled region. A call into OpenFirmware with the MMU off resulted in an internal PSIM assert. Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Tue Sep 14 02:05:08 2010 (r212596) +++ head/sys/powerpc/aim/machdep.c Tue Sep 14 03:18:11 2010 (r212597) @@ -258,6 +258,7 @@ powerpc_init(vm_offset_t startkernel, vm char *env; register_t msr, scratch; uint8_t *cache_check; + int cacheline_warn; #ifndef __powerpc64__ int ppc64; #endif @@ -265,6 +266,7 @@ powerpc_init(vm_offset_t startkernel, vm end = 0; kmdp = NULL; trap_offset = 0; + cacheline_warn = 0; /* * Parse metadata if present and fetch parameters. Must be done @@ -360,7 +362,8 @@ powerpc_init(vm_offset_t startkernel, vm /* * Disable translation in case the vector area hasn't been - * mapped (G5). + * mapped (G5). Note that no OFW calls can be made until + * translation is re-enabled. */ msr = mfmsr(); @@ -387,7 +390,7 @@ powerpc_init(vm_offset_t startkernel, vm /* Work around psim bug */ if (cacheline_size == 0) { - printf("WARNING: cacheline size undetermined, setting to 32\n"); + cacheline_warn = 1; cacheline_size = 32; } @@ -496,6 +499,11 @@ powerpc_init(vm_offset_t startkernel, vm mtmsr(msr); isync(); + /* Warn if cachline size was not determined */ + if (cacheline_warn == 1) { + printf("WARNING: cacheline size undetermined, setting to 32\n"); + } + /* * Choose a platform module so we can get the physical memory map. */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 04:48:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC0A01065670; Tue, 14 Sep 2010 04:48:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 816C28FC19; Tue, 14 Sep 2010 04:48:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E4m4PN068515; Tue, 14 Sep 2010 04:48:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E4m48V068513; Tue, 14 Sep 2010 04:48:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009140448.o8E4m48V068513@svn.freebsd.org> From: Alexander Motin Date: Tue, 14 Sep 2010 04:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212600 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 04:48:04 -0000 Author: mav Date: Tue Sep 14 04:48:04 2010 New Revision: 212600 URL: http://svn.freebsd.org/changeset/base/212600 Log: Add some foot shooting protection by checking singlemul value correctness. Rephrase sysctls descriptions. Suggested by: edmaste Modified: head/sys/kern/kern_clocksource.c Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Tue Sep 14 04:22:27 2010 (r212599) +++ head/sys/kern/kern_clocksource.c Tue Sep 14 04:48:04 2010 (r212600) @@ -105,7 +105,7 @@ static int profiling = 0; /* Profiling static char timername[32]; /* Wanted timer. */ TUNABLE_STR("kern.eventtimer.timer", timername, sizeof(timername)); -static u_int singlemul = 0; /* Multiplier for periodic mode. */ +static int singlemul = 0; /* Multiplier for periodic mode. */ TUNABLE_INT("kern.eventtimer.singlemul", &singlemul); SYSCTL_INT(_kern_eventtimer, OID_AUTO, singlemul, CTLFLAG_RW, &singlemul, 0, "Multiplier for periodic mode"); @@ -425,6 +425,7 @@ setuptimer(void) periodic = 0; else if (!periodic && (timer->et_flags & ET_FLAGS_ONESHOT) == 0) periodic = 1; + singlemul = MIN(MAX(singlemul, 1), 20); freq = hz * singlemul; while (freq < (profiling ? profhz : stathz)) freq += hz; @@ -614,7 +615,7 @@ cpu_initclocks_bsp(void) * We want to run stathz in the neighborhood of 128hz. * We would like profhz to run as often as possible. */ - if (singlemul == 0) { + if (singlemul <= 0 || singlemul > 20) { if (hz >= 1500 || (hz % 128) == 0) singlemul = 1; else if (hz >= 750) @@ -844,7 +845,7 @@ sysctl_kern_eventtimer_timer(SYSCTL_HAND } SYSCTL_PROC(_kern_eventtimer, OID_AUTO, timer, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - 0, 0, sysctl_kern_eventtimer_timer, "A", "Kernel event timer"); + 0, 0, sysctl_kern_eventtimer_timer, "A", "Chosen event timer"); /* * Report or change the active event timer periodicity. @@ -867,6 +868,6 @@ sysctl_kern_eventtimer_periodic(SYSCTL_H } SYSCTL_PROC(_kern_eventtimer, OID_AUTO, periodic, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - 0, 0, sysctl_kern_eventtimer_periodic, "I", "Kernel event timer periodic"); + 0, 0, sysctl_kern_eventtimer_periodic, "I", "Enable event timer periodic mode"); #endif From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 04:57:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B54A106566B; Tue, 14 Sep 2010 04:57:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10B8C8FC15; Tue, 14 Sep 2010 04:57:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E4vUI7068724; Tue, 14 Sep 2010 04:57:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E4vUKM068723; Tue, 14 Sep 2010 04:57:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009140457.o8E4vUKM068723@svn.freebsd.org> From: Alexander Motin Date: Tue, 14 Sep 2010 04:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212601 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 04:57:31 -0000 Author: mav Date: Tue Sep 14 04:57:30 2010 New Revision: 212601 URL: http://svn.freebsd.org/changeset/base/212601 Log: Replace spin lock with the set of atomics. It is impractical for one tc_ticktock() call to wait for another's completion -- just skip it. Modified: head/sys/kern/kern_clock.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Tue Sep 14 04:48:04 2010 (r212600) +++ head/sys/kern/kern_clock.c Tue Sep 14 04:57:30 2010 (r212601) @@ -374,8 +374,7 @@ int ticks; int psratio; static DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */ -static struct mtx global_hardclock_mtx; -MTX_SYSINIT(global_hardclock_mtx, &global_hardclock_mtx, "ghc_mtx", MTX_SPIN); +static int global_hardclock_run = 0; /* * Initialize clock frequencies and start both clocks running. @@ -485,8 +484,10 @@ hardclock_anycpu(int cnt, int usermode) struct thread *td = curthread; struct proc *p = td->td_proc; int *t = DPCPU_PTR(pcputicks); - int flags; - int global, newticks; + int flags, global, newticks; +#ifdef SW_WATCHDOG + int i; +#endif /* SW_WATCHDOG */ /* * Update per-CPU and possibly global ticks values. @@ -535,19 +536,22 @@ hardclock_anycpu(int cnt, int usermode) callout_tick(); /* We are in charge to handle this tick duty. */ if (newticks > 0) { - mtx_lock_spin(&global_hardclock_mtx); - tc_ticktock(); + /* Dangerous and no need to call these things concurrently. */ + if (atomic_cmpset_acq_int(&global_hardclock_run, 0, 1)) { + tc_ticktock(); #ifdef DEVICE_POLLING - hardclock_device_poll(); /* This is very short and quick. */ + /* This is very short and quick. */ + hardclock_device_poll(); #endif /* DEVICE_POLLING */ + atomic_store_rel_int(&global_hardclock_run, 0); + } #ifdef SW_WATCHDOG if (watchdog_enabled > 0) { - watchdog_ticks -= newticks; - if (watchdog_ticks <= 0) + i = atomic_fetchadd_int(&watchdog_ticks, -newticks); + if (i > 0 && i <= newticks) watchdog_fire(); } #endif /* SW_WATCHDOG */ - mtx_unlock_spin(&global_hardclock_mtx); } if (curcpu == CPU_FIRST()) cpu_tick_calibration(); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 06:48:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 725F7106566C; Tue, 14 Sep 2010 06:48:14 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by mx1.freebsd.org (Postfix) with ESMTP id 397448FC1B; Tue, 14 Sep 2010 06:48:13 +0000 (UTC) Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 77B1828F6BA; Tue, 14 Sep 2010 01:48:13 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh1.mail.rice.edu, auth channel Received: from mh1.mail.rice.edu ([127.0.0.1]) by mh1.mail.rice.edu (mh1.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id sruk1lgL2Kq0; Tue, 14 Sep 2010 01:48:13 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id C242228F6B7; Tue, 14 Sep 2010 01:48:12 -0500 (CDT) Message-ID: <4C8F1AAC.4000301@rice.edu> Date: Tue, 14 Sep 2010 01:48:12 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.24 (X11/20100725) MIME-Version: 1.0 To: Kostik Belousov References: <201009070023.o870Njtg072607@svn.freebsd.org> <20100907080446.GA2853@deviant.kiev.zoral.com.ua> <4C8E5FB5.9070009@rice.edu> <20100913191247.GN2465@deviant.kiev.zoral.com.ua> In-Reply-To: <20100913191247.GN2465@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r212281 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 06:48:14 -0000 Kostik Belousov wrote: > On Mon, Sep 13, 2010 at 12:30:29PM -0500, Alan Cox wrote: > >> Kostik Belousov wrote: >> >>> On Tue, Sep 07, 2010 at 12:23:45AM +0000, Ryan Stone wrote: >>> >>> >>>> Author: rstone >>>> Date: Tue Sep 7 00:23:45 2010 >>>> New Revision: 212281 >>>> URL: http://svn.freebsd.org/changeset/base/212281 >>>> >>>> Log: >>>> In munmap() downgrade the vm_map_lock to a read lock before taking a >>>> read >>>> lock on the pmc-sx lock. This prevents a deadlock with >>>> pmc_log_process_mappings, which has an exclusive lock on pmc-sx and >>>> tries >>>> to get a read lock on a vm_map. Downgrading the vm_map_lock in munmap >>>> allows pmc_log_process_mappings to continue, preventing the deadlock. >>>> >>>> Without this change I could cause a deadlock on a multicore 8.1-RELEASE >>>> system by having one thread constantly mmap'ing and then munmap'ing a >>>> PROT_EXEC mapping in a loop while I repeatedly invoked and stopped >>>> pmcstat >>>> in system-wide sampling mode. >>>> >>>> Reviewed by: fabient >>>> Approved by: emaste (mentor) >>>> MFC after: 2 weeks >>>> >>>> Modified: >>>> head/sys/vm/vm_mmap.c >>>> >>>> Modified: head/sys/vm/vm_mmap.c >>>> ============================================================================== >>>> --- head/sys/vm/vm_mmap.c Mon Sep 6 23:52:04 2010 (r212280) >>>> +++ head/sys/vm/vm_mmap.c Tue Sep 7 00:23:45 2010 (r212281) >>>> @@ -579,6 +579,7 @@ munmap(td, uap) >>>> * Inform hwpmc if the address range being unmapped contains >>>> * an executable region. >>>> */ >>>> + pkm.pm_address = (uintptr_t) NULL; >>>> if (vm_map_lookup_entry(map, addr, &entry)) { >>>> for (; >>>> entry != &map->header && entry->start < addr + size; >>>> @@ -587,16 +588,23 @@ munmap(td, uap) >>>> entry->end, VM_PROT_EXECUTE) == TRUE) { >>>> pkm.pm_address = (uintptr_t) addr; >>>> pkm.pm_size = (size_t) size; >>>> - PMC_CALL_HOOK(td, PMC_FN_MUNMAP, >>>> - (void *) &pkm); >>>> break; >>>> } >>>> } >>>> } >>>> #endif >>>> - /* returns nothing but KERN_SUCCESS anyway */ >>>> vm_map_delete(map, addr, addr + size); >>>> + >>>> +#ifdef HWPMC_HOOKS >>>> + /* downgrade the lock to prevent a LOR with the pmc-sx lock */ >>>> + vm_map_lock_downgrade(map); >>>> + if (pkm.pm_address != (uintptr) NULL) >>>> + PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *) &pkm); >>>> + vm_map_unlock_read(map); >>>> +#else >>>> vm_map_unlock(map); >>>> +#endif >>>> + /* vm_map_delete returns nothing but KERN_SUCCESS anyway */ >>>> return (0); >>>> } >>>> >>>> >>>> >>> Note that vm_map_unlock() is more then just dropping the lock on the map. >>> Due to ordering of the vnode lock before vm map lock, vm_map_unlock() >>> processes the deferred free entries after map lock is dropped. After your >>> change, the deferred list might keep entries for some time until next >>> unlock is performed. >>> >>> >>> >> I'm afraid that this understates the effect. Over the weekend, when I >> updated one of my amd64 machines to include this change, I found that >> the delay in object and page deallocation is leading to severe >> fragmentation within the physical memory allocator. As a result, the >> time spent in the kernel during a "buildworld" increased by about 8%. >> Moreover, superpage promotion by applications effectively stopped. >> >> For now, I think it would be best to back out r212281 and r212282. >> Ultimately, the fix may be to change the vm map synchronization >> primitives, and simply reinstate r212281 and r212282, but I'd like some >> time to consider the options. >> > > Did you noted the thread on current@ about r212281 ? The submitter > claims that the rev. causes panics in unrelated code pathes when > vnode_create_vobject() locks vm object lock. I cannot understand > how this can happen, with or without the rev. > > Yes, I saw it. I don't understand it either. Alan . From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 08:48:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B1491065672; Tue, 14 Sep 2010 08:48:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09D548FC14; Tue, 14 Sep 2010 08:48:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E8m6NX073408; Tue, 14 Sep 2010 08:48:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E8m6V0073401; Tue, 14 Sep 2010 08:48:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009140848.o8E8m6V0073401@svn.freebsd.org> From: Alexander Motin Date: Tue, 14 Sep 2010 08:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212603 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 08:48:07 -0000 Author: mav Date: Tue Sep 14 08:48:06 2010 New Revision: 212603 URL: http://svn.freebsd.org/changeset/base/212603 Log: Make kern_tc.c provide minimum frequency of tc_ticktock() calls, required to handle current timecounter wraps. Make kern_clocksource.c to honor that requirement, scheduling sleeps on first CPU for no more then specified period. Allow other CPUs to sleep up to 1/4 second (for any case). Modified: head/sys/kern/kern_clock.c head/sys/kern/kern_clocksource.c head/sys/kern/kern_tc.c head/sys/kern/kern_timeout.c head/sys/sys/callout.h head/sys/sys/timetc.h Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Tue Sep 14 07:09:24 2010 (r212602) +++ head/sys/kern/kern_clock.c Tue Sep 14 08:48:06 2010 (r212603) @@ -457,7 +457,7 @@ hardclock(int usermode, uintfptr_t pc) atomic_add_int((volatile int *)&ticks, 1); hardclock_cpu(usermode); - tc_ticktock(); + tc_ticktock(1); cpu_tick_calibration(); /* * If no separate statistics clock is available, run it from here. @@ -538,7 +538,7 @@ hardclock_anycpu(int cnt, int usermode) if (newticks > 0) { /* Dangerous and no need to call these things concurrently. */ if (atomic_cmpset_acq_int(&global_hardclock_run, 0, 1)) { - tc_ticktock(); + tc_ticktock(newticks); #ifdef DEVICE_POLLING /* This is very short and quick. */ hardclock_device_poll(); Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Tue Sep 14 07:09:24 2010 (r212602) +++ head/sys/kern/kern_clocksource.c Tue Sep 14 08:48:06 2010 (r212603) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -247,7 +248,10 @@ getnextcpuevent(struct bintime *event, i state = DPCPU_PTR(timerstate); *event = state->nexthard; if (idle) { /* If CPU is idle - ask callouts for how long. */ - skip = callout_tickstofirst() - 1; + skip = 4; + if (curcpu == CPU_FIRST() && tc_min_ticktock_freq > skip) + skip = tc_min_ticktock_freq; + skip = callout_tickstofirst(hz / skip) - 1; CTR2(KTR_SPARE2, "skip at %d: %d", curcpu, skip); tmp = hardperiod; bintime_mul(&tmp, skip); Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Sep 14 07:09:24 2010 (r212602) +++ head/sys/kern/kern_tc.c Tue Sep 14 08:48:06 2010 (r212603) @@ -87,6 +87,8 @@ static struct timehands *volatile timeha struct timecounter *timecounter = &dummy_timecounter; static struct timecounter *timecounters = &dummy_timecounter; +int tc_min_ticktock_freq = 1; + time_t time_second = 1; time_t time_uptime = 1; @@ -482,6 +484,8 @@ tc_windup(void) if (th->th_counter != timecounter) { th->th_counter = timecounter; th->th_offset_count = ncount; + tc_min_ticktock_freq = max(1, timecounter->tc_frequency / + (((uint64_t)timecounter->tc_counter_mask + 1) / 3)); } /*- @@ -767,11 +771,12 @@ static int tc_tick; SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, ""); void -tc_ticktock(void) +tc_ticktock(int cnt) { static int count; - if (++count < tc_tick) + count += cnt; + if (count < tc_tick) return; count = 0; tc_windup(); Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Tue Sep 14 07:09:24 2010 (r212602) +++ head/sys/kern/kern_timeout.c Tue Sep 14 08:48:06 2010 (r212603) @@ -280,7 +280,7 @@ callout_tick(void) } int -callout_tickstofirst(void) +callout_tickstofirst(int limit) { struct callout_cpu *cc; struct callout *c; @@ -291,7 +291,7 @@ callout_tickstofirst(void) cc = CC_SELF(); mtx_lock_spin_flags(&cc->cc_lock, MTX_QUIET); curticks = cc->cc_ticks; - while( skip < ncallout && skip < hz/8 ) { + while( skip < ncallout && skip < limit ) { sc = &cc->cc_callwheel[ (curticks+skip) & callwheelmask ]; /* search scanning ticks */ TAILQ_FOREACH( c, sc, c_links.tqe ){ Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Tue Sep 14 07:09:24 2010 (r212602) +++ head/sys/sys/callout.h Tue Sep 14 08:48:06 2010 (r212603) @@ -96,7 +96,7 @@ int callout_schedule_on(struct callout * #define callout_stop(c) _callout_stop_safe(c, 0) int _callout_stop_safe(struct callout *, int); void callout_tick(void); -int callout_tickstofirst(void); +int callout_tickstofirst(int limit); extern void (*callout_new_inserted)(int cpu, int ticks); #endif Modified: head/sys/sys/timetc.h ============================================================================== --- head/sys/sys/timetc.h Tue Sep 14 07:09:24 2010 (r212602) +++ head/sys/sys/timetc.h Tue Sep 14 08:48:06 2010 (r212603) @@ -65,11 +65,15 @@ struct timecounter { }; extern struct timecounter *timecounter; +extern int tc_min_ticktock_freq; /* + * Minimal tc_ticktock() call frequency, + * required to handle counter wraps. + */ u_int64_t tc_getfrequency(void); void tc_init(struct timecounter *tc); void tc_setclock(struct timespec *ts); -void tc_ticktock(void); +void tc_ticktock(int cnt); void cpu_tick_calibration(void); #ifdef SYSCTL_DECL From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 10:26:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 680A4106567A; Tue, 14 Sep 2010 10:26:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57B2B8FC16; Tue, 14 Sep 2010 10:26:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EAQnYA075616; Tue, 14 Sep 2010 10:26:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EAQnrN075614; Tue, 14 Sep 2010 10:26:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009141026.o8EAQnrN075614@svn.freebsd.org> From: Alexander Motin Date: Tue, 14 Sep 2010 10:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212604 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 10:26:49 -0000 Author: mav Date: Tue Sep 14 10:26:49 2010 New Revision: 212604 URL: http://svn.freebsd.org/changeset/base/212604 Log: Fix panic on NULL dereference possible after r212541. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Tue Sep 14 08:48:06 2010 (r212603) +++ head/sys/kern/kern_timeout.c Tue Sep 14 10:26:49 2010 (r212604) @@ -672,7 +672,8 @@ retry: c->c_time = ticks + to_ticks; TAILQ_INSERT_TAIL(&cc->cc_callwheel[c->c_time & callwheelmask], c, c_links.tqe); - if ((c->c_time - cc->cc_firsttick) < 0) { + if ((c->c_time - cc->cc_firsttick) < 0 && + callout_new_inserted != NULL) { cc->cc_firsttick = c->c_time; (*callout_new_inserted)(cpu, to_ticks + (ticks - cc->cc_ticks)); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 10:27:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA813106567A; Tue, 14 Sep 2010 10:27:32 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5688FC26; Tue, 14 Sep 2010 10:27:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EARWAg075672; Tue, 14 Sep 2010 10:27:32 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EARW73075670; Tue, 14 Sep 2010 10:27:32 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009141027.o8EARW73075670@svn.freebsd.org> From: Martin Matuska Date: Tue, 14 Sep 2010 10:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212605 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 10:27:32 -0000 Author: mm Date: Tue Sep 14 10:27:32 2010 New Revision: 212605 URL: http://svn.freebsd.org/changeset/base/212605 Log: Add missing vop_vector zfsctl_ops_shares Add missing locks around VOP_READDIR and VOP_GETATTR with z_shares_dir PR: kern/150544 Approved by: delphij (mentor) Obtained from: perforce (pjd) MFC after: 1 day Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 14 10:26:49 2010 (r212604) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 14 10:27:32 2010 (r212605) @@ -1101,8 +1101,9 @@ zfsctl_shares_readdir(ap) return (ENOTSUP); } if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { + vn_lock(ZTOV(dzp), LK_SHARED | LK_RETRY); error = VOP_READDIR(ZTOV(dzp), uiop, cr, eofp, ap->a_ncookies, ap->a_cookies); - VN_RELE(ZTOV(dzp)); + VN_URELE(ZTOV(dzp)); } else { *eofp = 1; error = ENOENT; @@ -1149,6 +1150,7 @@ zfsctl_mknode_shares(vnode_t *pvp) NULL, NULL); sdp = vp->v_data; sdp->zc_cmtime = ((zfsctl_node_t *)pvp->v_data)->zc_cmtime; + VOP_UNLOCK(vp, 0); return (vp); } @@ -1176,8 +1178,9 @@ zfsctl_shares_getattr(ap) return (ENOTSUP); } if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { + vn_lock(ZTOV(dzp), LK_SHARED | LK_RETRY); error = VOP_GETATTR(ZTOV(dzp), vap, cr); - VN_RELE(ZTOV(dzp)); + VN_URELE(ZTOV(dzp)); } ZFS_EXIT(zfsvfs); return (error); @@ -1253,6 +1256,20 @@ static struct vop_vector zfsctl_ops_snap .vop_fid = zfsctl_common_fid, }; +static struct vop_vector zfsctl_ops_shares = { + .vop_default = &default_vnodeops, + .vop_open = zfsctl_common_open, + .vop_close = zfsctl_common_close, + .vop_ioctl = VOP_EINVAL, + .vop_getattr = zfsctl_shares_getattr, + .vop_access = zfsctl_common_access, + .vop_readdir = zfsctl_shares_readdir, + .vop_lookup = zfsctl_shares_lookup, + .vop_inactive = gfs_vop_inactive, + .vop_reclaim = zfsctl_common_reclaim, + .vop_fid = zfsctl_shares_fid, +}; + /* * pvp is the GFS vnode '.zfs/snapshot'. * From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 11:00:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C571106566B; Tue, 14 Sep 2010 11:00:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 780788FC15; Tue, 14 Sep 2010 11:00:31 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8EB0MOV002316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Sep 2010 14:00:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8EB0MZx012820; Tue, 14 Sep 2010 14:00:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8EB0Mim012819; Tue, 14 Sep 2010 14:00:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 14 Sep 2010 14:00:22 +0300 From: Kostik Belousov To: Alan Cox Message-ID: <20100914110022.GC2465@deviant.kiev.zoral.com.ua> References: <201009070023.o870Njtg072607@svn.freebsd.org> <20100907080446.GA2853@deviant.kiev.zoral.com.ua> <4C8E5FB5.9070009@rice.edu> <20100913191247.GN2465@deviant.kiev.zoral.com.ua> <4C8F1AAC.4000301@rice.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mpBUfgpRCnEyunvv" Content-Disposition: inline In-Reply-To: <4C8F1AAC.4000301@rice.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_05, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r212281 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 11:00:32 -0000 --mpBUfgpRCnEyunvv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 14, 2010 at 01:48:12AM -0500, Alan Cox wrote: > Kostik Belousov wrote: > >Did you noted the thread on current@ about r212281 ? The submitter > >claims that the rev. causes panics in unrelated code pathes when > >vnode_create_vobject() locks vm object lock. I cannot understand > >how this can happen, with or without the rev. > > > > =20 >=20 > Yes, I saw it. I don't understand it either. >=20 > Alan > . As noted by Peter Holm, the report indicates that fuse.ko module was loaded. I believe this is another fuse-induced kernel memory corruption. --mpBUfgpRCnEyunvv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyPVcYACgkQC3+MBN1Mb4g+cQCg73gd+56ZVz2P1wumAoS+iQ+o /HYAoLTvu+C0av3JZud+aILR1NhqXd7b =ds6I -----END PGP SIGNATURE----- --mpBUfgpRCnEyunvv-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 11:13:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CAE91065672; Tue, 14 Sep 2010 11:13:47 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BA5B8FC17; Tue, 14 Sep 2010 11:13:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EBDk8Y079872; Tue, 14 Sep 2010 11:13:46 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EBDkBt079867; Tue, 14 Sep 2010 11:13:46 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009141113.o8EBDkBt079867@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 11:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212606 - in head/sbin/geom: class/part core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 11:13:47 -0000 Author: pjd Date: Tue Sep 14 11:13:46 2010 New Revision: 212606 URL: http://svn.freebsd.org/changeset/base/212606 Log: Introduce special G_VAL_OPTIONAL define, which when given in value field tells geom(8) to ignore it when it is not given and don't try to obtain default value. Modified: head/sbin/geom/class/part/geom_part.c head/sbin/geom/core/geom.c head/sbin/geom/core/geom.h Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Tue Sep 14 10:27:32 2010 (r212605) +++ head/sbin/geom/class/part/geom_part.c Tue Sep 14 11:13:46 2010 (r212606) @@ -90,16 +90,16 @@ struct g_command PUBSYM(class_commands)[ { 'b', "start", GPART_AUTOFILL, G_TYPE_STRING }, { 's', "size", GPART_AUTOFILL, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, "", G_TYPE_ASCNUM }, - { 'l', "label", "", G_TYPE_STRING }, + { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_ASCNUM }, + { 'l', "label", G_VAL_OPTIONAL, G_TYPE_STRING }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "[-b start] [-s size] -t type [-i index] [-l label] [-f flags] geom" }, { "bootcode", 0, gpart_bootcode, { - { 'b', GPART_PARAM_BOOTCODE, "", G_TYPE_STRING }, - { 'p', GPART_PARAM_PARTCODE, "", G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, "", G_TYPE_ASCNUM }, + { 'b', GPART_PARAM_BOOTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, + { 'p', GPART_PARAM_PARTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, + { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_ASCNUM }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "bootcode [-b bootcode] [-p partcode] [-i index] [-f flags] geom" @@ -109,7 +109,7 @@ struct g_command PUBSYM(class_commands)[ }, { "create", 0, gpart_issue, { { 's', "scheme", NULL, G_TYPE_STRING }, - { 'n', "entries", "", G_TYPE_ASCNUM }, + { 'n', "entries", G_VAL_OPTIONAL, G_TYPE_ASCNUM }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "-s scheme [-n entries] [-f flags] provider" @@ -127,8 +127,8 @@ struct g_command PUBSYM(class_commands)[ }, { "modify", 0, gpart_issue, { { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, - { 'l', "label", "", G_TYPE_STRING }, - { 't', "type", "", G_TYPE_STRING }, + { 'l', "label", G_VAL_OPTIONAL, G_TYPE_STRING }, + { 't', "type", G_VAL_OPTIONAL, G_TYPE_STRING }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "-i index [-l label] [-t type] [-f flags] geom" Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Tue Sep 14 10:27:32 2010 (r212605) +++ head/sbin/geom/core/geom.c Tue Sep 14 11:13:46 2010 (r212606) @@ -374,9 +374,8 @@ parse_arguments(struct g_command *cmd, s warnx("Option '%c' not specified.", opt->go_char); usage(); - } else if (G_OPT_TYPE(opt) == G_TYPE_ASCNUM && - *(const char *)opt->go_val == '\0') { - ; /* add nothing. */ + } else if (opt->go_val == G_VAL_OPTIONAL) { + /* add nothing. */ } else { set_option(req, opt, opt->go_val); } Modified: head/sbin/geom/core/geom.h ============================================================================== --- head/sbin/geom/core/geom.h Tue Sep 14 10:27:32 2010 (r212605) +++ head/sbin/geom/core/geom.h Tue Sep 14 11:13:46 2010 (r212606) @@ -53,6 +53,8 @@ #define G_OPT_NUM(opt) (((opt)->go_type & G_TYPE_NUMMASK) >> G_TYPE_NUMSHIFT) #define G_OPT_NUMINC(opt) ((opt)->go_type += (1 << G_TYPE_NUMSHIFT)) +#define G_VAL_OPTIONAL ((void *)-1) + #define G_OPT_SENTINEL { '\0', NULL, NULL, G_TYPE_NONE } #define G_NULL_OPTS { G_OPT_SENTINEL } #define G_CMD_SENTINEL { NULL, 0, NULL, G_NULL_OPTS, NULL } From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 11:19:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13B321065742; Tue, 14 Sep 2010 11:19:22 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 037AE8FC18; Tue, 14 Sep 2010 11:19:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EBJLDv080005; Tue, 14 Sep 2010 11:19:21 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EBJLKU080003; Tue, 14 Sep 2010 11:19:21 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009141119.o8EBJLKU080003@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 11:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212607 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 11:19:22 -0000 Author: pjd Date: Tue Sep 14 11:19:21 2010 New Revision: 212607 URL: http://svn.freebsd.org/changeset/base/212607 Log: Remove dot which shouldn't be here, as err(3) will attach error message at the end of the string. Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Tue Sep 14 11:13:46 2010 (r212606) +++ head/sbin/geom/core/geom.c Tue Sep 14 11:19:21 2010 (r212607) @@ -262,7 +262,7 @@ set_option(struct gctl_req *req, struct if (G_OPT_TYPE(opt) == G_TYPE_NUMBER || G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { if (expand_number(val, &number) == -1) { - err(EXIT_FAILURE, "Invalid value for '%c' argument.", + err(EXIT_FAILURE, "Invalid value for '%c' argument", opt->go_char); } if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 11:36:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B72EE1065696; Tue, 14 Sep 2010 11:36:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6D2E8FC13; Tue, 14 Sep 2010 11:36:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EBaQ8h080419; Tue, 14 Sep 2010 11:36:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EBaQKV080417; Tue, 14 Sep 2010 11:36:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009141136.o8EBaQKV080417@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 11:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212608 - head/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 11:36:26 -0000 Author: pjd Date: Tue Sep 14 11:36:26 2010 New Revision: 212608 URL: http://svn.freebsd.org/changeset/base/212608 Log: All gpart(8) subcommands apart from the 'bootcode' subcommand handle given geom/provider names with and without /dev/ prefix. Teach the 'bootcode' subcommand to handle /dev/ names as well. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Tue Sep 14 11:19:21 2010 (r212607) +++ head/sbin/geom/class/part/geom_part.c Tue Sep 14 11:36:26 2010 (r212608) @@ -183,6 +183,8 @@ find_geom(struct gclass *classp, const c { struct ggeom *gp; + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { if (strcmp(gp->lg_name, name) == 0) return (gp); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 11:42:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B47441065674; Tue, 14 Sep 2010 11:42:07 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A42C88FC08; Tue, 14 Sep 2010 11:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EBg7S3080553; Tue, 14 Sep 2010 11:42:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EBg7Lk080551; Tue, 14 Sep 2010 11:42:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009141142.o8EBg7Lk080551@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 11:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212609 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 11:42:07 -0000 Author: pjd Date: Tue Sep 14 11:42:07 2010 New Revision: 212609 URL: http://svn.freebsd.org/changeset/base/212609 Log: Simplify the code a bit. Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Tue Sep 14 11:36:26 2010 (r212608) +++ head/sys/geom/part/g_part.c Tue Sep 14 11:42:07 2010 (r212609) @@ -297,17 +297,14 @@ g_part_new_provider(struct g_geom *gp, s } static int -g_part_parm_geom(const char *rawname, struct g_geom **v) +g_part_parm_geom(const char *name, struct g_geom **v) { struct g_geom *gp; - const char *pname; - if (strncmp(rawname, _PATH_DEV, strlen(_PATH_DEV)) == 0) - pname = rawname + strlen(_PATH_DEV); - else - pname = rawname; + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(pname, gp->name)) + if (!strcmp(name, gp->name)) break; } if (gp == NULL) @@ -317,14 +314,13 @@ g_part_parm_geom(const char *rawname, st } static int -g_part_parm_provider(const char *pname, struct g_provider **v) +g_part_parm_provider(const char *name, struct g_provider **v) { struct g_provider *pp; - if (strncmp(pname, _PATH_DEV, strlen(_PATH_DEV)) == 0) - pp = g_provider_by_name(pname + strlen(_PATH_DEV)); - else - pp = g_provider_by_name(pname); + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); + pp = g_provider_by_name(name); if (pp == NULL) return (EINVAL); *v = pp; From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 12:02:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5F8F1065670; Tue, 14 Sep 2010 12:02:45 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 813928FC25; Tue, 14 Sep 2010 12:02:45 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 1CB2C45CA6; Tue, 14 Sep 2010 14:02:44 +0200 (CEST) Received: from localhost (pdawidek.whl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A5E7545685; Tue, 14 Sep 2010 14:02:38 +0200 (CEST) Date: Tue, 14 Sep 2010 14:02:24 +0200 From: Pawel Jakub Dawidek To: Alexander Best Message-ID: <20100914120224.GJ1730@garage.freebsd.pl> References: <201009131348.o8DDmJL8004159@svn.freebsd.org> <20100913150654.GA23703@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YrQNB5Deg1WGKZi3" Content-Disposition: inline In-Reply-To: <20100913150654.GA23703@freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212554 - in head: sbin/geom/class/cache sbin/geom/class/concat sbin/geom/class/eli sbin/geom/class/journal sbin/geom/class/label sbin/geom/class/mirror sbin/geom/class/mountver sbin/ge... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 12:02:46 -0000 --YrQNB5Deg1WGKZi3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 13, 2010 at 03:06:55PM +0000, Alexander Best wrote: > hi there, >=20 > could you take a quick peek at PR #150239 to see if the patch for g_part.= c is a > reasonable change? Yes, the current output was confusing to me as well. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --YrQNB5Deg1WGKZi3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyPZFAACgkQForvXbEpPzR96gCguSGPmCXZJ7VbTh4qWJJTQSKM 8QUAoK/4LZQW1NB7JhWt+E6+9XzP83kb =ouPM -----END PGP SIGNATURE----- --YrQNB5Deg1WGKZi3-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 12:12:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0D25106564A; Tue, 14 Sep 2010 12:12:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0B938FC08; Tue, 14 Sep 2010 12:12:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8ECC7HF081145; Tue, 14 Sep 2010 12:12:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8ECC73X081143; Tue, 14 Sep 2010 12:12:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009141212.o8ECC73X081143@svn.freebsd.org> From: Glen Barber Date: Tue, 14 Sep 2010 12:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212610 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 12:12:08 -0000 Author: gjb (doc committer) Date: Tue Sep 14 12:12:07 2010 New Revision: 212610 URL: http://svn.freebsd.org/changeset/base/212610 Log: Synchronize newfs(8) manual with code. PR: 61716 Submitted by: Radim Kolar Patch by: arundel Approved by: keramida (mentor) MFC after: 1 week Modified: head/sbin/newfs/newfs.8 Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Tue Sep 14 11:42:07 2010 (r212609) +++ head/sbin/newfs/newfs.8 Tue Sep 14 12:12:07 2010 (r212610) @@ -28,7 +28,7 @@ .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd March 21, 2008 +.Dd September 14, 2010 .Dt NEWFS 8 .Os .Sh NAME @@ -125,8 +125,9 @@ and the number of bytes per inode. .It Fl d Ar max-extent-size The file system may choose to store large files using extents. This parameter specifies the largest extent size that may be used. -It is presently limited to its default value which is 16 times -the file system blocksize. +The default value is the file system blocksize. +It is presently limited to a maximum value of 16 times the +file system blocksize and a minimum value of the file system blocksize. .It Fl e Ar maxbpg Indicate the maximum number of blocks any single file can allocate out of a cylinder group before it is forced to begin From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 12:12:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1470D1065670; Tue, 14 Sep 2010 12:12:19 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0414F8FC14; Tue, 14 Sep 2010 12:12:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8ECCI1l081184; Tue, 14 Sep 2010 12:12:18 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8ECCInd081182; Tue, 14 Sep 2010 12:12:18 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009141212.o8ECCInd081182@svn.freebsd.org> From: Martin Matuska Date: Tue, 14 Sep 2010 12:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212611 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 12:12:19 -0000 Author: mm Date: Tue Sep 14 12:12:18 2010 New Revision: 212611 URL: http://svn.freebsd.org/changeset/base/212611 Log: Remove duplicated VFS_HOLD due to a mismerge. PR: kern/150544 Approved by: delphij (mentor) MFC after: 1 day Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Sep 14 12:12:07 2010 (r212610) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Sep 14 12:12:18 2010 (r212611) @@ -1226,13 +1226,6 @@ zfs_mount(vfs_t *vfsp) if (error == 0 && ((zfsvfs_t *)vfsp->vfs_data)->z_issnap) VFS_HOLD(mvp->v_vfsp); - /* - * Add an extra VFS_HOLD on our parent vfs so that it can't - * disappear due to a forced unmount. - */ - if (error == 0 && ((zfsvfs_t *)vfsp->vfs_data)->z_issnap) - VFS_HOLD(mvp->v_vfsp); - out: return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 15:02:35 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A126106564A; Tue, 14 Sep 2010 15:02:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id D85768FC12; Tue, 14 Sep 2010 15:02:34 +0000 (UTC) Received: from c122-107-116-249.carlnfd1.nsw.optusnet.com.au (c122-107-116-249.carlnfd1.nsw.optusnet.com.au [122.107.116.249]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o8EF2VYC004248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Sep 2010 01:02:32 +1000 Date: Wed, 15 Sep 2010 01:02:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Pawel Jakub Dawidek In-Reply-To: <201009141119.o8EBJLKU080003@svn.freebsd.org> Message-ID: <20100915003923.B907@delplex.bde.org> References: <201009141119.o8EBJLKU080003@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212607 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 15:02:35 -0000 On Tue, 14 Sep 2010, Pawel Jakub Dawidek wrote: > Log: > Remove dot which shouldn't be here, as err(3) will attach error message > at the end of the string. In KNF, error messages are neither capitalized or terminated by a dot, partly because of this. > Modified: head/sbin/geom/core/geom.c > ============================================================================== > --- head/sbin/geom/core/geom.c Tue Sep 14 11:13:46 2010 (r212606) > +++ head/sbin/geom/core/geom.c Tue Sep 14 11:19:21 2010 (r212607) > @@ -262,7 +262,7 @@ set_option(struct gctl_req *req, struct > if (G_OPT_TYPE(opt) == G_TYPE_NUMBER || > G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { > if (expand_number(val, &number) == -1) { > - err(EXIT_FAILURE, "Invalid value for '%c' argument.", > + err(EXIT_FAILURE, "Invalid value for '%c' argument", > opt->go_char); > } > if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { > This message is still capitalized. Most other error messages in sbin/geom have same bugs. Dots too, though this fixes the last dot for err(). For errx() and warnx(), you can supply the dot without ensuring the punctuation/grammar error ".:", but this is still a style bug since it is not KNF and it is silly for the shorter error messages without an errno string to be capitalized while longer ones with an errno cannot be since err() has a fixed format not including the dot. For the capitalization, a capital letter after the prefix ": " is just a style bug. I think capitalization after ": " looks strange, especially after starting with a lower case program name. Then the errno string messes up the formatting a bit by always being capitalized. In bin/*/*.c 1 month ago, the KNF rule about not capitializing err(1, "Foo") is followed in approx. 66 lines and broken in just 7 lines (1 in cp and 6 in pkill), partly because of tree sweeps to unbreak this. In Lite2 it was followed in approx. 29 lines and broken in just 1 line (in rmail). Bruce From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 16:19:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B56CC106564A; Tue, 14 Sep 2010 16:19:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A420D8FC08; Tue, 14 Sep 2010 16:19:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EGJ9Lw086165; Tue, 14 Sep 2010 16:19:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EGJ9jS086163; Tue, 14 Sep 2010 16:19:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009141619.o8EGJ9jS086163@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 16:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212613 - head/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 16:19:09 -0000 Author: pjd Date: Tue Sep 14 16:19:09 2010 New Revision: 212613 URL: http://svn.freebsd.org/changeset/base/212613 Log: Update two last places where "arg0" should be used instead of "geom". Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Tue Sep 14 14:56:34 2010 (r212612) +++ head/sbin/geom/class/part/geom_part.c Tue Sep 14 16:19:09 2010 (r212613) @@ -302,7 +302,7 @@ gpart_autofill_resize(struct gctl_req *r cp = find_class(&mesh, s); if (cp == NULL) errx(EXIT_FAILURE, "Class %s not found.", s); - s = gctl_get_ascii(req, "geom"); + s = gctl_get_ascii(req, "arg0"); if (s == NULL) abort(); gp = find_geom(cp, s); @@ -411,7 +411,7 @@ gpart_autofill(struct gctl_req *req) cp = find_class(&mesh, s); if (cp == NULL) errx(EXIT_FAILURE, "Class %s not found.", s); - s = gctl_get_ascii(req, "geom"); + s = gctl_get_ascii(req, "arg0"); if (s == NULL) abort(); gp = find_geom(cp, s); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 16:21:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C75E1065670; Tue, 14 Sep 2010 16:21:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 596E48FC23; Tue, 14 Sep 2010 16:21:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EGLDVv086251; Tue, 14 Sep 2010 16:21:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EGLDhr086248; Tue, 14 Sep 2010 16:21:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009141621.o8EGLDhr086248@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 16:21:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212614 - in head: sbin/geom/class/part sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 16:21:13 -0000 Author: pjd Date: Tue Sep 14 16:21:13 2010 New Revision: 212614 URL: http://svn.freebsd.org/changeset/base/212614 Log: - Change all places where G_TYPE_ASCNUM is used to G_TYPE_NUMBER. It turns out the new type wasn't really needed. - Reorganize code a little bit. Modified: head/sbin/geom/class/part/geom_part.c head/sys/geom/part/g_part.c Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Tue Sep 14 16:19:09 2010 (r212613) +++ head/sbin/geom/class/part/geom_part.c Tue Sep 14 16:21:13 2010 (r212614) @@ -90,7 +90,7 @@ struct g_command PUBSYM(class_commands)[ { 'b', "start", GPART_AUTOFILL, G_TYPE_STRING }, { 's', "size", GPART_AUTOFILL, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_NUMBER }, { 'l', "label", G_VAL_OPTIONAL, G_TYPE_STRING }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, @@ -99,7 +99,7 @@ struct g_command PUBSYM(class_commands)[ { "bootcode", 0, gpart_bootcode, { { 'b', GPART_PARAM_BOOTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, { 'p', GPART_PARAM_PARTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "bootcode [-b bootcode] [-p partcode] [-i index] [-f flags] geom" @@ -109,13 +109,13 @@ struct g_command PUBSYM(class_commands)[ }, { "create", 0, gpart_issue, { { 's', "scheme", NULL, G_TYPE_STRING }, - { 'n', "entries", G_VAL_OPTIONAL, G_TYPE_ASCNUM }, + { 'n', "entries", G_VAL_OPTIONAL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "-s scheme [-n entries] [-f flags] provider" }, { "delete", 0, gpart_issue, { - { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "-i index [-f flags] geom" @@ -126,7 +126,7 @@ struct g_command PUBSYM(class_commands)[ "[-f flags] geom" }, { "modify", 0, gpart_issue, { - { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, { 'l', "label", G_VAL_OPTIONAL, G_TYPE_STRING }, { 't', "type", G_VAL_OPTIONAL, G_TYPE_STRING }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, @@ -135,7 +135,7 @@ struct g_command PUBSYM(class_commands)[ }, { "set", 0, gpart_issue, { { 'a', "attrib", NULL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "-a attrib -i index [-f flags] geom" @@ -151,14 +151,14 @@ struct g_command PUBSYM(class_commands)[ }, { "unset", 0, gpart_issue, { { 'a', "attrib", NULL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "-a attrib -i index [-f flags] geom" }, { "resize", 0, gpart_issue, { { 's', "size", GPART_AUTOFILL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_ASCNUM }, + { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, "[-s size] -i index [-f flags] geom" Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Tue Sep 14 16:19:09 2010 (r212613) +++ head/sys/geom/part/g_part.c Tue Sep 14 16:21:13 2010 (r212614) @@ -297,86 +297,155 @@ g_part_new_provider(struct g_geom *gp, s } static int -g_part_parm_geom(const char *name, struct g_geom **v) +g_part_parm_geom(struct gctl_req *req, const char *name, struct g_geom **v) { struct g_geom *gp; + const char *gname; - if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) - name += strlen(_PATH_DEV); + gname = gctl_get_asciiparam(req, name); + if (gname == NULL) + return (ENOATTR); + if (strncmp(gname, _PATH_DEV, strlen(_PATH_DEV)) == 0) + gname += strlen(_PATH_DEV); LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(name, gp->name)) + if (!strcmp(gname, gp->name)) break; } - if (gp == NULL) + if (gp == NULL) { + gctl_error(req, "%d %s '%s'", EINVAL, name, gname); return (EINVAL); + } *v = gp; return (0); } static int -g_part_parm_provider(const char *name, struct g_provider **v) +g_part_parm_provider(struct gctl_req *req, const char *name, + struct g_provider **v) { struct g_provider *pp; + const char *pname; - if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) - name += strlen(_PATH_DEV); - pp = g_provider_by_name(name); - if (pp == NULL) + pname = gctl_get_asciiparam(req, name); + if (pname == NULL) + return (ENOATTR); + if (strncmp(pname, _PATH_DEV, strlen(_PATH_DEV)) == 0) + pname += strlen(_PATH_DEV); + pp = g_provider_by_name(pname); + if (pp == NULL) { + gctl_error(req, "%d %s '%s'", EINVAL, name, pname); return (EINVAL); + } *v = pp; return (0); } static int -g_part_parm_quad(const char *p, quad_t *v) +g_part_parm_quad(struct gctl_req *req, const char *name, quad_t *v) { + const char *p; char *x; quad_t q; + p = gctl_get_asciiparam(req, name); + if (p == NULL) + return (ENOATTR); q = strtoq(p, &x, 0); - if (*x != '\0' || q < 0) + if (*x != '\0' || q < 0) { + gctl_error(req, "%d %s '%s'", EINVAL, name, p); return (EINVAL); + } *v = q; return (0); } static int -g_part_parm_scheme(const char *p, struct g_part_scheme **v) +g_part_parm_scheme(struct gctl_req *req, const char *name, + struct g_part_scheme **v) { struct g_part_scheme *s; + const char *p; + p = gctl_get_asciiparam(req, name); + if (p == NULL) + return (ENOATTR); TAILQ_FOREACH(s, &g_part_schemes, scheme_list) { if (s == &g_part_null_scheme) continue; if (!strcasecmp(s->name, p)) break; } - if (s == NULL) + if (s == NULL) { + gctl_error(req, "%d %s '%s'", EINVAL, name, p); return (EINVAL); + } *v = s; return (0); } static int -g_part_parm_str(const char *p, const char **v) +g_part_parm_str(struct gctl_req *req, const char *name, const char **v) { + const char *p; - if (p[0] == '\0') + p = gctl_get_asciiparam(req, name); + if (p == NULL) + return (ENOATTR); + /* An empty label is always valid. */ + if (strcmp(name, "label") != 0 && p[0] == '\0') { + gctl_error(req, "%d %s '%s'", EINVAL, name, p); return (EINVAL); + } *v = p; return (0); } static int -g_part_parm_uint(const char *p, u_int *v) +g_part_parm_intmax(struct gctl_req *req, const char *name, u_int *v) { - char *x; - long l; + const intmax_t *p; + int size; - l = strtol(p, &x, 0); - if (*x != '\0' || l < 0 || l > INT_MAX) + p = gctl_get_param(req, name, &size); + if (p == NULL) + return (ENOATTR); + if (size != sizeof(*p) || *p < 0 || *p > INT_MAX) { + gctl_error(req, "%d %s '%jd'", EINVAL, name, *p); return (EINVAL); - *v = (unsigned int)l; + } + *v = (u_int)*p; + return (0); +} + +static int +g_part_parm_uint32(struct gctl_req *req, const char *name, u_int *v) +{ + const uint32_t *p; + int size; + + p = gctl_get_param(req, name, &size); + if (p == NULL) + return (ENOATTR); + if (size != sizeof(*p) || *p > INT_MAX) { + gctl_error(req, "%d %s '%u'", EINVAL, name, (unsigned int)*p); + return (EINVAL); + } + *v = (u_int)*p; + return (0); +} + +static int +g_part_parm_bootcode(struct gctl_req *req, const char *name, const void **v, + unsigned int *s) +{ + const void *p; + int size; + + p = gctl_get_param(req, name, &size); + if (p == NULL) + return (ENOATTR); + *v = p; + *s = size; return (0); } @@ -679,7 +748,7 @@ g_part_ctl_create(struct gctl_req *req, g_topology_assert(); /* Check that there isn't already a g_part geom on the provider. */ - error = g_part_parm_geom(pp->name, &gp); + error = g_part_parm_geom(req, "provider", &gp); if (!error) { null = gp->softc; if (null->gpt_scheme != &g_part_null_scheme) { @@ -1225,11 +1294,10 @@ g_part_ctlreq(struct gctl_req *req, stru struct g_part_parms gpp; struct g_part_table *table; struct gctl_req_arg *ap; - const char *p; enum g_part_ctl ctlreq; unsigned int i, mparms, oparms, parm; int auto_commit, close_on_error; - int error, len, modifies; + int error, modifies; G_PART_TRACE((G_T_TOPOLOGY, "%s(%s,%s)", __func__, mp->name, verb)); g_topology_assert(); @@ -1381,69 +1449,64 @@ g_part_ctlreq(struct gctl_req *req, stru gctl_error(req, "%d param '%s'", EINVAL, ap->name); return; } - if (parm == G_PART_PARM_BOOTCODE) - p = gctl_get_param(req, ap->name, &len); - else - p = gctl_get_asciiparam(req, ap->name); - if (p == NULL) { - gctl_error(req, "%d param '%s'", ENOATTR, ap->name); - return; - } switch (parm) { case G_PART_PARM_ATTRIB: - error = g_part_parm_str(p, &gpp.gpp_attrib); + error = g_part_parm_str(req, ap->name, &gpp.gpp_attrib); break; case G_PART_PARM_BOOTCODE: - gpp.gpp_codeptr = p; - gpp.gpp_codesize = len; - error = 0; + error = g_part_parm_bootcode(req, ap->name, + &gpp.gpp_codeptr, &gpp.gpp_codesize); break; case G_PART_PARM_ENTRIES: - error = g_part_parm_uint(p, &gpp.gpp_entries); + error = g_part_parm_intmax(req, ap->name, + &gpp.gpp_entries); break; case G_PART_PARM_FLAGS: - if (p[0] == '\0') - continue; - error = g_part_parm_str(p, &gpp.gpp_flags); + error = g_part_parm_str(req, ap->name, &gpp.gpp_flags); break; case G_PART_PARM_GEOM: - error = g_part_parm_geom(p, &gpp.gpp_geom); + error = g_part_parm_geom(req, ap->name, &gpp.gpp_geom); break; case G_PART_PARM_INDEX: - error = g_part_parm_uint(p, &gpp.gpp_index); + error = g_part_parm_intmax(req, ap->name, &gpp.gpp_index); break; case G_PART_PARM_LABEL: - /* An empty label is always valid. */ - gpp.gpp_label = p; - error = 0; + error = g_part_parm_str(req, ap->name, &gpp.gpp_label); break; case G_PART_PARM_OUTPUT: error = 0; /* Write-only parameter */ break; case G_PART_PARM_PROVIDER: - error = g_part_parm_provider(p, &gpp.gpp_provider); + error = g_part_parm_provider(req, ap->name, + &gpp.gpp_provider); break; case G_PART_PARM_SCHEME: - error = g_part_parm_scheme(p, &gpp.gpp_scheme); + error = g_part_parm_scheme(req, ap->name, + &gpp.gpp_scheme); break; case G_PART_PARM_SIZE: - error = g_part_parm_quad(p, &gpp.gpp_size); + error = g_part_parm_quad(req, ap->name, &gpp.gpp_size); break; case G_PART_PARM_START: - error = g_part_parm_quad(p, &gpp.gpp_start); + error = g_part_parm_quad(req, ap->name, &gpp.gpp_start); break; case G_PART_PARM_TYPE: - error = g_part_parm_str(p, &gpp.gpp_type); + error = g_part_parm_str(req, ap->name, &gpp.gpp_type); break; case G_PART_PARM_VERSION: - error = g_part_parm_uint(p, &gpp.gpp_version); + error = g_part_parm_uint32(req, ap->name, + &gpp.gpp_version); break; default: error = EDOOFUS; + gctl_error(req, "%d %s", error, ap->name); break; } - if (error) { - gctl_error(req, "%d %s '%s'", error, ap->name, p); + if (error != 0) { + if (error == ENOATTR) { + gctl_error(req, "%d param '%s'", error, + ap->name); + } return; } gpp.gpp_parms |= parm; From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 16:22:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED97A1065679; Tue, 14 Sep 2010 16:22:22 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCBC28FC22; Tue, 14 Sep 2010 16:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EGMMlg086326; Tue, 14 Sep 2010 16:22:22 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EGMMRP086323; Tue, 14 Sep 2010 16:22:22 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009141622.o8EGMMRP086323@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 16:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212615 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 16:22:23 -0000 Author: pjd Date: Tue Sep 14 16:22:22 2010 New Revision: 212615 URL: http://svn.freebsd.org/changeset/base/212615 Log: Remove now unused G_TYPE_ASCNUM. Modified: head/sbin/geom/core/geom.c head/sbin/geom/core/geom.h Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Tue Sep 14 16:21:13 2010 (r212614) +++ head/sbin/geom/core/geom.c Tue Sep 14 16:22:22 2010 (r212615) @@ -259,8 +259,7 @@ set_option(struct gctl_req *req, struct optname = opt->go_name; } - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER || - G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { + if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { if (expand_number(val, &number) == -1) { err(EXIT_FAILURE, "Invalid value for '%c' argument", opt->go_char); Modified: head/sbin/geom/core/geom.h ============================================================================== --- head/sbin/geom/core/geom.h Tue Sep 14 16:21:13 2010 (r212614) +++ head/sbin/geom/core/geom.h Tue Sep 14 16:22:22 2010 (r212615) @@ -38,7 +38,6 @@ #define G_TYPE_BOOL 0x01 #define G_TYPE_STRING 0x02 #define G_TYPE_NUMBER 0x03 -#define G_TYPE_ASCNUM 0x04 #define G_TYPE_MASK 0x0f #define G_TYPE_DONE 0x10 #define G_TYPE_MULTI 0x20 From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 17:22:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5465D1065674; Tue, 14 Sep 2010 17:22:07 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42ECC8FC26; Tue, 14 Sep 2010 17:22:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EHM7TR087611; Tue, 14 Sep 2010 17:22:07 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EHM7Vw087609; Tue, 14 Sep 2010 17:22:07 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201009141722.o8EHM7Vw087609@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 14 Sep 2010 17:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212616 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 17:22:07 -0000 Author: ken Date: Tue Sep 14 17:22:06 2010 New Revision: 212616 URL: http://svn.freebsd.org/changeset/base/212616 Log: MFp4: (//depot/projects/mps/...) Report data overruns properly. Submitted by: scottl Modified: head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Tue Sep 14 16:22:22 2010 (r212615) +++ head/sys/dev/mps/mps_sas.c Tue Sep 14 17:22:06 2010 (r212616) @@ -1219,11 +1219,9 @@ mpssas_scsiio_complete(struct mps_softc ccb->ccb_h.status = CAM_REQ_CMP; break; case MPI2_IOCSTATUS_SCSI_DATA_OVERRUN: - /* - * XXX any way to report this? - */ + /* resid is ignored for this condition */ ccb->csio.resid = 0; - ccb->ccb_h.status = CAM_REQ_CMP; + ccb->ccb_h.status = CAM_DATA_RUN_ERR; break; case MPI2_IOCSTATUS_SCSI_INVALID_DEVHANDLE: case MPI2_IOCSTATUS_SCSI_DEVICE_NOT_THERE: From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 18:04:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0BF8106566B; Tue, 14 Sep 2010 18:04:05 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D4E08FC08; Tue, 14 Sep 2010 18:04:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EI45M7088470; Tue, 14 Sep 2010 18:04:05 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EI45kp088466; Tue, 14 Sep 2010 18:04:05 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201009141804.o8EI45kp088466@svn.freebsd.org> From: Kirk McKusick Date: Tue, 14 Sep 2010 18:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212617 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 18:04:05 -0000 Author: mckusick Date: Tue Sep 14 18:04:05 2010 New Revision: 212617 URL: http://svn.freebsd.org/changeset/base/212617 Log: Update comments in soft updates code to more fully describe the addition of journalling. Only functional change is to tighten a KASSERT. Reviewed by: jeff Roberson Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/fs.h head/sys/ufs/ffs/softdep.h Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Tue Sep 14 17:22:06 2010 (r212616) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Sep 14 18:04:05 2010 (r212617) @@ -2378,7 +2378,8 @@ remove_from_journal(wk) /* * We emulate a TAILQ to save space in most structures which do not * require TAILQ semantics. Here we must update the tail position - * when removing the tail which is not the final entry. + * when removing the tail which is not the final entry. This works + * only if the worklist linkage are at the beginning of the structure. */ if (ump->softdep_journal_tail == wk) ump->softdep_journal_tail = @@ -2605,7 +2606,7 @@ jremref_write(jremref, jseg, data) inoref_write(&jremref->jr_ref, jseg, rec); } -static void +static void jmvref_write(jmvref, jseg, data) struct jmvref *jmvref; struct jseg *jseg; @@ -2906,9 +2907,9 @@ complete_jseg(jseg) waiting = wk->wk_state & IOWAITING; wk->wk_state &= ~(IOSTARTED | IOWAITING); wk->wk_state |= COMPLETE; - KASSERT(i < jseg->js_cnt, + KASSERT(i++ < jseg->js_cnt, ("handle_written_jseg: overflow %d >= %d", - i, jseg->js_cnt)); + i - 1, jseg->js_cnt)); switch (wk->wk_type) { case D_JADDREF: handle_written_jaddref(WK_JADDREF(wk)); @@ -7492,7 +7493,7 @@ handle_written_sbdep(sbdep, bp) if (inodedep_lookup(mp, fs->fs_sujfree, 0, &inodedep) == 0) panic("handle_written_sbdep: lost inodedep"); /* - * Now that we have a record of this indode in stable store allow it + * Now that we have a record of this inode in stable store allow it * to be written to free up pending work. Inodes may see a lot of * write activity after they are unlinked which we must not hold up. */ @@ -7509,8 +7510,7 @@ handle_written_sbdep(sbdep, bp) } /* - * Mark an inodedep has unlinked and insert it into the in-memory unlinked - * list. + * Mark an inodedep as unlinked and insert it into the in-memory unlinked list. */ static void unlinked_inodedep(mp, inodedep) @@ -7576,7 +7576,7 @@ clear_unlinked_inodedep(inodedep) * link before us, whether it be the superblock or an inode. * Unfortunately the list may change while we're waiting * on the buf lock for either resource so we must loop until - * we lock. the right one. If both the superblock and an + * we lock the right one. If both the superblock and an * inode point to this inode we must clear the inode first * followed by the superblock. */ @@ -9094,7 +9094,7 @@ handle_jwork(wkhd) /* * Handle the bufwait list on an inode when it is safe to release items * held there. This normally happens after an inode block is written but - * may be delayed and handle later if there are pending journal items that + * may be delayed and handled later if there are pending journal items that * are not yet safe to be released. */ static struct freefile * Modified: head/sys/ufs/ffs/fs.h ============================================================================== --- head/sys/ufs/ffs/fs.h Tue Sep 14 17:22:06 2010 (r212616) +++ head/sys/ufs/ffs/fs.h Tue Sep 14 18:04:05 2010 (r212617) @@ -661,7 +661,7 @@ lbn_level(ufs_lbn_t lbn) /* * Size of the segment record header. There is at most one for each disk - * block n the journal. The segment header is followed by an array of + * block in the journal. The segment header is followed by an array of * records. fsck depends on the first element in each record being 'op' * and the second being 'ino'. Segments may span multiple disk blocks but * the header is present on each. Modified: head/sys/ufs/ffs/softdep.h ============================================================================== --- head/sys/ufs/ffs/softdep.h Tue Sep 14 17:22:06 2010 (r212616) +++ head/sys/ufs/ffs/softdep.h Tue Sep 14 18:04:05 2010 (r212617) @@ -107,6 +107,15 @@ * * The ONWORKLIST flag shows whether the structure is currently linked * onto a worklist. + * + * The UNLINK* flags track the progress of updating the on-disk linked + * list of active but unlinked inodes. When an inode is first unlinked + * it is marked as UNLINKED. When its on-disk di_freelink has been + * written its UNLINKNEXT flags is set. When its predecessor in the + * list has its di_freelink pointing at us its UNLINKPREV is set. + * When the on-disk list can reach it from the superblock, its + * UNLINKONLIST flag is set. Once all of these flags are set, it + * is safe to let its last name be removed. */ #define ATTACHED 0x000001 #define UNDONE 0x000002 @@ -353,20 +362,22 @@ struct bmsafemap { * or fragment is allocated from a cylinder group. Its state is set to * DEPCOMPLETE when its cylinder group map is written. It is converted to * an allocdirect or allocindir allocation once the allocator calls the - * appropriate setup function. + * appropriate setup function. It will initially be linked onto a bmsafemap + * list. Once converted it can be linked onto the lists described for + * allocdirect or allocindir as described below. */ struct newblk { - struct worklist nb_list; + struct worklist nb_list; /* See comment above. */ # define nb_state nb_list.wk_state - LIST_ENTRY(newblk) nb_hash; /* hashed lookup */ - LIST_ENTRY(newblk) nb_deps; /* bmsafemap's list of newblks */ + LIST_ENTRY(newblk) nb_hash; /* Hashed lookup. */ + LIST_ENTRY(newblk) nb_deps; /* Bmsafemap's list of newblks. */ struct jnewblk *nb_jnewblk; /* New block journal entry. */ - struct bmsafemap *nb_bmsafemap;/* cylgrp dep (if pending) */ - struct freefrag *nb_freefrag; /* fragment to be freed (if any) */ + struct bmsafemap *nb_bmsafemap;/* Cylgrp dep (if pending). */ + struct freefrag *nb_freefrag; /* Fragment to be freed (if any). */ struct indirdephd nb_indirdeps; /* Children indirect blocks. */ - struct workhead nb_newdirblk; /* dir block to notify when written */ + struct workhead nb_newdirblk; /* Dir block to notify when written. */ struct workhead nb_jwork; /* Journal work pending. */ - ufs2_daddr_t nb_newblkno; /* new value of block pointer */ + ufs2_daddr_t nb_newblkno; /* New value of block pointer. */ }; /* @@ -517,16 +528,16 @@ struct freeblks { /* * A "freework" structure handles the release of a tree of blocks or a single * block. Each indirect block in a tree is allocated its own freework - * structure so that the indrect block may be freed only when all of its + * structure so that the indirect block may be freed only when all of its * children are freed. In this way we enforce the rule that an allocated * block must have a valid path to a root that is journaled. Each child * block acquires a reference and when the ref hits zero the parent ref * is decremented. If there is no parent the freeblks ref is decremented. */ struct freework { - struct worklist fw_list; + struct worklist fw_list; /* Delayed worklist. */ # define fw_state fw_list.wk_state - LIST_ENTRY(freework) fw_next; /* Queue for freeblksk. */ + LIST_ENTRY(freework) fw_next; /* Queue for freeblk list. */ struct freeblks *fw_freeblks; /* Root of operation. */ struct freework *fw_parent; /* Parent indirect. */ ufs2_daddr_t fw_blkno; /* Our block #. */ @@ -545,7 +556,7 @@ struct freework { * to be freed as well. */ struct freedep { - struct worklist fd_list; + struct worklist fd_list; /* Delayed worklist. */ struct freework *fd_freework; /* Parent freework. */ }; @@ -705,10 +716,10 @@ struct newdirblk { * so they may easily be queued in-order on the inodedep. */ struct inoref { - struct worklist if_list; + struct worklist if_list; /* Journal pending or jseg entries. */ # define if_state if_list.wk_state TAILQ_ENTRY(inoref) if_deps; /* Links for inodedep. */ - struct jsegdep *if_jsegdep; + struct jsegdep *if_jsegdep; /* Will track our journal record. */ off_t if_diroff; /* Directory offset. */ ino_t if_ino; /* Inode number. */ ino_t if_parent; /* Parent inode number. */ @@ -731,8 +742,8 @@ struct inoref { * ultimately released when the file is freed or the link is dropped again. */ struct jaddref { - struct inoref ja_ref; -# define ja_list ja_ref.if_list /* Journal pending or jseg entries. */ + struct inoref ja_ref; /* see inoref above. */ +# define ja_list ja_ref.if_list /* Jrnl pending, id_inowait, dm_jwork.*/ # define ja_state ja_ref.if_list.wk_state LIST_ENTRY(jaddref) ja_bmdeps; /* Links for bmsafemap. */ union { @@ -754,21 +765,28 @@ struct jaddref { * may proceed as normal. */ struct jremref { - struct inoref jr_ref; -# define jr_list jr_ref.if_list /* Journal pending or jseg entries. */ + struct inoref jr_ref; /* see inoref above. */ +# define jr_list jr_ref.if_list /* Linked to softdep_journal_pending. */ # define jr_state jr_ref.if_list.wk_state - LIST_ENTRY(jremref) jr_deps; /* Links for pagdep. */ + LIST_ENTRY(jremref) jr_deps; /* Links for dirrem. */ struct dirrem *jr_dirrem; /* Back pointer to dirrem. */ }; +/* + * A "jmvref" structure tracks a name relocations within the same + * directory block that occur as a result of directory compaction. + * It prevents the updated directory entry from being written to disk + * until the journal entry is written. Once the journal has been + * written the compacted directory may be written to disk. + */ struct jmvref { - struct worklist jm_list; - LIST_ENTRY(jmvref) jm_deps; - struct pagedep *jm_pagedep; - ino_t jm_parent; - ino_t jm_ino; - off_t jm_oldoff; - off_t jm_newoff; + struct worklist jm_list; /* Linked to softdep_journal_pending. */ + LIST_ENTRY(jmvref) jm_deps; /* Jmvref on pagedep. */ + struct pagedep *jm_pagedep; /* Back pointer to pagedep. */ + ino_t jm_parent; /* Containing directory inode number. */ + ino_t jm_ino; /* Inode number of our entry. */ + off_t jm_oldoff; /* Our old offset in directory. */ + off_t jm_newoff; /* Our new offset in directory. */ }; /* @@ -780,36 +798,37 @@ struct jmvref { * write the jnewblk structure is maintained to prevent the bitmaps from * reaching the disk. Ultimately the jnewblk structure will be passed * to the free routine as the in memory cg is modified back to the free - * state at which time it can be released. + * state at which time it can be released. It may be held on any of the + * fx_jwork, fw_jwork, fb_jwork, ff_jwork, nb_jwork, or ir_jwork lists. */ struct jnewblk { - struct worklist jn_list; + struct worklist jn_list; /* See lists above. */ # define jn_state jn_list.wk_state - struct jsegdep *jn_jsegdep; - LIST_ENTRY(jnewblk) jn_deps; /* All jnewblks on bmsafemap */ - struct newblk *jn_newblk; - ino_t jn_ino; - ufs_lbn_t jn_lbn; - ufs2_daddr_t jn_blkno; - int jn_oldfrags; - int jn_frags; + struct jsegdep *jn_jsegdep; /* Will track our journal record. */ + LIST_ENTRY(jnewblk) jn_deps; /* Jnewblks on sm_jnewblkhd. */ + struct newblk *jn_newblk; /* Back pointer to newblk. */ + ino_t jn_ino; /* Ino to which allocated. */ + ufs_lbn_t jn_lbn; /* Lbn to which allocated. */ + ufs2_daddr_t jn_blkno; /* Blkno allocated */ + int jn_oldfrags; /* Previous fragments when extended. */ + int jn_frags; /* Number of fragments. */ }; /* * A "jfreeblk" structure tracks the journal write for freeing a block * or tree of blocks. The block pointer must not be cleared in the inode - * or indirect prior to the jfreeblk being written. + * or indirect prior to the jfreeblk being written to the journal. */ struct jfreeblk { - struct worklist jf_list; + struct worklist jf_list; /* Linked to softdep_journal_pending. */ # define jf_state jf_list.wk_state - struct jsegdep *jf_jsegdep; - struct freeblks *jf_freeblks; - LIST_ENTRY(jfreeblk) jf_deps; - ino_t jf_ino; - ufs_lbn_t jf_lbn; - ufs2_daddr_t jf_blkno; - int jf_frags; + struct jsegdep *jf_jsegdep; /* Will track our journal record. */ + struct freeblks *jf_freeblks; /* Back pointer to freeblks. */ + LIST_ENTRY(jfreeblk) jf_deps; /* Jfreeblk on fb_jfreeblkhd. */ + ino_t jf_ino; /* Ino from which blocks freed. */ + ufs_lbn_t jf_lbn; /* Lbn from which blocks freed. */ + ufs2_daddr_t jf_blkno; /* Blkno being freed. */ + int jf_frags; /* Number of frags being freed. */ }; /* @@ -818,14 +837,14 @@ struct jfreeblk { * freeblks operation. */ struct jfreefrag { - struct worklist fr_list; + struct worklist fr_list; /* Linked to softdep_journal_pending. */ # define fr_state fr_list.wk_state - struct jsegdep *fr_jsegdep; - struct freefrag *fr_freefrag; - ino_t fr_ino; - ufs_lbn_t fr_lbn; - ufs2_daddr_t fr_blkno; - int fr_frags; + struct jsegdep *fr_jsegdep; /* Will track our journal record. */ + struct freefrag *fr_freefrag; /* Back pointer to freefrag. */ + ino_t fr_ino; /* Ino from which frag freed. */ + ufs_lbn_t fr_lbn; /* Lbn from which frag freed. */ + ufs2_daddr_t fr_blkno; /* Blkno being freed. */ + int fr_frags; /* Size of frag being freed. */ }; /* @@ -835,42 +854,45 @@ struct jfreefrag { * is complete and the truncated inode is fsync'd. */ struct jtrunc { - struct worklist jt_list; - struct jsegdep *jt_jsegdep; - ino_t jt_ino; - off_t jt_size; - int jt_extsize; + struct worklist jt_list; /* Linked to softdep_journal_pending. */ + struct jsegdep *jt_jsegdep; /* Will track our journal record. */ + ino_t jt_ino; /* Ino being truncated. */ + off_t jt_size; /* Final file size. */ + int jt_extsize; /* Final extent size. */ }; /* * A "jsegdep" structure tracks a single reference to a written journal * segment so the journal space can be reclaimed when all dependencies - * have been written. + * have been written. It can hang off of id_inowait, dm_jwork, da_jwork, + * nb_jwork, ff_jwork, or fb_jwork lists. */ struct jsegdep { - struct worklist jd_list; + struct worklist jd_list; /* See above for lists. */ # define jd_state jd_list.wk_state - struct jseg *jd_seg; + struct jseg *jd_seg; /* Our journal record. */ }; /* * A "jseg" structure contains all of the journal records written in a - * single disk write. jaddref and jremref structures are linked into + * single disk write. The jaddref and jremref structures are linked into * js_entries so thay may be completed when the write completes. The - * js_deps array contains as many entries as there are ref counts to - * reduce the number of allocations required per journal write to one. + * js_entries also include the write dependency structures: jmvref, + * jnewblk, jfreeblk, jfreefrag, and jtrunc. The js_refs field counts + * the number of entries on the js_entries list. Thus there is a single + * jseg entry to describe each journal write. */ struct jseg { struct worklist js_list; /* b_deps link for journal */ # define js_state js_list.wk_state struct workhead js_entries; /* Entries awaiting write */ - TAILQ_ENTRY(jseg) js_next; + TAILQ_ENTRY(jseg) js_next; /* List of all unfinished segments. */ struct jblocks *js_jblocks; /* Back pointer to block/seg list */ struct buf *js_buf; /* Buffer while unwritten */ - uint64_t js_seq; - int js_size; /* Allocated size in bytes */ - int js_cnt; /* Total items allocated */ - int js_refs; /* Count of items pending completion */ + uint64_t js_seq; /* Journal record sequence number. */ + int js_size; /* Size of journal record in bytes. */ + int js_cnt; /* Total items allocated. */ + int js_refs; /* Count of js_entries items. */ }; /* @@ -878,10 +900,11 @@ struct jseg { * superblock writes. This makes sure the superblock is always pointing at * the first possible unlinked inode for the suj recovery process. If a * block write completes and we discover a new head is available the buf - * is dirtied and the dep is kept. + * is dirtied and the dep is kept. See the description of the UNLINK* + * flags above for more details. */ struct sbdep { struct worklist sb_list; /* b_dep linkage */ struct fs *sb_fs; /* Filesystem pointer within buf. */ - struct ufsmount *sb_ump; + struct ufsmount *sb_ump; /* Our mount structure */ }; From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 18:58:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7CE106566C; Tue, 14 Sep 2010 18:58:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C9D18FC20; Tue, 14 Sep 2010 18:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EIwq27089844; Tue, 14 Sep 2010 18:58:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EIwqNP089842; Tue, 14 Sep 2010 18:58:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009141858.o8EIwqNP089842@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 14 Sep 2010 18:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212618 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 18:58:52 -0000 Author: kib Date: Tue Sep 14 18:58:51 2010 New Revision: 212618 URL: http://svn.freebsd.org/changeset/base/212618 Log: Rename the field to not confuse readers. The bytes are actually used. Discussed with: rmacklem MFC after: 1 week Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Tue Sep 14 18:04:05 2010 (r212617) +++ head/sys/sys/mount.h Tue Sep 14 18:58:51 2010 (r212618) @@ -56,7 +56,7 @@ typedef struct fsid { int32_t val[2]; } struct fid { u_short fid_len; /* length of data in bytes */ - u_short fid_reserved; /* force longword alignment */ + u_short fid_data0; /* force longword alignment */ char fid_data[MAXFIDSZ]; /* data (variable length) */ }; From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 19:35:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA85E106566B; Tue, 14 Sep 2010 19:35:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C84548FC1F; Tue, 14 Sep 2010 19:35:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EJZhWH090638; Tue, 14 Sep 2010 19:35:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EJZhxp090635; Tue, 14 Sep 2010 19:35:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009141935.o8EJZhxp090635@svn.freebsd.org> From: Marius Strobl Date: Tue, 14 Sep 2010 19:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212619 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 19:35:43 -0000 Author: marius Date: Tue Sep 14 19:35:43 2010 New Revision: 212619 URL: http://svn.freebsd.org/changeset/base/212619 Log: Remove redundant raising of the PIL to PIL_TICK as the respective locore code already did that. Modified: head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/mp_machdep.c Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Tue Sep 14 18:58:51 2010 (r212618) +++ head/sys/sparc64/sparc64/machdep.c Tue Sep 14 19:35:43 2010 (r212619) @@ -587,7 +587,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enable them. */ intr_init2(); - wrpr(pil, 0, PIL_TICK); wrpr(pstate, 0, PSTATE_KERNEL); /* Modified: head/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/mp_machdep.c Tue Sep 14 18:58:51 2010 (r212618) +++ head/sys/sparc64/sparc64/mp_machdep.c Tue Sep 14 19:35:43 2010 (r212619) @@ -446,7 +446,6 @@ cpu_mp_bootstrap(struct pcpu *pc) cpu_setregs(pc); /* Enable interrupts. */ - wrpr(pil, 0, PIL_TICK); wrpr(pstate, 0, PSTATE_KERNEL); smp_cpus++; From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 20:31:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD0DF106566B; Tue, 14 Sep 2010 20:31:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 904428FC16; Tue, 14 Sep 2010 20:31:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EKV9f2091800; Tue, 14 Sep 2010 20:31:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EKV9mP091797; Tue, 14 Sep 2010 20:31:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009142031.o8EKV9mP091797@svn.freebsd.org> From: Marius Strobl Date: Tue, 14 Sep 2010 20:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212620 - in head/sys: sparc64/sparc64 sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 20:31:09 -0000 Author: marius Date: Tue Sep 14 20:31:09 2010 New Revision: 212620 URL: http://svn.freebsd.org/changeset/base/212620 Log: Remove a KASSERT which will also trigger for perfectly valid combinations of small maxsize and "large" (including BUS_SPACE_UNRESTRICTED) nsegments parameters. Generally using a presz of 0 (which indeed might indicate the use of bogus parameters for DMA tag creation) is not fatal, it just means that no additional DVMA space will be preallocated. Modified: head/sys/sparc64/sparc64/iommu.c head/sys/sun4v/sun4v/hviommu.c Modified: head/sys/sparc64/sparc64/iommu.c ============================================================================== --- head/sys/sparc64/sparc64/iommu.c Tue Sep 14 19:35:43 2010 (r212619) +++ head/sys/sparc64/sparc64/iommu.c Tue Sep 14 20:31:09 2010 (r212620) @@ -874,9 +874,6 @@ iommu_dvmamap_create(bus_dma_tag_t dt, i */ maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG); presz = dt->dt_maxsize / maxpre; - KASSERT(presz != 0, ("%s: bogus preallocation size , nsegments = %d, " - "maxpre = %d, maxsize = %lu", __func__, dt->dt_nsegments, maxpre, - dt->dt_maxsize)); for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) { currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz)); error = iommu_dvma_valloc(dt, is, *mapp, currsz); Modified: head/sys/sun4v/sun4v/hviommu.c ============================================================================== --- head/sys/sun4v/sun4v/hviommu.c Tue Sep 14 19:35:43 2010 (r212619) +++ head/sys/sun4v/sun4v/hviommu.c Tue Sep 14 20:31:09 2010 (r212620) @@ -513,9 +513,6 @@ hviommu_dvmamap_create(bus_dma_tag_t dt, */ maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG); presz = dt->dt_maxsize / maxpre; - KASSERT(presz != 0, ("hviommu_dvmamap_create: bogus preallocation size " - ", nsegments = %d, maxpre = %d, maxsize = %lu", dt->dt_nsegments, - maxpre, dt->dt_maxsize)); for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) { currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz)); error = hviommu_dvma_valloc(dt, him, *mapp, currsz); From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 20:41:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54995106566C; Tue, 14 Sep 2010 20:41:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4292E8FC0A; Tue, 14 Sep 2010 20:41:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EKf7aP092176; Tue, 14 Sep 2010 20:41:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EKf7RB092174; Tue, 14 Sep 2010 20:41:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009142041.o8EKf7RB092174@svn.freebsd.org> From: Marius Strobl Date: Tue, 14 Sep 2010 20:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212621 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 20:41:07 -0000 Author: marius Date: Tue Sep 14 20:41:06 2010 New Revision: 212621 URL: http://svn.freebsd.org/changeset/base/212621 Log: Use saner nsegments and maxsegsz parameters when creating certain DMA tags; tags for 1-byte allocations cannot possibly be split across 2 segments and maxsegsz must not exceed maxsize. Modified: head/sys/dev/usb/usb_busdma.c Modified: head/sys/dev/usb/usb_busdma.c ============================================================================== --- head/sys/dev/usb/usb_busdma.c Tue Sep 14 20:31:09 2010 (r212620) +++ head/sys/dev/usb/usb_busdma.c Tue Sep 14 20:41:06 2010 (r212621) @@ -366,9 +366,9 @@ usb_dma_tag_create(struct usb_dma_tag *u /* filter */ NULL, /* filterarg */ NULL, /* maxsize */ size, - /* nsegments */ (align == 1) ? + /* nsegments */ (align == 1 && size > 1) ? (2 + (size / USB_PAGE_SIZE)) : 1, - /* maxsegsz */ (align == 1) ? + /* maxsegsz */ (align == 1 && size > USB_PAGE_SIZE) ? USB_PAGE_SIZE : size, /* flags */ BUS_DMA_KEEP_PG_OFFSET, /* lockfn */ &usb_dma_lock_cb, From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 20:54:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 165341065693; Tue, 14 Sep 2010 20:54:23 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04BC58FC29; Tue, 14 Sep 2010 20:54:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EKsMbD092466; Tue, 14 Sep 2010 20:54:22 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EKsMPS092464; Tue, 14 Sep 2010 20:54:22 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009142054.o8EKsMPS092464@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 20:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212622 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 20:54:23 -0000 Author: pjd Date: Tue Sep 14 20:54:22 2010 New Revision: 212622 URL: http://svn.freebsd.org/changeset/base/212622 Log: Remove dead code. Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Tue Sep 14 20:41:06 2010 (r212621) +++ head/sbin/geom/core/geom.c Tue Sep 14 20:54:22 2010 (r212622) @@ -264,21 +264,12 @@ set_option(struct gctl_req *req, struct err(EXIT_FAILURE, "Invalid value for '%c' argument", opt->go_char); } - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { - ptr = malloc(sizeof(intmax_t)); - if (ptr == NULL) - errx(EXIT_FAILURE, "No memory."); - *(intmax_t *)ptr = number; - opt->go_val = ptr; - gctl_ro_param(req, optname, sizeof(intmax_t), - opt->go_val); - } else { - asprintf((void *)(&ptr), "%jd", number); - if (ptr == NULL) - errx(EXIT_FAILURE, "No memory."); - opt->go_val = ptr; - gctl_ro_param(req, optname, -1, opt->go_val); - } + ptr = malloc(sizeof(intmax_t)); + if (ptr == NULL) + errx(EXIT_FAILURE, "No memory."); + *(intmax_t *)ptr = number; + opt->go_val = ptr; + gctl_ro_param(req, optname, sizeof(intmax_t), opt->go_val); } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { gctl_ro_param(req, optname, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 20:55:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387151065725; Tue, 14 Sep 2010 20:55:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22D4D8FC20; Tue, 14 Sep 2010 20:55:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EKtQnj092543; Tue, 14 Sep 2010 20:55:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EKtQ34092541; Tue, 14 Sep 2010 20:55:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009142055.o8EKtQ34092541@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 20:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212623 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 20:55:27 -0000 Author: pjd Date: Tue Sep 14 20:55:25 2010 New Revision: 212623 URL: http://svn.freebsd.org/changeset/base/212623 Log: Force commit to note, than the previous change was... Submitted by: ae Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 21:40:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E78B9106566B; Tue, 14 Sep 2010 21:40:29 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56698FC17; Tue, 14 Sep 2010 21:40:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8ELeTMr093592; Tue, 14 Sep 2010 21:40:29 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8ELeTbT093588; Tue, 14 Sep 2010 21:40:29 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201009142140.o8ELeTbT093588@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 14 Sep 2010 21:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212624 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 21:40:30 -0000 Author: ken Date: Tue Sep 14 21:40:29 2010 New Revision: 212624 URL: http://svn.freebsd.org/changeset/base/212624 Log: MFp4 (//depot/projects/mps/...) Add a man page for the mps(4) driver, and reference it in the mpt(4) driver man page. Sponsored by: Spectra Logic Corporation Added: head/share/man/man4/mps.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/mpt.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Sep 14 20:55:25 2010 (r212623) +++ head/share/man/man4/Makefile Tue Sep 14 21:40:29 2010 (r212624) @@ -219,6 +219,7 @@ MAN= aac.4 \ mmcsd.4 \ mn.4 \ mouse.4 \ + mps.4 \ mpt.4 \ msk.4 \ mtio.4 \ Added: head/share/man/man4/mps.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/mps.4 Tue Sep 14 21:40:29 2010 (r212624) @@ -0,0 +1,159 @@ +.\" +.\" Copyright (c) 2010 Spectra Logic Corporation +.\" 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, +.\" without modification. +.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer +.\" substantially similar to the "NO WARRANTY" disclaimer below +.\" ("Disclaimer") and any redistribution must be conditioned upon +.\" including a substantially similar Disclaimer requirement for further +.\" binary redistribution. +.\" +.\" NO WARRANTY +.\" 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 MERCHANTIBILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. +.\" +.\" mps driver man page. +.\" +.\" Author: Ken Merry +.\" +.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#1 $ +.\" $FreeBSD$ +.\" +.Dd September 13, 2010 +.Dt MPS 4 +.Os +.Sh NAME +.Nm mps +.Nd LSI Fusion-MPT 2 Serial Attached SCSI driver +.Sh SYNOPSIS +To compile this driver into your kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device scbus" +.Cd "device mps" +.Ed +.Pp +Or, to load the driver as a module at boot, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mpt_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for LSI Logic Fusion-MPT 2 +.Tn SAS +controllers. +.Sh HARDWARE +The following controllers are supported by the +.Nm +driver +.Pp +.Bl -bullet -compact +.It +LSI Logic SAS2004 (4 Port +.Tn SAS ) +.It +LSI Logic SAS2008 (8 Port +.Tn SAS ) +.It +LSI Logic SAS2108 (8 Port +.Tn SAS ) +.It +LSI Logic SAS2116 (16 Port +.Tn SAS ) +.It +LSI Logic SAS2208 (8 Port +.Tn SAS ) +.El +.Sh CONFIGURATION +To disable MSI interrupts for all +.Nm +driver instances, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.mps.disable_msi=1 +.Ed +.Pp +To disable MSI-X interrupts for all +.Nm +driver instances, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.mps.disable_msix=1 +.Ed +.Sh DEBUGGING +To enable debugging prints from the +.Nm +driver, set the +.Bd -literal -offset indent +hw.mps.X.debug_level +.Ed +.Pp +variable, where X is the adapter number, either in +.Xr loader.conf 5 +or via +.Xr sysctl 8 . +The following bits have the described effects: +.Bl -tag -offset indent +.It 0x01 +Enable informational prints. +.It 0x02 +Enable tracing prints. +.It 0x04 +Enable prints for driver faults. +.It 0x08 +Enable prints for controller events. +.El +.Sh SEE ALSO +.Xr cd 4 , +.Xr ch 4 , +.Xr da 4 , +.Xr mpt 4 , +.Xr pci 4 , +.Xr sa 4 , +.Xr scsi 4 , +.Xr targ 4 +.Sh BUGS +This driver is still in development, it has only been tested on the amd64 +architecture and has some known shortcomings: +.Bl -bullet -compact +.It +No IR (Integrated RAID) support. +.It +No userland utility support (e.g. +.Xr mptutil 8). +.It +Sometimes the driver gets into a state where devices arrive and depart multiple +times, without user intervention. +.It +The error recovery code isn't complete. +.El +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was originally written by +.An Scott Long Aq scottl@FreeBSD.org . +This man page was written by +.An Ken Merry Aq ken@FreeBSD.org . Modified: head/share/man/man4/mpt.4 ============================================================================== --- head/share/man/man4/mpt.4 Tue Sep 14 20:55:25 2010 (r212623) +++ head/share/man/man4/mpt.4 Tue Sep 14 21:40:29 2010 (r212624) @@ -152,6 +152,7 @@ can take on - no separate compilation is .Xr cd 4 , .Xr ch 4 , .Xr da 4 , +.Xr mps 4 , .Xr pci 4 , .Xr sa 4 , .Xr scsi 4 , From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 23:27:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC825106566C; Tue, 14 Sep 2010 23:27:06 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC1FB8FC20; Tue, 14 Sep 2010 23:27:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8ENR6qY095817; Tue, 14 Sep 2010 23:27:06 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8ENR6UH095815; Tue, 14 Sep 2010 23:27:06 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201009142327.o8ENR6UH095815@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 14 Sep 2010 23:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212625 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 23:27:06 -0000 Author: weongyo Date: Tue Sep 14 23:27:06 2010 New Revision: 212625 URL: http://svn.freebsd.org/changeset/base/212625 Log: Fixes spellings and uses the better sentence. While I'm here bumps date. Pointed by: imp, Ruslan Mahmatkhanov Modified: head/share/man/man4/bwn.4 Modified: head/share/man/man4/bwn.4 ============================================================================== --- head/share/man/man4/bwn.4 Tue Sep 14 21:40:29 2010 (r212624) +++ head/share/man/man4/bwn.4 Tue Sep 14 23:27:06 2010 (r212625) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2010 +.Dd September 14, 2010 .Dt BWN 4 .Os .Sh NAME @@ -93,12 +93,11 @@ driver supports Broadcom BCM43xx based w .It "US Robotics 5411 BCM4318 CardBus b/g" .El .Pp -However if the device chipset is one of BCM4301, BCM4303 and BCM4306 rev 2, -uses +Users of older Broadcom chipsets (BCM4301, BCM4303 and BCM4306 rev 2) +must use .Xr bwi 4 -instead of -.Xr bwn 4 -because the vendor dropped the firmware support. +because the v4 version of the firmware does not support these chips. +The newer firmware is too big to fit into these old chips. .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 00:17:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC048106566B; Wed, 15 Sep 2010 00:17:52 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAE968FC08; Wed, 15 Sep 2010 00:17:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F0HqQ8097142; Wed, 15 Sep 2010 00:17:52 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F0HqZg097137; Wed, 15 Sep 2010 00:17:52 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201009150017.o8F0HqZg097137@svn.freebsd.org> From: Peter Grehan Date: Wed, 15 Sep 2010 00:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212627 - in head/sys/powerpc: aim booke include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 00:17:53 -0000 Author: grehan Date: Wed Sep 15 00:17:52 2010 New Revision: 212627 URL: http://svn.freebsd.org/changeset/base/212627 Log: Introduce inheritance into the PowerPC MMU kobj interface. include/mmuvar.h - Change the MMU_DEF macro to also create the class definition as well as define the DATA_SET. Add a macro, MMU_DEF_INHERIT, which has an extra parameter specifying the MMU class to inherit methods from. Update the comments at the start of the header file to describe the new macros. booke/pmap.c aim/mmu_oea.c aim/mmu_oea64.c - Collapse mmu_def_t declaration into updated MMU_DEF macro The MMU_DEF_INHERIT macro will be used in the PS3 MMU implementation to allow it to inherit the stock powerpc64 MMU methods. Reviewed by: nwhitehorn Modified: head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/include/mmuvar.h Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Tue Sep 14 23:54:03 2010 (r212626) +++ head/sys/powerpc/aim/mmu_oea.c Wed Sep 15 00:17:52 2010 (r212627) @@ -379,12 +379,8 @@ static mmu_method_t moea_methods[] = { { 0, 0 } }; -static mmu_def_t oea_mmu = { - MMU_TYPE_OEA, - moea_methods, - 0 -}; -MMU_DEF(oea_mmu); +MMU_DEF(oea_mmu, MMU_TYPE_OEA, moea_methods, 0); + static void tlbie(vm_offset_t va) Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Tue Sep 14 23:54:03 2010 (r212626) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Sep 15 00:17:52 2010 (r212627) @@ -474,12 +474,7 @@ static mmu_method_t moea64_methods[] = { { 0, 0 } }; -static mmu_def_t oea64_mmu = { - MMU_TYPE_G5, - moea64_methods, - 0 -}; -MMU_DEF(oea64_mmu); +MMU_DEF(oea64_mmu, MMU_TYPE_G5, moea64_methods, 0); static __inline u_int va_to_pteg(uint64_t vsid, vm_offset_t addr, int large) Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Tue Sep 14 23:54:03 2010 (r212626) +++ head/sys/powerpc/booke/pmap.c Wed Sep 15 00:17:52 2010 (r212627) @@ -384,12 +384,7 @@ static mmu_method_t mmu_booke_methods[] { 0, 0 } }; -static mmu_def_t booke_mmu = { - MMU_TYPE_BOOKE, - mmu_booke_methods, - 0 -}; -MMU_DEF(booke_mmu); +MMU_DEF(booke_mmu, MMU_TYPE_BOOKE, mmu_booke_methods, 0); static inline void tlb_miss_lock(void) Modified: head/sys/powerpc/include/mmuvar.h ============================================================================== --- head/sys/powerpc/include/mmuvar.h Tue Sep 14 23:54:03 2010 (r212626) +++ head/sys/powerpc/include/mmuvar.h Wed Sep 15 00:17:52 2010 (r212627) @@ -31,7 +31,8 @@ /* * A PowerPC MMU implementation is declared with a kernel object and - * an associated method table, similar to a device driver. + * an associated method table. The MMU_DEF macro is used to declare + * the class, and also links it to the global MMU class list. * * e.g. * @@ -44,13 +45,12 @@ * { 0, 0 } * }; * - * static mmu_def_t ppc8xx_mmu = { - * "ppc8xx", - * ppc8xx_methods, - * sizeof(ppc8xx_mmu_softc), // or 0 if no softc - * }; + * MMU_DEF(ppc8xx, MMU_TYPE_8xx, ppc8xx_methods, sizeof(ppc8xx_mmu_softc)); + * + * A single level of inheritance is supported in a similar fashion to + * kobj inheritance e.g. * - * MMU_DEF(ppc8xx_mmu); + * MMU_DEF_1(ppc860c, MMU_TYPE_860c, ppc860c_methods, 0, ppc8xx); */ #include @@ -84,7 +84,29 @@ typedef struct kobj_class mmu_def_t; #define MMUMETHOD KOBJMETHOD -#define MMU_DEF(name) DATA_SET(mmu_set, name) +#define MMU_DEF(name, ident, methods, size) \ + \ +mmu_def_t name = { \ + ident, methods, size, NULL \ +}; \ +DATA_SET(mmu_set, name) + +#define MMU_DEF_INHERIT(name, ident, methods, size, base1) \ + \ +static kobj_class_t name ## _baseclasses[] = \ + { &base1, NULL }; \ +mmu_def_t name = { \ + ident, methods, size, name ## _baseclasses \ +}; \ +DATA_SET(mmu_set, name) + + +#if 0 +mmu_def_t name = { \ + ident, methods, size, name ## _baseclasses \ +}; +DATA_SET(mmu_set, name) +#endif /* * Known MMU names From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 01:19:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CC2A106566B; Wed, 15 Sep 2010 01:19:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 319378FC0A; Wed, 15 Sep 2010 01:19:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F1JCfg098405; Wed, 15 Sep 2010 01:19:12 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F1JCjW098403; Wed, 15 Sep 2010 01:19:12 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201009150119.o8F1JCjW098403@svn.freebsd.org> From: Ed Maste Date: Wed, 15 Sep 2010 01:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212628 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 01:19:12 -0000 Author: emaste Date: Wed Sep 15 01:19:11 2010 New Revision: 212628 URL: http://svn.freebsd.org/changeset/base/212628 Log: Add some enums and constants from Adaptec's latest driver (build 17911). Modified: head/sys/dev/aac/aacreg.h Modified: head/sys/dev/aac/aacreg.h ============================================================================== --- head/sys/dev/aac/aacreg.h Wed Sep 15 00:17:52 2010 (r212627) +++ head/sys/dev/aac/aacreg.h Wed Sep 15 01:19:11 2010 (r212628) @@ -306,7 +306,9 @@ struct aac_adapter_init { u_int32_t HostElapsedSeconds; /* ADAPTER_INIT_STRUCT_REVISION_4 begins here */ u_int32_t InitFlags; /* flags for supported features */ -#define AAC_INITFLAGS_NEW_COMM_SUPPORTED 1 +#define AAC_INITFLAGS_NEW_COMM_SUPPORTED 1 +#define AAC_INITFLAGS_DRIVER_USES_UTC_TIME 0x10 +#define AAC_INITFLAGS_DRIVER_SUPPORTS_PM 0x20 u_int32_t MaxIoCommands; /* max outstanding commands */ u_int32_t MaxIoSize; /* largest I/O command */ u_int32_t MaxFibSize; /* largest FIB to adapter */ @@ -885,6 +887,17 @@ typedef enum { AifEnBatteryNeedsRecond, /* The battery needs reconditioning */ AifEnClusterEvent, /* Some cluster event */ AifEnDiskSetEvent, /* A disk set event occured. */ + AifEnContainerScsiEvent, /* a container event with no. and scsi id */ + AifEnPicBatteryEvent, /* An event gen. by pic_battery.c for an ABM */ + AifEnExpEvent, /* Exp. Event Type to replace CTPopUp messages */ + AifEnRAID6RebuildDone, /* RAID6 rebuild finished */ + AifEnSensorOverHeat, /* Heat Sensor indicate overheat */ + AifEnSensorCoolDown, /* Heat Sensor ind. cooled down after overheat */ + AifFeatureKeysModified, /* notif. of updated feature keys */ + AifApplicationExpirationEvent, /* notif. on app. expiration status */ + AifEnBackgroundConsistencyCheck,/* BCC notif. for NEC - DDTS 94700 */ + AifEnAddJBOD, /* A new JBOD type drive was created (30) */ + AifEnDeleteJBOD, /* A JBOD type drive was deleted (31) */ AifDriverNotifyStart=199, /* Notifies for host driver go here */ /* Host driver notifications start here */ AifDenMorphComplete, /* A morph operation completed */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 01:21:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 008CB106566B; Wed, 15 Sep 2010 01:21:31 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C96718FC0A; Wed, 15 Sep 2010 01:21:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F1LUtR098484; Wed, 15 Sep 2010 01:21:30 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F1LUC9098482; Wed, 15 Sep 2010 01:21:30 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009150121.o8F1LUC9098482@svn.freebsd.org> From: David Xu Date: Wed, 15 Sep 2010 01:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212629 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 01:21:31 -0000 Author: davidxu Date: Wed Sep 15 01:21:30 2010 New Revision: 212629 URL: http://svn.freebsd.org/changeset/base/212629 Log: Move back IN_GCLIST flag into field tlflags, since thread list and gc list still share same lock. Modified: head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Wed Sep 15 01:19:11 2010 (r212628) +++ head/lib/libthr/thread/thr_private.h Wed Sep 15 01:21:30 2010 (r212629) @@ -415,13 +415,13 @@ struct pthread { #define THR_FLAGS_PRIVATE 0x0001 #define THR_FLAGS_NEED_SUSPEND 0x0002 /* thread should be suspended */ #define THR_FLAGS_SUSPENDED 0x0004 /* thread is suspended */ -#define THR_FLAGS_IN_GCLIST 0x0008 /* thread in gc list */ -#define THR_FLAGS_DETACHED 0x0010 /* thread is detached */ +#define THR_FLAGS_DETACHED 0x0008 /* thread is detached */ /* Thread list flags; only set with thread list lock held. */ int tlflags; #define TLFLAGS_GC_SAFE 0x0001 /* thread safe for cleaning */ #define TLFLAGS_IN_TDLIST 0x0002 /* thread in all thread list */ +#define TLFLAGS_IN_GCLIST 0x0004 /* thread in gc list */ /* Queue of currently owned NORMAL or PRIO_INHERIT type mutexes. */ struct mutex_queue mutexq; @@ -559,16 +559,16 @@ do { \ } \ } while (0) #define THR_GCLIST_ADD(thrd) do { \ - if (((thrd)->flags & THR_FLAGS_IN_GCLIST) == 0) { \ + if (((thrd)->tlflags & TLFLAGS_IN_GCLIST) == 0) { \ TAILQ_INSERT_HEAD(&_thread_gc_list, thrd, gcle);\ - (thrd)->flags |= THR_FLAGS_IN_GCLIST; \ + (thrd)->tlflags |= TLFLAGS_IN_GCLIST; \ _gc_count++; \ } \ } while (0) #define THR_GCLIST_REMOVE(thrd) do { \ - if (((thrd)->flags & THR_FLAGS_IN_GCLIST) != 0) { \ + if (((thrd)->tlflags & TLFLAGS_IN_GCLIST) != 0) { \ TAILQ_REMOVE(&_thread_gc_list, thrd, gcle); \ - (thrd)->flags &= ~THR_FLAGS_IN_GCLIST; \ + (thrd)->tlflags &= ~TLFLAGS_IN_GCLIST; \ _gc_count--; \ } \ } while (0) From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 01:26:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 800CD106566B for ; Wed, 15 Sep 2010 01:26:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 0D7378FC13 for ; Wed, 15 Sep 2010 01:26:20 +0000 (UTC) Received: (qmail 23140 invoked by uid 399); 15 Sep 2010 01:26:20 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 Sep 2010 01:26:20 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C9020C5.90108@FreeBSD.org> Date: Tue, 14 Sep 2010 18:26:29 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: Warner Losh References: <201009131530.o8DFU9f5010734@svn.freebsd.org> In-Reply-To: <201009131530.o8DFU9f5010734@svn.freebsd.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212558 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 01:26:21 -0000 On 9/13/2010 8:30 AM, Warner Losh wrote: > Author: imp > Date: Mon Sep 13 15:30:09 2010 > New Revision: 212558 > URL: http://svn.freebsd.org/changeset/base/212558 > > Log: > Move to using Makefile.arch to include the proper target-specific programs. > > Modified: > head/usr.bin/Makefile > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Mon Sep 13 15:19:49 2010 (r212557) > +++ head/usr.bin/Makefile Mon Sep 13 15:30:09 2010 (r212558) > @@ -11,48 +11,29 @@ > > SUBDIR= alias \ > apply \ > - ${_ar} \ > .if ${MK_TOOLCHAIN} != "no" > -_ar= ar > +SUBDIR+= ar I'm curious about why you're changing the method we use to switch optional elements. The change seems gratuitous to me, but I'm willing to be persuaded. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 02:31:51 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31BF1106564A; Wed, 15 Sep 2010 02:31:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E56B48FC08; Wed, 15 Sep 2010 02:31:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o8F2TUbY081838; Tue, 14 Sep 2010 20:29:31 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 14 Sep 2010 20:29:36 -0600 (MDT) Message-Id: <20100914.202936.19192035460743630.imp@bsdimp.com> To: dougb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4C9020C5.90108@FreeBSD.org> References: <201009131530.o8DFU9f5010734@svn.freebsd.org> <4C9020C5.90108@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) 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 Subject: Re: svn commit: r212558 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 02:31:51 -0000 In message: <4C9020C5.90108@FreeBSD.org> Doug Barton writes: : On 9/13/2010 8:30 AM, Warner Losh wrote: : > Author: imp : > Date: Mon Sep 13 15:30:09 2010 : > New Revision: 212558 : > URL: http://svn.freebsd.org/changeset/base/212558 : > : > Log: : > Move to using Makefile.arch to include the proper target-specific : > programs. : > : > Modified: : > head/usr.bin/Makefile : > : > Modified: head/usr.bin/Makefile : > ============================================================================== : > --- head/usr.bin/Makefile Mon Sep 13 15:19:49 2010 (r212557) : > +++ head/usr.bin/Makefile Mon Sep 13 15:30:09 2010 (r212558) : > @@ -11,48 +11,29 @@ : > : > SUBDIR= alias \ : > apply \ : > - ${_ar} \ : : > .if ${MK_TOOLCHAIN} != "no" : > -_ar= ar : : > +SUBDIR+= ar : : : I'm curious about why you're changing the method we use to switch : optional elements. The change seems gratuitous to me, but I'm willing : to be persuaded. I posted these exact patches many times to arch@ and while people commented on other aspects of the change, no body ever commented on this aspect of the change (apart from comments about how to do it better). That's why I specifically said that there was no objection from arch@ for these changes. Doing things this way makes it easier for different architectures to subset or augment the directories to build (and it makes it a lot easier to know what's built on a given architecture). They can be concentrated into individual Makefiles that are easier to select on. MIPS and ARM are both moving to having multiple names (powerpc moved a couple of months ago) and the current arrangement doesn't scale well in the face of these changes. It is far from gratuitous. Warner From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 02:56:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 480BB1065670; Wed, 15 Sep 2010 02:56:33 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 366248FC12; Wed, 15 Sep 2010 02:56:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F2uXpV004586; Wed, 15 Sep 2010 02:56:33 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F2uXwX004579; Wed, 15 Sep 2010 02:56:33 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009150256.o8F2uXwX004579@svn.freebsd.org> From: David Xu Date: Wed, 15 Sep 2010 02:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 02:56:33 -0000 Author: davidxu Date: Wed Sep 15 02:56:32 2010 New Revision: 212630 URL: http://svn.freebsd.org/changeset/base/212630 Log: add code to support stack unwinding when thread exits. note that only defer-mode cancellation works, asynchrnous mode does not work because it lacks of libuwind's support. stack unwinding is not enabled unless LIBTHR_UNWIND_STACK is defined in Makefile. Modified: head/lib/libthr/Makefile head/lib/libthr/thread/thr_clean.c head/lib/libthr/thread/thr_create.c head/lib/libthr/thread/thr_exit.c head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Wed Sep 15 01:21:30 2010 (r212629) +++ head/lib/libthr/Makefile Wed Sep 15 02:56:32 2010 (r212630) @@ -25,6 +25,14 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rtld- CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline + +LIBTHR_UNWIND_STACK=yes + +.ifdef LIBTHR_UNWIND_STACK +CFLAGS+=-I${.CURDIR}/../../contrib/gcc -fexceptions +CFLAGS+=-D_PTHREAD_FORCED_UNWIND +.endif + LDFLAGS+=-Wl,-znodelete VERSION_DEF=${.CURDIR}/../libc/Versions.def Modified: head/lib/libthr/thread/thr_clean.c ============================================================================== --- head/lib/libthr/thread/thr_clean.c Wed Sep 15 01:21:30 2010 (r212629) +++ head/lib/libthr/thread/thr_clean.c Wed Sep 15 02:56:32 2010 (r212630) @@ -78,6 +78,9 @@ __pthread_cleanup_pop_imp(int execute) void _pthread_cleanup_push(void (*routine) (void *), void *arg) { +#ifdef _PTHREAD_FORCED_UNWIND + PANIC("_pthread_cleanup_push is not supported while stack unwinding is enabled."); +#else struct pthread *curthread = _get_curthread(); struct pthread_cleanup *newbuf; @@ -89,10 +92,15 @@ _pthread_cleanup_push(void (*routine) (v newbuf->prev = curthread->cleanup; curthread->cleanup = newbuf; } +#endif } void _pthread_cleanup_pop(int execute) { +#ifdef _PTHREAD_FORCED_UNWIND + PANIC("_pthread_cleanup_pop is not supported while stack unwinding is enabled."); +#else __pthread_cleanup_pop_imp(execute); +#endif } Modified: head/lib/libthr/thread/thr_create.c ============================================================================== --- head/lib/libthr/thread/thr_create.c Wed Sep 15 01:21:30 2010 (r212629) +++ head/lib/libthr/thread/thr_create.c Wed Sep 15 02:56:32 2010 (r212630) @@ -264,6 +264,11 @@ thread_start(struct pthread *curthread) __sys_sigprocmask(SIG_SETMASK, &set, NULL); } +#ifdef _PTHREAD_FORCED_UNWIND + curthread->unwind_stackend = (char *)curthread->attr.stackaddr_attr + + curthread->attr.stacksize_attr; +#endif + /* Run the current thread's start routine with argument: */ _pthread_exit(curthread->start_routine(curthread->arg)); Modified: head/lib/libthr/thread/thr_exit.c ============================================================================== --- head/lib/libthr/thread/thr_exit.c Wed Sep 15 01:21:30 2010 (r212629) +++ head/lib/libthr/thread/thr_exit.c Wed Sep 15 02:56:32 2010 (r212630) @@ -31,6 +31,9 @@ #include "namespace.h" #include +#ifdef _PTHREAD_FORCED_UNWIND +#include +#endif #include #include #include @@ -43,8 +46,125 @@ void _pthread_exit(void *status); +static void exit_thread(void) __dead2; + __weak_reference(_pthread_exit, pthread_exit); +#ifdef _PTHREAD_FORCED_UNWIND + +static void thread_unwind(void) __dead2; +#ifdef PIC +static void thread_uw_init(void); +static _Unwind_Reason_Code thread_unwind_stop(int version, + _Unwind_Action actions, + _Unwind_Exception_Class exc_class, + struct _Unwind_Exception *exc_obj, + struct _Unwind_Context *context, void *stop_parameter); +/* unwind library pointers */ +static _Unwind_Reason_Code (*uwl_forcedunwind)(struct _Unwind_Exception *, + _Unwind_Stop_Fn, void *); +static void (*uwl_resume)(struct _Unwind_Exception *exc); +static _Unwind_Word (*uwl_getcfa)(struct _Unwind_Context *); + +static void +thread_uw_init(void) +{ + static int inited = 0; + void *handle; + + if (inited) + return; + inited = 1; + handle = RTLD_DEFAULT; + if ((uwl_forcedunwind = dlsym(handle, "_Unwind_ForcedUnwind")) == NULL|| + (uwl_resume = dlsym(handle, "_Unwind_Resume")) == NULL || + (uwl_getcfa = dlsym(handle, "_Unwind_GetCFA")) == NULL) { + uwl_forcedunwind = NULL; + return; + } +} + +void +_Unwind_Resume(struct _Unwind_Exception *ex) +{ + (*uwl_resume)(ex); +} + +_Unwind_Reason_Code +_Unwind_ForcedUnwind(struct _Unwind_Exception *ex, _Unwind_Stop_Fn stop_func, + void *stop_arg) +{ + return (*uwl_forcedunwind)(ex, stop_func, stop_arg); +} + +_Unwind_Word +_Unwind_GetCFA(struct _Unwind_Context *context) +{ + return (*uwl_getcfa)(context); +} +#else +#pragma weak _Unwind_GetCFA +#pragma weak _Unwind_ForcedUnwind +#pragma weak _Unwind_Resume +#endif /* PIC */ + +static void +thread_unwind_cleanup(_Unwind_Reason_Code code, struct _Unwind_Exception *e) +{ + /* + * Specification said that _Unwind_Resume should not be used here, + * instead, user should rethrow the exception. For C++ user, they + * should put "throw" sentence in catch(...) block. + */ + PANIC("exception should be rethrown"); +} + +static _Unwind_Reason_Code +thread_unwind_stop(int version, _Unwind_Action actions, + _Unwind_Exception_Class exc_class, + struct _Unwind_Exception *exc_obj, + struct _Unwind_Context *context, void *stop_parameter) +{ + struct pthread *curthread = _get_curthread(); + struct pthread_cleanup *cur; + uintptr_t cfa; + int done = 0; + + /* XXX assume stack grows down to lower address */ + + cfa = _Unwind_GetCFA(context); + if (actions & _UA_END_OF_STACK) { + done = 1; + } else if (cfa >= (uintptr_t)curthread->unwind_stackend) { + done = 1; + } + + while ((cur = curthread->cleanup) != NULL && + (done || + ((uintptr_t)cur < (uintptr_t)curthread->unwind_stackend && + (uintptr_t)cur >= cfa))) { + __pthread_cleanup_pop_imp(1); + } + + if (done) + exit_thread(); /* Never return! */ + + return (_URC_NO_REASON); +} + +static void +thread_unwind(void) +{ + struct pthread *curthread = _get_curthread(); + + curthread->ex.exception_class = 0; + curthread->ex.exception_cleanup = thread_unwind_cleanup; + _Unwind_ForcedUnwind(&curthread->ex, thread_unwind_stop, NULL); + PANIC("_Unwind_ForcedUnwind returned"); +} + +#endif + void _thread_exit(const char *fname, int lineno, const char *msg) { @@ -95,10 +215,39 @@ _pthread_exit_mask(void *status, sigset_ /* Save the return value: */ curthread->ret = status; +#ifdef _PTHREAD_FORCED_UNWIND +#ifdef PIC + thread_uw_init(); + if (uwl_forcedunwind != NULL) { + thread_unwind(); + } +#else + if (_Unwind_ForcedUnwind != NULL) { + thread_unwind(); + } +#endif /* PIC */ + + else { + while (curthread->cleanup != NULL) { + __pthread_cleanup_pop_imp(1); + } + exit_thread(); + } + +#else while (curthread->cleanup != NULL) { - _pthread_cleanup_pop(1); + __pthread_cleanup_pop_imp(1); } + exit_thread(); +#endif /* _PTHREAD_FORCED_UNWIND */ +} + +static void +exit_thread(void) +{ + struct pthread *curthread = _get_curthread(); + /* Check if there is thread specific data: */ if (curthread->specific != NULL) { /* Run the thread-specific data destructors: */ Modified: head/lib/libthr/thread/thr_init.c ============================================================================== --- head/lib/libthr/thread/thr_init.c Wed Sep 15 01:21:30 2010 (r212629) +++ head/lib/libthr/thread/thr_init.c Wed Sep 15 02:56:32 2010 (r212630) @@ -413,6 +413,10 @@ init_main_thread(struct pthread *thread) &sched_param); thread->attr.prio = sched_param.sched_priority; +#ifdef _PTHREAD_FORCED_UNWIND + thread->unwind_stackend = _usrstack; +#endif + /* Others cleared to zero by thr_alloc() */ } Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Wed Sep 15 01:21:30 2010 (r212629) +++ head/lib/libthr/thread/thr_private.h Wed Sep 15 02:56:32 2010 (r212630) @@ -70,6 +70,10 @@ #include "thr_umtx.h" #include "thread_db.h" +#ifdef _PTHREAD_FORCED_UNWIND +#include +#endif + typedef TAILQ_HEAD(pthreadlist, pthread) pthreadlist; typedef TAILQ_HEAD(atfork_head, pthread_atfork) atfork_head; TAILQ_HEAD(mutex_queue, pthread_mutex); @@ -446,6 +450,11 @@ struct pthread { /* Cleanup handlers Link List */ struct pthread_cleanup *cleanup; +#ifdef _PTHREAD_FORCED_UNWIND + struct _Unwind_Exception ex; + void *unwind_stackend; +#endif + /* * Magic value to help recognize a valid thread structure * from an invalid one: From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 03:06:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C73D6106566C; Wed, 15 Sep 2010 03:06:26 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B652D8FC12; Wed, 15 Sep 2010 03:06:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8F36OiA047409; Wed, 15 Sep 2010 03:06:25 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4C90A8B1.6060709@freebsd.org> Date: Wed, 15 Sep 2010 11:06:25 +0000 From: David Xu User-Agent: Thunderbird 2.0.0.24 (X11/20100630) MIME-Version: 1.0 To: David Xu References: <201009150256.o8F2uXwX004579@svn.freebsd.org> In-Reply-To: <201009150256.o8F2uXwX004579@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 03:06:26 -0000 David Xu wrote: > Author: davidxu > Date: Wed Sep 15 02:56:32 2010 > New Revision: 212630 > URL: http://svn.freebsd.org/changeset/base/212630 > > Log: > add code to support stack unwinding when thread exits. note that only > defer-mode cancellation works, asynchrnous mode does not work because > it lacks of libuwind's support. stack unwinding is not enabled unless > LIBTHR_UNWIND_STACK is defined in Makefile. > > Modified: > head/lib/libthr/Makefile > head/lib/libthr/thread/thr_clean.c > head/lib/libthr/thread/thr_create.c > head/lib/libthr/thread/thr_exit.c > head/lib/libthr/thread/thr_init.c > head/lib/libthr/thread/thr_private.h I have enabled stack unwinding to see if it will cause any problem, if it does, it can be easily turned off in Makefile. From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 03:17:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7157F10656AA; Wed, 15 Sep 2010 03:17:37 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id EB4A08FC0C; Wed, 15 Sep 2010 03:17:36 +0000 (UTC) Received: by vws7 with SMTP id 7so7344220vws.13 for ; Tue, 14 Sep 2010 20:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=TPzgVCkre1fW9LZn4haWiA73NAgiyLwf4rV8SDRg61E=; b=iByrcpbJJ9gOmV/8jKfLKb7/pedibDazI0mlj5AzdmC0AZu/ZtRNE5ylmUlz0Nk7ZF pEdsWQoMogZ3HRd+nyTY7DWo8KiC+4KQocg1LZa3luP+AwbLd+tddK7AaEYKeZ4pmK1/ 2HLElHcJGPGj3qFJ0JnBo1TLQVe32609e0TFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=nZe456/oa179hqEN4I88EgLH28YgiTfIHu3pwh6SBn9RBF9tEufKBd7fEjtQ7h/Fnu tbECD4V4okN9cUhcZbUBt2uxQMvxe6jTOfRKuL4KurC7bpdcmkEFsdZnLRc2UMhCddQP PB66lCjDXipTZIba0l+BsxDEDUzDNm3Ccihcc= Received: by 10.220.61.13 with SMTP id r13mr469207vch.202.1284520655797; Tue, 14 Sep 2010 20:17:35 -0700 (PDT) Received: from kan.dnsalias.net (c-24-63-226-98.hsd1.ma.comcast.net [24.63.226.98]) by mx.google.com with ESMTPS id z14sm227796vch.10.2010.09.14.20.17.34 (version=SSLv3 cipher=RC4-MD5); Tue, 14 Sep 2010 20:17:34 -0700 (PDT) Date: Tue, 14 Sep 2010 23:17:28 -0400 From: Alexander Kabaev To: David Xu Message-ID: <20100914231728.33ca7466@kan.dnsalias.net> In-Reply-To: <201009150256.o8F2uXwX004579@svn.freebsd.org> References: <201009150256.o8F2uXwX004579@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/Ck/lZcx7A3CcDrf8WZDQtLl"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 03:17:37 -0000 --Sig_/Ck/lZcx7A3CcDrf8WZDQtLl Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 15 Sep 2010 02:56:33 +0000 (UTC) David Xu wrote: > Author: davidxu > Date: Wed Sep 15 02:56:32 2010 > New Revision: 212630 > URL: http://svn.freebsd.org/changeset/base/212630 >=20 > Log: > add code to support stack unwinding when thread exits. note that > only defer-mode cancellation works, asynchrnous mode does not work > because it lacks of libuwind's support. stack unwinding is not > enabled unless LIBTHR_UNWIND_STACK is defined in Makefile. >=20 > Modified: > head/lib/libthr/Makefile > head/lib/libthr/thread/thr_clean.c > head/lib/libthr/thread/thr_create.c > head/lib/libthr/thread/thr_exit.c > head/lib/libthr/thread/thr_init.c > head/lib/libthr/thread/thr_private.h >=20 > Modified: head/lib/libthr/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libthr/Makefile Wed Sep 15 01:21:30 2010 > (r212629) +++ head/lib/libthr/Makefile Wed Sep 15 02:56:32 > 2010 (r212630) @@ -25,6 +25,14 @@ > CFLAGS+=3D-I${.CURDIR}/../../libexec/rtld- > CFLAGS+=3D-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} > CFLAGS+=3D-I${.CURDIR}/../libthread_db CFLAGS+=3D-Winline > + > +LIBTHR_UNWIND_STACK=3Dyes > + > +.ifdef LIBTHR_UNWIND_STACK > +CFLAGS+=3D-I${.CURDIR}/../../contrib/gcc -fexceptions=20 > +CFLAGS+=3D-D_PTHREAD_FORCED_UNWIND > +.endif > + > Reaching into bowels of GCC like that is never good. --=20 Alexander Kabaev --Sig_/Ck/lZcx7A3CcDrf8WZDQtLl Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iD8DBQFMkDrNQ6z1jMm+XZYRAmvxAKDjLneLD2f99oqMDWCRcmE4pSTpOgCeNqM/ JvKphe0fmHYDD4DKzZnQjgk= =mRHy -----END PGP SIGNATURE----- --Sig_/Ck/lZcx7A3CcDrf8WZDQtLl-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 03:19:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0430106566C; Wed, 15 Sep 2010 03:19:54 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8E96C8FC0C; Wed, 15 Sep 2010 03:19:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8F3JqxY059005; Wed, 15 Sep 2010 03:19:53 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4C90ABD8.1020609@freebsd.org> Date: Wed, 15 Sep 2010 11:19:52 +0000 From: David Xu User-Agent: Thunderbird 2.0.0.24 (X11/20100630) MIME-Version: 1.0 To: Alexander Kabaev References: <201009150256.o8F2uXwX004579@svn.freebsd.org> <20100914231728.33ca7466@kan.dnsalias.net> In-Reply-To: <20100914231728.33ca7466@kan.dnsalias.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 03:19:54 -0000 Alexander Kabaev wrote: > On Wed, 15 Sep 2010 02:56:33 +0000 (UTC) > David Xu wrote: > >> Author: davidxu >> Date: Wed Sep 15 02:56:32 2010 >> New Revision: 212630 >> URL: http://svn.freebsd.org/changeset/base/212630 >> >> Log: >> add code to support stack unwinding when thread exits. note that >> only defer-mode cancellation works, asynchrnous mode does not work >> because it lacks of libuwind's support. stack unwinding is not >> enabled unless LIBTHR_UNWIND_STACK is defined in Makefile. >> >> Modified: >> head/lib/libthr/Makefile >> head/lib/libthr/thread/thr_clean.c >> head/lib/libthr/thread/thr_create.c >> head/lib/libthr/thread/thr_exit.c >> head/lib/libthr/thread/thr_init.c >> head/lib/libthr/thread/thr_private.h >> >> Modified: head/lib/libthr/Makefile >> ============================================================================== >> --- head/lib/libthr/Makefile Wed Sep 15 01:21:30 2010 >> (r212629) +++ head/lib/libthr/Makefile Wed Sep 15 02:56:32 >> 2010 (r212630) @@ -25,6 +25,14 @@ >> CFLAGS+=-I${.CURDIR}/../../libexec/rtld- >> CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} >> CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline >> + >> +LIBTHR_UNWIND_STACK=yes >> + >> +.ifdef LIBTHR_UNWIND_STACK >> +CFLAGS+=-I${.CURDIR}/../../contrib/gcc -fexceptions >> +CFLAGS+=-D_PTHREAD_FORCED_UNWIND >> +.endif >> + >> > > Reaching into bowels of GCC like that is never good. Any solution ? ;-) From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 03:29:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 053CB106564A; Wed, 15 Sep 2010 03:29:46 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout026.mac.com (asmtpout026.mac.com [17.148.16.101]) by mx1.freebsd.org (Postfix) with ESMTP id DF8CF8FC0C; Wed, 15 Sep 2010 03:29:45 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from [192.168.2.104] (hob.xcllnt.net [70.36.220.6]) by asmtp026.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0L8R007CDO99VU60@asmtp026.mac.com>; Tue, 14 Sep 2010 19:29:35 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1009140168 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.0.10011,1.0.148,0.0.0000 definitions=2010-09-14_15:2010-09-14, 2010-09-14, 1970-01-01 signatures=0 From: Marcel Moolenaar In-reply-to: <201009141621.o8EGLDhr086248@svn.freebsd.org> Date: Tue, 14 Sep 2010 19:29:32 -0700 Message-id: References: <201009141621.o8EGLDhr086248@svn.freebsd.org> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212614 - in head: sbin/geom/class/part sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 03:29:46 -0000 On Sep 14, 2010, at 9:21 AM, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Tue Sep 14 16:21:13 2010 > New Revision: 212614 > URL: http://svn.freebsd.org/changeset/base/212614 > > Log: > - Change all places where G_TYPE_ASCNUM is used to G_TYPE_NUMBER. > It turns out the new type wasn't really needed. > - Reorganize code a little bit. Please revert. The gpart ctlreq interface is ASCII only by design. This change is unnecessary as nothing was broken and on top of that breaks compatibility with user-space -- again entirely without merit. Thanks, -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 04:51:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B2581065693; Wed, 15 Sep 2010 04:51:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0EC8FC1A; Wed, 15 Sep 2010 04:51:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F4p80u015004; Wed, 15 Sep 2010 04:51:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F4p8YG015001; Wed, 15 Sep 2010 04:51:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009150451.o8F4p8YG015001@svn.freebsd.org> From: Alexander Motin Date: Wed, 15 Sep 2010 04:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212631 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 04:51:08 -0000 Author: mav Date: Wed Sep 15 04:51:07 2010 New Revision: 212631 URL: http://svn.freebsd.org/changeset/base/212631 Log: Add hpet(4) man page. Added: head/share/man/man4/hpet.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Sep 15 02:56:32 2010 (r212630) +++ head/share/man/man4/Makefile Wed Sep 15 04:51:07 2010 (r212631) @@ -133,6 +133,7 @@ MAN= aac.4 \ hfa.4 \ hifn.4 \ hme.4 \ + hpet.4 \ ${_hptiop.4} \ ${_hptmv.4} \ ${_hptrr.4} \ @@ -544,6 +545,7 @@ MLINKS+=gif.4 if_gif.4 MLINKS+=gre.4 if_gre.4 MLINKS+=hatm.4 if_hatm.4 MLINKS+=hme.4 if_hme.4 +MLINKS+=hpet.4 acpi_hpet.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=idt.4 if_idt.4 MLINKS+=igb.4 if_igb.4 Added: head/share/man/man4/hpet.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/hpet.4 Wed Sep 15 04:51:07 2010 (r212631) @@ -0,0 +1,105 @@ +.\" Copyright (c) 2009 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 14, 2010 +.Dt HPET 4 +.Os +.Sh NAME +.Nm hpet +.Nd High Precision Event Timer driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi" +.Ed +.Pp +The following tunables are settable from the +.Xr loader 8 : +.Bl -ohang +.It Va hint.hpet. Ns Ar X Ns Va .allowed_irqs +is a 32bit mask. Each set bit allows driver to use respective IRQ, +if BIOS also set respective capability bit in comparator's configuration +register. +Default value is 0xffff0000, except some known broken hardware. +.It Va hint.hpet. Ns Ar X Ns Va .clock +controls event timers functionality support. Setting to 0, disables it. +Default value is 1. +.It Va hint.hpet. Ns Ar X Ns Va .legacy_route +controls "LegacyReplacement Route" mode. If enabled, HPET will steal IRQ0 of +i8254 timer and IRQ8 of RTC. Before using it, make sure that respective +drivers are not using interrupts, by setting also: +.Bd -literal +hint.attimer.0.clock=0 +hint.atrtc.0.clock=0 +.Ed +Default value is 0. +.It Va hint.hpet. Ns Ar X Ns Va .per_cpu +controls how much per-CPU event timers should driver attempt to register. +This functionality requires every comparator in a group to have own unshared +IRQ, so it depends on hardware capabilities and interrupts configuration. +Default value is 1. +.El +.Sh DESCRIPTION +This driver uses High Precision Event Timer hardware (part of the chipset, +usually enumerated via ACPI) to supply kernel with one time counter and +several (usually from 3 to 8) event timers. +This hardware includes single main counter with known increment frequency +(10MHz or more), and several programable comparators (optionally with +automatic reload feature). +When value of the main counter matches current value of any comparator, +interrupt can be generated. +Depending on hardware capabilities and configuration, interrupt can be +delivered as regular I/O APIC interrupt (ISA or PCI) in range from 0 to 31, +or as Front Side Bus interrupt, alike to PCI MSI interrupts, or in so called +"LegacyReplacement Route" HPET can speal IRQ0 of i8254 and IRQ8 of the RTC. +Interrupt can be either edge- or level-triggered. In last case they could be +safely shared with PCI IRQs. +Driver prefers to use FSB interrupts, if supported, to avoid sharing. +If it is not possible, it uses single sharable IRQ from PCI range. +Other modes (LegacyReplacement and ISA IRQs) require special care to setup, +but could be configured manually via device hints. +.Pp +Event timers provided by the driver support both one-shot an periodic modes +and irrelevant to CPU power states. +.Pp +Depending on hardware capabilities and configuration, driver can expose each +comparator as separate event timer or group them into one or several per-CPU +event timers. In last case interrupt of every of those comparators within +group is bound to specific CPU core. This is possible only when each +of these comparators has own unsharable IRQ. +.Sh SEE ALSO +.Xr acpi 4 , +.Xr eventtimer 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 6.3 . +Support for event timers was added in +.Fx 9.0 . From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 05:10:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 827E5106566B; Wed, 15 Sep 2010 05:10:50 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67B158FC0C; Wed, 15 Sep 2010 05:10:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F5AoJq016782; Wed, 15 Sep 2010 05:10:50 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F5AowF016776; Wed, 15 Sep 2010 05:10:50 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201009150510.o8F5AowF016776@svn.freebsd.org> From: Neel Natu Date: Wed, 15 Sep 2010 05:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212632 - in head/sys/mips: cavium include mips sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 05:10:50 -0000 Author: neel Date: Wed Sep 15 05:10:50 2010 New Revision: 212632 URL: http://svn.freebsd.org/changeset/base/212632 Log: Make the meaning of the 'mask' argument to 'set_intr_mask(mask)' consistent with the meaning of IM bits in the status register. Reviewed by: jmallett, jchandra Modified: head/sys/mips/cavium/octeon_mp.c head/sys/mips/include/cpufunc.h head/sys/mips/mips/machdep.c head/sys/mips/mips/trap.c head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/cavium/octeon_mp.c ============================================================================== --- head/sys/mips/cavium/octeon_mp.c Wed Sep 15 04:51:07 2010 (r212631) +++ head/sys/mips/cavium/octeon_mp.c Wed Sep 15 05:10:50 2010 (r212632) @@ -96,7 +96,7 @@ platform_init_ap(int cpuid) */ clock_int_mask = hard_int_mask(5); ipi_int_mask = hard_int_mask(platform_ipi_intrnum()); - set_intr_mask(MIPS_SR_INT_MASK & ~(ipi_int_mask | clock_int_mask)); + set_intr_mask(ipi_int_mask | clock_int_mask); mips_wbflush(); } Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Wed Sep 15 04:51:07 2010 (r212631) +++ head/sys/mips/include/cpufunc.h Wed Sep 15 05:10:50 2010 (r212632) @@ -272,7 +272,7 @@ set_intr_mask(uint32_t mask) uint32_t ostatus; ostatus = mips_rd_status(); - mask = (ostatus & ~MIPS_SR_INT_MASK) | (~mask & MIPS_SR_INT_MASK); + mask = (ostatus & ~MIPS_SR_INT_MASK) | (mask & MIPS_SR_INT_MASK); mips_wr_status(mask); return (ostatus); } Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Wed Sep 15 04:51:07 2010 (r212631) +++ head/sys/mips/mips/machdep.c Wed Sep 15 05:10:50 2010 (r212632) @@ -356,7 +356,7 @@ mips_vector_init(void) * Mask all interrupts. Each interrupt will be enabled * when handler is installed for it */ - set_intr_mask(MIPS_SR_INT_MASK); + set_intr_mask(0); /* Clear BEV in SR so we start handling our own exceptions */ mips_wr_status(mips_rd_status() & ~MIPS_SR_BEV); Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Wed Sep 15 04:51:07 2010 (r212631) +++ head/sys/mips/mips/trap.c Wed Sep 15 05:10:50 2010 (r212632) @@ -304,7 +304,7 @@ trap(struct trapframe *trapframe) * return to userland. */ if (trapframe->sr & MIPS_SR_INT_IE) { - set_intr_mask(~(trapframe->sr & MIPS_SR_INT_MASK)); + set_intr_mask(trapframe->sr & MIPS_SR_INT_MASK); intr_enable(); } else { intr_disable(); Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Wed Sep 15 04:51:07 2010 (r212631) +++ head/sys/mips/sibyte/sb_machdep.c Wed Sep 15 05:10:50 2010 (r212632) @@ -370,7 +370,7 @@ platform_init_ap(int cpuid) */ clock_int_mask = hard_int_mask(5); ipi_int_mask = hard_int_mask(platform_ipi_intrnum()); - set_intr_mask(MIPS_SR_INT_MASK & ~(ipi_int_mask | clock_int_mask)); + set_intr_mask(ipi_int_mask | clock_int_mask); } int From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 05:29:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50E0C106564A; Wed, 15 Sep 2010 05:29:14 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41AB28FC15; Wed, 15 Sep 2010 05:29:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F5TEHe018434; Wed, 15 Sep 2010 05:29:14 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F5TE2O018430; Wed, 15 Sep 2010 05:29:14 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201009150529.o8F5TE2O018430@svn.freebsd.org> From: Neel Natu Date: Wed, 15 Sep 2010 05:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212633 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 05:29:14 -0000 Author: neel Date: Wed Sep 15 05:29:13 2010 New Revision: 212633 URL: http://svn.freebsd.org/changeset/base/212633 Log: Factor out the common parts of the swarm board in SWARM_COMMON and start including that in SWARM and SWARM_SMP kernel configs. Added: head/sys/mips/conf/SWARM_COMMON (contents, props changed) Modified: head/sys/mips/conf/SWARM head/sys/mips/conf/SWARM_SMP Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Wed Sep 15 05:10:50 2010 (r212632) +++ head/sys/mips/conf/SWARM Wed Sep 15 05:29:13 2010 (r212633) @@ -2,69 +2,11 @@ # $FreeBSD$ # -ident SWARM -options CPU_SB1 +include SWARM_COMMON -files "../sibyte/files.sibyte" -hints "SWARM.hints" +ident SWARM -options CFE -options CFE_CONSOLE -options CFE_ENV -options ALT_BREAK_TO_DEBUGGER +options ISA_MIPS32 +makeoptions ARCH_FLAGS="-mabi=32 -march=mips32" makeoptions LDSCRIPT_NAME= ldscript.mips.cfe - -#cpu CPU_MIPS64 -#options ISA_MIPS64 -#makeoptions ARCH_FLAGS="-march=mips64 -mgp64 -mabi=o64" -cpu CPU_MIPS32 -options ISA_MIPS32 -makeoptions ARCH_FLAGS="-march=mips32" - -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="" - -options DDB -options KDB - -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options NFSCLIENT #Network Filesystem Client -options NFS_ROOT #NFS usable as /, requires NFSCLIENT -options PSEUDOFS #Pseudo-filesystem framework -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions - -# Debugging for use in -current -#options DEADLKRES -options INVARIANTS -options INVARIANT_SUPPORT -options WITNESS - -options FFS #Fast filesystem - -options KTRACE - -device pci -device miibus -device bge -device loop -device ether -device md -device random - -options USB_DEBUG -device usb -device ohci -device uhci -device ehci - -device umass - -device scbus -device da - -device ata -device atadisk -device atapicd -options ATA_STATIC_ID Added: head/sys/mips/conf/SWARM_COMMON ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/SWARM_COMMON Wed Sep 15 05:29:13 2010 (r212633) @@ -0,0 +1,60 @@ +# +# $FreeBSD$ +# + +files "../sibyte/files.sibyte" +hints "SWARM.hints" + +options CFE +options CFE_CONSOLE +options CFE_ENV +options ALT_BREAK_TO_DEBUGGER + +cpu CPU_SB1 + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="" + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# Debugging for use in -current +#options DEADLKRES +options INVARIANTS +options INVARIANT_SUPPORT +options WITNESS + +options FFS #Fast filesystem + +options KTRACE + +device pci +device miibus +device bge +device loop +device ether +device md +device random + +options USB_DEBUG +device usb +device ohci +device uhci +device ehci + +device umass + +device scbus +device da + +device ata +device atadisk +device atapicd +options ATA_STATIC_ID Modified: head/sys/mips/conf/SWARM_SMP ============================================================================== --- head/sys/mips/conf/SWARM_SMP Wed Sep 15 05:10:50 2010 (r212632) +++ head/sys/mips/conf/SWARM_SMP Wed Sep 15 05:29:13 2010 (r212633) @@ -1,7 +1,15 @@ # # $FreeBSD$ # + +include SWARM_COMMON + +ident SWARM_SMP + options SMP options PRINTF_BUFR_SIZE=128 -include SWARM +options ISA_MIPS32 + +makeoptions ARCH_FLAGS="-mabi=32 -march=mips32" +makeoptions LDSCRIPT_NAME= ldscript.mips.cfe From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 05:32:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9424D1065670; Wed, 15 Sep 2010 05:32:10 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 836098FC0C; Wed, 15 Sep 2010 05:32:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F5WA1B018734; Wed, 15 Sep 2010 05:32:10 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F5WANC018730; Wed, 15 Sep 2010 05:32:10 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201009150532.o8F5WANC018730@svn.freebsd.org> From: Neel Natu Date: Wed, 15 Sep 2010 05:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212634 - in head/sys: conf mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 05:32:10 -0000 Author: neel Date: Wed Sep 15 05:32:10 2010 New Revision: 212634 URL: http://svn.freebsd.org/changeset/base/212634 Log: Add 64-bit SWARM board kernel configs. Added: head/sys/conf/ldscript.mips.64.cfe (contents, props changed) head/sys/mips/conf/SWARM64 (contents, props changed) head/sys/mips/conf/SWARM64_SMP (contents, props changed) Added: head/sys/conf/ldscript.mips.64.cfe ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/ldscript.mips.64.cfe Wed Sep 15 05:32:10 2010 (r212634) @@ -0,0 +1,320 @@ +/*- + * Copyright (c) 2001, 2004, 2008, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Juniper Networks, 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 JUNIPER NETWORKS 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 JUNIPER NETWORKS 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. + * + * JNPR: ldscript.mips,v 1.3 2006/10/11 06:12:04 + * $FreeBSD$ + */ + +/* + * This linker script is needed to build a kernel for use by Broadcom CFE + * when loaded over TFTP; its ELF loader does not support backwards seek + * on network I/O streams. + * Furthermore, CFE will only load PT_LOAD segments, therefore the dynamic + * sections must be placed in their own segment. + */ + +OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", "elf64-tradlittlemips") + +OUTPUT_ARCH(mips) +ENTRY(_start) +SEARCH_DIR(/usr/lib); +/* Do we need any of these for elf? + __DYNAMIC = 0; +PROVIDE (_DYNAMIC = 0); +*/ + +PHDRS +{ + headers PT_PHDR FILEHDR PHDRS ; + interp PT_INTERP ; + text PT_LOAD ; + dynamic PT_LOAD ; + data PT_LOAD ; +} + +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = KERNLOADADDR ; + .interp : { *(.interp) } :interp + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : + { + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t.*) + } + .rela.text : + { + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t.*) + } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : + { + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r.*) + } + .rela.rodata : + { + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r.*) + } + .rel.data : + { + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d.*) + } + .rela.data : + { + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d.*) + } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.sdata : + { + *(.rel.sdata) + *(.rel.sdata.*) + *(.rel.gnu.linkonce.s.*) + } + .rela.sdata : + { + *(.rela.sdata) + *(.rela.sdata.*) + *(.rela.gnu.linkonce.s.*) + } + .rel.sbss : + { + *(.rel.sbss) + *(.rel.sbss.*) + *(.rel.gnu.linkonce.sb.*) + } + .rela.sbss : + { + *(.rela.sbss) + *(.rela.sbss.*) + *(.rel.gnu.linkonce.sb.*) + } + .rel.sdata2 : + { + *(.rel.sdata2) + *(.rel.sdata2.*) + *(.rel.gnu.linkonce.s2.*) + } + .rela.sdata2 : + { + *(.rela.sdata2) + *(.rela.sdata2.*) + *(.rela.gnu.linkonce.s2.*) + } + .rel.sbss2 : + { + *(.rel.sbss2) + *(.rel.sbss2.*) + *(.rel.gnu.linkonce.sb2.*) + } + .rela.sbss2 : + { + *(.rela.sbss2) + *(.rela.sbss2.*) + *(.rela.gnu.linkonce.sb2.*) + } + .rel.bss : + { + *(.rel.bss) + *(.rel.bss.*) + *(.rel.gnu.linkonce.b.*) + } + .rela.bss : + { + *(.rela.bss) + *(.rela.bss.*) + *(.rela.gnu.linkonce.b.*) + } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : + { + KEEP (*(.init)) + } :text =0x1000000 + .text : + { + *(.trap) + *(.text) + *(.text.*) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t.*) + } =0x1000000 + .fini : + { + KEEP (*(.fini)) + } =0x1000000 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .reginfo : { *(.reginfo) } + .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } + .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } + . = ALIGN(0x2000) + (. & (0x2000 - 1)); + .data : + { + *(.data) + *(.data.*) + *(.gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } :data + .data1 : { *(.data1) } + .eh_frame : { KEEP (*(.eh_frame)) } + .gcc_except_table : { *(.gcc_except_table) } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + .plt : { *(.plt) } + _gp = ALIGN(16) + 0x7ff0; + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } :dynamic + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : + { + *(.sdata) + *(.sdata.*) + *(.gnu.linkonce.s.*) + } + _edata = .; + PROVIDE (edata = .); + __bss_start = .; + .sbss : + { + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.dynsbss) + *(.sbss) + *(.sbss.*) + *(.gnu.linkonce.sb.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + } + .bss : + { + *(.dynbss) + *(.bss) + *(.bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + . = ALIGN(64 / 8); + } + . = ALIGN(64 / 8); + _end = .; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* These must appear regardless of . */ +} Added: head/sys/mips/conf/SWARM64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/SWARM64 Wed Sep 15 05:32:10 2010 (r212634) @@ -0,0 +1,20 @@ +# +# $FreeBSD$ +# + +include SWARM_COMMON + +ident SWARM64 + +makeoptions ARCH_FLAGS="-mabi=64 -march=mips64" +makeoptions LDSCRIPT_NAME=ldscript.mips.64.cfe +makeoptions KERNLOADADDR=0xffffffff80001000 + +# +# XXX restrict memory to maximum 4GB because page table entries in pmap +# are still 32 bits wide + +# +# MAXMEM is specified in units of KB +# +options MAXMEM=0x400000 Added: head/sys/mips/conf/SWARM64_SMP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/SWARM64_SMP Wed Sep 15 05:32:10 2010 (r212634) @@ -0,0 +1,23 @@ +# +# $FreeBSD$ +# + +include SWARM_COMMON + +ident SWARM64_SMP + +options SMP +options PRINTF_BUFR_SIZE=128 + +makeoptions ARCH_FLAGS="-mabi=64 -march=mips64" +makeoptions LDSCRIPT_NAME=ldscript.mips.64.cfe +makeoptions KERNLOADADDR=0xffffffff80001000 + +# +# XXX restrict memory to maximum 4GB because page table entries in pmap +# are still 32 bits wide + +# +# MAXMEM is specified in units of KB +# +options MAXMEM=0x400000 From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 07:04:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47A0E106567A; Wed, 15 Sep 2010 07:04:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379988FC1A; Wed, 15 Sep 2010 07:04:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F74FSQ024732; Wed, 15 Sep 2010 07:04:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F74Fca024727; Wed, 15 Sep 2010 07:04:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009150704.o8F74Fca024727@svn.freebsd.org> From: Alexander Motin Date: Wed, 15 Sep 2010 07:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212635 - in head/share/man: man4 man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 07:04:15 -0000 Author: mav Date: Wed Sep 15 07:04:14 2010 New Revision: 212635 URL: http://svn.freebsd.org/changeset/base/212635 Log: Add eventtimers(7) man page, briefly describing event timers subsystem functionality and configuration options. Added: head/share/man/man7/eventtimers.7 (contents, props changed) Modified: head/share/man/man4/hpet.4 head/share/man/man7/Makefile head/share/man/man7/tuning.7 Modified: head/share/man/man4/hpet.4 ============================================================================== --- head/share/man/man4/hpet.4 Wed Sep 15 05:32:10 2010 (r212634) +++ head/share/man/man4/hpet.4 Wed Sep 15 07:04:14 2010 (r212635) @@ -95,7 +95,7 @@ group is bound to specific CPU core. Thi of these comparators has own unsharable IRQ. .Sh SEE ALSO .Xr acpi 4 , -.Xr eventtimer 4 +.Xr eventtimers 7 .Sh HISTORY The .Nm Modified: head/share/man/man7/Makefile ============================================================================== --- head/share/man/man7/Makefile Wed Sep 15 05:32:10 2010 (r212634) +++ head/share/man/man7/Makefile Wed Sep 15 07:04:14 2010 (r212635) @@ -10,6 +10,7 @@ MAN= adding_user.7 \ c99.7 \ development.7 \ environ.7 \ + eventtimers.7 \ ffs.7 \ firewall.7 \ hier.7 \ Added: head/share/man/man7/eventtimers.7 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man7/eventtimers.7 Wed Sep 15 07:04:14 2010 (r212635) @@ -0,0 +1,131 @@ +.\" Copyright (c) 2010 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 15, 2010 +.Dt eventtimers 4 +.Os +.Sh NAME +.Nm eventtimers +.Nd kernel event timers subsystem +.Sh SYNOPSIS +Kernel uses several types of time-related devices, such as: real time clocks, +time counters and event timers. +Real time clocks responsible for tracking real world time, mostly when system +is down. +Time counters are responsible for generation of monotonically increasing +timestamps for precise uptime tracking purposes, when system is running. +Event timers are responsible for generating interrupts at specified time or +periodically, to run different time-based events. +This page is about the last. +.Sh DESCRIPTION +Kernel uses time-based events for many different purposes: scheduling, +statistics, time keeping, profiling and many other things, based on +.Xr callout 9 +mechanism. +These purposes now grouped into three main callbacks: +.Bl -tag +.It hardclock() +.Xr callout 9 +and timekeeping events entry. Called with frequency defined by hz variable, +usually 1000Hz. +.It statclock() +statistics and scheduler events entry. Called with frequency about 128Hz. +.It profclock() +profiler events entry. When enabled, called with frequency about 8KHz. +.El +Different platforms provide different kinds of timer hardware. +The goal of the event timers subsystem is to provide unified way to control +that hardware, and to use it, supplying kernel with all required time-based +events. +.Pp +Each driver implementing event timers, registers them at the subsystem. +It is possible to see the list of present event timers, like this, via +.Va kern.eventtimer +sysctl: +.Bd -literal +kern.eventtimer.choice: HPET(550) LAPIC(400) i8254(100) RTC(0) +kern.eventtimer.et.LAPIC.flags: 15 +kern.eventtimer.et.LAPIC.frequency: 0 +kern.eventtimer.et.LAPIC.quality: 400 +kern.eventtimer.et.i8254.flags: 1 +kern.eventtimer.et.i8254.frequency: 1193182 +kern.eventtimer.et.i8254.quality: 100 +kern.eventtimer.et.RTC.flags: 17 +kern.eventtimer.et.RTC.frequency: 32768 +kern.eventtimer.et.RTC.quality: 0 +kern.eventtimer.et.HPET.flags: 7 +kern.eventtimer.et.HPET.frequency: 14318180 +kern.eventtimer.et.HPET.quality: 550 +.Ed +, where: +.Bl -tag +.It Va kern.eventtimer.et. Ns Ar X Ns Va .flags +bitmask, defining event timer capabilities: +.Bl -tag -compact +.It 1 +periodic mode supported, +.It 2 +one-shot mode supported, +.It 4 +timer is per-CPU, +.It 8 +timer may stop when CPU goes to sleep state, +.It 16 +timer supports only power-of-2 divisors. +.El +.It Va kern.eventtimer.et. Ns Ar X Ns Va .frequency +timer base frequency, +.It Va kern.eventtimer.et. Ns Ar X Ns Va .quality +integral value, defining how good is this timer, comparing to others. +.El +.Pp +Timers management code of the kernel chooses one timer from that list. +Current choice can be read and affected via +.Va kern.eventtimer.timer +tunable/sysctl. +Several other tunables/sysctls are affecting how exactly this timer is used: +.Bl -tag +.It Va kern.eventtimer.periodic +allows to choose periodic and one-shot operation mode. +In periodic mode, periodic interrupts from timer hardware are taken as the +only source of time for time events. +One-shot mode instead uses currently selected time counter to precisely +schedule all needed events and programs event timer to generate interrupt +exactly in specified time. +Default value depends of chosen timer capabilities, but one-shot mode is +preferred, until other is forced by user or hardware. +.It Va kern.eventtimer.singlemul +in periodic mode specifies how much times higher timer frequency should be, +to not strictly alias hardclock() and statclock() events. Default values are +1, 2 or 4, depending on configured HZ value. +.It Va kern.eventtimer.idletick +makes each CPU to receive every timer interrupt independently of whether they +busy or not. By default this options is disabled. If chosen timer is per-CPU +and runs in periodic mode, this option has no effect - all interrupts are +always generating. +.El +.Sh SEE ALSO +.Xr hpet 4 Modified: head/share/man/man7/tuning.7 ============================================================================== --- head/share/man/man7/tuning.7 Wed Sep 15 05:32:10 2010 (r212634) +++ head/share/man/man7/tuning.7 Wed Sep 15 07:04:14 2010 (r212635) @@ -1019,6 +1019,7 @@ over services you export from your box ( .Xr rc.conf 5 , .Xr sysctl.conf 5 , .Xr firewall 7 , +.Xr eventtimers 7 , .Xr hier 7 , .Xr ports 7 , .Xr boot 8 , From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 07:10:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15A631065670; Wed, 15 Sep 2010 07:10:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 049068FC13; Wed, 15 Sep 2010 07:10:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F7AdHT024889; Wed, 15 Sep 2010 07:10:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F7Ad48024884; Wed, 15 Sep 2010 07:10:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009150710.o8F7Ad48024884@svn.freebsd.org> From: Alexander Motin Date: Wed, 15 Sep 2010 07:10:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212636 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 07:10:40 -0000 Author: mav Date: Wed Sep 15 07:10:39 2010 New Revision: 212636 URL: http://svn.freebsd.org/changeset/base/212636 Log: Change licenses of my manual pages to the recommended 2-clause form. Suggested by: joel Modified: head/share/man/man4/ahci.4 head/share/man/man4/hpet.4 head/share/man/man4/mvs.4 head/share/man/man4/siis.4 Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Wed Sep 15 07:04:14 2010 (r212635) +++ head/share/man/man4/ahci.4 Wed Sep 15 07:10:39 2010 (r212636) @@ -9,19 +9,18 @@ .\" 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 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$ .\" Modified: head/share/man/man4/hpet.4 ============================================================================== --- head/share/man/man4/hpet.4 Wed Sep 15 07:04:14 2010 (r212635) +++ head/share/man/man4/hpet.4 Wed Sep 15 07:10:39 2010 (r212636) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Alexander Motin +.\" Copyright (c) 2010 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -9,19 +9,18 @@ .\" 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 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$ .\" Modified: head/share/man/man4/mvs.4 ============================================================================== --- head/share/man/man4/mvs.4 Wed Sep 15 07:04:14 2010 (r212635) +++ head/share/man/man4/mvs.4 Wed Sep 15 07:10:39 2010 (r212636) @@ -9,19 +9,18 @@ .\" 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 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$ .\" Modified: head/share/man/man4/siis.4 ============================================================================== --- head/share/man/man4/siis.4 Wed Sep 15 07:04:14 2010 (r212635) +++ head/share/man/man4/siis.4 Wed Sep 15 07:10:39 2010 (r212636) @@ -9,19 +9,18 @@ .\" 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 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$ .\" From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 07:28:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 017391065673; Wed, 15 Sep 2010 07:28:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E652E8FC13; Wed, 15 Sep 2010 07:28:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F7SV9t025285; Wed, 15 Sep 2010 07:28:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F7SV79025283; Wed, 15 Sep 2010 07:28:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009150728.o8F7SV79025283@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 15 Sep 2010 07:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212637 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 07:28:32 -0000 Author: kib Date: Wed Sep 15 07:28:31 2010 New Revision: 212637 URL: http://svn.freebsd.org/changeset/base/212637 Log: MFC r212499: Fix typo. Modified: stable/8/sys/sys/elf_common.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/elf_common.h ============================================================================== --- stable/8/sys/sys/elf_common.h Wed Sep 15 07:10:39 2010 (r212636) +++ stable/8/sys/sys/elf_common.h Wed Sep 15 07:28:31 2010 (r212637) @@ -388,7 +388,7 @@ typedef struct { #define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING and less than DT_LOOS follow the rules for the interpretation of the d_un union - as follows: even == 'd_ptr', even == 'd_val' + as follows: even == 'd_ptr', odd == 'd_val' or none */ #define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to pre-initialization functions. */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 07:30:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 456C21065673; Wed, 15 Sep 2010 07:30:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 352BE8FC24; Wed, 15 Sep 2010 07:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F7URuT025390; Wed, 15 Sep 2010 07:30:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F7URc3025388; Wed, 15 Sep 2010 07:30:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009150730.o8F7URc3025388@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 15 Sep 2010 07:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212638 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 07:30:28 -0000 Author: kib Date: Wed Sep 15 07:30:27 2010 New Revision: 212638 URL: http://svn.freebsd.org/changeset/base/212638 Log: MFC r212501: Add DF_1_LOADFLTR. Modified: stable/8/sys/sys/elf_common.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/elf_common.h ============================================================================== --- stable/8/sys/sys/elf_common.h Wed Sep 15 07:28:31 2010 (r212637) +++ stable/8/sys/sys/elf_common.h Wed Sep 15 07:30:27 2010 (r212638) @@ -471,6 +471,7 @@ typedef struct { #define DF_1_BIND_NOW 0x00000001 /* Same as DF_BIND_NOW */ #define DF_1_GLOBAL 0x00000002 /* Set the RTLD_GLOBAL for object */ #define DF_1_NODELETE 0x00000008 /* Set the RTLD_NODELETE for object */ +#define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */ #define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */ #define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 08:02:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D66A01065672; Wed, 15 Sep 2010 08:02:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 711618FC1D; Wed, 15 Sep 2010 08:02:12 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8F829cd004173 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Sep 2010 11:02:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8F829wG046134; Wed, 15 Sep 2010 11:02:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8F828xU046133; Wed, 15 Sep 2010 11:02:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 15 Sep 2010 11:02:08 +0300 From: Kostik Belousov To: David Xu Message-ID: <20100915080208.GG2465@deviant.kiev.zoral.com.ua> References: <201009150256.o8F2uXwX004579@svn.freebsd.org> <20100914231728.33ca7466@kan.dnsalias.net> <4C90ABD8.1020609@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VRy2DAmnTueP9XfJ" Content-Disposition: inline In-Reply-To: <4C90ABD8.1020609@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Alexander Kabaev Subject: Re: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 08:02:14 -0000 --VRy2DAmnTueP9XfJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 15, 2010 at 11:19:52AM +0000, David Xu wrote: > Alexander Kabaev wrote: > >On Wed, 15 Sep 2010 02:56:33 +0000 (UTC) > >David Xu wrote: > > > >>Author: davidxu > >>Date: Wed Sep 15 02:56:32 2010 > >>New Revision: 212630 > >>URL: http://svn.freebsd.org/changeset/base/212630 > >> > >>Log: > >> add code to support stack unwinding when thread exits. note that > >>only defer-mode cancellation works, asynchrnous mode does not work > >>because it lacks of libuwind's support. stack unwinding is not > >>enabled unless LIBTHR_UNWIND_STACK is defined in Makefile. > >> > >>Modified: > >> head/lib/libthr/Makefile > >> head/lib/libthr/thread/thr_clean.c > >> head/lib/libthr/thread/thr_create.c > >> head/lib/libthr/thread/thr_exit.c > >> head/lib/libthr/thread/thr_init.c > >> head/lib/libthr/thread/thr_private.h > >> > >>Modified: head/lib/libthr/Makefile > >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >>--- head/lib/libthr/Makefile Wed Sep 15 01:21:30 2010 > >>(r212629) +++ head/lib/libthr/Makefile Wed Sep 15 02:56:32 > >>2010 (r212630) @@ -25,6 +25,14 @@ > >>CFLAGS+=3D-I${.CURDIR}/../../libexec/rtld- > >>CFLAGS+=3D-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} > >>CFLAGS+=3D-I${.CURDIR}/../libthread_db CFLAGS+=3D-Winline > >>+ > >>+LIBTHR_UNWIND_STACK=3Dyes > >>+ > >>+.ifdef LIBTHR_UNWIND_STACK > >>+CFLAGS+=3D-I${.CURDIR}/../../contrib/gcc -fexceptions=20 > >>+CFLAGS+=3D-D_PTHREAD_FORCED_UNWIND > >>+.endif > >>+ > >> > > > >Reaching into bowels of GCC like that is never good. > Any solution ? ;-) >=20 I think the used interfaces are part of the C++ ABI. As such, we can expect them to be present from the runtime support, and provide our own declarations in freebsd-implemented headers. --VRy2DAmnTueP9XfJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyQfYAACgkQC3+MBN1Mb4jDzgCg8Q5xwHd6YJvZCssE1r5m3jX8 qzcAoK8B+Xdj/ApOpIFxdXqzKT4i3/BI =CmJ5 -----END PGP SIGNATURE----- --VRy2DAmnTueP9XfJ-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 08:03:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63112106566C; Wed, 15 Sep 2010 08:03:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 539B78FC27; Wed, 15 Sep 2010 08:03:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F83NYi026319; Wed, 15 Sep 2010 08:03:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F83NwB026317; Wed, 15 Sep 2010 08:03:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009150803.o8F83NwB026317@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 08:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212639 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 08:03:23 -0000 Author: avg Date: Wed Sep 15 08:03:23 2010 New Revision: 212639 URL: http://svn.freebsd.org/changeset/base/212639 Log: MFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed when resetting needfree Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Sep 15 07:30:27 2010 (r212638) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Sep 15 08:03:23 2010 (r212639) @@ -2277,12 +2277,12 @@ arc_reclaim_thread(void *dummy __unused) if (arc_eviction_list != NULL) arc_do_user_evicts(); - if (arc_reclaim_needed()) { - needfree = 0; #ifdef _KERNEL + if (needfree) { + needfree = 0; wakeup(&needfree); -#endif } +#endif /* block until needed, or one second, whichever is shorter */ CALLB_CPR_SAFE_BEGIN(&cpr); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 08:07:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C00221065670; Wed, 15 Sep 2010 08:07:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B05E28FC24; Wed, 15 Sep 2010 08:07:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F87wvY026480; Wed, 15 Sep 2010 08:07:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F87wMI026478; Wed, 15 Sep 2010 08:07:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009150807.o8F87wMI026478@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 08:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212640 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 08:07:58 -0000 Author: avg Date: Wed Sep 15 08:07:58 2010 New Revision: 212640 URL: http://svn.freebsd.org/changeset/base/212640 Log: MFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed when resetting needfree Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Sep 15 08:03:23 2010 (r212639) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Sep 15 08:07:58 2010 (r212640) @@ -1990,12 +1990,12 @@ arc_reclaim_thread(void *dummy __unused) if (arc_eviction_list != NULL) arc_do_user_evicts(); - if (arc_reclaim_needed()) { - needfree = 0; #ifdef _KERNEL + if (needfree) { + needfree = 0; wakeup(&needfree); -#endif } +#endif /* block until needed, or one second, whichever is shorter */ CALLB_CPR_SAFE_BEGIN(&cpr); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 08:18:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E79D106566C; Wed, 15 Sep 2010 08:18:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4E98FC08; Wed, 15 Sep 2010 08:18:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F8IKvW026773; Wed, 15 Sep 2010 08:18:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F8IKTB026771; Wed, 15 Sep 2010 08:18:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009150818.o8F8IKTB026771@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 08:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212641 - stable/8/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 08:18:20 -0000 Author: avg Date: Wed Sep 15 08:18:20 2010 New Revision: 212641 URL: http://svn.freebsd.org/changeset/base/212641 Log: MFC r209055: Fix a possible dereference of null pointer. Original commit by jkim. Modified: stable/8/sys/dev/acpi_support/acpi_hp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpi_support/acpi_hp.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_hp.c Wed Sep 15 08:07:58 2010 (r212640) +++ stable/8/sys/dev/acpi_support/acpi_hp.c Wed Sep 15 08:18:20 2010 (r212641) @@ -905,7 +905,7 @@ acpi_hp_get_cmi_block(device_t wmi_dev, return (-EINVAL); } obj = out.Pointer; - if (!obj && obj->Type != ACPI_TYPE_PACKAGE) { + if (!obj || obj->Type != ACPI_TYPE_PACKAGE) { acpi_hp_free_buffer(&out); return (-EINVAL); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 08:24:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99CA2106566C; Wed, 15 Sep 2010 08:24:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A3208FC0A; Wed, 15 Sep 2010 08:24:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F8OJug026963; Wed, 15 Sep 2010 08:24:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F8OJgX026957; Wed, 15 Sep 2010 08:24:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009150824.o8F8OJgX026957@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 08:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212642 - in stable/8/sys/dev: acpi_support acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 08:24:19 -0000 Author: avg Date: Wed Sep 15 08:24:19 2010 New Revision: 212642 URL: http://svn.freebsd.org/changeset/base/212642 Log: MFC r209064: Remove unused assignment. Original commit by jkim. Modified: stable/8/sys/dev/acpi_support/acpi_fujitsu.c stable/8/sys/dev/acpi_support/acpi_hp.c stable/8/sys/dev/acpi_support/acpi_ibm.c stable/8/sys/dev/acpica/acpi_dock.c stable/8/sys/dev/acpica/acpi_video.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpi_support/acpi_fujitsu.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_fujitsu.c Wed Sep 15 08:18:20 2010 (r212641) +++ stable/8/sys/dev/acpi_support/acpi_fujitsu.c Wed Sep 15 08:24:19 2010 (r212642) @@ -380,7 +380,6 @@ acpi_fujitsu_init(struct acpi_fujitsu_so OID_AUTO, "fujitsu", CTLFLAG_RD, 0, ""); for (i = 0; sysctl_table[i].name != NULL; i++) { - exists = 0; switch(sysctl_table[i].method) { case METHOD_GMOU: exists = sc->gmou.exists; @@ -566,9 +565,6 @@ static uint8_t acpi_fujitsu_check_hardware(struct acpi_fujitsu_softc *sc) { int val; - struct acpi_softc *acpi_sc; - - acpi_sc = acpi_device_get_parent_softc(sc->dev); ACPI_SERIAL_ASSERT(fujitsu); /* save the hotkey bitmask */ Modified: stable/8/sys/dev/acpi_support/acpi_hp.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_hp.c Wed Sep 15 08:18:20 2010 (r212641) +++ stable/8/sys/dev/acpi_support/acpi_hp.c Wed Sep 15 08:24:19 2010 (r212642) @@ -453,7 +453,6 @@ static int acpi_hp_attach(device_t dev) { struct acpi_hp_softc *sc; - struct acpi_softc *acpi_sc; devclass_t wmi_devclass; int arg; @@ -477,7 +476,6 @@ acpi_hp_attach(device_t dev) sc->cmi_order_size = -1; sc->verbose = 0; memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); - acpi_sc = acpi_device_get_parent_softc(dev); if (!(wmi_devclass = devclass_find ("acpi_wmi"))) { device_printf(dev, "Couldn't find acpi_wmi devclass\n"); Modified: stable/8/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_ibm.c Wed Sep 15 08:18:20 2010 (r212641) +++ stable/8/sys/dev/acpi_support/acpi_ibm.c Wed Sep 15 08:24:19 2010 (r212642) @@ -743,8 +743,6 @@ acpi_ibm_sysctl_set(struct acpi_ibm_soft return (status); if (sc->cmos_handle) { - val = val_ec & IBM_EC_MASK_VOL; - Args.Count = 1; Args.Pointer = &Arg; Arg.Type = ACPI_TYPE_INTEGER; Modified: stable/8/sys/dev/acpica/acpi_dock.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_dock.c Wed Sep 15 08:18:20 2010 (r212641) +++ stable/8/sys/dev/acpica/acpi_dock.c Wed Sep 15 08:24:19 2010 (r212642) @@ -257,12 +257,10 @@ static void acpi_dock_insert(device_t dev) { struct acpi_dock_softc *sc; - ACPI_HANDLE h; ACPI_SERIAL_ASSERT(dock); sc = device_get_softc(dev); - h = acpi_get_handle(dev); if (sc->status == ACPI_DOCK_STATUS_UNDOCKED || sc->status == ACPI_DOCK_STATUS_UNKNOWN) { @@ -414,7 +412,6 @@ acpi_dock_status_sysctl(SYSCTL_HANDLER_A device_t dev; int status, err; - err = 0; dev = (device_t)arg1; sc = device_get_softc(dev); Modified: stable/8/sys/dev/acpica/acpi_video.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_video.c Wed Sep 15 08:18:20 2010 (r212641) +++ stable/8/sys/dev/acpica/acpi_video.c Wed Sep 15 08:24:19 2010 (r212642) @@ -429,15 +429,11 @@ acpi_video_vo_init(UINT32 adr) { struct acpi_video_output *vn, *vo, *vp; int n, x; - int display_index; - int display_port; char name[8], env[32]; const char *type, *desc; struct acpi_video_output_queue *voqh; ACPI_SERIAL_ASSERT(video); - display_index = adr & DOD_DEVID_MASK_DISPIDX; - display_port = (adr & DOD_DEVID_MASK_DISPPORT) >> 4; switch (adr & DOD_DEVID_MASK) { case DOD_DEVID_MONITOR: @@ -474,7 +470,7 @@ acpi_video_vo_init(UINT32 adr) } n = 0; - vn = vp = NULL; + vp = NULL; STAILQ_FOREACH(vn, voqh, vo_unit.next) { if (vn->vo_unit.num != n) break; @@ -782,7 +778,6 @@ acpi_video_vo_presets_sysctl(SYSCTL_HAND struct acpi_video_output *vo; int i, level, *preset, err; - err = 0; vo = (struct acpi_video_output *)arg1; ACPI_SERIAL_BEGIN(video_output); if (vo->handle == NULL) { @@ -942,7 +937,6 @@ vo_get_brightness_levels(ACPI_HANDLE han ACPI_OBJECT *res; int num, i, n, *levels; - num = 0; bcl_buf.Length = ACPI_ALLOCATE_BUFFER; bcl_buf.Pointer = NULL; status = AcpiEvaluateObject(handle, "_BCL", NULL, &bcl_buf); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 09:27:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91816106564A; Wed, 15 Sep 2010 09:27:42 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id F1ADB8FC1B; Wed, 15 Sep 2010 09:27:41 +0000 (UTC) Received: by qwg5 with SMTP id 5so5485136qwg.13 for ; Wed, 15 Sep 2010 02:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7rzyHzRBaC82aRSslMGpMthqwGNGV0KeW+wBAXQu4Dw=; b=Z8IaxwUUBhMdlMdAU1Zv/qOWb/Nhxlc3r5WTNUK+t87j7EeXwCLicCdk8vZsc8vfFL ajlC1iB+RlkUP8WPBiMJDrXRcrm9lGQPSkTCPamWPb0SJZKGT6gCX5zIBAs7mfeOXEc8 X4Xt3cQAslELkv/WZfNQNqEDHH6jA3KQfrveA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=LbnNg6E0mdd4Rolb9ELHlHXD+cxurBoh7tjXNMW+xIF/Qv/xDDDy2QpXfwiMhHgdfD GoeDTQKgfSXRFsMBBq+QC2BlhUOTVqt83h5ByKhLuZfSiSMMX8oHJ5BLwInFMADc6VVp yyBNd2E4Tp8yJp3GDpB01tvavNj83qvpV2Ee8= MIME-Version: 1.0 Received: by 10.224.67.82 with SMTP id q18mr868364qai.162.1284542860606; Wed, 15 Sep 2010 02:27:40 -0700 (PDT) Received: by 10.229.19.206 with HTTP; Wed, 15 Sep 2010 02:27:40 -0700 (PDT) In-Reply-To: <201009150119.o8F1JCjW098403@svn.freebsd.org> References: <201009150119.o8F1JCjW098403@svn.freebsd.org> Date: Wed, 15 Sep 2010 13:27:40 +0400 Message-ID: From: pluknet To: Ed Maste Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212628 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 09:27:42 -0000 On 15 September 2010 05:19, Ed Maste wrote: > Author: emaste > Date: Wed Sep 15 01:19:11 2010 > New Revision: 212628 > URL: http://svn.freebsd.org/changeset/base/212628 > > Log: > =A0Add some enums and constants from Adaptec's latest driver > =A0(build 17911). > > Modified: > =A0head/sys/dev/aac/aacreg.h > > Modified: head/sys/dev/aac/aacreg.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/aac/aacreg.h =A0 Wed Sep 15 00:17:52 2010 =A0 =A0 =A0 = =A0(r212627) > +++ head/sys/dev/aac/aacreg.h =A0 Wed Sep 15 01:19:11 2010 =A0 =A0 =A0 = =A0(r212628) > @@ -306,7 +306,9 @@ struct aac_adapter_init { > =A0 =A0 =A0 =A0u_int32_t =A0 =A0 =A0 HostElapsedSeconds; > =A0 =A0 =A0 =A0/* ADAPTER_INIT_STRUCT_REVISION_4 begins here */ > =A0 =A0 =A0 =A0u_int32_t =A0 =A0 =A0 InitFlags; =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0/* flags for supported features */ > -#define AAC_INITFLAGS_NEW_COMM_SUPPORTED =A0 =A0 =A0 1 > +#define =A0 =A0 =A0 =A0AAC_INITFLAGS_NEW_COMM_SUPPORTED =A0 =A0 =A0 =A01 > +#define =A0 =A0 =A0 =A0AAC_INITFLAGS_DRIVER_USES_UTC_TIME =A0 =A0 =A00x1= 0 > +#define =A0 =A0 =A0 =A0AAC_INITFLAGS_DRIVER_SUPPORTS_PM =A0 =A0 =A0 =A00= x20 > =A0 =A0 =A0 =A0u_int32_t =A0 =A0 =A0 MaxIoCommands; =A0 =A0 =A0 =A0 =A0/*= max outstanding commands */ > =A0 =A0 =A0 =A0u_int32_t =A0 =A0 =A0 MaxIoSize; =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0/* largest I/O command */ > =A0 =A0 =A0 =A0u_int32_t =A0 =A0 =A0 MaxFibSize; =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* largest FIB to adapter */ > @@ -885,6 +887,17 @@ typedef enum { > =A0 =A0 =A0 =A0AifEnBatteryNeedsRecond, =A0 =A0 =A0 =A0/* The battery nee= ds reconditioning */ > =A0 =A0 =A0 =A0AifEnClusterEvent, =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Some clus= ter event */ > =A0 =A0 =A0 =A0AifEnDiskSetEvent, =A0 =A0 =A0 =A0 =A0 =A0 =A0/* A disk se= t event occured. */ > + =A0 =A0 =A0 AifEnContainerScsiEvent, =A0 =A0 =A0 =A0/* a container even= t with no. and scsi id */ > + =A0 =A0 =A0 AifEnPicBatteryEvent, =A0 /* An event gen. by pic_battery.c= for an ABM */ > + =A0 =A0 =A0 AifEnExpEvent, =A0 =A0 =A0 =A0 =A0/* Exp. Event Type to rep= lace CTPopUp messages */ > + =A0 =A0 =A0 AifEnRAID6RebuildDone, =A0/* RAID6 rebuild finished */ > + =A0 =A0 =A0 AifEnSensorOverHeat, =A0 =A0/* Heat Sensor indicate overhea= t */ > + =A0 =A0 =A0 AifEnSensorCoolDown, =A0 =A0/* Heat Sensor ind. cooled down= after overheat */ > + =A0 =A0 =A0 AifFeatureKeysModified, /* notif. of updated feature keys *= / > + =A0 =A0 =A0 AifApplicationExpirationEvent, =A0/* notif. on app. expirat= ion status */ > + =A0 =A0 =A0 AifEnBackgroundConsistencyCheck,/* BCC notif. for NEC - DDT= S 94700 */ > + =A0 =A0 =A0 AifEnAddJBOD, =A0 =A0 =A0 =A0 =A0 /* A new JBOD type drive = was created (30) */ > + =A0 =A0 =A0 AifEnDeleteJBOD, =A0 =A0 =A0 =A0/* A JBOD type drive was de= leted (31) */ > =A0 =A0 =A0 =A0AifDriverNotifyStart=3D199, =A0 =A0 =A0 /* Notifies for ho= st driver go here */ > =A0 =A0 =A0 =A0/* Host driver notifications start here */ > =A0 =A0 =A0 =A0AifDenMorphComplete, =A0 =A0 =A0 =A0 =A0 =A0/* A morph ope= ration completed */ Hi. Afaik, these are somewhere from between b15753 and b16119. Just for possible clarification. --- 6_b15753/aacreg.h 2010-05-28 12:51:21.000000000 +0400 +++ 6_b16119/aacreg.h 2010-05-28 12:51:22.000000000 +0400 @@ -306,7 +306,9 @@ u_int32_t HostElapsedSeconds; /* ADAPTER_INIT_STRUCT_REVISION_4 begins here */ u_int32_t InitFlags; /* flags for supported features */ -#define INITFLAGS_NEW_COMM_SUPPORTED 1 +#define AAC_INITFLAGS_NEW_COMM_SUPPORTED 1 +#define AAC_INITFLAGS_DRIVER_USES_UTC_TIME 0x10 +#define AAC_INITFLAGS_DRIVER_SUPPORTS_PM 0x20 u_int32_t MaxIoCommands; /* max outstanding commands= */ u_int32_t MaxIoSize; /* largest I/O command */ u_int32_t MaxFibSize; /* largest FIB to adapter */ [...] --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 09:38:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E483A106564A; Wed, 15 Sep 2010 09:38:01 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D53048FC16; Wed, 15 Sep 2010 09:38:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F9c1jE028546; Wed, 15 Sep 2010 09:38:01 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F9c1Ej028544; Wed, 15 Sep 2010 09:38:01 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201009150938.o8F9c1Ej028544@svn.freebsd.org> From: Andre Oppermann Date: Wed, 15 Sep 2010 09:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212644 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 09:38:02 -0000 Author: andre Date: Wed Sep 15 09:38:01 2010 New Revision: 212644 URL: http://svn.freebsd.org/changeset/base/212644 Log: MFC r211874: Use timestamp modulo comparison macro for automatic receive buffer scaling to correctly handle wrapping of ticks value. Modified: stable/8/sys/netinet/tcp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Wed Sep 15 08:44:57 2010 (r212643) +++ stable/8/sys/netinet/tcp_input.c Wed Sep 15 09:38:01 2010 (r212644) @@ -1441,7 +1441,7 @@ tcp_do_segment(struct mbuf *m, struct tc if (V_tcp_do_autorcvbuf && to.to_tsecr && (so->so_rcv.sb_flags & SB_AUTOSIZE)) { - if (to.to_tsecr > tp->rfbuf_ts && + if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && to.to_tsecr - tp->rfbuf_ts < hz) { if (tp->rfbuf_cnt > (so->so_rcv.sb_hiwat / 8 * 7) && From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 09:38:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78BFF106564A; Wed, 15 Sep 2010 09:38:43 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 696BE8FC1C; Wed, 15 Sep 2010 09:38:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8F9chC1028597; Wed, 15 Sep 2010 09:38:43 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8F9chqF028595; Wed, 15 Sep 2010 09:38:43 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201009150938.o8F9chqF028595@svn.freebsd.org> From: Andre Oppermann Date: Wed, 15 Sep 2010 09:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212645 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 09:38:43 -0000 Author: andre Date: Wed Sep 15 09:38:42 2010 New Revision: 212645 URL: http://svn.freebsd.org/changeset/base/212645 Log: MFC r211874: Use timestamp modulo comparison macro for automatic receive buffer scaling to correctly handle wrapping of ticks value. Modified: stable/7/sys/netinet/tcp_input.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Wed Sep 15 09:38:01 2010 (r212644) +++ stable/7/sys/netinet/tcp_input.c Wed Sep 15 09:38:42 2010 (r212645) @@ -1179,7 +1179,7 @@ tcp_do_segment(struct mbuf *m, struct tc if (tcp_do_autorcvbuf && to.to_tsecr && (so->so_rcv.sb_flags & SB_AUTOSIZE)) { - if (to.to_tsecr > tp->rfbuf_ts && + if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && to.to_tsecr - tp->rfbuf_ts < hz) { if (tp->rfbuf_cnt > (so->so_rcv.sb_hiwat / 8 * 7) && From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 09:40:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id D3EAD1065679; Wed, 15 Sep 2010 09:40:33 +0000 (UTC) Date: Wed, 15 Sep 2010 09:40:33 +0000 From: Alexander Best To: Alexander Motin Message-ID: <20100915094033.GA95795@freebsd.org> References: <201009150704.o8F74Fca024727@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009150704.o8F74Fca024727@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212635 - in head/share/man: man4 man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 09:40:33 -0000 thanks. :) -- a13x From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:02:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9165B1065695; Wed, 15 Sep 2010 10:02:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82A728FC18; Wed, 15 Sep 2010 10:02:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FA2kXD029239; Wed, 15 Sep 2010 10:02:46 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FA2kvO029237; Wed, 15 Sep 2010 10:02:46 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009151002.o8FA2kvO029237@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 10:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212647 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:02:46 -0000 Author: avg Date: Wed Sep 15 10:02:46 2010 New Revision: 212647 URL: http://svn.freebsd.org/changeset/base/212647 Log: sys/pcpu.h: remove a workaround for a fixed ld bug The workaround was incorrectly documented as having something to do with set_pcpu section's progbits, but in fact it was for incorrect placement of __start_set_pcpu because of the bug in ld. The bug was fixed in r210245, see commit message for details. A side-effect of the workaround was that a zero-size set_pcpu section was produced for modules, source code of which included pcpu.h but didn't actually define any dynamic per-cpu variables. This commit should remove the side-effect. The same workaround is present sys/net/vnet.h, has an analogous side-effect and can be removed as well. An UPDATING entry that warns about a need for recent ld is following. MFC after: 1 month Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Wed Sep 15 09:48:18 2010 (r212646) +++ head/sys/sys/pcpu.h Wed Sep 15 10:02:46 2010 (r212647) @@ -44,24 +44,10 @@ /* * Define a set for pcpu data. - * - * We don't use SET_DECLARE because it defines the set as 'a' when we - * want 'aw'. gcc considers uninitialized data in a separate section - * writable, and there is no generic zero initializer that works for - * structs and scalars. */ extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; -__asm__( -#ifdef __arm__ - ".section set_pcpu, \"aw\", %progbits\n" -#else - ".section set_pcpu, \"aw\", @progbits\n" -#endif - "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" - "\t.previous"); - /* * Array of dynamic pcpu base offsets. Indexed by id. */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:04:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96ABC106566C; Wed, 15 Sep 2010 10:04:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 884818FC13; Wed, 15 Sep 2010 10:04:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FA4fUA029309; Wed, 15 Sep 2010 10:04:41 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FA4flm029307; Wed, 15 Sep 2010 10:04:41 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009151004.o8FA4flm029307@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 10:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212648 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:04:41 -0000 Author: avg Date: Wed Sep 15 10:04:41 2010 New Revision: 212648 URL: http://svn.freebsd.org/changeset/base/212648 Log: UPDATING entry for r212647 Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Sep 15 10:02:46 2010 (r212647) +++ head/UPDATING Wed Sep 15 10:04:41 2010 (r212648) @@ -22,6 +22,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100915: + A workaround for a fixed ld bug has been removed in kernel code, + so make sure that your system ld is built from sources after + revision 210245 (r211583 if building head kernel on stable/8, + r211584 for stable/7). A symptom of incorrect ld version is + different addresses for set_pcpu section and __start_set_pcpu + symbol in kernel and/or modules. + 20100913: The $ipv6_prefer variable in rc.conf(5) has been split into $ip6addrctl_policy and $ipv6_activate_all_interfaces. From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:18:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD8FD1065670; Wed, 15 Sep 2010 10:18:18 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDC268FC14; Wed, 15 Sep 2010 10:18:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FAIIIX029776; Wed, 15 Sep 2010 10:18:18 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FAIIjO029773; Wed, 15 Sep 2010 10:18:18 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009151018.o8FAIIjO029773@svn.freebsd.org> From: Rui Paulo Date: Wed, 15 Sep 2010 10:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212649 - head/cddl/usr.sbin/plockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:18:19 -0000 Author: rpaulo Date: Wed Sep 15 10:18:18 2010 New Revision: 212649 URL: http://svn.freebsd.org/changeset/base/212649 Log: Add a man page for plockstat. Sponsored by: The FreeBSD Foundation Added: head/cddl/usr.sbin/plockstat/plockstat.1 (contents, props changed) Modified: head/cddl/usr.sbin/plockstat/Makefile Modified: head/cddl/usr.sbin/plockstat/Makefile ============================================================================== --- head/cddl/usr.sbin/plockstat/Makefile Wed Sep 15 10:04:41 2010 (r212648) +++ head/cddl/usr.sbin/plockstat/Makefile Wed Sep 15 10:18:18 2010 (r212649) @@ -3,7 +3,6 @@ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/plockstat PROG= plockstat -NO_MAN= SRCS= plockstat.c BINDIR?= /usr/sbin Added: head/cddl/usr.sbin/plockstat/plockstat.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/plockstat/plockstat.1 Wed Sep 15 10:18:18 2010 (r212649) @@ -0,0 +1,95 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Rui Paulo under sponsorship from the +.\" FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 13, 2010 +.Dt PLOCKSTAT 1 +.Os +.Sh NAME +.Nm plockstat +.Nd Trace pthread lock statistics using DTrace +.Sh SYNOPSIS +.Nm +.Op Fl vACHV +.Op Fl n Ar count +.Op Fl s Ar depth +.Op Fl e Ar secs +.Op Fl x Ar opt Ns = Ns Ar val +.Ar command +.Op arg... +.Nm +.Op Fl vACHV +.Op Fl n Ar count +.Op Fl s Ar depth +.Op Fl e Ar secs +.Op Fl x Ar opt Ns = Ns Ar val +.Fl p Ar pid +.Sh DESCRIPTION +The +.Nm +utility traces pthread locks (mutexes and rwlocks) and prints statistics about +them. +You can use +.Nm +to investigate bottlenecks in your software. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl v +Be verbose. +.It Fl A +Print all statistics. +.It Fl C +Print commulative statistics (the default). +.It Fl H +Print an histogram. +.It Fl V +Print the DTrace script about to be used to stderr. +.It Fl n Ar count +Set the aggregation count for the data set. +.It Fl s Ar depth +Set the ustack (userland stack) caller depth. +.It Fl e Ar secs +Does nothing at the moment. +.It Fl x Ar opt Ns = Ns Ar val +Specify DTrace options. +See the +.Xr dtrace 1 +man page for more details. +.El +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +.Xr dtrace 1 , +.Xr pthread 3 +.Sh HISTORY +The +.Nm +utility comes from the OpenSolaris and was first imported into +.Fx 9.0 . From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:31:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 052EA10656AA; Wed, 15 Sep 2010 10:31:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9C548FC2A; Wed, 15 Sep 2010 10:31:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FAVR9c030121; Wed, 15 Sep 2010 10:31:27 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FAVRGa030118; Wed, 15 Sep 2010 10:31:27 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009151031.o8FAVRGa030118@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 10:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212650 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:31:28 -0000 Author: avg Date: Wed Sep 15 10:31:27 2010 New Revision: 212650 URL: http://svn.freebsd.org/changeset/base/212650 Log: tmpfs, zfs + sendfile: mark page bits as valid after populating it with data Otherwise, adding insult to injury, in addition to double-caching of data we would always copy the data into a vnode's vm object page from backend. This is specific to sendfile case only (VOP_READ with UIO_NOCOPY). PR: kern/141305 Reported by: Wiktor Niesiobedzki Reviewed by: alc Tested by: tools/regression/sockets/sendfile MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:18:18 2010 (r212649) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:31:27 2010 (r212650) @@ -498,6 +498,8 @@ again: sched_unpin(); } VM_OBJECT_LOCK(obj); + if (error == 0) + vm_page_set_valid(m, off, bytes); vm_page_wakeup(m); if (error == 0) uio->uio_resid -= bytes; Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed Sep 15 10:18:18 2010 (r212649) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed Sep 15 10:31:27 2010 (r212650) @@ -562,6 +562,8 @@ lookupvpg: sf_buf_free(sf); sched_unpin(); VM_OBJECT_LOCK(vobj); + if (error == 0) + vm_page_set_valid(m, offset, tlen); vm_page_wakeup(m); VM_OBJECT_UNLOCK(vobj); return (error); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:32:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C44A8106564A; Wed, 15 Sep 2010 10:32:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B583D8FC15; Wed, 15 Sep 2010 10:32:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FAWW7N030176; Wed, 15 Sep 2010 10:32:32 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FAWWVf030174; Wed, 15 Sep 2010 10:32:32 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009151032.o8FAWWVf030174@svn.freebsd.org> From: Rui Paulo Date: Wed, 15 Sep 2010 10:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212651 - head/libexec/tftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:32:32 -0000 Author: rpaulo Date: Wed Sep 15 10:32:32 2010 New Revision: 212651 URL: http://svn.freebsd.org/changeset/base/212651 Log: Remove an explicit assignment of the CFLAGS variable intended for debugging purposes only. Modified: head/libexec/tftpd/Makefile Modified: head/libexec/tftpd/Makefile ============================================================================== --- head/libexec/tftpd/Makefile Wed Sep 15 10:31:27 2010 (r212650) +++ head/libexec/tftpd/Makefile Wed Sep 15 10:32:32 2010 (r212651) @@ -6,7 +6,6 @@ SRCS= tftpd.c tftp-io.c tftp-utils.c tft WARNS= 3 WFORMAT=0 MAN= tftpd.8 -CFLAGS=-g -Wall CFLAGS+=-I${.CURDIR}/../../usr.bin/tftp -I${.CURDIR}/../../libexec/tftpd .PATH: ${.CURDIR}/../../usr.bin/tftp COPTFLAGS = -O From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:39:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F5C01065670; Wed, 15 Sep 2010 10:39:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3568D8FC08; Wed, 15 Sep 2010 10:39:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FAdMsB030377; Wed, 15 Sep 2010 10:39:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FAdMp4030375; Wed, 15 Sep 2010 10:39:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009151039.o8FAdMp4030375@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 10:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212652 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:39:22 -0000 Author: avg Date: Wed Sep 15 10:39:21 2010 New Revision: 212652 URL: http://svn.freebsd.org/changeset/base/212652 Log: zfs: catch up with vm_page_sleep_if_busy changes Reviewed by: alc Approved by: pjd Tested by: tools/regression/fsx MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:32:32 2010 (r212651) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:39:21 2010 (r212652) @@ -323,8 +323,17 @@ page_lookup(vnode_t *vp, int64_t start, for (;;) { if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && vm_page_is_valid(pp, (vm_offset_t)off, nbytes)) { - if (vm_page_sleep_if_busy(pp, FALSE, "zfsmwb")) + if ((pp->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(pp, PG_REFERENCED); + vm_page_sleep(pp, "zfsmwb"); continue; + } vm_page_busy(pp); vm_page_undirty(pp); } else { @@ -451,8 +460,18 @@ mappedread(vnode_t *vp, int nbytes, uio_ again: if ((m = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && vm_page_is_valid(m, (vm_offset_t)off, bytes)) { - if (vm_page_sleep_if_busy(m, FALSE, "zfsmrb")) + if ((m->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(m, PG_REFERENCED); + vm_page_sleep(m, "zfsmrb"); goto again; + } + vm_page_busy(m); VM_OBJECT_UNLOCK(obj); if (dirbytes > 0) { @@ -478,8 +497,17 @@ again: * but it pessimize performance of sendfile/UFS, that's * why I handle this special case in ZFS code. */ - if (vm_page_sleep_if_busy(m, FALSE, "zfsmrb")) + if ((m->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(m, PG_REFERENCED); + vm_page_sleep(m, "zfsmrb"); goto again; + } vm_page_busy(m); VM_OBJECT_UNLOCK(obj); if (dirbytes > 0) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:39:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69C32106564A; Wed, 15 Sep 2010 10:39:30 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5228FC13; Wed, 15 Sep 2010 10:39:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FAdUWV030418; Wed, 15 Sep 2010 10:39:30 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FAdU4H030416; Wed, 15 Sep 2010 10:39:30 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201009151039.o8FAdU4H030416@svn.freebsd.org> From: Andre Oppermann Date: Wed, 15 Sep 2010 10:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212653 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:39:30 -0000 Author: andre Date: Wed Sep 15 10:39:30 2010 New Revision: 212653 URL: http://svn.freebsd.org/changeset/base/212653 Log: Change the default MSS for IPv4 and IPv6 TCP connections from an artificial power-of-2 rounded number to their real values specified in RFC879 and RFC2460. From the history and existing comments it appears that the rounded numbers were intended to be advantageous for the kernel and mbuf system. However this hasn't been the case at for at least a long time. The mbuf clusters used in tcp_output() have enough space to hold the larger real value for the default MSS for both IPv4 and IPv6. Note that the default MSS is only used when path MTU discovery is disabled. Update and expand related comments. Reviewed by: lsteward (including some word-smithing) MFC after: 2 weeks Modified: head/sys/netinet/tcp.h Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Wed Sep 15 10:39:21 2010 (r212652) +++ head/sys/netinet/tcp.h Wed Sep 15 10:39:30 2010 (r212653) @@ -103,29 +103,37 @@ struct tcphdr { /* - * Default maximum segment size for TCP. - * With an IP MTU of 576, this is 536, - * but 512 is probably more convenient. - * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). - */ -#define TCP_MSS 512 -/* - * TCP_MINMSS is defined to be 216 which is fine for the smallest - * link MTU (256 bytes, AX.25 packet radio) in the Internet. - * However it is very unlikely to come across such low MTU interfaces - * these days (anno dato 2003). - * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. - * Setting this to "0" disables the minmss check. + * The default maximum segment size (MSS) to be used for new TCP connections + * when path MTU discovery is not enabled. + * + * RFC879 derives the default MSS from the largest datagram size hosts are + * minimally required to handle directly or through IP reassembly minus the + * size of the IP and TCP header. With IPv6 the minimum MTU is specified + * in RFC2460. + * + * For IPv4 the MSS is 576 - sizeof(struct tcpiphdr) + * For IPv6 the MSS is IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct tcphdr) + * + * We use explicit numerical definition here to avoid header pollution. */ -#define TCP_MINMSS 216 +#define TCP_MSS 536 +#define TCP6_MSS 1220 /* - * Default maximum segment size for TCP6. - * With an IP6 MSS of 1280, this is 1220, - * but 1024 is probably more convenient. (xxx kazu in doubt) - * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr)) + * Limit the lowest MSS we accept from path MTU discovery and the TCP SYN MSS + * option. Allowing too low values of MSS can consume significant amounts of + * resources and be used as a form of a resource exhaustion attack. + * Connections requesting lower MSS values will be rounded up to this value + * and the IP_DF flag is cleared to allow fragmentation along the path. + * + * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. Setting + * it to "0" disables the minmss check. + * + * The default value is fine for the smallest official link MTU (256 bytes, + * AX.25 packet radio) in the Internet. However it is very unlikely to come + * across such low MTU interfaces these days (anno domini 2003). */ -#define TCP6_MSS 1024 +#define TCP_MINMSS 216 #define TCP_MAXWIN 65535 /* largest value for (unscaled) window */ #define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:44:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A6621065670; Wed, 15 Sep 2010 10:44:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF2A8FC0A; Wed, 15 Sep 2010 10:44:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FAiKjn030574; Wed, 15 Sep 2010 10:44:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FAiKeF030572; Wed, 15 Sep 2010 10:44:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009151044.o8FAiKeF030572@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 10:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212654 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:44:20 -0000 Author: avg Date: Wed Sep 15 10:44:20 2010 New Revision: 212654 URL: http://svn.freebsd.org/changeset/base/212654 Log: zfs mappedread: use uiomove_fromphys where possible Reviewed by: alc Approved by: pjd Tested by: tools/regression/fsx MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:39:30 2010 (r212653) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:44:20 2010 (r212654) @@ -479,14 +479,8 @@ again: dirbytes); dirbytes = 0; } - if (error == 0) { - sched_pin(); - sf = sf_buf_alloc(m, SFB_CPUPRIVATE); - va = (caddr_t)sf_buf_kva(sf); - error = uiomove(va + off, bytes, UIO_READ, uio); - sf_buf_free(sf); - sched_unpin(); - } + if (error == 0) + uiomove_fromphys(&m, off, bytes, uio); VM_OBJECT_LOCK(obj); vm_page_wakeup(m); } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 10:48:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06A5A1065670; Wed, 15 Sep 2010 10:48:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0DDF8FC1A; Wed, 15 Sep 2010 10:48:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FAmGUw030737; Wed, 15 Sep 2010 10:48:16 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FAmG14030735; Wed, 15 Sep 2010 10:48:16 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009151048.o8FAmG14030735@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 10:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212655 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:48:17 -0000 Author: avg Date: Wed Sep 15 10:48:16 2010 New Revision: 212655 URL: http://svn.freebsd.org/changeset/base/212655 Log: zfs mappedread, update_pages: use int for offset and length within a page uint64_t, int64_t were redundant there Approved by: pjd Tested by: tools/regression/fsx MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:44:20 2010 (r212654) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 10:48:16 2010 (r212655) @@ -387,7 +387,7 @@ update_pages(vnode_t *vp, int64_t start, { vm_object_t obj; struct sf_buf *sf; - int64_t off; + int off; ASSERT(vp->v_mount != NULL); obj = vp->v_object; @@ -397,7 +397,7 @@ update_pages(vnode_t *vp, int64_t start, VM_OBJECT_LOCK(obj); for (start &= PAGEMASK; len > 0; start += PAGESIZE) { vm_page_t pp; - uint64_t nbytes = MIN(PAGESIZE - off, len); + int nbytes = MIN(PAGESIZE - off, len); if ((pp = page_lookup(vp, start, off, nbytes)) != NULL) { caddr_t va; @@ -440,9 +440,10 @@ mappedread(vnode_t *vp, int nbytes, uio_ vm_object_t obj; vm_page_t m; struct sf_buf *sf; - int64_t start, off; + int64_t start; caddr_t va; int len = nbytes; + int off; int error = 0; uint64_t dirbytes; @@ -455,11 +456,11 @@ mappedread(vnode_t *vp, int nbytes, uio_ dirbytes = 0; VM_OBJECT_LOCK(obj); for (start &= PAGEMASK; len > 0; start += PAGESIZE) { - uint64_t bytes = MIN(PAGESIZE - off, len); + int bytes = MIN(PAGESIZE - off, len); again: if ((m = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && - vm_page_is_valid(m, (vm_offset_t)off, bytes)) { + vm_page_is_valid(m, off, bytes)) { if ((m->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 11:04:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50969106566C; Wed, 15 Sep 2010 11:04:03 +0000 (UTC) (envelope-from sanpei@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 407CB8FC19; Wed, 15 Sep 2010 11:04:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FB43RW034414; Wed, 15 Sep 2010 11:04:03 GMT (envelope-from sanpei@svn.freebsd.org) Received: (from sanpei@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FB43vR034412; Wed, 15 Sep 2010 11:04:03 GMT (envelope-from sanpei@svn.freebsd.org) Message-Id: <201009151104.o8FB43vR034412@svn.freebsd.org> From: MIHIRA Sanpei Yoshiro Date: Wed, 15 Sep 2010 11:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212656 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 11:04:03 -0000 Author: sanpei Date: Wed Sep 15 11:04:02 2010 New Revision: 212656 URL: http://svn.freebsd.org/changeset/base/212656 Log: MFC r212317 & r212412 Add Buffalo (Melco Inc.) LUA3-U2-ATX Add Planex UE-200TX-G Modified: stable/8/share/man/man4/axe.4 Modified: stable/8/share/man/man4/axe.4 ============================================================================== --- stable/8/share/man/man4/axe.4 Wed Sep 15 10:48:16 2010 (r212655) +++ stable/8/share/man/man4/axe.4 Wed Sep 15 11:04:02 2010 (r212656) @@ -177,9 +177,13 @@ Sitecom Europe LN-028 AX88772: .Bl -bullet -compact .It +Buffalo (Melco Inc.) LUA3-U2-ATX +.It Cisco-Linksys USB200Mv2 .It D-Link DUBE100B1 +.It +Planex UE-200TX-G .El .Sh DIAGNOSTICS .Bl -diag From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 11:05:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74C7610656A3; Wed, 15 Sep 2010 11:05:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1A48FC16; Wed, 15 Sep 2010 11:05:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FB5gCI034488; Wed, 15 Sep 2010 11:05:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FB5ggc034485; Wed, 15 Sep 2010 11:05:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009151105.o8FB5ggc034485@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Sep 2010 11:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212657 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 11:05:42 -0000 Author: avg Date: Wed Sep 15 11:05:41 2010 New Revision: 212657 URL: http://svn.freebsd.org/changeset/base/212657 Log: zfs vn_has_cached_data: take into account v_object->cache != NULL This mirrors code in tmpfs. This changge shouldn't affect much read path, it may cause unnecessary vm_page_lookup calls in the case where v_object has no active or inactive pages but has some cache pages. I believe this situation to be non-essential. In write path this change should allow us to properly detect the above case and free a cache page when we write to a range that corresponds to it. If this situation is undetected then we could have a discrepancy between data in page cache and in ARC or on disk. This change allows us to re-enable vn_has_cached_data() check in zfs_write. NOTE: strictly speaking resident_page_count and cache fields of v_object should be exmined under VM_OBJECT_LOCK, but for this particular usage we may get away with it. Discussed with: alc, kib Approved by: pjd Tested with: tools/regression/fsx MFC after: 3 weeks Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/vnode.h Wed Sep 15 11:04:02 2010 (r212656) +++ head/sys/cddl/compat/opensolaris/sys/vnode.h Wed Sep 15 11:05:41 2010 (r212657) @@ -69,7 +69,9 @@ vn_is_readonly(vnode_t *vp) #define vn_vfsunlock(vp) do { } while (0) #define vn_ismntpt(vp) ((vp)->v_type == VDIR && (vp)->v_mountedhere != NULL) #define vn_mountedvfs(vp) ((vp)->v_mountedhere) -#define vn_has_cached_data(vp) ((vp)->v_object != NULL && (vp)->v_object->resident_page_count > 0) +#define vn_has_cached_data(vp) \ + ((vp)->v_object != NULL && ((vp)->v_object->resident_page_count > 0 \ + || (vp)->v_object->cache != NULL)) #define vn_exists(vp) do { } while (0) #define vn_invalid(vp) do { } while (0) #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 11:04:02 2010 (r212656) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 11:05:41 2010 (r212657) @@ -933,17 +933,7 @@ again: uioskip(uio, tx_bytes); } - /* - * XXXPJD: There are some cases (triggered by fsx) where - * vn_has_cached_data(vp) returns false when it should - * return true. This should be investigated. - */ -#if 0 - if (tx_bytes && vn_has_cached_data(vp)) -#else - if (tx_bytes && vp->v_object != NULL) -#endif - { + if (tx_bytes && vn_has_cached_data(vp)) { update_pages(vp, woff, tx_bytes, zfsvfs->z_os, zp->z_id, uio->uio_segflg, tx); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 11:51:09 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 511511065679; Wed, 15 Sep 2010 11:51:09 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 11CA58FC17; Wed, 15 Sep 2010 11:51:08 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id F0D057E853; Wed, 15 Sep 2010 21:51:06 +1000 (EST) Message-ID: <4C90B326.4000208@freebsd.org> Date: Wed, 15 Sep 2010 21:51:02 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20100913 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: Andre Oppermann References: <201009151039.o8FAdU4H030416@svn.freebsd.org> In-Reply-To: <201009151039.o8FAdU4H030416@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212653 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 11:51:09 -0000 On 09/15/10 20:39, Andre Oppermann wrote: > Author: andre > Date: Wed Sep 15 10:39:30 2010 > New Revision: 212653 > URL: http://svn.freebsd.org/changeset/base/212653 > > Log: > Change the default MSS for IPv4 and IPv6 TCP connections from an > artificial power-of-2 rounded number to their real values specified > in RFC879 and RFC2460. > > From the history and existing comments it appears that the rounded > numbers were intended to be advantageous for the kernel and mbuf > system. However this hasn't been the case at for at least a long > time. The mbuf clusters used in tcp_output() have enough space > to hold the larger real value for the default MSS for both IPv4 and > IPv6. Note that the default MSS is only used when path MTU discovery > is disabled. > > Update and expand related comments. > > Reviewed by: lsteward (including some word-smithing) For the record, I reviewed and fully support the functional changes made by this patch, but explicitly objected to and offered an alternate for the proposed comment wording changes. Andre, given that we had a disagreement about the comment wording, I would have preferred it if you had noted in your commit log that I had raised an objection to or at least not reviewed/endorsed the comment changes. It's not important enough an issue to spend any more time on, but I'm a bit upset to see this committed with an acknowledgement to my review and word-smithing, much of which ended up being ignored (which is fine, but then don't put my name to it). Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 12:39:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4006B106566C; Wed, 15 Sep 2010 12:39:39 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 939ED8FC0A; Wed, 15 Sep 2010 12:39:38 +0000 (UTC) Received: by vws7 with SMTP id 7so129952vws.13 for ; Wed, 15 Sep 2010 05:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=4O1R51M1n6937lEcenaVMr0tUp3zOhvAQma/LAm4wFA=; b=b5x3xm5R7gmSG55+kvKVNTUe4veoFOlU/FDkfqzZB9oBx6n7rBhL6iz7Dwck6KbDpV HggNw5vTtUWnVrtDxSvRQ1MyfPW4c89nQs3SO5d8MvDGebTvB+g6lqrfRL0bf7oYVXKn dEP52Ob5L4F4hh/+yLkn00+L8xGRNf7ML2Ns0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=RXGDt9vdvXg4LTi4cHaR4qg676Yz9RNL2XgBxzcukv8Ks8OIqy8ysAoHchJRZYxAUH YDFVBRBlqFNarsqOZoePjoaZnbbnO7Z+444QbjJsbVaAw6hNbKxd4U89OaxxsWGrKS/x vwAGAf+Yp/v1xyeWVqt/hfRmFhOr/UqsIi/uc= Received: by 10.220.63.11 with SMTP id z11mr856773vch.37.1284554377670; Wed, 15 Sep 2010 05:39:37 -0700 (PDT) Received: from kan.dnsalias.net (c-24-63-226-98.hsd1.ma.comcast.net [24.63.226.98]) by mx.google.com with ESMTPS id n9sm682650vch.43.2010.09.15.05.39.36 (version=SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 05:39:36 -0700 (PDT) Date: Wed, 15 Sep 2010 08:39:23 -0400 From: Alexander Kabaev To: David Xu Message-ID: <20100915083923.0121b163@kan.dnsalias.net> In-Reply-To: <4C90ABD8.1020609@freebsd.org> References: <201009150256.o8F2uXwX004579@svn.freebsd.org> <20100914231728.33ca7466@kan.dnsalias.net> <4C90ABD8.1020609@freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/umHNZMPnAPJZC0+oz4OPPNG"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 12:39:39 -0000 --Sig_/umHNZMPnAPJZC0+oz4OPPNG Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 15 Sep 2010 11:19:52 +0000 David Xu wrote: > >=20 > > Reaching into bowels of GCC like that is never good. > Any solution ? ;-) >=20 I agree with Konstantin, we should either import appropriately licensed header from libunwind or, better yet, just provide our own. --=20 Alexander Kabaev --Sig_/umHNZMPnAPJZC0+oz4OPPNG Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iD8DBQFMkL6HQ6z1jMm+XZYRAslBAKCcTnwXYsXHbtvqJHZbLSYXIR1y2wCePTYk eaVzPmZ+IaZ67CZTSv6YcGc= =SvU5 -----END PGP SIGNATURE----- --Sig_/umHNZMPnAPJZC0+oz4OPPNG-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 13:43:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 010F8106566C; Wed, 15 Sep 2010 13:43:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3CF38FC0C; Wed, 15 Sep 2010 13:43:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FDhha3037870; Wed, 15 Sep 2010 13:43:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FDhhwq037867; Wed, 15 Sep 2010 13:43:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201009151343.o8FDhhwq037867@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 15 Sep 2010 13:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212658 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 13:43:44 -0000 Author: nwhitehorn Date: Wed Sep 15 13:43:43 2010 New Revision: 212658 URL: http://svn.freebsd.org/changeset/base/212658 Log: MFC r211967,212044,212278,212322,212331: Fix a variety of race conditions and errors in VSID allocation in both the 32 and 64-bit PMAP modules, some dating back to the original PMAP import from NetBSD. This fixes a variety of potential crashes and memory corruption bugs, especially on SMP systems under heavy load. Modified: stable/8/sys/powerpc/aim/mmu_oea.c stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea.c Wed Sep 15 11:05:41 2010 (r212657) +++ stable/8/sys/powerpc/aim/mmu_oea.c Wed Sep 15 13:43:43 2010 (r212658) @@ -203,6 +203,7 @@ extern struct pmap ofw_pmap; * Lock for the pteg and pvo tables. */ struct mtx moea_table_mutex; +struct mtx moea_vsid_mutex; /* tlbie instruction synchronization */ static struct mtx tlbie_mtx; @@ -817,6 +818,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k */ mtx_init(&moea_table_mutex, "pmap table", NULL, MTX_DEF | MTX_RECURSE); + mtx_init(&moea_vsid_mutex, "VSID table", NULL, MTX_DEF); mtx_init(&tlbie_mtx, "tlbie", NULL, MTX_SPIN); @@ -1535,6 +1537,7 @@ moea_pinit(mmu_t mmu, pmap_t pmap) } + mtx_lock(&moea_vsid_mutex); /* * Allocate some segment registers for this pmap. */ @@ -1561,7 +1564,7 @@ moea_pinit(mmu_t mmu, pmap_t pmap) entropy = (moea_vsidcontext >> 20); continue; } - i = ffs(~moea_vsid_bitmap[i]) - 1; + i = ffs(~moea_vsid_bitmap[n]) - 1; mask = 1 << i; hash &= 0xfffff & ~(VSID_NBPW - 1); hash |= i; @@ -1569,9 +1572,11 @@ moea_pinit(mmu_t mmu, pmap_t pmap) moea_vsid_bitmap[n] |= mask; for (i = 0; i < 16; i++) pmap->pm_sr[i] = VSID_MAKE(i, hash); + mtx_unlock(&moea_vsid_mutex); return; } + mtx_unlock(&moea_vsid_mutex); panic("moea_pinit: out of segments"); } @@ -1683,10 +1688,12 @@ moea_release(mmu_t mmu, pmap_t pmap) if (pmap->pm_sr[0] == 0) panic("moea_release"); + mtx_lock(&moea_vsid_mutex); idx = VSID_TO_HASH(pmap->pm_sr[0]) & (NPMAPS-1); mask = 1 << (idx % VSID_NBPW); idx /= VSID_NBPW; moea_vsid_bitmap[idx] &= ~mask; + mtx_unlock(&moea_vsid_mutex); PMAP_LOCK_DESTROY(pmap); } Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Wed Sep 15 11:05:41 2010 (r212657) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Wed Sep 15 13:43:43 2010 (r212658) @@ -277,6 +277,7 @@ extern void bs_remap_earlyboot(void); * Lock for the pteg and pvo tables. */ struct mtx moea64_table_mutex; +struct mtx moea64_slb_mutex; /* * PTEG data. @@ -841,6 +842,7 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o */ mtx_init(&moea64_table_mutex, "pmap table", NULL, MTX_DEF | MTX_RECURSE); + mtx_init(&moea64_slb_mutex, "SLB table", NULL, MTX_DEF); /* * Initialize the TLBIE lock. TLBIE can only be executed by one CPU. @@ -1721,6 +1723,7 @@ moea64_pinit(mmu_t mmu, pmap_t pmap) /* * Allocate some segment registers for this pmap. */ + mtx_lock(&moea64_slb_mutex); for (i = 0; i < NPMAPS; i += VSID_NBPW) { u_int hash, n; @@ -1744,19 +1747,24 @@ moea64_pinit(mmu_t mmu, pmap_t pmap) entropy = (moea64_vsidcontext >> 20); continue; } - i = ffs(~moea64_vsid_bitmap[i]) - 1; + i = ffs(~moea64_vsid_bitmap[n]) - 1; mask = 1 << i; hash &= 0xfffff & ~(VSID_NBPW - 1); hash |= i; } + KASSERT(!(moea64_vsid_bitmap[n] & mask), + ("Allocating in-use VSID %#zx\n", hash)); moea64_vsid_bitmap[n] |= mask; + mtx_unlock(&moea64_slb_mutex); + for (i = 0; i < 16; i++) { pmap->pm_sr[i] = VSID_MAKE(i, hash); } return; } - panic("moea64_pinit: out of segments"); + mtx_unlock(&moea64_slb_mutex); + panic("%s: out of segments",__func__); } /* @@ -1871,12 +1879,14 @@ moea64_release(mmu_t mmu, pmap_t pmap) * Free segment register's VSID */ if (pmap->pm_sr[0] == 0) - panic("moea64_release"); + panic("moea64_release: pm_sr[0] = 0"); - idx = VSID_TO_HASH(pmap->pm_sr[0]) & (NPMAPS-1); - mask = 1 << (idx % VSID_NBPW); - idx /= VSID_NBPW; - moea64_vsid_bitmap[idx] &= ~mask; + mtx_lock(&moea64_slb_mutex); + idx = VSID_TO_HASH(pmap->pm_sr[0]) & (NPMAPS-1); + mask = 1 << (idx % VSID_NBPW); + idx /= VSID_NBPW; + moea64_vsid_bitmap[idx] &= ~mask; + mtx_unlock(&moea64_slb_mutex); PMAP_LOCK_DESTROY(pmap); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 13:45:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E88106566C; Wed, 15 Sep 2010 13:45:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 593D68FC21; Wed, 15 Sep 2010 13:45:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FDj6DE037967; Wed, 15 Sep 2010 13:45:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FDj67L037965; Wed, 15 Sep 2010 13:45:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201009151345.o8FDj67L037965@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 15 Sep 2010 13:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212659 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 13:45:06 -0000 Author: nwhitehorn Date: Wed Sep 15 13:45:06 2010 New Revision: 212659 URL: http://svn.freebsd.org/changeset/base/212659 Log: MFC r212363: Reorder statistics tracking and table lock acquisitions already in place to avoid race conditions updating the PVO statistics. Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Wed Sep 15 13:43:43 2010 (r212658) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Wed Sep 15 13:45:06 2010 (r212659) @@ -2028,7 +2028,6 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z * the bootstrap pool. */ - moea64_pvo_enter_calls++; first = 0; bootstrap = (flags & PVO_BOOTSTRAP); @@ -2048,6 +2047,8 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z */ LOCK_TABLE(); + moea64_pvo_enter_calls++; + LIST_FOREACH(pvo, &moea64_pvo_table[ptegidx], pvo_olink) { if (pvo->pvo_pmap == pm && PVO_VADDR(pvo) == va) { if ((pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) == pa && @@ -2190,14 +2191,15 @@ moea64_pvo_remove(struct pvo_entry *pvo, * if we aren't going to reuse it. */ LIST_REMOVE(pvo, pvo_olink); + + moea64_pvo_entries--; + moea64_pvo_remove_calls++; + UNLOCK_TABLE(); if (!(pvo->pvo_vaddr & PVO_BOOTSTRAP)) uma_zfree((pvo->pvo_vaddr & PVO_MANAGED) ? moea64_mpvo_zone : moea64_upvo_zone, pvo); - - moea64_pvo_entries--; - moea64_pvo_remove_calls++; } static __inline int From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 14:04:44 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA351065695 for ; Wed, 15 Sep 2010 14:04:44 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 90F4A8FC22 for ; Wed, 15 Sep 2010 14:04:43 +0000 (UTC) Received: (qmail 71645 invoked from network); 15 Sep 2010 13:59:31 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 15 Sep 2010 13:59:31 -0000 Message-ID: <4C90D27D.4070306@freebsd.org> Date: Wed, 15 Sep 2010 16:04:45 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Lawrence Stewart References: <201009151039.o8FAdU4H030416@svn.freebsd.org> <4C90B326.4000208@freebsd.org> In-Reply-To: <4C90B326.4000208@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212653 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:04:44 -0000 On 15.09.2010 13:51, Lawrence Stewart wrote: > On 09/15/10 20:39, Andre Oppermann wrote: >> Author: andre >> Date: Wed Sep 15 10:39:30 2010 >> New Revision: 212653 >> URL: http://svn.freebsd.org/changeset/base/212653 >> >> Log: >> Change the default MSS for IPv4 and IPv6 TCP connections from an >> artificial power-of-2 rounded number to their real values specified >> in RFC879 and RFC2460. >> >> From the history and existing comments it appears that the rounded >> numbers were intended to be advantageous for the kernel and mbuf >> system. However this hasn't been the case at for at least a long >> time. The mbuf clusters used in tcp_output() have enough space >> to hold the larger real value for the default MSS for both IPv4 and >> IPv6. Note that the default MSS is only used when path MTU discovery >> is disabled. >> >> Update and expand related comments. >> >> Reviewed by: lsteward (including some word-smithing) > > For the record, I reviewed and fully support the functional changes made > by this patch, but explicitly objected to and offered an alternate for > the proposed comment wording changes. > > Andre, given that we had a disagreement about the comment wording, I > would have preferred it if you had noted in your commit log that I had > raised an objection to or at least not reviewed/endorsed the comment > changes. I've adapted many of your suggestions on the wording compared to my first version. For some parts I felt that my wording/description was more appropriate. In the end neither of our wordings is plain wrong or factually incorrect. > It's not important enough an issue to spend any more time on, but I'm a > bit upset to see this committed with an acknowledgement to my review and > word-smithing, much of which ended up being ignored (which is fine, but > then don't put my name to it). I apologize for not having made your different opinion to the wording clear enough in the commit message. My intent was to communicate that you not only reviewed the functional change but also provided input on the wording (which I in fact did not incorporate to some extent but not entirely). Below is the wording proposed by Lawrence: /* * The default Maximum Segment Size (MSS) to use when we do not have specific * knowledge (e.g. via path MTU discovery) that the destination host is prepared * to accept larger datagrams. The smallest allowable IP datagram MTU and * optionless IP/TCP header lengths are used for the calculation as per RFC879. * For IPv4 (RFC791): 576 - 20 - 20 = 536. * For IPv6 (RFC2460): 1280 - 40 - 20 = 1220. */ #define TCP_MSS 536 #define TCP6_MSS 1220 * Limit the lowest MSS we accept for path MTU discovery and the TCP SYN MSS * option. Allowing low values of MSS can consume significant resources and be * used to mount a resource exhaustion attack. Connections requesting lower MSS * values will be rounded up to this value and the IP_DF flag will be cleared to * allow fragmentation along the path. * * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. Setting this * SYSCTL to "0" disables the minmss check. * * The default value is fine for TCP over IPv4 across the Internet's smallest * known link MTU (256 bytes for AX.25 packet radio). However, a connection is * very unlikely to come across such low MTU interfaces (anno domini 2003). */ #define TCP_MINMSS 216 -- Andre From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 14:17:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF23D1065673; Wed, 15 Sep 2010 14:17:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8C14A8FC18; Wed, 15 Sep 2010 14:17:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o8FECRfv088473; Wed, 15 Sep 2010 08:12:27 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 15 Sep 2010 08:12:34 -0600 (MDT) Message-Id: <20100915.081234.83306312380114674.imp@bsdimp.com> To: kabaev@gmail.com From: "M. Warner Losh" In-Reply-To: <20100914231728.33ca7466@kan.dnsalias.net> References: <201009150256.o8F2uXwX004579@svn.freebsd.org> <20100914231728.33ca7466@kan.dnsalias.net> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) 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, davidxu@freebsd.org Subject: Re: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:17:51 -0000 In message: <20100914231728.33ca7466@kan.dnsalias.net> Alexander Kabaev writes: : On Wed, 15 Sep 2010 02:56:33 +0000 (UTC) : David Xu wrote: : : > Author: davidxu : > Date: Wed Sep 15 02:56:32 2010 : > New Revision: 212630 : > URL: http://svn.freebsd.org/changeset/base/212630 : > : > Log: : > add code to support stack unwinding when thread exits. note that : > only defer-mode cancellation works, asynchrnous mode does not work : > because it lacks of libuwind's support. stack unwinding is not : > enabled unless LIBTHR_UNWIND_STACK is defined in Makefile. : > : > Modified: : > head/lib/libthr/Makefile : > head/lib/libthr/thread/thr_clean.c : > head/lib/libthr/thread/thr_create.c : > head/lib/libthr/thread/thr_exit.c : > head/lib/libthr/thread/thr_init.c : > head/lib/libthr/thread/thr_private.h : > : > Modified: head/lib/libthr/Makefile : > ============================================================================== : > --- head/lib/libthr/Makefile Wed Sep 15 01:21:30 2010 : > (r212629) +++ head/lib/libthr/Makefile Wed Sep 15 02:56:32 : > 2010 (r212630) @@ -25,6 +25,14 @@ : > CFLAGS+=-I${.CURDIR}/../../libexec/rtld- : > CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} : > CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline : > + : > +LIBTHR_UNWIND_STACK=yes : > + : > +.ifdef LIBTHR_UNWIND_STACK : > +CFLAGS+=-I${.CURDIR}/../../contrib/gcc -fexceptions : > +CFLAGS+=-D_PTHREAD_FORCED_UNWIND : > +.endif : > + : > : : Reaching into bowels of GCC like that is never good. Would this pulling in GPL'd code? Warner From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 14:23:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75E471065672; Wed, 15 Sep 2010 14:23:55 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 658788FC14; Wed, 15 Sep 2010 14:23:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FENtJF039141; Wed, 15 Sep 2010 14:23:55 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FENtX6039137; Wed, 15 Sep 2010 14:23:55 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201009151423.o8FENtX6039137@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 15 Sep 2010 14:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212660 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:23:55 -0000 Author: jh Date: Wed Sep 15 14:23:55 2010 New Revision: 212660 URL: http://svn.freebsd.org/changeset/base/212660 Log: Remove empty devfs directories automatically. devfs_delete() now recursively removes empty parent directories unless the DEVFS_DEL_NORECURSE flag is specified. devfs_delete() can't be called anymore with a parent directory vnode lock held because the possible parent directory deletion needs to lock the vnode. Thus we unlock the parent directory vnode in devfs_remove() before calling devfs_delete(). Call devfs_populate_vp() from devfs_symlink() and devfs_vptocnp() as now directories can get removed. Add a check for DE_DOOMED flag to devfs_populate_vp() because devfs_delete() drops dm_lock before the VI_DOOMED vnode flag gets set. This ensures that devfs_populate_vp() returns an error for directories which are in progress of deletion. Reviewed by: kib Discussed on: freebsd-current (mostly silence) Modified: head/sys/fs/devfs/devfs.h head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs.h ============================================================================== --- head/sys/fs/devfs/devfs.h Wed Sep 15 13:45:06 2010 (r212659) +++ head/sys/fs/devfs/devfs.h Wed Sep 15 14:23:55 2010 (r212660) @@ -170,12 +170,15 @@ extern unsigned devfs_rule_depth; #define DEVFS_DMP_HOLD(dmp) ((dmp)->dm_holdcnt++) #define DEVFS_DMP_DROP(dmp) (--(dmp)->dm_holdcnt == 0) +#define DEVFS_DEL_VNLOCKED 0x01 +#define DEVFS_DEL_NORECURSE 0x02 + void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de); void devfs_rules_cleanup (struct devfs_mount *dm); int devfs_rules_ioctl(struct devfs_mount *dm, u_long cmd, caddr_t data, struct thread *td); int devfs_allocv(struct devfs_dirent *de, struct mount *mp, int lockmode, struct vnode **vpp); -void devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int vp_locked); +void devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int flags); void devfs_dirent_free(struct devfs_dirent *de); void devfs_populate (struct devfs_mount *dm); void devfs_cleanup (struct devfs_mount *dm); Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Wed Sep 15 13:45:06 2010 (r212659) +++ head/sys/fs/devfs/devfs_devs.c Wed Sep 15 14:23:55 2010 (r212660) @@ -275,17 +275,68 @@ devfs_dirent_free(struct devfs_dirent *d } /* + * Removes a directory if it is empty. Also empty parent directories are + * removed recursively. + */ +static void +devfs_rmdir_empty(struct devfs_mount *dm, struct devfs_dirent *de) +{ + struct devfs_dirent *dd, *de_dot, *de_dotdot; + + sx_assert(&dm->dm_lock, SX_XLOCKED); + + for (;;) { + KASSERT(de->de_dirent->d_type == DT_DIR, + ("devfs_rmdir_empty: de is not a directory")); + + if ((de->de_flags & DE_DOOMED) != 0 || de == dm->dm_rootdir) + return; + + de_dot = TAILQ_FIRST(&de->de_dlist); + KASSERT(de_dot != NULL, ("devfs_rmdir_empty: . missing")); + de_dotdot = TAILQ_NEXT(de_dot, de_list); + KASSERT(de_dotdot != NULL, ("devfs_rmdir_empty: .. missing")); + /* Return if the directory is not empty. */ + if (TAILQ_NEXT(de_dotdot, de_list) != NULL) + return; + + dd = devfs_parent_dirent(de); + KASSERT(dd != NULL, ("devfs_rmdir_empty: NULL dd")); + TAILQ_REMOVE(&dd->de_dlist, de, de_list); + DEVFS_DE_HOLD(dd); + devfs_delete(dm, de, DEVFS_DEL_NORECURSE); + devfs_delete(dm, de_dot, DEVFS_DEL_NORECURSE); + devfs_delete(dm, de_dotdot, DEVFS_DEL_NORECURSE); + if (DEVFS_DE_DROP(dd)) { + devfs_dirent_free(dd); + return; + } + + de = dd; + } +} + +/* * The caller needs to hold the dm for the duration of the call since * dm->dm_lock may be temporary dropped. */ void -devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int vp_locked) +devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int flags) { + struct devfs_dirent *dd; struct vnode *vp; KASSERT((de->de_flags & DE_DOOMED) == 0, ("devfs_delete doomed dirent")); de->de_flags |= DE_DOOMED; + + if ((flags & DEVFS_DEL_NORECURSE) == 0) { + dd = devfs_parent_dirent(de); + if (dd != NULL) + DEVFS_DE_HOLD(dd); + } else + dd = NULL; + mtx_lock(&devfs_de_interlock); vp = de->de_vnode; if (vp != NULL) { @@ -293,12 +344,12 @@ devfs_delete(struct devfs_mount *dm, str mtx_unlock(&devfs_de_interlock); vholdl(vp); sx_unlock(&dm->dm_lock); - if (!vp_locked) + if ((flags & DEVFS_DEL_VNLOCKED) == 0) vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY); else VI_UNLOCK(vp); vgone(vp); - if (!vp_locked) + if ((flags & DEVFS_DEL_VNLOCKED) == 0) VOP_UNLOCK(vp, 0); vdrop(vp); sx_xlock(&dm->dm_lock); @@ -317,6 +368,13 @@ devfs_delete(struct devfs_mount *dm, str } if (DEVFS_DE_DROP(de)) devfs_dirent_free(de); + + if (dd != NULL) { + if (DEVFS_DE_DROP(dd)) + devfs_dirent_free(dd); + else + devfs_rmdir_empty(dm, dd); + } } /* @@ -331,19 +389,24 @@ devfs_purge(struct devfs_mount *dm, stru struct devfs_dirent *de; sx_assert(&dm->dm_lock, SX_XLOCKED); + + DEVFS_DE_HOLD(dd); for (;;) { de = TAILQ_FIRST(&dd->de_dlist); if (de == NULL) break; TAILQ_REMOVE(&dd->de_dlist, de, de_list); - if (de->de_flags & (DE_DOT|DE_DOTDOT)) - devfs_delete(dm, de, 0); + if (de->de_flags & (DE_DOT | DE_DOTDOT)) + devfs_delete(dm, de, DEVFS_DEL_NORECURSE); else if (de->de_dirent->d_type == DT_DIR) devfs_purge(dm, de); - else - devfs_delete(dm, de, 0); + else + devfs_delete(dm, de, DEVFS_DEL_NORECURSE); } - devfs_delete(dm, dd, 0); + if (DEVFS_DE_DROP(dd)) + devfs_dirent_free(dd); + else if ((dd->de_flags & DE_DOOMED) == 0) + devfs_delete(dm, dd, DEVFS_DEL_NORECURSE); } /* Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Wed Sep 15 13:45:06 2010 (r212659) +++ head/sys/fs/devfs/devfs_vnops.c Wed Sep 15 14:23:55 2010 (r212660) @@ -36,7 +36,6 @@ /* * TODO: - * remove empty directories * mkdir: want it ? */ @@ -191,6 +190,7 @@ devfs_clear_cdevpriv(void) static int devfs_populate_vp(struct vnode *vp) { + struct devfs_dirent *de; struct devfs_mount *dmp; int locked; @@ -214,7 +214,14 @@ devfs_populate_vp(struct vnode *vp) devfs_unmount_final(dmp); return (EBADF); } - if (vp->v_iflag & VI_DOOMED) { + if ((vp->v_iflag & VI_DOOMED) != 0) { + sx_xunlock(&dmp->dm_lock); + return (EBADF); + } + de = vp->v_data; + KASSERT(de != NULL, + ("devfs_populate_vp: vp->v_data == NULL but vnode not doomed")); + if ((de->de_flags & DE_DOOMED) != 0) { sx_xunlock(&dmp->dm_lock); return (EBADF); } @@ -234,11 +241,13 @@ devfs_vptocnp(struct vop_vptocnp_args *a int i, error; dmp = VFSTODEVFS(vp->v_mount); + + error = devfs_populate_vp(vp); + if (error != 0) + return (error); + i = *buflen; dd = vp->v_data; - error = 0; - - sx_xlock(&dmp->dm_lock); if (vp->v_type == VCHR) { i -= strlen(dd->de_cdp->cdp_c.si_name); @@ -1271,11 +1280,15 @@ devfs_reclaim(struct vop_reclaim_args *a static int devfs_remove(struct vop_remove_args *ap) { + struct vnode *dvp = ap->a_dvp; struct vnode *vp = ap->a_vp; struct devfs_dirent *dd; struct devfs_dirent *de, *de_covered; struct devfs_mount *dmp = VFSTODEVFS(vp->v_mount); + ASSERT_VOP_ELOCKED(dvp, "devfs_remove"); + ASSERT_VOP_ELOCKED(vp, "devfs_remove"); + sx_xlock(&dmp->dm_lock); dd = ap->a_dvp->v_data; de = vp->v_data; @@ -1287,11 +1300,19 @@ devfs_remove(struct vop_remove_args *ap) if (de_covered != NULL) de_covered->de_flags &= ~DE_COVERED; } - devfs_delete(dmp, de, 1); + /* We need to unlock dvp because devfs_delete() may lock it. */ + VOP_UNLOCK(vp, 0); + if (dvp != vp) + VOP_UNLOCK(dvp, 0); + devfs_delete(dmp, de, 0); + sx_xunlock(&dmp->dm_lock); + if (dvp != vp) + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); } else { de->de_flags |= DE_WHITEOUT; + sx_xunlock(&dmp->dm_lock); } - sx_xunlock(&dmp->dm_lock); return (0); } @@ -1533,6 +1554,9 @@ devfs_symlink(struct vop_symlink_args *a if (error) return(error); dmp = VFSTODEVFS(ap->a_dvp->v_mount); + if (devfs_populate_vp(ap->a_dvp) != 0) + return (ENOENT); + dd = ap->a_dvp->v_data; de = devfs_newdirent(ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen); de->de_uid = 0; @@ -1544,7 +1568,6 @@ devfs_symlink(struct vop_symlink_args *a i = strlen(ap->a_target) + 1; de->de_symlink = malloc(i, M_DEVFS, M_WAITOK); bcopy(ap->a_target, de->de_symlink, i); - sx_xlock(&dmp->dm_lock); #ifdef MAC mac_devfs_create_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de); #endif From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 14:24:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3848E10656CA; Wed, 15 Sep 2010 14:24:22 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4BF8FC20; Wed, 15 Sep 2010 14:24:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FEOLb0039188; Wed, 15 Sep 2010 14:24:21 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FEOLZE039185; Wed, 15 Sep 2010 14:24:21 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201009151424.o8FEOLZE039185@svn.freebsd.org> From: Attilio Rao Date: Wed, 15 Sep 2010 14:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:24:22 -0000 Author: attilio Date: Wed Sep 15 14:24:21 2010 New Revision: 212661 URL: http://svn.freebsd.org/changeset/base/212661 Log: Fix bogus busying mechanism from cdevsw callbacks: - D_TRACKCLOSE may be used there as d_close() are expected to match up d_open() calls - Replace the hand-crafted counter and flag with the device_busy()/device_unbusy() proper usage. Sponsored by: Sandvine Incorporated Reported by: Mark Johnston Tested by: Mark Johnston Reviewed by: emaste MFC after: 10 days Modified: head/sys/dev/aac/aac.c head/sys/dev/aac/aacvar.h Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Wed Sep 15 14:23:55 2010 (r212660) +++ head/sys/dev/aac/aac.c Wed Sep 15 14:24:21 2010 (r212661) @@ -212,7 +212,7 @@ static struct aac_mntinforesp * static struct cdevsw aac_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, + .d_flags = D_NEEDGIANT | D_TRACKCLOSE, .d_open = aac_open, .d_close = aac_close, .d_ioctl = aac_ioctl, @@ -660,9 +660,6 @@ aac_detach(device_t dev) sc = device_get_softc(dev); fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - if (sc->aac_state & AAC_STATE_OPEN) - return(EBUSY); - callout_drain(&sc->aac_daemontime); /* Remove the child containers */ @@ -2804,8 +2801,7 @@ aac_open(struct cdev *dev, int flags, in sc = dev->si_drv1; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - sc->aac_open_cnt++; - sc->aac_state |= AAC_STATE_OPEN; + device_busy(sc->aac_dev); return 0; } @@ -2817,10 +2813,7 @@ aac_close(struct cdev *dev, int flags, i sc = dev->si_drv1; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - sc->aac_open_cnt--; - /* Mark this unit as no longer open */ - if (sc->aac_open_cnt == 0) - sc->aac_state &= ~AAC_STATE_OPEN; + device_unbusy(sc->aac_dev); return 0; } Modified: head/sys/dev/aac/aacvar.h ============================================================================== --- head/sys/dev/aac/aacvar.h Wed Sep 15 14:23:55 2010 (r212660) +++ head/sys/dev/aac/aacvar.h Wed Sep 15 14:24:21 2010 (r212661) @@ -319,10 +319,9 @@ struct aac_softc /* controller features, limits and status */ int aac_state; #define AAC_STATE_SUSPEND (1<<0) -#define AAC_STATE_OPEN (1<<1) +#define AAC_STATE_UNUSED0 (1<<1) #define AAC_STATE_INTERRUPTS_ON (1<<2) #define AAC_STATE_AIF_SLEEPER (1<<3) - int aac_open_cnt; struct FsaRevision aac_revision; /* controller hardware interface */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 14:36:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B470106564A; Wed, 15 Sep 2010 14:36:57 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from mail1.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by mx1.freebsd.org (Postfix) with ESMTP id 1B47F8FC0A; Wed, 15 Sep 2010 14:36:57 +0000 (UTC) Received: from labgw2.phaedrus.sandvine.com (192.168.222.22) by WTL-EXCH-1.sandvine.com (192.168.196.31) with Microsoft SMTP Server id 14.0.694.0; Wed, 15 Sep 2010 10:26:08 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332) id 0D61633C01; Wed, 15 Sep 2010 10:26:09 -0400 (EDT) Date: Wed, 15 Sep 2010 10:26:09 -0400 From: Ed Maste To: pluknet Message-ID: <20100915142609.GA38041@sandvine.com> References: <201009150119.o8F1JCjW098403@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212628 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:36:57 -0000 On Wed, Sep 15, 2010 at 01:27:40PM +0400, pluknet wrote: > Hi. > Afaik, these are somewhere from between b15753 and b16119. > Just for possible clarification. Thanks. I didn't bother to find out where they first appeared, I just copied them from the latest driver. We have some work on the go and I just wanted to get the latest versions of these in the tree. We're working on handling enclosure events (disk insertion / removal). This will mean that e.g. "camcontrol devlist" will update automatically for disks behind the controller. We can hopefully handle AifEnAddJBOD and AifEnDeleteJBOD correctly using the same infrastructure (using the technique from the new mps(4) driver). -Ed From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 14:52:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E63A106564A; Wed, 15 Sep 2010 14:52:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id A79708FC0C; Wed, 15 Sep 2010 14:52:15 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8FEqA3M044882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Sep 2010 17:52:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8FEqAxp096036; Wed, 15 Sep 2010 17:52:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8FEqAJS096035; Wed, 15 Sep 2010 17:52:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 15 Sep 2010 17:52:09 +0300 From: Kostik Belousov To: Attilio Rao Message-ID: <20100915145209.GK2465@deviant.kiev.zoral.com.ua> References: <201009151424.o8FEOLZE039185@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IxJdV6DzbRx1uFDf" Content-Disposition: inline In-Reply-To: <201009151424.o8FEOLZE039185@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:52:17 -0000 --IxJdV6DzbRx1uFDf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 15, 2010 at 02:24:21PM +0000, Attilio Rao wrote: > Author: attilio > Date: Wed Sep 15 14:24:21 2010 > New Revision: 212661 > URL: http://svn.freebsd.org/changeset/base/212661 >=20 > Log: > Fix bogus busying mechanism from cdevsw callbacks: > - D_TRACKCLOSE may be used there as d_close() are expected to match up > d_open() calls VFS is not very good at properly calling VOP_CLOSE(). As example, premature vnode reclaim due to devfs unmount would cause VOP_CLOSE() to be called only once despite the number of opens being > 1. --IxJdV6DzbRx1uFDf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyQ3ZkACgkQC3+MBN1Mb4jrAQCg5Nhdhc1xpIrM5R4LbeZH8VfC Ok0AmgOw3B1awWRvkCxNTI6I8QZXgToz =Y1Dg -----END PGP SIGNATURE----- --IxJdV6DzbRx1uFDf-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 14:57:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 079CE106564A; Wed, 15 Sep 2010 14:57:17 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8314A8FC14; Wed, 15 Sep 2010 14:57:16 +0000 (UTC) Received: by qyk4 with SMTP id 4so310326qyk.13 for ; Wed, 15 Sep 2010 07:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=fFv90CruJv7ZmWxQa2IjiiOCxhQm29P1ACNVVm47L8c=; b=r3P6wzDuJ7Pv7ItaaId01YgMkbRINDVFTXGWfK5ZssH9yJMx+a0VlVgYWXURdUFvwI kxNqL2IJtUYXBCWjJzb3rPp1D8mQdO2VGWe3/KFqLBqiQoYqfrzOptdrt6AQVzbBVcsP lWSthqwbREh/o81RwCCwaFlAr7iV30mwBlcxw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=LzrOC56vrVzM09VAC7MFJWQM8U6sKI8Bq38UN2GLE0Tv/9pxOjKql7bxAa0rGsY8GO rbna5ew8ngolpJIxUtXJHWT+dirzj5t7ZnsCPKY+Qz8GVxdatRTTszzqCQwW3rPt9FI+ /8//6cqFIg0WmxI5OYMSUhDT1L7YWSQmEbzGo= MIME-Version: 1.0 Received: by 10.224.64.85 with SMTP id d21mr1107082qai.367.1284562635670; Wed, 15 Sep 2010 07:57:15 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.229.49.196 with HTTP; Wed, 15 Sep 2010 07:57:15 -0700 (PDT) In-Reply-To: <20100915145209.GK2465@deviant.kiev.zoral.com.ua> References: <201009151424.o8FEOLZE039185@svn.freebsd.org> <20100915145209.GK2465@deviant.kiev.zoral.com.ua> Date: Wed, 15 Sep 2010 16:57:15 +0200 X-Google-Sender-Auth: uK85kii4m2R244vZEk_iM_RjU6g Message-ID: From: Attilio Rao To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:57:17 -0000 2010/9/15 Kostik Belousov : > On Wed, Sep 15, 2010 at 02:24:21PM +0000, Attilio Rao wrote: >> Author: attilio >> Date: Wed Sep 15 14:24:21 2010 >> New Revision: 212661 >> URL: http://svn.freebsd.org/changeset/base/212661 >> >> Log: >> =C2=A0 Fix bogus busying mechanism from cdevsw callbacks: >> =C2=A0 - D_TRACKCLOSE may be used there as d_close() are expected to mat= ch up >> =C2=A0 =C2=A0 d_open() calls > VFS is not very good at properly calling VOP_CLOSE(). As example, prematu= re > vnode reclaim due to devfs unmount would cause VOP_CLOSE() to be called > only once despite the number of opens being =C2=A0> 1. Yes. That makes implementing a similar semantic in drivers very difficult and not very well fixable, in particular within the d_* callbacks. I'm seriously wondering if we might just make a shortcut just for supporting such a feature (busying the device on real devfs entry activity) as several of them may be needing and may be probabilly needing to be 100%. Luckilly, it seems that such paths are not experienced very frequently. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:04:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52D5A1065674; Wed, 15 Sep 2010 15:04:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 93CE48FC08; Wed, 15 Sep 2010 15:04:17 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8FF4DMW046293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Sep 2010 18:04:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8FF4CDo012902; Wed, 15 Sep 2010 18:04:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8FF4CXY012901; Wed, 15 Sep 2010 18:04:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 15 Sep 2010 18:04:12 +0300 From: Kostik Belousov To: Attilio Rao Message-ID: <20100915150412.GM2465@deviant.kiev.zoral.com.ua> References: <201009151424.o8FEOLZE039185@svn.freebsd.org> <20100915145209.GK2465@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tI9tJD/InAKWF1Ci" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:04:18 -0000 --tI9tJD/InAKWF1Ci Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 15, 2010 at 04:57:15PM +0200, Attilio Rao wrote: > 2010/9/15 Kostik Belousov : > > On Wed, Sep 15, 2010 at 02:24:21PM +0000, Attilio Rao wrote: > >> Author: attilio > >> Date: Wed Sep 15 14:24:21 2010 > >> New Revision: 212661 > >> URL: http://svn.freebsd.org/changeset/base/212661 > >> > >> Log: > >> =9A Fix bogus busying mechanism from cdevsw callbacks: > >> =9A - D_TRACKCLOSE may be used there as d_close() are expected to matc= h up > >> =9A =9A d_open() calls > > VFS is not very good at properly calling VOP_CLOSE(). As example, prema= ture > > vnode reclaim due to devfs unmount would cause VOP_CLOSE() to be called > > only once despite the number of opens being =9A> 1. >=20 > Yes. > That makes implementing a similar semantic in drivers very difficult > and not very well fixable, in particular within the d_* callbacks. > I'm seriously wondering if we might just make a shortcut just for > supporting such a feature (busying the device on real devfs entry > activity) as several of them may be needing and may be probabilly > needing to be 100%. > Luckilly, it seems that such paths are not experienced very frequently. I am not sure what do you mean by "busying the device on real devfs entry activity". Is the operation made by dev_refthread() and friends enough ? Device cannot be destroyed by destroy_dev() until all threads leave the cdevsw methods. --tI9tJD/InAKWF1Ci Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyQ4GwACgkQC3+MBN1Mb4hezwCgkXk6Fq5UUL8fgIO6Y8a7Lv9a m4oAoOSJAfcrcTKBl70Xjuzz1TYYVORC =a12E -----END PGP SIGNATURE----- --tI9tJD/InAKWF1Ci-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:11:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAD531065673; Wed, 15 Sep 2010 15:11:20 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from mail1.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by mx1.freebsd.org (Postfix) with ESMTP id 871988FC0C; Wed, 15 Sep 2010 15:11:20 +0000 (UTC) Received: from labgw2.phaedrus.sandvine.com (192.168.222.22) by WTL-EXCH-1.sandvine.com (192.168.196.31) with Microsoft SMTP Server id 14.0.694.0; Wed, 15 Sep 2010 11:11:19 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332) id 9F9D733C00; Wed, 15 Sep 2010 11:11:19 -0400 (EDT) Date: Wed, 15 Sep 2010 11:11:19 -0400 From: Ed Maste To: Attilio Rao Message-ID: <20100915151119.GB1522@sandvine.com> References: <201009151424.o8FEOLZE039185@svn.freebsd.org> <20100915145209.GK2465@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:11:20 -0000 On Wed, Sep 15, 2010 at 04:57:15PM +0200, Attilio Rao wrote: > 2010/9/15 Kostik Belousov : > > On Wed, Sep 15, 2010 at 02:24:21PM +0000, Attilio Rao wrote: > >> Author: attilio > >> Date: Wed Sep 15 14:24:21 2010 > >> New Revision: 212661 > >> URL: http://svn.freebsd.org/changeset/base/212661 > >> > >> Log: > >> ?? Fix bogus busying mechanism from cdevsw callbacks: > >> ?? - D_TRACKCLOSE may be used there as d_close() are expected to match up > >> ?? ?? d_open() calls > > VFS is not very good at properly calling VOP_CLOSE(). As example, premature > > vnode reclaim due to devfs unmount would cause VOP_CLOSE() to be called > > only once despite the number of opens being ??> 1. > > Yes. > That makes implementing a similar semantic in drivers very difficult > and not very well fixable, in particular within the d_* callbacks. > I'm seriously wondering if we might just make a shortcut just for > supporting such a feature (busying the device on real devfs entry > activity) as several of them may be needing and may be probabilly > needing to be 100%. > Luckilly, it seems that such paths are not experienced very frequently. Yeah, the old code in aac(4) meant that the module couldn't be unloaded after running the arcconf management tool. This change at least works for the common cases. The mfi(4) driver has a similar local refcount / prevent unload test, and I imagine many other drivers want to implement the same functionality. -Ed From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:17:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 537431065675; Wed, 15 Sep 2010 15:17:55 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43E658FC20; Wed, 15 Sep 2010 15:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FFHtX6040402; Wed, 15 Sep 2010 15:17:55 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FFHtAb040400; Wed, 15 Sep 2010 15:17:55 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201009151517.o8FFHtAb040400@svn.freebsd.org> From: Philip Paeps Date: Wed, 15 Sep 2010 15:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212662 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:17:55 -0000 Author: philip Date: Wed Sep 15 15:17:54 2010 New Revision: 212662 URL: http://svn.freebsd.org/changeset/base/212662 Log: Take piso's and benjsc's commit bits into safekeeping per their request (a while ago now). Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Wed Sep 15 14:24:21 2010 (r212661) +++ svnadmin/conf/access Wed Sep 15 15:17:54 2010 (r212662) @@ -33,7 +33,6 @@ attilio avatar avg bde -benjsc benno bms brian freebsd-committers@Awfulhak.org @@ -177,7 +176,6 @@ phantom philip phk pho -piso pjd ps qingli From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:18:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A03B81065693; Wed, 15 Sep 2010 15:18:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90AD28FC28; Wed, 15 Sep 2010 15:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FFIfMl040457; Wed, 15 Sep 2010 15:18:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FFIfAR040455; Wed, 15 Sep 2010 15:18:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151518.o8FFIfAR040455@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 15:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212663 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:18:41 -0000 Author: marius Date: Wed Sep 15 15:18:41 2010 New Revision: 212663 URL: http://svn.freebsd.org/changeset/base/212663 Log: - Update the comment in swi_vm() regarding busdma bounce buffers; it's unlikely that support for these ever will be implemented on sparc64 as the IOMMUs are able to translate to up to the maximum physical address supported by the respective machine, bypassing the IOMMU is affected by hardware errata and being able to support DMA engines which cannot do at least 32-bit DMA does not justify the costs. - The page zeroing in uma_small_alloc() may use the VIS-based block zero function so take advantage of it. Modified: head/sys/sparc64/sparc64/vm_machdep.c Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Wed Sep 15 15:17:54 2010 (r212662) +++ head/sys/sparc64/sparc64/vm_machdep.c Wed Sep 15 15:18:41 2010 (r212663) @@ -492,10 +492,7 @@ void swi_vm(void *v) { - /* - * Nothing to do here yet - busdma bounce buffers are not yet - * implemented. - */ + /* Nothing to do here - busdma bounce buffers are not implemented. */ } void * @@ -540,7 +537,7 @@ uma_small_alloc(uma_zone_t zone, int byt } va = (void *)TLB_PHYS_TO_DIRECT(pa); if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) - bzero(va, PAGE_SIZE); + cpu_block_zero(va, PAGE_SIZE); return (va); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:33:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E76631065670; Wed, 15 Sep 2010 15:33:51 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6AE78FC15; Wed, 15 Sep 2010 15:33:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FFXpO3040840; Wed, 15 Sep 2010 15:33:51 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FFXpQS040837; Wed, 15 Sep 2010 15:33:51 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009151533.o8FFXpQS040837@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 15 Sep 2010 15:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212664 - in stable/7/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:33:52 -0000 Author: mdf Date: Wed Sep 15 15:33:51 2010 New Revision: 212664 URL: http://svn.freebsd.org/changeset/base/212664 Log: Revert r212563, which was a MFC of r209053, as it introduced an unlocked read/modify/write of b_vflags. The unlocked access is fixed in CURRENT and stable/8 by r211213 and its MFC, r212583. Rather than MFC to stable/7, reverting the injecting code seems preferable. Modified: stable/7/sys/kern/vfs_bio.c stable/7/sys/sys/buf.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_bio.c ============================================================================== --- stable/7/sys/kern/vfs_bio.c Wed Sep 15 15:18:41 2010 (r212663) +++ stable/7/sys/kern/vfs_bio.c Wed Sep 15 15:33:51 2010 (r212664) @@ -381,16 +381,10 @@ runningbufwakeup(struct buf *bp) */ static __inline void -bufcountwakeup(struct buf *bp) +bufcountwakeup(void) { - int old; - KASSERT((bp->b_vflags & BV_INFREECNT) == 0, - ("buf %p already counted as free", bp)); - bp->b_vflags |= BV_INFREECNT; - old = atomic_fetchadd_int(&numfreebuffers, 1); - KASSERT(old >= 0 && old < nbuf, - ("numfreebuffers climbed to %d", old + 1)); + atomic_add_int(&numfreebuffers, 1); mtx_lock(&nblock); if (needsbuffer) { needsbuffer &= ~VFS_BIO_NEED_ANY; @@ -593,7 +587,7 @@ bufinit(void) bp->b_rcred = NOCRED; bp->b_wcred = NOCRED; bp->b_qindex = QUEUE_EMPTY; - bp->b_vflags = BV_INFREECNT; /* buf is counted as free */ + bp->b_vflags = 0; bp->b_xflags = 0; LIST_INIT(&bp->b_dep); BUF_LOCKINIT(bp); @@ -694,7 +688,6 @@ bfreekva(struct buf *bp) void bremfree(struct buf *bp) { - int old; CTR3(KTR_BUF, "bremfree(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); KASSERT(BUF_REFCNT(bp), ("bremfree: buf must be locked.")); @@ -705,13 +698,8 @@ bremfree(struct buf *bp) bp->b_flags |= B_REMFREE; /* Fixup numfreebuffers count. */ - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { - KASSERT((bp->b_vflags & BV_INFREECNT) != 0, - ("buf %p not counted in numfreebuffers", bp)); - bp->b_vflags &= ~BV_INFREECNT; - old = atomic_fetchadd_int(&numfreebuffers, -1); - KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); - } + if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) + atomic_subtract_int(&numfreebuffers, 1); } /* @@ -737,8 +725,6 @@ bremfreef(struct buf *bp) static void bremfreel(struct buf *bp) { - int old; - CTR3(KTR_BUF, "bremfreel(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); KASSERT(BUF_REFCNT(bp), ("bremfreel: buffer %p not locked.", bp)); @@ -761,13 +747,8 @@ bremfreel(struct buf *bp) * delayed-write, the buffer was free and we must decrement * numfreebuffers. */ - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { - KASSERT((bp->b_vflags & BV_INFREECNT) != 0, - ("buf %p not counted in numfreebuffers", bp)); - bp->b_vflags &= ~BV_INFREECNT; - old = atomic_fetchadd_int(&numfreebuffers, -1); - KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); - } + if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) + atomic_subtract_int(&numfreebuffers, 1); } @@ -1471,7 +1452,7 @@ brelse(struct buf *bp) */ if (!(bp->b_flags & B_DELWRI)) - bufcountwakeup(bp); + bufcountwakeup(); /* * Something we can maybe free or reuse @@ -1561,7 +1542,7 @@ bqrelse(struct buf *bp) mtx_unlock(&bqlock); if ((bp->b_flags & B_INVAL) || !(bp->b_flags & B_DELWRI)) - bufcountwakeup(bp); + bufcountwakeup(); /* * Something we can maybe free or reuse. @@ -1941,8 +1922,6 @@ restart: bp->b_flags = 0; bp->b_ioflags = 0; bp->b_xflags = 0; - KASSERT((bp->b_vflags & BV_INFREECNT) == 0, - ("buf %p still counted as free?", bp)); bp->b_vflags = 0; bp->b_vp = NULL; bp->b_blkno = bp->b_lblkno = 0; @@ -4104,27 +4083,4 @@ DB_SHOW_COMMAND(vnodebufs, db_show_vnode db_printf("\n"); } } - -DB_COMMAND(countfreebufs, db_coundfreebufs) -{ - struct buf *bp; - int i, used = 0, nfree = 0; - - if (have_addr) { - db_printf("usage: countfreebufs\n"); - return; - } - - for (i = 0; i < nbuf; i++) { - bp = &buf[i]; - if ((bp->b_vflags & BV_INFREECNT) != 0) - nfree++; - else - used++; - } - - db_printf("Counted %d free, %d used (%d tot)\n", nfree, used, - nfree + used); - db_printf("numfreebuffers is %d\n", numfreebuffers); -} #endif /* DDB */ Modified: stable/7/sys/sys/buf.h ============================================================================== --- stable/7/sys/sys/buf.h Wed Sep 15 15:18:41 2010 (r212663) +++ stable/7/sys/sys/buf.h Wed Sep 15 15:33:51 2010 (r212664) @@ -247,7 +247,6 @@ struct buf { #define BV_SCANNED 0x00000001 /* VOP_FSYNC funcs mark written bufs */ #define BV_BKGRDINPROG 0x00000002 /* Background write in progress */ #define BV_BKGRDWAIT 0x00000004 /* Background write waiting */ -#define BV_INFREECNT 0x80000000 /* buf is counted in numfreebufs */ #ifdef _KERNEL /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:38:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A7531065673; Wed, 15 Sep 2010 15:38:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B2A18FC1E; Wed, 15 Sep 2010 15:38:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FFcllO041038; Wed, 15 Sep 2010 15:38:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FFclvW041036; Wed, 15 Sep 2010 15:38:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009151538.o8FFclvW041036@svn.freebsd.org> From: Warner Losh Date: Wed, 15 Sep 2010 15:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212665 - head/libexec/tftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:38:47 -0000 Author: imp Date: Wed Sep 15 15:38:47 2010 New Revision: 212665 URL: http://svn.freebsd.org/changeset/base/212665 Log: Move the pfrom initialization from before the setjmp to after the setjmp to avoid warnings on the powerpc build... Modified: head/libexec/tftpd/tftp-io.c Modified: head/libexec/tftpd/tftp-io.c ============================================================================== --- head/libexec/tftpd/tftp-io.c Wed Sep 15 15:33:51 2010 (r212664) +++ head/libexec/tftpd/tftp-io.c Wed Sep 15 15:38:47 2010 (r212665) @@ -398,8 +398,6 @@ receive_packet(int peer, char *data, int int n; static int waiting; - pfrom = (from == NULL) ? &from_local : from; - if (debug&DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Waiting %d seconds for packet", timeoutpacket); @@ -423,6 +421,7 @@ receive_packet(int peer, char *data, int } waiting++; + pfrom = (from == NULL) ? &from_local : from; fromlen = sizeof(*pfrom); n = recvfrom(peer, data, size, 0, (struct sockaddr *)pfrom, &fromlen); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:53:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED69B1065672; Wed, 15 Sep 2010 15:53:05 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2E378FC18; Wed, 15 Sep 2010 15:53:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FFr5eG041411; Wed, 15 Sep 2010 15:53:05 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FFr58H041409; Wed, 15 Sep 2010 15:53:05 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009151553.o8FFr58H041409@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 15 Sep 2010 15:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212666 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:53:06 -0000 Author: mdf Date: Wed Sep 15 15:53:05 2010 New Revision: 212666 URL: http://svn.freebsd.org/changeset/base/212666 Log: MFC r212115: Fix a bug with sched_affinity() where it checks td_pinned of another thread in a racy manner, which can lead to attempting to migrate a thread that is pinned to a CPU. Instead, have sched_switch() determine which CPU a thread should run on if the current one is not allowed. KASSERT in sched_bind() that the thread is not yet pinned to a CPU. KASSERT in sched_switch() that only migratable threads or those moving due to a sched_bind() are changing CPUs. Note that this is direct commit as ipi_cpu() only exists in CURRENT. Modified: stable/8/sys/kern/sched_ule.c Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Wed Sep 15 15:38:47 2010 (r212665) +++ stable/8/sys/kern/sched_ule.c Wed Sep 15 15:53:05 2010 (r212666) @@ -1803,10 +1803,16 @@ sched_switch(struct thread *td, struct t srqflag = (flags & SW_PREEMPT) ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING; + if (THREAD_CAN_MIGRATE(td) && !THREAD_CAN_SCHED(td, ts->ts_cpu)) + ts->ts_cpu = sched_pickcpu(td, 0); if (ts->ts_cpu == cpuid) tdq_runq_add(tdq, td, srqflag); - else + else { + KASSERT(THREAD_CAN_MIGRATE(td) || + (ts->ts_flags & TSF_BOUND) != 0, + ("Thread %p shouldn't migrate", td)); mtx = sched_switch_migrate(tdq, td, srqflag); + } } else { /* This thread must be going to sleep. */ TDQ_LOCK(tdq); @@ -2389,7 +2395,6 @@ sched_affinity(struct thread *td) { #ifdef SMP struct td_sched *ts; - int cpu; THREAD_LOCK_ASSERT(td, MA_OWNED); ts = td->td_sched; @@ -2403,17 +2408,13 @@ sched_affinity(struct thread *td) if (!TD_IS_RUNNING(td)) return; td->td_flags |= TDF_NEEDRESCHED; - if (!THREAD_CAN_MIGRATE(td)) - return; /* - * Assign the new cpu and force a switch before returning to - * userspace. If the target thread is not running locally send - * an ipi to force the issue. + * Force a switch before returning to userspace. If the + * target thread is not running locally send an ipi to force + * the issue. */ - cpu = ts->ts_cpu; - ts->ts_cpu = sched_pickcpu(td, 0); - if (cpu != PCPU_GET(cpuid)) - ipi_selected(1 << cpu, IPI_PREEMPT); + if (td != curthread) + ipi_selected(1 << ts->ts_cpu, IPI_PREEMPT); #endif } @@ -2430,6 +2431,7 @@ sched_bind(struct thread *td, int cpu) ts = td->td_sched; if (ts->ts_flags & TSF_BOUND) sched_unbind(td); + KASSERT(THREAD_CAN_MIGRATE(td), ("%p must be migratable", td)); ts->ts_flags |= TSF_BOUND; sched_pin(); if (PCPU_GET(cpuid) == cpu) From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:55:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26DF21065697; Wed, 15 Sep 2010 15:55:59 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F07678FC19; Wed, 15 Sep 2010 15:55:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FFtwXw041518; Wed, 15 Sep 2010 15:55:58 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FFtwD1041516; Wed, 15 Sep 2010 15:55:58 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009151555.o8FFtwD1041516@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 15 Sep 2010 15:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212667 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:55:59 -0000 Author: mdf Date: Wed Sep 15 15:55:58 2010 New Revision: 212667 URL: http://svn.freebsd.org/changeset/base/212667 Log: MFC r212115: Fix a bug with sched_affinity() where it checks td_pinned of another thread in a racy manner, which can lead to attempting to migrate a thread that is pinned to a CPU. Instead, have sched_switch() determine which CPU a thread should run on if the current one is not allowed. KASSERT in sched_bind() that the thread is not yet pinned to a CPU. KASSERT in sched_switch() that only migratable threads or those moving due to a sched_bind() are changing CPUs. Note that this is direct commit as ipi_cpu() only exists in CURRENT. Modified: stable/7/sys/kern/sched_ule.c Modified: stable/7/sys/kern/sched_ule.c ============================================================================== --- stable/7/sys/kern/sched_ule.c Wed Sep 15 15:53:05 2010 (r212666) +++ stable/7/sys/kern/sched_ule.c Wed Sep 15 15:55:58 2010 (r212667) @@ -1885,10 +1885,16 @@ sched_switch(struct thread *td, struct t srqflag = (flags & SW_PREEMPT) ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING; + if (THREAD_CAN_MIGRATE(td) && !THREAD_CAN_SCHED(td, ts->ts_cpu)) + ts->ts_cpu = sched_pickcpu(td, 0); if (ts->ts_cpu == cpuid) tdq_add(tdq, td, srqflag); - else + else { + KASSERT(THREAD_CAN_MIGRATE(td) || + (ts->ts_flags & TSF_BOUND) != 0, + ("Thread %p shouldn't migrate", td)); mtx = sched_switch_migrate(tdq, td, srqflag); + } } else { /* This thread must be going to sleep. */ TDQ_LOCK(tdq); @@ -2536,7 +2542,6 @@ sched_affinity(struct thread *td) { #ifdef SMP struct td_sched *ts; - int cpu; THREAD_LOCK_ASSERT(td, MA_OWNED); ts = td->td_sched; @@ -2550,17 +2555,13 @@ sched_affinity(struct thread *td) if (!TD_IS_RUNNING(td)) return; td->td_flags |= TDF_NEEDRESCHED; - if (!THREAD_CAN_MIGRATE(td)) - return; /* - * Assign the new cpu and force a switch before returning to - * userspace. If the target thread is not running locally send - * an ipi to force the issue. - */ - cpu = ts->ts_cpu; - ts->ts_cpu = sched_pickcpu(td, 0); - if (cpu != PCPU_GET(cpuid)) - ipi_selected(1 << cpu, IPI_PREEMPT); + * Force a switch before returning to userspace. If the + * target thread is not running locally send an ipi to force + * the issue. + */ + if (td != curthread) + ipi_selected(1 << ts->ts_cpu, IPI_PREEMPT); #endif } @@ -2577,6 +2578,7 @@ sched_bind(struct thread *td, int cpu) ts = td->td_sched; if (ts->ts_flags & TSF_BOUND) sched_unbind(td); + KASSERT(THREAD_CAN_MIGRATE(td), ("%p must be migratable", td)); ts->ts_flags |= TSF_BOUND; #ifdef SMP sched_pin(); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:05:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D9631065672; Wed, 15 Sep 2010 16:05:41 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 339EB8FC1E; Wed, 15 Sep 2010 16:05:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FG5fTj041810; Wed, 15 Sep 2010 16:05:41 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FG5fAR041803; Wed, 15 Sep 2010 16:05:41 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009151605.o8FG5fAR041803@svn.freebsd.org> From: Martin Matuska Date: Wed, 15 Sep 2010 16:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212668 - in stable/8: . cddl/contrib/opensolaris/cmd/pyzfs cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:05:41 -0000 Author: mm Date: Wed Sep 15 16:05:40 2010 New Revision: 212668 URL: http://svn.freebsd.org/changeset/base/212668 Log: MFC r209962, r211970-r211972, r212050, r212605, r212611 MFC r209962: Merge ZFS version 15 and almost all OpenSolaris bugfixes referenced in Solaris 10 updates 141445-09 and 142901-14. Detailed information: (OpenSolaris revisions and Bug IDs, Solaris 10 patch numbers) 7844:effed23820ae 6755435 zfs_open() and zfs_close() needs to use ZFS_ENTER/ZFS_VERIFY_ZP (141445-01) 7897:e520d8258820 6748436 inconsistent zpool.cache in boot_archive could panic a zfs root filesystem upon boot-up (141445-01) 7965:b795da521357 6740164 zpool attach can create an illegal root pool (141909-02) 8084:b811cc60d650 6769612 zpool_import() will continue to write to cachefile even if altroot is set (N/A) 8121:7fd09d4ebd9c 6757430 want an option for zdb to disable space map loading and leak tracking (141445-01) 8129:e4f45a0bfbb0 6542860 ASSERT: reason != VDEV_LABEL_REMOVE||vdev_inuse(vd, crtxg, reason, 0) (141445-01) 8188:fd00c0a81e80 6761100 want zdb option to select older uberblocks (141445-01) 8190:6eeea43ced42 6774886 zfs_setattr() won't allow ndmp to restore SUNWattr_rw (141445-01) 8225:59a9961c2aeb 6737463 panic while trying to write out config file if root pool import fails (141445-01) 8227:f7d7be9b1f56 6765294 Refactor replay (141445-01) 8228:51e9ca9ee3a5 6572357 libzfs should do more to avoid mnttab lookups (141909-01) 6572376 zfs_iter_filesystems and zfs_iter_snapshots get objset stats twice (141909-01) 8241:5a60f16123ba 6328632 zpool offline is a bit too conservative (141445-01) 6739487 ASSERT: txg <= spa_final_txg due to scrub/export race (141445-01) 6767129 ASSERT: cvd->vdev_isspare, in spa_vdev_detach() (141445-01) 6747698 checksum failures after offline -t / export / import / scrub (141445-01) 6745863 ZFS writes to disk after it has been offlined (141445-01) 6722540 50% slowdown on scrub/resilver with certain vdev configurations (141445-01) 6759999 resilver logic rewrites ditto blocks on both source and destination (141445-01) 6758107 I/O should never suspend during spa_load() (141445-01) 6776548 codereview(1) runs off the page when faced with multi-line comments (N/A) 6761406 AMD errata 91 workaround doesn't work on 64-bit systems (141445-01) 8242:e46e4b2f0a03 6770866 GRUB/ZFS should require physical path or devid, but not both (141445-01) 8269:03a7e9050cfd 6674216 "zfs share" doesn't work, but "zfs set sharenfs=on" does (141445-01) 6621164 $SRC/cmd/zfs/zfs_main.c seems to have a syntax error in the translation note (141445-01) 6635482 i18n problems in libzfs_dataset.c and zfs_main.c (141445-01) 6595194 "zfs get" VALUE column is as wide as NAME (141445-01) 6722991 vdev_disk.c: error checking for ddi_pathname_to_dev_t() must test for NODEV (141445-01) 6396518 ASSERT strings shouldn't be pre-processed (141445-01) 8274:846b39508aff 6713916 scrub/resilver needlessly decompress data (141445-01) 8343:655db2375fed 6739553 libzfs_status msgid table is out of sync (141445-01) 6784104 libzfs unfairly rejects numerical values greater than 2^63 (141445-01) 6784108 zfs_realloc() should not free original memory on failure (141445-01) 8525:e0e0e525d0f8 6788830 set large value to reservation cause core dump (141445-01) 6791064 want sysevents for ZFS scrub (141445-01) 6791066 need to be able to set cachefile on faulted pools (141445-01) 6791071 zpool_do_import() should not enable datasets on faulted pools (141445-01) 6792134 getting multiple properties on a faulted pool leads to confusion (141445-01) 8547:bcc7b46e5ff7 6792884 Vista clients cannot access .zfs (141445-01) 8632:36ef517870a3 6798384 It can take a village to raise a zio (141445-01) 8636:7e4ce9158df3 6551866 deadlock between zfs_write(), zfs_freesp(), and zfs_putapage() (141909-01) 6504953 zfs_getpage() misunderstands VOP_GETPAGE() interface (141909-01) 6702206 ZFS read/writer lock contention throttles sendfile() benchmark (141445-01) 6780491 Zone on a ZFS filesystem has poor fork/exec performance (141445-01) 6747596 assertion failed: DVA_EQUAL(BP_IDENTITY(&zio->io_bp_orig), BP_IDENTITY(zio->io_bp))); (141445-01) 8692:692d4668b40d 6801507 ZFS read aggregation should not mind the gap (141445-01) 8697:e62d2612c14d 6633095 creating a filesystem with many properties set is slow (141445-01) 8768:dfecfdbb27ed 6775697 oracle crashes when overwriting after hitting quota on zfs (141909-01) 8811:f8deccf701cf 6790687 libzfs mnttab caching ignores external changes (141445-01) 6791101 memory leak from libzfs_mnttab_init (141445-01) 8845:91af0d9c0790 6800942 smb_session_create() incorrectly stores IP addresses (N/A) 6582163 Access Control List (ACL) for shares (141445-01) 6804954 smb_search - shortname field should be space padded following the NULL terminator (N/A) 6800184 Panic at smb_oplock_conflict+0x35() (N/A) 8876:59d2e67b4b65 6803822 Reboot after replacement of system disk in a ZFS mirror drops to grub> prompt (141445-01) 8924:5af812f84759 6789318 coredump when issue zdb -uuuu poolname/ (141445-01) 6790345 zdb -dddd -e poolname coredump (141445-01) 6797109 zdb: 'zdb -dddddd pool_name/fs_name inode' coredump if the file with inode was deleted (141445-01) 6797118 zdb: 'zdb -dddddd poolname inum' coredump if I miss the fs name (141445-01) 6803343 shareiscsi=on failed, iscsitgtd failed request to share (141445-01) 9030:243fd360d81f 6815893 hang mounting a dataset after booting into a new boot environment (141445-01) 9056:826e1858a846 6809691 'zpool create -f' no longer overwrites ufs infomation (141445-01) 9179:d8fbd96b79b3 6790064 zfs needs to determine uid and gid earlier in create process (141445-01) 9214:8d350e5d04aa 6604992 forced unmount + being in .zfs/snapshot/ = not happy (141909-01) 6810367 assertion failed: dvp->v_flag & VROOT, file: ../../common/fs/gfs.c, line: 426 (141909-01) 9229:e3f8b41e5db4 6807765 ztest_dsl_dataset_promote_busy needs to clean up after ENOSPC (141445-01) 9230:e4561e3eb1ef 6821169 offlining a device results in checksum errors (141445-01) 6821170 ZFS should not increment error stats for unavailable devices (141445-01) 6824006 need to increase issue and interrupt taskqs threads in zfs (141445-01) 9234:bffdc4fc05c4 6792139 recovering from a suspended pool needs some work (141445-01) 6794830 reboot command hangs on a failed zfs pool (141445-01) 9246:67c03c93c071 6824062 System panicked in zfs_mount due to NULL pointer dereference when running btts and svvs tests (141909-01) 9276:a8a7fc849933 6816124 System crash running zpool destroy on broken zpool (141445-03) 9355:09928982c591 6818183 zfs snapshot -r is slow due to set_snap_props() doing txg_wait_synced() for each new snapshot (141445-03) 9391:413d0661ef33 6710376 log device can show incorrect status when other parts of pool are degraded (141445-03) 9396:f41cf682d0d3 (part already merged) 6501037 want user/group quotas on ZFS (141445-03) 6827260 assertion failed in arc_read(): hdr == pbuf->b_hdr (141445-03) 6815592 panic: No such hold X on refcount Y from zfs_znode_move (141445-03) 6759986 zfs list shows temporary %clone when doing online zfs recv (141445-03) 9404:319573cd93f8 6774713 zfs ignores canmount=noauto when sharenfs property != off (141445-03) 9412:4aefd8704ce0 6717022 ZFS DMU needs zero-copy support (141445-03) 9425:e7ffacaec3a8 6799895 spa_add_spares() needs to be protected by config lock (141445-03) 6826466 want to post sysevents on hot spare activation (141445-03) 6826468 spa 'allowfaulted' needs some work (141445-03) 6826469 kernel support for storing vdev FRU information (141445-03) 6826470 skip posting checksum errors from DTL regions of leaf vdevs (141445-03) 6826471 I/O errors after device remove probe can confuse FMA (141445-03) 6826472 spares should enjoy some of the benefits of cache devices (141445-03) 9443:2a96d8478e95 6833711 gang leaders shouldn't have to be logical (141445-03) 9463:d0bd231c7518 6764124 want zdb to be able to checksum metadata blocks only (141445-03) 9465:8372081b8019 6830237 zfs panic in zfs_groupmember() (141445-03) 9466:1fdfd1fed9c4 6833162 phantom log device in zpool status (141445-03) 9469:4f68f041ddcd 6824968 add ZFS userquota support to rquotad (141445-03) 9470:6d827468d7b5 6834217 godfather I/O should reexecute (141445-03) 9480:fcff33da767f 6596237 Stop looking and start ganging (141909-02) 9493:9933d599bc93 6623978 lwb->lwb_buf != NULL, file ../../../uts/common/fs/zfs/zil.c, line 787, function zil_lwb_commit (141445-06) 9512:64cafcbcc337 6801810 Commit of aligned streaming rewrites to ZIL device causes unwanted disk reads (N/A) 9515:d3b739d9d043 6586537 async zio taskqs can block out userland commands (142901-09) 9554:787363635b6a 6836768 zfs_userspace() callback has no way to indicate failure (N/A) 9574:1eb6a6ab2c57 6838062 zfs panics when an error is encountered in space_map_load() (141909-02) 9583:b0696cd037cc 6794136 Panic BAD TRAP: type=e when importing degraded zraid pool. (141909-03) 9630:e25a03f552e0 6776104 "zfs import" deadlock between spa_unload() and spa_async_thread() (141445-06) 9653:a70048a304d1 6664765 Unable to remove files when using fat-zap and quota exceeded on ZFS filesystem (141445-06) 9688:127be1845343 6841321 zfs userspace / zfs get userused@ doesn't work on mounted snapshot (N/A) 6843069 zfs get userused@S-1-... doesn't work (N/A) 9873:8ddc892eca6e 6847229 assertion failed: refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite in dmu_tx.c (141445-06) 9904:d260bd3fd47c 6838344 kernel heap corruption detected on zil while stress testing (141445-06) 9951:a4895b3dd543 6844900 zfs_ioc_userspace_upgrade leaks (N/A) 10040:38b25aeeaf7a 6857012 zfs panics on zpool import (141445-06) 10000:241a51d8720c 6848242 zdb -e no longer works as expected (N/A) 10100:4a6965f6bef8 6856634 snv_117 not booting: zfs_parse_bootfs: error2 (141445-07) 10160:a45b03783d44 6861983 zfs should use new name <-> SID interfaces (N/A) 6862984 userquota commands can hang (141445-06) 10299:80845694147f 6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (N/A) 10302:a9e3d1987706 6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (fix lint) (N/A) 10575:2a8816c5173b (partial merge) 6882227 spa_async_remove() shouldn't do a full clear (142901-14) 10800:469478b180d9 6880764 fsync on zfs is broken if writes are greater than 32kb on a hard crash and no log attached (142901-09) 6793430 zdb -ivvvv assertion failure: bp->blk_cksum.zc_word[2] == dmu_objset_id(zilog->zl_os) (N/A) 10801:e0bf032e8673 (partial merge) 6822816 assertion failed: zap_remove_int(ds_next_clones_obj) returns ENOENT (142901-09) 10810:b6b161a6ae4a 6892298 buf->b_hdr->b_state != arc_anon, file: ../../common/fs/zfs/arc.c, line: 2849 (142901-09) 10890:499786962772 6807339 spurious checksum errors when replacing a vdev (142901-13) 11249:6c30f7dfc97b 6906110 bad trap panic in zil_replay_log_record (142901-13) 6906946 zfs replay isn't handling uid/gid correctly (142901-13) 11454:6e69bacc1a5a 6898245 suspended zpool should not cause rest of the zfs/zpool commands to hang (142901-10) 11546:42ea6be8961b (partial merge) 6833999 3-way deadlock in dsl_dataset_hold_ref() and dsl_sync_task_group_sync() (142901-09) MFC r211970: Fix 'zfs allow' (maybe not only) returning: cannot access dataset system/usr/home: Operation not supported by including libzfs_impl.h. What libzfs_impl.h does is to redefine ioctl() to be compatible with OpenSolaris. More specifically OpenSolaris returns ENOMEM when buffer is too small and sets field zc_nvlist_dst_size to the size that will be big enough for the data. In FreeBSD case ioctl() doesn't copy data structure back in case of a failure. We work-around it in kernel and libzfs by returning 0 from ioctl() and always checking if zc_nvlist_dst_size hasn't changed. For this work-around to work in pyzfs we need this compatible ioctl() which is implemented in libzfs_impl.h. MFC r211971: Print errors on stderr. MFC r211972: Give user a hint what to do when /usr/lib/zfs/pyzfs.py is missing. MFC r212050: When upgrading a pool which contain root file system, give user a hint that he should update boot code. MFC r212605: Add missing vop_vector zfsctl_ops_shares Add missing locks around VOP_READDIR and VOP_GETATTR with z_shares_dir MFC r212611: Remove duplicated VFS_HOLD due to a mismerge. Approved by: delphij (mentor) Obtained from: OpenSolaris (multiple Bug IDs), Perforce (pjd) Added: stable/8/cddl/contrib/opensolaris/cmd/pyzfs/ - copied from r209962, head/cddl/contrib/opensolaris/cmd/pyzfs/ stable/8/cddl/contrib/opensolaris/lib/pyzfs/ - copied from r209962, head/cddl/contrib/opensolaris/lib/pyzfs/ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c - copied unchanged from r209962, head/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c Modified: stable/8/UPDATING stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/8/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/8/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c stable/8/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c stable/8/sys/cddl/boot/zfs/zfsimpl.h stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c stable/8/sys/cddl/compat/opensolaris/sys/misc.h stable/8/sys/cddl/compat/opensolaris/sys/policy.h stable/8/sys/cddl/compat/opensolaris/sys/sid.h stable/8/sys/cddl/compat/opensolaris/sys/uio.h stable/8/sys/cddl/compat/opensolaris/sys/vnode.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.c stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/8/sys/cddl/contrib/opensolaris/common/zfs/zprop_common.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_fuid.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fm/fs/zfs.h stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h stable/8/sys/modules/zfs/Makefile Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Wed Sep 15 15:55:58 2010 (r212667) +++ stable/8/UPDATING Wed Sep 15 16:05:40 2010 (r212668) @@ -15,6 +15,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100915: + A new version of ZFS (version 15) has been merged. + This version uses a python library for the following subcommands: + zfs allow, zfs unallow, zfs groupspace, zfs userspace. + For full functionality of these commands the following port must + be installed: sysutils/py-zfs + 20100720: 8.1-RELEASE. @@ -1558,6 +1565,22 @@ COMMON ITEMS: Please try this approach before reporting problems with a major version upgrade. + ZFS notes + --------- + When upgrading the boot ZFS pool to a new version, always follow + these two steps: + + 1.) recompile and reinstall the ZFS boot loader and boot block + (this is part of "make buildworld" and "make installworld") + + 2.) update the ZFS boot block on your boot drive + + The following example updates the ZFS boot block on the first + partition (freebsd-boot) of a GPT partitioned drive ad0: + "gpart bootcode -p /boot/gptzfsboot -i 1 ad0" + + Non-boot pools do not need these updates. + To build a kernel ----------------- If you are updating from a prior version of FreeBSD (even one just Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Wed Sep 15 15:55:58 2010 (r212667) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Wed Sep 15 16:05:40 2010 (r212668) @@ -1,23 +1,8 @@ '\" te -.\" CDDL HEADER START -.\" -.\" The contents of this file are subject to the terms of the -.\" Common Development and Distribution License (the "License"). -.\" You may not use this file except in compliance with the License. -.\" -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -.\" or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions -.\" and limitations under the License. -.\" -.\" When distributing Covered Code, include this CDDL HEADER in each -.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. -.\" If applicable, add the following below this CDDL HEADER, with the -.\" fields enclosed by brackets "[]" replaced with your own identifying -.\" information: Portions Copyright [yyyy] [name of copyright owner] -.\" -.\" CDDL HEADER END .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH zdb 1M "31 Oct 2005" "SunOS 5.11" "System Administration Commands" .SH NAME zdb \- ZFS debugger Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Sep 15 15:55:58 2010 (r212667) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Sep 15 16:05:40 2010 (r212668) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -87,8 +87,8 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-udibcsv] [-U cachefile_path] " - "[-S user:cksumalg] " + "Usage: %s [-udibcsvL] [-U cachefile_path] [-t txg]\n" + "\t [-S user:cksumalg] " "dataset [object...]\n" " %s -C [pool]\n" " %s -l dev\n" @@ -102,12 +102,16 @@ usage(void) (void) fprintf(stderr, " -C cached pool configuration\n"); (void) fprintf(stderr, " -i intent logs\n"); (void) fprintf(stderr, " -b block statistics\n"); - (void) fprintf(stderr, " -c checksum all data blocks\n"); + (void) fprintf(stderr, " -m metaslabs\n"); + (void) fprintf(stderr, " -c checksum all metadata (twice for " + "all data) blocks\n"); (void) fprintf(stderr, " -s report stats on zdb's I/O\n"); (void) fprintf(stderr, " -S : -- " "dump blkptr signatures\n"); (void) fprintf(stderr, " -v verbose (applies to all others)\n"); (void) fprintf(stderr, " -l dump label contents\n"); + (void) fprintf(stderr, " -L disable leak tracking (do not " + "load spacemaps)\n"); (void) fprintf(stderr, " -U cachefile_path -- use alternate " "cachefile\n"); (void) fprintf(stderr, " -R read and display block from a " @@ -115,12 +119,19 @@ usage(void) (void) fprintf(stderr, " -e Pool is exported/destroyed/" "has altroot\n"); (void) fprintf(stderr, " -p (use with -e)\n"); + (void) fprintf(stderr, " -t highest txg to use when " + "searching for uberblocks\n"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " "to make only that option verbose\n"); (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); exit(1); } +/* + * Called for usage errors that are discovered after a call to spa_open(), + * dmu_bonus_hold(), or pool_match(). abort() is called for other errors. + */ + static void fatal(const char *fmt, ...) { @@ -132,7 +143,7 @@ fatal(const char *fmt, ...) va_end(ap); (void) fprintf(stderr, "\n"); - abort(); + exit(1); } static void @@ -205,7 +216,7 @@ dump_packed_nvlist(objset_t *os, uint64_ size_t nvsize = *(uint64_t *)data; char *packed = umem_alloc(nvsize, UMEM_NOFAIL); - VERIFY(0 == dmu_read(os, object, 0, nvsize, packed)); + VERIFY(0 == dmu_read(os, object, 0, nvsize, packed, DMU_READ_PREFETCH)); VERIFY(nvlist_unpack(packed, nvsize, &nv, 0) == 0); @@ -431,7 +442,7 @@ dump_spacemap(objset_t *os, space_map_ob alloc = 0; for (offset = 0; offset < smo->smo_objsize; offset += sizeof (entry)) { VERIFY(0 == dmu_read(os, smo->smo_object, offset, - sizeof (entry), &entry)); + sizeof (entry), &entry, DMU_READ_PREFETCH)); if (SM_DEBUG_DECODE(entry)) { (void) printf("\t\t[%4llu] %s: txg %llu, pass %llu\n", (u_longlong_t)(offset / sizeof (entry)), @@ -463,6 +474,21 @@ dump_spacemap(objset_t *os, space_map_ob } static void +dump_metaslab_stats(metaslab_t *msp) +{ + char maxbuf[5]; + space_map_t *sm = &msp->ms_map; + avl_tree_t *t = sm->sm_pp_root; + int free_pct = sm->sm_space * 100 / sm->sm_size; + + nicenum(space_map_maxsize(sm), maxbuf); + + (void) printf("\t %20s %10lu %7s %6s %4s %4d%%\n", + "segments", avl_numnodes(t), "maxsize", maxbuf, + "freepct", free_pct); +} + +static void dump_metaslab(metaslab_t *msp) { char freebuf[5]; @@ -472,22 +498,28 @@ dump_metaslab(metaslab_t *msp) nicenum(msp->ms_map.sm_size - smo->smo_alloc, freebuf); - if (dump_opt['d'] <= 5) { - (void) printf("\t%10llx %10llu %5s\n", - (u_longlong_t)msp->ms_map.sm_start, - (u_longlong_t)smo->smo_object, - freebuf); - return; - } - (void) printf( - "\tvdev %llu offset %08llx spacemap %4llu free %5s\n", + "\tvdev %5llu offset %12llx spacemap %6llu free %5s\n", (u_longlong_t)vd->vdev_id, (u_longlong_t)msp->ms_map.sm_start, (u_longlong_t)smo->smo_object, freebuf); - ASSERT(msp->ms_map.sm_size == (1ULL << vd->vdev_ms_shift)); + if (dump_opt['m'] > 1) { + mutex_enter(&msp->ms_lock); + VERIFY(space_map_load(&msp->ms_map, zfs_metaslab_ops, + SM_FREE, &msp->ms_smo, spa->spa_meta_objset) == 0); + dump_metaslab_stats(msp); + space_map_unload(&msp->ms_map); + mutex_exit(&msp->ms_lock); + } + + if (dump_opt['d'] > 5 || dump_opt['m'] > 2) { + ASSERT(msp->ms_map.sm_size == (1ULL << vd->vdev_ms_shift)); + + mutex_enter(&msp->ms_lock); + dump_spacemap(spa->spa_meta_objset, smo, &msp->ms_map); + mutex_exit(&msp->ms_lock); + } - dump_spacemap(spa->spa_meta_objset, smo, &msp->ms_map); } static void @@ -502,14 +534,12 @@ dump_metaslabs(spa_t *spa) for (c = 0; c < rvd->vdev_children; c++) { vd = rvd->vdev_child[c]; - (void) printf("\n vdev %llu\n\n", (u_longlong_t)vd->vdev_id); + (void) printf("\t%-10s %-19s %-15s %-10s\n", + "vdev", "offset", "spacemap", "free"); + (void) printf("\t%10s %19s %15s %10s\n", + "----------", "-------------------", + "---------------", "-------------"); - if (dump_opt['d'] <= 5) { - (void) printf("\t%10s %10s %5s\n", - "offset", "spacemap", "free"); - (void) printf("\t%10s %10s %5s\n", - "------", "--------", "----"); - } for (m = 0; m < vd->vdev_ms_count; m++) dump_metaslab(vd->vdev_ms[m]); (void) printf("\n"); @@ -517,44 +547,52 @@ dump_metaslabs(spa_t *spa) } static void +dump_dtl_seg(space_map_t *sm, uint64_t start, uint64_t size) +{ + char *prefix = (void *)sm; + + (void) printf("%s [%llu,%llu) length %llu\n", + prefix, + (u_longlong_t)start, + (u_longlong_t)(start + size), + (u_longlong_t)(size)); +} + +static void dump_dtl(vdev_t *vd, int indent) { - avl_tree_t *t = &vd->vdev_dtl_map.sm_root; - space_seg_t *ss; - vdev_t *pvd; - int c; + spa_t *spa = vd->vdev_spa; + boolean_t required; + char *name[DTL_TYPES] = { "missing", "partial", "scrub", "outage" }; + char prefix[256]; + + spa_vdev_state_enter(spa); + required = vdev_dtl_required(vd); + (void) spa_vdev_state_exit(spa, NULL, 0); if (indent == 0) (void) printf("\nDirty time logs:\n\n"); - (void) printf("\t%*s%s\n", indent, "", + (void) printf("\t%*s%s [%s]\n", indent, "", vd->vdev_path ? vd->vdev_path : - vd->vdev_parent ? vd->vdev_ops->vdev_op_type : - spa_name(vd->vdev_spa)); - - for (ss = avl_first(t); ss; ss = AVL_NEXT(t, ss)) { - /* - * Everything in this DTL must appear in all parent DTL unions. - */ - for (pvd = vd; pvd; pvd = pvd->vdev_parent) - ASSERT(vdev_dtl_contains(&pvd->vdev_dtl_map, - ss->ss_start, ss->ss_end - ss->ss_start)); - (void) printf("\t%*soutage [%llu,%llu] length %llu\n", - indent, "", - (u_longlong_t)ss->ss_start, - (u_longlong_t)ss->ss_end - 1, - (u_longlong_t)(ss->ss_end - ss->ss_start)); - } - - (void) printf("\n"); + vd->vdev_parent ? vd->vdev_ops->vdev_op_type : spa_name(spa), + required ? "DTL-required" : "DTL-expendable"); - if (dump_opt['d'] > 5 && vd->vdev_children == 0) { - dump_spacemap(vd->vdev_spa->spa_meta_objset, &vd->vdev_dtl, - &vd->vdev_dtl_map); - (void) printf("\n"); + for (int t = 0; t < DTL_TYPES; t++) { + space_map_t *sm = &vd->vdev_dtl[t]; + if (sm->sm_space == 0) + continue; + (void) snprintf(prefix, sizeof (prefix), "\t%*s%s", + indent + 2, "", name[t]); + mutex_enter(sm->sm_lock); + space_map_walk(sm, dump_dtl_seg, (void *)prefix); + mutex_exit(sm->sm_lock); + if (dump_opt['d'] > 5 && vd->vdev_children == 0) + dump_spacemap(spa->spa_meta_objset, + &vd->vdev_dtl_smo, sm); } - for (c = 0; c < vd->vdev_children; c++) + for (int c = 0; c < vd->vdev_children; c++) dump_dtl(vd->vdev_child[c], indent + 4); } @@ -668,7 +706,8 @@ visit_indirect(spa_t *spa, const dnode_p break; fill += cbp->blk_fill; } - ASSERT3U(fill, ==, bp->blk_fill); + if (!err) + ASSERT3U(fill, ==, bp->blk_fill); (void) arc_buf_remove_ref(buf, &buf); } @@ -904,6 +943,7 @@ dump_uidgid(objset_t *os, znode_phys_t * /* first find the fuid object. It lives in the master node */ VERIFY(zap_lookup(os, MASTER_NODE_OBJ, ZFS_FUID_TABLES, 8, 1, &fuid_obj) == 0); + zfs_fuid_avl_tree_create(&idx_tree, &domain_tree); (void) zfs_fuid_table_load(os, fuid_obj, &idx_tree, &domain_tree); fuid_table_loaded = B_TRUE; @@ -1007,6 +1047,8 @@ static object_viewer_t *object_viewer[DM dump_packed_nvlist, /* FUID nvlist size */ dump_zap, /* DSL dataset next clones */ dump_zap, /* DSL scrub queue */ + dump_zap, /* ZFS user/group used */ + dump_zap, /* ZFS user/group quota */ }; static void @@ -1070,6 +1112,14 @@ dump_object(objset_t *os, uint64_t objec } if (verbosity >= 4) { + (void) printf("\tdnode flags: %s%s\n", + (dn->dn_phys->dn_flags & DNODE_FLAG_USED_BYTES) ? + "USED_BYTES " : "", + (dn->dn_phys->dn_flags & DNODE_FLAG_USERUSED_ACCOUNTED) ? + "USERUSED_ACCOUNTED " : ""); + (void) printf("\tdnode maxblkid: %llu\n", + (longlong_t)dn->dn_phys->dn_maxblkid); + object_viewer[doi.doi_bonus_type](os, object, bonus, bsize); object_viewer[doi.doi_type](os, object, NULL, 0); *print_header = 1; @@ -1124,7 +1174,7 @@ dump_dir(objset_t *os) uint64_t object, object_count; uint64_t refdbytes, usedobjs, scratch; char numbuf[8]; - char blkbuf[BP_SPRINTF_LEN]; + char blkbuf[BP_SPRINTF_LEN + 20]; char osname[MAXNAMELEN]; char *type = "UNKNOWN"; int verbosity = dump_opt['d']; @@ -1150,8 +1200,8 @@ dump_dir(objset_t *os) nicenum(refdbytes, numbuf); if (verbosity >= 4) { - (void) strcpy(blkbuf, ", rootbp "); - sprintf_blkptr(blkbuf + strlen(blkbuf), + (void) sprintf(blkbuf + strlen(blkbuf), ", rootbp "); + (void) sprintf_blkptr(blkbuf + strlen(blkbuf), BP_SPRINTF_LEN - strlen(blkbuf), os->os->os_rootbp); } else { blkbuf[0] = '\0'; @@ -1186,7 +1236,12 @@ dump_dir(objset_t *os) } dump_object(os, 0, verbosity, &print_header); - object_count = 1; + object_count = 0; + if (os->os->os_userused_dnode && + os->os->os_userused_dnode->dn_type != 0) { + dump_object(os, DMU_USERUSED_OBJECT, verbosity, &print_header); + dump_object(os, DMU_GROUPUSED_OBJECT, verbosity, &print_header); + } object = 0; while ((error = dmu_object_next(os, &object, B_FALSE, 0)) == 0) { @@ -1198,8 +1253,10 @@ dump_dir(objset_t *os) (void) printf("\n"); - if (error != ESRCH) - fatal("dmu_object_next() = %d", error); + if (error != ESRCH) { + (void) fprintf(stderr, "dmu_object_next() = %d\n", error); + abort(); + } } static void @@ -1390,7 +1447,8 @@ static space_map_ops_t zdb_space_map_ops zdb_space_map_unload, NULL, /* alloc */ zdb_space_map_claim, - NULL /* free */ + NULL, /* free */ + NULL /* maxsize */ }; static void @@ -1489,8 +1547,9 @@ zdb_count_block(spa_t *spa, zdb_cb_t *zc } } - VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp, - NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0); + if (!dump_opt['L']) + VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp, + NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0); } static int @@ -1499,13 +1558,25 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, { zdb_cb_t *zcb = arg; char blkbuf[BP_SPRINTF_LEN]; + dmu_object_type_t type; + boolean_t is_l0_metadata; if (bp == NULL) return (0); - zdb_count_block(spa, zcb, bp, BP_GET_TYPE(bp)); + type = BP_GET_TYPE(bp); + + zdb_count_block(spa, zcb, bp, type); - if (dump_opt['c'] || dump_opt['S']) { + /* + * if we do metadata-only checksumming there's no need to checksum + * indirect blocks here because it is done during traverse + */ + is_l0_metadata = (BP_GET_LEVEL(bp) == 0 && type < DMU_OT_NUMTYPES && + dmu_ot[type].ot_metadata); + + if (dump_opt['c'] > 1 || dump_opt['S'] || + (dump_opt['c'] && is_l0_metadata)) { int ioerr, size; void *data; @@ -1517,7 +1588,7 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, free(data); /* We expect io errors on intent log */ - if (ioerr && BP_GET_TYPE(bp) != DMU_OT_INTENT_LOG) { + if (ioerr && type != DMU_OT_INTENT_LOG) { zcb->zcb_haderrors = 1; zcb->zcb_errors[ioerr]++; @@ -1565,9 +1636,12 @@ dump_block_stats(spa_t *spa) int c, e; if (!dump_opt['S']) { - (void) printf("\nTraversing all blocks to %sverify" - " nothing leaked ...\n", - dump_opt['c'] ? "verify checksums and " : ""); + (void) printf("\nTraversing all blocks %s%s%s%s%s...\n", + (dump_opt['c'] || !dump_opt['L']) ? "to verify " : "", + (dump_opt['c'] == 1) ? "metadata " : "", + dump_opt['c'] ? "checksums " : "", + (dump_opt['c'] && !dump_opt['L']) ? "and verify " : "", + !dump_opt['L'] ? "nothing leaked " : ""); } /* @@ -1578,7 +1652,8 @@ dump_block_stats(spa_t *spa) * it's not part of any space map) is a double allocation, * reference to a freed block, or an unclaimed log block. */ - zdb_leak_init(spa); + if (!dump_opt['L']) + zdb_leak_init(spa); /* * If there's a deferred-free bplist, process that first. @@ -1620,7 +1695,8 @@ dump_block_stats(spa_t *spa) /* * Report any leaked segments. */ - zdb_leak_fini(spa); + if (!dump_opt['L']) + zdb_leak_fini(spa); /* * If we're interested in printing out the blkptr signatures, @@ -1646,14 +1722,16 @@ dump_block_stats(spa_t *spa) tzb = &zcb.zcb_type[ZB_TOTAL][DMU_OT_TOTAL]; if (tzb->zb_asize == alloc + logalloc) { - (void) printf("\n\tNo leaks (block sum matches space" - " maps exactly)\n"); + if (!dump_opt['L']) + (void) printf("\n\tNo leaks (block sum matches space" + " maps exactly)\n"); } else { (void) printf("block traversal size %llu != alloc %llu " - "(leaked %lld)\n", + "(%s %lld)\n", (u_longlong_t)tzb->zb_asize, (u_longlong_t)alloc + logalloc, - (u_longlong_t)(alloc + logalloc - tzb->zb_asize)); + (dump_opt['L']) ? "unreachable" : "leaked", + (longlong_t)(alloc + logalloc - tzb->zb_asize)); leaks = 1; } @@ -1760,14 +1838,17 @@ dump_zpool(spa_t *spa) if (dump_opt['u']) dump_uberblock(&spa->spa_uberblock); - if (dump_opt['d'] || dump_opt['i']) { + if (dump_opt['d'] || dump_opt['i'] || dump_opt['m']) { dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { dump_bplist(dp->dp_meta_objset, spa->spa_sync_bplist_obj, "Deferred frees"); dump_dtl(spa->spa_root_vdev, 0); - dump_metaslabs(spa); } + + if (dump_opt['d'] >= 3 || dump_opt['m']) + dump_metaslabs(spa); + (void) dmu_objset_find(spa_name(spa), dump_one_dir, NULL, DS_FIND_SNAPSHOTS | DS_FIND_CHILDREN); } @@ -2243,13 +2324,14 @@ main(int argc, char **argv) dprintf_setup(&argc, argv); - while ((c = getopt(argc, argv, "udibcsvCS:U:lRep:")) != -1) { + while ((c = getopt(argc, argv, "udibcmsvCLS:U:lRep:t:")) != -1) { switch (c) { case 'u': case 'd': case 'i': case 'b': case 'c': + case 'm': case 's': case 'C': case 'l': @@ -2257,6 +2339,9 @@ main(int argc, char **argv) dump_opt[c]++; dump_all = 0; break; + case 'L': + dump_opt[c]++; + break; case 'v': verbose++; break; @@ -2287,6 +2372,14 @@ main(int argc, char **argv) else usage(); break; + case 't': + ub_max_txg = strtoull(optarg, NULL, 0); + if (ub_max_txg < TXG_INITIAL) { + (void) fprintf(stderr, "incorrect txg " + "specified: %s\n", optarg); + usage(); + } + break; default: usage(); break; @@ -2374,7 +2467,7 @@ main(int argc, char **argv) } if (error == 0) - error = spa_import_faulted(argv[0], + error = spa_import_verbatim(argv[0], exported_conf, nvl); nvlist_free(nvl); Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Wed Sep 15 15:55:58 2010 (r212667) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Wed Sep 15 16:05:40 2010 (r212668) @@ -115,7 +115,7 @@ zil_prt_rec_write(zilog_t *zilog, int tx (u_longlong_t)lr->lr_foid, (longlong_t)lr->lr_offset, (u_longlong_t)lr->lr_length, (u_longlong_t)lr->lr_blkoff); - if (verbose < 5) + if (txtype == TX_WRITE2 || verbose < 5) return; if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) { @@ -123,18 +123,19 @@ zil_prt_rec_write(zilog_t *zilog, int tx bp->blk_birth >= spa_first_txg(zilog->zl_spa) ? "will claim" : "won't claim"); print_log_bp(bp, "\t\t\t"); + if (BP_IS_HOLE(bp)) { + (void) printf("\t\t\tLSIZE 0x%llx\n", + (u_longlong_t)BP_GET_LSIZE(bp)); + } if (bp->blk_birth == 0) { bzero(buf, sizeof (buf)); } else { zbookmark_t zb; - ASSERT3U(bp->blk_cksum.zc_word[ZIL_ZC_OBJSET], ==, - dmu_objset_id(zilog->zl_os)); - - zb.zb_objset = bp->blk_cksum.zc_word[ZIL_ZC_OBJSET]; - zb.zb_object = 0; - zb.zb_level = -1; - zb.zb_blkid = bp->blk_cksum.zc_word[ZIL_ZC_SEQ]; + zb.zb_objset = dmu_objset_id(zilog->zl_os); + zb.zb_object = lr->lr_foid; + zb.zb_level = 0; + zb.zb_blkid = -1; /* unknown */ error = zio_wait(zio_read(NULL, zilog->zl_spa, bp, buf, BP_GET_LSIZE(bp), NULL, NULL, @@ -251,6 +252,7 @@ static zil_rec_info_t zil_rec_info[TX_MA { zil_prt_rec_create, "TX_MKDIR_ACL " }, { zil_prt_rec_create, "TX_MKDIR_ATTR " }, { zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " }, + { zil_prt_rec_write, "TX_WRITE2 " }, }; /* ARGSUSED */ Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 15 15:55:58 2010 (r212667) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 15 16:05:40 2010 (r212668) @@ -1,9 +1,12 @@ '\" te .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH zfs 1M "14 Feb 2009" "SunOS 5.11" "System Administration Commands" +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH zfs 1M "5 May 2009" "SunOS 5.11" "System Administration Commands" .SH NAME zfs \- configures ZFS file systems .SH SYNOPSIS @@ -66,7 +69,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBlist\fR [\fB-rH\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] +\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... .fi @@ -77,8 +80,8 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBget\fR [\fB-rHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] - \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... +\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] + "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... .fi .LP @@ -98,6 +101,18 @@ zfs \- configures ZFS file systems .LP .nf +\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf \fBzfs\fR \fBmount\fR .fi @@ -128,12 +143,17 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBreceive\fR [\fB-vnF\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR +\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR .fi .LP .nf -\fBzfs\fR \fBreceive\fR [\fB-vnF\fR] \fB-d\fR \fIfilesystem\fR +\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fB-d\fR \fIfilesystem\fR +.fi + +.LP +.nf +\fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR .fi .LP @@ -192,7 +212,7 @@ pool/{filesystem,volume,snapshot} .sp .LP -where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes). +\&...where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes). .sp .LP A dataset can be one of the following: @@ -215,7 +235,7 @@ A \fBZFS\fR dataset of type "filesystem" .ad .sp .6 .RS 4n -A logical volume exported as a raw or block device. This type of dataset should only be used under special circumstances. File systems are typically used in most environments. Volumes cannot be used in a non-global zone. +A logical volume exported as a raw or block device. This type of dataset should only be used under special circumstances. File systems are typically used in most environments. .RE .sp @@ -268,88 +288,88 @@ Creating a \fBZFS\fR file system is a si By default, file systems are mounted under \fB/\fIpath\fR\fR, where \fIpath\fR is the name of the file system in the \fBZFS\fR namespace. Directories are created and destroyed as needed. .sp .LP -A file system can also have a mount point set in the "mountpoint" property. This directory is created as needed, and \fBZFS\fR automatically mounts the file system when the "\fBzfs mount -a\fR" command is invoked (without editing \fB/etc/vfstab\fR). The mountpoint property can be inherited, so if \fBpool/home\fR has a mount point of \fB/export/stuff\fR, then \fBpool/home/user\fR automatically inherits a mount point of \fB/export/stuff/user\fR. +A file system can also have a mount point set in the \fBmountpoint\fR property. This directory is created as needed, and \fBZFS\fR automatically mounts the file system when the \fBzfs mount -a\fR command is invoked (without editing \fB/etc/vfstab\fR). The \fBmountpoint\fR property can be inherited, so if \fBpool/home\fR has a mount point of \fB/export/stuff\fR, then \fBpool/home/user\fR automatically inherits a mount point of \fB/export/stuff/user\fR. .sp .LP -A file system mountpoint property of "none" prevents the file system from being mounted. +A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system from being mounted. .sp .LP -If needed, \fBZFS\fR file systems can also be managed with traditional tools (\fBmount\fR, \fBumount\fR, \fB/etc/vfstab\fR). If a file system's mount point is set to "legacy", \fBZFS\fR makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system. +If needed, \fBZFS\fR file systems can also be managed with traditional tools (\fBmount\fR, \fBumount\fR, \fB/etc/vfstab\fR). If a file system's mount point is set to \fBlegacy\fR, \fBZFS\fR makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system. .SS "Zones" .sp .LP -A \fBZFS\fR file system can be added to a non-global zone by using zonecfg's "\fBadd fs\fR" subcommand. A \fBZFS\fR file system that is added to a non-global zone must have its mountpoint property set to legacy. +A \fBZFS\fR file system can be added to a non-global zone by using the \fBzonecfg\fR \fBadd fs\fR subcommand. A \fBZFS\fR file system that is added to a non-global zone must have its \fBmountpoint\fR property set to \fBlegacy\fR. .sp .LP The physical properties of an added file system are controlled by the global administrator. However, the zone administrator can create, modify, or destroy files within the added file system, depending on how the file system is mounted. .sp .LP -A dataset can also be delegated to a non-global zone by using zonecfg's "\fBadd dataset\fR" subcommand. You cannot delegate a dataset to one zone and the children of the same dataset to another zone. The zone administrator can change properties of the dataset or any of its children. However, the "quota" property is controlled by the global administrator. +A dataset can also be delegated to a non-global zone by using \fBzonecfg\fR \fBadd dataset\fR subcommand. You cannot delegate a dataset to one zone and the children of the same dataset to another zone. The zone administrator can change properties of the dataset or any of its children. However, the \fBquota\fR property is controlled by the global administrator. .sp .LP -A \fBZFS\fR volume can be added as a device to a non-global zone by using zonecfg's "\fBadd device\fR" subcommand. However, its physical properties can only be modified by the global administrator. +A \fBZFS\fR volume can be added as a device to a non-global zone by using \fBzonecfg\fR \fBadd device\fR subcommand. However, its physical properties can be modified only by the global administrator. .sp .LP For more information about \fBzonecfg\fR syntax, see \fBzonecfg\fR(1M). .sp .LP -After a dataset is delegated to a non-global zone, the "zoned" property is automatically set. A zoned file system cannot be mounted in the global zone, since the zone administrator might have to set the mount point to an unacceptable value. +After a dataset is delegated to a non-global zone, the \fBzoned\fR property is automatically set. A zoned file system cannot be mounted in the global zone, since the zone administrator might have to set the mount point to an unacceptable value. .sp .LP -The global administrator can forcibly clear the "zoned" property, though this should be done with extreme care. The global administrator should verify that all the mount points are acceptable before clearing the property. +The global administrator can forcibly clear the \fBzoned\fR property, though this should be done with extreme care. The global administrator should verify that all the mount points are acceptable before clearing the property. .SS "Native Properties" .sp .LP -Properties are divided into two types, native properties and user defined properties. Native properties either export internal statistics or control \fBZFS\fR behavior. In addition, native properties are either editable or read-only. User properties have no effect on \fBZFS\fR behavior, but you can use them to annotate datasets in a way that is meaningful in your environment. For more information about user properties, see the "User Properties" section. +Properties are divided into two types, native and user-defined (or "user"). Native properties either export internal statistics or control \fBZFS\fR behavior. In addition, native properties are either editable or read-only. User properties have no effect on \fBZFS\fR behavior, but you can use them to annotate datasets in a way that is meaningful in your environment. For more information about user properties, see the "User Properties" section, below. .sp .LP -Every dataset has a set of properties that export statistics about the dataset as well as control various behavior. Properties are inherited from the parent unless overridden by the child. Some properties only apply to certain types of datasets (file systems, volumes or snapshots). +Every dataset has a set of properties that export statistics about the dataset as well as control various behaviors. Properties are inherited from the parent unless overridden by the child. Some properties apply only to certain types of datasets (file systems, volumes, or snapshots). .sp .LP -The values of numeric properties can be specified using human-readable suffixes (for example, "k", "KB", "M", "Gb", etc, up to Z for zettabyte). The following are all valid (and equal) specifications: +The values of numeric properties can be specified using human-readable suffixes (for example, \fBk\fR, \fBKB\fR, \fBM\fR, \fBGb\fR, and so forth, up to \fBZ\fR for zettabyte). The following are all valid (and equal) specifications: .sp .in +2 .nf -"1536M", "1.5g", "1.50GB". +1536M, 1.5g, 1.50GB .fi .in -2 .sp .sp .LP -The values of non-numeric properties are case sensitive and must be lowercase, except for "mountpoint", "sharenfs" and "sharesmb". +The values of non-numeric properties are case sensitive and must be lowercase, except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR. .sp .LP -The following native properties consist of read-only statistics about the dataset. These properties cannot be set, nor are they inherited. Native properties apply to all dataset types unless otherwise noted. +The following native properties consist of read-only statistics about the dataset. These properties can be neither set, nor inherited. Native properties apply to all dataset types unless otherwise noted. .sp .ne 2 .mk .na -\fBavailable\fR +\fB\fBavailable\fR\fR .ad .sp .6 .RS 4n The amount of space available to the dataset and all its children, assuming that there is no other activity in the pool. Because space is shared within a pool, availability can be limited by any number of factors, including physical pool size, quotas, reservations, or other datasets within the pool. .sp -This property can also be referred to by its shortened column name, "avail". +This property can also be referred to by its shortened column name, \fBavail\fR. .RE .sp .ne 2 .mk .na -\fBcompressratio\fR +\fB\fBcompressratio\fR\fR .ad .sp .6 .RS 4n -The compression ratio achieved for this dataset, expressed as a multiplier. Compression can be turned on by running "zfs set compression=on \fIdataset\fR". The default value is "off". +The compression ratio achieved for this dataset, expressed as a multiplier. Compression can be turned on by running: \fBzfs set compression=on \fIdataset\fR\fR. The default value is \fBoff\fR. .RE .sp .ne 2 .mk .na -\fBcreation\fR +\fB\fBcreation\fR\fR .ad .sp .6 .RS 4n @@ -360,18 +380,18 @@ The time this dataset was created. .ne 2 .mk .na -\fBmounted\fR +\fB\fBmounted\fR\fR .ad .sp .6 .RS 4n -For file systems, indicates whether the file system is currently mounted. This property can be either "yes" or "no". +For file systems, indicates whether the file system is currently mounted. This property can be either \fByes\fR or \fBno\fR. .RE .sp .ne 2 .mk .na -\fBorigin\fR +\fB\fBorigin\fR\fR .ad .sp .6 .RS 4n @@ -382,31 +402,31 @@ For cloned file systems or volumes, the .ne 2 .mk .na -\fBreferenced\fR +\fB\fBreferenced\fR\fR .ad .sp .6 .RS 4n The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it initially references the same amount of space as the file system or snapshot it was created from, since its contents are identical. .sp -This property can also be referred to by its shortened column name, "refer". +This property can also be referred to by its shortened column name, \fBrefer\fR. .RE .sp .ne 2 .mk .na -\fBtype\fR +\fB\fBtype\fR\fR .ad .sp .6 .RS 4n -The type of dataset: "filesystem", "volume", or "snapshot". +The type of dataset: \fBfilesystem\fR, \fBvolume\fR, or \fBsnapshot\fR. .RE .sp .ne 2 .mk .na -\fBused\fR +\fB\fBused\fR\fR .ad .sp .6 .RS 4n @@ -421,18 +441,18 @@ The amount of space used, available, or .ne 2 .mk .na -\fBusedby*\fR +\fB\fBusedby*\fR\fR .ad .sp .6 .RS 4n -The \fBusedby*\fR snapshots decompose the "used" properties into the various reasons that space is used. Specifically, \fBused\fR = \fBusedbychildren\fR + \fBusedbydataset\fR + \fBusedbyrefreservation\fR +, \fBusedbysnapshots\fR. These properties are only available for datasets created on zpool "version 13" pools. +The \fBusedby*\fR properties decompose the \fBused\fR properties into the various reasons that space is used. Specifically, \fBused\fR = \fBusedbychildren\fR + \fBusedbydataset\fR + \fBusedbyrefreservation\fR +, \fBusedbysnapshots\fR. These properties are only available for datasets created on \fBzpool\fR "version 13" pools. .RE .sp .ne 2 .mk .na -\fBusedbychildren\fR +\fB\fBusedbychildren\fR\fR .ad .sp .6 .RS 4n @@ -443,7 +463,7 @@ The amount of space used by children of .ne 2 .mk .na -\fBusedbydataset\fR +\fB\fBusedbydataset\fR\fR .ad .sp .6 .RS 4n @@ -454,7 +474,7 @@ The amount of space used by this dataset .ne 2 .mk .na -\fBusedbyrefreservation\fR +\fB\fBusedbyrefreservation\fR\fR .ad .sp .6 .RS 4n @@ -465,24 +485,76 @@ The amount of space used by a \fBrefrese .ne 2 .mk .na -\fBusedbysnapshots\fR +\fB\fBusedbysnapshots\fR\fR +.ad +.sp .6 +.RS 4n +The amount of space consumed by snapshots of this dataset. In particular, it is the amount of space that would be freed if all of this dataset's snapshots were destroyed. Note that this is not simply the sum of the snapshots' \fBused\fR properties because space can be shared by multiple snapshots +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBuserused@\fR\fIuser\fR\fR +.ad +.sp .6 +.RS 4n +The amount of space referenced in this dataset by the specified user. Space is charged to the owner of each file, as displayed by \fBls\fR \fB-l\fR. The amount of space charged is displayed by \fBdu\fR and \fBls\fR \fB-s\fR. See the \fBzfs userspace\fR subcommand for more information. +.sp +Unprivileged users can access only their own space usage. The root user, or a user who has been granted the \fBuserused\fR privilege with \fBzfs allow\fR, can access everyone's usage. +.sp +This property cannot be set on volumes, or on pools before version 15. The \fBuserused@\fR... properties are not displayed by \fBzfs get all\fR. The user's name must be appended after the \fB@\fR symbol, using one of the following forms: +.RS +4 +.TP +.ie t \(bu +.el o +\fIposix name\fR (for example, \fBjoe\fR) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fIposix numeric id\fR (for example, \fB789\fR) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fIsid name\fR (for example, \fBjoe.smith@mydomain\fR) +.RE +.RS +4 +.TP +.ie t \(bu +.el o +\fIsid numeric id\fR (for example, \fBS-1-123-456-789\fR) +.RE +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBgroupused@\fR\fIgroup\fR\fR .ad .sp .6 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:05:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7B4C10656A6; Wed, 15 Sep 2010 16:05:51 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 984328FC0C; Wed, 15 Sep 2010 16:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FG5p0q041849; Wed, 15 Sep 2010 16:05:51 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FG5pjc041847; Wed, 15 Sep 2010 16:05:51 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201009151605.o8FG5pjc041847@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 15 Sep 2010 16:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212669 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:05:51 -0000 Author: ken Date: Wed Sep 15 16:05:51 2010 New Revision: 212669 URL: http://svn.freebsd.org/changeset/base/212669 Log: MFp4 (//depot/projects/mps/...) Fix a typo. Submitted by: pluknet at gmail dot com Modified: head/share/man/man4/mps.4 Modified: head/share/man/man4/mps.4 ============================================================================== --- head/share/man/man4/mps.4 Wed Sep 15 16:05:40 2010 (r212668) +++ head/share/man/man4/mps.4 Wed Sep 15 16:05:51 2010 (r212669) @@ -51,7 +51,7 @@ place the following lines in your kernel Or, to load the driver as a module at boot, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent -mpt_load="YES" +mps_load="YES" .Ed .Sh DESCRIPTION The From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:10:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60D82106566C; Wed, 15 Sep 2010 16:10:38 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7C28FC24; Wed, 15 Sep 2010 16:10:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FGAcHP042066; Wed, 15 Sep 2010 16:10:38 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FGAc4a042063; Wed, 15 Sep 2010 16:10:38 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009151610.o8FGAc4a042063@svn.freebsd.org> From: Martin Matuska Date: Wed, 15 Sep 2010 16:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212670 - in stable/8: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:10:38 -0000 Author: mm Date: Wed Sep 15 16:10:38 2010 New Revision: 212670 URL: http://svn.freebsd.org/changeset/base/212670 Log: MFC r210398: Enable fake resolving of SMB RIDs by using nulldomain and UID_NOBODY - fixes panics when Solaris/OpenSolaris pools that contain files uploaded with the SMB protocol are accessed Enable seting/unsetting the sharesmb property (dummy action) - allows users who import pools from Solaris/Opensolaris to unset the sharesmb property and get rid of annoying messages PR: kern/145778, kern/148709 Approved by: pjd, delphij (mentor)) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Sep 15 16:05:51 2010 (r212669) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Sep 15 16:10:38 2010 (r212670) @@ -1265,7 +1265,6 @@ zfs_prop_set(zfs_handle_t *zhp, const ch case ZFS_PROP_XATTR: case ZFS_PROP_VSCAN: case ZFS_PROP_NBMAND: - case ZFS_PROP_SHARESMB: (void) snprintf(errbuf, sizeof (errbuf), "property '%s' not supported on FreeBSD", propname); ret = zfs_error(hdl, EZFS_PERM, errbuf); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c Wed Sep 15 16:05:51 2010 (r212669) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c Wed Sep 15 16:10:38 2010 (r212670) @@ -410,7 +410,7 @@ zfs_fuid_map_id(zfsvfs_t *zfsvfs, uint64 domain = zfs_fuid_find_by_idx(zfsvfs, index); ASSERT(domain != NULL); -#ifdef TODO +#ifdef sun if (type == ZFS_OWNER || type == ZFS_ACE_USER) { (void) kidmap_getuidbysid(crgetzone(cr), domain, FUID_RID(fuid), &id); @@ -418,9 +418,9 @@ zfs_fuid_map_id(zfsvfs_t *zfsvfs, uint64 (void) kidmap_getgidbysid(crgetzone(cr), domain, FUID_RID(fuid), &id); } -#else - panic(__func__); -#endif +#else /* sun */ + id = UID_NOBODY; +#endif /* sun */ return (id); } @@ -514,21 +514,21 @@ zfs_fuid_create_cred(zfsvfs_t *zfsvfs, z if (!zfsvfs->z_use_fuids || !IS_EPHEMERAL(id)) return ((uint64_t)id); -#ifdef TODO +#ifdef sun ksid = crgetsid(cr, (type == ZFS_OWNER) ? KSID_OWNER : KSID_GROUP); VERIFY(ksid != NULL); rid = ksid_getrid(ksid); domain = ksid_getdomain(ksid); - +#else /* sun */ + rid = UID_NOBODY; + domain = nulldomain; +#endif /* sun */ idx = zfs_fuid_find_by_domain(zfsvfs, domain, &kdomain, B_TRUE); zfs_fuid_node_add(fuidp, kdomain, rid, idx, id, type); return (FUID_ENCODE(idx, rid)); -#else - panic(__func__); -#endif } /* @@ -597,7 +597,7 @@ zfs_fuid_create(zfsvfs_t *zfsvfs, uint64 }; domain = fuidp->z_domain_table[idx -1]; } else { -#ifdef TODO +#ifdef sun if (type == ZFS_OWNER || type == ZFS_ACE_USER) status = kidmap_getsidbyuid(crgetzone(cr), id, &domain, &rid); @@ -606,6 +606,7 @@ zfs_fuid_create(zfsvfs_t *zfsvfs, uint64 &domain, &rid); if (status != 0) { +#endif /* sun */ /* * When returning nobody we will need to * make a dummy fuid table entry for logging @@ -613,10 +614,9 @@ zfs_fuid_create(zfsvfs_t *zfsvfs, uint64 */ rid = UID_NOBODY; domain = nulldomain; +#ifdef sun } -#else - panic(__func__); -#endif +#endif /* sun */ } idx = zfs_fuid_find_by_domain(zfsvfs, domain, &kdomain, B_TRUE); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:14:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C7B0106564A; Wed, 15 Sep 2010 16:14:38 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801308FC14; Wed, 15 Sep 2010 16:14:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FGEcRI042238; Wed, 15 Sep 2010 16:14:38 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FGEcu3042225; Wed, 15 Sep 2010 16:14:38 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009151614.o8FGEcu3042225@svn.freebsd.org> From: Martin Matuska Date: Wed, 15 Sep 2010 16:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212671 - in stable/8: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:14:38 -0000 Author: mm Date: Wed Sep 15 16:14:38 2010 New Revision: 212671 URL: http://svn.freebsd.org/changeset/base/212671 Log: MFC r211931: Update ZFS metaslab code from OpenSolaris. This provides a noticeable write speedup, especially on pools with less than 30% of free space. Detailed information (OpenSolaris onnv changesets and Bug IDs): 11146:7e58f40bcb1c 6826241 Sync write IOPS drops dramatically during TXG sync 6869229 zfs should switch to shiny new metaslabs more frequently 11728:59fdb3b856f6 6918420 zdb -m has issues printing metaslab statistics 12047:7c1fcc8419ca 6917066 zfs block picking can be improved Approved by: delphij (mentor) Obtained from: OpenSolaris (Bug ID 6826241, 6869229, 6918420, 6917066) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Sep 15 16:14:38 2010 (r212671) @@ -491,35 +491,37 @@ dump_metaslab_stats(metaslab_t *msp) static void dump_metaslab(metaslab_t *msp) { - char freebuf[5]; - space_map_obj_t *smo = &msp->ms_smo; vdev_t *vd = msp->ms_group->mg_vd; spa_t *spa = vd->vdev_spa; + space_map_t *sm = &msp->ms_map; + space_map_obj_t *smo = &msp->ms_smo; + char freebuf[5]; - nicenum(msp->ms_map.sm_size - smo->smo_alloc, freebuf); + nicenum(sm->sm_size - smo->smo_alloc, freebuf); (void) printf( "\tvdev %5llu offset %12llx spacemap %6llu free %5s\n", - (u_longlong_t)vd->vdev_id, (u_longlong_t)msp->ms_map.sm_start, - (u_longlong_t)smo->smo_object, freebuf); + (u_longlong_t)(sm->sm_start / sm->sm_size), + (u_longlong_t)sm->sm_start, (u_longlong_t)smo->smo_object, freebuf); if (dump_opt['m'] > 1) { mutex_enter(&msp->ms_lock); - VERIFY(space_map_load(&msp->ms_map, zfs_metaslab_ops, - SM_FREE, &msp->ms_smo, spa->spa_meta_objset) == 0); + space_map_load_wait(sm); + if (!sm->sm_loaded) + VERIFY(space_map_load(sm, zfs_metaslab_ops, + SM_FREE, smo, spa->spa_meta_objset) == 0); dump_metaslab_stats(msp); - space_map_unload(&msp->ms_map); + space_map_unload(sm); mutex_exit(&msp->ms_lock); } if (dump_opt['d'] > 5 || dump_opt['m'] > 2) { - ASSERT(msp->ms_map.sm_size == (1ULL << vd->vdev_ms_shift)); + ASSERT(sm->sm_size == (1ULL << vd->vdev_ms_shift)); mutex_enter(&msp->ms_lock); - dump_spacemap(spa->spa_meta_objset, smo, &msp->ms_map); + dump_spacemap(spa->spa_meta_objset, smo, sm); mutex_exit(&msp->ms_lock); } - } static void Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Sep 15 16:14:38 2010 (r212671) @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ #include @@ -37,7 +36,7 @@ uint64_t metaslab_gang_bang = SPA_MAXBLO /* * Minimum size which forces the dynamic allocator to change - * it's allocation strategy. Once the space map cannot satisfy + * it's allocation strategy. Once the space map cannot satisfy * an allocation of this size then it switches to using more * aggressive strategy (i.e search by size rather than offset). */ @@ -49,7 +48,23 @@ uint64_t metaslab_df_alloc_threshold = S * Once the space_map's free space drops below this level we dynamically * switch to using best-fit allocations. */ -int metaslab_df_free_pct = 30; +int metaslab_df_free_pct = 4; + +/* + * A metaslab is considered "free" if it contains a contiguous + * segment which is greater than metaslab_min_alloc_size. + */ +uint64_t metaslab_min_alloc_size = DMU_MAX_ACCESS; + +/* + * Max number of space_maps to prefetch. + */ +int metaslab_prefetch_limit = SPA_DVAS_PER_BP; + +/* + * Percentage bonus multiplier for metaslabs that are in the bonus area. + */ +int metaslab_smo_bonus_pct = 150; /* * ========================================================================== @@ -219,6 +234,32 @@ metaslab_group_sort(metaslab_group_t *mg } /* + * ========================================================================== + * Common allocator routines + * ========================================================================== + */ +static int +metaslab_segsize_compare(const void *x1, const void *x2) +{ + const space_seg_t *s1 = x1; + const space_seg_t *s2 = x2; + uint64_t ss_size1 = s1->ss_end - s1->ss_start; + uint64_t ss_size2 = s2->ss_end - s2->ss_start; + + if (ss_size1 < ss_size2) + return (-1); + if (ss_size1 > ss_size2) + return (1); + + if (s1->ss_start < s2->ss_start) + return (-1); + if (s1->ss_start > s2->ss_start) + return (1); + + return (0); +} + +/* * This is a helper function that can be used by the allocator to find * a suitable block to allocate. This will search the specified AVL * tree looking for a block that matches the specified criteria. @@ -258,68 +299,58 @@ metaslab_block_picker(avl_tree_t *t, uin return (metaslab_block_picker(t, cursor, size, align)); } -/* - * ========================================================================== - * The first-fit block allocator - * ========================================================================== - */ static void -metaslab_ff_load(space_map_t *sm) +metaslab_pp_load(space_map_t *sm) { + space_seg_t *ss; + ASSERT(sm->sm_ppd == NULL); sm->sm_ppd = kmem_zalloc(64 * sizeof (uint64_t), KM_SLEEP); - sm->sm_pp_root = NULL; + + sm->sm_pp_root = kmem_alloc(sizeof (avl_tree_t), KM_SLEEP); + avl_create(sm->sm_pp_root, metaslab_segsize_compare, + sizeof (space_seg_t), offsetof(struct space_seg, ss_pp_node)); + + for (ss = avl_first(&sm->sm_root); ss; ss = AVL_NEXT(&sm->sm_root, ss)) + avl_add(sm->sm_pp_root, ss); } static void -metaslab_ff_unload(space_map_t *sm) +metaslab_pp_unload(space_map_t *sm) { + void *cookie = NULL; + kmem_free(sm->sm_ppd, 64 * sizeof (uint64_t)); sm->sm_ppd = NULL; -} -static uint64_t -metaslab_ff_alloc(space_map_t *sm, uint64_t size) -{ - avl_tree_t *t = &sm->sm_root; - uint64_t align = size & -size; - uint64_t *cursor = (uint64_t *)sm->sm_ppd + highbit(align) - 1; + while (avl_destroy_nodes(sm->sm_pp_root, &cookie) != NULL) { + /* tear down the tree */ + } - return (metaslab_block_picker(t, cursor, size, align)); + avl_destroy(sm->sm_pp_root); + kmem_free(sm->sm_pp_root, sizeof (avl_tree_t)); + sm->sm_pp_root = NULL; } /* ARGSUSED */ static void -metaslab_ff_claim(space_map_t *sm, uint64_t start, uint64_t size) +metaslab_pp_claim(space_map_t *sm, uint64_t start, uint64_t size) { /* No need to update cursor */ } /* ARGSUSED */ static void -metaslab_ff_free(space_map_t *sm, uint64_t start, uint64_t size) +metaslab_pp_free(space_map_t *sm, uint64_t start, uint64_t size) { /* No need to update cursor */ } -static space_map_ops_t metaslab_ff_ops = { - metaslab_ff_load, - metaslab_ff_unload, - metaslab_ff_alloc, - metaslab_ff_claim, - metaslab_ff_free, - NULL /* maxsize */ -}; - /* - * Dynamic block allocator - - * Uses the first fit allocation scheme until space get low and then - * adjusts to a best fit allocation method. Uses metaslab_df_alloc_threshold - * and metaslab_df_free_pct to determine when to switch the allocation scheme. + * Return the maximum contiguous segment within the metaslab. */ - uint64_t -metaslab_df_maxsize(space_map_t *sm) +metaslab_pp_maxsize(space_map_t *sm) { avl_tree_t *t = sm->sm_pp_root; space_seg_t *ss; @@ -330,67 +361,53 @@ metaslab_df_maxsize(space_map_t *sm) return (ss->ss_end - ss->ss_start); } -static int -metaslab_df_seg_compare(const void *x1, const void *x2) +/* + * ========================================================================== + * The first-fit block allocator + * ========================================================================== + */ +static uint64_t +metaslab_ff_alloc(space_map_t *sm, uint64_t size) { - const space_seg_t *s1 = x1; - const space_seg_t *s2 = x2; - uint64_t ss_size1 = s1->ss_end - s1->ss_start; - uint64_t ss_size2 = s2->ss_end - s2->ss_start; - - if (ss_size1 < ss_size2) - return (-1); - if (ss_size1 > ss_size2) - return (1); - - if (s1->ss_start < s2->ss_start) - return (-1); - if (s1->ss_start > s2->ss_start) - return (1); + avl_tree_t *t = &sm->sm_root; + uint64_t align = size & -size; + uint64_t *cursor = (uint64_t *)sm->sm_ppd + highbit(align) - 1; - return (0); + return (metaslab_block_picker(t, cursor, size, align)); } -static void -metaslab_df_load(space_map_t *sm) +/* ARGSUSED */ +boolean_t +metaslab_ff_fragmented(space_map_t *sm) { - space_seg_t *ss; - - ASSERT(sm->sm_ppd == NULL); - sm->sm_ppd = kmem_zalloc(64 * sizeof (uint64_t), KM_SLEEP); - - sm->sm_pp_root = kmem_alloc(sizeof (avl_tree_t), KM_SLEEP); - avl_create(sm->sm_pp_root, metaslab_df_seg_compare, - sizeof (space_seg_t), offsetof(struct space_seg, ss_pp_node)); - - for (ss = avl_first(&sm->sm_root); ss; ss = AVL_NEXT(&sm->sm_root, ss)) - avl_add(sm->sm_pp_root, ss); + return (B_TRUE); } -static void -metaslab_df_unload(space_map_t *sm) -{ - void *cookie = NULL; - - kmem_free(sm->sm_ppd, 64 * sizeof (uint64_t)); - sm->sm_ppd = NULL; - - while (avl_destroy_nodes(sm->sm_pp_root, &cookie) != NULL) { - /* tear down the tree */ - } - - avl_destroy(sm->sm_pp_root); - kmem_free(sm->sm_pp_root, sizeof (avl_tree_t)); - sm->sm_pp_root = NULL; -} +static space_map_ops_t metaslab_ff_ops = { + metaslab_pp_load, + metaslab_pp_unload, + metaslab_ff_alloc, + metaslab_pp_claim, + metaslab_pp_free, + metaslab_pp_maxsize, + metaslab_ff_fragmented +}; +/* + * ========================================================================== + * Dynamic block allocator - + * Uses the first fit allocation scheme until space get low and then + * adjusts to a best fit allocation method. Uses metaslab_df_alloc_threshold + * and metaslab_df_free_pct to determine when to switch the allocation scheme. + * ========================================================================== + */ static uint64_t metaslab_df_alloc(space_map_t *sm, uint64_t size) { avl_tree_t *t = &sm->sm_root; uint64_t align = size & -size; uint64_t *cursor = (uint64_t *)sm->sm_ppd + highbit(align) - 1; - uint64_t max_size = metaslab_df_maxsize(sm); + uint64_t max_size = metaslab_pp_maxsize(sm); int free_pct = sm->sm_space * 100 / sm->sm_size; ASSERT(MUTEX_HELD(sm->sm_lock)); @@ -412,30 +429,158 @@ metaslab_df_alloc(space_map_t *sm, uint6 return (metaslab_block_picker(t, cursor, size, 1ULL)); } -/* ARGSUSED */ -static void -metaslab_df_claim(space_map_t *sm, uint64_t start, uint64_t size) +static boolean_t +metaslab_df_fragmented(space_map_t *sm) { - /* No need to update cursor */ -} + uint64_t max_size = metaslab_pp_maxsize(sm); + int free_pct = sm->sm_space * 100 / sm->sm_size; -/* ARGSUSED */ -static void -metaslab_df_free(space_map_t *sm, uint64_t start, uint64_t size) -{ - /* No need to update cursor */ + if (max_size >= metaslab_df_alloc_threshold && + free_pct >= metaslab_df_free_pct) + return (B_FALSE); + + return (B_TRUE); } static space_map_ops_t metaslab_df_ops = { - metaslab_df_load, - metaslab_df_unload, + metaslab_pp_load, + metaslab_pp_unload, metaslab_df_alloc, - metaslab_df_claim, - metaslab_df_free, - metaslab_df_maxsize + metaslab_pp_claim, + metaslab_pp_free, + metaslab_pp_maxsize, + metaslab_df_fragmented +}; + +/* + * ========================================================================== + * Other experimental allocators + * ========================================================================== + */ +static uint64_t +metaslab_cdf_alloc(space_map_t *sm, uint64_t size) +{ + avl_tree_t *t = &sm->sm_root; + uint64_t *cursor = (uint64_t *)sm->sm_ppd; + uint64_t *extent_end = (uint64_t *)sm->sm_ppd + 1; + uint64_t max_size = metaslab_pp_maxsize(sm); + uint64_t rsize = size; + uint64_t offset = 0; + + ASSERT(MUTEX_HELD(sm->sm_lock)); + ASSERT3U(avl_numnodes(&sm->sm_root), ==, avl_numnodes(sm->sm_pp_root)); + + if (max_size < size) + return (-1ULL); + + ASSERT3U(*extent_end, >=, *cursor); + + /* + * If we're running low on space switch to using the size + * sorted AVL tree (best-fit). + */ + if ((*cursor + size) > *extent_end) { + + t = sm->sm_pp_root; + *cursor = *extent_end = 0; + + if (max_size > 2 * SPA_MAXBLOCKSIZE) + rsize = MIN(metaslab_min_alloc_size, max_size); + offset = metaslab_block_picker(t, extent_end, rsize, 1ULL); + if (offset != -1) + *cursor = offset + size; + } else { + offset = metaslab_block_picker(t, cursor, rsize, 1ULL); + } + ASSERT3U(*cursor, <=, *extent_end); + return (offset); +} + +static boolean_t +metaslab_cdf_fragmented(space_map_t *sm) +{ + uint64_t max_size = metaslab_pp_maxsize(sm); + + if (max_size > (metaslab_min_alloc_size * 10)) + return (B_FALSE); + return (B_TRUE); +} + +static space_map_ops_t metaslab_cdf_ops = { + metaslab_pp_load, + metaslab_pp_unload, + metaslab_cdf_alloc, + metaslab_pp_claim, + metaslab_pp_free, + metaslab_pp_maxsize, + metaslab_cdf_fragmented +}; + +uint64_t metaslab_ndf_clump_shift = 4; + +static uint64_t +metaslab_ndf_alloc(space_map_t *sm, uint64_t size) +{ + avl_tree_t *t = &sm->sm_root; + avl_index_t where; + space_seg_t *ss, ssearch; + uint64_t hbit = highbit(size); + uint64_t *cursor = (uint64_t *)sm->sm_ppd + hbit - 1; + uint64_t max_size = metaslab_pp_maxsize(sm); + + ASSERT(MUTEX_HELD(sm->sm_lock)); + ASSERT3U(avl_numnodes(&sm->sm_root), ==, avl_numnodes(sm->sm_pp_root)); + + if (max_size < size) + return (-1ULL); + + ssearch.ss_start = *cursor; + ssearch.ss_end = *cursor + size; + + ss = avl_find(t, &ssearch, &where); + if (ss == NULL || (ss->ss_start + size > ss->ss_end)) { + t = sm->sm_pp_root; + + ssearch.ss_start = 0; + ssearch.ss_end = MIN(max_size, + 1ULL << (hbit + metaslab_ndf_clump_shift)); + ss = avl_find(t, &ssearch, &where); + if (ss == NULL) + ss = avl_nearest(t, where, AVL_AFTER); + ASSERT(ss != NULL); + } + + if (ss != NULL) { + if (ss->ss_start + size <= ss->ss_end) { + *cursor = ss->ss_start + size; + return (ss->ss_start); + } + } + return (-1ULL); +} + +static boolean_t +metaslab_ndf_fragmented(space_map_t *sm) +{ + uint64_t max_size = metaslab_pp_maxsize(sm); + + if (max_size > (metaslab_min_alloc_size << metaslab_ndf_clump_shift)) + return (B_FALSE); + return (B_TRUE); +} + + +static space_map_ops_t metaslab_ndf_ops = { + metaslab_pp_load, + metaslab_pp_unload, + metaslab_ndf_alloc, + metaslab_pp_claim, + metaslab_pp_free, + metaslab_pp_maxsize, + metaslab_ndf_fragmented }; -space_map_ops_t *zfs_metaslab_ops = &metaslab_df_ops; +space_map_ops_t *zfs_metaslab_ops = &metaslab_ndf_ops; /* * ========================================================================== @@ -522,7 +667,6 @@ metaslab_fini(metaslab_t *msp) #define METASLAB_WEIGHT_SECONDARY (1ULL << 62) #define METASLAB_ACTIVE_MASK \ (METASLAB_WEIGHT_PRIMARY | METASLAB_WEIGHT_SECONDARY) -#define METASLAB_SMO_BONUS_MULTIPLIER 2 static uint64_t metaslab_weight(metaslab_t *msp) @@ -555,25 +699,60 @@ metaslab_weight(metaslab_t *msp) ASSERT(weight >= space && weight <= 2 * space); /* - * For locality, assign higher weight to metaslabs we've used before. + * For locality, assign higher weight to metaslabs which have + * a lower offset than what we've already activated. */ - if (smo->smo_object != 0) - weight *= METASLAB_SMO_BONUS_MULTIPLIER; + if (sm->sm_start <= mg->mg_bonus_area) + weight *= (metaslab_smo_bonus_pct / 100); ASSERT(weight >= space && - weight <= 2 * METASLAB_SMO_BONUS_MULTIPLIER * space); + weight <= 2 * (metaslab_smo_bonus_pct / 100) * space); + + if (sm->sm_loaded && !sm->sm_ops->smop_fragmented(sm)) { + /* + * If this metaslab is one we're actively using, adjust its + * weight to make it preferable to any inactive metaslab so + * we'll polish it off. + */ + weight |= (msp->ms_weight & METASLAB_ACTIVE_MASK); + } + return (weight); +} + +static void +metaslab_prefetch(metaslab_group_t *mg) +{ + spa_t *spa = mg->mg_vd->vdev_spa; + metaslab_t *msp; + avl_tree_t *t = &mg->mg_metaslab_tree; + int m; + + mutex_enter(&mg->mg_lock); /* - * If this metaslab is one we're actively using, adjust its weight to - * make it preferable to any inactive metaslab so we'll polish it off. + * Prefetch the next potential metaslabs */ - weight |= (msp->ms_weight & METASLAB_ACTIVE_MASK); + for (msp = avl_first(t), m = 0; msp; msp = AVL_NEXT(t, msp), m++) { + space_map_t *sm = &msp->ms_map; + space_map_obj_t *smo = &msp->ms_smo; - return (weight); + /* If we have reached our prefetch limit then we're done */ + if (m >= metaslab_prefetch_limit) + break; + + if (!sm->sm_loaded && smo->smo_object != 0) { + mutex_exit(&mg->mg_lock); + dmu_prefetch(spa->spa_meta_objset, smo->smo_object, + 0ULL, smo->smo_objsize); + mutex_enter(&mg->mg_lock); + } + } + mutex_exit(&mg->mg_lock); } static int metaslab_activate(metaslab_t *msp, uint64_t activation_weight, uint64_t size) { + metaslab_group_t *mg = msp->ms_group; space_map_t *sm = &msp->ms_map; space_map_ops_t *sm_ops = msp->ms_group->mg_class->mc_ops; @@ -588,6 +767,15 @@ metaslab_activate(metaslab_t *msp, uint6 } /* + * Track the bonus area as we activate new metaslabs. + */ + if (sm->sm_start > mg->mg_bonus_area) { + mutex_enter(&mg->mg_lock); + mg->mg_bonus_area = sm->sm_start; + mutex_exit(&mg->mg_lock); + } + + /* * If we were able to load the map then make sure * that this map is still able to satisfy our request. */ @@ -773,6 +961,32 @@ metaslab_sync_done(metaslab_t *msp, uint mutex_exit(&msp->ms_lock); } +void +metaslab_sync_reassess(metaslab_group_t *mg) +{ + vdev_t *vd = mg->mg_vd; + + /* + * Re-evaluate all metaslabs which have lower offsets than the + * bonus area. + */ + for (int m = 0; m < vd->vdev_ms_count; m++) { + metaslab_t *msp = vd->vdev_ms[m]; + + if (msp->ms_map.sm_start > mg->mg_bonus_area) + break; + + mutex_enter(&msp->ms_lock); + metaslab_group_sort(mg, msp, metaslab_weight(msp)); + mutex_exit(&msp->ms_lock); + } + + /* + * Prefetch the next potential metaslabs + */ + metaslab_prefetch(mg); +} + static uint64_t metaslab_distance(metaslab_t *msp, dva_t *dva) { @@ -868,7 +1082,7 @@ metaslab_group_alloc(metaslab_group_t *m if ((offset = space_map_alloc(&msp->ms_map, size)) != -1ULL) break; - metaslab_passivate(msp, size - 1); + metaslab_passivate(msp, space_map_maxsize(&msp->ms_map)); mutex_exit(&msp->ms_lock); } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Sep 15 16:14:38 2010 (r212671) @@ -74,35 +74,38 @@ enum zti_modes { zti_mode_fixed, /* value is # of threads (min 1) */ zti_mode_online_percent, /* value is % of online CPUs */ zti_mode_tune, /* fill from zio_taskq_tune_* */ + zti_mode_null, /* don't create a taskq */ zti_nmodes }; -#define ZTI_THREAD_FIX(n) { zti_mode_fixed, (n) } -#define ZTI_THREAD_PCT(n) { zti_mode_online_percent, (n) } -#define ZTI_THREAD_TUNE { zti_mode_tune, 0 } +#define ZTI_FIX(n) { zti_mode_fixed, (n) } +#define ZTI_PCT(n) { zti_mode_online_percent, (n) } +#define ZTI_TUNE { zti_mode_tune, 0 } +#define ZTI_NULL { zti_mode_null, 0 } -#define ZTI_THREAD_ONE ZTI_THREAD_FIX(1) +#define ZTI_ONE ZTI_FIX(1) typedef struct zio_taskq_info { - const char *zti_name; - struct { - enum zti_modes zti_mode; - uint_t zti_value; - } zti_nthreads[ZIO_TASKQ_TYPES]; + enum zti_modes zti_mode; + uint_t zti_value; } zio_taskq_info_t; static const char *const zio_taskq_types[ZIO_TASKQ_TYPES] = { - "issue", "intr" + "issue", "issue_high", "intr", "intr_high" }; -const zio_taskq_info_t zio_taskqs[ZIO_TYPES] = { - /* ISSUE INTR */ - { "spa_zio_null", { ZTI_THREAD_ONE, ZTI_THREAD_ONE } }, - { "spa_zio_read", { ZTI_THREAD_FIX(8), ZTI_THREAD_TUNE } }, - { "spa_zio_write", { ZTI_THREAD_TUNE, ZTI_THREAD_FIX(8) } }, - { "spa_zio_free", { ZTI_THREAD_ONE, ZTI_THREAD_ONE } }, - { "spa_zio_claim", { ZTI_THREAD_ONE, ZTI_THREAD_ONE } }, - { "spa_zio_ioctl", { ZTI_THREAD_ONE, ZTI_THREAD_ONE } }, +/* + * Define the taskq threads for the following I/O types: + * NULL, READ, WRITE, FREE, CLAIM, and IOCTL + */ +const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ_TYPES] = { + /* ISSUE ISSUE_HIGH INTR INTR_HIGH */ + { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, + { ZTI_FIX(8), ZTI_NULL, ZTI_TUNE, ZTI_NULL }, + { ZTI_TUNE, ZTI_FIX(5), ZTI_FIX(8), ZTI_FIX(5) }, + { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, + { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, + { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, }; enum zti_modes zio_taskq_tune_mode = zti_mode_online_percent; @@ -581,14 +584,14 @@ spa_activate(spa_t *spa, int mode) spa->spa_log_class = metaslab_class_create(zfs_metaslab_ops); for (int t = 0; t < ZIO_TYPES; t++) { - const zio_taskq_info_t *ztip = &zio_taskqs[t]; for (int q = 0; q < ZIO_TASKQ_TYPES; q++) { - enum zti_modes mode = ztip->zti_nthreads[q].zti_mode; - uint_t value = ztip->zti_nthreads[q].zti_value; + const zio_taskq_info_t *ztip = &zio_taskqs[t][q]; + enum zti_modes mode = ztip->zti_mode; + uint_t value = ztip->zti_value; char name[32]; (void) snprintf(name, sizeof (name), - "%s_%s", ztip->zti_name, zio_taskq_types[q]); + "%s_%s", zio_type_name[t], zio_taskq_types[q]); if (mode == zti_mode_tune) { mode = zio_taskq_tune_mode; @@ -613,6 +616,10 @@ spa_activate(spa_t *spa, int mode) TASKQ_PREPOPULATE | TASKQ_THREADS_CPU_PCT); break; + case zti_mode_null: + spa->spa_zio_taskq[t][q] = NULL; + break; + case zti_mode_tune: default: panic("unrecognized mode for " @@ -659,7 +666,8 @@ spa_deactivate(spa_t *spa) for (int t = 0; t < ZIO_TYPES; t++) { for (int q = 0; q < ZIO_TASKQ_TYPES; q++) { - taskq_destroy(spa->spa_zio_taskq[t][q]); + if (spa->spa_zio_taskq[t][q] != NULL) + taskq_destroy(spa->spa_zio_taskq[t][q]); spa->spa_zio_taskq[t][q] = NULL; } } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Wed Sep 15 16:14:38 2010 (r212671) @@ -368,10 +368,8 @@ space_map_unload(space_map_t *sm) uint64_t space_map_maxsize(space_map_t *sm) { - if (sm->sm_loaded && sm->sm_ops != NULL) - return (sm->sm_ops->smop_max(sm)); - else - return (-1ULL); + ASSERT(sm->sm_ops != NULL); + return (sm->sm_ops->smop_max(sm)); } uint64_t Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h Wed Sep 15 16:14:38 2010 (r212671) @@ -46,6 +46,7 @@ extern metaslab_t *metaslab_init(metasla extern void metaslab_fini(metaslab_t *msp); extern void metaslab_sync(metaslab_t *msp, uint64_t txg); extern void metaslab_sync_done(metaslab_t *msp, uint64_t txg); +extern void metaslab_sync_reassess(metaslab_group_t *mg); #define METASLAB_HINTBP_FAVOR 0x0 #define METASLAB_HINTBP_AVOID 0x1 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Wed Sep 15 16:14:38 2010 (r212671) @@ -46,6 +46,7 @@ struct metaslab_group { kmutex_t mg_lock; avl_tree_t mg_metaslab_tree; uint64_t mg_aliquot; + uint64_t mg_bonus_area; int64_t mg_bias; metaslab_class_t *mg_class; vdev_t *mg_vd; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Wed Sep 15 16:14:38 2010 (r212671) @@ -87,7 +87,9 @@ typedef enum spa_log_state { enum zio_taskq_type { ZIO_TASKQ_ISSUE = 0, + ZIO_TASKQ_ISSUE_HIGH, ZIO_TASKQ_INTERRUPT, + ZIO_TASKQ_INTERRUPT_HIGH, ZIO_TASKQ_TYPES }; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h Wed Sep 15 16:14:38 2010 (r212671) @@ -77,6 +77,7 @@ struct space_map_ops { void (*smop_claim)(space_map_t *sm, uint64_t start, uint64_t size); void (*smop_free)(space_map_t *sm, uint64_t start, uint64_t size); uint64_t (*smop_max)(space_map_t *sm); + boolean_t (*smop_fragmented)(space_map_t *sm); }; /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Sep 15 16:14:38 2010 (r212671) @@ -107,14 +107,15 @@ enum zio_compress { #define ZIO_PRIORITY_NOW (zio_priority_table[0]) #define ZIO_PRIORITY_SYNC_READ (zio_priority_table[1]) #define ZIO_PRIORITY_SYNC_WRITE (zio_priority_table[2]) -#define ZIO_PRIORITY_ASYNC_READ (zio_priority_table[3]) -#define ZIO_PRIORITY_ASYNC_WRITE (zio_priority_table[4]) -#define ZIO_PRIORITY_FREE (zio_priority_table[5]) -#define ZIO_PRIORITY_CACHE_FILL (zio_priority_table[6]) -#define ZIO_PRIORITY_LOG_WRITE (zio_priority_table[7]) -#define ZIO_PRIORITY_RESILVER (zio_priority_table[8]) -#define ZIO_PRIORITY_SCRUB (zio_priority_table[9]) -#define ZIO_PRIORITY_TABLE_SIZE 10 +#define ZIO_PRIORITY_LOG_WRITE (zio_priority_table[3]) +#define ZIO_PRIORITY_CACHE_FILL (zio_priority_table[4]) +#define ZIO_PRIORITY_AGG (zio_priority_table[5]) +#define ZIO_PRIORITY_FREE (zio_priority_table[6]) +#define ZIO_PRIORITY_ASYNC_WRITE (zio_priority_table[7]) +#define ZIO_PRIORITY_ASYNC_READ (zio_priority_table[8]) +#define ZIO_PRIORITY_RESILVER (zio_priority_table[9]) +#define ZIO_PRIORITY_SCRUB (zio_priority_table[10]) +#define ZIO_PRIORITY_TABLE_SIZE 11 #define ZIO_FLAG_MUSTSUCCEED 0x00000 #define ZIO_FLAG_CANFAIL 0x00001 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Sep 15 16:14:38 2010 (r212671) @@ -1773,9 +1773,13 @@ void vdev_sync_done(vdev_t *vd, uint64_t txg) { metaslab_t *msp; + boolean_t reassess = !txg_list_empty(&vd->vdev_ms_list, TXG_CLEAN(txg)); while (msp = txg_list_remove(&vd->vdev_ms_list, TXG_CLEAN(txg))) metaslab_sync_done(msp, txg); + + if (reassess) + metaslab_sync_reassess(vd->vdev_mg); } void Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Wed Sep 15 16:14:38 2010 (r212671) @@ -233,7 +233,7 @@ vdev_queue_io_to_issue(vdev_queue_t *vq, ASSERT(size <= zfs_vdev_aggregation_limit); aio = zio_vdev_delegated_io(fio->io_vd, fio->io_offset, - zio_buf_alloc(size), size, fio->io_type, ZIO_PRIORITY_NOW, + zio_buf_alloc(size), size, fio->io_type, ZIO_PRIORITY_AGG, flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE, vdev_queue_agg_io_done, NULL); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Sep 15 16:10:38 2010 (r212670) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Sep 15 16:14:38 2010 (r212671) @@ -49,11 +49,12 @@ uint8_t zio_priority_table[ZIO_PRIORITY_ 0, /* ZIO_PRIORITY_NOW */ 0, /* ZIO_PRIORITY_SYNC_READ */ 0, /* ZIO_PRIORITY_SYNC_WRITE */ - 6, /* ZIO_PRIORITY_ASYNC_READ */ - 4, /* ZIO_PRIORITY_ASYNC_WRITE */ - 4, /* ZIO_PRIORITY_FREE */ - 0, /* ZIO_PRIORITY_CACHE_FILL */ 0, /* ZIO_PRIORITY_LOG_WRITE */ + 1, /* ZIO_PRIORITY_CACHE_FILL */ + 1, /* ZIO_PRIORITY_AGG */ + 4, /* ZIO_PRIORITY_FREE */ + 4, /* ZIO_PRIORITY_ASYNC_WRITE */ + 6, /* ZIO_PRIORITY_ASYNC_READ */ 10, /* ZIO_PRIORITY_RESILVER */ 20, /* ZIO_PRIORITY_SCRUB */ }; @@ -64,7 +65,9 @@ uint8_t zio_priority_table[ZIO_PRIORITY_ * ========================================================================== */ char *zio_type_name[ZIO_TYPES] = { - "null", "read", "write", "free", "claim", "ioctl" }; + "zio_null", "zio_read", "zio_write", "zio_free", "zio_claim", + "zio_ioctl" +}; #define SYNC_PASS_DEFERRED_FREE 1 /* defer frees after this pass */ #define SYNC_PASS_DONT_COMPRESS 4 /* don't compress after this pass */ @@ -942,6 +945,7 @@ zio_write_bp_init(zio_t *zio) static void zio_taskq_dispatch(zio_t *zio, enum zio_taskq_type q) { + spa_t *spa = zio->io_spa; zio_type_t t = zio->io_type; /* @@ -958,7 +962,15 @@ zio_taskq_dispatch(zio_t *zio, enum zio_ if (t == ZIO_TYPE_WRITE && zio->io_vd && zio->io_vd->vdev_aux) t = ZIO_TYPE_NULL; - (void) taskq_dispatch_safe(zio->io_spa->spa_zio_taskq[t][q], + /* + * If this is a high priority I/O, then use the high priority taskq. + */ + if (zio->io_priority == ZIO_PRIORITY_NOW && + spa->spa_zio_taskq[t][q + 1] != NULL) + q++; + + ASSERT3U(q, <, ZIO_TASKQ_TYPES); + (void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q], (task_func_t *)zio_execute, zio, &zio->io_task); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:14:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16BDC1065775; Wed, 15 Sep 2010 16:14:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DA52A8FC0C; Wed, 15 Sep 2010 16:14:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6297346C05; Wed, 15 Sep 2010 12:14:46 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 915CE8A04F; Wed, 15 Sep 2010 12:14:45 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Wed, 15 Sep 2010 11:57:24 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201009151002.o8FA2kvO029237@svn.freebsd.org> In-Reply-To: <201009151002.o8FA2kvO029237@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201009151157.24735.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 15 Sep 2010 12:14:45 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212647 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:14:47 -0000 On Wednesday, September 15, 2010 6:02:46 am Andriy Gapon wrote: > Author: avg > Date: Wed Sep 15 10:02:46 2010 > New Revision: 212647 > URL: http://svn.freebsd.org/changeset/base/212647 > > Log: > sys/pcpu.h: remove a workaround for a fixed ld bug > > The workaround was incorrectly documented as having something to do with > set_pcpu section's progbits, but in fact it was for incorrect placement > of __start_set_pcpu because of the bug in ld. > The bug was fixed in r210245, see commit message for details. > > A side-effect of the workaround was that a zero-size set_pcpu section was > produced for modules, source code of which included pcpu.h but didn't > actually define any dynamic per-cpu variables. > This commit should remove the side-effect. > > The same workaround is present sys/net/vnet.h, has an analogous side-effect > and can be removed as well. > > An UPDATING entry that warns about a need for recent ld is following. > > MFC after: 1 month > > Modified: > head/sys/sys/pcpu.h > > Modified: head/sys/sys/pcpu.h > ============================================================================== > --- head/sys/sys/pcpu.h Wed Sep 15 09:48:18 2010 (r212646) > +++ head/sys/sys/pcpu.h Wed Sep 15 10:02:46 2010 (r212647) > @@ -44,24 +44,10 @@ > > /* > * Define a set for pcpu data. > - * > - * We don't use SET_DECLARE because it defines the set as 'a' when we > - * want 'aw'. gcc considers uninitialized data in a separate section > - * writable, and there is no generic zero initializer that works for > - * structs and scalars. > */ > extern uintptr_t *__start_set_pcpu; > extern uintptr_t *__stop_set_pcpu; Given that you removed this comment, can you now use SET_DECLARE() here? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:14:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFB481065741; Wed, 15 Sep 2010 16:14:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8D36A8FC15; Wed, 15 Sep 2010 16:14:48 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3016446C18; Wed, 15 Sep 2010 12:14:48 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 00ABA8A051; Wed, 15 Sep 2010 12:14:46 -0400 (EDT) From: John Baldwin To: Andre Oppermann Date: Wed, 15 Sep 2010 12:12:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201009151039.o8FAdU4H030416@svn.freebsd.org> <4C90B326.4000208@freebsd.org> <4C90D27D.4070306@freebsd.org> In-Reply-To: <4C90D27D.4070306@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201009151212.52337.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 15 Sep 2010 12:14:47 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Lawrence Stewart , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212653 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:14:48 -0000 On Wednesday, September 15, 2010 10:04:45 am Andre Oppermann wrote: > Below is the wording proposed by Lawrence: > /* > * The default Maximum Segment Size (MSS) to use when we do not have specific > * knowledge (e.g. via path MTU discovery) that the destination host is prepared > * to accept larger datagrams. The smallest allowable IP datagram MTU and > * optionless IP/TCP header lengths are used for the calculation as per RFC879. > * For IPv4 (RFC791): 576 - 20 - 20 = 536. > * For IPv6 (RFC2460): 1280 - 40 - 20 = 1220. > */ > #define TCP_MSS 536 > #define TCP6_MSS 1220 I think the existing text is fine for this comment, with one nit: * For IPv4 the MSS is 576 - sizeof(struct tcpiphdr) I would find it clearer if it was 'sizeof(struct ip) - sizeof(struct tcphdr)' instead. > * Limit the lowest MSS we accept for path MTU discovery and the TCP SYN MSS > * option. Allowing low values of MSS can consume significant resources and be > * used to mount a resource exhaustion attack. Connections requesting lower MSS > * values will be rounded up to this value and the IP_DF flag will be cleared to > * allow fragmentation along the path. > * > * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. Setting this > * SYSCTL to "0" disables the minmss check. > * > * The default value is fine for TCP over IPv4 across the Internet's smallest > * known link MTU (256 bytes for AX.25 packet radio). However, a connection is > * very unlikely to come across such low MTU interfaces (anno domini 2003). > */ > #define TCP_MINMSS 216 I actually prefer the above text for this block. The 'amounts of resources' phrase is certainly redundant and just 'resources' is clearer. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:14:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB44E10657BE; Wed, 15 Sep 2010 16:14:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 42B588FC18; Wed, 15 Sep 2010 16:14:51 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DCA7146C05; Wed, 15 Sep 2010 12:14:50 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 913EF8A04E; Wed, 15 Sep 2010 12:14:48 -0400 (EDT) From: John Baldwin To: Kostik Belousov Date: Wed, 15 Sep 2010 12:14:33 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201009151424.o8FEOLZE039185@svn.freebsd.org> <20100915145209.GK2465@deviant.kiev.zoral.com.ua> In-Reply-To: <20100915145209.GK2465@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201009151214.33375.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 15 Sep 2010 12:14:48 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:14:54 -0000 On Wednesday, September 15, 2010 10:52:09 am Kostik Belousov wrote: > On Wed, Sep 15, 2010 at 02:24:21PM +0000, Attilio Rao wrote: > > Author: attilio > > Date: Wed Sep 15 14:24:21 2010 > > New Revision: 212661 > > URL: http://svn.freebsd.org/changeset/base/212661 > > > > Log: > > Fix bogus busying mechanism from cdevsw callbacks: > > - D_TRACKCLOSE may be used there as d_close() are expected to match up > > d_open() calls > VFS is not very good at properly calling VOP_CLOSE(). As example, premature > vnode reclaim due to devfs unmount would cause VOP_CLOSE() to be called > only once despite the number of opens being > 1. cdevpriv is probably a much better route for handling this than D_TRACKCLOSE. The destructor routine passed to devfs_set_cdevpriv() would just do the work of decrementing the reference count instead of actually freeing anything in that case. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:20:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A37D4106567A; Wed, 15 Sep 2010 16:20:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 901E28FC2F; Wed, 15 Sep 2010 16:20:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FGKOvY042472; Wed, 15 Sep 2010 16:20:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FGKOwV042460; Wed, 15 Sep 2010 16:20:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009151620.o8FGKOwV042460@svn.freebsd.org> From: Martin Matuska Date: Wed, 15 Sep 2010 16:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212672 - in stable/8/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:20:24 -0000 Author: mm Date: Wed Sep 15 16:20:24 2010 New Revision: 212672 URL: http://svn.freebsd.org/changeset/base/212672 Log: MFC r211932, r211947, r211948: MFC r211932: Import changes from OpenSolaris that provide - better ACL caching and speedup of ACL permission checks - faster handling of stat() - lowered mutex contention in the read/writer lock (rrwlock) - several related bugfixes Detailed information (OpenSolaris onnv changesets and Bug IDs): 9749:105f407a2680 6802734 Support for Access Based Enumeration (not used on FreeBSD) 6844861 inconsistent xattr readdir behavior with too-small buffer 9866:ddc5f1d8eb4e 6848431 zfs with rstchown=0 or file_chown_self privilege allows user to "take" ownership 9981:b4907297e740 6775100 stat() performance on files on zfs should be improved 6827779 rrwlock is overly protective of its counters 10143:d2d432dfe597 6857433 memory leaks found at: zfs_acl_alloc/zfs_acl_node_alloc 6860318 truncate() on zfsroot succeeds when file has a component of its path set without access permission 10232:f37b85f7e03e 6865875 zfs sometimes incorrectly giving search access to a dir 10250:b179ceb34b62 6867395 zpool_upgrade_007_pos testcase panic'd with BAD TRAP: type=e (#pf Page fault) 10269:2788675568fd 6868276 zfs_rezget() can be hazardous when znode has a cached ACL 10295:f7a18a1e9610 6870564 panic in zfs_getsecattr MFC r211947: Move ZUT_OBJS in the same place that is used in vendor code. MFC r211948: Return NULL pointer instead of B_FALSE as it is done in the vendor code. Approved by: delphij (mentor) Obtained from: OpenSolaris (multiple Bug IDs) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c stable/8/sys/cddl/compat/opensolaris/sys/policy.h stable/8/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c Wed Sep 15 16:20:24 2010 (r212672) @@ -332,7 +332,7 @@ secpolicy_vnode_owner(struct vnode *vp, } int -secpolicy_vnode_chown(struct vnode *vp, cred_t *cred, boolean_t check_self) +secpolicy_vnode_chown(struct vnode *vp, cred_t *cred, uid_t owner) { if (secpolicy_fs_owner(vp->v_mount, cred) == 0) Modified: stable/8/sys/cddl/compat/opensolaris/sys/policy.h ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/sys/policy.h Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/compat/opensolaris/sys/policy.h Wed Sep 15 16:20:24 2010 (r212672) @@ -47,8 +47,7 @@ int secpolicy_zinject(struct ucred *cred int secpolicy_fs_unmount(struct ucred *cred, struct mount *vfsp); int secpolicy_basic_link(struct vnode *vp, struct ucred *cred); int secpolicy_vnode_owner(struct vnode *vp, cred_t *cred, uid_t owner); -int secpolicy_vnode_chown(struct vnode *vp, cred_t *cred, - boolean_t check_self); +int secpolicy_vnode_chown(struct vnode *vp, cred_t *cred, uid_t owner); int secpolicy_vnode_stky_modify(struct ucred *cred); int secpolicy_vnode_remove(struct vnode *vp, struct ucred *cred); int secpolicy_vnode_access(struct ucred *cred, struct vnode *vp, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Wed Sep 15 16:20:24 2010 (r212672) @@ -106,3 +106,6 @@ ZFS_OBJS += \ zfs_vfsops.o \ zfs_vnops.o \ zvol.o + +ZUT_OBJS += \ + zut.o Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c Wed Sep 15 16:20:24 2010 (r212672) @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include @@ -159,6 +157,14 @@ static void rrw_enter_read(rrwlock_t *rrl, void *tag) { mutex_enter(&rrl->rr_lock); +#if !defined(DEBUG) && defined(_KERNEL) + if (!rrl->rr_writer && !rrl->rr_writer_wanted) { + rrl->rr_anon_rcount.rc_count++; + mutex_exit(&rrl->rr_lock); + return; + } + DTRACE_PROBE(zfs__rrwfastpath__rdmiss); +#endif ASSERT(rrl->rr_writer != curthread); ASSERT(refcount_count(&rrl->rr_anon_rcount) >= 0); @@ -208,19 +214,28 @@ void rrw_exit(rrwlock_t *rrl, void *tag) { mutex_enter(&rrl->rr_lock); +#if !defined(DEBUG) && defined(_KERNEL) + if (!rrl->rr_writer && rrl->rr_linked_rcount.rc_count == 0) { + rrl->rr_anon_rcount.rc_count--; + if (rrl->rr_anon_rcount.rc_count == 0) + cv_broadcast(&rrl->rr_cv); + mutex_exit(&rrl->rr_lock); + return; + } + DTRACE_PROBE(zfs__rrwfastpath__exitmiss); +#endif ASSERT(!refcount_is_zero(&rrl->rr_anon_rcount) || !refcount_is_zero(&rrl->rr_linked_rcount) || rrl->rr_writer != NULL); if (rrl->rr_writer == NULL) { - if (rrn_find_and_remove(rrl)) { - if (refcount_remove(&rrl->rr_linked_rcount, tag) == 0) - cv_broadcast(&rrl->rr_cv); - - } else { - if (refcount_remove(&rrl->rr_anon_rcount, tag) == 0) - cv_broadcast(&rrl->rr_cv); - } + int64_t count; + if (rrn_find_and_remove(rrl)) + count = refcount_remove(&rrl->rr_linked_rcount, tag); + else + count = refcount_remove(&rrl->rr_anon_rcount, tag); + if (count == 0) + cv_broadcast(&rrl->rr_cv); } else { ASSERT(rrl->rr_writer == curthread); ASSERT(refcount_is_zero(&rrl->rr_anon_rcount) && Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h Wed Sep 15 16:20:24 2010 (r212672) @@ -200,7 +200,9 @@ int zfs_setacl(struct znode *, vsecattr_ void zfs_acl_rele(void *); void zfs_oldace_byteswap(ace_t *, int); void zfs_ace_byteswap(void *, size_t, boolean_t); +extern boolean_t zfs_has_access(struct znode *zp, cred_t *cr); extern int zfs_zaccess(struct znode *, int, int, boolean_t, cred_t *); +int zfs_fastaccesschk_execute(struct znode *, cred_t *); extern int zfs_zaccess_rwx(struct znode *, mode_t, int, cred_t *); extern int zfs_zaccess_unix(struct znode *, mode_t, cred_t *); extern int zfs_acl_access(struct znode *, int, cred_t *); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Wed Sep 15 16:20:24 2010 (r212672) @@ -74,6 +74,7 @@ extern "C" { #define ZFS_ACL_DEFAULTED 0x20 /* ACL should be defaulted */ #define ZFS_ACL_AUTO_INHERIT 0x40 /* ACL should be inherited */ #define ZFS_BONUS_SCANSTAMP 0x80 /* Scanstamp in bonus area */ +#define ZFS_NO_EXECS_DENIED 0x100 /* exec was given to everyone */ /* * Is ID ephemeral? @@ -202,6 +203,7 @@ typedef struct znode { uint64_t z_gen; /* generation (same as zp_gen) */ uint32_t z_sync_cnt; /* synchronous open count */ kmutex_t z_acl_lock; /* acl data lock */ + zfs_acl_t *z_acl_cached; /* cached acl */ list_node_t z_link_node; /* all znodes in fs link */ /* * These are dmu managed fields. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed Sep 15 16:20:24 2010 (r212672) @@ -91,6 +91,8 @@ #define ZFS_ACL_WIDE_FLAGS (V4_ACL_WIDE_FLAGS|ZFS_ACL_TRIVIAL|ZFS_INHERIT_ACE|\ ZFS_ACL_OBJ_ACE) +#define ALL_MODE_EXECS (S_IXUSR | S_IXGRP | S_IXOTH) + static uint16_t zfs_ace_v0_get_type(void *acep) { @@ -779,6 +781,7 @@ zfs_mode_compute(znode_t *zp, zfs_acl_t uint64_t who; uint16_t iflags, type; uint32_t access_mask; + boolean_t an_exec_denied = B_FALSE; mode = (zp->z_phys->zp_mode & (S_IFMT | S_ISUID | S_ISGID | S_ISVTX)); @@ -903,8 +906,32 @@ zfs_mode_compute(znode_t *zp, zfs_acl_t } } } + } else { + /* + * Only care if this IDENTIFIER_GROUP or + * USER ACE denies execute access to someone, + * mode is not affected + */ + if ((access_mask & ACE_EXECUTE) && type == DENY) + an_exec_denied = B_TRUE; } } + + /* + * Failure to allow is effectively a deny, so execute permission + * is denied if it was never mentioned or if we explicitly + * weren't allowed it. + */ + if (!an_exec_denied && + ((seen & ALL_MODE_EXECS) != ALL_MODE_EXECS || + (mode & ALL_MODE_EXECS) != ALL_MODE_EXECS)) + an_exec_denied = B_TRUE; + + if (an_exec_denied) + zp->z_phys->zp_flags &= ~ZFS_NO_EXECS_DENIED; + else + zp->z_phys->zp_flags |= ZFS_NO_EXECS_DENIED; + return (mode); } @@ -944,7 +971,8 @@ zfs_acl_node_read_internal(znode_t *zp, } /* - * Read an external acl object. + * Read an external acl object. If the intent is to modify, always + * create a new acl and leave any cached acl in place. */ static int zfs_acl_node_read(znode_t *zp, zfs_acl_t **aclpp, boolean_t will_modify) @@ -958,8 +986,15 @@ zfs_acl_node_read(znode_t *zp, zfs_acl_t ASSERT(MUTEX_HELD(&zp->z_acl_lock)); + if (zp->z_acl_cached && !will_modify) { + *aclpp = zp->z_acl_cached; + return (0); + } + if (zp->z_phys->zp_acl.z_acl_extern_obj == 0) { *aclpp = zfs_acl_node_read_internal(zp, will_modify); + if (!will_modify) + zp->z_acl_cached = *aclpp; return (0); } @@ -993,6 +1028,8 @@ zfs_acl_node_read(znode_t *zp, zfs_acl_t } *aclpp = aclp; + if (!will_modify) + zp->z_acl_cached = aclp; return (0); } @@ -1017,11 +1054,16 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t dmu_buf_will_dirty(zp->z_dbuf, tx); + if (zp->z_acl_cached) { + zfs_acl_free(zp->z_acl_cached); + zp->z_acl_cached = NULL; + } + zphys->zp_mode = zfs_mode_compute(zp, aclp); /* - * Decide which opbject type to use. If we are forced to - * use old ACL format than transform ACL into zfs_oldace_t + * Decide which object type to use. If we are forced to + * use old ACL format then transform ACL into zfs_oldace_t * layout. */ if (!zfsvfs->z_use_fuids) { @@ -1871,7 +1913,6 @@ zfs_acl_ids_create(znode_t *dzp, int fla mutex_exit(&dzp->z_acl_lock); acl_ids->z_aclp = zfs_acl_inherit(zfsvfs, vap->va_type, paclp, acl_ids->z_mode, &need_chmod); - zfs_acl_free(paclp); } else { acl_ids->z_aclp = zfs_acl_alloc(zfs_acl_version_zp(dzp)); @@ -1972,8 +2013,6 @@ zfs_getacl(znode_t *zp, vsecattr_t *vsec if (mask & VSA_ACE) { size_t aclsz; - zfs_acl_node_t *aclnode = list_head(&aclp->z_acl); - aclsz = count * sizeof (ace_t) + sizeof (ace_object_t) * largeace; @@ -1984,8 +2023,17 @@ zfs_getacl(znode_t *zp, vsecattr_t *vsec zfs_copy_fuid_2_ace(zp->z_zfsvfs, aclp, cr, vsecp->vsa_aclentp, !(mask & VSA_ACE_ALLTYPES)); else { - bcopy(aclnode->z_acldata, vsecp->vsa_aclentp, - count * sizeof (ace_t)); + zfs_acl_node_t *aclnode; + void *start = vsecp->vsa_aclentp; + + for (aclnode = list_head(&aclp->z_acl); aclnode; + aclnode = list_next(&aclp->z_acl, aclnode)) { + bcopy(aclnode->z_acldata, start, + aclnode->z_size); + start = (caddr_t)start + aclnode->z_size; + } + ASSERT((caddr_t)start - (caddr_t)vsecp->vsa_aclentp == + aclp->z_acl_bytes); } } if (mask & VSA_ACE_ACLFLAGS) { @@ -2000,8 +2048,6 @@ zfs_getacl(znode_t *zp, vsecattr_t *vsec mutex_exit(&zp->z_acl_lock); - zfs_acl_free(aclp); - return (0); } @@ -2097,11 +2143,6 @@ zfs_setacl(znode_t *zp, vsecattr_t *vsec aclp->z_hints |= (zp->z_phys->zp_flags & V4_ACL_WIDE_FLAGS); } top: - if (error = zfs_zaccess(zp, ACE_WRITE_ACL, 0, skipaclchk, cr)) { - zfs_acl_free(aclp); - return (error); - } - mutex_enter(&zp->z_lock); mutex_enter(&zp->z_acl_lock); @@ -2147,6 +2188,7 @@ top: error = zfs_aclset_common(zp, aclp, cr, tx); ASSERT(error == 0); + zp->z_acl_cached = aclp; if (fuid_dirtied) zfs_fuid_sync(zfsvfs, tx); @@ -2156,7 +2198,6 @@ top: if (fuidp) zfs_fuid_info_free(fuidp); - zfs_acl_free(aclp); dmu_tx_commit(tx); done: mutex_exit(&zp->z_acl_lock); @@ -2166,46 +2207,17 @@ done: } /* - * working_mode returns the permissions that were not granted + * Check accesses of interest (AoI) against attributes of the dataset + * such as read-only. Returns zero if no AoI conflict with dataset + * attributes, otherwise an appropriate errno is returned. */ static int -zfs_zaccess_common(znode_t *zp, uint32_t v4_mode, uint32_t *working_mode, - boolean_t *check_privs, boolean_t skipaclchk, cred_t *cr) +zfs_zaccess_dataset_check(znode_t *zp, uint32_t v4_mode) { - zfs_acl_t *aclp; - zfsvfs_t *zfsvfs = zp->z_zfsvfs; - int error; - uid_t uid = crgetuid(cr); - uint64_t who; - uint16_t type, iflags; - uint16_t entry_type; - uint32_t access_mask; - uint32_t deny_mask = 0; - zfs_ace_hdr_t *acep = NULL; - boolean_t checkit; - uid_t fowner; - uid_t gowner; - - /* - * Short circuit empty requests - */ - if (v4_mode == 0) - return (0); - - *check_privs = B_TRUE; - - if (zfsvfs->z_replay) { - *working_mode = 0; - return (0); - } - - *working_mode = v4_mode; - if ((v4_mode & WRITE_MASK) && (zp->z_zfsvfs->z_vfs->vfs_flag & VFS_RDONLY) && (!IS_DEVVP(ZTOV(zp)) || (IS_DEVVP(ZTOV(zp)) && (v4_mode & WRITE_MASK_ATTRS)))) { - *check_privs = B_FALSE; return (EROFS); } @@ -2217,14 +2229,12 @@ zfs_zaccess_common(znode_t *zp, uint32_t (zp->z_phys->zp_flags & (ZFS_READONLY | ZFS_IMMUTABLE))) || (ZTOV(zp)->v_type == VDIR && (zp->z_phys->zp_flags & ZFS_IMMUTABLE)))) { - *check_privs = B_FALSE; return (EPERM); } #ifdef sun if ((v4_mode & (ACE_DELETE | ACE_DELETE_CHILD)) && (zp->z_phys->zp_flags & ZFS_NOUNLINK)) { - *check_privs = B_FALSE; return (EPERM); } #else @@ -2235,26 +2245,60 @@ zfs_zaccess_common(znode_t *zp, uint32_t */ if ((v4_mode & ACE_DELETE) && (zp->z_phys->zp_flags & ZFS_NOUNLINK)) { - *check_privs = B_FALSE; return (EPERM); } #endif if (((v4_mode & (ACE_READ_DATA|ACE_EXECUTE)) && (zp->z_phys->zp_flags & ZFS_AV_QUARANTINED))) { - *check_privs = B_FALSE; return (EACCES); } - /* - * The caller requested that the ACL check be skipped. This - * would only happen if the caller checked VOP_ACCESS() with a - * 32 bit ACE mask and already had the appropriate permissions. - */ - if (skipaclchk) { - *working_mode = 0; - return (0); - } + return (0); +} + +/* + * The primary usage of this function is to loop through all of the + * ACEs in the znode, determining what accesses of interest (AoI) to + * the caller are allowed or denied. The AoI are expressed as bits in + * the working_mode parameter. As each ACE is processed, bits covered + * by that ACE are removed from the working_mode. This removal + * facilitates two things. The first is that when the working mode is + * empty (= 0), we know we've looked at all the AoI. The second is + * that the ACE interpretation rules don't allow a later ACE to undo + * something granted or denied by an earlier ACE. Removing the + * discovered access or denial enforces this rule. At the end of + * processing the ACEs, all AoI that were found to be denied are + * placed into the working_mode, giving the caller a mask of denied + * accesses. Returns: + * 0 if all AoI granted + * EACCESS if the denied mask is non-zero + * other error if abnormal failure (e.g., IO error) + * + * A secondary usage of the function is to determine if any of the + * AoI are granted. If an ACE grants any access in + * the working_mode, we immediately short circuit out of the function. + * This mode is chosen by setting anyaccess to B_TRUE. The + * working_mode is not a denied access mask upon exit if the function + * is used in this manner. + */ +static int +zfs_zaccess_aces_check(znode_t *zp, uint32_t *working_mode, + boolean_t anyaccess, cred_t *cr) +{ + zfsvfs_t *zfsvfs = zp->z_zfsvfs; + zfs_acl_t *aclp; + int error; + uid_t uid = crgetuid(cr); + uint64_t who; + uint16_t type, iflags; + uint16_t entry_type; + uint32_t access_mask; + uint32_t deny_mask = 0; + zfs_ace_hdr_t *acep = NULL; + boolean_t checkit; + uid_t fowner; + uid_t gowner; zfs_fuid_map_ids(zp, cr, &fowner, &gowner); @@ -2268,6 +2312,7 @@ zfs_zaccess_common(znode_t *zp, uint32_t while (acep = zfs_acl_next_ace(aclp, acep, &who, &access_mask, &iflags, &type)) { + uint32_t mask_matched; if (!zfs_acl_valid_ace_type(type, iflags)) continue; @@ -2275,6 +2320,11 @@ zfs_zaccess_common(znode_t *zp, uint32_t if (ZTOV(zp)->v_type == VDIR && (iflags & ACE_INHERIT_ONLY_ACE)) continue; + /* Skip ACE if it does not affect any AoI */ + mask_matched = (access_mask & *working_mode); + if (!mask_matched) + continue; + entry_type = (iflags & ACE_TYPE_FLAGS); checkit = B_FALSE; @@ -2306,21 +2356,29 @@ zfs_zaccess_common(znode_t *zp, uint32_t checkit = B_TRUE; break; } else { - zfs_acl_free(aclp); mutex_exit(&zp->z_acl_lock); return (EIO); } } if (checkit) { - uint32_t mask_matched = (access_mask & *working_mode); - - if (mask_matched) { - if (type == DENY) - deny_mask |= mask_matched; - - *working_mode &= ~mask_matched; + if (type == DENY) { + DTRACE_PROBE3(zfs__ace__denies, + znode_t *, zp, + zfs_ace_hdr_t *, acep, + uint32_t, mask_matched); + deny_mask |= mask_matched; + } else { + DTRACE_PROBE3(zfs__ace__allows, + znode_t *, zp, + zfs_ace_hdr_t *, acep, + uint32_t, mask_matched); + if (anyaccess) { + mutex_exit(&zp->z_acl_lock); + return (0); + } } + *working_mode &= ~mask_matched; } /* Are we done? */ @@ -2329,7 +2387,6 @@ zfs_zaccess_common(znode_t *zp, uint32_t } mutex_exit(&zp->z_acl_lock); - zfs_acl_free(aclp); /* Put the found 'denies' back on the working mode */ if (deny_mask) { @@ -2342,6 +2399,68 @@ zfs_zaccess_common(znode_t *zp, uint32_t return (0); } +/* + * Return true if any access whatsoever granted, we don't actually + * care what access is granted. + */ +boolean_t +zfs_has_access(znode_t *zp, cred_t *cr) +{ + uint32_t have = ACE_ALL_PERMS; + + if (zfs_zaccess_aces_check(zp, &have, B_TRUE, cr) != 0) { + uid_t owner; + + owner = zfs_fuid_map_id(zp->z_zfsvfs, + zp->z_phys->zp_uid, cr, ZFS_OWNER); + + return ( + secpolicy_vnode_access(cr, ZTOV(zp), owner, VREAD) == 0 || + secpolicy_vnode_access(cr, ZTOV(zp), owner, VWRITE) == 0 || + secpolicy_vnode_access(cr, ZTOV(zp), owner, VEXEC) == 0 || + secpolicy_vnode_chown(ZTOV(zp), cr, owner) == 0 || + secpolicy_vnode_setdac(ZTOV(zp), cr, owner) == 0 || + secpolicy_vnode_remove(ZTOV(zp), cr) == 0); + } + return (B_TRUE); +} + +static int +zfs_zaccess_common(znode_t *zp, uint32_t v4_mode, uint32_t *working_mode, + boolean_t *check_privs, boolean_t skipaclchk, cred_t *cr) +{ + zfsvfs_t *zfsvfs = zp->z_zfsvfs; + int err; + + *working_mode = v4_mode; + *check_privs = B_TRUE; + + /* + * Short circuit empty requests + */ + if (v4_mode == 0 || zfsvfs->z_replay) { + *working_mode = 0; + return (0); + } + + if ((err = zfs_zaccess_dataset_check(zp, v4_mode)) != 0) { + *check_privs = B_FALSE; + return (err); + } + + /* + * The caller requested that the ACL check be skipped. This + * would only happen if the caller checked VOP_ACCESS() with a + * 32 bit ACE mask and already had the appropriate permissions. + */ + if (skipaclchk) { + *working_mode = 0; + return (0); + } + + return (zfs_zaccess_aces_check(zp, working_mode, B_FALSE, cr)); +} + static int zfs_zaccess_append(znode_t *zp, uint32_t *working_mode, boolean_t *check_privs, cred_t *cr) @@ -2353,6 +2472,78 @@ zfs_zaccess_append(znode_t *zp, uint32_t check_privs, B_FALSE, cr)); } +int +zfs_fastaccesschk_execute(znode_t *zdp, cred_t *cr) +{ + boolean_t owner = B_FALSE; + boolean_t groupmbr = B_FALSE; + boolean_t is_attr; + uid_t fowner; + uid_t gowner; + uid_t uid = crgetuid(cr); + int error; + + if (zdp->z_phys->zp_flags & ZFS_AV_QUARANTINED) + return (EACCES); + + is_attr = ((zdp->z_phys->zp_flags & ZFS_XATTR) && + (ZTOV(zdp)->v_type == VDIR)); + if (is_attr) + goto slow; + + mutex_enter(&zdp->z_acl_lock); + + if (zdp->z_phys->zp_flags & ZFS_NO_EXECS_DENIED) { + mutex_exit(&zdp->z_acl_lock); + return (0); + } + + if (FUID_INDEX(zdp->z_phys->zp_uid) != 0 || + FUID_INDEX(zdp->z_phys->zp_gid) != 0) { + mutex_exit(&zdp->z_acl_lock); + goto slow; + } + + fowner = (uid_t)zdp->z_phys->zp_uid; + gowner = (uid_t)zdp->z_phys->zp_gid; + + if (uid == fowner) { + owner = B_TRUE; + if (zdp->z_phys->zp_mode & S_IXUSR) { + mutex_exit(&zdp->z_acl_lock); + return (0); + } else { + mutex_exit(&zdp->z_acl_lock); + goto slow; + } + } + if (groupmember(gowner, cr)) { + groupmbr = B_TRUE; + if (zdp->z_phys->zp_mode & S_IXGRP) { + mutex_exit(&zdp->z_acl_lock); + return (0); + } else { + mutex_exit(&zdp->z_acl_lock); + goto slow; + } + } + if (!owner && !groupmbr) { + if (zdp->z_phys->zp_mode & S_IXOTH) { + mutex_exit(&zdp->z_acl_lock); + return (0); + } + } + + mutex_exit(&zdp->z_acl_lock); + +slow: + DTRACE_PROBE(zfs__fastpath__execute__access__miss); + ZFS_ENTER(zdp->z_zfsvfs); + error = zfs_zaccess(zdp, ACE_EXECUTE, 0, B_FALSE, cr); + ZFS_EXIT(zdp->z_zfsvfs); + return (error); +} + /* * Determine whether Access should be granted/denied, invoking least * priv subsytem when a deny is determined. @@ -2457,7 +2648,7 @@ zfs_zaccess(znode_t *zp, int mode, int f owner, checkmode); if (error == 0 && (working_mode & ACE_WRITE_OWNER)) - error = secpolicy_vnode_chown(ZTOV(check_zp), cr, B_TRUE); + error = secpolicy_vnode_chown(ZTOV(check_zp), cr, owner); if (error == 0 && (working_mode & ACE_WRITE_ACL)) error = secpolicy_vnode_setdac(ZTOV(check_zp), cr, owner); @@ -2466,7 +2657,7 @@ zfs_zaccess(znode_t *zp, int mode, int f error = secpolicy_vnode_remove(ZTOV(check_zp), cr); if (error == 0 && (working_mode & ACE_SYNCHRONIZE)) { - error = secpolicy_vnode_chown(ZTOV(check_zp), cr, B_FALSE); + error = secpolicy_vnode_chown(ZTOV(check_zp), cr, owner); } if (error == 0) { /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 15 16:20:24 2010 (r212672) @@ -983,6 +983,7 @@ zfs_set_fuid_feature(zfsvfs_t *zfsvfs) vfs_set_feature(zfsvfs->z_vfs, VFSFT_SYSATTR_VIEWS); vfs_set_feature(zfsvfs->z_vfs, VFSFT_ACEMASKONACCESS); vfs_set_feature(zfsvfs->z_vfs, VFSFT_ACLONCREATE); + vfs_set_feature(zfsvfs->z_vfs, VFSFT_ACCESS_FILTER); } } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 16:20:24 2010 (r212672) @@ -1164,6 +1164,27 @@ zfs_access(vnode_t *vp, int mode, int fl } /* + * If vnode is for a device return a specfs vnode instead. + */ +static int +specvp_check(vnode_t **vpp, cred_t *cr) +{ + int error = 0; + + if (IS_DEVVP(*vpp)) { + struct vnode *svp; + + svp = specvp(*vpp, (*vpp)->v_rdev, (*vpp)->v_type, cr); + VN_RELE(*vpp); + if (svp == NULL) + error = ENOSYS; + *vpp = svp; + } + return (error); +} + + +/* * Lookup an entry in a directory, or an extended attribute directory. * If it exists, return a held vnode reference for it. * @@ -1192,10 +1213,49 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode { znode_t *zdp = VTOZ(dvp); zfsvfs_t *zfsvfs = zdp->z_zfsvfs; - int error; + int error = 0; int *direntflags = NULL; void *realpnp = NULL; + /* fast path */ + if (!(flags & (LOOKUP_XATTR | FIGNORECASE))) { + + if (dvp->v_type != VDIR) { + return (ENOTDIR); + } else if (zdp->z_dbuf == NULL) { + return (EIO); + } + + if (nm[0] == 0 || (nm[0] == '.' && nm[1] == '\0')) { + error = zfs_fastaccesschk_execute(zdp, cr); + if (!error) { + *vpp = dvp; + VN_HOLD(*vpp); + return (0); + } + return (error); + } else { + vnode_t *tvp = dnlc_lookup(dvp, nm); + + if (tvp) { + error = zfs_fastaccesschk_execute(zdp, cr); + if (error) { + VN_RELE(tvp); + return (error); + } + if (tvp == DNLC_NO_VNODE) { + VN_RELE(tvp); + return (ENOENT); + } else { + *vpp = tvp; + return (specvp_check(vpp, cr)); + } + } + } + } + + DTRACE_PROBE2(zfs__fastpath__lookup__miss, vnode_t *, dvp, char *, nm); + ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zdp); @@ -1261,21 +1321,8 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode } error = zfs_dirlook(zdp, nm, vpp, flags, direntflags, realpnp); - if (error == 0) { - /* - * Convert device special files - */ - if (IS_DEVVP(*vpp)) { - vnode_t *svp; - - svp = specvp(*vpp, (*vpp)->v_rdev, (*vpp)->v_type, cr); - VN_RELE(*vpp); - if (svp == NULL) - error = ENOSYS; - else - *vpp = svp; - } - } + if (error == 0) + error = specvp_check(vpp, cr); /* Translate errors and add SAVENAME when needed. */ if (cnp->cn_flags & ISLASTCN) { @@ -1468,6 +1515,7 @@ top: &acl_ids)) != 0) goto out; if (zfs_acl_ids_overquota(zfsvfs, &acl_ids)) { + zfs_acl_ids_free(&acl_ids); error = EDQUOT; goto out; } @@ -1564,19 +1612,7 @@ out: VN_RELE(ZTOV(zp)); } else { *vpp = ZTOV(zp); - /* - * If vnode is for a device return a specfs vnode instead. - */ - if (IS_DEVVP(*vpp)) { - struct vnode *svp; - - svp = specvp(*vpp, (*vpp)->v_rdev, (*vpp)->v_type, cr); - VN_RELE(*vpp); - if (svp == NULL) { - error = ENOSYS; - } - *vpp = svp; - } + error = specvp_check(vpp, cr); } ZFS_EXIT(zfsvfs); @@ -1883,6 +1919,7 @@ top: return (error); } if (zfs_acl_ids_overquota(zfsvfs, &acl_ids)) { + zfs_acl_ids_free(&acl_ids); zfs_dirent_unlock(dl); ZFS_EXIT(zfsvfs); return (EDQUOT); @@ -2274,6 +2311,21 @@ zfs_readdir(vnode_t *vp, uio_t *uio, cre } } + if (flags & V_RDDIR_ACCFILTER) { + /* + * If we have no access at all, don't include + * this entry in the returned information + */ + znode_t *ezp; + if (zfs_zget(zp->z_zfsvfs, objnum, &ezp) != 0) + goto skip_entry; + if (!zfs_has_access(ezp, cr)) { + VN_RELE(ZTOV(ezp)); + goto skip_entry; + } + VN_RELE(ZTOV(ezp)); + } + if (flags & V_RDDIR_ENTFLAGS) reclen = EDIRENT_RECLEN(strlen(zap.za_name)); else @@ -2324,6 +2376,7 @@ zfs_readdir(vnode_t *vp, uio_t *uio, cre if (prefetch) dmu_prefetch(os, objnum, 0, 0); + skip_entry: /* * Move to the next entry, fill in the previous offset. */ @@ -2712,6 +2765,7 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i top: attrzp = NULL; + /* Can this be moved to before the top label? */ if (zfsvfs->z_vfs->vfs_flag & VFS_RDONLY) { ZFS_EXIT(zfsvfs); return (EROFS); @@ -3036,6 +3090,8 @@ top: zp->z_phys->zp_mode = new_mode; err = zfs_aclset_common(zp, aclp, cr, tx); ASSERT3U(err, ==, 0); + zp->z_acl_cached = aclp; + aclp = NULL; mutex_exit(&zp->z_acl_lock); } @@ -3127,10 +3183,8 @@ out: if (attrzp) VN_RELE(ZTOV(attrzp)); - if (aclp) { + if (aclp) zfs_acl_free(aclp); - aclp = NULL; - } if (fuidp) { zfs_fuid_info_free(fuidp); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Sep 15 16:20:24 2010 (r212672) @@ -171,6 +171,7 @@ zfs_znode_cache_constructor(void *buf, v zp->z_dbuf = NULL; zp->z_dirlocks = NULL; + zp->z_acl_cached = NULL; return (0); } @@ -193,6 +194,7 @@ zfs_znode_cache_destructor(void *buf, vo ASSERT(zp->z_dbuf == NULL); ASSERT(zp->z_dirlocks == NULL); + ASSERT(zp->z_acl_cached == NULL); } #ifdef ZNODE_STATS @@ -237,6 +239,15 @@ zfs_znode_move_impl(znode_t *ozp, znode_ nzp->z_phys = ozp->z_phys; nzp->z_dbuf = ozp->z_dbuf; + /* + * Since this is just an idle znode and kmem is already dealing with + * memory pressure, release any cached ACL. + */ + if (ozp->z_acl_cached) { + zfs_acl_free(ozp->z_acl_cached); + ozp->z_acl_cached = NULL; + } + /* Update back pointers. */ (void) dmu_buf_update_user(nzp->z_dbuf, ozp, nzp, &nzp->z_phys, znode_evict_error); @@ -471,6 +482,7 @@ zfs_znode_dmu_init(zfsvfs_t *zfsvfs, zno mutex_enter(&zp->z_lock); ASSERT(zp->z_dbuf == NULL); + ASSERT(zp->z_acl_cached == NULL); zp->z_dbuf = db; nzp = dmu_buf_set_user_ie(db, zp, &zp->z_phys, znode_evict_error); @@ -954,6 +966,13 @@ zfs_rezget(znode_t *zp) return (EIO); } + mutex_enter(&zp->z_acl_lock); + if (zp->z_acl_cached) { + zfs_acl_free(zp->z_acl_cached); + zp->z_acl_cached = NULL; + } + mutex_exit(&zp->z_acl_lock); + zfs_znode_dmu_init(zfsvfs, zp, db); zp->z_unlinked = (zp->z_phys->zp_links == 0); zp->z_blksz = doi.doi_data_block_size; @@ -1039,6 +1058,11 @@ zfs_znode_free(znode_t *zp) list_remove(&zfsvfs->z_all_znodes, zp); mutex_exit(&zfsvfs->z_znodes_lock); + if (zp->z_acl_cached) { + zfs_acl_free(zp->z_acl_cached); + zp->z_acl_cached = NULL; + } + kmem_cache_free(znode_cache, zp); VFS_RELE(zfsvfs->z_vfs); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Wed Sep 15 16:14:38 2010 (r212671) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Wed Sep 15 16:20:24 2010 (r212672) @@ -378,6 +378,7 @@ struct taskq; * Flags for VOP_READDIR */ #define V_RDDIR_ENTFLAGS 0x01 /* request dirent flags */ +#define V_RDDIR_ACCFILTER 0x02 /* filter out inaccessible dirents */ /* * Public vnode manipulation functions. From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:25:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C3681065672; Wed, 15 Sep 2010 16:25:09 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B5E228FC17; Wed, 15 Sep 2010 16:25:07 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA12069; Wed, 15 Sep 2010 19:25:05 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4C90F361.4090106@freebsd.org> Date: Wed, 15 Sep 2010 19:25:05 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100909 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: John Baldwin References: <201009151002.o8FA2kvO029237@svn.freebsd.org> <201009151157.24735.jhb@freebsd.org> In-Reply-To: <201009151157.24735.jhb@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212647 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:25:09 -0000 on 15/09/2010 18:57 John Baldwin said the following: > On Wednesday, September 15, 2010 6:02:46 am Andriy Gapon wrote: >> Author: avg >> Date: Wed Sep 15 10:02:46 2010 >> New Revision: 212647 >> URL: http://svn.freebsd.org/changeset/base/212647 >> >> Log: >> sys/pcpu.h: remove a workaround for a fixed ld bug >> >> The workaround was incorrectly documented as having something to do with >> set_pcpu section's progbits, but in fact it was for incorrect placement >> of __start_set_pcpu because of the bug in ld. >> The bug was fixed in r210245, see commit message for details. >> >> A side-effect of the workaround was that a zero-size set_pcpu section was >> produced for modules, source code of which included pcpu.h but didn't >> actually define any dynamic per-cpu variables. >> This commit should remove the side-effect. >> >> The same workaround is present sys/net/vnet.h, has an analogous side-effect >> and can be removed as well. >> >> An UPDATING entry that warns about a need for recent ld is following. >> >> MFC after: 1 month >> >> Modified: >> head/sys/sys/pcpu.h >> >> Modified: head/sys/sys/pcpu.h >> ============================================================================== >> --- head/sys/sys/pcpu.h Wed Sep 15 09:48:18 2010 (r212646) >> +++ head/sys/sys/pcpu.h Wed Sep 15 10:02:46 2010 (r212647) >> @@ -44,24 +44,10 @@ >> >> /* >> * Define a set for pcpu data. >> - * >> - * We don't use SET_DECLARE because it defines the set as 'a' when we >> - * want 'aw'. gcc considers uninitialized data in a separate section >> - * writable, and there is no generic zero initializer that works for >> - * structs and scalars. >> */ >> extern uintptr_t *__start_set_pcpu; >> extern uintptr_t *__stop_set_pcpu; > > Given that you removed this comment, can you now use SET_DECLARE() here? No, why, for what do you want it to use? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:30:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 969BB106567A; Wed, 15 Sep 2010 16:30:52 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4C10B8FC14; Wed, 15 Sep 2010 16:30:50 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA12242; Wed, 15 Sep 2010 19:30:49 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4C90F4B9.3060400@freebsd.org> Date: Wed, 15 Sep 2010 19:30:49 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100909 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: John Baldwin References: <201009151002.o8FA2kvO029237@svn.freebsd.org> <201009151157.24735.jhb@freebsd.org> <4C90F361.4090106@freebsd.org> In-Reply-To: <4C90F361.4090106@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212647 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:30:52 -0000 on 15/09/2010 19:25 Andriy Gapon said the following: > on 15/09/2010 18:57 John Baldwin said the following: >> On Wednesday, September 15, 2010 6:02:46 am Andriy Gapon wrote: >>> extern uintptr_t *__start_set_pcpu; >>> extern uintptr_t *__stop_set_pcpu; >> >> Given that you removed this comment, can you now use SET_DECLARE() here? > > No, why, for what do you want it to use? > Oh, oops, sorry; yes, of course. SET_DECLARE would expand to exactly those two lines. I am not sure why comment even said that it's impossible to use SET_DECLARE(), perhaps previously it used to expand to something bigger? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 16:42:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ACE01065743; Wed, 15 Sep 2010 16:42:44 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9E78A8FC25; Wed, 15 Sep 2010 16:42:42 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA12506; Wed, 15 Sep 2010 19:42:40 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4C90F780.8080402@freebsd.org> Date: Wed, 15 Sep 2010 19:42:40 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100909 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: John Baldwin References: <201009151002.o8FA2kvO029237@svn.freebsd.org> <201009151157.24735.jhb@freebsd.org> <4C90F361.4090106@freebsd.org> <4C90F4B9.3060400@freebsd.org> In-Reply-To: <4C90F4B9.3060400@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212647 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:42:44 -0000 on 15/09/2010 19:30 Andriy Gapon said the following: > SET_DECLARE would expand to exactly those two lines. > I am not sure why comment even said that it's impossible to use SET_DECLARE(), > perhaps previously it used to expand to something bigger? Having said that, I am not sure if it makes logical sense to use SET_DECLARE() in pcpu.h. Family of SET_* macros seems to be geared towards sets that contain arrays of identical items (e.g. see SET_ITEM, SET_COUNT). set_pcpu reserves space for items of various types and sizes. So I am not sure if using any SET_* macros would not be confusing in the future. What do you think? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 17:11:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20E5A106564A; Wed, 15 Sep 2010 17:11:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 110778FC18; Wed, 15 Sep 2010 17:11:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FHBFAK043819; Wed, 15 Sep 2010 17:11:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FHBFQu043816; Wed, 15 Sep 2010 17:11:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151711.o8FHBFQu043816@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 17:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212676 - in head/sys: sparc64/sparc64 sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 17:11:16 -0000 Author: marius Date: Wed Sep 15 17:11:15 2010 New Revision: 212676 URL: http://svn.freebsd.org/changeset/base/212676 Log: Sync with other platforms: - make dflt_lock() always panic, - add kludge to use contigmalloc() when the alignment is larger than the size and print a diagnostic when we didn't satisfy the alignment. Modified: head/sys/sparc64/sparc64/bus_machdep.c head/sys/sun4v/sun4v/bus_machdep.c Modified: head/sys/sparc64/sparc64/bus_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/bus_machdep.c Wed Sep 15 16:42:57 2010 (r212675) +++ head/sys/sparc64/sparc64/bus_machdep.c Wed Sep 15 17:11:15 2010 (r212676) @@ -182,11 +182,8 @@ busdma_lock_mutex(void *arg, bus_dma_loc static void dflt_lock(void *arg, bus_dma_lock_op_t op) { -#ifdef INVARIANTS + panic("driver error: busdma dflt_lock called"); -#else - printf("DRIVER_ERROR: busdma dflt_lock called\n"); -#endif } /* @@ -631,9 +628,18 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v if (flags & BUS_DMA_ZERO) mflags |= M_ZERO; - if ((dmat->dt_maxsize <= PAGE_SIZE)) { + /* + * XXX: + * (dmat->dt_alignment < dmat->dt_maxsize) is just a quick hack; the + * exact alignment guarantees of malloc need to be nailed down, and + * the code below should be rewritten to take that into account. + * + * In the meantime, we'll warn the user if malloc gets it wrong. + */ + if (dmat->dt_maxsize <= PAGE_SIZE && + dmat->dt_alignment < dmat->dt_maxsize) *vaddr = malloc(dmat->dt_maxsize, M_DEVBUF, mflags); - } else { + else { /* * XXX use contigmalloc until it is merged into this * facility and handles multi-seg allocations. Nobody @@ -646,6 +652,8 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v } if (*vaddr == NULL) return (ENOMEM); + if ((uintptr_t)*vaddr % dmat->dt_alignment) + printf("%s: failed to align memory properly.\n", __func__); return (0); } @@ -657,11 +665,11 @@ static void nexus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) { - if ((dmat->dt_maxsize <= PAGE_SIZE)) + if (dmat->dt_maxsize <= PAGE_SIZE && + dmat->dt_alignment < dmat->dt_maxsize) free(vaddr, M_DEVBUF); - else { + else contigfree(vaddr, dmat->dt_maxsize, M_DEVBUF); - } } struct bus_dma_methods nexus_dma_methods = { Modified: head/sys/sun4v/sun4v/bus_machdep.c ============================================================================== --- head/sys/sun4v/sun4v/bus_machdep.c Wed Sep 15 16:42:57 2010 (r212675) +++ head/sys/sun4v/sun4v/bus_machdep.c Wed Sep 15 17:11:15 2010 (r212676) @@ -181,11 +181,8 @@ busdma_lock_mutex(void *arg, bus_dma_loc static void dflt_lock(void *arg, bus_dma_lock_op_t op) { -#ifdef INVARIANTS + panic("driver error: busdma dflt_lock called"); -#else - printf("DRIVER_ERROR: busdma dflt_lock called\n"); -#endif } /* @@ -647,9 +644,18 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v if (flags & BUS_DMA_ZERO) mflags |= M_ZERO; - if ((dmat->dt_maxsize <= PAGE_SIZE)) { + /* + * XXX: + * (dmat->dt_alignment < dmat->dt_maxsize) is just a quick hack; the + * exact alignment guarantees of malloc need to be nailed down, and + * the code below should be rewritten to take that into account. + * + * In the meantime, we'll warn the user if malloc gets it wrong. + */ + if (dmat->dt_maxsize <= PAGE_SIZE && + dmat->dt_alignment < dmat->dt_maxsize) *vaddr = malloc(dmat->dt_maxsize, M_DEVBUF, mflags); - } else { + else { /* * XXX use contigmalloc until it is merged into this * facility and handles multi-seg allocations. Nobody @@ -662,6 +668,8 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v } if (*vaddr == NULL) return (ENOMEM); + if ((uintptr_t)*vaddr % dmat->dt_alignment) + printf("%s: failed to align memory properly.\n", __func__); return (0); } @@ -673,11 +681,11 @@ static void nexus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) { - if ((dmat->dt_maxsize <= PAGE_SIZE)) + if (dmat->dt_maxsize <= PAGE_SIZE && + dmat->dt_alignment < dmat->dt_maxsize) free(vaddr, M_DEVBUF); - else { + else contigfree(vaddr, dmat->dt_maxsize, M_DEVBUF); - } } struct bus_dma_methods nexus_dma_methods = { From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 17:25:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 763821065670; Wed, 15 Sep 2010 17:25:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 651FB8FC08; Wed, 15 Sep 2010 17:25:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FHPpPb044235; Wed, 15 Sep 2010 17:25:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FHPpBL044223; Wed, 15 Sep 2010 17:25:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201009151725.o8FHPpBL044223@svn.freebsd.org> From: Xin LI Date: Wed, 15 Sep 2010 17:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212678 - stable/7/sys/dev/twa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 17:25:51 -0000 Author: delphij Date: Wed Sep 15 17:25:51 2010 New Revision: 212678 URL: http://svn.freebsd.org/changeset/base/212678 Log: MFC r212008,212028,212210 the updated twa(4) driver minus maxio change which depends on cam(4) revision r195534. The change have been tested on stable/7 with 3ware 9650SE at iXsystems. Modified: stable/7/sys/dev/twa/tw_cl.h stable/7/sys/dev/twa/tw_cl_externs.h stable/7/sys/dev/twa/tw_cl_fwif.h stable/7/sys/dev/twa/tw_cl_init.c stable/7/sys/dev/twa/tw_cl_intr.c stable/7/sys/dev/twa/tw_cl_io.c stable/7/sys/dev/twa/tw_cl_misc.c stable/7/sys/dev/twa/tw_cl_share.h stable/7/sys/dev/twa/tw_osl.h stable/7/sys/dev/twa/tw_osl_cam.c stable/7/sys/dev/twa/tw_osl_freebsd.c stable/7/sys/dev/twa/tw_osl_share.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/twa/tw_cl.h ============================================================================== --- stable/7/sys/dev/twa/tw_cl.h Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl.h Wed Sep 15 17:25:51 2010 (r212678) @@ -88,7 +88,8 @@ struct tw_cli_q_stats { #define TW_CLI_BUSY_Q 1 /* q of reqs submitted to fw */ #define TW_CLI_PENDING_Q 2 /* q of reqs deferred due to 'q full' */ #define TW_CLI_COMPLETE_Q 3 /* q of reqs completed by fw */ -#define TW_CLI_Q_COUNT 4 /* total number of queues */ +#define TW_CLI_RESET_Q 4 /* q of reqs reset by timeout */ +#define TW_CLI_Q_COUNT 5 /* total number of queues */ /* CL's internal request context. */ @@ -133,6 +134,7 @@ struct tw_cli_ctlr_context { TW_UINT8 interrupts_enabled; /* Interrupts on controller enabled. */ TW_UINT8 internal_req_busy; /* Data buffer for internal requests in use. */ TW_UINT8 get_more_aens; /* More AEN's need to be retrieved. */ + TW_UINT8 reset_needed; /* Controller needs a soft reset. */ TW_UINT8 reset_in_progress; /* Controller is being reset. */ TW_UINT8 reset_phase1_in_progress; /* In 'phase 1' of reset. */ TW_UINT32 flags; /* controller settings */ Modified: stable/7/sys/dev/twa/tw_cl_externs.h ============================================================================== --- stable/7/sys/dev/twa/tw_cl_externs.h Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl_externs.h Wed Sep 15 17:25:51 2010 (r212678) @@ -86,6 +86,8 @@ extern TW_INT32 tw_cli_submit_and_poll_r /* Soft reset the controller. */ extern TW_INT32 tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr); +extern int twa_setup_intr(struct twa_softc *sc); +extern int twa_teardown_intr(struct twa_softc *sc); /* Send down a SCSI command to the firmware (usually, an internal Req Sense. */ extern TW_INT32 tw_cli_send_scsi_cmd(struct tw_cli_req_context *req, Modified: stable/7/sys/dev/twa/tw_cl_fwif.h ============================================================================== --- stable/7/sys/dev/twa/tw_cl_fwif.h Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl_fwif.h Wed Sep 15 17:25:51 2010 (r212678) @@ -89,7 +89,7 @@ #define TWA_STATUS_MINOR_VERSION_MASK 0x0F000000 #define TWA_STATUS_MAJOR_VERSION_MASK 0xF0000000 -#define TWA_STATUS_UNEXPECTED_BITS 0x00F00000 +#define TWA_STATUS_UNEXPECTED_BITS 0x00D00000 /* PCI related defines. */ Modified: stable/7/sys/dev/twa/tw_cl_init.c ============================================================================== --- stable/7/sys/dev/twa/tw_cl_init.c Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl_init.c Wed Sep 15 17:25:51 2010 (r212678) @@ -315,6 +315,7 @@ tw_cl_init_ctlr(struct tw_cl_ctlr_handle tw_cli_req_q_init(ctlr, TW_CLI_BUSY_Q); tw_cli_req_q_init(ctlr, TW_CLI_PENDING_Q); tw_cli_req_q_init(ctlr, TW_CLI_COMPLETE_Q); + tw_cli_req_q_init(ctlr, TW_CLI_RESET_Q); /* Initialize all locks used by CL. */ ctlr->gen_lock = &(ctlr->gen_lock_handle); @@ -675,15 +676,14 @@ tw_cli_init_connection(struct tw_cli_ctl /* Submit the command, and wait for it to complete. */ error = tw_cli_submit_and_poll_request(req, TW_CLI_REQUEST_TIMEOUT_PERIOD); - if (error == TW_OSL_ETIMEDOUT) - /* Clean-up done by tw_cli_submit_and_poll_request. */ - return(error); if (error) goto out; if ((error = init_connect->status)) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 goto out; } if (set_features & TWA_EXTENDED_INIT_CONNECT) { Modified: stable/7/sys/dev/twa/tw_cl_intr.c ============================================================================== --- stable/7/sys/dev/twa/tw_cl_intr.c Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl_intr.c Wed Sep 15 17:25:51 2010 (r212678) @@ -248,8 +248,7 @@ tw_cli_process_resp_intr(struct tw_cli_c #ifdef TW_OSL_DEBUG tw_cl_print_ctlr_stats(ctlr->ctlr_handle); #endif /* TW_OSL_DEBUG */ - tw_cl_reset_ctlr(ctlr->ctlr_handle); - return(TW_OSL_EIO); + continue; } /* @@ -402,9 +401,7 @@ tw_cli_complete_io(struct tw_cli_req_con #ifdef TW_OSL_DEBUG tw_cl_print_ctlr_stats(ctlr->ctlr_handle); #endif /* TW_OSL_DEBUG */ - tw_cl_reset_ctlr(ctlr->ctlr_handle); - req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - goto out; + return; } if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { @@ -483,6 +480,7 @@ tw_cli_scsi_complete(struct tw_cli_req_c cdb[8], cdb[9], cdb[10], cdb[11], cdb[12], cdb[13], cdb[14], cdb[15]); +#if 0 /* * Print the error. Firmware doesn't yet support * the 'Mode Sense' cmd. Don't print if the cmd @@ -493,6 +491,7 @@ tw_cli_scsi_complete(struct tw_cli_req_c tw_cli_create_ctlr_event(req->ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, cmd_hdr); +#endif // 0 } if (scsi_req->sense_data) { @@ -530,9 +529,11 @@ tw_cli_param_callback(struct tw_cli_req_ */ if (! req->error_code) if (cmd->param.status) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 tw_cl_create_event(ctlr->ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_ERROR, 0x1204, 0x1, TW_CL_SEVERITY_ERROR_STRING, @@ -590,9 +591,11 @@ tw_cli_aen_callback(struct tw_cli_req_co if ((error = cmd->status)) { cmd_hdr = (struct tw_cl_command_header *) (&(req->cmd_pkt->cmd_hdr)); +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, cmd_hdr); +#endif // 0 tw_cl_create_event(ctlr->ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_ERROR, 0x1206, 0x1, TW_CL_SEVERITY_ERROR_STRING, Modified: stable/7/sys/dev/twa/tw_cl_io.c ============================================================================== --- stable/7/sys/dev/twa/tw_cl_io.c Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl_io.c Wed Sep 15 17:25:51 2010 (r212678) @@ -74,18 +74,12 @@ tw_cl_start_io(struct tw_cl_ctlr_handle struct tw_cli_req_context *req; struct tw_cl_command_9k *cmd; struct tw_cl_scsi_req_packet *scsi_req; - TW_INT32 error; + TW_INT32 error = TW_CL_ERR_REQ_SUCCESS; tw_cli_dbg_printf(10, ctlr_handle, tw_osl_cur_func(), "entered"); ctlr = (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); - if (ctlr->reset_in_progress) { - tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), - "I/O during reset: returning busy."); - return(TW_OSL_EBUSY); - } - /* * If working with a firmware version that does not support multiple * luns, and this request is directed at a non-zero lun, error it @@ -145,7 +139,12 @@ tw_cl_start_io(struct tw_cl_ctlr_handle cmd->sg_list, scsi_req->sgl_entries); } - if ((error = tw_cli_submit_cmd(req))) { + if (((TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[TW_CLI_PENDING_Q]))) != TW_CL_NULL) || + (ctlr->reset_in_progress)) { + tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); + TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, + TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); + } else if ((error = tw_cli_submit_cmd(req))) { tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), "Could not start request. request = %p, error = %d", req, error); @@ -171,7 +170,7 @@ tw_cli_submit_cmd(struct tw_cli_req_cont struct tw_cli_ctlr_context *ctlr = req->ctlr; struct tw_cl_ctlr_handle *ctlr_handle = ctlr->ctlr_handle; TW_UINT32 status_reg; - TW_INT32 error; + TW_INT32 error = 0; tw_cli_dbg_printf(10, ctlr_handle, tw_osl_cur_func(), "entered"); @@ -185,11 +184,7 @@ tw_cli_submit_cmd(struct tw_cli_req_cont TWA_COMMAND_QUEUE_OFFSET_LOW, (TW_UINT32)(req->cmd_pkt_phys + sizeof(struct tw_cl_command_header)), 4); - /* Check to see if we can post a command. */ status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr_handle); - if ((error = tw_cli_check_ctlr_state(ctlr, status_reg))) - goto out; - if (status_reg & TWA_STATUS_COMMAND_QUEUE_FULL) { struct tw_cl_req_packet *req_pkt = (struct tw_cl_req_packet *)(req->orig_req); @@ -207,14 +202,12 @@ tw_cli_submit_cmd(struct tw_cli_req_cont "pending internal/ioctl request"); req->state = TW_CLI_REQ_STATE_PENDING; tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); - error = 0; /* Unmask command interrupt. */ TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); } else error = TW_OSL_EBUSY; } else { - tw_osl_ctlr_busy(ctlr_handle, req->req_handle); error = TW_OSL_EBUSY; } } else { @@ -246,7 +239,7 @@ tw_cli_submit_cmd(struct tw_cli_req_cont (TW_UINT32)(req->cmd_pkt_phys + sizeof(struct tw_cl_command_header)), 4); } } -out: + tw_osl_free_lock(ctlr_handle, ctlr->io_lock); return(error); @@ -277,18 +270,12 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_hand TW_UINT8 opcode; TW_UINT8 sgl_offset; TW_VOID *sgl = TW_CL_NULL; - TW_INT32 error; + TW_INT32 error = TW_CL_ERR_REQ_SUCCESS; tw_cli_dbg_printf(5, ctlr_handle, tw_osl_cur_func(), "entered"); ctlr = (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); - if (ctlr->reset_in_progress) { - tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), - "Passthru request during reset: returning busy."); - return(TW_OSL_EBUSY); - } - if ((req = tw_cli_get_request(ctlr )) == TW_CL_NULL) { tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), @@ -301,7 +288,7 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_hand req->orig_req = req_pkt; req->tw_cli_callback = tw_cli_complete_io; - req->flags |= (TW_CLI_REQ_FLAGS_EXTERNAL | TW_CLI_REQ_FLAGS_PASSTHRU); + req->flags |= TW_CLI_REQ_FLAGS_PASSTHRU; pt_req = &(req_pkt->gen_req_pkt.pt_req); @@ -348,7 +335,12 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_hand tw_cli_fill_sg_list(ctlr, pt_req->sg_list, sgl, pt_req->sgl_entries); - if ((error = tw_cli_submit_cmd(req))) { + if (((TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[TW_CLI_PENDING_Q]))) != TW_CL_NULL) || + (ctlr->reset_in_progress)) { + tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); + TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, + TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); + } else if ((error = tw_cli_submit_cmd(req))) { tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_ERROR, 0x1100, 0x1, TW_CL_SEVERITY_ERROR_STRING, @@ -760,8 +752,7 @@ tw_cli_get_param(struct tw_cli_ctlr_cont cmd->param.sgl_off__opcode = BUILD_SGL_OFF__OPCODE(2, TWA_FW_CMD_GET_PARAM); - cmd->param.request_id = - (TW_UINT8)(TW_CL_SWAP16(req->request_id)); + cmd->param.request_id = (TW_UINT8)(TW_CL_SWAP16(req->request_id)); cmd->param.host_id__unit = BUILD_HOST_ID__UNIT(0, 0); cmd->param.param_count = TW_CL_SWAP16(1); @@ -789,15 +780,14 @@ tw_cli_get_param(struct tw_cli_ctlr_cont /* There's no call back; wait till the command completes. */ error = tw_cli_submit_and_poll_request(req, TW_CLI_REQUEST_TIMEOUT_PERIOD); - if (error == TW_OSL_ETIMEDOUT) - /* Clean-up done by tw_cli_submit_and_poll_request. */ - return(error); if (error) goto out; if ((error = cmd->param.status)) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 goto out; } tw_osl_memcpy(param_data, param->data, param_size); @@ -905,18 +895,17 @@ tw_cli_set_param(struct tw_cli_ctlr_cont /* Submit the command. */ if (callback == TW_CL_NULL) { - /* There's no call back; wait till the command completes. */ + /* There's no call back; wait till the command completes. */ error = tw_cli_submit_and_poll_request(req, - TW_CLI_REQUEST_TIMEOUT_PERIOD); - if (error == TW_OSL_ETIMEDOUT) - /* Clean-up done by tw_cli_submit_and_poll_request. */ - return(error); + TW_CLI_REQUEST_TIMEOUT_PERIOD); if (error) goto out; if ((error = cmd->param.status)) { +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, &(req->cmd_pkt->cmd_hdr)); +#endif // 0 goto out; } ctlr->internal_req_busy = TW_CL_FALSE; @@ -1022,9 +1011,7 @@ tw_cli_submit_and_poll_request(struct tw * tw_cli_submit_pending_queue. There could be a race in that case. * Need to revisit. */ - if (req->state != TW_CLI_REQ_STATE_PENDING) - tw_cl_reset_ctlr(ctlr->ctlr_handle); - else { + if (req->state == TW_CLI_REQ_STATE_PENDING) { tw_cli_dbg_printf(3, ctlr->ctlr_handle, tw_osl_cur_func(), "Removing request from pending queue"); /* @@ -1053,6 +1040,7 @@ tw_cli_submit_and_poll_request(struct tw * drains any incomplete requests. * * Input: ctlr -- ptr to per ctlr structure + * req_handle -- ptr to request handle * Output: None * Return value: 0 -- success * non-zero-- failure @@ -1063,15 +1051,15 @@ tw_cl_reset_ctlr(struct tw_cl_ctlr_handl struct tw_cli_ctlr_context *ctlr = (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); struct twa_softc *sc = ctlr_handle->osl_ctlr_ctxt; + struct tw_cli_req_context *req; TW_INT32 reset_attempt = 1; - TW_INT32 error; + TW_INT32 error = 0; tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), "entered"); ctlr->reset_in_progress = TW_CL_TRUE; - xpt_freeze_simq(sc->sim, 1); + twa_teardown_intr(sc); - tw_cli_disable_interrupts(ctlr); /* * Error back all requests in the complete, busy, and pending queues. @@ -1080,8 +1068,6 @@ tw_cl_reset_ctlr(struct tw_cl_ctlr_handl * will continue its course and get submitted to the controller after * the reset is done (and io_lock is released). */ - tw_cli_dbg_printf(2, ctlr_handle, tw_osl_cur_func(), - "Draining all queues following reset"); tw_cli_drain_complete_queue(ctlr); tw_cli_drain_busy_queue(ctlr); tw_cli_drain_pending_queue(ctlr); @@ -1089,53 +1075,88 @@ tw_cl_reset_ctlr(struct tw_cl_ctlr_handl ctlr->get_more_aens = TW_CL_FALSE; /* Soft reset the controller. */ -try_reset: - if ((error = tw_cli_soft_reset(ctlr))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1105, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Controller reset failed", - "error = %d; attempt %d", error, reset_attempt++); - if (reset_attempt <= TW_CLI_MAX_RESET_ATTEMPTS) - goto try_reset; - else - goto out; - } + while (reset_attempt <= TW_CLI_MAX_RESET_ATTEMPTS) { + if ((error = tw_cli_soft_reset(ctlr))) { + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, + TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, + 0x1105, 0x1, TW_CL_SEVERITY_ERROR_STRING, + "Controller reset failed", + "error = %d; attempt %d", error, reset_attempt++); + reset_attempt++; + continue; + } - /* Re-establish logical connection with the controller. */ - if ((error = tw_cli_init_connection(ctlr, - (TW_UINT16)(ctlr->max_simult_reqs), - 0, 0, 0, 0, 0, TW_CL_NULL, TW_CL_NULL, TW_CL_NULL, - TW_CL_NULL, TW_CL_NULL))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + /* Re-establish logical connection with the controller. */ + if ((error = tw_cli_init_connection(ctlr, + (TW_UINT16)(ctlr->max_simult_reqs), + 0, 0, 0, 0, 0, TW_CL_NULL, TW_CL_NULL, TW_CL_NULL, + TW_CL_NULL, TW_CL_NULL))) { + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, + TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, + 0x1106, 0x1, TW_CL_SEVERITY_ERROR_STRING, + "Can't initialize connection after reset", + "error = %d", error); + reset_attempt++; + continue; + } + +#ifdef TW_OSL_DEBUG + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1106, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Can't initialize connection after reset", - "error = %d", error); - goto out; - } + 0x1107, 0x3, TW_CL_SEVERITY_INFO_STRING, + "Controller reset done!", " "); +#endif /* TW_OSL_DEBUG */ + break; + } /* End of while */ - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1107, 0x3, TW_CL_SEVERITY_INFO_STRING, - "Controller reset done!", - " "); + /* Move commands from the reset queue to the pending queue. */ + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_RESET_Q)) != TW_CL_NULL) { + tw_osl_timeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_PENDING_Q); + } -out: + twa_setup_intr(sc); + tw_cli_enable_interrupts(ctlr); + if ((TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[TW_CLI_PENDING_Q]))) != TW_CL_NULL) + TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, + TWA_CONTROL_UNMASK_COMMAND_INTERRUPT); ctlr->reset_in_progress = TW_CL_FALSE; - xpt_release_simq(sc->sim, 1); + ctlr->reset_needed = TW_CL_FALSE; - /* - * Enable interrupts, and also clear attention and response interrupts. - */ - tw_cli_enable_interrupts(ctlr); - /* Request for a bus re-scan. */ - if (!error) - tw_osl_scan_bus(ctlr_handle); + tw_osl_scan_bus(ctlr_handle); + return(error); } +TW_VOID +tw_cl_set_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle) +{ + struct tw_cli_ctlr_context *ctlr = + (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); + + ctlr->reset_needed = TW_CL_TRUE; +} + +TW_INT32 +tw_cl_is_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle) +{ + struct tw_cli_ctlr_context *ctlr = + (struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt); + + return(ctlr->reset_needed); +} + +TW_INT32 +tw_cl_is_active(struct tw_cl_ctlr_handle *ctlr_handle) +{ + struct tw_cli_ctlr_context *ctlr = + (struct tw_cli_ctlr_context *) + (ctlr_handle->cl_ctlr_ctxt); + + return(ctlr->active); +} + /* @@ -1151,14 +1172,13 @@ TW_INT32 tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr) { struct tw_cl_ctlr_handle *ctlr_handle = ctlr->ctlr_handle; - TW_UINT32 status_reg; int found; int loop_count; TW_UINT32 error; tw_cli_dbg_printf(1, ctlr_handle, tw_osl_cur_func(), "entered"); - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1108, 0x3, TW_CL_SEVERITY_INFO_STRING, "Resetting controller...", @@ -1193,7 +1213,7 @@ tw_cli_soft_reset(struct tw_cli_ctlr_con } while (!found && (loop_count < 6000000)); /* Loop for no more than 60 seconds */ if (!found) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1109, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Missed firmware handshake after soft-reset", @@ -1210,7 +1230,7 @@ tw_cli_soft_reset(struct tw_cli_ctlr_con TWA_STATUS_MICROCONTROLLER_READY | TWA_STATUS_ATTENTION_INTERRUPT, TW_CLI_RESET_TIMEOUT_PERIOD))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1109, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Micro-ctlr not ready/No attn intr after reset", @@ -1244,26 +1264,14 @@ tw_cli_soft_reset(struct tw_cli_ctlr_con } if ((error = tw_cli_find_aen(ctlr, TWA_AEN_SOFT_RESET))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x110C, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Reset not reported by controller", "error = %d", error); return(error); } - - status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr_handle); - - if ((error = TW_CLI_STATUS_ERRORS(status_reg)) || - (error = tw_cli_check_ctlr_state(ctlr, status_reg))) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x110D, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Controller errors detected after reset", - "error = %d", error); - return(error); - } - + return(TW_OSL_ESUCCESS); } Modified: stable/7/sys/dev/twa/tw_cl_misc.c ============================================================================== --- stable/7/sys/dev/twa/tw_cl_misc.c Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl_misc.c Wed Sep 15 17:25:51 2010 (r212678) @@ -83,7 +83,8 @@ tw_cli_drain_complete_queue(struct tw_cl tw_cli_dbg_printf(3, ctlr->ctlr_handle, tw_osl_cur_func(), "entered"); /* Walk the busy queue. */ - while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_COMPLETE_Q))) { + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_COMPLETE_Q)) != + TW_CL_NULL) { if (req->flags & TW_CLI_REQ_FLAGS_INTERNAL) { /* * It's an internal request. Set the appropriate @@ -97,20 +98,21 @@ tw_cli_drain_complete_queue(struct tw_cl req->error_code = TW_CL_ERR_REQ_BUS_RESET; if (req->tw_cli_callback) req->tw_cli_callback(req); - } else { - if ((req_pkt = req->orig_req)) { - /* It's a SCSI request. Complete it. */ - tw_cli_dbg_printf(2, ctlr->ctlr_handle, - tw_osl_cur_func(), - "Completing complete request %p " - "on reset", - req); + } else if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { + /* It's a passthru request. Complete it. */ + if ((req_pkt = req->orig_req) != TW_CL_NULL) { req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - req_pkt->tw_osl_callback(req->req_handle); + + if (req_pkt->tw_osl_callback) + req_pkt->tw_osl_callback(req->req_handle); } tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q); + } else { + /* It's an external (SCSI) request. Add it to the reset queue. */ + tw_osl_untimeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_RESET_Q); } - } + } /* End of while loop */ } @@ -135,7 +137,8 @@ tw_cli_drain_busy_queue(struct tw_cli_ct tw_cli_dbg_printf(3, ctlr->ctlr_handle, tw_osl_cur_func(), "entered"); /* Walk the busy queue. */ - while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_BUSY_Q))) { + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_BUSY_Q)) != + TW_CL_NULL) { if (req->flags & TW_CLI_REQ_FLAGS_INTERNAL) { /* * It's an internal request. Set the appropriate @@ -149,19 +152,21 @@ tw_cli_drain_busy_queue(struct tw_cli_ct req->error_code = TW_CL_ERR_REQ_BUS_RESET; if (req->tw_cli_callback) req->tw_cli_callback(req); - } else { - if ((req_pkt = req->orig_req)) { - /* It's a SCSI request. Complete it. */ - tw_cli_dbg_printf(2, ctlr->ctlr_handle, - tw_osl_cur_func(), - "Completing busy request %p on reset", - req); + } else if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { + /* It's a passthru request. Complete it. */ + if ((req_pkt = req->orig_req) != TW_CL_NULL) { req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - req_pkt->tw_osl_callback(req->req_handle); + + if (req_pkt->tw_osl_callback) + req_pkt->tw_osl_callback(req->req_handle); } tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q); + } else { + /* It's an external (SCSI) request. Add it to the reset queue. */ + tw_osl_untimeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_RESET_Q); } - } + } /* End of while loop */ } @@ -188,7 +193,8 @@ tw_cli_drain_pending_queue(struct tw_cli /* * Pull requests off the pending queue, and complete them. */ - while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_PENDING_Q))) { + while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_PENDING_Q)) != + TW_CL_NULL) { if (req->flags & TW_CLI_REQ_FLAGS_INTERNAL) { /* * It's an internal request. Set the appropriate @@ -202,19 +208,21 @@ tw_cli_drain_pending_queue(struct tw_cli req->error_code = TW_CL_ERR_REQ_BUS_RESET; if (req->tw_cli_callback) req->tw_cli_callback(req); - } else { - if ((req_pkt = req->orig_req)) { - /* It's an external request. Complete it. */ - tw_cli_dbg_printf(2, ctlr->ctlr_handle, - tw_osl_cur_func(), - "Completing pending request %p " - "on reset", req); + } else if (req->flags & TW_CLI_REQ_FLAGS_PASSTHRU) { + /* It's a passthru request. Complete it. */ + if ((req_pkt = req->orig_req) != TW_CL_NULL) { req_pkt->status = TW_CL_ERR_REQ_BUS_RESET; - req_pkt->tw_osl_callback(req->req_handle); + + if (req_pkt->tw_osl_callback) + req_pkt->tw_osl_callback(req->req_handle); } tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q); + } else { + /* It's an external (SCSI) request. Add it to the reset queue. */ + tw_osl_untimeout(req->req_handle); + tw_cli_req_q_insert_tail(req, TW_CLI_RESET_Q); } - } + } /* End of while loop */ } @@ -239,9 +247,6 @@ tw_cli_drain_response_queue(struct tw_cl for (;;) { status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr->ctlr_handle); - if (tw_cli_check_ctlr_state(ctlr, status_reg)) - return(TW_OSL_EGENFAILURE); - if (status_reg & TWA_STATUS_RESPONSE_QUEUE_EMPTY) return(TW_OSL_ESUCCESS); /* no more response queue entries */ @@ -273,9 +278,6 @@ tw_cli_find_response(struct tw_cli_ctlr_ for (;;) { status_reg = TW_CLI_READ_STATUS_REGISTER(ctlr->ctlr_handle); - if (tw_cli_check_ctlr_state(ctlr, status_reg)) - return(TW_OSL_EGENFAILURE); - if (status_reg & TWA_STATUS_RESPONSE_QUEUE_EMPTY) return(TW_OSL_ENOTTY); /* no more response queue entries */ @@ -356,9 +358,11 @@ tw_cli_drain_aen_queue(struct tw_cli_ctl if ((error = req->cmd_pkt->command.cmd_pkt_9k.status)) { cmd_hdr = &req->cmd_pkt->cmd_hdr; +#if 0 tw_cli_create_ctlr_event(ctlr, TW_CL_MESSAGE_SOURCE_CONTROLLER_ERROR, cmd_hdr); +#endif // 0 break; } @@ -714,7 +718,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct tw_osl_memzero(desc, 200); if (!(ctlr->reset_phase1_in_progress)) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1301, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Missing expected status bit(s)", @@ -738,7 +742,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct (ctlr->device_id != TW_CL_DEVICE_ID_9K_SA)) || (!(ctlr->reset_in_progress)) || ((status_reg & TWA_STATUS_QUEUE_ERROR_INTERRUPT) == 0)) - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1302, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Unexpected status bit(s)", @@ -748,7 +752,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct TWA_STATUS_UNEXPECTED_BITS, desc)); if (status_reg & TWA_STATUS_PCI_PARITY_ERROR_INTERRUPT) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1303, 0x1, TW_CL_SEVERITY_ERROR_STRING, "PCI parity error: clearing... " @@ -768,7 +772,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct } if (status_reg & TWA_STATUS_PCI_ABORT_INTERRUPT) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1304, 0x1, TW_CL_SEVERITY_ERROR_STRING, "PCI abort: clearing... ", @@ -791,7 +795,7 @@ tw_cli_check_ctlr_state(struct tw_cli_ct if (((ctlr->device_id != TW_CL_DEVICE_ID_9K_E) && (ctlr->device_id != TW_CL_DEVICE_ID_9K_SA)) || (!(ctlr->reset_in_progress))) - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, + tw_cl_create_event(ctlr_handle, TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, 0x1305, 0x1, TW_CL_SEVERITY_ERROR_STRING, "Controller queue error: clearing... ", @@ -801,17 +805,6 @@ tw_cli_check_ctlr_state(struct tw_cli_ct TW_CLI_WRITE_CONTROL_REGISTER(ctlr->ctlr_handle, TWA_CONTROL_CLEAR_QUEUE_ERROR); } - - if (status_reg & TWA_STATUS_MICROCONTROLLER_ERROR) { - tw_cl_create_event(ctlr_handle, TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT, - 0x1307, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Micro-controller error! ", - "status reg = 0x%x %s", - status_reg, - tw_cli_describe_bits(status_reg, desc)); - error = TW_OSL_EGENFAILURE; - } } return(error); } @@ -850,8 +843,6 @@ tw_cli_describe_bits(TW_UINT32 reg, TW_I tw_osl_strcpy(&str[tw_osl_strlen(str)], "HOST_INTR,"); if (reg & TWA_STATUS_PCI_ABORT_INTERRUPT) tw_osl_strcpy(&str[tw_osl_strlen(str)], "PCI_ABRT,"); - if (reg & TWA_STATUS_MICROCONTROLLER_ERROR) - tw_osl_strcpy(&str[tw_osl_strlen(str)], "MC_ERR,"); if (reg & TWA_STATUS_QUEUE_ERROR_INTERRUPT) tw_osl_strcpy(&str[tw_osl_strlen(str)], "Q_ERR,"); if (reg & TWA_STATUS_PCI_PARITY_ERROR_INTERRUPT) Modified: stable/7/sys/dev/twa/tw_cl_share.h ============================================================================== --- stable/7/sys/dev/twa/tw_cl_share.h Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_cl_share.h Wed Sep 15 17:25:51 2010 (r212678) @@ -349,10 +349,14 @@ extern TW_VOID tw_osl_breakpoint(TW_VOID #endif -#ifndef tw_osl_ctlr_busy -/* Called when CL is too busy to accept new requests. */ -extern TW_VOID tw_osl_ctlr_busy(struct tw_cl_ctlr_handle *ctlr_handle, - struct tw_cl_req_handle *req_handle); +#ifndef tw_osl_timeout +/* Start OS timeout() routine after controller reset sequence */ +extern TW_VOID tw_osl_timeout(struct tw_cl_req_handle *req_handle); +#endif + +#ifndef tw_osl_untimeout +/* Stop OS timeout() routine during controller reset sequence */ +extern TW_VOID tw_osl_untimeout(struct tw_cl_req_handle *req_handle); #endif @@ -552,6 +556,10 @@ extern TW_INT32 tw_cl_init_ctlr(struct t ); +extern TW_VOID tw_cl_set_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle); +extern TW_INT32 tw_cl_is_reset_needed(struct tw_cl_ctlr_handle *ctlr_handle); +extern TW_INT32 tw_cl_is_active(struct tw_cl_ctlr_handle *ctlr_handle); + /* CL's interrupt handler. */ extern TW_INT32 tw_cl_interrupt(struct tw_cl_ctlr_handle *ctlr_handle); Modified: stable/7/sys/dev/twa/tw_osl.h ============================================================================== --- stable/7/sys/dev/twa/tw_osl.h Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_osl.h Wed Sep 15 17:25:51 2010 (r212678) @@ -77,6 +77,7 @@ EINPROGRESS */ #define TW_OSLI_REQ_FLAGS_PASSTHRU (1<<5) /* pass through request */ #define TW_OSLI_REQ_FLAGS_SLEEPING (1<<6) /* owner sleeping on this cmd */ +#define TW_OSLI_REQ_FLAGS_FAILED (1<<7) /* bus_dmamap_load() failed */ #ifdef TW_OSL_DEBUG @@ -100,6 +101,7 @@ struct tw_osli_req_context { struct twa_softc *ctlr; /* ptr to OSL's controller context */ TW_VOID *data; /* ptr to data being passed to CL */ TW_UINT32 length; /* length of buf being passed to CL */ + TW_UINT64 deadline;/* request timeout (in absolute time) */ /* * ptr to, and length of data passed to us from above, in case a buffer @@ -151,6 +153,9 @@ struct twa_softc { struct mtx sim_lock_handle;/* sim lock shared with cam */ struct mtx *sim_lock;/* ptr to sim lock */ + struct callout watchdog_callout[2]; /* For command timout */ + TW_UINT32 watchdog_index; + #ifdef TW_OSL_DEBUG struct tw_osli_q_stats q_stats[TW_OSLI_Q_COUNT];/* queue statistics */ #endif /* TW_OSL_DEBUG */ Modified: stable/7/sys/dev/twa/tw_osl_cam.c ============================================================================== --- stable/7/sys/dev/twa/tw_osl_cam.c Wed Sep 15 17:25:09 2010 (r212677) +++ stable/7/sys/dev/twa/tw_osl_cam.c Wed Sep 15 17:25:51 2010 (r212678) @@ -55,7 +55,6 @@ static TW_VOID twa_action(struct cam_sim *sim, union ccb *ccb); static TW_VOID twa_poll(struct cam_sim *sim); -static TW_VOID twa_timeout(TW_VOID *arg); static TW_VOID twa_bus_scan_cb(struct cam_periph *periph, union ccb *ccb); static TW_INT32 tw_osli_execute_scsi(struct tw_osli_req_context *req, @@ -83,7 +82,7 @@ tw_osli_cam_attach(struct twa_softc *sc) /* * Create the device queue for our SIM. */ - if ((devq = cam_simq_alloc(TW_OSLI_MAX_NUM_REQUESTS)) == NULL) { + if ((devq = cam_simq_alloc(TW_OSLI_MAX_NUM_IOS)) == NULL) { tw_osli_printf(sc, "error = %d", TW_CL_SEVERITY_ERROR_STRING, TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, @@ -292,6 +291,7 @@ tw_osli_execute_scsi(struct tw_osli_req_ "I/O size too big", csio->dxfer_len); ccb_h->status = CAM_REQ_TOO_BIG; + ccb_h->status &= ~CAM_SIM_QUEUED; xpt_done(ccb); return(1); } @@ -307,6 +307,7 @@ tw_osli_execute_scsi(struct tw_osli_req_ 0x2107, "XPT_SCSI_IO: Got SGList"); ccb_h->status = CAM_REQ_INVALID; + ccb_h->status &= ~CAM_SIM_QUEUED; xpt_done(ccb); return(1); } @@ -323,13 +324,20 @@ tw_osli_execute_scsi(struct tw_osli_req_ return(1); } - ccb_h->timeout_ch = timeout(twa_timeout, req, - (ccb_h->timeout * hz) / 1000); + req->deadline = tw_osl_get_local_time() + (ccb_h->timeout / 1000); + + /* * twa_map_load_data_callback will fill in the SGL, * and submit the I/O. */ error = tw_osli_map_request(req); + if ((error) && (req->flags & TW_OSLI_REQ_FLAGS_FAILED)) { + req->deadline = 0; + ccb_h->status = CAM_REQ_CMP_ERR; + ccb_h->status &= ~CAM_SIM_QUEUED; + xpt_done(ccb); + } return(error); } @@ -362,10 +370,20 @@ twa_action(struct cam_sim *sim, union cc * Freeze the simq to maintain ccb ordering. The next * ccb that gets completed will unfreeze the simq. */ + ccb_h->status &= ~CAM_SIM_QUEUED; ccb_h->status |= CAM_REQUEUE_REQ; xpt_done(ccb); break; } + + if ((tw_cl_is_reset_needed(&(req->ctlr->ctlr_handle)))) { + ccb_h->status &= ~CAM_SIM_QUEUED; + ccb_h->status |= CAM_REQUEUE_REQ; + xpt_done(ccb); + tw_osli_req_q_insert_tail(req, TW_OSLI_FREE_Q); + break; + } + req->req_handle.osl_req_ctxt = req; req->req_handle.is_io = TW_CL_TRUE; req->orig_req = ccb; @@ -381,25 +399,14 @@ twa_action(struct cam_sim *sim, union cc break; case XPT_RESET_BUS: - tw_cl_create_event(&(sc->ctlr_handle), TW_CL_TRUE, + tw_cl_create_event(&(sc->ctlr_handle), TW_CL_FALSE, TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, 0x2108, 0x3, TW_CL_SEVERITY_INFO_STRING, "Received Reset Bus request from CAM", " "); - mtx_unlock(sc->sim_lock); - if (tw_cl_reset_ctlr(&sc->ctlr_handle)) { - tw_cl_create_event(&(sc->ctlr_handle), TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, - 0x2109, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Failed to reset bus", - " "); - ccb_h->status = CAM_REQ_CMP_ERR; - } - else - ccb_h->status = CAM_REQ_CMP; - - mtx_lock(sc->sim_lock); + tw_cl_set_reset_needed(&(sc->ctlr_handle)); + ccb_h->status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -504,31 +511,6 @@ twa_poll(struct cam_sim *sim) /* - * Function name: twa_timeout - * Description: Driver entry point for being alerted on a request - * timing out. - * - * Input: arg -- ptr to timed out request - * Output: None - * Return value: None - */ -static TW_VOID -twa_timeout(TW_VOID *arg) -{ - struct tw_osli_req_context *req = - (struct tw_osli_req_context *)arg; - - tw_cl_create_event(&(req->ctlr->ctlr_handle), TW_CL_TRUE, - TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER, - 0x210B, 0x1, TW_CL_SEVERITY_ERROR_STRING, - "Request timed out!", - "request = %p", req); - tw_cl_reset_ctlr(&(req->ctlr->ctlr_handle)); -} - - - -/* * Function name: tw_osli_request_bus_scan * Description: Requests CAM for a scan of the bus. * @@ -623,20 +605,39 @@ tw_osli_disallow_new_requests(struct twa /* - * Function name: tw_osl_ctlr_busy - * Description: CL calls this function on cmd queue full or otherwise, - * when it is too busy to accept new requests. + * Function name: tw_osl_timeout + * Description: Call to timeout(). * - * Input: ctlr_handle -- ptr to controller handle - * req_handle -- ptr to request handle sent by OSL. + * Input: req_handle -- ptr to request handle sent by OSL. * Output: None * Return value: None */ TW_VOID -tw_osl_ctlr_busy(struct tw_cl_ctlr_handle *ctlr_handle, - struct tw_cl_req_handle *req_handle) +tw_osl_timeout(struct tw_cl_req_handle *req_handle) +{ + struct tw_osli_req_context *req = req_handle->osl_req_ctxt; + union ccb *ccb = (union ccb *)(req->orig_req); + struct ccb_hdr *ccb_h = &(ccb->ccb_h); + + req->deadline = tw_osl_get_local_time() + (ccb_h->timeout / 1000); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 17:38:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75B4B1065674; Wed, 15 Sep 2010 17:38:59 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C22E8FC15; Wed, 15 Sep 2010 17:38:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FHcxEj044570; Wed, 15 Sep 2010 17:38:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FHcxXW044568; Wed, 15 Sep 2010 17:38:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151738.o8FHcxXW044568@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 17:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212679 - stable/8/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 17:38:59 -0000 Author: marius Date: Wed Sep 15 17:38:59 2010 New Revision: 212679 URL: http://svn.freebsd.org/changeset/base/212679 Log: MFC: r208515 Fix some whitespace nits. Modified: stable/8/sys/geom/part/g_part_vtoc8.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/part/g_part_vtoc8.c ============================================================================== --- stable/8/sys/geom/part/g_part_vtoc8.c Wed Sep 15 17:25:51 2010 (r212678) +++ stable/8/sys/geom/part/g_part_vtoc8.c Wed Sep 15 17:38:59 2010 (r212679) @@ -55,19 +55,19 @@ static int g_part_vtoc8_add(struct g_par struct g_part_parms *); static int g_part_vtoc8_create(struct g_part_table *, struct g_part_parms *); static int g_part_vtoc8_destroy(struct g_part_table *, struct g_part_parms *); -static void g_part_vtoc8_dumpconf(struct g_part_table *, struct g_part_entry *, - struct sbuf *, const char *); +static void g_part_vtoc8_dumpconf(struct g_part_table *, + struct g_part_entry *, struct sbuf *, const char *); static int g_part_vtoc8_dumpto(struct g_part_table *, struct g_part_entry *); -static int g_part_vtoc8_modify(struct g_part_table *, struct g_part_entry *, +static int g_part_vtoc8_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); -static const char *g_part_vtoc8_name(struct g_part_table *, struct g_part_entry *, - char *, size_t); +static const char *g_part_vtoc8_name(struct g_part_table *, + struct g_part_entry *, char *, size_t); static int g_part_vtoc8_probe(struct g_part_table *, struct g_consumer *); static int g_part_vtoc8_read(struct g_part_table *, struct g_consumer *); -static const char *g_part_vtoc8_type(struct g_part_table *, struct g_part_entry *, - char *, size_t); +static const char *g_part_vtoc8_type(struct g_part_table *, + struct g_part_entry *, char *, size_t); static int g_part_vtoc8_write(struct g_part_table *, struct g_consumer *); -static int g_part_vtoc8_resize(struct g_part_table *, struct g_part_entry *, +static int g_part_vtoc8_resize(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static kobj_method_t g_part_vtoc8_methods[] = { @@ -263,7 +263,8 @@ g_part_vtoc8_dumpconf(struct g_part_tabl } static int -g_part_vtoc8_dumpto(struct g_part_table *basetable, struct g_part_entry *entry) +g_part_vtoc8_dumpto(struct g_part_table *basetable, + struct g_part_entry *entry) { struct g_part_vtoc8_table *table; uint16_t tag; @@ -479,7 +480,7 @@ g_part_vtoc8_read(struct g_part_table *b } static const char * -g_part_vtoc8_type(struct g_part_table *basetable, struct g_part_entry *entry, +g_part_vtoc8_type(struct g_part_table *basetable, struct g_part_entry *entry, char *buf, size_t bufsz) { struct g_part_vtoc8_table *table; From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 17:39:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96433106566C; Wed, 15 Sep 2010 17:39:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C1008FC18; Wed, 15 Sep 2010 17:39:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FHdFfG044614; Wed, 15 Sep 2010 17:39:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FHdFLc044611; Wed, 15 Sep 2010 17:39:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151739.o8FHdFLc044611@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 17:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212680 - stable/7/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 17:39:15 -0000 Author: marius Date: Wed Sep 15 17:39:15 2010 New Revision: 212680 URL: http://svn.freebsd.org/changeset/base/212680 Log: MFC: r208515 Fix some whitespace nits. Modified: stable/7/sys/geom/part/g_part_vtoc8.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/geom/part/g_part_vtoc8.c ============================================================================== --- stable/7/sys/geom/part/g_part_vtoc8.c Wed Sep 15 17:38:59 2010 (r212679) +++ stable/7/sys/geom/part/g_part_vtoc8.c Wed Sep 15 17:39:15 2010 (r212680) @@ -55,17 +55,17 @@ static int g_part_vtoc8_add(struct g_par struct g_part_parms *); static int g_part_vtoc8_create(struct g_part_table *, struct g_part_parms *); static int g_part_vtoc8_destroy(struct g_part_table *, struct g_part_parms *); -static void g_part_vtoc8_dumpconf(struct g_part_table *, struct g_part_entry *, - struct sbuf *, const char *); +static void g_part_vtoc8_dumpconf(struct g_part_table *, + struct g_part_entry *, struct sbuf *, const char *); static int g_part_vtoc8_dumpto(struct g_part_table *, struct g_part_entry *); -static int g_part_vtoc8_modify(struct g_part_table *, struct g_part_entry *, +static int g_part_vtoc8_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); -static const char *g_part_vtoc8_name(struct g_part_table *, struct g_part_entry *, - char *, size_t); +static const char *g_part_vtoc8_name(struct g_part_table *, + struct g_part_entry *, char *, size_t); static int g_part_vtoc8_probe(struct g_part_table *, struct g_consumer *); static int g_part_vtoc8_read(struct g_part_table *, struct g_consumer *); -static const char *g_part_vtoc8_type(struct g_part_table *, struct g_part_entry *, - char *, size_t); +static const char *g_part_vtoc8_type(struct g_part_table *, + struct g_part_entry *, char *, size_t); static int g_part_vtoc8_write(struct g_part_table *, struct g_consumer *); static kobj_method_t g_part_vtoc8_methods[] = { @@ -260,7 +260,8 @@ g_part_vtoc8_dumpconf(struct g_part_tabl } static int -g_part_vtoc8_dumpto(struct g_part_table *basetable, struct g_part_entry *entry) +g_part_vtoc8_dumpto(struct g_part_table *basetable, + struct g_part_entry *entry) { struct g_part_vtoc8_table *table; uint16_t tag; @@ -456,7 +457,7 @@ g_part_vtoc8_read(struct g_part_table *b } static const char * -g_part_vtoc8_type(struct g_part_table *basetable, struct g_part_entry *entry, +g_part_vtoc8_type(struct g_part_table *basetable, struct g_part_entry *entry, char *buf, size_t bufsz) { struct g_part_vtoc8_table *table; From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 18:09:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62E37106566C; Wed, 15 Sep 2010 18:09:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48F7D8FC08; Wed, 15 Sep 2010 18:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FI9GDm045553; Wed, 15 Sep 2010 18:09:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FI9GL7045546; Wed, 15 Sep 2010 18:09:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151809.o8FI9GL7045546@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 18:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212683 - in stable/7/sys: sparc64/include sparc64/sparc64 sun4v/include sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 18:09:16 -0000 Author: marius Date: Wed Sep 15 18:09:15 2010 New Revision: 212683 URL: http://svn.freebsd.org/changeset/base/212683 Log: MFC: r210176 Allocate proper amount of memory for interrupt names on sparc64 and sun4v, same as done on other architectures. This removes garbage from `vmstat -ia` output. Modified: stable/7/sys/sparc64/include/intr_machdep.h stable/7/sys/sparc64/sparc64/exception.S stable/7/sys/sparc64/sparc64/genassym.c stable/7/sys/sun4v/include/intr_machdep.h stable/7/sys/sun4v/sun4v/exception.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/intr_machdep.h ============================================================================== --- stable/7/sys/sparc64/include/intr_machdep.h Wed Sep 15 17:59:22 2010 (r212682) +++ stable/7/sys/sparc64/include/intr_machdep.h Wed Sep 15 18:09:15 2010 (r212683) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: stable/7/sys/sparc64/sparc64/exception.S ============================================================================== --- stable/7/sys/sparc64/sparc64/exception.S Wed Sep 15 17:59:22 2010 (r212682) +++ stable/7/sys/sparc64/sparc64/exception.S Wed Sep 15 18:09:15 2010 (r212683) @@ -365,7 +365,7 @@ ENTRY(rsf_fatal) sir END(rsf_fatal) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 Modified: stable/7/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/7/sys/sparc64/sparc64/genassym.c Wed Sep 15 17:59:22 2010 (r212682) +++ stable/7/sys/sparc64/sparc64/genassym.c Wed Sep 15 18:09:15 2010 (r212683) @@ -160,6 +160,7 @@ ASSYM(HASH_ENTRY_SHIFT, HASH_ENTRY_SHIFT ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); +ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); Modified: stable/7/sys/sun4v/include/intr_machdep.h ============================================================================== --- stable/7/sys/sun4v/include/intr_machdep.h Wed Sep 15 17:59:22 2010 (r212682) +++ stable/7/sys/sun4v/include/intr_machdep.h Wed Sep 15 18:09:15 2010 (r212683) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: stable/7/sys/sun4v/sun4v/exception.S ============================================================================== --- stable/7/sys/sun4v/sun4v/exception.S Wed Sep 15 17:59:22 2010 (r212682) +++ stable/7/sys/sun4v/sun4v/exception.S Wed Sep 15 18:09:15 2010 (r212683) @@ -1948,7 +1948,7 @@ END(fork_trampoline) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 18:09:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8898F1065670; Wed, 15 Sep 2010 18:09:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D5558FC0A; Wed, 15 Sep 2010 18:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FI9GoY045563; Wed, 15 Sep 2010 18:09:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FI9Gdx045555; Wed, 15 Sep 2010 18:09:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151809.o8FI9Gdx045555@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 18:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212684 - in stable/8/sys: sparc64/include sparc64/sparc64 sun4v/include sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 18:09:16 -0000 Author: marius Date: Wed Sep 15 18:09:16 2010 New Revision: 212684 URL: http://svn.freebsd.org/changeset/base/212684 Log: MFC: r210176 Allocate proper amount of memory for interrupt names on sparc64 and sun4v, same as done on other architectures. This removes garbage from `vmstat -ia` output. Modified: stable/8/sys/sparc64/include/intr_machdep.h stable/8/sys/sparc64/sparc64/exception.S stable/8/sys/sparc64/sparc64/genassym.c stable/8/sys/sun4v/include/intr_machdep.h stable/8/sys/sun4v/sun4v/exception.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/intr_machdep.h ============================================================================== --- stable/8/sys/sparc64/include/intr_machdep.h Wed Sep 15 18:09:15 2010 (r212683) +++ stable/8/sys/sparc64/include/intr_machdep.h Wed Sep 15 18:09:16 2010 (r212684) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: stable/8/sys/sparc64/sparc64/exception.S ============================================================================== --- stable/8/sys/sparc64/sparc64/exception.S Wed Sep 15 18:09:15 2010 (r212683) +++ stable/8/sys/sparc64/sparc64/exception.S Wed Sep 15 18:09:16 2010 (r212684) @@ -365,7 +365,7 @@ ENTRY(rsf_fatal) sir END(rsf_fatal) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 Modified: stable/8/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/8/sys/sparc64/sparc64/genassym.c Wed Sep 15 18:09:15 2010 (r212683) +++ stable/8/sys/sparc64/sparc64/genassym.c Wed Sep 15 18:09:16 2010 (r212684) @@ -160,6 +160,7 @@ ASSYM(HASH_ENTRY_SHIFT, HASH_ENTRY_SHIFT ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); +ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); Modified: stable/8/sys/sun4v/include/intr_machdep.h ============================================================================== --- stable/8/sys/sun4v/include/intr_machdep.h Wed Sep 15 18:09:15 2010 (r212683) +++ stable/8/sys/sun4v/include/intr_machdep.h Wed Sep 15 18:09:16 2010 (r212684) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: stable/8/sys/sun4v/sun4v/exception.S ============================================================================== --- stable/8/sys/sun4v/sun4v/exception.S Wed Sep 15 18:09:15 2010 (r212683) +++ stable/8/sys/sun4v/sun4v/exception.S Wed Sep 15 18:09:16 2010 (r212684) @@ -1948,7 +1948,7 @@ END(fork_trampoline) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 18:47:16 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C44EA1065679 for ; Wed, 15 Sep 2010 18:47:16 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 696818FC1D for ; Wed, 15 Sep 2010 18:47:16 +0000 (UTC) Received: (qmail 14986 invoked by uid 399); 15 Sep 2010 18:47:15 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 Sep 2010 18:47:15 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C9114B2.9090001@FreeBSD.org> Date: Wed, 15 Sep 2010 11:47:14 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: "M. Warner Losh" References: <201009131530.o8DFU9f5010734@svn.freebsd.org> <4C9020C5.90108@FreeBSD.org> <20100914.202936.19192035460743630.imp@bsdimp.com> In-Reply-To: <20100914.202936.19192035460743630.imp@bsdimp.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212558 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 18:47:16 -0000 On 9/14/2010 7:29 PM, M. Warner Losh wrote: > In message:<4C9020C5.90108@FreeBSD.org> > Doug Barton writes: > : On 9/13/2010 8:30 AM, Warner Losh wrote: > :> Author: imp > :> Date: Mon Sep 13 15:30:09 2010 > :> New Revision: 212558 > :> URL: http://svn.freebsd.org/changeset/base/212558 > :> > :> Log: > :> Move to using Makefile.arch to include the proper target-specific > :> programs. > :> > :> Modified: > :> head/usr.bin/Makefile > :> > :> Modified: head/usr.bin/Makefile > :> ============================================================================== > :> --- head/usr.bin/Makefile Mon Sep 13 15:19:49 2010 (r212557) > :> +++ head/usr.bin/Makefile Mon Sep 13 15:30:09 2010 (r212558) > :> @@ -11,48 +11,29 @@ > :> > :> SUBDIR= alias \ > :> apply \ > :> - ${_ar} \ > : > :> .if ${MK_TOOLCHAIN} != "no" > :> -_ar= ar > : > :> +SUBDIR+= ar > : > : > : I'm curious about why you're changing the method we use to switch > : optional elements. The change seems gratuitous to me, but I'm willing > : to be persuaded. > > I posted these exact patches many times to arch@ and while people > commented on other aspects of the change, no body ever commented on > this aspect of the change (apart from comments about how to do it > better). That's why I specifically said that there was no objection > from arch@ for these changes. I'm not disputing that. Like many other people my time for FreeBSD is limited, much more so lately, and I was not able to review your patches in depth at the time you posted them. My apologies for the late questions. > Doing things this way makes it easier for different architectures to > subset or augment the directories to build (and it makes it a lot > easier to know what's built on a given architecture). They can be > concentrated into individual Makefiles that are easier to select on. > MIPS and ARM are both moving to having multiple names (powerpc moved a > couple of months ago) and the current arrangement doesn't scale well > in the face of these changes. It is far from gratuitous. I understand that what you've written above was your intent in making the change, what I don't clearly understand is why it's better. But you seem to, and AFAICT the change isn't harmful, so I'll take your word for it. FYI, the reason I asked is that there were already a non-trivial number of small differences in the we handle build options in the various release branches, which makes handling support for things like BIND (which has a lot of knobs) "interesting." However it seems like your new build system is going to add a lot of other differences to what will become 9-release anyway, so I suppose once again I'll just struggle along with it. :) Thanks for taking the time to explain your changes in more depth. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 18:51:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F69B1065670; Wed, 15 Sep 2010 18:51:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9DE8FC14; Wed, 15 Sep 2010 18:51:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FIpFdt046698; Wed, 15 Sep 2010 18:51:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FIpF1G046691; Wed, 15 Sep 2010 18:51:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151851.o8FIpF1G046691@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 18:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212685 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 18:51:15 -0000 Author: marius Date: Wed Sep 15 18:51:14 2010 New Revision: 212685 URL: http://svn.freebsd.org/changeset/base/212685 Log: MFC: r211049, r211568 For CPUs which ignore TD_CV and support hardware unaliasing don't bother doing page coloring. This results in a small but measurable performance improvement in buildworld times. Modified: stable/8/sys/sparc64/include/cache.h stable/8/sys/sparc64/sparc64/cache.c stable/8/sys/sparc64/sparc64/mem.c stable/8/sys/sparc64/sparc64/pmap.c stable/8/sys/sparc64/sparc64/uio_machdep.c stable/8/sys/sparc64/sparc64/vm_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/cache.h ============================================================================== --- stable/8/sys/sparc64/include/cache.h Wed Sep 15 18:09:16 2010 (r212684) +++ stable/8/sys/sparc64/include/cache.h Wed Sep 15 18:51:14 2010 (r212685) @@ -49,7 +49,7 @@ #define DCACHE_COLORS (1 << DCACHE_COLOR_BITS) #define DCACHE_COLOR_MASK (DCACHE_COLORS - 1) #define DCACHE_COLOR(va) (((va) >> PAGE_SHIFT) & DCACHE_COLOR_MASK) -#define DCACHE_OTHER_COLOR(color) \ +#define DCACHE_OTHER_COLOR(color) \ ((color) ^ DCACHE_COLOR_BITS) #define DC_TAG_SHIFT 2 @@ -89,6 +89,8 @@ struct cacheinfo { #ifdef _KERNEL +extern u_int dcache_color_ignore; + struct pcpu; typedef void cache_enable_t(u_int cpu_impl); Modified: stable/8/sys/sparc64/sparc64/cache.c ============================================================================== --- stable/8/sys/sparc64/sparc64/cache.c Wed Sep 15 18:09:16 2010 (r212684) +++ stable/8/sys/sparc64/sparc64/cache.c Wed Sep 15 18:51:14 2010 (r212685) @@ -88,6 +88,8 @@ cache_flush_t *cache_flush; dcache_page_inval_t *dcache_page_inval; icache_page_inval_t *icache_page_inval; +u_int dcache_color_ignore; + #define OF_GET(h, n, v) OF_getprop((h), (n), &(v), sizeof(v)) static u_int cache_new_prop(u_int cpu_impl); @@ -114,6 +116,13 @@ cache_init(struct pcpu *pcpu) u_long set; u_int use_new_prop; + /* + * For CPUs which ignore TD_CV and support hardware unaliasing don't + * bother doing page coloring. This is equal across all CPUs. + */ + if (pcpu->pc_cpuid == 0 && pcpu->pc_impl == CPU_IMPL_SPARC64V) + dcache_color_ignore = 1; + use_new_prop = cache_new_prop(pcpu->pc_impl); if (OF_GET(pcpu->pc_node, !use_new_prop ? "icache-size" : "l1-icache-size", pcpu->pc_cache.ic_size) == -1 || @@ -145,9 +154,8 @@ cache_init(struct pcpu *pcpu) * For CPUs which don't support unaliasing in hardware ensure that * the data cache doesn't have too many virtual colors. */ - if (pcpu->pc_impl != CPU_IMPL_SPARC64V && - ((pcpu->pc_cache.dc_size / pcpu->pc_cache.dc_assoc) / - PAGE_SIZE) != DCACHE_COLORS) + if (dcache_color_ignore == 0 && ((pcpu->pc_cache.dc_size / + pcpu->pc_cache.dc_assoc) / PAGE_SIZE) != DCACHE_COLORS) panic("cache_init: too many D$ colors"); set = pcpu->pc_cache.ec_size / pcpu->pc_cache.ec_assoc; if ((set & ~(1UL << (ffs(set) - 1))) != 0) Modified: stable/8/sys/sparc64/sparc64/mem.c ============================================================================== --- stable/8/sys/sparc64/sparc64/mem.c Wed Sep 15 18:09:16 2010 (r212684) +++ stable/8/sys/sparc64/sparc64/mem.c Wed Sep 15 18:51:14 2010 (r212685) @@ -95,8 +95,10 @@ memrw(struct cdev *dev, struct uio *uio, vm_page_t m; int error; int i; + uint32_t colors; cnt = 0; + colors = 1; error = 0; ova = 0; @@ -134,20 +136,20 @@ memrw(struct cdev *dev, struct uio *uio, } if (m != NULL) { + if (ova == 0) { #ifndef SUN4V - if (ova == 0) + if (dcache_color_ignore == 0) + colors = DCACHE_COLORS; +#endif ova = kmem_alloc_wait(kernel_map, - PAGE_SIZE * DCACHE_COLORS); - if (m->md.color != -1) + PAGE_SIZE * colors); + } +#ifndef SUN4V + if (colors != 1 && m->md.color != -1) va = ova + m->md.color * PAGE_SIZE; else - va = ova; -#else - if (ova == 0) - ova = kmem_alloc_wait(kernel_map, - PAGE_SIZE); - va = ova; #endif + va = ova; pmap_qenter(va, &m, 1); error = uiomove((void *)(va + off), cnt, uio); @@ -158,8 +160,7 @@ memrw(struct cdev *dev, struct uio *uio, uio); } break; - } - else if (dev2unit(dev) == CDEV_MINOR_KMEM) { + } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { va = trunc_page(uio->uio_offset); eva = round_page(uio->uio_offset + iov->iov_len); @@ -184,15 +185,12 @@ memrw(struct cdev *dev, struct uio *uio, /* else panic! */ } if (ova != 0) -#ifndef SUN4V - kmem_free_wakeup(kernel_map, ova, PAGE_SIZE * DCACHE_COLORS); -#else - kmem_free_wakeup(kernel_map, ova, PAGE_SIZE); -#endif + kmem_free_wakeup(kernel_map, ova, PAGE_SIZE * colors); return (error); } void dev_mem_md_init(void) { + } Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Wed Sep 15 18:09:16 2010 (r212684) +++ stable/8/sys/sparc64/sparc64/pmap.c Wed Sep 15 18:51:14 2010 (r212685) @@ -154,7 +154,7 @@ struct pmap kernel_pmap_store; /* * Allocate physical memory for use in pmap_bootstrap. */ -static vm_paddr_t pmap_bootstrap_alloc(vm_size_t size); +static vm_paddr_t pmap_bootstrap_alloc(vm_size_t size, uint32_t colors); /* * Map the given physical page at the specified virtual address in the @@ -308,6 +308,9 @@ pmap_bootstrap(u_int cpu_impl) int i; int j; int sz; + uint32_t colors; + + colors = dcache_color_ignore != 0 ? 1 : DCACHE_COLORS; /* * Find out what physical memory is available from the PROM and @@ -379,7 +382,7 @@ pmap_bootstrap(u_int cpu_impl) /* * Allocate the kernel TSB and lock it in the TLB. */ - pa = pmap_bootstrap_alloc(tsb_kernel_size); + pa = pmap_bootstrap_alloc(tsb_kernel_size, colors); if (pa & PAGE_MASK_4M) panic("pmap_bootstrap: tsb unaligned\n"); tsb_kernel_phys = pa; @@ -390,13 +393,13 @@ pmap_bootstrap(u_int cpu_impl) /* * Allocate and map the dynamic per-CPU area for the BSP. */ - pa = pmap_bootstrap_alloc(DPCPU_SIZE); + pa = pmap_bootstrap_alloc(DPCPU_SIZE, colors); dpcpu0 = (void *)TLB_PHYS_TO_DIRECT(pa); /* * Allocate and map the message buffer. */ - pa = pmap_bootstrap_alloc(MSGBUF_SIZE); + pa = pmap_bootstrap_alloc(MSGBUF_SIZE, colors); msgbufp = (struct msgbuf *)TLB_PHYS_TO_DIRECT(pa); /* @@ -458,26 +461,26 @@ pmap_bootstrap(u_int cpu_impl) * Allocate kva space for temporary mappings. */ pmap_idle_map = virtual_avail; - virtual_avail += PAGE_SIZE * DCACHE_COLORS; + virtual_avail += PAGE_SIZE * colors; pmap_temp_map_1 = virtual_avail; - virtual_avail += PAGE_SIZE * DCACHE_COLORS; + virtual_avail += PAGE_SIZE * colors; pmap_temp_map_2 = virtual_avail; - virtual_avail += PAGE_SIZE * DCACHE_COLORS; + virtual_avail += PAGE_SIZE * colors; /* * Allocate a kernel stack with guard page for thread0 and map it * into the kernel TSB. We must ensure that the virtual address is - * coloured properly, since we're allocating from phys_avail so the - * memory won't have an associated vm_page_t. + * colored properly for corresponding CPUs, since we're allocating + * from phys_avail so the memory won't have an associated vm_page_t. */ - pa = pmap_bootstrap_alloc(KSTACK_PAGES * PAGE_SIZE); + pa = pmap_bootstrap_alloc(KSTACK_PAGES * PAGE_SIZE, colors); kstack0_phys = pa; - virtual_avail += roundup(KSTACK_GUARD_PAGES, DCACHE_COLORS) * - PAGE_SIZE; + virtual_avail += roundup(KSTACK_GUARD_PAGES, colors) * PAGE_SIZE; kstack0 = virtual_avail; - virtual_avail += roundup(KSTACK_PAGES, DCACHE_COLORS) * PAGE_SIZE; - KASSERT(DCACHE_COLOR(kstack0) == DCACHE_COLOR(kstack0_phys), - ("pmap_bootstrap: kstack0 miscoloured")); + virtual_avail += roundup(KSTACK_PAGES, colors) * PAGE_SIZE; + if (dcache_color_ignore == 0) + KASSERT(DCACHE_COLOR(kstack0) == DCACHE_COLOR(kstack0_phys), + ("pmap_bootstrap: kstack0 miscolored")); for (i = 0; i < KSTACK_PAGES; i++) { pa = kstack0_phys + i * PAGE_SIZE; va = kstack0 + i * PAGE_SIZE; @@ -609,12 +612,12 @@ pmap_map_tsb(void) * calculated. */ static vm_paddr_t -pmap_bootstrap_alloc(vm_size_t size) +pmap_bootstrap_alloc(vm_size_t size, uint32_t colors) { vm_paddr_t pa; int i; - size = roundup(size, PAGE_SIZE * DCACHE_COLORS); + size = roundup(size, PAGE_SIZE * colors); for (i = 0; phys_avail[i + 1] != 0; i += 2) { if (phys_avail[i + 1] - phys_avail[i] < size) continue; @@ -751,6 +754,9 @@ pmap_cache_enter(vm_page_t m, vm_offset_ ("pmap_cache_enter: fake page")); PMAP_STATS_INC(pmap_ncache_enter); + if (dcache_color_ignore != 0) + return (1); + /* * Find the color for this virtual address and note the added mapping. */ @@ -823,10 +829,14 @@ pmap_cache_remove(vm_page_t m, vm_offset m->md.colors[DCACHE_COLOR(va)]); KASSERT((m->flags & PG_FICTITIOUS) == 0, ("pmap_cache_remove: fake page")); + PMAP_STATS_INC(pmap_ncache_remove); + + if (dcache_color_ignore != 0) + return; + KASSERT(m->md.colors[DCACHE_COLOR(va)] > 0, ("pmap_cache_remove: no mappings %d <= 0", m->md.colors[DCACHE_COLOR(va)])); - PMAP_STATS_INC(pmap_ncache_remove); /* * Find the color for this virtual address and note the removal of @@ -896,7 +906,7 @@ pmap_kenter(vm_offset_t va, vm_page_t m) va, VM_PAGE_TO_PHYS(m), tp, tp->tte_data); if (DCACHE_COLOR(VM_PAGE_TO_PHYS(m)) != DCACHE_COLOR(va)) { CTR5(KTR_CT2, - "pmap_kenter: off colour va=%#lx pa=%#lx o=%p ot=%d pi=%#lx", + "pmap_kenter: off color va=%#lx pa=%#lx o=%p ot=%d pi=%#lx", va, VM_PAGE_TO_PHYS(m), m->object, m->object ? m->object->type : -1, m->pindex); @@ -1609,13 +1619,13 @@ pmap_zero_page(vm_page_t m) ("pmap_zero_page: fake page")); PMAP_STATS_INC(pmap_nzero_page); pa = VM_PAGE_TO_PHYS(m); - if (m->md.color == -1) { - PMAP_STATS_INC(pmap_nzero_page_nc); - aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); - } else if (m->md.color == DCACHE_COLOR(pa)) { + if (dcache_color_ignore != 0 || m->md.color == DCACHE_COLOR(pa)) { PMAP_STATS_INC(pmap_nzero_page_c); va = TLB_PHYS_TO_DIRECT(pa); cpu_block_zero((void *)va, PAGE_SIZE); + } else if (m->md.color == -1) { + PMAP_STATS_INC(pmap_nzero_page_nc); + aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); } else { PMAP_STATS_INC(pmap_nzero_page_oc); PMAP_LOCK(kernel_pmap); @@ -1641,13 +1651,13 @@ pmap_zero_page_area(vm_page_t m, int off KASSERT(off + size <= PAGE_SIZE, ("pmap_zero_page_area: bad off/size")); PMAP_STATS_INC(pmap_nzero_page_area); pa = VM_PAGE_TO_PHYS(m); - if (m->md.color == -1) { - PMAP_STATS_INC(pmap_nzero_page_area_nc); - aszero(ASI_PHYS_USE_EC, pa + off, size); - } else if (m->md.color == DCACHE_COLOR(pa)) { + if (dcache_color_ignore != 0 || m->md.color == DCACHE_COLOR(pa)) { PMAP_STATS_INC(pmap_nzero_page_area_c); va = TLB_PHYS_TO_DIRECT(pa); bzero((void *)(va + off), size); + } else if (m->md.color == -1) { + PMAP_STATS_INC(pmap_nzero_page_area_nc); + aszero(ASI_PHYS_USE_EC, pa + off, size); } else { PMAP_STATS_INC(pmap_nzero_page_area_oc); PMAP_LOCK(kernel_pmap); @@ -1672,13 +1682,13 @@ pmap_zero_page_idle(vm_page_t m) ("pmap_zero_page_idle: fake page")); PMAP_STATS_INC(pmap_nzero_page_idle); pa = VM_PAGE_TO_PHYS(m); - if (m->md.color == -1) { - PMAP_STATS_INC(pmap_nzero_page_idle_nc); - aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); - } else if (m->md.color == DCACHE_COLOR(pa)) { + if (dcache_color_ignore != 0 || m->md.color == DCACHE_COLOR(pa)) { PMAP_STATS_INC(pmap_nzero_page_idle_c); va = TLB_PHYS_TO_DIRECT(pa); cpu_block_zero((void *)va, PAGE_SIZE); + } else if (m->md.color == -1) { + PMAP_STATS_INC(pmap_nzero_page_idle_nc); + aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); } else { PMAP_STATS_INC(pmap_nzero_page_idle_oc); va = pmap_idle_map + (m->md.color * PAGE_SIZE); @@ -1706,15 +1716,16 @@ pmap_copy_page(vm_page_t msrc, vm_page_t PMAP_STATS_INC(pmap_ncopy_page); pdst = VM_PAGE_TO_PHYS(mdst); psrc = VM_PAGE_TO_PHYS(msrc); - if (msrc->md.color == -1 && mdst->md.color == -1) { - PMAP_STATS_INC(pmap_ncopy_page_nc); - ascopy(ASI_PHYS_USE_EC, psrc, pdst, PAGE_SIZE); - } else if (msrc->md.color == DCACHE_COLOR(psrc) && - mdst->md.color == DCACHE_COLOR(pdst)) { + if (dcache_color_ignore != 0 || + (msrc->md.color == DCACHE_COLOR(psrc) && + mdst->md.color == DCACHE_COLOR(pdst))) { PMAP_STATS_INC(pmap_ncopy_page_c); vdst = TLB_PHYS_TO_DIRECT(pdst); vsrc = TLB_PHYS_TO_DIRECT(psrc); cpu_block_copy((void *)vsrc, (void *)vdst, PAGE_SIZE); + } else if (msrc->md.color == -1 && mdst->md.color == -1) { + PMAP_STATS_INC(pmap_ncopy_page_nc); + ascopy(ASI_PHYS_USE_EC, psrc, pdst, PAGE_SIZE); } else if (msrc->md.color == -1) { if (mdst->md.color == DCACHE_COLOR(pdst)) { PMAP_STATS_INC(pmap_ncopy_page_dc); Modified: stable/8/sys/sparc64/sparc64/uio_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/uio_machdep.c Wed Sep 15 18:09:16 2010 (r212684) +++ stable/8/sys/sparc64/sparc64/uio_machdep.c Wed Sep 15 18:51:14 2010 (r212685) @@ -51,12 +51,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include /* * Implement uiomove(9) from physical memory using a combination * of the direct mapping and sf_bufs to reduce the creation and - * destruction of ephemeral mappings. + * destruction of ephemeral mappings. */ int uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) @@ -92,7 +93,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offs cnt = ulmin(cnt, PAGE_SIZE - page_offset); m = ma[offset >> PAGE_SHIFT]; pa = VM_PAGE_TO_PHYS(m); - if (m->md.color != DCACHE_COLOR(pa)) { + if (dcache_color_ignore == 0 && + m->md.color != DCACHE_COLOR(pa)) { sf = sf_buf_alloc(m, 0); cp = (char *)sf_buf_kva(sf) + page_offset; } else { Modified: stable/8/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/vm_machdep.c Wed Sep 15 18:09:16 2010 (r212684) +++ stable/8/sys/sparc64/sparc64/vm_machdep.c Wed Sep 15 18:51:14 2010 (r212685) @@ -227,7 +227,7 @@ cpu_set_upcall(struct thread *td, struct void cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) + stack_t *stack) { struct trapframe *tf; uint64_t sp; @@ -251,7 +251,7 @@ cpu_set_user_tls(struct thread *td, void if (td == curthread) flushw(); - td->td_frame->tf_global[7] = (uint64_t) tls_base; + td->td_frame->tf_global[7] = (uint64_t)tls_base; return (0); } @@ -531,7 +531,7 @@ uma_small_alloc(uma_zone_t zone, int byt } pa = VM_PAGE_TO_PHYS(m); - if (m->md.color != DCACHE_COLOR(pa)) { + if (dcache_color_ignore == 0 && m->md.color != DCACHE_COLOR(pa)) { KASSERT(m->md.colors[0] == 0 && m->md.colors[1] == 0, ("uma_small_alloc: free page still has mappings!")); PMAP_STATS_INC(uma_nsmall_alloc_oc); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 18:51:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AA261065672; Wed, 15 Sep 2010 18:51:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48DD38FC15; Wed, 15 Sep 2010 18:51:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FIpFwK046709; Wed, 15 Sep 2010 18:51:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FIpFEa046702; Wed, 15 Sep 2010 18:51:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151851.o8FIpFEa046702@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 18:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212686 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 18:51:15 -0000 Author: marius Date: Wed Sep 15 18:51:15 2010 New Revision: 212686 URL: http://svn.freebsd.org/changeset/base/212686 Log: MFC: r211049, r211568 For CPUs which ignore TD_CV and support hardware unaliasing don't bother doing page coloring. This results in a small but measurable performance improvement in buildworld times. Modified: stable/7/sys/sparc64/include/cache.h stable/7/sys/sparc64/sparc64/cache.c stable/7/sys/sparc64/sparc64/mem.c stable/7/sys/sparc64/sparc64/pmap.c stable/7/sys/sparc64/sparc64/uio_machdep.c stable/7/sys/sparc64/sparc64/vm_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/cache.h ============================================================================== --- stable/7/sys/sparc64/include/cache.h Wed Sep 15 18:51:14 2010 (r212685) +++ stable/7/sys/sparc64/include/cache.h Wed Sep 15 18:51:15 2010 (r212686) @@ -49,7 +49,7 @@ #define DCACHE_COLORS (1 << DCACHE_COLOR_BITS) #define DCACHE_COLOR_MASK (DCACHE_COLORS - 1) #define DCACHE_COLOR(va) (((va) >> PAGE_SHIFT) & DCACHE_COLOR_MASK) -#define DCACHE_OTHER_COLOR(color) \ +#define DCACHE_OTHER_COLOR(color) \ ((color) ^ DCACHE_COLOR_BITS) #define DC_TAG_SHIFT 2 @@ -89,6 +89,8 @@ struct cacheinfo { #ifdef _KERNEL +extern u_int dcache_color_ignore; + struct pcpu; typedef void cache_enable_t(u_int cpu_impl); Modified: stable/7/sys/sparc64/sparc64/cache.c ============================================================================== --- stable/7/sys/sparc64/sparc64/cache.c Wed Sep 15 18:51:14 2010 (r212685) +++ stable/7/sys/sparc64/sparc64/cache.c Wed Sep 15 18:51:15 2010 (r212686) @@ -88,6 +88,8 @@ cache_flush_t *cache_flush; dcache_page_inval_t *dcache_page_inval; icache_page_inval_t *icache_page_inval; +u_int dcache_color_ignore; + #define OF_GET(h, n, v) OF_getprop((h), (n), &(v), sizeof(v)) static u_int cache_new_prop(u_int cpu_impl); @@ -114,6 +116,13 @@ cache_init(struct pcpu *pcpu) u_long set; u_int use_new_prop; + /* + * For CPUs which ignore TD_CV and support hardware unaliasing don't + * bother doing page coloring. This is equal across all CPUs. + */ + if (pcpu->pc_cpuid == 0 && pcpu->pc_impl == CPU_IMPL_SPARC64V) + dcache_color_ignore = 1; + use_new_prop = cache_new_prop(pcpu->pc_impl); if (OF_GET(pcpu->pc_node, !use_new_prop ? "icache-size" : "l1-icache-size", pcpu->pc_cache.ic_size) == -1 || @@ -145,9 +154,8 @@ cache_init(struct pcpu *pcpu) * For CPUs which don't support unaliasing in hardware ensure that * the data cache doesn't have too many virtual colors. */ - if (pcpu->pc_impl != CPU_IMPL_SPARC64V && - ((pcpu->pc_cache.dc_size / pcpu->pc_cache.dc_assoc) / - PAGE_SIZE) != DCACHE_COLORS) + if (dcache_color_ignore == 0 && ((pcpu->pc_cache.dc_size / + pcpu->pc_cache.dc_assoc) / PAGE_SIZE) != DCACHE_COLORS) panic("cache_init: too many D$ colors"); set = pcpu->pc_cache.ec_size / pcpu->pc_cache.ec_assoc; if ((set & ~(1UL << (ffs(set) - 1))) != 0) Modified: stable/7/sys/sparc64/sparc64/mem.c ============================================================================== --- stable/7/sys/sparc64/sparc64/mem.c Wed Sep 15 18:51:14 2010 (r212685) +++ stable/7/sys/sparc64/sparc64/mem.c Wed Sep 15 18:51:15 2010 (r212686) @@ -95,8 +95,10 @@ memrw(struct cdev *dev, struct uio *uio, vm_page_t m; int error; int i; + uint32_t colors; cnt = 0; + colors = 1; error = 0; ova = 0; @@ -134,20 +136,20 @@ memrw(struct cdev *dev, struct uio *uio, } if (m != NULL) { + if (ova == 0) { #ifndef SUN4V - if (ova == 0) + if (dcache_color_ignore == 0) + colors = DCACHE_COLORS; +#endif ova = kmem_alloc_wait(kernel_map, - PAGE_SIZE * DCACHE_COLORS); - if (m->md.color != -1) + PAGE_SIZE * colors); + } +#ifndef SUN4V + if (colors != 1 && m->md.color != -1) va = ova + m->md.color * PAGE_SIZE; else - va = ova; -#else - if (ova == 0) - ova = kmem_alloc_wait(kernel_map, - PAGE_SIZE); - va = ova; #endif + va = ova; pmap_qenter(va, &m, 1); error = uiomove((void *)(va + off), cnt, uio); @@ -158,8 +160,7 @@ memrw(struct cdev *dev, struct uio *uio, uio); } break; - } - else if (minor(dev) == CDEV_MINOR_KMEM) { + } else if (minor(dev) == CDEV_MINOR_KMEM) { va = trunc_page(uio->uio_offset); eva = round_page(uio->uio_offset + iov->iov_len); @@ -184,15 +185,12 @@ memrw(struct cdev *dev, struct uio *uio, /* else panic! */ } if (ova != 0) -#ifndef SUN4V - kmem_free_wakeup(kernel_map, ova, PAGE_SIZE * DCACHE_COLORS); -#else - kmem_free_wakeup(kernel_map, ova, PAGE_SIZE); -#endif + kmem_free_wakeup(kernel_map, ova, PAGE_SIZE * colors); return (error); } void dev_mem_md_init(void) { + } Modified: stable/7/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/pmap.c Wed Sep 15 18:51:14 2010 (r212685) +++ stable/7/sys/sparc64/sparc64/pmap.c Wed Sep 15 18:51:15 2010 (r212686) @@ -154,7 +154,7 @@ struct pmap kernel_pmap_store; /* * Allocate physical memory for use in pmap_bootstrap. */ -static vm_paddr_t pmap_bootstrap_alloc(vm_size_t size); +static vm_paddr_t pmap_bootstrap_alloc(vm_size_t size, uint32_t colors); /* * Map the given physical page at the specified virtual address in the @@ -308,6 +308,9 @@ pmap_bootstrap(u_int cpu_impl) int i; int j; int sz; + uint32_t colors; + + colors = dcache_color_ignore != 0 ? 1 : DCACHE_COLORS; /* * Find out what physical memory is available from the PROM and @@ -379,7 +382,7 @@ pmap_bootstrap(u_int cpu_impl) /* * Allocate the kernel TSB and lock it in the TLB. */ - pa = pmap_bootstrap_alloc(tsb_kernel_size); + pa = pmap_bootstrap_alloc(tsb_kernel_size, colors); if (pa & PAGE_MASK_4M) panic("pmap_bootstrap: tsb unaligned\n"); tsb_kernel_phys = pa; @@ -390,7 +393,7 @@ pmap_bootstrap(u_int cpu_impl) /* * Allocate and map the message buffer. */ - pa = pmap_bootstrap_alloc(MSGBUF_SIZE); + pa = pmap_bootstrap_alloc(MSGBUF_SIZE, colors); msgbufp = (struct msgbuf *)TLB_PHYS_TO_DIRECT(pa); /* @@ -452,26 +455,26 @@ pmap_bootstrap(u_int cpu_impl) * Allocate kva space for temporary mappings. */ pmap_idle_map = virtual_avail; - virtual_avail += PAGE_SIZE * DCACHE_COLORS; + virtual_avail += PAGE_SIZE * colors; pmap_temp_map_1 = virtual_avail; - virtual_avail += PAGE_SIZE * DCACHE_COLORS; + virtual_avail += PAGE_SIZE * colors; pmap_temp_map_2 = virtual_avail; - virtual_avail += PAGE_SIZE * DCACHE_COLORS; + virtual_avail += PAGE_SIZE * colors; /* * Allocate a kernel stack with guard page for thread0 and map it * into the kernel TSB. We must ensure that the virtual address is - * coloured properly, since we're allocating from phys_avail so the - * memory won't have an associated vm_page_t. + * colored properly for corresponding CPUs, since we're allocating + * from phys_avail so the memory won't have an associated vm_page_t. */ - pa = pmap_bootstrap_alloc(KSTACK_PAGES * PAGE_SIZE); + pa = pmap_bootstrap_alloc(KSTACK_PAGES * PAGE_SIZE, colors); kstack0_phys = pa; - virtual_avail += roundup(KSTACK_GUARD_PAGES, DCACHE_COLORS) * - PAGE_SIZE; + virtual_avail += roundup(KSTACK_GUARD_PAGES, colors) * PAGE_SIZE; kstack0 = virtual_avail; - virtual_avail += roundup(KSTACK_PAGES, DCACHE_COLORS) * PAGE_SIZE; - KASSERT(DCACHE_COLOR(kstack0) == DCACHE_COLOR(kstack0_phys), - ("pmap_bootstrap: kstack0 miscoloured")); + virtual_avail += roundup(KSTACK_PAGES, colors) * PAGE_SIZE; + if (dcache_color_ignore == 0) + KASSERT(DCACHE_COLOR(kstack0) == DCACHE_COLOR(kstack0_phys), + ("pmap_bootstrap: kstack0 miscolored")); for (i = 0; i < KSTACK_PAGES; i++) { pa = kstack0_phys + i * PAGE_SIZE; va = kstack0 + i * PAGE_SIZE; @@ -603,12 +606,12 @@ pmap_map_tsb(void) * calculated. */ static vm_paddr_t -pmap_bootstrap_alloc(vm_size_t size) +pmap_bootstrap_alloc(vm_size_t size, uint32_t colors) { vm_paddr_t pa; int i; - size = roundup(size, PAGE_SIZE * DCACHE_COLORS); + size = roundup(size, PAGE_SIZE * colors); for (i = 0; phys_avail[i + 1] != 0; i += 2) { if (phys_avail[i + 1] - phys_avail[i] < size) continue; @@ -745,6 +748,9 @@ pmap_cache_enter(vm_page_t m, vm_offset_ ("pmap_cache_enter: fake page")); PMAP_STATS_INC(pmap_ncache_enter); + if (dcache_color_ignore != 0) + return (1); + /* * Find the color for this virtual address and note the added mapping. */ @@ -817,10 +823,14 @@ pmap_cache_remove(vm_page_t m, vm_offset m->md.colors[DCACHE_COLOR(va)]); KASSERT((m->flags & PG_FICTITIOUS) == 0, ("pmap_cache_remove: fake page")); + PMAP_STATS_INC(pmap_ncache_remove); + + if (dcache_color_ignore != 0) + return; + KASSERT(m->md.colors[DCACHE_COLOR(va)] > 0, ("pmap_cache_remove: no mappings %d <= 0", m->md.colors[DCACHE_COLOR(va)])); - PMAP_STATS_INC(pmap_ncache_remove); /* * Find the color for this virtual address and note the removal of @@ -890,7 +900,7 @@ pmap_kenter(vm_offset_t va, vm_page_t m) va, VM_PAGE_TO_PHYS(m), tp, tp->tte_data); if (DCACHE_COLOR(VM_PAGE_TO_PHYS(m)) != DCACHE_COLOR(va)) { CTR6(KTR_CT2, - "pmap_kenter: off colour va=%#lx pa=%#lx o=%p oc=%#lx ot=%d pi=%#lx", + "pmap_kenter: off color va=%#lx pa=%#lx o=%p oc=%#lx ot=%d pi=%#lx", va, VM_PAGE_TO_PHYS(m), m->object, m->object ? m->object->pg_color : -1, m->object ? m->object->type : -1, @@ -1604,13 +1614,13 @@ pmap_zero_page(vm_page_t m) ("pmap_zero_page: fake page")); PMAP_STATS_INC(pmap_nzero_page); pa = VM_PAGE_TO_PHYS(m); - if (m->md.color == -1) { - PMAP_STATS_INC(pmap_nzero_page_nc); - aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); - } else if (m->md.color == DCACHE_COLOR(pa)) { + if (dcache_color_ignore != 0 || m->md.color == DCACHE_COLOR(pa)) { PMAP_STATS_INC(pmap_nzero_page_c); va = TLB_PHYS_TO_DIRECT(pa); cpu_block_zero((void *)va, PAGE_SIZE); + } else if (m->md.color == -1) { + PMAP_STATS_INC(pmap_nzero_page_nc); + aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); } else { PMAP_STATS_INC(pmap_nzero_page_oc); PMAP_LOCK(kernel_pmap); @@ -1636,13 +1646,13 @@ pmap_zero_page_area(vm_page_t m, int off KASSERT(off + size <= PAGE_SIZE, ("pmap_zero_page_area: bad off/size")); PMAP_STATS_INC(pmap_nzero_page_area); pa = VM_PAGE_TO_PHYS(m); - if (m->md.color == -1) { - PMAP_STATS_INC(pmap_nzero_page_area_nc); - aszero(ASI_PHYS_USE_EC, pa + off, size); - } else if (m->md.color == DCACHE_COLOR(pa)) { + if (dcache_color_ignore != 0 || m->md.color == DCACHE_COLOR(pa)) { PMAP_STATS_INC(pmap_nzero_page_area_c); va = TLB_PHYS_TO_DIRECT(pa); bzero((void *)(va + off), size); + } else if (m->md.color == -1) { + PMAP_STATS_INC(pmap_nzero_page_area_nc); + aszero(ASI_PHYS_USE_EC, pa + off, size); } else { PMAP_STATS_INC(pmap_nzero_page_area_oc); PMAP_LOCK(kernel_pmap); @@ -1667,13 +1677,13 @@ pmap_zero_page_idle(vm_page_t m) ("pmap_zero_page_idle: fake page")); PMAP_STATS_INC(pmap_nzero_page_idle); pa = VM_PAGE_TO_PHYS(m); - if (m->md.color == -1) { - PMAP_STATS_INC(pmap_nzero_page_idle_nc); - aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); - } else if (m->md.color == DCACHE_COLOR(pa)) { + if (dcache_color_ignore != 0 || m->md.color == DCACHE_COLOR(pa)) { PMAP_STATS_INC(pmap_nzero_page_idle_c); va = TLB_PHYS_TO_DIRECT(pa); cpu_block_zero((void *)va, PAGE_SIZE); + } else if (m->md.color == -1) { + PMAP_STATS_INC(pmap_nzero_page_idle_nc); + aszero(ASI_PHYS_USE_EC, pa, PAGE_SIZE); } else { PMAP_STATS_INC(pmap_nzero_page_idle_oc); va = pmap_idle_map + (m->md.color * PAGE_SIZE); @@ -1701,15 +1711,16 @@ pmap_copy_page(vm_page_t msrc, vm_page_t PMAP_STATS_INC(pmap_ncopy_page); pdst = VM_PAGE_TO_PHYS(mdst); psrc = VM_PAGE_TO_PHYS(msrc); - if (msrc->md.color == -1 && mdst->md.color == -1) { - PMAP_STATS_INC(pmap_ncopy_page_nc); - ascopy(ASI_PHYS_USE_EC, psrc, pdst, PAGE_SIZE); - } else if (msrc->md.color == DCACHE_COLOR(psrc) && - mdst->md.color == DCACHE_COLOR(pdst)) { + if (dcache_color_ignore != 0 || + (msrc->md.color == DCACHE_COLOR(psrc) && + mdst->md.color == DCACHE_COLOR(pdst))) { PMAP_STATS_INC(pmap_ncopy_page_c); vdst = TLB_PHYS_TO_DIRECT(pdst); vsrc = TLB_PHYS_TO_DIRECT(psrc); cpu_block_copy((void *)vsrc, (void *)vdst, PAGE_SIZE); + } else if (msrc->md.color == -1 && mdst->md.color == -1) { + PMAP_STATS_INC(pmap_ncopy_page_nc); + ascopy(ASI_PHYS_USE_EC, psrc, pdst, PAGE_SIZE); } else if (msrc->md.color == -1) { if (mdst->md.color == DCACHE_COLOR(pdst)) { PMAP_STATS_INC(pmap_ncopy_page_dc); Modified: stable/7/sys/sparc64/sparc64/uio_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/uio_machdep.c Wed Sep 15 18:51:14 2010 (r212685) +++ stable/7/sys/sparc64/sparc64/uio_machdep.c Wed Sep 15 18:51:15 2010 (r212686) @@ -51,12 +51,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include /* * Implement uiomove(9) from physical memory using a combination * of the direct mapping and sf_bufs to reduce the creation and - * destruction of ephemeral mappings. + * destruction of ephemeral mappings. */ int uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) @@ -92,7 +93,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offs cnt = ulmin(cnt, PAGE_SIZE - page_offset); m = ma[offset >> PAGE_SHIFT]; pa = VM_PAGE_TO_PHYS(m); - if (m->md.color != DCACHE_COLOR(pa)) { + if (dcache_color_ignore == 0 && + m->md.color != DCACHE_COLOR(pa)) { sf = sf_buf_alloc(m, 0); cp = (char *)sf_buf_kva(sf) + page_offset; } else { Modified: stable/7/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/vm_machdep.c Wed Sep 15 18:51:14 2010 (r212685) +++ stable/7/sys/sparc64/sparc64/vm_machdep.c Wed Sep 15 18:51:15 2010 (r212686) @@ -191,7 +191,7 @@ cpu_set_upcall(struct thread *td, struct void cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) + stack_t *stack) { struct trapframe *tf; uint64_t sp; @@ -215,7 +215,7 @@ cpu_set_user_tls(struct thread *td, void if (td == curthread) flushw(); - td->td_frame->tf_global[7] = (uint64_t) tls_base; + td->td_frame->tf_global[7] = (uint64_t)tls_base; return (0); } @@ -495,7 +495,7 @@ uma_small_alloc(uma_zone_t zone, int byt } pa = VM_PAGE_TO_PHYS(m); - if (m->md.color != DCACHE_COLOR(pa)) { + if (dcache_color_ignore == 0 && m->md.color != DCACHE_COLOR(pa)) { KASSERT(m->md.colors[0] == 0 && m->md.colors[1] == 0, ("uma_small_alloc: free page still has mappings!")); PMAP_STATS_INC(uma_nsmall_alloc_oc); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:08:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 026A3106564A; Wed, 15 Sep 2010 19:08:42 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E665B8FC1B; Wed, 15 Sep 2010 19:08:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJ8fI6047226; Wed, 15 Sep 2010 19:08:41 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJ8fqK047224; Wed, 15 Sep 2010 19:08:41 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201009151908.o8FJ8fqK047224@svn.freebsd.org> From: Andreas Tobler Date: Wed, 15 Sep 2010 19:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212687 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:08:42 -0000 Author: andreast Date: Wed Sep 15 19:08:41 2010 New Revision: 212687 URL: http://svn.freebsd.org/changeset/base/212687 Log: Increase register access delay to deal with the high-latency I2C chipset found in some models of Powermac G5. Approved by: nwhitehorn (mentor) Modified: head/sys/powerpc/powermac/kiic.c Modified: head/sys/powerpc/powermac/kiic.c ============================================================================== --- head/sys/powerpc/powermac/kiic.c Wed Sep 15 18:51:15 2010 (r212686) +++ head/sys/powerpc/powermac/kiic.c Wed Sep 15 19:08:41 2010 (r212687) @@ -250,7 +250,7 @@ static void kiic_writereg(struct kiic_softc *sc, u_int reg, u_int val) { bus_write_4(sc->sc_reg, sc->sc_regstep * reg, val); - DELAY(10); /* register access delay */ + DELAY(100); /* register access delay */ } static u_int From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:09:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9A39106564A; Wed, 15 Sep 2010 19:09:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 884498FC12; Wed, 15 Sep 2010 19:09:51 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 152BD46B8D; Wed, 15 Sep 2010 15:09:51 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3E64E8A03C; Wed, 15 Sep 2010 15:09:50 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Wed, 15 Sep 2010 14:37:22 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201009151002.o8FA2kvO029237@svn.freebsd.org> <4C90F4B9.3060400@freebsd.org> <4C90F780.8080402@freebsd.org> In-Reply-To: <4C90F780.8080402@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201009151437.22412.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 15 Sep 2010 15:09:50 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212647 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:09:51 -0000 On Wednesday, September 15, 2010 12:42:40 pm Andriy Gapon wrote: > on 15/09/2010 19:30 Andriy Gapon said the following: > > SET_DECLARE would expand to exactly those two lines. > > I am not sure why comment even said that it's impossible to use SET_DECLARE(), > > perhaps previously it used to expand to something bigger? > > Having said that, I am not sure if it makes logical sense to use SET_DECLARE() in > pcpu.h. Family of SET_* macros seems to be geared towards sets that contain > arrays of identical items (e.g. see SET_ITEM, SET_COUNT). set_pcpu reserves space > for items of various types and sizes. So I am not sure if using any SET_* macros > would not be confusing in the future. > > What do you think? Hmm, you could use SET_START() and SET_LIMIT() at least, but it's not a big deal either way. The comment seemed to imply that it would have used SET_DECLARE() if there had not been technical difficulties. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:20:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F923106566C; Wed, 15 Sep 2010 19:20:29 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DD208FC1B; Wed, 15 Sep 2010 19:20:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJKTqD047570; Wed, 15 Sep 2010 19:20:29 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJKTo4047567; Wed, 15 Sep 2010 19:20:29 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009151920.o8FJKTo4047567@svn.freebsd.org> From: Martin Matuska Date: Wed, 15 Sep 2010 19:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212688 - in stable/8/cddl/compat/opensolaris: include misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:20:29 -0000 Author: mm Date: Wed Sep 15 19:20:29 2010 New Revision: 212688 URL: http://svn.freebsd.org/changeset/base/212688 Log: Add missing MFC to r212668 for cddl/compat/opensolaris from r209962. Modified: stable/8/cddl/compat/opensolaris/include/mnttab.h stable/8/cddl/compat/opensolaris/misc/mnttab.c Directory Properties: stable/8/cddl/compat/opensolaris/ (props changed) Modified: stable/8/cddl/compat/opensolaris/include/mnttab.h ============================================================================== --- stable/8/cddl/compat/opensolaris/include/mnttab.h Wed Sep 15 19:08:41 2010 (r212687) +++ stable/8/cddl/compat/opensolaris/include/mnttab.h Wed Sep 15 19:20:29 2010 (r212688) @@ -3,10 +3,13 @@ #ifndef _OPENSOLARIS_MNTTAB_H_ #define _OPENSOLARIS_MNTTAB_H_ +#include +#include + #include #include -#define MNTTAB _PATH_DEVNULL +#define MNTTAB _PATH_DEVZERO #define MNT_LINE_MAX 1024 #define umount2(p, f) unmount(p, f) @@ -17,7 +20,12 @@ struct mnttab { char *mnt_fstype; char *mnt_mntopts; }; +#define extmnttab mnttab int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp); +int getmntent(FILE *fp, struct mnttab *mp); +char *hasmntopt(struct mnttab *mnt, char *opt); + +void statfs2mnttab(struct statfs *sfs, struct mnttab *mp); #endif /* !_OPENSOLARIS_MNTTAB_H_ */ Modified: stable/8/cddl/compat/opensolaris/misc/mnttab.c ============================================================================== --- stable/8/cddl/compat/opensolaris/misc/mnttab.c Wed Sep 15 19:08:41 2010 (r212687) +++ stable/8/cddl/compat/opensolaris/misc/mnttab.c Wed Sep 15 19:20:29 2010 (r212688) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include +#include #include #include #include @@ -88,75 +91,126 @@ optadd(char *mntopts, size_t size, const strlcat(mntopts, opt, size); } -int -getmntany(FILE *fd __unused, struct mnttab *mgetp, struct mnttab *mrefp) +void +statfs2mnttab(struct statfs *sfs, struct mnttab *mp) { - static struct statfs *sfs = NULL; static char mntopts[MNTMAXSTR]; - struct opt *o; - long i, n, flags; + long flags; - if (sfs != NULL) { - free(sfs); - sfs = NULL; - } mntopts[0] = '\0'; - n = getfsstat(NULL, 0, MNT_NOWAIT); - if (n == -1) - return (-1); - n = sizeof(*sfs) * (n + 8); - sfs = malloc(n); - if (sfs == NULL) - return (-1); - n = getfsstat(sfs, n, MNT_WAIT); - if (n == -1) { - free(sfs); - sfs = NULL; - return (-1); + flags = sfs->f_flags; +#define OPTADD(opt) optadd(mntopts, sizeof(mntopts), (opt)) + if (flags & MNT_RDONLY) + OPTADD(MNTOPT_RO); + else + OPTADD(MNTOPT_RW); + if (flags & MNT_NOSUID) + OPTADD(MNTOPT_NOSUID); + else + OPTADD(MNTOPT_SETUID); + if (flags & MNT_UPDATE) + OPTADD(MNTOPT_REMOUNT); + if (flags & MNT_NOATIME) + OPTADD(MNTOPT_NOATIME); + else + OPTADD(MNTOPT_ATIME); + OPTADD(MNTOPT_NOXATTR); + if (flags & MNT_NOEXEC) + OPTADD(MNTOPT_NOEXEC); + else + OPTADD(MNTOPT_EXEC); +#undef OPTADD + mp->mnt_special = sfs->f_mntfromname; + mp->mnt_mountp = sfs->f_mntonname; + mp->mnt_fstype = sfs->f_fstypename; + mp->mnt_mntopts = mntopts; +} + +static struct statfs *gsfs = NULL; +static int allfs = 0; + +static int +statfs_init(void) +{ + struct statfs *sfs; + int error; + + if (gsfs != NULL) { + free(gsfs); + gsfs = NULL; } - for (i = 0; i < n; i++) { + allfs = getfsstat(NULL, 0, MNT_WAIT); + if (allfs == -1) + goto fail; + gsfs = malloc(sizeof(gsfs[0]) * allfs * 2); + if (gsfs == NULL) + goto fail; + allfs = getfsstat(gsfs, (long)(sizeof(gsfs[0]) * allfs * 2), + MNT_WAIT); + if (allfs == -1) + goto fail; + sfs = realloc(gsfs, allfs * sizeof(gsfs[0])); + if (sfs != NULL) + gsfs = sfs; + return (0); +fail: + error = errno; + if (gsfs != NULL) + free(gsfs); + gsfs = NULL; + allfs = 0; + return (error); +} + +int +getmntany(FILE *fd __unused, struct mnttab *mgetp, struct mnttab *mrefp) +{ + struct statfs *sfs; + int i, error; + + error = statfs_init(); + if (error != 0) + return (error); + + for (i = 0; i < allfs; i++) { if (mrefp->mnt_special != NULL && - strcmp(mrefp->mnt_special, sfs[i].f_mntfromname) != 0) { + strcmp(mrefp->mnt_special, gsfs[i].f_mntfromname) != 0) { continue; } if (mrefp->mnt_mountp != NULL && - strcmp(mrefp->mnt_mountp, sfs[i].f_mntonname) != 0) { + strcmp(mrefp->mnt_mountp, gsfs[i].f_mntonname) != 0) { continue; } if (mrefp->mnt_fstype != NULL && - strcmp(mrefp->mnt_fstype, sfs[i].f_fstypename) != 0) { + strcmp(mrefp->mnt_fstype, gsfs[i].f_fstypename) != 0) { continue; } - flags = sfs[i].f_flags; -#define OPTADD(opt) optadd(mntopts, sizeof(mntopts), (opt)) - if (flags & MNT_RDONLY) - OPTADD(MNTOPT_RO); - else - OPTADD(MNTOPT_RW); - if (flags & MNT_NOSUID) - OPTADD(MNTOPT_NOSUID); - else - OPTADD(MNTOPT_SETUID); - if (flags & MNT_UPDATE) - OPTADD(MNTOPT_REMOUNT); - if (flags & MNT_NOATIME) - OPTADD(MNTOPT_NOATIME); - else - OPTADD(MNTOPT_ATIME); - OPTADD(MNTOPT_NOXATTR); - if (flags & MNT_NOEXEC) - OPTADD(MNTOPT_NOEXEC); - else - OPTADD(MNTOPT_EXEC); -#undef OPTADD - mgetp->mnt_special = sfs[i].f_mntfromname; - mgetp->mnt_mountp = sfs[i].f_mntonname; - mgetp->mnt_fstype = sfs[i].f_fstypename; - mgetp->mnt_mntopts = mntopts; + statfs2mnttab(&gsfs[i], mgetp); return (0); } - free(sfs); - sfs = NULL; return (-1); } + +int +getmntent(FILE *fp, struct mnttab *mp) +{ + struct statfs *sfs; + int error, nfs; + + nfs = (int)lseek(fileno(fp), 0, SEEK_CUR); + if (nfs == -1) + return (errno); + /* If nfs is 0, we want to refresh out cache. */ + if (nfs == 0 || gsfs == NULL) { + error = statfs_init(); + if (error != 0) + return (error); + } + if (nfs >= allfs) + return (-1); + statfs2mnttab(&gsfs[nfs], mp); + if (lseek(fileno(fp), 1, SEEK_CUR) == -1) + return (errno); + return (0); +} From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:27:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82486106566C; Wed, 15 Sep 2010 19:27:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 705B38FC17; Wed, 15 Sep 2010 19:27:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJRVYN047853; Wed, 15 Sep 2010 19:27:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJRVp7047852; Wed, 15 Sep 2010 19:27:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151927.o8FJRVp7047852@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 19:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212689 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:27:31 -0000 Author: marius Date: Wed Sep 15 19:27:30 2010 New Revision: 212689 URL: http://svn.freebsd.org/changeset/base/212689 Log: MFC: r211050 (partial) - Introduce a cpu_ipi_single() function pointer in order to send IPIs to single CPUs more efficiently with Cheetah(-class) and Jalapeno CPUs. - Factor out the Jalapeno support from the Cheetah IPI send functions in order to be able to more easily and efficiently implement support for more than 32 target CPUs as well as a workaround for Cheetah+ erratum 25 for the latter. Modified: stable/8/sys/sparc64/include/smp.h stable/8/sys/sparc64/sparc64/mp_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/smp.h ============================================================================== --- stable/8/sys/sparc64/include/smp.h Wed Sep 15 19:20:29 2010 (r212688) +++ stable/8/sys/sparc64/include/smp.h Wed Sep 15 19:27:30 2010 (r212689) @@ -96,6 +96,8 @@ void cpu_mp_shutdown(void); typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); extern cpu_ipi_selected_t *cpu_ipi_selected; +typedef void cpu_ipi_single_t(u_int, u_long, u_long, u_long); +extern cpu_ipi_single_t *cpu_ipi_single; void mp_init(u_int cpu_impl); @@ -230,7 +232,8 @@ ipi_tlb_range_demap(struct pmap *pm, vm_ ita->ita_pmap = pm; ita->ita_start = start; ita->ita_end = end; - cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_range_demap, (u_long)ita); + cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_range_demap, + (u_long)ita); return (&ita->ita_mask); } Modified: stable/8/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 19:20:29 2010 (r212688) +++ stable/8/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 19:27:30 2010 (r212689) @@ -29,7 +29,7 @@ */ /*- * Copyright (c) 2002 Jake Burkholder. - * Copyright (c) 2007 Marius Strobl + * Copyright (c) 2007 - 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -113,6 +113,7 @@ struct pcb stoppcbs[MAXCPU]; struct mtx ipi_mtx; cpu_ipi_selected_t *cpu_ipi_selected; +cpu_ipi_single_t *cpu_ipi_single; static vm_offset_t mp_tramp; static u_int cpuid_to_mid[MAXCPU]; @@ -124,11 +125,14 @@ static void ap_start(phandle_t node, u_i static void cpu_mp_unleash(void *v); static void foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid, u_int cpu_impl)); -static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); static cpu_ipi_selected_t cheetah_ipi_selected; +static cpu_ipi_single_t cheetah_ipi_single; +static cpu_ipi_selected_t jalapeno_ipi_selected; +static cpu_ipi_single_t jalapeno_ipi_single; static cpu_ipi_selected_t spitfire_ipi_selected; +static cpu_ipi_single_t spitfire_ipi_single; SYSINIT(cpu_mp_unleash, SI_SUB_SMP, SI_ORDER_FIRST, cpu_mp_unleash, NULL); @@ -162,13 +166,18 @@ mp_init(u_int cpu_impl) * cpu_mp_start() wasn't so initialize these here. */ if (cpu_impl == CPU_IMPL_ULTRASPARCIIIi || - cpu_impl == CPU_IMPL_ULTRASPARCIIIip) + cpu_impl == CPU_IMPL_ULTRASPARCIIIip) { isjbus = 1; - if (cpu_impl == CPU_IMPL_SPARC64V || - cpu_impl >= CPU_IMPL_ULTRASPARCIII) + cpu_ipi_selected = jalapeno_ipi_selected; + cpu_ipi_single = jalapeno_ipi_single; + } else if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) { cpu_ipi_selected = cheetah_ipi_selected; - else + cpu_ipi_single = cheetah_ipi_single; + } else { cpu_ipi_selected = spitfire_ipi_selected; + cpu_ipi_single = spitfire_ipi_single; + } } static void @@ -179,7 +188,7 @@ foreach_ap(phandle_t node, void (*func)( phandle_t child; u_int cpuid; uint32_t cpu_impl; - + /* There's no need to traverse the whole OFW tree twice. */ if (mp_maxid > 0 && mp_ncpus >= mp_maxid + 1) return; @@ -199,7 +208,7 @@ foreach_ap(phandle_t node, void (*func)( panic("%s: couldn't determine CPU " "implementation", __func__); if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, - sizeof(cpuid)) <= 0) + sizeof(cpuid)) <= 0) panic("%s: couldn't determine CPU module ID", __func__); if (cpuid == PCPU_GET(mid)) @@ -512,24 +521,25 @@ spitfire_ipi_selected(u_int cpus, u_long { u_int cpu; - KASSERT((cpus & (1 << curcpu)) == 0, - ("%s: CPU can't IPI itself", __func__)); while (cpus) { cpu = ffs(cpus) - 1; cpus &= ~(1 << cpu); - spitfire_ipi_send(cpuid_to_mid[cpu], d0, d1, d2); + spitfire_ipi_single(cpu, d0, d1, d2); } } static void -spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2) +spitfire_ipi_single(u_int cpu, u_long d0, u_long d1, u_long d2) { register_t s; u_long ids; + u_int mid; int i; + KASSERT(cpu != curcpu, ("%s: CPU can't IPI itself", __func__)); KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & IDR_BUSY) == 0, ("%s: outstanding dispatch", __func__)); + mid = cpuid_to_mid[cpu]; for (i = 0; i < IPI_RETRIES; i++) { s = intr_disable(); stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); @@ -570,6 +580,49 @@ spitfire_ipi_send(u_int mid, u_long d0, } static void +cheetah_ipi_single(u_int cpu, u_long d0, u_long d1, u_long d2) +{ + register_t s; + u_long ids; + u_int mid; + int i; + + KASSERT(cpu != curcpu, ("%s: CPU can't IPI itself", __func__)); + KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & + IDR_CHEETAH_ALL_BUSY) == 0, + ("%s: outstanding dispatch", __func__)); + mid = cpuid_to_mid[cpu]; + for (i = 0; i < IPI_RETRIES; i++) { + s = intr_disable(); + stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); + stxa(AA_SDB_INTR_D1, ASI_SDB_INTR_W, d1); + stxa(AA_SDB_INTR_D2, ASI_SDB_INTR_W, d2); + membar(Sync); + stxa(AA_INTR_SEND | (mid << IDC_ITID_SHIFT), + ASI_SDB_INTR_W, 0); + membar(Sync); + while (((ids = ldxa(0, ASI_INTR_DISPATCH_STATUS)) & + IDR_BUSY) != 0) + ; + intr_restore(s); + if ((ids & (IDR_BUSY | IDR_NACK)) == 0) + return; + /* + * Leave interrupts enabled for a bit before retrying + * in order to avoid deadlocks if the other CPU is also + * trying to send an IPI. + */ + DELAY(2); + } + if (kdb_active != 0 || panicstr != NULL) + printf("%s: couldn't send IPI to module 0x%u\n", + __func__, mid); + else + panic("%s: couldn't send IPI to module 0x%u", + __func__, mid); +} + +static void cheetah_ipi_selected(u_int cpus, u_long d0, u_long d1, u_long d2) { register_t s; @@ -595,9 +648,8 @@ cheetah_ipi_selected(u_int cpus, u_long bnp = 0; for (cpu = 0; cpu < mp_ncpus; cpu++) { if ((cpus & (1 << cpu)) != 0) { - stxa(AA_INTR_SEND | - (cpuid_to_mid[cpu] << IDC_ITID_SHIFT) | - (isjbus ? 0 : bnp << IDC_BN_SHIFT), + stxa(AA_INTR_SEND | (cpuid_to_mid[cpu] << + IDC_ITID_SHIFT) | bnp << IDC_BN_SHIFT, ASI_SDB_INTR_W, 0); membar(Sync); bnp++; @@ -607,14 +659,13 @@ cheetah_ipi_selected(u_int cpus, u_long IDR_CHEETAH_ALL_BUSY) != 0) ; intr_restore(s); - if ((ids & (IDR_CHEETAH_ALL_BUSY | IDR_CHEETAH_ALL_NACK)) == 0) + if ((ids & + (IDR_CHEETAH_ALL_BUSY | IDR_CHEETAH_ALL_NACK)) == 0) return; bnp = 0; for (cpu = 0; cpu < mp_ncpus; cpu++) { if ((cpus & (1 << cpu)) != 0) { - if ((ids & (IDR_NACK << (isjbus ? - (2 * cpuid_to_mid[cpu]) : - (2 * bnp)))) == 0) + if ((ids & (IDR_NACK << (2 * bnp))) == 0) cpus &= ~(1 << cpu); bnp++; } @@ -640,3 +691,104 @@ cheetah_ipi_selected(u_int cpus, u_long panic("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)", __func__, cpus, ids); } + +static void +jalapeno_ipi_single(u_int cpu, u_long d0, u_long d1, u_long d2) +{ + register_t s; + u_long ids; + u_int busy, busynack, mid; + int i; + + KASSERT(cpu != curcpu, ("%s: CPU can't IPI itself", __func__)); + KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & + IDR_CHEETAH_ALL_BUSY) == 0, + ("%s: outstanding dispatch", __func__)); + mid = cpuid_to_mid[cpu]; + busy = IDR_BUSY << (2 * mid); + busynack = (IDR_BUSY | IDR_NACK) << (2 * mid); + for (i = 0; i < IPI_RETRIES; i++) { + s = intr_disable(); + stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); + stxa(AA_SDB_INTR_D1, ASI_SDB_INTR_W, d1); + stxa(AA_SDB_INTR_D2, ASI_SDB_INTR_W, d2); + membar(Sync); + stxa(AA_INTR_SEND | (mid << IDC_ITID_SHIFT), + ASI_SDB_INTR_W, 0); + membar(Sync); + while (((ids = ldxa(0, ASI_INTR_DISPATCH_STATUS)) & + busy) != 0) + ; + intr_restore(s); + if ((ids & busynack) == 0) + return; + /* + * Leave interrupts enabled for a bit before retrying + * in order to avoid deadlocks if the other CPU is also + * trying to send an IPI. + */ + DELAY(2); + } + if (kdb_active != 0 || panicstr != NULL) + printf("%s: couldn't send IPI to module 0x%u\n", + __func__, mid); + else + panic("%s: couldn't send IPI to module 0x%u", + __func__, mid); +} + +static void +jalapeno_ipi_selected(u_int cpus, u_long d0, u_long d1, u_long d2) +{ + register_t s; + u_long ids; + u_int cpu; + int i; + + KASSERT((cpus & (1 << curcpu)) == 0, + ("%s: CPU can't IPI itself", __func__)); + KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & + IDR_CHEETAH_ALL_BUSY) == 0, + ("%s: outstanding dispatch", __func__)); + if (cpus == 0) + return; + ids = 0; + for (i = 0; i < IPI_RETRIES * mp_ncpus; i++) { + s = intr_disable(); + stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); + stxa(AA_SDB_INTR_D1, ASI_SDB_INTR_W, d1); + stxa(AA_SDB_INTR_D2, ASI_SDB_INTR_W, d2); + membar(Sync); + for (cpu = 0; cpu < mp_ncpus; cpu++) { + if ((cpus & (1 << cpu)) != 0) { + stxa(AA_INTR_SEND | (cpuid_to_mid[cpu] << + IDC_ITID_SHIFT), ASI_SDB_INTR_W, 0); + membar(Sync); + } + } + while (((ids = ldxa(0, ASI_INTR_DISPATCH_STATUS)) & + IDR_CHEETAH_ALL_BUSY) != 0) + ; + intr_restore(s); + if ((ids & + (IDR_CHEETAH_ALL_BUSY | IDR_CHEETAH_ALL_NACK)) == 0) + return; + for (cpu = 0; cpu < mp_ncpus; cpu++) + if ((cpus & (1 << cpu)) != 0) + if ((ids & (IDR_NACK << + (2 * cpuid_to_mid[cpu]))) == 0) + cpus &= ~(1 << cpu); + /* + * Leave interrupts enabled for a bit before retrying + * in order to avoid deadlocks if the other CPUs are + * also trying to send IPIs. + */ + DELAY(2 * mp_ncpus); + } + if (kdb_active != 0 || panicstr != NULL) + printf("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)\n", + __func__, cpus, ids); + else + panic("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)", + __func__, cpus, ids); +} From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:28:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A76CA10656A3; Wed, 15 Sep 2010 19:28:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 954E58FC25; Wed, 15 Sep 2010 19:28:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJS6HC047915; Wed, 15 Sep 2010 19:28:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJS6pi047912; Wed, 15 Sep 2010 19:28:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009151928.o8FJS6pi047912@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 19:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212690 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:28:06 -0000 Author: marius Date: Wed Sep 15 19:28:06 2010 New Revision: 212690 URL: http://svn.freebsd.org/changeset/base/212690 Log: MFC: r211050 (partial) - Introduce a cpu_ipi_single() function pointer in order to send IPIs to single CPUs more efficiently with Cheetah(-class) and Jalapeno CPUs. - Factor out the Jalapeno support from the Cheetah IPI send functions in order to be able to more easily and efficiently implement support for more than 32 target CPUs as well as a workaround for Cheetah+ erratum 25 for the latter. Modified: stable/7/sys/sparc64/include/smp.h stable/7/sys/sparc64/sparc64/mp_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/smp.h ============================================================================== --- stable/7/sys/sparc64/include/smp.h Wed Sep 15 19:27:30 2010 (r212689) +++ stable/7/sys/sparc64/include/smp.h Wed Sep 15 19:28:06 2010 (r212690) @@ -95,6 +95,8 @@ void cpu_mp_shutdown(void); typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); extern cpu_ipi_selected_t *cpu_ipi_selected; +typedef void cpu_ipi_single_t(u_int, u_long, u_long, u_long); +extern cpu_ipi_single_t *cpu_ipi_single; void mp_init(u_int cpu_impl); @@ -229,7 +231,8 @@ ipi_tlb_range_demap(struct pmap *pm, vm_ ita->ita_pmap = pm; ita->ita_start = start; ita->ita_end = end; - cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_range_demap, (u_long)ita); + cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_range_demap, + (u_long)ita); return (&ita->ita_mask); } Modified: stable/7/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 19:27:30 2010 (r212689) +++ stable/7/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 19:28:06 2010 (r212690) @@ -29,7 +29,7 @@ */ /*- * Copyright (c) 2002 Jake Burkholder. - * Copyright (c) 2007 Marius Strobl + * Copyright (c) 2007 - 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -113,6 +113,7 @@ struct pcb stoppcbs[MAXCPU]; struct mtx ipi_mtx; cpu_ipi_selected_t *cpu_ipi_selected; +cpu_ipi_single_t *cpu_ipi_single; static vm_offset_t mp_tramp; static u_int cpuid_to_mid[MAXCPU]; @@ -124,11 +125,14 @@ static void ap_start(phandle_t node, u_i static void cpu_mp_unleash(void *v); static void foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid, u_int cpu_impl)); -static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); static cpu_ipi_selected_t cheetah_ipi_selected; +static cpu_ipi_single_t cheetah_ipi_single; +static cpu_ipi_selected_t jalapeno_ipi_selected; +static cpu_ipi_single_t jalapeno_ipi_single; static cpu_ipi_selected_t spitfire_ipi_selected; +static cpu_ipi_single_t spitfire_ipi_single; SYSINIT(cpu_mp_unleash, SI_SUB_SMP, SI_ORDER_FIRST, cpu_mp_unleash, NULL); @@ -162,13 +166,18 @@ mp_init(u_int cpu_impl) * cpu_mp_start() wasn't so initialize these here. */ if (cpu_impl == CPU_IMPL_ULTRASPARCIIIi || - cpu_impl == CPU_IMPL_ULTRASPARCIIIip) + cpu_impl == CPU_IMPL_ULTRASPARCIIIip) { isjbus = 1; - if (cpu_impl == CPU_IMPL_SPARC64V || - cpu_impl >= CPU_IMPL_ULTRASPARCIII) + cpu_ipi_selected = jalapeno_ipi_selected; + cpu_ipi_single = jalapeno_ipi_single; + } else if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) { cpu_ipi_selected = cheetah_ipi_selected; - else + cpu_ipi_single = cheetah_ipi_single; + } else { cpu_ipi_selected = spitfire_ipi_selected; + cpu_ipi_single = spitfire_ipi_single; + } } static void @@ -179,7 +188,7 @@ foreach_ap(phandle_t node, void (*func)( phandle_t child; u_int cpuid; uint32_t cpu_impl; - + /* There's no need to traverse the whole OFW tree twice. */ if (mp_maxid > 0 && mp_ncpus >= mp_maxid + 1) return; @@ -199,7 +208,7 @@ foreach_ap(phandle_t node, void (*func)( panic("%s: couldn't determine CPU " "implementation", __func__); if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, - sizeof(cpuid)) <= 0) + sizeof(cpuid)) <= 0) panic("%s: couldn't determine CPU module ID", __func__); if (cpuid == PCPU_GET(mid)) @@ -511,24 +520,25 @@ spitfire_ipi_selected(u_int cpus, u_long { u_int cpu; - KASSERT((cpus & (1 << curcpu)) == 0, - ("%s: CPU can't IPI itself", __func__)); while (cpus) { cpu = ffs(cpus) - 1; cpus &= ~(1 << cpu); - spitfire_ipi_send(cpuid_to_mid[cpu], d0, d1, d2); + spitfire_ipi_single(cpu, d0, d1, d2); } } static void -spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2) +spitfire_ipi_single(u_int cpu, u_long d0, u_long d1, u_long d2) { register_t s; u_long ids; + u_int mid; int i; + KASSERT(cpu != curcpu, ("%s: CPU can't IPI itself", __func__)); KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & IDR_BUSY) == 0, ("%s: outstanding dispatch", __func__)); + mid = cpuid_to_mid[cpu]; for (i = 0; i < IPI_RETRIES; i++) { s = intr_disable(); stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); @@ -569,6 +579,49 @@ spitfire_ipi_send(u_int mid, u_long d0, } static void +cheetah_ipi_single(u_int cpu, u_long d0, u_long d1, u_long d2) +{ + register_t s; + u_long ids; + u_int mid; + int i; + + KASSERT(cpu != curcpu, ("%s: CPU can't IPI itself", __func__)); + KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & + IDR_CHEETAH_ALL_BUSY) == 0, + ("%s: outstanding dispatch", __func__)); + mid = cpuid_to_mid[cpu]; + for (i = 0; i < IPI_RETRIES; i++) { + s = intr_disable(); + stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); + stxa(AA_SDB_INTR_D1, ASI_SDB_INTR_W, d1); + stxa(AA_SDB_INTR_D2, ASI_SDB_INTR_W, d2); + membar(Sync); + stxa(AA_INTR_SEND | (mid << IDC_ITID_SHIFT), + ASI_SDB_INTR_W, 0); + membar(Sync); + while (((ids = ldxa(0, ASI_INTR_DISPATCH_STATUS)) & + IDR_BUSY) != 0) + ; + intr_restore(s); + if ((ids & (IDR_BUSY | IDR_NACK)) == 0) + return; + /* + * Leave interrupts enabled for a bit before retrying + * in order to avoid deadlocks if the other CPU is also + * trying to send an IPI. + */ + DELAY(2); + } + if (kdb_active != 0 || panicstr != NULL) + printf("%s: couldn't send IPI to module 0x%u\n", + __func__, mid); + else + panic("%s: couldn't send IPI to module 0x%u", + __func__, mid); +} + +static void cheetah_ipi_selected(u_int cpus, u_long d0, u_long d1, u_long d2) { register_t s; @@ -594,9 +647,8 @@ cheetah_ipi_selected(u_int cpus, u_long bnp = 0; for (cpu = 0; cpu < mp_ncpus; cpu++) { if ((cpus & (1 << cpu)) != 0) { - stxa(AA_INTR_SEND | - (cpuid_to_mid[cpu] << IDC_ITID_SHIFT) | - (isjbus ? 0 : bnp << IDC_BN_SHIFT), + stxa(AA_INTR_SEND | (cpuid_to_mid[cpu] << + IDC_ITID_SHIFT) | bnp << IDC_BN_SHIFT, ASI_SDB_INTR_W, 0); membar(Sync); bnp++; @@ -606,14 +658,13 @@ cheetah_ipi_selected(u_int cpus, u_long IDR_CHEETAH_ALL_BUSY) != 0) ; intr_restore(s); - if ((ids & (IDR_CHEETAH_ALL_BUSY | IDR_CHEETAH_ALL_NACK)) == 0) + if ((ids & + (IDR_CHEETAH_ALL_BUSY | IDR_CHEETAH_ALL_NACK)) == 0) return; bnp = 0; for (cpu = 0; cpu < mp_ncpus; cpu++) { if ((cpus & (1 << cpu)) != 0) { - if ((ids & (IDR_NACK << (isjbus ? - (2 * cpuid_to_mid[cpu]) : - (2 * bnp)))) == 0) + if ((ids & (IDR_NACK << (2 * bnp))) == 0) cpus &= ~(1 << cpu); bnp++; } @@ -639,3 +690,104 @@ cheetah_ipi_selected(u_int cpus, u_long panic("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)", __func__, cpus, ids); } + +static void +jalapeno_ipi_single(u_int cpu, u_long d0, u_long d1, u_long d2) +{ + register_t s; + u_long ids; + u_int busy, busynack, mid; + int i; + + KASSERT(cpu != curcpu, ("%s: CPU can't IPI itself", __func__)); + KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & + IDR_CHEETAH_ALL_BUSY) == 0, + ("%s: outstanding dispatch", __func__)); + mid = cpuid_to_mid[cpu]; + busy = IDR_BUSY << (2 * mid); + busynack = (IDR_BUSY | IDR_NACK) << (2 * mid); + for (i = 0; i < IPI_RETRIES; i++) { + s = intr_disable(); + stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); + stxa(AA_SDB_INTR_D1, ASI_SDB_INTR_W, d1); + stxa(AA_SDB_INTR_D2, ASI_SDB_INTR_W, d2); + membar(Sync); + stxa(AA_INTR_SEND | (mid << IDC_ITID_SHIFT), + ASI_SDB_INTR_W, 0); + membar(Sync); + while (((ids = ldxa(0, ASI_INTR_DISPATCH_STATUS)) & + busy) != 0) + ; + intr_restore(s); + if ((ids & busynack) == 0) + return; + /* + * Leave interrupts enabled for a bit before retrying + * in order to avoid deadlocks if the other CPU is also + * trying to send an IPI. + */ + DELAY(2); + } + if (kdb_active != 0 || panicstr != NULL) + printf("%s: couldn't send IPI to module 0x%u\n", + __func__, mid); + else + panic("%s: couldn't send IPI to module 0x%u", + __func__, mid); +} + +static void +jalapeno_ipi_selected(u_int cpus, u_long d0, u_long d1, u_long d2) +{ + register_t s; + u_long ids; + u_int cpu; + int i; + + KASSERT((cpus & (1 << curcpu)) == 0, + ("%s: CPU can't IPI itself", __func__)); + KASSERT((ldxa(0, ASI_INTR_DISPATCH_STATUS) & + IDR_CHEETAH_ALL_BUSY) == 0, + ("%s: outstanding dispatch", __func__)); + if (cpus == 0) + return; + ids = 0; + for (i = 0; i < IPI_RETRIES * mp_ncpus; i++) { + s = intr_disable(); + stxa(AA_SDB_INTR_D0, ASI_SDB_INTR_W, d0); + stxa(AA_SDB_INTR_D1, ASI_SDB_INTR_W, d1); + stxa(AA_SDB_INTR_D2, ASI_SDB_INTR_W, d2); + membar(Sync); + for (cpu = 0; cpu < mp_ncpus; cpu++) { + if ((cpus & (1 << cpu)) != 0) { + stxa(AA_INTR_SEND | (cpuid_to_mid[cpu] << + IDC_ITID_SHIFT), ASI_SDB_INTR_W, 0); + membar(Sync); + } + } + while (((ids = ldxa(0, ASI_INTR_DISPATCH_STATUS)) & + IDR_CHEETAH_ALL_BUSY) != 0) + ; + intr_restore(s); + if ((ids & + (IDR_CHEETAH_ALL_BUSY | IDR_CHEETAH_ALL_NACK)) == 0) + return; + for (cpu = 0; cpu < mp_ncpus; cpu++) + if ((cpus & (1 << cpu)) != 0) + if ((ids & (IDR_NACK << + (2 * cpuid_to_mid[cpu]))) == 0) + cpus &= ~(1 << cpu); + /* + * Leave interrupts enabled for a bit before retrying + * in order to avoid deadlocks if the other CPUs are + * also trying to send IPIs. + */ + DELAY(2 * mp_ncpus); + } + if (kdb_active != 0 || panicstr != NULL) + printf("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)\n", + __func__, cpus, ids); + else + panic("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)", + __func__, cpus, ids); +} From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:34:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90B44106566C; Wed, 15 Sep 2010 19:34:18 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F99F8FC14; Wed, 15 Sep 2010 19:34:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJYIvK048189; Wed, 15 Sep 2010 19:34:18 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJYIwI048187; Wed, 15 Sep 2010 19:34:18 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201009151934.o8FJYIwI048187@svn.freebsd.org> From: Maksim Yevmenkin Date: Wed, 15 Sep 2010 19:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212691 - stable/8/usr.sbin/bluetooth/bthidd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:34:18 -0000 Author: emax Date: Wed Sep 15 19:34:18 2010 New Revision: 212691 URL: http://svn.freebsd.org/changeset/base/212691 Log: MFC r212335 Make sure to only pickup hid_input items when parsing input reports. As it turns out, libusbhid(3) also picks up hic_collection items even though we explicitly requested hid_input items only. Tested by: Buganini < buganini at gmail dot com > Modified: stable/8/usr.sbin/bluetooth/bthidd/hid.c Directory Properties: stable/8/usr.sbin/bluetooth/bthidd/ (props changed) Modified: stable/8/usr.sbin/bluetooth/bthidd/hid.c ============================================================================== --- stable/8/usr.sbin/bluetooth/bthidd/hid.c Wed Sep 15 19:28:06 2010 (r212690) +++ stable/8/usr.sbin/bluetooth/bthidd/hid.c Wed Sep 15 19:34:18 2010 (r212691) @@ -160,7 +160,8 @@ hid_interrupt(bthid_session_p s, uint8_t for (d = hid_start_parse(hid_device->desc, 1 << hid_input, -1); hid_get_item(d, &h) > 0; ) { - if ((h.flags & HIO_CONST) || (h.report_ID != report_id)) + if ((h.flags & HIO_CONST) || (h.report_ID != report_id) || + (h.kind != hid_input)) continue; page = HID_PAGE(h.usage); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:35:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16A7C1065679; Wed, 15 Sep 2010 19:35:31 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BC41D8FC0C; Wed, 15 Sep 2010 19:35:29 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA15518; Wed, 15 Sep 2010 22:35:28 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OvxlP-00015A-VW; Wed, 15 Sep 2010 22:35:27 +0300 Message-ID: <4C911FFD.7090109@freebsd.org> Date: Wed, 15 Sep 2010 22:35:25 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100912 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: John Baldwin References: <201009151002.o8FA2kvO029237@svn.freebsd.org> <4C90F4B9.3060400@freebsd.org> <4C90F780.8080402@freebsd.org> <201009151437.22412.jhb@freebsd.org> In-Reply-To: <201009151437.22412.jhb@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212647 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:35:31 -0000 on 15/09/2010 21:37 John Baldwin said the following: > Hmm, you could use SET_START() and SET_LIMIT() at least, but it's not a big > deal either way. The comment seemed to imply that it would have used > SET_DECLARE() if there had not been technical difficulties. Well, the comment was nonsense, saying what it said, if we consider to what SET_DECLARE() expands today. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:40:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40859106566C; Wed, 15 Sep 2010 19:40:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3088D8FC1B; Wed, 15 Sep 2010 19:40:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJe9vF048407; Wed, 15 Sep 2010 19:40:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJe97W048405; Wed, 15 Sep 2010 19:40:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009151940.o8FJe97W048405@svn.freebsd.org> From: Warner Losh Date: Wed, 15 Sep 2010 19:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212692 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:40:09 -0000 Author: imp Date: Wed Sep 15 19:40:08 2010 New Revision: 212692 URL: http://svn.freebsd.org/changeset/base/212692 Log: Don't suggest using bwn for the bcm4306 cards in the list. The bcm4306 cards are ambiguous. BCM4306 rev 2 requires bwi. BCM4306 rev 3 will work with either. Since we can't easily determine which is which, just remove them. Modified: head/share/man/man4/bwn.4 Modified: head/share/man/man4/bwn.4 ============================================================================== --- head/share/man/man4/bwn.4 Wed Sep 15 19:34:18 2010 (r212691) +++ head/share/man/man4/bwn.4 Wed Sep 15 19:40:08 2010 (r212692) @@ -78,18 +78,14 @@ driver supports Broadcom BCM43xx based w .Pp .Bl -column -compact "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n .It Em "Card Chip Bus Standard" -.It "Apple Airport Extreme BCM4306 PCI b/g" .It "Apple Airport Extreme BCM4318 PCI b/g" .It "ASUS WL-138g BCM4318 PCI b/g" .It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" -.It "Buffalo WLI-PCI-G54S BCM4306 PCI b/g" -.It "Compaq R4035 onboard BCM4306 PCI b/g" .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" .It "HP nx6125 BCM4319 PCI b/g" .It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g" .It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g" -.It "TRENDnet TEW-401PCplus BCM4306 CardBus b/g" .It "US Robotics 5411 BCM4318 CardBus b/g" .El .Pp From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:40:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D725F10656C1; Wed, 15 Sep 2010 19:40:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C74628FC19; Wed, 15 Sep 2010 19:40:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJegaA048454; Wed, 15 Sep 2010 19:40:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJegSn048452; Wed, 15 Sep 2010 19:40:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009151940.o8FJegSn048452@svn.freebsd.org> From: Warner Losh Date: Wed, 15 Sep 2010 19:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212693 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:40:42 -0000 Author: imp Date: Wed Sep 15 19:40:42 2010 New Revision: 212693 URL: http://svn.freebsd.org/changeset/base/212693 Log: Add note abotu bwn and newer chipsets Modified: head/share/man/man4/bwi.4 Modified: head/share/man/man4/bwi.4 ============================================================================== --- head/share/man/man4/bwi.4 Wed Sep 15 19:40:08 2010 (r212692) +++ head/share/man/man4/bwi.4 Wed Sep 15 19:40:42 2010 (r212693) @@ -90,6 +90,20 @@ driver supports Broadcom BCM43xx based w .It "TRENDnet TEW-401PCplus BCM4306 CardBus b/g" .It "US Robotics 5411 BCM4318 CardBus b/g" .El +.Pp +The +.Nm +driver uses the older v3 version of Broadcom's firmware. +While this older firmware does support most BCM43xx parts, the +.Xr bwn 4 +driver works better for the newer chips it supports. +You must use the +.Nm +driver if you are using older Broadcom chipsets (BCM4301, BCM4303 and +BCM4306 rev 2). +The v4 version of the firmware that +.Xr bwn 4 +uses does not support these chips. .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 19:55:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E00A106566C; Wed, 15 Sep 2010 19:55:27 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFA6F8FC21; Wed, 15 Sep 2010 19:55:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FJtQK8048793; Wed, 15 Sep 2010 19:55:26 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FJtQI8048787; Wed, 15 Sep 2010 19:55:26 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009151955.o8FJtQI8048787@svn.freebsd.org> From: Martin Matuska Date: Wed, 15 Sep 2010 19:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212694 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 19:55:27 -0000 Author: mm Date: Wed Sep 15 19:55:26 2010 New Revision: 212694 URL: http://svn.freebsd.org/changeset/base/212694 Log: Fix kernel panic when moving a file to .zfs/shares Fix possible loss of correct error return code in ZFS mount OpenSolaris revisions and Bug IDs: 11824:53128e5db7cf 6863610 ZFS mount can lose correct error return 12079:13822b941977 6939941 problem with moving files in zfs (142901-12) Approved by: delphij (mentor) Obtained from: OpenSolaris (Bug ID 6863610, 6939941) MFC after: 3 days Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/vnode.h Wed Sep 15 19:40:42 2010 (r212693) +++ head/sys/cddl/compat/opensolaris/sys/vnode.h Wed Sep 15 19:55:26 2010 (r212694) @@ -76,6 +76,7 @@ vn_is_readonly(vnode_t *vp) #define vn_invalid(vp) do { } while (0) #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0) #define vn_free(vp) do { } while (0) +#define vn_matchops(vp, vops) ((vp)->v_op == &(vops)) #define VN_HOLD(v) vref(v) #define VN_RELE(v) vrele(v) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Wed Sep 15 19:40:42 2010 (r212693) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Wed Sep 15 19:55:26 2010 (r212694) @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _ZFS_CTLDIR_H @@ -48,6 +47,7 @@ void zfsctl_destroy(zfsvfs_t *); vnode_t *zfsctl_root(znode_t *); void zfsctl_init(void); void zfsctl_fini(void); +boolean_t zfsctl_is_node(vnode_t *); int zfsctl_rename_snapshot(const char *from, const char *to); int zfsctl_destroy_snapshot(const char *snapname, int force); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Sep 15 19:40:42 2010 (r212693) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Wed Sep 15 19:55:26 2010 (r212694) @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -152,6 +151,17 @@ zfsctl_fini(void) { } +boolean_t +zfsctl_is_node(vnode_t *vp) +{ + return (vn_matchops(vp, zfsctl_ops_root) || + vn_matchops(vp, zfsctl_ops_snapdir) || + vn_matchops(vp, zfsctl_ops_snapshot) || + vn_matchops(vp, zfsctl_ops_shares) || + vn_matchops(vp, zfsctl_ops_shares_dir)); + +} + /* * Return the inode number associated with the 'snapshot' or * 'shares' directory. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 15 19:40:42 2010 (r212693) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 15 19:55:26 2010 (r212694) @@ -1163,8 +1163,7 @@ zfs_mount(vfs_t *vfsp) */ error = secpolicy_fs_mount(cr, mvp, vfsp); if (error) { - error = dsl_deleg_access(osname, ZFS_DELEG_PERM_MOUNT, cr); - if (error != 0) + if (dsl_deleg_access(osname, ZFS_DELEG_PERM_MOUNT, cr) != 0) goto out; if (!(vfsp->vfs_flag & MS_REMOUNT)) { @@ -1178,7 +1177,7 @@ zfs_mount(vfs_t *vfsp) vattr.va_mask = AT_UID; vn_lock(mvp, LK_SHARED | LK_RETRY); - if (error = VOP_GETATTR(mvp, &vattr, cr)) { + if (VOP_GETATTR(mvp, &vattr, cr)) { VOP_UNLOCK(mvp, 0); goto out; } @@ -1433,9 +1432,8 @@ zfs_umount(vfs_t *vfsp, int fflag) ret = secpolicy_fs_unmount(cr, vfsp); if (ret) { - ret = dsl_deleg_access((char *)refstr_value(vfsp->vfs_resource), - ZFS_DELEG_PERM_MOUNT, cr); - if (ret) + if (dsl_deleg_access((char *)refstr_value(vfsp->vfs_resource), + ZFS_DELEG_PERM_MOUNT, cr)) return (ret); } /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 19:40:42 2010 (r212693) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 15 19:55:26 2010 (r212694) @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Portions Copyright 2007 Jeremy Teo */ @@ -3357,7 +3356,7 @@ zfs_rename(vnode_t *sdvp, char *snm, vno if (VOP_REALVP(tdvp, &realvp, ct) == 0) tdvp = realvp; - if (tdvp->v_vfsp != sdvp->v_vfsp) { + if (tdvp->v_vfsp != sdvp->v_vfsp || zfsctl_is_node(tdvp)) { ZFS_EXIT(zfsvfs); return (EXDEV); } @@ -3875,6 +3874,7 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch vnode_t *realvp; int error; int zf = ZNEW; + uint64_t parent; uid_t owner; ASSERT(tdvp->v_type == VDIR); @@ -3886,13 +3886,30 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch if (VOP_REALVP(svp, &realvp, ct) == 0) svp = realvp; - if (svp->v_vfsp != tdvp->v_vfsp) { + /* + * POSIX dictates that we return EPERM here. + * Better choices include ENOTSUP or EISDIR. + */ + if (svp->v_type == VDIR) { + ZFS_EXIT(zfsvfs); + return (EPERM); + } + + if (svp->v_vfsp != tdvp->v_vfsp || zfsctl_is_node(svp)) { ZFS_EXIT(zfsvfs); return (EXDEV); } + szp = VTOZ(svp); ZFS_VERIFY_ZP(szp); + /* Prevent links to .zfs/shares files */ + + if (szp->z_phys->zp_parent == zfsvfs->z_shares_dir) { + ZFS_EXIT(zfsvfs); + return (EPERM); + } + if (zfsvfs->z_utf8 && u8_validate(name, strlen(name), NULL, U8_VALIDATE_ENTIRE, &error) < 0) { ZFS_EXIT(zfsvfs); @@ -3901,7 +3918,6 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch if (flags & FIGNORECASE) zf |= ZCILOOK; -top: /* * We do not support links between attributes and non-attributes * because of the potential security risk of creating links @@ -3914,14 +3930,6 @@ top: return (EINVAL); } - /* - * POSIX dictates that we return EPERM here. - * Better choices include ENOTSUP or EISDIR. - */ - if (svp->v_type == VDIR) { - ZFS_EXIT(zfsvfs); - return (EPERM); - } owner = zfs_fuid_map_id(zfsvfs, szp->z_phys->zp_uid, cr, ZFS_OWNER); if (owner != crgetuid(cr) && @@ -3935,6 +3943,7 @@ top: return (error); } +top: /* * Attempt to lock directory; fail if entry already exists. */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:17:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97ECA106566C; Wed, 15 Sep 2010 20:17:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8546E8FC12; Wed, 15 Sep 2010 20:17:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKHILJ049398; Wed, 15 Sep 2010 20:17:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKHI6l049392; Wed, 15 Sep 2010 20:17:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009152017.o8FKHI6l049392@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 20:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212695 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:17:18 -0000 Author: marius Date: Wed Sep 15 20:17:18 2010 New Revision: 212695 URL: http://svn.freebsd.org/changeset/base/212695 Log: MFC: r210601 (partial), r211071, r211073 - As it is not possible for sched_bind(9) to context switch with td_critnest > 1 when not already running on the desired CPU read the TICK counter of the BSP via a direct cross trap request in that case instead. - Provide a STICK based timecounter. Modified: stable/8/sys/sparc64/include/smp.h stable/8/sys/sparc64/sparc64/genassym.c stable/8/sys/sparc64/sparc64/mp_exception.S stable/8/sys/sparc64/sparc64/mp_machdep.c stable/8/sys/sparc64/sparc64/tick.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/smp.h ============================================================================== --- stable/8/sys/sparc64/include/smp.h Wed Sep 15 19:55:26 2010 (r212694) +++ stable/8/sys/sparc64/include/smp.h Wed Sep 15 20:17:18 2010 (r212695) @@ -79,6 +79,11 @@ struct ipi_cache_args { vm_paddr_t ica_pa; }; +struct ipi_rd_args { + u_int ira_mask; + register_t *ira_val; +}; + struct ipi_tlb_args { u_int ita_mask; struct pmap *ita_pmap; @@ -103,6 +108,7 @@ void mp_init(u_int cpu_impl); extern struct mtx ipi_mtx; extern struct ipi_cache_args ipi_cache_args; +extern struct ipi_rd_args ipi_rd_args; extern struct ipi_tlb_args ipi_tlb_args; extern char *mp_tramp_code; @@ -117,6 +123,10 @@ extern char tl_ipi_spitfire_dcache_page_ extern char tl_ipi_spitfire_icache_page_inval[]; extern char tl_ipi_level[]; + +extern char tl_ipi_stick_rd[]; +extern char tl_ipi_tick_rd[]; + extern char tl_ipi_tlb_context_demap[]; extern char tl_ipi_tlb_page_demap[]; extern char tl_ipi_tlb_range_demap[]; @@ -170,6 +180,22 @@ ipi_icache_page_inval(void *func, vm_pad } static __inline void * +ipi_rd(u_int cpu, void *func, u_long *val) +{ + struct ipi_rd_args *ira; + + if (smp_cpus == 1) + return (NULL); + sched_pin(); + ira = &ipi_rd_args; + mtx_lock_spin(&ipi_mtx); + ira->ira_mask = 1 << cpu | PCPU_GET(cpumask); + ira->ira_val = val; + cpu_ipi_single(cpu, 0, (u_long)func, (u_long)ira); + return (&ira->ira_mask); +} + +static __inline void * ipi_tlb_context_demap(struct pmap *pm) { struct ipi_tlb_args *ita; @@ -274,6 +300,13 @@ ipi_icache_page_inval(void *func __unuse } static __inline void * +ipi_rd(u_int cpu __unused, void *func __unused, u_long *val __unused) +{ + + return (NULL); +} + +static __inline void * ipi_tlb_context_demap(struct pmap *pm __unused) { Modified: stable/8/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/8/sys/sparc64/sparc64/genassym.c Wed Sep 15 19:55:26 2010 (r212694) +++ stable/8/sys/sparc64/sparc64/genassym.c Wed Sep 15 20:17:18 2010 (r212695) @@ -105,10 +105,6 @@ ASSYM(IC_SIZE, offsetof(struct cacheinfo ASSYM(IC_LINESIZE, offsetof(struct cacheinfo, ic_linesize)); #endif -#ifdef SMP -ASSYM(ICA_PA, offsetof(struct ipi_cache_args, ica_pa)); -#endif - ASSYM(KTR_SIZEOF, sizeof(struct ktr_entry)); ASSYM(KTR_LINE, offsetof(struct ktr_entry, ktr_line)); ASSYM(KTR_FILE, offsetof(struct ktr_entry, ktr_file)); @@ -215,7 +211,12 @@ ASSYM(IR_ARG, offsetof(struct intr_reque ASSYM(IR_PRI, offsetof(struct intr_request, ir_pri)); ASSYM(IR_VEC, offsetof(struct intr_request, ir_vec)); -#ifdef SMP +#if defined(SUN4U) && defined(SMP) +ASSYM(ICA_PA, offsetof(struct ipi_cache_args, ica_pa)); + +ASSYM(IRA_MASK, offsetof(struct ipi_rd_args, ira_mask)); +ASSYM(IRA_VAL, offsetof(struct ipi_rd_args, ira_val)); + ASSYM(ITA_MASK, offsetof(struct ipi_tlb_args, ita_mask)); ASSYM(ITA_PMAP, offsetof(struct ipi_tlb_args, ita_pmap)); ASSYM(ITA_START, offsetof(struct ipi_tlb_args, ita_start)); Modified: stable/8/sys/sparc64/sparc64/mp_exception.S ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_exception.S Wed Sep 15 19:55:26 2010 (r212694) +++ stable/8/sys/sparc64/sparc64/mp_exception.S Wed Sep 15 20:17:18 2010 (r212695) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(tl_ipi_spitfire_dcache_page_inval) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_dcache_page_inval: pa=%#lx" + CATR(KTR_SMP, "tl_ipi_spitfire_dcache_page_inval: pa=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ICA_PA], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -87,7 +87,7 @@ END(tl_ipi_spitfire_dcache_page_inval) */ ENTRY(tl_ipi_spitfire_icache_page_inval) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_icache_page_inval: pa=%#lx" + CATR(KTR_SMP, "tl_ipi_spitfire_icache_page_inval: pa=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ICA_PA], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -126,7 +126,7 @@ END(tl_ipi_spitfire_icache_page_inval) */ ENTRY(tl_ipi_cheetah_dcache_page_inval) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_dcache_page_inval: pa=%#lx" + CATR(KTR_SMP, "tl_ipi_cheetah_dcache_page_inval: pa=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ICA_PA], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -256,7 +256,7 @@ END(tl_ipi_tlb_range_demap) */ ENTRY(tl_ipi_tlb_context_demap) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_tlb_page_demap: pm=%p va=%#lx" + CATR(KTR_SMP, "tl_ipi_tlb_context_demap: pm=%p va=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ITA_PMAP], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -274,3 +274,27 @@ ENTRY(tl_ipi_tlb_context_demap) IPI_DONE(%g5, %g1, %g2, %g3) retry END(tl_ipi_tlb_context_demap) + +/* + * Read %stick. + */ +ENTRY(tl_ipi_stick_rd) + ldx [%g5 + IRA_VAL], %g1 + rd %asr24, %g2 + stx %g2, [%g1] + + IPI_DONE(%g5, %g1, %g2, %g3) + retry +END(tl_ipi_stick_rd) + +/* + * Read %tick. + */ +ENTRY(tl_ipi_tick_rd) + ldx [%g5 + IRA_VAL], %g1 + rd %tick, %g2 + stx %g2, [%g1] + + IPI_DONE(%g5, %g1, %g2, %g3) + retry +END(tl_ipi_tick_rd) Modified: stable/8/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 19:55:26 2010 (r212694) +++ stable/8/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 20:17:18 2010 (r212695) @@ -107,6 +107,7 @@ static ih_func_t cpu_ipi_stop; */ struct cpu_start_args cpu_start_args = { 0, -1, -1, 0, 0, 0 }; struct ipi_cache_args ipi_cache_args; +struct ipi_rd_args ipi_rd_args; struct ipi_tlb_args ipi_tlb_args; struct pcb stoppcbs[MAXCPU]; Modified: stable/8/sys/sparc64/sparc64/tick.c ============================================================================== --- stable/8/sys/sparc64/sparc64/tick.c Wed Sep 15 19:55:26 2010 (r212694) +++ stable/8/sys/sparc64/sparc64/tick.c Wed Sep 15 20:17:18 2010 (r212695) @@ -42,9 +42,13 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include #include +#include #include #include @@ -76,10 +80,15 @@ u_int hardclock_use_stick = 0; SYSCTL_INT(_machdep_tick, OID_AUTO, hardclock_use_stick, CTLFLAG_RD, &hardclock_use_stick, 0, "hardclock uses STICK instead of TICK timer"); +static struct timecounter stick_tc; static struct timecounter tick_tc; static u_long tick_increment; static uint64_t tick_cputicks(void); +static timecounter_get_t stick_get_timecount_up; +#ifdef SMP +static timecounter_get_t stick_get_timecount_mp; +#endif static timecounter_get_t tick_get_timecount_up; #ifdef SMP static timecounter_get_t tick_get_timecount_mp; @@ -101,25 +110,31 @@ tick_cputicks(void) void cpu_initclocks(void) { - uint32_t clock; + uint32_t clock, sclock; stathz = hz; + clock = PCPU_GET(clock); + sclock = 0; + if (PCPU_GET(impl) == CPU_IMPL_SPARC64V || + PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCIII) { + if (OF_getprop(OF_parent(PCPU_GET(node)), "stick-frequency", + &sclock, sizeof(sclock)) == -1) { + panic("%s: could not determine STICK frequency", + __func__); + } + } /* * Given that the STICK timers typically are driven at rather low * frequencies they shouldn't be used except when really necessary. */ if (hardclock_use_stick != 0) { - if (OF_getprop(OF_parent(PCPU_GET(node)), "stick-frequency", - &clock, sizeof(clock)) == -1) - panic("%s: could not determine STICK frequency", __func__); intr_setup(PIL_TICK, stick_hardclock, -1, NULL, NULL); /* * We don't provide a CPU ticker as long as the frequency * supplied isn't actually used per-CPU. */ } else { - clock = PCPU_GET(clock); intr_setup(PIL_TICK, PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCI && PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? tick_hardclock_bbwar : tick_hardclock, -1, NULL, NULL); @@ -136,31 +151,45 @@ cpu_initclocks(void) tick_start(); /* - * Initialize the TICK-based timecounter. This must not happen - * before SI_SUB_INTRINSIC for tick_get_timecount_mp() to work. + * Initialize the (S)TICK-based timecounter(s). + * Note that we (try to) sync the (S)TICK timers of APs with the BSP + * during their startup but not afterwards. The resulting drift can + * cause problems when the time is calculated based on (S)TICK values + * read on different CPUs. Thus we always read the register on the + * BSP (if necessary via an IPI as sched_bind(9) isn't available in + * all circumstances) and use a low quality for the otherwise high + * quality (S)TICK timers in the MP case. */ tick_tc.tc_get_timecount = tick_get_timecount_up; tick_tc.tc_poll_pps = NULL; tick_tc.tc_counter_mask = ~0u; - tick_tc.tc_frequency = PCPU_GET(clock); + tick_tc.tc_frequency = clock; tick_tc.tc_name = "tick"; tick_tc.tc_quality = TICK_QUALITY_UP; tick_tc.tc_priv = NULL; #ifdef SMP - /* - * We (try to) sync the (S)TICK timers of APs with the BSP during - * their startup but not afterwards. The resulting drift can - * cause problems when the time is calculated based on (S)TICK - * values read on different CPUs. Thus we bind to the BSP for - * reading the register and use a low quality for the otherwise - * high quality (S)TICK timers in the MP case. - */ if (cpu_mp_probe()) { tick_tc.tc_get_timecount = tick_get_timecount_mp; tick_tc.tc_quality = TICK_QUALITY_MP; } #endif tc_init(&tick_tc); + if (sclock != 0) { + stick_tc.tc_get_timecount = stick_get_timecount_up; + stick_tc.tc_poll_pps = NULL; + stick_tc.tc_counter_mask = ~0u; + stick_tc.tc_frequency = sclock; + stick_tc.tc_name = "stick"; + stick_tc.tc_quality = TICK_QUALITY_UP; + stick_tc.tc_priv = NULL; +#ifdef SMP + if (cpu_mp_probe()) { + stick_tc.tc_get_timecount = stick_get_timecount_mp; + stick_tc.tc_quality = TICK_QUALITY_MP; + } +#endif + tc_init(&stick_tc); + } } static inline void @@ -266,6 +295,13 @@ tick_hardclock_common(struct trapframe * } static u_int +stick_get_timecount_up(struct timecounter *tc) +{ + + return ((u_int)rdstick()); +} + +static u_int tick_get_timecount_up(struct timecounter *tc) { @@ -274,22 +310,30 @@ tick_get_timecount_up(struct timecounter #ifdef SMP static u_int -tick_get_timecount_mp(struct timecounter *tc) +stick_get_timecount_mp(struct timecounter *tc) { - struct thread *td; - u_int tick; + u_long stick; - td = curthread; - thread_lock(td); - sched_bind(td, 0); - thread_unlock(td); - - tick = tick_get_timecount_up(tc); - - thread_lock(td); - sched_unbind(td); - thread_unlock(td); + sched_pin(); + if (curcpu == 0) + stick = rdstick(); + else + ipi_wait(ipi_rd(0, tl_ipi_stick_rd, &stick)); + sched_unpin(); + return (stick); +} +static u_int +tick_get_timecount_mp(struct timecounter *tc) +{ + u_long tick; + + sched_pin(); + if (curcpu == 0) + tick = rd(tick); + else + ipi_wait(ipi_rd(0, tl_ipi_tick_rd, &tick)); + sched_unpin(); return (tick); } #endif From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:17:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E38D1065755; Wed, 15 Sep 2010 20:17:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5C3A8FC15; Wed, 15 Sep 2010 20:17:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKHKNY049434; Wed, 15 Sep 2010 20:17:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKHKqn049427; Wed, 15 Sep 2010 20:17:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009152017.o8FKHKqn049427@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 20:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212696 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:17:22 -0000 Author: marius Date: Wed Sep 15 20:17:20 2010 New Revision: 212696 URL: http://svn.freebsd.org/changeset/base/212696 Log: MFC: r210601 (partial), r211071, r211073 - As it is not possible for sched_bind(9) to context switch with td_critnest > 1 when not already running on the desired CPU read the TICK counter of the BSP via a direct cross trap request in that case instead. - Provide a STICK based timecounter. Modified: stable/7/sys/sparc64/include/smp.h stable/7/sys/sparc64/sparc64/genassym.c stable/7/sys/sparc64/sparc64/mp_exception.S stable/7/sys/sparc64/sparc64/mp_machdep.c stable/7/sys/sparc64/sparc64/tick.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/smp.h ============================================================================== --- stable/7/sys/sparc64/include/smp.h Wed Sep 15 20:17:18 2010 (r212695) +++ stable/7/sys/sparc64/include/smp.h Wed Sep 15 20:17:20 2010 (r212696) @@ -78,6 +78,11 @@ struct ipi_cache_args { vm_paddr_t ica_pa; }; +struct ipi_rd_args { + u_int ira_mask; + register_t *ira_val; +}; + struct ipi_tlb_args { u_int ita_mask; struct pmap *ita_pmap; @@ -102,6 +107,7 @@ void mp_init(u_int cpu_impl); extern struct mtx ipi_mtx; extern struct ipi_cache_args ipi_cache_args; +extern struct ipi_rd_args ipi_rd_args; extern struct ipi_tlb_args ipi_tlb_args; extern char *mp_tramp_code; @@ -116,6 +122,10 @@ extern char tl_ipi_spitfire_dcache_page_ extern char tl_ipi_spitfire_icache_page_inval[]; extern char tl_ipi_level[]; + +extern char tl_ipi_stick_rd[]; +extern char tl_ipi_tick_rd[]; + extern char tl_ipi_tlb_context_demap[]; extern char tl_ipi_tlb_page_demap[]; extern char tl_ipi_tlb_range_demap[]; @@ -169,6 +179,22 @@ ipi_icache_page_inval(void *func, vm_pad } static __inline void * +ipi_rd(u_int cpu, void *func, u_long *val) +{ + struct ipi_rd_args *ira; + + if (smp_cpus == 1) + return (NULL); + sched_pin(); + ira = &ipi_rd_args; + mtx_lock_spin(&ipi_mtx); + ira->ira_mask = 1 << cpu | PCPU_GET(cpumask); + ira->ira_val = val; + cpu_ipi_single(cpu, 0, (u_long)func, (u_long)ira); + return (&ira->ira_mask); +} + +static __inline void * ipi_tlb_context_demap(struct pmap *pm) { struct ipi_tlb_args *ita; @@ -273,6 +299,13 @@ ipi_icache_page_inval(void *func __unuse } static __inline void * +ipi_rd(u_int cpu __unused, void *func __unused, u_long *val __unused) +{ + + return (NULL); +} + +static __inline void * ipi_tlb_context_demap(struct pmap *pm __unused) { Modified: stable/7/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/7/sys/sparc64/sparc64/genassym.c Wed Sep 15 20:17:18 2010 (r212695) +++ stable/7/sys/sparc64/sparc64/genassym.c Wed Sep 15 20:17:20 2010 (r212696) @@ -105,10 +105,6 @@ ASSYM(IC_SIZE, offsetof(struct cacheinfo ASSYM(IC_LINESIZE, offsetof(struct cacheinfo, ic_linesize)); #endif -#ifdef SMP -ASSYM(ICA_PA, offsetof(struct ipi_cache_args, ica_pa)); -#endif - ASSYM(KTR_SIZEOF, sizeof(struct ktr_entry)); ASSYM(KTR_LINE, offsetof(struct ktr_entry, ktr_line)); ASSYM(KTR_FILE, offsetof(struct ktr_entry, ktr_file)); @@ -215,7 +211,12 @@ ASSYM(IR_ARG, offsetof(struct intr_reque ASSYM(IR_PRI, offsetof(struct intr_request, ir_pri)); ASSYM(IR_VEC, offsetof(struct intr_request, ir_vec)); -#ifdef SMP +#if defined(SUN4U) && defined(SMP) +ASSYM(ICA_PA, offsetof(struct ipi_cache_args, ica_pa)); + +ASSYM(IRA_MASK, offsetof(struct ipi_rd_args, ira_mask)); +ASSYM(IRA_VAL, offsetof(struct ipi_rd_args, ira_val)); + ASSYM(ITA_MASK, offsetof(struct ipi_tlb_args, ita_mask)); ASSYM(ITA_PMAP, offsetof(struct ipi_tlb_args, ita_pmap)); ASSYM(ITA_START, offsetof(struct ipi_tlb_args, ita_start)); Modified: stable/7/sys/sparc64/sparc64/mp_exception.S ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_exception.S Wed Sep 15 20:17:18 2010 (r212695) +++ stable/7/sys/sparc64/sparc64/mp_exception.S Wed Sep 15 20:17:20 2010 (r212696) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(tl_ipi_spitfire_dcache_page_inval) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_dcache_page_inval: pa=%#lx" + CATR(KTR_SMP, "tl_ipi_spitfire_dcache_page_inval: pa=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ICA_PA], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -87,7 +87,7 @@ END(tl_ipi_spitfire_dcache_page_inval) */ ENTRY(tl_ipi_spitfire_icache_page_inval) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_icache_page_inval: pa=%#lx" + CATR(KTR_SMP, "tl_ipi_spitfire_icache_page_inval: pa=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ICA_PA], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -126,7 +126,7 @@ END(tl_ipi_spitfire_icache_page_inval) */ ENTRY(tl_ipi_cheetah_dcache_page_inval) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_dcache_page_inval: pa=%#lx" + CATR(KTR_SMP, "tl_ipi_cheetah_dcache_page_inval: pa=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ICA_PA], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -256,7 +256,7 @@ END(tl_ipi_tlb_range_demap) */ ENTRY(tl_ipi_tlb_context_demap) #if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "ipi_tlb_page_demap: pm=%p va=%#lx" + CATR(KTR_SMP, "tl_ipi_tlb_context_demap: pm=%p va=%#lx" , %g1, %g2, %g3, 7, 8, 9) ldx [%g5 + ITA_PMAP], %g2 stx %g2, [%g1 + KTR_PARM1] @@ -274,3 +274,27 @@ ENTRY(tl_ipi_tlb_context_demap) IPI_DONE(%g5, %g1, %g2, %g3) retry END(tl_ipi_tlb_context_demap) + +/* + * Read %stick. + */ +ENTRY(tl_ipi_stick_rd) + ldx [%g5 + IRA_VAL], %g1 + rd %asr24, %g2 + stx %g2, [%g1] + + IPI_DONE(%g5, %g1, %g2, %g3) + retry +END(tl_ipi_stick_rd) + +/* + * Read %tick. + */ +ENTRY(tl_ipi_tick_rd) + ldx [%g5 + IRA_VAL], %g1 + rd %tick, %g2 + stx %g2, [%g1] + + IPI_DONE(%g5, %g1, %g2, %g3) + retry +END(tl_ipi_tick_rd) Modified: stable/7/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 20:17:18 2010 (r212695) +++ stable/7/sys/sparc64/sparc64/mp_machdep.c Wed Sep 15 20:17:20 2010 (r212696) @@ -107,6 +107,7 @@ static ih_func_t cpu_ipi_stop; */ struct cpu_start_args cpu_start_args = { 0, -1, -1, 0, 0, 0 }; struct ipi_cache_args ipi_cache_args; +struct ipi_rd_args ipi_rd_args; struct ipi_tlb_args ipi_tlb_args; struct pcb stoppcbs[MAXCPU]; Modified: stable/7/sys/sparc64/sparc64/tick.c ============================================================================== --- stable/7/sys/sparc64/sparc64/tick.c Wed Sep 15 20:17:18 2010 (r212695) +++ stable/7/sys/sparc64/sparc64/tick.c Wed Sep 15 20:17:20 2010 (r212696) @@ -42,9 +42,13 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include #include +#include #include #include @@ -76,10 +80,15 @@ u_int hardclock_use_stick = 0; SYSCTL_INT(_machdep_tick, OID_AUTO, hardclock_use_stick, CTLFLAG_RD, &hardclock_use_stick, 0, "hardclock uses STICK instead of TICK timer"); +static struct timecounter stick_tc; static struct timecounter tick_tc; static u_long tick_increment; static uint64_t tick_cputicks(void); +static timecounter_get_t stick_get_timecount_up; +#ifdef SMP +static timecounter_get_t stick_get_timecount_mp; +#endif static timecounter_get_t tick_get_timecount_up; #ifdef SMP static timecounter_get_t tick_get_timecount_mp; @@ -101,25 +110,31 @@ tick_cputicks(void) void cpu_initclocks(void) { - uint32_t clock; + uint32_t clock, sclock; stathz = hz; + clock = PCPU_GET(clock); + sclock = 0; + if (PCPU_GET(impl) == CPU_IMPL_SPARC64V || + PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCIII) { + if (OF_getprop(OF_parent(PCPU_GET(node)), "stick-frequency", + &sclock, sizeof(sclock)) == -1) { + panic("%s: could not determine STICK frequency", + __func__); + } + } /* * Given that the STICK timers typically are driven at rather low * frequencies they shouldn't be used except when really necessary. */ if (hardclock_use_stick != 0) { - if (OF_getprop(OF_parent(PCPU_GET(node)), "stick-frequency", - &clock, sizeof(clock)) == -1) - panic("%s: could not determine STICK frequency", __func__); intr_setup(PIL_TICK, stick_hardclock, -1, NULL, NULL); /* * We don't provide a CPU ticker as long as the frequency * supplied isn't actually used per-CPU. */ } else { - clock = PCPU_GET(clock); intr_setup(PIL_TICK, PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCI && PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? tick_hardclock_bbwar : tick_hardclock, -1, NULL, NULL); @@ -136,31 +151,45 @@ cpu_initclocks(void) tick_start(); /* - * Initialize the TICK-based timecounter. This must not happen - * before SI_SUB_INTRINSIC for tick_get_timecount_mp() to work. + * Initialize the (S)TICK-based timecounter(s). + * Note that we (try to) sync the (S)TICK timers of APs with the BSP + * during their startup but not afterwards. The resulting drift can + * cause problems when the time is calculated based on (S)TICK values + * read on different CPUs. Thus we always read the register on the + * BSP (if necessary via an IPI as sched_bind(9) isn't available in + * all circumstances) and use a low quality for the otherwise high + * quality (S)TICK timers in the MP case. */ tick_tc.tc_get_timecount = tick_get_timecount_up; tick_tc.tc_poll_pps = NULL; tick_tc.tc_counter_mask = ~0u; - tick_tc.tc_frequency = PCPU_GET(clock); + tick_tc.tc_frequency = clock; tick_tc.tc_name = "tick"; tick_tc.tc_quality = TICK_QUALITY_UP; tick_tc.tc_priv = NULL; #ifdef SMP - /* - * We (try to) sync the (S)TICK timers of APs with the BSP during - * their startup but not afterwards. The resulting drift can - * cause problems when the time is calculated based on (S)TICK - * values read on different CPUs. Thus we bind to the BSP for - * reading the register and use a low quality for the otherwise - * high quality (S)TICK timers in the MP case. - */ if (cpu_mp_probe()) { tick_tc.tc_get_timecount = tick_get_timecount_mp; tick_tc.tc_quality = TICK_QUALITY_MP; } #endif tc_init(&tick_tc); + if (sclock != 0) { + stick_tc.tc_get_timecount = stick_get_timecount_up; + stick_tc.tc_poll_pps = NULL; + stick_tc.tc_counter_mask = ~0u; + stick_tc.tc_frequency = sclock; + stick_tc.tc_name = "stick"; + stick_tc.tc_quality = TICK_QUALITY_UP; + stick_tc.tc_priv = NULL; +#ifdef SMP + if (cpu_mp_probe()) { + stick_tc.tc_get_timecount = stick_get_timecount_mp; + stick_tc.tc_quality = TICK_QUALITY_MP; + } +#endif + tc_init(&stick_tc); + } } static inline void @@ -266,6 +295,13 @@ tick_hardclock_common(struct trapframe * } static u_int +stick_get_timecount_up(struct timecounter *tc) +{ + + return ((u_int)rdstick()); +} + +static u_int tick_get_timecount_up(struct timecounter *tc) { @@ -274,22 +310,30 @@ tick_get_timecount_up(struct timecounter #ifdef SMP static u_int -tick_get_timecount_mp(struct timecounter *tc) +stick_get_timecount_mp(struct timecounter *tc) { - struct thread *td; - u_int tick; + u_long stick; - td = curthread; - thread_lock(td); - sched_bind(td, 0); - thread_unlock(td); - - tick = tick_get_timecount_up(tc); - - thread_lock(td); - sched_unbind(td); - thread_unlock(td); + sched_pin(); + if (curcpu == 0) + stick = rdstick(); + else + ipi_wait(ipi_rd(0, tl_ipi_stick_rd, &stick)); + sched_unpin(); + return (stick); +} +static u_int +tick_get_timecount_mp(struct timecounter *tc) +{ + u_long tick; + + sched_pin(); + if (curcpu == 0) + tick = rd(tick); + else + ipi_wait(ipi_rd(0, tl_ipi_tick_rd, &tick)); + sched_unpin(); return (tick); } #endif From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:40:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D70D1106564A; Wed, 15 Sep 2010 20:40:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5B728FC08; Wed, 15 Sep 2010 20:40:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKeR0O050049; Wed, 15 Sep 2010 20:40:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKeRIK050047; Wed, 15 Sep 2010 20:40:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009152040.o8FKeRIK050047@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 20:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212697 - stable/8/cddl/lib/libzpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:40:28 -0000 Author: marius Date: Wed Sep 15 20:40:27 2010 New Revision: 212697 URL: http://svn.freebsd.org/changeset/base/212697 Log: MFC: r208459 Use real atomic operations for sparc64. Modified: stable/8/cddl/lib/libzpool/Makefile Directory Properties: stable/8/cddl/lib/libzpool/ (props changed) Modified: stable/8/cddl/lib/libzpool/Makefile ============================================================================== --- stable/8/cddl/lib/libzpool/Makefile Wed Sep 15 20:17:20 2010 (r212696) +++ stable/8/cddl/lib/libzpool/Makefile Wed Sep 15 20:40:27 2010 (r212697) @@ -11,7 +11,7 @@ # LIST_SRCS .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/os # ATOMIC_SRCS -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} ATOMIC_SRCS= opensolaris_atomic.S .else From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:40:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F97E1065761; Wed, 15 Sep 2010 20:40:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E79F88FC18; Wed, 15 Sep 2010 20:40:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKeTf9050084; Wed, 15 Sep 2010 20:40:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKeT2P050082; Wed, 15 Sep 2010 20:40:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009152040.o8FKeT2P050082@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 20:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212698 - stable/7/cddl/lib/libzpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:40:33 -0000 Author: marius Date: Wed Sep 15 20:40:29 2010 New Revision: 212698 URL: http://svn.freebsd.org/changeset/base/212698 Log: MFC: r208459 Use real atomic operations for sparc64. Modified: stable/7/cddl/lib/libzpool/Makefile Directory Properties: stable/7/cddl/lib/libzpool/ (props changed) Modified: stable/7/cddl/lib/libzpool/Makefile ============================================================================== --- stable/7/cddl/lib/libzpool/Makefile Wed Sep 15 20:40:27 2010 (r212697) +++ stable/7/cddl/lib/libzpool/Makefile Wed Sep 15 20:40:29 2010 (r212698) @@ -11,7 +11,7 @@ # LIST_SRCS .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/os # ATOMIC_SRCS -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} ATOMIC_SRCS= opensolaris_atomic.S .else From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:41:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 533B110656A3; Wed, 15 Sep 2010 20:41:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42BCB8FC16; Wed, 15 Sep 2010 20:41:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKfLdC050137; Wed, 15 Sep 2010 20:41:21 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKfLCh050135; Wed, 15 Sep 2010 20:41:21 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152041.o8FKfLCh050135@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 20:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212699 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:41:21 -0000 Author: tuexen Date: Wed Sep 15 20:41:20 2010 New Revision: 212699 URL: http://svn.freebsd.org/changeset/base/212699 Log: Remove unused variables. MFC after: 2 weeks. Modified: head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Wed Sep 15 20:40:29 2010 (r212698) +++ head/sys/netinet6/sctp6_usrreq.c Wed Sep 15 20:41:20 2010 (r212699) @@ -73,7 +73,11 @@ sctp6_input(struct mbuf **i_pak, int *of struct sctp_nets *net; int refcount_up = 0; uint32_t vrf_id = 0; + +#ifdef IPSEC struct inpcb *in6p_ip; + +#endif struct sctp_chunkhdr *ch; int length, offset, iphlen; uint8_t ecn_bits; @@ -224,11 +228,11 @@ sctp_skip_csum: } else if (stcb == NULL) { refcount_up = 1; } - in6p_ip = (struct inpcb *)in6p; #ifdef IPSEC /* * Check AH/ESP integrity. */ + in6p_ip = (struct inpcb *)in6p; if (in6p_ip && (ipsec6_in_reject(m, in6p_ip))) { /* XXX */ MODULE_GLOBAL(ipsec6stat).in_polvio++; @@ -813,7 +817,6 @@ sctp6_send(struct socket *so, int flags, struct mbuf *control, struct thread *p) { struct sctp_inpcb *inp; - struct inpcb *in_inp; struct in6pcb *inp6; #ifdef INET @@ -832,7 +835,6 @@ sctp6_send(struct socket *so, int flags, SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL); return EINVAL; } - in_inp = (struct inpcb *)inp; inp6 = (struct in6pcb *)inp; /* * For the TCP model we may get a NULL addr, if we are a connected From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:49:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BB62106564A; Wed, 15 Sep 2010 20:49:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56EC78FC12; Wed, 15 Sep 2010 20:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKnZ1H050364; Wed, 15 Sep 2010 20:49:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKnYTh050334; Wed, 15 Sep 2010 20:49:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009152049.o8FKnYTh050334@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 15 Sep 2010 20:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212700 - in vendor-sys/acpica/dist: . common compiler debugger events executer hardware include include/platform namespace os_specific/service_layers tables tools/acpiexec tools/acpisr... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:49:35 -0000 Author: jkim Date: Wed Sep 15 20:49:34 2010 New Revision: 212700 URL: http://svn.freebsd.org/changeset/base/212700 Log: Import ACPICA 20100915. Added: vendor-sys/acpica/dist/hardware/hwpci.c (contents, props changed) vendor-sys/acpica/dist/utilities/utxferror.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/common/adfile.c vendor-sys/acpica/dist/common/adisasm.c vendor-sys/acpica/dist/common/adwalk.c vendor-sys/acpica/dist/common/dmrestag.c vendor-sys/acpica/dist/common/getopt.c vendor-sys/acpica/dist/compiler/Makefile vendor-sys/acpica/dist/compiler/aslanalyze.c vendor-sys/acpica/dist/compiler/aslcompile.c vendor-sys/acpica/dist/compiler/aslcompiler.h vendor-sys/acpica/dist/compiler/aslerror.c vendor-sys/acpica/dist/compiler/aslfiles.c vendor-sys/acpica/dist/compiler/asllisting.c vendor-sys/acpica/dist/compiler/asllookup.c vendor-sys/acpica/dist/compiler/aslmain.c vendor-sys/acpica/dist/compiler/aslopcodes.c vendor-sys/acpica/dist/compiler/aslpredef.c vendor-sys/acpica/dist/compiler/aslrestype1.c vendor-sys/acpica/dist/compiler/aslrestype2d.c vendor-sys/acpica/dist/compiler/aslrestype2e.c vendor-sys/acpica/dist/compiler/aslrestype2w.c vendor-sys/acpica/dist/compiler/aslstartup.c vendor-sys/acpica/dist/compiler/dtcompile.c vendor-sys/acpica/dist/compiler/dtio.c vendor-sys/acpica/dist/debugger/dbexec.c vendor-sys/acpica/dist/events/evrgnini.c vendor-sys/acpica/dist/executer/exmutex.c vendor-sys/acpica/dist/include/acglobal.h vendor-sys/acpica/dist/include/achware.h vendor-sys/acpica/dist/include/aclocal.h vendor-sys/acpica/dist/include/acmacros.h vendor-sys/acpica/dist/include/acnamesp.h vendor-sys/acpica/dist/include/acpiosxf.h vendor-sys/acpica/dist/include/acpixf.h vendor-sys/acpica/dist/include/actypes.h vendor-sys/acpica/dist/include/acutils.h vendor-sys/acpica/dist/include/platform/accygwin.h vendor-sys/acpica/dist/include/platform/acenv.h vendor-sys/acpica/dist/include/platform/acfreebsd.h vendor-sys/acpica/dist/include/platform/acgcc.h vendor-sys/acpica/dist/include/platform/acintel.h vendor-sys/acpica/dist/include/platform/aclinux.h vendor-sys/acpica/dist/include/platform/acmsvc.h vendor-sys/acpica/dist/include/platform/acos2.h vendor-sys/acpica/dist/include/platform/acwin.h vendor-sys/acpica/dist/include/platform/acwin64.h vendor-sys/acpica/dist/namespace/nsrepair2.c vendor-sys/acpica/dist/namespace/nsutils.c vendor-sys/acpica/dist/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/osunixxf.c vendor-sys/acpica/dist/tables/tbfadt.c vendor-sys/acpica/dist/tools/acpiexec/Makefile vendor-sys/acpica/dist/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/tools/acpiexec/aemain.c vendor-sys/acpica/dist/tools/acpiexec/aetables.c vendor-sys/acpica/dist/tools/acpisrc/asfile.c vendor-sys/acpica/dist/tools/acpisrc/astable.c vendor-sys/acpica/dist/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/utilities/utdebug.c vendor-sys/acpica/dist/utilities/utmath.c vendor-sys/acpica/dist/utilities/utmisc.c vendor-sys/acpica/dist/utilities/utmutex.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/changes.txt Wed Sep 15 20:49:34 2010 (r212700) @@ -1,4 +1,68 @@ ---------------------------------------- +15 September 2010. Summary of changes for version 20100915: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Removed the AcpiOsDerivePciId OSL interface. The various host implementations +of this function were not OS-dependent and are now obsolete and can be +removed from all host OSLs. This function has been replaced by +AcpiHwDerivePciId, which is now part of the ACPICA core code. +AcpiHwDerivePciId has been implemented without recursion. Adds one new +module, hwpci.c. ACPICA BZ 857. + +Implemented a dynamic repair for _HID and _CID strings. The following +problems are now repaired at runtime: 1) Remove a leading asterisk in the +string, and 2) the entire string is uppercased. Both repairs are in +accordance with the ACPI specification and will simplify host driver code. +ACPICA BZ 871. + +The ACPI_THREAD_ID type is no longer configurable, internally it is now +always UINT64. This simplifies the ACPICA code, especially any printf output. +UINT64 is the only common data type for all thread_id types across all +operating systems. It is now up to the host OSL to cast the native thread_id +type to UINT64 before returning the value to ACPICA (via AcpiOsGetThreadId). +Lin Ming, Bob Moore. + +Added the ACPI_INLINE type to enhance the ACPICA configuration. The "inline" +keyword is not standard across compilers, and this type allows inline to be +configured on a per-compiler basis. Lin Ming. + +Made the system global AcpiGbl_SystemAwakeAndRunning publically available. +Added an extern for this boolean in acpixf.h. Some hosts utilize this value +during suspend/restore operations. ACPICA BZ 869. + +All code that implements error/warning messages with the "ACPI:" prefix has +been moved to a new module, utxferror.c. + +The UINT64_OVERLAY was moved to utmath.c, which is the only module where it +is used. ACPICA BZ 829. Lin Ming, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 89.1K Code, 19.0K Data, 108.1K Total + Debug Version: 165.1K Code, 51.9K Data, 217.0K Total + Current Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Write ACPI errors to stderr instead of the output file. +This keeps the output files free of random error messages that may originate +from within the namespace/interpreter code. Used this opportunity to merge +all ACPI:-style messages into a single new module, utxferror.c. ACPICA BZ +866. Lin Ming, Bob Moore. + +Tools: update some printfs for ansi warnings on size_t. Handle width change +of size_t on 32-bit versus 64-bit generations. Lin Ming. + +---------------------------------------- 06 August 2010. Summary of changes for version 20100806: 1) ACPI CA Core Subsystem: Modified: vendor-sys/acpica/dist/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/common/adfile.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/common/adfile.c Wed Sep 15 20:49:34 2010 (r212700) @@ -126,13 +126,13 @@ /* Local prototypes */ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, UINT32 Length); -char FilenameBuf[20]; +static char FilenameBuf[20]; /****************************************************************************** @@ -190,7 +190,7 @@ AdGenerateFilename ( * ******************************************************************************/ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, Modified: vendor-sys/acpica/dist/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/common/adisasm.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/common/adisasm.c Wed Sep 15 20:49:34 2010 (r212700) @@ -147,18 +147,18 @@ LsSetupNsList ( /* Local prototypes */ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table); -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, UINT32 AmlLength); -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root); @@ -634,7 +634,7 @@ AdDisassemblerHeader ( * *****************************************************************************/ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table) @@ -781,7 +781,7 @@ AdDisplayTables ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, @@ -904,7 +904,7 @@ AdDeferredParse ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root) { Modified: vendor-sys/acpica/dist/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/common/adwalk.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/common/adwalk.c Wed Sep 15 20:49:34 2010 (r212700) @@ -792,6 +792,7 @@ AcpiDmXrefDescendingOp ( ACPI_PARSE_OBJECT *NextOp; ACPI_NAMESPACE_NODE *Node; ACPI_OPERAND_OBJECT *Object; + UINT32 ParamCount = 0; WalkState = Info->WalkState; @@ -880,18 +881,13 @@ AcpiDmXrefDescendingOp ( if (Object) { ObjectType2 = Object->Common.Type; + if (ObjectType2 == ACPI_TYPE_METHOD) + { + ParamCount = Object->Method.ParamCount; + } } - if (ObjectType2 == ACPI_TYPE_METHOD) - { - AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_METHOD, - Object->Method.ParamCount); - } - else - { - AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, 0); - } - + AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, ParamCount); Op->Common.Node = Node; } else Modified: vendor-sys/acpica/dist/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/common/dmrestag.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/common/dmrestag.c Wed Sep 15 20:49:34 2010 (r212700) @@ -704,8 +704,8 @@ AcpiDmUpdateResourceName ( Name[0] = '_'; Name[1] = AcpiGbl_Prefix[AcpiGbl_NextPrefix]; - Name[2] = AcpiUtHexToAsciiChar (AcpiGbl_NextResourceId, 4); - Name[3] = AcpiUtHexToAsciiChar (AcpiGbl_NextResourceId, 0); + Name[2] = AcpiUtHexToAsciiChar ((UINT64) AcpiGbl_NextResourceId, 4); + Name[3] = AcpiUtHexToAsciiChar ((UINT64) AcpiGbl_NextResourceId, 0); /* Update globals for next name */ Modified: vendor-sys/acpica/dist/common/getopt.c ============================================================================== --- vendor-sys/acpica/dist/common/getopt.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/common/getopt.c Wed Sep 15 20:49:34 2010 (r212700) @@ -126,7 +126,6 @@ int AcpiGbl_Opterr = 1; int AcpiGbl_Optind = 1; -int AcpiGbl_Optopt; char *AcpiGbl_Optarg; @@ -171,9 +170,7 @@ AcpiGetopt( /* Get the option */ - CurrentChar = - AcpiGbl_Optopt = - argv[AcpiGbl_Optind][CurrentCharPtr]; + CurrentChar = argv[AcpiGbl_Optind][CurrentCharPtr]; /* Make sure that the option is legal */ Modified: vendor-sys/acpica/dist/compiler/Makefile ============================================================================== --- vendor-sys/acpica/dist/compiler/Makefile Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/Makefile Wed Sep 15 20:49:34 2010 (r212700) @@ -151,6 +151,7 @@ OBJS = \ utobject.o \ utresrc.o \ utstate.o \ + utxferror.o \ utxface.o INTERMEDIATES = \ @@ -565,6 +566,9 @@ utresrc.o : $(ACPICA_CORE)/utili utstate.o : $(ACPICA_CORE)/utilities/utstate.c $(COMPILE) +utxferror.o : $(ACPICA_CORE)/utilities/utxferror.c + $(COMPILE) + utxface.o : $(ACPICA_CORE)/utilities/utxface.c $(COMPILE) Modified: vendor-sys/acpica/dist/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslanalyze.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslanalyze.c Wed Sep 15 20:49:34 2010 (r212700) @@ -166,7 +166,7 @@ static UINT32 AnGetInternalMethodReturnType ( ACPI_PARSE_OBJECT *Op); -BOOLEAN +static BOOLEAN AnIsResultUsed ( ACPI_PARSE_OBJECT *Op); @@ -1754,7 +1754,7 @@ AnOperandTypecheckWalkEnd ( * ******************************************************************************/ -BOOLEAN +static BOOLEAN AnIsResultUsed ( ACPI_PARSE_OBJECT *Op) { @@ -1862,6 +1862,7 @@ AnOtherSemanticAnalysisWalkBegin ( if (Op->Asl.AmlOpcode == AML_DIVIDE_OP) { if ((ArgNode->Asl.ParseOpcode == PARSEOP_ZERO) && + (PrevArgNode) && (PrevArgNode->Asl.ParseOpcode == PARSEOP_ZERO)) { AslError (ASL_WARNING, ASL_MSG_RESULT_NOT_USED, Op, Op->Asl.ExternalName); Modified: vendor-sys/acpica/dist/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompile.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslcompile.c Wed Sep 15 20:49:34 2010 (r212700) @@ -127,12 +127,12 @@ static void CmFlushSourceCode ( void); -void +static void FlConsumeAnsiComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status); -void +static void FlConsumeNewComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status); @@ -345,7 +345,7 @@ CmFlushSourceCode ( * ******************************************************************************/ -void +static void FlConsumeAnsiComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status) @@ -389,7 +389,7 @@ FlConsumeAnsiComment ( } -void +static void FlConsumeNewComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status) Modified: vendor-sys/acpica/dist/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompiler.h Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslcompiler.h Wed Sep 15 20:49:34 2010 (r212700) @@ -686,6 +686,10 @@ ACPI_STATUS LsDisplayNamespace ( void); +void +LsSetupNsList ( + void *Handle); + /* * aslutils - common compiler utilites Modified: vendor-sys/acpica/dist/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslerror.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslerror.c Wed Sep 15 20:49:34 2010 (r212700) @@ -304,7 +304,7 @@ AePrintException ( if (Enode->LineNumber) { - fprintf (OutputFile, "%6u: ", Enode->LineNumber); + fprintf (OutputFile, " %6u: ", Enode->LineNumber); /* * Seek to the offset in the combined source file, read the source @@ -358,7 +358,7 @@ AePrintException ( { /* Decode the message ID */ - fprintf (OutputFile, "%s %4.4d -", + fprintf (OutputFile, "%s %4.4d - ", AslErrorLevel[Enode->Level], Enode->MessageId + ((Enode->Level+1) * 1000)); Modified: vendor-sys/acpica/dist/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslfiles.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslfiles.c Wed Sep 15 20:49:34 2010 (r212700) @@ -122,7 +122,7 @@ /* Local prototypes */ -FILE * +static FILE * FlOpenIncludeWithPrefix ( char *PrefixDir, char *Filename); @@ -546,7 +546,7 @@ FlAddIncludeDirectory ( * ******************************************************************************/ -FILE * +static FILE * FlOpenIncludeWithPrefix ( char *PrefixDir, char *Filename) Modified: vendor-sys/acpica/dist/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asllisting.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/asllisting.c Wed Sep 15 20:49:34 2010 (r212700) @@ -202,7 +202,7 @@ static void LsDoHexOutputAsl ( void); -ACPI_STATUS +static ACPI_STATUS LsTreeWriteWalk ( ACPI_PARSE_OBJECT *Op, UINT32 Level, @@ -222,7 +222,7 @@ LsTreeWriteWalk ( * ******************************************************************************/ -ACPI_STATUS +static ACPI_STATUS LsTreeWriteWalk ( ACPI_PARSE_OBJECT *Op, UINT32 Level, Modified: vendor-sys/acpica/dist/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asllookup.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/asllookup.c Wed Sep 15 20:49:34 2010 (r212700) @@ -180,11 +180,7 @@ LsDoOnePathname ( void *Context, void **ReturnValue); -void -LsSetupNsList ( - void *Handle); - -ACPI_PARSE_OBJECT * +static ACPI_PARSE_OBJECT * LkGetNameOp ( ACPI_PARSE_OBJECT *Op); @@ -623,7 +619,7 @@ LkObjectExists ( * ******************************************************************************/ -ACPI_PARSE_OBJECT * +static ACPI_PARSE_OBJECT * LkGetNameOp ( ACPI_PARSE_OBJECT *Op) { Modified: vendor-sys/acpica/dist/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslmain.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslmain.c Wed Sep 15 20:49:34 2010 (r212700) @@ -214,7 +214,7 @@ Options ( printf (" -cr Disable Resource Descriptor error checking\n"); printf (" -r Override table header Revision (1-255)\n"); - printf ("\nListings:\n"); + printf ("\nASL Listing Files:\n"); printf (" -l Create mixed listing file (ASL source and AML) (*.lst)\n"); printf (" -ln Create namespace file (*.nsp)\n"); printf (" -ls Create combined source file (expanded includes) (*.src)\n"); @@ -462,6 +462,7 @@ AslDoOptions ( BOOLEAN IsResponseFile) { int j; + ACPI_STATUS Status; /* Get the command line options */ @@ -554,7 +555,12 @@ AslDoOptions ( case 'e': - AcpiDmAddToExternalFileList (AcpiGbl_Optarg); + Status = AcpiDmAddToExternalFileList (AcpiGbl_Optarg); + if (ACPI_FAILURE (Status)) + { + printf ("Could not add %s to external list\n", AcpiGbl_Optarg); + return (-1); + } break; @@ -601,7 +607,6 @@ AslDoOptions ( printf ("Unknown option: -h%s\n", AcpiGbl_Optarg); return (-1); } - break; case 'I': /* Add an include file search directory */ @@ -891,6 +896,7 @@ AslCommandLine ( char **argv) { int BadCommandLine = 0; + ACPI_STATUS Status; /* Minimum command line contains at least the command and an input file */ @@ -908,7 +914,11 @@ AslCommandLine ( if (Gbl_DoTemplates) { - DtCreateTemplates (Gbl_TemplateSignature); + Status = DtCreateTemplates (Gbl_TemplateSignature); + if (ACPI_FAILURE (Status)) + { + exit (-1); + } exit (1); } Modified: vendor-sys/acpica/dist/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslopcodes.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslopcodes.c Wed Sep 15 20:49:34 2010 (r212700) @@ -592,9 +592,9 @@ OpcDoEisaId ( /* Create ID big-endian first (bits are contiguous) */ BigEndianId = - (UINT32) (InString[0] - 0x40) << 26 | - (UINT32) (InString[1] - 0x40) << 21 | - (UINT32) (InString[2] - 0x40) << 16 | + (UINT32) ((UINT8) (InString[0] - 0x40)) << 26 | + (UINT32) ((UINT8) (InString[1] - 0x40)) << 21 | + (UINT32) ((UINT8) (InString[2] - 0x40)) << 16 | (UtHexCharToValue (InString[3])) << 12 | (UtHexCharToValue (InString[4])) << 8 | Modified: vendor-sys/acpica/dist/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslpredef.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslpredef.c Wed Sep 15 20:49:34 2010 (r212700) @@ -117,8 +117,6 @@ #include "aslcompiler.h" #include "aslcompiler.y.h" -#include "amlcode.h" -#include "acparser.h" #include "acpredef.h" Modified: vendor-sys/acpica/dist/compiler/aslrestype1.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslrestype1.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslrestype1.c Wed Sep 15 20:49:34 2010 (r212700) @@ -224,7 +224,6 @@ RsDoMemory24Descriptor ( ACPI_PARSE_OBJECT *MinOp = NULL; ACPI_PARSE_OBJECT *MaxOp = NULL; ACPI_PARSE_OBJECT *LengthOp = NULL; - ACPI_PARSE_OBJECT *AlignOp = NULL; ASL_RESOURCE_NODE *Rnode; UINT32 i; @@ -270,7 +269,6 @@ RsDoMemory24Descriptor ( Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer; RsCreateByteField (InitializerOp, ACPI_RESTAG_ALIGNMENT, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment)); - AlignOp = InitializerOp; break; case 4: /* Length */ Modified: vendor-sys/acpica/dist/compiler/aslrestype2d.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslrestype2d.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslrestype2d.c Wed Sep 15 20:49:34 2010 (r212700) @@ -347,10 +347,10 @@ RsDoDwordIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address32.Minimum, - Descriptor->Address32.Maximum, - Descriptor->Address32.AddressLength, - Descriptor->Address32.Granularity, + (UINT64) Descriptor->Address32.Minimum, + (UINT64) Descriptor->Address32.Maximum, + (UINT64) Descriptor->Address32.AddressLength, + (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -583,10 +583,10 @@ RsDoDwordMemoryDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address32.Minimum, - Descriptor->Address32.Maximum, - Descriptor->Address32.AddressLength, - Descriptor->Address32.Granularity, + (UINT64) Descriptor->Address32.Minimum, + (UINT64) Descriptor->Address32.Maximum, + (UINT64) Descriptor->Address32.AddressLength, + (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -801,10 +801,10 @@ RsDoDwordSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address32.Minimum, - Descriptor->Address32.Maximum, - Descriptor->Address32.AddressLength, - Descriptor->Address32.Granularity, + (UINT64) Descriptor->Address32.Minimum, + (UINT64) Descriptor->Address32.Maximum, + (UINT64) Descriptor->Address32.AddressLength, + (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp); Modified: vendor-sys/acpica/dist/compiler/aslrestype2e.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslrestype2e.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslrestype2e.c Wed Sep 15 20:49:34 2010 (r212700) @@ -116,7 +116,6 @@ #include "aslcompiler.h" -#include "aslcompiler.y.h" #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslrestype2e") Modified: vendor-sys/acpica/dist/compiler/aslrestype2w.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslrestype2w.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslrestype2w.c Wed Sep 15 20:49:34 2010 (r212700) @@ -338,10 +338,10 @@ RsDoWordIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address16.Minimum, - Descriptor->Address16.Maximum, - Descriptor->Address16.AddressLength, - Descriptor->Address16.Granularity, + (UINT64) Descriptor->Address16.Minimum, + (UINT64) Descriptor->Address16.Maximum, + (UINT64) Descriptor->Address16.AddressLength, + (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -544,10 +544,10 @@ RsDoWordBusNumberDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address16.Minimum, - Descriptor->Address16.Maximum, - Descriptor->Address16.AddressLength, - Descriptor->Address16.Granularity, + (UINT64) Descriptor->Address16.Minimum, + (UINT64) Descriptor->Address16.Maximum, + (UINT64) Descriptor->Address16.AddressLength, + (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -761,10 +761,10 @@ RsDoWordSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address16.Minimum, - Descriptor->Address16.Maximum, - Descriptor->Address16.AddressLength, - Descriptor->Address16.Granularity, + (UINT64) Descriptor->Address16.Minimum, + (UINT64) Descriptor->Address16.Maximum, + (UINT64) Descriptor->Address16.AddressLength, + (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, MinOp, MaxOp, LengthOp, GranOp); Modified: vendor-sys/acpica/dist/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslstartup.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/aslstartup.c Wed Sep 15 20:49:34 2010 (r212700) @@ -124,9 +124,8 @@ #define ASL_MAX_FILES 256 -char *FileList[ASL_MAX_FILES]; -int FileCount; -BOOLEAN AslToFile = TRUE; +static char *FileList[ASL_MAX_FILES]; +static BOOLEAN AslToFile = TRUE; /* Local prototypes */ @@ -136,7 +135,7 @@ AsDoWildcard ( char *DirectoryPathname, char *FileSpecifier); -UINT8 +static UINT8 AslDetectSourceFileType ( ASL_FILE_INFO *Info); @@ -210,6 +209,7 @@ AsDoWildcard ( #ifdef WIN32 void *DirInfo; char *Filename; + int FileCount; FileCount = 0; @@ -277,7 +277,7 @@ AsDoWildcard ( * ******************************************************************************/ -UINT8 +static UINT8 AslDetectSourceFileType ( ASL_FILE_INFO *Info) { @@ -397,7 +397,7 @@ AslDoOneFile ( /* Shutdown compiler and ACPICA subsystem */ AeClearErrorLog (); - AcpiTerminate (); + (void) AcpiTerminate (); /* * Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the @@ -487,7 +487,7 @@ AslDoOneFile ( } Status = CmDoCompile (); - AcpiTerminate (); + (void) AcpiTerminate (); /* * Return non-zero exit code if there have been errors, unless the @@ -533,7 +533,7 @@ AslDoOnePathname ( ASL_PATHNAME_CALLBACK PathCallback) { ACPI_STATUS Status = AE_OK; - char **FileList; + char **WildcardList; char *Filename; char *FullPathname; @@ -548,16 +548,16 @@ AslDoOnePathname ( /* Expand possible wildcard into a file list (Windows/DOS only) */ - FileList = AsDoWildcard (Gbl_DirectoryPath, Filename); - while (*FileList) + WildcardList = AsDoWildcard (Gbl_DirectoryPath, Filename); + while (*WildcardList) { FullPathname = ACPI_ALLOCATE ( - strlen (Gbl_DirectoryPath) + strlen (*FileList) + 1); + strlen (Gbl_DirectoryPath) + strlen (*WildcardList) + 1); /* Construct a full path to the file */ strcpy (FullPathname, Gbl_DirectoryPath); - strcat (FullPathname, *FileList); + strcat (FullPathname, *WildcardList); /* * If -p not specified, we will use the input filename as the @@ -573,9 +573,9 @@ AslDoOnePathname ( Status |= (*PathCallback) (FullPathname); ACPI_FREE (FullPathname); - ACPI_FREE (*FileList); - *FileList = NULL; - FileList++; + ACPI_FREE (*WildcardList); + *WildcardList = NULL; + WildcardList++; } ACPI_FREE (Gbl_DirectoryPath); Modified: vendor-sys/acpica/dist/compiler/dtcompile.c ============================================================================== --- vendor-sys/acpica/dist/compiler/dtcompile.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/dtcompile.c Wed Sep 15 20:49:34 2010 (r212700) @@ -127,7 +127,7 @@ static char VersionStrin /* Local prototypes */ -static void +static ACPI_STATUS DtInitialize ( void); @@ -166,7 +166,12 @@ DtDoCompile ( /* Initialize globals */ - DtInitialize (); + Status = DtInitialize (); + if (ACPI_FAILURE (Status)) + { + printf ("Error during compiler initialization, 0x%X\n", Status); + return (Status); + } /* * Scan the input file (file is already open) and @@ -236,26 +241,38 @@ CleanupAndExit: * * PARAMETERS: None * - * RETURN: None + * RETURN: Status * * DESCRIPTION: Initialize data table compiler globals. Enables multiple * compiles per invocation. * *****************************************************************************/ -static void +static ACPI_STATUS DtInitialize ( void) { + ACPI_STATUS Status; - AcpiOsInitialize (); - AcpiUtInitGlobals (); + + Status = AcpiOsInitialize (); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + Status = AcpiUtInitGlobals (); + if (ACPI_FAILURE (Status)) + { + return (Status); + } Gbl_FieldList = NULL; Gbl_RootTable = NULL; Gbl_SubtableStack = NULL; sprintf (VersionString, "%X", (UINT32) ACPI_CA_VERSION); + return (AE_OK); } Modified: vendor-sys/acpica/dist/compiler/dtio.c ============================================================================== --- vendor-sys/acpica/dist/compiler/dtio.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/compiler/dtio.c Wed Sep 15 20:49:34 2010 (r212700) @@ -158,7 +158,7 @@ DtWriteBinary ( #define DT_SLASH_SLASH_COMMENT 4 #define DT_END_COMMENT 5 -UINT32 Gbl_NextLineOffset; +static UINT32 Gbl_NextLineOffset; /****************************************************************************** Modified: vendor-sys/acpica/dist/debugger/dbexec.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbexec.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/debugger/dbexec.c Wed Sep 15 20:49:34 2010 (r212700) @@ -567,14 +567,12 @@ AcpiDbMethodThread ( if (Info->InitArgs) { AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr); - AcpiDbUInt32ToHexString (ACPI_TO_INTEGER (AcpiOsGetThreadId ()), - Info->IdOfThreadStr); + AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr); } if (Info->Threads && (Info->NumCreated < Info->NumThreads)) { - Info->Threads[Info->NumCreated++] = - ACPI_TO_INTEGER (AcpiOsGetThreadId()); + Info->Threads[Info->NumCreated++] = AcpiOsGetThreadId(); } LocalInfo = *Info; @@ -722,8 +720,8 @@ AcpiDbCreateExecutionThreads ( /* Array to store IDs of threads */ AcpiGbl_DbMethodInfo.NumThreads = NumThreads; - Size = 4 * AcpiGbl_DbMethodInfo.NumThreads; - AcpiGbl_DbMethodInfo.Threads = (UINT32 *) AcpiOsAllocate (Size); + Size = sizeof (ACPI_THREAD_ID) * AcpiGbl_DbMethodInfo.NumThreads; + AcpiGbl_DbMethodInfo.Threads = AcpiOsAllocate (Size); if (AcpiGbl_DbMethodInfo.Threads == NULL) { AcpiOsPrintf ("No memory for thread IDs array\n"); Modified: vendor-sys/acpica/dist/events/evrgnini.c ============================================================================== --- vendor-sys/acpica/dist/events/evrgnini.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/events/evrgnini.c Wed Sep 15 20:49:34 2010 (r212700) @@ -395,8 +395,8 @@ AcpiEvPciConfigRegionSetup ( } /* - * Get the PCI device and function numbers from the _ADR object contained - * in the parent's scope. + * Get the PCI device and function numbers from the _ADR object + * contained in the parent's scope. */ Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, PciDeviceNode, &PciValue); @@ -429,9 +429,14 @@ AcpiEvPciConfigRegionSetup ( PciId->Bus = ACPI_LOWORD (PciValue); } - /* Complete this device's PciId */ + /* Complete/update the PCI ID for this device */ - AcpiOsDerivePciId (PciRootNode, RegionObj->Region.Node, &PciId); + Status = AcpiHwDerivePciId (PciId, PciRootNode, RegionObj->Region.Node); + if (ACPI_FAILURE (Status)) + { + ACPI_FREE (PciId); + return_ACPI_STATUS (Status); + } *RegionContext = PciId; return_ACPI_STATUS (AE_OK); Modified: vendor-sys/acpica/dist/executer/exmutex.c ============================================================================== --- vendor-sys/acpica/dist/executer/exmutex.c Wed Sep 15 20:41:20 2010 (r212699) +++ vendor-sys/acpica/dist/executer/exmutex.c Wed Sep 15 20:49:34 2010 (r212700) @@ -513,10 +513,10 @@ AcpiExReleaseMutex ( (ObjDesc != AcpiGbl_GlobalLockMutex)) { ACPI_ERROR ((AE_INFO, - "Thread %p cannot release Mutex [%4.4s] acquired by thread %p", - ACPI_CAST_PTR (void, WalkState->Thread->ThreadId), + "Thread %u cannot release Mutex [%4.4s] acquired by thread %u", + (UINT32) WalkState->Thread->ThreadId, AcpiUtGetNodeName (ObjDesc->Mutex.Node), - ACPI_CAST_PTR (void, OwnerThread->ThreadId))); + (UINT32) OwnerThread->ThreadId)); return_ACPI_STATUS (AE_AML_NOT_OWNER); } Added: vendor-sys/acpica/dist/hardware/hwpci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/hardware/hwpci.c Wed Sep 15 20:49:34 2010 (r212700) @@ -0,0 +1,531 @@ +/******************************************************************************* + * + * Module Name: hwpci - Obtain PCI bus, device, and function numbers + * + ******************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#define __HWPCI_C__ + +#include "acpi.h" +#include "accommon.h" + + +#define _COMPONENT ACPI_NAMESPACE + ACPI_MODULE_NAME ("hwpci") + + +/* PCI configuration space values */ + +#define PCI_CFG_HEADER_TYPE_REG 0x0E +#define PCI_CFG_PRIMARY_BUS_NUMBER_REG 0x18 +#define PCI_CFG_SECONDARY_BUS_NUMBER_REG 0x19 + +/* PCI header values */ + +#define PCI_HEADER_TYPE_MASK 0x7F *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:50:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F12631065670; Wed, 15 Sep 2010 20:50:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C66598FC0A; Wed, 15 Sep 2010 20:50:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKopiQ050433; Wed, 15 Sep 2010 20:50:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKopI0050432; Wed, 15 Sep 2010 20:50:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009152050.o8FKopI0050432@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 15 Sep 2010 20:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212701 - vendor-sys/acpica/20100915 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:50:52 -0000 Author: jkim Date: Wed Sep 15 20:50:51 2010 New Revision: 212701 URL: http://svn.freebsd.org/changeset/base/212701 Log: Tag ACPICA 20100915. Added: vendor-sys/acpica/20100915/ - copied from r212700, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:53:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB78E106564A; Wed, 15 Sep 2010 20:53:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BACBE8FC0A; Wed, 15 Sep 2010 20:53:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKrK6U050525; Wed, 15 Sep 2010 20:53:20 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKrKs2050523; Wed, 15 Sep 2010 20:53:20 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152053.o8FKrKs2050523@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 20:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212702 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:53:20 -0000 Author: tuexen Date: Wed Sep 15 20:53:20 2010 New Revision: 212702 URL: http://svn.freebsd.org/changeset/base/212702 Log: * Use !TAILQ_EMPTY() for checking if a tail queue is not empty. * Remove assignment without any effect. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_cc_functions.c Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Wed Sep 15 20:50:51 2010 (r212701) +++ head/sys/netinet/sctp_cc_functions.c Wed Sep 15 20:53:20 2010 (r212702) @@ -171,7 +171,7 @@ sctp_cwnd_update_after_sack(struct sctp_ * So, first of all do we need to have a Early FR * timer running? */ - if (((TAILQ_FIRST(&asoc->sent_queue)) && + if ((!TAILQ_EMPTY(&asoc->sent_queue) && (net->ref_count > 1) && (net->flight_size < net->cwnd)) || (reneged_all)) { @@ -656,7 +656,6 @@ sctp_hs_cwnd_decrease(struct sctp_tcb *s int old_cwnd = net->cwnd; cur_val = net->cwnd >> 10; - indx = net->last_hs_used; if (cur_val < sctp_cwnd_adjust[0].cwnd) { /* normal mode */ net->ssthresh = net->cwnd / 2; @@ -793,7 +792,7 @@ sctp_hs_cwnd_update_after_sack(struct sc * So, first of all do we need to have a Early FR * timer running? */ - if (((TAILQ_FIRST(&asoc->sent_queue)) && + if ((!TAILQ_EMPTY(&asoc->sent_queue) && (net->ref_count > 1) && (net->flight_size < net->cwnd)) || (reneged_all)) { @@ -1279,7 +1278,7 @@ sctp_htcp_cwnd_update_after_sack(struct * So, first of all do we need to have a Early FR * timer running? */ - if (((TAILQ_FIRST(&asoc->sent_queue)) && + if ((!TAILQ_EMPTY(&asoc->sent_queue) && (net->ref_count > 1) && (net->flight_size < net->cwnd)) || (reneged_all)) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 20:59:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4BDC1065670; Wed, 15 Sep 2010 20:59:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A44318FC21; Wed, 15 Sep 2010 20:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FKxDih050699; Wed, 15 Sep 2010 20:59:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FKxDi2050697; Wed, 15 Sep 2010 20:59:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009152059.o8FKxDi2050697@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 15 Sep 2010 20:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212703 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 20:59:13 -0000 Author: pjd Date: Wed Sep 15 20:59:13 2010 New Revision: 212703 URL: http://svn.freebsd.org/changeset/base/212703 Log: Make the message that informs about bootcode being written to disk less confusing. Note there is still no information about 'partcode' being written to disk (gpart bootcode -p ). Maybe in the future all the messages printed by gpart(8) on success could be hidden under -v? PR: bin/150239 Reported by: Roddi Submitted by: arundel MFC after: 2 weeks Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Wed Sep 15 20:53:20 2010 (r212702) +++ head/sys/geom/part/g_part.c Wed Sep 15 20:59:13 2010 (r212703) @@ -636,7 +636,7 @@ g_part_ctl_bootcode(struct gctl_req *req /* Provide feedback if so requested. */ if (gpp->gpp_parms & G_PART_PARM_OUTPUT) { sb = sbuf_new_auto(); - sbuf_printf(sb, "%s has bootcode\n", gp->name); + sbuf_printf(sb, "bootcode written to %s\n", gp->name); sbuf_finish(sb); gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); @@ -1032,7 +1032,7 @@ g_part_ctl_move(struct gctl_req *req, st { gctl_error(req, "%d verb 'move'", ENOSYS); return (ENOSYS); -} +} static int g_part_ctl_recover(struct gctl_req *req, struct g_part_parms *gpp) From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:08:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E06810656A4; Wed, 15 Sep 2010 21:08:57 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D9F78FC13; Wed, 15 Sep 2010 21:08:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FL8vHF050954; Wed, 15 Sep 2010 21:08:57 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FL8v5W050952; Wed, 15 Sep 2010 21:08:57 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152108.o8FL8v5W050952@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 21:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212704 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:08:57 -0000 Author: tuexen Date: Wed Sep 15 21:08:57 2010 New Revision: 212704 URL: http://svn.freebsd.org/changeset/base/212704 Log: Remove assignment without effect. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_sysctl.c Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Wed Sep 15 20:59:13 2010 (r212703) +++ head/sys/netinet/sctp_sysctl.c Wed Sep 15 21:08:57 2010 (r212704) @@ -200,8 +200,6 @@ copy_out_local_addresses(struct sctp_inp ipv6_addr_legal = 0; } - error = 0; - /* neither Mac OS X nor FreeBSD support mulitple routing functions */ if ((vrf = sctp_find_vrf(inp->def_vrf_id)) == NULL) { SCTP_INP_RUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:11:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0431B106566C; Wed, 15 Sep 2010 21:11:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7B9E8FC08; Wed, 15 Sep 2010 21:11:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FLBT4s051061; Wed, 15 Sep 2010 21:11:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FLBTlu051059; Wed, 15 Sep 2010 21:11:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009152111.o8FLBTlu051059@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 21:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212705 - head/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:11:30 -0000 Author: marius Date: Wed Sep 15 21:11:29 2010 New Revision: 212705 URL: http://svn.freebsd.org/changeset/base/212705 Log: Add macros for alternate entry points. Modified: head/sys/sparc64/include/asm.h Modified: head/sys/sparc64/include/asm.h ============================================================================== --- head/sys/sparc64/include/asm.h Wed Sep 15 21:08:57 2010 (r212704) +++ head/sys/sparc64/include/asm.h Wed Sep 15 21:11:29 2010 (r212705) @@ -76,7 +76,7 @@ _ALIGN_TEXT /* - * Define a function entry point. + * Define function entry and alternate entry points. * * The compiler produces #function for the .type pseudo-op, but the '#' * character has special meaning in cpp macros, so we use @function like @@ -86,12 +86,19 @@ * value. Since this is difficult to predict and its expected that * assembler code is already optimized, we leave it out. */ + +#define _ALTENTRY(x) \ + .globl CNAME(x) ; \ + .type CNAME(x),@function ; \ +CNAME(x): + #define _ENTRY(x) \ _START_ENTRY ; \ .globl CNAME(x) ; \ .type CNAME(x),@function ; \ CNAME(x): +#define ALTENTRY(x) _ALTENTRY(x) #define ENTRY(x) _ENTRY(x) #define END(x) .size x, . - x From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:15:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426DC1065673; Wed, 15 Sep 2010 21:15:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7178FC18; Wed, 15 Sep 2010 21:15:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FLF1eB051158; Wed, 15 Sep 2010 21:15:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FLF1tP051155; Wed, 15 Sep 2010 21:15:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009152115.o8FLF1tP051155@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 15 Sep 2010 21:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212706 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:15:01 -0000 Author: pjd Date: Wed Sep 15 21:15:00 2010 New Revision: 212706 URL: http://svn.freebsd.org/changeset/base/212706 Log: Change message when setting or unsetting attribute less confusing. Before: ada0 has set After: set on ada0 MFC after: 2 weeks Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Wed Sep 15 21:11:29 2010 (r212705) +++ head/sys/geom/part/g_part.c Wed Sep 15 21:15:00 2010 (r212706) @@ -1160,9 +1160,10 @@ g_part_ctl_setunset(struct gctl_req *req /* Provide feedback if so requested. */ if (gpp->gpp_parms & G_PART_PARM_OUTPUT) { sb = sbuf_new_auto(); - G_PART_FULLNAME(table, entry, sb, gp->name); - sbuf_printf(sb, " has %s %sset\n", gpp->gpp_attrib, + sbuf_printf(sb, "%s %sset on ", gpp->gpp_attrib, (set) ? "" : "un"); + G_PART_FULLNAME(table, entry, sb, gp->name); + sbuf_printf(sb, "\n"); sbuf_finish(sb); gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:19:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E166B1065674; Wed, 15 Sep 2010 21:19:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0EA38FC0C; Wed, 15 Sep 2010 21:19:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FLJsRZ051283; Wed, 15 Sep 2010 21:19:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FLJskB051281; Wed, 15 Sep 2010 21:19:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152119.o8FLJskB051281@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 21:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212707 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:19:55 -0000 Author: tuexen Date: Wed Sep 15 21:19:54 2010 New Revision: 212707 URL: http://svn.freebsd.org/changeset/base/212707 Log: Remove unused variable/assignment. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_bsd_addr.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Wed Sep 15 21:15:00 2010 (r212706) +++ head/sys/netinet/sctp_bsd_addr.c Wed Sep 15 21:19:54 2010 (r212707) @@ -298,7 +298,6 @@ sctp_init_vrf_list(int vrfid) void sctp_addr_change(struct ifaddr *ifa, int cmd) { - struct sctp_ifa *ifap = NULL; uint32_t ifa_flags = 0; /* @@ -339,7 +338,7 @@ sctp_addr_change(struct ifaddr *ifa, int return; } if (cmd == RTM_ADD) { - ifap = sctp_add_addr_to_vrf(SCTP_DEFAULT_VRFID, (void *)ifa->ifa_ifp, + (void)sctp_add_addr_to_vrf(SCTP_DEFAULT_VRFID, (void *)ifa->ifa_ifp, ifa->ifa_ifp->if_index, ifa->ifa_ifp->if_type, ifa->ifa_ifp->if_xname, (void *)ifa, ifa->ifa_addr, ifa_flags, 1); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:33:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54DBF1065675 for ; Wed, 15 Sep 2010 21:33:12 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward20.mail.yandex.net (forward20.mail.yandex.net [95.108.253.145]) by mx1.freebsd.org (Postfix) with ESMTP id F34AF8FC21 for ; Wed, 15 Sep 2010 21:33:11 +0000 (UTC) Received: from smtp17.mail.yandex.net (smtp17.mail.yandex.net [95.108.252.17]) by forward20.mail.yandex.net (Yandex) with ESMTP id 24F6B5D104A8; Thu, 16 Sep 2010 01:16:02 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1284585362; bh=kO5hikGBkwYaefMvW3xlUmCTcUSAPUQ1QclDjbp40Vw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=bmfBkiJbwV6OB5inPLB6FE42E9GHL9jDWhLyKMo9nY78UBoPDjkNCSPGNWUaY85P/ m7Ifm0NKe28u8A+jXgtSlFHZIwYd7/HsDahICdu3CrG123DGFVgomyizwO1m0JnGY6 dUH9Z4MqTA48VCyQY9z46YhYa+d67pUWoDORWIZk= Received: from [10.43.163.197] (bu7cher.heavennet.ru [92.39.76.197]) by smtp17.mail.yandex.net (Yandex) with ESMTPSA id 7A21F3070056; Thu, 16 Sep 2010 01:16:01 +0400 (MSD) Message-ID: <4C913764.70507@yandex.ru> Date: Thu, 16 Sep 2010 01:15:16 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100806 Thunderbird/3.1.2 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201009152059.o8FKxDi2050697@svn.freebsd.org> In-Reply-To: <201009152059.o8FKxDi2050697@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig14F13EE8BD6AEB9A39927A3E" X-Yandex-TimeMark: 1284585362 X-Yandex-Spam: 1 X-Yandex-Front: smtp17.mail.yandex.net Cc: svn-src-all@freebsd.org, Marcel Moolenaar Subject: Re: svn commit: r212703 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:33:12 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig14F13EE8BD6AEB9A39927A3E Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 16.09.2010 00:59, Pawel Jakub Dawidek wrote: > Note there is still no information about 'partcode' being written to = disk > (gpart bootcode -p ). There is one problem. Partcode is not being written by kernel and i think we should add a BUGS section into man page about it. Currently gpart has very usable feature - commit/undo when "-f" flag is used. But it will not work with `gpart bootcode -p` because partcode is being written in userspace and can't be commited later. > Maybe in the future all the messages printed by gpart(8) on success c= ould be > hidden under -v? +1 --=20 WBR, Andrey V. Elsukov --------------enig14F13EE8BD6AEB9A39927A3E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBAgAGBQJMkTdqAAoJEAHF6gQQyKF6kCEH/iZPuvZA2osAqr3faEWew2Ee 5Y4AVjNMoES9CTOi1yIK8m6bxX7AK3fxQyPjKuNmC14Ng2HrTNhqMoRpmSmjwXbq X4HpNhFI1fdM3zlc7xVtHgTgWyTAtlEppX/9wzQU188F8o0jdq2yAmKQIPQlolsh QPV5Kg3zCs3IORlEvS60ODBJUfyVLv+RvPE8qId4Esk4XIMaUBIIiA0BODnQVYzO 9k1jyZM14CoSY1ImnjPy0LdZMZYk6ejsnHIFaVxKMdGSlfLnpO3UYmFKSPV+r6ZK b1r7j2TgO6mgun1NFV1qoggjudYFytGgEiXlkQ9E/osXvCtbOVrR5VCbwgR24t4= =p35H -----END PGP SIGNATURE----- --------------enig14F13EE8BD6AEB9A39927A3E-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:37:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B206106566C; Wed, 15 Sep 2010 21:37:27 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A13D8FC14; Wed, 15 Sep 2010 21:37:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FLbQMO051735; Wed, 15 Sep 2010 21:37:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FLbQqm051733; Wed, 15 Sep 2010 21:37:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009152137.o8FLbQqm051733@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 15 Sep 2010 21:37:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212708 - head/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:37:27 -0000 Author: pjd Date: Wed Sep 15 21:37:26 2010 New Revision: 212708 URL: http://svn.freebsd.org/changeset/base/212708 Log: GPART_PARAM_INDEX is now G_TYPE_NUMBER. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Wed Sep 15 21:19:54 2010 (r212707) +++ head/sbin/geom/class/part/geom_part.c Wed Sep 15 21:37:26 2010 (r212708) @@ -285,12 +285,10 @@ gpart_autofill_resize(struct gctl_req *r off_t last, size, start, new_size; off_t lba, new_lba; const char *s; - char *val; int error, idx; - s = gctl_get_ascii(req, GPART_PARAM_INDEX); - idx = strtol(s, &val, 10); - if (idx < 1 || *s == '\0' || *val != '\0') + idx = (int)gctl_get_intmax(req, GPART_PARAM_INDEX); + if (idx < 1) errx(EXIT_FAILURE, "invalid partition index"); error = geom_gettree(&mesh); @@ -775,7 +773,6 @@ gpart_bootcode(struct gctl_req *req, uns struct gclass *classp; struct ggeom *gp; const char *s; - char *sp; void *bootcode, *partcode; size_t bootsize, partsize; int error, idx, vtoc8; @@ -830,9 +827,8 @@ gpart_bootcode(struct gctl_req *req, uns if (gctl_has_param(req, GPART_PARAM_INDEX)) { if (partcode == NULL) errx(EXIT_FAILURE, "-i is only valid with -p"); - s = gctl_get_ascii(req, GPART_PARAM_INDEX); - idx = strtol(s, &sp, 10); - if (idx < 1 || *s == '\0' || *sp != '\0') + idx = (int)gctl_get_intmax(req, GPART_PARAM_INDEX); + if (idx < 1) errx(EXIT_FAILURE, "invalid partition index"); error = gctl_delete_param(req, GPART_PARAM_INDEX); if (error) From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:44:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E07A1065673; Wed, 15 Sep 2010 21:44:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C3958FC0A; Wed, 15 Sep 2010 21:44:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FLiVpe051926; Wed, 15 Sep 2010 21:44:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FLiVmb051922; Wed, 15 Sep 2010 21:44:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009152144.o8FLiVmb051922@svn.freebsd.org> From: Marius Strobl Date: Wed, 15 Sep 2010 21:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212709 - in head/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:44:31 -0000 Author: marius Date: Wed Sep 15 21:44:31 2010 New Revision: 212709 URL: http://svn.freebsd.org/changeset/base/212709 Log: Add a VIS-based block copy function for SPARC64 V and later, which additionally takes advantage of the prefetch cache of these CPUs. Unlike the uncommitted US-III version, which provide no measurable speedup or even resulted in a slight slowdown on certain CPUs models compared to using the US-I version with these, the SPARC64 version actually results in a slight improvement. Modified: head/sys/sparc64/include/md_var.h head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/support.S Modified: head/sys/sparc64/include/md_var.h ============================================================================== --- head/sys/sparc64/include/md_var.h Wed Sep 15 21:37:26 2010 (r212708) +++ head/sys/sparc64/include/md_var.h Wed Sep 15 21:44:31 2010 (r212709) @@ -58,6 +58,8 @@ struct md_utrap *utrap_hold(struct md_ut cpu_block_copy_t spitfire_block_copy; cpu_block_zero_t spitfire_block_zero; +cpu_block_copy_t zeus_block_copy; +cpu_block_zero_t zeus_block_zero; extern cpu_block_copy_t *cpu_block_copy; extern cpu_block_zero_t *cpu_block_zero; Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Wed Sep 15 21:37:26 2010 (r212708) +++ head/sys/sparc64/sparc64/machdep.c Wed Sep 15 21:44:31 2010 (r212709) @@ -495,7 +495,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_l if (cpu_use_vis) { switch (cpu_impl) { case CPU_IMPL_SPARC64: - case CPU_IMPL_SPARC64V: case CPU_IMPL_ULTRASPARCI: case CPU_IMPL_ULTRASPARCII: case CPU_IMPL_ULTRASPARCIIi: @@ -509,6 +508,12 @@ sparc64_init(caddr_t mdp, u_long o1, u_l cpu_block_copy = spitfire_block_copy; cpu_block_zero = spitfire_block_zero; break; + case CPU_IMPL_SPARC64V: + cpu_block_copy = zeus_block_copy; + cpu_block_zero = zeus_block_zero; + cpu_block_copy = spitfire_block_copy; + cpu_block_zero = spitfire_block_zero; + break; } } Modified: head/sys/sparc64/sparc64/support.S ============================================================================== --- head/sys/sparc64/sparc64/support.S Wed Sep 15 21:37:26 2010 (r212708) +++ head/sys/sparc64/sparc64/support.S Wed Sep 15 21:44:31 2010 (r212709) @@ -661,8 +661,121 @@ ENTRY(spitfire_block_copy) END(spitfire_block_copy) /* + * void zeus_block_copy(void *src, void *dst, size_t len) + */ +ENTRY(zeus_block_copy) + prefetch [%o0 + (0 * 64)], 0 + + rdpr %pil, %o3 + wrpr %g0, PIL_TICK, %pil + + wr %g0, ASI_BLK_S, %asi + wr %g0, FPRS_FEF, %fprs + + sub PCB_REG, TF_SIZEOF, %o4 + ldx [%o4 + TF_FPRS], %o5 + andcc %o5, FPRS_FEF, %g0 + bz,a,pt %xcc, 1f + nop + stda %f0, [PCB_REG + PCB_UFP + (0 * 64)] %asi + stda %f16, [PCB_REG + PCB_UFP + (1 * 64)] %asi + stda %f32, [PCB_REG + PCB_UFP + (2 * 64)] %asi + stda %f48, [PCB_REG + PCB_UFP + (3 * 64)] %asi + membar #Sync + + andn %o5, FPRS_FEF, %o5 + stx %o5, [%o4 + TF_FPRS] + ldx [PCB_REG + PCB_FLAGS], %o4 + or %o4, PCB_FEF, %o4 + stx %o4, [PCB_REG + PCB_FLAGS] + +1: wrpr %o3, 0, %pil + + ldd [%o0 + (0 * 8)], %f0 + prefetch [%o0 + (1 * 64)], 0 + ldd [%o0 + (1 * 8)], %f2 + prefetch [%o0 + (2 * 64)], 0 + fmovd %f0, %f32 + ldd [%o0 + (2 * 8)], %f4 + prefetch [%o0 + (3 * 64)], 0 + fmovd %f2, %f34 + ldd [%o0 + (3 * 8)], %f6 + prefetch [%o0 + (4 * 64)], 1 + fmovd %f4, %f36 + ldd [%o0 + (4 * 8)], %f8 + prefetch [%o0 + (8 * 64)], 1 + fmovd %f6, %f38 + ldd [%o0 + (5 * 8)], %f10 + prefetch [%o0 + (12 * 64)], 1 + fmovd %f8, %f40 + ldd [%o0 + (6 * 8)], %f12 + prefetch [%o0 + (16 * 64)], 1 + fmovd %f10, %f42 + ldd [%o0 + (7 * 8)], %f14 + ldd [%o0 + (8 * 8)], %f0 + sub %o2, 64, %o2 + add %o0, 64, %o0 + prefetch [%o0 + (19 * 64)], 1 + ba,pt %xcc, 2f + prefetch [%o0 + (23 * 64)], 1 + .align 32 + +2: ldd [%o0 + (1 * 8)], %f2 + fmovd %f12, %f44 + ldd [%o0 + (2 * 8)], %f4 + fmovd %f14, %f46 + stda %f32, [%o1] %asi + ldd [%o0 + (3 * 8)], %f6 + fmovd %f0, %f32 + ldd [%o0 + (4 * 8)], %f8 + fmovd %f2, %f34 + ldd [%o0 + (5 * 8)], %f10 + fmovd %f4, %f36 + ldd [%o0 + (6 * 8)], %f12 + fmovd %f6, %f38 + ldd [%o0 + (7 * 8)], %f14 + fmovd %f8, %f40 + ldd [%o0 + (8 * 8)], %f0 + fmovd %f10, %f42 + sub %o2, 64, %o2 + prefetch [%o0 + (3 * 64)], 0 + add %o1, 64, %o1 + prefetch [%o0 + (24 * 64)], 1 + add %o0, 64, %o0 + cmp %o2, 64 + 8 + bgu,pt %xcc, 2b + prefetch [%o0 + (12 * 64)], 1 + ldd [%o0 + (1 * 8)], %f2 + fsrc1 %f12, %f44 + ldd [%o0 + (2 * 8)], %f4 + fsrc1 %f14, %f46 + stda %f32, [%o1] %asi + ldd [%o0 + (3 * 8)], %f6 + fsrc1 %f0, %f32 + ldd [%o0 + (4 * 8)], %f8 + fsrc1 %f2, %f34 + ldd [%o0 + (5 * 8)], %f10 + fsrc1 %f4, %f36 + ldd [%o0 + (6 * 8)], %f12 + fsrc1 %f6, %f38 + ldd [%o0 + (7 * 8)], %f14 + fsrc1 %f8, %f40 + add %o1, 64, %o1 + fsrc1 %f10, %f42 + fsrc1 %f12, %f44 + fsrc1 %f14, %f46 + stda %f32, [%o1] %asi + membar #Sync + + retl + wr %g0, 0, %fprs +END(zeus_block_copy) + +/* * void spitfire_block_zero(void *dst, size_t len) + * void zeus_block_zero(void *dst, size_t len) */ +ALTENTRY(zeus_block_zero) ENTRY(spitfire_block_zero) rdpr %pil, %o3 wrpr %g0, PIL_TICK, %pil From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:50:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461391065693; Wed, 15 Sep 2010 21:50:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ABE28FC2E; Wed, 15 Sep 2010 21:50:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FLobgL052106; Wed, 15 Sep 2010 21:50:38 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FLobrJ052104; Wed, 15 Sep 2010 21:50:37 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201009152150.o8FLobrJ052104@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 15 Sep 2010 21:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212710 - head/sys/dev/cxgb/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:50:38 -0000 Author: np Date: Wed Sep 15 21:50:37 2010 New Revision: 212710 URL: http://svn.freebsd.org/changeset/base/212710 Log: Fix t3_gate_rx_traffic and t3_open_rx_traffic. Parts of them always operated on XGMAC0 instead of the specified XGMAC. MFC after: 3 days Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Sep 15 21:44:31 2010 (r212709) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Sep 15 21:50:37 2010 (r212710) @@ -1441,16 +1441,18 @@ static void t3_gate_rx_traffic(struct cm t3_mac_disable_exact_filters(mac); /* stop broadcast, multicast, promiscuous mode traffic */ - *rx_cfg = t3_read_reg(mac->adapter, A_XGM_RX_CFG); - t3_set_reg_field(mac->adapter, A_XGM_RX_CFG, + *rx_cfg = t3_read_reg(mac->adapter, A_XGM_RX_CFG + mac->offset); + t3_set_reg_field(mac->adapter, A_XGM_RX_CFG + mac->offset, F_ENHASHMCAST | F_DISBCAST | F_COPYALLFRAMES, F_DISBCAST); - *rx_hash_high = t3_read_reg(mac->adapter, A_XGM_RX_HASH_HIGH); - t3_write_reg(mac->adapter, A_XGM_RX_HASH_HIGH, 0); - - *rx_hash_low = t3_read_reg(mac->adapter, A_XGM_RX_HASH_LOW); - t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW, 0); + *rx_hash_high = t3_read_reg(mac->adapter, A_XGM_RX_HASH_HIGH + + mac->offset); + t3_write_reg(mac->adapter, A_XGM_RX_HASH_HIGH + mac->offset, 0); + + *rx_hash_low = t3_read_reg(mac->adapter, A_XGM_RX_HASH_LOW + + mac->offset); + t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW + mac->offset, 0); /* Leave time to drain max RX fifo */ msleep(1); @@ -1460,11 +1462,13 @@ static void t3_open_rx_traffic(struct cm u32 rx_hash_high, u32 rx_hash_low) { t3_mac_enable_exact_filters(mac); - t3_set_reg_field(mac->adapter, A_XGM_RX_CFG, + t3_set_reg_field(mac->adapter, A_XGM_RX_CFG + mac->offset, F_ENHASHMCAST | F_DISBCAST | F_COPYALLFRAMES, rx_cfg); - t3_write_reg(mac->adapter, A_XGM_RX_HASH_HIGH, rx_hash_high); - t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW, rx_hash_low); + t3_write_reg(mac->adapter, A_XGM_RX_HASH_HIGH + mac->offset, + rx_hash_high); + t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW + mac->offset, + rx_hash_low); } static int t3_detect_link_fault(adapter_t *adapter, int port_id) From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 21:53:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6CE2106564A; Wed, 15 Sep 2010 21:53:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B62BD8FC15; Wed, 15 Sep 2010 21:53:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FLrA3f052207; Wed, 15 Sep 2010 21:53:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FLrA8m052205; Wed, 15 Sep 2010 21:53:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152153.o8FLrA8m052205@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 21:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212711 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:53:10 -0000 Author: tuexen Date: Wed Sep 15 21:53:10 2010 New Revision: 212711 URL: http://svn.freebsd.org/changeset/base/212711 Log: Use TAILQ_EMPTY() for testing if a tail queue is empty. Set whoFrom to NULL after freeing whoFrom. Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Wed Sep 15 21:50:37 2010 (r212710) +++ head/sys/netinet/sctp_indata.c Wed Sep 15 21:53:10 2010 (r212711) @@ -708,9 +708,10 @@ protocol_error: control->data = NULL; asoc->size_on_all_streams -= control->length; sctp_ucount_decr(asoc->cnt_on_all_streams); - if (control->whoFrom) + if (control->whoFrom) { sctp_free_remote_addr(control->whoFrom); - control->whoFrom = NULL; + control->whoFrom = NULL; + } sctp_free_a_readq(stcb, control); return; } else { @@ -4845,7 +4846,7 @@ sctp_handle_sack(struct mbuf *m, int off if (asoc->pr_sctp_cnt != 0) asoc->pr_sctp_cnt--; } - if ((TAILQ_FIRST(&asoc->sent_queue) == NULL) && + if (TAILQ_EMPTY(&asoc->sent_queue) && (asoc->total_flight > 0)) { #ifdef INVARIANTS panic("Warning flight size is postive and should be 0"); @@ -5818,7 +5819,7 @@ sctp_handle_forward_tsn(struct sctp_tcb */ sctp_slide_mapping_arrays(stcb); - if (TAILQ_FIRST(&asoc->reasmqueue)) { + if (!TAILQ_EMPTY(&asoc->reasmqueue)) { /* now lets kick out and check for more fragmented delivery */ /* sa_ignore NO_NULL_CHK */ sctp_deliver_reasm_check(stcb, &stcb->asoc); From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 23:10:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B236F1065673; Wed, 15 Sep 2010 23:10:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A04F48FC08; Wed, 15 Sep 2010 23:10:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FNAjuP053904; Wed, 15 Sep 2010 23:10:45 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FNAjbX053895; Wed, 15 Sep 2010 23:10:45 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152310.o8FNAjbX053895@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 23:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212712 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 23:10:45 -0000 Author: tuexen Date: Wed Sep 15 23:10:45 2010 New Revision: 212712 URL: http://svn.freebsd.org/changeset/base/212712 Log: Delay the assignment of a path for DATA chunk until they hit the sent_queue. Honor a given path when the SCTP_ADDR_OVER flag is set. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_asconf.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctp_asconf.c Wed Sep 15 23:10:45 2010 (r212712) @@ -581,8 +581,8 @@ sctp_process_asconf_set_primary(struct m } if (sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_BASE)) { - sctp_move_chunks_from_deleted_prim(stcb, - stcb->asoc.primary_destination); + sctp_move_chunks_from_net(stcb, + stcb->asoc.deleted_primary); } sctp_delete_prim_timer(stcb->sctp_ep, stcb, stcb->asoc.deleted_primary); @@ -1041,47 +1041,6 @@ sctp_asconf_nets_cleanup(struct sctp_tcb } } -void -sctp_move_chunks_from_deleted_prim(struct sctp_tcb *stcb, struct sctp_nets *dst) -{ - struct sctp_association *asoc; - struct sctp_stream_out *outs; - struct sctp_tmit_chunk *chk; - struct sctp_stream_queue_pending *sp; - - if (dst->dest_state & SCTP_ADDR_UNCONFIRMED) { - return; - } - if (stcb->asoc.deleted_primary == NULL) { - return; - } - asoc = &stcb->asoc; - - /* - * now through all the streams checking for chunks sent to our bad - * network. - */ - TAILQ_FOREACH(outs, &asoc->out_wheel, next_spoke) { - /* now clean up any chunks here */ - TAILQ_FOREACH(sp, &outs->outqueue, next) { - if (sp->net == asoc->deleted_primary) { - sctp_free_remote_addr(sp->net); - sp->net = dst; - atomic_add_int(&dst->ref_count, 1); - } - } - } - /* Now check the pending queue */ - TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) { - if (chk->whoTo == asoc->deleted_primary) { - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = dst; - atomic_add_int(&dst->ref_count, 1); - } - } - -} - void sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, struct sctp_nets *dstnet) @@ -2080,13 +2039,11 @@ sctp_asconf_iterator_ep(struct sctp_inpc struct sctp_asconf_iterator *asc; struct sctp_ifa *ifa; struct sctp_laddr *l; - int type; int cnt_invalid = 0; asc = (struct sctp_asconf_iterator *)ptr; LIST_FOREACH(l, &asc->list_of_work, sctp_nxt_addr) { ifa = l->ifa; - type = l->action; if (ifa->address.sa.sa_family == AF_INET6) { /* invalid if we're not a v6 endpoint */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) { Modified: head/sys/netinet/sctp_asconf.h ============================================================================== --- head/sys/netinet/sctp_asconf.h Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctp_asconf.h Wed Sep 15 23:10:45 2010 (r212712) @@ -80,8 +80,6 @@ sctp_check_address_list(struct sctp_tcb struct sockaddr *, uint16_t, uint16_t, uint16_t, uint16_t); extern void - sctp_move_chunks_from_deleted_prim(struct sctp_tcb *, struct sctp_nets *); -extern void sctp_assoc_immediate_retrans(struct sctp_tcb *, struct sctp_nets *); extern void sctp_net_immediate_retrans(struct sctp_tcb *, struct sctp_nets *); Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctp_input.c Wed Sep 15 23:10:45 2010 (r212712) @@ -232,7 +232,10 @@ sctp_is_there_unsent_data(struct sctp_tc } atomic_subtract_int(&stcb->asoc.stream_queue_cnt, 1); TAILQ_REMOVE(&strq->outqueue, sp, next); - sctp_free_remote_addr(sp->net); + if (sp->net) { + sctp_free_remote_addr(sp->net); + sp->net = NULL; + } if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -263,7 +266,7 @@ sctp_process_init(struct sctp_init_chunk /* save off parameters */ asoc->peer_vtag = ntohl(init->initiate_tag); asoc->peers_rwnd = ntohl(init->a_rwnd); - if (TAILQ_FIRST(&asoc->nets)) { + if (!TAILQ_EMPTY(&asoc->nets)) { /* update any ssthresh's that may have a default */ TAILQ_FOREACH(lnet, &asoc->nets, sctp_next) { lnet->ssthresh = asoc->peers_rwnd; @@ -318,8 +321,10 @@ sctp_process_init(struct sctp_init_chunk sctp_m_freem(sp->data); sp->data = NULL; } - sctp_free_remote_addr(sp->net); - sp->net = NULL; + if (sp->net) { + sctp_free_remote_addr(sp->net); + sp->net = NULL; + } /* Free the chunk */ sctp_free_a_strmoq(stcb, sp); /* sa_ignore FREED_MEMORY */ @@ -650,8 +655,8 @@ sctp_handle_heartbeat_ack(struct sctp_he } if (sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_BASE)) { - sctp_move_chunks_from_deleted_prim(stcb, - stcb->asoc.primary_destination); + sctp_move_chunks_from_net(stcb, + stcb->asoc.deleted_primary); } sctp_delete_prim_timer(stcb->sctp_ep, stcb, stcb->asoc.deleted_primary); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctp_output.c Wed Sep 15 23:10:45 2010 (r212712) @@ -5911,10 +5911,10 @@ sctp_msg_append(struct sctp_tcb *stcb, sp->strseq = 0; if (sp->sinfo_flags & SCTP_ADDR_OVER) { sp->net = net; + atomic_add_int(&sp->net->ref_count, 1); } else { - sp->net = stcb->asoc.primary_destination; + sp->net = NULL; } - atomic_add_int(&sp->net->ref_count, 1); (void)SCTP_GETTIME_TIMEVAL(&sp->ts); sp->stream = srcv->sinfo_stream; sp->msg_is_complete = 1; @@ -6513,7 +6513,6 @@ sctp_toss_old_asconf(struct sctp_tcb *st static void sctp_clean_up_datalist(struct sctp_tcb *stcb, - struct sctp_association *asoc, struct sctp_tmit_chunk **data_list, int bundle_at, @@ -6524,7 +6523,9 @@ sctp_clean_up_datalist(struct sctp_tcb * for (i = 0; i < bundle_at; i++) { /* off of the send queue */ - if (i) { + TAILQ_REMOVE(&asoc->send_queue, data_list[i], sctp_next); + asoc->send_queue_cnt--; + if (i > 0) { /* * Any chunk NOT 0 you zap the time chunk 0 gets * zapped or set based on if a RTO measurment is @@ -6535,9 +6536,10 @@ sctp_clean_up_datalist(struct sctp_tcb * /* record time */ data_list[i]->sent_rcv_time = net->last_sent_time; data_list[i]->rec.data.fast_retran_tsn = data_list[i]->rec.data.TSN_seq; - TAILQ_REMOVE(&asoc->send_queue, - data_list[i], - sctp_next); + if (data_list[i]->whoTo == NULL) { + data_list[i]->whoTo = net; + atomic_add_int(&net->ref_count, 1); + } /* on to the sent queue */ tp1 = TAILQ_LAST(&asoc->sent_queue, sctpchunk_listhead); if ((tp1) && (compare_with_wrap(tp1->rec.data.TSN_seq, @@ -6565,7 +6567,6 @@ sctp_clean_up_datalist(struct sctp_tcb * all_done: /* This does not lower until the cum-ack passes it */ asoc->sent_queue_cnt++; - asoc->send_queue_cnt--; if ((asoc->peers_rwnd <= 0) && (asoc->total_flight == 0) && (bundle_at == 1)) { @@ -6703,7 +6704,7 @@ sctp_can_we_split_this(struct sctp_tcb * } static uint32_t -sctp_move_to_outqueue(struct sctp_tcb *stcb, struct sctp_nets *net, +sctp_move_to_outqueue(struct sctp_tcb *stcb, struct sctp_stream_out *strq, uint32_t goal_mtu, uint32_t frag_point, @@ -6772,7 +6773,10 @@ one_more_time: } atomic_subtract_int(&asoc->stream_queue_cnt, 1); TAILQ_REMOVE(&strq->outqueue, sp, next); - sctp_free_remote_addr(sp->net); + if (sp->net) { + sctp_free_remote_addr(sp->net); + sp->net = NULL; + } if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -7089,8 +7093,11 @@ dont_do_it: chk->rec.data.timetodrop = sp->ts; chk->flags = sp->act_flags; - chk->whoTo = net; - atomic_add_int(&chk->whoTo->ref_count, 1); + if (sp->net) { + chk->whoTo = sp->net; + atomic_add_int(&chk->whoTo->ref_count, 1); + } else + chk->whoTo = NULL; if (sp->holds_key_ref) { chk->auth_keyid = sp->auth_keyid; @@ -7175,7 +7182,10 @@ dont_do_it: send_lock_up = 1; } TAILQ_REMOVE(&strq->outqueue, sp, next); - sctp_free_remote_addr(sp->net); + if (sp->net) { + sctp_free_remote_addr(sp->net); + sp->net = NULL; + } if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -7248,31 +7258,29 @@ sctp_fill_outqueue(struct sctp_tcb *stcb goal_mtu &= 0xfffffffc; if (asoc->locked_on_sending) { /* We are stuck on one stream until the message completes. */ - strqn = strq = asoc->locked_on_sending; + strq = asoc->locked_on_sending; locked = 1; } else { - strqn = strq = sctp_select_a_stream(stcb, asoc); + strq = sctp_select_a_stream(stcb, asoc); locked = 0; } - + strqn = strq; while ((goal_mtu > 0) && strq) { sp = TAILQ_FIRST(&strq->outqueue); - /* - * If CMT is off, we must validate that the stream in - * question has the first item pointed towards are network - * destionation requested by the caller. Note that if we - * turn out to be locked to a stream (assigning TSN's then - * we must stop, since we cannot look for another stream - * with data to send to that destination). In CMT's case, by - * skipping this check, we will send one data packet towards - * the requested net. - */ if (sp == NULL) { break; } - if ((sp->net != net) && - (asoc->sctp_cmt_on_off == 0)) { - /* none for this network */ + /** + * Honor the users' choice if given. If not given, + * pull it only to the primary path in case of not using + * CMT. + */ + if (((sp->net != NULL) && + (sp->net != net)) || + ((sp->net == NULL) && + (asoc->sctp_cmt_on_off == 0) && + (asoc->primary_destination != net))) { + /* Do not pull to this network */ if (locked) { break; } else { @@ -7289,7 +7297,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb } giveup = 0; bail = 0; - moved_how_much = sctp_move_to_outqueue(stcb, net, strq, goal_mtu, frag_point, &locked, + moved_how_much = sctp_move_to_outqueue(stcb, strq, goal_mtu, frag_point, &locked, &giveup, eeor_mode, &bail); if (moved_how_much) asoc->last_out_stream = strq; @@ -7353,43 +7361,32 @@ sctp_fix_ecn_echo(struct sctp_associatio } } -static void -sctp_move_to_an_alt(struct sctp_tcb *stcb, - struct sctp_association *asoc, - struct sctp_nets *net) +void +sctp_move_chunks_from_net(struct sctp_tcb *stcb, struct sctp_nets *net) { + struct sctp_association *asoc; + struct sctp_stream_out *outs; struct sctp_tmit_chunk *chk; - struct sctp_nets *a_net; + struct sctp_stream_queue_pending *sp; - SCTP_TCB_LOCK_ASSERT(stcb); - /* - * JRS 5/14/07 - If CMT PF is turned on, find an alternate - * destination using the PF algorithm for finding alternate - * destinations. - */ - if ((asoc->sctp_cmt_on_off == 1) && - (asoc->sctp_cmt_pf > 0)) { - a_net = sctp_find_alternate_net(stcb, net, 2); - } else { - a_net = sctp_find_alternate_net(stcb, net, 0); + if (net == NULL) { + return; } - if ((a_net != net) && - ((a_net->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE)) { - /* - * We only proceed if a valid alternate is found that is not - * this one and is reachable. Here we must move all chunks - * queued in the send queue off of the destination address - * to our alternate. - */ - TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) { - if (chk->whoTo == net) { - /* Move the chunk to our alternate */ - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = a_net; - atomic_add_int(&a_net->ref_count, 1); + asoc = &stcb->asoc; + TAILQ_FOREACH(outs, &asoc->out_wheel, next_spoke) { + TAILQ_FOREACH(sp, &outs->outqueue, next) { + if (sp->net == net) { + sctp_free_remote_addr(sp->net); + sp->net = NULL; } } } + TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) { + if (chk->whoTo == net) { + sctp_free_remote_addr(chk->whoTo); + chk->whoTo = NULL; + } + } } int @@ -7497,7 +7494,8 @@ sctp_med_chunk_output(struct sctp_inpcb * copy by reference (we hope). */ net->window_probe = 0; - if ((net->dest_state & SCTP_ADDR_NOT_REACHABLE) || (net->dest_state & SCTP_ADDR_UNCONFIRMED)) { + if ((net->dest_state & SCTP_ADDR_NOT_REACHABLE) || + (net->dest_state & SCTP_ADDR_UNCONFIRMED)) { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, 1, SCTP_CWND_LOG_FILL_OUTQ_CALLED); @@ -7505,6 +7503,7 @@ sctp_med_chunk_output(struct sctp_inpcb continue; } if ((asoc->sctp_cmt_on_off == 0) && + (asoc->primary_destination != net) && (net->ref_count < 2)) { /* nothing can be in queue for this guy */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { @@ -7534,9 +7533,9 @@ sctp_med_chunk_output(struct sctp_inpcb } /* now service each destination and send out what we can for it */ /* Nothing to send? */ - if ((TAILQ_FIRST(&asoc->control_send_queue) == NULL) && - (TAILQ_FIRST(&asoc->asconf_send_queue) == NULL) && - (TAILQ_FIRST(&asoc->send_queue) == NULL)) { + if (TAILQ_EMPTY(&asoc->control_send_queue) && + TAILQ_EMPTY(&asoc->asconf_send_queue) && + TAILQ_EMPTY(&asoc->send_queue)) { *reason_code = 8; return (0); } @@ -7566,15 +7565,17 @@ again_one_more_time: break; } tsns_sent = 0xa; - if ((asoc->sctp_cmt_on_off == 0) && (net->ref_count < 2)) { + if ((asoc->sctp_cmt_on_off == 0) && + (asoc->primary_destination != net) && + (net->ref_count < 2)) { /* * Ref-count of 1 so we cannot have data or control * queued to this address. Skip it (non-CMT). */ continue; } - if ((TAILQ_FIRST(&asoc->control_send_queue) == NULL) && - (TAILQ_FIRST(&asoc->asconf_send_queue) == NULL) && + if (TAILQ_EMPTY(&asoc->control_send_queue) && + TAILQ_EMPTY(&asoc->asconf_send_queue) && (net->flight_size >= net->cwnd)) { /* * Nothing on control or asconf and flight is full, @@ -7778,7 +7779,7 @@ again_one_more_time: * unreachable * during this send */ - sctp_move_to_an_alt(stcb, asoc, net); + sctp_move_chunks_from_net(stcb, net); } *reason_code = 7; continue; @@ -8001,7 +8002,7 @@ again_one_more_time: * unreachable * during this send */ - sctp_move_to_an_alt(stcb, asoc, net); + sctp_move_chunks_from_net(stcb, net); } *reason_code = 7; continue; @@ -8102,19 +8103,9 @@ again_one_more_time: break; } nchk = TAILQ_NEXT(chk, sctp_next); - if (asoc->sctp_cmt_on_off == 1) { - if (chk->whoTo != net) { - /* - * For CMT, steal the data - * to this network if its - * not set here. - */ - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = net; - atomic_add_int(&chk->whoTo->ref_count, 1); - } - } else if (chk->whoTo != net) { - /* No, not sent to this net */ + if ((chk->whoTo != NULL) && + (chk->whoTo != net)) { + /* Don't send the chunk on this net */ continue; } if ((chk->send_size > omtu) && ((chk->flags & CHUNK_FLAGS_FRAGMENT_OK) == 0)) { @@ -8330,7 +8321,7 @@ no_data_fill: * Destination went unreachable * during this send */ - sctp_move_to_an_alt(stcb, asoc, net); + sctp_move_chunks_from_net(stcb, net); } *reason_code = 6; /*- @@ -9584,7 +9575,7 @@ sctp_chunk_output(struct sctp_inpcb *inp * out wheel to this alternate address. */ if (net->ref_count > 1) - sctp_move_to_an_alt(stcb, asoc, net); + sctp_move_chunks_from_net(stcb, net); } else if ((asoc->sctp_cmt_on_off == 1) && (asoc->sctp_cmt_pf > 0) && ((net->dest_state & SCTP_ADDR_PF) == SCTP_ADDR_PF)) { @@ -9594,7 +9585,7 @@ sctp_chunk_output(struct sctp_inpcb *inp * to an alternate desination. */ if (net->ref_count > 1) - sctp_move_to_an_alt(stcb, asoc, net); + sctp_move_chunks_from_net(stcb, net); } else { /*- * if ((asoc->sat_network) || (net->addr_is_local)) @@ -12103,10 +12094,10 @@ skip_copy: } else { if (sp->sinfo_flags & SCTP_ADDR_OVER) { sp->net = net; + atomic_add_int(&sp->net->ref_count, 1); } else { - sp->net = asoc->primary_destination; + sp->net = NULL; } - atomic_add_int(&sp->net->ref_count, 1); sctp_set_prsctp_policy(sp); } out_now: Modified: head/sys/netinet/sctp_output.h ============================================================================== --- head/sys/netinet/sctp_output.h Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctp_output.h Wed Sep 15 23:10:45 2010 (r212712) @@ -129,6 +129,8 @@ void sctp_toss_old_asconf(struct sctp_tc void sctp_fix_ecn_echo(struct sctp_association *); +void sctp_move_chunks_from_net(struct sctp_tcb *stcb, struct sctp_nets *net); + int sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, struct mbuf *, struct thread *, int); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctp_pcb.c Wed Sep 15 23:10:45 2010 (r212712) @@ -4843,7 +4843,10 @@ sctp_free_assoc(struct sctp_inpcb *inp, sp->tail_mbuf = NULL; } } - sctp_free_remote_addr(sp->net); + if (sp->net) { + sctp_free_remote_addr(sp->net); + sp->net = NULL; + } sctp_free_spbufspace(stcb, asoc, sp); if (sp->holds_key_ref) sctp_auth_key_release(stcb, sp->auth_keyid); @@ -4914,7 +4917,10 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (chk->holds_key_ref) sctp_auth_key_release(stcb, chk->auth_keyid); ccnt++; - sctp_free_remote_addr(chk->whoTo); + if (chk->whoTo) { + sctp_free_remote_addr(chk->whoTo); + chk->whoTo = NULL; + } SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk); SCTP_DECR_CHK_COUNT(); /* sa_ignore FREED_MEMORY */ Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctp_timer.c Wed Sep 15 23:10:45 2010 (r212712) @@ -969,46 +969,6 @@ start_again: return (0); } -static void -sctp_move_all_chunks_to_alt(struct sctp_tcb *stcb, - struct sctp_nets *net, - struct sctp_nets *alt) -{ - struct sctp_association *asoc; - struct sctp_stream_out *outs; - struct sctp_tmit_chunk *chk; - struct sctp_stream_queue_pending *sp; - - if (net == alt) - /* nothing to do */ - return; - - asoc = &stcb->asoc; - - /* - * now through all the streams checking for chunks sent to our bad - * network. - */ - TAILQ_FOREACH(outs, &asoc->out_wheel, next_spoke) { - /* now clean up any chunks here */ - TAILQ_FOREACH(sp, &outs->outqueue, next) { - if (sp->net == net) { - sctp_free_remote_addr(sp->net); - sp->net = alt; - atomic_add_int(&alt->ref_count, 1); - } - } - } - /* Now check the pending queue */ - TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) { - if (chk->whoTo == net) { - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = alt; - atomic_add_int(&alt->ref_count, 1); - } - } - -} int sctp_t3rxt_timer(struct sctp_inpcb *inp, @@ -1141,7 +1101,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, } if (net->dest_state & SCTP_ADDR_NOT_REACHABLE) { /* Move all pending over too */ - sctp_move_all_chunks_to_alt(stcb, net, alt); + sctp_move_chunks_from_net(stcb, net); /* * Get the address that failed, to force a new src address @@ -1256,7 +1216,7 @@ sctp_t1init_timer(struct sctp_inpcb *inp alt = sctp_find_alternate_net(stcb, stcb->asoc.primary_destination, 0); if ((alt != NULL) && (alt != stcb->asoc.primary_destination)) { - sctp_move_all_chunks_to_alt(stcb, stcb->asoc.primary_destination, alt); + sctp_move_chunks_from_net(stcb, stcb->asoc.primary_destination); stcb->asoc.primary_destination = alt; } } @@ -1396,7 +1356,7 @@ sctp_strreset_timer(struct sctp_inpcb *i * If the address went un-reachable, we need to move to * alternates for ALL chk's in queue */ - sctp_move_all_chunks_to_alt(stcb, net, alt); + sctp_move_chunks_from_net(stcb, net); } /* mark the retran info */ if (strrst->sent != SCTP_DATAGRAM_RESEND) @@ -1487,8 +1447,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp * If the address went un-reachable, we need to move * to the alternate for ALL chunks in queue */ - sctp_move_all_chunks_to_alt(stcb, net, alt); - net = alt; + sctp_move_chunks_from_net(stcb, net); } /* mark the retran info */ if (asconf->sent != SCTP_DATAGRAM_RESEND) Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Sep 15 21:53:10 2010 (r212711) +++ head/sys/netinet/sctputil.c Wed Sep 15 23:10:45 2010 (r212712) @@ -2500,7 +2500,6 @@ sctp_mtu_size_reset(struct sctp_inpcb *i } eff_mtu = mtu - ovh; TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) { - if (chk->send_size > eff_mtu) { chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; } @@ -3763,9 +3762,10 @@ sctp_report_all_outbound(struct sctp_tcb sp->data = NULL; } } - if (sp->net) + if (sp->net) { sctp_free_remote_addr(sp->net); - sp->net = NULL; + sp->net = NULL; + } /* Free the chunk */ sctp_free_a_strmoq(stcb, sp); /* sa_ignore FREED_MEMORY */ @@ -4818,7 +4818,10 @@ next_on_sent: chk->rec.data.payloadtype = sp->ppid; chk->rec.data.context = sp->context; chk->flags = sp->act_flags; - chk->whoTo = sp->net; + if (sp->net) + chk->whoTo = sp->net; + else + chk->whoTo = stcb->asoc.primary_destination; atomic_add_int(&chk->whoTo->ref_count, 1); chk->rec.data.TSN_seq = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1); stcb->asoc.pr_sctp_cnt++; From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 23:40:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 860111065693; Wed, 15 Sep 2010 23:40:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 753298FC23; Wed, 15 Sep 2010 23:40:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FNeapH054572; Wed, 15 Sep 2010 23:40:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FNeaFN054570; Wed, 15 Sep 2010 23:40:36 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152340.o8FNeaFN054570@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 23:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212713 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 23:40:36 -0000 Author: tuexen Date: Wed Sep 15 23:40:36 2010 New Revision: 212713 URL: http://svn.freebsd.org/changeset/base/212713 Log: Remove unused variable/assignment. MFC after: 3 weeks. Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Sep 15 23:10:45 2010 (r212712) +++ head/sys/netinet/sctputil.c Wed Sep 15 23:40:36 2010 (r212713) @@ -5135,7 +5135,7 @@ sctp_sorecvmsg(struct socket *so, int my_len = 0; int cp_len = 0, error = 0; struct sctp_queued_to_read *control = NULL, *ctl = NULL, *nxt = NULL; - struct mbuf *m = NULL, *embuf = NULL; + struct mbuf *m = NULL; struct sctp_tcb *stcb = NULL; int wakeup_read_socket = 0; int freecnt_applied = 0; @@ -5731,7 +5731,6 @@ get_more_data: sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBRESULT, 0); } - embuf = m; copied_so_far += cp_len; freed_so_far += cp_len; freed_so_far += MSIZE; @@ -5783,7 +5782,6 @@ get_more_data: atomic_subtract_int(&stcb->asoc.sb_cc, cp_len); } copied_so_far += cp_len; - embuf = m; freed_so_far += cp_len; freed_so_far += MSIZE; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 23:56:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED2D91065672; Wed, 15 Sep 2010 23:56:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBCCA8FC12; Wed, 15 Sep 2010 23:56:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FNuP3L054921; Wed, 15 Sep 2010 23:56:25 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8FNuPqI054916; Wed, 15 Sep 2010 23:56:25 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009152356.o8FNuPqI054916@svn.freebsd.org> From: Michael Tuexen Date: Wed, 15 Sep 2010 23:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212714 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 23:56:26 -0000 Author: tuexen Date: Wed Sep 15 23:56:25 2010 New Revision: 212714 URL: http://svn.freebsd.org/changeset/base/212714 Log: Remove old debug code. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Sep 15 23:40:36 2010 (r212713) +++ head/sys/netinet/sctp_output.c Wed Sep 15 23:56:25 2010 (r212714) @@ -3803,9 +3803,6 @@ sctp_lowlevel_chunk_output(struct sctp_i mtu -= sizeof(struct udphdr); } if (mtu && (stcb->asoc.smallest_mtu > mtu)) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("sctp_mtu_size_reset called after ip_output mtu-change:%d\n", mtu); -#endif sctp_mtu_size_reset(inp, &stcb->asoc, mtu); net->mtu = mtu; } @@ -4134,10 +4131,6 @@ sctp_lowlevel_chunk_output(struct sctp_i mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_rt); if (mtu && (stcb->asoc.smallest_mtu > mtu)) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("sctp_mtu_size_reset called after ip6_output mtu-change:%d\n", - mtu); -#endif sctp_mtu_size_reset(inp, &stcb->asoc, mtu); net->mtu = mtu; if (net->port) { @@ -4147,10 +4140,6 @@ sctp_lowlevel_chunk_output(struct sctp_i } else if (ifp) { if (ND_IFINFO(ifp)->linkmtu && (stcb->asoc.smallest_mtu > ND_IFINFO(ifp)->linkmtu)) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("sctp_mtu_size_reset called via ifp ND_IFINFO() linkmtu:%d\n", - ND_IFINFO(ifp)->linkmtu); -#endif sctp_mtu_size_reset(inp, &stcb->asoc, ND_IFINFO(ifp)->linkmtu); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Sep 15 23:40:36 2010 (r212713) +++ head/sys/netinet/sctp_pcb.c Wed Sep 15 23:56:25 2010 (r212714) @@ -3916,9 +3916,6 @@ sctp_add_remote_addr(struct sctp_tcb *st } else { net->mtu = 0; } -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("We have found an interface mtu of %d\n", net->mtu); -#endif if (net->mtu == 0) { /* Huh ?? */ net->mtu = SCTP_DEFAULT_MTU; @@ -3926,9 +3923,6 @@ sctp_add_remote_addr(struct sctp_tcb *st uint32_t rmtu; rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_rt); -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("The route mtu is %d\n", rmtu); -#endif if (rmtu == 0) { /* * Start things off to match mtu of @@ -3946,9 +3940,6 @@ sctp_add_remote_addr(struct sctp_tcb *st } } if (from == SCTP_ALLOC_ASOC) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("New assoc sets mtu to :%d\n", net->mtu); -#endif stcb->asoc.smallest_mtu = net->mtu; } } else { @@ -3966,10 +3957,6 @@ sctp_add_remote_addr(struct sctp_tcb *st net->mtu -= sizeof(struct udphdr); } if (stcb->asoc.smallest_mtu > net->mtu) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("new address mtu:%d smaller than smallest:%d\n", - net->mtu, stcb->asoc.smallest_mtu); -#endif stcb->asoc.smallest_mtu = net->mtu; } /* JRS - Use the congestion control given in the CC module */ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed Sep 15 23:40:36 2010 (r212713) +++ head/sys/netinet/sctp_usrreq.c Wed Sep 15 23:56:25 2010 (r212714) @@ -111,10 +111,6 @@ sctp_pathmtu_adjustment(struct sctp_inpc /* Adjust that too */ stcb->asoc.smallest_mtu = nxtsz; /* now off to subtract IP_DF flag if needed */ -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("sctp_pathmtu_adjust called inp:%p stcb:%p net:%p nxtsz:%d\n", - inp, stcb, net, nxtsz); -#endif overhead = IP_HDR_SIZE; if (sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.peer_auth_chunks)) { overhead += sctp_get_auth_chunk_len(stcb->asoc.peer_hmac_id); @@ -215,10 +211,6 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, } /* now what about the ep? */ if (stcb->asoc.smallest_mtu > nxtsz) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("notify_mbuf (ICMP) calls sctp_pathmtu_adjust mtu:%d\n", - nxtsz); -#endif sctp_pathmtu_adjustment(inp, stcb, net, nxtsz); } if (tmr_stopped) @@ -3806,10 +3798,6 @@ sctp_setopt(struct socket *so, int optna if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) { net->mtu = paddrp->spp_pathmtu + ovh; if (net->mtu < stcb->asoc.smallest_mtu) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("SCTP_PMTU_DISABLE calls sctp_pathmtu_adjustment:%d\n", - net->mtu); -#endif sctp_pathmtu_adjustment(inp, stcb, net, net->mtu); } } @@ -3854,10 +3842,6 @@ sctp_setopt(struct socket *so, int optna if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) { net->mtu = paddrp->spp_pathmtu + ovh; if (net->mtu < stcb->asoc.smallest_mtu) { -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("SCTP_PMTU_DISABLE calls sctp_pathmtu_adjustment:%d\n", - net->mtu); -#endif sctp_pathmtu_adjustment(inp, stcb, net, net->mtu); } } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Sep 15 23:40:36 2010 (r212713) +++ head/sys/netinet/sctputil.c Wed Sep 15 23:56:25 2010 (r212714) @@ -1004,10 +1004,6 @@ sctp_init_asoc(struct sctp_inpcb *m, str asoc->peers_rwnd = SCTP_SB_LIMIT_RCV(m->sctp_socket); asoc->smallest_mtu = m->sctp_frag_point; -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("smallest_mtu init'd with asoc to :%d\n", - asoc->smallest_mtu); -#endif asoc->minrto = m->sctp_ep.sctp_minrto; asoc->maxrto = m->sctp_ep.sctp_maxrto; @@ -2488,10 +2484,6 @@ sctp_mtu_size_reset(struct sctp_inpcb *i struct sctp_tmit_chunk *chk; unsigned int eff_mtu, ovh; -#ifdef SCTP_PRINT_FOR_B_AND_M - SCTP_PRINTF("sctp_mtu_size_reset(%p, asoc:%p mtu:%d\n", - inp, asoc, mtu); -#endif asoc->smallest_mtu = mtu; if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { ovh = SCTP_MIN_OVERHEAD; From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 00:22:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B71E106564A; Thu, 16 Sep 2010 00:22:25 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5894B8FC19; Thu, 16 Sep 2010 00:22:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G0MPl0055541; Thu, 16 Sep 2010 00:22:25 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G0MPr5055534; Thu, 16 Sep 2010 00:22:25 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201009160022.o8G0MPr5055534@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 16 Sep 2010 00:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212715 - in head/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 00:22:25 -0000 Author: nwhitehorn Date: Thu Sep 16 00:22:25 2010 New Revision: 212715 URL: http://svn.freebsd.org/changeset/base/212715 Log: Replace the SLB backing store splay tree used on 64-bit PowerPC AIM hardware with a lockless sparse tree design. This marginally improves the performance of PMAP and allows copyin()/copyout() to run without acquiring locks when used on wired mappings. Submitted by: mdf Modified: head/sys/powerpc/aim/copyinout.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/slb.c head/sys/powerpc/aim/trap.c head/sys/powerpc/include/pcb.h head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/aim/copyinout.c ============================================================================== --- head/sys/powerpc/aim/copyinout.c Wed Sep 15 23:56:25 2010 (r212714) +++ head/sys/powerpc/aim/copyinout.c Thu Sep 16 00:22:25 2010 (r212715) @@ -80,16 +80,28 @@ int setfault(faultbuf); /* defined in lo static __inline void set_user_sr(pmap_t pm, const void *addr) { + struct slb *slb; register_t esid, vsid, slb1, slb2; esid = USER_ADDR >> ADDR_SR_SHFT; - PMAP_LOCK(pm); - vsid = va_to_vsid(pm, (vm_offset_t)addr); - PMAP_UNLOCK(pm); + + /* Try lockless look-up first */ + slb = user_va_to_slb_entry(pm, (vm_offset_t)addr); + + if (slb == NULL) { + /* If it isn't there, we need to pre-fault the VSID */ + PMAP_LOCK(pm); + vsid = va_to_vsid(pm, (vm_offset_t)addr); + PMAP_UNLOCK(pm); + } else { + vsid = slb->slbv >> SLBV_VSID_SHIFT; + } slb1 = vsid << SLBV_VSID_SHIFT; slb2 = (esid << SLBE_ESID_SHIFT) | SLBE_VALID | USER_SR; + curthread->td_pcb->pcb_cpu.aim.usr_segm = + (uintptr_t)addr >> ADDR_SR_SHFT; __asm __volatile ("slbie %0; slbmte %1, %2" :: "r"(esid << 28), "r"(slb1), "r"(slb2)); isync(); Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Sep 15 23:56:25 2010 (r212714) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Sep 16 00:22:25 2010 (r212715) @@ -2097,7 +2097,7 @@ moea64_pinit(mmu_t mmu, pmap_t pmap) { PMAP_LOCK_INIT(pmap); - SPLAY_INIT(&pmap->pm_slbtree); + pmap->pm_slb_tree_root = slb_alloc_tree(); pmap->pm_slb = slb_alloc_user_cache(); } #else @@ -2252,7 +2252,7 @@ moea64_release(mmu_t mmu, pmap_t pmap) * Free segment registers' VSIDs */ #ifdef __powerpc64__ - free_vsids(pmap); + slb_free_tree(pmap); slb_free_user_cache(pmap->pm_slb); #else KASSERT(pmap->pm_sr[0] != 0, ("moea64_release: pm_sr[0] = 0")); @@ -2622,18 +2622,25 @@ moea64_pvo_find_va(pmap_t pm, vm_offset_ int ptegidx; uint64_t vsid; #ifdef __powerpc64__ - struct slb slb; + uint64_t slbv; - /* The page is not mapped if the segment isn't */ - if (va_to_slb_entry(pm, va, &slb) != 0) - return NULL; + if (pm == kernel_pmap) { + slbv = kernel_va_to_slbv(va); + } else { + struct slb *slb; + slb = user_va_to_slb_entry(pm, va); + /* The page is not mapped if the segment isn't */ + if (slb == NULL) + return NULL; + slbv = slb->slbv; + } - vsid = (slb.slbv & SLBV_VSID_MASK) >> SLBV_VSID_SHIFT; - if (slb.slbv & SLBV_L) + vsid = (slbv & SLBV_VSID_MASK) >> SLBV_VSID_SHIFT; + if (slbv & SLBV_L) va &= ~moea64_large_page_mask; else va &= ~ADDR_POFF; - ptegidx = va_to_pteg(vsid, va, slb.slbv & SLBV_L); + ptegidx = va_to_pteg(vsid, va, slbv & SLBV_L); #else va &= ~ADDR_POFF; vsid = va_to_vsid(pm, va); Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Wed Sep 15 23:56:25 2010 (r212714) +++ head/sys/powerpc/aim/slb.c Thu Sep 16 00:22:25 2010 (r212715) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -45,65 +44,212 @@ uintptr_t moea64_get_unique_vsid(void); void moea64_release_vsid(uint64_t vsid); +static void slb_zone_init(void *); + +uma_zone_t slbt_zone; +uma_zone_t slb_cache_zone; -struct slbcontainer { - struct slb slb; - SPLAY_ENTRY(slbcontainer) slb_node; +SYSINIT(slb_zone_init, SI_SUB_KMEM, SI_ORDER_ANY, slb_zone_init, NULL); + +struct slbtnode { + uint16_t ua_alloc; + uint8_t ua_level; + /* Only 36 bits needed for full 64-bit address space. */ + uint64_t ua_base; + union { + struct slbtnode *ua_child[16]; + struct slb slb_entries[16]; + } u; }; -static int slb_compare(struct slbcontainer *a, struct slbcontainer *b); -static void slb_zone_init(void *); +/* + * For a full 64-bit address space, there are 36 bits in play in an + * esid, so 8 levels, with the leaf being at level 0. + * + * |3333|3322|2222|2222|1111|1111|11 | | | esid + * |5432|1098|7654|3210|9876|5432|1098|7654|3210| bits + * +----+----+----+----+----+----+----+----+----+-------- + * | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | level + */ +#define UAD_ROOT_LEVEL 8 +#define UAD_LEAF_LEVEL 0 + +static inline int +esid2idx(uint64_t esid, int level) +{ + int shift; -SPLAY_PROTOTYPE(slb_tree, slbcontainer, slb_node, slb_compare); -SPLAY_GENERATE(slb_tree, slbcontainer, slb_node, slb_compare); + shift = level * 4; + return ((esid >> shift) & 0xF); +} -uma_zone_t slb_zone; -uma_zone_t slb_cache_zone; +/* + * The ua_base field should have 0 bits after the first 4*(level+1) + * bits; i.e. only + */ +#define uad_baseok(ua) \ + (esid2base(ua->ua_base, ua->ua_level) == ua->ua_base) -SYSINIT(slb_zone_init, SI_SUB_KMEM, SI_ORDER_ANY, slb_zone_init, NULL); -int -va_to_slb_entry(pmap_t pm, vm_offset_t va, struct slb *slb) +static inline uint64_t +esid2base(uint64_t esid, int level) { - struct slbcontainer cont, *found; - uint64_t esid; + uint64_t mask; + int shift; - esid = (uintptr_t)va >> ADDR_SR_SHFT; - slb->slbe = (esid << SLBE_ESID_SHIFT) | SLBE_VALID; + shift = (level + 1) * 4; + mask = ~((1ULL << shift) - 1); + return (esid & mask); +} - if (pm == kernel_pmap) { - /* Set kernel VSID to deterministic value */ - slb->slbv = va_to_vsid(kernel_pmap, va) << SLBV_VSID_SHIFT; - - /* Figure out if this is a large-page mapping */ - if (hw_direct_map && va < VM_MIN_KERNEL_ADDRESS) { - /* - * XXX: If we have set up a direct map, assumes - * all physical memory is mapped with large pages. - */ - if (mem_valid(va, 0) == 0) - slb->slbv |= SLBV_L; - } - - return (0); - } +/* + * Allocate a new leaf node for the specified esid/vmhandle from the + * parent node. + */ +static struct slb * +make_new_leaf(uint64_t esid, uint64_t slbv, struct slbtnode *parent) +{ + struct slbtnode *child; + struct slb *retval; + int idx; + + idx = esid2idx(esid, parent->ua_level); + KASSERT(parent->u.ua_child[idx] == NULL, ("Child already exists!")); + + /* unlock and M_WAITOK and loop? */ + child = uma_zalloc(slbt_zone, M_NOWAIT | M_ZERO); + KASSERT(child != NULL, ("unhandled NULL case")); + + child->ua_level = UAD_LEAF_LEVEL; + child->ua_base = esid2base(esid, child->ua_level); + idx = esid2idx(esid, child->ua_level); + child->u.slb_entries[idx].slbv = slbv; + child->u.slb_entries[idx].slbe = (esid << SLBE_ESID_SHIFT) | SLBE_VALID; + setbit(&child->ua_alloc, idx); - PMAP_LOCK_ASSERT(pm, MA_OWNED); + retval = &child->u.slb_entries[idx]; + + /* + * The above stores must be visible before the next one, so + * that a lockless searcher always sees a valid path through + * the tree. + */ + powerpc_sync(); + + idx = esid2idx(esid, parent->ua_level); + parent->u.ua_child[idx] = child; + setbit(&parent->ua_alloc, idx); + + return (retval); +} + +/* + * Allocate a new intermediate node to fit between the parent and + * esid. + */ +static struct slbtnode* +make_intermediate(uint64_t esid, struct slbtnode *parent) +{ + struct slbtnode *child, *inter; + int idx, level; + + idx = esid2idx(esid, parent->ua_level); + child = parent->u.ua_child[idx]; + KASSERT(esid2base(esid, child->ua_level) != child->ua_base, + ("No need for an intermediate node?")); + + /* + * Find the level where the existing child and our new esid + * meet. It must be lower than parent->ua_level or we would + * have chosen a different index in parent. + */ + level = child->ua_level + 1; + while (esid2base(esid, level) != + esid2base(child->ua_base, level)) + level++; + KASSERT(level < parent->ua_level, + ("Found splitting level %d for %09jx and %09jx, " + "but it's the same as %p's", + level, esid, child->ua_base, parent)); + + /* unlock and M_WAITOK and loop? */ + inter = uma_zalloc(slbt_zone, M_NOWAIT | M_ZERO); + KASSERT(inter != NULL, ("unhandled NULL case")); + + /* Set up intermediate node to point to child ... */ + inter->ua_level = level; + inter->ua_base = esid2base(esid, inter->ua_level); + idx = esid2idx(child->ua_base, inter->ua_level); + inter->u.ua_child[idx] = child; + setbit(&inter->ua_alloc, idx); + powerpc_sync(); + + /* Set up parent to point to intermediate node ... */ + idx = esid2idx(inter->ua_base, parent->ua_level); + parent->u.ua_child[idx] = inter; + setbit(&parent->ua_alloc, idx); + + return (inter); +} + +uint64_t +kernel_va_to_slbv(vm_offset_t va) +{ + uint64_t esid, slbv; - cont.slb.slbe = slb->slbe; - found = SPLAY_FIND(slb_tree, &pm->pm_slbtree, &cont); + esid = (uintptr_t)va >> ADDR_SR_SHFT; - if (found == NULL) - return (-1); + /* Set kernel VSID to deterministic value */ + slbv = va_to_vsid(kernel_pmap, va) << SLBV_VSID_SHIFT; - slb->slbv = found->slb.slbv; - return (0); + /* Figure out if this is a large-page mapping */ + if (hw_direct_map && va < VM_MIN_KERNEL_ADDRESS) { + /* + * XXX: If we have set up a direct map, assumes + * all physical memory is mapped with large pages. + */ + if (mem_valid(va, 0) == 0) + slbv |= SLBV_L; + } + + return (slbv); +} + +struct slb * +user_va_to_slb_entry(pmap_t pm, vm_offset_t va) +{ + uint64_t esid = va >> ADDR_SR_SHFT; + struct slbtnode *ua; + int idx; + + ua = pm->pm_slb_tree_root; + + for (;;) { + KASSERT(uad_baseok(ua), ("uad base %016jx level %d bad!", + ua->ua_base, ua->ua_level)); + idx = esid2idx(esid, ua->ua_level); + + /* + * This code is specific to ppc64 where a load is + * atomic, so no need for atomic_load macro. + */ + if (ua->ua_level == UAD_LEAF_LEVEL) + return ((ua->u.slb_entries[idx].slbe & SLBE_VALID) ? + &ua->u.slb_entries[idx] : NULL); + + ua = ua->u.ua_child[idx]; + if (ua == NULL || + esid2base(esid, ua->ua_level) != ua->ua_base) + return (NULL); + } + + return (NULL); } uint64_t va_to_vsid(pmap_t pm, vm_offset_t va) { - struct slb entry; + struct slb *entry; /* Shortcut kernel case */ if (pm == kernel_pmap) @@ -114,56 +260,149 @@ va_to_vsid(pmap_t pm, vm_offset_t va) * to the PMAP's segment table. */ - if (va_to_slb_entry(pm, va, &entry) != 0) + entry = user_va_to_slb_entry(pm, va); + + if (entry == NULL) return (allocate_vsid(pm, (uintptr_t)va >> ADDR_SR_SHFT, 0)); - return ((entry.slbv & SLBV_VSID_MASK) >> SLBV_VSID_SHIFT); + return ((entry->slbv & SLBV_VSID_MASK) >> SLBV_VSID_SHIFT); } uint64_t allocate_vsid(pmap_t pm, uint64_t esid, int large) { - uint64_t vsid; - struct slbcontainer *slb_entry, kern_entry; - struct slb *prespill; - - prespill = NULL; - - if (pm == kernel_pmap) { - vsid = va_to_vsid(pm, esid << ADDR_SR_SHFT); - slb_entry = &kern_entry; - prespill = PCPU_GET(slb); - } else { - vsid = moea64_get_unique_vsid(); - slb_entry = uma_zalloc(slb_zone, M_NOWAIT); + uint64_t vsid, slbv; + struct slbtnode *ua, *next, *inter; + struct slb *slb; + int idx; - if (slb_entry == NULL) - panic("Could not allocate SLB mapping!"); - - prespill = pm->pm_slb; - } + KASSERT(pm != kernel_pmap, ("Attempting to allocate a kernel VSID")); - slb_entry->slb.slbe = (esid << SLBE_ESID_SHIFT) | SLBE_VALID; - slb_entry->slb.slbv = vsid << SLBV_VSID_SHIFT; + PMAP_LOCK_ASSERT(pm, MA_OWNED); + vsid = moea64_get_unique_vsid(); + slbv = vsid << SLBV_VSID_SHIFT; if (large) - slb_entry->slb.slbv |= SLBV_L; + slbv |= SLBV_L; + + ua = pm->pm_slb_tree_root; + + /* Descend to the correct leaf or NULL pointer. */ + for (;;) { + KASSERT(uad_baseok(ua), + ("uad base %09jx level %d bad!", ua->ua_base, ua->ua_level)); + idx = esid2idx(esid, ua->ua_level); + + if (ua->ua_level == UAD_LEAF_LEVEL) { + ua->u.slb_entries[idx].slbv = slbv; + eieio(); + ua->u.slb_entries[idx].slbe = (esid << SLBE_ESID_SHIFT) + | SLBE_VALID; + setbit(&ua->ua_alloc, idx); + slb = &ua->u.slb_entries[idx]; + break; + } + + next = ua->u.ua_child[idx]; + if (next == NULL) { + slb = make_new_leaf(esid, slbv, ua); + break; + } + + /* + * Check if the next item down has an okay ua_base. + * If not, we need to allocate an intermediate node. + */ + if (esid2base(esid, next->ua_level) != next->ua_base) { + inter = make_intermediate(esid, ua); + slb = make_new_leaf(esid, slbv, inter); + break; + } - if (pm != kernel_pmap) { - PMAP_LOCK_ASSERT(pm, MA_OWNED); - SPLAY_INSERT(slb_tree, &pm->pm_slbtree, slb_entry); + ua = next; } /* * Someone probably wants this soon, and it may be a wired * SLB mapping, so pre-spill this entry. */ - if (prespill != NULL) - slb_insert(pm, prespill, &slb_entry->slb); + eieio(); + slb_insert(pm, pm->pm_slb, slb); return (vsid); } +void +free_vsid(pmap_t pm, uint64_t esid, int large) +{ + struct slbtnode *ua; + int idx; + + PMAP_LOCK_ASSERT(pm, MA_OWNED); + + ua = pm->pm_slb_tree_root; + /* Descend to the correct leaf. */ + for (;;) { + KASSERT(uad_baseok(ua), + ("uad base %09jx level %d bad!", ua->ua_base, ua->ua_level)); + + idx = esid2idx(esid, ua->ua_level); + if (ua->ua_level == UAD_LEAF_LEVEL) { + ua->u.slb_entries[idx].slbv = 0; + eieio(); + ua->u.slb_entries[idx].slbe = 0; + clrbit(&ua->ua_alloc, idx); + return; + } + + ua = ua->u.ua_child[idx]; + if (ua == NULL || + esid2base(esid, ua->ua_level) != ua->ua_base) { + /* Perhaps just return instead of assert? */ + KASSERT(0, + ("Asked to remove an entry that was never inserted!")); + return; + } + } +} + +static void +free_slb_tree_node(struct slbtnode *ua) +{ + int idx; + + for (idx = 0; idx < 16; idx++) { + if (ua->ua_level != UAD_LEAF_LEVEL) { + if (ua->u.ua_child[idx] != NULL) + free_slb_tree_node(ua->u.ua_child[idx]); + } else { + if (ua->u.slb_entries[idx].slbv != 0) + moea64_release_vsid(ua->u.slb_entries[idx].slbv + >> SLBV_VSID_SHIFT); + } + } + + uma_zfree(slbt_zone, ua); +} + +void +slb_free_tree(pmap_t pm) +{ + + free_slb_tree_node(pm->pm_slb_tree_root); +} + +struct slbtnode * +slb_alloc_tree(void) +{ + struct slbtnode *root; + + root = uma_zalloc(slbt_zone, M_NOWAIT | M_ZERO); + root->ua_level = UAD_ROOT_LEVEL; + + return (root); +} + /* Lock entries mapping kernel text and stacks */ #define SLB_SPILLABLE(slbe) \ @@ -222,62 +461,12 @@ slb_insert(pmap_t pm, struct slb *slbcac critical_exit(); } -int -vsid_to_esid(pmap_t pm, uint64_t vsid, uint64_t *esid) -{ - uint64_t slbv; - struct slbcontainer *entry; - -#ifdef INVARIANTS - if (pm == kernel_pmap) - panic("vsid_to_esid only works on user pmaps"); - - PMAP_LOCK_ASSERT(pm, MA_OWNED); -#endif - - slbv = vsid << SLBV_VSID_SHIFT; - - SPLAY_FOREACH(entry, slb_tree, &pm->pm_slbtree) { - if (slbv == entry->slb.slbv) { - *esid = entry->slb.slbe >> SLBE_ESID_SHIFT; - return (0); - } - } - - return (-1); -} - -void -free_vsids(pmap_t pm) -{ - struct slbcontainer *entry; - - while (!SPLAY_EMPTY(&pm->pm_slbtree)) { - entry = SPLAY_MIN(slb_tree, &pm->pm_slbtree); - - SPLAY_REMOVE(slb_tree, &pm->pm_slbtree, entry); - - moea64_release_vsid(entry->slb.slbv >> SLBV_VSID_SHIFT); - uma_zfree(slb_zone, entry); - } -} - -static int -slb_compare(struct slbcontainer *a, struct slbcontainer *b) -{ - if (a->slb.slbe == b->slb.slbe) - return (0); - else if (a->slb.slbe < b->slb.slbe) - return (-1); - else - return (1); -} static void slb_zone_init(void *dummy) { - slb_zone = uma_zcreate("SLB segment", sizeof(struct slbcontainer), + slbt_zone = uma_zcreate("SLB tree node", sizeof(struct slbtnode), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); slb_cache_zone = uma_zcreate("SLB cache", 64*sizeof(struct slb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Wed Sep 15 23:56:25 2010 (r212714) +++ head/sys/powerpc/aim/trap.c Thu Sep 16 00:22:25 2010 (r212715) @@ -445,33 +445,37 @@ syscall(struct trapframe *frame) static int handle_slb_spill(pmap_t pm, vm_offset_t addr) { - struct slb slb_entry; - int error, i; + struct slb kern_entry, *user_entry; + uint64_t esid; + int i; + + esid = (uintptr_t)addr >> ADDR_SR_SHFT; if (pm == kernel_pmap) { - error = va_to_slb_entry(pm, addr, &slb_entry); - if (error) - return (error); + kern_entry.slbv = kernel_va_to_slbv(addr); + kern_entry.slbe = (esid << SLBE_ESID_SHIFT) | SLBE_VALID; - slb_insert(pm, PCPU_GET(slb), &slb_entry); + slb_insert(pm, PCPU_GET(slb), &kern_entry); return (0); } PMAP_LOCK(pm); - error = va_to_slb_entry(pm, addr, &slb_entry); - if (error != 0) - (void)allocate_vsid(pm, (uintptr_t)addr >> ADDR_SR_SHFT, 0); - else { + user_entry = user_va_to_slb_entry(pm, addr); + + if (user_entry == NULL) { + /* allocate_vsid auto-spills it */ + (void)allocate_vsid(pm, esid, 0); + } else { /* * Check that another CPU has not already mapped this. * XXX: Per-thread SLB caches would be better. */ for (i = 0; i < 64; i++) - if (pm->pm_slb[i].slbe == (slb_entry.slbe | i)) + if (pm->pm_slb[i].slbe == (user_entry->slbe | i)) break; if (i == 64) - slb_insert(pm, pm->pm_slb, &slb_entry); + slb_insert(pm, pm->pm_slb, user_entry); } PMAP_UNLOCK(pm); @@ -513,19 +517,7 @@ trap_pfault(struct trapframe *frame, int map = &p->p_vmspace->vm_map; #ifdef __powerpc64__ - user_sr = 0; - __asm ("slbmfev %0, %1" - : "=r"(user_sr) - : "r"(USER_SR)); - - PMAP_LOCK(&p->p_vmspace->vm_pmap); - user_sr >>= SLBV_VSID_SHIFT; - rv = vsid_to_esid(&p->p_vmspace->vm_pmap, user_sr, - &user_sr); - PMAP_UNLOCK(&p->p_vmspace->vm_pmap); - - if (rv != 0) - return (SIGSEGV); + user_sr = td->td_pcb->pcb_cpu.aim.usr_segm; #else __asm ("mfsr %0, %1" : "=r"(user_sr) Modified: head/sys/powerpc/include/pcb.h ============================================================================== --- head/sys/powerpc/include/pcb.h Wed Sep 15 23:56:25 2010 (r212714) +++ head/sys/powerpc/include/pcb.h Thu Sep 16 00:22:25 2010 (r212715) @@ -66,6 +66,7 @@ struct pcb { union { struct { + vm_offset_t usr_segm; /* Base address */ register_t usr_esid; /* USER_SR segment */ register_t usr_vsid; /* USER_SR segment */ } aim; Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Wed Sep 15 23:56:25 2010 (r212714) +++ head/sys/powerpc/include/pmap.h Thu Sep 16 00:22:25 2010 (r212715) @@ -86,15 +86,13 @@ struct pmap_md { #define NPMAPS 32768 #endif /* !defined(NPMAPS) */ -struct slbcontainer; - -SPLAY_HEAD(slb_tree, slbcontainer); +struct slbtnode; struct pmap { struct mtx pm_mtx; #ifdef __powerpc64__ - struct slb_tree pm_slbtree; + struct slbtnode *pm_slb_tree_root; struct slb *pm_slb; #else register_t pm_sr[16]; @@ -139,12 +137,17 @@ struct md_page { * NB: The PMAP MUST be locked already. */ uint64_t va_to_vsid(pmap_t pm, vm_offset_t va); -int va_to_slb_entry(pmap_t pm, vm_offset_t va, struct slb *); + +/* Lock-free, non-allocating lookup routines */ +uint64_t kernel_va_to_slbv(vm_offset_t va); +struct slb *user_va_to_slb_entry(pmap_t pm, vm_offset_t va); uint64_t allocate_vsid(pmap_t pm, uint64_t esid, int large); -void slb_insert(pmap_t pm, struct slb *dst, struct slb *); -int vsid_to_esid(pmap_t pm, uint64_t vsid, uint64_t *esid); -void free_vsids(pmap_t pm); +void free_vsid(pmap_t pm, uint64_t esid, int large); +void slb_insert(pmap_t pm, struct slb *dst, struct slb *); + +struct slbtnode *slb_alloc_tree(void); +void slb_free_tree(pmap_t pm); struct slb *slb_alloc_user_cache(void); void slb_free_user_cache(struct slb *); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 01:02:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AB4A106566C; Thu, 16 Sep 2010 01:02:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 378DA8FC14; Thu, 16 Sep 2010 01:02:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G12sH4056349; Thu, 16 Sep 2010 01:02:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G12sJT056347; Thu, 16 Sep 2010 01:02:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201009160102.o8G12sJT056347@svn.freebsd.org> From: Rick Macklem Date: Thu, 16 Sep 2010 01:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212716 - stable/8/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 01:02:54 -0000 Author: rmacklem Date: Thu Sep 16 01:02:53 2010 New Revision: 212716 URL: http://svn.freebsd.org/changeset/base/212716 Log: MFC: r212123 Modify nfs_diskless.c to recognize the environment variable boot.nfsroot.nfshandlelen and set the diskless root fs to use NFSv3 and this file handle length when it is set. If this environment variable is not set, the diskless root fs will use NFSv2 and the same defaults as before. This fixes the problem where the diskless nfs root fs had to be on a FreeBSD server for NFSv3 to work, because it did not know the correct file handle length and assumed the size used by FreeBSD. Modified: stable/8/sys/nfsclient/nfs_diskless.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsclient/nfs_diskless.c ============================================================================== --- stable/8/sys/nfsclient/nfs_diskless.c Thu Sep 16 00:22:25 2010 (r212715) +++ stable/8/sys/nfsclient/nfs_diskless.c Thu Sep 16 01:02:53 2010 (r212716) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); static int inaddr_to_sockaddr(char *ev, struct sockaddr_in *sa); static int hwaddr_to_sockaddr(char *ev, struct sockaddr_dl *sa); -static int decode_nfshandle(char *ev, u_char *fh); +static int decode_nfshandle(char *ev, u_char *fh, int maxfh); /* * Validate/sanity check a rsize/wsize parameter. @@ -143,20 +143,37 @@ nfs_parse_options(const char *envopts, s * boot.nfsroot.server IP address of root filesystem server * boot.nfsroot.path path of the root filesystem on server * boot.nfsroot.nfshandle NFS handle for root filesystem on server + * boot.nfsroot.nfshandlelen and length of this handle (for NFSv3 only) * boot.nfsroot.options NFS options for the root filesystem */ void nfs_setup_diskless(void) { struct nfs_diskless *nd = &nfs_diskless; + struct nfsv3_diskless *nd3 = &nfsv3_diskless; struct ifnet *ifp; struct ifaddr *ifa; struct sockaddr_dl *sdl, ourdl; struct sockaddr_in myaddr, netmask; char *cp; + int cnt, fhlen, is_nfsv3; + uint32_t len; - if (nfs_diskless_valid) + if (nfs_diskless_valid != 0) return; + + /* get handle size. If this succeeds, it's an NFSv3 setup. */ + if ((cp = getenv("boot.nfsroot.nfshandlelen")) != NULL) { + cnt = sscanf(cp, "%d", &len); + freeenv(cp); + if (cnt != 1 || len == 0 || len > NFSX_V3FHMAX) { + printf("nfs_diskless: bad NFS handle len\n"); + return; + } + nd3->root_fhsize = len; + is_nfsv3 = 1; + } else + is_nfsv3 = 0; /* set up interface */ if (inaddr_to_sockaddr("boot.netif.ip", &myaddr)) return; @@ -164,11 +181,21 @@ nfs_setup_diskless(void) printf("nfs_diskless: no netmask\n"); return; } - bcopy(&myaddr, &nd->myif.ifra_addr, sizeof(myaddr)); - bcopy(&myaddr, &nd->myif.ifra_broadaddr, sizeof(myaddr)); - ((struct sockaddr_in *) &nd->myif.ifra_broadaddr)->sin_addr.s_addr = - myaddr.sin_addr.s_addr | ~ netmask.sin_addr.s_addr; - bcopy(&netmask, &nd->myif.ifra_mask, sizeof(netmask)); + if (is_nfsv3 != 0) { + bcopy(&myaddr, &nd3->myif.ifra_addr, sizeof(myaddr)); + bcopy(&myaddr, &nd3->myif.ifra_broadaddr, sizeof(myaddr)); + ((struct sockaddr_in *) + &nd3->myif.ifra_broadaddr)->sin_addr.s_addr = + myaddr.sin_addr.s_addr | ~ netmask.sin_addr.s_addr; + bcopy(&netmask, &nd3->myif.ifra_mask, sizeof(netmask)); + } else { + bcopy(&myaddr, &nd->myif.ifra_addr, sizeof(myaddr)); + bcopy(&myaddr, &nd->myif.ifra_broadaddr, sizeof(myaddr)); + ((struct sockaddr_in *) + &nd->myif.ifra_broadaddr)->sin_addr.s_addr = + myaddr.sin_addr.s_addr | ~ netmask.sin_addr.s_addr; + bcopy(&netmask, &nd->myif.ifra_mask, sizeof(netmask)); + } if (hwaddr_to_sockaddr("boot.netif.hwaddr", &ourdl)) { printf("nfs_diskless: no hardware address\n"); @@ -196,46 +223,94 @@ nfs_setup_diskless(void) return; /* no matching interface */ match_done: setenv("boot.netif.name", ifp->if_xname); - strlcpy(nd->myif.ifra_name, ifp->if_xname, sizeof(nd->myif.ifra_name)); + if (is_nfsv3 != 0) { + strlcpy(nd3->myif.ifra_name, ifp->if_xname, + sizeof(nd3->myif.ifra_name)); - /* set up gateway */ - inaddr_to_sockaddr("boot.netif.gateway", &nd->mygateway); + /* set up gateway */ + inaddr_to_sockaddr("boot.netif.gateway", &nd3->mygateway); - /* set up root mount */ - nd->root_args.rsize = 8192; /* XXX tunable? */ - nd->root_args.wsize = 8192; - nd->root_args.sotype = SOCK_STREAM; - nd->root_args.flags = (NFSMNT_NFSV3 | NFSMNT_WSIZE | NFSMNT_RSIZE | NFSMNT_RESVPORT); - if (inaddr_to_sockaddr("boot.nfsroot.server", &nd->root_saddr)) { - printf("nfs_diskless: no server\n"); - return; - } - nd->root_saddr.sin_port = htons(NFS_PORT); - if (decode_nfshandle("boot.nfsroot.nfshandle", &nd->root_fh[0]) == 0) { - printf("nfs_diskless: no NFS handle\n"); - return; - } - if ((cp = getenv("boot.nfsroot.path")) != NULL) { - strncpy(nd->root_hostnam, cp, MNAMELEN - 1); - freeenv(cp); - } - if ((cp = getenv("boot.nfsroot.options")) != NULL) { - struct nfs_args args; + /* set up root mount */ + nd3->root_args.rsize = 32768; /* XXX tunable? */ + nd3->root_args.wsize = 32768; + nd3->root_args.sotype = SOCK_STREAM; + nd3->root_args.flags = (NFSMNT_NFSV3 | NFSMNT_WSIZE | + NFSMNT_RSIZE | NFSMNT_RESVPORT); + if (inaddr_to_sockaddr("boot.nfsroot.server", + &nd3->root_saddr)) { + printf("nfs_diskless: no server\n"); + return; + } + nd3->root_saddr.sin_port = htons(NFS_PORT); + fhlen = decode_nfshandle("boot.nfsroot.nfshandle", + &nd3->root_fh[0], NFSX_V3FHMAX); + if (fhlen == 0) { + printf("nfs_diskless: no NFS handle\n"); + return; + } + if (fhlen != nd3->root_fhsize) { + printf("nfs_diskless: bad NFS handle len=%d\n", fhlen); + return; + } + if ((cp = getenv("boot.nfsroot.path")) != NULL) { + strncpy(nd3->root_hostnam, cp, MNAMELEN - 1); + freeenv(cp); + } + if ((cp = getenv("boot.nfsroot.options")) != NULL) { + nfs_parse_options(cp, &nd3->root_args); + freeenv(cp); + } + + nfs_diskless_valid = 3; + } else { + strlcpy(nd->myif.ifra_name, ifp->if_xname, + sizeof(nd->myif.ifra_name)); + + /* set up gateway */ + inaddr_to_sockaddr("boot.netif.gateway", &nd->mygateway); - /* XXX yech, convert between old and current arg format */ - args.flags = nd->root_args.flags; - args.sotype = nd->root_args.sotype; - args.rsize = nd->root_args.rsize; - args.wsize = nd->root_args.wsize; - nfs_parse_options(cp, &args); - nd->root_args.flags = args.flags; - nd->root_args.sotype = args.sotype; - nd->root_args.rsize = args.rsize; - nd->root_args.wsize = args.wsize; - freeenv(cp); + /* set up root mount */ + nd->root_args.rsize = 8192; /* XXX tunable? */ + nd->root_args.wsize = 8192; + nd->root_args.sotype = SOCK_STREAM; + nd->root_args.flags = (NFSMNT_WSIZE | + NFSMNT_RSIZE | NFSMNT_RESVPORT); + if (inaddr_to_sockaddr("boot.nfsroot.server", + &nd->root_saddr)) { + printf("nfs_diskless: no server\n"); + return; + } + nd->root_saddr.sin_port = htons(NFS_PORT); + if (decode_nfshandle("boot.nfsroot.nfshandle", + &nd->root_fh[0], NFSX_V2FH) == 0) { + printf("nfs_diskless: no NFS handle\n"); + return; + } + if ((cp = getenv("boot.nfsroot.path")) != NULL) { + strncpy(nd->root_hostnam, cp, MNAMELEN - 1); + freeenv(cp); + } + if ((cp = getenv("boot.nfsroot.options")) != NULL) { + struct nfs_args args; + + /* + * XXX yech, convert between old and current + * arg format + */ + args.flags = nd->root_args.flags; + args.sotype = nd->root_args.sotype; + args.rsize = nd->root_args.rsize; + args.wsize = nd->root_args.wsize; + nfs_parse_options(cp, &args); + nd->root_args.flags = args.flags; + nd->root_args.sotype = args.sotype; + nd->root_args.rsize = args.rsize; + nd->root_args.wsize = args.wsize; + freeenv(cp); + } + + nfs_diskless_valid = 1; } - - nfs_diskless_valid = 1; } static int @@ -289,7 +364,7 @@ hwaddr_to_sockaddr(char *ev, struct sock } static int -decode_nfshandle(char *ev, u_char *fh) +decode_nfshandle(char *ev, u_char *fh, int maxfh) { u_char *cp, *ep; int len, val; @@ -315,7 +390,7 @@ decode_nfshandle(char *ev, u_char *fh) *(fh++) = val; len++; cp += 2; - if (len > NFSX_V2FH) { + if (len > maxfh) { freeenv(ep); return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 01:38:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B94591065679; Thu, 16 Sep 2010 01:38:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A64BC8FC1E; Thu, 16 Sep 2010 01:38:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G1cD1f057057; Thu, 16 Sep 2010 01:38:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G1cDo6057054; Thu, 16 Sep 2010 01:38:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201009160138.o8G1cDo6057054@svn.freebsd.org> From: Rick Macklem Date: Thu, 16 Sep 2010 01:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212717 - in stable/8: lib/libstand sys/boot/i386/libi386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 01:38:13 -0000 Author: rmacklem Date: Thu Sep 16 01:38:13 2010 New Revision: 212717 URL: http://svn.freebsd.org/changeset/base/212717 Log: MFC: r212125, r212126 Modify lib/libstand/nfs.c to use NFSv3 instead of NFSv2. This allows the nfs_getrootfh() function to return the correct file handle size to pxe.c for pxeboot. It also results in NFSv2 no longer being used by default anywhere in FreeBSD. If built with OLD_NFSV2 defined, the old code that predated this patch will be built and NFSv2 will be used. pxe.c is also modified to use this version of nfs_getrootfh() so that pxeboot will use NFSv3 and work for non-FreeBSD as well as FreeBSD NFS servers. Modified: stable/8/lib/libstand/nfs.c stable/8/sys/boot/i386/libi386/pxe.c Directory Properties: stable/8/lib/libstand/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/lib/libstand/nfs.c ============================================================================== --- stable/8/lib/libstand/nfs.c Thu Sep 16 01:02:53 2010 (r212716) +++ stable/8/lib/libstand/nfs.c Thu Sep 16 01:38:13 2010 (r212717) @@ -50,7 +50,10 @@ __FBSDID("$FreeBSD$"); #define NFS_DEBUGxx +#define NFSREAD_SIZE 1024 + /* Define our own NFS attributes without NQNFS stuff. */ +#ifdef OLD_NFSV2 struct nfsv2_fattrs { n_long fa_type; n_long fa_mode; @@ -68,7 +71,6 @@ struct nfsv2_fattrs { struct nfsv2_time fa_ctime; }; - struct nfs_read_args { u_char fh[NFS_FHSIZE]; n_long off; @@ -77,7 +79,6 @@ struct nfs_read_args { }; /* Data part of nfs rpc reply (also the largest thing we receive) */ -#define NFSREAD_SIZE 1024 struct nfs_read_repl { n_long errno; struct nfsv2_fattrs fa; @@ -116,6 +117,72 @@ struct nfs_iodesc { u_char fh[NFS_FHSIZE]; struct nfsv2_fattrs fa; /* all in network order */ }; +#else /* !OLD_NFSV2 */ + +/* NFSv3 definitions */ +#define NFS_V3MAXFHSIZE 64 +#define NFS_VER3 3 +#define RPCMNT_VER3 3 +#define NFSPROCV3_LOOKUP 3 +#define NFSPROCV3_READLINK 5 +#define NFSPROCV3_READ 6 +#define NFSPROCV3_READDIR 16 + +typedef struct { + uint32_t val[2]; +} n_quad; + +struct nfsv3_time { + uint32_t nfs_sec; + uint32_t nfs_nsec; +}; + +struct nfsv3_fattrs { + uint32_t fa_type; + uint32_t fa_mode; + uint32_t fa_nlink; + uint32_t fa_uid; + uint32_t fa_gid; + n_quad fa_size; + n_quad fa_used; + n_quad fa_rdev; + n_quad fa_fsid; + n_quad fa_fileid; + struct nfsv3_time fa_atime; + struct nfsv3_time fa_mtime; + struct nfsv3_time fa_ctime; +}; + +/* + * For NFSv3, the file handle is variable in size, so most fixed sized + * structures for arguments won't work. For most cases, a structure + * that starts with any fixed size section is followed by an array + * that covers the maximum size required. + */ +struct nfsv3_readdir_repl { + uint32_t errno; + uint32_t ok; + struct nfsv3_fattrs fa; + uint32_t cookiev0; + uint32_t cookiev1; +}; + +struct nfsv3_readdir_entry { + uint32_t follows; + uint32_t fid0; + uint32_t fid1; + uint32_t len; + uint32_t nameplus[0]; +}; + +struct nfs_iodesc { + struct iodesc *iodesc; + off_t off; + uint32_t fhsize; + u_char fh[NFS_V3MAXFHSIZE]; + struct nfsv3_fattrs fa; /* all in network order */ +}; +#endif /* OLD_NFSV2 */ /* * XXX interactions with tftp? See nfswrapper.c for a confusing @@ -142,6 +209,7 @@ struct fs_ops nfs_fsops = { nfs_readdir }; +#ifdef OLD_NFSV2 /* * Fetch the root file handle (call mount daemon) * Return zero or error number. @@ -773,3 +841,675 @@ nfs_readdir(struct open_file *f, struct cookie = ntohl(roff->cookie); return 0; } +#else /* !OLD_NFSV2 */ +/* + * Fetch the root file handle (call mount daemon) + * Return zero or error number. + */ +int +nfs_getrootfh(struct iodesc *d, char *path, uint32_t *fhlenp, u_char *fhp) +{ + int len; + struct args { + uint32_t len; + char path[FNAME_SIZE]; + } *args; + struct repl { + uint32_t errno; + uint32_t fhsize; + u_char fh[NFS_V3MAXFHSIZE]; + uint32_t authcnt; + uint32_t auth[7]; + } *repl; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct args d; + } sdata; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct repl d; + } rdata; + size_t cc; + +#ifdef NFS_DEBUG + if (debug) + printf("nfs_getrootfh: %s\n", path); +#endif + + args = &sdata.d; + repl = &rdata.d; + + bzero(args, sizeof(*args)); + len = strlen(path); + if (len > sizeof(args->path)) + len = sizeof(args->path); + args->len = htonl(len); + bcopy(path, args->path, len); + len = sizeof(uint32_t) + roundup(len, sizeof(uint32_t)); + + cc = rpc_call(d, RPCPROG_MNT, RPCMNT_VER3, RPCMNT_MOUNT, + args, len, repl, sizeof(*repl)); + if (cc == -1) + /* errno was set by rpc_call */ + return (errno); + if (cc < 2 * sizeof (uint32_t)) + return (EBADRPC); + if (repl->errno != 0) + return (ntohl(repl->errno)); + *fhlenp = ntohl(repl->fhsize); + bcopy(repl->fh, fhp, *fhlenp); + return (0); +} + +/* + * Lookup a file. Store handle and attributes. + * Return zero or error number. + */ +int +nfs_lookupfh(struct nfs_iodesc *d, const char *name, struct nfs_iodesc *newfd) +{ + int len, rlen, pos; + struct args { + uint32_t fhsize; + uint32_t fhplusname[1 + + (NFS_V3MAXFHSIZE + FNAME_SIZE) / sizeof(uint32_t)]; + } *args; + struct repl { + uint32_t errno; + uint32_t fhsize; + uint32_t fhplusattr[(NFS_V3MAXFHSIZE + + 2 * (sizeof(uint32_t) + + sizeof(struct nfsv3_fattrs))) / sizeof(uint32_t)]; + } *repl; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct args d; + } sdata; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct repl d; + } rdata; + ssize_t cc; + +#ifdef NFS_DEBUG + if (debug) + printf("lookupfh: called\n"); +#endif + + args = &sdata.d; + repl = &rdata.d; + + bzero(args, sizeof(*args)); + args->fhsize = htonl(d->fhsize); + bcopy(d->fh, args->fhplusname, d->fhsize); + len = strlen(name); + if (len > FNAME_SIZE) + len = FNAME_SIZE; + pos = roundup(d->fhsize, sizeof(uint32_t)) / sizeof(uint32_t); + args->fhplusname[pos++] = htonl(len); + bcopy(name, &args->fhplusname[pos], len); + len = sizeof(uint32_t) + pos * sizeof(uint32_t) + + roundup(len, sizeof(uint32_t)); + + rlen = sizeof(*repl); + + cc = rpc_call(d->iodesc, NFS_PROG, NFS_VER3, NFSPROCV3_LOOKUP, + args, len, repl, rlen); + if (cc == -1) + return (errno); /* XXX - from rpc_call */ + if (cc < 2 * sizeof(uint32_t)) + return (EIO); + if (repl->errno != 0) + /* saerrno.h now matches NFS error numbers. */ + return (ntohl(repl->errno)); + newfd->fhsize = ntohl(repl->fhsize); + bcopy(repl->fhplusattr, &newfd->fh, newfd->fhsize); + pos = roundup(newfd->fhsize, sizeof(uint32_t)) / sizeof(uint32_t); + if (repl->fhplusattr[pos++] == 0) + return (EIO); + bcopy(&repl->fhplusattr[pos], &newfd->fa, sizeof(newfd->fa)); + return (0); +} + +#ifndef NFS_NOSYMLINK +/* + * Get the destination of a symbolic link. + */ +int +nfs_readlink(struct nfs_iodesc *d, char *buf) +{ + struct args { + uint32_t fhsize; + u_char fh[NFS_V3MAXFHSIZE]; + } *args; + struct repl { + uint32_t errno; + uint32_t ok; + struct nfsv3_fattrs fa; + uint32_t len; + u_char path[NFS_MAXPATHLEN]; + } *repl; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct args d; + } sdata; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct repl d; + } rdata; + ssize_t cc; + +#ifdef NFS_DEBUG + if (debug) + printf("readlink: called\n"); +#endif + + args = &sdata.d; + repl = &rdata.d; + + bzero(args, sizeof(*args)); + args->fhsize = htonl(d->fhsize); + bcopy(d->fh, args->fh, d->fhsize); + cc = rpc_call(d->iodesc, NFS_PROG, NFS_VER3, NFSPROCV3_READLINK, + args, sizeof(uint32_t) + roundup(d->fhsize, sizeof(uint32_t)), + repl, sizeof(*repl)); + if (cc == -1) + return (errno); + + if (cc < 2 * sizeof(uint32_t)) + return (EIO); + + if (repl->errno != 0) + return (ntohl(repl->errno)); + + if (repl->ok == 0) + return (EIO); + + repl->len = ntohl(repl->len); + if (repl->len > NFS_MAXPATHLEN) + return (ENAMETOOLONG); + + bcopy(repl->path, buf, repl->len); + buf[repl->len] = 0; + return (0); +} +#endif + +/* + * Read data from a file. + * Return transfer count or -1 (and set errno) + */ +ssize_t +nfs_readdata(struct nfs_iodesc *d, off_t off, void *addr, size_t len) +{ + struct args { + uint32_t fhsize; + uint32_t fhoffcnt[NFS_V3MAXFHSIZE / sizeof(uint32_t) + 3]; + } *args; + struct repl { + uint32_t errno; + uint32_t ok; + struct nfsv3_fattrs fa; + uint32_t count; + uint32_t eof; + uint32_t len; + u_char data[NFSREAD_SIZE]; + } *repl; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct args d; + } sdata; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct repl d; + } rdata; + size_t cc; + long x; + int hlen, rlen, pos; + + args = &sdata.d; + repl = &rdata.d; + + bzero(args, sizeof(*args)); + args->fhsize = htonl(d->fhsize); + bcopy(d->fh, args->fhoffcnt, d->fhsize); + pos = roundup(d->fhsize, sizeof(uint32_t)) / sizeof(uint32_t); + args->fhoffcnt[pos++] = 0; + args->fhoffcnt[pos++] = htonl((uint32_t)off); + if (len > NFSREAD_SIZE) + len = NFSREAD_SIZE; + args->fhoffcnt[pos] = htonl((uint32_t)len); + hlen = sizeof(*repl) - NFSREAD_SIZE; + + cc = rpc_call(d->iodesc, NFS_PROG, NFS_VER3, NFSPROCV3_READ, + args, 4 * sizeof(uint32_t) + roundup(d->fhsize, sizeof(uint32_t)), + repl, sizeof(*repl)); + if (cc == -1) + /* errno was already set by rpc_call */ + return (-1); + if (cc < hlen) { + errno = EBADRPC; + return (-1); + } + if (repl->errno != 0) { + errno = ntohl(repl->errno); + return (-1); + } + rlen = cc - hlen; + x = ntohl(repl->count); + if (rlen < x) { + printf("nfsread: short packet, %d < %ld\n", rlen, x); + errno = EBADRPC; + return (-1); + } + bcopy(repl->data, addr, x); + return (x); +} + +/* + * Open a file. + * return zero or error number + */ +int +nfs_open(const char *upath, struct open_file *f) +{ + struct iodesc *desc; + struct nfs_iodesc *currfd; + char buf[2 * NFS_V3MAXFHSIZE + 3]; + u_char *fh; + char *cp; + int i; +#ifndef NFS_NOSYMLINK + struct nfs_iodesc *newfd; + struct nfsv3_fattrs *fa; + char *ncp; + int c; + char namebuf[NFS_MAXPATHLEN + 1]; + char linkbuf[NFS_MAXPATHLEN + 1]; + int nlinks = 0; +#endif + int error; + char *path; + +#ifdef NFS_DEBUG + if (debug) + printf("nfs_open: %s (rootpath=%s)\n", upath, rootpath); +#endif + if (!rootpath[0]) { + printf("no rootpath, no nfs\n"); + return (ENXIO); + } + + /* + * This is silly - we should look at dv_type but that value is + * arch dependant and we can't use it here. + */ +#ifndef __i386__ + if (strcmp(f->f_dev->dv_name, "net") != 0) + return (EINVAL); +#else + if (strcmp(f->f_dev->dv_name, "pxe") != 0) + return (EINVAL); +#endif + + if (!(desc = socktodesc(*(int *)(f->f_devdata)))) + return (EINVAL); + + /* Bind to a reserved port. */ + desc->myport = htons(--rpc_port); + desc->destip = rootip; + if ((error = nfs_getrootfh(desc, rootpath, &nfs_root_node.fhsize, + nfs_root_node.fh))) + return (error); + nfs_root_node.iodesc = desc; + + fh = &nfs_root_node.fh[0]; + buf[0] = 'X'; + cp = &buf[1]; + for (i = 0; i < nfs_root_node.fhsize; i++, cp += 2) + sprintf(cp, "%02x", fh[i]); + sprintf(cp, "X"); + setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); + setenv("boot.nfsroot.path", rootpath, 1); + setenv("boot.nfsroot.nfshandle", buf, 1); + sprintf(buf, "%d", nfs_root_node.fhsize); + setenv("boot.nfsroot.nfshandlelen", buf, 1); + +#ifndef NFS_NOSYMLINK + /* Fake up attributes for the root dir. */ + fa = &nfs_root_node.fa; + fa->fa_type = htonl(NFDIR); + fa->fa_mode = htonl(0755); + fa->fa_nlink = htonl(2); + + currfd = &nfs_root_node; + newfd = 0; + + cp = path = strdup(upath); + if (path == NULL) { + error = ENOMEM; + goto out; + } + while (*cp) { + /* + * Remove extra separators + */ + while (*cp == '/') + cp++; + + if (*cp == '\0') + break; + /* + * Check that current node is a directory. + */ + if (currfd->fa.fa_type != htonl(NFDIR)) { + error = ENOTDIR; + goto out; + } + + /* allocate file system specific data structure */ + newfd = malloc(sizeof(*newfd)); + if (newfd == NULL) { + error = ENOMEM; + goto out; + } + newfd->iodesc = currfd->iodesc; + newfd->off = 0; + + /* + * Get next component of path name. + */ + { + int len = 0; + + ncp = cp; + while ((c = *cp) != '\0' && c != '/') { + if (++len > NFS_MAXNAMLEN) { + error = ENOENT; + goto out; + } + cp++; + } + *cp = '\0'; + } + + /* lookup a file handle */ + error = nfs_lookupfh(currfd, ncp, newfd); + *cp = c; + if (error) + goto out; + + /* + * Check for symbolic link + */ + if (newfd->fa.fa_type == htonl(NFLNK)) { + int link_len, len; + + error = nfs_readlink(newfd, linkbuf); + if (error) + goto out; + + link_len = strlen(linkbuf); + len = strlen(cp); + + if (link_len + len > MAXPATHLEN + || ++nlinks > MAXSYMLINKS) { + error = ENOENT; + goto out; + } + + bcopy(cp, &namebuf[link_len], len + 1); + bcopy(linkbuf, namebuf, link_len); + + /* + * If absolute pathname, restart at root. + * If relative pathname, restart at parent directory. + */ + cp = namebuf; + if (*cp == '/') { + if (currfd != &nfs_root_node) + free(currfd); + currfd = &nfs_root_node; + } + + free(newfd); + newfd = 0; + + continue; + } + + if (currfd != &nfs_root_node) + free(currfd); + currfd = newfd; + newfd = 0; + } + + error = 0; + +out: + free(newfd); + free(path); +#else + /* allocate file system specific data structure */ + currfd = malloc(sizeof(*currfd)); + if (currfd != NULL) { + currfd->iodesc = desc; + currfd->off = 0; + + error = nfs_lookupfh(&nfs_root_node, upath, currfd); + } else + error = ENOMEM; +#endif + if (!error) { + f->f_fsdata = (void *)currfd; + return (0); + } + +#ifdef NFS_DEBUG + if (debug) + printf("nfs_open: %s lookupfh failed: %s\n", + path, strerror(error)); +#endif +#ifndef NFS_NOSYMLINK + if (currfd != &nfs_root_node) +#endif + free(currfd); + + return (error); +} + +int +nfs_close(struct open_file *f) +{ + struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata; + +#ifdef NFS_DEBUG + if (debug) + printf("nfs_close: fp=0x%lx\n", (u_long)fp); +#endif + + if (fp != &nfs_root_node && fp) + free(fp); + f->f_fsdata = (void *)0; + + return (0); +} + +/* + * read a portion of a file + */ +int +nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid) +{ + struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata; + ssize_t cc; + char *addr = buf; + +#ifdef NFS_DEBUG + if (debug) + printf("nfs_read: size=%lu off=%d\n", (u_long)size, + (int)fp->off); +#endif + while ((int)size > 0) { + twiddle(); + cc = nfs_readdata(fp, fp->off, (void *)addr, size); + /* XXX maybe should retry on certain errors */ + if (cc == -1) { +#ifdef NFS_DEBUG + if (debug) + printf("nfs_read: read: %s", strerror(errno)); +#endif + return (errno); /* XXX - from nfs_readdata */ + } + if (cc == 0) { +#ifdef NFS_DEBUG + if (debug) + printf("nfs_read: hit EOF unexpectantly"); +#endif + goto ret; + } + fp->off += cc; + addr += cc; + size -= cc; + } +ret: + if (resid) + *resid = size; + + return (0); +} + +/* + * Not implemented. + */ +int +nfs_write(struct open_file *f, void *buf, size_t size, size_t *resid) +{ + return (EROFS); +} + +off_t +nfs_seek(struct open_file *f, off_t offset, int where) +{ + struct nfs_iodesc *d = (struct nfs_iodesc *)f->f_fsdata; + uint32_t size = ntohl(d->fa.fa_size.val[1]); + + switch (where) { + case SEEK_SET: + d->off = offset; + break; + case SEEK_CUR: + d->off += offset; + break; + case SEEK_END: + d->off = size - offset; + break; + default: + errno = EINVAL; + return (-1); + } + + return (d->off); +} + +/* NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5, NFSOCK=6, NFFIFO=7 */ +int nfs_stat_types[9] = { + 0, S_IFREG, S_IFDIR, S_IFBLK, S_IFCHR, S_IFLNK, S_IFSOCK, S_IFIFO, 0 }; + +int +nfs_stat(struct open_file *f, struct stat *sb) +{ + struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata; + uint32_t ftype, mode; + + ftype = ntohl(fp->fa.fa_type); + mode = ntohl(fp->fa.fa_mode); + mode |= nfs_stat_types[ftype & 7]; + + sb->st_mode = mode; + sb->st_nlink = ntohl(fp->fa.fa_nlink); + sb->st_uid = ntohl(fp->fa.fa_uid); + sb->st_gid = ntohl(fp->fa.fa_gid); + sb->st_size = ntohl(fp->fa.fa_size.val[1]); + + return (0); +} + +static int +nfs_readdir(struct open_file *f, struct dirent *d) +{ + struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata; + struct nfsv3_readdir_repl *repl; + struct nfsv3_readdir_entry *rent; + static char *buf; + static uint32_t cookie0 = 0; + static uint32_t cookie1 = 0; + size_t cc; + static uint32_t cookieverf0 = 0; + static uint32_t cookieverf1 = 0; + int pos; + + struct args { + uint32_t fhsize; + uint32_t fhpluscookie[5 + NFS_V3MAXFHSIZE]; + } *args; + struct { + uint32_t h[RPC_HEADER_WORDS]; + struct args d; + } sdata; + static struct { + uint32_t h[RPC_HEADER_WORDS]; + u_char d[NFS_READDIRSIZE]; + } rdata; + + if (cookie0 == 0 && cookie1 == 0) { + refill: + args = &sdata.d; + bzero(args, sizeof(*args)); + + args->fhsize = htonl(fp->fhsize); + bcopy(fp->fh, args->fhpluscookie, fp->fhsize); + pos = roundup(fp->fhsize, sizeof(uint32_t)) / sizeof(uint32_t); + args->fhpluscookie[pos++] = cookie0; + args->fhpluscookie[pos++] = cookie1; + args->fhpluscookie[pos++] = cookieverf0; + args->fhpluscookie[pos++] = cookieverf1; + args->fhpluscookie[pos] = htonl(NFS_READDIRSIZE); + + cc = rpc_call(fp->iodesc, NFS_PROG, NFS_VER3, NFSPROCV3_READDIR, + args, 6 * sizeof(uint32_t) + + roundup(fp->fhsize, sizeof(uint32_t)), + rdata.d, sizeof(rdata.d)); + buf = rdata.d; + repl = (struct nfsv3_readdir_repl *)buf; + if (repl->errno != 0) + return (ntohl(repl->errno)); + cookieverf0 = repl->cookiev0; + cookieverf1 = repl->cookiev1; + buf += sizeof (struct nfsv3_readdir_repl); + } + rent = (struct nfsv3_readdir_entry *)buf; + + if (rent->follows == 0) { + /* fid0 is actually eof */ + if (rent->fid0 != 0) { + cookie0 = 0; + cookie1 = 0; + cookieverf0 = 0; + cookieverf1 = 0; + return (ENOENT); + } + goto refill; + } + + d->d_namlen = ntohl(rent->len); + bcopy(rent->nameplus, d->d_name, d->d_namlen); + d->d_name[d->d_namlen] = '\0'; + + pos = roundup(d->d_namlen, sizeof(uint32_t)) / sizeof(uint32_t); + cookie0 = rent->nameplus[pos++]; + cookie1 = rent->nameplus[pos++]; + buf = (u_char *)&rent->nameplus[pos]; + return (0); +} +#endif /* OLD_NFSV2 */ Modified: stable/8/sys/boot/i386/libi386/pxe.c ============================================================================== --- stable/8/sys/boot/i386/libi386/pxe.c Thu Sep 16 01:02:53 2010 (r212716) +++ stable/8/sys/boot/i386/libi386/pxe.c Thu Sep 16 01:38:13 2010 (r212717) @@ -409,6 +409,7 @@ pxe_perror(int err) * Reach inside the libstand NFS code and dig out an NFS handle * for the root filesystem. */ +#ifdef OLD_NFSV2 struct nfs_iodesc { struct iodesc *iodesc; off_t off; @@ -456,6 +457,64 @@ pxe_setnfshandle(char *rootpath) sprintf(cp, "X"); setenv("boot.nfsroot.nfshandle", buf, 1); } +#else /* !OLD_NFSV2 */ + +#define NFS_V3MAXFHSIZE 64 + +struct nfs_iodesc { + struct iodesc *iodesc; + off_t off; + uint32_t fhsize; + u_char fh[NFS_V3MAXFHSIZE]; + /* structure truncated */ +}; +extern struct nfs_iodesc nfs_root_node; +extern int rpc_port; + +static void +pxe_rpcmountcall() +{ + struct iodesc *d; + int error; + + if (!(d = socktodesc(pxe_sock))) + return; + d->myport = htons(--rpc_port); + d->destip = rootip; + if ((error = nfs_getrootfh(d, rootpath, &nfs_root_node.fhsize, + nfs_root_node.fh)) != 0) { + printf("NFS MOUNT RPC error: %d\n", error); + nfs_root_node.fhsize = 0; + } + nfs_root_node.iodesc = d; +} + +static void +pxe_setnfshandle(char *rootpath) +{ + int i; + u_char *fh; + char buf[2 * NFS_V3MAXFHSIZE + 3], *cp; + + /* + * If NFS files were never opened, we need to do mount call + * ourselves. Use nfs_root_node.iodesc as flag indicating + * previous NFS usage. + */ + if (nfs_root_node.iodesc == NULL) + pxe_rpcmountcall(); + + fh = &nfs_root_node.fh[0]; + buf[0] = 'X'; + cp = &buf[1]; + for (i = 0; i < nfs_root_node.fhsize; i++, cp += 2) + sprintf(cp, "%02x", fh[i]); + sprintf(cp, "X"); + setenv("boot.nfsroot.nfshandle", buf, 1); + sprintf(buf, "%d", nfs_root_node.fhsize); + setenv("boot.nfsroot.nfshandlelen", buf, 1); +} +#endif /* OLD_NFSV2 */ void pxenv_call(int func) From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 01:43:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB6201065679; Thu, 16 Sep 2010 01:43:55 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7D83B8FC0C; Thu, 16 Sep 2010 01:43:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8G1hrU1004987; Thu, 16 Sep 2010 01:43:54 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4C91E6DA.8050907@freebsd.org> Date: Thu, 16 Sep 2010 09:43:54 +0000 From: David Xu User-Agent: Thunderbird 2.0.0.24 (X11/20100630) MIME-Version: 1.0 To: "M. Warner Losh" References: <201009150256.o8F2uXwX004579@svn.freebsd.org> <20100914231728.33ca7466@kan.dnsalias.net> <20100915.081234.83306312380114674.imp@bsdimp.com> In-Reply-To: <20100915.081234.83306312380114674.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, kabaev@gmail.com Subject: Re: svn commit: r212630 - in head/lib/libthr: . thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 01:43:55 -0000 M. Warner Losh wrote: > In message: <20100914231728.33ca7466@kan.dnsalias.net> > Alexander Kabaev writes: > : On Wed, 15 Sep 2010 02:56:33 +0000 (UTC) > : David Xu wrote: > : > : > Author: davidxu > : > Date: Wed Sep 15 02:56:32 2010 > : > New Revision: 212630 > : > URL: http://svn.freebsd.org/changeset/base/212630 > : > > : > Log: > : > add code to support stack unwinding when thread exits. note that > : > only defer-mode cancellation works, asynchrnous mode does not work > : > because it lacks of libuwind's support. stack unwinding is not > : > enabled unless LIBTHR_UNWIND_STACK is defined in Makefile. > : > > : > Modified: > : > head/lib/libthr/Makefile > : > head/lib/libthr/thread/thr_clean.c > : > head/lib/libthr/thread/thr_create.c > : > head/lib/libthr/thread/thr_exit.c > : > head/lib/libthr/thread/thr_init.c > : > head/lib/libthr/thread/thr_private.h > : > > : > Modified: head/lib/libthr/Makefile > : > ============================================================================== > : > --- head/lib/libthr/Makefile Wed Sep 15 01:21:30 2010 > : > (r212629) +++ head/lib/libthr/Makefile Wed Sep 15 02:56:32 > : > 2010 (r212630) @@ -25,6 +25,14 @@ > : > CFLAGS+=-I${.CURDIR}/../../libexec/rtld- > : > CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} > : > CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline > : > + > : > +LIBTHR_UNWIND_STACK=yes > : > + > : > +.ifdef LIBTHR_UNWIND_STACK > : > +CFLAGS+=-I${.CURDIR}/../../contrib/gcc -fexceptions > : > +CFLAGS+=-D_PTHREAD_FORCED_UNWIND > : > +.endif > : > + > : > > : > : Reaching into bowels of GCC like that is never good. > > Would this pulling in GPL'd code? > > Warner > It's being resolved. From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 02:42:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBA88106564A; Thu, 16 Sep 2010 02:42:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA2C78FC16; Thu, 16 Sep 2010 02:42:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G2gqow058519; Thu, 16 Sep 2010 02:42:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G2gqcF058517; Thu, 16 Sep 2010 02:42:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009160242.o8G2gqcF058517@svn.freebsd.org> From: Alexander Motin Date: Thu, 16 Sep 2010 02:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212718 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 02:42:52 -0000 Author: mav Date: Thu Sep 16 02:42:52 2010 New Revision: 212718 URL: http://svn.freebsd.org/changeset/base/212718 Log: MFC r212081: Increase device reset timeout from 10 to 15 seconds, same as in ahci(4). Some devices found need about 10-12 seconds to spinup. Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ahci.c Thu Sep 16 01:38:13 2010 (r212717) +++ stable/8/sys/dev/ata/chipsets/ata-ahci.c Thu Sep 16 02:42:52 2010 (r212718) @@ -815,7 +815,7 @@ ata_ahci_hardreset(device_t dev, int por if (!ata_sata_phy_reset(dev, port, 0)) return (ENOENT); /* Wait for clearing busy status. */ - if (ata_ahci_wait_ready(dev, 10000)) { + if (ata_ahci_wait_ready(dev, 15000)) { device_printf(dev, "hardware reset timeout\n"); return (EBUSY); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 02:44:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A3F41065672; Thu, 16 Sep 2010 02:44:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 589E58FC1D; Thu, 16 Sep 2010 02:44:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G2iNt9058611; Thu, 16 Sep 2010 02:44:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G2iNtI058607; Thu, 16 Sep 2010 02:44:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009160244.o8G2iNtI058607@svn.freebsd.org> From: Alexander Motin Date: Thu, 16 Sep 2010 02:44:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212719 - in stable/8/sys/dev/ata: . chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 02:44:23 -0000 Author: mav Date: Thu Sep 16 02:44:23 2010 New Revision: 212719 URL: http://svn.freebsd.org/changeset/base/212719 Log: MFC r212145: SATA1.x SiliconImage controllers on power-on reset TFD Status register into value 0xff. On hot-plug this value confuses ata_generic_reset() device presence detection logic. As soon as we already know drive presence from SATA hard reset, hint ata_generic_reset() to wait for device signature until success or full timeout. Modified: stable/8/sys/dev/ata/ata-all.h stable/8/sys/dev/ata/ata-lowlevel.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Thu Sep 16 02:42:52 2010 (r212718) +++ stable/8/sys/dev/ata/ata-all.h Thu Sep 16 02:44:23 2010 (r212719) @@ -565,6 +565,7 @@ struct ata_channel { #define ATA_NO_ATAPI_DMA 0x40 #define ATA_SATA 0x80 #define ATA_DMA_BEFORE_CMD 0x100 +#define ATA_KNOWN_PRESENCE 0x200 int pm_level; /* power management level */ int devices; /* what is present */ Modified: stable/8/sys/dev/ata/ata-lowlevel.c ============================================================================== --- stable/8/sys/dev/ata/ata-lowlevel.c Thu Sep 16 02:42:52 2010 (r212718) +++ stable/8/sys/dev/ata/ata-lowlevel.c Thu Sep 16 02:44:23 2010 (r212719) @@ -474,7 +474,8 @@ ata_generic_reset(device_t dev) ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_MASTER)); DELAY(10); ostat0 = ATA_IDX_INB(ch, ATA_STATUS); - if ((ostat0 & 0xf8) != 0xf8 && ostat0 != 0xa5) { + if (((ostat0 & 0xf8) != 0xf8 || (ch->flags & ATA_KNOWN_PRESENCE)) && + ostat0 != 0xa5) { stat0 = ATA_S_BUSY; mask |= 0x01; } @@ -484,7 +485,8 @@ ata_generic_reset(device_t dev) ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_SLAVE)); DELAY(10); ostat1 = ATA_IDX_INB(ch, ATA_STATUS); - if ((ostat1 & 0xf8) != 0xf8 && ostat1 != 0xa5) { + if (((ostat1 & 0xf8) != 0xf8 || (ch->flags & ATA_KNOWN_PRESENCE)) && + ostat1 != 0xa5) { stat1 = ATA_S_BUSY; mask |= 0x02; } @@ -570,22 +572,16 @@ ata_generic_reset(device_t dev) } } - if (mask == 0x00) /* nothing to wait for */ - break; - if (mask == 0x01) /* wait for master only */ - if (!(stat0 & ATA_S_BUSY) || (stat0 == 0xff && timeout > 10)) - break; - if (mask == 0x02) /* wait for slave only */ - if (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 10)) - break; - if (mask == 0x03) { /* wait for both master & slave */ - if (!(stat0 & ATA_S_BUSY) && !(stat1 & ATA_S_BUSY)) - break; - if ((stat0 == 0xff) && (timeout > 20)) - mask &= ~0x01; - if ((stat1 == 0xff) && (timeout > 20)) - mask &= ~0x02; + if ((ch->flags & ATA_KNOWN_PRESENCE) == 0 && + timeout > ((mask == 0x03) ? 20 : 10)) { + if ((mask & 0x01) && stat0 == 0xff) + mask &= ~0x01; + if ((mask & 0x02) && stat1 == 0xff) + mask &= ~0x02; } + if (((mask & 0x01) == 0 || !(stat0 & ATA_S_BUSY)) && + ((mask & 0x02) == 0 || !(stat1 & ATA_S_BUSY))) + break; ata_udelay(100000); } Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Thu Sep 16 02:42:52 2010 (r212718) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Thu Sep 16 02:44:23 2010 (r212719) @@ -316,6 +316,7 @@ ata_sii_ch_attach(device_t dev) ch->r_io[ATA_SCONTROL].offset = 0x100 + (unit01 << 7) + (unit10 << 8); ch->flags |= ATA_NO_SLAVE; ch->flags |= ATA_SATA; + ch->flags |= ATA_KNOWN_PRESENCE; /* enable PHY state change interrupt */ ATA_OUTL(ctlr->r_res2, 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16)); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 02:47:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AB011065673; Thu, 16 Sep 2010 02:47:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 194D88FC17; Thu, 16 Sep 2010 02:47:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G2l9Lu058716; Thu, 16 Sep 2010 02:47:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G2l9ti058714; Thu, 16 Sep 2010 02:47:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009160247.o8G2l9ti058714@svn.freebsd.org> From: Alexander Motin Date: Thu, 16 Sep 2010 02:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212720 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 02:47:10 -0000 Author: mav Date: Thu Sep 16 02:47:09 2010 New Revision: 212720 URL: http://svn.freebsd.org/changeset/base/212720 Log: MFC r212146: Add workaround for SiI3114 and SiI3512 chips bug, which caused sending R_ERR in response to DMA activate FIS under certain circumstances. This is recommended fix from chip datasheet. If triggered, this bug most likely caused write command timeout. Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Thu Sep 16 02:44:23 2010 (r212719) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Thu Sep 16 02:47:09 2010 (r212720) @@ -365,7 +365,15 @@ ata_sii_status(device_t dev) static void ata_sii_reset(device_t dev) { + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); + int offset = ((ch->unit & 1) << 7) + ((ch->unit & 2) << 8); + uint32_t val; + + /* Apply R_ERR on DMA activate FIS errata workaround. */ + val = ATA_INL(ctlr->r_res2, 0x14c + offset); + if ((val & 0x3) == 0x1) + ATA_OUTL(ctlr->r_res2, 0x14c + offset, val & ~0x3); if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 02:59:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 108401065670; Thu, 16 Sep 2010 02:59:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D97418FC17; Thu, 16 Sep 2010 02:59:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G2xPs3058966; Thu, 16 Sep 2010 02:59:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G2xPMJ058964; Thu, 16 Sep 2010 02:59:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009160259.o8G2xPMJ058964@svn.freebsd.org> From: Alexander Motin Date: Thu, 16 Sep 2010 02:59:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212721 - head/sys/x86/cpufreq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 02:59:26 -0000 Author: mav Date: Thu Sep 16 02:59:25 2010 New Revision: 212721 URL: http://svn.freebsd.org/changeset/base/212721 Log: Few whitespace cleanups and comments tunings. Submitted by: arundel Modified: head/sys/x86/cpufreq/est.c Modified: head/sys/x86/cpufreq/est.c ============================================================================== --- head/sys/x86/cpufreq/est.c Thu Sep 16 02:47:09 2010 (r212720) +++ head/sys/x86/cpufreq/est.c Thu Sep 16 02:59:25 2010 (r212721) @@ -110,14 +110,16 @@ CTASSERT(EST_MAX_SETTINGS <= MAX_SETTING #define EST_TRANS_LAT 1000 /* - * Frequency (MHz) and voltage (mV) settings. Data from the - * Intel Pentium M Processor Datasheet (Order Number 252612), Table 5. + * Frequency (MHz) and voltage (mV) settings. * * Dothan processors have multiple VID#s with different settings for * each VID#. Since we can't uniquely identify this info * without undisclosed methods from Intel, we can't support newer * processors with this table method. If ACPI Px states are supported, * we get info from them. + * + * Data from the "Intel Pentium M Processor Datasheet", + * Order Number 252612-003, Table 5. */ static freq_info PM17_130[] = { /* 130nm 1.70GHz Pentium M */ @@ -217,7 +219,7 @@ static freq_info PM10_ULV_130[] = { /* * Data from "Intel Pentium M Processor on 90nm Process with - * 2-MB L2 Cache Datasheet", Order Number 302189, Table 5. + * 2-MB L2 Cache Datasheet", Order Number 302189-008, Table 5. */ static freq_info PM_765A_90[] = { /* 90 nm 2.10GHz Pentium M, VID #A */ @@ -985,7 +987,7 @@ est_probe(device_t dev) device_t perf_dev; uint64_t msr; int error, type; - + if (resource_disabled("est", 0)) return (ENXIO); @@ -1125,7 +1127,7 @@ est_acpi_info(device_t dev, freq_info ** if (sets[i].freq > 0) { error = est_set_id16(dev, sets[i].spec[0], strict); if (error != 0) { - if (bootverbose) + if (bootverbose) device_printf(dev, "Invalid freq %u, " "ignored.\n", sets[i].freq); continue; @@ -1221,7 +1223,7 @@ est_msr_info(device_t dev, uint64_t msr, device_printf(dev, "Guessed bus clock (low) of %d MHz\n", bus); if (!bus_speed_ok(bus)) return (EOPNOTSUPP); - + /* Calculate high frequency. */ id = msr >> 32; freq = ((id >> 8) & 0xff) * bus; @@ -1282,14 +1284,14 @@ est_set_id16(device_t dev, uint16_t id16 msr = rdmsr(MSR_PERF_CTL); 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) { - est_get_id16(&new_id16); + est_get_id16(&new_id16); if (new_id16 != id16) { - if (bootverbose) + if (bootverbose) device_printf(dev, "Invalid id16 (set, cur) " "= (%u, %u)\n", id16, new_id16); ret = ENXIO; From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 03:46:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D2DE106564A; Thu, 16 Sep 2010 03:46:18 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AA3A8FC0A; Thu, 16 Sep 2010 03:46:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G3kIUD060157; Thu, 16 Sep 2010 03:46:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G3kIFt060149; Thu, 16 Sep 2010 03:46:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201009160346.o8G3kIFt060149@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 16 Sep 2010 03:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212722 - in head/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 03:46:18 -0000 Author: nwhitehorn Date: Thu Sep 16 03:46:17 2010 New Revision: 212722 URL: http://svn.freebsd.org/changeset/base/212722 Log: Split the SLB mirror cache into two kinds of object, one for kernel maps which are similar to the previous ones, and one for user maps, which are arrays of pointers into the SLB tree. This changes makes user SLB updates atomic, closing a window for memory corruption. While here, rearrange the allocation functions to make context switches faster. Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/slb.c head/sys/powerpc/aim/trap.c head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/pmap.h head/sys/powerpc/include/sr.h Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Sep 16 02:59:25 2010 (r212721) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Sep 16 03:46:17 2010 (r212722) @@ -838,7 +838,7 @@ moea64_bootstrap_slb_prefault(vm_offset_ if (large) entry.slbv |= SLBV_L; - slb_insert(kernel_pmap, cache, &entry); + slb_insert_kernel(entry.slbe, entry.slbv); } #endif @@ -2099,6 +2099,7 @@ moea64_pinit(mmu_t mmu, pmap_t pmap) pmap->pm_slb_tree_root = slb_alloc_tree(); pmap->pm_slb = slb_alloc_user_cache(); + pmap->pm_slb_len = 0; } #else void Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Thu Sep 16 02:59:25 2010 (r212721) +++ head/sys/powerpc/aim/slb.c Thu Sep 16 03:46:17 2010 (r212722) @@ -263,13 +263,14 @@ va_to_vsid(pmap_t pm, vm_offset_t va) entry = user_va_to_slb_entry(pm, va); if (entry == NULL) - return (allocate_vsid(pm, (uintptr_t)va >> ADDR_SR_SHFT, 0)); + return (allocate_user_vsid(pm, + (uintptr_t)va >> ADDR_SR_SHFT, 0)); return ((entry->slbv & SLBV_VSID_MASK) >> SLBV_VSID_SHIFT); } uint64_t -allocate_vsid(pmap_t pm, uint64_t esid, int large) +allocate_user_vsid(pmap_t pm, uint64_t esid, int large) { uint64_t vsid, slbv; struct slbtnode *ua, *next, *inter; @@ -327,7 +328,7 @@ allocate_vsid(pmap_t pm, uint64_t esid, * SLB mapping, so pre-spill this entry. */ eieio(); - slb_insert(pm, pm->pm_slb, slb); + slb_insert_user(pm, slb); return (vsid); } @@ -410,57 +411,68 @@ slb_alloc_tree(void) (slbe & SLBE_ESID_MASK) > 16*SEGMENT_LENGTH) || \ (slbe & SLBE_ESID_MASK) > VM_MAX_KERNEL_ADDRESS) void -slb_insert(pmap_t pm, struct slb *slbcache, struct slb *slb_entry) +slb_insert_kernel(uint64_t slbe, uint64_t slbv) { - uint64_t slbe, slbv; - int i, j, to_spill; + struct slb *slbcache; + int i, j; /* We don't want to be preempted while modifying the kernel map */ critical_enter(); - to_spill = -1; - slbv = slb_entry->slbv; - slbe = slb_entry->slbe; + slbcache = PCPU_GET(slb); - /* Hunt for a likely candidate */ + /* Check for an unused slot, abusing the USER_SR slot as a full flag */ + if (slbcache[USER_SR].slbe == 0) { + for (i = 0; i < USER_SR; i++) { + if (!(slbcache[i].slbe & SLBE_VALID)) + goto fillkernslb; + } + + if (i == USER_SR) + slbcache[USER_SR].slbe = 1; + } for (i = mftb() % 64, j = 0; j < 64; j++, i = (i+1) % 64) { - if (pm == kernel_pmap && i == USER_SR) - continue; + if (i == USER_SR) + continue; - if (!(slbcache[i].slbe & SLBE_VALID)) { - to_spill = i; + if (SLB_SPILLABLE(slbcache[i].slbe)) break; - } - - if (to_spill < 0 && (pm != kernel_pmap || - SLB_SPILLABLE(slbcache[i].slbe))) - to_spill = i; - } - - if (to_spill < 0) - panic("SLB spill on ESID %#lx, but no available candidates!\n", - (slbe & SLBE_ESID_MASK) >> SLBE_ESID_SHIFT); - - if (slbcache[to_spill].slbe & SLBE_VALID) { - /* Invalidate this first to avoid races */ - slbcache[to_spill].slbe = 0; - mb(); } - slbcache[to_spill].slbv = slbv; - slbcache[to_spill].slbe = slbe | (uint64_t)to_spill; + + KASSERT(j < 64, ("All kernel SLB slots locked!")); + +fillkernslb: + slbcache[i].slbv = slbv; + slbcache[i].slbe = slbe | (uint64_t)i; /* If it is for this CPU, put it in the SLB right away */ - if (pm == kernel_pmap && pmap_bootstrapped) { + if (pmap_bootstrapped) { /* slbie not required */ __asm __volatile ("slbmte %0, %1" :: - "r"(slbcache[to_spill].slbv), - "r"(slbcache[to_spill].slbe)); + "r"(slbcache[i].slbv), "r"(slbcache[i].slbe)); } critical_exit(); } +void +slb_insert_user(pmap_t pm, struct slb *slb) +{ + int i; + + PMAP_LOCK_ASSERT(pm, MA_OWNED); + + if (pm->pm_slb_len < 64) { + i = pm->pm_slb_len; + pm->pm_slb_len++; + } else { + i = mftb() % 64; + } + + /* Note that this replacement is atomic with respect to trap_subr */ + pm->pm_slb[i] = slb; +} static void slb_zone_init(void *dummy) @@ -468,18 +480,18 @@ slb_zone_init(void *dummy) slbt_zone = uma_zcreate("SLB tree node", sizeof(struct slbtnode), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); - slb_cache_zone = uma_zcreate("SLB cache", 64*sizeof(struct slb), + slb_cache_zone = uma_zcreate("SLB cache", 64*sizeof(struct slb *), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); } -struct slb * +struct slb ** slb_alloc_user_cache(void) { return (uma_zalloc(slb_cache_zone, M_ZERO)); } void -slb_free_user_cache(struct slb *slb) +slb_free_user_cache(struct slb **slb) { uma_zfree(slb_cache_zone, slb); } Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Thu Sep 16 02:59:25 2010 (r212721) +++ head/sys/powerpc/aim/trap.c Thu Sep 16 03:46:17 2010 (r212722) @@ -445,17 +445,15 @@ syscall(struct trapframe *frame) static int handle_slb_spill(pmap_t pm, vm_offset_t addr) { - struct slb kern_entry, *user_entry; + struct slb *user_entry; uint64_t esid; int i; esid = (uintptr_t)addr >> ADDR_SR_SHFT; if (pm == kernel_pmap) { - kern_entry.slbv = kernel_va_to_slbv(addr); - kern_entry.slbe = (esid << SLBE_ESID_SHIFT) | SLBE_VALID; - - slb_insert(pm, PCPU_GET(slb), &kern_entry); + slb_insert_kernel((esid << SLBE_ESID_SHIFT) | SLBE_VALID, + kernel_va_to_slbv(addr)); return (0); } @@ -464,18 +462,18 @@ handle_slb_spill(pmap_t pm, vm_offset_t if (user_entry == NULL) { /* allocate_vsid auto-spills it */ - (void)allocate_vsid(pm, esid, 0); + (void)allocate_user_vsid(pm, esid, 0); } else { /* * Check that another CPU has not already mapped this. * XXX: Per-thread SLB caches would be better. */ - for (i = 0; i < 64; i++) - if (pm->pm_slb[i].slbe == (user_entry->slbe | i)) + for (i = 0; i < pm->pm_slb_len; i++) + if (pm->pm_slb[i] == user_entry) break; - if (i == 64) - slb_insert(pm, pm->pm_slb, user_entry); + if (i == pm->pm_slb_len) + slb_insert_user(pm, user_entry); } PMAP_UNLOCK(pm); Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Thu Sep 16 02:59:25 2010 (r212721) +++ head/sys/powerpc/aim/trap_subr64.S Thu Sep 16 03:46:17 2010 (r212722) @@ -49,45 +49,59 @@ * Requires that r28-r31 be scratch, with r28 initialized to the SLB cache */ -restoresrs: +/* + * User SRs are loaded through a pointer to the current pmap. + */ +restore_usersrs: + GET_CPUINFO(%r28); + ld %r28,PC_USERSLB(%r28); li %r29, 0 /* Set the counter to zero */ slbia slbmfee %r31,%r29 clrrdi %r31,%r31,28 slbie %r31 -instslb: - ld %r31, 8(%r28); /* Load SLBE */ - - cmpli 0, %r31, 0; /* If SLBE is not valid, get the next */ - beq nslb; - - ld %r30, 0(%r28) /* Load SLBV */ +instuserslb: + ld %r31, 0(%r28); /* Load SLB entry pointer */ + cmpli 0, %r31, 0; /* If NULL, stop */ + beqlr; + + ld %r30, 0(%r31) /* Load SLBV */ + ld %r31, 8(%r31) /* Load SLBE */ + or %r31, %r31, %r29 /* Set SLBE slot */ slbmte %r30, %r31; /* Install SLB entry */ -nslb: - addi %r28, %r28, 16; /* Advance */ + addi %r28, %r28, 8; /* Advance pointer */ addi %r29, %r29, 1; cmpli 0, %r29, 64; /* Repeat if we are not at the end */ - blt instslb; - + blt instuserslb; blr; /* - * User SRs are loaded through a pointer to the current pmap. + * Kernel SRs are loaded directly from the PCPU fields */ -#define RESTORE_USER_SRS() \ - GET_CPUINFO(%r28); \ - ld %r28,PC_USERSLB(%r28); \ - bl restoresrs; +restore_kernsrs: + GET_CPUINFO(%r28); + addi %r28,%r28,PC_KERNSLB; + li %r29, 0 /* Set the counter to zero */ -/* - * Kernel SRs are loaded directly from kernel_pmap_ - */ -#define RESTORE_KERN_SRS() \ - GET_CPUINFO(%r28); \ - addi %r28,%r28,PC_KERNSLB; \ - bl restoresrs; + slbia + slbmfee %r31,%r29 + clrrdi %r31,%r31,28 + slbie %r31 +instkernslb: + ld %r31, 8(%r28); /* Load SLBE */ + + cmpli 0, %r31, 0; /* If SLBE is not valid, stop */ + beqlr; + ld %r30, 0(%r28) /* Load SLBV */ + slbmte %r30, %r31; /* Install SLB entry */ + + addi %r28, %r28, 16; /* Advance pointer */ + addi %r29, %r29, 1; + cmpli 0, %r29, USER_SR; /* Repeat if we are not at the end */ + blt instkernslb; + blr; /* * FRAME_SETUP assumes: @@ -237,7 +251,7 @@ nslb: std %r30,(savearea+CPUSAVE_R30)(%r3); \ std %r31,(savearea+CPUSAVE_R31)(%r3); \ mflr %r27; /* preserve LR */ \ - RESTORE_USER_SRS(); /* uses r28-r31 */ \ + bl restore_usersrs; /* uses r28-r31 */ \ mtlr %r27; \ ld %r31,(savearea+CPUSAVE_R31)(%r3); \ ld %r30,(savearea+CPUSAVE_R30)(%r3); \ @@ -432,7 +446,7 @@ realtrap: ld %r1,PC_CURPCB(%r1) mr %r27,%r28 /* Save LR, r29 */ mtsprg2 %r29 - RESTORE_KERN_SRS() /* enable kernel mapping */ + bl restore_kernsrs /* enable kernel mapping */ mfsprg2 %r29 mr %r28,%r27 ba s_trap @@ -482,7 +496,7 @@ u_trap: ld %r1,PC_CURPCB(%r1) mr %r27,%r28 /* Save LR, r29 */ mtsprg2 %r29 - RESTORE_KERN_SRS() /* enable kernel mapping */ + bl restore_kernsrs /* enable kernel mapping */ mfsprg2 %r29 mr %r28,%r27 Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Thu Sep 16 02:59:25 2010 (r212721) +++ head/sys/powerpc/include/pcpu.h Thu Sep 16 03:46:17 2010 (r212722) @@ -55,7 +55,7 @@ struct pmap; #define PCPU_MD_AIM64_FIELDS \ struct slb pc_slb[64]; \ - struct slb *pc_userslb; + struct slb **pc_userslb; #ifdef __powerpc64__ #define PCPU_MD_AIM_FIELDS PCPU_MD_AIM64_FIELDS Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Thu Sep 16 02:59:25 2010 (r212721) +++ head/sys/powerpc/include/pmap.h Thu Sep 16 03:46:17 2010 (r212722) @@ -93,7 +93,8 @@ struct pmap { #ifdef __powerpc64__ struct slbtnode *pm_slb_tree_root; - struct slb *pm_slb; + struct slb **pm_slb; + int pm_slb_len; #else register_t pm_sr[16]; #endif @@ -142,14 +143,15 @@ uint64_t va_to_vsid(pmap_t pm, vm_offset uint64_t kernel_va_to_slbv(vm_offset_t va); struct slb *user_va_to_slb_entry(pmap_t pm, vm_offset_t va); -uint64_t allocate_vsid(pmap_t pm, uint64_t esid, int large); +uint64_t allocate_user_vsid(pmap_t pm, uint64_t esid, int large); void free_vsid(pmap_t pm, uint64_t esid, int large); -void slb_insert(pmap_t pm, struct slb *dst, struct slb *); +void slb_insert_user(pmap_t pm, struct slb *slb); +void slb_insert_kernel(uint64_t slbe, uint64_t slbv); struct slbtnode *slb_alloc_tree(void); void slb_free_tree(pmap_t pm); -struct slb *slb_alloc_user_cache(void); -void slb_free_user_cache(struct slb *); +struct slb **slb_alloc_user_cache(void); +void slb_free_user_cache(struct slb **); #else Modified: head/sys/powerpc/include/sr.h ============================================================================== --- head/sys/powerpc/include/sr.h Thu Sep 16 02:59:25 2010 (r212721) +++ head/sys/powerpc/include/sr.h Thu Sep 16 03:46:17 2010 (r212722) @@ -42,7 +42,11 @@ #define SR_VSID_MASK 0x00ffffff /* Virtual Segment ID mask */ /* Kernel segment register usage */ +#ifdef __powerpc64__ +#define USER_SR 63 +#else #define USER_SR 12 +#endif #define KERNEL_SR 13 #define KERNEL2_SR 14 #define KERNEL3_SR 15 From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 05:20:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09ECB106567A; Thu, 16 Sep 2010 05:20:05 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [95.108.130.119]) by mx1.freebsd.org (Postfix) with ESMTP id A97478FC14; Thu, 16 Sep 2010 05:20:04 +0000 (UTC) Received: from smtp11.mail.yandex.net (smtp11.mail.yandex.net [95.108.130.67]) by forward15.mail.yandex.net (Yandex) with ESMTP id 783B4445988F; Thu, 16 Sep 2010 09:02:23 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1284613343; bh=9FublKDCjfboOK4so1QQwvuwr+UtW/Lr36nCYVZpAZw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=EpyLdVzPqXfnmp2abX2HNLrASuaM6dEwBfn0DFZ6+fD5OQCojyVYWKYZKV1m2Y9lF 03wqmeu+u5fjMVwj9ohw3u1Ofbb495/moFnkBR4nRGBtdJSYFBExgNLQaQRgRzW/2P 7zksAl6NiIK3tTOiJ0jeqfj7lD/Zc3JtKuAUljyk= Received: from smeshariki2.local (unknown [77.66.145.223]) by smtp11.mail.yandex.net (Yandex) with ESMTPSA id 9D8CA44D806C; Thu, 16 Sep 2010 09:02:22 +0400 (MSD) Message-ID: <4C91A46D.1060903@yandex.ru> Date: Thu, 16 Sep 2010 09:00:29 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.9) Gecko/20100908 Thunderbird/3.1.3 MIME-Version: 1.0 To: Warner Losh References: <201009151940.o8FJe97W048405@svn.freebsd.org> In-Reply-To: <201009151940.o8FJe97W048405@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Yandex-TimeMark: 1284613343 X-Yandex-Spam: 1 X-Yandex-Front: smtp11.mail.yandex.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212692 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 05:20:05 -0000 15.09.2010 23:40, Warner Losh пишет: > Author: imp > Date: Wed Sep 15 19:40:08 2010 > New Revision: 212692 > URL: http://svn.freebsd.org/changeset/base/212692 > > Log: > Don't suggest using bwn for the bcm4306 cards in the list. The > bcm4306 cards are ambiguous. BCM4306 rev 2 requires bwi. BCM4306 rev > 3 will work with either. Since we can't easily determine which is > which, just remove them. > > Modified: > head/share/man/man4/bwn.4 > > Modified: head/share/man/man4/bwn.4 > ============================================================================== > --- head/share/man/man4/bwn.4 Wed Sep 15 19:34:18 2010 (r212691) > +++ head/share/man/man4/bwn.4 Wed Sep 15 19:40:08 2010 (r212692) > @@ -78,18 +78,14 @@ driver supports Broadcom BCM43xx based w > .Pp > .Bl -column -compact "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n > .It Em "Card Chip Bus Standard" > -.It "Apple Airport Extreme BCM4306 PCI b/g" > .It "Apple Airport Extreme BCM4318 PCI b/g" > .It "ASUS WL-138g BCM4318 PCI b/g" > .It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" > -.It "Buffalo WLI-PCI-G54S BCM4306 PCI b/g" > -.It "Compaq R4035 onboard BCM4306 PCI b/g" > .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" > .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" > .It "HP nx6125 BCM4319 PCI b/g" > .It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g" > .It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g" > -.It "TRENDnet TEW-401PCplus BCM4306 CardBus b/g" > .It "US Robotics 5411 BCM4318 CardBus b/g" > .El > .Pp I don't know if you are trying to keep this list exhaustive, but if you do this card is working for me with success: siba_bwn0@pci0:16:0:0: class=0x028000 card=0x1364103c chip=0x431114e4 rev=0x01 hdr=0x00 vendor = 'Broadcom Corporation' device = 'Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card (BCM4311)' class = network -- Regards, Ruslan From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 07:56:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 361D6106564A; Thu, 16 Sep 2010 07:56:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2677F8FC14; Thu, 16 Sep 2010 07:56:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G7uZCc065334; Thu, 16 Sep 2010 07:56:35 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G7uZrg065332; Thu, 16 Sep 2010 07:56:35 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201009160756.o8G7uZrg065332@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 16 Sep 2010 07:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212723 - head/sys/compat/linprocfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 07:56:35 -0000 Author: des Date: Thu Sep 16 07:56:34 2010 New Revision: 212723 URL: http://svn.freebsd.org/changeset/base/212723 Log: Implement proc/$$/environment. Submitted by: Fernando Apesteguía MFC after: 3 weeks Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Thu Sep 16 03:46:17 2010 (r212722) +++ head/sys/compat/linprocfs/linprocfs.c Thu Sep 16 07:56:34 2010 (r212723) @@ -939,15 +939,123 @@ linprocfs_doproccmdline(PFS_FILL_ARGS) return (0); } +extern int proc_rwmem(struct proc *p, struct uio *uio); + +#define MAX_ARGV_STR 512 /* Max number of argv-like strings */ +#define UIO_CHUNK_SZ 256 /* Max chunk size (bytes) for uiomove */ + +static int +linprocfs_doargv(struct thread *td, struct proc *p, struct sbuf *sb, + void (*resolver)(const struct ps_strings, u_long *, int *)) +{ + struct iovec iov; + struct uio tmp_uio; + struct ps_strings pss; + int ret, i, n_elements, found_end; + u_long addr; + char* env_vector[MAX_ARGV_STR]; + char env_string[UIO_CHUNK_SZ]; + char *pbegin; + + + +#define UIO_HELPER(uio, iov, base, len, cnt, offset, sz, flg, rw, td) \ +do { \ + iov.iov_base = (caddr_t)(base); \ + iov.iov_len = (len); \ + uio.uio_iov = &(iov); \ + uio.uio_iovcnt = (cnt); \ + uio.uio_offset = (off_t)(offset); \ + uio.uio_resid = (sz); \ + uio.uio_segflg = (flg); \ + uio.uio_rw = (rw); \ + uio.uio_td = (td); \ +} while (0) + + UIO_HELPER(tmp_uio, iov, &pss, sizeof(struct ps_strings), 1, + (off_t)(p->p_sysent->sv_psstrings), sizeof(struct ps_strings), + UIO_SYSSPACE, UIO_READ, td); + + ret = proc_rwmem(p, &tmp_uio); + if (ret != 0) + return ret; + + /* Get the array address and the number of elements */ + resolver(pss, &addr, &n_elements); + + /* Consistent with lib/libkvm/kvm_proc.c */ + if (n_elements > MAX_ARGV_STR || (u_long)addr < VM_MIN_ADDRESS || + (u_long)addr >= VM_MAXUSER_ADDRESS) { + /* What error code should we return? */ + return 0; + } + + UIO_HELPER(tmp_uio, iov, env_vector, MAX_ARGV_STR, 1, + (vm_offset_t)(addr), iov.iov_len, UIO_SYSSPACE, UIO_READ, td); + + ret = proc_rwmem(p, &tmp_uio); + if (ret != 0) + return ret; + + /* Now we can iterate through the list of strings */ + for (i = 0; i < n_elements; i++) { + found_end = 0; + pbegin = env_vector[i]; + while(!found_end) { + UIO_HELPER(tmp_uio, iov, env_string, sizeof(env_string), 1, + (vm_offset_t) pbegin, iov.iov_len, UIO_SYSSPACE, + UIO_READ, td); + + ret = proc_rwmem(p, &tmp_uio); + if (ret != 0) + return ret; + + if (!strvalid(env_string, UIO_CHUNK_SZ)) { + /* + * We didn't find the end of the string + * Add the string to the buffer and move + * the pointer + */ + sbuf_bcat(sb, env_string, UIO_CHUNK_SZ); + pbegin = &(*pbegin) + UIO_CHUNK_SZ; + } else { + found_end = 1; + } + } + sbuf_printf(sb, "%s", env_string); + } + +#undef UIO_HELPER + + return (0); +} + +static void +ps_string_env(const struct ps_strings ps, u_long *addr, int *n) +{ + + *addr = (u_long) ps.ps_envstr; + *n = ps.ps_nenvstr; +} + /* * Filler function for proc/pid/environ */ static int linprocfs_doprocenviron(PFS_FILL_ARGS) { + int ret; - sbuf_printf(sb, "doprocenviron\n%c", '\0'); - return (0); + PROC_LOCK(p); + + if ((ret = p_cansee(td, p)) != 0) { + PROC_UNLOCK(p); + return ret; + } + + ret = linprocfs_doargv(td, p, sb, ps_string_env); + PROC_UNLOCK(p); + return (ret); } /* From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 08:16:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 092561065672; Thu, 16 Sep 2010 08:16:54 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE3D28FC18; Thu, 16 Sep 2010 08:16:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G8GrCF065810; Thu, 16 Sep 2010 08:16:53 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G8Grmj065808; Thu, 16 Sep 2010 08:16:53 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201009160816.o8G8Grmj065808@svn.freebsd.org> From: Brian Somers Date: Thu, 16 Sep 2010 08:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212724 - head/sbin/fdisk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 08:16:54 -0000 Author: brian Date: Thu Sep 16 08:16:53 2010 New Revision: 212724 URL: http://svn.freebsd.org/changeset/base/212724 Log: Add support for identifying a journaled root filesystem. Fix support for identifying the given /dev/vinum/root example. MFC after: 3 weeks Modified: head/sbin/fdisk/fdisk.c Modified: head/sbin/fdisk/fdisk.c ============================================================================== --- head/sbin/fdisk/fdisk.c Thu Sep 16 07:56:34 2010 (r212723) +++ head/sbin/fdisk/fdisk.c Thu Sep 16 08:16:53 2010 (r212724) @@ -1462,6 +1462,7 @@ sanitize_partition(struct dos_partition * /dev/da0a => /dev/da0 * /dev/vinum/root => /dev/vinum/root * A ".eli" part is removed if it exists (see geli(8)). + * A ".journal" ending is removed if it exists (see gjournal(8)). */ static char * get_rootdisk(void) @@ -1476,7 +1477,7 @@ get_rootdisk(void) if (statfs("/", &rootfs) == -1) err(1, "statfs(\"/\")"); - if ((rv = regcomp(&re, "^(/dev/[a-z/]+[0-9]+)([sp][0-9]+)?[a-h]?$", + if ((rv = regcomp(&re, "^(/dev/[a-z/]+[0-9]*)([sp][0-9]+)?[a-h]?(\\.journal)?$", REG_EXTENDED)) != 0) errx(1, "regcomp() failed (%d)", rv); strlcpy(dev, rootfs.f_mntfromname, sizeof (dev)); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 08:59:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E5B2106564A; Thu, 16 Sep 2010 08:59:11 +0000 (UTC) (envelope-from prvs=18684819c6=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id C106C8FC0A; Thu, 16 Sep 2010 08:59:10 +0000 (UTC) Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139]) by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 16 Sep 2010 02:44:08 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=6EkEX6JM2LCztCEhkE317K9SpBSN4cB8nbuuHVfFIzI= c=1 sm=1 a=9fUDse7kmeoA:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=bQswk-ucj_17iOK-MwkA:9 a=_7DtvMzIEwt9-Y0m_bUA:7 a=8hhyb2-YBQI508o0oNYS5gFcixEA:4 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 16 Sep 2010 02:44:08 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 44048C433AC_C91D8D8B; Thu, 16 Sep 2010 08:44:08 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id EA1F2C460F7_C91D8D4F; Thu, 16 Sep 2010 08:44:04 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o8G8i49M036858; Thu, 16 Sep 2010 01:44:04 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Thu, 16 Sep 2010 01:44:04 -0700 From: Brian Somers To: Kirk McKusick Message-ID: <20100916014404.0409017f@dev.lan.Awfulhak.org> In-Reply-To: <201009141804.o8EI45kp088466@svn.freebsd.org> References: <201009141804.o8EI45kp088466@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-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 Subject: Re: svn commit: r212617 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 08:59:11 -0000 On Tue, 14 Sep 2010 18:04:05 +0000 (UTC) Kirk McKusick wrote: > Author: mckusick > Date: Tue Sep 14 18:04:05 2010 > New Revision: 212617 > URL: http://svn.freebsd.org/changeset/base/212617 > > Log: > Update comments in soft updates code to more fully describe > the addition of journalling. Only functional change is to > tighten a KASSERT. > > Reviewed by: jeff Roberson > > Modified: > head/sys/ufs/ffs/ffs_softdep.c > head/sys/ufs/ffs/fs.h > head/sys/ufs/ffs/softdep.h > > Modified: head/sys/ufs/ffs/ffs_softdep.c > ============================================================================== > --- head/sys/ufs/ffs/ffs_softdep.c Tue Sep 14 17:22:06 2010 (r212616) > +++ head/sys/ufs/ffs/ffs_softdep.c Tue Sep 14 18:04:05 2010 (r212617) > @@ -2378,7 +2378,8 @@ remove_from_journal(wk) > /* > * We emulate a TAILQ to save space in most structures which do not > * require TAILQ semantics. Here we must update the tail position > - * when removing the tail which is not the final entry. > + * when removing the tail which is not the final entry. This works > + * only if the worklist linkage are at the beginning of the structure. > */ > if (ump->softdep_journal_tail == wk) > ump->softdep_journal_tail = > @@ -2605,7 +2606,7 @@ jremref_write(jremref, jseg, data) > inoref_write(&jremref->jr_ref, jseg, rec); > } > > -static void > +static void > jmvref_write(jmvref, jseg, data) > struct jmvref *jmvref; > struct jseg *jseg; > @@ -2906,9 +2907,9 @@ complete_jseg(jseg) > waiting = wk->wk_state & IOWAITING; > wk->wk_state &= ~(IOSTARTED | IOWAITING); > wk->wk_state |= COMPLETE; > - KASSERT(i < jseg->js_cnt, > + KASSERT(i++ < jseg->js_cnt, > ("handle_written_jseg: overflow %d >= %d", [.....] If INVARIANTS is not defined, the above i++ will not happen. -- Brian Somers Don't _EVER_ lose your sense of humour ! From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 09:04:14 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F89B106564A; Thu, 16 Sep 2010 09:04:14 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 006C48FC23; Thu, 16 Sep 2010 09:04:13 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o8G8ihUU034889; Thu, 16 Sep 2010 01:44:43 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o8G8ihuk034888; Thu, 16 Sep 2010 01:44:43 -0700 (PDT) (envelope-from obrien) Date: Thu, 16 Sep 2010 01:44:42 -0700 From: "David O'Brien" To: Juli Mallett Message-ID: <20100916084442.GB21622@dragon.NUXI.org> References: <201009091927.o89JReXm022426@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 09:04:14 -0000 On Thu, Sep 09, 2010 at 12:51:11PM -0700, Juli Mallett wrote: > On Thu, Sep 9, 2010 at 12:27, David E. O'Brien wrote: > > Author: obrien > > Date: Thu Sep  9 19:27:40 2010 > > New Revision: 212374 > > URL: http://svn.freebsd.org/changeset/base/212374 > > > > Log: > >  Note bug in trying to printf(1) things like: '-%s\n' "foo" > > Should we also add something like this note to every manual page for a > program that operates on files as command line arguments after options > w.r.t. operating on files whose names begin with '-'? No. Because most programs have a synopsis like: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1] [-D format] [file ...] However, printf(1)'s is printf format [arguments ...] Which does not say it takes ANY command-line options. Thus why should one expect to have to trick out any command-line arguments "--" as one would with 'grep -- --i *.c'? Is a sentence or two a burden to the man page vs. saving someone the time I spent trying to figure out why printf(1) kept throwing up errors? -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 09:29:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2AAD106564A; Thu, 16 Sep 2010 09:29:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97B598FC1B; Thu, 16 Sep 2010 09:29:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G9Tmde067446; Thu, 16 Sep 2010 09:29:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G9Tmt3067441; Thu, 16 Sep 2010 09:29:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009160929.o8G9Tmt3067441@svn.freebsd.org> From: Marius Strobl Date: Thu, 16 Sep 2010 09:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212725 - in head/sys: dev/gem modules/gem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 09:29:48 -0000 Author: marius Date: Thu Sep 16 09:29:48 2010 New Revision: 212725 URL: http://svn.freebsd.org/changeset/base/212725 Log: Merge r207585 from cas(4): - Don't probe for PHYs if we already know to use a SERDES. Unlike as with cas(4) this only serves to speed up the the device attach though and can only be determined via the OFW device tree but not from the VPD. - Don't touch the MIF when using a SERDES. - Add some missing bus space barriers, mainly in the PCS code path. Modified: head/sys/dev/gem/if_gem.c head/sys/dev/gem/if_gem_pci.c head/sys/dev/gem/if_gem_sbus.c head/sys/modules/gem/Makefile Modified: head/sys/dev/gem/if_gem.c ============================================================================== --- head/sys/dev/gem/if_gem.c Thu Sep 16 08:16:53 2010 (r212724) +++ head/sys/dev/gem/if_gem.c Thu Sep 16 09:29:48 2010 (r212725) @@ -268,10 +268,17 @@ gem_attach(struct gem_softc *sc) sc->sc_rxsoft[i].rxs_mbuf = NULL; } + /* Bypass probing PHYs if we already know for sure to use a SERDES. */ + if ((sc->sc_flags & GEM_SERDES) != 0) + goto serdes; + /* Bad things will happen when touching this register on ERI. */ - if (sc->sc_variant != GEM_SUN_ERI) + if (sc->sc_variant != GEM_SUN_ERI) { GEM_BANK1_WRITE_4(sc, GEM_MII_DATAPATH_MODE, GEM_MII_DATAPATH_MII); + GEM_BANK1_BARRIER(sc, GEM_MII_DATAPATH_MODE, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } gem_mifinit(sc); @@ -283,6 +290,8 @@ gem_attach(struct gem_softc *sc) if ((v & GEM_MIF_CONFIG_MDI1) != 0) { v |= GEM_MIF_CONFIG_PHY_SEL; GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v); + GEM_BANK1_BARRIER(sc, GEM_MIF_CONFIG, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (sc->sc_variant) { case GEM_SUN_ERI: sc->sc_phyad = GEM_PHYAD_EXTERNAL; @@ -304,6 +313,8 @@ gem_attach(struct gem_softc *sc) ((v & GEM_MIF_CONFIG_MDI0) != 0 || GEM_IS_APPLE(sc))) { v &= ~GEM_MIF_CONFIG_PHY_SEL; GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v); + GEM_BANK1_BARRIER(sc, GEM_MIF_CONFIG, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (sc->sc_variant) { case GEM_SUN_ERI: case GEM_APPLE_K2_GMAC: @@ -324,17 +335,23 @@ gem_attach(struct gem_softc *sc) * Try the external PCS SERDES if we didn't find any PHYs. */ if (error != 0 && sc->sc_variant == GEM_SUN_GEM) { + serdes: GEM_BANK1_WRITE_4(sc, GEM_MII_DATAPATH_MODE, GEM_MII_DATAPATH_SERDES); + GEM_BANK1_BARRIER(sc, GEM_MII_DATAPATH_MODE, 4, + BUS_SPACE_BARRIER_WRITE); GEM_BANK1_WRITE_4(sc, GEM_MII_SLINK_CONTROL, GEM_MII_SLINK_LOOPBACK | GEM_MII_SLINK_EN_SYNC_D); + GEM_BANK1_BARRIER(sc, GEM_MII_SLINK_CONTROL, 4, + BUS_SPACE_BARRIER_WRITE); GEM_BANK1_WRITE_4(sc, GEM_MII_CONFIG, GEM_MII_CONFIG_ENABLE); + GEM_BANK1_BARRIER(sc, GEM_MII_CONFIG, 4, + BUS_SPACE_BARRIER_WRITE); sc->sc_flags |= GEM_SERDES; sc->sc_phyad = GEM_PHYAD_EXTERNAL; error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, gem_mediachange, gem_mediastatus); } - if (error != 0) { device_printf(sc->sc_dev, "PHY probe failed: %d\n", error); goto fail_rxd; @@ -918,8 +935,9 @@ gem_init_locked(struct gem_softc *sc) __func__); #endif - /* Re-initialize the MIF. */ - gem_mifinit(sc); + if ((sc->sc_flags & GEM_SERDES) == 0) + /* Re-initialize the MIF. */ + gem_mifinit(sc); /* step 3. Setup data structures in host memory. */ if (gem_meminit(sc) != 0) @@ -1800,6 +1818,8 @@ gem_mifinit(struct gem_softc *sc) /* Configure the MIF in frame mode. */ GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, GEM_BANK1_READ_4(sc, GEM_MIF_CONFIG) & ~GEM_MIF_CONFIG_BB_ENA); + GEM_BANK1_BARRIER(sc, GEM_MIF_CONFIG, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } /* @@ -1914,10 +1934,16 @@ gem_mii_writereg(device_t dev, int phy, GEM_BANK1_BARRIER(sc, GEM_MII_CONFIG, 4, BUS_SPACE_BARRIER_WRITE); GEM_BANK1_WRITE_4(sc, GEM_MII_ANAR, val); + GEM_BANK1_BARRIER(sc, GEM_MII_ANAR, 4, + BUS_SPACE_BARRIER_WRITE); GEM_BANK1_WRITE_4(sc, GEM_MII_SLINK_CONTROL, GEM_MII_SLINK_LOOPBACK | GEM_MII_SLINK_EN_SYNC_D); + GEM_BANK1_BARRIER(sc, GEM_MII_SLINK_CONTROL, 4, + BUS_SPACE_BARRIER_WRITE); GEM_BANK1_WRITE_4(sc, GEM_MII_CONFIG, GEM_MII_CONFIG_ENABLE); + GEM_BANK1_BARRIER(sc, GEM_MII_CONFIG, 4, + BUS_SPACE_BARRIER_WRITE); return (0); case MII_ANLPAR: reg = GEM_MII_ANLPAR; @@ -1928,6 +1954,8 @@ gem_mii_writereg(device_t dev, int phy, return (0); } GEM_BANK1_WRITE_4(sc, reg, val); + GEM_BANK1_BARRIER(sc, reg, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); return (0); } Modified: head/sys/dev/gem/if_gem_pci.c ============================================================================== --- head/sys/dev/gem/if_gem_pci.c Thu Sep 16 08:16:53 2010 (r212724) +++ head/sys/dev/gem/if_gem_pci.c Thu Sep 16 09:29:48 2010 (r212725) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__powerpc__) || defined(__sparc64__) +#include #include #include #endif @@ -140,12 +141,17 @@ static struct resource_spec gem_pci_res_ { -1, 0 } }; +#define GEM_SHARED_PINS "shared-pins" +#define GEM_SHARED_PINS_SERDES "serdes" + static int gem_pci_attach(device_t dev) { struct gem_softc *sc; int i; -#if !(defined(__powerpc__) || defined(__sparc64__)) +#if defined(__powerpc__) || defined(__sparc64__) + char buf[sizeof(GEM_SHARED_PINS)]; +#else int j; #endif @@ -207,6 +213,12 @@ gem_pci_attach(device_t dev) #if defined(__powerpc__) || defined(__sparc64__) OF_getetheraddr(dev, sc->sc_enaddr); + if (OF_getprop(ofw_bus_get_node(dev), GEM_SHARED_PINS, buf, + sizeof(buf)) > 0) { + buf[sizeof(buf) - 1] = '\0'; + if (strcmp(buf, GEM_SHARED_PINS_SERDES) == 0) + sc->sc_flags |= GEM_SERDES; + } #else /* * Dig out VPD (vital product data) and read NA (network address). Modified: head/sys/dev/gem/if_gem_sbus.c ============================================================================== --- head/sys/dev/gem/if_gem_sbus.c Thu Sep 16 08:16:53 2010 (r212724) +++ head/sys/dev/gem/if_gem_sbus.c Thu Sep 16 09:29:48 2010 (r212725) @@ -131,6 +131,8 @@ gem_sbus_attach(device_t dev) sc = device_get_softc(dev); sc->sc_variant = GEM_SUN_GEM; sc->sc_dev = dev; + /* All known SBus models use a SERDES. */ + sc->sc_flags = GEM_SERDES; if (bus_alloc_resources(dev, gem_sbus_res_spec, sc->sc_res)) { device_printf(dev, "failed to allocate resources\n"); Modified: head/sys/modules/gem/Makefile ============================================================================== --- head/sys/modules/gem/Makefile Thu Sep 16 08:16:53 2010 (r212724) +++ head/sys/modules/gem/Makefile Thu Sep 16 09:29:48 2010 (r212725) @@ -3,10 +3,15 @@ .PATH: ${.CURDIR}/../../dev/gem KMOD= if_gem -SRCS= bus_if.h device_if.h if_gem.c if_gem_pci.c miibus_if.h pci_if.h +SRCS= bus_if.h device_if.h if_gem.c if_gem_pci.c ${if_gem_sbus} miibus_if.h +SRCS+= ${ofw_bus_if} pci_if.h .if ${MACHINE} == "sparc64" -SRCS+= if_gem_sbus.c ofw_bus_if.h +if_gem_sbus= if_gem_sbus.c +.endif + +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" +ofw_bus_if= ofw_bus_if.h .endif .include From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 10:44:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D19E1065670 for ; Thu, 16 Sep 2010 10:44:18 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id D5F688FC27 for ; Thu, 16 Sep 2010 10:44:17 +0000 (UTC) Received: (qmail 3450 invoked from network); 16 Sep 2010 10:38:55 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 16 Sep 2010 10:38:55 -0000 Message-ID: <4C91F503.4000303@freebsd.org> Date: Thu, 16 Sep 2010 12:44:19 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: John Baldwin References: <201009151039.o8FAdU4H030416@svn.freebsd.org> <4C90B326.4000208@freebsd.org> <4C90D27D.4070306@freebsd.org> <201009151212.52337.jhb@freebsd.org> In-Reply-To: <201009151212.52337.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Lawrence Stewart , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212653 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 10:44:18 -0000 On 15.09.2010 18:12, John Baldwin wrote: > On Wednesday, September 15, 2010 10:04:45 am Andre Oppermann wrote: >> Below is the wording proposed by Lawrence: >> /* >> * The default Maximum Segment Size (MSS) to use when we do not have specific >> * knowledge (e.g. via path MTU discovery) that the destination host is prepared >> * to accept larger datagrams. The smallest allowable IP datagram MTU and >> * optionless IP/TCP header lengths are used for the calculation as per RFC879. >> * For IPv4 (RFC791): 576 - 20 - 20 = 536. >> * For IPv6 (RFC2460): 1280 - 40 - 20 = 1220. >> */ >> #define TCP_MSS 536 >> #define TCP6_MSS 1220 > > I think the existing text is fine for this comment, with one nit: > > * For IPv4 the MSS is 576 - sizeof(struct tcpiphdr) > > I would find it clearer if it was 'sizeof(struct ip) - sizeof(struct tcphdr)' > instead. I chose 'sizeof(struct tcpiphdr)' for consistency with other parts of the TCP code where the MSS is calculated this way. 'struct tcpiphdr' predates IPv6 and is commonly used in the BSD kernel code. >> * Limit the lowest MSS we accept for path MTU discovery and the TCP SYN MSS >> * option. Allowing low values of MSS can consume significant resources and be >> * used to mount a resource exhaustion attack. Connections requesting lower MSS >> * values will be rounded up to this value and the IP_DF flag will be cleared to >> * allow fragmentation along the path. >> * >> * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. Setting this >> * SYSCTL to "0" disables the minmss check. >> * >> * The default value is fine for TCP over IPv4 across the Internet's smallest >> * known link MTU (256 bytes for AX.25 packet radio). However, a connection is >> * very unlikely to come across such low MTU interfaces (anno domini 2003). >> */ >> #define TCP_MINMSS 216 > > I actually prefer the above text for this block. The 'amounts of resources' > phrase is certainly redundant and just 'resources' is clearer. OK. I'll update the comment with a small change to the third paragraph. -- Andre From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 10:53:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD601065673; Thu, 16 Sep 2010 10:53:02 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FC4F8FC12; Thu, 16 Sep 2010 10:53:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GAr2rO086687; Thu, 16 Sep 2010 10:53:02 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GAr29r086685; Thu, 16 Sep 2010 10:53:02 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201009161053.o8GAr29r086685@svn.freebsd.org> From: Marko Zec Date: Thu, 16 Sep 2010 10:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212726 - head/sbin/sysctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 10:53:02 -0000 Author: zec Date: Thu Sep 16 10:53:01 2010 New Revision: 212726 URL: http://svn.freebsd.org/changeset/base/212726 Log: Make the format of "Real Memory" and "Virtual Memory" lines more consistent with the rest of sysctl vm.vmtotal output. MFC after: 3 days Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Thu Sep 16 09:29:48 2010 (r212725) +++ head/sbin/sysctl/sysctl.c Thu Sep 16 10:53:01 2010 (r212726) @@ -406,9 +406,9 @@ S_vmtotal(int l2, void *p) "%hd Sleep: %hd)\n", v->t_rq, v->t_dw, v->t_pw, v->t_sl); printf( - "Virtual Memory:\t\t(Total: %dK, Active %dK)\n", + "Virtual Memory:\t\t(Total: %dK Active: %dK)\n", v->t_vm * pageKilo, v->t_avm * pageKilo); - printf("Real Memory:\t\t(Total: %dK Active %dK)\n", + printf("Real Memory:\t\t(Total: %dK Active: %dK)\n", v->t_rm * pageKilo, v->t_arm * pageKilo); printf("Shared Virtual Memory:\t(Total: %dK Active: %dK)\n", v->t_vmshr * pageKilo, v->t_avmshr * pageKilo); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 11:33:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F140F1065672; Thu, 16 Sep 2010 11:33:31 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0B218FC0A; Thu, 16 Sep 2010 11:33:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GBXVIq087568; Thu, 16 Sep 2010 11:33:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GBXVcK087566; Thu, 16 Sep 2010 11:33:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009161133.o8GBXVcK087566@svn.freebsd.org> From: Rui Paulo Date: Thu, 16 Sep 2010 11:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212727 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 11:33:32 -0000 Author: rpaulo Date: Thu Sep 16 11:33:31 2010 New Revision: 212727 URL: http://svn.freebsd.org/changeset/base/212727 Log: When generating functions to print the arguments of system calls with bitwise parameters (e.g. mmap), print the syscall parameter value first. The resulting output looks like the %b specifier of printf(9). Before: mmap(0,0x8000,PROT_READ|PROT_WRITE,... After: mmap(0,0x8000,0x3,... Submitted by: Norberto Lopes Idea from: freebsd-arch/2006-April/005116.html Modified: head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/mksubr ============================================================================== --- head/usr.bin/kdump/mksubr Thu Sep 16 10:53:01 2010 (r212726) +++ head/usr.bin/kdump/mksubr Thu Sep 16 11:33:31 2010 (r212727) @@ -49,6 +49,7 @@ void $name (int arg) { int or = 0; + printf("%#x<", arg); _EOF_ egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ $include_dir/$file | \ @@ -58,6 +59,7 @@ _EOF_ ++i; \ printf "\tif(!((arg>0)^((%s)>0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' cat <<_EOF_ + printf(">"); if (or == 0) (void)printf("%ld", (long)arg); } @@ -432,6 +434,8 @@ sendrecvflagsname (int flags) (void)printf("0"); return; } + + printf("%#x<", flags); _EOF_ egrep "^#[[:space:]]*define[[:space:]]+MSG_[A-Z]+[[:space:]]+0x[0-9]+[[:space:]]*" $include_dir/sys/socket.h | \ awk '{ for (i = 1; i <= NF; i++) \ @@ -440,6 +444,7 @@ egrep "^#[[:space:]]*define[[:space:]]+M ++i; \ printf "\tif(!((flags>0)^((%s)>0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i }' cat <<_EOF_ + printf(">"); } _EOF_ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 11:36:47 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 228AE1065670; Thu, 16 Sep 2010 11:36:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id AAA058FC1C; Thu, 16 Sep 2010 11:36:46 +0000 (UTC) Received: from c122-107-116-249.carlnfd1.nsw.optusnet.com.au (c122-107-116-249.carlnfd1.nsw.optusnet.com.au [122.107.116.249]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o8GBahV3020358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Sep 2010 21:36:44 +1000 Date: Thu, 16 Sep 2010 21:36:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "David O'Brien" In-Reply-To: <20100916084442.GB21622@dragon.NUXI.org> Message-ID: <20100916212043.N724@delplex.bde.org> References: <201009091927.o89JReXm022426@svn.freebsd.org> <20100916084442.GB21622@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1360494272-1284637003=:724" Cc: Juli Mallett , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 11:36:47 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1360494272-1284637003=:724 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 16 Sep 2010, David O'Brien wrote: > On Thu, Sep 09, 2010 at 12:51:11PM -0700, Juli Mallett wrote: >> On Thu, Sep 9, 2010 at 12:27, David E. O'Brien wrot= e: >>> Author: obrien >>> Date: Thu Sep =A09 19:27:40 2010 >>> New Revision: 212374 >>> URL: http://svn.freebsd.org/changeset/base/212374 >>> >>> Log: >>> =A0Note bug in trying to printf(1) things like: '-%s\n' "foo" >> >> Should we also add something like this note to every manual page for a >> program that operates on files as command line arguments after options >> w.r.t. operating on files whose names begin with '-'? > > No. Because most programs have a synopsis like: > > ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1] [-D format] [file ...] > > However, printf(1)'s is > > printf format [arguments ...] > > Which does not say it takes ANY command-line options. Thus why should > one expect to have to trick out any command-line arguments "--" as one > would with 'grep -- --i *.c'? > > Is a sentence or two a burden to the man page vs. saving someone the time > I spent trying to figure out why printf(1) kept throwing up errors? WHat about the lesser burder on a character or two for putting -- in the synopsis where it is more visible: =09printf [--] format [arguments ...] POSIX doesn't do this, and it doesn't seem to say anything about the problem of a leading - in the format either. Presumably its general utilities specs require _all_ utilities to support "--". I wonder if there are any utilities that don't use getopt(3) and as a result aren't POSIX conformant since they don't support "--" and also need to support a first argument starting with "-" (which won't cause problems because getopt() is not there to mess it up, but the POSIX-specified way of a "--" before the arg won't work. sleep(1) was such a utility until recently -- FreeBSD hacked on it to remove its getopt(3) call, but didn't remove its man page's claim of "is expected to be (1003.2) POSIX compatible". 1003.2 is almost 20 years old now, so someone should know if sleep(1) was actually compatible with it. Bruce --0-1360494272-1284637003=:724-- From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 11:40:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A0F210656CA; Thu, 16 Sep 2010 11:40:42 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D1C78FC22; Thu, 16 Sep 2010 11:40:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GBegk3087745; Thu, 16 Sep 2010 11:40:42 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GBegfC087743; Thu, 16 Sep 2010 11:40:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009161140.o8GBegfC087743@svn.freebsd.org> From: Rui Paulo Date: Thu, 16 Sep 2010 11:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212728 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 11:40:42 -0000 Author: rpaulo Date: Thu Sep 16 11:40:41 2010 New Revision: 212728 URL: http://svn.freebsd.org/changeset/base/212728 Log: Fix indenting of the previous commit. Modified: head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/mksubr ============================================================================== --- head/usr.bin/kdump/mksubr Thu Sep 16 11:33:31 2010 (r212727) +++ head/usr.bin/kdump/mksubr Thu Sep 16 11:40:41 2010 (r212728) @@ -49,7 +49,7 @@ void $name (int arg) { int or = 0; - printf("%#x<", arg); + printf("%#x<", arg); _EOF_ egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ $include_dir/$file | \ @@ -59,7 +59,7 @@ _EOF_ ++i; \ printf "\tif(!((arg>0)^((%s)>0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' cat <<_EOF_ - printf(">"); + printf(">"); if (or == 0) (void)printf("%ld", (long)arg); } @@ -435,7 +435,7 @@ sendrecvflagsname (int flags) return; } - printf("%#x<", flags); + printf("%#x<", flags); _EOF_ egrep "^#[[:space:]]*define[[:space:]]+MSG_[A-Z]+[[:space:]]+0x[0-9]+[[:space:]]*" $include_dir/sys/socket.h | \ awk '{ for (i = 1; i <= NF; i++) \ @@ -444,7 +444,7 @@ egrep "^#[[:space:]]*define[[:space:]]+M ++i; \ printf "\tif(!((flags>0)^((%s)>0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i }' cat <<_EOF_ - printf(">"); + printf(">"); } _EOF_ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 12:05:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 187C0106564A; Thu, 16 Sep 2010 12:05:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0423C8FC16; Thu, 16 Sep 2010 12:05:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GC50bp088277; Thu, 16 Sep 2010 12:05:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GC5081088275; Thu, 16 Sep 2010 12:05:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009161205.o8GC5081088275@svn.freebsd.org> From: Marius Strobl Date: Thu, 16 Sep 2010 12:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212729 - head/sys/boot/sparc64/boot1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 12:05:01 -0000 Author: marius Date: Thu Sep 16 12:05:00 2010 New Revision: 212729 URL: http://svn.freebsd.org/changeset/base/212729 Log: Merge from powerpc: - Change putc_func_t to use a char instead of an int for the character. - Make functions and variables not used outside of this source file static. - Remove unused prototypes and variables. - The OFW read and seek methods take 3 and not 4 input arguments. Modified: head/sys/boot/sparc64/boot1/boot1.c Modified: head/sys/boot/sparc64/boot1/boot1.c ============================================================================== --- head/sys/boot/sparc64/boot1/boot1.c Thu Sep 16 11:40:41 2010 (r212728) +++ head/sys/boot/sparc64/boot1/boot1.c Thu Sep 16 12:05:00 2010 (r212729) @@ -26,9 +26,7 @@ __FBSDID("$FreeBSD$"); #define _PATH_LOADER "/boot/loader" #define _PATH_KERNEL "/boot/kernel/kernel" -#define BSIZEMAX 16384 - -typedef int putc_func_t(int c, void *arg); +typedef int putc_func_t(char c, void *arg); typedef int32_t ofwh_t; struct sp_data { @@ -44,11 +42,6 @@ static char bootargs[128]; static ofwh_t bootdev; -static struct fs fs; -static ino_t inomap; -static char blkbuf[BSIZEMAX]; -static unsigned int fsblks; - static uint32_t fs_off; int main(int ac, char **av); @@ -66,14 +59,13 @@ static int mount(const char *device); static void panic(const char *fmt, ...) __dead2; static int printf(const char *fmt, ...); -static int putchar(int c, void *arg); +static int putchar(char c, void *arg); static int vprintf(const char *fmt, va_list ap); static int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); static int __printf(const char *fmt, putc_func_t *putc, void *arg, va_list ap); -static int __putc(int c, void *arg); static int __puts(const char *s, putc_func_t *putc, void *arg); -static int __sputc(int c, void *arg); +static int __sputc(char c, void *arg); static char *__uitoa(char *buf, u_int val, int base); static char *__ultoa(char *buf, u_long val, int base); @@ -83,19 +75,18 @@ static char *__ultoa(char *buf, u_long v typedef u_int64_t ofwcell_t; typedef u_int32_t u_ofwh_t; typedef int (*ofwfp_t)(ofwcell_t []); -ofwfp_t ofw; /* the prom Open Firmware entry */ +static ofwfp_t ofw; /* the PROM Open Firmware entry */ void ofw_init(int, int, int, int, ofwfp_t); -ofwh_t ofw_finddevice(const char *); -ofwh_t ofw_open(const char *); -int ofw_getprop(ofwh_t, const char *, void *, size_t); -int ofw_read(ofwh_t, void *, size_t); -int ofw_write(ofwh_t, const void *, size_t); -int ofw_seek(ofwh_t, u_int64_t); -void ofw_exit(void) __dead2; +static ofwh_t ofw_finddevice(const char *); +static ofwh_t ofw_open(const char *); +static int ofw_getprop(ofwh_t, const char *, void *, size_t); +static int ofw_read(ofwh_t, void *, size_t); +static int ofw_write(ofwh_t, const void *, size_t); +static int ofw_seek(ofwh_t, u_int64_t); +static void ofw_exit(void) __dead2; -ofwh_t bootdevh; -ofwh_t stdinh, stdouth; +static ofwh_t stdinh, stdouth; /* * This has to stay here, as the PROM seems to ignore the @@ -138,7 +129,7 @@ ofw_init(int d, int d1, int d2, int d3, exit(main(ac, av)); } -ofwh_t +static ofwh_t ofw_finddevice(const char *name) { ofwcell_t args[] = { @@ -156,7 +147,7 @@ ofw_finddevice(const char *name) return (args[4]); } -int +static int ofw_getprop(ofwh_t ofwh, const char *name, void *buf, size_t len) { ofwcell_t args[] = { @@ -178,7 +169,7 @@ ofw_getprop(ofwh_t ofwh, const char *nam return (0); } -ofwh_t +static ofwh_t ofw_open(const char *path) { ofwcell_t args[] = { @@ -196,7 +187,7 @@ ofw_open(const char *path) return (args[4]); } -int +static int ofw_close(ofwh_t devh) { ofwcell_t args[] = { @@ -213,12 +204,12 @@ ofw_close(ofwh_t devh) return (0); } -int +static int ofw_read(ofwh_t devh, void *buf, size_t len) { ofwcell_t args[] = { (ofwcell_t)"read", - 4, + 3, 1, (u_ofwh_t)devh, (ofwcell_t)buf, @@ -233,7 +224,7 @@ ofw_read(ofwh_t devh, void *buf, size_t return (0); } -int +static int ofw_write(ofwh_t devh, const void *buf, size_t len) { ofwcell_t args[] = { @@ -253,12 +244,12 @@ ofw_write(ofwh_t devh, const void *buf, return (0); } -int +static int ofw_seek(ofwh_t devh, u_int64_t off) { ofwcell_t args[] = { (ofwcell_t)"seek", - 4, + 3, 1, (u_ofwh_t)devh, off >> 32, @@ -273,7 +264,7 @@ ofw_seek(ofwh_t devh, u_int64_t off) return (0); } -void +static void ofw_exit(void) { ofwcell_t args[3]; @@ -299,6 +290,7 @@ bcopy(const void *src, void *dst, size_t static void memcpy(void *dst, const void *src, size_t len) { + bcopy(src, dst, len); } @@ -314,6 +306,7 @@ bzero(void *b, size_t len) static int strcmp(const char *s1, const char *s2) { + for (; *s1 == *s2 && *s1; s1++, s2++) ; return ((u_char)*s1 - (u_char)*s2); @@ -431,6 +424,7 @@ load(const char *fname) static int dskread(void *buf, u_int64_t lba, int nblk) { + /* * The Open Firmware should open the correct partition for us. * That means, if we read from offset zero on an open instance handle, @@ -468,7 +462,7 @@ printf(const char *fmt, ...) } static int -putchar(int c, void *arg) +putchar(char c, void *arg) { char buf; @@ -614,7 +608,7 @@ reswitch: c = *fmt++; } static int -__sputc(int c, void *arg) +__sputc(char c, void *arg) { struct sp_data *sp; From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 12:05:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3531210656C7; Thu, 16 Sep 2010 12:05:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24C2C8FC28; Thu, 16 Sep 2010 12:05:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GC5lBE088330; Thu, 16 Sep 2010 12:05:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GC5lKT088328; Thu, 16 Sep 2010 12:05:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009161205.o8GC5lKT088328@svn.freebsd.org> From: Marius Strobl Date: Thu, 16 Sep 2010 12:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212730 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 12:05:47 -0000 Author: marius Date: Thu Sep 16 12:05:46 2010 New Revision: 212730 URL: http://svn.freebsd.org/changeset/base/212730 Log: Remove accidentally committed test code which effectively prevented the use of the SPARC64 V VIS-based block copy function added in r212709. Reported by: Michael Moll Modified: head/sys/sparc64/sparc64/machdep.c Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Thu Sep 16 12:05:00 2010 (r212729) +++ head/sys/sparc64/sparc64/machdep.c Thu Sep 16 12:05:46 2010 (r212730) @@ -511,8 +511,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_l case CPU_IMPL_SPARC64V: cpu_block_copy = zeus_block_copy; cpu_block_zero = zeus_block_zero; - cpu_block_copy = spitfire_block_copy; - cpu_block_zero = spitfire_block_zero; break; } } From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 12:13:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33B7E1065695; Thu, 16 Sep 2010 12:13:07 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 232908FC24; Thu, 16 Sep 2010 12:13:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GCD7Ul088509; Thu, 16 Sep 2010 12:13:07 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GCD7uA088507; Thu, 16 Sep 2010 12:13:07 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201009161213.o8GCD7uA088507@svn.freebsd.org> From: Andre Oppermann Date: Thu, 16 Sep 2010 12:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212731 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 12:13:07 -0000 Author: andre Date: Thu Sep 16 12:13:06 2010 New Revision: 212731 URL: http://svn.freebsd.org/changeset/base/212731 Log: Improve comment to TCP_MINMSS by taking the wording from lstewart (with a small difference in the last paragraph though) as suggested by jhb. Clarify that the 'reviewed by' in r212653 by lstewart was for the functional change, not the comments in the committed version. Modified: head/sys/netinet/tcp.h Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Thu Sep 16 12:05:46 2010 (r212730) +++ head/sys/netinet/tcp.h Thu Sep 16 12:13:06 2010 (r212731) @@ -120,18 +120,18 @@ struct tcphdr { #define TCP6_MSS 1220 /* - * Limit the lowest MSS we accept from path MTU discovery and the TCP SYN MSS - * option. Allowing too low values of MSS can consume significant amounts of - * resources and be used as a form of a resource exhaustion attack. + * Limit the lowest MSS we accept for path MTU discovery and the TCP SYN MSS + * option. Allowing low values of MSS can consume significant resources and + * be used to mount a resource exhaustion attack. * Connections requesting lower MSS values will be rounded up to this value - * and the IP_DF flag is cleared to allow fragmentation along the path. + * and the IP_DF flag will be cleared to allow fragmentation along the path. * * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. Setting * it to "0" disables the minmss check. * - * The default value is fine for the smallest official link MTU (256 bytes, - * AX.25 packet radio) in the Internet. However it is very unlikely to come - * across such low MTU interfaces these days (anno domini 2003). + * The default value is fine for TCP across the Internet's smallest official + * link MTU (256 bytes for AX.25 packet radio). However, a connection is very + * unlikely to come across such low MTU interfaces these days (anno domini 2003). */ #define TCP_MINMSS 216 From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 12:39:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A1791065693; Thu, 16 Sep 2010 12:39:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08D828FC28; Thu, 16 Sep 2010 12:39:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GCdot6089064; Thu, 16 Sep 2010 12:39:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GCdoOA089060; Thu, 16 Sep 2010 12:39:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009161239.o8GCdoOA089060@svn.freebsd.org> From: Alexander Motin Date: Thu, 16 Sep 2010 12:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212732 - in head/sys/dev: ahci mvs siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 12:39:51 -0000 Author: mav Date: Thu Sep 16 12:39:50 2010 New Revision: 212732 URL: http://svn.freebsd.org/changeset/base/212732 Log: Fix panic, when due to some kind of congestion on FIS-based switching port multiplier some command triggers false positive timeout, but then completes normally. MFC after: 2 weeks Modified: head/sys/dev/ahci/ahci.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu Sep 16 12:13:06 2010 (r212731) +++ head/sys/dev/ahci/ahci.c Thu Sep 16 12:39:50 2010 (r212732) @@ -1854,6 +1854,7 @@ ahci_end_transaction(struct ahci_slot *s device_t dev = slot->dev; struct ahci_channel *ch = device_get_softc(dev); union ccb *ccb = slot->ccb; + int lastto; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTWRITE); @@ -1955,11 +1956,6 @@ ahci_end_transaction(struct ahci_slot *s ch->oslots &= ~(1 << slot->slot); ch->rslots &= ~(1 << slot->slot); ch->aslots &= ~(1 << slot->slot); - if (et != AHCI_ERR_TIMEOUT) { - if (ch->toslots == (1 << slot->slot)) - xpt_release_simq(ch->sim, TRUE); - ch->toslots &= ~(1 << slot->slot); - } slot->state = AHCI_SLOT_EMPTY; slot->ccb = NULL; /* Update channel stats. */ @@ -1970,6 +1966,13 @@ ahci_end_transaction(struct ahci_slot *s ch->numtslots--; ch->numtslotspd[ccb->ccb_h.target_id]--; } + /* Cancel timeout state if request completed normally. */ + if (et != AHCI_ERR_TIMEOUT) { + lastto = (ch->toslots == (1 << slot->slot)); + ch->toslots &= ~(1 << slot->slot); + if (lastto) + xpt_release_simq(ch->sim, TRUE); + } /* If it was first request of reset sequence and there is no error, * proceed to second request. */ if ((ccb->ccb_h.func_code == XPT_ATA_IO) && Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Thu Sep 16 12:13:06 2010 (r212731) +++ head/sys/dev/mvs/mvs.c Thu Sep 16 12:39:50 2010 (r212732) @@ -1552,6 +1552,7 @@ mvs_end_transaction(struct mvs_slot *slo device_t dev = slot->dev; struct mvs_channel *ch = device_get_softc(dev); union ccb *ccb = slot->ccb; + int lastto; //device_printf(dev, "cmd done status %d\n", et); bus_dmamap_sync(ch->dma.workrq_tag, ch->dma.workrq_map, @@ -1634,11 +1635,6 @@ mvs_end_transaction(struct mvs_slot *slo ch->oslots &= ~(1 << slot->slot); ch->rslots &= ~(1 << slot->slot); ch->aslots &= ~(1 << slot->slot); - if (et != MVS_ERR_TIMEOUT) { - if (ch->toslots == (1 << slot->slot)) - xpt_release_simq(ch->sim, TRUE); - ch->toslots &= ~(1 << slot->slot); - } slot->state = MVS_SLOT_EMPTY; slot->ccb = NULL; /* Update channel stats. */ @@ -1658,6 +1654,13 @@ mvs_end_transaction(struct mvs_slot *slo ch->numpslots--; ch->basic_dma = 0; } + /* Cancel timeout state if request completed normally. */ + if (et != MVS_ERR_TIMEOUT) { + lastto = (ch->toslots == (1 << slot->slot)); + ch->toslots &= ~(1 << slot->slot); + if (lastto) + xpt_release_simq(ch->sim, TRUE); + } /* If it was our READ LOG command - process it. */ if (ch->readlog) { mvs_process_read_log(dev, ccb); Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Thu Sep 16 12:13:06 2010 (r212731) +++ head/sys/dev/siis/siis.c Thu Sep 16 12:39:50 2010 (r212732) @@ -1179,6 +1179,7 @@ siis_end_transaction(struct siis_slot *s device_t dev = slot->dev; struct siis_channel *ch = device_get_softc(dev); union ccb *ccb = slot->ccb; + int lastto; mtx_assert(&ch->mtx, MA_OWNED); bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, @@ -1262,11 +1263,6 @@ siis_end_transaction(struct siis_slot *s ch->oslots &= ~(1 << slot->slot); ch->rslots &= ~(1 << slot->slot); ch->aslots &= ~(1 << slot->slot); - if (et != SIIS_ERR_TIMEOUT) { - if (ch->toslots == (1 << slot->slot)) - xpt_release_simq(ch->sim, TRUE); - ch->toslots &= ~(1 << slot->slot); - } slot->state = SIIS_SLOT_EMPTY; slot->ccb = NULL; /* Update channel stats. */ @@ -1275,6 +1271,13 @@ siis_end_transaction(struct siis_slot *s (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) { ch->numtslots[ccb->ccb_h.target_id]--; } + /* Cancel timeout state if request completed normally. */ + if (et != SIIS_ERR_TIMEOUT) { + lastto = (ch->toslots == (1 << slot->slot)); + ch->toslots &= ~(1 << slot->slot); + if (lastto) + xpt_release_simq(ch->sim, TRUE); + } /* If it was our READ LOG command - process it. */ if (ch->readlog) { siis_process_read_log(dev, ccb); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 14:30:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DB1C1065696; Thu, 16 Sep 2010 14:30:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BCCA8FC0A; Thu, 16 Sep 2010 14:30:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GEUWuo093941; Thu, 16 Sep 2010 14:30:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GEUWne093939; Thu, 16 Sep 2010 14:30:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161430.o8GEUWne093939@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 14:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212734 - stable/8/sys/netgraph/netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 14:30:32 -0000 Author: glebius Date: Thu Sep 16 14:30:32 2010 New Revision: 212734 URL: http://svn.freebsd.org/changeset/base/212734 Log: MFhead 210500: Zero padding fields of netflow records. This helps to reduce size of compressed export logs. Requested by: Alexey Illarionov Modified: stable/8/sys/netgraph/netflow/netflow.c Modified: stable/8/sys/netgraph/netflow/netflow.c ============================================================================== --- stable/8/sys/netgraph/netflow/netflow.c Thu Sep 16 13:49:10 2010 (r212733) +++ stable/8/sys/netgraph/netflow/netflow.c Thu Sep 16 14:30:32 2010 (r212734) @@ -167,6 +167,7 @@ get_export_dgram(priv_p priv) dgram = mtod(m, struct netflow_v5_export_dgram *); dgram->header.count = 0; dgram->header.version = htons(NETFLOW_V5); + dgram->header.pad = 0; } @@ -644,6 +645,8 @@ export_add(item_p item, struct flow_entr rec->tos = fle->f.r.r_tos; rec->dst_mask = fle->f.dst_mask; rec->src_mask = fle->f.src_mask; + rec->pad1 = 0; + rec->pad2 = 0; /* Not supported fields. */ rec->src_as = rec->dst_as = 0; From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 14:55:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A4A3106564A; Thu, 16 Sep 2010 14:55:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68B0F8FC26; Thu, 16 Sep 2010 14:55:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GEtM8Y094607; Thu, 16 Sep 2010 14:55:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GEtMxY094605; Thu, 16 Sep 2010 14:55:22 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161455.o8GEtMxY094605@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 14:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212735 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 14:55:22 -0000 Author: glebius Date: Thu Sep 16 14:55:22 2010 New Revision: 212735 URL: http://svn.freebsd.org/changeset/base/212735 Log: MFhead 210529: When installing a new ARP entry via 'arp -S', lla_lookup() will either find an existing entry, or allocate a new one. In the latter case an entry would have flags, that were supplied as argument to lla_lookup(). In case of an existing entry, flags aren't modified. This lead to losing LLE_PUB and/or LLE_PROXY flags. We should apply these flags either in lla_rt_output() or in the in.c:in_lltable_lookup(). It seems to me that lla_rt_output() is a more correct choice. PR: kern/148784, kern/146539 Modified: stable/8/sys/net/if_llatbl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if_llatbl.c ============================================================================== --- stable/8/sys/net/if_llatbl.c Thu Sep 16 14:30:32 2010 (r212734) +++ stable/8/sys/net/if_llatbl.c Thu Sep 16 14:55:22 2010 (r212735) @@ -337,6 +337,7 @@ lla_rt_output(struct rt_msghdr *rtm, str * LLE_DELETED flag, and reset the expiration timer */ bcopy(LLADDR(dl), &lle->ll_addr, ifp->if_addrlen); + lle->la_flags |= (flags & (LLE_PUB | LLE_PROXY)); lle->la_flags |= LLE_VALID; lle->la_flags &= ~LLE_DELETED; #ifdef INET6 From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:00:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E08410656C8; Thu, 16 Sep 2010 15:00:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CBD18FC24; Thu, 16 Sep 2010 15:00:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GF0hOP094837; Thu, 16 Sep 2010 15:00:43 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GF0hKL094835; Thu, 16 Sep 2010 15:00:43 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161500.o8GF0hKL094835@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 15:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212736 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:00:43 -0000 Author: glebius Date: Thu Sep 16 15:00:43 2010 New Revision: 212736 URL: http://svn.freebsd.org/changeset/base/212736 Log: MFhead 210533: Don't check malloc(M_WAITOK) result. Modified: stable/8/sys/net/if_llatbl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if_llatbl.c ============================================================================== --- stable/8/sys/net/if_llatbl.c Thu Sep 16 14:55:22 2010 (r212735) +++ stable/8/sys/net/if_llatbl.c Thu Sep 16 15:00:43 2010 (r212736) @@ -234,8 +234,6 @@ lltable_init(struct ifnet *ifp, int af) register int i; llt = malloc(sizeof(struct lltable), M_LLTABLE, M_WAITOK); - if (llt == NULL) - return (NULL); llt->llt_af = af; llt->llt_ifp = ifp; From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:07:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A48106566C; Thu, 16 Sep 2010 15:07:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2E3A8FC12; Thu, 16 Sep 2010 15:07:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GF7CYM095060; Thu, 16 Sep 2010 15:07:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GF7ClL095058; Thu, 16 Sep 2010 15:07:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161507.o8GF7ClL095058@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 15:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212737 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:07:12 -0000 Author: glebius Date: Thu Sep 16 15:07:12 2010 New Revision: 212737 URL: http://svn.freebsd.org/changeset/base/212737 Log: Although flexible BPF timestamping framework isn't yet merged to stable/8, merge from head r209797,r209845 that fix a possible problem. Modified: stable/8/sys/netinet/ipfw/ip_fw_log.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_log.c Thu Sep 16 15:00:43 2010 (r212736) +++ stable/8/sys/netinet/ipfw/ip_fw_log.c Thu Sep 16 15:07:12 2010 (r212737) @@ -152,22 +152,17 @@ ipfw_log(struct ip_fw *f, u_int hlen, st if (V_fw_verbose == 0) { #ifndef WITHOUT_BPF - struct m_hdr mh; if (log_if == NULL || log_if->if_bpf == NULL) return; - /* BPF treats the "mbuf" as read-only */ - mh.mh_next = m; - mh.mh_len = ETHER_HDR_LEN; - if (args->eh) { /* layer2, use orig hdr */ - mh.mh_data = (char *)args->eh; - } else { - /* add fake header. Later we will store - * more info in the header + + if (args->eh) /* layer2, use orig hdr */ + BPF_MTAP2(log_if, args->eh, ETHER_HDR_LEN, m); + else + /* Add fake header. Later we will store + * more info in the header. */ - mh.mh_data = "DDDDDDSSSSSS\x08\x00"; - } - BPF_MTAP(log_if, (struct mbuf *)&mh); + BPF_MTAP2(log_if, "DDDDDDSSSSSS\x08\x00", ETHER_HDR_LEN, m); #endif /* !WITHOUT_BPF */ return; } From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:11:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F49A1065672; Thu, 16 Sep 2010 15:11:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6218FC20; Thu, 16 Sep 2010 15:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFBIot095342; Thu, 16 Sep 2010 15:11:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFBIl9095339; Thu, 16 Sep 2010 15:11:18 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161511.o8GFBIl9095339@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 15:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212738 - in stable/8/sys: netgraph netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:11:18 -0000 Author: glebius Date: Thu Sep 16 15:11:17 2010 New Revision: 212738 URL: http://svn.freebsd.org/changeset/base/212738 Log: MFhead r210537: Fix operation of "netgraph" action in conjunction with the net.inet.ip.fw.one_pass sysctl. PR: kern/148885 Submitted by: Nickolay Dudorov Modified: stable/8/sys/netgraph/ng_ipfw.c stable/8/sys/netinet/ipfw/ip_fw2.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_ipfw.c ============================================================================== --- stable/8/sys/netgraph/ng_ipfw.c Thu Sep 16 15:07:12 2010 (r212737) +++ stable/8/sys/netgraph/ng_ipfw.c Thu Sep 16 15:11:17 2010 (r212738) @@ -287,7 +287,8 @@ ng_ipfw_input(struct mbuf **m0, int dir, } r = (struct ipfw_rule_ref *)(tag + 1); *r = fwa->rule; - r->info = dir ? IPFW_INFO_IN : IPFW_INFO_OUT; + r->info &= IPFW_ONEPASS; /* keep this info */ + r->info |= dir ? IPFW_INFO_IN : IPFW_INFO_OUT; m_tag_prepend(m, tag); } else Modified: stable/8/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw2.c Thu Sep 16 15:07:12 2010 (r212737) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Thu Sep 16 15:11:17 2010 (r212738) @@ -2084,6 +2084,8 @@ do { \ set_match(args, f_pos, chain); args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg : cmd->arg1; + if (V_fw_one_pass) + args->rule.info |= IPFW_ONEPASS; retval = (cmd->opcode == O_NETGRAPH) ? IP_FW_NETGRAPH : IP_FW_NGTEE; l = 0; /* exit inner loop */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:14:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA5791065673; Thu, 16 Sep 2010 15:14:05 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8E6E8FC13; Thu, 16 Sep 2010 15:14:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFE5Dw095507; Thu, 16 Sep 2010 15:14:05 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFE5AJ095505; Thu, 16 Sep 2010 15:14:05 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161514.o8GFE5AJ095505@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212739 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:14:06 -0000 Author: fabient Date: Thu Sep 16 15:14:05 2010 New Revision: 212739 URL: http://svn.freebsd.org/changeset/base/212739 Log: MFC r212224: Fix invalid class removal when IAF is not the last class. Keep IAF class with 0 PMC and change the alias in libpmc to IAP. Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Thu Sep 16 15:11:17 2010 (r212738) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Thu Sep 16 15:14:05 2010 (r212739) @@ -2234,21 +2234,8 @@ pmc_core_initialize(struct pmc_mdep *md, core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F; core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF; - if (core_iaf_npmc > 0) { - iaf_initialize(md, maxcpu, core_iaf_npmc, - core_iaf_width); - core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << - IAF_OFFSET; - } else { - /* - * Adjust the number of classes exported to - * user space. - */ - md->pmd_nclass--; - KASSERT(md->pmd_nclass == 2, - ("[core,%d] unexpected nclass %d", __LINE__, - md->pmd_nclass)); - } + iaf_initialize(md, maxcpu, core_iaf_npmc, core_iaf_width); + core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << IAF_OFFSET; } PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:15:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB5CC106566C; Thu, 16 Sep 2010 15:15:34 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9EBB8FC0C; Thu, 16 Sep 2010 15:15:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFFYGe095632; Thu, 16 Sep 2010 15:15:34 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFFYAl095630; Thu, 16 Sep 2010 15:15:34 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161515.o8GFFYAl095630@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212740 - stable/8/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:15:34 -0000 Author: fabient Date: Thu Sep 16 15:15:34 2010 New Revision: 212740 URL: http://svn.freebsd.org/changeset/base/212740 Log: MFC r212224: Fix invalid class removal when IAF is not the last class. Keep IAF class with 0 PMC and change the alias in libpmc to IAP. Modified: stable/8/lib/libpmc/libpmc.c Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/libpmc.c ============================================================================== --- stable/8/lib/libpmc/libpmc.c Thu Sep 16 15:14:05 2010 (r212739) +++ stable/8/lib/libpmc/libpmc.c Thu Sep 16 15:15:34 2010 (r212740) @@ -2604,7 +2604,8 @@ pmc_init(void) */ cpu_has_iaf_counters = 0; for (t = 0; t < cpu_info.pm_nclass; t++) - if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF) + if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF && + cpu_info.pm_classes[t].pm_num > 0) cpu_has_iaf_counters = 1; #endif @@ -2617,9 +2618,8 @@ pmc_init(void) #define PMC_MDEP_INIT_INTEL_V2(C) do { \ PMC_MDEP_INIT(C); \ - if (cpu_has_iaf_counters) \ - pmc_class_table[n++] = &iaf_class_table_descr; \ - else \ + pmc_class_table[n++] = &iaf_class_table_descr; \ + if (!cpu_has_iaf_counters) \ pmc_mdep_event_aliases = \ C##_aliases_without_iaf; \ pmc_class_table[n] = &C##_class_table_descr; \ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:18:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 247D61065693; Thu, 16 Sep 2010 15:18:47 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12F638FC12; Thu, 16 Sep 2010 15:18:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFIkS4095820; Thu, 16 Sep 2010 15:18:46 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFIkSM095818; Thu, 16 Sep 2010 15:18:46 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161518.o8GFIkSM095818@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212741 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:18:47 -0000 Author: fabient Date: Thu Sep 16 15:18:46 2010 New Revision: 212741 URL: http://svn.freebsd.org/changeset/base/212741 Log: MFC r212224: Fix invalid class removal when IAF is not the last class. Keep IAF class with 0 PMC and change the alias in libpmc to IAP. Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Thu Sep 16 15:15:34 2010 (r212740) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Thu Sep 16 15:18:46 2010 (r212741) @@ -2234,21 +2234,8 @@ pmc_core_initialize(struct pmc_mdep *md, core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F; core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF; - if (core_iaf_npmc > 0) { - iaf_initialize(md, maxcpu, core_iaf_npmc, - core_iaf_width); - core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << - IAF_OFFSET; - } else { - /* - * Adjust the number of classes exported to - * user space. - */ - md->pmd_nclass--; - KASSERT(md->pmd_nclass == 2, - ("[core,%d] unexpected nclass %d", __LINE__, - md->pmd_nclass)); - } + iaf_initialize(md, maxcpu, core_iaf_npmc, core_iaf_width); + core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << IAF_OFFSET; } PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:19:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF15C10656A3; Thu, 16 Sep 2010 15:19:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DBE88FC0C; Thu, 16 Sep 2010 15:19:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFJNHJ095903; Thu, 16 Sep 2010 15:19:23 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFJNkb095901; Thu, 16 Sep 2010 15:19:23 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161519.o8GFJNkb095901@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 15:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212742 - stable/8/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:19:23 -0000 Author: glebius Date: Thu Sep 16 15:19:23 2010 New Revision: 212742 URL: http://svn.freebsd.org/changeset/base/212742 Log: MFhead r210539: Document that the "ngtee" action no longer accepts packet, and thus don't depend on one_pass flag anymore. This is a POLA violation, but it is quite difficult to restore the old behavior with new code. Also, the new behavior matches behavior of the older "tee" action, and this is more intuitive. Modified: stable/8/sbin/ipfw/ipfw.8 Directory Properties: stable/8/sbin/ipfw/ (props changed) Modified: stable/8/sbin/ipfw/ipfw.8 ============================================================================== --- stable/8/sbin/ipfw/ipfw.8 Thu Sep 16 15:18:46 2010 (r212741) +++ stable/8/sbin/ipfw/ipfw.8 Thu Sep 16 15:19:23 2010 (r212742) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2009 +.Dd July 27, 2010 .Dt IPFW 8 .Os .Sh NAME @@ -859,9 +859,7 @@ accepted or continues with the next rule sysctl variable. .It Cm ngtee Ar cookie A copy of packet is diverted into netgraph, original -packet is either accepted or continues with the next rule, depending on -.Va net.inet.ip.fw.one_pass -sysctl variable. +packet continues with the next rule. See .Xr ng_ipfw 4 for more information on From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:19:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 663111065696; Thu, 16 Sep 2010 15:19:39 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54D658FC1B; Thu, 16 Sep 2010 15:19:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFJdnW095964; Thu, 16 Sep 2010 15:19:39 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFJdvl095962; Thu, 16 Sep 2010 15:19:39 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161519.o8GFJdvl095962@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212743 - stable/7/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:19:39 -0000 Author: fabient Date: Thu Sep 16 15:19:39 2010 New Revision: 212743 URL: http://svn.freebsd.org/changeset/base/212743 Log: MFC r212224: Fix invalid class removal when IAF is not the last class. Keep IAF class with 0 PMC and change the alias in libpmc to IAP. Modified: stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Thu Sep 16 15:19:23 2010 (r212742) +++ stable/7/lib/libpmc/libpmc.c Thu Sep 16 15:19:39 2010 (r212743) @@ -2597,7 +2597,8 @@ pmc_init(void) */ cpu_has_iaf_counters = 0; for (t = 0; t < cpu_info.pm_nclass; t++) - if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF) + if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF && + cpu_info.pm_classes[t].pm_num > 0) cpu_has_iaf_counters = 1; #endif @@ -2610,9 +2611,8 @@ pmc_init(void) #define PMC_MDEP_INIT_INTEL_V2(C) do { \ PMC_MDEP_INIT(C); \ - if (cpu_has_iaf_counters) \ - pmc_class_table[n++] = &iaf_class_table_descr; \ - else \ + pmc_class_table[n++] = &iaf_class_table_descr; \ + if (!cpu_has_iaf_counters) \ pmc_mdep_event_aliases = \ C##_aliases_without_iaf; \ pmc_class_table[n] = &C##_class_table_descr; \ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:21:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78CE510656B8; Thu, 16 Sep 2010 15:21:15 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C8AE8FC14; Thu, 16 Sep 2010 15:21:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFLFj9096079; Thu, 16 Sep 2010 15:21:15 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFLFH6096074; Thu, 16 Sep 2010 15:21:15 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161521.o8GFLFH6096074@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212744 - stable/8/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:21:15 -0000 Author: fabient Date: Thu Sep 16 15:21:15 2010 New Revision: 212744 URL: http://svn.freebsd.org/changeset/base/212744 Log: MFC r212176: When an asm location cannot be resolved to a function the cost will be spread as small value and then filtered by the threshold. As a first step solution display the number of event that cannot be resolved as a valid function location. Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c stable/8/usr.sbin/pmcstat/pmcpl_calltree.c stable/8/usr.sbin/pmcstat/pmcstat_log.c stable/8/usr.sbin/pmcstat/pmcstat_log.h Directory Properties: stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Thu Sep 16 15:21:15 2010 (r212744) @@ -149,6 +149,8 @@ pmcstat_cgnode_hash_lookup_pc(struct pmc */ if ((sym = pmcstat_symbol_search(image, pc)) != NULL) pc = sym->ps_start; + else + pmcstat_stats.ps_samples_unknown_function++; for (hash = i = 0; i < sizeof(uintfptr_t); i++) hash += (pc >> i) & 0xFF; Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Thu Sep 16 15:21:15 2010 (r212744) @@ -615,6 +615,8 @@ pmcpl_ct_node_hash_lookup_pc(struct pmcp */ if ((sym = pmcstat_symbol_search(image, pc)) != NULL) pc = sym->ps_start; + else + pmcstat_stats.ps_samples_unknown_function++; for (hash = i = 0; i < (int)sizeof(uintfptr_t); i++) hash += (pc >> i) & 0xFF; Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.c Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.c Thu Sep 16 15:21:15 2010 (r212744) @@ -2170,6 +2170,7 @@ pmcstat_shutdown_logging(void) PRINT("#samples/total", samples_total); PRINT("#samples/unclaimed", samples_unknown_offset); PRINT("#samples/unknown-object", samples_indeterminable); + PRINT("#samples/unknown-function", samples_unknown_function); PRINT("#callchain/dubious-frames", callchain_dubious_frames); } Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.h Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.h Thu Sep 16 15:21:15 2010 (r212744) @@ -164,6 +164,7 @@ struct pmcstat_stats { int ps_samples_skipped; /* #samples filtered out for any reason */ int ps_samples_unknown_offset; /* #samples of rank 0 not in a map */ int ps_samples_indeterminable; /* #samples in indeterminable images */ + int ps_samples_unknown_function;/* #samples with unknown function at offset */ int ps_callchain_dubious_frames;/* #dubious frame pointers seen */ }; extern struct pmcstat_stats pmcstat_stats; /* statistics */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:22:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4A13106564A; Thu, 16 Sep 2010 15:22:30 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8891D8FC12; Thu, 16 Sep 2010 15:22:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFMU4q096196; Thu, 16 Sep 2010 15:22:30 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFMUI8096191; Thu, 16 Sep 2010 15:22:30 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161522.o8GFMUI8096191@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212745 - stable/7/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:22:30 -0000 Author: fabient Date: Thu Sep 16 15:22:30 2010 New Revision: 212745 URL: http://svn.freebsd.org/changeset/base/212745 Log: MFC r212176: When an asm location cannot be resolved to a function the cost will be spread as small value and then filtered by the threshold. As a first step solution display the number of event that cannot be resolved as a valid function location. Modified: stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c stable/7/usr.sbin/pmcstat/pmcpl_calltree.c stable/7/usr.sbin/pmcstat/pmcstat_log.c stable/7/usr.sbin/pmcstat/pmcstat_log.h Directory Properties: stable/7/usr.sbin/pmcstat/ (props changed) Modified: stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c Thu Sep 16 15:21:15 2010 (r212744) +++ stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c Thu Sep 16 15:22:30 2010 (r212745) @@ -149,6 +149,8 @@ pmcstat_cgnode_hash_lookup_pc(struct pmc */ if ((sym = pmcstat_symbol_search(image, pc)) != NULL) pc = sym->ps_start; + else + pmcstat_stats.ps_samples_unknown_function++; for (hash = i = 0; i < sizeof(uintfptr_t); i++) hash += (pc >> i) & 0xFF; Modified: stable/7/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Thu Sep 16 15:21:15 2010 (r212744) +++ stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Thu Sep 16 15:22:30 2010 (r212745) @@ -615,6 +615,8 @@ pmcpl_ct_node_hash_lookup_pc(struct pmcp */ if ((sym = pmcstat_symbol_search(image, pc)) != NULL) pc = sym->ps_start; + else + pmcstat_stats.ps_samples_unknown_function++; for (hash = i = 0; i < (int)sizeof(uintfptr_t); i++) hash += (pc >> i) & 0xFF; Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat_log.c Thu Sep 16 15:21:15 2010 (r212744) +++ stable/7/usr.sbin/pmcstat/pmcstat_log.c Thu Sep 16 15:22:30 2010 (r212745) @@ -2170,6 +2170,7 @@ pmcstat_shutdown_logging(void) PRINT("#samples/total", samples_total); PRINT("#samples/unclaimed", samples_unknown_offset); PRINT("#samples/unknown-object", samples_indeterminable); + PRINT("#samples/unknown-function", samples_unknown_function); PRINT("#callchain/dubious-frames", callchain_dubious_frames); } Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat_log.h Thu Sep 16 15:21:15 2010 (r212744) +++ stable/7/usr.sbin/pmcstat/pmcstat_log.h Thu Sep 16 15:22:30 2010 (r212745) @@ -164,6 +164,7 @@ struct pmcstat_stats { int ps_samples_skipped; /* #samples filtered out for any reason */ int ps_samples_unknown_offset; /* #samples of rank 0 not in a map */ int ps_samples_indeterminable; /* #samples in indeterminable images */ + int ps_samples_unknown_function;/* #samples with unknown function at offset */ int ps_callchain_dubious_frames;/* #dubious frame pointers seen */ }; extern struct pmcstat_stats pmcstat_stats; /* statistics */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:22:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 109DF1065764; Thu, 16 Sep 2010 15:22:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 595968FC2D; Thu, 16 Sep 2010 15:22:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFMXeU096231; Thu, 16 Sep 2010 15:22:33 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFMXRq096229; Thu, 16 Sep 2010 15:22:33 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201009161522.o8GFMXRq096229@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 16 Sep 2010 15:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212746 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:22:34 -0000 Author: glebius Date: Thu Sep 16 15:22:33 2010 New Revision: 212746 URL: http://svn.freebsd.org/changeset/base/212746 Log: MFhead 212256: in_delayed_cksum() requires host byte order. Reported by: Alexander Levin Modified: stable/8/sys/netinet/ipfw/ip_fw_nat.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_nat.c Thu Sep 16 15:22:30 2010 (r212745) +++ stable/8/sys/netinet/ipfw/ip_fw_nat.c Thu Sep 16 15:22:33 2010 (r212746) @@ -295,12 +295,9 @@ ipfw_nat(struct ip_fw_args *args, struct struct udphdr *uh; u_short cksum; - /* XXX check if ip_len can stay in net format */ - cksum = in_pseudo( - ip->ip_src.s_addr, - ip->ip_dst.s_addr, - htons(ip->ip_p + ntohs(ip->ip_len) - (ip->ip_hl << 2)) - ); + ip->ip_len = ntohs(ip->ip_len); + cksum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, + htons(ip->ip_p + ip->ip_len - (ip->ip_hl << 2))); switch (ip->ip_p) { case IPPROTO_TCP: @@ -326,6 +323,7 @@ ipfw_nat(struct ip_fw_args *args, struct in_delayed_cksum(mcl); mcl->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } + ip->ip_len = htons(ip->ip_len); } args->m = mcl; return (IP_FW_NAT); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:32:49 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A831A1065675; Thu, 16 Sep 2010 15:32:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB1D8FC0C; Thu, 16 Sep 2010 15:32:45 +0000 (UTC) Received: from c122-107-116-249.carlnfd1.nsw.optusnet.com.au (c122-107-116-249.carlnfd1.nsw.optusnet.com.au [122.107.116.249]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o8GFWgUN025871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Sep 2010 01:32:43 +1000 Date: Fri, 17 Sep 2010 01:32:42 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Kostik Belousov In-Reply-To: <20100915150412.GM2465@deviant.kiev.zoral.com.ua> Message-ID: <20100916220620.W763@delplex.bde.org> References: <201009151424.o8FEOLZE039185@svn.freebsd.org> <20100915145209.GK2465@deviant.kiev.zoral.com.ua> <20100915150412.GM2465@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1831366618-1284651162=:763" Cc: Attilio Rao , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:32:49 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1831366618-1284651162=:763 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 15 Sep 2010, Kostik Belousov wrote: > On Wed, Sep 15, 2010 at 04:57:15PM +0200, Attilio Rao wrote: >> 2010/9/15 Kostik Belousov : >>> On Wed, Sep 15, 2010 at 02:24:21PM +0000, Attilio Rao wrote: >>>> ... >>>> Log: >>>> =9A Fix bogus busying mechanism from cdevsw callbacks: >>>> =9A - D_TRACKCLOSE may be used there as d_close() are expected to matc= h up >>>> =9A =9A d_open() calls Some mail program made this hard to read by converting ASCII to hard \x9a's= =2E D_TRACKCLOSE may be useful for something, but it isn't for determining busyness. Rather the reverse -- it can be used for getting the driver called in cases where there is a thread busy (but sleeping) in the driver. It can also repeat devfs/vfs's broken device busyness counting. I know of a couple of useful uses for it in FreeBSD, but these are unimplemented, and all of the uses that I looked at are nonsense or broken. One nonsense and broken case is in ast-tape.c. This driver used to enforce exclusive access using vfs counting. I think the vfs counting works with exclusive access. But with exclusive access all closes are last-ones so D_TRACKCLOSE has no effect. Now, this driver doesn't enforce exclusive access, so D_TRACKCLOSE just gives bugs like writing filemarks and rewinding the rewindable device for non-last closes, if anyone actually uses non-exclusive access. >>> VFS is not very good at properly calling VOP_CLOSE(). As example, prema= ture >>> vnode reclaim due to devfs unmount would cause VOP_CLOSE() to be called >>> only once despite the number of opens being =9A> 1. This seems to invalidate all cases where D_TRACKCLOSE is (ab)used for reference counting. One such case is geom_dev.c:g_dev_close(). This does nothing commital except to decrement some of the r/w/e access counters. But if it is not called once for every device open, it cannot do that. Also, there is a problem initializing its flags arg for forced VOP_CLOSE() from general context, and no way to its flags arg to pass the necessary combined r/w/e adjustments if these adjustments sum to less than -1 for any of r/w/e. For normal open/close pairs, the close flags arg must equal the open flags arg, and a forced close from unrelated context will find it either difficult to find the open flags arg if there was only 1 open, or usually impossible to combine 2 open flags args if there was > 1 open. Otherwise, g_dev_close is the only useful use of D_TRACKCLOSE that I know of. >> Yes. >> That makes implementing a similar semantic in drivers very difficult >> and not very well fixable, in particular within the d_* callbacks. Vfs doesn't properly determine busyness (due to complications in itself and at the driver level), so individualy drivers have no chance of determining it (since to do so they would have to understand not only therir own complications, but also vfs complications which vfs itself doesn't completely understand). >> I'm seriously wondering if we might just make a shortcut just for >> supporting such a feature (busying the device on real devfs entry >> activity) as several of them may be needing and may be probabilly >> needing to be 100%. >> Luckilly, it seems that such paths are not experienced very frequently. > > I am not sure what do you mean by "busying the device on real devfs entry > activity". Is the operation made by dev_refthread() and friends enough ? > > Device cannot be destroyed by destroy_dev() until all threads leave the > cdevsw methods. Note that there may be other threads in a cdevsw method even when d_close() is called for the last-close. I think no other threads can be in a cdevsw read, write or ioctl method when last-close is called (since they must hold a dup'ed fd open, so any close cannot be the last one). Also, no other thread can be in an open method, due to bugs in devfs/vfs last-close counting (the count is incremented before devfs_open() is called; so cdevsw close is never called if there is a thread in an open method and D_TRACKCLOSE is not set). But any number of threads can be in the close method when cdevsw close is called, even if D_TRACKCLOSE is not set, due to a lesser bug in devfs/vfs last-close counting (the count is decremented before devfs_close() is called, so cdevsw close may be called for last-close before a previous call completes)= =2E Bruce --0-1831366618-1284651162=:763-- From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:42:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5CAB106564A; Thu, 16 Sep 2010 15:42:11 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9481F8FC1E; Thu, 16 Sep 2010 15:42:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFgBeI096927; Thu, 16 Sep 2010 15:42:11 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFgBuC096925; Thu, 16 Sep 2010 15:42:11 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009161542.o8GFgBuC096925@svn.freebsd.org> From: Matthew D Fleming Date: Thu, 16 Sep 2010 15:42:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212747 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:42:11 -0000 Author: mdf Date: Thu Sep 16 15:42:11 2010 New Revision: 212747 URL: http://svn.freebsd.org/changeset/base/212747 Log: MFC r212153: Fix UP build. Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Thu Sep 16 15:22:33 2010 (r212746) +++ stable/8/sys/kern/sched_ule.c Thu Sep 16 15:42:11 2010 (r212747) @@ -1803,8 +1803,10 @@ sched_switch(struct thread *td, struct t srqflag = (flags & SW_PREEMPT) ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING; +#ifdef SMP if (THREAD_CAN_MIGRATE(td) && !THREAD_CAN_SCHED(td, ts->ts_cpu)) ts->ts_cpu = sched_pickcpu(td, 0); +#endif if (ts->ts_cpu == cpuid) tdq_runq_add(tdq, td, srqflag); else { From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:42:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F4BD1065670; Thu, 16 Sep 2010 15:42:57 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F24AB8FC26; Thu, 16 Sep 2010 15:42:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFguCe097018; Thu, 16 Sep 2010 15:42:56 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFgu6j097016; Thu, 16 Sep 2010 15:42:56 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009161542.o8GFgu6j097016@svn.freebsd.org> From: Matthew D Fleming Date: Thu, 16 Sep 2010 15:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212748 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:42:57 -0000 Author: mdf Date: Thu Sep 16 15:42:56 2010 New Revision: 212748 URL: http://svn.freebsd.org/changeset/base/212748 Log: MFC r212153: Fix UP build. Modified: stable/7/sys/kern/sched_ule.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/sched_ule.c ============================================================================== --- stable/7/sys/kern/sched_ule.c Thu Sep 16 15:42:11 2010 (r212747) +++ stable/7/sys/kern/sched_ule.c Thu Sep 16 15:42:56 2010 (r212748) @@ -1885,8 +1885,10 @@ sched_switch(struct thread *td, struct t srqflag = (flags & SW_PREEMPT) ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING; +#ifdef SMP if (THREAD_CAN_MIGRATE(td) && !THREAD_CAN_SCHED(td, ts->ts_cpu)) ts->ts_cpu = sched_pickcpu(td, 0); +#endif if (ts->ts_cpu == cpuid) tdq_add(tdq, td, srqflag); else { From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 16:03:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 455FE106564A; Thu, 16 Sep 2010 16:03:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34B6B8FC0A; Thu, 16 Sep 2010 16:03:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GG3DKP098105; Thu, 16 Sep 2010 16:03:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GG3DUJ098103; Thu, 16 Sep 2010 16:03:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201009161603.o8GG3DUJ098103@svn.freebsd.org> From: John Baldwin Date: Thu, 16 Sep 2010 16:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212749 - head/usr.sbin/pciconf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 16:03:13 -0000 Author: jhb Date: Thu Sep 16 16:03:12 2010 New Revision: 212749 URL: http://svn.freebsd.org/changeset/base/212749 Log: Only attempt to list extended capabilities for devices that have a PCI-express capabilities. Non-PCI-express PCI devices may simply ignore the upper bits in a config register address effectively aliasing the device ID register to 0x100 rather than returning 0xFFFFFFFF. Previously the code relied on these reads returning 0xFFFFFFFF. MFC after: 3 days Modified: head/usr.sbin/pciconf/cap.c Modified: head/usr.sbin/pciconf/cap.c ============================================================================== --- head/usr.sbin/pciconf/cap.c Thu Sep 16 15:42:56 2010 (r212748) +++ head/usr.sbin/pciconf/cap.c Thu Sep 16 16:03:12 2010 (r212749) @@ -460,6 +460,7 @@ cap_pciaf(int fd, struct pci_conf *p, ui void list_caps(int fd, struct pci_conf *p) { + int express; uint16_t sta; uint8_t ptr, cap; @@ -481,6 +482,7 @@ list_caps(int fd, struct pci_conf *p) } /* Walk the capability list. */ + express = 0; ptr = read_config(fd, &p->pc_sel, ptr, 1); while (ptr != 0 && ptr != 0xff) { cap = read_config(fd, &p->pc_sel, ptr + PCICAP_ID, 1); @@ -514,6 +516,7 @@ list_caps(int fd, struct pci_conf *p) cap_subvendor(fd, p, ptr); break; case PCIY_EXPRESS: + express = 1; cap_express(fd, p, ptr); break; case PCIY_MSIX: @@ -533,7 +536,8 @@ list_caps(int fd, struct pci_conf *p) ptr = read_config(fd, &p->pc_sel, ptr + PCICAP_NEXTPTR, 1); } - list_ecaps(fd, p); + if (express) + list_ecaps(fd, p); } /* From . */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 16:13:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83991065672; Thu, 16 Sep 2010 16:13:12 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D63D18FC1D; Thu, 16 Sep 2010 16:13:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GGDCIe098344; Thu, 16 Sep 2010 16:13:12 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GGDCKm098332; Thu, 16 Sep 2010 16:13:12 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201009161613.o8GGDCKm098332@svn.freebsd.org> From: Matthew D Fleming Date: Thu, 16 Sep 2010 16:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212750 - in head/sys: dev/cxgb kern sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 16:13:13 -0000 Author: mdf Date: Thu Sep 16 16:13:12 2010 New Revision: 212750 URL: http://svn.freebsd.org/changeset/base/212750 Log: Re-add r212370 now that the LOR in powerpc64 has been resolved: Add a drain function for struct sysctl_req, and use it for a variety of handlers, some of which had to do awkward things to get a large enough SBUF_FIXEDLEN buffer. Note that some sysctl handlers were explicitly outputting a trailing NUL byte. This behaviour was preserved, though it should not be necessary. Reviewed by: phk (original patch) Modified: head/sys/dev/cxgb/cxgb_sge.c head/sys/kern/kern_malloc.c head/sys/kern/kern_sysctl.c head/sys/kern/subr_lock.c head/sys/kern/subr_sbuf.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_witness.c head/sys/sys/sysctl.h head/sys/vm/uma_core.c head/sys/vm/vm_phys.c head/sys/vm/vm_reserv.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/dev/cxgb/cxgb_sge.c Thu Sep 16 16:13:12 2010 (r212750) @@ -3227,7 +3227,6 @@ t3_dump_rspq(SYSCTL_HANDLER_ARGS) struct sge_rspq *rspq; struct sge_qset *qs; int i, err, dump_end, idx; - static int multiplier = 1; struct sbuf *sb; struct rsp_desc *rspd; uint32_t data[4]; @@ -3252,8 +3251,8 @@ t3_dump_rspq(SYSCTL_HANDLER_ARGS) err = t3_sge_read_rspq(qs->port->adapter, rspq->cntxt_id, data); if (err) return (err); -retry_sbufops: - sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); + + sb = sbuf_new_for_sysctl(NULL, NULL, QDUMP_SBUF_SIZE, req); sbuf_printf(sb, " \n index=%u size=%u MSI-X/RspQ=%u intr enable=%u intr armed=%u\n", (data[0] & 0xffff), data[0] >> 16, ((data[2] >> 20) & 0x3f), @@ -3276,13 +3275,11 @@ retry_sbufops: rspd->rss_hdr.rss_hash_val, be32toh(rspd->flags), be32toh(rspd->len_cq), rspd->intr_gen); } - if (sbuf_error(sb) != 0) { - sbuf_delete(sb); - multiplier++; - goto retry_sbufops; - } - sbuf_finish(sb); - err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + + err = sbuf_finish(sb); + /* Output a trailing NUL. */ + if (err == 0) + err = SYSCTL_OUT(req, "", 1); sbuf_delete(sb); return (err); } @@ -3293,7 +3290,6 @@ t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) struct sge_txq *txq; struct sge_qset *qs; int i, j, err, dump_end; - static int multiplier = 1; struct sbuf *sb; struct tx_desc *txd; uint32_t *WR, wr_hi, wr_lo, gen; @@ -3321,9 +3317,7 @@ t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) if (err) return (err); - -retry_sbufops: - sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); + sb = sbuf_new_for_sysctl(NULL, NULL, QDUMP_SBUF_SIZE, req); sbuf_printf(sb, " \n credits=%u GTS=%u index=%u size=%u rspq#=%u cmdq#=%u\n", (data[0] & 0x7fff), ((data[0] >> 15) & 1), (data[0] >> 16), @@ -3350,13 +3344,10 @@ retry_sbufops: WR[j], WR[j + 1], WR[j + 2], WR[j + 3]); } - if (sbuf_error(sb) != 0) { - sbuf_delete(sb); - multiplier++; - goto retry_sbufops; - } - sbuf_finish(sb); - err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + err = sbuf_finish(sb); + /* Output a trailing NUL. */ + if (err == 0) + err = SYSCTL_OUT(req, "", 1); sbuf_delete(sb); return (err); } @@ -3367,7 +3358,6 @@ t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) struct sge_txq *txq; struct sge_qset *qs; int i, j, err, dump_end; - static int multiplier = 1; struct sbuf *sb; struct tx_desc *txd; uint32_t *WR, wr_hi, wr_lo, gen; @@ -3391,8 +3381,7 @@ t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) return (EINVAL); } -retry_sbufops: - sb = sbuf_new(NULL, NULL, QDUMP_SBUF_SIZE*multiplier, SBUF_FIXEDLEN); + sb = sbuf_new_for_sysctl(NULL, NULL, QDUMP_SBUF_SIZE, req); sbuf_printf(sb, " qid=%d start=%d -> end=%d\n", qs->idx, txq->txq_dump_start, (txq->txq_dump_start + txq->txq_dump_count) & 255); @@ -3412,13 +3401,10 @@ retry_sbufops: WR[j], WR[j + 1], WR[j + 2], WR[j + 3]); } - if (sbuf_error(sb) != 0) { - sbuf_delete(sb); - multiplier++; - goto retry_sbufops; - } - sbuf_finish(sb); - err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + err = sbuf_finish(sb); + /* Output a trailing NUL. */ + if (err == 0) + err = SYSCTL_OUT(req, "", 1); sbuf_delete(sb); return (err); } Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/kern/kern_malloc.c Thu Sep 16 16:13:12 2010 (r212750) @@ -828,25 +828,11 @@ sysctl_kern_malloc_stats(SYSCTL_HANDLER_ struct malloc_type_internal *mtip; struct malloc_type_header mth; struct malloc_type *mtp; - int buflen, count, error, i; + int error, i; struct sbuf sbuf; - char *buffer; + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); mtx_lock(&malloc_mtx); -restart: - mtx_assert(&malloc_mtx, MA_OWNED); - count = kmemcount; - mtx_unlock(&malloc_mtx); - buflen = sizeof(mtsh) + count * (sizeof(mth) + - sizeof(struct malloc_type_stats) * MAXCPU) + 1; - buffer = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); - mtx_lock(&malloc_mtx); - if (count < kmemcount) { - free(buffer, M_TEMP); - goto restart; - } - - sbuf_new(&sbuf, buffer, buflen, SBUF_FIXEDLEN); /* * Insert stream header. @@ -855,11 +841,7 @@ restart: mtsh.mtsh_version = MALLOC_TYPE_STREAM_VERSION; mtsh.mtsh_maxcpus = MAXCPU; mtsh.mtsh_count = kmemcount; - if (sbuf_bcat(&sbuf, &mtsh, sizeof(mtsh)) < 0) { - mtx_unlock(&malloc_mtx); - error = ENOMEM; - goto out; - } + (void)sbuf_bcat(&sbuf, &mtsh, sizeof(mtsh)); /* * Insert alternating sequence of type headers and type statistics. @@ -872,30 +854,19 @@ restart: */ bzero(&mth, sizeof(mth)); strlcpy(mth.mth_name, mtp->ks_shortdesc, MALLOC_MAX_NAME); - if (sbuf_bcat(&sbuf, &mth, sizeof(mth)) < 0) { - mtx_unlock(&malloc_mtx); - error = ENOMEM; - goto out; - } + (void)sbuf_bcat(&sbuf, &mth, sizeof(mth)); /* * Insert type statistics for each CPU. */ for (i = 0; i < MAXCPU; i++) { - if (sbuf_bcat(&sbuf, &mtip->mti_stats[i], - sizeof(mtip->mti_stats[i])) < 0) { - mtx_unlock(&malloc_mtx); - error = ENOMEM; - goto out; - } + (void)sbuf_bcat(&sbuf, &mtip->mti_stats[i], + sizeof(mtip->mti_stats[i])); } } mtx_unlock(&malloc_mtx); - sbuf_finish(&sbuf); - error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); -out: + error = sbuf_finish(&sbuf); sbuf_delete(&sbuf); - free(buffer, M_TEMP); return (error); } @@ -1005,26 +976,19 @@ DB_SHOW_COMMAND(multizone_matches, db_sh static int sysctl_kern_mprof(SYSCTL_HANDLER_ARGS) { - int linesize = 64; struct sbuf sbuf; uint64_t count; uint64_t waste; uint64_t mem; - int bufsize; int error; - char *buf; int rsize; int size; int i; - bufsize = linesize * (KMEM_ZSIZE + 1); - bufsize += 128; /* For the stats line */ - bufsize += 128; /* For the banner line */ waste = 0; mem = 0; - buf = malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); - sbuf_new(&sbuf, buf, bufsize, SBUF_FIXEDLEN); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); sbuf_printf(&sbuf, "\n Size Requests Real Size\n"); for (i = 0; i < KMEM_ZSIZE; i++) { @@ -1042,12 +1006,8 @@ sysctl_kern_mprof(SYSCTL_HANDLER_ARGS) sbuf_printf(&sbuf, "\nTotal memory used:\t%30llu\nTotal Memory wasted:\t%30llu\n", (unsigned long long)mem, (unsigned long long)waste); - sbuf_finish(&sbuf); - - error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); - + error = sbuf_finish(&sbuf); sbuf_delete(&sbuf); - free(buf, M_TEMP); return (error); } Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/kern/kern_sysctl.c Thu Sep 16 16:13:12 2010 (r212750) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1544,3 +1545,30 @@ userland_sysctl(struct thread *td, int * } return (error); } + +/* + * Drain into a sysctl struct. The user buffer must be wired. + */ +static int +sbuf_sysctl_drain(void *arg, const char *data, int len) +{ + struct sysctl_req *req = arg; + int error; + + error = SYSCTL_OUT(req, data, len); + KASSERT(error >= 0, ("Got unexpected negative value %d", error)); + return (error == 0 ? len : -error); +} + +struct sbuf * +sbuf_new_for_sysctl(struct sbuf *s, char *buf, int length, + struct sysctl_req *req) +{ + + /* Wire the user buffer, so we can write without blocking. */ + sysctl_wire_old_buffer(req, 0); + + s = sbuf_new(s, buf, length, SBUF_FIXEDLEN); + sbuf_set_drain(s, sbuf_sysctl_drain, req); + return (s); +} Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/kern/subr_lock.c Thu Sep 16 16:13:12 2010 (r212750) @@ -191,8 +191,7 @@ struct lock_prof_cpu *lp_cpu[MAXCPU]; volatile int lock_prof_enable = 0; static volatile int lock_prof_resetting; -/* SWAG: sbuf size = avg stat. line size * number of locks */ -#define LPROF_SBUF_SIZE 256 * 400 +#define LPROF_SBUF_SIZE 256 static int lock_prof_rejected; static int lock_prof_skipspin; @@ -384,8 +383,6 @@ lock_prof_type_stats(struct lock_prof_ty continue; lock_prof_sum(l, &lp, i, spin, t); lock_prof_output(&lp, sb); - if (sbuf_error(sb) != 0) - return; } } } @@ -393,13 +390,11 @@ lock_prof_type_stats(struct lock_prof_ty static int dump_lock_prof_stats(SYSCTL_HANDLER_ARGS) { - static int multiplier = 1; struct sbuf *sb; int error, cpu, t; int enabled; -retry_sbufops: - sb = sbuf_new(NULL, NULL, LPROF_SBUF_SIZE * multiplier, SBUF_FIXEDLEN); + sb = sbuf_new_for_sysctl(NULL, NULL, LPROF_SBUF_SIZE, req); sbuf_printf(sb, "\n%8s %9s %11s %11s %11s %6s %6s %2s %6s %s\n", "max", "wait_max", "total", "wait_total", "count", "avg", "wait_avg", "cnt_hold", "cnt_lock", "name"); enabled = lock_prof_enable; @@ -411,16 +406,13 @@ retry_sbufops: continue; lock_prof_type_stats(&lp_cpu[cpu]->lpc_types[0], sb, 0, t); lock_prof_type_stats(&lp_cpu[cpu]->lpc_types[1], sb, 1, t); - if (sbuf_error(sb) != 0) { - sbuf_delete(sb); - multiplier++; - goto retry_sbufops; - } } lock_prof_enable = enabled; - sbuf_finish(sb); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + error = sbuf_finish(sb); + /* Output a trailing NUL. */ + if (error == 0) + error = SYSCTL_OUT(req, "", 1); sbuf_delete(sb); return (error); } Modified: head/sys/kern/subr_sbuf.c ============================================================================== --- head/sys/kern/subr_sbuf.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/kern/subr_sbuf.c Thu Sep 16 16:13:12 2010 (r212750) @@ -303,8 +303,8 @@ sbuf_drain(struct sbuf *s) s->s_error = -len; return (s->s_error); } - - KASSERT(len > 0, ("Drain must either error or work!")); + KASSERT(len > 0 && len <= s->s_len, + ("Bad drain amount %d for sbuf %p", len, s)); s->s_len -= len; /* * Fast path for the expected case where all the data was Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/kern/subr_sleepqueue.c Thu Sep 16 16:13:12 2010 (r212750) @@ -1018,7 +1018,7 @@ sleepq_abort(struct thread *td, int intr #ifdef SLEEPQUEUE_PROFILING #define SLEEPQ_PROF_LOCATIONS 1024 -#define SLEEPQ_SBUFSIZE (40 * 512) +#define SLEEPQ_SBUFSIZE 512 struct sleepq_prof { LIST_ENTRY(sleepq_prof) sp_link; const char *sp_wmesg; @@ -1123,15 +1123,13 @@ reset_sleepq_prof_stats(SYSCTL_HANDLER_A static int dump_sleepq_prof_stats(SYSCTL_HANDLER_ARGS) { - static int multiplier = 1; struct sleepq_prof *sp; struct sbuf *sb; int enabled; int error; int i; -retry_sbufops: - sb = sbuf_new(NULL, NULL, SLEEPQ_SBUFSIZE * multiplier, SBUF_FIXEDLEN); + sb = sbuf_new_for_sysctl(NULL, NULL, SLEEPQ_SBUFSIZE, req); sbuf_printf(sb, "\nwmesg\tcount\n"); enabled = prof_enabled; mtx_lock_spin(&sleepq_prof_lock); @@ -1141,19 +1139,13 @@ retry_sbufops: LIST_FOREACH(sp, &sleepq_hash[i], sp_link) { sbuf_printf(sb, "%s\t%ld\n", sp->sp_wmesg, sp->sp_count); - if (sbuf_error(sb) != 0) { - sbuf_delete(sb); - multiplier++; - goto retry_sbufops; - } } } mtx_lock_spin(&sleepq_prof_lock); prof_enabled = enabled; mtx_unlock_spin(&sleepq_prof_lock); - sbuf_finish(sb); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + error = sbuf_finish(sb); sbuf_delete(sb); return (error); } Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/kern/subr_witness.c Thu Sep 16 16:13:12 2010 (r212750) @@ -154,8 +154,7 @@ __FBSDID("$FreeBSD$"); #define MAX_W_NAME 64 #define BADSTACK_SBUF_SIZE (256 * WITNESS_COUNT) -#define CYCLEGRAPH_SBUF_SIZE 8192 -#define FULLGRAPH_SBUF_SIZE 32768 +#define FULLGRAPH_SBUF_SIZE 512 /* * These flags go in the witness relationship matrix and describe the @@ -2545,7 +2544,7 @@ sysctl_debug_witness_fullgraph(SYSCTL_HA return (error); } error = 0; - sb = sbuf_new(NULL, NULL, FULLGRAPH_SBUF_SIZE, SBUF_FIXEDLEN); + sb = sbuf_new_for_sysctl(NULL, NULL, FULLGRAPH_SBUF_SIZE, req); if (sb == NULL) return (ENOMEM); sbuf_printf(sb, "\n"); @@ -2558,19 +2557,9 @@ sysctl_debug_witness_fullgraph(SYSCTL_HA mtx_unlock_spin(&w_mtx); /* - * While using SBUF_FIXEDLEN, check if the sbuf overflowed. - */ - if (sbuf_error(sb) != 0) { - sbuf_delete(sb); - panic("%s: sbuf overflowed, bump FULLGRAPH_SBUF_SIZE value\n", - __func__); - } - - /* * Close the sbuf and return to userland. */ - sbuf_finish(sb); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + error = sbuf_finish(sb); sbuf_delete(sb); return (error); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/sys/sysctl.h Thu Sep 16 16:13:12 2010 (r212750) @@ -710,6 +710,9 @@ void sysctl_lock(void); void sysctl_unlock(void); int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len); +struct sbuf; +struct sbuf *sbuf_new_for_sysctl(struct sbuf *, char *, int, + struct sysctl_req *); #else /* !_KERNEL */ #include Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/vm/uma_core.c Thu Sep 16 16:13:12 2010 (r212750) @@ -3175,36 +3175,16 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS uma_keg_t kz; uma_zone_t z; uma_keg_t k; - char *buffer; - int buflen, count, error, i; + int count, error, i; - mtx_lock(&uma_mtx); -restart: - mtx_assert(&uma_mtx, MA_OWNED); - count = 0; - LIST_FOREACH(kz, &uma_kegs, uk_link) { - LIST_FOREACH(z, &kz->uk_zones, uz_link) - count++; - } - mtx_unlock(&uma_mtx); - - buflen = sizeof(ush) + count * (sizeof(uth) + sizeof(ups) * - (mp_maxid + 1)) + 1; - buffer = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + count = 0; mtx_lock(&uma_mtx); - i = 0; LIST_FOREACH(kz, &uma_kegs, uk_link) { LIST_FOREACH(z, &kz->uk_zones, uz_link) - i++; - } - if (i > count) { - free(buffer, M_TEMP); - goto restart; + count++; } - count = i; - - sbuf_new(&sbuf, buffer, buflen, SBUF_FIXEDLEN); /* * Insert stream header. @@ -3213,11 +3193,7 @@ restart: ush.ush_version = UMA_STREAM_VERSION; ush.ush_maxcpus = (mp_maxid + 1); ush.ush_count = count; - if (sbuf_bcat(&sbuf, &ush, sizeof(ush)) < 0) { - mtx_unlock(&uma_mtx); - error = ENOMEM; - goto out; - } + (void)sbuf_bcat(&sbuf, &ush, sizeof(ush)); LIST_FOREACH(kz, &uma_kegs, uk_link) { LIST_FOREACH(z, &kz->uk_zones, uz_link) { @@ -3250,12 +3226,7 @@ restart: uth.uth_frees = z->uz_frees; uth.uth_fails = z->uz_fails; uth.uth_sleeps = z->uz_sleeps; - if (sbuf_bcat(&sbuf, &uth, sizeof(uth)) < 0) { - ZONE_UNLOCK(z); - mtx_unlock(&uma_mtx); - error = ENOMEM; - goto out; - } + (void)sbuf_bcat(&sbuf, &uth, sizeof(uth)); /* * While it is not normally safe to access the cache * bucket pointers while not on the CPU that owns the @@ -3280,21 +3251,14 @@ restart: ups.ups_allocs = cache->uc_allocs; ups.ups_frees = cache->uc_frees; skip: - if (sbuf_bcat(&sbuf, &ups, sizeof(ups)) < 0) { - ZONE_UNLOCK(z); - mtx_unlock(&uma_mtx); - error = ENOMEM; - goto out; - } + (void)sbuf_bcat(&sbuf, &ups, sizeof(ups)); } ZONE_UNLOCK(z); } } mtx_unlock(&uma_mtx); - sbuf_finish(&sbuf); - error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); -out: - free(buffer, M_TEMP); + error = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); return (error); } Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/vm/vm_phys.c Thu Sep 16 16:13:12 2010 (r212750) @@ -123,12 +123,9 @@ sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; struct vm_freelist *fl; - char *cbuf; - const int cbufsize = vm_nfreelists*(VM_NFREEORDER + 1)*81; int error, flind, oind, pind; - cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); - sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); for (flind = 0; flind < vm_nfreelists; flind++) { sbuf_printf(&sbuf, "\nFREE LIST %d:\n" "\n ORDER (SIZE) | NUMBER" @@ -149,10 +146,8 @@ sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS) sbuf_printf(&sbuf, "\n"); } } - sbuf_finish(&sbuf); - error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); + error = sbuf_finish(&sbuf); sbuf_delete(&sbuf); - free(cbuf, M_TEMP); return (error); } @@ -164,12 +159,9 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; struct vm_phys_seg *seg; - char *cbuf; - const int cbufsize = VM_PHYSSEG_MAX*(VM_NFREEORDER + 1)*81; int error, segind; - cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); - sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); for (segind = 0; segind < vm_phys_nsegs; segind++) { sbuf_printf(&sbuf, "\nSEGMENT %d:\n\n", segind); seg = &vm_phys_segs[segind]; @@ -180,10 +172,8 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) sbuf_printf(&sbuf, "domain: %d\n", seg->domain); sbuf_printf(&sbuf, "free list: %p\n", seg->free_queues); } - sbuf_finish(&sbuf); - error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); + error = sbuf_finish(&sbuf); sbuf_delete(&sbuf); - free(cbuf, M_TEMP); return (error); } @@ -195,23 +185,18 @@ static int sysctl_vm_phys_lookup_lists(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; - char *cbuf; - const int cbufsize = (vm_nfreelists + 1) * VM_NDOMAIN * 81; int domain, error, flind, ndomains; ndomains = vm_nfreelists - VM_NFREELIST + 1; - cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); - sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); for (domain = 0; domain < ndomains; domain++) { sbuf_printf(&sbuf, "\nDOMAIN %d:\n\n", domain); for (flind = 0; flind < vm_nfreelists; flind++) sbuf_printf(&sbuf, " [%d]:\t%p\n", flind, vm_phys_lookup_lists[domain][flind]); } - sbuf_finish(&sbuf); - error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); + error = sbuf_finish(&sbuf); sbuf_delete(&sbuf); - free(cbuf, M_TEMP); return (error); } #endif Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Thu Sep 16 16:03:12 2010 (r212749) +++ head/sys/vm/vm_reserv.c Thu Sep 16 16:13:12 2010 (r212750) @@ -180,12 +180,9 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER { struct sbuf sbuf; vm_reserv_t rv; - char *cbuf; - const int cbufsize = (VM_NRESERVLEVEL + 1) * 81; int counter, error, level, unused_pages; - cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); - sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); sbuf_printf(&sbuf, "\nLEVEL SIZE NUMBER\n\n"); for (level = -1; level <= VM_NRESERVLEVEL - 2; level++) { counter = 0; @@ -199,10 +196,8 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER sbuf_printf(&sbuf, "%5.5d: %6.6dK, %6.6d\n", level, unused_pages * (PAGE_SIZE / 1024), counter); } - sbuf_finish(&sbuf); - error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); + error = sbuf_finish(&sbuf); sbuf_delete(&sbuf); - free(cbuf, M_TEMP); return (error); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 17:02:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AF661065673; Thu, 16 Sep 2010 17:02:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78B588FC18; Thu, 16 Sep 2010 17:02:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GH2QHi000452; Thu, 16 Sep 2010 17:02:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GH2Qnk000451; Thu, 16 Sep 2010 17:02:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009161702.o8GH2Qnk000451@svn.freebsd.org> From: Dimitry Andric Date: Thu, 16 Sep 2010 17:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212751 - in vendor/llvm/dist: . Xcode autoconf/m4 docs docs/CommandGuide docs/tutorial include/llvm/ADT include/llvm/Support runtime/libprofile utils/valgrind win32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 17:02:26 -0000 Author: dim Date: Thu Sep 16 17:02:26 2010 New Revision: 212751 URL: http://svn.freebsd.org/changeset/base/212751 Log: Make vendor/llvm/dist exactly the same as upstream's r108428. Some files and directories were already removed in the upstream repository, but were not removed here, when the previous snapshot was imported. Approved by: rpaulo (mentor) Deleted: vendor/llvm/dist/Xcode/ vendor/llvm/dist/autoconf/m4/bison.m4 vendor/llvm/dist/autoconf/m4/cxx_bidi_iterator.m4 vendor/llvm/dist/autoconf/m4/cxx_fwd_iterator.m4 vendor/llvm/dist/autoconf/m4/cxx_namespaces.m4 vendor/llvm/dist/autoconf/m4/cxx_std_iterator.m4 vendor/llvm/dist/autoconf/m4/flex.m4 vendor/llvm/dist/docs/AdvancedGetElementPtr.html vendor/llvm/dist/docs/CommandGuide/llvm-db.pod vendor/llvm/dist/docs/ReleaseNotes-2.6.html vendor/llvm/dist/docs/tutorial/JITTutorial1.html vendor/llvm/dist/docs/tutorial/JITTutorial2-1.png vendor/llvm/dist/docs/tutorial/JITTutorial2.html vendor/llvm/dist/include/llvm/ADT/iterator.cmake vendor/llvm/dist/include/llvm/ADT/iterator.h.in vendor/llvm/dist/include/llvm/Support/DataTypes.h.cmake vendor/llvm/dist/include/llvm/Support/DataTypes.h.in vendor/llvm/dist/mklib vendor/llvm/dist/runtime/libprofile/BlockProfiling.c vendor/llvm/dist/runtime/libprofile/FunctionProfiling.c vendor/llvm/dist/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp vendor/llvm/dist/win32/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 17:06:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6CBA106567A; Thu, 16 Sep 2010 17:06:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA518FC08; Thu, 16 Sep 2010 17:06:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GH6gaV000683; Thu, 16 Sep 2010 17:06:42 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GH6goX000682; Thu, 16 Sep 2010 17:06:42 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009161706.o8GH6goX000682@svn.freebsd.org> From: Dimitry Andric Date: Thu, 16 Sep 2010 17:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212752 - vendor/llvm/llvm-r108428 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 17:06:42 -0000 Author: dim Date: Thu Sep 16 17:06:42 2010 New Revision: 212752 URL: http://svn.freebsd.org/changeset/base/212752 Log: Prepare to re-tag llvm r108428, by removing the previous tag. Approved by: rpaulo (mentor) Deleted: vendor/llvm/llvm-r108428/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 17:08:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AAFD1065670; Thu, 16 Sep 2010 17:08:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6041C8FC15; Thu, 16 Sep 2010 17:08:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GH8kHA000768; Thu, 16 Sep 2010 17:08:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GH8kVr000767; Thu, 16 Sep 2010 17:08:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009161708.o8GH8kVr000767@svn.freebsd.org> From: Dimitry Andric Date: Thu, 16 Sep 2010 17:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212753 - vendor/llvm/llvm-r108428 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 17:08:46 -0000 Author: dim Date: Thu Sep 16 17:08:46 2010 New Revision: 212753 URL: http://svn.freebsd.org/changeset/base/212753 Log: Re-tag llvm r108428. Approved by: rpaulo (mentor) Added: vendor/llvm/llvm-r108428/ - copied from r212752, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 17:24:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 384E7106566C; Thu, 16 Sep 2010 17:24:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2829D8FC08; Thu, 16 Sep 2010 17:24:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GHOQTx001269; Thu, 16 Sep 2010 17:24:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GHOQTc001267; Thu, 16 Sep 2010 17:24:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009161724.o8GHOQTc001267@svn.freebsd.org> From: Alexander Motin Date: Thu, 16 Sep 2010 17:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212754 - head/sys/geom/concat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 17:24:26 -0000 Author: mav Date: Thu Sep 16 17:24:25 2010 New Revision: 212754 URL: http://svn.freebsd.org/changeset/base/212754 Log: Add support for dumping kernel to gconcat. Dumping goes to the component, where dump partition begins. Modified: head/sys/geom/concat/g_concat.c Modified: head/sys/geom/concat/g_concat.c ============================================================================== --- head/sys/geom/concat/g_concat.c Thu Sep 16 17:08:46 2010 (r212753) +++ head/sys/geom/concat/g_concat.c Thu Sep 16 17:24:25 2010 (r212754) @@ -212,6 +212,39 @@ g_concat_access(struct g_provider *pp, i } static void +g_concat_kernel_dump(struct bio *bp) +{ + struct g_concat_softc *sc; + struct g_concat_disk *disk; + struct bio *cbp; + struct g_kerneldump *gkd; + u_int i; + + sc = bp->bio_to->geom->softc; + gkd = (struct g_kerneldump *)bp->bio_data; + for (i = 0; i < sc->sc_ndisks; i++) { + if (sc->sc_disks[i].d_start <= gkd->offset && + sc->sc_disks[i].d_end > gkd->offset) + break; + } + if (i == sc->sc_ndisks) + g_io_deliver(bp, EOPNOTSUPP); + disk = &sc->sc_disks[i]; + gkd->offset -= disk->d_start; + if (gkd->length > disk->d_end - disk->d_start - gkd->offset) + gkd->length = disk->d_end - disk->d_start - gkd->offset; + cbp = g_clone_bio(bp); + if (cbp == NULL) { + g_io_deliver(bp, ENOMEM); + return; + } + cbp->bio_done = g_std_done; + g_io_request(cbp, disk->d_consumer); + G_CONCAT_DEBUG(1, "Kernel dump will go to %s.", + disk->d_consumer->provider->name); +} + +static void g_concat_flush(struct g_concat_softc *sc, struct bio *bp) { struct bio_queue_head queue; @@ -280,7 +313,12 @@ g_concat_start(struct bio *bp) g_concat_flush(sc, bp); return; case BIO_GETATTR: + if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { + g_concat_kernel_dump(bp); + return; + } /* To which provider it should be delivered? */ + /* FALLTHROUGH */ default: g_io_deliver(bp, EOPNOTSUPP); return; From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 17:32:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D64E81065744; Thu, 16 Sep 2010 17:32:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C644C8FC0A; Thu, 16 Sep 2010 17:32:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GHWbGB001496; Thu, 16 Sep 2010 17:32:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GHWbAL001494; Thu, 16 Sep 2010 17:32:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201009161732.o8GHWbAL001494@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 16 Sep 2010 17:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212755 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 17:32:37 -0000 Author: yongari Date: Thu Sep 16 17:32:37 2010 New Revision: 212755 URL: http://svn.freebsd.org/changeset/base/212755 Log: Fix incorrect RX BD producer updates. The producer index was already updated after allocating mbuf so driver had to use the last index instead of using next producer index. This should fix driver hang which may happen under high network load. Reported by: Igor Sysoev rambler-co dot ru>, Vlad Galu dudu dot ro> Tested by: Igor Sysoev rambler-co dot ru>, Vlad Galu dudu dot ro> MFC after: 10 days Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu Sep 16 17:24:25 2010 (r212754) +++ head/sys/dev/bge/if_bge.c Thu Sep 16 17:32:37 2010 (r212755) @@ -3386,9 +3386,11 @@ bge_rxeof(struct bge_softc *sc, uint16_t sc->bge_rx_saved_considx = rx_cons; bge_writembx(sc, BGE_MBX_RX_CONS0_LO, sc->bge_rx_saved_considx); if (stdcnt) - bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, sc->bge_std); + bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, (sc->bge_std + + BGE_STD_RX_RING_CNT - 1) % BGE_STD_RX_RING_CNT); if (jumbocnt) - bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, sc->bge_jumbo); + bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, (sc->bge_jumbo + + BGE_JUMBO_RX_RING_CNT - 1) % BGE_JUMBO_RX_RING_CNT); #ifdef notyet /* * This register wraps very quickly under heavy packet drops. From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 17:49:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79A801065694; Thu, 16 Sep 2010 17:49:10 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F47D8FC12; Thu, 16 Sep 2010 17:49:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GHnAG5002029; Thu, 16 Sep 2010 17:49:10 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GHnA3g002027; Thu, 16 Sep 2010 17:49:10 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201009161749.o8GHnA3g002027@svn.freebsd.org> From: Attilio Rao Date: Thu, 16 Sep 2010 17:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212756 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 17:49:10 -0000 Author: attilio Date: Thu Sep 16 17:49:10 2010 New Revision: 212756 URL: http://svn.freebsd.org/changeset/base/212756 Log: Implement device unbusying via a cdevpriv destructor. Suggested by: jhb Tested by: Mark Johnston Reviewed by: emaste, jhb MFC after: 10 days X-MFC: r212661 Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Thu Sep 16 17:32:37 2010 (r212755) +++ head/sys/dev/aac/aac.c Thu Sep 16 17:49:10 2010 (r212756) @@ -189,9 +189,9 @@ static char *aac_describe_code(struct aa /* Management Interface */ static d_open_t aac_open; -static d_close_t aac_close; static d_ioctl_t aac_ioctl; static d_poll_t aac_poll; +static void aac_cdevpriv_dtor(void *arg); static int aac_ioctl_sendfib(struct aac_softc *sc, caddr_t ufib); static int aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t arg); static void aac_handle_aif(struct aac_softc *sc, @@ -212,9 +212,8 @@ static struct aac_mntinforesp * static struct cdevsw aac_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT | D_TRACKCLOSE, + .d_flags = D_NEEDGIANT, .d_open = aac_open, - .d_close = aac_close, .d_ioctl = aac_ioctl, .d_poll = aac_poll, .d_name = "aac", @@ -2802,18 +2801,7 @@ aac_open(struct cdev *dev, int flags, in sc = dev->si_drv1; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); device_busy(sc->aac_dev); - - return 0; -} - -static int -aac_close(struct cdev *dev, int flags, int fmt, struct thread *td) -{ - struct aac_softc *sc; - - sc = dev->si_drv1; - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - device_unbusy(sc->aac_dev); + devfs_set_cdevpriv(sc, aac_cdevpriv_dtor); return 0; } @@ -3201,6 +3189,21 @@ out: } /* + * cdevpriv interface private destructor. + */ +static void +aac_cdevpriv_dtor(void *arg) +{ + struct aac_softc *sc; + + sc = arg; + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + mtx_lock(&Giant); + device_unbusy(sc->aac_dev); + mtx_unlock(&Giant); +} + +/* * Handle an AIF sent to us by the controller; queue it for later reference. * If the queue fills up, then drop the older entries. */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 18:37:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC6551065670; Thu, 16 Sep 2010 18:37:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCC798FC12; Thu, 16 Sep 2010 18:37:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GIbX9G003385; Thu, 16 Sep 2010 18:37:33 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GIbXis003383; Thu, 16 Sep 2010 18:37:33 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009161837.o8GIbXis003383@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 16 Sep 2010 18:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212757 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 18:37:34 -0000 Author: jkim Date: Thu Sep 16 18:37:33 2010 New Revision: 212757 URL: http://svn.freebsd.org/changeset/base/212757 Log: Fix a typo in a comment. Submitted by: afiveg Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Thu Sep 16 17:49:10 2010 (r212756) +++ head/sys/net/bpf.c Thu Sep 16 18:37:33 2010 (r212757) @@ -1392,7 +1392,7 @@ bpfioctl(struct cdev *dev, u_long cmd, c break; /* - * Set packet timestamp format and resolution. + * Get packet timestamp format and resolution. */ case BIOCGTSTAMP: *(u_int *)addr = d->bd_tstamp; From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 19:13:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B697A106564A; Thu, 16 Sep 2010 19:13:55 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A531B8FC1B; Thu, 16 Sep 2010 19:13:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GJDtKt004201; Thu, 16 Sep 2010 19:13:55 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GJDtOo004197; Thu, 16 Sep 2010 19:13:55 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009161913.o8GJDtOo004197@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 16 Sep 2010 19:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212758 - in head/sys/mips/rmi: . dev/nlge dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 19:13:55 -0000 Author: jchandra Date: Thu Sep 16 19:13:55 2010 New Revision: 212758 URL: http://svn.freebsd.org/changeset/base/212758 Log: Network driver updates. - Move RMI MIPS extension to atomic increment word (LDADDWU) to common header file sys/mips/rmi/rmi_mips_exts.h - Fix xlr_ldaddwu() for 64 bit, it is a 32 bit operation, use unsigned int* instead of unsigned long* argument - Provide dummy xlr_enable_kx/xlr_restore_kx for n32 and n64. - Provide xlr_paddr_ld() instead of xlr_paddr_lw(), so that the descriptor formats are same for 32 and 64 bit - update nlge and rge for the changes These changes are also needed by the security driver which will be added later. Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c head/sys/mips/rmi/dev/xlr/rge.c head/sys/mips/rmi/rmi_mips_exts.h Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c ============================================================================== --- head/sys/mips/rmi/dev/nlge/if_nlge.c Thu Sep 16 18:37:33 2010 (r212757) +++ head/sys/mips/rmi/dev/nlge/if_nlge.c Thu Sep 16 19:13:55 2010 (r212758) @@ -300,31 +300,13 @@ DRIVER_MODULE(miibus, nlge, miibus_drive static uma_zone_t nl_tx_desc_zone; -/* Function to atomically increment an integer with the given value. */ -static __inline__ unsigned int -ldadd_wu(unsigned int value, unsigned long *addr) -{ - __asm__ __volatile__( ".set push\n" - ".set noreorder\n" - "move $8, %2\n" - "move $9, %3\n" - /* "ldaddwu $8, $9\n" */ - ".word 0x71280011\n" - "move %0, $8\n" - ".set pop\n" - : "=&r"(value), "+m"(*addr) - : "0"(value), "r" ((unsigned long)addr) - : "$8", "$9"); - return value; -} - -static __inline__ uint32_t -xlr_enable_kx(void) +static __inline void +atomic_incr_long(unsigned long *addr) { - uint32_t sr = mips_rd_status(); + /* XXX: fix for 64 bit */ + unsigned int *iaddr = (unsigned int *)addr; - mips_wr_status((sr & ~MIPS_SR_INT_IE) | MIPS_SR_KX); - return sr; + xlr_ldaddwu(1, iaddr); } static int @@ -683,7 +665,7 @@ nlge_msgring_handler(int bucket, int siz if (ifp->if_drv_flags & IFF_DRV_OACTIVE){ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } - ldadd_wu(1, (tx_error) ? &ifp->if_oerrors: &ifp->if_opackets); + atomic_incr_long((tx_error) ? &ifp->if_oerrors: &ifp->if_opackets); } else if (ctrl == CTRL_SNGL || ctrl == CTRL_START) { /* Rx Packet */ @@ -766,7 +748,7 @@ fail: //ifp->if_drv_flags |= IFF_DRV_OACTIVE; //IF_PREPEND(&ifp->if_snd, m); m_freem(m); - ldadd_wu(1, &ifp->if_iqdrops); + atomic_incr_long(&ifp->if_iqdrops); } return; } @@ -774,14 +756,15 @@ fail: static void nlge_rx(struct nlge_softc *sc, vm_paddr_t paddr, int len) { - struct ifnet *ifp; - struct mbuf *m; - uint32_t tm, mag, sr; + struct ifnet *ifp; + struct mbuf *m; + uint64_t tm, mag; + uint32_t sr; sr = xlr_enable_kx(); - tm = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE); - mag = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + sizeof(uint32_t)); - mips_wr_status(sr); + tm = xlr_paddr_ld(paddr - XLR_CACHELINE_SIZE); + mag = xlr_paddr_ld(paddr - XLR_CACHELINE_SIZE + sizeof(uint64_t)); + xlr_restore_kx(sr); m = (struct mbuf *)(intptr_t)tm; if (mag != 0xf00bad) { @@ -797,7 +780,7 @@ nlge_rx(struct nlge_softc *sc, vm_paddr_ m->m_pkthdr.len = m->m_len = len; m->m_pkthdr.rcvif = ifp; - ldadd_wu(1, &ifp->if_ipackets); + atomic_incr_long(&ifp->if_ipackets); (*ifp->if_input)(ifp, m); } @@ -1895,15 +1878,11 @@ prepare_fmn_message(struct nlge_softc *s return 2; } /* - * As we currently use xlr_paddr_lw on a 32-bit - * OS, both the pointers are laid out in one - * 64-bit location - this makes it easy to - * retrieve the pointers when processing the - * tx free-back descriptor. + * Save the virtual address in the descriptor, + * it makes freeing easy. */ p2p->frag[XLR_MAX_TX_FRAGS] = - (((uint64_t) (vm_offset_t) p2p) << 32) | - ((vm_offset_t) mbuf_chain); + (uint64_t)(vm_offset_t)p2p; cur_p2d = &p2p->frag[0]; is_p2p = 1; } else if (msg_sz == (FMN_SZ - 2 + XLR_MAX_TX_FRAGS)) { @@ -1932,7 +1911,7 @@ prepare_fmn_message(struct nlge_softc *s cur_p2d[-1] |= (1ULL << 63); /* set eop in most-recent p2d */ *cur_p2d = (1ULL << 63) | ((uint64_t)fb_stn_id << 54) | - (vm_offset_t) mbuf_chain; + (vm_offset_t) mbuf_chain; /* XXX: fix 64 bit */ *tx_desc = p2p; if (is_p2p) { @@ -1973,39 +1952,41 @@ release_tx_desc(vm_paddr_t paddr) { struct nlge_tx_desc *tx_desc; uint32_t sr; - uint32_t val1, val2; + uint64_t vaddr; paddr += (XLR_MAX_TX_FRAGS * sizeof(uint64_t)); sr = xlr_enable_kx(); - val1 = xlr_paddr_lw(paddr); - paddr += sizeof(void *); - val2 = xlr_paddr_lw(paddr); - mips_wr_status(sr); + vaddr = xlr_paddr_ld(paddr); + xlr_restore_kx(sr); - tx_desc = (struct nlge_tx_desc*)(intptr_t) val1; + tx_desc = (struct nlge_tx_desc*)(intptr_t)vaddr; uma_zfree(nl_tx_desc_zone, tx_desc); } static void * get_buf(void) { - struct mbuf *m_new; - vm_paddr_t temp1, temp2; - unsigned int *md; + struct mbuf *m_new; + uint64_t *md; +#ifdef INVARIANTS + vm_paddr_t temp1, temp2; +#endif if ((m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL) - return NULL; + return (NULL); m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; m_adj(m_new, XLR_CACHELINE_SIZE - ((unsigned int)m_new->m_data & 0x1f)); - md = (unsigned int *)m_new->m_data; - md[0] = (unsigned int)m_new; /* Back Ptr */ + md = (uint64_t *)m_new->m_data; + md[0] = (intptr_t)m_new; /* Back Ptr */ md[1] = 0xf00bad; m_adj(m_new, XLR_CACHELINE_SIZE); +#ifdef INVARIANTS temp1 = vtophys((vm_offset_t) m_new->m_data); temp2 = vtophys((vm_offset_t) m_new->m_data + 1536); if ((temp1 + 1536) != temp2) panic("ALLOCED BUFFER IS NOT CONTIGUOUS\n"); +#endif return ((void *)m_new->m_data); } Modified: head/sys/mips/rmi/dev/xlr/rge.c ============================================================================== --- head/sys/mips/rmi/dev/xlr/rge.c Thu Sep 16 18:37:33 2010 (r212757) +++ head/sys/mips/rmi/dev/xlr/rge.c Thu Sep 16 19:13:55 2010 (r212758) @@ -184,35 +184,8 @@ int xlr_rge_tx_ok_done[MAXCPU]; int xlr_rge_rx_done[MAXCPU]; int xlr_rge_repl_done[MAXCPU]; -static __inline__ unsigned int -ldadd_wu(unsigned int value, unsigned long *addr) -{ - __asm__ __volatile__(".set push\n" - ".set noreorder\n" - "move $8, %2\n" - "move $9, %3\n" - /* "ldaddwu $8, $9\n" */ - ".word 0x71280011\n" - "move %0, $8\n" - ".set pop\n" - : "=&r"(value), "+m"(*addr) - : "0"(value), "r"((unsigned long)addr) - : "$8", "$9"); - - return value; -} - -static __inline__ uint32_t -xlr_enable_kx(void) -{ - uint32_t sr = mips_rd_status(); - - mips_wr_status((sr & ~MIPS_SR_INT_IE) | MIPS_SR_KX); - return sr; -} - /* #define mac_stats_add(x, val) ({(x) += (val);}) */ -#define mac_stats_add(x, val) ldadd_wu(val, &x) +#define mac_stats_add(x, val) xlr_ldaddwu(val, &x) #define XLR_MAX_CORE 8 #define RGE_LOCK_INIT(_sc, _name) \ @@ -611,25 +584,16 @@ static void free_buf(vm_paddr_t paddr) { struct mbuf *m; - uint32_t mag; -#ifdef __mips_n64 - uint64_t *vaddr; - - vaddr = (uint64_t *)MIPS_PHYS_TO_XKPHYS_CACHED(paddr); - m = (struct mbuf *)vaddr[0]; - mag = (uint32_t)vaddr[1]; -#else + uint64_t mag; uint32_t sr; sr = xlr_enable_kx(); - m = (struct mbuf *)(intptr_t)xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + sizeof(uint32_t)); - mag = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + 3 * sizeof(uint32_t)); - mips_wr_status(sr); -#endif - + m = (struct mbuf *)(intptr_t)xlr_paddr_ld(paddr - XLR_CACHELINE_SIZE); + mag = xlr_paddr_ld(paddr - XLR_CACHELINE_SIZE + sizeof(uint64_t)); + xlr_restore_kx(sr); if (mag != 0xf00bad) { - printf("Something is wrong kseg:%lx found mag:%x not 0xf00bad\n", - (u_long)paddr, mag); + printf("Something is wrong kseg:%lx found mag:%lx not 0xf00bad\n", + (u_long)paddr, (u_long)mag); return; } if (m != NULL) @@ -2022,15 +1986,8 @@ static void rge_rx(struct rge_softc *sc, vm_paddr_t paddr, int len) { struct mbuf *m; - uint32_t mag; struct ifnet *ifp = sc->rge_ifp; -#ifdef __mips_n64 - uint64_t *vaddr; - - vaddr =(uint64_t *)MIPS_PHYS_TO_XKPHYS_CACHED(paddr - XLR_CACHELINE_SIZE); - m = (struct mbuf *)vaddr[0]; - mag = (uint32_t)vaddr[1]; -#else + uint64_t mag; uint32_t sr; /* * On 32 bit machines we use XKPHYS to get the values stores with @@ -2038,10 +1995,9 @@ rge_rx(struct rge_softc *sc, vm_paddr_t * KX is enabled to prevent this setting leaking to other code. */ sr = xlr_enable_kx(); - m = (struct mbuf *)(intptr_t)xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + sizeof(uint32_t)); - mag = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + 3 * sizeof(uint32_t)); - mips_wr_status(sr); -#endif + m = (struct mbuf *)(intptr_t)xlr_paddr_ld(paddr - XLR_CACHELINE_SIZE); + mag = xlr_paddr_ld(paddr - XLR_CACHELINE_SIZE + sizeof(uint64_t)); + xlr_restore_kx(sr); if (mag != 0xf00bad) { /* somebody else packet Error - FIXME in intialization */ printf("cpu %d: *ERROR* Not my packet paddr %p\n", Modified: head/sys/mips/rmi/rmi_mips_exts.h ============================================================================== --- head/sys/mips/rmi/rmi_mips_exts.h Thu Sep 16 18:37:33 2010 (r212757) +++ head/sys/mips/rmi/rmi_mips_exts.h Thu Sep 16 19:13:55 2010 (r212758) @@ -348,7 +348,7 @@ write_c0_eimr64(uint64_t val) write_c0_register64(9, 7, val); } -static __inline__ int +static __inline int xlr_test_and_set(int *lock) { int oldval = 0; @@ -367,10 +367,10 @@ xlr_test_and_set(int *lock) : "$8", "$9" ); - return (oldval == 0 ? 1 /* success */ : 0 /* failure */ ); + return (oldval == 0 ? 1 /* success */ : 0 /* failure */); } -static __inline__ uint32_t +static __inline uint32_t xlr_mfcr(uint32_t reg) { uint32_t val; @@ -385,7 +385,7 @@ xlr_mfcr(uint32_t reg) return val; } -static __inline__ void +static __inline void xlr_mtcr(uint32_t reg, uint32_t val) { __asm__ __volatile__( @@ -396,26 +396,47 @@ xlr_mtcr(uint32_t reg, uint32_t val) : "$8", "$9"); } +/* + * Atomic increment a unsigned int + */ +static __inline unsigned int +xlr_ldaddwu(unsigned int value, unsigned int *addr) +{ + __asm__ __volatile__( + ".set push\n" + ".set noreorder\n" + "move $8, %2\n" + "move $9, %3\n" + ".word 0x71280011\n" /* ldaddwu $8, $9 */ + "move %0, $8\n" + ".set pop\n" + : "=&r"(value), "+m"(*addr) + : "0"(value), "r" ((unsigned long)addr) + : "$8", "$9"); + + return (value); +} + #if defined(__mips_n64) -static __inline__ uint32_t -xlr_paddr_lw(uint64_t paddr) +static __inline uint64_t +xlr_paddr_ld(uint64_t paddr) { paddr |= 0x9800000000000000ULL; - return (*(uint32_t *)(uintptr_t)paddr); + return (*(uint64_t *)(uintptr_t)paddr); } #elif defined(__mips_n32) -static __inline__ uint32_t -xlr_paddr_lw(uint64_t paddr) +static __inline uint64_t +xlr_paddr_ld(uint64_t paddr) { - uint32_t val; + uint64_t val; paddr |= 0x9800000000000000ULL; __asm__ __volatile__( ".set push \n\t" ".set mips64 \n\t" - "lw %0, 0(%1) \n\t" + "ld %0, 0(%1) \n\t" ".set pop \n" : "=r"(val) : "r"(paddr)); @@ -423,27 +444,62 @@ xlr_paddr_lw(uint64_t paddr) return (val); } #else -static __inline__ uint32_t -xlr_paddr_lw(uint64_t paddr) +static __inline uint32_t +xlr_paddr_ld(uint64_t paddr) { - uint32_t high, low, tmp; + uint32_t addrh, addrl; + uint32_t valh, vall; - high = 0x98000000 | (paddr >> 32); - low = paddr & 0xffffffff; + addrh = 0x98000000 | (paddr >> 32); + addrl = paddr & 0xffffffff; __asm__ __volatile__( ".set push \n\t" ".set mips64 \n\t" - "dsll32 %1, %1, 0 \n\t" - "dsll32 %2, %2, 0 \n\t" /* get rid of the */ - "dsrl32 %2, %2, 0 \n\t" /* sign extend */ - "or %1, %1, %2 \n\t" - "lw %0, 0(%1) \n\t" + "dsll32 %2, %2, 0 \n\t" + "dsll32 %3, %3, 0 \n\t" /* get rid of the */ + "dsrl32 %3, %3, 0 \n\t" /* sign extend */ + "or %2, %2, %3 \n\t" + "lw %0, 0(%2) \n\t" + "lw %1, 4(%2) \n\t" ".set pop \n" - : "=r"(tmp) - : "r"(high), "r"(low)); + : "=&r"(valh), "=r"(vall) + : "r"(addrh), "r"(addrl)); + + return (((uint64_t)valh << 32) | vall); +} +#endif + +/* + * XXX: Not really needed in n32 or n64, retain for now + */ +#if defined(__mips_n64) || defined(__mips_n32) +static __inline uint32_t +xlr_enable_kx(void) +{ + + return (0); +} + +static __inline void +xlr_restore_kx(uint32_t sr) +{ +} +#else +static __inline uint32_t +xlr_enable_kx(void) +{ + uint32_t sr = mips_rd_status(); + + mips_wr_status((sr & ~MIPS_SR_INT_IE) | MIPS_SR_KX); + return (sr); +} + +static __inline void +xlr_restore_kx(uint32_t sr) +{ - return tmp; + mips_wr_status(sr); } #endif From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 19:25:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46AC010657C5; Thu, 16 Sep 2010 19:25:25 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 369BB8FC21; Thu, 16 Sep 2010 19:25:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GJPPm0004537; Thu, 16 Sep 2010 19:25:25 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GJPPcB004535; Thu, 16 Sep 2010 19:25:25 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009161925.o8GJPPcB004535@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 16 Sep 2010 19:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212759 - head/sys/mips/rmi/dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 19:25:25 -0000 Author: jchandra Date: Thu Sep 16 19:25:24 2010 New Revision: 212759 URL: http://svn.freebsd.org/changeset/base/212759 Log: Update rge.h for r212758 - stats incremented using xlr_ldaddwu should be unsigned int. Modified: head/sys/mips/rmi/dev/xlr/rge.h Modified: head/sys/mips/rmi/dev/xlr/rge.h ============================================================================== --- head/sys/mips/rmi/dev/xlr/rge.h Thu Sep 16 19:13:55 2010 (r212758) +++ head/sys/mips/rmi/dev/xlr/rge.h Thu Sep 16 19:25:24 2010 (r212759) @@ -26,6 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ * RMI_BSD */ #ifndef _RMI_RGE_H_ #define _RMI_RGE_H_ @@ -972,12 +973,12 @@ enum { }; struct rge_softc_stats { - unsigned long rx_frames; - unsigned long tx_frames; - unsigned long rx_packets; - unsigned long rx_bytes; - unsigned long tx_packets; - unsigned long tx_bytes; + unsigned int rx_frames; + unsigned int tx_frames; + unsigned int rx_packets; + unsigned int rx_bytes; + unsigned int tx_packets; + unsigned int tx_bytes; }; struct driver_data { From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 19:43:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36BBA1065674; Thu, 16 Sep 2010 19:43:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 264BB8FC14; Thu, 16 Sep 2010 19:43:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GJhXWx004968; Thu, 16 Sep 2010 19:43:33 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GJhXJj004966; Thu, 16 Sep 2010 19:43:33 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009161943.o8GJhXJj004966@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 16 Sep 2010 19:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212760 - vendor-sys/acpica/dist/include/platform X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 19:43:33 -0000 Author: jkim Date: Thu Sep 16 19:43:32 2010 New Revision: 212760 URL: http://svn.freebsd.org/changeset/base/212760 Log: Update acfreebsd.h for ACPI_THREAD_ID change. Note this patch was committed on upstream GIT: http://git.moblin.org/cgit.cgi/acpica/commit/?id=184ee2428cf02b0035d5de8a82c06fdfbc2ae14c Modified: vendor-sys/acpica/dist/include/platform/acfreebsd.h Modified: vendor-sys/acpica/dist/include/platform/acfreebsd.h ============================================================================== --- vendor-sys/acpica/dist/include/platform/acfreebsd.h Thu Sep 16 19:25:24 2010 (r212759) +++ vendor-sys/acpica/dist/include/platform/acfreebsd.h Thu Sep 16 19:43:32 2010 (r212760) @@ -165,6 +165,8 @@ #include #endif +#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (pthread)) + #define ACPI_USE_STANDARD_HEADERS #define ACPI_FLUSH_CPU_CACHE() From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 20:08:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 060D11065674; Thu, 16 Sep 2010 20:08:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E60128FC1C; Thu, 16 Sep 2010 20:08:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GK80I1005575; Thu, 16 Sep 2010 20:08:00 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GK80Iq005537; Thu, 16 Sep 2010 20:08:00 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009162008.o8GK80Iq005537@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 16 Sep 2010 20:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212761 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/events sys/contri... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 20:08:01 -0000 Author: jkim Date: Thu Sep 16 20:08:00 2010 New Revision: 212761 URL: http://svn.freebsd.org/changeset/base/212761 Log: Merge ACPICA 20100915. Added: head/sys/contrib/dev/acpica/hardware/hwpci.c - copied, changed from r212760, vendor-sys/acpica/dist/hardware/hwpci.c head/sys/contrib/dev/acpica/utilities/utxferror.c - copied, changed from r212760, vendor-sys/acpica/dist/utilities/utxferror.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype2d.c head/sys/contrib/dev/acpica/compiler/aslrestype2e.c head/sys/contrib/dev/acpica/compiler/aslrestype2w.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/debugger/dbexec.c head/sys/contrib/dev/acpica/events/evrgnini.c head/sys/contrib/dev/acpica/executer/exmutex.c head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/namespace/nsrepair2.c head/sys/contrib/dev/acpica/namespace/nsutils.c head/sys/contrib/dev/acpica/osunixxf.c head/sys/contrib/dev/acpica/tables/tbfadt.c head/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h head/sys/contrib/dev/acpica/utilities/utdebug.c head/sys/contrib/dev/acpica/utilities/utmath.c head/sys/contrib/dev/acpica/utilities/utmisc.c head/sys/contrib/dev/acpica/utilities/utmutex.c head/sys/dev/acpica/Osd/OsdHardware.c head/sys/modules/acpi/acpi/Makefile head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/conf/files Thu Sep 16 20:08:00 2010 (r212761) @@ -221,6 +221,7 @@ contrib/dev/acpica/executer/exsystem.c contrib/dev/acpica/executer/exutils.c optional acpi contrib/dev/acpica/hardware/hwacpi.c optional acpi contrib/dev/acpica/hardware/hwgpe.c optional acpi +contrib/dev/acpica/hardware/hwpci.c optional acpi contrib/dev/acpica/hardware/hwregs.c optional acpi contrib/dev/acpica/hardware/hwsleep.c optional acpi contrib/dev/acpica/hardware/hwtimer.c optional acpi @@ -289,6 +290,7 @@ contrib/dev/acpica/utilities/utosi.c op contrib/dev/acpica/utilities/utresrc.c optional acpi contrib/dev/acpica/utilities/utstate.c optional acpi contrib/dev/acpica/utilities/utxface.c optional acpi +contrib/dev/acpica/utilities/utxferror.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/changes.txt Thu Sep 16 20:08:00 2010 (r212761) @@ -1,4 +1,68 @@ ---------------------------------------- +15 September 2010. Summary of changes for version 20100915: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Removed the AcpiOsDerivePciId OSL interface. The various host implementations +of this function were not OS-dependent and are now obsolete and can be +removed from all host OSLs. This function has been replaced by +AcpiHwDerivePciId, which is now part of the ACPICA core code. +AcpiHwDerivePciId has been implemented without recursion. Adds one new +module, hwpci.c. ACPICA BZ 857. + +Implemented a dynamic repair for _HID and _CID strings. The following +problems are now repaired at runtime: 1) Remove a leading asterisk in the +string, and 2) the entire string is uppercased. Both repairs are in +accordance with the ACPI specification and will simplify host driver code. +ACPICA BZ 871. + +The ACPI_THREAD_ID type is no longer configurable, internally it is now +always UINT64. This simplifies the ACPICA code, especially any printf output. +UINT64 is the only common data type for all thread_id types across all +operating systems. It is now up to the host OSL to cast the native thread_id +type to UINT64 before returning the value to ACPICA (via AcpiOsGetThreadId). +Lin Ming, Bob Moore. + +Added the ACPI_INLINE type to enhance the ACPICA configuration. The "inline" +keyword is not standard across compilers, and this type allows inline to be +configured on a per-compiler basis. Lin Ming. + +Made the system global AcpiGbl_SystemAwakeAndRunning publically available. +Added an extern for this boolean in acpixf.h. Some hosts utilize this value +during suspend/restore operations. ACPICA BZ 869. + +All code that implements error/warning messages with the "ACPI:" prefix has +been moved to a new module, utxferror.c. + +The UINT64_OVERLAY was moved to utmath.c, which is the only module where it +is used. ACPICA BZ 829. Lin Ming, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 89.1K Code, 19.0K Data, 108.1K Total + Debug Version: 165.1K Code, 51.9K Data, 217.0K Total + Current Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Write ACPI errors to stderr instead of the output file. +This keeps the output files free of random error messages that may originate +from within the namespace/interpreter code. Used this opportunity to merge +all ACPI:-style messages into a single new module, utxferror.c. ACPICA BZ +866. Lin Ming, Bob Moore. + +Tools: update some printfs for ansi warnings on size_t. Handle width change +of size_t on 32-bit versus 64-bit generations. Lin Ming. + +---------------------------------------- 06 August 2010. Summary of changes for version 20100806: 1) ACPI CA Core Subsystem: Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/common/adfile.c Thu Sep 16 20:08:00 2010 (r212761) @@ -126,13 +126,13 @@ /* Local prototypes */ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, UINT32 Length); -char FilenameBuf[20]; +static char FilenameBuf[20]; /****************************************************************************** @@ -190,7 +190,7 @@ AdGenerateFilename ( * ******************************************************************************/ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/common/adisasm.c Thu Sep 16 20:08:00 2010 (r212761) @@ -147,18 +147,18 @@ LsSetupNsList ( /* Local prototypes */ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table); -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, UINT32 AmlLength); -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root); @@ -634,7 +634,7 @@ AdDisassemblerHeader ( * *****************************************************************************/ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table) @@ -781,7 +781,7 @@ AdDisplayTables ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, @@ -904,7 +904,7 @@ AdDeferredParse ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root) { Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/common/adwalk.c Thu Sep 16 20:08:00 2010 (r212761) @@ -792,6 +792,7 @@ AcpiDmXrefDescendingOp ( ACPI_PARSE_OBJECT *NextOp; ACPI_NAMESPACE_NODE *Node; ACPI_OPERAND_OBJECT *Object; + UINT32 ParamCount = 0; WalkState = Info->WalkState; @@ -880,18 +881,13 @@ AcpiDmXrefDescendingOp ( if (Object) { ObjectType2 = Object->Common.Type; + if (ObjectType2 == ACPI_TYPE_METHOD) + { + ParamCount = Object->Method.ParamCount; + } } - if (ObjectType2 == ACPI_TYPE_METHOD) - { - AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_METHOD, - Object->Method.ParamCount); - } - else - { - AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, 0); - } - + AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, ParamCount); Op->Common.Node = Node; } else Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Thu Sep 16 20:08:00 2010 (r212761) @@ -704,8 +704,8 @@ AcpiDmUpdateResourceName ( Name[0] = '_'; Name[1] = AcpiGbl_Prefix[AcpiGbl_NextPrefix]; - Name[2] = AcpiUtHexToAsciiChar (AcpiGbl_NextResourceId, 4); - Name[3] = AcpiUtHexToAsciiChar (AcpiGbl_NextResourceId, 0); + Name[2] = AcpiUtHexToAsciiChar ((UINT64) AcpiGbl_NextResourceId, 4); + Name[3] = AcpiUtHexToAsciiChar ((UINT64) AcpiGbl_NextResourceId, 0); /* Update globals for next name */ Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/common/getopt.c Thu Sep 16 20:08:00 2010 (r212761) @@ -126,7 +126,6 @@ int AcpiGbl_Opterr = 1; int AcpiGbl_Optind = 1; -int AcpiGbl_Optopt; char *AcpiGbl_Optarg; @@ -171,9 +170,7 @@ AcpiGetopt( /* Get the option */ - CurrentChar = - AcpiGbl_Optopt = - argv[AcpiGbl_Optind][CurrentCharPtr]; + CurrentChar = argv[AcpiGbl_Optind][CurrentCharPtr]; /* Make sure that the option is legal */ Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Sep 16 20:08:00 2010 (r212761) @@ -166,7 +166,7 @@ static UINT32 AnGetInternalMethodReturnType ( ACPI_PARSE_OBJECT *Op); -BOOLEAN +static BOOLEAN AnIsResultUsed ( ACPI_PARSE_OBJECT *Op); @@ -1754,7 +1754,7 @@ AnOperandTypecheckWalkEnd ( * ******************************************************************************/ -BOOLEAN +static BOOLEAN AnIsResultUsed ( ACPI_PARSE_OBJECT *Op) { @@ -1862,6 +1862,7 @@ AnOtherSemanticAnalysisWalkBegin ( if (Op->Asl.AmlOpcode == AML_DIVIDE_OP) { if ((ArgNode->Asl.ParseOpcode == PARSEOP_ZERO) && + (PrevArgNode) && (PrevArgNode->Asl.ParseOpcode == PARSEOP_ZERO)) { AslError (ASL_WARNING, ASL_MSG_RESULT_NOT_USED, Op, Op->Asl.ExternalName); Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Sep 16 20:08:00 2010 (r212761) @@ -127,12 +127,12 @@ static void CmFlushSourceCode ( void); -void +static void FlConsumeAnsiComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status); -void +static void FlConsumeNewComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status); @@ -345,7 +345,7 @@ CmFlushSourceCode ( * ******************************************************************************/ -void +static void FlConsumeAnsiComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status) @@ -389,7 +389,7 @@ FlConsumeAnsiComment ( } -void +static void FlConsumeNewComment ( ASL_FILE_INFO *FileInfo, ASL_FILE_STATUS *Status) Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Sep 16 20:08:00 2010 (r212761) @@ -686,6 +686,10 @@ ACPI_STATUS LsDisplayNamespace ( void); +void +LsSetupNsList ( + void *Handle); + /* * aslutils - common compiler utilites Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Sep 16 20:08:00 2010 (r212761) @@ -304,7 +304,7 @@ AePrintException ( if (Enode->LineNumber) { - fprintf (OutputFile, "%6u: ", Enode->LineNumber); + fprintf (OutputFile, " %6u: ", Enode->LineNumber); /* * Seek to the offset in the combined source file, read the source @@ -358,7 +358,7 @@ AePrintException ( { /* Decode the message ID */ - fprintf (OutputFile, "%s %4.4d -", + fprintf (OutputFile, "%s %4.4d - ", AslErrorLevel[Enode->Level], Enode->MessageId + ((Enode->Level+1) * 1000)); Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Sep 16 20:08:00 2010 (r212761) @@ -122,7 +122,7 @@ /* Local prototypes */ -FILE * +static FILE * FlOpenIncludeWithPrefix ( char *PrefixDir, char *Filename); @@ -546,7 +546,7 @@ FlAddIncludeDirectory ( * ******************************************************************************/ -FILE * +static FILE * FlOpenIncludeWithPrefix ( char *PrefixDir, char *Filename) Modified: head/sys/contrib/dev/acpica/compiler/asllisting.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Sep 16 20:08:00 2010 (r212761) @@ -202,7 +202,7 @@ static void LsDoHexOutputAsl ( void); -ACPI_STATUS +static ACPI_STATUS LsTreeWriteWalk ( ACPI_PARSE_OBJECT *Op, UINT32 Level, @@ -222,7 +222,7 @@ LsTreeWriteWalk ( * ******************************************************************************/ -ACPI_STATUS +static ACPI_STATUS LsTreeWriteWalk ( ACPI_PARSE_OBJECT *Op, UINT32 Level, Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Sep 16 20:08:00 2010 (r212761) @@ -180,11 +180,7 @@ LsDoOnePathname ( void *Context, void **ReturnValue); -void -LsSetupNsList ( - void *Handle); - -ACPI_PARSE_OBJECT * +static ACPI_PARSE_OBJECT * LkGetNameOp ( ACPI_PARSE_OBJECT *Op); @@ -623,7 +619,7 @@ LkObjectExists ( * ******************************************************************************/ -ACPI_PARSE_OBJECT * +static ACPI_PARSE_OBJECT * LkGetNameOp ( ACPI_PARSE_OBJECT *Op) { Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Sep 16 20:08:00 2010 (r212761) @@ -214,7 +214,7 @@ Options ( printf (" -cr Disable Resource Descriptor error checking\n"); printf (" -r Override table header Revision (1-255)\n"); - printf ("\nListings:\n"); + printf ("\nASL Listing Files:\n"); printf (" -l Create mixed listing file (ASL source and AML) (*.lst)\n"); printf (" -ln Create namespace file (*.nsp)\n"); printf (" -ls Create combined source file (expanded includes) (*.src)\n"); @@ -462,6 +462,7 @@ AslDoOptions ( BOOLEAN IsResponseFile) { int j; + ACPI_STATUS Status; /* Get the command line options */ @@ -554,7 +555,12 @@ AslDoOptions ( case 'e': - AcpiDmAddToExternalFileList (AcpiGbl_Optarg); + Status = AcpiDmAddToExternalFileList (AcpiGbl_Optarg); + if (ACPI_FAILURE (Status)) + { + printf ("Could not add %s to external list\n", AcpiGbl_Optarg); + return (-1); + } break; @@ -601,7 +607,6 @@ AslDoOptions ( printf ("Unknown option: -h%s\n", AcpiGbl_Optarg); return (-1); } - break; case 'I': /* Add an include file search directory */ @@ -891,6 +896,7 @@ AslCommandLine ( char **argv) { int BadCommandLine = 0; + ACPI_STATUS Status; /* Minimum command line contains at least the command and an input file */ @@ -908,7 +914,11 @@ AslCommandLine ( if (Gbl_DoTemplates) { - DtCreateTemplates (Gbl_TemplateSignature); + Status = DtCreateTemplates (Gbl_TemplateSignature); + if (ACPI_FAILURE (Status)) + { + exit (-1); + } exit (1); } Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Sep 16 20:08:00 2010 (r212761) @@ -592,9 +592,9 @@ OpcDoEisaId ( /* Create ID big-endian first (bits are contiguous) */ BigEndianId = - (UINT32) (InString[0] - 0x40) << 26 | - (UINT32) (InString[1] - 0x40) << 21 | - (UINT32) (InString[2] - 0x40) << 16 | + (UINT32) ((UINT8) (InString[0] - 0x40)) << 26 | + (UINT32) ((UINT8) (InString[1] - 0x40)) << 21 | + (UINT32) ((UINT8) (InString[2] - 0x40)) << 16 | (UtHexCharToValue (InString[3])) << 12 | (UtHexCharToValue (InString[4])) << 8 | Modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpredef.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslpredef.c Thu Sep 16 20:08:00 2010 (r212761) @@ -117,8 +117,6 @@ #include #include "aslcompiler.y.h" -#include -#include #include Modified: head/sys/contrib/dev/acpica/compiler/aslrestype1.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Sep 16 20:08:00 2010 (r212761) @@ -224,7 +224,6 @@ RsDoMemory24Descriptor ( ACPI_PARSE_OBJECT *MinOp = NULL; ACPI_PARSE_OBJECT *MaxOp = NULL; ACPI_PARSE_OBJECT *LengthOp = NULL; - ACPI_PARSE_OBJECT *AlignOp = NULL; ASL_RESOURCE_NODE *Rnode; UINT32 i; @@ -270,7 +269,6 @@ RsDoMemory24Descriptor ( Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer; RsCreateByteField (InitializerOp, ACPI_RESTAG_ALIGNMENT, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment)); - AlignOp = InitializerOp; break; case 4: /* Length */ Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2d.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2d.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2d.c Thu Sep 16 20:08:00 2010 (r212761) @@ -347,10 +347,10 @@ RsDoDwordIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address32.Minimum, - Descriptor->Address32.Maximum, - Descriptor->Address32.AddressLength, - Descriptor->Address32.Granularity, + (UINT64) Descriptor->Address32.Minimum, + (UINT64) Descriptor->Address32.Maximum, + (UINT64) Descriptor->Address32.AddressLength, + (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -583,10 +583,10 @@ RsDoDwordMemoryDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address32.Minimum, - Descriptor->Address32.Maximum, - Descriptor->Address32.AddressLength, - Descriptor->Address32.Granularity, + (UINT64) Descriptor->Address32.Minimum, + (UINT64) Descriptor->Address32.Maximum, + (UINT64) Descriptor->Address32.AddressLength, + (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -801,10 +801,10 @@ RsDoDwordSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address32.Minimum, - Descriptor->Address32.Maximum, - Descriptor->Address32.AddressLength, - Descriptor->Address32.Granularity, + (UINT64) Descriptor->Address32.Minimum, + (UINT64) Descriptor->Address32.Maximum, + (UINT64) Descriptor->Address32.AddressLength, + (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp); Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2e.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2e.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2e.c Thu Sep 16 20:08:00 2010 (r212761) @@ -116,7 +116,6 @@ #include -#include "aslcompiler.y.h" #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslrestype2e") Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2w.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2w.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2w.c Thu Sep 16 20:08:00 2010 (r212761) @@ -338,10 +338,10 @@ RsDoWordIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address16.Minimum, - Descriptor->Address16.Maximum, - Descriptor->Address16.AddressLength, - Descriptor->Address16.Granularity, + (UINT64) Descriptor->Address16.Minimum, + (UINT64) Descriptor->Address16.Maximum, + (UINT64) Descriptor->Address16.AddressLength, + (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -544,10 +544,10 @@ RsDoWordBusNumberDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address16.Minimum, - Descriptor->Address16.Maximum, - Descriptor->Address16.AddressLength, - Descriptor->Address16.Granularity, + (UINT64) Descriptor->Address16.Minimum, + (UINT64) Descriptor->Address16.Maximum, + (UINT64) Descriptor->Address16.AddressLength, + (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, MinOp, MaxOp, LengthOp, GranOp); @@ -761,10 +761,10 @@ RsDoWordSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( - Descriptor->Address16.Minimum, - Descriptor->Address16.Maximum, - Descriptor->Address16.AddressLength, - Descriptor->Address16.Granularity, + (UINT64) Descriptor->Address16.Minimum, + (UINT64) Descriptor->Address16.Maximum, + (UINT64) Descriptor->Address16.AddressLength, + (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, MinOp, MaxOp, LengthOp, GranOp); Modified: head/sys/contrib/dev/acpica/compiler/aslstartup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Sep 16 20:08:00 2010 (r212761) @@ -124,9 +124,8 @@ #define ASL_MAX_FILES 256 -char *FileList[ASL_MAX_FILES]; -int FileCount; -BOOLEAN AslToFile = TRUE; +static char *FileList[ASL_MAX_FILES]; +static BOOLEAN AslToFile = TRUE; /* Local prototypes */ @@ -136,7 +135,7 @@ AsDoWildcard ( char *DirectoryPathname, char *FileSpecifier); -UINT8 +static UINT8 AslDetectSourceFileType ( ASL_FILE_INFO *Info); @@ -210,6 +209,7 @@ AsDoWildcard ( #ifdef WIN32 void *DirInfo; char *Filename; + int FileCount; FileCount = 0; @@ -277,7 +277,7 @@ AsDoWildcard ( * ******************************************************************************/ -UINT8 +static UINT8 AslDetectSourceFileType ( ASL_FILE_INFO *Info) { @@ -397,7 +397,7 @@ AslDoOneFile ( /* Shutdown compiler and ACPICA subsystem */ AeClearErrorLog (); - AcpiTerminate (); + (void) AcpiTerminate (); /* * Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the @@ -487,7 +487,7 @@ AslDoOneFile ( } Status = CmDoCompile (); - AcpiTerminate (); + (void) AcpiTerminate (); /* * Return non-zero exit code if there have been errors, unless the @@ -533,7 +533,7 @@ AslDoOnePathname ( ASL_PATHNAME_CALLBACK PathCallback) { ACPI_STATUS Status = AE_OK; - char **FileList; + char **WildcardList; char *Filename; char *FullPathname; @@ -548,16 +548,16 @@ AslDoOnePathname ( /* Expand possible wildcard into a file list (Windows/DOS only) */ - FileList = AsDoWildcard (Gbl_DirectoryPath, Filename); - while (*FileList) + WildcardList = AsDoWildcard (Gbl_DirectoryPath, Filename); + while (*WildcardList) { FullPathname = ACPI_ALLOCATE ( - strlen (Gbl_DirectoryPath) + strlen (*FileList) + 1); + strlen (Gbl_DirectoryPath) + strlen (*WildcardList) + 1); /* Construct a full path to the file */ strcpy (FullPathname, Gbl_DirectoryPath); - strcat (FullPathname, *FileList); + strcat (FullPathname, *WildcardList); /* * If -p not specified, we will use the input filename as the @@ -573,9 +573,9 @@ AslDoOnePathname ( Status |= (*PathCallback) (FullPathname); ACPI_FREE (FullPathname); - ACPI_FREE (*FileList); - *FileList = NULL; - FileList++; + ACPI_FREE (*WildcardList); + *WildcardList = NULL; + WildcardList++; } ACPI_FREE (Gbl_DirectoryPath); Modified: head/sys/contrib/dev/acpica/compiler/dtcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtcompile.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/dtcompile.c Thu Sep 16 20:08:00 2010 (r212761) @@ -127,7 +127,7 @@ static char VersionStrin /* Local prototypes */ -static void +static ACPI_STATUS DtInitialize ( void); @@ -166,7 +166,12 @@ DtDoCompile ( /* Initialize globals */ - DtInitialize (); + Status = DtInitialize (); + if (ACPI_FAILURE (Status)) + { + printf ("Error during compiler initialization, 0x%X\n", Status); + return (Status); + } /* * Scan the input file (file is already open) and @@ -236,26 +241,38 @@ CleanupAndExit: * * PARAMETERS: None * - * RETURN: None + * RETURN: Status * * DESCRIPTION: Initialize data table compiler globals. Enables multiple * compiles per invocation. * *****************************************************************************/ -static void +static ACPI_STATUS DtInitialize ( void) { + ACPI_STATUS Status; - AcpiOsInitialize (); - AcpiUtInitGlobals (); + + Status = AcpiOsInitialize (); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + Status = AcpiUtInitGlobals (); + if (ACPI_FAILURE (Status)) + { + return (Status); + } Gbl_FieldList = NULL; Gbl_RootTable = NULL; Gbl_SubtableStack = NULL; sprintf (VersionString, "%X", (UINT32) ACPI_CA_VERSION); + return (AE_OK); } Modified: head/sys/contrib/dev/acpica/compiler/dtio.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtio.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/compiler/dtio.c Thu Sep 16 20:08:00 2010 (r212761) @@ -158,7 +158,7 @@ DtWriteBinary ( #define DT_SLASH_SLASH_COMMENT 4 #define DT_END_COMMENT 5 -UINT32 Gbl_NextLineOffset; +static UINT32 Gbl_NextLineOffset; /****************************************************************************** Modified: head/sys/contrib/dev/acpica/debugger/dbexec.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbexec.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/debugger/dbexec.c Thu Sep 16 20:08:00 2010 (r212761) @@ -567,14 +567,12 @@ AcpiDbMethodThread ( if (Info->InitArgs) { AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr); - AcpiDbUInt32ToHexString (ACPI_TO_INTEGER (AcpiOsGetThreadId ()), - Info->IdOfThreadStr); + AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr); } if (Info->Threads && (Info->NumCreated < Info->NumThreads)) { - Info->Threads[Info->NumCreated++] = - ACPI_TO_INTEGER (AcpiOsGetThreadId()); + Info->Threads[Info->NumCreated++] = AcpiOsGetThreadId(); } LocalInfo = *Info; @@ -722,8 +720,8 @@ AcpiDbCreateExecutionThreads ( /* Array to store IDs of threads */ AcpiGbl_DbMethodInfo.NumThreads = NumThreads; - Size = 4 * AcpiGbl_DbMethodInfo.NumThreads; - AcpiGbl_DbMethodInfo.Threads = (UINT32 *) AcpiOsAllocate (Size); + Size = sizeof (ACPI_THREAD_ID) * AcpiGbl_DbMethodInfo.NumThreads; + AcpiGbl_DbMethodInfo.Threads = AcpiOsAllocate (Size); if (AcpiGbl_DbMethodInfo.Threads == NULL) { AcpiOsPrintf ("No memory for thread IDs array\n"); Modified: head/sys/contrib/dev/acpica/events/evrgnini.c ============================================================================== --- head/sys/contrib/dev/acpica/events/evrgnini.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/events/evrgnini.c Thu Sep 16 20:08:00 2010 (r212761) @@ -395,8 +395,8 @@ AcpiEvPciConfigRegionSetup ( } /* - * Get the PCI device and function numbers from the _ADR object contained - * in the parent's scope. + * Get the PCI device and function numbers from the _ADR object + * contained in the parent's scope. */ Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, PciDeviceNode, &PciValue); @@ -429,9 +429,14 @@ AcpiEvPciConfigRegionSetup ( PciId->Bus = ACPI_LOWORD (PciValue); } - /* Complete this device's PciId */ + /* Complete/update the PCI ID for this device */ - AcpiOsDerivePciId (PciRootNode, RegionObj->Region.Node, &PciId); + Status = AcpiHwDerivePciId (PciId, PciRootNode, RegionObj->Region.Node); + if (ACPI_FAILURE (Status)) + { + ACPI_FREE (PciId); + return_ACPI_STATUS (Status); + } *RegionContext = PciId; return_ACPI_STATUS (AE_OK); Modified: head/sys/contrib/dev/acpica/executer/exmutex.c ============================================================================== --- head/sys/contrib/dev/acpica/executer/exmutex.c Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/executer/exmutex.c Thu Sep 16 20:08:00 2010 (r212761) @@ -513,10 +513,10 @@ AcpiExReleaseMutex ( (ObjDesc != AcpiGbl_GlobalLockMutex)) { ACPI_ERROR ((AE_INFO, - "Thread %p cannot release Mutex [%4.4s] acquired by thread %p", - ACPI_CAST_PTR (void, WalkState->Thread->ThreadId), + "Thread %u cannot release Mutex [%4.4s] acquired by thread %u", + (UINT32) WalkState->Thread->ThreadId, AcpiUtGetNodeName (ObjDesc->Mutex.Node), - ACPI_CAST_PTR (void, OwnerThread->ThreadId))); + (UINT32) OwnerThread->ThreadId)); return_ACPI_STATUS (AE_AML_NOT_OWNER); } Copied and modified: head/sys/contrib/dev/acpica/hardware/hwpci.c (from r212760, vendor-sys/acpica/dist/hardware/hwpci.c) ============================================================================== --- vendor-sys/acpica/dist/hardware/hwpci.c Thu Sep 16 19:43:32 2010 (r212760, copy source) +++ head/sys/contrib/dev/acpica/hardware/hwpci.c Thu Sep 16 20:08:00 2010 (r212761) @@ -115,8 +115,8 @@ #define __HWPCI_C__ -#include "acpi.h" -#include "accommon.h" +#include +#include #define _COMPONENT ACPI_NAMESPACE Modified: head/sys/contrib/dev/acpica/include/acglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acglobal.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/acglobal.h Thu Sep 16 20:08:00 2010 (r212761) @@ -214,6 +214,7 @@ ACPI_TABLE_FADT AcpiGbl_FADT UINT32 AcpiCurrentGpeCount; UINT32 AcpiGbl_TraceFlags; ACPI_NAME AcpiGbl_TraceMethodName; +BOOLEAN AcpiGbl_SystemAwakeAndRunning; #endif @@ -334,7 +335,6 @@ ACPI_EXTERN UINT8 ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall; ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent; ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized; -ACPI_EXTERN BOOLEAN AcpiGbl_SystemAwakeAndRunning; ACPI_EXTERN UINT8 AcpiGbl_OsiData; ACPI_EXTERN ACPI_INTERFACE_INFO *AcpiGbl_SupportedInterfaces; Modified: head/sys/contrib/dev/acpica/include/achware.h ============================================================================== --- head/sys/contrib/dev/acpica/include/achware.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/achware.h Thu Sep 16 20:08:00 2010 (r212761) @@ -251,6 +251,16 @@ AcpiHwEnableRuntimeGpeBlock ( /* + * hwpci - PCI configuration support + */ +ACPI_STATUS +AcpiHwDerivePciId ( + ACPI_PCI_ID *PciId, + ACPI_HANDLE RootPciDevice, + ACPI_HANDLE PciRegion); + + +/* * hwtimer - ACPI Timer prototypes */ ACPI_STATUS Modified: head/sys/contrib/dev/acpica/include/aclocal.h ============================================================================== --- head/sys/contrib/dev/acpica/include/aclocal.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/aclocal.h Thu Sep 16 20:08:00 2010 (r212761) @@ -1270,7 +1270,7 @@ typedef struct acpi_db_method_info ACPI_HANDLE MainThreadGate; ACPI_HANDLE ThreadCompleteGate; ACPI_HANDLE InfoGate; - UINT32 *Threads; + ACPI_THREAD_ID *Threads; UINT32 NumThreads; UINT32 NumCreated; UINT32 NumCompleted; Modified: head/sys/contrib/dev/acpica/include/acmacros.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acmacros.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/acmacros.h Thu Sep 16 20:08:00 2010 (r212761) @@ -400,8 +400,8 @@ * the plist contains a set of parens to allow variable-length lists. * These macros are used for both the debug and non-debug versions of the code. */ -#define ACPI_ERROR_NAMESPACE(s, e) AcpiNsReportError (AE_INFO, s, e); -#define ACPI_ERROR_METHOD(s, n, p, e) AcpiNsReportMethodError (AE_INFO, s, n, p, e); +#define ACPI_ERROR_NAMESPACE(s, e) AcpiUtNamespaceError (AE_INFO, s, e); +#define ACPI_ERROR_METHOD(s, n, p, e) AcpiUtMethodError (AE_INFO, s, n, p, e); #define ACPI_WARN_PREDEFINED(plist) AcpiUtPredefinedWarning plist #define ACPI_INFO_PREDEFINED(plist) AcpiUtPredefinedInfo plist Modified: head/sys/contrib/dev/acpica/include/acnamesp.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acnamesp.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/acnamesp.h Thu Sep 16 20:08:00 2010 (r212761) @@ -514,22 +514,6 @@ AcpiNsLocal ( ACPI_OBJECT_TYPE Type); void -AcpiNsReportError ( - const char *ModuleName, - UINT32 LineNumber, - const char *InternalName, - ACPI_STATUS LookupStatus); - -void -AcpiNsReportMethodError ( - const char *ModuleName, - UINT32 LineNumber, - const char *Message, - ACPI_NAMESPACE_NODE *Node, - const char *Path, - ACPI_STATUS LookupStatus); - -void AcpiNsPrintNodePathname ( ACPI_NAMESPACE_NODE *Node, const char *Msg); Modified: head/sys/contrib/dev/acpica/include/acpiosxf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpiosxf.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/acpiosxf.h Thu Sep 16 20:08:00 2010 (r212761) @@ -406,16 +406,6 @@ AcpiOsWritePciConfiguration ( /* - * Interim function needed for PCI IRQ routing - */ -void -AcpiOsDerivePciId( - ACPI_HANDLE Device, - ACPI_HANDLE Region, - ACPI_PCI_ID **PciId); - - -/* * Miscellaneous */ BOOLEAN Modified: head/sys/contrib/dev/acpica/include/acpixf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpixf.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/acpixf.h Thu Sep 16 20:08:00 2010 (r212761) @@ -120,7 +120,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20100806 +#define ACPI_CA_VERSION 0x20100915 #include #include @@ -130,6 +130,7 @@ */ extern UINT32 AcpiCurrentGpeCount; extern ACPI_TABLE_FADT AcpiGbl_FADT; +extern BOOLEAN AcpiGbl_SystemAwakeAndRunning; /* Runtime configuration of debug print levels */ Modified: head/sys/contrib/dev/acpica/include/actypes.h ============================================================================== --- head/sys/contrib/dev/acpica/include/actypes.h Thu Sep 16 19:43:32 2010 (r212760) +++ head/sys/contrib/dev/acpica/include/actypes.h Thu Sep 16 20:08:00 2010 (r212761) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 20:10:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 610201065670; Thu, 16 Sep 2010 20:10:54 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1E38FC0A; Thu, 16 Sep 2010 20:10:53 +0000 (UTC) Received: by iwn34 with SMTP id 34so1532987iwn.13 for ; Thu, 16 Sep 2010 13:10:53 -0700 (PDT) Received: by 10.231.30.68 with SMTP id t4mr3782981ibc.129.1284667853281; Thu, 16 Sep 2010 13:10:53 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.231.20.3 with HTTP; Thu, 16 Sep 2010 13:10:33 -0700 (PDT) In-Reply-To: <20100916212043.N724@delplex.bde.org> References: <201009091927.o89JReXm022426@svn.freebsd.org> <20100916084442.GB21622@dragon.NUXI.org> <20100916212043.N724@delplex.bde.org> From: Juli Mallett Date: Thu, 16 Sep 2010 13:10:33 -0700 X-Google-Sender-Auth: UUzjeBZF4ot2haCGvwoLT9XjlMQ Message-ID: To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David O'Brien Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 20:10:54 -0000 On Thu, Sep 16, 2010 at 04:36, Bruce Evans wrote: > WHat about the lesser burder on a character or two for putting -- in the > synopsis where it is more visible: > > =A0 =A0 =A0 =A0printf [--] format [arguments ...] Right, that's what I've been thinking about. For that matter, does printf(1) need to use getopt(3) at all? It seems like simply checking for "--" could be sufficient. Does POSIX require that it exit with an error if it's given any options? At the very least, it seems like it would be more productive to have printf(1) give unusually-helpful error messages (perhaps merely changing its usage output to match that synopsis) if it encounters a string beginning with '-' other than "--". From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 20:11:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1863A106564A; Thu, 16 Sep 2010 20:11:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08B5E8FC19; Thu, 16 Sep 2010 20:11:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GKBe4d005698; Thu, 16 Sep 2010 20:11:40 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GKBecH005696; Thu, 16 Sep 2010 20:11:40 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009162011.o8GKBecH005696@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 16 Sep 2010 20:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212762 - head/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 20:11:41 -0000 Author: jkim Date: Thu Sep 16 20:11:40 2010 New Revision: 212762 URL: http://svn.freebsd.org/changeset/base/212762 Log: Remove an unnecessary hack from ACPICA 20100915 (r212761). Modified: head/sys/dev/acpi_support/acpi_wmi.c Modified: head/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- head/sys/dev/acpi_support/acpi_wmi.c Thu Sep 16 20:08:00 2010 (r212761) +++ head/sys/dev/acpi_support/acpi_wmi.c Thu Sep 16 20:11:40 2010 (r212762) @@ -202,7 +202,7 @@ static devclass_t acpi_wmi_devclass; DRIVER_MODULE(acpi_wmi, acpi, acpi_wmi_driver, acpi_wmi_devclass, 0, 0); MODULE_VERSION(acpi_wmi, 1); MODULE_DEPEND(acpi_wmi, acpi, 1, 1, 1); -static char *wmi_ids[] = {"PNP0C14", "PNP0c14", NULL}; +static char *wmi_ids[] = {"PNP0C14", NULL}; /* * Probe for the PNP0C14 ACPI node From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 20:23:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BC5D106566C; Thu, 16 Sep 2010 20:23:23 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49F088FC13; Thu, 16 Sep 2010 20:23:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GKNNDv006045; Thu, 16 Sep 2010 20:23:23 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GKNN3s006039; Thu, 16 Sep 2010 20:23:23 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009162023.o8GKNN3s006039@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 16 Sep 2010 20:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212763 - in head/sys/mips/rmi: . dev/sec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 20:23:23 -0000 Author: jchandra Date: Thu Sep 16 20:23:22 2010 New Revision: 212763 URL: http://svn.freebsd.org/changeset/base/212763 Log: RMI security accelerator driver update. - Compile fixes for 9.0, the previous version of this driver was for FreeBSD 6. - Add virtual address field in OperationDescriptor_t, we cannot use MIPS_PHYS_TO_KSEG0 on physical address. - Fixes for new message ring API - Remove unused sys/mips/rmi/dev/sec/stats.h - Whitespace fixes Deleted: head/sys/mips/rmi/dev/sec/stats.h Modified: head/sys/mips/rmi/dev/sec/desc.h head/sys/mips/rmi/dev/sec/rmilib.c head/sys/mips/rmi/dev/sec/rmilib.h head/sys/mips/rmi/dev/sec/rmisec.c head/sys/mips/rmi/iodi.c Modified: head/sys/mips/rmi/dev/sec/desc.h ============================================================================== --- head/sys/mips/rmi/dev/sec/desc.h Thu Sep 16 20:11:40 2010 (r212762) +++ head/sys/mips/rmi/dev/sec/desc.h Thu Sep 16 20:23:22 2010 (r212763) @@ -26,6 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ * RMI_BSD */ #ifndef _DESC_H_ #define _DESC_H_ @@ -2320,7 +2321,7 @@ typedef struct OperationDescriptor_s { uint32_t flags; uint32_t cpu; uint32_t seq_num; - uint64_t reserved; + uint64_t vaddr; } OperationDescriptor_t, *OperationDescriptor_pt; Modified: head/sys/mips/rmi/dev/sec/rmilib.c ============================================================================== --- head/sys/mips/rmi/dev/sec/rmilib.c Thu Sep 16 20:11:40 2010 (r212762) +++ head/sys/mips/rmi/dev/sec/rmilib.c Thu Sep 16 20:23:22 2010 (r212763) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -49,20 +48,19 @@ __FBSDID("$FreeBSD$"); #include - -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include -// static int msgrng_stnid_pk0 = MSGRNG_STNID_PK0; +/* static int msgrng_stnid_pk0 = MSGRNG_STNID_PK0; */ -/*#define RMI_SEC_DEBUG */ +/* #define RMI_SEC_DEBUG */ #define SMP_CACHE_BYTES XLR_CACHELINE_SIZE #define NUM_CHUNKS(size, bits) ( ((size)>>(bits)) + (((size)&((1<<(bits))-1))?1:0) ) @@ -72,86 +70,44 @@ symkey_desc_pt g_desc; struct xlr_sec_command *g_cmd; #ifdef XLR_SEC_CMD_DEBUG -static void - decode_symkey_desc(symkey_desc_pt desc, uint32_t cfg_vector); - +static void decode_symkey_desc(symkey_desc_pt desc, uint32_t cfg_vector); #endif -void print_buf(char *desc, void *data, int len); - -static int - xlr_sec_cipher_hash_command(xlr_sec_io_pt op, symkey_desc_pt desc, uint8_t); - -static xlr_sec_error_t -xlr_sec_setup_descriptor(xlr_sec_io_pt op, - unsigned int flags, - symkey_desc_pt desc, - uint32_t * cfg_vector); - -static -xlr_sec_error_t -xlr_sec_setup_packet(xlr_sec_io_pt op, - symkey_desc_pt desc, - unsigned int flags, - uint64_t * data, - PacketDescriptor_pt pkt_desc, - ControlDescriptor_pt ctl_desc, - uint32_t vector, - PacketDescriptor_pt next_pkt_desc, +static int xlr_sec_cipher_hash_command(xlr_sec_io_pt op, symkey_desc_pt desc, + uint8_t); +static xlr_sec_error_t xlr_sec_setup_descriptor(xlr_sec_io_pt op, + unsigned int flags, symkey_desc_pt desc, uint32_t * cfg_vector); + +static xlr_sec_error_t xlr_sec_setup_packet(xlr_sec_io_pt op, + symkey_desc_pt desc, unsigned int flags, uint64_t * data, + PacketDescriptor_pt pkt_desc, ControlDescriptor_pt ctl_desc, + uint32_t vector, PacketDescriptor_pt next_pkt_desc, uint8_t multi_frag_flag); - -static int - xlr_sec_submit_message(symkey_desc_pt desc, uint32_t cfg_vector); - -static -xlr_sec_error_t -xlr_sec_setup_cipher(xlr_sec_io_pt op, - ControlDescriptor_pt ctl_desc, - uint32_t * vector); - -static -xlr_sec_error_t -xlr_sec_setup_digest(xlr_sec_io_pt op, - ControlDescriptor_pt ctl_desc, - uint32_t * vector); - -static -xlr_sec_error_t -xlr_sec_setup_cksum(xlr_sec_io_pt op, +static int xlr_sec_submit_message(symkey_desc_pt desc, uint32_t cfg_vector); +static xlr_sec_error_t xlr_sec_setup_cipher(xlr_sec_io_pt op, + ControlDescriptor_pt ctl_desc, uint32_t * vector); +static xlr_sec_error_t xlr_sec_setup_digest(xlr_sec_io_pt op, + ControlDescriptor_pt ctl_desc, uint32_t * vector); +static xlr_sec_error_t xlr_sec_setup_cksum(xlr_sec_io_pt op, ControlDescriptor_pt ctl_desc); +static xlr_sec_error_t xlr_sec_control_setup(xlr_sec_io_pt op, + unsigned int flags, uint64_t * control, ControlDescriptor_pt ctl_desc, + xlr_sec_drv_user_t * user, uint32_t vector); +static void xlr_sec_free_desc(symkey_desc_pt desc); -static -xlr_sec_error_t -xlr_sec_control_setup(xlr_sec_io_pt op, - unsigned int flags, - uint64_t * control, - ControlDescriptor_pt ctl_desc, - xlr_sec_drv_user_t * user, - uint32_t vector); - - -xlr_sec_error_t -xlr_sec_submit_op(symkey_desc_pt desc); - -static void xlr_sec_free_desc(symkey_desc_pt desc); - -void -xlr_sec_msgring_handler(int bucket, int size, int code, int stid, +void print_buf(char *desc, void *data, int len); +xlr_sec_error_t xlr_sec_submit_op(symkey_desc_pt desc); +void xlr_sec_msgring_handler(int bucket, int size, int code, int stid, struct msgrng_msg *msg, void *data); - void xlr_sec_init(struct xlr_sec_softc *sc) { unsigned int i; xlr_reg_t *mmio; - mmio = sc->mmio = xlr_io_mmio(XLR_IO_SECURITY_OFFSET); - xlr_write_reg(mmio, SEC_DMA_CREDIT, SEC_DMA_CREDIT_CONFIG); - - xlr_write_reg(mmio, SEC_CONFIG2, SEC_CFG2_ROUND_ROBIN_ON); for (i = 0; i < 8; i++) @@ -168,7 +124,6 @@ xlr_sec_init(struct xlr_sec_softc *sc) xls_cc_table_sec.counters[i >> 3][i & 0x07] : cc_table_sec.counters[i >> 3][i & 0x07]); - /* * Register a bucket handler with the phoenix messaging subsystem * For now, register handler for bucket 0->5 in msg stn 0 @@ -179,30 +134,23 @@ xlr_sec_init(struct xlr_sec_softc *sc) return; } - - int xlr_sec_setup(struct xlr_sec_session *ses, struct xlr_sec_command *cmd, - symkey_desc_pt desc -) + symkey_desc_pt desc) { xlr_sec_io_pt op; int size, ret_val; int iv_len; - desc->ses = ses; op = &cmd->op; if (op == NULL) return (-ENOMEM); - - desc->ctl_desc.instruction = 0; memset(&desc->ctl_desc.cipherHashInfo, 0, sizeof(CipherHashInfo_t)); desc->control = 0; - desc->pkt_desc[0].srcLengthIVOffUseIVNext = 0; desc->pkt_desc[0].dstDataSettings = 0; desc->pkt_desc[0].authDstNonceLow = 0; @@ -211,12 +159,10 @@ xlr_sec_setup(struct xlr_sec_session *se desc->pkt_desc[1].dstDataSettings = 0; desc->pkt_desc[1].authDstNonceLow = 0; desc->pkt_desc[1].ckSumDstNonceHiCFBMaskLLWMask = 0; - desc->data = 0; desc->ctl_result = 0; desc->data_result = 0; - if (op->flags & XLR_SEC_FLAGS_HIGH_PRIORITY) if (!xlr_is_xls()) desc->op_ctl.stn_id++; @@ -225,7 +171,6 @@ xlr_sec_setup(struct xlr_sec_session *se desc->user.user_dest = (uint8_t *) (unsigned long)op->dest_buf; desc->user.user_auth = (uint8_t *) (unsigned long)op->auth_dest; - if ((op->cipher_type == XLR_SEC_CIPHER_TYPE_ARC4) && (!op->rc4_state && (op->rc4_loadstate || op->rc4_savestate))) { printf(" ** Load/Save State and no State **"); @@ -234,7 +179,6 @@ xlr_sec_setup(struct xlr_sec_session *se } desc->user.user_state = (uint8_t *) (unsigned long)op->rc4_state; - switch (op->cipher_type) { case XLR_SEC_CIPHER_TYPE_NONE: iv_len = 0; @@ -260,10 +204,6 @@ xlr_sec_setup(struct xlr_sec_session *se xlr_sec_free_desc(desc); return (-EINVAL); } - - - - size = op->source_buf_size + iv_len; /* @@ -276,7 +216,8 @@ xlr_sec_setup(struct xlr_sec_session *se if (op->cipher_type == XLR_SEC_CIPHER_TYPE_NONE) { if (op->source_buf_size != 0) { - memcpy(desc->user.aligned_src, (uint8_t *) (unsigned long)op->source_buf, + memcpy(desc->user.aligned_src, + (uint8_t *)(uintptr_t)op->source_buf, op->source_buf_size); } } else { @@ -306,12 +247,9 @@ xlr_sec_setup(struct xlr_sec_session *se } } - - /* Set source to new kernel space */ op->source_buf = (uint64_t) (unsigned long)desc->user.aligned_src; - /* * Build new dest buffer, for Cipher output only */ @@ -324,7 +262,6 @@ xlr_sec_setup(struct xlr_sec_session *se } else { /* DEBUG -dpk */ XLR_SEC_CMD_DIAG("dest_buf_size = %d \n", op->dest_buf_size); - size = op->dest_buf_size + iv_len; /* @@ -335,11 +272,9 @@ xlr_sec_setup(struct xlr_sec_session *se op->cipher_mode == XLR_SEC_CIPHER_MODE_CTR) size += XLR_SEC_AES_BLOCK_SIZE - 1; op->dest_buf = (uint64_t) (unsigned long)desc->user.aligned_dest; - } ret_val = xlr_sec_cipher_hash_command(op, desc, ses->multi_frag_flag); - return (ret_val); } @@ -396,7 +331,6 @@ xlr_sec_cipher_hash_command(xlr_sec_io_p return err; } - static xlr_sec_error_t xlr_sec_setup_descriptor(xlr_sec_io_pt op, unsigned int flags, @@ -407,7 +341,6 @@ xlr_sec_setup_descriptor(xlr_sec_io_pt o XLR_SEC_CMD_DIAG("xlr_sec_setup_descriptor: ENTER\n"); - if ((err = xlr_sec_setup_cipher(op, &desc->ctl_desc, cfg_vector)) != XLR_SEC_ERR_NONE) { XLR_SEC_CMD_DIAG("xlr_sec_setup_descriptor: xlr_sec_setup_cipher done err %d\n", (int)err); @@ -483,7 +416,7 @@ xlr_sec_setup_packet(xlr_sec_io_pt op, len = op->source_buf_size + byte_offset - global_offset; if (multi_frag_flag) { - next_seg_addr = (uint64_t) vtophys((void *)(unsigned long)(desc->next_src_buf)); + next_seg_addr = (uint64_t)vtophys((void *)(uintptr_t)desc->next_src_buf); next_seg_addr = (next_seg_addr & ~(SMP_CACHE_BYTES - 1)); next_len = desc->next_src_len; } @@ -505,14 +438,12 @@ xlr_sec_setup_packet(xlr_sec_io_pt op, */ cipher_offset_dwords = (op->iv_offset + byte_offset) >> 3; - if (op->cipher_mode == XLR_SEC_CIPHER_MODE_F8 || op->cipher_mode == XLR_SEC_CIPHER_MODE_CTR) { if (multi_frag_flag) { int nlhmac = ((op->source_buf_size + global_offset + 7 - op->cipher_offset) >> 3) & 1; pkt_desc->srcLengthIVOffUseIVNext = - FIELD_VALUE(PKT_DSC_HASHBYTES, len & 7) | FIELD_VALUE(PKT_DSC_IVOFF, cipher_offset_dwords) | FIELD_VALUE(PKT_DSC_PKTLEN, nlhmac + ((len + 7) >> 3)) | @@ -539,7 +470,6 @@ xlr_sec_setup_packet(xlr_sec_io_pt op, } else { if (multi_frag_flag) { pkt_desc->srcLengthIVOffUseIVNext = - FIELD_VALUE(PKT_DSC_HASHBYTES, len & 7) | FIELD_VALUE(PKT_DSC_IVOFF, cipher_offset_dwords) | FIELD_VALUE(PKT_DSC_PKTLEN, (len + 7) >> 3) | @@ -890,7 +820,6 @@ xlr_sec_setup_packet(xlr_sec_io_pt op, CLEAR_SET_FIELD(next_pkt_desc->ckSumDstNonceHiCFBMaskLLWMask, PKT_DSC_CKSUM_DST_ADDR, (uint64_t) vtophys((void *)(unsigned long)desc->next_cksum_dest)); - } } /* @@ -902,17 +831,13 @@ xlr_sec_setup_packet(xlr_sec_io_pt op, XLR_SEC_CMD_DIAG(" xlr_sec_setup_packet(): pkt_desc=%p phys_pkt_desc=%llx \n", pkt_desc, (unsigned long long)vtophys(pkt_desc)); - - CLEAR_SET_FIELD(*data, MSG_CMD_DATA_ADDR, ((uint64_t) vtophys(pkt_desc))); CLEAR_SET_FIELD(*data, MSG_CMD_DATA_CTL, SEC_EOP); CLEAR_SET_FIELD(*data, MSG_CMD_DATA_LEN, MSG_CMD_DATA_LEN_LOAD); - XLR_SEC_CMD_DIAG("xlr_sec_setup_packet: DONE\n"); #ifdef RMI_SEC_DEBUG - { printf("data desc\n"); printf("srcLengthIVOffUseIVNext = 0x%llx\n", pkt_desc->srcLengthIVOffUseIVNext); @@ -1036,9 +961,7 @@ xlr_sec_submit_message(symkey_desc_pt de int ret_val = 0; XLR_SEC_CMD_DIAG("xlr_sec_submit_message: ENTER\n"); - err = XLR_SEC_ERR_NONE; - XLR_SEC_CMD_DIAG_SYM_DESC(desc, cfg_vector); do { @@ -1206,7 +1129,6 @@ xlr_sec_setup_cipher(xlr_sec_io_pt op, return XLR_SEC_ERR_NONE; } - static xlr_sec_error_t xlr_sec_setup_digest(xlr_sec_io_pt op, @@ -1304,7 +1226,6 @@ xlr_sec_setup_digest(xlr_sec_io_pt op, *vector |= digest_vector; XLR_SEC_CMD_DIAG("xlr_sec_setup_digest: EXIT vector = %04x\n", *vector); - return XLR_SEC_ERR_NONE; } @@ -1350,7 +1271,6 @@ xlr_sec_control_setup(xlr_sec_io_pt op, XLR_SEC_CMD_DIAG(" ENTER vector = %04x\n", vector); #endif - switch (vector) { case XLR_SEC_VECTOR_MAC: XLR_SEC_CMD_DIAG(" XLR_SEC_VECTOR_MAC \n"); @@ -1970,7 +1890,6 @@ xlr_sec_control_setup(xlr_sec_io_pt op, return XLR_SEC_ERR_NONE; } - xlr_sec_error_t xlr_sec_submit_op(symkey_desc_pt desc) { @@ -2013,31 +1932,18 @@ xlr_sec_submit_op(symkey_desc_pt desc) XLR_SEC_CMD_DIAG("[%s]: IN_IRQ=%d msg0=0x%llx msg1=0x%llx \n", __FUNCTION__, desc->op_ctl.flags, send_msg.msg0, send_msg.msg1); - - retries = 100; - while (retries--) { - msgrng_flags_save(msgrng_flags); - - code = message_send_retry(SEC_MSGRING_WORDSIZE, - MSGRNG_CODE_SEC, - desc->op_ctl.stn_id, - &send_msg); - - - msgrng_flags_restore(msgrng_flags); - + msgrng_flags = msgrng_access_enable(); + code = message_send(SEC_MSGRING_WORDSIZE, MSGRNG_CODE_SEC, + desc->op_ctl.stn_id, &send_msg); + msgrng_restore(msgrng_flags); if (code == 0) break; } - - return (XLR_SEC_ERR_NONE); } - - symkey_desc_pt xlr_sec_allocate_desc(void *session_ptr) { @@ -2090,7 +1996,6 @@ xlr_sec_allocate_desc(void *session_ptr) new->user.kern_auth = new->user.user_auth = NULL; new->user.aligned_auth = new->user.user_auth = NULL; - /* find cacheline alignment */ aligned = new; addr = (uint64_t) vtophys(new); @@ -2101,6 +2006,7 @@ xlr_sec_allocate_desc(void *session_ptr) /* setup common control info */ aligned->op_ctl.phys_self = addr; aligned->op_ctl.stn_id = MSGRNG_STNID_SEC0; + aligned->op_ctl.vaddr = (uintptr_t)aligned; return (aligned); } @@ -2114,8 +2020,6 @@ xlr_sec_free_desc(symkey_desc_pt desc) return; } contigfree(desc, sizeof(symkey_desc_t), M_DEVBUF); - - return; } @@ -2816,7 +2720,7 @@ decode_symkey_desc(symkey_desc_pt desc, break; } DPRINT("PACKET DESCRIPTOR: \n"); - word = desc->pkt_desc.srcLengthIVOffUseIVNext; + word = 0; //desc->pkt_desc.srcLengthIVOffUseIVNext; DPRINT("\tSrcLengthIVOffsetIVNext: %llx\n", word); DPRINT("\t\tLoad HMAC = %lld \n", GET_FIELD(word, PKT_DSC_LOADHMACKEY)); @@ -2841,7 +2745,7 @@ decode_symkey_desc(symkey_desc_pt desc, DPRINT("\t\tGlobal Src Offset = %lld \n", GET_FIELD(word, PKT_DSC_SEGOFFSET)); - word = desc->pkt_desc.dstDataSettings; + word = 0; //desc->pkt_desc.dstDataSettings; DPRINT("\tdstDataSettings: %llx \n", word); DPRINT("\t\tArc4 Byte Count = %lld \n", GET_FIELD(word, PKT_DSC_ARC4BYTECOUNT)); @@ -2859,7 +2763,7 @@ decode_symkey_desc(symkey_desc_pt desc, PKT_DSC_CPHR_DST_DWOFFSET)); DPRINT("\t\tCipher Dest Offset= %lld \n", GET_FIELD(word, PKT_DSC_CPHR_DST_OFFSET)); - word = desc->pkt_desc.authDstNonceLow; + word = 0; //desc->pkt_desc.authDstNonceLow; DPRINT("\tauthDstNonceLow: %llx \n", word); DPRINT("\t\tNonce Low 24 = %lld \n", GET_FIELD(word, PKT_DSC_NONCE_LOW)); @@ -2867,7 +2771,7 @@ decode_symkey_desc(symkey_desc_pt desc, PKT_DSC_AUTH_DST_ADDR)); DPRINT("\t\tCipher Offset High= %lld \n", GET_FIELD(word, PKT_DSC_CIPH_OFF_HI)); - word = desc->pkt_desc.ckSumDstNonceHiCFBMaskLLWMask; + word = 0; //desc->pkt_desc.ckSumDstNonceHiCFBMaskLLWMask; DPRINT("\tckSumDstNonceHiCFBMaskLLWMask: %llx \n", word); DPRINT("\t\tHash Byte off = %lld \n", GET_FIELD(word, PKT_DSC_HASH_BYTE_OFF)); DPRINT("\t\tPacket Len bytes = %lld \n", GET_FIELD(word, PKT_DSC_PKTLEN_BYTES)); @@ -2897,7 +2801,7 @@ xlr_sec_msgring_handler(int bucket, int symkey_desc_pt desc = NULL; struct xlr_sec_session *ses = NULL; struct xlr_sec_command *cmd = NULL; - + uint32_t flags; if (code != MSGRNG_CODE_SEC) { panic("xlr_sec_msgring_handler: bad code = %d," @@ -2916,7 +2820,6 @@ xlr_sec_msgring_handler(int bucket, int sec_eng = GET_FIELD(msg->msg0, MSG_CTL_OP_TYPE); sec_pipe = GET_FIELD(msg->msg1, MSG_CTL_OP_TYPE); - error = msg->msg0 >> 40 & 0x1ff; if (error) printf("ctrl error = 0x%llx\n", error); @@ -2938,12 +2841,11 @@ xlr_sec_msgring_handler(int bucket, int * they are used for the engine and pipe Id. */ addr = GET_FIELD(msg->msg1, MSG_RSLT_DATA_DSC_ADDR); - addr = addr & ~((1 << 5) - 1); if (!addr) { panic("[%s:STNID_SEC]: NULL symkey addr!\n", __FUNCTION__); - } + /* * The adddress points to the data descriptor. The operation * descriptor is defined with the 32-byte cacheline size in @@ -2951,7 +2853,10 @@ xlr_sec_msgring_handler(int bucket, int * reference the symkey descriptor. (ref: xlr_sec_desc.h) */ addr = addr - sizeof(OperationDescriptor_t); - desc = (symkey_desc_pt) MIPS_PHYS_TO_KSEG0(addr); + flags = xlr_enable_kx(); + desc = (symkey_desc_pt)(uintptr_t)xlr_paddr_ld(addr + + offsetof(OperationDescriptor_t, vaddr)); + xlr_restore_kx(flags); if (!desc) { printf("\nerror : not getting desc back correctly \n"); @@ -3099,10 +3004,8 @@ xlr_sec_msgring_handler(int bucket, int } #endif - /* Copy cipher-data to User-space */ if (op->cipher_type != XLR_SEC_CIPHER_TYPE_NONE) { - size = op->dest_buf_size; /* DEBUG -dpk */ @@ -3119,14 +3022,12 @@ xlr_sec_msgring_handler(int bucket, int crypto_copyback(cmd->crp->crp_flags, cmd->crp->crp_buf, 0, cmd->op.dest_buf_size, (caddr_t)(long)desc->user.aligned_dest + op->cipher_offset); crypto_done(cmd->crp); - } - } + /* Copy digest to User-space */ if (op->digest_type != XLR_SEC_DIGEST_TYPE_NONE) { - int offset = 0; switch (op->digest_type) { @@ -3163,7 +3064,6 @@ xlr_sec_msgring_handler(int bucket, int } if (op->cipher_type == XLR_SEC_CIPHER_TYPE_ARC4 && op->rc4_savestate) { - size = XLR_SEC_MAX_RC4_STATE_SIZE; XLR_SEC_CMD_DIAG("state: to_addr=%p from_addr=%p size=%d \n", Modified: head/sys/mips/rmi/dev/sec/rmilib.h ============================================================================== --- head/sys/mips/rmi/dev/sec/rmilib.h Thu Sep 16 20:11:40 2010 (r212762) +++ head/sys/mips/rmi/dev/sec/rmilib.h Thu Sep 16 20:23:22 2010 (r212763) @@ -25,7 +25,8 @@ * 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$ * RMI_BSD */ @@ -33,12 +34,10 @@ #define _RMILIB_H_ #include -__FBSDID("$FreeBSD$"); - #include -#include +#include -/*#define XLR_SEC_CMD_DEBUG*/ +/* #define XLR_SEC_CMD_DEBUG */ #ifdef XLR_SEC_CMD_DEBUG #define DPRINT printf Modified: head/sys/mips/rmi/dev/sec/rmisec.c ============================================================================== --- head/sys/mips/rmi/dev/sec/rmisec.c Thu Sep 16 20:11:40 2010 (r212762) +++ head/sys/mips/rmi/dev/sec/rmisec.c Thu Sep 16 20:23:22 2010 (r212763) @@ -43,29 +43,27 @@ __FBSDID("$FreeBSD$"); #include #include #include - -#include -#include - -#include -#include #include +#include #include - +#include +#include #include -#include -#include +#include "cryptodev_if.h" -/*#define RMI_SEC_DEBUG */ +#include +#include +#include -void xlr_sec_print_data(struct cryptop *crp); +/* #define RMI_SEC_DEBUG */ -static int xlr_sec_newsession(void *arg, uint32_t * sidp, struct cryptoini *cri); -static int xlr_sec_freesession(void *arg, uint64_t tid); -static int xlr_sec_process(void *arg, struct cryptop *crp, int hint); +void xlr_sec_print_data(struct cryptop *crp); +static int xlr_sec_newsession(device_t dev, uint32_t * sidp, struct cryptoini *cri); +static int xlr_sec_freesession(device_t dev, uint64_t tid); +static int xlr_sec_process(device_t dev, struct cryptop *crp, int hint); static int xlr_sec_probe(device_t); static int xlr_sec_attach(device_t); @@ -82,6 +80,11 @@ static device_method_t xlr_sec_methods[] DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), + /* crypto device methods */ + DEVMETHOD(cryptodev_newsession, xlr_sec_newsession), + DEVMETHOD(cryptodev_freesession,xlr_sec_freesession), + DEVMETHOD(cryptodev_process, xlr_sec_process), + {0, 0} }; @@ -95,81 +98,63 @@ static devclass_t xlr_sec_devclass; DRIVER_MODULE(rmisec, iodi, xlr_sec_driver, xlr_sec_devclass, 0, 0); MODULE_DEPEND(rmisec, crypto, 1, 1, 1); - - static int xlr_sec_probe(device_t dev) { - return (BUS_PROBE_DEFAULT); + device_set_desc(dev, "XLR Security Accelerator"); + return (BUS_PROBE_DEFAULT); } - /* * Attach an interface that successfully probed. */ static int xlr_sec_attach(device_t dev) { - struct xlr_sec_softc *sc = device_get_softc(dev); - bzero(sc, sizeof(*sc)); sc->sc_dev = dev; - - - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), "rmi crypto driver", MTX_DEF); - - sc->sc_cid = crypto_get_driverid(0); + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), "rmi crypto driver", + MTX_DEF); + sc->sc_cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE); if (sc->sc_cid < 0) { printf("xlr_sec - error : could not get the driver id\n"); goto error_exit; } - if (crypto_register(sc->sc_cid, CRYPTO_DES_CBC, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_DES_CBC, 0, 0) != 0) printf("register failed for CRYPTO_DES_CBC\n"); - if (crypto_register(sc->sc_cid, CRYPTO_3DES_CBC, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_3DES_CBC, 0, 0) != 0) printf("register failed for CRYPTO_3DES_CBC\n"); - if (crypto_register(sc->sc_cid, CRYPTO_AES_CBC, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, - xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_AES_CBC, 0, 0) != 0) printf("register failed for CRYPTO_AES_CBC\n"); - if (crypto_register(sc->sc_cid, CRYPTO_ARC4, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_ARC4, 0, 0) != 0) printf("register failed for CRYPTO_ARC4\n"); - - if (crypto_register(sc->sc_cid, CRYPTO_MD5, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_MD5, 0, 0) != 0) printf("register failed for CRYPTO_MD5\n"); - if (crypto_register(sc->sc_cid, CRYPTO_SHA1, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_SHA1, 0, 0) != 0) printf("register failed for CRYPTO_SHA1\n"); - if (crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC, 0, 0) != 0) printf("register failed for CRYPTO_MD5_HMAC\n"); - if (crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC, 0, 0, - xlr_sec_newsession, xlr_sec_freesession, xlr_sec_process, sc) != 0) + if (crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC, 0, 0) != 0) printf("register failed for CRYPTO_SHA1_HMAC\n"); - xlr_sec_init(sc); + device_printf(dev, "Initialization complete!\n"); return (0); - error_exit: return (ENXIO); } - /* * Detach an interface that successfully probed. */ @@ -194,39 +179,28 @@ xlr_sec_detach(device_t dev) return (0); } - - - /* * Allocate a new 'session' and return an encoded session id. 'sidp' * contains our registration id, and should contain an encoded session * id on successful allocation. */ static int -xlr_sec_newsession(void *arg, u_int32_t * sidp, struct cryptoini *cri) +xlr_sec_newsession(device_t dev, u_int32_t *sidp, struct cryptoini *cri) { struct cryptoini *c; - struct xlr_sec_softc *sc = arg; + struct xlr_sec_softc *sc = device_get_softc(dev); int mac = 0, cry = 0, sesn; struct xlr_sec_session *ses = NULL; - if (sidp == NULL || cri == NULL || sc == NULL) return (EINVAL); - if (sc->sc_sessions == NULL) { ses = sc->sc_sessions = (struct xlr_sec_session *)malloc( sizeof(struct xlr_sec_session), M_DEVBUF, M_NOWAIT); if (ses == NULL) return (ENOMEM); - - ses->desc_ptr = (void *)xlr_sec_allocate_desc((void *)ses); - if (ses->desc_ptr == NULL) - return (ENOMEM); - sesn = 0; - ses->sessionid = sesn; sc->sc_nsessions = 1; } else { for (sesn = 0; sesn < sc->sc_nsessions; sesn++) { @@ -242,23 +216,22 @@ xlr_sec_newsession(void *arg, u_int32_t sizeof(struct xlr_sec_session), M_DEVBUF, M_NOWAIT); if (ses == NULL) return (ENOMEM); - bcopy(sc->sc_sessions, ses, sesn * sizeof(struct xlr_sec_session)); - bzero(sc->sc_sessions, sesn * sizeof(struct xlr_sec_session)); + bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses)); + bzero(sc->sc_sessions, sesn * sizeof(*ses)); free(sc->sc_sessions, M_DEVBUF); sc->sc_sessions = ses; ses = &sc->sc_sessions[sesn]; - ses->sessionid = sesn; - ses->desc_ptr = (void *)xlr_sec_allocate_desc((void *)ses); - if (ses->desc_ptr == NULL) - return (ENOMEM); sc->sc_nsessions++; } } + bzero(ses, sizeof(*ses)); + ses->sessionid = sesn; + ses->desc_ptr = xlr_sec_allocate_desc(ses); + if (ses->desc_ptr == NULL) + return (ENOMEM); ses->hs_used = 1; - for (c = cri; c != NULL; c = c->cri_next) { - switch (c->cri_alg) { case CRYPTO_MD5: case CRYPTO_SHA1: @@ -313,9 +286,9 @@ xlr_sec_newsession(void *arg, u_int32_t * XXX to blow away any keys already stored there. */ static int -xlr_sec_freesession(void *arg, u_int64_t tid) +xlr_sec_freesession(device_t dev, u_int64_t tid) { - struct xlr_sec_softc *sc = arg; + struct xlr_sec_softc *sc = device_get_softc(dev); int session; u_int32_t sid = CRYPTO_SESID2LID(tid); @@ -327,7 +300,6 @@ xlr_sec_freesession(void *arg, u_int64_t return (EINVAL); sc->sc_sessions[session].hs_used = 0; - return (0); } @@ -375,11 +347,10 @@ xlr_sec_print_data(struct cryptop *crp) #endif - static int -xlr_sec_process(void *arg, struct cryptop *crp, int hint) +xlr_sec_process(device_t dev, struct cryptop *crp, int hint) { - struct xlr_sec_softc *sc = arg; + struct xlr_sec_softc *sc = device_get_softc(dev); struct xlr_sec_command *cmd = NULL; int session, err; struct cryptodesc *crd1, *crd2, *maccrd, *enccrd; @@ -466,7 +437,6 @@ xlr_sec_process(void *arg, struct crypto cmd->op.num_packets = 1; cmd->op.num_fragments = 1; - if (cmd->op.source_buf_size > SEC_MAX_FRAG_LEN) { ses->multi_frag_flag = 1; } else { @@ -499,7 +469,6 @@ xlr_sec_process(void *arg, struct crypto cmd->op.pkt_iv = XLR_SEC_PKT_IV_OLD; cmd->op.pkt_lastword = XLR_SEC_LASTWORD_128; - default: printf("currently not handled\n"); } @@ -524,8 +493,10 @@ xlr_sec_process(void *arg, struct crypto memcpy(&cmd->op.crypt_key[0], enccrd->crd_key, XLR_SEC_DES_KEY_LENGTH); } else { cmd->op.cipher_type = XLR_SEC_CIPHER_TYPE_3DES; - //if (enccrd->crd_flags & CRD_F_KEY_EXPLICIT) { - memcpy(&cmd->op.crypt_key[0], enccrd->crd_key, XLR_SEC_3DES_KEY_LENGTH); + //if (enccrd->crd_flags & CRD_F_KEY_EXPLICIT) + { + memcpy(&cmd->op.crypt_key[0], enccrd->crd_key, + XLR_SEC_3DES_KEY_LENGTH); } } @@ -550,16 +521,19 @@ xlr_sec_process(void *arg, struct crypto cmd->op.pkt_lastword = XLR_SEC_LASTWORD_128; //if ((!(enccrd->crd_flags & CRD_F_IV_PRESENT)) && - if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT)) { - memcpy(&cmd->op.initial_vector[0], enccrd->crd_iv, XLR_SEC_DES_IV_LENGTH); - } + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT)) { + memcpy(&cmd->op.initial_vector[0], enccrd->crd_iv, + XLR_SEC_DES_IV_LENGTH); + } break; case CRYPTO_AES_CBC: if (enccrd->crd_alg == CRYPTO_AES_CBC) { cmd->op.cipher_type = XLR_SEC_CIPHER_TYPE_AES128; - //if (enccrd->crd_flags & CRD_F_KEY_EXPLICIT) { - memcpy(&cmd->op.crypt_key[0], enccrd->crd_key, XLR_SEC_AES128_KEY_LENGTH); + //if (enccrd->crd_flags & CRD_F_KEY_EXPLICIT) + { + memcpy(&cmd->op.crypt_key[0], enccrd->crd_key, + XLR_SEC_AES128_KEY_LENGTH); } } cmd->op.cipher_mode = XLR_SEC_CIPHER_MODE_CBC; @@ -583,11 +557,11 @@ xlr_sec_process(void *arg, struct crypto cmd->op.pkt_lastword = XLR_SEC_LASTWORD_128; //if (!(enccrd->crd_flags & CRD_F_IV_PRESENT)) { - if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT)) { - memcpy(&cmd->op.initial_vector[0], enccrd->crd_iv, XLR_SEC_AES_BLOCK_SIZE); - } - // + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT)) { + memcpy(&cmd->op.initial_vector[0], enccrd->crd_iv, + XLR_SEC_AES_BLOCK_SIZE); } + //} break; } } Modified: head/sys/mips/rmi/iodi.c ============================================================================== --- head/sys/mips/rmi/iodi.c Thu Sep 16 20:11:40 2010 (r212762) +++ head/sys/mips/rmi/iodi.c Thu Sep 16 20:23:22 2010 (r212763) @@ -213,6 +213,7 @@ iodi_attach(device_t dev) device_add_child(dev, "uart", 0); device_add_child(dev, "xlr_i2c", 0); device_add_child(dev, "pcib", 0); + device_add_child(dev, "rmisec", -1); if (xlr_board_info.usb) device_add_child(dev, "ehci", 0); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 21:06:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48F1C1065697; Thu, 16 Sep 2010 21:06:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38F328FC21; Thu, 16 Sep 2010 21:06:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GL6OK1007024; Thu, 16 Sep 2010 21:06:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GL6OXx007022; Thu, 16 Sep 2010 21:06:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201009162106.o8GL6OXx007022@svn.freebsd.org> From: Xin LI Date: Thu, 16 Sep 2010 21:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212764 - head/sys/dev/alc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 21:06:24 -0000 Author: delphij Date: Thu Sep 16 21:06:23 2010 New Revision: 212764 URL: http://svn.freebsd.org/changeset/base/212764 Log: status bits should be &'ed against status to be really functional. Reported by: Jike Song Reviewed by: yongari MFC after: 1 week Modified: head/sys/dev/alc/if_alc.c Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Thu Sep 16 20:23:22 2010 (r212763) +++ head/sys/dev/alc/if_alc.c Thu Sep 16 21:06:23 2010 (r212764) @@ -2948,8 +2948,8 @@ alc_rxeof(struct alc_softc *sc, struct r * errored frames. */ status |= RRD_TCP_UDPCSUM_NOK | RRD_IPCSUM_NOK; - if ((RRD_ERR_CRC | RRD_ERR_ALIGN | RRD_ERR_TRUNC | - RRD_ERR_RUNT) != 0) + if ((status & (RRD_ERR_CRC | RRD_ERR_ALIGN | + RRD_ERR_TRUNC | RRD_ERR_RUNT)) != 0) return; } From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 21:06:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B72911065693; Thu, 16 Sep 2010 21:06:45 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EE78FC0C; Thu, 16 Sep 2010 21:06:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GL6j1T007075; Thu, 16 Sep 2010 21:06:45 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GL6jl2007066; Thu, 16 Sep 2010 21:06:45 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201009162106.o8GL6jl2007066@svn.freebsd.org> From: Andre Oppermann Date: Thu, 16 Sep 2010 21:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212765 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 21:06:45 -0000 Author: andre Date: Thu Sep 16 21:06:45 2010 New Revision: 212765 URL: http://svn.freebsd.org/changeset/base/212765 Log: Remove the TCP inflight bandwidth limiter as announced in r211315 to give way for the pluggable congestion control framework. It is the task of the congestion control algorithm to set the congestion window and amount of inflight data without external interference. In 'struct tcpcb' the variables previously used by the inflight limiter are renamed to spares to keep the ABI intact and to have some more space for future extensions. In 'struct tcp_info' the variable 'tcpi_snd_bwnd' is not removed to preserve the ABI. It is always set to 0. In siftr.c in 'struct pkt_node' the variable 'snd_bwnd' is not removed to preserve the ABI. It is always set to 0. These unused variable in the various structures may be reused in the future or garbage collected before the next release or at some other point when an ABI change happens anyway for other reasons. No MFC is planned. The inflight bandwidth limiter stays disabled by default in the other branches but remains available. Modified: head/sys/netinet/siftr.c head/sys/netinet/tcp.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_timer.h head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/siftr.c Thu Sep 16 21:06:45 2010 (r212765) @@ -193,7 +193,7 @@ struct pkt_node { u_long snd_wnd; /* Receive Window (bytes). */ u_long rcv_wnd; - /* Bandwidth Controlled Window (bytes). */ + /* Unused (was: Bandwidth Controlled Window (bytes)). */ u_long snd_bwnd; /* Slow Start Threshold (bytes). */ u_long snd_ssthresh; @@ -775,7 +775,7 @@ siftr_siftdata(struct pkt_node *pn, stru pn->snd_cwnd = tp->snd_cwnd; pn->snd_wnd = tp->snd_wnd; pn->rcv_wnd = tp->rcv_wnd; - pn->snd_bwnd = tp->snd_bwnd; + pn->snd_bwnd = 0; /* Unused, kept for compat. */ pn->snd_ssthresh = tp->snd_ssthresh; pn->snd_scale = tp->snd_scale; pn->rcv_scale = tp->rcv_scale; Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/tcp.h Thu Sep 16 21:06:45 2010 (r212765) @@ -221,7 +221,7 @@ struct tcp_info { /* FreeBSD extensions to tcp_info. */ u_int32_t tcpi_snd_wnd; /* Advertised send window. */ - u_int32_t tcpi_snd_bwnd; /* Bandwidth send window. */ + u_int32_t tcpi_snd_bwnd; /* No longer used. */ u_int32_t tcpi_snd_nxt; /* Next egress seqno */ u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */ u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */ Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/tcp_input.c Thu Sep 16 21:06:45 2010 (r212765) @@ -1321,7 +1321,6 @@ tcp_do_segment(struct mbuf *m, struct tc tcp_xmit_timer(tp, ticks - tp->t_rtttime); } - tcp_xmit_bandwidth_limit(tp, th->th_ack); acked = th->th_ack - tp->snd_una; TCPSTAT_INC(tcps_rcvackpack); TCPSTAT_ADD(tcps_rcvackbyte, acked); @@ -2278,7 +2277,6 @@ process_ACK: tp->t_rttlow = ticks - tp->t_rtttime; tcp_xmit_timer(tp, ticks - tp->t_rtttime); } - tcp_xmit_bandwidth_limit(tp, th->th_ack); /* * If all outstanding data is acked, stop retransmit @@ -3328,8 +3326,6 @@ tcp_mss(struct tcpcb *tp, int offer) tp->snd_ssthresh = max(2 * mss, metrics.rmx_ssthresh); TCPSTAT_INC(tcps_usedssthresh); } - if (metrics.rmx_bandwidth) - tp->snd_bandwidth = metrics.rmx_bandwidth; /* * Set the slow-start flight size depending on whether this Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/tcp_output.c Thu Sep 16 21:06:45 2010 (r212765) @@ -225,7 +225,6 @@ again: tso = 0; off = tp->snd_nxt - tp->snd_una; sendwin = min(tp->snd_wnd, tp->snd_cwnd); - sendwin = min(sendwin, tp->snd_bwnd); flags = tcp_outflags[tp->t_state]; /* Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/tcp_subr.c Thu Sep 16 21:06:45 2010 (r212765) @@ -160,14 +160,6 @@ SYSCTL_VNET_PROC(_net_inet_tcp, TCPCTL_V "Default TCP Maximum Segment Size for IPv6"); #endif -static int -vnet_sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS) -{ - - VNET_SYSCTL_ARG(req, arg1); - return (sysctl_msec_to_ticks(oidp, arg1, arg2, req)); -} - /* * Minimum MSS we accept and use. This prevents DoS attacks where * we are forced to a ridiculous low MSS like 20 and send hundreds @@ -213,50 +205,6 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_isn_reseed_interval), 0, "Seconds between reseeding of ISN secret"); -/* - * TCP bandwidth limiting sysctls. Note that the default lower bound of - * 1024 exists only for debugging. A good production default would be - * something like 6100. - */ -SYSCTL_NODE(_net_inet_tcp, OID_AUTO, inflight, CTLFLAG_RW, 0, - "TCP inflight data limiting"); - -static VNET_DEFINE(int, tcp_inflight_enable) = 0; -#define V_tcp_inflight_enable VNET(tcp_inflight_enable) -SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, enable, CTLFLAG_RW, - &VNET_NAME(tcp_inflight_enable), 0, - "Enable automatic TCP inflight data limiting"); - -static int tcp_inflight_debug = 0; -SYSCTL_INT(_net_inet_tcp_inflight, OID_AUTO, debug, CTLFLAG_RW, - &tcp_inflight_debug, 0, - "Debug TCP inflight calculations"); - -static VNET_DEFINE(int, tcp_inflight_rttthresh); -#define V_tcp_inflight_rttthresh VNET(tcp_inflight_rttthresh) -SYSCTL_VNET_PROC(_net_inet_tcp_inflight, OID_AUTO, rttthresh, - CTLTYPE_INT|CTLFLAG_RW, &VNET_NAME(tcp_inflight_rttthresh), 0, - vnet_sysctl_msec_to_ticks, "I", - "RTT threshold below which inflight will deactivate itself"); - -static VNET_DEFINE(int, tcp_inflight_min) = 6144; -#define V_tcp_inflight_min VNET(tcp_inflight_min) -SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, min, CTLFLAG_RW, - &VNET_NAME(tcp_inflight_min), 0, - "Lower-bound for TCP inflight window"); - -static VNET_DEFINE(int, tcp_inflight_max) = TCP_MAXWIN << TCP_MAX_WINSHIFT; -#define V_tcp_inflight_max VNET(tcp_inflight_max) -SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, max, CTLFLAG_RW, - &VNET_NAME(tcp_inflight_max), 0, - "Upper-bound for TCP inflight window"); - -static VNET_DEFINE(int, tcp_inflight_stab) = 20; -#define V_tcp_inflight_stab VNET(tcp_inflight_stab) -SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, stab, CTLFLAG_RW, - &VNET_NAME(tcp_inflight_stab), 0, - "Inflight Algorithm Stabilization 20 = 2 packets"); - #ifdef TCP_SORECEIVE_STREAM static int tcp_soreceive_stream = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, soreceive_stream, CTLFLAG_RDTUN, @@ -338,8 +286,6 @@ tcp_init(void) in_pcbinfo_init(&V_tcbinfo, "tcp", &V_tcb, hashsize, hashsize, "tcp_inpcb", tcp_inpcb_init, NULL, UMA_ZONE_NOFREE); - V_tcp_inflight_rttthresh = TCPTV_INFLIGHT_RTTTHRESH; - /* * These have to be type stable for the benefit of the timers. */ @@ -728,10 +674,8 @@ tcp_newtcpcb(struct inpcb *inp) tp->t_rttmin = tcp_rexmit_min; tp->t_rxtcur = TCPTV_RTOBASE; tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; - tp->snd_bwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->t_rcvtime = ticks; - tp->t_bw_rtttime = ticks; /* * IPv4 TTL initialization is necessary for an IPv6 socket as well, * because the socket may be bound to an IPv6 wildcard address, @@ -849,8 +793,6 @@ tcp_discardcb(struct tcpcb *tp) metrics.rmx_rtt = tp->t_srtt; metrics.rmx_rttvar = tp->t_rttvar; - /* XXX: This wraps if the pipe is more than 4 Gbit per second */ - metrics.rmx_bandwidth = tp->snd_bandwidth; metrics.rmx_cwnd = tp->snd_cwnd; metrics.rmx_sendpipe = 0; metrics.rmx_recvpipe = 0; @@ -1773,154 +1715,6 @@ ipsec_hdrsiz_tcp(struct tcpcb *tp) } #endif /* IPSEC */ -/* - * TCP BANDWIDTH DELAY PRODUCT WINDOW LIMITING - * - * This code attempts to calculate the bandwidth-delay product as a - * means of determining the optimal window size to maximize bandwidth, - * minimize RTT, and avoid the over-allocation of buffers on interfaces and - * routers. This code also does a fairly good job keeping RTTs in check - * across slow links like modems. We implement an algorithm which is very - * similar (but not meant to be) TCP/Vegas. The code operates on the - * transmitter side of a TCP connection and so only effects the transmit - * side of the connection. - * - * BACKGROUND: TCP makes no provision for the management of buffer space - * at the end points or at the intermediate routers and switches. A TCP - * stream, whether using NewReno or not, will eventually buffer as - * many packets as it is able and the only reason this typically works is - * due to the fairly small default buffers made available for a connection - * (typicaly 16K or 32K). As machines use larger windows and/or window - * scaling it is now fairly easy for even a single TCP connection to blow-out - * all available buffer space not only on the local interface, but on - * intermediate routers and switches as well. NewReno makes a misguided - * attempt to 'solve' this problem by waiting for an actual failure to occur, - * then backing off, then steadily increasing the window again until another - * failure occurs, ad-infinitum. This results in terrible oscillation that - * is only made worse as network loads increase and the idea of intentionally - * blowing out network buffers is, frankly, a terrible way to manage network - * resources. - * - * It is far better to limit the transmit window prior to the failure - * condition being achieved. There are two general ways to do this: First - * you can 'scan' through different transmit window sizes and locate the - * point where the RTT stops increasing, indicating that you have filled the - * pipe, then scan backwards until you note that RTT stops decreasing, then - * repeat ad-infinitum. This method works in principle but has severe - * implementation issues due to RTT variances, timer granularity, and - * instability in the algorithm which can lead to many false positives and - * create oscillations as well as interact badly with other TCP streams - * implementing the same algorithm. - * - * The second method is to limit the window to the bandwidth delay product - * of the link. This is the method we implement. RTT variances and our - * own manipulation of the congestion window, bwnd, can potentially - * destabilize the algorithm. For this reason we have to stabilize the - * elements used to calculate the window. We do this by using the minimum - * observed RTT, the long term average of the observed bandwidth, and - * by adding two segments worth of slop. It isn't perfect but it is able - * to react to changing conditions and gives us a very stable basis on - * which to extend the algorithm. - */ -void -tcp_xmit_bandwidth_limit(struct tcpcb *tp, tcp_seq ack_seq) -{ - u_long bw; - u_long bwnd; - int save_ticks; - - INP_WLOCK_ASSERT(tp->t_inpcb); - - /* - * If inflight_enable is disabled in the middle of a tcp connection, - * make sure snd_bwnd is effectively disabled. - */ - if (V_tcp_inflight_enable == 0 || - tp->t_rttlow < V_tcp_inflight_rttthresh) { - tp->snd_bwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; - tp->snd_bandwidth = 0; - return; - } - - /* - * Figure out the bandwidth. Due to the tick granularity this - * is a very rough number and it MUST be averaged over a fairly - * long period of time. XXX we need to take into account a link - * that is not using all available bandwidth, but for now our - * slop will ramp us up if this case occurs and the bandwidth later - * increases. - * - * Note: if ticks rollover 'bw' may wind up negative. We must - * effectively reset t_bw_rtttime for this case. - */ - save_ticks = ticks; - if ((u_int)(save_ticks - tp->t_bw_rtttime) < 1) - return; - - bw = (int64_t)(ack_seq - tp->t_bw_rtseq) * hz / - (save_ticks - tp->t_bw_rtttime); - tp->t_bw_rtttime = save_ticks; - tp->t_bw_rtseq = ack_seq; - if (tp->t_bw_rtttime == 0 || (int)bw < 0) - return; - bw = ((int64_t)tp->snd_bandwidth * 15 + bw) >> 4; - - tp->snd_bandwidth = bw; - - /* - * Calculate the semi-static bandwidth delay product, plus two maximal - * segments. The additional slop puts us squarely in the sweet - * spot and also handles the bandwidth run-up case and stabilization. - * Without the slop we could be locking ourselves into a lower - * bandwidth. - * - * Situations Handled: - * (1) Prevents over-queueing of packets on LANs, especially on - * high speed LANs, allowing larger TCP buffers to be - * specified, and also does a good job preventing - * over-queueing of packets over choke points like modems - * (at least for the transmit side). - * - * (2) Is able to handle changing network loads (bandwidth - * drops so bwnd drops, bandwidth increases so bwnd - * increases). - * - * (3) Theoretically should stabilize in the face of multiple - * connections implementing the same algorithm (this may need - * a little work). - * - * (4) Stability value (defaults to 20 = 2 maximal packets) can - * be adjusted with a sysctl but typically only needs to be - * on very slow connections. A value no smaller then 5 - * should be used, but only reduce this default if you have - * no other choice. - */ -#define USERTT ((tp->t_srtt + tp->t_rttbest) / 2) - bwnd = (int64_t)bw * USERTT / (hz << TCP_RTT_SHIFT) + V_tcp_inflight_stab * tp->t_maxseg / 10; -#undef USERTT - - if (tcp_inflight_debug > 0) { - static int ltime; - if ((u_int)(ticks - ltime) >= hz / tcp_inflight_debug) { - ltime = ticks; - printf("%p bw %ld rttbest %d srtt %d bwnd %ld\n", - tp, - bw, - tp->t_rttbest, - tp->t_srtt, - bwnd - ); - } - } - if ((long)bwnd < V_tcp_inflight_min) - bwnd = V_tcp_inflight_min; - if (bwnd > V_tcp_inflight_max) - bwnd = V_tcp_inflight_max; - if ((long)bwnd < tp->t_maxseg * 2) - bwnd = tp->t_maxseg * 2; - tp->snd_bwnd = bwnd; -} - #ifdef TCP_SIGNATURE /* * Callback function invoked by m_apply() to digest TCP segment data Modified: head/sys/netinet/tcp_timer.h ============================================================================== --- head/sys/netinet/tcp_timer.h Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/tcp_timer.h Thu Sep 16 21:06:45 2010 (r212765) @@ -86,9 +86,6 @@ #define TCPTV_KEEPINTVL ( 75*hz) /* default probe interval */ #define TCPTV_KEEPCNT 8 /* max probes before drop */ -#define TCPTV_INFLIGHT_RTTTHRESH (10*hz/1000) /* below which inflight - disengages, in msec */ - #define TCPTV_FINWAIT2_TIMEOUT (60*hz) /* FIN_WAIT_2 timeout if no receiver */ /* Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/tcp_usrreq.c Thu Sep 16 21:06:45 2010 (r212765) @@ -1105,7 +1105,6 @@ tcp_connect(struct tcpcb *tp, struct soc tp->t_state = TCPS_SYN_SENT; tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); tp->iss = tcp_new_isn(tp); - tp->t_bw_rtseq = tp->iss; tcp_sendseqinit(tp); return 0; @@ -1168,7 +1167,6 @@ tcp6_connect(struct tcpcb *tp, struct so tp->t_state = TCPS_SYN_SENT; tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); tp->iss = tcp_new_isn(tp); - tp->t_bw_rtseq = tp->iss; tcp_sendseqinit(tp); return 0; @@ -1214,7 +1212,7 @@ tcp_fill_info(struct tcpcb *tp, struct t ti->tcpi_rcv_space = tp->rcv_wnd; ti->tcpi_rcv_nxt = tp->rcv_nxt; ti->tcpi_snd_wnd = tp->snd_wnd; - ti->tcpi_snd_bwnd = tp->snd_bwnd; + ti->tcpi_snd_bwnd = 0; /* Unused, kept for compat. */ ti->tcpi_snd_nxt = tp->snd_nxt; ti->tcpi_snd_mss = tp->t_maxseg; ti->tcpi_rcv_mss = tp->t_maxseg; @@ -1795,26 +1793,24 @@ db_print_tcpcb(struct tcpcb *tp, const c tp->rcv_adv, tp->rcv_wnd, tp->rcv_up); db_print_indent(indent); - db_printf("snd_wnd: %lu snd_cwnd: %lu snd_bwnd: %lu\n", - tp->snd_wnd, tp->snd_cwnd, tp->snd_bwnd); + db_printf("snd_wnd: %lu snd_cwnd: %lu\n", + tp->snd_wnd, tp->snd_cwnd); db_print_indent(indent); - db_printf("snd_ssthresh: %lu snd_bandwidth: %lu snd_recover: " - "0x%08x\n", tp->snd_ssthresh, tp->snd_bandwidth, - tp->snd_recover); + db_printf("snd_ssthresh: %lu snd_recover: " + "0x%08x\n", tp->snd_ssthresh, tp->snd_recover); db_print_indent(indent); db_printf("t_maxopd: %u t_rcvtime: %u t_startime: %u\n", tp->t_maxopd, tp->t_rcvtime, tp->t_starttime); db_print_indent(indent); - db_printf("t_rttime: %u t_rtsq: 0x%08x t_bw_rtttime: %u\n", - tp->t_rtttime, tp->t_rtseq, tp->t_bw_rtttime); + db_printf("t_rttime: %u t_rtsq: 0x%08x\n", + tp->t_rtttime, tp->t_rtseq); db_print_indent(indent); - db_printf("t_bw_rtseq: 0x%08x t_rxtcur: %d t_maxseg: %u " - "t_srtt: %d\n", tp->t_bw_rtseq, tp->t_rxtcur, tp->t_maxseg, - tp->t_srtt); + db_printf("t_rxtcur: %d t_maxseg: %u t_srtt: %d\n", + tp->t_rxtcur, tp->t_maxseg, tp->t_srtt); db_print_indent(indent); db_printf("t_rttvar: %d t_rxtshift: %d t_rttmin: %u " Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Sep 16 21:06:23 2010 (r212764) +++ head/sys/netinet/tcp_var.h Thu Sep 16 21:06:45 2010 (r212765) @@ -135,12 +135,12 @@ struct tcpcb { u_long snd_wnd; /* send window */ u_long snd_cwnd; /* congestion-controlled window */ - u_long snd_bwnd; /* bandwidth-controlled window */ + u_long snd_spare1; /* unused */ u_long snd_ssthresh; /* snd_cwnd size threshold for * for slow start exponential to * linear switch */ - u_long snd_bandwidth; /* calculated bandwidth or 0 */ + u_long snd_spare2; /* unused */ tcp_seq snd_recover; /* for use in NewReno Fast Recovery */ u_int t_maxopd; /* mss plus options */ @@ -150,8 +150,8 @@ struct tcpcb { u_int t_rtttime; /* RTT measurement start time */ tcp_seq t_rtseq; /* sequence number being timed */ - u_int t_bw_rtttime; /* used for bandwidth calculation */ - tcp_seq t_bw_rtseq; /* used for bandwidth calculation */ + u_int t_bw_spare1; /* unused */ + tcp_seq t_bw_spare2; /* unused */ int t_rxtcur; /* current retransmit value (ticks) */ u_int t_maxseg; /* maximum segment size */ @@ -654,7 +654,6 @@ void tcpip_fillheaders(struct inpcb *, void tcp_timer_activate(struct tcpcb *, int, u_int); int tcp_timer_active(struct tcpcb *, int); void tcp_trace(short, short, struct tcpcb *, void *, struct tcphdr *, int); -void tcp_xmit_bandwidth_limit(struct tcpcb *tp, tcp_seq ack_seq); /* * All tcp_hc_* functions are IPv4 and IPv6 (via in_conninfo) */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 21:14:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC615106567A; Thu, 16 Sep 2010 21:14:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AA208FC16; Thu, 16 Sep 2010 21:14:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GLESMV007285; Thu, 16 Sep 2010 21:14:28 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GLESHb007284; Thu, 16 Sep 2010 21:14:28 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009162114.o8GLESHb007284@svn.freebsd.org> From: Dimitry Andric Date: Thu, 16 Sep 2010 21:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212766 - in vendor/clang/dist: . docs include/clang/AST lib/Headers tools/CIndex tools/index-test utils win32 www/analyzer X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 21:14:28 -0000 Author: dim Date: Thu Sep 16 21:14:28 2010 New Revision: 212766 URL: http://svn.freebsd.org/changeset/base/212766 Log: Make vendor/clang/dist exactly the same as upstream's r108428. Some files and directories were already added/removed in the upstream repository, but were not added/removed here, when the previous snapshot was imported. Note: I did not import the file test/Lexer/conflict-marker.c, because it contains merge conflict markers on purpose, which upsets our pre-commit hooks. Approved by: rpaulo (mentor) Deleted: vendor/clang/dist/VER vendor/clang/dist/docs/BlockImplementation.txt vendor/clang/dist/include/clang/AST/DeclNodes.def vendor/clang/dist/include/clang/AST/StmtNodes.def vendor/clang/dist/lib/Headers/arm_neon.h vendor/clang/dist/lib/Headers/arm_neon.td vendor/clang/dist/tools/CIndex/ vendor/clang/dist/tools/index-test/ vendor/clang/dist/utils/pch-test.pl vendor/clang/dist/win32/ vendor/clang/dist/www/analyzer/menu.js From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 21:16:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCFD11065675; Thu, 16 Sep 2010 21:16:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2E8A8FC16; Thu, 16 Sep 2010 21:16:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GLGtiQ007381; Thu, 16 Sep 2010 21:16:55 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GLGtnK007380; Thu, 16 Sep 2010 21:16:55 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009162116.o8GLGtnK007380@svn.freebsd.org> From: Dimitry Andric Date: Thu, 16 Sep 2010 21:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212767 - vendor/clang/clang-r108428 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 21:16:56 -0000 Author: dim Date: Thu Sep 16 21:16:55 2010 New Revision: 212767 URL: http://svn.freebsd.org/changeset/base/212767 Log: Prepare to re-tag clang r108428, by removing the previous tag. Approved by: rpaulo (mentor) Deleted: vendor/clang/clang-r108428/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 21:18:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F19891065696; Thu, 16 Sep 2010 21:18:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C797C8FC18; Thu, 16 Sep 2010 21:18:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GLIPLi007449; Thu, 16 Sep 2010 21:18:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GLIP15007448; Thu, 16 Sep 2010 21:18:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009162118.o8GLIP15007448@svn.freebsd.org> From: Dimitry Andric Date: Thu, 16 Sep 2010 21:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212768 - vendor/clang/clang-r108428 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 21:18:26 -0000 Author: dim Date: Thu Sep 16 21:18:25 2010 New Revision: 212768 URL: http://svn.freebsd.org/changeset/base/212768 Log: Re-tag clang r108428. Approved by: rpaulo (mentor) Added: vendor/clang/clang-r108428/ - copied from r212767, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 21:42:03 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDCAC1065672; Thu, 16 Sep 2010 21:42:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7CF878FC08; Thu, 16 Sep 2010 21:42:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o8GLSju1008340; Thu, 16 Sep 2010 15:28:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 16 Sep 2010 15:28:54 -0600 (MDT) Message-Id: <20100916.152854.856152966653228621.imp@bsdimp.com> To: jmallett@FreeBSD.org From: "M. Warner Losh" In-Reply-To: References: <20100916084442.GB21622@dragon.NUXI.org> <20100916212043.N724@delplex.bde.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, obrien@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 21:42:03 -0000 In message: Juli Mallett writes: : On Thu, Sep 16, 2010 at 04:36, Bruce Evans wro= te: : > WHat about the lesser burder on a character or two for putting -- i= n the : > synopsis where it is more visible: : > : > =A0 =A0 =A0 =A0printf [--] format [arguments ...] : = : Right, that's what I've been thinking about. For that matter, does : printf(1) need to use getopt(3) at all? It seems like simply checkin= g : for "--" could be sufficient. Does POSIX require that it exit with a= n : error if it's given any options? At the very least, it seems like it= : would be more productive to have printf(1) give unusually-helpful : error messages (perhaps merely changing its usage output to match tha= t : synopsis) if it encounters a string beginning with '-' other than : "--". if (getenv("POSIX_ME_HARDER") && arg[0] =3D=3D '-' && arg[1] !=3D '-')= errx(1, "Strict posix compliance says you lose."); might be all that's needed. Warner From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 22:11:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DE8B1065670; Thu, 16 Sep 2010 22:11:56 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D1868FC14; Thu, 16 Sep 2010 22:11:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GMBuxI008625; Thu, 16 Sep 2010 22:11:56 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GMBtnI008623; Thu, 16 Sep 2010 22:11:55 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201009162211.o8GMBtnI008623@svn.freebsd.org> From: Andre Oppermann Date: Thu, 16 Sep 2010 22:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212769 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 22:11:56 -0000 Author: andre Date: Thu Sep 16 22:11:55 2010 New Revision: 212769 URL: http://svn.freebsd.org/changeset/base/212769 Log: The inflight bandwidth limiter was removed in r212765. Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Thu Sep 16 21:18:25 2010 (r212768) +++ head/share/man/man4/tcp.4 Thu Sep 16 22:11:55 2010 (r212769) @@ -32,7 +32,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd August 16, 2008 +.Dd September 16, 2010 .Dt TCP 4 .Os .Sh NAME @@ -383,72 +383,6 @@ code. For this reason, we use 200ms of slop and a near-0 minimum, which gives us an effective minimum of 200ms (similar to .Tn Linux ) . -.It Va inflight.enable -Enable -.Tn TCP -bandwidth-delay product limiting. -An attempt will be made to calculate -the bandwidth-delay product for each individual -.Tn TCP -connection, and limit -the amount of inflight data being transmitted, to avoid building up -unnecessary packets in the network. -This option is recommended if you -are serving a lot of data over connections with high bandwidth-delay -products, such as modems, GigE links, and fast long-haul WANs, and/or -you have configured your machine to accommodate large -.Tn TCP -windows. -In such -situations, without this option, you may experience high interactive -latencies or packet loss due to the overloading of intermediate routers -and switches. -Note that bandwidth-delay product limiting only effects -the transmit side of a -.Tn TCP -connection. -.It Va inflight.debug -Enable debugging for the bandwidth-delay product algorithm. -.It Va inflight.min -This puts a lower bound on the bandwidth-delay product window, in bytes. -A value of 1024 is typically used for debugging. -6000-16000 is more typical in a production installation. -Setting this value too low may result in -slow ramp-up times for bursty connections. -Setting this value too high effectively disables the algorithm. -.It Va inflight.max -This puts an upper bound on the bandwidth-delay product window, in bytes. -This value should not generally be modified, but may be used to set a -global per-connection limit on queued data, potentially allowing you to -intentionally set a less than optimum limit, to smooth data flow over a -network while still being able to specify huge internal -.Tn TCP -buffers. -.It Va inflight.stab -The bandwidth-delay product algorithm requires a slightly larger window -than it otherwise calculates for stability. -This parameter determines the extra window in maximal packets / 10. -The default value of 20 represents 2 maximal packets. -Reducing this value is not recommended, but you may -come across a situation with very slow links where the -.Xr ping 8 -time -reduction of the default inflight code is not sufficient. -If this case occurs, you should first try reducing -.Va inflight.min -and, if that does not -work, reduce both -.Va inflight.min -and -.Va inflight.stab , -trying values of -15, 10, or 5 for the latter. -Never use a value less than 5. -Reducing -.Va inflight.stab -can lead to upwards of a 20% underutilization of the link -as well as reducing the algorithm's ability to adapt to changing -situations and should only be done as a last resort. .It Va rfc3042 Enable the Limited Transmit algorithm as described in RFC 3042. It helps avoid timeouts on lossy links and also when the congestion window From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 22:31:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03EB21065670; Thu, 16 Sep 2010 22:31:04 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E77A18FC18; Thu, 16 Sep 2010 22:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GMV3wO009121; Thu, 16 Sep 2010 22:31:03 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GMV3Ov009118; Thu, 16 Sep 2010 22:31:03 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201009162231.o8GMV3Ov009118@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 16 Sep 2010 22:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212770 - head/usr.bin/script X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 22:31:04 -0000 Author: obrien Date: Thu Sep 16 22:31:03 2010 New Revision: 212770 URL: http://svn.freebsd.org/changeset/base/212770 Log: + Add the SCRIPT environmental variable to the sub-shell. Its value is the name of the typescript file. + Add the 'command' argument (if supplied on the command line) to the typescript file. This creates a more complete typescript when invoked this way - more equal to invoking script without supplying the 'command' argument. Modified: head/usr.bin/script/script.1 head/usr.bin/script/script.c Modified: head/usr.bin/script/script.1 ============================================================================== --- head/usr.bin/script/script.1 Thu Sep 16 22:11:55 2010 (r212769) +++ head/usr.bin/script/script.1 Thu Sep 16 22:31:03 2010 (r212770) @@ -117,6 +117,19 @@ The results are meant to emulate a hardc The following environment variable is utilized by .Nm : .Bl -tag -width SHELL +.It Ev SCRIPT +The +.Ev SCRIPT +environment variable is added to the sub-shell. +If +.Ev SCRIPT +already existed in the users environment, +its value is overwritten within the sub-shell. +The value of +.Ev SCRIPT +is the name of the +.Ar typescript +file. .It Ev SHELL If the variable .Ev SHELL Modified: head/usr.bin/script/script.c ============================================================================== --- head/usr.bin/script/script.c Thu Sep 16 22:11:55 2010 (r212769) +++ head/usr.bin/script/script.c Thu Sep 16 22:31:03 2010 (r212770) @@ -235,14 +235,21 @@ static void doshell(char **av) { const char *shell; + int k; shell = getenv("SHELL"); if (shell == NULL) shell = _PATH_BSHELL; + if (av[0]) + for (k = 0 ; av[k] ; ++k) + fprintf(fscript, "%s%s", k ? " " : "", av[k]); + fprintf(fscript, "\r\n"); + (void)close(master); (void)fclose(fscript); login_tty(slave); + setenv("SCRIPT", fname, 1); if (av[0]) { execvp(av[0], av); warn("%s", av[0]); From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 22:38:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D774106566C; Thu, 16 Sep 2010 22:38:28 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CD9B8FC0A; Thu, 16 Sep 2010 22:38:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GMcROG009307; Thu, 16 Sep 2010 22:38:27 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GMcRA2009305; Thu, 16 Sep 2010 22:38:27 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201009162238.o8GMcRA2009305@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 16 Sep 2010 22:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212771 - head/usr.bin/ruptime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 22:38:28 -0000 Author: obrien Date: Thu Sep 16 22:38:27 2010 New Revision: 212771 URL: http://svn.freebsd.org/changeset/base/212771 Log: Increase the hostname display width. Many machines are named with >12 characters. This still allows for 80 column output with load averages of 99.99, 99.99, 99.99. Modified: head/usr.bin/ruptime/ruptime.c Modified: head/usr.bin/ruptime/ruptime.c ============================================================================== --- head/usr.bin/ruptime/ruptime.c Thu Sep 16 22:31:03 2010 (r212770) +++ head/usr.bin/ruptime/ruptime.c Thu Sep 16 22:38:27 2010 (r212771) @@ -244,12 +244,12 @@ ruptime(const char *host, int aflg, int for (i = 0; i < (int)nhosts; i++) { hsp = &hs[i]; if (ISDOWN(hsp)) { - (void)printf("%-12.12s%s\n", hsp->hs_wd->wd_hostname, + (void)printf("%-25.25s%s\n", hsp->hs_wd->wd_hostname, interval(now - hsp->hs_wd->wd_recvtime, "down")); continue; } (void)printf( - "%-12.12s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n", + "%-25.25s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n", hsp->hs_wd->wd_hostname, interval((time_t)hsp->hs_wd->wd_sendtime - (time_t)hsp->hs_wd->wd_boottime, " up"), From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 22:47:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F83A1065673; Thu, 16 Sep 2010 22:47:50 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 302C58FC08; Thu, 16 Sep 2010 22:47:50 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id C3D5535A825; Fri, 17 Sep 2010 00:47:48 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id AEA0D172A0; Fri, 17 Sep 2010 00:47:48 +0200 (CEST) Date: Fri, 17 Sep 2010 00:47:48 +0200 From: Jilles Tjoelker To: Juli Mallett Message-ID: <20100916224748.GA60291@stack.nl> References: <201009091927.o89JReXm022426@svn.freebsd.org> <20100916084442.GB21622@dragon.NUXI.org> <20100916212043.N724@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David O'Brien , Bruce Evans Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 22:47:50 -0000 On Thu, Sep 16, 2010 at 01:10:33PM -0700, Juli Mallett wrote: > On Thu, Sep 16, 2010 at 04:36, Bruce Evans wrote: > > WHat about the lesser burder on a character or two for putting -- in the > > synopsis where it is more visible: > >        printf [--] format [arguments ...] > Right, that's what I've been thinking about. For that matter, does > printf(1) need to use getopt(3) at all? It seems like simply checking > for "--" could be sufficient. Does POSIX require that it exit with an > error if it's given any options? It does not: implementations may add options as an extension and future versions of POSIX may add options. So while it would be a valid extension to allow format strings starting with "-" without "--" protection (other than "--" itself), I think it would be unwise. Most implementations of printf(1), other than the zsh builtin, require "--" protection for format strings starting with "-". Some of them also accept a few options: ksh93's builtin and GNU coreutils accept common options like --help, bash's builtin has a -v option to write the output directly into a variable (which seems bad to me by the way; I think printf(1) should usually be a builtin but it should be possible to use an external version with only performance and ARG_MAX as downsides). It is preferable if attempts to use such options fail loudly rather than silently writing garbage. I do not like "frivolous" extensions either, extensions that cause scripts written for FreeBSD to break on other systems without a good reason. Also note that the strict treatment of "-" is possible because printf(1) has historically recognized and required "--". Utilities that have not historically recognized "--" such as most of the special builtins may need a weaker approach. For example, in -current I have changed . and exec to treat "--" specially but not any other string starting with "-". The strict approach is cleaner but may cause compatibility problems in those cases. > At the very least, it seems like it would be more productive to have > printf(1) give unusually-helpful error messages (perhaps merely > changing its usage output to match that synopsis) if it encounters a > string beginning with '-' other than "--". That would be acceptable. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 22:54:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 227D81065670; Thu, 16 Sep 2010 22:54:57 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 079CF8FC1C; Thu, 16 Sep 2010 22:54:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GMsuRN009676; Thu, 16 Sep 2010 22:54:56 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GMsuBY009674; Thu, 16 Sep 2010 22:54:56 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201009162254.o8GMsuBY009674@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 16 Sep 2010 22:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212772 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 22:54:57 -0000 Author: ken Date: Thu Sep 16 22:54:56 2010 New Revision: 212772 URL: http://svn.freebsd.org/changeset/base/212772 Log: MFp4 (//depot/projects/mps/...): According to the MPT2 spec, task management commands are serialized, and so no I/O should start while task management commands are active. So, to comply with that, freeze the SIM queue before we send any task management commands (abort, target reset, etc.) down to the IOC. We unfreeze the queue once the task management command completes. It isn't clear from the spec whether multiple simultaneous task management commands are supported. Right now it is possible to have multiple outstanding task management commands, especially in the abort case. Multiple outstanding aborts do complete successfully, so it may be supported. We also don't yet have any recovery mechanism (e.g. reset the IOC) if the task management command fails. Modified: head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Thu Sep 16 22:38:27 2010 (r212771) +++ head/sys/dev/mps/mps_sas.c Thu Sep 16 22:54:56 2010 (r212772) @@ -438,6 +438,7 @@ mpssas_prepare_remove(struct mpssas_soft cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_complete = mpssas_remove_device; cm->cm_targ = targ; + xpt_freeze_simq(sc->sassc->sim, 1); mps_map_command(sc, cm); } @@ -453,6 +454,7 @@ mpssas_remove_device(struct mps_softc *s reply = (MPI2_SCSI_TASK_MANAGE_REPLY *)cm->cm_reply; handle = cm->cm_targ->handle; + xpt_release_simq(sc->sassc->sim, 1); if (reply->IOCStatus != MPI2_IOCSTATUS_SUCCESS) { mps_printf(sc, "Failure 0x%x reseting device 0x%04x\n", reply->IOCStatus, handle); @@ -983,6 +985,11 @@ mpssas_abort_complete(struct mps_softc * mps_printf(sc, "%s: abort request on handle %#04x SMID %d " "complete\n", __func__, req->DevHandle, req->TaskMID); + /* + * Release the SIM queue, we froze it when we sent the abort. + */ + xpt_release_simq(sc->sassc->sim, 1); + mps_free_command(sc, cm); } @@ -1013,10 +1020,19 @@ mpssas_recovery(struct mps_softc *sc, st cm->cm_data = NULL; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; + /* + * Freeze the SIM queue while we issue the abort. According to the + * Fusion-MPT 2.0 spec, task management requests are serialized, + * and so the host should not send any I/O requests while task + * management requests are pending. + */ + xpt_freeze_simq(sc->sassc->sim, 1); + error = mps_map_command(sc, cm); if (error != 0) { mps_printf(sc, "%s: error mapping abort request!\n", __func__); + xpt_release_simq(sc->sassc->sim, 1); } #if 0 error = mpssas_reset(sc, targ, &resetcm); @@ -1361,7 +1377,13 @@ mpssas_resetdev(struct mpssas_softc *sas cm->cm_data = NULL; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; + xpt_freeze_simq(sassc->sim, 1); + error = mps_map_command(sassc->sc, cm); + + if (error != 0) + xpt_release_simq(sassc->sim, 1); + return (error); } @@ -1385,6 +1407,9 @@ mpssas_resetdev_complete(struct mps_soft ccb->ccb_h.status = CAM_REQ_CMP_ERR; mps_free_command(sc, cm); + + xpt_release_simq(sc->sassc->sim, 1); + xpt_done(ccb); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 23:33:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E4D11065675; Thu, 16 Sep 2010 23:33:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43CC98FC18; Thu, 16 Sep 2010 23:33:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GNXP1Z010489; Thu, 16 Sep 2010 23:33:25 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GNXPLh010485; Thu, 16 Sep 2010 23:33:25 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201009162333.o8GNXPLh010485@svn.freebsd.org> From: Ed Maste Date: Thu, 16 Sep 2010 23:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212773 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 23:33:25 -0000 Author: emaste Date: Thu Sep 16 23:33:24 2010 New Revision: 212773 URL: http://svn.freebsd.org/changeset/base/212773 Log: Use device_printf where possible, and otherwise at least include the driver name in printf strings. Reported by: Mark Johnston Modified: head/sys/dev/aac/aac.c head/sys/dev/aac/aac_cam.c head/sys/dev/aac/aac_disk.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Thu Sep 16 22:54:56 2010 (r212772) +++ head/sys/dev/aac/aac.c Thu Sep 16 23:33:24 2010 (r212773) @@ -391,7 +391,7 @@ aac_get_container_info(struct aac_softc if (aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_mntinfo))) { - printf("Error probing container %d\n", cid); + device_printf(sc->aac_dev, "Error probing container %d\n", cid); return (NULL); } Modified: head/sys/dev/aac/aac_cam.c ============================================================================== --- head/sys/dev/aac/aac_cam.c Thu Sep 16 22:54:56 2010 (r212772) +++ head/sys/dev/aac/aac_cam.c Thu Sep 16 23:33:24 2010 (r212773) @@ -569,7 +569,7 @@ aac_cam_reset_bus(struct cam_sim *sim, u sc = camsc->inf->aac_sc; if (sc == NULL) { - printf("Null sc?\n"); + printf("aac: Null sc?\n"); return (CAM_REQ_ABORTED); } Modified: head/sys/dev/aac/aac_disk.c ============================================================================== --- head/sys/dev/aac/aac_disk.c Thu Sep 16 22:54:56 2010 (r212772) +++ head/sys/dev/aac/aac_disk.c Thu Sep 16 23:33:24 2010 (r212773) @@ -106,8 +106,9 @@ aac_disk_open(struct disk *dp) /* check that the controller is up and running */ if (sc->ad_controller->aac_state & AAC_STATE_SUSPEND) { - printf("Controller Suspended controller state = 0x%x\n", - sc->ad_controller->aac_state); + device_printf(sc->ad_controller->aac_dev, + "Controller Suspended controller state = 0x%x\n", + sc->ad_controller->aac_state); return(ENXIO); } @@ -252,7 +253,8 @@ aac_disk_dump(void *arg, void *virtual, if (!first) { first = 1; if (bus_dmamap_create(sc->aac_buffer_dmat, 0, &dump_datamap)) { - printf("bus_dmamap_create failed\n"); + device_printf(sc->aac_dev, + "bus_dmamap_create failed\n"); return (ENOMEM); } } @@ -305,8 +307,9 @@ aac_disk_dump(void *arg, void *virtual, size += fib->Header.Size; if (aac_sync_fib(sc, command, 0, fib, size)) { - printf("Error dumping block 0x%jx\n", - (uintmax_t)physical); + device_printf(sc->aac_dev, + "Error dumping block 0x%jx\n", + (uintmax_t)physical); return (EIO); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 00:21:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9873B106564A; Fri, 17 Sep 2010 00:21:02 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 700328FC08; Fri, 17 Sep 2010 00:21:02 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o8H0L1OZ014002; Thu, 16 Sep 2010 17:21:01 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o8H0L1M6014001; Thu, 16 Sep 2010 17:21:01 -0700 (PDT) (envelope-from obrien) Date: Thu, 16 Sep 2010 17:21:01 -0700 From: "David O'Brien" To: Jilles Tjoelker Message-ID: <20100917002101.GA13653@dragon.NUXI.org> References: <201009091927.o89JReXm022426@svn.freebsd.org> <20100909195302.GA48144@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100909195302.GA48144@stack.nl> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 00:21:02 -0000 On Thu, Sep 09, 2010 at 09:53:02PM +0200, Jilles Tjoelker wrote: > On Thu, Sep 09, 2010 at 07:27:40PM +0000, David E. O'Brien wrote: > > +.Pp > > +Trying to print a dash ("-") as the first character causes > > +.Nm > > +to interpet the dash as a program argument. > > +.Nm -- > > +must be used before > > +.Ar format . > > I do not consider this a bug. [..] > A caveat could be added, OK, if not a bug, then can you suggest other language (and position in the man page) to give a warning or hint against something I think goes against POLA? For something that does not claim to have any command line arguments, I would not have expected getopt() to be used and thus need to escape out of its processing. > POSIX requires printf to recognize -- and > pretty much all current implementations conform to this. Please provide a reference. I am looking at 'The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition' (susv3/utilities/printf.html), and I am not seeing such language. susv3 has the synopsis as: SYNOPSIS printf format [argument...] OPERANDS The following operands shall be supported: format A string describing the format to use to write the remaining operands. See the EXTENDED DESCRIPTION section. argument The strings to be written to standard output, under the control of format. See the EXTENDED DESCRIPTION section. Interestingly, we may not be compliant with susv3 if I am reading this correctly: The printf utility is required to notify the user when conversion errors are detected while producing numeric output; thus, the following results would be expected on an implementation with 32-bit twos-complement integers when %d is specified as the format operand: Argument Standard Output Diagnostic Output 5a 5 printf: "5a" not completely converted 9999999999 2147483647 printf: "9999999999" arithmetic overflow -9999999999 -2147483648 printf: "-9999999999" arithmetic overflow ABC 0 printf: "ABC" expected numeric value $ uname -m i386 $ for A in 5a 9999999999 -9999999999 ABC do /usr/bin/printf "%d\n" $A ; done printf: 5a: not completely converted 5 9999999999 -9999999999 printf: ABC: expected numeric value 0 Though this is in the "informative" section, so maybe this is just one set of compliant output. Though It is my read that printf(1) should behave like printf(3), which the above does not for these long long int values. #include int main(void) { printf("%d\n", 9999999999); printf("%d\n", -9999999999); return 0; } -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 00:33:29 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57E651065672; Fri, 17 Sep 2010 00:33:29 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id D84B28FC08; Fri, 17 Sep 2010 00:33:28 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o8H0XSLf014292; Thu, 16 Sep 2010 17:33:28 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o8H0XSV1014291; Thu, 16 Sep 2010 17:33:28 -0700 (PDT) (envelope-from obrien) Date: Thu, 16 Sep 2010 17:33:28 -0700 From: "David O'Brien" To: Bruce Evans Message-ID: <20100917003328.GB13653@dragon.NUXI.org> References: <201009091927.o89JReXm022426@svn.freebsd.org> <20100916084442.GB21622@dragon.NUXI.org> <20100916212043.N724@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100916212043.N724@delplex.bde.org> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Juli Mallett , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 00:33:29 -0000 On Thu, Sep 16, 2010 at 09:36:43PM +1000, Bruce Evans wrote: > On Thu, 16 Sep 2010, David O'Brien wrote: >> Is a sentence or two a burden to the man page vs. saving someone the time >> I spent trying to figure out why printf(1) kept throwing up errors? > > WHat about the lesser burder on a character or two for putting -- in the > synopsis where it is more visible: > > printf [--] format [arguments ...] > > POSIX doesn't do this, and it doesn't seem to say anything about the > problem of a leading - in the format either. Presumably its general > utilities specs require _all_ utilities to support "--". That would be fine for me too, if its prefered that way. Index: printf.1 =================================================================== --- printf.1 (revision 212773) +++ printf.1 (working copy) @@ -43,6 +43,7 @@ .Nd formatted output .Sh SYNOPSIS .Nm +.Op Fl - .Ar format Op Ar arguments ... .Sh DESCRIPTION The @@ -51,6 +52,13 @@ utility formats and prints its arguments of the .Ar format . The +.Fl - +option prevents any interpretation of a leading dash ("-") character in +.Ar format +as a +.Nm +program option. +The .Ar format is a character string which contains three types of objects: plain characters, which are simply copied to standard output, character escape sequences which @@ -355,10 +363,3 @@ Multibyte characters are not recognized a problem if .Ql % can appear inside a multibyte character). -.Pp -Trying to print a dash ("-") as the first character causes -.Nm -to interpet the dash as a program argument. -.Nm -- -must be used before -.Ar format . > I wonder if > there are any utilities that don't use getopt(3) and as a result aren't > POSIX conformant since they don't support "--" and also need to support > a first argument starting with "-" (which won't cause problems because dd(1) is the only thing coming to mind, but it doesn't need to handle argments starting with "-". I believe our find(1) has a problem: $ cd /tmp $ mkdir ./- $ touch ./-/foo $ find -- - -name foo find -- - -name foo usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression] find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression] -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 01:09:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D697C10656C3; Fri, 17 Sep 2010 01:09:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABB8D8FC0C; Fri, 17 Sep 2010 01:09:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H19CDm013823; Fri, 17 Sep 2010 01:09:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H19CZP013821; Fri, 17 Sep 2010 01:09:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201009170109.o8H19CZP013821@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Sep 2010 01:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212774 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 01:09:12 -0000 Author: thompsa Date: Fri Sep 17 01:09:12 2010 New Revision: 212774 URL: http://svn.freebsd.org/changeset/base/212774 Log: Use getenv to find the mac address since it could be in the bootloader environment or command line and under different names. Modified: head/sys/mips/atheros/ar71xx_machdep.c Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Thu Sep 16 23:33:24 2010 (r212773) +++ head/sys/mips/atheros/ar71xx_machdep.c Fri Sep 17 01:09:12 2010 (r212774) @@ -145,7 +145,7 @@ platform_start(__register_t a0 __unused, { uint64_t platform_counter_freq; int argc, i, count = 0; - char **argv, **envp; + char **argv, **envp, *var; vm_offset_t kernend; /* @@ -167,19 +167,9 @@ platform_start(__register_t a0 __unused, * Protect ourselves from garbage in registers */ if (MIPS_IS_VALID_PTR(envp)) { - for (i = 0; envp[i]; i += 2) - { + for (i = 0; envp[i]; i += 2) { if (strcmp(envp[i], "memsize") == 0) realmem = btoc(strtoul(envp[i+1], NULL, 16)); - else if (strcmp(envp[i], "ethaddr") == 0) { - count = sscanf(envp[i+1], "%x.%x.%x.%x.%x.%x", - &ar711_base_mac[0], &ar711_base_mac[1], - &ar711_base_mac[2], &ar711_base_mac[3], - &ar711_base_mac[4], &ar711_base_mac[5]); - if (count < 6) - memset(ar711_base_mac, 0, - sizeof(ar711_base_mac)); - } } } @@ -245,6 +235,18 @@ platform_start(__register_t a0 __unused, else printf ("envp is invalid\n"); + if ((var = getenv("ethaddr")) != NULL || + (var = getenv("kmac")) != NULL) { + count = sscanf(var, "%x%*c%x%*c%x%*c%x%*c%x%*c%x", + &ar711_base_mac[0], &ar711_base_mac[1], + &ar711_base_mac[2], &ar711_base_mac[3], + &ar711_base_mac[4], &ar711_base_mac[5]); + if (count < 6) + memset(ar711_base_mac, 0, + sizeof(ar711_base_mac)); + freeenv(var); + } + init_param2(physmem); mips_cpu_init(); pmap_bootstrap(); From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 01:13:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B7C31065670; Fri, 17 Sep 2010 01:13:49 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2E28FC16; Fri, 17 Sep 2010 01:13:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H1DnwO013950; Fri, 17 Sep 2010 01:13:49 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H1Dn92013948; Fri, 17 Sep 2010 01:13:49 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201009170113.o8H1Dn92013948@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Sep 2010 01:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212775 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 01:13:49 -0000 Author: thompsa Date: Fri Sep 17 01:13:48 2010 New Revision: 212775 URL: http://svn.freebsd.org/changeset/base/212775 Log: Make a note of which platforms the mac strings come from. Suggested by: adrian Modified: head/sys/mips/atheros/ar71xx_machdep.c Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Fri Sep 17 01:09:12 2010 (r212774) +++ head/sys/mips/atheros/ar71xx_machdep.c Fri Sep 17 01:13:48 2010 (r212775) @@ -235,6 +235,10 @@ platform_start(__register_t a0 __unused, else printf ("envp is invalid\n"); + /* + * "ethaddr" is passed via envp on RedBoot platforms + * "kmac" is passed via argv on RouterBOOT platforms + */ if ((var = getenv("ethaddr")) != NULL || (var = getenv("kmac")) != NULL) { count = sscanf(var, "%x%*c%x%*c%x%*c%x%*c%x%*c%x", From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 02:14:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57F3F1065672; Fri, 17 Sep 2010 02:14:22 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D7CF8FC13; Fri, 17 Sep 2010 02:14:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H2EMqJ015137; Fri, 17 Sep 2010 02:14:22 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H2EMNY015135; Fri, 17 Sep 2010 02:14:22 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201009170214.o8H2EMNY015135@svn.freebsd.org> From: Neel Natu Date: Fri, 17 Sep 2010 02:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212776 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 02:14:22 -0000 Author: neel Date: Fri Sep 17 02:14:21 2010 New Revision: 212776 URL: http://svn.freebsd.org/changeset/base/212776 Log: Get rid of unused macros. Modified: head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Fri Sep 17 01:13:48 2010 (r212775) +++ head/sys/mips/include/cpuregs.h Fri Sep 17 02:14:21 2010 (r212776) @@ -58,10 +58,6 @@ #ifndef _MIPS_CPUREGS_H_ #define _MIPS_CPUREGS_H_ -#if defined(_KERNEL_OPT) -#include "opt_cputype.h" -#endif - /* * Address space. * 32-bit mips CPUS partition their 32-bit address space into four segments: @@ -71,8 +67,6 @@ * kseg1 0xa0000000 - 0xbfffffff Physical memory, uncached, unmapped * kseg2 0xc0000000 - 0xffffffff kernel-virtual, mapped * - * mips1 physical memory is limited to 512Mbytes, which is - * doubly mapped in kseg0 (cached) and kseg1 (uncached.) * Caching of mapped addresses is controlled by bits in the TLB entry. */ @@ -343,29 +337,6 @@ #define MIPS_SR_INT_IE 0x00010001 /* XXX */ #endif -/* - * These definitions are for MIPS32 processors. - */ -#define MIPS32_SR_RP 0x08000000 /* reduced power mode */ -#define MIPS32_SR_FR 0x04000000 /* 64-bit capable fpu */ -#define MIPS32_SR_RE 0x02000000 /* reverse user endian */ -#define MIPS32_SR_MX 0x01000000 /* MIPS64 */ -#define MIPS32_SR_PX 0x00800000 /* MIPS64 */ -#define MIPS32_SR_BEV 0x00400000 /* Use boot exception vector */ -#define MIPS32_SR_TS 0x00200000 /* TLB multiple match */ -#define MIPS32_SR_SOFT_RESET 0x00100000 /* soft reset occurred */ -#define MIPS32_SR_NMI 0x00080000 /* NMI occurred */ -#define MIPS32_SR_INT_MASK 0x0000ff00 -#define MIPS32_SR_KX 0x00000080 /* MIPS64 */ -#define MIPS32_SR_SX 0x00000040 /* MIPS64 */ -#define MIPS32_SR_UX 0x00000020 /* MIPS64 */ -#define MIPS32_SR_KSU_MASK 0x00000018 /* privilege mode */ -#define MIPS32_SR_KSU_USER 0x00000010 -#define MIPS32_SR_KSU_SUPER 0x00000008 -#define MIPS32_SR_KSU_KERNEL 0x00000000 -#define MIPS32_SR_ERL 0x00000004 /* error level */ -#define MIPS32_SR_EXL 0x00000002 /* exception level */ - #define MIPS_SR_SOFT_RESET MIPS3_SR_SR #define MIPS_SR_DIAG_CH MIPS3_SR_DIAG_CH #define MIPS_SR_DIAG_CE MIPS3_SR_DIAG_CE From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 02:20:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B70A11065670; Fri, 17 Sep 2010 02:20:12 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6BB28FC08; Fri, 17 Sep 2010 02:20:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H2KCeA015310; Fri, 17 Sep 2010 02:20:12 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H2KCC7015307; Fri, 17 Sep 2010 02:20:12 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201009170220.o8H2KCC7015307@svn.freebsd.org> From: Neel Natu Date: Fri, 17 Sep 2010 02:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212777 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 02:20:12 -0000 Author: neel Date: Fri Sep 17 02:20:12 2010 New Revision: 212777 URL: http://svn.freebsd.org/changeset/base/212777 Log: Get rid of the unnecessary redirection of 'is_cacheable_mem()' to 'is_physical_memory()' through a macro. Implement 'is_cacheable_mem()' directly instead. Modified: head/sys/mips/include/md_var.h head/sys/mips/mips/machdep.c Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Fri Sep 17 02:14:21 2010 (r212776) +++ head/sys/mips/include/md_var.h Fri Sep 17 02:20:12 2010 (r212777) @@ -52,11 +52,9 @@ void cpu_swapin(struct proc *); uintptr_t MipsEmulateBranch(struct trapframe *, uintptr_t, int, uintptr_t); void MipsSwitchFPState(struct thread *, struct trapframe *); u_long kvtop(void *addr); -int is_physical_memory(vm_offset_t addr); +int is_cacheable_mem(vm_offset_t addr); void mips_generic_reset(void); -#define is_cacheable_mem(pa) is_physical_memory((pa)) - #define MIPS_DEBUG 0 #if MIPS_DEBUG Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri Sep 17 02:14:21 2010 (r212776) +++ head/sys/mips/mips/machdep.c Fri Sep 17 02:20:12 2010 (r212777) @@ -497,7 +497,7 @@ cpu_idle_wakeup(int cpu) } int -is_physical_memory(vm_offset_t addr) +is_cacheable_mem(vm_offset_t addr) { int i; From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 02:55:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9FD91065670; Fri, 17 Sep 2010 02:55:07 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 3586C8FC08; Fri, 17 Sep 2010 02:55:06 +0000 (UTC) Received: by qyk31 with SMTP id 31so351407qyk.13 for ; Thu, 16 Sep 2010 19:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wB/xaDFrF/u7defmOmYyNymSu9gpBwlzsAkWcg/EFDg=; b=othKVOWQpaTAQyfKTRyeVP3T5Ibtqzbq+YCfjZDwsjeiYomMYaVJ2ji7yYCpGJ5xyg lJLDx6yd605dvDWw1O9cLf2OGj//pDRIoEnXKnwmTnP+ljDavoF0OiBys72tRt95jnKn er7vKfZj3armwe9cA78HNuYMlw5wIDqk8uQ4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=t3mHasMx41T+xBHQifmvGW39Ldq+/Dc9j3SFaaaOsGKoZb91LqJ/Iqr/lyDlABmnQi IabwWBLJOVq02DPG6t4+yPc6kahvXb2mOjMob711gWU7XxfQbvf8NdHRPEjrLos2Q0VL 2n+4OTnI5AF0flxMbd2CxgPfq0t+qgE3Eur4k= MIME-Version: 1.0 Received: by 10.224.97.15 with SMTP id j15mr2819239qan.199.1284690578351; Thu, 16 Sep 2010 19:29:38 -0700 (PDT) Received: by 10.229.211.9 with HTTP; Thu, 16 Sep 2010 19:29:38 -0700 (PDT) In-Reply-To: <20100916014404.0409017f@dev.lan.Awfulhak.org> References: <201009141804.o8EI45kp088466@svn.freebsd.org> <20100916014404.0409017f@dev.lan.Awfulhak.org> Date: Thu, 16 Sep 2010 23:29:38 -0300 Message-ID: From: "Carlos A. M. dos Santos" To: Brian Somers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kirk McKusick Subject: Re: svn commit: r212617 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 02:55:08 -0000 On Thu, Sep 16, 2010 at 5:44 AM, Brian Somers wrote: > On Tue, 14 Sep 2010 18:04:05 +0000 (UTC) Kirk McKusick wrote: >> Author: mckusick >> Date: Tue Sep 14 18:04:05 2010 >> New Revision: 212617 >> URL: http://svn.freebsd.org/changeset/base/212617 >> >> Log: >> =A0 Update comments in soft updates code to more fully describe >> =A0 the addition of journalling. Only functional change is to >> =A0 tighten a KASSERT. >> >> =A0 Reviewed by: =A0 =A0 =A0 =A0jeff Roberson >> >> Modified: >> =A0 head/sys/ufs/ffs/ffs_softdep.c >> =A0 head/sys/ufs/ffs/fs.h >> =A0 head/sys/ufs/ffs/softdep.h >> >> Modified: head/sys/ufs/ffs/ffs_softdep.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/ufs/ffs/ffs_softdep.c =A0 =A0Tue Sep 14 17:22:06 2010 =A0 = =A0 =A0 =A0(r212616) >> +++ head/sys/ufs/ffs/ffs_softdep.c =A0 =A0Tue Sep 14 18:04:05 2010 =A0 = =A0 =A0 =A0(r212617) >> @@ -2378,7 +2378,8 @@ remove_from_journal(wk) >> =A0 =A0 =A0 /* >> =A0 =A0 =A0 =A0* We emulate a TAILQ to save space in most structures whi= ch do not >> =A0 =A0 =A0 =A0* require TAILQ semantics. =A0Here we must update the tai= l position >> - =A0 =A0 =A0* when removing the tail which is not the final entry. >> + =A0 =A0 =A0* when removing the tail which is not the final entry. This= works >> + =A0 =A0 =A0* only if the worklist linkage are at the beginning of the = structure. >> =A0 =A0 =A0 =A0*/ >> =A0 =A0 =A0 if (ump->softdep_journal_tail =3D=3D wk) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ump->softdep_journal_tail =3D >> @@ -2605,7 +2606,7 @@ jremref_write(jremref, jseg, data) >> =A0 =A0 =A0 inoref_write(&jremref->jr_ref, jseg, rec); >> =A0} >> >> -static =A0 =A0 =A0 void >> +static void >> =A0jmvref_write(jmvref, jseg, data) >> =A0 =A0 =A0 struct jmvref *jmvref; >> =A0 =A0 =A0 struct jseg *jseg; >> @@ -2906,9 +2907,9 @@ complete_jseg(jseg) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 waiting =3D wk->wk_state & IOWAITING; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 wk->wk_state &=3D ~(IOSTARTED | IOWAITING); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 wk->wk_state |=3D COMPLETE; >> - =A0 =A0 =A0 =A0 =A0 =A0 KASSERT(i < jseg->js_cnt, >> + =A0 =A0 =A0 =A0 =A0 =A0 KASSERT(i++ < jseg->js_cnt, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("handle_written_jseg: overflow %d >= =3D %d", > [.....] > > If INVARIANTS is not defined, the above i++ will not happen. Which does not cause any harm, since "i" is a local variable, not used anywhere else in the function. A picky compiler would complain, however, that the variable is never read. From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 03:10:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A2051065673 for ; Fri, 17 Sep 2010 03:10:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8930C8FC1B for ; Fri, 17 Sep 2010 03:10:40 +0000 (UTC) Received: (qmail 23003 invoked by uid 399); 17 Sep 2010 03:10:39 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 17 Sep 2010 03:10:39 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C92DC2E.2020602@FreeBSD.org> Date: Thu, 16 Sep 2010 20:10:38 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: "Carlos A. M. dos Santos" References: <201009141804.o8EI45kp088466@svn.freebsd.org> <20100916014404.0409017f@dev.lan.Awfulhak.org> In-Reply-To: X-Enigmail-Version: 1.1.1 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, Brian Somers , Kirk McKusick Subject: Re: svn commit: r212617 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 03:10:41 -0000 On 9/16/2010 7:29 PM, Carlos A. M. dos Santos wrote: > On Thu, Sep 16, 2010 at 5:44 AM, Brian Somers wrote: >> If INVARIANTS is not defined, the above i++ will not happen. > > Which does not cause any harm, since "i" is a local variable, not used > anywhere else in the function. A picky compiler would complain, > however, that the variable is never read. If 'i' is only ever used in the INVARIANTS case then it should be appropriately wrapped everywhere it appears. While the _current_ situation may be harmless, in the future lack of an appropriate indication of its use may cause a problem. This isn't just a pedantic concern, we had a case like this that broke the build just recently. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 04:48:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1476C106564A; Fri, 17 Sep 2010 04:48:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 043E58FC24; Fri, 17 Sep 2010 04:48:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H4mo0a018438; Fri, 17 Sep 2010 04:48:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H4mo04018436; Fri, 17 Sep 2010 04:48:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009170448.o8H4mo04018436@svn.freebsd.org> From: Alexander Motin Date: Fri, 17 Sep 2010 04:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212778 - head/sys/x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 04:48:51 -0000 Author: mav Date: Fri Sep 17 04:48:50 2010 New Revision: 212778 URL: http://svn.freebsd.org/changeset/base/212778 Log: Add one-shot mode support to attimer (i8254) event timer. Unluckily, using one-shot mode is impossible, when same hardware used for time counting. Introduce new tunable hint.attimer.0.timecounter, setting which to 0 disables i8254 time counter and allows one-shot mode. Note, that on some systems there may be no other reliable enough time counters, so this tunable should be used with understanding. Modified: head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Fri Sep 17 02:20:12 2010 (r212777) +++ head/sys/x86/isa/clock.c Fri Sep 17 04:48:50 2010 (r212778) @@ -95,7 +95,7 @@ int clkintr_pending; u_int i8254_freq = TIMER_FREQ; TUNABLE_INT("hw.i8254.freq", &i8254_freq); int i8254_max_count; -static int i8254_real_max_count; +static int i8254_timecounter = 1; struct mtx clock_lock; static struct intsrc *i8254_intsrc; @@ -116,7 +116,11 @@ struct attimer_softc { void *intr_handler; struct timecounter tc; struct eventtimer et; - uint32_t intr_period; + int mode; +#define MODE_STOP 0 +#define MODE_PERIODIC 1 +#define MODE_ONESHOT 2 + uint32_t period; }; static struct attimer_softc *attimer_sc = NULL; @@ -129,14 +133,14 @@ static struct attimer_softc *attimer_sc static u_char timer2_state; static unsigned i8254_get_timecount(struct timecounter *tc); -static void set_i8254_freq(u_int freq, uint32_t intr_period); +static void set_i8254_freq(int mode, uint32_t period); static int clkintr(void *arg) { struct attimer_softc *sc = (struct attimer_softc *)arg; - if (sc->intr_period != 0) { + if (i8254_timecounter && sc->period != 0) { mtx_lock_spin(&clock_lock); if (i8254_ticked) i8254_ticked = 0; @@ -148,7 +152,7 @@ clkintr(void *arg) mtx_unlock_spin(&clock_lock); } - if (sc && sc->et.et_active) + if (sc && sc->et.et_active && sc->mode != MODE_STOP) sc->et.et_event_cb(&sc->et, sc->et.et_arg); #ifdef DEV_MCA @@ -361,27 +365,37 @@ DELAY(int n) } static void -set_i8254_freq(u_int freq, uint32_t intr_period) +set_i8254_freq(int mode, uint32_t period) { - int new_i8254_real_max_count; + int val; mtx_lock_spin(&clock_lock); - i8254_freq = freq; - if (intr_period == 0) - new_i8254_real_max_count = 0x10000; - else { - new_i8254_real_max_count = - min(((uint64_t)i8254_freq * intr_period) >> 32, 0x10000); - } - if (new_i8254_real_max_count != i8254_real_max_count) { - i8254_real_max_count = new_i8254_real_max_count; - if (i8254_real_max_count == 0x10000) - i8254_max_count = 0xffff; - else - i8254_max_count = i8254_real_max_count; + if (period == 0) + val = 0x10000; + else + val = min(((uint64_t)i8254_freq * period) >> 32, 0x10000); + if (val == 0x10000) + i8254_max_count = 0xffff; + else + i8254_max_count = val; + if (mode == MODE_STOP && i8254_timecounter) + mode = MODE_PERIODIC; + switch (mode) { + case MODE_STOP: + outb(TIMER_MODE, TIMER_SEL0 | TIMER_INTTC | TIMER_16BIT); + outb(TIMER_CNTR0, 0xff); + outb(TIMER_CNTR0, 0xff); + break; + case MODE_PERIODIC: outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); - outb(TIMER_CNTR0, i8254_real_max_count & 0xff); - outb(TIMER_CNTR0, i8254_real_max_count >> 8); + outb(TIMER_CNTR0, val & 0xff); + outb(TIMER_CNTR0, val >> 8); + break; + case MODE_ONESHOT: + outb(TIMER_MODE, TIMER_SEL0 | TIMER_INTTC | TIMER_16BIT); + outb(TIMER_CNTR0, val & 0xff); + outb(TIMER_CNTR0, val >> 8); + break; } mtx_unlock_spin(&clock_lock); } @@ -390,11 +404,10 @@ static void i8254_restore(void) { - mtx_lock_spin(&clock_lock); - outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); - outb(TIMER_CNTR0, i8254_real_max_count & 0xff); - outb(TIMER_CNTR0, i8254_real_max_count >> 8); - mtx_unlock_spin(&clock_lock); + if (attimer_sc) + set_i8254_freq(attimer_sc->mode, attimer_sc->period); + else + set_i8254_freq(0, 0); } #ifndef __amd64__ @@ -428,7 +441,7 @@ i8254_init(void) if (pc98_machine_type & M_8M) i8254_freq = 1996800L; /* 1.9968 MHz */ #endif - set_i8254_freq(i8254_freq, 0); + set_i8254_freq(0, 0); } void @@ -459,11 +472,12 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER freq = i8254_freq; error = sysctl_handle_int(oidp, &freq, 0, req); if (error == 0 && req->newptr != NULL) { + i8254_freq = freq; if (attimer_sc) { - set_i8254_freq(freq, attimer_sc->intr_period); + set_i8254_freq(attimer_sc->mode, attimer_sc->period); attimer_sc->tc.tc_frequency = freq; } else { - set_i8254_freq(freq, 0); + set_i8254_freq(0, 0); } } return (error); @@ -481,7 +495,7 @@ i8254_get_timecount(struct timecounter * uint16_t count; u_int high, low; - if (sc->intr_period == 0) + if (sc->period == 0) return (i8254_max_count - getit()); #ifdef __amd64__ @@ -517,13 +531,19 @@ attimer_start(struct eventtimer *et, { device_t dev = (device_t)et->et_priv; struct attimer_softc *sc = device_get_softc(dev); - - sc->intr_period = period->frac >> 32; - set_i8254_freq(i8254_freq, sc->intr_period); + + if (period != NULL) { + sc->mode = MODE_PERIODIC; + sc->period = period->frac >> 32; + } else { + sc->mode = MODE_ONESHOT; + sc->period = first->frac >> 32; + } if (!sc->intr_en) { i8254_intsrc->is_pic->pic_enable_source(i8254_intsrc); sc->intr_en = 1; } + set_i8254_freq(sc->mode, sc->period); return (0); } @@ -533,8 +553,9 @@ attimer_stop(struct eventtimer *et) device_t dev = (device_t)et->et_priv; struct attimer_softc *sc = device_get_softc(dev); - sc->intr_period = 0; - set_i8254_freq(i8254_freq, sc->intr_period); + sc->mode = MODE_STOP; + sc->period = 0; + set_i8254_freq(sc->mode, sc->period); return (0); } @@ -630,14 +651,18 @@ attimer_attach(device_t dev) i8254_intsrc = intr_lookup_source(0); if (i8254_intsrc != NULL) i8254_pending = i8254_intsrc->is_pic->pic_source_pending; - set_i8254_freq(i8254_freq, 0); - sc->tc.tc_get_timecount = i8254_get_timecount; - sc->tc.tc_counter_mask = 0xffff; - sc->tc.tc_frequency = i8254_freq; - sc->tc.tc_name = "i8254"; - sc->tc.tc_quality = 0; - sc->tc.tc_priv = dev; - tc_init(&sc->tc); + resource_int_value(device_get_name(dev), device_get_unit(dev), + "timecounter", &i8254_timecounter); + set_i8254_freq(0, 0); + if (i8254_timecounter) { + sc->tc.tc_get_timecount = i8254_get_timecount; + sc->tc.tc_counter_mask = 0xffff; + sc->tc.tc_frequency = i8254_freq; + sc->tc.tc_name = "i8254"; + sc->tc.tc_quality = 0; + sc->tc.tc_priv = dev; + tc_init(&sc->tc); + } if (resource_int_value(device_get_name(dev), device_get_unit(dev), "clock", &i) != 0 || i != 0) { sc->intr_rid = 0; @@ -663,6 +688,8 @@ attimer_attach(device_t dev) i8254_intsrc->is_pic->pic_enable_intr(i8254_intsrc); sc->et.et_name = "i8254"; sc->et.et_flags = ET_FLAGS_PERIODIC; + if (!i8254_timecounter) + sc->et.et_flags |= ET_FLAGS_ONESHOT; sc->et.et_quality = 100; sc->et.et_frequency = i8254_freq; sc->et.et_min_period.sec = 0; From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 04:55:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CBF4106566C; Fri, 17 Sep 2010 04:55:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 387928FC08; Fri, 17 Sep 2010 04:55:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H4t2hF018596; Fri, 17 Sep 2010 04:55:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H4t2M4018591; Fri, 17 Sep 2010 04:55:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009170455.o8H4t2M4018591@svn.freebsd.org> From: Alexander Motin Date: Fri, 17 Sep 2010 04:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212779 - in head/share/man: man4 man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 04:55:02 -0000 Author: mav Date: Fri Sep 17 04:55:01 2010 New Revision: 212779 URL: http://svn.freebsd.org/changeset/base/212779 Log: Add attimer(4) manual page. Added: head/share/man/man4/attimer.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/hpet.4 head/share/man/man7/eventtimers.7 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Sep 17 04:48:50 2010 (r212778) +++ head/share/man/man4/Makefile Fri Sep 17 04:55:01 2010 (r212779) @@ -50,6 +50,7 @@ MAN= aac.4 \ atkbd.4 \ atkbdc.4 \ ${_atp.4} \ + ${attimer.4} \ audit.4 \ auditpipe.4 \ aue.4 \ @@ -547,6 +548,7 @@ MLINKS+=hatm.4 if_hatm.4 MLINKS+=hme.4 if_hme.4 MLINKS+=hpet.4 acpi_hpet.4 MLINKS+=${_hptrr.4} ${_rr232x.4} +MLINKS+=${_attimer.4} ${_i8254.4} MLINKS+=idt.4 if_idt.4 MLINKS+=igb.4 if_igb.4 MLINKS+=ip.4 rawip.4 @@ -643,6 +645,7 @@ _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aesni.4= aesni.4 +_attimer.4= attimer.4 _aibs.4= aibs.4 _amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 @@ -655,6 +658,7 @@ _dpms.4= dpms.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 +_i8254.4= i8254.4 _ichwd.4= ichwd.4 _if_ndis.4= if_ndis.4 _if_nfe.4= if_nfe.4 Added: head/share/man/man4/attimer.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/attimer.4 Fri Sep 17 04:55:01 2010 (r212779) @@ -0,0 +1,69 @@ +.\" Copyright (c) 2010 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 14, 2010 +.Dt attimer 4 +.Os +.Sh NAME +.Nm attimer +.Nd i8254 Programmable Interval Timer (AT Timer) driver +.Sh SYNOPSIS +This driver is a mandatory part of x86 kernels. +.Pp +The following tunables are settable from the +.Xr loader 8 : +.Bl -ohang +.It Va hint.attimer. Ns Ar X Ns Va .clock +controls event timers functionality support. Setting to 0, disables it. +Default value is 1. +.It Va hint.attimer. Ns Ar X Ns Va .timecounter +controls time counter functionality support. Setting to 0, disables it. +Default value is 1. +.El +.Sh DESCRIPTION +This driver uses i8254 Programmable Interval Timer (AT Timer) hardware +to supply kernel with one time counter and one event timer, and generate +sound tones for system speaker. +This hardware includes three channels. +Each channel includes 16bit counter, counting down with known, +platform-dependent frequency. +Counters can operate in several different modes, including periodic and +one-shot. +Output of each channel has platform-defined wiring: one channel is wired +to the interrupt controller and may be used as event timer, one channel is +wired to speaker and used to generate sound tones, and one timer is reserved +for platform purposes. +.Pp +Driver uses single hardware channel to provide both time counter and event +timer functionality. +To make it possible, respective counter must be running in periodic more. +As result, one-shot event timer mode supported only when time counter +functionality is disabled. +.Pp +Event timer provided by the driver is irrelevant to CPU power states. +.Sh SEE ALSO +.Xr hpet 4 , +.Xr eventtimers 7 Modified: head/share/man/man4/hpet.4 ============================================================================== --- head/share/man/man4/hpet.4 Fri Sep 17 04:48:50 2010 (r212778) +++ head/share/man/man4/hpet.4 Fri Sep 17 04:55:01 2010 (r212779) @@ -94,6 +94,7 @@ group is bound to specific CPU core. Thi of these comparators has own unsharable IRQ. .Sh SEE ALSO .Xr acpi 4 , +.Xr attimer 4 , .Xr eventtimers 7 .Sh HISTORY The Modified: head/share/man/man7/eventtimers.7 ============================================================================== --- head/share/man/man7/eventtimers.7 Fri Sep 17 04:48:50 2010 (r212778) +++ head/share/man/man7/eventtimers.7 Fri Sep 17 04:55:01 2010 (r212779) @@ -128,4 +128,5 @@ and runs in periodic mode, this option h always generating. .El .Sh SEE ALSO +.Xr attimer 4 , .Xr hpet 4 From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 06:28:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 154D61065693; Fri, 17 Sep 2010 06:28:51 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E83A38FC1C; Fri, 17 Sep 2010 06:28:49 +0000 (UTC) Received: by bwz15 with SMTP id 15so2986695bwz.13 for ; Thu, 16 Sep 2010 23:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=Ohb8aQYcqDzRVg5ZwX5/VqhaDeKsE5opbEP9erzwu8E=; b=JolJAS+qErto9Znb8EKvvey9OkTqWgOBZZNyc5BTbu/JpRHPfBioOLfSmdgS4lr5di qVOCnw17HsOwao9FpekEOXgT3niQVtVMnG696oSbGgq1YQQCX5m7bysFx1qfV5062hrv IplXwnp72Hjif994l5rZHmk2+fewwV96xtx6A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=SiXkpbhLEZ61zN4KShIhuuX3Yu/JyuY1HJ7XbH/oi91ut+45jPi9HJrY4l/nmEFKNB nXh8jh7RnpT+7nafHh7KFNo4DJK9TRt5vv7xNudsHtQD92zaXN9CC4bFRF6fjwIn+Q4T WIFsc/xZubc8VpgMrlT/xxPwuGKrL78kzR2w0= Received: by 10.204.179.194 with SMTP id br2mr3276586bkb.196.1284704928821; Thu, 16 Sep 2010 23:28:48 -0700 (PDT) Received: from localhost (tor-exit-proxy2-readme.formlessnetworking.net [208.53.142.38]) by mx.google.com with ESMTPS id y19sm3272280bkw.18.2010.09.16.23.28.45 (version=SSLv3 cipher=RC4-MD5); Thu, 16 Sep 2010 23:28:46 -0700 (PDT) From: Anonymous To: Alexander Motin References: <201009170455.o8H4t2M4018591@svn.freebsd.org> Date: Fri, 17 Sep 2010 10:27:19 +0400 In-Reply-To: <201009170455.o8H4t2M4018591@svn.freebsd.org> (Alexander Motin's message of "Fri, 17 Sep 2010 04:55:02 +0000 (UTC)") Message-ID: <86bp7wc2bc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212779 - in head/share/man: man4 man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 06:28:51 -0000 Alexander Motin writes: > Author: mav > Date: Fri Sep 17 04:55:01 2010 > New Revision: 212779 > URL: http://svn.freebsd.org/changeset/base/212779 > > Log: > Add attimer(4) manual page. > [...] > --- head/share/man/man4/Makefile Fri Sep 17 04:48:50 2010 (r212778) > +++ head/share/man/man4/Makefile Fri Sep 17 04:55:01 2010 (r212779) > @@ -50,6 +50,7 @@ MAN= aac.4 \ > atkbd.4 \ > atkbdc.4 \ > ${_atp.4} \ > + ${attimer.4} \ Typo: ${attimer.4} vs. ${_attimer.4} From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:14:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FB891065672; Fri, 17 Sep 2010 07:14:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8D98FC16; Fri, 17 Sep 2010 07:14:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H7E7Mi021548; Fri, 17 Sep 2010 07:14:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7E7qL021546; Fri, 17 Sep 2010 07:14:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009170714.o8H7E7qL021546@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Sep 2010 07:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212780 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 07:14:07 -0000 Author: avg Date: Fri Sep 17 07:14:07 2010 New Revision: 212780 URL: http://svn.freebsd.org/changeset/base/212780 Log: zfs arc_reclaim_needed: more reasonable threshold for available pages vm_paging_target() is not a trigger of any kind for pageademon, but rather a "soft" target for it when it's already triggered. Thus, trying to keep 2048 pages above that level at the expense of ARC was simply driving ARC size into the ground even with normal memory loads. Instead, use a threshold at which a pagedaemon scan is triggered, so that ARC reclaiming helps with pagedaemon's task, but the latter still recycles active and inactive pages. PR: kern/146410, kern/138790 MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 04:55:01 2010 (r212779) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:14:07 2010 (r212780) @@ -2161,10 +2161,10 @@ arc_reclaim_needed(void) return (0); /* - * If pages are needed or we're within 2048 pages - * of needing to page need to reclaim + * Cooperate with pagedaemon when it's time for it to scan + * and reclaim some pages. */ - if (vm_pages_needed || (vm_paging_target() > -2048)) + if (vm_paging_need()) return (1); #if 0 From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:17:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D95AD1065670; Fri, 17 Sep 2010 07:17:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C989B8FC14; Fri, 17 Sep 2010 07:17:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H7Hcb7021673; Fri, 17 Sep 2010 07:17:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7HcKJ021671; Fri, 17 Sep 2010 07:17:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009170717.o8H7HcKJ021671@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Sep 2010 07:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212781 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 07:17:38 -0000 Author: avg Date: Fri Sep 17 07:17:38 2010 New Revision: 212781 URL: http://svn.freebsd.org/changeset/base/212781 Log: zfs arc_reclaim_needed: remove redundant checks for arc_c_max and arc_c_max Those checks are not present in upstream code and they are enforced in actual calculations of delta by which ARC size can be grown or should be reduced. MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:14:07 2010 (r212780) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:17:38 2010 (r212781) @@ -2155,10 +2155,6 @@ arc_reclaim_needed(void) #ifdef _KERNEL if (needfree) return (1); - if (arc_size > arc_c_max) - return (1); - if (arc_size <= arc_c_min) - return (0); /* * Cooperate with pagedaemon when it's time for it to scan From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:20:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75E31106566C; Fri, 17 Sep 2010 07:20:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 660368FC16; Fri, 17 Sep 2010 07:20:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H7KK0P021763; Fri, 17 Sep 2010 07:20:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7KKfm021761; Fri, 17 Sep 2010 07:20:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009170720.o8H7KKfm021761@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Sep 2010 07:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212782 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 07:20:20 -0000 Author: avg Date: Fri Sep 17 07:20:20 2010 New Revision: 212782 URL: http://svn.freebsd.org/changeset/base/212782 Log: zfs+sendfile: advance uio_offset upon reading as well Picked from analogous code in tmpfs. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 17 07:17:38 2010 (r212781) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 17 07:20:20 2010 (r212782) @@ -523,8 +523,10 @@ again: if (error == 0) vm_page_set_valid(m, off, bytes); vm_page_wakeup(m); - if (error == 0) + if (error == 0) { uio->uio_resid -= bytes; + uio->uio_offset += bytes; + } } else { dirbytes += bytes; } From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:34:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF8591065672; Fri, 17 Sep 2010 07:34:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF35B8FC12; Fri, 17 Sep 2010 07:34:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H7Yoca022187; Fri, 17 Sep 2010 07:34:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7Yogp022185; Fri, 17 Sep 2010 07:34:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009170734.o8H7Yogp022185@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Sep 2010 07:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212783 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 07:34:51 -0000 Author: avg Date: Fri Sep 17 07:34:50 2010 New Revision: 212783 URL: http://svn.freebsd.org/changeset/base/212783 Log: zfs arc_reclaim_needed: fix typo in mismerge in r212780 PR: kern/146410, kern/138790 MFC after: 3 weeks X-MFC with: r212780 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:20:20 2010 (r212782) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:34:50 2010 (r212783) @@ -2160,7 +2160,7 @@ arc_reclaim_needed(void) * Cooperate with pagedaemon when it's time for it to scan * and reclaim some pages. */ - if (vm_paging_need()) + if (vm_paging_needed()) return (1); #if 0 From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:36:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E8171065672; Fri, 17 Sep 2010 07:36:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE508FC19; Fri, 17 Sep 2010 07:36:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H7aWdA022262; Fri, 17 Sep 2010 07:36:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7aWno022260; Fri, 17 Sep 2010 07:36:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009170736.o8H7aWno022260@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Sep 2010 07:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212784 - head/sys/amd64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 07:36:32 -0000 Author: avg Date: Fri Sep 17 07:36:32 2010 New Revision: 212784 URL: http://svn.freebsd.org/changeset/base/212784 Log: amd64: reduce VM_KMEM_SIZE_SCALE to 1 allowing kernel to use more memory KVA space is abundant on amd64, so there is no reason to limit kernel map size to a fraction of available physical memory. In fact, it could be larger than physical memory. This should help with memory auto-tuning for ZFS and shouldn't affect other workloads. This should reduce number of circumstances for "kmem_map too small" panics, but probably won't eliminate them entirely due to potential kmem fragmentation. In fact, you might want/need to limit maximum ARC size after this commit if you need to resrve more memory for applications. This change was discussed on arch@ and nobody said "don't do it". MFC after: 6 weeks Modified: head/sys/amd64/include/vmparam.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Fri Sep 17 07:34:50 2010 (r212783) +++ head/sys/amd64/include/vmparam.h Fri Sep 17 07:36:32 2010 (r212784) @@ -205,7 +205,7 @@ * is the total KVA space allocated for kmem_map. */ #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#define VM_KMEM_SIZE_SCALE (1) #endif /* From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:40:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 816141065670; Fri, 17 Sep 2010 07:40:02 +0000 (UTC) (envelope-from jhay@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71E7E8FC1B; Fri, 17 Sep 2010 07:40:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H7e22M022402; Fri, 17 Sep 2010 07:40:02 GMT (envelope-from jhay@svn.freebsd.org) Received: (from jhay@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7e2Z7022400; Fri, 17 Sep 2010 07:40:02 GMT (envelope-from jhay@svn.freebsd.org) Message-Id: <201009170740.o8H7e2Z7022400@svn.freebsd.org> From: John Hay Date: Fri, 17 Sep 2010 07:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212785 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 07:40:02 -0000 Author: jhay Date: Fri Sep 17 07:40:02 2010 New Revision: 212785 URL: http://svn.freebsd.org/changeset/base/212785 Log: Chase the ports list to make snapshots work again with NOPORTS set. Modified: head/release/Makefile.inc.docports Modified: head/release/Makefile.inc.docports ============================================================================== --- head/release/Makefile.inc.docports Fri Sep 17 07:36:32 2010 (r212784) +++ head/release/Makefile.inc.docports Fri Sep 17 07:40:02 2010 (r212785) @@ -26,9 +26,12 @@ MINIMALDOCPORTS= \ MINIMALDOCPORTS+= \ ports/archivers/unzip \ ports/converters/libiconv \ + ports/devel/autoconf267 \ + ports/devel/autoconf-wrapper \ ports/devel/gettext \ ports/devel/gmake \ - ports/devel/libtool15 \ + ports/devel/libtool22 \ + ports/devel/m4 \ ports/devel/pkg-config \ ports/graphics/gd \ ports/graphics/jbigkit \ @@ -37,6 +40,7 @@ MINIMALDOCPORTS+= \ ports/graphics/png \ ports/graphics/scr2png \ ports/graphics/tiff \ + ports/misc/help2man \ ports/print/freetype2 \ ports/print/ghostscript8 \ ports/print/ghostscript8-nox11 \ From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 07:44:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8479210656A4; Fri, 17 Sep 2010 07:44:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4EA8FC14; Fri, 17 Sep 2010 07:44:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H7i1Xi022533; Fri, 17 Sep 2010 07:44:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H7i1vd022524; Fri, 17 Sep 2010 07:44:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009170744.o8H7i1vd022524@svn.freebsd.org> From: Alexander Motin Date: Fri, 17 Sep 2010 07:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212786 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 07:44:01 -0000 Author: mav Date: Fri Sep 17 07:44:01 2010 New Revision: 212786 URL: http://svn.freebsd.org/changeset/base/212786 Log: Fix typo ${attimer.4} -> ${_attimer.4}. Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Sep 17 07:40:02 2010 (r212785) +++ head/share/man/man4/Makefile Fri Sep 17 07:44:01 2010 (r212786) @@ -50,7 +50,7 @@ MAN= aac.4 \ atkbd.4 \ atkbdc.4 \ ${_atp.4} \ - ${attimer.4} \ + ${_attimer.4} \ audit.4 \ auditpipe.4 \ aue.4 \ From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 08:44:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E18B61065672; Fri, 17 Sep 2010 08:44:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFBFF8FC17; Fri, 17 Sep 2010 08:44:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H8isjv023956; Fri, 17 Sep 2010 08:44:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H8isW5023950; Fri, 17 Sep 2010 08:44:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009170844.o8H8isW5023950@svn.freebsd.org> From: Alexander Motin Date: Fri, 17 Sep 2010 08:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212787 - in head/share/man: man4 man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 08:44:55 -0000 Author: mav Date: Fri Sep 17 08:44:54 2010 New Revision: 212787 URL: http://svn.freebsd.org/changeset/base/212787 Log: Add atrtc(4) manual page. Added: head/share/man/man4/atrtc.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/attimer.4 head/share/man/man4/hpet.4 head/share/man/man7/eventtimers.7 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Sep 17 07:44:01 2010 (r212786) +++ head/share/man/man4/Makefile Fri Sep 17 08:44:54 2010 (r212787) @@ -50,6 +50,7 @@ MAN= aac.4 \ atkbd.4 \ atkbdc.4 \ ${_atp.4} \ + ${_atrtc.4} \ ${_attimer.4} \ audit.4 \ auditpipe.4 \ @@ -645,6 +646,7 @@ _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aesni.4= aesni.4 +_atrtc.4= atrtc.4 _attimer.4= attimer.4 _aibs.4= aibs.4 _amdsbwd.4= amdsbwd.4 Added: head/share/man/man4/atrtc.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/atrtc.4 Fri Sep 17 08:44:54 2010 (r212787) @@ -0,0 +1,56 @@ +.\" Copyright (c) 2010 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 17, 2010 +.Dt atrtc 4 +.Os +.Sh NAME +.Nm atrtc +.Nd AT Real-Time Clock (RTC) driver +.Sh SYNOPSIS +This driver is a mandatory part of i386/amd64 kernels. +.Pp +The following tunable is settable from the +.Xr loader 8 : +.Bl -ohang +.It Va hint.atrtc. Ns Ar X Ns Va .clock +controls event timers functionality support. Setting to 0, disables it. +Default value is 1. +.El +.Sh DESCRIPTION +This driver uses RTC hardware to supply kernel with time-of-day clock +with 1 second resolution and one event timer. +This hardware uses base frequency of 32768Hz for advancing time-of-day clock +and generating periodic interrupts. +Interrupts could be generated with fixed number of frequencies, from 2Hz to +8192Hz, obtained by dividing base frequency by one of supported power-of-2 +divisors. +.Pp +Event timer provided by the driver is irrelevant to CPU power states. +.Sh SEE ALSO +.Xr attimer 4 , +.Xr hpet 4 , +.Xr eventtimers 7 Modified: head/share/man/man4/attimer.4 ============================================================================== --- head/share/man/man4/attimer.4 Fri Sep 17 07:44:01 2010 (r212786) +++ head/share/man/man4/attimer.4 Fri Sep 17 08:44:54 2010 (r212787) @@ -65,5 +65,6 @@ functionality is disabled. .Pp Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO +.Xr atrtc 4 , .Xr hpet 4 , .Xr eventtimers 7 Modified: head/share/man/man4/hpet.4 ============================================================================== --- head/share/man/man4/hpet.4 Fri Sep 17 07:44:01 2010 (r212786) +++ head/share/man/man4/hpet.4 Fri Sep 17 08:44:54 2010 (r212787) @@ -94,6 +94,7 @@ group is bound to specific CPU core. Thi of these comparators has own unsharable IRQ. .Sh SEE ALSO .Xr acpi 4 , +.Xr atrtc 4 , .Xr attimer 4 , .Xr eventtimers 7 .Sh HISTORY Modified: head/share/man/man7/eventtimers.7 ============================================================================== --- head/share/man/man7/eventtimers.7 Fri Sep 17 07:44:01 2010 (r212786) +++ head/share/man/man7/eventtimers.7 Fri Sep 17 08:44:54 2010 (r212787) @@ -129,4 +129,5 @@ always generating. .El .Sh SEE ALSO .Xr attimer 4 , +.Xr atrtc 4 , .Xr hpet 4 From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 09:14:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81BF410656C2; Fri, 17 Sep 2010 09:14:40 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FEA38FC12; Fri, 17 Sep 2010 09:14:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H9EeoN024636; Fri, 17 Sep 2010 09:14:40 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H9EeXr024634; Fri, 17 Sep 2010 09:14:40 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201009170914.o8H9EeXr024634@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 17 Sep 2010 09:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212788 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 09:14:40 -0000 Author: obrien Date: Fri Sep 17 09:14:40 2010 New Revision: 212788 URL: http://svn.freebsd.org/changeset/base/212788 Log: Correct some non-code typos. Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 17 08:44:54 2010 (r212787) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 17 09:14:40 2010 (r212788) @@ -318,7 +318,7 @@ ffs_mount(struct mount *mp) fs->fs_fsmnt); if (fs->fs_flags & FS_SUJ) printf( -"WARNING: Forced mount will invalidated journal contents\n"); +"WARNING: Forced mount will invalidate journal contents\n"); return (EPERM); } } @@ -362,7 +362,7 @@ ffs_mount(struct mount *mp) * Soft updates is incompatible with "async", * so if we are doing softupdates stop the user * from setting the async flag in an update. - * Softdep_mount() clears it in an initial mount + * Softdep_mount() clears it in an initial mount * or ro->rw remount. */ if (mp->mnt_flag & MNT_SOFTDEP) { @@ -387,7 +387,7 @@ ffs_mount(struct mount *mp) mp->mnt_flag |= MNT_NFS4ACLS; MNT_IUNLOCK(mp); } - + /* * If this is a snapshot request, take the snapshot. */ @@ -720,8 +720,7 @@ ffs_mountfs(devvp, mp, td) if (ronly || (mp->mnt_flag & MNT_FORCE) || ((fs->fs_flags & (FS_SUJ | FS_NEEDSFSCK)) == 0 && (fs->fs_flags & FS_DOSOFTDEP))) { - printf( -"WARNING: %s was not properly dismounted\n", + printf("WARNING: %s was not properly dismounted\n", fs->fs_fsmnt); } else { printf( @@ -729,7 +728,7 @@ ffs_mountfs(devvp, mp, td) fs->fs_fsmnt); if (fs->fs_flags & FS_SUJ) printf( -"WARNING: Forced mount will invalidated journal contents\n"); +"WARNING: Forced mount will invalidate journal contents\n"); error = EPERM; goto out; } @@ -840,7 +839,7 @@ ffs_mountfs(devvp, mp, td) mp->mnt_stat.f_fsid.val[0] = fs->fs_id[0]; mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1]; nmp = NULL; - if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 || + if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 || (nmp = vfs_getvfs(&mp->mnt_stat.f_fsid))) { if (nmp) vfs_rel(nmp); @@ -873,8 +872,7 @@ ffs_mountfs(devvp, mp, td) MNT_IUNLOCK(mp); #else - printf( -"WARNING: %s: ACLs flag on fs but no ACLs support\n", + printf("WARNING: %s: ACLs flag on fs but no ACLs support\n", mp->mnt_stat.f_mntonname); #endif } @@ -1682,7 +1680,7 @@ ffs_sbupdate(mp, waitfor, suspended) int i, size, error, allerror = 0; if (fs->fs_ronly == 1 && - (mp->um_mountp->mnt_flag & (MNT_RDONLY | MNT_UPDATE)) != + (mp->um_mountp->mnt_flag & (MNT_RDONLY | MNT_UPDATE)) != (MNT_RDONLY | MNT_UPDATE)) panic("ffs_sbupdate: write read-only filesystem"); /* @@ -1836,7 +1834,7 @@ ffs_backgroundwritedone(struct buf *bp) * * Note that we set B_CACHE here, indicating that buffer is * fully valid and thus cacheable. This is true even of NFS - * now so we set it generally. This could be set either here + * now so we set it generally. This could be set either here * or in biodone() since the I/O is synchronous. We put it * here. */ @@ -1885,7 +1883,7 @@ ffs_bufwrite(struct buf *bp) * This optimization eats a lot of memory. If we have a page * or buffer shortfall we can't do it. */ - if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) && + if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) && (bp->b_flags & B_ASYNC) && !vm_page_count_severe() && !buf_dirty_count_severe()) { @@ -1927,7 +1925,7 @@ ffs_bufwrite(struct buf *bp) bundirty(bp); #else bundirty(bp); -#endif +#endif /* * Initiate write on the copy, release the original to From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 09:50:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EFC8106564A; Fri, 17 Sep 2010 09:50:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8E68FC08; Fri, 17 Sep 2010 09:50:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8H9oa6h025412; Fri, 17 Sep 2010 09:50:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8H9oaoB025410; Fri, 17 Sep 2010 09:50:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009170950.o8H9oaoB025410@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Sep 2010 09:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212789 - head/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 09:50:36 -0000 Author: avg Date: Fri Sep 17 09:50:36 2010 New Revision: 212789 URL: http://svn.freebsd.org/changeset/base/212789 Log: nextboot: warn about limitations of /boot/nextboot.conf on ZFS MFC after: 1 week Modified: head/sbin/reboot/nextboot.sh Modified: head/sbin/reboot/nextboot.sh ============================================================================== --- head/sbin/reboot/nextboot.sh Fri Sep 17 09:14:40 2010 (r212788) +++ head/sbin/reboot/nextboot.sh Fri Sep 17 09:50:36 2010 (r212789) @@ -50,6 +50,14 @@ if [ ${force} = "NO" -a ! -d /boot/${ker exit 1 fi +df -Tn "/boot/" 2>/dev/null | while read _fs _type _other ; do + [ "zfs" = "${_type}" ] || continue + cat 1>&2 <<-EOF + WARNING: loader(8) has only R/O support for ZFS + nextboot.conf will NOT be reset in case of kernel boot failure + EOF +done + cat > ${nextboot_file} << EOF nextboot_enable="YES" kernel="${kernel}" From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 10:28:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FDC01065670; Fri, 17 Sep 2010 10:28:10 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4F78FC0A; Fri, 17 Sep 2010 10:28:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HASAt2028052; Fri, 17 Sep 2010 10:28:10 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HASANI028047; Fri, 17 Sep 2010 10:28:10 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009171028.o8HASANI028047@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 17 Sep 2010 10:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212790 - in head/sys/mips/rmi: . dev/nlge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 10:28:10 -0000 Author: jchandra Date: Fri Sep 17 10:28:10 2010 New Revision: 212790 URL: http://svn.freebsd.org/changeset/base/212790 Log: Fixes for XLR network accelerator driver (nlge). - Process some tx done messages in the transmit path, to ensure that the XLR NA tx done FIFO does not overflow. - Add a message ring handler API to process atmost a given number of messages from a specified bucket mask. This will be used to process the tx done messages - Add a callout to restart transmit in the case transmit gets blocked. - Update enable_msgring_int() and disable_msgring_int(), remove unused args and make static. Obtained from: Sriram Gorti (srgorti at netlogicmicro dot com) Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c head/sys/mips/rmi/dev/nlge/if_nlge.h head/sys/mips/rmi/fmn.c head/sys/mips/rmi/msgring.h Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c ============================================================================== --- head/sys/mips/rmi/dev/nlge/if_nlge.c Fri Sep 17 09:50:36 2010 (r212789) +++ head/sys/mips/rmi/dev/nlge/if_nlge.c Fri Sep 17 10:28:10 2010 (r212790) @@ -207,6 +207,9 @@ static void release_tx_desc(vm_paddr_t static int send_fmn_msg_tx(struct nlge_softc *, struct msgrng_msg *, uint32_t n_entries); +static void +nl_tx_q_wakeup(void *addr); + //#define DEBUG #ifdef DEBUG static int mac_debug = 1; @@ -424,6 +427,10 @@ nlna_attach(device_t dev) XLR_CACHELINE_SIZE, 0); } + /* Other per NA s/w initialization */ + callout_init(&sc->tx_thr, CALLOUT_MPSAFE); + callout_reset(&sc->tx_thr, hz, nl_tx_q_wakeup, sc); + /* Enable NA interrupts */ nlna_setup_intr(sc); @@ -655,15 +662,23 @@ nlge_msgring_handler(int bucket, int siz } if (ctrl == CTRL_REG_FREE || ctrl == CTRL_JUMBO_FREE) { - if (is_p2p) { - release_tx_desc(phys_addr); - } else { - m_freem((struct mbuf *)(uintptr_t)phys_addr); - } - ifp = sc->nlge_if; - if (ifp->if_drv_flags & IFF_DRV_OACTIVE){ - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + if (!tx_error) { + if (is_p2p) { + release_tx_desc(phys_addr); + } else { + m_freem((struct mbuf *)(uintptr_t)phys_addr); + } + NLGE_LOCK(sc); + if (ifp->if_drv_flags & IFF_DRV_OACTIVE){ + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + callout_reset(&na_sc->tx_thr, hz, + nl_tx_q_wakeup, na_sc); + } + NLGE_UNLOCK(sc); + } else { + printf("ERROR: Tx fb error (%d) on port %d\n", tx_error, + port); } atomic_incr_long((tx_error) ? &ifp->if_oerrors: &ifp->if_opackets); } else if (ctrl == CTRL_SNGL || ctrl == CTRL_START) { @@ -687,7 +702,24 @@ nlge_start(struct ifnet *ifp) nlge_start_locked(ifp, sc); //NLGE_UNLOCK(sc); } - + +static void +nl_tx_q_wakeup(void *addr) +{ + struct nlna_softc *na_sc; + struct nlge_softc *sc; + int i; + + na_sc = (struct nlna_softc *) addr; + for (i = 0; i < XLR_MAX_MACS; i++) { + sc = na_sc->child_sc[i]; + if (sc == NULL) + continue; + nlge_start_locked(sc->nlge_if, sc); + } + callout_reset(&na_sc->tx_thr, 5 * hz, nl_tx_q_wakeup, na_sc); +} + static void nlge_start_locked(struct ifnet *ifp, struct nlge_softc *sc) { @@ -696,20 +728,30 @@ nlge_start_locked(struct ifnet *ifp, str struct nlge_tx_desc *tx_desc; uint64_t fr_stid; uint32_t cpu; - uint32_t n_entries; + uint32_t n_entries; uint32_t tid; int ret; - int sent; cpu = xlr_core_id(); tid = xlr_thr_id(); - fr_stid = cpu * 8 + tid + 4; + /* H/w threads [0, 2] --> bucket 6 and [1, 3] --> bucket 7 */ + fr_stid = cpu * 8 + 6 + (tid % 2); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { return; } do { + /* + * First, remove some freeback messages before transmitting + * any new packets. However, cap the number of messages + * drained to permit this thread to continue with its + * transmission. + * + * Mask for buckets {6, 7} is 0xc0 + */ + xlr_msgring_handler(0xc0, 4); + /* Grab a packet off the queue. */ IF_DEQUEUE(&ifp->if_snd, m); if (m == NULL) { @@ -721,8 +763,8 @@ nlge_start_locked(struct ifnet *ifp, str if (ret) { goto fail; } - sent = send_fmn_msg_tx(sc, &msg, n_entries); - if (sent != 0) { + ret = send_fmn_msg_tx(sc, &msg, n_entries); + if (ret != 0) { goto fail; } } while(1); @@ -734,20 +776,10 @@ fail: uma_zfree(nl_tx_desc_zone, tx_desc); } if (m != NULL) { - /* - * TBD: It is observed that only when both of the statements - * below are not enabled, traffic continues till the end. - * Otherwise, the port locks up in the middle and never - * recovers from it. The current theory for this behavior - * is that the queue is full and the upper layer is neither - * able to add to it not invoke nlge_start to drian the - * queue. The driver may have to do something in addition - * to reset'ing the OACTIVE bit when a trasnmit free-back - * is received. - */ - //ifp->if_drv_flags |= IFF_DRV_OACTIVE; - //IF_PREPEND(&ifp->if_snd, m); - m_freem(m); + NLGE_LOCK(sc); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + NLGE_UNLOCK(sc); + IF_PREPEND(&ifp->if_snd, m); atomic_incr_long(&ifp->if_iqdrops); } return; @@ -1020,7 +1052,7 @@ nlna_submit_rx_free_desc(struct nlna_sof msgrng_flags = msgrng_access_enable(); ret = message_send(1, code, stid, &msg); msgrng_restore(msgrng_flags); - KASSERT(n++ < 100000, ("Too many credit fails\n")); + KASSERT(n++ < 100000, ("Too many credit fails in rx path\n")); } while (ret != 0); } } @@ -1942,9 +1974,14 @@ send_fmn_msg_tx(struct nlge_softc *sc, s ret = message_send(n_entries, MSGRNG_CODE_MAC, sc->tx_bucket_id, msg); msgrng_restore(msgrng_flags); - KASSERT(i++ < 100000, ("Too many credit fails\n")); - } while (ret != 0); - return (0); + if (ret == 0) + return (0); + i++; + } while (i < 100000); + + KASSERT(i < 100000, ("Too many credit fails in tx path\n")); + + return (1); } static void Modified: head/sys/mips/rmi/dev/nlge/if_nlge.h ============================================================================== --- head/sys/mips/rmi/dev/nlge/if_nlge.h Fri Sep 17 09:50:36 2010 (r212789) +++ head/sys/mips/rmi/dev/nlge/if_nlge.h Fri Sep 17 10:28:10 2010 (r212790) @@ -1110,6 +1110,7 @@ struct nlna_softc { int mac_type; xlr_reg_t *base; + struct callout tx_thr; struct fr_desc *frin_spill; struct fr_desc *frout_spill; union rx_tx_desc *class_0_spill; Modified: head/sys/mips/rmi/fmn.c ============================================================================== --- head/sys/mips/rmi/fmn.c Fri Sep 17 09:50:36 2010 (r212789) +++ head/sys/mips/rmi/fmn.c Fri Sep 17 10:28:10 2010 (r212790) @@ -60,11 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include -void -disable_msgring_int(void *arg); -void -enable_msgring_int(void *arg); - /* definitions */ struct tx_stn_handler { void (*action) (int, int, int, int, struct msgrng_msg *, void *); @@ -101,14 +96,12 @@ do { \ static struct mtx msgrng_lock; static int msgring_int_enabled; static int msgring_pop_num_buckets; -static uint32_t msgring_pop_bucket_mask; +static uint8_t msgring_pop_bucket_mask; static int msgring_int_type; static int msgring_watermark_count; static uint32_t msgring_thread_mask; uint32_t msgrng_msg_cycles = 0; -void xlr_msgring_handler(struct trapframe *); - void xlr_msgring_cpu_init(void) { @@ -174,28 +167,34 @@ xlr_msgring_config(void) msgring_thread_mask = 0x01; } -void -xlr_msgring_handler(struct trapframe *tf) +/* + * Drain out max_messages for the buckets set in the bucket mask. + * Use max_messages = 0 to drain out all messages. + */ +uint32_t +xlr_msgring_handler(uint8_t bucket_mask, uint32_t max_messages) { - unsigned long mflags; int bucket = 0; int size = 0, code = 0, rx_stid = 0, tx_stid = 0; struct msgrng_msg msg; - unsigned int bucket_empty_bm = 0; + uint8_t bucket_empty_bm = 0; unsigned int status = 0; + unsigned long mflags; + uint32_t n_msgs; + n_msgs = 0; mflags = msgrng_access_enable(); - /* First Drain all the high priority messages */ for (;;) { - bucket_empty_bm = (msgrng_read_status() >> 24) & msgring_pop_bucket_mask; + bucket_empty_bm = (msgrng_read_status() >> 24) & bucket_mask; /* all buckets empty, break */ - if (bucket_empty_bm == msgring_pop_bucket_mask) + if (bucket_empty_bm == bucket_mask) break; for (bucket = 0; bucket < msgring_pop_num_buckets; bucket++) { - if ((bucket_empty_bm & (1 << bucket)) /* empty */ ) + if (!((1 << bucket) & bucket_mask) /* bucket not in mask */ + || (bucket_empty_bm & (1 << bucket))) /* empty */ continue; status = message_receive(bucket, &size, &code, &rx_stid, &msg); @@ -203,6 +202,7 @@ xlr_msgring_handler(struct trapframe *tf continue; tx_stid = xlr_board_info.msgmap[rx_stid]; + n_msgs++; if (!tx_stn_handlers[tx_stid].action) { printf("[%s]: No Handler for message from stn_id=%d, bucket=%d, " @@ -215,13 +215,19 @@ xlr_msgring_handler(struct trapframe *tf &msg, tx_stn_handlers[tx_stid].dev_id); mflags = msgrng_access_enable(); } + if (max_messages > 0 && n_msgs >= max_messages) + goto done; } } + +done: msgrng_restore(mflags); + + return (n_msgs); } -void -enable_msgring_int(void *arg) +static void +enable_msgring_int(void) { uint32_t config, mflags; @@ -232,8 +238,8 @@ enable_msgring_int(void *arg) msgrng_restore(mflags); } -void -disable_msgring_int(void *arg) +static void +disable_msgring_int(void) { uint32_t config, mflags; @@ -259,7 +265,7 @@ msgring_process_fast_intr(void *arg) * Interrupt thread will enable the interrupts after processing all * messages */ - disable_msgring_int(NULL); + disable_msgring_int(); atomic_store_rel_int(&it->i_pending, 1); thread_lock(td); if (TD_AWAITING_INTR(td)) { @@ -291,7 +297,7 @@ msgring_process(void *arg) atomic_store_rel_ptr((volatile uintptr_t *)&msgring_ithreads[ithd->i_core], (uintptr_t)arg); - enable_msgring_int(NULL); + enable_msgring_int(); while (1) { while (ithd->i_pending) { @@ -300,9 +306,9 @@ msgring_process(void *arg) * make sure that this write posts before any of the * memory or device accesses in the handlers. */ - xlr_msgring_handler(NULL); + xlr_msgring_handler(msgring_pop_bucket_mask, 0); atomic_store_rel_int(&ithd->i_pending, 0); - enable_msgring_int(NULL); + enable_msgring_int(); } if (!ithd->i_pending) { thread_lock(td); Modified: head/sys/mips/rmi/msgring.h ============================================================================== --- head/sys/mips/rmi/msgring.h Fri Sep 17 09:50:36 2010 (r212789) +++ head/sys/mips/rmi/msgring.h Fri Sep 17 10:28:10 2010 (r212790) @@ -386,10 +386,11 @@ enum { MAX_TX_STNS }; -extern int register_msgring_handler(int major, +int register_msgring_handler(int major, void (*action) (int, int, int, int, struct msgrng_msg *, void *), void *dev_id); -extern void xlr_msgring_cpu_init(void); -extern void xlr_msgring_config(void); +uint32_t xlr_msgring_handler(uint8_t bucket_mask, uint32_t max_messages); +void xlr_msgring_cpu_init(void); +void xlr_msgring_config(void); #endif From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 11:43:39 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0230C106566C; Fri, 17 Sep 2010 11:43:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8C1928FC1A; Fri, 17 Sep 2010 11:43:38 +0000 (UTC) Received: from c122-107-116-249.carlnfd1.nsw.optusnet.com.au (c122-107-116-249.carlnfd1.nsw.optusnet.com.au [122.107.116.249]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o8HBhYlE018483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Sep 2010 21:43:35 +1000 Date: Fri, 17 Sep 2010 21:43:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "David O'Brien" In-Reply-To: <20100917002101.GA13653@dragon.NUXI.org> Message-ID: <20100917212708.Y771@delplex.bde.org> References: <201009091927.o89JReXm022426@svn.freebsd.org> <20100909195302.GA48144@stack.nl> <20100917002101.GA13653@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jilles Tjoelker Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 11:43:39 -0000 On Thu, 16 Sep 2010, David O'Brien wrote: > ... > Interestingly, we may not be compliant with susv3 if I am reading this > correctly: > > The printf utility is required to notify the user when conversion > errors are detected while producing numeric output; thus, the > following results would be expected on an implementation with 32-bit > twos-complement integers when %d is specified as the format operand: > > Argument Standard Output Diagnostic Output > 5a 5 printf: "5a" not completely converted > 9999999999 2147483647 printf: "9999999999" arithmetic overflow > -9999999999 -2147483648 printf: "-9999999999" arithmetic overflow > ABC 0 printf: "ABC" expected numeric value > > > $ uname -m > i386 > $ for A in 5a 9999999999 -9999999999 ABC do /usr/bin/printf "%d\n" $A ; done > printf: 5a: not completely converted > 5 > 9999999999 > -9999999999 > printf: ABC: expected numeric value > 0 > > Though this is in the "informative" section, so maybe this is just one > set of compliant output. Though It is my read that printf(1) should > behave like printf(3), which the above does not for these long long int > values. The implementation actually uses [u]quad_t integers (blech -- it should use [u]intmax_t integers). This may be conformant. POSIX has the general bug of making low-quality implementations, that only support plain integers for command-line options, conformant, and may even require not supporting larger integers in some cases, but hopefully it doesn't require this bug for printf(1). > #include > int > main(void) > { > printf("%d\n", 9999999999); > printf("%d\n", -9999999999); > return 0; > } Restricting to plain int for printf(1) would be less than useful, since unlike printf(3), it has no way of controlling the integer size -- even "%ld" format is "illegal" (should be "invalid") for printf(1). Users wanting to handle large integers would have to use floating point with "%.0f" format, which has some advantages anyway, but printf(1)'s FP format is only double precision, so it doesn't work right for integers >= 2**53 even on arches that have working long double precision. Rounding errors are also not reported for integers >= 2**53 when represented as doubles: $ printf %.0f\\n 9999999999999999 10000000000000000 and its documentation is slightly wrong in saying (re-quoting the above): > The printf utility is required to notify the user when conversion > errors are detected while producing numeric output; thus ... since in the floating point case, it is very unusual for there not to be a rounding error (e.g., 0.1 is not exactly representable in base 2 FP), so reporting _all_ rounding errors would be wrong. In fact, it doesn't seem to be done at all for rounding errors. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 14:15:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6840E106564A; Fri, 17 Sep 2010 14:15:03 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55C138FC0A; Fri, 17 Sep 2010 14:15:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HEF36W032475; Fri, 17 Sep 2010 14:15:03 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HEF3Fb032473; Fri, 17 Sep 2010 14:15:03 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009171415.o8HEF3Fb032473@svn.freebsd.org> From: Martin Matuska Date: Fri, 17 Sep 2010 14:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212791 - head/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 14:15:03 -0000 Author: mm Date: Fri Sep 17 14:15:03 2010 New Revision: 212791 URL: http://svn.freebsd.org/changeset/base/212791 Log: Remove duplicate include of Approved by: delphij (mentor) MFC after: 3 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Sep 17 10:28:10 2010 (r212790) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Sep 17 14:15:03 2010 (r212791) @@ -40,7 +40,6 @@ #include #include #include -#include #include #include "zfs_namecheck.h" From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 15:44:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DF461065670; Fri, 17 Sep 2010 15:44:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 425EB8FC14; Fri, 17 Sep 2010 15:44:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HFiXNx034518; Fri, 17 Sep 2010 15:44:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HFiXch034516; Fri, 17 Sep 2010 15:44:33 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009171544.o8HFiXch034516@svn.freebsd.org> From: Dimitry Andric Date: Fri, 17 Sep 2010 15:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212792 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 15:44:33 -0000 Author: dim Date: Fri Sep 17 15:44:32 2010 New Revision: 212792 URL: http://svn.freebsd.org/changeset/base/212792 Log: Temporarily raise my limit, so I can import new llvm and clang snapshots. Approved-by: rpaulo (mentor) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Sep 17 14:15:03 2010 (r212791) +++ svnadmin/conf/sizelimit.conf Fri Sep 17 15:44:32 2010 (r212792) @@ -32,3 +32,4 @@ gonzo kmacy jb jeff +dim From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 15:48:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB8A5106567A; Fri, 17 Sep 2010 15:48:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D533B8FC1C; Fri, 17 Sep 2010 15:48:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HFmugO034641; Fri, 17 Sep 2010 15:48:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HFmu5j034630; Fri, 17 Sep 2010 15:48:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009171548.o8HFmu5j034630@svn.freebsd.org> From: Dimitry Andric Date: Fri, 17 Sep 2010 15:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212793 - in vendor/llvm/dist: . autoconf autoconf/m4 bindings/ada/llvm bindings/ocaml/llvm cmake cmake/modules docs docs/CommandGuide docs/tutorial examples examples/BrainF examples/Fi... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 15:48:57 -0000 Author: dim Date: Fri Sep 17 15:48:55 2010 New Revision: 212793 URL: http://svn.freebsd.org/changeset/base/212793 Log: Vendor import of llvm r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor) Added: vendor/llvm/dist/cmake/modules/CMakeLists.txt vendor/llvm/dist/cmake/modules/ChooseMSVCCRT.cmake vendor/llvm/dist/cmake/modules/LLVM.cmake vendor/llvm/dist/cmake/modules/VersionFromVCS.cmake vendor/llvm/dist/docs/CommandGuide/llvm-diff.pod vendor/llvm/dist/include/llvm/ADT/NullablePtr.h vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionIterator.h vendor/llvm/dist/include/llvm/Analysis/RegionPrinter.h vendor/llvm/dist/include/llvm/Assembly/AssemblyAnnotationWriter.h vendor/llvm/dist/include/llvm/CompilerDriver/AutoGenerated.h vendor/llvm/dist/include/llvm/CompilerDriver/Main.h vendor/llvm/dist/include/llvm/Config/llvm-config.h.cmake vendor/llvm/dist/include/llvm/Config/llvm-config.h.in vendor/llvm/dist/include/llvm/MC/ELFObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCDwarf.h vendor/llvm/dist/include/llvm/MC/MCELFSymbolFlags.h vendor/llvm/dist/include/llvm/PassRegistry.h vendor/llvm/dist/include/llvm/Support/CrashRecoveryContext.h vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h vendor/llvm/dist/lib/Analysis/RegionInfo.cpp vendor/llvm/dist/lib/Analysis/RegionPrinter.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LocalStackSlotAllocation.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/RenderMachineFunction.cpp vendor/llvm/dist/lib/CodeGen/RenderMachineFunction.h vendor/llvm/dist/lib/CodeGen/SplitKit.cpp vendor/llvm/dist/lib/CodeGen/SplitKit.h vendor/llvm/dist/lib/CodeGen/Splitter.cpp vendor/llvm/dist/lib/CodeGen/Splitter.h vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/MCDisassembler/ vendor/llvm/dist/lib/MC/MCDisassembler/CMakeLists.txt vendor/llvm/dist/lib/MC/MCDisassembler/EDDisassembler.cpp vendor/llvm/dist/lib/MC/MCDisassembler/EDDisassembler.h vendor/llvm/dist/lib/MC/MCDisassembler/EDInfo.h vendor/llvm/dist/lib/MC/MCDisassembler/EDInst.cpp vendor/llvm/dist/lib/MC/MCDisassembler/EDInst.h vendor/llvm/dist/lib/MC/MCDisassembler/EDOperand.cpp vendor/llvm/dist/lib/MC/MCDisassembler/EDOperand.h vendor/llvm/dist/lib/MC/MCDisassembler/EDToken.cpp vendor/llvm/dist/lib/MC/MCDisassembler/EDToken.h vendor/llvm/dist/lib/MC/MCDisassembler/Makefile vendor/llvm/dist/lib/MC/MCDwarf.cpp vendor/llvm/dist/lib/MC/MCELFStreamer.cpp vendor/llvm/dist/lib/Support/CrashRecoveryContext.cpp vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMFastISel.cpp vendor/llvm/dist/lib/Target/ARM/ARMGlobalMerge.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCInstLower.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86InstComments.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86InstComments.h vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/X86InstrFMA.td vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/X86MCInstLower.h vendor/llvm/dist/lib/Target/X86/X86ShuffleDecode.h vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LowerAtomic.cpp vendor/llvm/dist/lib/VMCore/PassRegistry.cpp vendor/llvm/dist/runtime/libprofile/libprofile.exports vendor/llvm/dist/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll vendor/llvm/dist/test/Analysis/RegionInfo/ vendor/llvm/dist/test/Analysis/RegionInfo/20100809_bb_not_in_domtree.ll vendor/llvm/dist/test/Analysis/RegionInfo/block_sort.ll vendor/llvm/dist/test/Analysis/RegionInfo/cond_loop.ll vendor/llvm/dist/test/Analysis/RegionInfo/condition_complicated.ll vendor/llvm/dist/test/Analysis/RegionInfo/condition_complicated_2.ll vendor/llvm/dist/test/Analysis/RegionInfo/condition_forward_edge.ll vendor/llvm/dist/test/Analysis/RegionInfo/condition_same_exit.ll vendor/llvm/dist/test/Analysis/RegionInfo/condition_simple.ll vendor/llvm/dist/test/Analysis/RegionInfo/dg.exp vendor/llvm/dist/test/Analysis/RegionInfo/exit_in_condition.ll vendor/llvm/dist/test/Analysis/RegionInfo/infinite_loop.ll vendor/llvm/dist/test/Analysis/RegionInfo/infinite_loop_2.ll vendor/llvm/dist/test/Analysis/RegionInfo/infinite_loop_3.ll vendor/llvm/dist/test/Analysis/RegionInfo/infinite_loop_4.ll vendor/llvm/dist/test/Analysis/RegionInfo/loop_with_condition.ll vendor/llvm/dist/test/Analysis/RegionInfo/loops_1.ll vendor/llvm/dist/test/Analysis/RegionInfo/loops_2.ll vendor/llvm/dist/test/Analysis/RegionInfo/mix_1.ll vendor/llvm/dist/test/Analysis/RegionInfo/multiple_exiting_edge.ll vendor/llvm/dist/test/Analysis/RegionInfo/nested_loops.ll vendor/llvm/dist/test/Analysis/RegionInfo/next.ll vendor/llvm/dist/test/Analysis/RegionInfo/paper.ll vendor/llvm/dist/test/Analysis/RegionInfo/two_loops_same_header.ll vendor/llvm/dist/test/Assembler/align-inst-alloca.ll vendor/llvm/dist/test/Assembler/align-inst-load.ll vendor/llvm/dist/test/Assembler/align-inst-store.ll vendor/llvm/dist/test/Assembler/align-inst.ll vendor/llvm/dist/test/Assembler/comment.ll vendor/llvm/dist/test/Bitcode/AutoUpgradeGlobals.ll vendor/llvm/dist/test/Bitcode/AutoUpgradeGlobals.ll.bc (contents, props changed) vendor/llvm/dist/test/Bitcode/neon-intrinsics.ll vendor/llvm/dist/test/Bitcode/neon-intrinsics.ll.bc (contents, props changed) vendor/llvm/dist/test/BugPoint/metadata.ll vendor/llvm/dist/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll vendor/llvm/dist/test/CodeGen/ARM/2010-08-04-EHCrash.ll vendor/llvm/dist/test/CodeGen/ARM/bfi.ll vendor/llvm/dist/test/CodeGen/ARM/code-placement.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel.ll vendor/llvm/dist/test/CodeGen/Alpha/2010-08-01-mulreduce64.ll vendor/llvm/dist/test/CodeGen/CellSPU/arg_ret.ll vendor/llvm/dist/test/CodeGen/CellSPU/v2f32.ll vendor/llvm/dist/test/CodeGen/CellSPU/v2i32.ll vendor/llvm/dist/test/CodeGen/Generic/2010-07-27-DAGCombineCrash.ll vendor/llvm/dist/test/CodeGen/Mips/2010-07-20-Select.ll vendor/llvm/dist/test/CodeGen/Mips/2010-07-20-Switch.ll vendor/llvm/dist/test/CodeGen/PowerPC/empty-functions.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll vendor/llvm/dist/test/CodeGen/Thumb/barrier.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/bfi.ll vendor/llvm/dist/test/CodeGen/Thumb2/cortex-fp.ll vendor/llvm/dist/test/CodeGen/Thumb2/machine-licm-vdup.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-badreg-operands.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-barrier.ll vendor/llvm/dist/test/CodeGen/X86/2008-08-06-CmpStride.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-09-ivs-different-sizes.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-18-DbgValue.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-28-Crash.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-11-FPStackLoneUse.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-15-Crash.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-29-SetccSimplify.ll vendor/llvm/dist/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll vendor/llvm/dist/test/CodeGen/X86/2010-08-04-MingWCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-08-10-DbgConstant.ll vendor/llvm/dist/test/CodeGen/X86/2010-09-01-RemoveCopyByCommutingDef.ll vendor/llvm/dist/test/CodeGen/X86/MachineSink-PHIUse.ll vendor/llvm/dist/test/CodeGen/X86/avx-128.ll vendor/llvm/dist/test/CodeGen/X86/avx-256.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/barrier-sse.ll vendor/llvm/dist/test/CodeGen/X86/barrier.ll vendor/llvm/dist/test/CodeGen/X86/change-compare-stride-trickiness-0.ll vendor/llvm/dist/test/CodeGen/X86/change-compare-stride-trickiness-1.ll vendor/llvm/dist/test/CodeGen/X86/change-compare-stride-trickiness-2.ll vendor/llvm/dist/test/CodeGen/X86/empty-functions.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-atomic.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-cmp-branch.ll vendor/llvm/dist/test/CodeGen/X86/force-align-stack.ll vendor/llvm/dist/test/CodeGen/X86/insert-positions.ll vendor/llvm/dist/test/CodeGen/X86/int-intrinsic.ll vendor/llvm/dist/test/CodeGen/X86/lock-inst-encoding.ll vendor/llvm/dist/test/CodeGen/X86/lsr-interesting-step.ll vendor/llvm/dist/test/CodeGen/X86/lsr-normalization.ll vendor/llvm/dist/test/CodeGen/X86/lsr-static-addr.ll vendor/llvm/dist/test/CodeGen/X86/pr7882.ll vendor/llvm/dist/test/CodeGen/X86/shl-anyext.ll vendor/llvm/dist/test/CodeGen/X86/sse1.ll vendor/llvm/dist/test/CodeGen/X86/vec_shift4.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-37.ll vendor/llvm/dist/test/CodeGen/X86/win_chkstk.ll vendor/llvm/dist/test/DebugInfo/2010-07-19-Crash.ll vendor/llvm/dist/test/DebugInfo/2010-08-04-StackVariable.ll vendor/llvm/dist/test/FrontendC++/2010-07-19-nowarn.cpp vendor/llvm/dist/test/FrontendC++/2010-07-23-DeclLoc.cpp vendor/llvm/dist/test/FrontendC++/2010-08-31-ByValArg.cpp vendor/llvm/dist/test/FrontendC/2010-07-27-MinNoFoldConst.c vendor/llvm/dist/test/FrontendC/2010-08-12-asm-aggr-arg.c vendor/llvm/dist/test/FrontendC/asm-reg-var-local.c vendor/llvm/dist/test/FrontendC/misaligned-param.c vendor/llvm/dist/test/FrontendC/vla-2.c vendor/llvm/dist/test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm vendor/llvm/dist/test/FrontendObjC++/2010-08-04-Template.mm vendor/llvm/dist/test/FrontendObjC++/2010-08-06-X.Y-syntax.mm vendor/llvm/dist/test/LLVMC/Alias.td vendor/llvm/dist/test/LLVMC/LanguageMap.td vendor/llvm/dist/test/Linker/metadata-a.ll vendor/llvm/dist/test/Linker/metadata-b.ll vendor/llvm/dist/test/MC/AsmParser/ARM/arm_instructions.s vendor/llvm/dist/test/MC/AsmParser/ELF/ vendor/llvm/dist/test/MC/AsmParser/ELF/dg.exp vendor/llvm/dist/test/MC/AsmParser/ELF/directive_previous.s vendor/llvm/dist/test/MC/AsmParser/ELF/directive_section.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-avx-clmul-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-avx-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-fma3-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-avx-clmul-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-avx-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-fma3-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_instruction_errors.s vendor/llvm/dist/test/MC/AsmParser/directive_elf_size.s vendor/llvm/dist/test/MC/AsmParser/dollars-in-identifiers.s vendor/llvm/dist/test/MC/AsmParser/macro-def-in-instantiation.s vendor/llvm/dist/test/MC/AsmParser/macros-parsing.s vendor/llvm/dist/test/MC/AsmParser/macros.s vendor/llvm/dist/test/MC/COFF/ vendor/llvm/dist/test/MC/COFF/basic-coff.ll vendor/llvm/dist/test/MC/COFF/dg.exp vendor/llvm/dist/test/MC/COFF/switch-relocations.ll vendor/llvm/dist/test/MC/COFF/symbol-fragment-offset.ll vendor/llvm/dist/test/MC/ELF/ vendor/llvm/dist/test/MC/ELF/bss.ll vendor/llvm/dist/test/MC/ELF/dg.exp vendor/llvm/dist/test/Other/close-stderr.ll vendor/llvm/dist/test/Scripts/coff-dump.py (contents, props changed) vendor/llvm/dist/test/Scripts/coff-dump.py.bat vendor/llvm/dist/test/TableGen/FieldAccess.td vendor/llvm/dist/test/TableGen/ListManip.td vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/ vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/basic.ll vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/dg.exp vendor/llvm/dist/test/Transforms/IndVarSimplify/uglygep.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast.ll vendor/llvm/dist/test/Transforms/InstCombine/sqrt.ll vendor/llvm/dist/test/Transforms/InstCombine/trunc.ll vendor/llvm/dist/test/Transforms/JumpThreading/2010-08-26-and.ll vendor/llvm/dist/test/Transforms/JumpThreading/lvi-load.ll vendor/llvm/dist/test/Transforms/LICM/crash.ll vendor/llvm/dist/test/Transforms/LoopSimplify/2010-07-15-IncorrectDomFrontierUpdate.ll vendor/llvm/dist/test/Transforms/LoopSimplify/indirectbr-backedge.ll vendor/llvm/dist/test/Transforms/LoopSimplify/preserve-scev.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/infinite-loop.ll vendor/llvm/dist/test/Transforms/LowerAtomic/ vendor/llvm/dist/test/Transforms/LowerAtomic/atomic-load.ll vendor/llvm/dist/test/Transforms/LowerAtomic/atomic-swap.ll vendor/llvm/dist/test/Transforms/LowerAtomic/barrier.ll vendor/llvm/dist/test/Transforms/LowerAtomic/dg.exp vendor/llvm/dist/test/Transforms/MergeFunc/vectors-and-arrays.ll vendor/llvm/dist/test/Transforms/SCCP/ipsccp-addr-taken.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/indirectbr.ll vendor/llvm/dist/test/Transforms/StripSymbols/2010-08-25-crash.ll vendor/llvm/dist/test/Verifier/2010-08-07-PointerIntrinsic.ll vendor/llvm/dist/tools/bugpoint-passes/ vendor/llvm/dist/tools/bugpoint-passes/CMakeLists.txt vendor/llvm/dist/tools/bugpoint-passes/Makefile vendor/llvm/dist/tools/bugpoint-passes/TestPasses.cpp vendor/llvm/dist/tools/bugpoint-passes/bugpoint.exports vendor/llvm/dist/tools/llvm-diff/ vendor/llvm/dist/tools/llvm-diff/CMakeLists.txt vendor/llvm/dist/tools/llvm-diff/DifferenceEngine.cpp vendor/llvm/dist/tools/llvm-diff/DifferenceEngine.h vendor/llvm/dist/tools/llvm-diff/Makefile vendor/llvm/dist/tools/llvm-diff/llvm-diff.cpp vendor/llvm/dist/tools/llvmc/examples/ vendor/llvm/dist/tools/llvmc/examples/Hello/ vendor/llvm/dist/tools/llvmc/examples/Hello/Hello.cpp vendor/llvm/dist/tools/llvmc/examples/Hello/Makefile vendor/llvm/dist/tools/llvmc/examples/Makefile vendor/llvm/dist/tools/llvmc/examples/Simple/ vendor/llvm/dist/tools/llvmc/examples/Simple/Makefile vendor/llvm/dist/tools/llvmc/examples/Simple/Simple.cpp vendor/llvm/dist/tools/llvmc/examples/Simple/Simple.td vendor/llvm/dist/tools/llvmc/examples/Skeleton/ vendor/llvm/dist/tools/llvmc/examples/Skeleton/AutoGenerated.td vendor/llvm/dist/tools/llvmc/examples/Skeleton/Hooks.cpp vendor/llvm/dist/tools/llvmc/examples/Skeleton/Main.cpp vendor/llvm/dist/tools/llvmc/examples/Skeleton/Makefile vendor/llvm/dist/tools/llvmc/examples/Skeleton/README vendor/llvm/dist/tools/llvmc/examples/mcc16/ vendor/llvm/dist/tools/llvmc/examples/mcc16/Hooks.cpp vendor/llvm/dist/tools/llvmc/examples/mcc16/Main.cpp vendor/llvm/dist/tools/llvmc/examples/mcc16/Makefile vendor/llvm/dist/tools/llvmc/examples/mcc16/PIC16.td vendor/llvm/dist/tools/llvmc/examples/mcc16/README vendor/llvm/dist/tools/llvmc/src/ vendor/llvm/dist/tools/llvmc/src/AutoGenerated.td vendor/llvm/dist/tools/llvmc/src/Base.td.in vendor/llvm/dist/tools/llvmc/src/Clang.td vendor/llvm/dist/tools/llvmc/src/Hooks.cpp vendor/llvm/dist/tools/llvmc/src/Main.cpp vendor/llvm/dist/tools/llvmc/src/Makefile vendor/llvm/dist/unittests/Analysis/ vendor/llvm/dist/unittests/Analysis/Makefile vendor/llvm/dist/unittests/Analysis/ScalarEvolutionTest.cpp vendor/llvm/dist/unittests/Support/Casting.cpp vendor/llvm/dist/utils/lit/lit/ExampleTests/required-and-missing.c vendor/llvm/dist/utils/lit/lit/ExampleTests/required-and-present.c vendor/llvm/dist/utils/llvm-lit/ vendor/llvm/dist/utils/llvm-lit/Makefile vendor/llvm/dist/utils/llvm-lit/llvm-lit.in Deleted: vendor/llvm/dist/include/llvm/Assembly/AsmAnnotationWriter.h vendor/llvm/dist/include/llvm/CompilerDriver/ForceLinkage.h vendor/llvm/dist/include/llvm/CompilerDriver/ForceLinkageMacros.h vendor/llvm/dist/include/llvm/CompilerDriver/Plugin.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSI.h vendor/llvm/dist/lib/CodeGen/OptimizeExts.cpp vendor/llvm/dist/lib/CompilerDriver/Plugin.cpp vendor/llvm/dist/lib/Support/SlowOperationInformer.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.h vendor/llvm/dist/lib/Target/MSIL/ vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.h vendor/llvm/dist/lib/Target/X86/X86FloatingPointRegKill.cpp vendor/llvm/dist/lib/Transforms/Scalar/ABCD.cpp vendor/llvm/dist/lib/Transforms/Utils/SSI.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.h vendor/llvm/dist/runtime/libprofile/exported_symbols.lst vendor/llvm/dist/test/Assembler/2010-01-06-UnionType.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll vendor/llvm/dist/test/CodeGen/X86/2007-06-14-branchfold.ll vendor/llvm/dist/test/CodeGen/X86/2008-01-25-EmptyFunction.ll vendor/llvm/dist/test/CodeGen/X86/narrow_op-2.ll vendor/llvm/dist/test/CodeGen/X86/stack-color-with-reg.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-10.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-3.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-4.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-5.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-6.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-7.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-8.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-9.ll vendor/llvm/dist/test/DebugInfo/2010-01-18-DbgValue.ll vendor/llvm/dist/test/DebugInfo/2010-02-01-DbgValueCrash.ll vendor/llvm/dist/test/DebugInfo/2010-05-25-DotDebugLoc.ll vendor/llvm/dist/test/DebugInfo/2010-05-28-Crash.ll vendor/llvm/dist/test/DebugInfo/2010-06-01-DeadArg-DbgInfo.ll vendor/llvm/dist/test/Feature/unions.ll vendor/llvm/dist/test/Integer/a15.ll vendor/llvm/dist/test/Integer/a15.ll.out vendor/llvm/dist/test/Integer/a17.ll vendor/llvm/dist/test/Integer/a17.ll.out vendor/llvm/dist/test/Integer/a31.ll vendor/llvm/dist/test/Integer/a31.ll.out vendor/llvm/dist/test/Integer/a33.ll vendor/llvm/dist/test/Integer/a33.ll.out vendor/llvm/dist/test/Integer/a63.ll vendor/llvm/dist/test/Integer/a63.ll.out vendor/llvm/dist/test/Integer/a7.ll vendor/llvm/dist/test/Integer/a7.ll.out vendor/llvm/dist/test/Integer/a9.ll vendor/llvm/dist/test/Integer/a9.ll.out vendor/llvm/dist/test/LLVMC/ExternOptions.td vendor/llvm/dist/test/LLVMC/MultiplePluginPriorities.td vendor/llvm/dist/test/Transforms/ABCD/ vendor/llvm/dist/test/Transforms/IndVarSimplify/2003-12-10-IndVarDeadCode.ll vendor/llvm/dist/test/Transforms/InstCombine/align-inc.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast-scalar-to-vector.ll vendor/llvm/dist/test/Transforms/InstCombine/shift-simplify.ll vendor/llvm/dist/test/Transforms/InstCombine/shift-trunc-shift.ll vendor/llvm/dist/test/Transforms/InstCombine/trunc-mask-ext.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/2008-08-06-CmpStride.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/2009-02-09-ivs-different-sizes.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-2.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/insert-positions.ll vendor/llvm/dist/test/Transforms/SSI/ vendor/llvm/dist/test/Transforms/TailCallElim/accum_recursion_constant_arg.ll vendor/llvm/dist/test/Transforms/TailCallElim/switch.ll vendor/llvm/dist/tools/bugpoint/TestPasses.cpp vendor/llvm/dist/tools/edis/EDDisassembler.cpp vendor/llvm/dist/tools/edis/EDDisassembler.h vendor/llvm/dist/tools/edis/EDInfo.td vendor/llvm/dist/tools/edis/EDInst.cpp vendor/llvm/dist/tools/edis/EDInst.h vendor/llvm/dist/tools/edis/EDOperand.cpp vendor/llvm/dist/tools/edis/EDOperand.h vendor/llvm/dist/tools/edis/EDToken.cpp vendor/llvm/dist/tools/edis/EDToken.h vendor/llvm/dist/tools/llvmc/driver/Main.cpp vendor/llvm/dist/tools/llvmc/driver/Makefile vendor/llvm/dist/tools/llvmc/example/Hello/Hello.cpp vendor/llvm/dist/tools/llvmc/example/Hello/Makefile vendor/llvm/dist/tools/llvmc/example/Simple/Makefile vendor/llvm/dist/tools/llvmc/example/Simple/PluginMain.cpp vendor/llvm/dist/tools/llvmc/example/Simple/Simple.td vendor/llvm/dist/tools/llvmc/example/Skeleton/Makefile vendor/llvm/dist/tools/llvmc/example/Skeleton/README vendor/llvm/dist/tools/llvmc/example/Skeleton/driver/Main.cpp vendor/llvm/dist/tools/llvmc/example/Skeleton/driver/Makefile vendor/llvm/dist/tools/llvmc/example/Skeleton/plugins/Makefile vendor/llvm/dist/tools/llvmc/example/Skeleton/plugins/Plugin/Makefile vendor/llvm/dist/tools/llvmc/example/Skeleton/plugins/Plugin/Plugin.td vendor/llvm/dist/tools/llvmc/example/Skeleton/plugins/Plugin/PluginMain.cpp vendor/llvm/dist/tools/llvmc/example/mcc16/Makefile vendor/llvm/dist/tools/llvmc/example/mcc16/README vendor/llvm/dist/tools/llvmc/example/mcc16/driver/Main.cpp vendor/llvm/dist/tools/llvmc/example/mcc16/driver/Makefile vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/Makefile vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/Makefile vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/tools/llvmc/plugins/Base/Hooks.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Makefile vendor/llvm/dist/tools/llvmc/plugins/Base/PluginMain.cpp vendor/llvm/dist/tools/llvmc/plugins/Clang/Clang.td vendor/llvm/dist/tools/llvmc/plugins/Clang/Makefile vendor/llvm/dist/tools/llvmc/plugins/Clang/PluginMain.cpp vendor/llvm/dist/tools/llvmc/plugins/Makefile vendor/llvm/dist/utils/RegressionFinder.pl vendor/llvm/dist/utils/mkpatch vendor/llvm/dist/utils/userloc.pl Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/Makefile vendor/llvm/dist/Makefile.config.in vendor/llvm/dist/Makefile.rules vendor/llvm/dist/README.txt vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/autoconf/m4/link_options.m4 vendor/llvm/dist/bindings/ada/llvm/llvm.ads vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/cmake/modules/LLVMConfig.cmake vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/AliasAnalysis.html vendor/llvm/dist/docs/BitCodeFormat.html vendor/llvm/dist/docs/CMake.html vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/CommandGuide/bugpoint.pod vendor/llvm/dist/docs/CommandGuide/index.html vendor/llvm/dist/docs/DeveloperPolicy.html vendor/llvm/dist/docs/GCCFEBuildInstrs.html vendor/llvm/dist/docs/GetElementPtr.html vendor/llvm/dist/docs/GoldPlugin.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/MakefileGuide.html vendor/llvm/dist/docs/Passes.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/TestingGuide.html vendor/llvm/dist/docs/WritingAnLLVMBackend.html vendor/llvm/dist/docs/WritingAnLLVMPass.html vendor/llvm/dist/docs/tutorial/LangImpl3.html vendor/llvm/dist/docs/tutorial/LangImpl5.html vendor/llvm/dist/docs/tutorial/LangImpl6.html vendor/llvm/dist/docs/tutorial/LangImpl7.html vendor/llvm/dist/examples/BrainF/BrainF.cpp vendor/llvm/dist/examples/Fibonacci/fibonacci.cpp vendor/llvm/dist/examples/Makefile vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm-c/EnhancedDisassembly.h vendor/llvm/dist/include/llvm-c/ExecutionEngine.h vendor/llvm/dist/include/llvm-c/Target.h vendor/llvm/dist/include/llvm-c/lto.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/DenseMap.h vendor/llvm/dist/include/llvm/ADT/DenseSet.h vendor/llvm/dist/include/llvm/ADT/DepthFirstIterator.h vendor/llvm/dist/include/llvm/ADT/FoldingSet.h vendor/llvm/dist/include/llvm/ADT/ImmutableIntervalMap.h vendor/llvm/dist/include/llvm/ADT/STLExtras.h vendor/llvm/dist/include/llvm/ADT/ScopedHashTable.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/ADT/StringRef.h vendor/llvm/dist/include/llvm/ADT/StringSet.h vendor/llvm/dist/include/llvm/ADT/StringSwitch.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/ADT/ValueMap.h vendor/llvm/dist/include/llvm/ADT/ilist.h vendor/llvm/dist/include/llvm/Analysis/AliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h vendor/llvm/dist/include/llvm/Analysis/DOTGraphTraitsPass.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/Dominators.h vendor/llvm/dist/include/llvm/Analysis/FindUsedTypes.h vendor/llvm/dist/include/llvm/Analysis/IntervalPartition.h vendor/llvm/dist/include/llvm/Analysis/LazyValueInfo.h vendor/llvm/dist/include/llvm/Analysis/LibCallAliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/LibCallSemantics.h vendor/llvm/dist/include/llvm/Analysis/LoopDependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/Analysis/LoopPass.h vendor/llvm/dist/include/llvm/Analysis/Passes.h vendor/llvm/dist/include/llvm/Analysis/PointerTracking.h vendor/llvm/dist/include/llvm/Analysis/PostDominators.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/AutoUpgrade.h vendor/llvm/dist/include/llvm/Bitcode/Archive.h vendor/llvm/dist/include/llvm/Bitcode/BitstreamWriter.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/CallGraphSCCPass.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/CalcSpillWeights.h vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/LiveVariables.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineLoopInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h vendor/llvm/dist/include/llvm/CodeGen/SchedulerRegistry.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h vendor/llvm/dist/include/llvm/CompilerDriver/Action.h vendor/llvm/dist/include/llvm/CompilerDriver/BuiltinOptions.h vendor/llvm/dist/include/llvm/CompilerDriver/Common.td vendor/llvm/dist/include/llvm/CompilerDriver/CompilationGraph.h vendor/llvm/dist/include/llvm/CompilerDriver/Error.h vendor/llvm/dist/include/llvm/CompilerDriver/Main.inc vendor/llvm/dist/include/llvm/CompilerDriver/Tool.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Constants.h vendor/llvm/dist/include/llvm/DerivedTypes.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITMemoryManager.h vendor/llvm/dist/include/llvm/GlobalValue.h vendor/llvm/dist/include/llvm/Instruction.h vendor/llvm/dist/include/llvm/Instructions.h vendor/llvm/dist/include/llvm/IntrinsicInst.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IntrinsicsPowerPC.td vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/LLVMContext.h vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/LinkAllVMCore.h vendor/llvm/dist/include/llvm/Linker.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCObjectStreamer.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParserExtension.h vendor/llvm/dist/include/llvm/MC/MCParser/MCParsedAsmOperand.h vendor/llvm/dist/include/llvm/MC/MCSectionELF.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/Metadata.h vendor/llvm/dist/include/llvm/Module.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/PassAnalysisSupport.h vendor/llvm/dist/include/llvm/PassManager.h vendor/llvm/dist/include/llvm/PassManagers.h vendor/llvm/dist/include/llvm/PassSupport.h vendor/llvm/dist/include/llvm/Support/COFF.h vendor/llvm/dist/include/llvm/Support/CallSite.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/CommandLine.h vendor/llvm/dist/include/llvm/Support/Compiler.h vendor/llvm/dist/include/llvm/Support/ConstantRange.h vendor/llvm/dist/include/llvm/Support/DataFlow.h vendor/llvm/dist/include/llvm/Support/ELF.h vendor/llvm/dist/include/llvm/Support/ErrorHandling.h vendor/llvm/dist/include/llvm/Support/GraphWriter.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/IRReader.h vendor/llvm/dist/include/llvm/Support/MachO.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/PassNameParser.h vendor/llvm/dist/include/llvm/Support/PatternMatch.h vendor/llvm/dist/include/llvm/Support/PrettyStackTrace.h vendor/llvm/dist/include/llvm/Support/Regex.h vendor/llvm/dist/include/llvm/Support/Registry.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/StandardPasses.h vendor/llvm/dist/include/llvm/Support/SystemUtils.h vendor/llvm/dist/include/llvm/Support/TypeBuilder.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/System/Memory.h vendor/llvm/dist/include/llvm/System/Path.h vendor/llvm/dist/include/llvm/System/Process.h vendor/llvm/dist/include/llvm/System/Program.h vendor/llvm/dist/include/llvm/System/Signals.h vendor/llvm/dist/include/llvm/System/ThreadLocal.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h vendor/llvm/dist/include/llvm/Target/TargetCallingConv.td vendor/llvm/dist/include/llvm/Target/TargetData.h vendor/llvm/dist/include/llvm/Target/TargetInstrDesc.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetRegistry.h vendor/llvm/dist/include/llvm/Target/TargetSelect.h vendor/llvm/dist/include/llvm/Transforms/IPO.h vendor/llvm/dist/include/llvm/Transforms/IPO/InlinerPass.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h vendor/llvm/dist/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/include/llvm/Use.h vendor/llvm/dist/include/llvm/Value.h vendor/llvm/dist/include/llvm/ValueSymbolTable.h vendor/llvm/dist/lib/Analysis/AliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/AliasAnalysisCounter.cpp vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp vendor/llvm/dist/lib/Analysis/AliasDebugger.cpp vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CFGPrinter.cpp vendor/llvm/dist/lib/Analysis/CMakeLists.txt vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/DbgInfoPrinter.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/DomPrinter.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraph.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/IPA/FindUsedTypes.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstCount.cpp vendor/llvm/dist/lib/Analysis/IntervalPartition.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/LibCallAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/LibCallSemantics.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/LiveValues.cpp vendor/llvm/dist/lib/Analysis/LoopDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/ModuleDebugInfoPrinter.cpp vendor/llvm/dist/lib/Analysis/PointerTracking.cpp vendor/llvm/dist/lib/Analysis/PostDominators.cpp vendor/llvm/dist/lib/Analysis/ProfileEstimatorPass.cpp vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp vendor/llvm/dist/lib/Analysis/ProfileInfoLoaderPass.cpp vendor/llvm/dist/lib/Analysis/ProfileVerifierPass.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionNormalization.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/AsmParser/LLToken.h vendor/llvm/dist/lib/AsmParser/Parser.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.h vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriterPass.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.h vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/Analysis.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CalcSpillWeights.cpp vendor/llvm/dist/lib/CodeGen/CodePlacementOpt.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/ELF.h vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.h vendor/llvm/dist/lib/CodeGen/GCMetadata.cpp vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/InlineSpiller.cpp vendor/llvm/dist/lib/CodeGen/IntrinsicLowering.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveStackAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/LowerSubregs.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineDominators.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPrinterPass.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineLoopInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/OptimizePHIs.cpp vendor/llvm/dist/lib/CodeGen/PBQP/HeuristicBase.h vendor/llvm/dist/lib/CodeGen/PBQP/HeuristicSolver.h vendor/llvm/dist/lib/CodeGen/PBQP/Heuristics/Briggs.h vendor/llvm/dist/lib/CodeGen/PBQP/Solution.h vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.h vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.h vendor/llvm/dist/lib/CodeGen/RegAllocFast.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.h vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/CodeGen/Spiller.cpp vendor/llvm/dist/lib/CodeGen/Spiller.h vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/StrongPHIElimination.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TargetInstrInfoImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/UnreachableBlockElim.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.h vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/CompilerDriver/Action.cpp vendor/llvm/dist/lib/CompilerDriver/BuiltinOptions.cpp vendor/llvm/dist/lib/CompilerDriver/CompilationGraph.cpp vendor/llvm/dist/lib/CompilerDriver/Main.cpp vendor/llvm/dist/lib/CompilerDriver/Makefile vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngineBindings.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/Intercept.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.h vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/Linker/LinkModules.cpp vendor/llvm/dist/lib/MC/CMakeLists.txt vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCNullStreamer.cpp vendor/llvm/dist/lib/MC/MCObjectStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/DarwinAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/ELFAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/TargetAsmParser.cpp vendor/llvm/dist/lib/MC/MCStreamer.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/MC/Makefile vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/CMakeLists.txt vendor/llvm/dist/lib/Support/ConstantRange.cpp vendor/llvm/dist/lib/Support/ErrorHandling.cpp vendor/llvm/dist/lib/Support/FoldingSet.cpp vendor/llvm/dist/lib/Support/PrettyStackTrace.cpp vendor/llvm/dist/lib/Support/SmallVector.cpp vendor/llvm/dist/lib/Support/Statistic.cpp vendor/llvm/dist/lib/Support/StringRef.cpp vendor/llvm/dist/lib/Support/SystemUtils.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/System/DynamicLibrary.cpp vendor/llvm/dist/lib/System/Path.cpp vendor/llvm/dist/lib/System/RWMutex.cpp vendor/llvm/dist/lib/System/ThreadLocal.cpp vendor/llvm/dist/lib/System/Unix/Path.inc vendor/llvm/dist/lib/System/Unix/Signals.inc vendor/llvm/dist/lib/System/Unix/ThreadLocal.inc vendor/llvm/dist/lib/System/Win32/Path.inc vendor/llvm/dist/lib/System/Win32/Signals.inc vendor/llvm/dist/lib/System/Win32/ThreadLocal.inc vendor/llvm/dist/lib/Target/ARM/ARM.h vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.td vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMachineFunctionInfo.h vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/ARM/NEONMoveFix.cpp vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2ITBlockPass.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaBranchSelector.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaCodeEmitter.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.h vendor/llvm/dist/lib/Target/Alpha/AlphaLLRP.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.h vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.h vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUCallingConv.td vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.h vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.td vendor/llvm/dist/lib/Target/CellSPU/SPUOperands.td vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.h vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.td vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlaze.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeCallingConv.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrFPU.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrFSL.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrFormats.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeIntrinsics.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeSchedule.td vendor/llvm/dist/lib/Target/MSP430/MSP430BranchSelector.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.h vendor/llvm/dist/lib/Target/Mangler.cpp vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/Mips.td vendor/llvm/dist/lib/Target/Mips/MipsCallingConv.td vendor/llvm/dist/lib/Target/Mips/MipsDelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.h vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.td vendor/llvm/dist/lib/Target/Mips/MipsSchedule.td vendor/llvm/dist/lib/Target/PIC16/CMakeLists.txt vendor/llvm/dist/lib/Target/PIC16/PIC16.h vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.h vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.h vendor/llvm/dist/lib/Target/PIC16/PIC16MemSelOpt.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/PIC16Cloner.h vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/PIC16Overlay.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/PIC16Overlay.h vendor/llvm/dist/lib/Target/PIC16/PIC16RegisterInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16RegisterInfo.h vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCBranchSelector.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCCallingConv.td vendor/llvm/dist/lib/Target/PowerPC/PPCCodeEmitter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.h vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/DelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Sparc/FPMover.cpp vendor/llvm/dist/lib/Target/Sparc/Sparc.td vendor/llvm/dist/lib/Target/Sparc/SparcISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.td vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.h vendor/llvm/dist/lib/Target/TargetData.cpp vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/TargetRegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/README-FPStack.txt vendor/llvm/dist/lib/Target/X86/README-SSE.txt vendor/llvm/dist/lib/Target/X86/README.txt vendor/llvm/dist/lib/Target/X86/SSEDomainFix.cpp vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/X86CallingConv.td vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/CMakeLists.txt vendor/llvm/dist/lib/Target/XCore/XCoreISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.h vendor/llvm/dist/lib/Transforms/Hello/Hello.cpp vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/ConstantMerge.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadTypeElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/ExtractGV.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalDCE.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/IPConstantPropagation.cpp vendor/llvm/dist/lib/Transforms/IPO/InlineAlways.cpp vendor/llvm/dist/lib/Transforms/IPO/InlineSimple.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp vendor/llvm/dist/lib/Transforms/IPO/LoopExtractor.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerSetJmp.cpp vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialSpecialization.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/IPO/StripDeadPrototypes.cpp vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp vendor/llvm/dist/lib/Transforms/IPO/StructRetPromotion.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombine.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/EdgeProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp vendor/llvm/dist/lib/Transforms/Scalar/ADCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/BasicBlockPlacement.cpp vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/ConstantProp.cpp vendor/llvm/dist/lib/Transforms/Scalar/DCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/GEPSplitter.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIndexSplit.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/Sink.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailDuplication.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicInliner.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/InstructionNamer.cpp vendor/llvm/dist/lib/Transforms/Utils/LCSSA.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerInvoke.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp vendor/llvm/dist/lib/Transforms/Utils/Mem2Reg.cpp vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/CMakeLists.txt vendor/llvm/dist/lib/VMCore/ConstantFold.cpp vendor/llvm/dist/lib/VMCore/Constants.cpp vendor/llvm/dist/lib/VMCore/ConstantsContext.h vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Dominators.cpp vendor/llvm/dist/lib/VMCore/Globals.cpp vendor/llvm/dist/lib/VMCore/InlineAsm.cpp vendor/llvm/dist/lib/VMCore/Instruction.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/LLVMContext.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/PrintModulePass.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/TypesContext.h vendor/llvm/dist/lib/VMCore/Use.cpp vendor/llvm/dist/lib/VMCore/Value.cpp vendor/llvm/dist/lib/VMCore/ValueSymbolTable.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/runtime/libprofile/Makefile vendor/llvm/dist/test/Analysis/BasicAA/args-rets-allocas-loads.ll vendor/llvm/dist/test/Analysis/BasicAA/constant-over-index.ll vendor/llvm/dist/test/Analysis/BasicAA/featuretest.ll vendor/llvm/dist/test/Analysis/BasicAA/gep-alias.ll vendor/llvm/dist/test/Analysis/BasicAA/modref.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/avoid-smax-1.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/max-trip-count.ll vendor/llvm/dist/test/Archive/README.txt vendor/llvm/dist/test/Assembler/getelementptr.ll vendor/llvm/dist/test/Bindings/Ocaml/analysis.ml vendor/llvm/dist/test/Bindings/Ocaml/bitreader.ml vendor/llvm/dist/test/Bindings/Ocaml/bitwriter.ml vendor/llvm/dist/test/Bindings/Ocaml/executionengine.ml vendor/llvm/dist/test/Bindings/Ocaml/scalar_opts.ml vendor/llvm/dist/test/Bindings/Ocaml/target.ml vendor/llvm/dist/test/Bindings/Ocaml/vmcore.ml vendor/llvm/dist/test/BugPoint/crash-narrowfunctiontest.ll vendor/llvm/dist/test/BugPoint/remove_arguments_test.ll vendor/llvm/dist/test/CMakeLists.txt vendor/llvm/dist/test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll vendor/llvm/dist/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll vendor/llvm/dist/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll vendor/llvm/dist/test/CodeGen/ARM/2009-12-02-vtrn-undef.ll vendor/llvm/dist/test/CodeGen/ARM/2010-05-20-NEONSpillCrash.ll vendor/llvm/dist/test/CodeGen/ARM/2010-05-21-BuildVector.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-11-vmovdrr-bitcast.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-21-nondarwin-tc.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-29-PartialRedefFastAlloc.ll vendor/llvm/dist/test/CodeGen/ARM/arguments.ll vendor/llvm/dist/test/CodeGen/ARM/call-tc.ll vendor/llvm/dist/test/CodeGen/ARM/div.ll vendor/llvm/dist/test/CodeGen/ARM/fnmuls.ll vendor/llvm/dist/test/CodeGen/ARM/fpcmp-opt.ll vendor/llvm/dist/test/CodeGen/ARM/fpowi.ll vendor/llvm/dist/test/CodeGen/ARM/long_shift.ll vendor/llvm/dist/test/CodeGen/ARM/lsr-on-unrolled-loops.ll vendor/llvm/dist/test/CodeGen/ARM/pack.ll vendor/llvm/dist/test/CodeGen/ARM/reg_sequence.ll vendor/llvm/dist/test/CodeGen/ARM/remat.ll vendor/llvm/dist/test/CodeGen/ARM/select.ll vendor/llvm/dist/test/CodeGen/ARM/spill-q.ll vendor/llvm/dist/test/CodeGen/ARM/t2-imm.ll vendor/llvm/dist/test/CodeGen/ARM/vaba.ll vendor/llvm/dist/test/CodeGen/ARM/vabd.ll vendor/llvm/dist/test/CodeGen/ARM/vadd.ll vendor/llvm/dist/test/CodeGen/ARM/vext.ll vendor/llvm/dist/test/CodeGen/ARM/vld1.ll vendor/llvm/dist/test/CodeGen/ARM/vld2.ll vendor/llvm/dist/test/CodeGen/ARM/vld3.ll vendor/llvm/dist/test/CodeGen/ARM/vld4.ll vendor/llvm/dist/test/CodeGen/ARM/vldlane.ll vendor/llvm/dist/test/CodeGen/ARM/vmla.ll vendor/llvm/dist/test/CodeGen/ARM/vmls.ll vendor/llvm/dist/test/CodeGen/ARM/vmov.ll vendor/llvm/dist/test/CodeGen/ARM/vmul.ll vendor/llvm/dist/test/CodeGen/ARM/vrev.ll vendor/llvm/dist/test/CodeGen/ARM/vst1.ll vendor/llvm/dist/test/CodeGen/ARM/vst2.ll vendor/llvm/dist/test/CodeGen/ARM/vst3.ll vendor/llvm/dist/test/CodeGen/ARM/vst4.ll vendor/llvm/dist/test/CodeGen/ARM/vstlane.ll vendor/llvm/dist/test/CodeGen/ARM/vsub.ll vendor/llvm/dist/test/CodeGen/ARM/vtrn.ll vendor/llvm/dist/test/CodeGen/ARM/vuzp.ll vendor/llvm/dist/test/CodeGen/ARM/vzip.ll vendor/llvm/dist/test/CodeGen/CellSPU/bigstack.ll vendor/llvm/dist/test/CodeGen/CellSPU/call.ll vendor/llvm/dist/test/CodeGen/CellSPU/call_indirect.ll vendor/llvm/dist/test/CodeGen/CellSPU/shuffles.ll vendor/llvm/dist/test/CodeGen/Mips/2008-06-05-Carry.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-03-SRet.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-05-ByVal.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-06-fadd64.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-07-FPExtend.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-07-Float2Int.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-15-InternalConstant.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-15-SmallSection.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-22-Cstpool.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-23-fpcmp.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-29-icmp.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-31-fcopysign.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-01-AsmInline.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-03-fabs64.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-04-Bitconvert.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-06-Alloca.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-07-CC.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-07-FPRound.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-08-ctlz.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_constants.ll vendor/llvm/dist/test/CodeGen/SystemZ/05-MemLoadsStores.ll vendor/llvm/dist/test/CodeGen/SystemZ/05-MemLoadsStores16.ll vendor/llvm/dist/test/CodeGen/SystemZ/07-BrUnCond.ll vendor/llvm/dist/test/CodeGen/SystemZ/09-DynamicAlloca.ll vendor/llvm/dist/test/CodeGen/SystemZ/09-Globals.ll vendor/llvm/dist/test/CodeGen/SystemZ/10-FuncsPic.ll vendor/llvm/dist/test/CodeGen/SystemZ/10-GlobalsPic.ll vendor/llvm/dist/test/CodeGen/SystemZ/11-BSwap.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-06-02-Rotate.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-07-04-Shl32.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-07-05-Shifts.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-07-11-FloatBitConvert.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-07-11-InvalidRIISel.ll vendor/llvm/dist/test/CodeGen/Thumb/2007-05-05-InvalidPushPop.ll vendor/llvm/dist/test/CodeGen/Thumb/dyn-stackalloc.ll vendor/llvm/dist/test/CodeGen/Thumb/large-stack.ll vendor/llvm/dist/test/CodeGen/Thumb/vargs.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/crash.ll vendor/llvm/dist/test/CodeGen/Thumb2/div.ll vendor/llvm/dist/test/CodeGen/Thumb2/ldr-str-imm12.ll vendor/llvm/dist/test/CodeGen/Thumb2/lsr-deficiency.ll vendor/llvm/dist/test/CodeGen/Thumb2/machine-licm.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-and2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-call-tc.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cmp.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt1-tc.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-pack.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-spill-q.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxtb.ll vendor/llvm/dist/test/CodeGen/X86/2006-05-22-FPSetEQ.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-26-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-03-13-PHIElimBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll vendor/llvm/dist/test/CodeGen/X86/2009-03-23-MultiUseSched.ll vendor/llvm/dist/test/CodeGen/X86/GC/dg.exp vendor/llvm/dist/test/CodeGen/X86/call-imm.ll vendor/llvm/dist/test/CodeGen/X86/constant-pool-remat-0.ll vendor/llvm/dist/test/CodeGen/X86/critical-edge-split.ll vendor/llvm/dist/test/CodeGen/X86/dllexport.ll vendor/llvm/dist/test/CodeGen/X86/dyn-stackalloc.ll vendor/llvm/dist/test/CodeGen/X86/fabs.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-gep.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-shift-imm.ll vendor/llvm/dist/test/CodeGen/X86/licm-nested.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce4.ll vendor/llvm/dist/test/CodeGen/X86/lsr-reuse.ll vendor/llvm/dist/test/CodeGen/X86/lsr-wrap.ll vendor/llvm/dist/test/CodeGen/X86/phi-immediate-factoring.ll vendor/llvm/dist/test/CodeGen/X86/sibcall.ll vendor/llvm/dist/test/CodeGen/X86/sse-minmax.ll vendor/llvm/dist/test/CodeGen/X86/sse2.ll vendor/llvm/dist/test/CodeGen/X86/sse41.ll vendor/llvm/dist/test/CodeGen/X86/stdcall.ll vendor/llvm/dist/test/CodeGen/X86/store-narrow.ll vendor/llvm/dist/test/CodeGen/X86/tailcall-fastisel.ll vendor/llvm/dist/test/CodeGen/X86/twoaddr-coalesce.ll vendor/llvm/dist/test/CodeGen/X86/v2f32.ll vendor/llvm/dist/test/CodeGen/X86/vec_cast.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-6.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-9.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-19.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-20.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-24.ll vendor/llvm/dist/test/CodeGen/X86/widen_shuffle-1.ll vendor/llvm/dist/test/CodeGen/X86/zero-remat.ll vendor/llvm/dist/test/DebugInfo/printdbginfo2.ll vendor/llvm/dist/test/Feature/NamedMDNode.ll vendor/llvm/dist/test/Feature/linker_private_linkages.ll vendor/llvm/dist/test/Feature/metadata.ll vendor/llvm/dist/test/FrontendC++/2009-07-15-LineNumbers.cpp vendor/llvm/dist/test/FrontendC/2008-03-24-BitField-And-Alloca.c vendor/llvm/dist/test/FrontendC/2010-05-18-asmsched.c vendor/llvm/dist/test/FrontendC/2010-07-14-overconservative-align.c vendor/llvm/dist/test/FrontendC/2010-07-14-ref-off-end.c vendor/llvm/dist/test/FrontendC/cstring-align.c vendor/llvm/dist/test/FrontendC/vla-1.c vendor/llvm/dist/test/FrontendObjC/2009-08-17-DebugInfo.m vendor/llvm/dist/test/LLVMC/AppendCmdHook.td vendor/llvm/dist/test/LLVMC/EmptyCompilationGraph.td vendor/llvm/dist/test/LLVMC/EnvParentheses.td vendor/llvm/dist/test/LLVMC/ForwardAs.td vendor/llvm/dist/test/LLVMC/ForwardTransformedValue.td vendor/llvm/dist/test/LLVMC/ForwardValue.td vendor/llvm/dist/test/LLVMC/HookWithArguments.td vendor/llvm/dist/test/LLVMC/HookWithInFile.td vendor/llvm/dist/test/LLVMC/Init.td vendor/llvm/dist/test/LLVMC/MultiValuedOption.td vendor/llvm/dist/test/LLVMC/MultipleCompilationGraphs.td vendor/llvm/dist/test/LLVMC/NoActions.td vendor/llvm/dist/test/LLVMC/NoCompilationGraph.td vendor/llvm/dist/test/LLVMC/OneOrMore.td vendor/llvm/dist/test/LLVMC/OptionPreprocessor.td vendor/llvm/dist/test/LLVMC/OutputSuffixHook.td vendor/llvm/dist/test/LLVMC/TestWarnings.td vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-new-encoder.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-new-encoder.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_instructions.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_operands.s vendor/llvm/dist/test/MC/AsmParser/dg.exp vendor/llvm/dist/test/MC/AsmParser/directive_abort.s vendor/llvm/dist/test/MC/AsmParser/directive_values.s vendor/llvm/dist/test/MC/Disassembler/arm-tests.txt vendor/llvm/dist/test/MC/Disassembler/neon-tests.txt vendor/llvm/dist/test/MC/Disassembler/thumb-tests.txt vendor/llvm/dist/test/Makefile vendor/llvm/dist/test/Other/constant-fold-gep.ll vendor/llvm/dist/test/Other/inline-asm-newline-terminator.ll vendor/llvm/dist/test/Other/lint.ll vendor/llvm/dist/test/TestRunner.sh vendor/llvm/dist/test/Transforms/ConstProp/constant-expr.ll vendor/llvm/dist/test/Transforms/ConstantMerge/dont-merge.ll vendor/llvm/dist/test/Transforms/GVN/2009-07-13-MemDepSortFail.ll vendor/llvm/dist/test/Transforms/GlobalOpt/2008-07-17-addrspace.ll vendor/llvm/dist/test/Transforms/GlobalOpt/crash.ll vendor/llvm/dist/test/Transforms/IPConstantProp/2009-09-24-byval-ptr.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2009-05-24-useafterfree.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/crash.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/loop_evaluate10.ll vendor/llvm/dist/test/Transforms/InstCombine/align-addr.ll vendor/llvm/dist/test/Transforms/InstCombine/bit-checks.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/phi.ll vendor/llvm/dist/test/Transforms/InstCombine/shift.ll vendor/llvm/dist/test/Transforms/InstCombine/urem-simplify-bug.ll vendor/llvm/dist/test/Transforms/JumpThreading/basic.ll vendor/llvm/dist/test/Transforms/JumpThreading/crash.ll vendor/llvm/dist/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll vendor/llvm/dist/test/Transforms/LICM/hoisting.ll vendor/llvm/dist/test/Transforms/LICM/scalar_promote.ll vendor/llvm/dist/test/Transforms/LICM/sinking.ll vendor/llvm/dist/test/Transforms/LoopRotate/phi-duplicate.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/pr3571.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/uglygep.ll vendor/llvm/dist/test/Transforms/PartialSpecialize/two-specializations.ll vendor/llvm/dist/test/Transforms/ScalarRepl/vector_promote.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/basictest.ll vendor/llvm/dist/test/Transforms/TailCallElim/accum_recursion.ll vendor/llvm/dist/test/Transforms/TailDup/2008-06-11-AvoidDupLoopHeader.ll vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/tools/CMakeLists.txt vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/BugDriver.cpp vendor/llvm/dist/tools/bugpoint/BugDriver.h vendor/llvm/dist/tools/bugpoint/CMakeLists.txt vendor/llvm/dist/tools/bugpoint/CrashDebugger.cpp vendor/llvm/dist/tools/bugpoint/ExecutionDriver.cpp vendor/llvm/dist/tools/bugpoint/ExtractFunction.cpp vendor/llvm/dist/tools/bugpoint/FindBugs.cpp vendor/llvm/dist/tools/bugpoint/Miscompilation.cpp vendor/llvm/dist/tools/bugpoint/OptimizerDriver.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp vendor/llvm/dist/tools/bugpoint/bugpoint.cpp vendor/llvm/dist/tools/edis/CMakeLists.txt vendor/llvm/dist/tools/edis/EDMain.cpp vendor/llvm/dist/tools/edis/Makefile vendor/llvm/dist/tools/gold/README.txt vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/lli.cpp vendor/llvm/dist/tools/llvm-as/llvm-as.cpp vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvm-config/CMakeLists.txt vendor/llvm/dist/tools/llvm-dis/llvm-dis.cpp vendor/llvm/dist/tools/llvm-extract/llvm-extract.cpp vendor/llvm/dist/tools/llvm-ld/llvm-ld.cpp vendor/llvm/dist/tools/llvm-link/llvm-link.cpp vendor/llvm/dist/tools/llvm-mc/CMakeLists.txt vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.h vendor/llvm/dist/tools/llvm-mc/Makefile vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-prof/llvm-prof.cpp vendor/llvm/dist/tools/llvm-shlib/Makefile vendor/llvm/dist/tools/llvmc/CMakeLists.txt vendor/llvm/dist/tools/llvmc/Makefile vendor/llvm/dist/tools/llvmc/doc/LLVMC-Reference.rst vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.h vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/tools/lto/LTOModule.h vendor/llvm/dist/tools/lto/Makefile vendor/llvm/dist/tools/lto/lto.cpp vendor/llvm/dist/tools/lto/lto.exports vendor/llvm/dist/tools/opt/AnalysisWrappers.cpp vendor/llvm/dist/tools/opt/GraphPrinters.cpp vendor/llvm/dist/tools/opt/PrintSCC.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/SmallVectorTest.cpp vendor/llvm/dist/unittests/ADT/StringRefTest.cpp vendor/llvm/dist/unittests/ADT/TripleTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp vendor/llvm/dist/unittests/Makefile vendor/llvm/dist/unittests/Makefile.unittest vendor/llvm/dist/unittests/Support/ConstantRangeTest.cpp vendor/llvm/dist/unittests/Support/ValueHandleTest.cpp vendor/llvm/dist/unittests/VMCore/DerivedTypesTest.cpp vendor/llvm/dist/unittests/VMCore/InstructionsTest.cpp vendor/llvm/dist/unittests/VMCore/MetadataTest.cpp vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/utils/FileCheck/FileCheck.cpp vendor/llvm/dist/utils/FileUpdate/FileUpdate.cpp vendor/llvm/dist/utils/Makefile vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/CallingConvEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangAttrEmitter.h vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.h vendor/llvm/dist/utils/TableGen/CodeGenIntrinsics.h vendor/llvm/dist/utils/TableGen/CodeGenRegisters.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelEmitter.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.h vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.cpp vendor/llvm/dist/utils/TableGen/LLVMCConfigurationEmitter.cpp vendor/llvm/dist/utils/TableGen/NeonEmitter.cpp vendor/llvm/dist/utils/TableGen/Record.cpp vendor/llvm/dist/utils/TableGen/Record.h vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/buildit/GNUmakefile vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/lit/lit/ExampleTests/lit.cfg vendor/llvm/dist/utils/lit/lit/TestFormats.py vendor/llvm/dist/utils/lit/lit/TestRunner.py vendor/llvm/dist/utils/lit/lit/TestingConfig.py vendor/llvm/dist/utils/lit/lit/lit.py vendor/llvm/dist/utils/llvm.grm vendor/llvm/dist/utils/llvmdo vendor/llvm/dist/utils/valgrind/i386-pc-linux-gnu.supp vendor/llvm/dist/utils/valgrind/x86_64-pc-linux-gnu.supp vendor/llvm/dist/utils/vim/llvm.vim vendor/llvm/dist/utils/vim/vimrc Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/CMakeLists.txt Fri Sep 17 15:48:55 2010 (r212793) @@ -1,10 +1,20 @@ # See docs/CMake.html for instructions about how to build LLVM with CMake. project(LLVM) -cmake_minimum_required(VERSION 2.6.1) +cmake_minimum_required(VERSION 2.8) + +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + ) + +set(PACKAGE_VERSION "2.8") +include(VersionFromVCS) +add_version_info_from_vcs(PACKAGE_VERSION) set(PACKAGE_NAME llvm) -set(PACKAGE_VERSION 2.8svn) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu") @@ -53,7 +63,6 @@ set(LLVM_ALL_TARGETS CppBackend Mips MBlaze - MSIL MSP430 PIC16 PowerPC @@ -124,13 +133,6 @@ configure_file( set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm) -# Add path for custom modules -set(CMAKE_MODULE_PATH - ${CMAKE_MODULE_PATH} - "${LLVM_MAIN_SRC_DIR}/cmake" - "${LLVM_MAIN_SRC_DIR}/cmake/modules" - ) - include(AddLLVMDefinitions) if(WIN32) @@ -214,14 +216,8 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) if( MSVC ) - # List of valid CRTs for MSVC - set(MSVC_CRT - MD - MDd - MT - MTd) + include(ChooseMSVCCRT) - set(LLVM_USE_CRT "" CACHE STRING "Specify VC++ CRT to use for debug/release configurations.") add_llvm_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_WARNINGS -DCRT_NONSTDC_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_DEPRECATE ) @@ -231,15 +227,6 @@ if( MSVC ) # Suppress 'new behavior: elements of array 'array' will be default initialized' add_llvm_definitions( -wd4351 ) - if (NOT ${LLVM_USE_CRT} STREQUAL "") - list(FIND MSVC_CRT ${LLVM_USE_CRT} idx) - if (idx LESS 0) - message(FATAL_ERROR "Invalid value for LLVM_USE_CRT: ${LLVM_USE_CRT}. Valid options are one of: ${MSVC_CRT}") - endif (idx LESS 0) - add_llvm_definitions("/${LLVM_USE_CRT}") - message(STATUS "Using VC++ CRT: ${LLVM_USE_CRT}") - endif (NOT ${LLVM_USE_CRT} STREQUAL "") - # Enable warnings if (LLVM_ENABLE_WARNINGS) add_llvm_definitions( /W4 /Wall ) @@ -308,6 +295,7 @@ add_subdirectory(lib/Analysis) add_subdirectory(lib/Analysis/IPA) add_subdirectory(lib/MC) add_subdirectory(lib/MC/MCParser) +add_subdirectory(lib/MC/MCDisassembler) add_subdirectory(test) add_subdirectory(utils/FileCheck) @@ -372,6 +360,8 @@ add_subdirectory(tools) option(LLVM_BUILD_EXAMPLES "Build LLVM example programs." OFF) add_subdirectory(examples) +add_subdirectory(cmake/modules) + install(DIRECTORY include/ DESTINATION include FILES_MATCHING Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/CREDITS.TXT Fri Sep 17 15:48:55 2010 (r212793) @@ -134,6 +134,11 @@ N: Gabor Greif E: ggreif@gmail.com D: Improvements for space efficiency +N: James Grosbach +E: grosbach@apple.com +D: SjLj exception handling support +D: General fixes and improvements for the ARM back-end + N: Lang Hames E: lhames@gmail.com D: PBQP-based register allocator @@ -247,6 +252,12 @@ N: Scott Michel E: scottm@aero.org D: Added STI Cell SPU backend. +N: Takumi Nakamura +E: geek4civic@gmail.com +E: chapuni@hf.rim.or.jp +D: Cygwin and MinGW support. +S: Yokohama, Japan + N: Edward O'Callaghan E: eocallaghan@auroraux.org W: http://www.auroraux.org @@ -277,6 +288,11 @@ N: Sandeep Patel E: deeppatel1987@gmail.com D: ARM calling conventions rewrite, hard float support +N: Wesley Peck +E: peckw@wesleypeck.com +W: http://wesleypeck.com/ +D: MicroBlaze backend + N: Vladimir Prus W: http://vladimir_prus.blogspot.com E: ghost@cs.msu.su @@ -288,7 +304,10 @@ D: MSIL backend N: Duncan Sands E: baldrick@free.fr -D: Ada front-end, exception handling improvements +D: Ada support in llvm-gcc +D: Dragonegg plugin +D: Exception handling improvements +D: Type legalizer rewrite N: Ruchira Sasanka E: sasanka@uiuc.edu @@ -306,6 +325,10 @@ N: Anand Shukla E: ashukla@cs.uiuc.edu D: The `paths' pass +N: Michael J. Spencer +E: bigcheesegs@gmail.com +D: Shepherding Windows COFF support into MC. + N: Reid Spencer E: rspencer@reidspencer.com W: http://reidspencer.com/ @@ -329,14 +352,9 @@ E: xerxes@zafena.se D: Cmake dependency chain and various bug fixes N: Bill Wendling -E: isanbard@gmail.com +E: wendling@apple.com D: Bunches of stuff N: Bob Wilson E: bob.wilson@acm.org D: Advanced SIMD (NEON) support in the ARM backend - -N: Wesley Peck -E: peckw@wesleypeck.com -W: http://wesleypeck.com/ -D: MicroBlaze backend Modified: vendor/llvm/dist/Makefile ============================================================================== --- vendor/llvm/dist/Makefile Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/Makefile Fri Sep 17 15:48:55 2010 (r212793) @@ -64,7 +64,8 @@ endif ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ - tools/clang/runtime tools/clang/docs + tools/clang/runtime tools/clang/docs \ + tools/lto OPTIONAL_DIRS := NO_INSTALL = 1 endif @@ -78,7 +79,8 @@ ifeq ($(MAKECMDGOALS),install-clang-c) endif ifeq ($(MAKECMDGOALS),clang-only) - DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) tools/clang + DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) \ + tools/clang tools/lto OPTIONAL_DIRS := endif @@ -110,7 +112,8 @@ cross-compile-build-tools: --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \ cd .. ; \ fi; \ - ($(MAKE) -C BuildTools \ + (unset SDKROOT; \ + $(MAKE) -C BuildTools \ BUILD_DIRS_ONLY=1 \ UNIVERSAL= \ ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \ @@ -167,7 +170,7 @@ FilesToConfig := \ include/llvm/Config/AsmParsers.def \ include/llvm/Config/Disassemblers.def \ include/llvm/System/DataTypes.h \ - tools/llvmc/plugins/Base/Base.td + tools/llvmc/src/Base.td FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig)) all-local:: $(FilesToConfigPATH) @@ -192,9 +195,6 @@ endif check-llvm2cpp: $(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1 -check-one: - $(Verb)$(MAKE) -C test check-one TESTONE=$(TESTONE) - srpm: $(LLVM_OBJ_ROOT)/llvm.spec rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec Modified: vendor/llvm/dist/Makefile.config.in ============================================================================== --- vendor/llvm/dist/Makefile.config.in Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/Makefile.config.in Fri Sep 17 15:48:55 2010 (r212793) @@ -39,14 +39,18 @@ ifndef PROJECT_NAME PROJECT_NAME := $(LLVMPackageName) endif -PROJ_OBJ_DIR := $(shell $(PWD)) -PROJ_OBJ_ROOT := $(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); $(PWD)) +# The macro below is expanded when 'realpath' is not built-in. +# Built-in 'realpath' is available on GNU Make 3.81. +realpath = $(shell cd $(1); $(PWD)) + +PROJ_OBJ_DIR := $(call realpath, .) +PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL)) ifeq ($(PROJECT_NAME),llvm) -LLVM_SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD)) -LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD)) -PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD)) -PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) +LLVM_SRC_ROOT := $(call realpath, @abs_top_srcdir@) +LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@) +PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) +PROJ_SRC_DIR := $(call realpath, $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) prefix := @prefix@ PROJ_prefix := $(prefix) PROJ_VERSION := $(LLVMVersion) @@ -66,7 +70,7 @@ endif ifndef LLVM_OBJ_ROOT $(error Projects must define LLVM_OBJ_ROOT) endif -PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) +PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) prefix := $(PROJ_INSTALL_ROOT) PROJ_prefix := $(prefix) ifndef PROJ_VERSION Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/Makefile.rules Fri Sep 17 15:48:55 2010 (r212793) @@ -196,105 +196,15 @@ install-local:: all-local install-bytecode:: install-bytecode-local ############################################################################### -# LLVMC: Provide rules for compiling llvmc plugins +# LLVMC: Provide rules for compiling llvmc-based driver ############################################################################### -ifdef LLVMC_PLUGIN - -LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN)) -CPP.Flags += -DLLVMC_PLUGIN_NAME=$(LLVMC_PLUGIN) -REQUIRES_EH := 1 - -ifeq ($(ENABLE_LLVMC_DYNAMIC),1) - LD.Flags += -lCompilerDriver -endif - -# Build a dynamic library if the user runs `make` directly from the plugin -# directory. -ifndef LLVMC_BUILTIN_PLUGIN - LOADABLE_MODULE = 1 -endif - -# TableGen stuff... -ifneq ($(BUILT_SOURCES),) - LLVMC_BUILD_AUTOGENERATED_INC=1 -endif - -endif # LLVMC_PLUGIN - ifdef LLVMC_BASED_DRIVER TOOLNAME = $(LLVMC_BASED_DRIVER) -REQUIRES_EH := 1 - -ifeq ($(ENABLE_LLVMC_DYNAMIC),1) - LD.Flags += -lCompilerDriver -else - LLVMLIBS = CompilerDriver.a - LINK_COMPONENTS = support system -endif - -# Preprocessor magic that generates references to static variables in built-in -# plugins. -ifneq ($(LLVMC_BUILTIN_PLUGINS),) - -USEDLIBS += $(patsubst %,plugin_llvmc_%.a,$(LLVMC_BUILTIN_PLUGINS)) - -LLVMC_BUILTIN_PLUGIN_1 = $(word 1, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_2 = $(word 2, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_3 = $(word 3, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_4 = $(word 4, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_5 = $(word 5, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_6 = $(word 6, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_7 = $(word 7, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_8 = $(word 8, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_9 = $(word 9, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_10 = $(word 10, $(LLVMC_BUILTIN_PLUGINS)) - - -ifneq ($(LLVMC_BUILTIN_PLUGIN_1),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_1=$(LLVMC_BUILTIN_PLUGIN_1) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_2),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_2=$(LLVMC_BUILTIN_PLUGIN_2) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_3),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_3=$(LLVMC_BUILTIN_PLUGIN_3) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_4),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_4=$(LLVMC_BUILTIN_PLUGIN_4) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_5),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_5) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_6),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_6) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_7),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_7) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_8),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_8) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_9),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_9) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_10),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_10) -endif - - -endif +LLVMLIBS = CompilerDriver.a +LINK_COMPONENTS = support system endif # LLVMC_BASED_DRIVER @@ -501,6 +411,26 @@ LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildM LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples #-------------------------------------------------------------------- +# Locations of shared libraries +#-------------------------------------------------------------------- + +SharedPrefix := lib +SharedLibDir := $(LibDir) +LLVMSharedLibDir := $(LLVMLibDir) + +# Win32.DLL prefers to be located on the "PATH" of binaries. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + SharedLibDir := $(ToolDir) + LLVMSharedLibDir := $(LLVMToolDir) + + ifeq ($(HOST_OS),Cygwin) + SharedPrefix := cyg + else + SharedPrefix := + endif +endif + +#-------------------------------------------------------------------- # LLVM Capable Compiler #-------------------------------------------------------------------- @@ -573,12 +503,7 @@ ifeq ($(HOST_OS),Darwin) SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) endif else - ifeq ($(HOST_OS),Cygwin) - SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \ - -Wl,--enable-auto-import -Wl,--enable-auto-image-base - else - SharedLinkOptions=-shared - endif + SharedLinkOptions=-shared endif ifeq ($(TARGET_OS),Darwin) @@ -588,11 +513,13 @@ ifeq ($(TARGET_OS),Darwin) endif ifdef SHARED_LIBRARY +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) ifneq ($(HOST_OS),Darwin) LD.Flags += $(RPATH) -Wl,'$$ORIGIN' else ifneq ($(DARWIN_MAJVERS),4) - LD.Flags += $(RPATH) -Wl,$(LibDir) + LD.Flags += $(RPATH) -Wl,$(SharedLibDir) +endif endif endif endif @@ -621,8 +548,8 @@ ifndef KEEP_SYMBOLS endif # Adjust linker flags for building an executable -ifneq ($(HOST_OS),Darwin) -ifneq ($(DARWIN_MAJVERS),4) +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +ifneq ($(HOST_OS), Darwin) ifdef TOOLNAME LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' ifdef EXAMPLE_TOOL @@ -631,12 +558,12 @@ ifdef TOOLNAME LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) endif endif -endif else ifneq ($(DARWIN_MAJVERS),4) LD.Flags += $(RPATH) -Wl,@executable_path/../lib endif endif +endif #---------------------------------------------------------- @@ -963,6 +890,13 @@ LLVMUsedLibs := $(patsubst %.a.o, lib LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) endif +# Win32.DLL may refer to other components. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + ifdef LOADABLE_MODULE + LINK_COMPONENTS := all + endif +endif + ifndef IS_CLEANING_TARGET ifdef LINK_COMPONENTS @@ -975,12 +909,28 @@ $(LLVM_CONFIG): $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) ifeq ($(ENABLE_SHARED), 1) +# We can take the "auto-import" feature to get rid of using dllimport. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \ + -L $(SharedLibDir) +endif LLVMLibsOptions += -lLLVM-$(LLVMVersion) -LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT) +LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT) else -LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) -LLVMLibsPaths += $(LLVM_CONFIG) \ - $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) + +ifndef NO_LLVM_CONFIG +LLVMConfigLibs := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error) +ifeq ($(LLVMConfigLibs),Error) +$(error llvm-config --libs failed) +endif +LLVMLibsOptions += $(LLVMConfigLibs) +LLVMConfigLibfiles := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS) || echo Error) +ifeq ($(LLVMConfigLibfiles),Error) +$(error llvm-config --libfiles failed) +endif +LLVMLibsPaths += $(LLVM_CONFIG) $(LLVMConfigLibfiles) +endif + endif endif endif @@ -1011,12 +961,25 @@ $(NativeExportsFile): $(EXPORTED_SYMBOL_ clean-local:: -$(Verb) $(RM) -f $(NativeExportsFile) else +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# GNU ld Win32 accepts .DEF files that contain "DATA" entries. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE:.exports=.def)) +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Echo) Generating $(notdir $@) + $(Verb) $(ECHO) "EXPORTS" > $@ + $(Verb) $(CAT) $< >> $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +# Default behavior: just use the exports file verbatim. NativeExportsFile := $(EXPORTED_SYMBOL_FILE) endif endif +endif # Now add the linker command-line options to use the native export file. +# Darwin ifeq ($(HOST_OS),Darwin) LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile) endif @@ -1026,6 +989,12 @@ ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile) endif +# Windows +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# LLVMLibsOptions is invalidated at processing tools/llvm-shlib. +SharedLinkOptions += $(NativeExportsFile) +endif + endif ############################################################################### @@ -1100,10 +1069,10 @@ ifdef LIBRARYNAME LIBRARYNAME := $(strip $(LIBRARYNAME)) ifdef LOADABLE_MODULE LibName.A := $(LibDir)/$(LIBRARYNAME).a -LibName.SO := $(LibDir)/$(LIBRARYNAME)$(SHLIBEXT) +LibName.SO := $(SharedLibDir)/$(LIBRARYNAME)$(SHLIBEXT) else LibName.A := $(LibDir)/lib$(LIBRARYNAME).a -LibName.SO := $(LibDir)/lib$(LIBRARYNAME)$(SHLIBEXT) +LibName.SO := $(SharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) endif LibName.O := $(LibDir)/$(LIBRARYNAME).o LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca @@ -1128,14 +1097,14 @@ SharedLibKindMessage := "Loadable Module else SharedLibKindMessage := "Shared Library" endif -$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(LibDir)/.dir +$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(SharedLibDir)/.dir $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \ - $(LIBRARYNAME)$(SHLIBEXT) + $(notdir $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \ $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) else -$(LibName.SO): $(ObjectsO) $(LibDir)/.dir - $(Echo) Linking $(BuildMode) Shared Library $(basename $@) +$(LibName.SO): $(ObjectsO) $(SharedLibDir)/.dir + $(Echo) Linking $(BuildMode) Shared Library $(notdir $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) endif @@ -1151,21 +1120,23 @@ uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -ifdef LOADABLE_MODULE -DestSharedLib = $(DESTDIR)$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT) +# Win32.DLL prefers to be located on the "PATH" of binaries. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +DestSharedLibDir := $(DESTDIR)$(PROJ_bindir) else -DestSharedLib = $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT) +DestSharedLibDir := $(DESTDIR)$(PROJ_libdir) endif +DestSharedLib := $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) install-local:: $(DestSharedLib) -$(DestSharedLib): $(LibName.SO) $(DESTDIR)$(PROJ_libdir) +$(DestSharedLib): $(LibName.SO) $(DestSharedLibDir) $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib) $(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib) uninstall-local:: $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib) - -$(Verb) $(RM) -f $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).* + -$(Verb) $(RM) -f $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME).* endif endif @@ -1341,10 +1312,33 @@ endif endif ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD)) +ifneq ($(ARCH), Mips) LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map endif endif +endif + +#--------------------------------------------------------- +# Tool Version Info Support +#--------------------------------------------------------- +ifeq ($(HOST_OS),Darwin) +ifdef TOOL_INFO_PLIST + +LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(ObjDir)/$(TOOL_INFO_PLIST) + +$(ToolBuildPath): $(ObjDir)/$(TOOL_INFO_PLIST) + +$(ObjDir)/$(TOOL_INFO_PLIST): $(PROJ_SRC_DIR)/$(TOOL_INFO_PLIST).in $(ObjDir)/.dir + $(Echo) "Creating $(TOOLNAME) '$(TOOL_INFO_PLIST)' file..." + $(Verb)sed -e "s#@TOOL_INFO_UTI@#$(TOOL_INFO_UTI)#g" \ + -e "s#@TOOL_INFO_NAME@#$(TOOL_INFO_NAME)#g" \ + -e "s#@TOOL_INFO_VERSION@#$(TOOL_INFO_VERSION)#g" \ + -e "s#@TOOL_INFO_BUILD_VERSION@#$(TOOL_INFO_BUILD_VERSION)#g" \ + $< > $@ + +endif +endif #--------------------------------------------------------- # Provide targets for building the tools @@ -1377,7 +1371,7 @@ $(ToolAliasBuildPath): $(ToolBuildPath) $(Echo) Creating $(BuildMode) Alias $(TOOLALIAS) $(StripWarnMsg) $(Verb) $(RM) -f $(ToolAliasBuildPath) $(Verb) $(AliasTool) $(TOOLEXENAME) $(ToolAliasBuildPath) - $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLNAME) \ + $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLALIAS) \ $(StripWarnMsg) endif @@ -1626,7 +1620,7 @@ ifdef TARGET TABLEGEN_INC_FILES_COMMON = 1 endif -ifdef LLVMC_BUILD_AUTOGENERATED_INC +ifdef LLVMC_BASED_DRIVER TABLEGEN_INC_FILES_COMMON = 1 endif @@ -1750,20 +1744,26 @@ clean-local:: endif # TARGET -ifdef LLVMC_BUILD_AUTOGENERATED_INC +ifdef LLVMC_BASED_DRIVER + +TDSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \ + $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td))) + +TDCommon := $(strip $(wildcard \ + $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) -LLVMCPluginSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \ - $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td))) +TDFiles := $(TDSrc) $(TDCommon) -TDFiles := $(LLVMCPluginSrc) \ - $(strip $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) +$(INCTMPFiles) : $(TBLGEN) $(TDFiles) -$(ObjDir)/AutoGenerated.inc.tmp: $(LLVMCPluginSrc) $(ObjDir)/.dir \ - $(TBLGEN) $(TD_COMMON) - $(Echo) "Building LLVMC configuration library with tblgen" +$(ObjDir)/%.inc.tmp: %.td $(ObjDir)/.dir + $(Echo) "Building LLVMC compilation graph description with tblgen" $(Verb) $(TableGen) -gen-llvmc -o $(call SYSPATH, $@) $< -endif # LLVMC_BUILD_AUTOGENERATED_INC +clean-local:: + -$(Verb) $(RM) -f $(INCFiles) + +endif # LLVMC_BASED_DRIVER ############################################################################### # OTHER RULES: Other rules needed @@ -1840,11 +1840,13 @@ check:: $(EchoCmd) No test directory ; \ fi -check-lit:: +check-lit:: check + +check-dg:: $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \ if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \ $(EchoCmd) Running test suite ; \ - $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-lit ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-dg ; \ else \ $(EchoCmd) No Makefile in test directory ; \ fi ; \ Modified: vendor/llvm/dist/README.txt ============================================================================== --- vendor/llvm/dist/README.txt Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/README.txt Fri Sep 17 15:48:55 2010 (r212793) @@ -1,4 +1,4 @@ -Low Level Virtual Machine (LLVM) +\Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for the Low Level @@ -13,3 +13,4 @@ assistance with LLVM. If you're writing a package for LLVM, see docs/Packaging.html for our suggestions. + Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/autoconf/configure.ac Fri Sep 17 15:48:55 2010 (r212793) @@ -31,7 +31,7 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.8svn]],[llvmbugs@cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.8rc]],[llvmbugs@cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. @@ -101,7 +101,6 @@ for i in `ls ${srcdir}/projects` do if test -d ${srcdir}/projects/${i} ; then case ${i} in - CVS) ;; sample) AC_CONFIG_SUBDIRS([projects/sample]) ;; privbracket) AC_CONFIG_SUBDIRS([projects/privbracket]) ;; llvm-stacker) AC_CONFIG_SUBDIRS([projects/llvm-stacker]) ;; @@ -299,7 +298,7 @@ dnl Set the LINKALL and NOLINKALL Makefi AC_SUBST(LINKALL,$llvm_cv_link_all_option) AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option) -dnl Set the "LLVM_ON_*" variables based on llvm_cvs_platform_type +dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type dnl This is used by lib/System to determine the basic kind of implementation dnl to use. case $llvm_cv_platform_type in @@ -369,13 +368,13 @@ else AC_SUBST(LLVM_CROSS_COMPILING, [0]) fi -dnl Check to see if there's a "CVS" (or .svn or .git) directory indicating -dnl that this build is being done from a checkout. This sets up several -dnl defaults for the command line switches. When we build with a CVS directory, +dnl Check to see if there's a .svn or .git directory indicating that this +dnl build is being done from a checkout. This sets up several defaults for +dnl the command line switches. When we build with a checkout directory, dnl we get a debug with assertions turned on. Without, we assume a source dnl release and we get an optimized build without assertions. dnl See --enable-optimized and --enable-assertions below -if test -d "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then +if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then cvsbuild="yes" optimize="no" AC_SUBST(CVSBUILD,[[CVSBUILD=1]]) @@ -392,7 +391,7 @@ dnl===---------------------------------- dnl --enable-optimized : check whether they want to do an optimized build: AC_ARG_ENABLE(optimized, AS_HELP_STRING( - --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize) + --enable-optimized,[Compile with optimizations enabled (default is YES)]),,enableval="yes") if test ${enableval} = "no" ; then AC_SUBST(ENABLE_OPTIMIZED,[[]]) else @@ -410,7 +409,7 @@ fi dnl --enable-assertions : check whether they want to turn on assertions or not: AC_ARG_ENABLE(assertions,AS_HELP_STRING( - --enable-assertions,[Compile with assertion checks enabled (default is YES)]),, enableval="yes") + --enable-assertions,[Compile with assertion checks enabled (default is NO)]),, enableval="no") if test ${enableval} = "yes" ; then AC_SUBST(DISABLE_ASSERTIONS,[[]]) else @@ -544,13 +543,13 @@ TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], [Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, pic16, - xcore, msp430, systemz, blackfin, cbe, msil, and cpp (default=all)]),, + xcore, msp430, systemz, blackfin, cbe, and cpp (default=all)]),, enableval=all) if test "$enableval" = host-only ; then enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -567,7 +566,6 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; - msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in @@ -598,9 +596,17 @@ AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BU # If so, define LLVM_NATIVE_ARCH to that LLVM target. for a_target in $TARGETS_TO_BUILD; do if test "$a_target" = "$LLVM_NATIVE_ARCH"; then - LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target" - AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCHTARGET, + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH, $LLVM_NATIVE_ARCH, [LLVM architecture name for the native architecture, if available]) + LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" + LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" + LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGET, $LLVM_NATIVE_TARGET, + [LLVM name for the native Target init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO, + [LLVM name for the native TargetInfo init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER, + [LLVM name for the native AsmPrinter init function, if available]) fi done @@ -857,35 +863,6 @@ AC_ARG_ENABLE(libffi,AS_HELP_STRING( esac], llvm_cv_enable_libffi=no) -dnl Only Windows needs dynamic libCompilerDriver to support plugins. -if test "$llvm_cv_os_type" = "Win32" ; then - llvmc_dynamic="yes" -else - llvmc_dynamic="no" -fi - -dnl --enable-llvmc-dynamic : should LLVMC link libCompilerDriver dynamically? -AC_ARG_ENABLE(llvmc-dynamic,AS_HELP_STRING( ---enable-llvmc-dynamic, -[Link LLVMC dynamically (default is NO, unless on Win32)]),, -enableval=$llvmc_dynamic) -if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1 ; then - AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[ENABLE_LLVMC_DYNAMIC=1]]) -else - AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[]]) -fi - -dnl --enable-llvmc-dynamic-plugins : should LLVMC support dynamic plugins? -AC_ARG_ENABLE(llvmc-dynamic-plugins,AS_HELP_STRING( ---enable-llvmc-dynamic-plugins, -[Enable dynamic LLVMC plugins (default is YES)]),, -enableval=yes) -if test ${enableval} = "yes" ; then - AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[ENABLE_LLVMC_DYNAMIC_PLUGINS=1]]) -else - AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[]]) -fi - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 4: Check for programs we need and that they are the right version @@ -1011,6 +988,13 @@ fi dnl Find the install program AC_PROG_INSTALL +dnl Prepend src dir to install path dir if it's a relative path +dnl This is a hack for installs that take place in something other +dnl than the top level. +case "$INSTALL" in + [[\\/$]]* | ?:[[\\/]]* ) ;; + *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;; +esac dnl Checks for documentation and testing tools that we can do without. If these dnl are not found then they are set to "true" which always succeeds but does @@ -1033,6 +1017,9 @@ AC_PATH_PROGS(OCAMLDEP, [ocamldep]) AC_PATH_PROGS(OCAMLDOC, [ocamldoc]) AC_PATH_PROGS(GAS, [gas as]) +dnl Get the version of the linker in use. +AC_LINK_GET_VERSION + dnl Determine whether the linker supports the -R option. AC_LINK_USE_R @@ -1345,6 +1332,9 @@ fi dnl atomic builtins are required for threading support. AC_MSG_CHECKING(for GCC atomic builtins) +dnl Since we'll be using these atomic builtins in C++ files we should test +dnl the C++ compiler. +AC_LANG_PUSH([C++]) AC_LINK_IFELSE( AC_LANG_SOURCE( [[int main() { @@ -1356,13 +1346,13 @@ AC_LINK_IFELSE( return 0; } ]]), + AC_LANG_POP([C++]) AC_MSG_RESULT(yes) AC_DEFINE(LLVM_MULTITHREADED, 1, Build multithreading support into LLVM), AC_MSG_RESULT(no) AC_DEFINE(LLVM_MULTITHREADED, 0, Build multithreading support into LLVM) AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing])) - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 9: Additional checks, variables, etc. @@ -1549,7 +1539,11 @@ dnl WARNING: dnl If you add or remove an dnl you MUST also update Makefile.rules so that the variable FilesToConfig dnl contains the same list of files as AC_CONFIG_HEADERS below. This ensures the dnl files can be updated automatically when their *.in sources change. -AC_CONFIG_HEADERS([include/llvm/Config/config.h]) +AC_CONFIG_HEADERS([include/llvm/Config/config.h include/llvm/Config/llvm-config.h]) +AH_TOP([#ifndef CONFIG_H +#define CONFIG_H]) +AH_BOTTOM([#endif]) + AC_CONFIG_FILES([include/llvm/Config/Targets.def]) AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def]) AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def]) @@ -1563,7 +1557,7 @@ dnl Configure the RPM spec file for LLVM AC_CONFIG_FILES([llvm.spec]) dnl Configure llvmc's Base plugin -AC_CONFIG_FILES([tools/llvmc/plugins/Base/Base.td]) +AC_CONFIG_FILES([tools/llvmc/src/Base.td]) dnl Do the first stage of configuration for llvm-config.in. AC_CONFIG_FILES([tools/llvm-config/llvm-config.in]) Modified: vendor/llvm/dist/autoconf/m4/link_options.m4 ============================================================================== --- vendor/llvm/dist/autoconf/m4/link_options.m4 Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/autoconf/m4/link_options.m4 Fri Sep 17 15:48:55 2010 (r212793) @@ -1,4 +1,25 @@ # +# Get the linker version string. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_GET_VERSION], + [AC_CACHE_CHECK([for linker version],[llvm_cv_link_version], + [ + version_string="$(ld -v 2>&1 | head -1)" + + # Check for ld64. + if (echo "$version_string" | grep -q "ld64"); then + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#") + else + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") + fi + ]) + AC_DEFINE_UNQUOTED([HOST_LINK_VERSION],"$llvm_cv_link_version", + [Linker version detected at compile time.]) +]) + +# # Determine if the system can handle the -R option being passed to the linker. # # This macro is specific to LLVM. Modified: vendor/llvm/dist/bindings/ada/llvm/llvm.ads ============================================================================== --- vendor/llvm/dist/bindings/ada/llvm/llvm.ads Fri Sep 17 15:44:32 2010 (r212792) +++ vendor/llvm/dist/bindings/ada/llvm/llvm.ads Fri Sep 17 15:48:55 2010 (r212793) @@ -317,25 +317,27 @@ package llvm is LLVMGhostLinkage, LLVMCommonLinkage, LLVMLinkerPrivateLinkage, - LLVMLinkerPrivateWeakLinkage); + LLVMLinkerPrivateWeakLinkage, + LinkerPrivateWeakDefAutoLinkage); for LLVMLinkage use - (LLVMExternalLinkage => 0, - LLVMAvailableExternallyLinkage => 1, - LLVMLinkOnceAnyLinkage => 2, - LLVMLinkOnceODRLinkage => 3, - LLVMWeakAnyLinkage => 4, - LLVMWeakODRLinkage => 5, - LLVMAppendingLinkage => 6, - LLVMInternalLinkage => 7, - LLVMPrivateLinkage => 8, - LLVMDLLImportLinkage => 9, - LLVMDLLExportLinkage => 10, - LLVMExternalWeakLinkage => 11, - LLVMGhostLinkage => 12, - LLVMCommonLinkage => 13, - LLVMLinkerPrivateLinkage => 14, - LLVMLinkerPrivateWeakLinkage => 15); + (LLVMExternalLinkage => 0, + LLVMAvailableExternallyLinkage => 1, + LLVMLinkOnceAnyLinkage => 2, + LLVMLinkOnceODRLinkage => 3, + LLVMWeakAnyLinkage => 4, + LLVMWeakODRLinkage => 5, + LLVMAppendingLinkage => 6, + LLVMInternalLinkage => 7, + LLVMPrivateLinkage => 8, + LLVMDLLImportLinkage => 9, + LLVMDLLExportLinkage => 10, + LLVMExternalWeakLinkage => 11, + LLVMGhostLinkage => 12, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 15:51:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85B35106564A; Fri, 17 Sep 2010 15:51:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5ED8FC25; Fri, 17 Sep 2010 15:51:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HFp0T4034724; Fri, 17 Sep 2010 15:51:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HFp0ON034723; Fri, 17 Sep 2010 15:51:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009171551.o8HFp0ON034723@svn.freebsd.org> From: Dimitry Andric Date: Fri, 17 Sep 2010 15:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212794 - vendor/llvm/llvm-r114020 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 15:51:00 -0000 Author: dim Date: Fri Sep 17 15:50:59 2010 New Revision: 212794 URL: http://svn.freebsd.org/changeset/base/212794 Log: Tag llvm r114020. Approved by: rpaulo (mentor) Added: vendor/llvm/llvm-r114020/ - copied from r212793, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 15:54:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A012910656C1; Fri, 17 Sep 2010 15:54:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89C9F8FC23; Fri, 17 Sep 2010 15:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HFsfsI034819; Fri, 17 Sep 2010 15:54:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HFsfOg034816; Fri, 17 Sep 2010 15:54:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009171554.o8HFsfOg034816@svn.freebsd.org> From: Dimitry Andric Date: Fri, 17 Sep 2010 15:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212795 - in vendor/clang/dist: clang.xcodeproj docs docs/tools examples examples/PrintFunctionNames examples/clang-interpreter examples/wpa include/clang include/clang-c include/clang/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 15:54:41 -0000 Author: dim Date: Fri Sep 17 15:54:40 2010 New Revision: 212795 URL: http://svn.freebsd.org/changeset/base/212795 Log: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) Added: vendor/clang/dist/examples/PrintFunctionNames/PrintFunctionNames.exports vendor/clang/dist/include/clang/AST/OperationKinds.h vendor/clang/dist/include/clang/Analysis/Analyses/FormatString.h vendor/clang/dist/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h vendor/clang/dist/include/clang/Analysis/CFGStmtMap.h vendor/clang/dist/include/clang/Checker/PathSensitive/CheckerHelpers.h vendor/clang/dist/include/clang/FrontendTool/ vendor/clang/dist/include/clang/FrontendTool/Utils.h vendor/clang/dist/include/clang/Lex/CodeCompletionHandler.h vendor/clang/dist/include/clang/Parse/ParseAST.h vendor/clang/dist/include/clang/Sema/AnalysisBasedWarnings.h vendor/clang/dist/include/clang/Sema/AttributeList.h vendor/clang/dist/include/clang/Sema/CXXFieldCollector.h vendor/clang/dist/include/clang/Sema/DeclSpec.h vendor/clang/dist/include/clang/Sema/DelayedDiagnostic.h vendor/clang/dist/include/clang/Sema/Designator.h vendor/clang/dist/include/clang/Sema/IdentifierResolver.h vendor/clang/dist/include/clang/Sema/Initialization.h vendor/clang/dist/include/clang/Sema/Lookup.h vendor/clang/dist/include/clang/Sema/ObjCMethodList.h vendor/clang/dist/include/clang/Sema/Overload.h vendor/clang/dist/include/clang/Sema/Ownership.h vendor/clang/dist/include/clang/Sema/ParsedTemplate.h vendor/clang/dist/include/clang/Sema/PrettyDeclStackTrace.h vendor/clang/dist/include/clang/Sema/Scope.h vendor/clang/dist/include/clang/Sema/ScopeInfo.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Sema/SemaInternal.h vendor/clang/dist/include/clang/Sema/Template.h vendor/clang/dist/include/clang/Sema/TemplateDeduction.h vendor/clang/dist/include/clang/Serialization/ vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h vendor/clang/dist/include/clang/Serialization/ASTDeserializationListener.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/ASTWriter.h vendor/clang/dist/include/clang/Serialization/CMakeLists.txt vendor/clang/dist/include/clang/Serialization/Makefile vendor/clang/dist/lib/AST/CXXABI.h vendor/clang/dist/lib/AST/ItaniumCXXABI.cpp vendor/clang/dist/lib/AST/MicrosoftCXXABI.cpp vendor/clang/dist/lib/Analysis/CFGStmtMap.cpp vendor/clang/dist/lib/Analysis/FormatString.cpp vendor/clang/dist/lib/Analysis/FormatStringParsing.h vendor/clang/dist/lib/Analysis/PseudoConstantAnalysis.cpp vendor/clang/dist/lib/Analysis/ScanfFormatString.cpp vendor/clang/dist/lib/Checker/AnalysisManager.cpp vendor/clang/dist/lib/Checker/CheckerHelpers.cpp vendor/clang/dist/lib/Checker/UnreachableCodeChecker.cpp vendor/clang/dist/lib/FrontendTool/ vendor/clang/dist/lib/FrontendTool/CMakeLists.txt vendor/clang/dist/lib/FrontendTool/ExecuteCompilerInvocation.cpp vendor/clang/dist/lib/FrontendTool/Makefile vendor/clang/dist/lib/Headers/avxintrin.h vendor/clang/dist/lib/Headers/immintrin.h vendor/clang/dist/lib/Headers/x86intrin.h vendor/clang/dist/lib/Parse/ParseAST.cpp vendor/clang/dist/lib/Sema/AttributeList.cpp vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Serialization/ vendor/clang/dist/lib/Serialization/ASTCommon.cpp vendor/clang/dist/lib/Serialization/ASTCommon.h vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp vendor/clang/dist/lib/Serialization/CMakeLists.txt vendor/clang/dist/lib/Serialization/GeneratePCH.cpp vendor/clang/dist/lib/Serialization/Makefile vendor/clang/dist/test/Analysis/array-struct-region.c vendor/clang/dist/test/Analysis/flat-store.c vendor/clang/dist/test/Analysis/idempotent-operations.cpp vendor/clang/dist/test/Analysis/stack-addr-ps.cpp vendor/clang/dist/test/Analysis/string.c vendor/clang/dist/test/Analysis/unreachable-code-path.c vendor/clang/dist/test/CXX/class/class.mem/p1.cpp vendor/clang/dist/test/CXX/class/class.static/class.static.data/p4.cpp vendor/clang/dist/test/CXX/conv/conv.ptr/p2.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.def/p7.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.def/p8.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udir/p6.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/p5.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp vendor/clang/dist/test/CXX/special/class.dtor/p9.cpp vendor/clang/dist/test/CXX/temp/temp.arg/temp.arg.type/p2-cxx0x.cpp vendor/clang/dist/test/CodeGen/2010-08-10-DbgConstant.c vendor/clang/dist/test/CodeGen/_Bool-conversion.c vendor/clang/dist/test/CodeGen/asm-inout.c vendor/clang/dist/test/CodeGen/block-decl-merging.c vendor/clang/dist/test/CodeGen/builtin-expect.c vendor/clang/dist/test/CodeGen/debug-info-enum.c vendor/clang/dist/test/CodeGen/debug-info-scope.c vendor/clang/dist/test/CodeGen/enum2.c vendor/clang/dist/test/CodeGen/fold-const-declref.c vendor/clang/dist/test/CodeGen/packed-structure.c vendor/clang/dist/test/CodeGen/pragma-visibility.c vendor/clang/dist/test/CodeGenCXX/debug-info-byval.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-class.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-ctor.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-enum.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-friend.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template.cpp vendor/clang/dist/test/CodeGenCXX/dependent-type-member-pointer.cpp vendor/clang/dist/test/CodeGenCXX/nonconst-init.cpp vendor/clang/dist/test/CodeGenCXX/pragma-visibility.cpp vendor/clang/dist/test/CodeGenCXX/reference-cast.cpp vendor/clang/dist/test/CodeGenCXX/template-anonymous-types.cpp vendor/clang/dist/test/CodeGenCXX/uncode-string.cpp vendor/clang/dist/test/CodeGenCXX/volatile.cpp vendor/clang/dist/test/CodeGenObjC/bitfield-access.m vendor/clang/dist/test/CodeGenObjC/block-var-layout.m vendor/clang/dist/test/CodeGenObjC/fpret.m vendor/clang/dist/test/CodeGenObjC/gnu-exceptions.m vendor/clang/dist/test/CodeGenObjC/ivar-layout-nonfragile-abi2.m vendor/clang/dist/test/CodeGenObjC/return-objc-object.mm vendor/clang/dist/test/CodeGenObjC/super-dotsyntax-struct-property.m vendor/clang/dist/test/CodeGenObjCXX/exceptions.mm vendor/clang/dist/test/CodeGenObjCXX/rtti.mm vendor/clang/dist/test/Driver/at_file.c vendor/clang/dist/test/Driver/at_file.c.args vendor/clang/dist/test/Driver/darwin-xarch.c vendor/clang/dist/test/Driver/gcc_forward.c vendor/clang/dist/test/Frontend/Inputs/ vendor/clang/dist/test/Frontend/Inputs/lit.local.cfg vendor/clang/dist/test/Frontend/Inputs/test.h vendor/clang/dist/test/Frontend/Inputs/test2.h vendor/clang/dist/test/Frontend/Inputs/test3.h vendor/clang/dist/test/Frontend/print-header-includes.c vendor/clang/dist/test/Index/Inputs/crash-recovery-code-complete-remap.c vendor/clang/dist/test/Index/Inputs/crash-recovery-reparse-remap.c vendor/clang/dist/test/Index/Inputs/preamble-reparse-1.c vendor/clang/dist/test/Index/Inputs/preamble-reparse-2.c vendor/clang/dist/test/Index/Inputs/preamble.h vendor/clang/dist/test/Index/Inputs/prefix.h vendor/clang/dist/test/Index/annotate-tokens.cpp vendor/clang/dist/test/Index/complete-blocks.m vendor/clang/dist/test/Index/complete-ctor-inits.cpp vendor/clang/dist/test/Index/complete-declarators.cpp vendor/clang/dist/test/Index/complete-declarators.m vendor/clang/dist/test/Index/complete-hiding.c vendor/clang/dist/test/Index/complete-memfunc-cvquals.cpp vendor/clang/dist/test/Index/complete-natural.m vendor/clang/dist/test/Index/complete-preprocessor.m vendor/clang/dist/test/Index/complete-super.cpp vendor/clang/dist/test/Index/complete-super.m vendor/clang/dist/test/Index/complete-templates.cpp vendor/clang/dist/test/Index/complete-unterminated.c vendor/clang/dist/test/Index/crash-recovery-code-complete.c vendor/clang/dist/test/Index/crash-recovery-reparse.c vendor/clang/dist/test/Index/crash-recovery.c vendor/clang/dist/test/Index/index-templates.cpp vendor/clang/dist/test/Index/invalid-rdar-8236270.cpp vendor/clang/dist/test/Index/load-classes.cpp vendor/clang/dist/test/Index/load-decls.c vendor/clang/dist/test/Index/load-namespaces.cpp vendor/clang/dist/test/Index/preamble-reparse.c vendor/clang/dist/test/Index/preamble.c vendor/clang/dist/test/Index/rdar-8288645-invalid-code.mm vendor/clang/dist/test/Lexer/Inputs/ vendor/clang/dist/test/Lexer/ms-extensions.c vendor/clang/dist/test/Lexer/preamble.c vendor/clang/dist/test/PCH/Inputs/chain-cxx1.h vendor/clang/dist/test/PCH/Inputs/chain-cxx2.h vendor/clang/dist/test/PCH/Inputs/chain-decls1.h vendor/clang/dist/test/PCH/Inputs/chain-decls2.h vendor/clang/dist/test/PCH/Inputs/chain-ext_vector1.h vendor/clang/dist/test/PCH/Inputs/chain-ext_vector2.h vendor/clang/dist/test/PCH/Inputs/chain-external-defs1.h vendor/clang/dist/test/PCH/Inputs/chain-external-defs2.h vendor/clang/dist/test/PCH/Inputs/chain-macro-override1.h vendor/clang/dist/test/PCH/Inputs/chain-macro-override2.h vendor/clang/dist/test/PCH/Inputs/chain-macro1.h vendor/clang/dist/test/PCH/Inputs/chain-macro2.h vendor/clang/dist/test/PCH/Inputs/chain-selectors1.h vendor/clang/dist/test/PCH/Inputs/chain-selectors2.h vendor/clang/dist/test/PCH/Inputs/chain-trivial1.h vendor/clang/dist/test/PCH/Inputs/chain-trivial2.h vendor/clang/dist/test/PCH/Inputs/preamble.h vendor/clang/dist/test/PCH/chain-cxx.cpp vendor/clang/dist/test/PCH/chain-decls.c vendor/clang/dist/test/PCH/chain-ext_vector.c vendor/clang/dist/test/PCH/chain-external-defs.c vendor/clang/dist/test/PCH/chain-macro-override.c vendor/clang/dist/test/PCH/chain-macro.c vendor/clang/dist/test/PCH/chain-predecl.h vendor/clang/dist/test/PCH/chain-predecl.m vendor/clang/dist/test/PCH/chain-selectors.m vendor/clang/dist/test/PCH/chain-trivial.c vendor/clang/dist/test/PCH/cxx-offsetof-base.cpp vendor/clang/dist/test/PCH/cxx-offsetof-base.h vendor/clang/dist/test/PCH/cxx-required-decls.cpp vendor/clang/dist/test/PCH/cxx-required-decls.h vendor/clang/dist/test/PCH/cxx-static_assert.cpp vendor/clang/dist/test/PCH/cxx-static_assert.h vendor/clang/dist/test/PCH/cxx-traits.cpp vendor/clang/dist/test/PCH/cxx-traits.h vendor/clang/dist/test/PCH/cxx-typeid.cpp vendor/clang/dist/test/PCH/cxx-typeid.h vendor/clang/dist/test/PCH/objcxx-ivar-class.h vendor/clang/dist/test/PCH/objcxx-ivar-class.mm vendor/clang/dist/test/PCH/pragma-weak.c vendor/clang/dist/test/PCH/pragma-weak.h vendor/clang/dist/test/PCH/preamble.c vendor/clang/dist/test/PCH/pth.c vendor/clang/dist/test/PCH/pth.h vendor/clang/dist/test/PCH/reinclude.cpp vendor/clang/dist/test/PCH/reinclude1.h vendor/clang/dist/test/PCH/reinclude2.h vendor/clang/dist/test/PCH/selector-warning.h vendor/clang/dist/test/PCH/selector-warning.m vendor/clang/dist/test/Parser/asm-constraints-pr7869.c vendor/clang/dist/test/Parser/cxx-ambig-decl-expr-xfail.cpp vendor/clang/dist/test/Parser/cxx-ambig-decl-expr.cpp vendor/clang/dist/test/Parser/pragma-visibility.c vendor/clang/dist/test/Preprocessor/dump-macros-undef.c vendor/clang/dist/test/Preprocessor/macro_paste_msextensions.c vendor/clang/dist/test/Preprocessor/pragma-pushpop-macro.c vendor/clang/dist/test/Rewriter/rewrite-block-consts.mm vendor/clang/dist/test/Rewriter/rewrite-constructor-init.mm vendor/clang/dist/test/Sema/array-size-64.c vendor/clang/dist/test/Sema/array-size.c vendor/clang/dist/test/Sema/builtins-arm.c vendor/clang/dist/test/Sema/cast-incomplete.c vendor/clang/dist/test/Sema/format-strings-scanf.c vendor/clang/dist/test/Sema/vector-ops.c vendor/clang/dist/test/Sema/warn-cast-align.c vendor/clang/dist/test/SemaCXX/MicrosoftExtensions.cpp vendor/clang/dist/test/SemaCXX/access-member-pointer.cpp vendor/clang/dist/test/SemaCXX/altivec.cpp vendor/clang/dist/test/SemaCXX/anonymous-struct.cpp vendor/clang/dist/test/SemaCXX/borland-extensions.cpp vendor/clang/dist/test/SemaCXX/crash-PR7625.cpp vendor/clang/dist/test/SemaCXX/decltype.cpp vendor/clang/dist/test/SemaCXX/increment-decrement.cpp vendor/clang/dist/test/SemaCXX/member-pointer-ms.cpp vendor/clang/dist/test/SemaCXX/qualified-member-enum.cpp vendor/clang/dist/test/SemaCXX/unary-real-imag.cpp vendor/clang/dist/test/SemaCXX/vector-no-lax.cpp vendor/clang/dist/test/SemaCXX/virtual-base-used.cpp vendor/clang/dist/test/SemaCXX/warn-cast-align.cpp vendor/clang/dist/test/SemaCXX/warn-global-constructors.cpp vendor/clang/dist/test/SemaCXX/warn-unused-filescoped.cpp vendor/clang/dist/test/SemaObjC/compare-qualified-class.m vendor/clang/dist/test/SemaObjC/conflict-nonfragile-abi2.m vendor/clang/dist/test/SemaObjC/default-synthesize-1.m vendor/clang/dist/test/SemaObjC/iboutletcollection-attr.m vendor/clang/dist/test/SemaObjC/property-and-ivar-use.m vendor/clang/dist/test/SemaObjC/synth-provisional-ivars.m vendor/clang/dist/test/SemaObjC/warn-strict-selector-match.m vendor/clang/dist/test/SemaObjCXX/cxxoperator-selector.mm vendor/clang/dist/test/SemaObjCXX/exceptions-fragile.mm vendor/clang/dist/test/SemaObjCXX/expr-objcxx.mm vendor/clang/dist/test/SemaObjCXX/foreach-block.mm vendor/clang/dist/test/SemaObjCXX/warn-strict-selector-match.mm vendor/clang/dist/test/SemaTemplate/crash-8204126.cpp vendor/clang/dist/test/SemaTemplate/dependent-class-member-operator.cpp vendor/clang/dist/test/SemaTemplate/inject-templated-friend-post.cpp vendor/clang/dist/test/SemaTemplate/inject-templated-friend.cpp vendor/clang/dist/test/SemaTemplate/recovery-crash.cpp vendor/clang/dist/tools/driver/Info.plist.in vendor/clang/dist/tools/libclang/CIndexCXX.cpp vendor/clang/dist/tools/libclang/CXType.cpp vendor/clang/dist/tools/libclang/CXType.h Deleted: vendor/clang/dist/include/clang/Analysis/Analyses/PrintfFormatString.h vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h vendor/clang/dist/include/clang/Frontend/PCHDeserializationListener.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Frontend/PCHWriter.h vendor/clang/dist/include/clang/Index/Utils.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/AttributeList.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Designator.h vendor/clang/dist/include/clang/Parse/Ownership.h vendor/clang/dist/include/clang/Parse/Scope.h vendor/clang/dist/include/clang/Parse/Template.h vendor/clang/dist/include/clang/Sema/ParseAST.h vendor/clang/dist/lib/Checker/CallInliner.cpp vendor/clang/dist/lib/Frontend/GeneratePCH.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp vendor/clang/dist/lib/Frontend/PrintParserCallbacks.cpp vendor/clang/dist/lib/Index/ResolveLocation.cpp vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/MinimalAction.cpp vendor/clang/dist/lib/Runtime/ vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.h vendor/clang/dist/lib/Sema/CXXFieldCollector.h vendor/clang/dist/lib/Sema/IdentifierResolver.h vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/ParseAST.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaInit.h vendor/clang/dist/lib/Sema/SemaOverload.h vendor/clang/dist/lib/Sema/SemaTemplate.h vendor/clang/dist/test/CodeGen/address-space-field2.c vendor/clang/dist/test/CodeGen/address-space-field3.c vendor/clang/dist/test/CodeGen/address-space-field4.c vendor/clang/dist/test/CodeGenCXX/member-qual-debug-info.cpp vendor/clang/dist/test/Coverage/parse-callbacks.c vendor/clang/dist/test/Coverage/parse-callbacks.m vendor/clang/dist/test/Driver/cxx-pth.cpp vendor/clang/dist/test/Lexer/constants-ms.c vendor/clang/dist/test/Parser/2008-10-31-parse-noop-failure.c vendor/clang/dist/test/Preprocessor/macro_paste_mscomment.c vendor/clang/dist/test/SemaCXX/inc-decrement-qualifiers.cpp vendor/clang/dist/test/SemaCXX/warn-for-var-in-else.cpp vendor/clang/dist/tools/libclang/CXTypes.cpp Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/docs/InternalsManual.html vendor/clang/dist/docs/LanguageExtensions.html vendor/clang/dist/docs/UsersManual.html vendor/clang/dist/docs/tools/clang.pod vendor/clang/dist/examples/CMakeLists.txt vendor/clang/dist/examples/Makefile vendor/clang/dist/examples/PrintFunctionNames/Makefile vendor/clang/dist/examples/PrintFunctionNames/PrintFunctionNames.cpp vendor/clang/dist/examples/clang-interpreter/CMakeLists.txt vendor/clang/dist/examples/clang-interpreter/Makefile vendor/clang/dist/examples/clang-interpreter/main.cpp vendor/clang/dist/examples/wpa/CMakeLists.txt vendor/clang/dist/examples/wpa/Makefile vendor/clang/dist/examples/wpa/clang-wpa.cpp vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTConsumer.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ASTImporter.h vendor/clang/dist/include/clang/AST/Attr.h vendor/clang/dist/include/clang/AST/CMakeLists.txt vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclContextInternals.h vendor/clang/dist/include/clang/AST/DeclFriend.h vendor/clang/dist/include/clang/AST/DeclGroup.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/FullExpr.h vendor/clang/dist/include/clang/AST/Makefile vendor/clang/dist/include/clang/AST/NestedNameSpecifier.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Redeclarable.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/StmtCXX.h vendor/clang/dist/include/clang/AST/StmtVisitor.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/AST/TypeOrdering.h vendor/clang/dist/include/clang/Analysis/Analyses/LiveVariables.h vendor/clang/dist/include/clang/Analysis/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/CFG.h vendor/clang/dist/include/clang/Analysis/FlowSensitive/DataflowSolver.h vendor/clang/dist/include/clang/Analysis/ProgramPoint.h vendor/clang/dist/include/clang/Analysis/Visitors/CFGStmtVisitor.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/Builtins.h vendor/clang/dist/include/clang/Basic/BuiltinsARM.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/DeclNodes.td vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/IdentifierTable.h vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/Linkage.h vendor/clang/dist/include/clang/Basic/Makefile vendor/clang/dist/include/clang/Basic/OnDiskHashTable.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/Specifiers.h vendor/clang/dist/include/clang/Basic/StmtNodes.td vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TargetOptions.h vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Basic/arm_neon.td vendor/clang/dist/include/clang/CMakeLists.txt vendor/clang/dist/include/clang/Checker/BugReporter/BugReporter.h vendor/clang/dist/include/clang/Checker/PathSensitive/AnalysisManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/Checker.h vendor/clang/dist/include/clang/Checker/PathSensitive/ConstraintManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/Environment.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRCoreEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRState.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSubEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRTransferFuncs.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRWorkList.h vendor/clang/dist/include/clang/Checker/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Checker/PathSensitive/SVals.h vendor/clang/dist/include/clang/Checker/PathSensitive/Store.h vendor/clang/dist/include/clang/Checker/PathSensitive/SymbolManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/ValueManager.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/HostInfo.h vendor/clang/dist/include/clang/Driver/Job.h vendor/clang/dist/include/clang/Driver/OptParser.td vendor/clang/dist/include/clang/Driver/OptTable.h vendor/clang/dist/include/clang/Driver/Option.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/Tool.h vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/AnalyzerOptions.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/DeclXML.def vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/DocumentXML.h vendor/clang/dist/include/clang/Frontend/FrontendAction.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/HeaderSearchOptions.h vendor/clang/dist/include/clang/Frontend/PreprocessorOptions.h vendor/clang/dist/include/clang/Frontend/PreprocessorOutputOptions.h vendor/clang/dist/include/clang/Frontend/StmtXML.def vendor/clang/dist/include/clang/Frontend/TypeXML.def vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Index/TranslationUnit.h vendor/clang/dist/include/clang/Lex/ExternalPreprocessorSource.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/Lexer.h vendor/clang/dist/include/clang/Lex/MacroInfo.h vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/PTHLexer.h vendor/clang/dist/include/clang/Lex/PreprocessingRecord.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/Token.h vendor/clang/dist/include/clang/Makefile vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Rewrite/FixItRewriter.h vendor/clang/dist/include/clang/Rewrite/FrontendActions.h vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h vendor/clang/dist/include/clang/Sema/ExternalSemaSource.h vendor/clang/dist/lib/AST/ASTConsumer.cpp vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/AttrImpl.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclGroup.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/DeclarationName.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprClassification.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/FullExpr.cpp vendor/clang/dist/lib/AST/Makefile vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp vendor/clang/dist/lib/AST/ParentMap.cpp vendor/clang/dist/lib/AST/RecordLayout.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtDumper.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/TemplateBase.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypeLoc.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/AnalysisContext.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/LiveVariables.cpp vendor/clang/dist/lib/Analysis/Makefile vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Analysis/ReachableCode.cpp vendor/clang/dist/lib/Analysis/UninitializedValues.cpp vendor/clang/dist/lib/Basic/Builtins.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/FileManager.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/Makefile vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CMakeLists.txt vendor/clang/dist/lib/Checker/AdjustedReturnValueChecker.cpp vendor/clang/dist/lib/Checker/AggExprVisitor.cpp vendor/clang/dist/lib/Checker/AnalysisConsumer.cpp vendor/clang/dist/lib/Checker/ArrayBoundChecker.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Checker/BasicStore.cpp vendor/clang/dist/lib/Checker/BasicValueFactory.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/BugReporterVisitors.cpp vendor/clang/dist/lib/Checker/CFRefCount.cpp vendor/clang/dist/lib/Checker/CMakeLists.txt vendor/clang/dist/lib/Checker/CStringChecker.cpp vendor/clang/dist/lib/Checker/CallAndMessageChecker.cpp vendor/clang/dist/lib/Checker/CastSizeChecker.cpp vendor/clang/dist/lib/Checker/CheckDeadStores.cpp vendor/clang/dist/lib/Checker/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Checker/CocoaConventions.cpp vendor/clang/dist/lib/Checker/DivZeroChecker.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/Checker/FixedAddressChecker.cpp vendor/clang/dist/lib/Checker/FlatStore.cpp vendor/clang/dist/lib/Checker/GRCXXExprEngine.cpp vendor/clang/dist/lib/Checker/GRCoreEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngineExperimentalChecks.cpp vendor/clang/dist/lib/Checker/GRExprEngineExperimentalChecks.h vendor/clang/dist/lib/Checker/GRState.cpp vendor/clang/dist/lib/Checker/IdempotentOperationChecker.cpp vendor/clang/dist/lib/Checker/LLVMConventionsChecker.cpp vendor/clang/dist/lib/Checker/Makefile vendor/clang/dist/lib/Checker/MallocChecker.cpp vendor/clang/dist/lib/Checker/MemRegion.cpp vendor/clang/dist/lib/Checker/OSAtomicChecker.cpp vendor/clang/dist/lib/Checker/PointerArithChecker.cpp vendor/clang/dist/lib/Checker/PointerSubChecker.cpp vendor/clang/dist/lib/Checker/RangeConstraintManager.cpp vendor/clang/dist/lib/Checker/RegionStore.cpp vendor/clang/dist/lib/Checker/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/Checker/ReturnUndefChecker.cpp vendor/clang/dist/lib/Checker/SVals.cpp vendor/clang/dist/lib/Checker/SValuator.cpp vendor/clang/dist/lib/Checker/SimpleConstraintManager.cpp vendor/clang/dist/lib/Checker/SimpleConstraintManager.h vendor/clang/dist/lib/Checker/SimpleSValuator.cpp vendor/clang/dist/lib/Checker/StackAddrLeakChecker.cpp vendor/clang/dist/lib/Checker/Store.cpp vendor/clang/dist/lib/Checker/StreamChecker.cpp vendor/clang/dist/lib/Checker/SymbolManager.cpp vendor/clang/dist/lib/Checker/UndefBranchChecker.cpp vendor/clang/dist/lib/Checker/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Checker/UnixAPIChecker.cpp vendor/clang/dist/lib/Checker/VLASizeChecker.cpp vendor/clang/dist/lib/Checker/ValueManager.cpp vendor/clang/dist/lib/CodeGen/ABIInfo.h vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.h vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGException.h vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGTemporaries.cpp vendor/clang/dist/lib/CodeGen/CGVTT.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/Makefile vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/InputInfo.h vendor/clang/dist/lib/Driver/Job.cpp vendor/clang/dist/lib/Driver/Makefile vendor/clang/dist/lib/Driver/OptTable.cpp vendor/clang/dist/lib/Driver/Option.cpp vendor/clang/dist/lib/Driver/ToolChain.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/CacheTokens.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/DiagChecker.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/Makefile vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/StmtXML.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/VerifyDiagnosticsClient.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/Makefile vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/mmintrin.h vendor/clang/dist/lib/Headers/nmmintrin.h vendor/clang/dist/lib/Headers/smmintrin.h vendor/clang/dist/lib/Headers/stddef.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Index/CMakeLists.txt vendor/clang/dist/lib/Index/Entity.cpp vendor/clang/dist/lib/Index/Makefile vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/MacroInfo.cpp vendor/clang/dist/lib/Lex/Makefile vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/PTHLexer.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/PreprocessingRecord.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/TokenLexer.cpp vendor/clang/dist/lib/Makefile vendor/clang/dist/lib/Parse/CMakeLists.txt vendor/clang/dist/lib/Parse/Makefile vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Parse/ParsePragma.h vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/CMakeLists.txt vendor/clang/dist/lib/Rewrite/DeltaTree.cpp vendor/clang/dist/lib/Rewrite/FixItRewriter.cpp vendor/clang/dist/lib/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/Rewrite/HTMLRewrite.cpp vendor/clang/dist/lib/Rewrite/Makefile vendor/clang/dist/lib/Rewrite/RewriteObjC.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/CMakeLists.txt vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/IdentifierResolver.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/Makefile vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaAttr.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TargetAttributesSema.cpp vendor/clang/dist/lib/Sema/TargetAttributesSema.h vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/additive-folding.c vendor/clang/dist/test/Analysis/bstring.c vendor/clang/dist/test/Analysis/constant-folding.c vendor/clang/dist/test/Analysis/dead-stores.c vendor/clang/dist/test/Analysis/idempotent-operations.c vendor/clang/dist/test/Analysis/malloc.c vendor/clang/dist/test/Analysis/misc-ps-region-store.cpp vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/plist-output.m vendor/clang/dist/test/Analysis/retain-release-region-store.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/stream.c vendor/clang/dist/test/Analysis/uninit-vals-ps-region.m vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CXX/class.access/class.protected/p1.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/class.access/p6.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.friend/p4.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/sfinae-1.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp vendor/clang/dist/test/CXX/temp/temp.param/p4.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p3.cpp vendor/clang/dist/test/CodeCompletion/enum-switch-case.c vendor/clang/dist/test/CodeCompletion/functions.cpp vendor/clang/dist/test/CodeGen/2009-04-23-dbg.c vendor/clang/dist/test/CodeGen/2009-10-20-GlobalDebug.c vendor/clang/dist/test/CodeGen/address-space-field1.c vendor/clang/dist/test/CodeGen/asm-errors.c vendor/clang/dist/test/CodeGen/asm.c vendor/clang/dist/test/CodeGen/asm_arm.c vendor/clang/dist/test/CodeGen/atomic.c vendor/clang/dist/test/CodeGen/available-externally-suppress.c vendor/clang/dist/test/CodeGen/bitfield-2.c vendor/clang/dist/test/CodeGen/blockstret.c vendor/clang/dist/test/CodeGen/builtins-arm.c vendor/clang/dist/test/CodeGen/builtins-ppc-altivec.c vendor/clang/dist/test/CodeGen/builtins-x86.c vendor/clang/dist/test/CodeGen/const-arithmetic.c vendor/clang/dist/test/CodeGen/const-init.c vendor/clang/dist/test/CodeGen/designated-initializers.c vendor/clang/dist/test/CodeGen/exprs.c vendor/clang/dist/test/CodeGen/func-in-block.c vendor/clang/dist/test/CodeGen/lineno-dbginfo.c vendor/clang/dist/test/CodeGen/palignr.c vendor/clang/dist/test/CodeGen/statements.c vendor/clang/dist/test/CodeGen/struct-passing.c vendor/clang/dist/test/CodeGen/thread-specifier.c vendor/clang/dist/test/CodeGen/trapv.c vendor/clang/dist/test/CodeGen/unwind-attr.c vendor/clang/dist/test/CodeGen/vector.c vendor/clang/dist/test/CodeGen/x86_32-arguments.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/anonymous-namespaces.cpp vendor/clang/dist/test/CodeGenCXX/anonymous-union-member-initializer.cpp vendor/clang/dist/test/CodeGenCXX/arm.cpp vendor/clang/dist/test/CodeGenCXX/condition.cpp vendor/clang/dist/test/CodeGenCXX/copy-constructor-elim-2.cpp vendor/clang/dist/test/CodeGenCXX/debug-info.cpp vendor/clang/dist/test/CodeGenCXX/delete.cpp vendor/clang/dist/test/CodeGenCXX/destructors.cpp vendor/clang/dist/test/CodeGenCXX/dyncast.cpp vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/exceptions-no-rtti.cpp vendor/clang/dist/test/CodeGenCXX/explicit-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/expr.cpp vendor/clang/dist/test/CodeGenCXX/global-init.cpp vendor/clang/dist/test/CodeGenCXX/key-function-vtable.cpp vendor/clang/dist/test/CodeGenCXX/mangle-exprs.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/member-functions.cpp vendor/clang/dist/test/CodeGenCXX/new.cpp vendor/clang/dist/test/CodeGenCXX/operator-new.cpp vendor/clang/dist/test/CodeGenCXX/pointers-to-data-members.cpp vendor/clang/dist/test/CodeGenCXX/rtti-fundamental.cpp vendor/clang/dist/test/CodeGenCXX/rtti-linkage.cpp vendor/clang/dist/test/CodeGenCXX/static-init-2.cpp vendor/clang/dist/test/CodeGenCXX/threadsafe-statics-exceptions.cpp vendor/clang/dist/test/CodeGenCXX/thunks.cpp vendor/clang/dist/test/CodeGenCXX/value-init.cpp vendor/clang/dist/test/CodeGenCXX/virt-template-vtable.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/CodeGenCXX/vtt-layout.cpp vendor/clang/dist/test/CodeGenCXX/x86_32-arguments.cpp vendor/clang/dist/test/CodeGenCXX/x86_64-arguments.cpp vendor/clang/dist/test/CodeGenObjC/debug-info-linkagename.m vendor/clang/dist/test/CodeGenObjC/exceptions.m vendor/clang/dist/test/CodeGenObjC/for-in.m vendor/clang/dist/test/CodeGenObjC/property-dbg.m vendor/clang/dist/test/CodeGenObjC/synchronized.m vendor/clang/dist/test/CodeGenObjC/unwind-fn.m vendor/clang/dist/test/CodeGenObjC/x86_64-struct-return-gc.m vendor/clang/dist/test/CodeGenObjCXX/property-objects.mm vendor/clang/dist/test/CodeGenObjCXX/references.mm vendor/clang/dist/test/Driver/bindings.c vendor/clang/dist/test/Driver/darwin-as.c vendor/clang/dist/test/Driver/darwin-cc.c vendor/clang/dist/test/Driver/darwin-debug-flags.c vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/Driver/freebsd.c vendor/clang/dist/test/Driver/rewrite-objc.m vendor/clang/dist/test/FixIt/fixit.c vendor/clang/dist/test/Headers/x86-intrinsics-headers.c vendor/clang/dist/test/Index/TestClassDecl.m vendor/clang/dist/test/Index/annotate-tokens-pp.c vendor/clang/dist/test/Index/annotate-tokens.c vendor/clang/dist/test/Index/annotate-tokens.m vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Index/cindex-from-source.m vendor/clang/dist/test/Index/code-completion.cpp vendor/clang/dist/test/Index/complete-at-exprstmt.m vendor/clang/dist/test/Index/complete-exprs.c vendor/clang/dist/test/Index/complete-macros.c vendor/clang/dist/test/Index/complete-method-decls.m vendor/clang/dist/test/Index/complete-objc-message-id.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Index/complete-pch.m vendor/clang/dist/test/Index/complete-recovery.m vendor/clang/dist/test/Index/load-stmts.cpp vendor/clang/dist/test/Index/local-symbols.m vendor/clang/dist/test/Index/print-typekind.c vendor/clang/dist/test/Index/usrs.cpp vendor/clang/dist/test/Index/usrs.m vendor/clang/dist/test/Lexer/c90.c vendor/clang/dist/test/Lexer/constants.c vendor/clang/dist/test/Lexer/has_feature_cxx0x.cpp vendor/clang/dist/test/Makefile vendor/clang/dist/test/PCH/cxx-templates.cpp vendor/clang/dist/test/PCH/cxx-templates.h vendor/clang/dist/test/PCH/namespaces.cpp vendor/clang/dist/test/Parser/MicrosoftExtensions.c vendor/clang/dist/test/Parser/asm.c vendor/clang/dist/test/Parser/block-block-storageclass.c vendor/clang/dist/test/Parser/block-pointer-decl.c vendor/clang/dist/test/Parser/cxx-altivec.cpp vendor/clang/dist/test/Parser/cxx-attributes.cpp vendor/clang/dist/test/Parser/cxx-condition.cpp vendor/clang/dist/test/Parser/cxx-decl.cpp vendor/clang/dist/test/Parser/cxx-default-args.cpp vendor/clang/dist/test/Parser/cxx-namespace-alias.cpp vendor/clang/dist/test/Parser/cxx-typeof.cpp vendor/clang/dist/test/Parser/declarators.c vendor/clang/dist/test/Parser/expressions.c vendor/clang/dist/test/Parser/expressions.m vendor/clang/dist/test/Parser/method-prototype-1.m vendor/clang/dist/test/Parser/objc-messaging-1.m vendor/clang/dist/test/Parser/pragma-options.c vendor/clang/dist/test/Parser/selector-1.m vendor/clang/dist/test/Parser/typeof.c vendor/clang/dist/test/Parser/types.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/macro_fn_comma_swallow.c vendor/clang/dist/test/Preprocessor/pragma_diagnostic.c vendor/clang/dist/test/Preprocessor/pragma_microsoft.c vendor/clang/dist/test/Preprocessor/pushable-diagnostics.c vendor/clang/dist/test/Sema/altivec-init.c vendor/clang/dist/test/Sema/array-init.c vendor/clang/dist/test/Sema/block-misc.c vendor/clang/dist/test/Sema/builtins.c vendor/clang/dist/test/Sema/compound-literal.c vendor/clang/dist/test/Sema/const-eval.c vendor/clang/dist/test/Sema/enum.c vendor/clang/dist/test/Sema/expr-comma-c89.c vendor/clang/dist/test/Sema/expr-comma.c vendor/clang/dist/test/Sema/exprs.c vendor/clang/dist/test/Sema/ext_vector_casts.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/knr-def-call.c vendor/clang/dist/test/Sema/overloadable.c vendor/clang/dist/test/Sema/pragma-align-packed.c vendor/clang/dist/test/Sema/recover-goto.c vendor/clang/dist/test/Sema/scope-check.c vendor/clang/dist/test/Sema/switch.c vendor/clang/dist/test/Sema/typedef-variable-type.c vendor/clang/dist/test/Sema/warn-unused-function.c vendor/clang/dist/test/Sema/warn-write-strings.c vendor/clang/dist/test/SemaCXX/abstract.cpp vendor/clang/dist/test/SemaCXX/addr-of-overloaded-function.cpp vendor/clang/dist/test/SemaCXX/attr-unavailable.cpp vendor/clang/dist/test/SemaCXX/blocks.cpp vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/conversion-function.cpp vendor/clang/dist/test/SemaCXX/copy-assignment.cpp vendor/clang/dist/test/SemaCXX/default-constructor-initializers.cpp vendor/clang/dist/test/SemaCXX/destructor.cpp vendor/clang/dist/test/SemaCXX/enum.cpp vendor/clang/dist/test/SemaCXX/exception-spec.cpp vendor/clang/dist/test/SemaCXX/expressions.cpp vendor/clang/dist/test/SemaCXX/flexible-array-test.cpp vendor/clang/dist/test/SemaCXX/i-c-e-cxx.cpp vendor/clang/dist/test/SemaCXX/linkage-spec.cpp vendor/clang/dist/test/SemaCXX/member-expr.cpp vendor/clang/dist/test/SemaCXX/member-pointer.cpp vendor/clang/dist/test/SemaCXX/new-delete.cpp vendor/clang/dist/test/SemaCXX/offsetof.cpp vendor/clang/dist/test/SemaCXX/overload-call-copycon.cpp vendor/clang/dist/test/SemaCXX/return-noreturn.cpp vendor/clang/dist/test/SemaCXX/return-stack-addr.cpp vendor/clang/dist/test/SemaCXX/scope-check.cpp vendor/clang/dist/test/SemaCXX/switch.cpp vendor/clang/dist/test/SemaCXX/type-traits.cpp vendor/clang/dist/test/SemaCXX/unreachable-code.cpp vendor/clang/dist/test/SemaCXX/vector.cpp vendor/clang/dist/test/SemaObjC/block-type-safety.m vendor/clang/dist/test/SemaObjC/comptypes-5.m vendor/clang/dist/test/SemaObjC/crash-label.m vendor/clang/dist/test/SemaObjC/deref-interface.m vendor/clang/dist/test/SemaObjC/method-lookup-3.m vendor/clang/dist/test/SemaObjC/method-no-context.m vendor/clang/dist/test/SemaObjC/nonnull.m vendor/clang/dist/test/SemaObjC/property-not-lvalue.m vendor/clang/dist/test/SemaObjC/protocol-attribute.m vendor/clang/dist/test/SemaObjC/protocols.m vendor/clang/dist/test/SemaObjC/static-ivar-ref-1.m vendor/clang/dist/test/SemaObjCXX/conversion-to-objc-pointer-2.mm vendor/clang/dist/test/SemaObjCXX/deduction.mm vendor/clang/dist/test/SemaObjCXX/instantiate-stmt.mm vendor/clang/dist/test/SemaObjCXX/message.mm vendor/clang/dist/test/SemaObjCXX/objc-decls-inside-namespace.mm vendor/clang/dist/test/SemaObjCXX/pointer-to-objc-pointer-conv.mm vendor/clang/dist/test/SemaObjCXX/references.mm vendor/clang/dist/test/SemaTemplate/class-template-id.cpp vendor/clang/dist/test/SemaTemplate/current-instantiation.cpp vendor/clang/dist/test/SemaTemplate/deduction-crash.cpp vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/dependent-base-member-init.cpp vendor/clang/dist/test/SemaTemplate/dependent-expr.cpp vendor/clang/dist/test/SemaTemplate/instantiate-anonymous-union.cpp vendor/clang/dist/test/SemaTemplate/instantiate-attr.cpp vendor/clang/dist/test/SemaTemplate/instantiate-clang.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-3.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-4.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-1.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-template.cpp vendor/clang/dist/test/SemaTemplate/member-access-expr.cpp vendor/clang/dist/test/SemaTemplate/member-template-access-expr.cpp vendor/clang/dist/test/SemaTemplate/nested-name-spec-template.cpp vendor/clang/dist/test/SemaTemplate/temp.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_template.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_type.cpp vendor/clang/dist/test/lit.cfg vendor/clang/dist/tools/c-index-test/CMakeLists.txt vendor/clang/dist/tools/c-index-test/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexCodeCompletion.cpp vendor/clang/dist/tools/libclang/CIndexDiagnostic.cpp vendor/clang/dist/tools/libclang/CIndexUSRs.cpp vendor/clang/dist/tools/libclang/CMakeLists.txt vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/tools/libclang/CXCursor.h vendor/clang/dist/tools/libclang/Makefile vendor/clang/dist/tools/libclang/libclang.darwin.exports vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/compatibility.html vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/get_started.html vendor/clang/dist/www/hacking.html vendor/clang/dist/www/menu.html.incl Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Fri Sep 17 15:50:59 2010 (r212794) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Fri Sep 17 15:54:40 2010 (r212795) @@ -9,15 +9,11 @@ /* Begin PBXBuildFile section */ 03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F50AC50D416EAA00B9CF60 /* Targets.cpp */; }; 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2193CC0F45EEB700C0713D /* Mangle.cpp */; }; - 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */; }; 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */; }; 1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */; }; 1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */; }; 1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */; }; 1A2A54BB0FD1DD1C00F4CE45 /* DocumentXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */; }; - 1A2A54BC0FD1DD1C00F4CE45 /* GeneratePCH.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AB0FD1DD1C00F4CE45 /* GeneratePCH.cpp */; }; - 1A2A54BD0FD1DD1C00F4CE45 /* HTMLPrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */; }; - 1A2A54BE0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */; }; 1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */; }; 1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */; }; 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */; }; @@ -93,12 +89,9 @@ 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; }; 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; }; 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8701161085D00AE030A /* ASTMerge.cpp */; }; - 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */; }; 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */; }; 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; }; - 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */; }; 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */; }; - 352246EA0F5C6BE000D0D279 /* PlistDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */; }; 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */; }; 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */; }; 352712510DAFE54700C76352 /* IdentifierResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352712500DAFE54700C76352 /* IdentifierResolver.cpp */; }; @@ -142,10 +135,16 @@ 35EFEFB60DB67ED60020783D /* GRTransferFuncs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */; }; 35F2A01E0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */; }; 35F8D0D60D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */; }; + 57AA9250121C8B9400B4AA6C /* ASTReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924D121C8B9400B4AA6C /* ASTReader.cpp */; }; + 57AA9251121C8B9400B4AA6C /* ASTReaderDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924E121C8B9400B4AA6C /* ASTReaderDecl.cpp */; }; + 57AA9252121C8B9400B4AA6C /* ASTReaderStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */; }; + 57EB566A121B034300ECA335 /* GeneratePCH.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57EB5662121B034300ECA335 /* GeneratePCH.cpp */; }; + 57EB566B121B034300ECA335 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 57EB5663121B034300ECA335 /* Makefile */; }; + 57F66612121B4DE600DCE3B7 /* ASTWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */; }; + 57F66613121B4DE600DCE3B7 /* ASTWriterDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */; }; + 57F66614121B4DE600DCE3B7 /* ASTWriterStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */; }; 72D16C1F0D9975C400E6DA4A /* HTMLRewrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */; }; 84AF36A10CB17A3B00C820A5 /* DeclObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */; }; - 84D9A8880C1A57E100AC7ABC /* AttributeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */; }; - 84D9A88C0C1A581300AC7ABC /* AttributeList.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84D9A88B0C1A581300AC7ABC /* AttributeList.h */; }; 9012911D1048068D0083456D /* ASTUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9012911C1048068D0083456D /* ASTUnit.cpp */; }; 90129121104812F90083456D /* CIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9012911F104812F90083456D /* CIndex.cpp */; }; 906BF4B00F83BA2E001071FA /* ConvertUTF.c in Sources */ = {isa = PBXBuildFile; fileRef = 906BF4AF0F83BA2E001071FA /* ConvertUTF.c */; }; @@ -159,7 +158,6 @@ 90FD6D81103C3D49005F5B73 /* Indexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D75103C3D49005F5B73 /* Indexer.cpp */; }; 90FD6D82103C3D49005F5B73 /* IndexProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D76103C3D49005F5B73 /* IndexProvider.cpp */; }; 90FD6D83103C3D49005F5B73 /* Program.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D77103C3D49005F5B73 /* Program.cpp */; }; - 90FD6D84103C3D49005F5B73 /* ResolveLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D79103C3D49005F5B73 /* ResolveLocation.cpp */; }; 90FD6D85103C3D49005F5B73 /* SelectorMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */; }; 90FD6DB6103D977E005F5B73 /* index-test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6DB5103D977E005F5B73 /* index-test.cpp */; }; BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */; }; @@ -168,6 +166,20 @@ BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3F811595A01001C2D68 /* SemaType.cpp */; }; BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */; }; BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */; }; + BF9FEDF91225E67B003A8B71 /* Action.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDF81225E67B003A8B71 /* Action.cpp */; }; + BF9FEDFB1225E6A9003A8B71 /* AttributeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */; }; + BF9FEDFD1225E6C6003A8B71 /* DeclSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */; }; + BF9FEDFF1225E6DD003A8B71 /* TargetAttributesSema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */; }; + BF9FEE021225E73F003A8B71 /* ExprClassification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */; }; + BF9FEE041225E759003A8B71 /* ItaniumCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */; }; + BF9FEE061225E770003A8B71 /* MicrosoftCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */; }; + BF9FEE2C1225E7EA003A8B71 /* BackendUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */; }; + BF9FEE311225E86C003A8B71 /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */; }; + BF9FEE331225E898003A8B71 /* ItaniumCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */; }; + BF9FEE351225E8B1003A8B71 /* MicrosoftCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */; }; + BF9FEE381225E925003A8B71 /* BoostConAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE371225E925003A8B71 /* BoostConAction.cpp */; }; + BF9FEE521226FE9F003A8B71 /* ParseAST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */; }; + BF9FEEF2122D8068003A8B71 /* PreprocessingRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */; }; BFE2F6AB11DA955A0007EDC0 /* DeltaTree.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67D11DA95590007EDC0 /* DeltaTree.d */; }; BFE2F6AC11DA955A0007EDC0 /* DeltaTree.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */; }; BFE2F6AD11DA955A0007EDC0 /* FixItRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */; }; @@ -179,15 +191,8 @@ BFE2F6B311DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */; }; BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */; }; BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */; }; - BFE2F6B611DA955A0007EDC0 /* RewriteMacros.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */; }; BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */; }; - BFE2F6B811DA955A0007EDC0 /* RewriteObjC.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */; }; BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68B11DA955A0007EDC0 /* Rewriter.d */; }; - BFE2F6BA11DA955A0007EDC0 /* Rewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68C11DA955A0007EDC0 /* Rewriter.o */; }; - BFE2F6BB11DA955A0007EDC0 /* RewriteRope.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */; }; - BFE2F6BC11DA955A0007EDC0 /* RewriteRope.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */; }; - BFE2F6BD11DA955A0007EDC0 /* RewriteTest.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */; }; - BFE2F6BE11DA955A0007EDC0 /* RewriteTest.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69011DA955A0007EDC0 /* RewriteTest.o */; }; BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */; }; BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */; }; BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */; }; @@ -201,9 +206,6 @@ BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */; }; BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */; }; BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69F11DA955A0007EDC0 /* Rewriter.d */; }; - BFE2F6CC11DA955A0007EDC0 /* Rewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A011DA955A0007EDC0 /* Rewriter.o */; }; - BFE2F6CD11DA955A0007EDC0 /* RewriteRope.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */; }; - BFE2F6CE11DA955A0007EDC0 /* RewriteRope.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */; }; BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */; }; BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */; }; BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */; }; @@ -215,12 +217,8 @@ DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE01DA480B12ADA300AC22CE /* PPCallbacks.h */; }; DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */; }; DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06B73D0A8307640050E87E /* LangOptions.h */; }; - DE06BECB0A854E4B0050E87E /* Scope.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06BECA0A854E4B0050E87E /* Scope.h */; }; DE06D4310A8BB52D0050E87E /* Parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06D42F0A8BB52D0050E87E /* Parser.cpp */; }; - DE06E8140A8FF9330050E87E /* Action.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06E8130A8FF9330050E87E /* Action.h */; }; DE0FCA630A95859D00248FD5 /* Expr.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE0FCA620A95859D00248FD5 /* Expr.h */; }; - DE17336E0B068DC20080B521 /* DeclSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE17336D0B068DC20080B521 /* DeclSpec.cpp */; }; - DE1733700B068DC60080B521 /* DeclSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE17336F0B068DC60080B521 /* DeclSpec.h */; }; DE1F22030A7D852A00FBF588 /* Parser.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE1F22020A7D852A00FBF588 /* Parser.h */; }; DE224FF80C7AA98800D370A5 /* CGExprComplex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE224FF70C7AA98800D370A5 /* CGExprComplex.cpp */; }; DE2252700C7E82D000D370A5 /* CGExprScalar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE22526F0C7E82D000D370A5 /* CGExprScalar.cpp */; }; @@ -231,13 +229,11 @@ DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3450D60AEB543100DBC861 /* DirectoryLookup.h */; }; DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3452800AEF1B1800DBC861 /* Stmt.h */; }; DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345C190AFC658B00DBC861 /* StmtVisitor.h */; }; - DE345F220AFD347900DBC861 /* StmtNodes.def in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345F210AFD347900DBC861 /* StmtNodes.def */; }; DE3460000AFDCC1900DBC861 /* ParseObjc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE345FFF0AFDCC1900DBC861 /* ParseObjc.cpp */; }; DE3460050AFDCC6500DBC861 /* ParseInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460040AFDCC6500DBC861 /* ParseInit.cpp */; }; DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */; }; DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */; }; DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */; }; - DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */; }; DE3464220B03040900DBC861 /* Type.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3464210B03040900DBC861 /* Type.h */; }; DE37252E0FE481AD00CF2CC2 /* Builtins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE37252D0FE481AD00CF2CC2 /* Builtins.cpp */; }; DE38CD500D794D0100A273B6 /* CGObjCGNU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */; }; @@ -261,10 +257,7 @@ DE67E70F0C020ECF00F66BC5 /* SemaExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */; }; DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */; }; DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */; }; - DE67E7150C020EDF00F66BC5 /* Sema.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7140C020EDF00F66BC5 /* Sema.h */; }; DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7160C020EE400F66BC5 /* Sema.cpp */; }; - DE67E71A0C020F4F00F66BC5 /* ParseAST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */; }; - DE67E7280C02109800F66BC5 /* ParseAST.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7270C02109800F66BC5 /* ParseAST.h */; }; DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6951C60C4D1F5D00A5826B /* RecordLayout.h */; }; DE6954640C5121BD00A5826B /* Token.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6954630C5121BD00A5826B /* Token.h */; }; DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */; }; @@ -290,10 +283,6 @@ DECAB0D00DB3C84200E13CCB /* RewriteRope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */; }; DECB6D650F9AE26600F5FBC7 /* JumpDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */; }; DECB6F070F9D93A800F5FBC7 /* InitPreprocessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */; }; - DECB77130FA5752300F5FBC7 /* PCHReaderStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */; }; - DECB77790FA579B000F5FBC7 /* PCHReaderDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */; }; - DECB77F70FA5850200F5FBC7 /* PCHWriterDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */; }; - DECB78170FA5882F00F5FBC7 /* PCHWriterStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */; }; DED626C90AE0C065001E80A4 /* TargetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED626C80AE0C065001E80A4 /* TargetInfo.cpp */; }; DED7D7410A524295003AD0FB /* Diagnostic.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7310A524295003AD0FB /* Diagnostic.h */; }; DED7D7430A524295003AD0FB /* FileManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7330A524295003AD0FB /* FileManager.h */; }; @@ -336,9 +325,6 @@ DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBBD430C19C5D200A9FE82 /* TODO.txt */; }; DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */; }; DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */; }; - DEF165710F8FB34D0098507F /* PCHWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF165700F8FB34D0098507F /* PCHWriter.cpp */; }; - DEF165750F8FB3510098507F /* PCHReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF165740F8FB3510098507F /* PCHReader.cpp */; }; - DEF168400F9548DC0098507F /* FixItRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */; }; DEF2E95F0C5FBD74000C4259 /* InternalsManual.html in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */; }; DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2EFF20C6CDD74000C4259 /* CGExprAgg.cpp */; }; DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2F00F0C6CFED5000C4259 /* SemaChecking.cpp */; }; @@ -371,8 +357,6 @@ DEAEED4B0A5AF89A0045101B /* NOTES.txt in CopyFiles */, DE1F22030A7D852A00FBF588 /* Parser.h in CopyFiles */, DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */, - DE06BECB0A854E4B0050E87E /* Scope.h in CopyFiles */, - DE06E8140A8FF9330050E87E /* Action.h in CopyFiles */, DEC8D9910A9433CD00353FCA /* Decl.h in CopyFiles */, DEC8D9A40A94346E00353FCA /* AST.h in CopyFiles */, DE0FCA630A95859D00248FD5 /* Expr.h in CopyFiles */, @@ -381,20 +365,15 @@ DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */, DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */, DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */, - DE345F220AFD347900DBC861 /* StmtNodes.def in CopyFiles */, DE3464220B03040900DBC861 /* Type.h in CopyFiles */, DE75ED290B044DC90020CF81 /* ASTContext.h in CopyFiles */, - DE1733700B068DC60080B521 /* DeclSpec.h in CopyFiles */, DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */, 1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */, 1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */, - DE67E7150C020EDF00F66BC5 /* Sema.h in CopyFiles */, - DE67E7280C02109800F66BC5 /* ParseAST.h in CopyFiles */, DE928B200C0565B000231DA4 /* ModuleBuilder.h in CopyFiles */, DE928B7D0C0A615100231DA4 /* CodeGenModule.h in CopyFiles */, DE928B810C0A615B00231DA4 /* CodeGenFunction.h in CopyFiles */, DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */, - 84D9A88C0C1A581300AC7ABC /* AttributeList.h in CopyFiles */, DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */, DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */, DE6954640C5121BD00A5826B /* Token.h in CopyFiles */, @@ -422,15 +401,11 @@ 1A2193CB0F45EEB700C0713D /* ABIInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ABIInfo.h; path = lib/CodeGen/ABIInfo.h; sourceTree = ""; tabWidth = 2; }; 1A2193CC0F45EEB700C0713D /* Mangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Mangle.cpp; path = lib/CodeGen/Mangle.cpp; sourceTree = ""; tabWidth = 2; }; 1A2193CD0F45EEB700C0713D /* Mangle.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Mangle.h; path = lib/CodeGen/Mangle.h; sourceTree = ""; tabWidth = 2; }; - 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisConsumer.cpp; path = lib/Frontend/AnalysisConsumer.cpp; sourceTree = ""; }; 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumers.cpp; path = lib/Frontend/ASTConsumers.cpp; sourceTree = ""; tabWidth = 2; }; 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CacheTokens.cpp; path = lib/Frontend/CacheTokens.cpp; sourceTree = ""; }; 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DependencyFile.cpp; path = lib/Frontend/DependencyFile.cpp; sourceTree = ""; }; 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DiagChecker.cpp; path = lib/Frontend/DiagChecker.cpp; sourceTree = ""; }; 1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocumentXML.cpp; path = lib/Frontend/DocumentXML.cpp; sourceTree = ""; }; - 1A2A54AB0FD1DD1C00F4CE45 /* GeneratePCH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GeneratePCH.cpp; path = lib/Frontend/GeneratePCH.cpp; sourceTree = ""; }; - 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLPrint.cpp; path = lib/Frontend/HTMLPrint.cpp; sourceTree = ""; }; - 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintParserCallbacks.cpp; path = lib/Frontend/PrintParserCallbacks.cpp; sourceTree = ""; }; 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintPreprocessedOutput.cpp; path = lib/Frontend/PrintPreprocessedOutput.cpp; sourceTree = ""; }; 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StmtXML.cpp; path = lib/Frontend/StmtXML.cpp; sourceTree = ""; }; 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Warnings.cpp; path = lib/Frontend/Warnings.cpp; sourceTree = ""; }; @@ -455,7 +430,6 @@ 1A649E1E0F9599DA005B965E /* CGCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGCXX.h; path = lib/CodeGen/CGCXX.h; sourceTree = ""; tabWidth = 2; }; 1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CodeCompleteConsumer.cpp; path = lib/Sema/CodeCompleteConsumer.cpp; sourceTree = ""; tabWidth = 2; }; 1A6B6CD210693FC900BB4A8F /* SemaCodeComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCodeComplete.cpp; path = lib/Sema/SemaCodeComplete.cpp; sourceTree = ""; tabWidth = 2; }; - 1A6B6CD310693FC900BB4A8F /* SemaTemplate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = SemaTemplate.h; path = lib/Sema/SemaTemplate.h; sourceTree = ""; tabWidth = 2; }; 1A6B6E991069833600BB4A8F /* CGExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprCXX.cpp; path = lib/CodeGen/CGExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; 1A6C01F6108128710072DEE4 /* CGRTTI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRTTI.cpp; path = lib/CodeGen/CGRTTI.cpp; sourceTree = ""; tabWidth = 2; }; 1A6FE7080FD6F85800E00CA9 /* CGTemporaries.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGTemporaries.cpp; path = lib/CodeGen/CGTemporaries.cpp; sourceTree = ""; tabWidth = 2; }; @@ -532,15 +506,11 @@ 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = ""; tabWidth = 2; }; 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = ""; tabWidth = 2; }; 1AFDD8701161085D00AE030A /* ASTMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTMerge.cpp; path = lib/Frontend/ASTMerge.cpp; sourceTree = ""; }; - 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenAction.cpp; path = lib/Frontend/CodeGenAction.cpp; sourceTree = ""; }; 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRecordLayoutBuilder.cpp; path = lib/CodeGen/CGRecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCInstMethSignature.cpp; path = lib/Analysis/CheckObjCInstMethSignature.cpp; sourceTree = ""; }; - 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLDiagnostics.cpp; path = lib/Frontend/HTMLDiagnostics.cpp; sourceTree = ""; }; 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitHeaderSearch.cpp; path = lib/Frontend/InitHeaderSearch.cpp; sourceTree = ""; }; - 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlistDiagnostics.cpp; path = lib/Frontend/PlistDiagnostics.cpp; sourceTree = ""; }; 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticBuffer.cpp; path = lib/Frontend/TextDiagnosticBuffer.cpp; sourceTree = ""; }; 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticPrinter.cpp; path = lib/Frontend/TextDiagnosticPrinter.cpp; sourceTree = ""; }; - 3527124F0DAFE54700C76352 /* IdentifierResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = IdentifierResolver.h; path = lib/Sema/IdentifierResolver.h; sourceTree = ""; tabWidth = 2; }; 352712500DAFE54700C76352 /* IdentifierResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = IdentifierResolver.cpp; path = lib/Sema/IdentifierResolver.cpp; sourceTree = ""; tabWidth = 2; }; 352C19DC0CA321C80045DB98 /* CFGRecStmtDeclVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGRecStmtDeclVisitor.h; path = clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h; sourceTree = ""; }; 352C19DD0CA321C80045DB98 /* CFGRecStmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGRecStmtVisitor.h; path = clang/Analysis/Visitors/CFGRecStmtVisitor.h; sourceTree = ""; }; @@ -561,7 +531,6 @@ 355106880E9A851B006A4E44 /* MemRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemRegion.h; path = clang/Analysis/PathSensitive/MemRegion.h; sourceTree = ""; }; 3551068A0E9A8546006A4E44 /* ParsePragma.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParsePragma.cpp; path = lib/Parse/ParsePragma.cpp; sourceTree = ""; tabWidth = 2; }; 3551068B0E9A8546006A4E44 /* ParseTentative.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseTentative.cpp; path = lib/Parse/ParseTentative.cpp; sourceTree = ""; tabWidth = 2; }; - 3551068E0E9A855F006A4E44 /* AccessSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AccessSpecifier.h; path = clang/Parse/AccessSpecifier.h; sourceTree = ""; tabWidth = 2; }; 3551068F0E9A857C006A4E44 /* ParsePragma.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ParsePragma.h; path = lib/Parse/ParsePragma.h; sourceTree = ""; tabWidth = 2; }; 3552E7540E520D80003A8CA5 /* PPCaching.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCaching.cpp; sourceTree = ""; }; 3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjCMac.cpp; path = lib/CodeGen/CGObjCMac.cpp; sourceTree = ""; tabWidth = 2; }; @@ -570,9 +539,7 @@ 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SimpleConstraintManager.cpp; path = lib/Analysis/SimpleConstraintManager.cpp; sourceTree = ""; }; 35544B870F5C7FD700D92AA9 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SimpleConstraintManager.h; path = lib/Analysis/SimpleConstraintManager.h; sourceTree = ""; }; 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiate.cpp; path = lib/Sema/SemaTemplateInstantiate.cpp; sourceTree = ""; tabWidth = 2; }; - 35585DBD0EAFBC4500D0A97A /* CXXFieldCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CXXFieldCollector.h; path = lib/Sema/CXXFieldCollector.h; sourceTree = ""; tabWidth = 2; }; 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaOverload.cpp; path = lib/Sema/SemaOverload.cpp; sourceTree = ""; tabWidth = 2; }; - 35585DBF0EAFBC4500D0A97A /* SemaOverload.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = SemaOverload.h; path = lib/Sema/SemaOverload.h; sourceTree = ""; tabWidth = 2; }; 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicStore.cpp; path = lib/Analysis/BasicStore.cpp; sourceTree = ""; }; 3558F76F0E267C9A00A5B0DF /* Store.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Store.h; path = clang/Analysis/PathSensitive/Store.h; sourceTree = ""; }; 355CF6820C90A8B600A08AA3 /* LocalCheckers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocalCheckers.h; path = clang/Analysis/LocalCheckers.h; sourceTree = ""; }; @@ -626,11 +593,20 @@ 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicObjCFoundationChecks.cpp; path = lib/Analysis/BasicObjCFoundationChecks.cpp; sourceTree = ""; }; 35F9B1550D1C6B2E00DDFDAE /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LiveVariables.h; path = clang/Analysis/Analyses/LiveVariables.h; sourceTree = ""; }; 35F9B1560D1C6B2E00DDFDAE /* UninitializedValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UninitializedValues.h; path = clang/Analysis/Analyses/UninitializedValues.h; sourceTree = ""; }; + 574F4C25121B4EF000AEAC20 /* ASTWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTWriter.h; path = clang/Serialization/ASTWriter.h; sourceTree = ""; }; + 57AA924D121C8B9400B4AA6C /* ASTReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReader.cpp; sourceTree = ""; }; + 57AA924E121C8B9400B4AA6C /* ASTReaderDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReaderDecl.cpp; sourceTree = ""; }; + 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReaderStmt.cpp; sourceTree = ""; }; + 57E15B21121C8D2B0051C2CC /* ASTDeserializationListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTDeserializationListener.h; path = clang/Serialization/ASTDeserializationListener.h; sourceTree = ""; }; + 57E15B22121C8D2B0051C2CC /* ASTReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTReader.h; path = clang/Serialization/ASTReader.h; sourceTree = ""; }; + 57EB5661121B034300ECA335 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; + 57EB5662121B034300ECA335 /* GeneratePCH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratePCH.cpp; sourceTree = ""; }; + 57EB5663121B034300ECA335 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriter.cpp; sourceTree = ""; }; + 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterDecl.cpp; sourceTree = ""; }; + 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterStmt.cpp; sourceTree = ""; }; 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLRewrite.cpp; path = lib/Rewrite/HTMLRewrite.cpp; sourceTree = ""; }; - 7F270AFE107A90010031B377 /* CodeCompleteConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeCompleteConsumer.h; path = clang/Sema/CodeCompleteConsumer.h; sourceTree = ""; }; 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclObjC.h; path = clang/AST/DeclObjC.h; sourceTree = ""; tabWidth = 2; }; - 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = lib/Parse/AttributeList.cpp; sourceTree = ""; tabWidth = 2; }; - 84D9A88B0C1A581300AC7ABC /* AttributeList.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AttributeList.h; path = clang/Parse/AttributeList.h; sourceTree = ""; tabWidth = 2; }; 8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = clang; sourceTree = BUILT_PRODUCTS_DIR; }; 9012911510470FCE0083456D /* Index.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Index.h; path = "clang-c/Index.h"; sourceTree = ""; }; 9012911C1048068D0083456D /* ASTUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTUnit.cpp; path = lib/Frontend/ASTUnit.cpp; sourceTree = ""; }; @@ -642,8 +618,6 @@ 9047537D1096376F00CBDDDD /* TypeLocNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeLocNodes.def; path = clang/AST/TypeLocNodes.def; sourceTree = ""; tabWidth = 2; }; 9047537E1096376F00CBDDDD /* TypeLocVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeLocVisitor.h; path = clang/AST/TypeLocVisitor.h; sourceTree = ""; tabWidth = 2; }; 9047537F1096376F00CBDDDD /* TypeVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeVisitor.h; path = clang/AST/TypeVisitor.h; sourceTree = ""; tabWidth = 2; }; - 9063F2210F9E8BDF002F7251 /* ExternalSemaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalSemaSource.h; path = clang/Sema/ExternalSemaSource.h; sourceTree = ""; }; - 9063F2220F9E8BDF002F7251 /* SemaConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaConsumer.h; path = clang/Sema/SemaConsumer.h; sourceTree = ""; }; 9063F2280F9E911F002F7251 /* OnDiskHashTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnDiskHashTable.h; sourceTree = ""; }; 9063F2290F9E911F002F7251 /* SourceManagerInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceManagerInternals.h; sourceTree = ""; }; 9063F22A0F9E911F002F7251 /* TemplateKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemplateKinds.h; sourceTree = ""; }; @@ -678,10 +652,8 @@ 90FD6D76103C3D49005F5B73 /* IndexProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IndexProvider.cpp; path = lib/Index/IndexProvider.cpp; sourceTree = ""; }; 90FD6D77103C3D49005F5B73 /* Program.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Program.cpp; path = lib/Index/Program.cpp; sourceTree = ""; }; 90FD6D78103C3D49005F5B73 /* ProgramImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProgramImpl.h; path = lib/Index/ProgramImpl.h; sourceTree = ""; }; - 90FD6D79103C3D49005F5B73 /* ResolveLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ResolveLocation.cpp; path = lib/Index/ResolveLocation.cpp; sourceTree = ""; }; 90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelectorMap.cpp; path = lib/Index/SelectorMap.cpp; sourceTree = ""; }; 90FD6D86103C3D80005F5B73 /* Analyses.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Analyses.def; path = clang/Frontend/Analyses.def; sourceTree = ""; }; - 90FD6D87103C3D80005F5B73 /* AnalysisConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisConsumer.h; path = clang/Frontend/AnalysisConsumer.h; sourceTree = ""; }; 90FD6D88103C3D80005F5B73 /* ASTConsumers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTConsumers.h; path = clang/Frontend/ASTConsumers.h; sourceTree = ""; }; 90FD6D89103C3D80005F5B73 /* ASTUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTUnit.h; path = clang/Frontend/ASTUnit.h; sourceTree = ""; }; 90FD6D8A103C3D80005F5B73 /* CommandLineSourceLoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandLineSourceLoc.h; path = clang/Frontend/CommandLineSourceLoc.h; sourceTree = ""; }; @@ -693,16 +665,104 @@ 90FD6D90103C3D80005F5B73 /* TypeXML.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TypeXML.def; path = clang/Frontend/TypeXML.def; sourceTree = ""; }; 90FD6D91103C3D80005F5B73 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = clang/Frontend/Utils.h; sourceTree = ""; }; 90FD6DB5103D977E005F5B73 /* index-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "index-test.cpp"; path = "tools/index-test/index-test.cpp"; sourceTree = ""; }; + BD59A948121496B9003A5A02 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = clang/Sema/AnalysisBasedWarnings.h; sourceTree = ""; }; + BD59A949121496B9003A5A02 /* CodeCompleteConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeCompleteConsumer.h; path = clang/Sema/CodeCompleteConsumer.h; sourceTree = ""; }; + BD59A94A121496B9003A5A02 /* CXXFieldCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CXXFieldCollector.h; path = clang/Sema/CXXFieldCollector.h; sourceTree = ""; }; + BD59A94B121496B9003A5A02 /* ExternalSemaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalSemaSource.h; path = clang/Sema/ExternalSemaSource.h; sourceTree = ""; }; + BD59A94C121496B9003A5A02 /* IdentifierResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IdentifierResolver.h; path = clang/Sema/IdentifierResolver.h; sourceTree = ""; }; + BD59A94D121496B9003A5A02 /* Initialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Initialization.h; path = clang/Sema/Initialization.h; sourceTree = ""; }; + BD59A94E121496B9003A5A02 /* Lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lookup.h; path = clang/Sema/Lookup.h; sourceTree = ""; }; + BD59A94F121496B9003A5A02 /* Overload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Overload.h; path = clang/Sema/Overload.h; sourceTree = ""; }; + BD59A951121496B9003A5A02 /* Sema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sema.h; path = clang/Sema/Sema.h; sourceTree = ""; }; + BD59A952121496B9003A5A02 /* SemaConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaConsumer.h; path = clang/Sema/SemaConsumer.h; sourceTree = ""; }; + BD59A953121496B9003A5A02 /* SemaDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaDiagnostic.h; path = clang/Sema/SemaDiagnostic.h; sourceTree = ""; }; + BD59A954121496B9003A5A02 /* Template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Template.h; path = clang/Sema/Template.h; sourceTree = ""; }; BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateDeduction.cpp; path = lib/Sema/SemaTemplateDeduction.cpp; sourceTree = ""; tabWidth = 2; }; - BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = lib/Sema/AnalysisBasedWarnings.h; sourceTree = ""; }; BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisBasedWarnings.cpp; path = lib/Sema/AnalysisBasedWarnings.cpp; sourceTree = ""; }; - BF89C3E311595835001C2D68 /* Lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lookup.h; path = lib/Sema/Lookup.h; sourceTree = ""; }; - BF89C3E411595855001C2D68 /* SemaInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaInit.h; path = lib/Sema/SemaInit.h; sourceTree = ""; }; BF89C3E5115958A1001C2D68 /* TargetAttributesSema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetAttributesSema.h; path = lib/Sema/TargetAttributesSema.h; sourceTree = ""; }; BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaObjCProperty.cpp; path = lib/Sema/SemaObjCProperty.cpp; sourceTree = ""; }; BF89C3F811595A01001C2D68 /* SemaType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaType.cpp; path = lib/Sema/SemaType.cpp; sourceTree = ""; }; BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCodeComplete.cpp; path = lib/Sema/SemaCodeComplete.cpp; sourceTree = ""; }; BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExceptionSpec.cpp; path = lib/Sema/SemaExceptionSpec.cpp; sourceTree = ""; }; + BF9FED6E1225DF55003A8B71 /* TemplateDeduction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemplateDeduction.h; path = clang/Sema/TemplateDeduction.h; sourceTree = ""; }; + BF9FED6F1225DF7F003A8B71 /* Action.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Action.h; path = clang/Sema/Action.h; sourceTree = ""; }; + BF9FED701225DFA1003A8B71 /* AttributeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttributeList.h; path = clang/Sema/AttributeList.h; sourceTree = ""; }; + BF9FED711225DFD9003A8B71 /* DeclSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeclSpec.h; path = clang/Sema/DeclSpec.h; sourceTree = ""; }; + BF9FED721225DFD9003A8B71 /* Designator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Designator.h; path = clang/Sema/Designator.h; sourceTree = ""; }; + BF9FED731225E005003A8B71 /* Ownership.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ownership.h; path = clang/Sema/Ownership.h; sourceTree = ""; }; + BF9FED741225E005003A8B71 /* ParsedTemplate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParsedTemplate.h; path = clang/Sema/ParsedTemplate.h; sourceTree = ""; }; + BF9FED751225E005003A8B71 /* Scope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scope.h; path = clang/Sema/Scope.h; sourceTree = ""; }; + BF9FED761225E005003A8B71 /* ScopeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScopeInfo.h; path = clang/Sema/ScopeInfo.h; sourceTree = ""; }; + BF9FED771225E032003A8B71 /* ObjCMethodList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjCMethodList.h; path = clang/Sema/ObjCMethodList.h; sourceTree = ""; }; + BF9FED781225E041003A8B71 /* SemaInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaInternal.h; path = clang/Sema/SemaInternal.h; sourceTree = ""; }; + BF9FEDB21225E1D2003A8B71 /* CodeCompletionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeCompletionHandler.h; sourceTree = ""; }; + BF9FEDB31225E1E1003A8B71 /* ExternalPreprocessorSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExternalPreprocessorSource.h; sourceTree = ""; }; + BF9FEDB41225E1F3003A8B71 /* PreprocessingRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreprocessingRecord.h; sourceTree = ""; }; + BF9FEDB51225E213003A8B71 /* ParseAST.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParseAST.h; path = clang/Parse/ParseAST.h; sourceTree = ""; }; + BF9FEDB61225E252003A8B71 /* OperationKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OperationKinds.h; path = clang/AST/OperationKinds.h; sourceTree = ""; }; + BF9FEDB71225E26A003A8B71 /* RecursiveASTVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecursiveASTVisitor.h; path = clang/AST/RecursiveASTVisitor.h; sourceTree = ""; }; + BF9FEDB81225E2DE003A8B71 /* BackendUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BackendUtil.h; path = clang/CodeGen/BackendUtil.h; sourceTree = ""; }; + BF9FEDB91225E2DE003A8B71 /* CodeGenAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeGenAction.h; path = clang/CodeGen/CodeGenAction.h; sourceTree = ""; }; + BF9FEDBA1225E30E003A8B71 /* ASTBitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTBitCodes.h; path = clang/Serialization/ASTBitCodes.h; sourceTree = ""; }; + BF9FEDBB1225E34B003A8B71 /* FixItRewriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FixItRewriter.h; path = clang/Rewrite/FixItRewriter.h; sourceTree = ""; }; + BF9FEDBC1225E34B003A8B71 /* FrontendActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendActions.h; path = clang/Rewrite/FrontendActions.h; sourceTree = ""; }; + BF9FEDBD1225E35F003A8B71 /* Rewriters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rewriters.h; path = clang/Rewrite/Rewriters.h; sourceTree = ""; }; + BF9FEDBE1225E373003A8B71 /* ASTConsumers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTConsumers.h; path = clang/Rewrite/ASTConsumers.h; sourceTree = ""; }; + BF9FEDBF1225E392003A8B71 /* AnalyzerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalyzerOptions.h; path = clang/Frontend/AnalyzerOptions.h; sourceTree = ""; }; + BF9FEDC01225E3AB003A8B71 /* ChainedDiagnosticClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChainedDiagnosticClient.h; path = clang/Frontend/ChainedDiagnosticClient.h; sourceTree = ""; }; + BF9FEDC11225E3AB003A8B71 /* CodeGenOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeGenOptions.h; path = clang/Frontend/CodeGenOptions.h; sourceTree = ""; }; + BF9FEDC21225E3C2003A8B71 /* CompilerInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompilerInstance.h; path = clang/Frontend/CompilerInstance.h; sourceTree = ""; }; + BF9FEDC31225E3C2003A8B71 /* CompilerInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompilerInvocation.h; path = clang/Frontend/CompilerInvocation.h; sourceTree = ""; }; + BF9FEDC41225E3DA003A8B71 /* DependencyOutputOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DependencyOutputOptions.h; path = clang/Frontend/DependencyOutputOptions.h; sourceTree = ""; }; + BF9FEDC51225E3DA003A8B71 /* DiagnosticOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DiagnosticOptions.h; path = clang/Frontend/DiagnosticOptions.h; sourceTree = ""; }; + BF9FEDC61225E3F6003A8B71 /* FrontendAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendAction.h; path = clang/Frontend/FrontendAction.h; sourceTree = ""; }; + BF9FEDC71225E3F6003A8B71 /* FrontendActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendActions.h; path = clang/Frontend/FrontendActions.h; sourceTree = ""; }; + BF9FEDC81225E40A003A8B71 /* FrontendOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendOptions.h; path = clang/Frontend/FrontendOptions.h; sourceTree = ""; }; + BF9FEDC91225E40A003A8B71 /* FrontendPluginRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendPluginRegistry.h; path = clang/Frontend/FrontendPluginRegistry.h; sourceTree = ""; }; + BF9FEDCA1225E40A003A8B71 /* HeaderSearchOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HeaderSearchOptions.h; path = clang/Frontend/HeaderSearchOptions.h; sourceTree = ""; }; + BF9FEDCB1225E40A003A8B71 /* LangStandard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LangStandard.h; path = clang/Frontend/LangStandard.h; sourceTree = ""; }; + BF9FEDCC1225E41D003A8B71 /* PreprocessorOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreprocessorOptions.h; path = clang/Frontend/PreprocessorOptions.h; sourceTree = ""; }; + BF9FEDCD1225E41D003A8B71 /* PreprocessorOutputOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreprocessorOutputOptions.h; path = clang/Frontend/PreprocessorOutputOptions.h; sourceTree = ""; }; + BF9FEDCE1225E42C003A8B71 /* VerifyDiagnosticsClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VerifyDiagnosticsClient.h; path = clang/Frontend/VerifyDiagnosticsClient.h; sourceTree = ""; }; + BF9FEDCF1225E443003A8B71 /* LangStandards.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LangStandards.def; path = clang/Frontend/LangStandards.def; sourceTree = ""; }; + BF9FEDE71225E488003A8B71 /* CC1AsOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CC1AsOptions.h; path = clang/Driver/CC1AsOptions.h; sourceTree = ""; }; + BF9FEDE81225E49D003A8B71 /* CC1Options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CC1Options.h; path = clang/Driver/CC1Options.h; sourceTree = ""; }; + BF9FEDE91225E4BD003A8B71 /* OptSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptSpecifier.h; path = clang/Driver/OptSpecifier.h; sourceTree = ""; }; + BF9FEDEA1225E4BD003A8B71 /* OptTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptTable.h; path = clang/Driver/OptTable.h; sourceTree = ""; }; + BF9FEDEB1225E4F2003A8B71 /* AttrKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttrKinds.h; sourceTree = ""; }; + BF9FEDEC1225E514003A8B71 /* Version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Version.h; sourceTree = ""; }; + BF9FEDED1225E52F003A8B71 /* arm_neon.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = arm_neon.td; sourceTree = ""; }; + BF9FEDEE1225E52F003A8B71 /* Attr.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Attr.td; sourceTree = ""; }; + BF9FEDEF1225E55C003A8B71 /* BuiltinsARM.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BuiltinsARM.def; sourceTree = ""; }; + BF9FEDF01225E574003A8B71 /* Specifiers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Specifiers.h; sourceTree = ""; }; + BF9FEDF11225E574003A8B71 /* StmtNodes.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = StmtNodes.td; sourceTree = ""; }; + BF9FEDF21225E58B003A8B71 /* TargetOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetOptions.h; sourceTree = ""; }; + BF9FEDF31225E5B6003A8B71 /* DeclNodes.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DeclNodes.td; sourceTree = ""; }; + BF9FEDF41225E5D5003A8B71 /* Linkage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Linkage.h; sourceTree = ""; }; + BF9FEDF51225E5D5003A8B71 /* MacroBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroBuilder.h; sourceTree = ""; }; + BF9FEDF61225E5FB003A8B71 /* Version.inc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Version.inc.in; sourceTree = ""; }; + BF9FEDF71225E613003A8B71 /* DiagnosticCategories.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticCategories.td; sourceTree = ""; }; + BF9FEDF81225E67B003A8B71 /* Action.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Action.cpp; path = lib/Sema/Action.cpp; sourceTree = ""; }; + BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = lib/Sema/AttributeList.cpp; sourceTree = ""; }; + BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclSpec.cpp; path = lib/Sema/DeclSpec.cpp; sourceTree = ""; }; + BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetAttributesSema.cpp; path = lib/Sema/TargetAttributesSema.cpp; sourceTree = ""; }; + BF9FEE001225E718003A8B71 /* CXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXXABI.h; sourceTree = ""; }; + BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprClassification.cpp; sourceTree = ""; }; + BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumCXXABI.cpp; sourceTree = ""; }; + BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MicrosoftCXXABI.cpp; sourceTree = ""; }; + BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BackendUtil.cpp; path = lib/CodeGen/BackendUtil.cpp; sourceTree = ""; }; + BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGCXXABI.h; path = lib/CodeGen/CGCXXABI.h; sourceTree = ""; }; + BF9FEE2E1225E82D003A8B71 /* CGException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGException.h; path = lib/CodeGen/CGException.h; sourceTree = ""; }; + BF9FEE2F1225E854003A8B71 /* CGRecordLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGRecordLayout.h; path = lib/CodeGen/CGRecordLayout.h; sourceTree = ""; }; + BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenAction.cpp; path = lib/CodeGen/CodeGenAction.cpp; sourceTree = ""; }; + BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ItaniumCXXABI.cpp; path = lib/CodeGen/ItaniumCXXABI.cpp; sourceTree = ""; }; + BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MicrosoftCXXABI.cpp; path = lib/CodeGen/MicrosoftCXXABI.cpp; sourceTree = ""; }; + BF9FEE361225E8CF003A8B71 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = lib/CodeGen/README.txt; sourceTree = ""; }; + BF9FEE371225E925003A8B71 /* BoostConAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BoostConAction.cpp; path = lib/Frontend/BoostConAction.cpp; sourceTree = ""; }; + BF9FEE451225EA24003A8B71 /* DelayedDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DelayedDiagnostic.h; path = clang/Sema/DelayedDiagnostic.h; sourceTree = ""; }; + BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Parse/ParseAST.cpp; sourceTree = ""; }; + BF9FEE531226FEC1003A8B71 /* RAIIObjectsForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAIIObjectsForParser.h; path = lib/Parse/RAIIObjectsForParser.h; sourceTree = ""; }; + BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreprocessingRecord.cpp; sourceTree = ""; }; BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; BFE2F67C11DA95590007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = ""; }; BFE2F67D11DA95590007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = ""; }; @@ -716,15 +776,8 @@ BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteMacros.d; sourceTree = ""; }; - BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteMacros.o; sourceTree = ""; }; BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteObjC.d; sourceTree = ""; }; - BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteObjC.o; sourceTree = ""; }; BFE2F68B11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; - BFE2F68C11DA955A0007EDC0 /* Rewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rewriter.o; sourceTree = ""; }; - BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteRope.d; sourceTree = ""; }; - BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteRope.o; sourceTree = ""; }; - BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteTest.d; sourceTree = ""; }; - BFE2F69011DA955A0007EDC0 /* RewriteTest.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteTest.o; sourceTree = ""; }; BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeltaTree.cpp; sourceTree = ""; }; @@ -739,9 +792,6 @@ BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; BFE2F69F11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; - BFE2F6A011DA955A0007EDC0 /* Rewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rewriter.o; sourceTree = ""; }; - BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteRope.d; sourceTree = ""; }; - BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteRope.o; sourceTree = ""; }; BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteMacros.cpp; sourceTree = ""; }; @@ -753,13 +803,8 @@ DE01DA480B12ADA300AC22CE /* PPCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCallbacks.h; sourceTree = ""; }; DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExprCXX.cpp; path = lib/Parse/ParseExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = ""; tabWidth = 2; }; - DE06BECA0A854E4B0050E87E /* Scope.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Scope.h; path = clang/Parse/Scope.h; sourceTree = ""; tabWidth = 2; }; DE06D42F0A8BB52D0050E87E /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = lib/Parse/Parser.cpp; sourceTree = ""; tabWidth = 2; }; - DE06E8130A8FF9330050E87E /* Action.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Action.h; path = clang/Parse/Action.h; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; DE0FCA620A95859D00248FD5 /* Expr.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Expr.h; path = clang/AST/Expr.h; sourceTree = ""; tabWidth = 2; }; - DE1263C20EF2341900F56D2B /* Ownership.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Ownership.h; path = clang/Parse/Ownership.h; sourceTree = ""; tabWidth = 2; }; - DE17336D0B068DC20080B521 /* DeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclSpec.cpp; path = lib/Parse/DeclSpec.cpp; sourceTree = ""; tabWidth = 2; }; - DE17336F0B068DC60080B521 /* DeclSpec.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclSpec.h; path = clang/Parse/DeclSpec.h; sourceTree = ""; tabWidth = 2; }; DE1F22020A7D852A00FBF588 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Parser.h; path = clang/Parse/Parser.h; sourceTree = ""; tabWidth = 2; }; DE224FF70C7AA98800D370A5 /* CGExprComplex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprComplex.cpp; path = lib/CodeGen/CGExprComplex.cpp; sourceTree = ""; tabWidth = 2; }; DE22526F0C7E82D000D370A5 /* CGExprScalar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprScalar.cpp; path = lib/CodeGen/CGExprScalar.cpp; sourceTree = ""; tabWidth = 2; }; @@ -770,13 +815,11 @@ DE3450D60AEB543100DBC861 /* DirectoryLookup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DirectoryLookup.h; sourceTree = ""; }; DE3452800AEF1B1800DBC861 /* Stmt.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Stmt.h; path = clang/AST/Stmt.h; sourceTree = ""; tabWidth = 2; }; DE345C190AFC658B00DBC861 /* StmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtVisitor.h; path = clang/AST/StmtVisitor.h; sourceTree = ""; tabWidth = 2; }; - DE345F210AFD347900DBC861 /* StmtNodes.def */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = text; name = StmtNodes.def; path = clang/AST/StmtNodes.def; sourceTree = ""; tabWidth = 2; }; DE345FFF0AFDCC1900DBC861 /* ParseObjc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseObjc.cpp; path = lib/Parse/ParseObjc.cpp; sourceTree = ""; tabWidth = 2; }; DE3460040AFDCC6500DBC861 /* ParseInit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseInit.cpp; path = lib/Parse/ParseInit.cpp; sourceTree = ""; tabWidth = 2; }; DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseStmt.cpp; path = lib/Parse/ParseStmt.cpp; sourceTree = ""; tabWidth = 2; }; DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseDecl.cpp; path = lib/Parse/ParseDecl.cpp; sourceTree = ""; tabWidth = 2; }; DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExpr.cpp; path = lib/Parse/ParseExpr.cpp; sourceTree = ""; tabWidth = 2; }; - DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = MinimalAction.cpp; path = lib/Parse/MinimalAction.cpp; sourceTree = ""; tabWidth = 2; }; DE3464210B03040900DBC861 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Type.h; path = clang/AST/Type.h; sourceTree = ""; tabWidth = 2; }; DE37251C0FE4818000CF2CC2 /* Builtins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Builtins.h; sourceTree = ""; }; DE37252A0FE4818F00CF2CC2 /* Builtins.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Builtins.def; sourceTree = ""; }; @@ -788,8 +831,6 @@ DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjCGNU.cpp; path = lib/CodeGen/CGObjCGNU.cpp; sourceTree = ""; tabWidth = 2; }; DE3986EF0CB8D4B300223765 /* IdentifierTable.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = IdentifierTable.h; sourceTree = ""; tabWidth = 2; }; DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = IdentifierTable.cpp; sourceTree = ""; tabWidth = 2; }; - DE3B90DE0EAC5EF200D01046 /* ExtensionRAIIObject.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExtensionRAIIObject.h; path = lib/Parse/ExtensionRAIIObject.h; sourceTree = ""; tabWidth = 2; }; - DE3B92230EB5152000D01046 /* Designator.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Designator.h; path = clang/Parse/Designator.h; sourceTree = ""; tabWidth = 2; }; DE41211D0D7F1BBE0080F80A /* GRWorkList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRWorkList.h; path = clang/Analysis/PathSensitive/GRWorkList.h; sourceTree = ""; }; DE41211E0D7F1BBE0080F80A /* SymbolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolManager.h; path = clang/Analysis/PathSensitive/SymbolManager.h; sourceTree = ""; }; DE41211F0D7F1BBE0080F80A /* GRBlockCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRBlockCounter.h; path = clang/Analysis/PathSensitive/GRBlockCounter.h; sourceTree = ""; }; @@ -819,10 +860,7 @@ DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExprCXX.cpp; path = lib/Sema/SemaExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExpr.cpp; path = lib/Sema/SemaExpr.cpp; sourceTree = ""; tabWidth = 2; }; DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDecl.cpp; path = lib/Sema/SemaDecl.cpp; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - DE67E7140C020EDF00F66BC5 /* Sema.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Sema.h; path = lib/Sema/Sema.h; sourceTree = ""; tabWidth = 2; }; DE67E7160C020EE400F66BC5 /* Sema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Sema.cpp; path = lib/Sema/Sema.cpp; sourceTree = ""; tabWidth = 2; }; - DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Sema/ParseAST.cpp; sourceTree = ""; tabWidth = 2; }; - DE67E7270C02109800F66BC5 /* ParseAST.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ParseAST.h; path = clang/Sema/ParseAST.h; sourceTree = ""; }; DE6951C60C4D1F5D00A5826B /* RecordLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = RecordLayout.h; path = clang/AST/RecordLayout.h; sourceTree = ""; tabWidth = 2; }; DE6954630C5121BD00A5826B /* Token.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Token.h; sourceTree = ""; }; DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclObjC.cpp; path = lib/Sema/SemaDeclObjC.cpp; sourceTree = ""; tabWidth = 2; }; @@ -849,7 +887,6 @@ DEA09A6E0F31756F000C2258 /* ASTDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTDiagnostic.h; path = clang/AST/ASTDiagnostic.h; sourceTree = ""; tabWidth = 2; }; DEA09A830F3175BF000C2258 /* LexDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LexDiagnostic.h; sourceTree = ""; }; DEA09A860F3175CA000C2258 /* ParseDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ParseDiagnostic.h; path = clang/Parse/ParseDiagnostic.h; sourceTree = ""; tabWidth = 2; }; - DEA09A890F3175D9000C2258 /* SemaDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaDiagnostic.h; path = clang/Sema/SemaDiagnostic.h; sourceTree = ""; }; DEAABDF70F5F477C0098928A /* PrettyStackTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrettyStackTrace.h; sourceTree = ""; }; DEAEE98A0A5A2B970045101B /* MultipleIncludeOpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MultipleIncludeOpt.h; sourceTree = ""; }; DEAEED4A0A5AF89A0045101B /* NOTES.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NOTES.txt; sourceTree = ""; }; @@ -862,14 +899,9 @@ DEC8D9A30A94346E00353FCA /* AST.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AST.h; path = clang/AST/AST.h; sourceTree = ""; tabWidth = 2; }; DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteRope.cpp; path = lib/Rewrite/RewriteRope.cpp; sourceTree = ""; }; DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = JumpDiagnostics.cpp; path = lib/Sema/JumpDiagnostics.cpp; sourceTree = ""; tabWidth = 2; }; - DECB6F030F9D939A00F5FBC7 /* InitPreprocessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitPreprocessor.h; path = clang/Frontend/InitPreprocessor.h; sourceTree = ""; }; DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitPreprocessor.cpp; path = lib/Frontend/InitPreprocessor.cpp; sourceTree = ""; }; DECB734E0FA3ED8400F5FBC7 /* StmtObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtObjC.h; path = clang/AST/StmtObjC.h; sourceTree = ""; tabWidth = 2; }; DECB73550FA3EE5A00F5FBC7 /* StmtCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtCXX.h; path = clang/AST/StmtCXX.h; sourceTree = ""; tabWidth = 2; }; - DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReaderStmt.cpp; path = lib/Frontend/PCHReaderStmt.cpp; sourceTree = ""; tabWidth = 2; }; - DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReaderDecl.cpp; path = lib/Frontend/PCHReaderDecl.cpp; sourceTree = ""; }; - DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriterDecl.cpp; path = lib/Frontend/PCHWriterDecl.cpp; sourceTree = ""; }; - DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriterStmt.cpp; path = lib/Frontend/PCHWriterStmt.cpp; sourceTree = ""; }; DED626C80AE0C065001E80A4 /* TargetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = TargetInfo.cpp; sourceTree = ""; tabWidth = 2; }; DED7D7310A524295003AD0FB /* Diagnostic.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = Diagnostic.h; sourceTree = ""; tabWidth = 2; }; DED7D7330A524295003AD0FB /* FileManager.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = FileManager.h; sourceTree = ""; tabWidth = 2; }; @@ -893,7 +925,6 @@ DED7D7D70A524302003AD0FB /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; DED7D9170A52518C003AD0FB /* ScratchBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScratchBuffer.h; sourceTree = ""; }; DED7D9E40A5257F6003AD0FB /* ScratchBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScratchBuffer.cpp; sourceTree = ""; }; - DEDFE5270F63A9230035BD10 /* DeclNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = DeclNodes.def; path = clang/AST/DeclNodes.def; sourceTree = ""; tabWidth = 2; }; DEDFE5CB0F7206CC0035BD10 /* NestedNameSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = NestedNameSpecifier.h; path = clang/AST/NestedNameSpecifier.h; sourceTree = ""; tabWidth = 2; }; DEDFE6450F7B3B4E0035BD10 /* driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = driver.cpp; path = tools/driver/driver.cpp; sourceTree = ""; }; DEDFE6480F7B3B830035BD10 /* Types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Types.cpp; path = lib/Driver/Types.cpp; sourceTree = ""; tabWidth = 2; }; @@ -920,11 +951,7 @@ DEEBBD430C19C5D200A9FE82 /* TODO.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TODO.txt; sourceTree = ""; }; DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CodeGenTypes.h; path = lib/CodeGen/CodeGenTypes.h; sourceTree = ""; tabWidth = 2; }; DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenTypes.cpp; path = lib/CodeGen/CodeGenTypes.cpp; sourceTree = ""; tabWidth = 2; }; - DEF1615E0F65C81C0098507F /* InitHeaderSearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitHeaderSearch.h; path = clang/Frontend/InitHeaderSearch.h; sourceTree = ""; }; - DEF1615F0F65C81C0098507F /* ManagerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ManagerRegistry.h; path = clang/Frontend/ManagerRegistry.h; sourceTree = ""; }; DEF161600F65C81C0098507F /* TextDiagnosticBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextDiagnosticBuffer.h; path = clang/Frontend/TextDiagnosticBuffer.h; sourceTree = ""; }; - DEF161610F65C81C0098507F /* PathDiagnosticClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PathDiagnosticClients.h; path = clang/Frontend/PathDiagnosticClients.h; sourceTree = ""; }; - DEF161620F65C81C0098507F /* CompileOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompileOptions.h; path = clang/Frontend/CompileOptions.h; sourceTree = ""; }; DEF161630F65C81C0098507F /* TextDiagnosticPrinter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextDiagnosticPrinter.h; path = clang/Frontend/TextDiagnosticPrinter.h; sourceTree = ""; }; DEF165140F8D46980098507F /* Tool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tool.h; path = clang/Driver/Tool.h; sourceTree = ""; }; DEF165150F8D46980098507F /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Types.h; path = clang/Driver/Types.h; sourceTree = ""; }; @@ -942,13 +969,6 @@ DEF165220F8D46980098507F /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Util.h; path = clang/Driver/Util.h; sourceTree = ""; }; DEF165230F8D46980098507F /* Phases.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Phases.h; path = clang/Driver/Phases.h; sourceTree = ""; }; DEF165240F8D46980098507F /* DriverDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DriverDiagnostic.h; path = clang/Driver/DriverDiagnostic.h; sourceTree = ""; }; - DEF165700F8FB34D0098507F /* PCHWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriter.cpp; path = lib/Frontend/PCHWriter.cpp; sourceTree = ""; tabWidth = 2; }; - DEF165740F8FB3510098507F /* PCHReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReader.cpp; path = lib/Frontend/PCHReader.cpp; sourceTree = ""; tabWidth = 2; }; - DEF165780F8FB3690098507F /* PCHWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCHWriter.h; path = clang/Frontend/PCHWriter.h; sourceTree = ""; }; - DEF1657B0F8FB36E0098507F /* PCHReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCHReader.h; path = clang/Frontend/PCHReader.h; sourceTree = ""; }; - DEF1657E0F8FB3730098507F /* PCHBitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCHBitCodes.h; path = clang/Frontend/PCHBitCodes.h; sourceTree = ""; }; - DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FixItRewriter.cpp; path = lib/Frontend/FixItRewriter.cpp; sourceTree = ""; }; - DEF168620F9549250098507F /* FixItRewriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FixItRewriter.h; path = clang/Frontend/FixItRewriter.h; sourceTree = ""; }; DEF169220F9645960098507F /* FrontendDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendDiagnostic.h; path = clang/Frontend/FrontendDiagnostic.h; sourceTree = ""; }; DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = ""; }; DEF16BE40FA13A5B0098507F /* TypeNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeNodes.def; path = clang/AST/TypeNodes.def; sourceTree = ""; tabWidth = 2; }; @@ -973,16 +993,9 @@ BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */, BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */, BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, - BFE2F6B611DA955A0007EDC0 /* RewriteMacros.o in Frameworks */, - BFE2F6B811DA955A0007EDC0 /* RewriteObjC.o in Frameworks */, - BFE2F6BA11DA955A0007EDC0 /* Rewriter.o in Frameworks */, - BFE2F6BC11DA955A0007EDC0 /* RewriteRope.o in Frameworks */, - BFE2F6BE11DA955A0007EDC0 /* RewriteTest.o in Frameworks */, BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */, BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, - BFE2F6CC11DA955A0007EDC0 /* Rewriter.o in Frameworks */, - BFE2F6CE11DA955A0007EDC0 /* RewriteRope.o in Frameworks */, BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1005,6 +1018,7 @@ 08FB7795FE84155DC02AAC07 /* Libraries */ = { isa = PBXGroup; children = ( + 57EB5660121B034300ECA335 /* Serialization */, BFE2F67911DA95590007EDC0 /* Rewrite */, 90FD6D6C103C3D2D005F5B73 /* Index */, DED7D7500A5242C7003AD0FB /* Basic */, @@ -1083,11 +1097,10 @@ 352246E00F5C6BC000D0D279 /* Frontend */ = { isa = PBXGroup; children = ( + BF9FEE371225E925003A8B71 /* BoostConAction.cpp */, 1AFDD8701161085D00AE030A /* ASTMerge.cpp */, 9012911C1048068D0083456D /* ASTUnit.cpp */, - 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */, 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */, - 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */, 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */, 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */, 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */, @@ -1095,24 +1108,12 @@ 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */, 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */, 1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */, - DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */, 1ACB57DE1105820D0047B991 /* FrontendAction.cpp */, 1ACB57DF1105820D0047B991 /* FrontendActions.cpp */, 1ACB57E01105820D0047B991 /* FrontendOptions.cpp */, - 1A2A54AB0FD1DD1C00F4CE45 /* GeneratePCH.cpp */, - 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */, - 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */, 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */, DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */, 1ACB57E11105820D0047B991 /* LangStandards.cpp */, - DEF165740F8FB3510098507F /* PCHReader.cpp */, - DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */, - DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */, - DEF165700F8FB34D0098507F /* PCHWriter.cpp */, - DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */, - DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */, - 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */, - 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */, 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */, 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */, 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */, @@ -1230,6 +1231,34 @@ name = Analyses; sourceTree = ""; }; + 57EB5654121B023900ECA335 /* Serialization */ = { + isa = PBXGroup; + children = ( + BF9FEDBA1225E30E003A8B71 /* ASTBitCodes.h */, + 57E15B21121C8D2B0051C2CC /* ASTDeserializationListener.h */, + 57E15B22121C8D2B0051C2CC /* ASTReader.h */, + 574F4C25121B4EF000AEAC20 /* ASTWriter.h */, + ); + name = Serialization; + sourceTree = ""; + }; + 57EB5660121B034300ECA335 /* Serialization */ = { + isa = PBXGroup; + children = ( + 57AA924D121C8B9400B4AA6C /* ASTReader.cpp */, + 57AA924E121C8B9400B4AA6C /* ASTReaderDecl.cpp */, + 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */, + 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */, + 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */, + 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */, + 57EB5661121B034300ECA335 /* CMakeLists.txt */, + 57EB5662121B034300ECA335 /* GeneratePCH.cpp */, + 57EB5663121B034300ECA335 /* Makefile */, + ); + name = Serialization; + path = lib/Serialization; + sourceTree = ""; + }; 9012911210470FAF0083456D /* clang-c */ = { isa = PBXGroup; children = ( @@ -1297,7 +1326,6 @@ 90FD6D76103C3D49005F5B73 /* IndexProvider.cpp */, 90FD6D77103C3D49005F5B73 /* Program.cpp */, 90FD6D78103C3D49005F5B73 /* ProgramImpl.h */, - 90FD6D79103C3D49005F5B73 /* ResolveLocation.cpp */, 90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */, ); name = Index; @@ -1349,15 +1377,8 @@ BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */, BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */, BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */, - BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */, BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */, - BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */, BFE2F68B11DA955A0007EDC0 /* Rewriter.d */, - BFE2F68C11DA955A0007EDC0 /* Rewriter.o */, - BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */, - BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */, - BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */, - BFE2F69011DA955A0007EDC0 /* RewriteTest.o */, BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */, BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */, ); @@ -1373,9 +1394,6 @@ BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */, BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */, BFE2F69F11DA955A0007EDC0 /* Rewriter.d */, - BFE2F6A011DA955A0007EDC0 /* Rewriter.o */, - BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */, - BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */, BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */, BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */, ); @@ -1396,15 +1414,9 @@ DE1F21F20A7D84E800FBF588 /* Parse */ = { isa = PBXGroup; children = ( - 3551068E0E9A855F006A4E44 /* AccessSpecifier.h */, - 84D9A88B0C1A581300AC7ABC /* AttributeList.h */, - DE06E8130A8FF9330050E87E /* Action.h */, - DE17336F0B068DC60080B521 /* DeclSpec.h */, - DE3B92230EB5152000D01046 /* Designator.h */, - DE1263C20EF2341900F56D2B /* Ownership.h */, + BF9FEDB51225E213003A8B71 /* ParseAST.h */, DEA09A860F3175CA000C2258 /* ParseDiagnostic.h */, DE1F22020A7D852A00FBF588 /* Parser.h */, - DE06BECA0A854E4B0050E87E /* Scope.h */, ); name = Parse; sourceTree = ""; @@ -1412,10 +1424,7 @@ DE1F22600A7D8C9B00FBF588 /* Parse */ = { isa = PBXGroup; children = ( - 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */, - DE17336D0B068DC20080B521 /* DeclSpec.cpp */, - DE3B90DE0EAC5EF200D01046 /* ExtensionRAIIObject.h */, - DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */, + BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */, DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */, DE2255FB0C8004E600D370A5 /* ParseDeclCXX.cpp */, DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */, @@ -1429,6 +1438,7 @@ 353959D40EE5F88A00E82461 /* ParseTemplate.cpp */, 3551068B0E9A8546006A4E44 /* ParseTentative.cpp */, DE06D42F0A8BB52D0050E87E /* Parser.cpp */, + BF9FEE531226FEC1003A8B71 /* RAIIObjectsForParser.h */, ); name = Parse; sourceTree = ""; @@ -1461,16 +1471,14 @@ DE67E7070C020EAB00F66BC5 /* Sema */ = { isa = PBXGroup; children = ( + BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */, + BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */, + BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */, + BF9FEDF81225E67B003A8B71 /* Action.cpp */, BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */, - BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */, - 35585DBD0EAFBC4500D0A97A /* CXXFieldCollector.h */, 1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */, - 3527124F0DAFE54700C76352 /* IdentifierResolver.h */, 352712500DAFE54700C76352 /* IdentifierResolver.cpp */, DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */, - BF89C3E311595835001C2D68 /* Lookup.h */, - DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */, - DE67E7140C020EDF00F66BC5 /* Sema.h */, DE67E7160C020EE400F66BC5 /* Sema.cpp */, 1A701B630F7C8FE400FEC4D1 /* SemaAccess.cpp */, DEB07AC70F4A427E00F5A2BE /* SemaAttr.cpp */, @@ -1485,17 +1493,14 @@ DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */, DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */, DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */, - BF89C3E411595855001C2D68 /* SemaInit.h */, 3599299A0DE2425300A8A33E /* SemaInit.cpp */, 357EA27C0F2526F300439B60 /* SemaLookup.cpp */, 1A6B6CD210693FC900BB4A8F /* SemaCodeComplete.cpp */, 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */, BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */, 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */, - 35585DBF0EAFBC4500D0A97A /* SemaOverload.h */, DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */, 3591853E0EFB1088000039AF /* SemaTemplate.cpp */, - 1A6B6CD310693FC900BB4A8F /* SemaTemplate.h */, BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */, 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */, 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */, @@ -1509,11 +1514,30 @@ DE67E7260C02108300F66BC5 /* Sema */ = { isa = PBXGroup; children = ( - 7F270AFE107A90010031B377 /* CodeCompleteConsumer.h */, - 9063F2210F9E8BDF002F7251 /* ExternalSemaSource.h */, - 9063F2220F9E8BDF002F7251 /* SemaConsumer.h */, - DE67E7270C02109800F66BC5 /* ParseAST.h */, - DEA09A890F3175D9000C2258 /* SemaDiagnostic.h */, + BF9FEE451225EA24003A8B71 /* DelayedDiagnostic.h */, + BF9FED781225E041003A8B71 /* SemaInternal.h */, + BF9FED771225E032003A8B71 /* ObjCMethodList.h */, + BF9FED731225E005003A8B71 /* Ownership.h */, + BF9FED741225E005003A8B71 /* ParsedTemplate.h */, + BF9FED751225E005003A8B71 /* Scope.h */, + BF9FED761225E005003A8B71 /* ScopeInfo.h */, + BF9FED711225DFD9003A8B71 /* DeclSpec.h */, + BF9FED721225DFD9003A8B71 /* Designator.h */, + BF9FED701225DFA1003A8B71 /* AttributeList.h */, + BF9FED6F1225DF7F003A8B71 /* Action.h */, + BF9FED6E1225DF55003A8B71 /* TemplateDeduction.h */, + BD59A948121496B9003A5A02 /* AnalysisBasedWarnings.h */, + BD59A949121496B9003A5A02 /* CodeCompleteConsumer.h */, + BD59A94A121496B9003A5A02 /* CXXFieldCollector.h */, + BD59A94B121496B9003A5A02 /* ExternalSemaSource.h */, + BD59A94C121496B9003A5A02 /* IdentifierResolver.h */, + BD59A94D121496B9003A5A02 /* Initialization.h */, + BD59A94E121496B9003A5A02 /* Lookup.h */, + BD59A94F121496B9003A5A02 /* Overload.h */, + BD59A951121496B9003A5A02 /* Sema.h */, + BD59A952121496B9003A5A02 /* SemaConsumer.h */, + BD59A953121496B9003A5A02 /* SemaDiagnostic.h */, + BD59A954121496B9003A5A02 /* Template.h */, ); name = Sema; sourceTree = ""; @@ -1521,6 +1545,14 @@ DE927FCC0C0557CD00231DA4 /* CodeGen */ = { isa = PBXGroup; children = ( + BF9FEE361225E8CF003A8B71 /* README.txt */, + BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */, + BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */, + BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */, + BF9FEE2F1225E854003A8B71 /* CGRecordLayout.h */, + BF9FEE2E1225E82D003A8B71 /* CGException.h */, + BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */, + BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */, 1A2193CB0F45EEB700C0713D /* ABIInfo.h */, 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */, 1A649E1D0F9599D9005B965E /* CGBlocks.h */, @@ -1573,6 +1605,8 @@ DE928B140C05659A00231DA4 /* CodeGen */ = { isa = PBXGroup; children = ( + BF9FEDB81225E2DE003A8B71 /* BackendUtil.h */, + BF9FEDB91225E2DE003A8B71 /* CodeGenAction.h */, DE928B1F0C0565B000231DA4 /* ModuleBuilder.h */, ); name = CodeGen; @@ -1581,6 +1615,8 @@ DEC8D98B0A9433BC00353FCA /* AST */ = { isa = PBXGroup; children = ( + BF9FEDB71225E26A003A8B71 /* RecursiveASTVisitor.h */, + BF9FEDB61225E252003A8B71 /* OperationKinds.h */, 1A15C407118226980092260D /* ASTImporter.h */, 1A15C408118226980092260D /* ASTVector.h */, 1A15C409118226980092260D /* CharUnits.h */, @@ -1613,7 +1649,6 @@ 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */, 35EE48AD0E0C4CB200715C54 /* DeclCXX.h */, 358D23090E8BEB850003DDCC /* DeclGroup.h */, - DEDFE5270F63A9230035BD10 /* DeclNodes.def */, DEB076C90F3A221200F5A2BE /* DeclTemplate.h */, DE0FCA620A95859D00248FD5 /* Expr.h */, 1A30A9E80B93A4C800201A91 /* ExprCXX.h */, @@ -1625,7 +1660,6 @@ DE6951C60C4D1F5D00A5826B /* RecordLayout.h */, DE3452800AEF1B1800DBC861 /* Stmt.h */, DECB73550FA3EE5A00F5FBC7 /* StmtCXX.h */, - DE345F210AFD347900DBC861 /* StmtNodes.def */, DECB734E0FA3ED8400F5FBC7 /* StmtObjC.h */, DE345C190AFC658B00DBC861 /* StmtVisitor.h */, 35847BE30CC7DB9000C40FFF /* StmtIterator.h */, @@ -1641,6 +1675,10 @@ DEC8D9920A9433F400353FCA /* AST */ = { isa = PBXGroup; children = ( + BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */, + BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */, + BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */, + BF9FEE001225E718003A8B71 /* CXXABI.h */, 1ABD23B11182449800A48E65 /* APValue.cpp */, 1ABD23B21182449800A48E65 /* ASTConsumer.cpp */, 1ABD23B31182449800A48E65 /* ASTContext.cpp */, @@ -1692,6 +1730,7 @@ DE67E7260C02108300F66BC5 /* Sema */, DE928B140C05659A00231DA4 /* CodeGen */, 356EF9AF0C8F7DA4006650F5 /* Analysis */, + 57EB5654121B023900ECA335 /* Serialization */, 90FD6D5E103C3D03005F5B73 /* Index */, DEF7D9F40C9C8B020001F598 /* Rewrite */, DEF1615D0F65C7FC0098507F /* Frontend */, @@ -1704,6 +1743,19 @@ DED7D7300A524295003AD0FB /* Basic */ = { isa = PBXGroup; children = ( + BF9FEDF71225E613003A8B71 /* DiagnosticCategories.td */, + BF9FEDF61225E5FB003A8B71 /* Version.inc.in */, + BF9FEDF41225E5D5003A8B71 /* Linkage.h */, + BF9FEDF51225E5D5003A8B71 /* MacroBuilder.h */, + BF9FEDF31225E5B6003A8B71 /* DeclNodes.td */, + BF9FEDF21225E58B003A8B71 /* TargetOptions.h */, + BF9FEDF01225E574003A8B71 /* Specifiers.h */, + BF9FEDF11225E574003A8B71 /* StmtNodes.td */, + BF9FEDEF1225E55C003A8B71 /* BuiltinsARM.def */, + BF9FEDED1225E52F003A8B71 /* arm_neon.td */, + BF9FEDEE1225E52F003A8B71 /* Attr.td */, + BF9FEDEC1225E514003A8B71 /* Version.h */, + BF9FEDEB1225E4F2003A8B71 /* AttrKinds.h */, DE37251C0FE4818000CF2CC2 /* Builtins.h */, DE37252A0FE4818F00CF2CC2 /* Builtins.def */, DE3725330FE4827200CF2CC2 /* BuiltinsPPC.def */, @@ -1745,6 +1797,9 @@ DED7D7390A524295003AD0FB /* Lex */ = { isa = PBXGroup; children = ( + BF9FEDB41225E1F3003A8B71 /* PreprocessingRecord.h */, + BF9FEDB31225E1E1003A8B71 /* ExternalPreprocessorSource.h */, + BF9FEDB21225E1D2003A8B71 /* CodeCompletionHandler.h */, DE3450D60AEB543100DBC861 /* DirectoryLookup.h */, DE704BD10D1647E7009C7762 /* HeaderMap.h */, DE344AB70AE5DF6D00DBC861 /* HeaderSearch.h */, @@ -1789,6 +1844,7 @@ DED7D78C0A5242E6003AD0FB /* Lex */ = { isa = PBXGroup; children = ( + BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */, DE704DD10D1668A4009C7762 /* HeaderMap.cpp */, DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */, DED7D79E0A5242E6003AD0FB /* Lexer.cpp */, @@ -1861,28 +1917,35 @@ DEF1615D0F65C7FC0098507F /* Frontend */ = { isa = PBXGroup; children = ( + BF9FEDCE1225E42C003A8B71 /* VerifyDiagnosticsClient.h */, + BF9FEDCC1225E41D003A8B71 /* PreprocessorOptions.h */, + BF9FEDCD1225E41D003A8B71 /* PreprocessorOutputOptions.h */, + BF9FEDC81225E40A003A8B71 /* FrontendOptions.h */, + BF9FEDC91225E40A003A8B71 /* FrontendPluginRegistry.h */, + BF9FEDCA1225E40A003A8B71 /* HeaderSearchOptions.h */, + BF9FEDCB1225E40A003A8B71 /* LangStandard.h */, + BF9FEDC61225E3F6003A8B71 /* FrontendAction.h */, + BF9FEDC71225E3F6003A8B71 /* FrontendActions.h */, + BF9FEDC41225E3DA003A8B71 /* DependencyOutputOptions.h */, + BF9FEDC51225E3DA003A8B71 /* DiagnosticOptions.h */, + BF9FEDC21225E3C2003A8B71 /* CompilerInstance.h */, + BF9FEDC31225E3C2003A8B71 /* CompilerInvocation.h */, + BF9FEDC01225E3AB003A8B71 /* ChainedDiagnosticClient.h */, + BF9FEDC11225E3AB003A8B71 /* CodeGenOptions.h */, + BF9FEDBF1225E392003A8B71 /* AnalyzerOptions.h */, 90FD6D86103C3D80005F5B73 /* Analyses.def */, - 90FD6D87103C3D80005F5B73 /* AnalysisConsumer.h */, 90FD6D88103C3D80005F5B73 /* ASTConsumers.h */, 90FD6D89103C3D80005F5B73 /* ASTUnit.h */, 90FD6D8A103C3D80005F5B73 /* CommandLineSourceLoc.h */, 90FD6D8B103C3D80005F5B73 /* DeclContextXML.def */, 90FD6D8C103C3D80005F5B73 /* DeclXML.def */, 90FD6D8D103C3D80005F5B73 /* DocumentXML.def */, + BF9FEDCF1225E443003A8B71 /* LangStandards.def */, 90FD6D8E103C3D80005F5B73 /* DocumentXML.h */, 90FD6D8F103C3D80005F5B73 /* StmtXML.def */, 90FD6D90103C3D80005F5B73 /* TypeXML.def */, 90FD6D91103C3D80005F5B73 /* Utils.h */, - DEF161620F65C81C0098507F /* CompileOptions.h */, - DEF168620F9549250098507F /* FixItRewriter.h */, DEF169220F9645960098507F /* FrontendDiagnostic.h */, - DEF1615E0F65C81C0098507F /* InitHeaderSearch.h */, - DECB6F030F9D939A00F5FBC7 /* InitPreprocessor.h */, - DEF1615F0F65C81C0098507F /* ManagerRegistry.h */, - DEF1657E0F8FB3730098507F /* PCHBitCodes.h */, - DEF1657B0F8FB36E0098507F /* PCHReader.h */, - DEF165780F8FB3690098507F /* PCHWriter.h */, - DEF161610F65C81C0098507F /* PathDiagnosticClients.h */, DEF161600F65C81C0098507F /* TextDiagnosticBuffer.h */, DEF161630F65C81C0098507F /* TextDiagnosticPrinter.h */, ); @@ -1892,6 +1955,10 @@ DEF165020F8D46810098507F /* Driver */ = { isa = PBXGroup; children = ( + BF9FEDE91225E4BD003A8B71 /* OptSpecifier.h */, + BF9FEDEA1225E4BD003A8B71 /* OptTable.h */, + BF9FEDE81225E49D003A8B71 /* CC1Options.h */, + BF9FEDE71225E488003A8B71 /* CC1AsOptions.h */, DEF165160F8D46980098507F /* Action.h */, DEF1651D0F8D46980098507F /* ArgList.h */, DEF1651E0F8D46980098507F /* Arg.h */, @@ -1919,6 +1986,10 @@ DEF7D9F40C9C8B020001F598 /* Rewrite */ = { isa = PBXGroup; children = ( + BF9FEDBE1225E373003A8B71 /* ASTConsumers.h */, + BF9FEDBD1225E35F003A8B71 /* Rewriters.h */, + BF9FEDBB1225E34B003A8B71 /* FixItRewriter.h */, + BF9FEDBC1225E34B003A8B71 /* FrontendActions.h */, DEFFECA30DB093D100B4E7C3 /* DeltaTree.h */, 35F2BE7B0DAC2963006E7668 /* HTMLRewrite.h */, DEF7D9F60C9C8B1A0001F598 /* Rewriter.h */, @@ -1969,6 +2040,12 @@ buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */; compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 08FB7794FE84155DC02AAC07 /* clang */; projectDirPath = ""; projectRoot = ""; @@ -2001,8 +2078,6 @@ DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */, DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */, DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */, - DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */, - DE17336E0B068DC20080B521 /* DeclSpec.cpp in Sources */, 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */, DE67E70B0C020EC500F66BC5 /* SemaType.cpp in Sources */, DE67E70D0C020ECA00F66BC5 /* SemaStmt.cpp in Sources */, @@ -2010,7 +2085,6 @@ DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */, DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */, DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */, - DE67E71A0C020F4F00F66BC5 /* ParseAST.cpp in Sources */, DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */, DE928B130C05659200231DA4 /* ModuleBuilder.cpp in Sources */, DE928B7F0C0A615600231DA4 /* CodeGenModule.cpp in Sources */, @@ -2018,7 +2092,6 @@ DE4772FA0C10EAE5002239E8 /* CGStmt.cpp in Sources */, DE4772FC0C10EAEC002239E8 /* CGExpr.cpp in Sources */, DE4264FC0C113592005A861D /* CGDecl.cpp in Sources */, - 84D9A8880C1A57E100AC7ABC /* AttributeList.cpp in Sources */, DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */, DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */, DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */, @@ -2096,9 +2169,7 @@ DEB077990F44F97800F5A2BE /* TokenConcatenation.cpp in Sources */, 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */, DEB07AC80F4A427E00F5A2BE /* SemaAttr.cpp in Sources */, - 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */, 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */, - 352246EA0F5C6BE000D0D279 /* PlistDiagnostics.cpp in Sources */, 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */, 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 15:56:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1820106564A; Fri, 17 Sep 2010 15:56:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5F388FC19; Fri, 17 Sep 2010 15:56:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HFuJo0034909; Fri, 17 Sep 2010 15:56:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HFuJQ9034908; Fri, 17 Sep 2010 15:56:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009171556.o8HFuJQ9034908@svn.freebsd.org> From: Dimitry Andric Date: Fri, 17 Sep 2010 15:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212796 - vendor/clang/clang-r114020 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 15:56:20 -0000 Author: dim Date: Fri Sep 17 15:56:19 2010 New Revision: 212796 URL: http://svn.freebsd.org/changeset/base/212796 Log: Tag clang r114020. Approved by: rpaulo (mentor) Added: vendor/clang/clang-r114020/ - copied from r212795, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 15:58:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D195106564A; Fri, 17 Sep 2010 15:58:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41EF58FC1A; Fri, 17 Sep 2010 15:58:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HFw6EE034979; Fri, 17 Sep 2010 15:58:06 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HFw6u8034977; Fri, 17 Sep 2010 15:58:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201009171558.o8HFw6u8034977@svn.freebsd.org> From: Dimitry Andric Date: Fri, 17 Sep 2010 15:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212797 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 15:58:06 -0000 Author: dim Date: Fri Sep 17 15:58:05 2010 New Revision: 212797 URL: http://svn.freebsd.org/changeset/base/212797 Log: Remove my size limit again, as I am done importing llvm & clang. Approved-by: rpaulo (mentor) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Sep 17 15:56:19 2010 (r212796) +++ svnadmin/conf/sizelimit.conf Fri Sep 17 15:58:05 2010 (r212797) @@ -32,4 +32,3 @@ gonzo kmacy jb jeff -dim From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 16:05:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F5661065672; Fri, 17 Sep 2010 16:05:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E50F8FC24; Fri, 17 Sep 2010 16:05:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HG5PcY035173; Fri, 17 Sep 2010 16:05:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HG5PSh035171; Fri, 17 Sep 2010 16:05:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009171605.o8HG5PSh035171@svn.freebsd.org> From: Warner Losh Date: Fri, 17 Sep 2010 16:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212798 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 16:05:26 -0000 Author: imp Date: Fri Sep 17 16:05:25 2010 New Revision: 212798 URL: http://svn.freebsd.org/changeset/base/212798 Log: By popular demand, kill all the non GIANT related interrupt messages. They are confusing and add little value. Reviewed by: jhb@ Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Fri Sep 17 15:58:05 2010 (r212797) +++ head/sys/kern/subr_bus.c Fri Sep 17 16:05:25 2010 (r212798) @@ -3998,15 +3998,6 @@ bus_setup_intr(device_t dev, struct reso return (error); if (handler != NULL && !(flags & INTR_MPSAFE)) device_printf(dev, "[GIANT-LOCKED]\n"); - if (bootverbose && (flags & INTR_MPSAFE)) - device_printf(dev, "[MPSAFE]\n"); - if (filter != NULL) { - if (handler == NULL) - device_printf(dev, "[FILTER]\n"); - else - device_printf(dev, "[FILTER+ITHREAD]\n"); - } else - device_printf(dev, "[ITHREAD]\n"); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 16:20:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D96E51065693; Fri, 17 Sep 2010 16:20:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC6408FC17; Fri, 17 Sep 2010 16:20:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HGKTEG035588; Fri, 17 Sep 2010 16:20:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HGKTla035583; Fri, 17 Sep 2010 16:20:29 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009171620.o8HGKTla035583@svn.freebsd.org> From: Michael Tuexen Date: Fri, 17 Sep 2010 16:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212799 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 16:20:30 -0000 Author: tuexen Date: Fri Sep 17 16:20:29 2010 New Revision: 212799 URL: http://svn.freebsd.org/changeset/base/212799 Log: * Implement initial version of send buffer splitting. * Make send/recv buffer splitting switchable via sysctl. * While there: Fix some comments. Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Fri Sep 17 16:05:25 2010 (r212798) +++ head/sys/netinet/sctp_constants.h Fri Sep 17 16:20:29 2010 (r212799) @@ -948,6 +948,9 @@ __FBSDID("$FreeBSD$"); */ #define SCTP_TIME_WAIT 60 +#define SCTP_SEND_BUFFER_SPLITTING 0x00000001 +#define SCTP_RECV_BUFFER_SPLITTING 0x00000002 + /* The system retains a cache of free chunks such to * cut down on calls the memory allocation system. There * is a per association limit of free items and a overall Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Sep 17 16:05:25 2010 (r212798) +++ head/sys/netinet/sctp_output.c Fri Sep 17 16:20:29 2010 (r212799) @@ -7407,7 +7407,7 @@ sctp_med_chunk_output(struct sctp_inpcb /* temp arrays for unlinking */ struct sctp_tmit_chunk *data_list[SCTP_MAX_DATA_BUNDLING]; int no_fragmentflg, error; - unsigned int max_rwnd_per_dest; + unsigned int max_rwnd_per_dest, max_send_per_dest; int one_chunk, hbflag, skip_data_for_this_net; int asconf, cookie, no_out_cnt; int bundle_at, ctl_cnt, no_data_chunks, eeor_mode; @@ -7469,6 +7469,10 @@ sctp_med_chunk_output(struct sctp_inpcb } } max_rwnd_per_dest = ((asoc->peers_rwnd + asoc->total_flight) / asoc->numnets); + if (stcb->sctp_socket) + max_send_per_dest = SCTP_SB_LIMIT_SND(stcb->sctp_socket) / asoc->numnets; + else + max_send_per_dest = 0; if ((no_data_chunks == 0) && (!TAILQ_EMPTY(&asoc->out_wheel))) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { /* @@ -8039,9 +8043,22 @@ again_one_more_time: goto no_data_fill; } if ((asoc->sctp_cmt_on_off == 1) && + (SCTP_BASE_SYSCTL(sctp_buffer_splitting) & SCTP_RECV_BUFFER_SPLITTING) && (net->flight_size > max_rwnd_per_dest)) { goto no_data_fill; } + /* + * We need a specific accounting for the usage of the send + * buffer. We also need to check the number of messages per + * net. For now, this is better than nothing and it disabled + * by default... + */ + if ((asoc->sctp_cmt_on_off == 1) && + (SCTP_BASE_SYSCTL(sctp_buffer_splitting) & SCTP_SEND_BUFFER_SPLITTING) && + (max_send_per_dest > 0) && + (net->flight_size > max_send_per_dest)) { + goto no_data_fill; + } /*********************/ /* Data transmission */ /*********************/ Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Fri Sep 17 16:05:25 2010 (r212798) +++ head/sys/netinet/sctp_sysctl.c Fri Sep 17 16:20:29 2010 (r212799) @@ -109,6 +109,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_mobility_base) = SCTPCTL_MOBILITY_BASE_DEFAULT; SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff) = SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT; SCTP_BASE_SYSCTL(sctp_vtag_time_wait) = SCTPCTL_TIME_WAIT_DEFAULT; + SCTP_BASE_SYSCTL(sctp_buffer_splitting) = SCTPCTL_BUFFER_SPLITTING_DEFAULT; #if defined(SCTP_LOCAL_TRACE_BUF) memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log)); #endif @@ -620,7 +621,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_default_cc_module), SCTPCTL_DEFAULT_CC_MODULE_MIN, SCTPCTL_DEFAULT_CC_MODULE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_default_frag_interleave), SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_vtag_time_wait), SCTPCTL_TIME_WAIT_MIN, SCTPCTL_TIME_WAIT_MAX); - + RANGECHK(SCTP_BASE_SYSCTL(sctp_buffer_splitting), SCTPCTL_BUFFER_SPLITTING_MIN, SCTPCTL_BUFFER_SPLITTING_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_base), SCTPCTL_MOBILITY_BASE_MIN, SCTPCTL_MOBILITY_BASE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_udp_tunneling_for_client_enable), SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN, SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MAX); @@ -1067,6 +1068,10 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, vt &SCTP_BASE_SYSCTL(sctp_vtag_time_wait), 0, sysctl_sctp_check, "IU", SCTPCTL_TIME_WAIT_DESC); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, buffer_splitting, CTLTYPE_INT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_buffer_splitting), 0, sysctl_sctp_check, "IU", + SCTPCTL_BUFFER_SPLITTING_DESC); + #ifdef SCTP_DEBUG SYSCTL_PROC(_net_inet_sctp, OID_AUTO, debug, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_debug_on), 0, sysctl_sctp_check, "IU", Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Fri Sep 17 16:05:25 2010 (r212798) +++ head/sys/netinet/sctp_sysctl.h Fri Sep 17 16:20:29 2010 (r212799) @@ -107,6 +107,7 @@ struct sctp_sysctl { uint32_t sctp_udp_tunneling_port; uint32_t sctp_enable_sack_immediately; uint32_t sctp_vtag_time_wait; + uint32_t sctp_buffer_splitting; #if defined(SCTP_DEBUG) uint32_t sctp_debug_on; #endif @@ -478,19 +479,23 @@ struct sctp_sysctl { #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 1 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN -/* Enable sending of the SACK-IMMEDIATELY bit */ +/* Enable sending of the NAT-FRIENDLY message */ #define SCTPCTL_NAT_FRIENDLY_INITS_DESC "Enable sending of the nat-friendly SCTP option on INITs." #define SCTPCTL_NAT_FRIENDLY_INITS_MIN 0 #define SCTPCTL_NAT_FRIENDLY_INITS_MAX 1 #define SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT SCTPCTL_NAT_FRIENDLY_INITS_MIN - -/* Vtag tiem wait bits */ -#define SCTPCTL_TIME_WAIT_DESC "Vtag time wait time 0 disables." +/* Vtag time wait in seconds */ +#define SCTPCTL_TIME_WAIT_DESC "Vtag time wait time in seconds, 0 disables it." #define SCTPCTL_TIME_WAIT_MIN 0 #define SCTPCTL_TIME_WAIT_MAX 0xffffffff #define SCTPCTL_TIME_WAIT_DEFAULT SCTP_TIME_WAIT +/* Enable Send/Receive buffer splitting */ +#define SCTPCTL_BUFFER_SPLITTING_DESC "Enable send/receive buffer splitting." +#define SCTPCTL_BUFFER_SPLITTING_MIN 0 +#define SCTPCTL_BUFFER_SPLITTING_MAX 0x3 +#define SCTPCTL_BUFFER_SPLITTING_DEFAULT SCTPCTL_BUFFER_SPLITTING_MIN #if defined(SCTP_DEBUG) /* debug: Configure debug output */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 18:53:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AE46106564A; Fri, 17 Sep 2010 18:53:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED5F48FC16; Fri, 17 Sep 2010 18:53:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HIr7fb038696; Fri, 17 Sep 2010 18:53:07 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HIr7a2038692; Fri, 17 Sep 2010 18:53:07 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009171853.o8HIr7a2038692@svn.freebsd.org> From: Michael Tuexen Date: Fri, 17 Sep 2010 18:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212800 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 18:53:08 -0000 Author: tuexen Date: Fri Sep 17 18:53:07 2010 New Revision: 212800 URL: http://svn.freebsd.org/changeset/base/212800 Log: Make the initial congestion window configurable via sysctl. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Fri Sep 17 16:20:29 2010 (r212799) +++ head/sys/netinet/sctp_cc_functions.c Fri Sep 17 18:53:07 2010 (r212800) @@ -44,18 +44,27 @@ #include #include __FBSDID("$FreeBSD$"); + void sctp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net) { + struct sctp_association *assoc; + uint32_t cwnd_in_mtu; + + assoc = &stcb->asoc; /* - * We take the max of the burst limit times a MTU or the - * INITIAL_CWND. We then limit this to 4 MTU's of sending. cwnd must - * be at least 2 MTU. + * We take the minimum of the burst limit and the initial congestion + * window. The initial congestion window is at least two times the + * MTU. */ - net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND)); - net->ssthresh = stcb->asoc.peers_rwnd; + cwnd_in_mtu = SCTP_BASE_SYSCTL(sctp_initial_cwnd); + if ((assoc->max_burst > 0) && (cwnd_in_mtu > assoc->max_burst)) + cwnd_in_mtu = assoc->max_burst; + net->cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu; + net->ssthresh = assoc->peers_rwnd; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & + (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION); } } Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Fri Sep 17 16:20:29 2010 (r212799) +++ head/sys/netinet/sctp_sysctl.c Fri Sep 17 18:53:07 2010 (r212800) @@ -110,6 +110,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff) = SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT; SCTP_BASE_SYSCTL(sctp_vtag_time_wait) = SCTPCTL_TIME_WAIT_DEFAULT; SCTP_BASE_SYSCTL(sctp_buffer_splitting) = SCTPCTL_BUFFER_SPLITTING_DEFAULT; + SCTP_BASE_SYSCTL(sctp_initial_cwnd) = SCTPCTL_INITIAL_CWND_DEFAULT; #if defined(SCTP_LOCAL_TRACE_BUF) memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log)); #endif @@ -622,6 +623,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_default_frag_interleave), SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_vtag_time_wait), SCTPCTL_TIME_WAIT_MIN, SCTPCTL_TIME_WAIT_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_buffer_splitting), SCTPCTL_BUFFER_SPLITTING_MIN, SCTPCTL_BUFFER_SPLITTING_MAX); + RANGECHK(SCTP_BASE_SYSCTL(sctp_initial_cwnd), SCTPCTL_INITIAL_CWND_MIN, SCTPCTL_INITIAL_CWND_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_base), SCTPCTL_MOBILITY_BASE_MIN, SCTPCTL_MOBILITY_BASE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_udp_tunneling_for_client_enable), SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN, SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MAX); @@ -1072,6 +1074,10 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, bu &SCTP_BASE_SYSCTL(sctp_buffer_splitting), 0, sysctl_sctp_check, "IU", SCTPCTL_BUFFER_SPLITTING_DESC); +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, initial_cwnd, CTLTYPE_INT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_initial_cwnd), 0, sysctl_sctp_check, "IU", + SCTPCTL_INITIAL_CWND_DESC); + #ifdef SCTP_DEBUG SYSCTL_PROC(_net_inet_sctp, OID_AUTO, debug, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_debug_on), 0, sysctl_sctp_check, "IU", Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Fri Sep 17 16:20:29 2010 (r212799) +++ head/sys/netinet/sctp_sysctl.h Fri Sep 17 18:53:07 2010 (r212800) @@ -108,6 +108,7 @@ struct sctp_sysctl { uint32_t sctp_enable_sack_immediately; uint32_t sctp_vtag_time_wait; uint32_t sctp_buffer_splitting; + uint32_t sctp_initial_cwnd; #if defined(SCTP_DEBUG) uint32_t sctp_debug_on; #endif @@ -497,6 +498,12 @@ struct sctp_sysctl { #define SCTPCTL_BUFFER_SPLITTING_MAX 0x3 #define SCTPCTL_BUFFER_SPLITTING_DEFAULT SCTPCTL_BUFFER_SPLITTING_MIN +/* Initial congestion window in MTU */ +#define SCTPCTL_INITIAL_CWND_DESC "Initial congestion window in MTU" +#define SCTPCTL_INITIAL_CWND_MIN 2 +#define SCTPCTL_INITIAL_CWND_MAX 0xffffffff +#define SCTPCTL_INITIAL_CWND_DEFAULT 3 + #if defined(SCTP_DEBUG) /* debug: Configure debug output */ #define SCTPCTL_DEBUG_DESC "Configure debug output" From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 19:20:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24A891065672; Fri, 17 Sep 2010 19:20:40 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECE758FC17; Fri, 17 Sep 2010 19:20:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HJKdeA039353; Fri, 17 Sep 2010 19:20:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HJKdbJ039349; Fri, 17 Sep 2010 19:20:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009171920.o8HJKdbJ039349@svn.freebsd.org> From: Michael Tuexen Date: Fri, 17 Sep 2010 19:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212801 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 19:20:40 -0000 Author: tuexen Date: Fri Sep 17 19:20:39 2010 New Revision: 212801 URL: http://svn.freebsd.org/changeset/base/212801 Log: Fix a bug where the wrong PR-SCTP policy was considered. While there, use always the same code for the check of TTL expiration. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Fri Sep 17 18:53:07 2010 (r212800) +++ head/sys/netinet/sctp_indata.c Fri Sep 17 19:20:39 2010 (r212801) @@ -3300,13 +3300,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (stcb->asoc.peer_supports_prsctp) { if ((PR_SCTP_TTL_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) { /* Is it expired? */ - if ( - /* - * TODO sctp_constants.h needs alternative - * time macros when _KERNEL is undefined. - */ - (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) - ) { + if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { /* Yes so drop it */ if (tp1->data != NULL) { (void)sctp_release_pr_sctp_chunk(stcb, tp1, Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Sep 17 18:53:07 2010 (r212800) +++ head/sys/netinet/sctp_output.c Fri Sep 17 19:20:39 2010 (r212801) @@ -5728,7 +5728,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, while (chk) { nchk = TAILQ_NEXT(chk, sctp_next); /* Here we must move to the sent queue and mark */ - if (PR_SCTP_TTL_ENABLED(chk->flags)) { + if (PR_SCTP_BUF_ENABLED(chk->flags)) { if (chk->rec.data.timetodrop.tv_sec >= (long)srcv->sinfo_timetolive) { if (chk->data) { /* Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Fri Sep 17 18:53:07 2010 (r212800) +++ head/sys/netinet/sctp_timer.c Fri Sep 17 19:20:39 2010 (r212801) @@ -772,9 +772,7 @@ start_again: } if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) { /* Is it expired? */ - if ((now.tv_sec > chk->rec.data.timetodrop.tv_sec) || - ((chk->rec.data.timetodrop.tv_sec == now.tv_sec) && - (now.tv_usec > chk->rec.data.timetodrop.tv_usec))) { + if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) { /* Yes so drop it */ if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb, From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 21:53:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0FFE1065670; Fri, 17 Sep 2010 21:53:56 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFC668FC18; Fri, 17 Sep 2010 21:53:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HLruDu042949; Fri, 17 Sep 2010 21:53:56 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HLruj7042946; Fri, 17 Sep 2010 21:53:56 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201009172153.o8HLruj7042946@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 17 Sep 2010 21:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212802 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 21:53:56 -0000 Author: ken Date: Fri Sep 17 21:53:56 2010 New Revision: 212802 URL: http://svn.freebsd.org/changeset/base/212802 Log: Fix a couple of mps problems. When the driver is completely saturated with commands (1024 in the case of the SAS2008 in my test system), I/O stops. If we tell CAM that we have one less command slot than we have actually allocated, everything works fine. We also need a few extra command slots to allow for aborts and other task management commands to be sent down. This needs more investigation to determine the root cause, but for now this fixes things in my testing. mps.c: Change a printf() to mps_printf(). mps_sas.c: Subtract 5 command slots when we tell CAM how many commands we can handle. Add some commented-out logic to print the contents the CDBs for timed-out commands. This can help in debugging devices that are timing out. This will be uncommented once I bring some CAM changes in. Reported by: Andrew Boyer Modified: head/sys/dev/mps/mps.c head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Fri Sep 17 19:20:39 2010 (r212801) +++ head/sys/dev/mps/mps.c Fri Sep 17 21:53:56 2010 (r212802) @@ -1416,7 +1416,7 @@ mps_data_cb(void *arg, bus_dma_segment_t chain = mps_alloc_chain(sc); if (chain == NULL) { /* Resource shortage, roll back! */ - printf("out of chain frames\n"); + mps_printf(sc, "out of chain frames\n"); return; } Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Fri Sep 17 19:20:39 2010 (r212801) +++ head/sys/dev/mps/mps_sas.c Fri Sep 17 21:53:56 2010 (r212802) @@ -596,6 +596,7 @@ mps_attach_sas(struct mps_softc *sc) { struct mpssas_softc *sassc; int error = 0; + int num_sim_reqs; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -605,15 +606,30 @@ mps_attach_sas(struct mps_softc *sc) sc->sassc = sassc; sassc->sc = sc; - if ((sassc->devq = cam_simq_alloc(sc->num_reqs)) == NULL) { + /* + * Tell CAM that we can handle 5 fewer requests than we have + * allocated. If we allow the full number of requests, all I/O + * will halt when we run out of resources. Things work fine with + * just 1 less request slot given to CAM than we have allocated. + * We also need a couple of extra commands so that we can send down + * abort, reset, etc. requests when commands time out. Otherwise + * we could wind up in a situation with sc->num_reqs requests down + * on the card and no way to send an abort. + * + * XXX KDM need to figure out why I/O locks up if all commands are + * used. + */ + num_sim_reqs = sc->num_reqs - 5; + + if ((sassc->devq = cam_simq_alloc(num_sim_reqs)) == NULL) { mps_dprint(sc, MPS_FAULT, "Cannot allocate SIMQ\n"); error = ENOMEM; goto out; } sassc->sim = cam_sim_alloc(mpssas_action, mpssas_poll, "mps", sassc, - device_get_unit(sc->mps_dev), &sc->mps_mtx, sc->num_reqs, sc->num_reqs, - sassc->devq); + device_get_unit(sc->mps_dev), &sc->mps_mtx, num_sim_reqs, + num_sim_reqs, sassc->devq); if (sassc->sim == NULL) { mps_dprint(sc, MPS_FAULT, "Cannot allocate SIM\n"); error = EINVAL; @@ -930,6 +946,9 @@ mpssas_scsiio_timeout(void *data) struct mps_softc *sc; struct mps_command *cm; struct mpssas_target *targ; +#if 0 + char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; +#endif cm = (struct mps_command *)data; sc = cm->cm_sc; @@ -954,6 +973,22 @@ mpssas_scsiio_timeout(void *data) xpt_print(ccb->ccb_h.path, "SCSI command timeout on device handle " "0x%04x SMID %d\n", targ->handle, cm->cm_desc.Default.SMID); + /* + * XXX KDM this is useful for debugging purposes, but the existing + * scsi_op_desc() implementation can't handle a NULL value for + * inq_data. So this will remain commented out until I bring in + * those changes as well. + */ +#if 0 + xpt_print(ccb->ccb_h.path, "Timed out command: %s. CDB %s\n", + scsi_op_desc((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + ccb->csio.cdb_io.cdb_ptr[0] : + ccb->csio.cdb_io.cdb_bytes[0], NULL), + scsi_cdb_string((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + ccb->csio.cdb_io.cdb_ptr : + ccb->csio.cdb_io.cdb_bytes, cdb_str, + sizeof(cdb_str))); +#endif /* Inform CAM about the timeout and that recovery is starting. */ #if 0 From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 22:05:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92B6F106566C; Fri, 17 Sep 2010 22:05:27 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81D3E8FC16; Fri, 17 Sep 2010 22:05:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HM5Re1043267; Fri, 17 Sep 2010 22:05:27 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HM5RPG043265; Fri, 17 Sep 2010 22:05:27 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201009172205.o8HM5RPG043265@svn.freebsd.org> From: Andre Oppermann Date: Fri, 17 Sep 2010 22:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212803 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 22:05:27 -0000 Author: andre Date: Fri Sep 17 22:05:27 2010 New Revision: 212803 URL: http://svn.freebsd.org/changeset/base/212803 Log: Rearrange the TSO code to make it more readable and to clearly separate the decision logic, of whether we can do TSO, and the calculation of the burst length into two distinct parts. Change the way the TSO burst length calculation is done. While TSO could do bursts of 65535 bytes that can't be represented in ip_len together with the IP and TCP header. Account for that and use IP_MAXPACKET instead of TCP_MAXWIN as base constant (both have the same value of 64K). When more data is available prevent less than MSS sized segments from being sent during the current TSO burst. Add two more KASSERTs to ensure the integrity of the packets. Tested by: Ben Wilber MFC after: 10 days Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Fri Sep 17 21:53:56 2010 (r212802) +++ head/sys/netinet/tcp_output.c Fri Sep 17 22:05:27 2010 (r212803) @@ -465,9 +465,8 @@ after_sack_rexmit: } /* - * Truncate to the maximum segment length or enable TCP Segmentation - * Offloading (if supported by hardware) and ensure that FIN is removed - * if the length no longer contains the last data byte. + * Decide if we can use TCP Segmentation Offloading (if supported by + * hardware). * * TSO may only be used if we are in a pure bulk sending state. The * presence of TCP-MD5, SACK retransmits, SACK advertizements and @@ -475,10 +474,6 @@ after_sack_rexmit: * (except for the sequence number) for all generated packets. This * makes it impossible to transmit any options which vary per generated * segment or packet. - * - * The length of TSO bursts is limited to TCP_MAXWIN. That limit and - * removal of FIN (if not already catched here) are handled later after - * the exact length of the TCP options are known. */ #ifdef IPSEC /* @@ -487,22 +482,15 @@ after_sack_rexmit: */ ipsec_optlen = ipsec_hdrsiz_tcp(tp); #endif - if (len > tp->t_maxseg) { - if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && - ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && sack_rxmit == 0 && - tp->t_inpcb->inp_options == NULL && - tp->t_inpcb->in6p_options == NULL + if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg && + ((tp->t_flags & TF_SIGNATURE) == 0) && + tp->rcv_numsacks == 0 && sack_rxmit == 0 && #ifdef IPSEC - && ipsec_optlen == 0 + ipsec_optlen == 0 && #endif - ) { - tso = 1; - } else { - len = tp->t_maxseg; - sendalot = 1; - } - } + tp->t_inpcb->inp_options == NULL && + tp->t_inpcb->in6p_options == NULL) + tso = 1; if (sack_rxmit) { if (SEQ_LT(p->rxmit + len, tp->snd_una + so->so_snd.sb_cc)) @@ -732,28 +720,53 @@ send: * bump the packet length beyond the t_maxopd length. * Clear the FIN bit because we cut off the tail of * the segment. - * - * When doing TSO limit a burst to TCP_MAXWIN minus the - * IP, TCP and Options length to keep ip->ip_len from - * overflowing. Prevent the last segment from being - * fractional thus making them all equal sized and set - * the flag to continue sending. TSO is disabled when - * IP options or IPSEC are present. */ if (len + optlen + ipoptlen > tp->t_maxopd) { flags &= ~TH_FIN; + if (tso) { - if (len > TCP_MAXWIN - hdrlen - optlen) { - len = TCP_MAXWIN - hdrlen - optlen; - len = len - (len % (tp->t_maxopd - optlen)); + KASSERT(ipoptlen == 0, + ("%s: TSO can't do IP options", __func__)); + + /* + * Limit a burst to IP_MAXPACKET minus IP, + * TCP and options length to keep ip->ip_len + * from overflowing. + */ + if (len > IP_MAXPACKET - hdrlen) { + len = IP_MAXPACKET - hdrlen; + sendalot = 1; + } + + /* + * Prevent the last segment from being + * fractional unless the send sockbuf can + * be emptied. + */ + if (sendalot && off + len < so->so_snd.sb_cc) { + len -= len % (tp->t_maxopd - optlen); sendalot = 1; - } else if (tp->t_flags & TF_NEEDFIN) + } + + /* + * Send the FIN in a separate segment + * after the bulk sending is done. + * We don't trust the TSO implementations + * to clear the FIN flag on all but the + * last segment. + */ + if (tp->t_flags & TF_NEEDFIN) sendalot = 1; + } else { len = tp->t_maxopd - optlen - ipoptlen; sendalot = 1; } - } + } else + tso = 0; + + KASSERT(len + hdrlen + ipoptlen <= IP_MAXPACKET, + ("%s: len > IP_MAXPACKET", __func__)); /*#ifdef DIAGNOSTIC*/ #ifdef INET6 @@ -1068,6 +1081,9 @@ send: m->m_pkthdr.tso_segsz = tp->t_maxopd - optlen; } + KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL), + ("%s: mbuf chain shorter than expected", __func__)); + /* * In transmit state, time the transmission and arrange for * the retransmit. In persist state, just set snd_max. From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 22:51:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22526106566C; Fri, 17 Sep 2010 22:51:46 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11B348FC17; Fri, 17 Sep 2010 22:51:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HMpjWT044309; Fri, 17 Sep 2010 22:51:45 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HMpjZJ044307; Fri, 17 Sep 2010 22:51:45 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009172251.o8HMpjZJ044307@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 17 Sep 2010 22:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212804 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 22:51:46 -0000 Author: pjd Date: Fri Sep 17 22:51:45 2010 New Revision: 212804 URL: http://svn.freebsd.org/changeset/base/212804 Log: Remove magic value. Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Fri Sep 17 22:05:27 2010 (r212803) +++ head/sys/boot/zfs/zfs.c Fri Sep 17 22:51:45 2010 (r212804) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include "zfsimpl.c" +#define MAXBDDEV 31 + static int zfs_open(const char *path, struct open_file *f); static int zfs_write(struct open_file *f, void *buf, size_t size, size_t *resid); static int zfs_close(struct open_file *f); @@ -402,7 +404,7 @@ zfs_dev_init(void) * diskN, diskNpM or diskNsM. */ zfs_init(); - for (unit = 0; unit < 32 /* XXX */; unit++) { + for (unit = 0; unit < MAXBDDEV; unit++) { sprintf(devname, "disk%d:", unit); fd = open(devname, O_RDONLY); if (fd == -1) From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 22:59:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D0901065672; Fri, 17 Sep 2010 22:59:16 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5F368FC0C; Fri, 17 Sep 2010 22:59:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HMxFs6044496; Fri, 17 Sep 2010 22:59:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HMxFW1044493; Fri, 17 Sep 2010 22:59:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009172259.o8HMxFW1044493@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 17 Sep 2010 22:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212805 - in head/sys/boot/i386: libi386 zfsboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 22:59:16 -0000 Author: pjd Date: Fri Sep 17 22:59:15 2010 New Revision: 212805 URL: http://svn.freebsd.org/changeset/base/212805 Log: Before VirtualBox is fixed, mark with #ifdef what has to be done to make it possible to boot from ZFS RAIDZ for example from within VirtualBox. The problem with VirtualBox is that its BIOS reports only one disk present. If we choose to ignore this report, we can find all the disks available. We can't have this work-around to be turned on by default, because some broken BIOSes report true when it comes to number of disks, but present the same disk multiple times. Modified: head/sys/boot/i386/libi386/biosdisk.c head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Fri Sep 17 22:51:45 2010 (r212804) +++ head/sys/boot/i386/libi386/biosdisk.c Fri Sep 17 22:59:15 2010 (r212805) @@ -214,10 +214,12 @@ bd_init(void) /* sequence 0, 0x80 */ for (base = 0; base <= 0x80; base += 0x80) { for (unit = base; (nbdinfo < MAXBDDEV); unit++) { +#ifndef VIRTUALBOX /* check the BIOS equipment list for number of fixed disks */ if((base == 0x80) && (nfd >= *(unsigned char *)PTOV(BIOS_NUMDRIVES))) - break; + break; +#endif bdinfo[nbdinfo].bd_unit = unit; bdinfo[nbdinfo].bd_flags = (unit < 0x80) ? BD_FLOPPY : 0; Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Fri Sep 17 22:51:45 2010 (r212804) +++ head/sys/boot/i386/zfsboot/zfsboot.c Fri Sep 17 22:59:15 2010 (r212805) @@ -94,7 +94,7 @@ __FBSDID("$FreeBSD$"); #define V86_CY(x) ((x) & 1) #define V86_ZR(x) ((x) & 0x40) -#define BIOS_NUMDRIVES 0x475 +#define BIOS_NUMDRIVES 0x475 #define DRV_HARD 0x80 #define DRV_MASK 0x7f @@ -667,7 +667,12 @@ main(void) * will find any other available pools and it may fill in missing * vdevs for the boot pool. */ - for (i = 0; i < *(unsigned char *)PTOV(BIOS_NUMDRIVES); i++) { +#ifndef VIRTUALBOX + for (i = 0; i < *(unsigned char *)PTOV(BIOS_NUMDRIVES); i++) +#else + for (i = 0; i < MAXBDDEV; i++) +#endif + { if ((i | DRV_HARD) == *(uint8_t *)PTOV(ARGS)) continue; From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 23:09:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3CCF1065672; Fri, 17 Sep 2010 23:09:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 930158FC17; Fri, 17 Sep 2010 23:09:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HN9V4a044747; Fri, 17 Sep 2010 23:09:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HN9VLC044745; Fri, 17 Sep 2010 23:09:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009172309.o8HN9VLC044745@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 17 Sep 2010 23:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212806 - head/sys/dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 23:09:31 -0000 Author: jkim Date: Fri Sep 17 23:09:31 2010 New Revision: 212806 URL: http://svn.freebsd.org/changeset/base/212806 Log: Rework r210248. Although it fixed most of problems, it did not fix one particular edge case where X-axis resolution is not multiple of font width. Now we just advance enough scan lines, then deduct a partial scan line. It is more intuitive than the previous code. Apply the same wisdom to EGA and VGA planar renderers for consistency. Reported by: David DEMELIER (demelier dot david at gmail dot com) Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Fri Sep 17 22:59:15 2010 (r212805) +++ head/sys/dev/syscons/scvgarndr.c Fri Sep 17 23:09:31 2010 (r212806) @@ -716,8 +716,7 @@ vga_egadraw(scr_stat *scp, int from, int } ++d; if ((i % scp->xsize) == scp->xsize - 1) - d += scp->xoff*2 - + (scp->font_size - 1)*line_width; + d += scp->font_size * line_width - scp->xsize; } outw(GDCIDX, 0x0000); /* set/reset */ outw(GDCIDX, 0x0001); /* set/reset enable */ @@ -769,9 +768,8 @@ vga_vgadraw_direct(scr_stat *scp, int fr d += 8 * pixel_size; if ((i % scp->xsize) == scp->xsize - 1) - d += scp->xoff * scp->font_size * pixel_size + - scp->font_size * line_width - - scp->xpixel * pixel_size; + d += scp->font_size * line_width - + scp->xsize * 8 * pixel_size; } } @@ -827,8 +825,7 @@ vga_vgadraw_planar(scr_stat *scp, int fr } ++d; if ((i % scp->xsize) == scp->xsize - 1) - d += scp->xoff*2 - + (scp->font_size - 1)*line_width; + d += scp->font_size * line_width - scp->xsize; } outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0000); /* set/reset */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 00:44:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97940106566C; Sat, 18 Sep 2010 00:44:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8619D8FC13; Sat, 18 Sep 2010 00:44:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I0itNL046935; Sat, 18 Sep 2010 00:44:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I0it3f046933; Sat, 18 Sep 2010 00:44:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201009180044.o8I0it3f046933@svn.freebsd.org> From: Xin LI Date: Sat, 18 Sep 2010 00:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212807 - stable/8/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 00:44:55 -0000 Author: delphij Date: Sat Sep 18 00:44:55 2010 New Revision: 212807 URL: http://svn.freebsd.org/changeset/base/212807 Log: MFC r211475: Check return value of dup(), it could be -1 when the system is running out of file descriptors for instance. Found with: Coverity Prevent(tm) CID: 6084 Modified: stable/8/usr.bin/gzip/unpack.c Directory Properties: stable/8/usr.bin/gzip/ (props changed) Modified: stable/8/usr.bin/gzip/unpack.c ============================================================================== --- stable/8/usr.bin/gzip/unpack.c Fri Sep 17 23:09:31 2010 (r212806) +++ stable/8/usr.bin/gzip/unpack.c Sat Sep 18 00:44:55 2010 (r212807) @@ -312,7 +312,14 @@ unpack(int in, int out, char *pre, size_ { unpack_descriptor_t unpackd; - unpack_parse_header(dup(in), dup(out), pre, prelen, bytes_in, &unpackd); + in = dup(in); + if (in == -1) + maybe_err("dup"); + out = dup(out); + if (out == -1) + maybe_err("dup"); + + unpack_parse_header(in, out, pre, prelen, bytes_in, &unpackd); unpack_decode(&unpackd, bytes_in); unpack_descriptor_fini(&unpackd); From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 00:46:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DA691065673; Sat, 18 Sep 2010 00:46:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F09BD8FC0A; Sat, 18 Sep 2010 00:46:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I0k5eY047015; Sat, 18 Sep 2010 00:46:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I0k5MC047013; Sat, 18 Sep 2010 00:46:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201009180046.o8I0k5MC047013@svn.freebsd.org> From: Xin LI Date: Sat, 18 Sep 2010 00:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212808 - stable/7/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 00:46:06 -0000 Author: delphij Date: Sat Sep 18 00:46:05 2010 New Revision: 212808 URL: http://svn.freebsd.org/changeset/base/212808 Log: MFC r211475: Check return value of dup(), it could be -1 when the system is running out of file descriptors for instance. Found with: Coverity Prevent(tm) CID: 6084 Modified: stable/7/usr.bin/gzip/unpack.c Directory Properties: stable/7/usr.bin/gzip/ (props changed) Modified: stable/7/usr.bin/gzip/unpack.c ============================================================================== --- stable/7/usr.bin/gzip/unpack.c Sat Sep 18 00:44:55 2010 (r212807) +++ stable/7/usr.bin/gzip/unpack.c Sat Sep 18 00:46:05 2010 (r212808) @@ -312,7 +312,14 @@ unpack(int in, int out, char *pre, size_ { unpack_descriptor_t unpackd; - unpack_parse_header(dup(in), dup(out), pre, prelen, bytes_in, &unpackd); + in = dup(in); + if (in == -1) + maybe_err("dup"); + out = dup(out); + if (out == -1) + maybe_err("dup"); + + unpack_parse_header(in, out, pre, prelen, bytes_in, &unpackd); unpack_decode(&unpackd, bytes_in); unpack_descriptor_fini(&unpackd); From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 00:58:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C1DE106566C; Sat, 18 Sep 2010 00:58:44 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B4B08FC17; Sat, 18 Sep 2010 00:58:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I0wiXh047327; Sat, 18 Sep 2010 00:58:44 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I0wiNE047325; Sat, 18 Sep 2010 00:58:44 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201009180058.o8I0wiNE047325@svn.freebsd.org> From: Juli Mallett Date: Sat, 18 Sep 2010 00:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212809 - head/sys/mips/cavium/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 00:58:44 -0000 Author: jmallett Date: Sat Sep 18 00:58:44 2010 New Revision: 212809 URL: http://svn.freebsd.org/changeset/base/212809 Log: Fix octusb build. Modified: head/sys/mips/cavium/usb/octusb.c Modified: head/sys/mips/cavium/usb/octusb.c ============================================================================== --- head/sys/mips/cavium/usb/octusb.c Sat Sep 18 00:46:05 2010 (r212808) +++ head/sys/mips/cavium/usb/octusb.c Sat Sep 18 00:58:44 2010 (r212809) @@ -1885,7 +1885,7 @@ octusb_xfer_unsetup(struct usb_xfer *xfe } static void -octusb_get_dma_delay(struct usb_bus *bus, uint32_t *pus) +octusb_get_dma_delay(struct usb_device *udev, uint32_t *pus) { /* DMA delay - wait until any use of memory is finished */ *pus = (2125); /* microseconds */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 07:16:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BF02106566B; Sat, 18 Sep 2010 07:16:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A1F18FC08; Sat, 18 Sep 2010 07:16:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I7GcAY055493; Sat, 18 Sep 2010 07:16:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I7GcgW055490; Sat, 18 Sep 2010 07:16:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009180716.o8I7GcgW055490@svn.freebsd.org> From: Andriy Gapon Date: Sat, 18 Sep 2010 07:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212810 - stable/8/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 07:16:38 -0000 Author: avg Date: Sat Sep 18 07:16:38 2010 New Revision: 212810 URL: http://svn.freebsd.org/changeset/base/212810 Log: MFC r212251,212457: make acpi_hp device a child of acpi_wmi PR: kern/147858 Modified: stable/8/sys/dev/acpi_support/acpi_hp.c stable/8/sys/dev/acpi_support/acpi_wmi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpi_support/acpi_hp.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_hp.c Sat Sep 18 00:58:44 2010 (r212809) +++ stable/8/sys/dev/acpi_support/acpi_hp.c Sat Sep 18 07:16:38 2010 (r212810) @@ -116,7 +116,6 @@ struct acpi_hp_inst_seq_pair { struct acpi_hp_softc { device_t dev; - ACPI_HANDLE handle; device_t wmi_dev; int has_notify; /* notification GUID found */ int has_cmi; /* CMI GUID found */ @@ -289,6 +288,7 @@ static struct { ACPI_SERIAL_DECL(hp, "HP ACPI-WMI Mapping"); +static void acpi_hp_identify(driver_t *driver, device_t parent); static int acpi_hp_probe(device_t dev); static int acpi_hp_attach(device_t dev); static int acpi_hp_detach(device_t dev); @@ -320,6 +320,7 @@ static struct cdevsw hpcmi_cdevsw = { }; static device_method_t acpi_hp_methods[] = { + DEVMETHOD(device_identify, acpi_hp_identify), DEVMETHOD(device_probe, acpi_hp_probe), DEVMETHOD(device_attach, acpi_hp_attach), DEVMETHOD(device_detach, acpi_hp_detach), @@ -334,7 +335,7 @@ static driver_t acpi_hp_driver = { static devclass_t acpi_hp_devclass; -DRIVER_MODULE(acpi_hp, acpi, acpi_hp_driver, acpi_hp_devclass, +DRIVER_MODULE(acpi_hp, acpi_wmi, acpi_hp_driver, acpi_hp_devclass, 0, 0); MODULE_DEPEND(acpi_hp, acpi_wmi, 1, 1, 1); MODULE_DEPEND(acpi_hp, acpi, 1, 1, 1); @@ -405,7 +406,7 @@ acpi_hp_evaluate_auto_on_off(struct acpi "WLAN on air changed to %i " "(new_wlan_status is %i)\n", sc->was_wlan_on_air, new_wlan_status); - acpi_UserNotify("HP", sc->handle, + acpi_UserNotify("HP", ACPI_ROOT_OBJECT, 0xc0+sc->was_wlan_on_air); } } @@ -420,7 +421,7 @@ acpi_hp_evaluate_auto_on_off(struct acpi " to %i (new_bluetooth_status is %i)\n", sc->was_bluetooth_on_air, new_bluetooth_status); - acpi_UserNotify("HP", sc->handle, + acpi_UserNotify("HP", ACPI_ROOT_OBJECT, 0xd0+sc->was_bluetooth_on_air); } } @@ -433,19 +434,33 @@ acpi_hp_evaluate_auto_on_off(struct acpi "WWAN on air changed to %i" " (new_wwan_status is %i)\n", sc->was_wwan_on_air, new_wwan_status); - acpi_UserNotify("HP", sc->handle, + acpi_UserNotify("HP", ACPI_ROOT_OBJECT, 0xe0+sc->was_wwan_on_air); } } } +static void +acpi_hp_identify(driver_t *driver, device_t parent) +{ + + /* Don't do anything if driver is disabled. */ + if (acpi_disabled("hp")) + return; + + /* Add only a single device instance. */ + if (device_find_child(parent, "acpi_hp", -1) != NULL) + return; + + if (BUS_ADD_CHILD(parent, 0, "acpi_hp", -1) == NULL) + device_printf(parent, "add acpi_hp child failed\n"); +} + static int acpi_hp_probe(device_t dev) { - if (acpi_disabled("hp") || device_get_unit(dev) != 0) - return (ENXIO); - device_set_desc(dev, "HP ACPI-WMI Mapping"); + device_set_desc(dev, "HP ACPI-WMI Mapping"); return (0); } @@ -453,14 +468,12 @@ static int acpi_hp_attach(device_t dev) { struct acpi_hp_softc *sc; - devclass_t wmi_devclass; int arg; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); sc = device_get_softc(dev); sc->dev = dev; - sc->handle = acpi_get_handle(dev); sc->has_notify = 0; sc->has_cmi = 0; sc->bluetooth_enable_if_radio_on = 0; @@ -477,14 +490,7 @@ acpi_hp_attach(device_t dev) sc->verbose = 0; memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); - if (!(wmi_devclass = devclass_find ("acpi_wmi"))) { - device_printf(dev, "Couldn't find acpi_wmi devclass\n"); - return (EINVAL); - } - if (!(sc->wmi_dev = devclass_get_device(wmi_devclass, 0))) { - device_printf(dev, "Couldn't find acpi_wmi device\n"); - return (EINVAL); - } + sc->wmi_dev = device_get_parent(dev); if (!ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_BIOS_GUID)) { device_printf(dev, Modified: stable/8/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_wmi.c Sat Sep 18 00:58:44 2010 (r212809) +++ stable/8/sys/dev/acpi_support/acpi_wmi.c Sat Sep 18 07:16:38 2010 (r212810) @@ -173,6 +173,10 @@ static device_method_t acpi_wmi_methods[ DEVMETHOD(device_attach, acpi_wmi_attach), DEVMETHOD(device_detach, acpi_wmi_detach), + /* bus interface */ + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_print_child, bus_generic_print_child), + /* acpi_wmi interface */ DEVMETHOD(acpi_wmi_provides_guid_string, acpi_wmi_provides_guid_string_method), @@ -269,6 +273,11 @@ acpi_wmi_attach(device_t dev) } ACPI_SERIAL_END(acpi_wmi); + if (ret == 0) { + bus_generic_probe(dev); + ret = bus_generic_attach(dev); + } + return (ret); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 07:18:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 055231065672; Sat, 18 Sep 2010 07:18:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E91F88FC08; Sat, 18 Sep 2010 07:18:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I7IUSZ055574; Sat, 18 Sep 2010 07:18:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I7IUlt055572; Sat, 18 Sep 2010 07:18:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009180718.o8I7IUlt055572@svn.freebsd.org> From: Alexander Motin Date: Sat, 18 Sep 2010 07:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212811 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 07:18:31 -0000 Author: mav Date: Sat Sep 18 07:18:30 2010 New Revision: 212811 URL: http://svn.freebsd.org/changeset/base/212811 Log: When global timer used at SMP system, update nextevent field on BSP before sending IPI to other CPUs. Otherwise, other CPUs will try to honor stale value, programming timer for zero interval. If timer is fast enough, it caused extra interrupt before timer correctly reprogrammed by BSP. Modified: head/sys/kern/kern_clocksource.c Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Sat Sep 18 07:16:38 2010 (r212810) +++ head/sys/kern/kern_clocksource.c Sat Sep 18 07:18:30 2010 (r212811) @@ -335,15 +335,15 @@ timercb(struct eventtimer *et, void *arg bcast = 0; if ((et->et_flags & ET_FLAGS_PERCPU) == 0 && smp_started) { CPU_FOREACH(cpu) { - if (curcpu == cpu) - continue; state = DPCPU_ID_PTR(cpu, timerstate); ET_HW_LOCK(state); state->now = now; if (bintime_cmp(&now, &state->nextevent, >=)) { state->nextevent.sec++; - state->ipi = 1; - bcast = 1; + if (curcpu != cpu) { + state->ipi = 1; + bcast = 1; + } } ET_HW_UNLOCK(state); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 07:36:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB9061065673; Sat, 18 Sep 2010 07:36:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0AFD8FC18; Sat, 18 Sep 2010 07:36:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I7ahMN056057; Sat, 18 Sep 2010 07:36:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I7ahMB056054; Sat, 18 Sep 2010 07:36:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009180736.o8I7ahMB056054@svn.freebsd.org> From: Alexander Motin Date: Sat, 18 Sep 2010 07:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212812 - head/sys/x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 07:36:43 -0000 Author: mav Date: Sat Sep 18 07:36:43 2010 New Revision: 212812 URL: http://svn.freebsd.org/changeset/base/212812 Log: Restore pre-r212778 optimization, skipping timer reprogramming when it is not neccessary. It allows to avoid time counter jump of up to 1/18s, when base frequency slightly tuned via machdep.i8254_freq sysctl. Fix few style things. Suggested by: bde Modified: head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Sat Sep 18 07:18:30 2010 (r212811) +++ head/sys/x86/isa/clock.c Sat Sep 18 07:36:43 2010 (r212812) @@ -124,6 +124,8 @@ struct attimer_softc { }; static struct attimer_softc *attimer_sc = NULL; +static int timer0_period = -2; + /* Values for timerX_state: */ #define RELEASED 0 #define RELEASE_PENDING 1 @@ -367,36 +369,41 @@ DELAY(int n) static void set_i8254_freq(int mode, uint32_t period) { - int val; + int new_count; mtx_lock_spin(&clock_lock); - if (period == 0) - val = 0x10000; - else - val = min(((uint64_t)i8254_freq * period) >> 32, 0x10000); - if (val == 0x10000) - i8254_max_count = 0xffff; - else - i8254_max_count = val; - if (mode == MODE_STOP && i8254_timecounter) - mode = MODE_PERIODIC; + if (mode == MODE_STOP) { + if (i8254_timecounter) { + mode = MODE_PERIODIC; + new_count = 0x10000; + } else + new_count = -1; + } else { + new_count = min(((uint64_t)i8254_freq * period + + 0x80000000LLU) >> 32, 0x10000); + } + if (new_count == timer0_period) + goto out; + i8254_max_count = ((new_count & ~0xffff) != 0) ? 0xffff : new_count; + timer0_period = (mode == MODE_PERIODIC) ? new_count : -1; switch (mode) { case MODE_STOP: outb(TIMER_MODE, TIMER_SEL0 | TIMER_INTTC | TIMER_16BIT); - outb(TIMER_CNTR0, 0xff); - outb(TIMER_CNTR0, 0xff); + outb(TIMER_CNTR0, 0); + outb(TIMER_CNTR0, 0); break; case MODE_PERIODIC: outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); - outb(TIMER_CNTR0, val & 0xff); - outb(TIMER_CNTR0, val >> 8); + outb(TIMER_CNTR0, new_count & 0xff); + outb(TIMER_CNTR0, new_count >> 8); break; case MODE_ONESHOT: outb(TIMER_MODE, TIMER_SEL0 | TIMER_INTTC | TIMER_16BIT); - outb(TIMER_CNTR0, val & 0xff); - outb(TIMER_CNTR0, val >> 8); + outb(TIMER_CNTR0, new_count & 0xff); + outb(TIMER_CNTR0, new_count >> 8); break; } +out: mtx_unlock_spin(&clock_lock); } @@ -404,7 +411,8 @@ static void i8254_restore(void) { - if (attimer_sc) + timer0_period = -2; + if (attimer_sc != NULL) set_i8254_freq(attimer_sc->mode, attimer_sc->period); else set_i8254_freq(0, 0); @@ -473,7 +481,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER error = sysctl_handle_int(oidp, &freq, 0, req); if (error == 0 && req->newptr != NULL) { i8254_freq = freq; - if (attimer_sc) { + if (attimer_sc != NULL) { set_i8254_freq(attimer_sc->mode, attimer_sc->period); attimer_sc->tc.tc_frequency = freq; } else { From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 07:45:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7D28106566C; Sat, 18 Sep 2010 07:45:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D77798FC0A; Sat, 18 Sep 2010 07:45:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I7jsiI056328; Sat, 18 Sep 2010 07:45:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I7js3J056326; Sat, 18 Sep 2010 07:45:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009180745.o8I7js3J056326@svn.freebsd.org> From: Alexander Motin Date: Sat, 18 Sep 2010 07:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212813 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 07:45:55 -0000 Author: mav Date: Sat Sep 18 07:45:54 2010 New Revision: 212813 URL: http://svn.freebsd.org/changeset/base/212813 Log: Document hw.i8254.freq tunable and machdep.i8254_freq sysctl. Modified: head/share/man/man4/attimer.4 Modified: head/share/man/man4/attimer.4 ============================================================================== --- head/share/man/man4/attimer.4 Sat Sep 18 07:36:43 2010 (r212812) +++ head/share/man/man4/attimer.4 Sat Sep 18 07:45:54 2010 (r212813) @@ -42,6 +42,11 @@ Default value is 1. .It Va hint.attimer. Ns Ar X Ns Va .timecounter controls time counter functionality support. Setting to 0, disables it. Default value is 1. +.It Va hw.i8254.freq +allows to override default counter frequency. +The same value is also available in run-time via +.Va machdep.i8254_freq +sysctl. .El .Sh DESCRIPTION This driver uses i8254 Programmable Interval Timer (AT Timer) hardware From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 08:18:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26B1D1065672; Sat, 18 Sep 2010 08:18:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 154218FC0C; Sat, 18 Sep 2010 08:18:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I8IrEW057231; Sat, 18 Sep 2010 08:18:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I8IrS7057228; Sat, 18 Sep 2010 08:18:53 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009180818.o8I8IrS7057228@svn.freebsd.org> From: Marius Strobl Date: Sat, 18 Sep 2010 08:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212814 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:18:54 -0000 Author: marius Date: Sat Sep 18 08:18:53 2010 New Revision: 212814 URL: http://svn.freebsd.org/changeset/base/212814 Log: MFC: r212619 Remove redundant raising of the PIL to PIL_TICK as the respective locore code already did that. Modified: stable/8/sys/sparc64/sparc64/machdep.c stable/8/sys/sparc64/sparc64/mp_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Sat Sep 18 07:45:54 2010 (r212813) +++ stable/8/sys/sparc64/sparc64/machdep.c Sat Sep 18 08:18:53 2010 (r212814) @@ -586,7 +586,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enable them. */ intr_init2(); - wrpr(pil, 0, PIL_TICK); wrpr(pstate, 0, PSTATE_KERNEL); /* Modified: stable/8/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_machdep.c Sat Sep 18 07:45:54 2010 (r212813) +++ stable/8/sys/sparc64/sparc64/mp_machdep.c Sat Sep 18 08:18:53 2010 (r212814) @@ -444,7 +444,6 @@ cpu_mp_bootstrap(struct pcpu *pc) cpu_setregs(pc); /* Enable interrupts. */ - wrpr(pil, 0, PIL_TICK); wrpr(pstate, 0, PSTATE_KERNEL); /* Start the (S)TICK interrupts. */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 08:18:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2DA51065774; Sat, 18 Sep 2010 08:18:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B934B8FC13; Sat, 18 Sep 2010 08:18:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I8IuCk057263; Sat, 18 Sep 2010 08:18:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I8Iu5F057260; Sat, 18 Sep 2010 08:18:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009180818.o8I8Iu5F057260@svn.freebsd.org> From: Marius Strobl Date: Sat, 18 Sep 2010 08:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212815 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:18:57 -0000 Author: marius Date: Sat Sep 18 08:18:56 2010 New Revision: 212815 URL: http://svn.freebsd.org/changeset/base/212815 Log: MFC: r212619 Remove redundant raising of the PIL to PIL_TICK as the respective locore code already did that. Modified: stable/7/sys/sparc64/sparc64/machdep.c stable/7/sys/sparc64/sparc64/mp_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/machdep.c Sat Sep 18 08:18:53 2010 (r212814) +++ stable/7/sys/sparc64/sparc64/machdep.c Sat Sep 18 08:18:56 2010 (r212815) @@ -576,7 +576,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enable them. */ intr_init2(); - wrpr(pil, 0, PIL_TICK); wrpr(pstate, 0, PSTATE_KERNEL); /* Modified: stable/7/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_machdep.c Sat Sep 18 08:18:53 2010 (r212814) +++ stable/7/sys/sparc64/sparc64/mp_machdep.c Sat Sep 18 08:18:56 2010 (r212815) @@ -436,7 +436,6 @@ cpu_mp_bootstrap(struct pcpu *pc) cpu_setregs(pc); /* Enable interrupts. */ - wrpr(pil, 0, PIL_TICK); wrpr(pstate, 0, PSTATE_KERNEL); /* Start the (S)TICK interrupts. */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 08:20:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 970F210656FB; Sat, 18 Sep 2010 08:20:36 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6ABC18FC12; Sat, 18 Sep 2010 08:20:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I8Kaar057372; Sat, 18 Sep 2010 08:20:36 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I8KaS1057369; Sat, 18 Sep 2010 08:20:36 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009180820.o8I8KaS1057369@svn.freebsd.org> From: Marius Strobl Date: Sat, 18 Sep 2010 08:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212816 - in stable/8/sys: sparc64/sparc64 sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:20:36 -0000 Author: marius Date: Sat Sep 18 08:20:36 2010 New Revision: 212816 URL: http://svn.freebsd.org/changeset/base/212816 Log: MFC: r212620 Remove a KASSERT which will also trigger for perfectly valid combinations of small maxsize and "large" (including BUS_SPACE_UNRESTRICTED) nsegments parameters. Generally using a presz of 0 (which indeed might indicate the use of bogus parameters for DMA tag creation) is not fatal, it just means that no additional DVMA space will be preallocated. Modified: stable/8/sys/sparc64/sparc64/iommu.c stable/8/sys/sun4v/sun4v/hviommu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/iommu.c ============================================================================== --- stable/8/sys/sparc64/sparc64/iommu.c Sat Sep 18 08:18:56 2010 (r212815) +++ stable/8/sys/sparc64/sparc64/iommu.c Sat Sep 18 08:20:36 2010 (r212816) @@ -874,9 +874,6 @@ iommu_dvmamap_create(bus_dma_tag_t dt, i */ maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG); presz = dt->dt_maxsize / maxpre; - KASSERT(presz != 0, ("%s: bogus preallocation size , nsegments = %d, " - "maxpre = %d, maxsize = %lu", __func__, dt->dt_nsegments, maxpre, - dt->dt_maxsize)); for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) { currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz)); error = iommu_dvma_valloc(dt, is, *mapp, currsz); Modified: stable/8/sys/sun4v/sun4v/hviommu.c ============================================================================== --- stable/8/sys/sun4v/sun4v/hviommu.c Sat Sep 18 08:18:56 2010 (r212815) +++ stable/8/sys/sun4v/sun4v/hviommu.c Sat Sep 18 08:20:36 2010 (r212816) @@ -513,9 +513,6 @@ hviommu_dvmamap_create(bus_dma_tag_t dt, */ maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG); presz = dt->dt_maxsize / maxpre; - KASSERT(presz != 0, ("hviommu_dvmamap_create: bogus preallocation size " - ", nsegments = %d, maxpre = %d, maxsize = %lu", dt->dt_nsegments, - maxpre, dt->dt_maxsize)); for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) { currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz)); error = hviommu_dvma_valloc(dt, him, *mapp, currsz); From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 08:20:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF6010656C0; Sat, 18 Sep 2010 08:20:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE4A88FC18; Sat, 18 Sep 2010 08:20:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I8Kd4M057409; Sat, 18 Sep 2010 08:20:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I8KdfV057406; Sat, 18 Sep 2010 08:20:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009180820.o8I8KdfV057406@svn.freebsd.org> From: Marius Strobl Date: Sat, 18 Sep 2010 08:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212817 - in stable/7/sys: sparc64/sparc64 sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:20:41 -0000 Author: marius Date: Sat Sep 18 08:20:39 2010 New Revision: 212817 URL: http://svn.freebsd.org/changeset/base/212817 Log: MFC: r212620 Remove a KASSERT which will also trigger for perfectly valid combinations of small maxsize and "large" (including BUS_SPACE_UNRESTRICTED) nsegments parameters. Generally using a presz of 0 (which indeed might indicate the use of bogus parameters for DMA tag creation) is not fatal, it just means that no additional DVMA space will be preallocated. Modified: stable/7/sys/sparc64/sparc64/iommu.c stable/7/sys/sun4v/sun4v/hviommu.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/iommu.c ============================================================================== --- stable/7/sys/sparc64/sparc64/iommu.c Sat Sep 18 08:20:36 2010 (r212816) +++ stable/7/sys/sparc64/sparc64/iommu.c Sat Sep 18 08:20:39 2010 (r212817) @@ -874,9 +874,6 @@ iommu_dvmamap_create(bus_dma_tag_t dt, i */ maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG); presz = dt->dt_maxsize / maxpre; - KASSERT(presz != 0, ("%s: bogus preallocation size , nsegments = %d, " - "maxpre = %d, maxsize = %lu", __func__, dt->dt_nsegments, maxpre, - dt->dt_maxsize)); for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) { currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz)); error = iommu_dvma_valloc(dt, is, *mapp, currsz); Modified: stable/7/sys/sun4v/sun4v/hviommu.c ============================================================================== --- stable/7/sys/sun4v/sun4v/hviommu.c Sat Sep 18 08:20:36 2010 (r212816) +++ stable/7/sys/sun4v/sun4v/hviommu.c Sat Sep 18 08:20:39 2010 (r212817) @@ -513,9 +513,6 @@ hviommu_dvmamap_create(bus_dma_tag_t dt, */ maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG); presz = dt->dt_maxsize / maxpre; - KASSERT(presz != 0, ("hviommu_dvmamap_create: bogus preallocation size " - ", nsegments = %d, maxpre = %d, maxsize = %lu", dt->dt_nsegments, - maxpre, dt->dt_maxsize)); for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) { currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz)); error = hviommu_dvma_valloc(dt, him, *mapp, currsz); From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 08:23:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89A4B106566B; Sat, 18 Sep 2010 08:23:45 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77FCC8FC0A; Sat, 18 Sep 2010 08:23:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I8Njre057549; Sat, 18 Sep 2010 08:23:45 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I8NjAx057546; Sat, 18 Sep 2010 08:23:45 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201009180823.o8I8NjAx057546@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 18 Sep 2010 08:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212818 - in stable/8/sys/dev: malo mwl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:23:45 -0000 Author: bschmidt Date: Sat Sep 18 08:23:45 2010 New Revision: 212818 URL: http://svn.freebsd.org/changeset/base/212818 Log: MFC r212410: Fix firmware module dependencies. malo and mwl use the firmware framework to access firmware images. Depending on the firmware modules itself is not required and in this case even wrong because no modules with those names exist. Pointed out by: brucec Modified: stable/8/sys/dev/malo/if_malo_pci.c stable/8/sys/dev/mwl/if_mwl_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/malo/if_malo_pci.c ============================================================================== --- stable/8/sys/dev/malo/if_malo_pci.c Sat Sep 18 08:20:39 2010 (r212817) +++ stable/8/sys/dev/malo/if_malo_pci.c Sat Sep 18 08:23:45 2010 (r212818) @@ -371,4 +371,4 @@ static devclass_t malo_devclass; DRIVER_MODULE(malo, pci, malo_pci_driver, malo_devclass, 0, 0); MODULE_VERSION(malo, 1); MODULE_DEPEND(malo, wlan, 1, 1, 1); /* 802.11 media layer */ -MODULE_DEPEND(malo, malofw_fw, 1, 1, 1); +MODULE_DEPEND(malo, firmware, 1, 1, 1); Modified: stable/8/sys/dev/mwl/if_mwl_pci.c ============================================================================== --- stable/8/sys/dev/mwl/if_mwl_pci.c Sat Sep 18 08:20:39 2010 (r212817) +++ stable/8/sys/dev/mwl/if_mwl_pci.c Sat Sep 18 08:23:45 2010 (r212818) @@ -313,4 +313,4 @@ static devclass_t mwl_devclass; DRIVER_MODULE(mwl, pci, mwl_pci_driver, mwl_devclass, 0, 0); MODULE_VERSION(mwl, 1); MODULE_DEPEND(mwl, wlan, 1, 1, 1); /* 802.11 media layer */ -MODULE_DEPEND(mwl, mwlfw_fw, 1, 1, 1); /* firmware */ +MODULE_DEPEND(mwl, firmware, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 08:25:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E085106566B; Sat, 18 Sep 2010 08:25:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0458FC19; Sat, 18 Sep 2010 08:25:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I8PChP057638; Sat, 18 Sep 2010 08:25:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I8PCdL057636; Sat, 18 Sep 2010 08:25:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009180825.o8I8PCdL057636@svn.freebsd.org> From: Marius Strobl Date: Sat, 18 Sep 2010 08:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212819 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:25:12 -0000 Author: marius Date: Sat Sep 18 08:25:12 2010 New Revision: 212819 URL: http://svn.freebsd.org/changeset/base/212819 Log: MFC: r212621 Use saner nsegments and maxsegsz parameters when creating certain DMA tags; tags for 1-byte allocations cannot possibly be split across 2 segments and maxsegsz must not exceed maxsize. Reviewed by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/usb_busdma.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/8/sys/dev/usb/usb_busdma.c Sat Sep 18 08:23:45 2010 (r212818) +++ stable/8/sys/dev/usb/usb_busdma.c Sat Sep 18 08:25:12 2010 (r212819) @@ -366,9 +366,9 @@ usb_dma_tag_create(struct usb_dma_tag *u /* filter */ NULL, /* filterarg */ NULL, /* maxsize */ size, - /* nsegments */ (align == 1) ? + /* nsegments */ (align == 1 && size > 1) ? (2 + (size / USB_PAGE_SIZE)) : 1, - /* maxsegsz */ (align == 1) ? + /* maxsegsz */ (align == 1 && size > USB_PAGE_SIZE) ? USB_PAGE_SIZE : size, /* flags */ BUS_DMA_KEEP_PG_OFFSET, /* lockfn */ &usb_dma_lock_cb, From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 08:45:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4403A106566C; Sat, 18 Sep 2010 08:45:44 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 305638FC15; Sat, 18 Sep 2010 08:45:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8I8jiEE058179; Sat, 18 Sep 2010 08:45:44 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8I8jiqQ058173; Sat, 18 Sep 2010 08:45:44 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201009180845.o8I8jiqQ058173@svn.freebsd.org> From: Martin Matuska Date: Sat, 18 Sep 2010 08:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212820 - in stable/8/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:45:44 -0000 Author: mm Date: Sat Sep 18 08:45:43 2010 New Revision: 212820 URL: http://svn.freebsd.org/changeset/base/212820 Log: MFC r212694: Fix kernel panic when moving a file to .zfs/shares Fix possible loss of correct error return code in ZFS mount OpenSolaris revisions and Bug IDs: 11824:53128e5db7cf 6863610 ZFS mount can lose correct error return 12079:13822b941977 6939941 problem with moving files in zfs (142901-12) Approved by: delphij (mentor) Obtained from: OpenSolaris (Bug ID 6863610, 6939941) Modified: stable/8/sys/cddl/compat/opensolaris/sys/vnode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/sys/vnode.h Sat Sep 18 08:25:12 2010 (r212819) +++ stable/8/sys/cddl/compat/opensolaris/sys/vnode.h Sat Sep 18 08:45:43 2010 (r212820) @@ -74,6 +74,7 @@ vn_is_readonly(vnode_t *vp) #define vn_invalid(vp) do { } while (0) #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0) #define vn_free(vp) do { } while (0) +#define vn_matchops(vp, vops) ((vp)->v_op == &(vops)) #define VN_HOLD(v) vref(v) #define VN_RELE(v) vrele(v) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Sat Sep 18 08:25:12 2010 (r212819) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Sat Sep 18 08:45:43 2010 (r212820) @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _ZFS_CTLDIR_H @@ -48,6 +47,7 @@ void zfsctl_destroy(zfsvfs_t *); vnode_t *zfsctl_root(znode_t *); void zfsctl_init(void); void zfsctl_fini(void); +boolean_t zfsctl_is_node(vnode_t *); int zfsctl_rename_snapshot(const char *from, const char *to); int zfsctl_destroy_snapshot(const char *snapname, int force); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Sep 18 08:25:12 2010 (r212819) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Sep 18 08:45:43 2010 (r212820) @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -152,6 +151,17 @@ zfsctl_fini(void) { } +boolean_t +zfsctl_is_node(vnode_t *vp) +{ + return (vn_matchops(vp, zfsctl_ops_root) || + vn_matchops(vp, zfsctl_ops_snapdir) || + vn_matchops(vp, zfsctl_ops_snapshot) || + vn_matchops(vp, zfsctl_ops_shares) || + vn_matchops(vp, zfsctl_ops_shares_dir)); + +} + /* * Return the inode number associated with the 'snapshot' or * 'shares' directory. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Sep 18 08:25:12 2010 (r212819) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Sep 18 08:45:43 2010 (r212820) @@ -1152,8 +1152,7 @@ zfs_mount(vfs_t *vfsp) */ error = secpolicy_fs_mount(cr, mvp, vfsp); if (error) { - error = dsl_deleg_access(osname, ZFS_DELEG_PERM_MOUNT, cr); - if (error != 0) + if (dsl_deleg_access(osname, ZFS_DELEG_PERM_MOUNT, cr) != 0) goto out; if (!(vfsp->vfs_flag & MS_REMOUNT)) { @@ -1167,7 +1166,7 @@ zfs_mount(vfs_t *vfsp) vattr.va_mask = AT_UID; vn_lock(mvp, LK_SHARED | LK_RETRY); - if (error = VOP_GETATTR(mvp, &vattr, cr)) { + if (VOP_GETATTR(mvp, &vattr, cr)) { VOP_UNLOCK(mvp, 0); goto out; } @@ -1422,9 +1421,8 @@ zfs_umount(vfs_t *vfsp, int fflag) ret = secpolicy_fs_unmount(cr, vfsp); if (ret) { - ret = dsl_deleg_access((char *)refstr_value(vfsp->vfs_resource), - ZFS_DELEG_PERM_MOUNT, cr); - if (ret) + if (dsl_deleg_access((char *)refstr_value(vfsp->vfs_resource), + ZFS_DELEG_PERM_MOUNT, cr)) return (ret); } /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Sep 18 08:25:12 2010 (r212819) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Sep 18 08:45:43 2010 (r212820) @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Portions Copyright 2007 Jeremy Teo */ @@ -3344,7 +3343,7 @@ zfs_rename(vnode_t *sdvp, char *snm, vno if (VOP_REALVP(tdvp, &realvp, ct) == 0) tdvp = realvp; - if (tdvp->v_vfsp != sdvp->v_vfsp) { + if (tdvp->v_vfsp != sdvp->v_vfsp || zfsctl_is_node(tdvp)) { ZFS_EXIT(zfsvfs); return (EXDEV); } @@ -3862,6 +3861,7 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch vnode_t *realvp; int error; int zf = ZNEW; + uint64_t parent; uid_t owner; ASSERT(tdvp->v_type == VDIR); @@ -3873,13 +3873,30 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch if (VOP_REALVP(svp, &realvp, ct) == 0) svp = realvp; - if (svp->v_vfsp != tdvp->v_vfsp) { + /* + * POSIX dictates that we return EPERM here. + * Better choices include ENOTSUP or EISDIR. + */ + if (svp->v_type == VDIR) { + ZFS_EXIT(zfsvfs); + return (EPERM); + } + + if (svp->v_vfsp != tdvp->v_vfsp || zfsctl_is_node(svp)) { ZFS_EXIT(zfsvfs); return (EXDEV); } + szp = VTOZ(svp); ZFS_VERIFY_ZP(szp); + /* Prevent links to .zfs/shares files */ + + if (szp->z_phys->zp_parent == zfsvfs->z_shares_dir) { + ZFS_EXIT(zfsvfs); + return (EPERM); + } + if (zfsvfs->z_utf8 && u8_validate(name, strlen(name), NULL, U8_VALIDATE_ENTIRE, &error) < 0) { ZFS_EXIT(zfsvfs); @@ -3888,7 +3905,6 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch if (flags & FIGNORECASE) zf |= ZCILOOK; -top: /* * We do not support links between attributes and non-attributes * because of the potential security risk of creating links @@ -3901,14 +3917,6 @@ top: return (EINVAL); } - /* - * POSIX dictates that we return EPERM here. - * Better choices include ENOTSUP or EISDIR. - */ - if (svp->v_type == VDIR) { - ZFS_EXIT(zfsvfs); - return (EPERM); - } owner = zfs_fuid_map_id(zfsvfs, szp->z_phys->zp_uid, cr, ZFS_OWNER); if (owner != crgetuid(cr) && @@ -3922,6 +3930,7 @@ top: return (error); } +top: /* * Attempt to lock directory; fail if entry already exists. */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 11:01:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD3D31065675; Sat, 18 Sep 2010 11:01:17 +0000 (UTC) (envelope-from Daan@vehosting.nl) Received: from VM01.VEHosting.nl (vm01.vehosting.nl [85.17.51.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1208FC20; Sat, 18 Sep 2010 11:01:17 +0000 (UTC) Received: from [192.168.45.11] (180-161.ftth.onsbrabantnet.nl [88.159.161.180]) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id o8IAYKtN061136; Sat, 18 Sep 2010 12:34:20 +0200 (CEST) (envelope-from Daan@vehosting.nl) From: Daan Vreeken Organization: VEHosting.nl To: Alexander Motin Date: Sat, 18 Sep 2010 12:34:17 +0200 User-Agent: KMail/1.9.10 References: <201009130725.o8D7PZX8073399@svn.freebsd.org> In-Reply-To: <201009130725.o8D7PZX8073399@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201009181234.17851.Daan@vehosting.nl> x-ve-auth-version: mi-1.0.3 2008-05-30 - Copyright (c) 2008 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212541 - in head/sys: amd64/amd64 amd64/include dev/acpica i386/i386 i386/include kern mips/include mips/mips pc98/pc98 powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc6... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 11:01:17 -0000 Hi Alexander, On Monday 13 September 2010 09:25:35 Alexander Motin wrote: > Author: mav > Date: Mon Sep 13 07:25:35 2010 > New Revision: 212541 > URL: http://svn.freebsd.org/changeset/base/212541 > > Log: > Refactor timer management code with priority to one-shot operation mode. > The main goal of this is to generate timer interrupts only when there is > some work to do. When CPU is busy interrupts are generating at full rate > of hz + stathz to fullfill scheduler and timekeeping requirements. But > when CPU is idle, only minimum set of interrupts (down to 8 interrupts > per second per CPU now), needed to handle scheduled callouts is executed. > This allows significantly increase idle CPU sleep time, increasing effect > of static power-saving technologies. Also it should reduce host CPU load on > virtualized systems, when guest system is idle. [snip] When re-basing an ARM system running an older -current with local patches/additions to a more recent version of -current (around 2010-09-16-ish) I found out that the resulting kernel stopped booting. To factor out our local changes I've tried to boot a 'SHEEVAPLUG' kernel without modifications. This kernel also fails to boot. It just stops right after : ... ehci0: mem 0xf1050000-0xf1050fff irq 48,19 on simplebus0 ehci0: [FILTER] ehci0: [ITHREAD] usbus0: EHCI version 1.0 usbus0: set host controller mode usbus0: on ehci0 Timecounters tick every 1.000 msec usbus0: 480Mbps High Speed USB v2.0 Doing a binary search I've found that a kernel built from sources directly before your commit boots normally, but with this commit the board hangs during boot. The debugger is accessible when the system 'hangs'. 'ps' shows: KDB: enter: Line break on console [ thread pid 10 tid 100002 ] Stopped at kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! db> ps pid ppid pgrp uid state wmesg wchan cmd 5 0 0 0 DL ccb_scan 0xc0bc49ec [xpt_thrd] 13 0 0 0 DL (threaded) [usb] 100023 D - 0xc3500d0c [usbus0] 100022 D USBWAIT 0xc0bca57c [usbus0] 100021 D - 0xc3500cac [usbus0] 100020 D - 0xc3500c7c [usbus0] 12 0 0 0 DL - 0xc0bca57c [yarrow] 4 0 0 0 DL - 0xc0bc7d38 [g_down] 3 0 0 0 DL - 0xc0bc7d34 [g_up] 2 0 0 0 DL - 0xc0bc7d2c [g_event] 11 0 0 0 WL (threaded) [intr] 100019 I [intr19: ehci0] 100018 I [swi0: uart uart] 100017 I [intr13: mge0] 100016 I [intr12: mge0] 100015 I [swi6: Giant taskq] 100013 I [swi5: +] 100011 I [swi2: cambio] 100010 I [swi6: task queue] 100005 I [swi3: vm] 100004 I [swi1: netisr 0] 100003 I [swi4: clock] 10 0 0 0 RL CPU 0 [idle] 1 0 0 0 ?L [kernel] 0 0 0 0 DLs (threaded) [kernel] 100014 D - 0xc343be80 [thread taskq] 100012 D - 0xc343d080 [kqueue taskq] 100000 D conifhk 0xc0bb3d5c [swapper] After fiddling around a bit with the debugger, I found out that calling cpu_idleclock() followed by cpu_activeclock() manually from the debugger will 'un-freeze' the system and get it to continue booting. For a full dmesg and the logs of the debugging session see : http://vehosting.nl/pub_diffs/dmesg-arm-2010-09-18-timer-code.txt Can you perhaps tell me what's going wrong after this commit? (If you need more info, I'd be happy to provide it where I can.) Regards, -- Daan Vreeken VEHosting http://VEHosting.nl tel: +31-(0)40-7113050 / +31-(0)6-46210825 KvK nr: 17174380 From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 11:16:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86785106566B; Sat, 18 Sep 2010 11:16:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 760E28FC15; Sat, 18 Sep 2010 11:16:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IBGhwL063937; Sat, 18 Sep 2010 11:16:43 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IBGhJV063935; Sat, 18 Sep 2010 11:16:43 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201009181116.o8IBGhJV063935@svn.freebsd.org> From: Andriy Gapon Date: Sat, 18 Sep 2010 11:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212821 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 11:16:43 -0000 Author: avg Date: Sat Sep 18 11:16:43 2010 New Revision: 212821 URL: http://svn.freebsd.org/changeset/base/212821 Log: kern.sched.topology_spec sysctl: use step of 1 for group levels numeration This is just a cosmetic change for prettier output. 'indent' variable/parameter serves two purposes: it specifies whitespace indentation level and also implies cpu group level/depth. It would have been better to split those two uses, but for now just a simple change. MFC after: 1 week Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sat Sep 18 08:45:43 2010 (r212820) +++ head/sys/kern/sched_ule.c Sat Sep 18 11:16:43 2010 (r212821) @@ -2648,7 +2648,7 @@ sysctl_kern_sched_topology_spec_internal int i, first; sbuf_printf(sb, "%*s\n", indent, - "", indent, cg->cg_level); + "", 1 + indent / 2, cg->cg_level); sbuf_printf(sb, "%*s ", indent, "", cg->cg_count, cg->cg_mask); first = TRUE; From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 11:18:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FE6C1065673; Sat, 18 Sep 2010 11:18:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74DD08FC19; Sat, 18 Sep 2010 11:18:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IBIg8W064014; Sat, 18 Sep 2010 11:18:42 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IBIgRg064011; Sat, 18 Sep 2010 11:18:42 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201009181118.o8IBIgRg064011@svn.freebsd.org> From: Robert Watson Date: Sat, 18 Sep 2010 11:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212822 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 11:18:42 -0000 Author: rwatson Date: Sat Sep 18 11:18:42 2010 New Revision: 212822 URL: http://svn.freebsd.org/changeset/base/212822 Log: With reworking of the socket life cycle in 7.x, the need for a "sotryfree()" was eliminated: all references to sockets are explicitly managed by sorele() and the protocols. As such, garbage collect sotryfree(), and update sofree() comments to make the new world order more clear. MFC after: 3 days Reported by: Anuranjan Shukla Modified: head/sys/kern/uipc_socket.c head/sys/sys/socketvar.h Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sat Sep 18 11:16:43 2010 (r212821) +++ head/sys/kern/uipc_socket.c Sat Sep 18 11:18:42 2010 (r212822) @@ -559,9 +559,12 @@ solisten_proto(struct socket *so, int ba } /* - * Attempt to free a socket. This should really be sotryfree(). + * Evaluate the reference count and named references on a socket; if no + * references remain, free it. This should be called whenever a reference is + * released, such as in sorele(), but also when named reference flags are + * cleared in socket or protocol code. * - * sofree() will succeed if: + * sofree() will free the socket if: * * - There are no outstanding file descriptor references or related consumers * (so_count == 0). @@ -574,9 +577,6 @@ solisten_proto(struct socket *so, int ba * - The socket is not in a completed connection queue, so a process has been * notified that it is present. If it is removed, the user process may * block in accept() despite select() saying the socket was ready. - * - * Otherwise, it will quietly abort so that a future call to sofree(), when - * conditions are right, can succeed. */ void sofree(struct socket *so) Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Sat Sep 18 11:16:43 2010 (r212821) +++ head/sys/sys/socketvar.h Sat Sep 18 11:18:42 2010 (r212822) @@ -234,17 +234,6 @@ struct xsocket { } \ } while (0) -#define sotryfree(so) do { \ - ACCEPT_LOCK_ASSERT(); \ - SOCK_LOCK_ASSERT(so); \ - if ((so)->so_count == 0) \ - sofree(so); \ - else { \ - SOCK_UNLOCK(so); \ - ACCEPT_UNLOCK(); \ - } \ -} while(0) - /* * In sorwakeup() and sowwakeup(), acquire the socket buffer lock to * avoid a non-atomic test-and-wakeup. However, sowakeup is From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 11:35:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29FE106567A; Sat, 18 Sep 2010 11:35:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 380718FC20; Sat, 18 Sep 2010 11:35:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 9653341C752; Sat, 18 Sep 2010 13:35:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id hR-kTW6TcyNu; Sat, 18 Sep 2010 13:35:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id C571841C750; Sat, 18 Sep 2010 13:35:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 564064448FA; Sat, 18 Sep 2010 11:34:30 +0000 (UTC) Date: Sat, 18 Sep 2010 11:34:30 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Andre Oppermann In-Reply-To: <201009172205.o8HM5RPG043265@svn.freebsd.org> Message-ID: <20100918113224.J31898@maildrop.int.zabbadoz.net> References: <201009172205.o8HM5RPG043265@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212803 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 11:35:09 -0000 On Fri, 17 Sep 2010, Andre Oppermann wrote: Hey, > Author: andre > Date: Fri Sep 17 22:05:27 2010 > New Revision: 212803 > URL: http://svn.freebsd.org/changeset/base/212803 > > Log: > Rearrange the TSO code to make it more readable and to clearly > separate the decision logic, of whether we can do TSO, and the > calculation of the burst length into two distinct parts. > > Change the way the TSO burst length calculation is done. While > TSO could do bursts of 65535 bytes that can't be represented in > ip_len together with the IP and TCP header. Account for that and > use IP_MAXPACKET instead of TCP_MAXWIN as base constant (both > have the same value of 64K). When more data is available prevent > less than MSS sized segments from being sent during the current > TSO burst. > > Add two more KASSERTs to ensure the integrity of the packets. > > Tested by: Ben Wilber > MFC after: 10 days > > Modified: > head/sys/netinet/tcp_output.c > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Fri Sep 17 21:53:56 2010 (r212802) > +++ head/sys/netinet/tcp_output.c Fri Sep 17 22:05:27 2010 (r212803) > @@ -465,9 +465,8 @@ after_sack_rexmit: > } > > /* > - * Truncate to the maximum segment length or enable TCP Segmentation > - * Offloading (if supported by hardware) and ensure that FIN is removed > - * if the length no longer contains the last data byte. > + * Decide if we can use TCP Segmentation Offloading (if supported by > + * hardware). > * > * TSO may only be used if we are in a pure bulk sending state. The > * presence of TCP-MD5, SACK retransmits, SACK advertizements and > @@ -475,10 +474,6 @@ after_sack_rexmit: > * (except for the sequence number) for all generated packets. This > * makes it impossible to transmit any options which vary per generated > * segment or packet. > - * > - * The length of TSO bursts is limited to TCP_MAXWIN. That limit and > - * removal of FIN (if not already catched here) are handled later after > - * the exact length of the TCP options are known. > */ > #ifdef IPSEC > /* > @@ -487,22 +482,15 @@ after_sack_rexmit: > */ > ipsec_optlen = ipsec_hdrsiz_tcp(tp); > #endif > - if (len > tp->t_maxseg) { > - if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && > - ((tp->t_flags & TF_SIGNATURE) == 0) && > - tp->rcv_numsacks == 0 && sack_rxmit == 0 && > - tp->t_inpcb->inp_options == NULL && > - tp->t_inpcb->in6p_options == NULL > + if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg && > + ((tp->t_flags & TF_SIGNATURE) == 0) && > + tp->rcv_numsacks == 0 && sack_rxmit == 0 && > #ifdef IPSEC > - && ipsec_optlen == 0 > + ipsec_optlen == 0 && > #endif > - ) { > - tso = 1; > - } else { > - len = tp->t_maxseg; > - sendalot = 1; > - } > - } > + tp->t_inpcb->inp_options == NULL && > + tp->t_inpcb->in6p_options == NULL) > + tso = 1; In the non-TSO case you are no longer reducing len to tp->t_maxseg here, if it's larger, which I think breaks asssumptions all the way down. > if (sack_rxmit) { > if (SEQ_LT(p->rxmit + len, tp->snd_una + so->so_snd.sb_cc)) > @@ -732,28 +720,53 @@ send: > * bump the packet length beyond the t_maxopd length. > * Clear the FIN bit because we cut off the tail of > * the segment. > - * > - * When doing TSO limit a burst to TCP_MAXWIN minus the > - * IP, TCP and Options length to keep ip->ip_len from > - * overflowing. Prevent the last segment from being > - * fractional thus making them all equal sized and set > - * the flag to continue sending. TSO is disabled when > - * IP options or IPSEC are present. > */ > if (len + optlen + ipoptlen > tp->t_maxopd) { > flags &= ~TH_FIN; > + > if (tso) { > - if (len > TCP_MAXWIN - hdrlen - optlen) { > - len = TCP_MAXWIN - hdrlen - optlen; > - len = len - (len % (tp->t_maxopd - optlen)); > + KASSERT(ipoptlen == 0, > + ("%s: TSO can't do IP options", __func__)); > + > + /* > + * Limit a burst to IP_MAXPACKET minus IP, > + * TCP and options length to keep ip->ip_len > + * from overflowing. > + */ > + if (len > IP_MAXPACKET - hdrlen) { > + len = IP_MAXPACKET - hdrlen; > + sendalot = 1; > + } > + > + /* > + * Prevent the last segment from being > + * fractional unless the send sockbuf can > + * be emptied. > + */ > + if (sendalot && off + len < so->so_snd.sb_cc) { > + len -= len % (tp->t_maxopd - optlen); > sendalot = 1; > - } else if (tp->t_flags & TF_NEEDFIN) > + } > + > + /* > + * Send the FIN in a separate segment > + * after the bulk sending is done. > + * We don't trust the TSO implementations > + * to clear the FIN flag on all but the > + * last segment. > + */ > + if (tp->t_flags & TF_NEEDFIN) > sendalot = 1; > + > } else { > len = tp->t_maxopd - optlen - ipoptlen; > sendalot = 1; > } > - } > + } else > + tso = 0; > + > + KASSERT(len + hdrlen + ipoptlen <= IP_MAXPACKET, > + ("%s: len > IP_MAXPACKET", __func__)); > > /*#ifdef DIAGNOSTIC*/ > #ifdef INET6 > @@ -1068,6 +1081,9 @@ send: > m->m_pkthdr.tso_segsz = tp->t_maxopd - optlen; > } > > + KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL), > + ("%s: mbuf chain shorter than expected", __func__)); > + > /* > * In transmit state, time the transmission and arrange for > * the retransmit. In persist state, just set snd_max. > -- Bjoern A. Zeeb Welcome a new stage of life. From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 11:45:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A7CB106566B; Sat, 18 Sep 2010 11:45:10 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep23.mx.upcmail.net (fep23.mx.upcmail.net [62.179.121.43]) by mx1.freebsd.org (Postfix) with ESMTP id BB3848FC1B; Sat, 18 Sep 2010 11:45:08 +0000 (UTC) Received: from edge04.upcmail.net ([192.168.13.239]) by viefep11-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100918112343.SVJM4509.viefep11-int.chello.at@edge04.upcmail.net>; Sat, 18 Sep 2010 13:23:43 +0200 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge04.upcmail.net with edge id 8BPh1f05M0a5KZh04BPi6A; Sat, 18 Sep 2010 13:23:43 +0200 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id A02896D439; Sat, 18 Sep 2010 13:23:41 +0200 (CEST) Date: Sat, 18 Sep 2010 13:23:41 +0200 From: Stefan Farfeleder To: Pawel Jakub Dawidek Message-ID: <20100918112341.GA1733@mole.fafoe.narf.at> References: <201009172251.o8HMpjZJ044307@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009172251.o8HMpjZJ044307@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Cloudmark-Analysis: v=1.1 cv=ZDt3ILgE3VX9xkJc7+9REBIC4hFTL6V7NAq0V56QRNQ= c=1 sm=0 a=h7MPh2D0RE8A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=15cyhmPGUgWBd1Axkl0A:9 a=1g8AJalCpwuiQ2vk4RMA:7 a=DppC85V-0hkMsPaI1HWbjYsOHS8A:4 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212804 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 11:45:10 -0000 Um, was the change from 32 to 31 deliberate? On Fri, Sep 17, 2010 at 10:51:45PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Fri Sep 17 22:51:45 2010 > New Revision: 212804 > URL: http://svn.freebsd.org/changeset/base/212804 > > Log: > Remove magic value. > > Modified: > head/sys/boot/zfs/zfs.c > > Modified: head/sys/boot/zfs/zfs.c > ============================================================================== > --- head/sys/boot/zfs/zfs.c Fri Sep 17 22:05:27 2010 (r212803) > +++ head/sys/boot/zfs/zfs.c Fri Sep 17 22:51:45 2010 (r212804) > @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); > > #include "zfsimpl.c" > > +#define MAXBDDEV 31 > + > static int zfs_open(const char *path, struct open_file *f); > static int zfs_write(struct open_file *f, void *buf, size_t size, size_t *resid); > static int zfs_close(struct open_file *f); > @@ -402,7 +404,7 @@ zfs_dev_init(void) > * diskN, diskNpM or diskNsM. > */ > zfs_init(); > - for (unit = 0; unit < 32 /* XXX */; unit++) { > + for (unit = 0; unit < MAXBDDEV; unit++) { > sprintf(devname, "disk%d:", unit); > fd = open(devname, O_RDONLY); > if (fd == -1) > From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 12:08:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3269A1065670; Sat, 18 Sep 2010 12:08:34 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id C93108FC17; Sat, 18 Sep 2010 12:08:33 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 3F32845E9C; Sat, 18 Sep 2010 14:08:32 +0200 (CEST) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 45ECD45E87; Sat, 18 Sep 2010 14:08:27 +0200 (CEST) Date: Sat, 18 Sep 2010 14:08:09 +0200 From: Pawel Jakub Dawidek To: Stefan Farfeleder Message-ID: <20100918120809.GG1902@garage.freebsd.pl> References: <201009172251.o8HMpjZJ044307@svn.freebsd.org> <20100918112341.GA1733@mole.fafoe.narf.at> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TdkiTnkLhLQllcMS" Content-Disposition: inline In-Reply-To: <20100918112341.GA1733@mole.fafoe.narf.at> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212804 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 12:08:34 -0000 --TdkiTnkLhLQllcMS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 18, 2010 at 01:23:41PM +0200, Stefan Farfeleder wrote: > Um, was the change from 32 to 31 deliberate? Yes. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --TdkiTnkLhLQllcMS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyUq6kACgkQForvXbEpPzSZ5gCgx8Jp7h8PhJ0fVSbG33i9norX MuYAoId8vvJJIFzcn8Xm6C5mlaRrTStn =qNPA -----END PGP SIGNATURE----- --TdkiTnkLhLQllcMS-- From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 13:44:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0BAD106566B; Sat, 18 Sep 2010 13:44:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D03D58FC1F; Sat, 18 Sep 2010 13:44:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IDidvm067237; Sat, 18 Sep 2010 13:44:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IDidNS067235; Sat, 18 Sep 2010 13:44:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009181344.o8IDidNS067235@svn.freebsd.org> From: Alexander Motin Date: Sat, 18 Sep 2010 13:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212823 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 13:44:40 -0000 Author: mav Date: Sat Sep 18 13:44:39 2010 New Revision: 212823 URL: http://svn.freebsd.org/changeset/base/212823 Log: Clear timer interrupt status before calling callback, not after it, This fixes timer interrupt losses, fatal in one-shot mode. Modified: head/sys/arm/mv/timer.c Modified: head/sys/arm/mv/timer.c ============================================================================== --- head/sys/arm/mv/timer.c Sat Sep 18 11:18:42 2010 (r212822) +++ head/sys/arm/mv/timer.c Sat Sep 18 13:44:39 2010 (r212823) @@ -178,14 +178,14 @@ mv_hardclock(void *arg) struct mv_timer_softc *sc; uint32_t irq_cause; - sc = (struct mv_timer_softc *)arg; - if (sc->et.et_active) - sc->et.et_event_cb(&sc->et, sc->et.et_arg); - irq_cause = read_cpu_ctrl(BRIDGE_IRQ_CAUSE); irq_cause &= ~(IRQ_TIMER0); write_cpu_ctrl(BRIDGE_IRQ_CAUSE, irq_cause); + sc = (struct mv_timer_softc *)arg; + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + return (FILTER_HANDLED); } @@ -394,6 +394,8 @@ mv_timer_start(struct eventtimer *et, val |= CPU_TIMER0_EN; if (period != NULL) val |= CPU_TIMER0_AUTO; + else + val &= ~CPU_TIMER0_AUTO; mv_set_timer_control(val); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 13:48:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B81F1065695; Sat, 18 Sep 2010 13:48:19 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 55A318FC1B; Sat, 18 Sep 2010 13:48:18 +0000 (UTC) Received: by bwz15 with SMTP id 15so4408001bwz.13 for ; Sat, 18 Sep 2010 06:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=fCegHOiQmuvLh8aBikZ81yMzWf83vIsEnogt9V3fceg=; b=QNlq1NCt2PHLhvWEN7JAZBvetfLJZ8g/fSJGCwzhzRV7eKGN/pFXgxJDbAD6vE8kJc 6Ks9lYLs1FuG7GzC58m4+h8KXnBWyAcQtsJKM4R0uUq8uPqMWUwU+OpKMjKXHMFvx9F9 qPCgOSx9B9gWxksIyaT/Zw55i+/GLXMD713eg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=N/gWSJkx21g+bXY+zvltET6kWOnwL3pR+B/69Ll4QPo2mBU9v86Zkb+FZfexEdwdeA 5QrLH4023mkMJzsSVZPPHKV2IVgY8ZLOUi03i8G+4WbWVDG4YXYr2liTj1HTHoDBtbeQ QJHksfVl+tulfsSFHYinITtIbI9SpSmZXsXjU= Received: by 10.204.123.137 with SMTP id p9mr4693999bkr.206.1284817697295; Sat, 18 Sep 2010 06:48:17 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y2sm4722676bkx.20.2010.09.18.06.48.14 (version=SSLv3 cipher=RC4-MD5); Sat, 18 Sep 2010 06:48:15 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C94C31C.6080102@FreeBSD.org> Date: Sat, 18 Sep 2010 16:48:12 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Daan Vreeken References: <201009130725.o8D7PZX8073399@svn.freebsd.org> <201009181234.17851.Daan@vehosting.nl> In-Reply-To: <201009181234.17851.Daan@vehosting.nl> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212541 - in head/sys: amd64/amd64 amd64/include dev/acpica i386/i386 i386/include kern mips/include mips/mips pc98/pc98 powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc6... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 13:48:19 -0000 Hi. Daan Vreeken wrote: > On Monday 13 September 2010 09:25:35 Alexander Motin wrote: >> Author: mav >> Date: Mon Sep 13 07:25:35 2010 >> New Revision: 212541 >> URL: http://svn.freebsd.org/changeset/base/212541 >> >> Log: >> Refactor timer management code with priority to one-shot operation mode. >> The main goal of this is to generate timer interrupts only when there is >> some work to do. When CPU is busy interrupts are generating at full rate >> of hz + stathz to fullfill scheduler and timekeeping requirements. But >> when CPU is idle, only minimum set of interrupts (down to 8 interrupts >> per second per CPU now), needed to handle scheduled callouts is executed. >> This allows significantly increase idle CPU sleep time, increasing effect >> of static power-saving technologies. Also it should reduce host CPU load on >> virtualized systems, when guest system is idle. > [snip] > > When re-basing an ARM system running an older -current with local > patches/additions to a more recent version of -current (around > 2010-09-16-ish) I found out that the resulting kernel stopped booting. > To factor out our local changes I've tried to boot a 'SHEEVAPLUG' kernel > without modifications. This kernel also fails to boot. It just stops right > after : > > Can you perhaps tell me what's going wrong after this commit? > (If you need more info, I'd be happy to provide it where I can.) Sorry. Timer interrupt loss in one-shot mode made timer to not reload. r212823 fixes this problem for me. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 14:39:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3610F1065694; Sat, 18 Sep 2010 14:39:11 +0000 (UTC) (envelope-from Daan@vehosting.nl) Received: from VM01.VEHosting.nl (vm01.vehosting.nl [85.17.51.140]) by mx1.freebsd.org (Postfix) with ESMTP id AAAA98FC1E; Sat, 18 Sep 2010 14:39:10 +0000 (UTC) Received: from [192.168.45.11] (180-161.ftth.onsbrabantnet.nl [88.159.161.180]) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id o8IEcufP063948; Sat, 18 Sep 2010 16:38:56 +0200 (CEST) (envelope-from Daan@vehosting.nl) From: Daan Vreeken Organization: http://VEHosting.nl/ To: Alexander Motin Date: Sat, 18 Sep 2010 16:38:52 +0200 User-Agent: KMail/1.9.10 References: <201009130725.o8D7PZX8073399@svn.freebsd.org> <201009181234.17851.Daan@vehosting.nl> <4C94C31C.6080102@FreeBSD.org> In-Reply-To: <4C94C31C.6080102@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201009181638.53234.Daan@vehosting.nl> x-ve-auth-version: mi-1.0.3 2008-05-30 - Copyright (c) 2008 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212541 - in head/sys: amd64/amd64 amd64/include dev/acpica i386/i386 i386/include kern mips/include mips/mips pc98/pc98 powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc6... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 14:39:11 -0000 Hi, On Saturday 18 September 2010 15:48:12 Alexander Motin wrote: > Hi. > > Daan Vreeken wrote: > > On Monday 13 September 2010 09:25:35 Alexander Motin wrote: > >> Author: mav > >> Date: Mon Sep 13 07:25:35 2010 > >> New Revision: 212541 > >> URL: http://svn.freebsd.org/changeset/base/212541 > >> > >> Log: > >> Refactor timer management code with priority to one-shot operation > >> mode. The main goal of this is to generate timer interrupts only when > >> there is some work to do. When CPU is busy interrupts are generating at > >> full rate of hz + stathz to fullfill scheduler and timekeeping > >> requirements. But when CPU is idle, only minimum set of interrupts (down > >> to 8 interrupts per second per CPU now), needed to handle scheduled > >> callouts is executed. This allows significantly increase idle CPU sleep > >> time, increasing effect of static power-saving technologies. Also it > >> should reduce host CPU load on virtualized systems, when guest system is > >> idle. > > > > [snip] > > > > When re-basing an ARM system running an older -current with local > > patches/additions to a more recent version of -current (around > > 2010-09-16-ish) I found out that the resulting kernel stopped booting. > > To factor out our local changes I've tried to boot a 'SHEEVAPLUG' kernel > > without modifications. This kernel also fails to boot. It just stops > > right after : > > > > Can you perhaps tell me what's going wrong after this commit? > > (If you need more info, I'd be happy to provide it where I can.) > > Sorry. Timer interrupt loss in one-shot mode made timer to not reload. > r212823 fixes this problem for me. Yes, that fixed it. Thanks for the quick fix! Regards, -- Daan Vreeken VEHosting http://VEHosting.nl tel: +31-(0)40-7113050 / +31-(0)6-46210825 KvK nr: 17174380 From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 15:03:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1311065673; Sat, 18 Sep 2010 15:03:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB4608FC08; Sat, 18 Sep 2010 15:03:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IF3VwS069188; Sat, 18 Sep 2010 15:03:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IF3VgV069184; Sat, 18 Sep 2010 15:03:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009181503.o8IF3VgV069184@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 18 Sep 2010 15:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212824 - in head/sys: sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 15:03:31 -0000 Author: kib Date: Sat Sep 18 15:03:31 2010 New Revision: 212824 URL: http://svn.freebsd.org/changeset/base/212824 Log: Adopt the deferring of object deallocation for the deleted map entries on map unlock to the lock downgrade and later read unlock operation. System map entries cannot be backed by OBJT_VNODE objects, no need to defer deallocation for them. Map entries from user maps do not require the owner map for deallocation, and can be accumulated in the thread-local list for freeing when a user map is unlocked. Move the collection of entries for deferred reclamation into vm_map_delete(). Create helper vm_map_process_deferred(), that is called from locations where processing is feasible. Do not process deferred entries in vm_map_unlock_and_wait() since map_sleep_mtx is held. Reviewed by: alc, rstone (previous versions) Tested by: pho MFC after: 2 weeks Modified: head/sys/sys/proc.h head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Sep 18 13:44:39 2010 (r212823) +++ head/sys/sys/proc.h Sat Sep 18 15:03:31 2010 (r212824) @@ -262,6 +262,7 @@ struct thread { struct ksiginfo td_dbgksi; /* (c) ksi reflected to debugger. */ int td_ng_outbound; /* (k) Thread entered ng from above. */ struct osd td_osd; /* (k) Object specific data. */ + struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */ #define td_endzero td_base_pri /* Copied during fork1() or thread_sched_upcall(). */ Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Sep 18 13:44:39 2010 (r212823) +++ head/sys/vm/vm_map.c Sat Sep 18 15:03:31 2010 (r212824) @@ -128,6 +128,7 @@ static int vm_map_zinit(void *mem, int i static void vm_map_zfini(void *mem, int size); static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, vm_offset_t max); +static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t system_map); static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry); #ifdef INVARIANTS static void vm_map_zdtor(void *mem, int size, void *arg); @@ -454,30 +455,39 @@ _vm_map_lock(vm_map_t map, const char *f map->timestamp++; } -void -_vm_map_unlock(vm_map_t map, const char *file, int line) +static void +vm_map_process_deferred(void) { - vm_map_entry_t free_entry, entry; - vm_object_t object; + struct thread *td; + vm_map_entry_t entry; - free_entry = map->deferred_freelist; - map->deferred_freelist = NULL; + td = curthread; + + while ((entry = td->td_map_def_user) != NULL) { + td->td_map_def_user = entry->next; + vm_map_entry_deallocate(entry, FALSE); + } +} + +void +_vm_map_unlock_nodefer(vm_map_t map, const char *file, int line) +{ if (map->system_map) _mtx_unlock_flags(&map->system_mtx, 0, file, line); else _sx_xunlock(&map->lock, file, line); +} - while (free_entry != NULL) { - entry = free_entry; - free_entry = free_entry->next; - - if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0) { - object = entry->object.vm_object; - vm_object_deallocate(object); - } +void +_vm_map_unlock(vm_map_t map, const char *file, int line) +{ - vm_map_entry_dispose(map, entry); + if (map->system_map) + _mtx_unlock_flags(&map->system_mtx, 0, file, line); + else { + _sx_xunlock(&map->lock, file, line); + vm_map_process_deferred(); } } @@ -497,8 +507,10 @@ _vm_map_unlock_read(vm_map_t map, const if (map->system_map) _mtx_unlock_flags(&map->system_mtx, 0, file, line); - else + else { _sx_sunlock(&map->lock, file, line); + vm_map_process_deferred(); + } } int @@ -548,6 +560,7 @@ _vm_map_lock_upgrade(vm_map_t map, const if (!_sx_try_upgrade(&map->lock, file, line)) { last_timestamp = map->timestamp; _sx_sunlock(&map->lock, file, line); + vm_map_process_deferred(); /* * If the map's timestamp does not change while the * map is unlocked, then the upgrade succeeds. @@ -631,7 +644,7 @@ vm_map_unlock_and_wait(vm_map_t map, int { mtx_lock(&map_sleep_mtx); - vm_map_unlock(map); + vm_map_unlock_nodefer(map); return (msleep(&map->root, &map_sleep_mtx, PDROP | PVM, "vmmaps", timo)); } @@ -699,7 +712,6 @@ _vm_map_init(vm_map_t map, pmap_t pmap, map->flags = 0; map->root = NULL; map->timestamp = 0; - map->deferred_freelist = NULL; } void @@ -2602,6 +2614,15 @@ vm_map_entry_unwire(vm_map_t map, vm_map entry->wired_count = 0; } +static void +vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t system_map) +{ + + if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0) + vm_object_deallocate(entry->object.vm_object); + uma_zfree(system_map ? kmapentzone : mapentzone, entry); +} + /* * vm_map_entry_delete: [ internal use only ] * @@ -2656,6 +2677,12 @@ vm_map_entry_delete(vm_map_t map, vm_map VM_OBJECT_UNLOCK(object); } else entry->object.vm_object = NULL; + if (map->system_map) + vm_map_entry_deallocate(entry, TRUE); + else { + entry->next = curthread->td_map_def_user; + curthread->td_map_def_user = entry; + } } /* @@ -2744,8 +2771,6 @@ vm_map_delete(vm_map_t map, vm_offset_t * will be set in the wrong object!) */ vm_map_entry_delete(map, entry); - entry->next = map->deferred_freelist; - map->deferred_freelist = entry; entry = next; } return (KERN_SUCCESS); Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Sat Sep 18 13:44:39 2010 (r212823) +++ head/sys/vm/vm_map.h Sat Sep 18 15:03:31 2010 (r212824) @@ -185,7 +185,6 @@ struct vm_map { vm_flags_t flags; /* flags for this vm_map */ vm_map_entry_t root; /* Root of a binary search tree */ pmap_t pmap; /* (c) Physical map */ - vm_map_entry_t deferred_freelist; #define min_offset header.start /* (c) */ #define max_offset header.end /* (c) */ }; @@ -267,6 +266,7 @@ vmspace_pmap(struct vmspace *vmspace) void _vm_map_lock(vm_map_t map, const char *file, int line); void _vm_map_unlock(vm_map_t map, const char *file, int line); +void _vm_map_unlock_nodefer(vm_map_t map, const char *file, int line); void _vm_map_lock_read(vm_map_t map, const char *file, int line); void _vm_map_unlock_read(vm_map_t map, const char *file, int line); int _vm_map_trylock(vm_map_t map, const char *file, int line); @@ -279,6 +279,8 @@ void vm_map_wakeup(vm_map_t map); #define vm_map_lock(map) _vm_map_lock(map, LOCK_FILE, LOCK_LINE) #define vm_map_unlock(map) _vm_map_unlock(map, LOCK_FILE, LOCK_LINE) +#define vm_map_unlock_nodefer(map) \ + _vm_map_unlock_nodefer(map, LOCK_FILE, LOCK_LINE) #define vm_map_lock_read(map) _vm_map_lock_read(map, LOCK_FILE, LOCK_LINE) #define vm_map_unlock_read(map) _vm_map_unlock_read(map, LOCK_FILE, LOCK_LINE) #define vm_map_trylock(map) _vm_map_trylock(map, LOCK_FILE, LOCK_LINE) From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 16:57:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E6EA106566B; Sat, 18 Sep 2010 16:57:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03C768FC0A; Sat, 18 Sep 2010 16:57:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IGv5l6071868; Sat, 18 Sep 2010 16:57:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IGv5Kw071864; Sat, 18 Sep 2010 16:57:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009181657.o8IGv5Kw071864@svn.freebsd.org> From: Alexander Motin Date: Sat, 18 Sep 2010 16:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212825 - in head/sys/arm: arm include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 16:57:06 -0000 Author: mav Date: Sat Sep 18 16:57:05 2010 New Revision: 212825 URL: http://svn.freebsd.org/changeset/base/212825 Log: Add basic cpu_sleep() support for Marvell SoCs. This drops my SheevaPlug's heatsink termperature in open air from 49C to 43C when idle. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_sheeva.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sat Sep 18 15:03:31 2010 (r212824) +++ head/sys/arm/arm/cpufunc.c Sat Sep 18 16:57:05 2010 (r212825) @@ -397,7 +397,7 @@ struct cpu_functions sheeva_cpufuncs = { cpufunc_nullop, /* flush_brnchtgt_C */ (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - (void *)cpufunc_nullop, /* sleep */ + sheeva_cpu_sleep, /* sleep */ /* Soft functions */ @@ -1076,6 +1076,9 @@ set_cpufuncs() FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN); } + + /* Use powersave on this CPU. */ + cpu_do_powersave = 1; } else cpufuncs = armv5_ec_cpufuncs; Modified: head/sys/arm/arm/cpufunc_asm_sheeva.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_sheeva.S Sat Sep 18 15:03:31 2010 (r212824) +++ head/sys/arm/arm/cpufunc_asm_sheeva.S Sat Sep 18 16:57:05 2010 (r212825) @@ -392,3 +392,10 @@ ENTRY(sheeva_control_ext) mcrne p15, 1, r2, c15, c1, 0 /* Write new control register */ mov r0, r3 /* Return old value */ RET + +ENTRY(sheeva_cpu_sleep) + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* Drain write buffer */ + mcr p15, 0, r0, c7, c0, 4 /* Wait for interrupt */ + mov pc, lr + Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sat Sep 18 15:03:31 2010 (r212824) +++ head/sys/arm/include/cpufunc.h Sat Sep 18 16:57:05 2010 (r212825) @@ -400,6 +400,7 @@ extern unsigned arm10_dcache_index_max; extern unsigned arm10_dcache_index_inc; u_int sheeva_control_ext (u_int, u_int); +void sheeva_cpu_sleep (int); void sheeva_setttb (u_int); void sheeva_dcache_wbinv_range (vm_offset_t, vm_size_t); void sheeva_dcache_inv_range (vm_offset_t, vm_size_t); From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 18:37:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CD16106566B; Sat, 18 Sep 2010 18:37:42 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD6E8FC08; Sat, 18 Sep 2010 18:37:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IIbgvu074323; Sat, 18 Sep 2010 18:37:42 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IIbg20074321; Sat, 18 Sep 2010 18:37:42 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201009181837.o8IIbg20074321@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 18 Sep 2010 18:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212826 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 18:37:42 -0000 Author: jh Date: Sat Sep 18 18:37:41 2010 New Revision: 212826 URL: http://svn.freebsd.org/changeset/base/212826 Log: - For consistency, remove "." and ".." entries from de_dlist before calling devfs_delete() (and thus possibly dropping dm_lock) in devfs_rmdir_empty(). - Assert that we don't return doomed entries from devfs_find(). [1] Suggested by: kib [1] Reviewed by: kib Modified: head/sys/fs/devfs/devfs_devs.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Sat Sep 18 16:57:05 2010 (r212825) +++ head/sys/fs/devfs/devfs_devs.c Sat Sep 18 18:37:41 2010 (r212826) @@ -171,6 +171,8 @@ devfs_find(struct devfs_dirent *dd, cons continue; break; } + KASSERT(de == NULL || (de->de_flags & DE_DOOMED) == 0, + ("devfs_find: returning a doomed entry")); return (de); } @@ -302,6 +304,8 @@ devfs_rmdir_empty(struct devfs_mount *dm dd = devfs_parent_dirent(de); KASSERT(dd != NULL, ("devfs_rmdir_empty: NULL dd")); + TAILQ_REMOVE(&de->de_dlist, de_dot, de_list); + TAILQ_REMOVE(&de->de_dlist, de_dotdot, de_list); TAILQ_REMOVE(&dd->de_dlist, de, de_list); DEVFS_DE_HOLD(dd); devfs_delete(dm, de, DEVFS_DEL_NORECURSE); From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 19:23:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5D471065670; Sat, 18 Sep 2010 19:23:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8BC8FC14; Sat, 18 Sep 2010 19:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IJNEe5075404; Sat, 18 Sep 2010 19:23:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IJNE3E075401; Sat, 18 Sep 2010 19:23:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201009181923.o8IJNE3E075401@svn.freebsd.org> From: Glen Barber Date: Sat, 18 Sep 2010 19:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212827 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 19:23:14 -0000 Author: gjb (doc committer) Date: Sat Sep 18 19:23:14 2010 New Revision: 212827 URL: http://svn.freebsd.org/changeset/base/212827 Log: Note that devfs(5) and fdescfs(5) both create /dev/fd file descriptors. PR: 144534 Submitted by: Matthew Seaman Patch by: Matthew Seaman, keramida Approved by: keramida (mentor) MFC after: 1 week Modified: head/share/man/man5/devfs.5 head/share/man/man5/fdescfs.5 Modified: head/share/man/man5/devfs.5 ============================================================================== --- head/share/man/man5/devfs.5 Sat Sep 18 18:37:41 2010 (r212826) +++ head/share/man/man5/devfs.5 Sat Sep 18 19:23:14 2010 (r212827) @@ -38,7 +38,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2010 +.Dd September 18, 2010 .Dt DEVFS 5 .Os .Sh NAME @@ -69,6 +69,27 @@ The .Xr mknod 8 tool can be used to recover deleted device entries under .Nm . +.Pp +The +.Xr fdescfs 5 +filesystem is an alternate means for populating +.Pa /dev/fd . +The character devices that both +.Nm +and +.Xr fdescfs 5 +present in +.Pa /dev/fd +correspond to the open file descriptors of the process +accessing the directory. +.Nm +only creates files for the standard file descriptors +.Pa 0 , +.Pa 1 +and +.Pa 2 . +.Xr fdescfs 5 +creates files for all open descriptors. .Sh FILES .Bl -tag -width /dev/XXXX -compact .It Pa /dev @@ -85,6 +106,7 @@ volume located on .Dl "mount -t devfs devfs /mychroot/dev" .Sh SEE ALSO .Xr devfs 8 , +.Xr fdescfs 5 , .Xr mount 8 .Sh HISTORY The Modified: head/share/man/man5/fdescfs.5 ============================================================================== --- head/share/man/man5/fdescfs.5 Sat Sep 18 18:37:41 2010 (r212826) +++ head/share/man/man5/fdescfs.5 Sat Sep 18 19:23:14 2010 (r212827) @@ -38,7 +38,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 14, 1996 +.Dd September 18, 2010 .Dt FDESCFS 5 .Os .Sh NAME @@ -87,6 +87,15 @@ call other than and .Dv O_RDWR are ignored. +.Pp +.Em "Note:" +.Pa /dev/fd/0 , +.Pa /dev/fd/1 +and +.Pa /dev/fd/2 +files are created by default when devfs alone is mounted. +.Nm +creates entries for all file descriptors opened by the process. .Sh FILES .Bl -tag -width /dev/stderr -compact .It Pa /dev/fd/# @@ -99,6 +108,7 @@ volume located on .Pp .Dl "mount -t fdescfs null /dev/fd" .Sh SEE ALSO +.Xr devfs 5 , .Xr mount 8 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 20:50:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23D73106567A; Sat, 18 Sep 2010 20:50:37 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07F7F8FC17; Sat, 18 Sep 2010 20:50:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IKoaD8077575; Sat, 18 Sep 2010 20:50:36 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IKoaSG077573; Sat, 18 Sep 2010 20:50:36 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201009182050.o8IKoaSG077573@svn.freebsd.org> From: Benedict Reuschling Date: Sat, 18 Sep 2010 20:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212828 - stable/8/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 20:50:37 -0000 Author: bcr (doc committer) Date: Sat Sep 18 20:50:36 2010 New Revision: 212828 URL: http://svn.freebsd.org/changeset/base/212828 Log: Belatedly MFC r210002, r210676, r210812, r210826: r210002: In the example for how to create a VLAN, also include an example of setting the IP address. While it is documented earlier in rc.conf(5) that the '.' in the VLAN name becomes a '_' in rc.conf, this may not be easy to find when just using rc.conf(5) as reference documentation. r210676: Fix a bunch of typos and spelling mistakes. r210812: Update references from nonexistent usbconfig(1) to usbconfig(8). r210826: Correctly sort usbconfig(8) within the SEE ALSO section. PR: docs/149221 Submitted by: Lars Hartmann (lars at chaotika dot org) Help with mergeinfo from: kib Reviewed by: kib, hrs (IPv6 parts that should not be merged to stable/8) Modified: stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Sat Sep 18 19:23:14 2010 (r212827) +++ stable/8/share/man/man5/rc.conf.5 Sat Sep 18 20:50:36 2010 (r212828) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 4, 2010 +.Dd September 18, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -401,7 +401,7 @@ variable for interface .Ar iface only. .It Va synchronous_dhclient -.Pq Bt bool +.Pq Vt bool Set to .Dq Li YES to start @@ -1156,9 +1156,10 @@ To create a vlan device named .Li em0.101 on .Li em0 -with the vlan tag 101: +with the vlan tag 101 and the optional the IPv4 address 192.0.2.1/24: .Bd -literal vlans_em0="101" +ifconfig_em0_101="inet 192.0.2.1/24" .Ed .Pp To create a vlan device named @@ -4133,14 +4134,14 @@ Must set properly if multiple profiles u .Pq Vt bool Tells .Xr rfcomm_pppd 8 -if it should register Serial Port service on the speficied RFCOMM channel. +if it should register Serial Port service on the specified RFCOMM channel. Default .Dq Li NO . .It Va rfcomm_pppd_server_ Ns Ao Ar profile Ac Ns _register_dun .Pq Vt bool Tells .Xr rfcomm_pppd 8 -if it should register Dial-Up Networking service on the speficied +if it should register Dial-Up Networking service on the specified RFCOMM channel. Default .Dq Li NO . @@ -4157,12 +4158,12 @@ variables. .It Va ubthidhci_busnum Bus number where the USB Bluetooth controller is located. Check the output of -.Xr usbconfig 1 +.Xr usbconfig 8 on your system to find this information. .It Va ubthidhci_addr Bus address of the USB Bluetooth controller. Check the output of -.Xr usbconfig 1 +.Xr usbconfig 8 on your system to find this information. .El .Sh FILES @@ -4179,7 +4180,6 @@ on your system to find this information. .Xr kbdcontrol 1 , .Xr makewhatis 1 , .Xr sh 1 , -.Xr usbconfig 1 , .Xr vi 1 , .Xr vidcontrol 1 , .Xr bridge 4 , @@ -4255,6 +4255,7 @@ on your system to find this information. .Xr sysctl 8 , .Xr syslogd 8 , .Xr timed 8 , +.Xr usbconfig 8 , .Xr wlandebug 8 , .Xr yp 8 , .Xr ypbind 8 , From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 21:45:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51F6A1065694 for ; Sat, 18 Sep 2010 21:45:12 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id B4ED28FC19 for ; Sat, 18 Sep 2010 21:45:11 +0000 (UTC) Received: (qmail 27080 invoked from network); 18 Sep 2010 21:39:21 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 18 Sep 2010 21:39:21 -0000 Message-ID: <4C9532E7.8090904@freebsd.org> Date: Sat, 18 Sep 2010 23:45:11 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201009172205.o8HM5RPG043265@svn.freebsd.org> <20100918113224.J31898@maildrop.int.zabbadoz.net> In-Reply-To: <20100918113224.J31898@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212803 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 21:45:12 -0000 On 18.09.2010 13:34, Bjoern A. Zeeb wrote: > On Fri, 17 Sep 2010, Andre Oppermann wrote: >> @@ -487,22 +482,15 @@ after_sack_rexmit: >> */ >> ipsec_optlen = ipsec_hdrsiz_tcp(tp); >> #endif >> - if (len > tp->t_maxseg) { >> - if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && >> - ((tp->t_flags & TF_SIGNATURE) == 0) && >> - tp->rcv_numsacks == 0 && sack_rxmit == 0 && >> - tp->t_inpcb->inp_options == NULL && >> - tp->t_inpcb->in6p_options == NULL >> + if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg && >> + ((tp->t_flags & TF_SIGNATURE) == 0) && >> + tp->rcv_numsacks == 0 && sack_rxmit == 0 && >> #ifdef IPSEC >> - && ipsec_optlen == 0 >> + ipsec_optlen == 0 && >> #endif >> - ) { >> - tso = 1; >> - } else { >> - len = tp->t_maxseg; >> - sendalot = 1; >> - } >> - } >> + tp->t_inpcb->inp_options == NULL && >> + tp->t_inpcb->in6p_options == NULL) >> + tso = 1; > > In the non-TSO case you are no longer reducing len to tp->t_maxseg > here, if it's larger, which I think breaks asssumptions all the way down. No assumptions are broken for the non-TSO case. The value of len is only tested against t_maxseg for being equal or grater. This always hold true. When the decision to send has been made len is correctly limited in the non-TSO and TSO case. Before it was a bit of either was done in both places. That is now merged into one spot. -- Andre From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 22:26:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24D5106566B; Sat, 18 Sep 2010 22:26:50 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 920988FC0A; Sat, 18 Sep 2010 22:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IMQoBq080058; Sat, 18 Sep 2010 22:26:50 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IMQofx080056; Sat, 18 Sep 2010 22:26:50 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201009182226.o8IMQofx080056@svn.freebsd.org> From: Nick Hibma Date: Sat, 18 Sep 2010 22:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212829 - head/usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 22:26:50 -0000 Author: n_hibma Date: Sat Sep 18 22:26:50 2010 New Revision: 212829 URL: http://svn.freebsd.org/changeset/base/212829 Log: Bugfix: Reset the packet counters at the same time as the byte counts. Reviewed by: brian MFC after: 3 weeks Modified: head/usr.sbin/ppp/throughput.c Modified: head/usr.sbin/ppp/throughput.c ============================================================================== --- head/usr.sbin/ppp/throughput.c Sat Sep 18 20:50:36 2010 (r212828) +++ head/usr.sbin/ppp/throughput.c Sat Sep 18 22:26:50 2010 (r212829) @@ -201,7 +201,7 @@ throughput_start(struct pppThroughput *t for (i = 0; i < t->SamplePeriod; i++) t->in.SampleOctets[i] = t->out.SampleOctets[i] = 0; t->nSample = 0; - t->OctetsIn = t->OctetsOut = 0; + t->OctetsIn = t->OctetsOut = t->PacketsIn = t->PacketsOut = 0; t->in.OctetsPerSecond = t->out.OctetsPerSecond = t->BestOctetsPerSecond = 0; time(&t->BestOctetsPerSecondTime); t->downtime = 0; @@ -268,7 +268,7 @@ throughput_clear(struct pppThroughput *t divisor = 1; prompt_Printf(prompt, "overall cleared (was %6qu bytes/sec)\n", (t->OctetsIn + t->OctetsOut) / divisor); - t->OctetsIn = t->OctetsOut = 0; + t->OctetsIn = t->OctetsOut = t->PacketsIn = t->PacketsOut = 0; t->downtime = 0; time(&t->uptime); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 22:37:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10F901065674; Sat, 18 Sep 2010 22:37:48 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAC808FC14; Sat, 18 Sep 2010 22:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IMbl5x080343; Sat, 18 Sep 2010 22:37:47 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8IMblaq080341; Sat, 18 Sep 2010 22:37:47 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201009182237.o8IMblaq080341@svn.freebsd.org> From: Nick Hibma Date: Sat, 18 Sep 2010 22:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212830 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 22:37:48 -0000 Author: n_hibma Date: Sat Sep 18 22:37:47 2010 New Revision: 212830 URL: http://svn.freebsd.org/changeset/base/212830 Log: Cleanup white space and typos. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Sep 18 22:26:50 2010 (r212829) +++ head/sys/dev/usb/usbdevs Sat Sep 18 22:37:47 2010 (r212830) @@ -488,7 +488,7 @@ vendor GEOCAST 0x0a79 Geocast Network S vendor IDQUANTIQUE 0x0aba id Quantique vendor ZYDAS 0x0ace Zydas Technology Corporation vendor NEODIO 0x0aec Neodio -vendor OPTION 0x0af0 Option N.V: +vendor OPTION 0x0af0 Option N.V. vendor ASUS 0x0b05 ASUSTeK Computer vendor TODOS 0x0b0c Todos Data System vendor SIIG2 0x0b39 SIIG @@ -1444,7 +1444,7 @@ product EDIMAX EW7718 0x7718 EW-7718 /* eGalax Products */ product EGALAX TPANEL 0x0001 Touch Panel product EGALAX TPANEL2 0x0002 Touch Panel -product EGALAX2 TPANEL 0x0001 Touch Panel +product EGALAX2 TPANEL 0x0001 Touch Panel /* Eicon Networks */ product EICON DIVA852 0x4905 Diva 852 ISDN TA @@ -2096,7 +2096,7 @@ product MELCO LUATX1 0x0001 LUA-TX Ethe product MELCO LUATX5 0x0005 LUA-TX Ethernet product MELCO LUA2TX5 0x0009 LUA2-TX Ethernet product MELCO LUAKTX 0x0012 LUA-KTX Ethernet -product MELCO DUBPXXG 0x001c USB-IDE Bridge: DUB-PxxG +product MELCO DUBPXXG 0x001c DUB-PxxG product MELCO LUAU2KTX 0x003d LUA-U2-KTX Ethernet product MELCO KG54YB 0x005e WLI-U2-KG54-YB WLAN product MELCO KG54 0x0066 WLI-U2-KG54 WLAN @@ -2456,7 +2456,7 @@ product PANASONIC TYTP50P6S 0x3900 TY-TP /* PARA Industrial products */ product PARA RT3070 0x8888 RT3070 - + /* Pegatron products */ product PEGATRON RT2870 0x0002 RT2870 product PEGATRON RT3070 0x000c RT3070 @@ -2742,7 +2742,7 @@ product SAGEM XG76NA 0x0062 XG-76NA product SAMSUNG ML6060 0x3008 ML-6060 laser printer product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player product SAMSUNG YP_U4 0x5092 YP-U4 MP3 Player -product SAMSUNG I500 0x6601 I500 Palm USB Phone +product SAMSUNG I500 0x6601 I500 Palm USB Phone product SAMSUNG I330 0x8001 I330 phone cradle product SAMSUNG2 RT2870_1 0x2018 RT2870 @@ -3371,7 +3371,7 @@ product ZOOM 2986L 0x9700 2986L Fax mod product ZORAN EX20DSC 0x4343 Digital Camera EX-20 DSC /* Zydas Technology Corporation products */ -product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg +product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg product ZYDAS ZD1211B 0x1215 ZD1211B /* ZyXEL Communication Co. products */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 18 23:38:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AFA4106567A; Sat, 18 Sep 2010 23:38:21 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AE8C8FC0C; Sat, 18 Sep 2010 23:38:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8INcLVU081792; Sat, 18 Sep 2010 23:38:21 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8INcLF8081790; Sat, 18 Sep 2010 23:38:21 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009182338.o8INcLF8081790@svn.freebsd.org> From: Rui Paulo Date: Sat, 18 Sep 2010 23:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212831 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 23:38:21 -0000 Author: rpaulo Date: Sat Sep 18 23:38:21 2010 New Revision: 212831 URL: http://svn.freebsd.org/changeset/base/212831 Log: Ignore EINTR when calling waitpid. Modified: head/lib/libproc/proc_util.c Modified: head/lib/libproc/proc_util.c ============================================================================== --- head/lib/libproc/proc_util.c Sat Sep 18 22:37:47 2010 (r212830) +++ head/lib/libproc/proc_util.c Sat Sep 18 23:38:21 2010 (r212831) @@ -145,7 +145,8 @@ proc_wstatus(struct proc_handle *phdl) if (phdl == NULL) return (-1); if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { - warn("waitpid"); + if (errno != EINTR) + warn("waitpid"); return (-1); } if (WIFSTOPPED(status))