From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 01:31:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5FE79EE8; Sun, 7 Apr 2013 01:31:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8AC69B0D; Sun, 7 Apr 2013 01:30:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r371UpJb050912; Sun, 7 Apr 2013 01:30:51 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r371UpUx050911; Sun, 7 Apr 2013 01:30:51 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201304070130.r371UpUx050911@svn.freebsd.org> From: Alan Cox Date: Sun, 7 Apr 2013 01:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249221 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 01:31:18 -0000 Author: alc Date: Sun Apr 7 01:30:51 2013 New Revision: 249221 URL: http://svnweb.freebsd.org/changeset/base/249221 Log: Micro-optimize the order of struct vm_radix_node's fields. Specifically, arrange for all of the fields to start at a short offset from the beginning of the structure. Eliminate unnecessary masking of VM_RADIX_FLAGS from the root pointer in vm_radix_getroot(). Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Sat Apr 6 22:30:46 2013 (r249220) +++ head/sys/vm/vm_radix.c Sun Apr 7 01:30:51 2013 (r249221) @@ -94,10 +94,10 @@ __FBSDID("$FreeBSD$"); ((vm_pindex_t)1 << ((VM_RADIX_LIMIT - (lev)) * VM_RADIX_WIDTH)) struct vm_radix_node { - void *rn_child[VM_RADIX_COUNT]; /* Child nodes. */ vm_pindex_t rn_owner; /* Owner of record. */ uint16_t rn_count; /* Valid children. */ uint16_t rn_clev; /* Current level. */ + void *rn_child[VM_RADIX_COUNT]; /* Child nodes. */ }; static uma_zone_t vm_radix_node_zone; @@ -175,7 +175,7 @@ static __inline struct vm_radix_node * vm_radix_getroot(struct vm_radix *rtree) { - return ((struct vm_radix_node *)(rtree->rt_root & ~VM_RADIX_FLAGS)); + return ((struct vm_radix_node *)rtree->rt_root); } /* From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 05:40:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3D21693B; Sun, 7 Apr 2013 05:40:50 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 29E8D3E5; Sun, 7 Apr 2013 05:40:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r375eocD023521; Sun, 7 Apr 2013 05:40:50 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r375eoQI023520; Sun, 7 Apr 2013 05:40:50 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201304070540.r375eoQI023520@svn.freebsd.org> From: Tim Kientzle Date: Sun, 7 Apr 2013 05:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249222 - head/sys/boot/ficl/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 05:40:50 -0000 Author: kientzle Date: Sun Apr 7 05:40:49 2013 New Revision: 249222 URL: http://svnweb.freebsd.org/changeset/base/249222 Log: Fix two broken macros. Modified: head/sys/boot/ficl/arm/sysdep.h Modified: head/sys/boot/ficl/arm/sysdep.h ============================================================================== --- head/sys/boot/ficl/arm/sysdep.h Sun Apr 7 01:30:51 2013 (r249221) +++ head/sys/boot/ficl/arm/sysdep.h Sun Apr 7 05:40:49 2013 (r249222) @@ -59,7 +59,7 @@ #include #if !defined IGNORE /* Macro to silence unused param warnings */ -#define IGNORE(x) &x +#define IGNORE(x) (void)(x) #endif /* @@ -406,7 +406,7 @@ void *ficlRealloc(void *p, size_t size); #if FICL_MULTITHREAD int ficlLockDictionary(short fLock); #else -#define ficlLockDictionary(x) 0 /* ignore */ +#define ficlLockDictionary(x) /* ignore */ #endif /* From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 05:53:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6E345B2B; Sun, 7 Apr 2013 05:53:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 45725605; Sun, 7 Apr 2013 05:53:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r375rhwK026841; Sun, 7 Apr 2013 05:53:43 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r375rhkt026840; Sun, 7 Apr 2013 05:53:43 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201304070553.r375rhkt026840@svn.freebsd.org> From: Tim Kientzle Date: Sun, 7 Apr 2013 05:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249223 - head/sys/boot/ficl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 05:53:43 -0000 Author: kientzle Date: Sun Apr 7 05:53:42 2013 New Revision: 249223 URL: http://svnweb.freebsd.org/changeset/base/249223 Log: The CELL fields can be various integer types depending on the platform (ARM uses 'int' and 'unsigned'; i386 uses 'long' and 'unsigned long'), so we need explicit casts to long and unsigned long here to ensure that the result matches the printf %ld and %lx specifiers. Modified: head/sys/boot/ficl/tools.c Modified: head/sys/boot/ficl/tools.c ============================================================================== --- head/sys/boot/ficl/tools.c Sun Apr 7 05:40:49 2013 (r249222) +++ head/sys/boot/ficl/tools.c Sun Apr 7 05:53:42 2013 (r249223) @@ -216,10 +216,11 @@ static void seeColon(FICL_VM *pVM, CELL { FICL_WORD *pLit = (FICL_WORD *)c.p; sprintf(cp, "%.*s ( %#lx literal )", - pLit->nName, pLit->name, c.u); + pLit->nName, pLit->name, (unsigned long)c.u); } else - sprintf(cp, "literal %ld (%#lx)", c.i, c.u); + sprintf(cp, "literal %ld (%#lx)", + (long)c.i, (unsigned long)c.u); break; case STRINGLIT: { @@ -281,7 +282,7 @@ static void seeColon(FICL_VM *pVM, CELL } else /* probably not a word - punt and print value */ { - sprintf(cp, "%ld ( %#lx )", pc->i, pc->u); + sprintf(cp, "%ld ( %#lx )", (long)pc->i, (unsigned long)pc->u); } vmTextOut(pVM, pVM->pad, 1); @@ -324,19 +325,22 @@ static void seeXT(FICL_VM *pVM) break; case VARIABLE: - sprintf(pVM->pad, "variable = %ld (%#lx)", pFW->param->i, pFW->param->u); + sprintf(pVM->pad, "variable = %ld (%#lx)", + (long)pFW->param->i, (unsigned long)pFW->param->u); vmTextOut(pVM, pVM->pad, 1); break; #if FICL_WANT_USER case USER: - sprintf(pVM->pad, "user variable %ld (%#lx)", pFW->param->i, pFW->param->u); + sprintf(pVM->pad, "user variable %ld (%#lx)", + (long)pFW->param->i, (unsigned long)pFW->param->u); vmTextOut(pVM, pVM->pad, 1); break; #endif case CONSTANT: - sprintf(pVM->pad, "constant = %ld (%#lx)", pFW->param->i, pFW->param->u); + sprintf(pVM->pad, "constant = %ld (%#lx)", + (long)pFW->param->i, (unsigned long)pFW->param->u); vmTextOut(pVM, pVM->pad, 1); default: From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 06:47:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1CD99E70; Sun, 7 Apr 2013 06:47:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0FB3B1AB7; Sun, 7 Apr 2013 06:47:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r376liFa041945; Sun, 7 Apr 2013 06:47:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r376liaa041944; Sun, 7 Apr 2013 06:47:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304070647.r376liaa041944@svn.freebsd.org> From: Alexander Motin Date: Sun, 7 Apr 2013 06:47:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249224 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 06:47:45 -0000 Author: mav Date: Sun Apr 7 06:47:44 2013 New Revision: 249224 URL: http://svnweb.freebsd.org/changeset/base/249224 Log: Remove extra semicolons from CAM_SIM_[UN]LOCK() macros. Modified: head/sys/cam/cam_sim.h Modified: head/sys/cam/cam_sim.h ============================================================================== --- head/sys/cam/cam_sim.h Sun Apr 7 05:53:42 2013 (r249223) +++ head/sys/cam/cam_sim.h Sun Apr 7 06:47:44 2013 (r249224) @@ -123,8 +123,8 @@ struct cam_sim { }; -#define CAM_SIM_LOCK(sim) mtx_lock((sim)->mtx); -#define CAM_SIM_UNLOCK(sim) mtx_unlock((sim)->mtx); +#define CAM_SIM_LOCK(sim) mtx_lock((sim)->mtx) +#define CAM_SIM_UNLOCK(sim) mtx_unlock((sim)->mtx) static __inline u_int32_t cam_sim_path(struct cam_sim *sim) From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 13:03:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1F1D8937; Sun, 7 Apr 2013 13:03:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EB3EBB47; Sun, 7 Apr 2013 13:03:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37D3wSS051734; Sun, 7 Apr 2013 13:03:58 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37D3vEc051731; Sun, 7 Apr 2013 13:03:57 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201304071303.r37D3vEc051731@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 7 Apr 2013 13:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249232 - in head/sys: arm/at91 dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 13:03:59 -0000 Author: hselasky Date: Sun Apr 7 13:03:57 2013 New Revision: 249232 URL: http://svnweb.freebsd.org/changeset/base/249232 Log: Fix regression issue after r248910. PR: arm/177685 Submitted by: Christoph Mallon Modified: head/sys/arm/at91/at91_pio.c head/sys/arm/at91/at91_piovar.h head/sys/dev/usb/controller/at91dci_atmelarm.c Modified: head/sys/arm/at91/at91_pio.c ============================================================================== --- head/sys/arm/at91/at91_pio.c Sun Apr 7 11:05:38 2013 (r249231) +++ head/sys/arm/at91/at91_pio.c Sun Apr 7 13:03:57 2013 (r249232) @@ -554,12 +554,12 @@ at91_pio_gpio_clear(uint32_t pio, uint32 PIO[PIO_CODR / 4] = data_mask; } -uint8_t +uint32_t at91_pio_gpio_get(uint32_t pio, uint32_t data_mask) { uint32_t *PIO = (uint32_t *)(AT91_BASE + pio); - return ((PIO[PIO_PDSR / 4] & data_mask)); + return (PIO[PIO_PDSR / 4] & data_mask); } void Modified: head/sys/arm/at91/at91_piovar.h ============================================================================== --- head/sys/arm/at91/at91_piovar.h Sun Apr 7 11:05:38 2013 (r249231) +++ head/sys/arm/at91/at91_piovar.h Sun Apr 7 13:03:57 2013 (r249232) @@ -39,7 +39,7 @@ void at91_pio_gpio_output(uint32_t pio, void at91_pio_gpio_high_z(uint32_t pio, uint32_t high_z_mask, int enable); void at91_pio_gpio_set(uint32_t pio, uint32_t data_mask); void at91_pio_gpio_clear(uint32_t pio, uint32_t data_mask); -uint8_t at91_pio_gpio_get(uint32_t pio, uint32_t data_mask); +uint32_t at91_pio_gpio_get(uint32_t pio, uint32_t data_mask); void at91_pio_gpio_set_deglitch(uint32_t pio, uint32_t data_mask, int use_deglitch); void at91_pio_gpio_set_interrupt(uint32_t pio, uint32_t data_mask, Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/at91dci_atmelarm.c Sun Apr 7 11:05:38 2013 (r249231) +++ head/sys/dev/usb/controller/at91dci_atmelarm.c Sun Apr 7 13:03:57 2013 (r249232) @@ -91,7 +91,7 @@ at91_vbus_poll(struct at91_udp_softc *sc { uint8_t vbus_val; - vbus_val = at91_pio_gpio_get(VBUS_BASE, VBUS_MASK); + vbus_val = at91_pio_gpio_get(VBUS_BASE, VBUS_MASK) != 0; at91dci_vbus_interrupt(&sc->sc_dci, vbus_val); callout_reset(&sc->sc_vbus, hz, (void *)&at91_vbus_poll, sc); From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 13:05:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DDBFFAAE; Sun, 7 Apr 2013 13:05:06 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx1.freebsd.org (Postfix) with ESMTP id 6B28EB53; Sun, 7 Apr 2013 13:05:06 +0000 (UTC) Received: by mail-ve0-f181.google.com with SMTP id pa12so4593321veb.26 for ; Sun, 07 Apr 2013 06:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=rARG1IbRt0/kr8OBzs8S7wRjHLeKclF8lCtZLszNe+I=; b=sQLpaMchzl74A4ZyhNHJeuY3Ud1qqxiKoBWEffkl38TpJd/lUVskSz25S/iy4yqXGg 56lxlcgS5wpujTqkI01vHK2wdYgNchqkUuOgM1yHoELH83YkPgCtCXDH7FRjrpb3sPJF PQda91UTJx9aRIZYicU81cCZkJb/bGyHFw3+FWd8unbP4+EVrUcUrju6gdDTA/sADOWk 8ekOT0+yJKAPxXJjiqmOcEkH0zu4E9wX/1tOp4bNZAakuEK3QJpalQpgr92Usj78NlWJ YOyvkE6vlwF4k9SkzEDSRe4X2PRWbkgCBAWQ9hk1vmNgejOUu5GTuib2VMuKBX6u3YRs UcjQ== X-Received: by 10.59.11.199 with SMTP id ek7mr13200842ved.19.1365339900270; Sun, 07 Apr 2013 06:05:00 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.59.9.103 with HTTP; Sun, 7 Apr 2013 06:04:40 -0700 (PDT) In-Reply-To: <201304030827.r338RZih051806@svn.freebsd.org> References: <201304030827.r338RZih051806@svn.freebsd.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Sun, 7 Apr 2013 15:04:40 +0200 X-Google-Sender-Auth: HaOnLsmyvvi2B3rCxV7K3JpnCIo Message-ID: Subject: Re: svn commit: r249041 - in head/sys/dev/drm2: . i915 To: Jean-Sebastien Pedron 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 13:05:06 -0000 On Wed, Apr 3, 2013 at 10:27 AM, Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Wed Apr 3 08:27:35 2013 > New Revision: 249041 > URL: http://svnweb.freebsd.org/changeset/base/249041 > > Log: > drm and i915: Left-shift iic_msg.slave at creation time > Hi Jean-S=E9bastien, I believed this change brings a bug on my laptop that uses drm2/i915kms drivers: Xorg is no more able to probe the capability of external screen connected to DP port and I can't use the audio output of this screen too. Before this commit (rev 249040), here is an extract of my /var/log/Xorg.log regarding the probing part on DP1 connector: [ 45.194] (II) intel(0): EDID for output DP1 [ 45.194] (II) intel(0): Manufacturer: ACI Model: 24b1 Serial#: 168430= 09 [ 45.194] (II) intel(0): Year: 2012 Week: 23 [ 45.194] (II) intel(0): EDID Version: 1.4 [ 45.194] (II) intel(0): Digital Display Input [ 45.194] (II) intel(0): 8 bits per channel [ 45.194] (II) intel(0): Digital interface is DisplayPort [ 45.194] (II) intel(0): Max Image Size [cm]: horiz.: 55 vert.: 35 [ 45.194] (II) intel(0): Gamma: 2.20 [ 45.194] (II) intel(0): DPMS capabilities: Off [ 45.194] (II) intel(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 YCrCb 4:2:2 [ 45.194] (II) intel(0): First detailed timing is preferred mode [ 45.194] (II) intel(0): Preferred mode is native pixel format and refresh rate [ 45.194] (II) intel(0): redX: 0.637 redY: 0.331 greenX: 0.304 greenY: 0.626 [ 45.194] (II) intel(0): blueX: 0.152 blueY: 0.071 whiteX: 0.313 whiteY: 0.329 (etc...) [ 45.194] (II) intel(0): Printing probed modes for output DP1 [ 45.194] (II) intel(0): Modeline "1920x1200"x60.0 154.00 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync (74.0 kHz eP) [ 45.194] (II) intel(0): Modeline "1920x1080"x60.0 138.50 1920 1968 2000 2080 1080 1083 1088 1110 +hsync -vsync (66.6 kHz e) [ 45.194] (II) intel(0): Modeline "1600x1200"x60.0 162.00 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync (75.0 kHz e) [ 45.194] (II) intel(0): Modeline "1680x1050"x60.0 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync (65.3 kHz e) [ 45.194] (II) intel(0): Modeline "1280x1024"x75.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e) [ 45.194] (II) intel(0): Modeline "1280x1024"x60.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz e) [ 45.194] (II) intel(0): Modeline "1440x900"x59.9 106.50 1440 1520 1672 1904 900 903 909 934 -hsync +vsync (55.9 kHz e) [ 45.194] (II) intel(0): Modeline "1280x960"x60.0 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync (60.0 kHz e After this commit (rev 249226) , here is the probing part regarding the same connector/screen (only basic resolution support and no audio output): [ 264.837] (II) intel(0): EDID for output DP1 [ 264.837] (II) intel(0): Printing probed modes for output DP1 [ 264.837] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e) [ 264.837] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e) [ 264.837] (II) intel(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz e) [ 264.837] (II) intel(0): Modeline "848x480"x60.0 33.75 848 864 976 1088 480 486 494 517 +hsync +vsync (31.0 kHz e) [ 264.837] (II) intel(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 489 492 525 -hsync -vsync (31.5 kHz e) How can I help you to troubleshoot this bug ? Regards, Olivier From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 13:14:23 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 31330D0C; Sun, 7 Apr 2013 13:14:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id 08E09BEC; Sun, 7 Apr 2013 13:14:22 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UOpQG-000F4u-6I; Sun, 07 Apr 2013 13:14:16 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r37DED4K026151; Sun, 7 Apr 2013 07:14:13 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX182CmPlj3kmEzKe4d+lPzgq Subject: Re: svn commit: r249232 - in head/sys: arm/at91 dev/usb/controller From: Ian Lepore To: Hans Petter Selasky In-Reply-To: <201304071303.r37D3vEc051731@svn.freebsd.org> References: <201304071303.r37D3vEc051731@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 07 Apr 2013 07:14:13 -0600 Message-ID: <1365340453.41399.166.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 13:14:23 -0000 You forgot to say: Pointy Hat to: ian I'm not quite sure how I fumbled the return-type change when I applied the patches from our local repo; thanks to Christoph for spotting this. -- Ian On Sun, 2013-04-07 at 13:03 +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Sun Apr 7 13:03:57 2013 > New Revision: 249232 > URL: http://svnweb.freebsd.org/changeset/base/249232 > > Log: > Fix regression issue after r248910. > > PR: arm/177685 > Submitted by: Christoph Mallon > > Modified: > head/sys/arm/at91/at91_pio.c > head/sys/arm/at91/at91_piovar.h > head/sys/dev/usb/controller/at91dci_atmelarm.c > > Modified: head/sys/arm/at91/at91_pio.c > ============================================================================== > --- head/sys/arm/at91/at91_pio.c Sun Apr 7 11:05:38 2013 (r249231) > +++ head/sys/arm/at91/at91_pio.c Sun Apr 7 13:03:57 2013 (r249232) > @@ -554,12 +554,12 @@ at91_pio_gpio_clear(uint32_t pio, uint32 > PIO[PIO_CODR / 4] = data_mask; > } > > -uint8_t > +uint32_t > at91_pio_gpio_get(uint32_t pio, uint32_t data_mask) > { > uint32_t *PIO = (uint32_t *)(AT91_BASE + pio); > > - return ((PIO[PIO_PDSR / 4] & data_mask)); > + return (PIO[PIO_PDSR / 4] & data_mask); > } > > void > > Modified: head/sys/arm/at91/at91_piovar.h > ============================================================================== > --- head/sys/arm/at91/at91_piovar.h Sun Apr 7 11:05:38 2013 (r249231) > +++ head/sys/arm/at91/at91_piovar.h Sun Apr 7 13:03:57 2013 (r249232) > @@ -39,7 +39,7 @@ void at91_pio_gpio_output(uint32_t pio, > void at91_pio_gpio_high_z(uint32_t pio, uint32_t high_z_mask, int enable); > void at91_pio_gpio_set(uint32_t pio, uint32_t data_mask); > void at91_pio_gpio_clear(uint32_t pio, uint32_t data_mask); > -uint8_t at91_pio_gpio_get(uint32_t pio, uint32_t data_mask); > +uint32_t at91_pio_gpio_get(uint32_t pio, uint32_t data_mask); > void at91_pio_gpio_set_deglitch(uint32_t pio, uint32_t data_mask, > int use_deglitch); > void at91_pio_gpio_set_interrupt(uint32_t pio, uint32_t data_mask, > > Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c > ============================================================================== > --- head/sys/dev/usb/controller/at91dci_atmelarm.c Sun Apr 7 11:05:38 2013 (r249231) > +++ head/sys/dev/usb/controller/at91dci_atmelarm.c Sun Apr 7 13:03:57 2013 (r249232) > @@ -91,7 +91,7 @@ at91_vbus_poll(struct at91_udp_softc *sc > { > uint8_t vbus_val; > > - vbus_val = at91_pio_gpio_get(VBUS_BASE, VBUS_MASK); > + vbus_val = at91_pio_gpio_get(VBUS_BASE, VBUS_MASK) != 0; > at91dci_vbus_interrupt(&sc->sc_dci, vbus_val); > > callout_reset(&sc->sc_vbus, hz, (void *)&at91_vbus_poll, sc); From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 13:27:29 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8752F228; Sun, 7 Apr 2013 13:27:29 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 48DDDCF7; Sun, 7 Apr 2013 13:27:29 +0000 (UTC) Received: from mail.bitfrost.no (mail.bitfrost.no [46.29.221.36]) by mta.bitpro.no (Postfix) with ESMTP id 796DD7A22B; Sun, 7 Apr 2013 15:27:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bitfrost.no Received: from laptop015.hselasky.homeunix.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hanspetter) by mail.bitfrost.no (Postfix) with ESMTPSA id 4B35C21022; Sun, 7 Apr 2013 15:27:25 +0200 (CEST) Message-ID: <51617497.8090407@bitfrost.no> Date: Sun, 07 Apr 2013 15:28:55 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r249232 - in head/sys: arm/at91 dev/usb/controller References: <201304071303.r37D3vEc051731@svn.freebsd.org> <1365340453.41399.166.camel@revolution.hippie.lan> In-Reply-To: <1365340453.41399.166.camel@revolution.hippie.lan> 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, Hans Petter Selasky X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 13:27:29 -0000 On 04/07/13 15:14, Ian Lepore wrote: > You forgot to say: > > Pointy Hat to: ian > > I'm not quite sure how I fumbled the return-type change when I applied > the patches from our local repo; thanks to Christoph for spotting this. > > -- Ian I will be more hard next time ;-) --HPS From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 15:26:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AEC7D728; Sun, 7 Apr 2013 15:26:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 91302160; Sun, 7 Apr 2013 15:26:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37FQAdo093029; Sun, 7 Apr 2013 15:26:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37FQAt7093026; Sun, 7 Apr 2013 15:26:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304071526.r37FQAt7093026@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 7 Apr 2013 15:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249233 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 15:26:10 -0000 Author: jilles Date: Sun Apr 7 15:26:09 2013 New Revision: 249233 URL: http://svnweb.freebsd.org/changeset/base/249233 Log: mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE. POSIX mqueue, compatibility ksem and POSIX shm create a file descriptor that has close-on-exec set. However, they do this incorrectly, leaving a window where a thread may fork and exec while the flag has not been set yet. The race is easily reproduced on a multicore system with one thread doing shm_open and close and another thread doing posix_spawnp and waitpid. Set UF_EXCLOSE via falloc()'s flags argument instead. This also simplifies the code. MFC after: 1 week Modified: head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sem.c head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Sun Apr 7 13:03:57 2013 (r249232) +++ head/sys/kern/uipc_mqueue.c Sun Apr 7 15:26:09 2013 (r249233) @@ -1977,7 +1977,7 @@ kern_kmq_open(struct thread *td, const c if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL) return (EINVAL); - error = falloc(td, &fp, &fd, 0); + error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) return (error); @@ -2032,10 +2032,6 @@ kern_kmq_open(struct thread *td, const c finit(fp, flags & (FREAD | FWRITE | O_NONBLOCK), DTYPE_MQUEUE, pn, &mqueueops); - FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd].fde_file == fp) - fdp->fd_ofiles[fd].fde_flags |= UF_EXCLOSE; - FILEDESC_XUNLOCK(fdp); td->td_retval[0] = fd; fdrop(fp, td); return (0); Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Sun Apr 7 13:03:57 2013 (r249232) +++ head/sys/kern/uipc_sem.c Sun Apr 7 15:26:09 2013 (r249233) @@ -485,7 +485,7 @@ ksem_create(struct thread *td, const cha fdp = td->td_proc->p_fd; mode = (mode & ~fdp->fd_cmask) & ACCESSPERMS; - error = falloc(td, &fp, &fd, 0); + error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) { if (name == NULL) error = ENOSPC; @@ -578,10 +578,6 @@ ksem_create(struct thread *td, const cha finit(fp, FREAD | FWRITE, DTYPE_SEM, ks, &ksem_ops); - FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd].fde_file == fp) - fdp->fd_ofiles[fd].fde_flags |= UF_EXCLOSE; - FILEDESC_XUNLOCK(fdp); fdrop(fp, td); return (0); Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sun Apr 7 13:03:57 2013 (r249232) +++ head/sys/kern/uipc_shm.c Sun Apr 7 15:26:09 2013 (r249233) @@ -534,7 +534,7 @@ sys_shm_open(struct thread *td, struct s fdp = td->td_proc->p_fd; cmode = (uap->mode & ~fdp->fd_cmask) & ACCESSPERMS; - error = falloc(td, &fp, &fd, 0); + error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) return (error); @@ -629,10 +629,6 @@ sys_shm_open(struct thread *td, struct s finit(fp, FFLAGS(uap->flags & O_ACCMODE), DTYPE_SHM, shmfd, &shm_ops); - FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd].fde_file == fp) - fdp->fd_ofiles[fd].fde_flags |= UF_EXCLOSE; - FILEDESC_XUNLOCK(fdp); td->td_retval[0] = fd; fdrop(fp, td); From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 15:33:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 87F7BA68; Sun, 7 Apr 2013 15:33:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF771BF; Sun, 7 Apr 2013 15:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37FX7SQ095591; Sun, 7 Apr 2013 15:33:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37FX7p9095590; Sun, 7 Apr 2013 15:33:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201304071533.r37FX7p9095590@svn.freebsd.org> From: Marius Strobl Date: Sun, 7 Apr 2013 15:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249234 - head/usr.sbin/rarpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 15:33:07 -0000 Author: marius Date: Sun Apr 7 15:33:06 2013 New Revision: 249234 URL: http://svnweb.freebsd.org/changeset/base/249234 Log: Add some missing newlines and static declarations. MFC after: 3 days Modified: head/usr.sbin/rarpd/rarpd.c Modified: head/usr.sbin/rarpd/rarpd.c ============================================================================== --- head/usr.sbin/rarpd/rarpd.c Sun Apr 7 15:26:09 2013 (r249233) +++ head/usr.sbin/rarpd/rarpd.c Sun Apr 7 15:33:06 2013 (r249234) @@ -90,13 +90,13 @@ struct if_info { * The list of all interfaces that are being listened to. rarp_loop() * "selects" on the descriptors in this list. */ -struct if_info *iflist; +static struct if_info *iflist; -int verbose; /* verbose messages */ -const char *tftp_dir = TFTP_DIR; /* tftp directory */ +static int verbose; /* verbose messages */ +static const char *tftp_dir = TFTP_DIR; /* tftp directory */ -int dflag; /* messages to stdout/stderr, not syslog(3) */ -int sflag; /* ignore /tftpboot */ +static int dflag; /* messages to stdout/stderr, not syslog(3) */ +static int sflag; /* ignore /tftpboot */ static u_char zero[6]; @@ -308,6 +308,7 @@ init_one(struct ifaddrs *ifa, char *targ break; } } + /* * Initialize all "candidate" interfaces that are in the system * configuration list. A "candidate" is up, not loopback and not @@ -369,6 +370,7 @@ init(char *target) static void usage(void) { + (void)fprintf(stderr, "%s\n%s\n", "usage: rarpd -a [-dfsv] [-t directory] [-P pidfile]", " rarpd [-dfsv] [-t directory] [-P pidfile] interface"); @@ -630,6 +632,7 @@ rarp_bootable_err: static in_addr_t choose_ipaddr(in_addr_t **alist, in_addr_t net, in_addr_t netmask) { + for (; *alist; ++alist) if ((**alist & netmask) == net) return **alist; @@ -692,16 +695,18 @@ rarp_process(struct if_info *ii, u_char * host (i.e. the guy running rarpd), won't try to ARP for the hardware * address of the guy being booted (he cannot answer the ARP). */ -struct sockaddr_in sin_inarp = { +static struct sockaddr_in sin_inarp = { sizeof(struct sockaddr_in), AF_INET, 0, {0}, {0}, }; -struct sockaddr_dl sin_dl = { + +static struct sockaddr_dl sin_dl = { sizeof(struct sockaddr_dl), AF_LINK, 0, IFT_ETHER, 0, 6, 0, "" }; -struct { + +static struct { struct rt_msghdr rthdr; char rtspace[512]; } rtmsg; @@ -883,6 +888,7 @@ rarp_reply(struct if_info *ii, struct et static in_addr_t ipaddrtonetmask(in_addr_t addr) { + addr = ntohl(addr); if (IN_CLASSA(addr)) return htonl(IN_CLASSA_NET); From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 16:28:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 71199215; Sun, 7 Apr 2013 16:28:37 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6339E344; Sun, 7 Apr 2013 16:28:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37GSaA1010951; Sun, 7 Apr 2013 16:28:36 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37GSaMH010950; Sun, 7 Apr 2013 16:28:36 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304071628.r37GSaMH010950@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 7 Apr 2013 16:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249235 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 16:28:37 -0000 Author: jilles Date: Sun Apr 7 16:28:36 2013 New Revision: 249235 URL: http://svnweb.freebsd.org/changeset/base/249235 Log: sh: Add const to nodesavestr(). Modified: head/bin/sh/nodes.c.pat Modified: head/bin/sh/nodes.c.pat ============================================================================== --- head/bin/sh/nodes.c.pat Sun Apr 7 15:33:06 2013 (r249234) +++ head/bin/sh/nodes.c.pat Sun Apr 7 16:28:36 2013 (r249235) @@ -58,7 +58,7 @@ static void calcsize(union node *); static void sizenodelist(struct nodelist *); static union node *copynode(union node *); static struct nodelist *copynodelist(struct nodelist *); -static char *nodesavestr(char *); +static char *nodesavestr(const char *); struct funcdef { @@ -147,9 +147,9 @@ copynodelist(struct nodelist *lp) static char * -nodesavestr(char *s) +nodesavestr(const char *s) { - char *p = s; + const char *p = s; char *q = funcstring; char *rtn = funcstring; From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 17:34:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8A92EE0F; Sun, 7 Apr 2013 17:34:48 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (ns25270.ovh.net [91.121.29.24]) by mx1.freebsd.org (Postfix) with ESMTP id 50A17758; Sun, 7 Apr 2013 17:34:47 +0000 (UTC) Received: from corvisart.dumbbell.fr ([88.178.10.224] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UOtSv-0004vN-Fd; Sun, 07 Apr 2013 19:33:22 +0200 Message-ID: <5161ADD8.6090607@FreeBSD.org> Date: Sun, 07 Apr 2013 19:33:12 +0200 From: =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Olivier_Cochard-Labb=E9?= Subject: Re: svn commit: r249041 - in head/sys/dev/drm2: . i915 References: <201304030827.r338RZih051806@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2DACPVIWLOOKXKTKBJCUX" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 17:34:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2DACPVIWLOOKXKTKBJCUX Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07.04.2013 15:04, Olivier Cochard-Labb=E9 wrote: >> New Revision: 249041 >> >> Log: >> drm and i915: Left-shift iic_msg.slave at creation time >=20 > Hi Jean-S=E9bastien, >=20 > I believed this change brings a bug on my laptop that uses > drm2/i915kms drivers: Xorg is no more able to probe the capability of > external screen connected to DP port and I can't use the audio output > of this screen too. Hi Olivier! Could you please try the following patch? http://people.freebsd.org/~dumbbell/radeonkms/drm-i915-intel_iic.a.patch It reverts a part of the commit, the one in intel_gmbus_transfer(). I think this function was called with the .slave address already left-shift= ed. --=20 Jean-S=E9bastien P=E9dron ------enig2DACPVIWLOOKXKTKBJCUX 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.19 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFhrd0ACgkQa+xGJsFYOlPhGACfWnaa6sGNJ/gp83rQOUnfGOcL c1AAmQFiVnjzOEf8/xKA6c9FK70YYOVI =yff2 -----END PGP SIGNATURE----- ------enig2DACPVIWLOOKXKTKBJCUX-- From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 17:40:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 09E05188; Sun, 7 Apr 2013 17:40:50 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F0E317A0; Sun, 7 Apr 2013 17:40:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37HenWd033745; Sun, 7 Apr 2013 17:40:49 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37HenSF033744; Sun, 7 Apr 2013 17:40:49 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304071740.r37HenSF033744@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 7 Apr 2013 17:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249238 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 17:40:50 -0000 Author: trociny Date: Sun Apr 7 17:40:49 2013 New Revision: 249238 URL: http://svnweb.freebsd.org/changeset/base/249238 Log: Use 4-byte padding for core dump notes on both 32 and 64bit archs. Although native word padding (i.e. 8-byte on 64bit arch) looks to be in agreement with standards, other parts of our code and other OSes use 4-byte alignment. This is not expected to change alignment for currently generated core dump notes, as the notes look to consist of structures with sizes multiple of 8 on 64-bit archs. But there are plans to add additional notes, where 4-byte vs 8-byte alignment makes difference. Discussed with: kib Reviewed by: kib MFC after: 2 weeks Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Apr 7 17:06:26 2013 (r249237) +++ head/sys/kern/imgact_elf.c Sun Apr 7 17:40:49 2013 (r249238) @@ -1538,10 +1538,10 @@ __elfN(putnote)(void *dst, size_t *off, *off += sizeof note; if (dst != NULL) bcopy(name, (char *)dst + *off, note.n_namesz); - *off += roundup2(note.n_namesz, sizeof(Elf_Size)); + *off += roundup2(note.n_namesz, sizeof(Elf32_Size)); if (dst != NULL) bcopy(desc, (char *)dst + *off, note.n_descsz); - *off += roundup2(note.n_descsz, sizeof(Elf_Size)); + *off += roundup2(note.n_descsz, sizeof(Elf32_Size)); } static boolean_t From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 17:42:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 20981313; Sun, 7 Apr 2013 17:42:28 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 13A587AD; Sun, 7 Apr 2013 17:42:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37HgRve034011; Sun, 7 Apr 2013 17:42:27 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37HgRK5034010; Sun, 7 Apr 2013 17:42:27 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304071742.r37HgRK5034010@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 7 Apr 2013 17:42:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249239 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 17:42:28 -0000 Author: trociny Date: Sun Apr 7 17:42:27 2013 New Revision: 249239 URL: http://svnweb.freebsd.org/changeset/base/249239 Log: Fill p_flags and p_align fields of the core dump note segement. Reviewed by: kib MFC after: 2 weeks Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Apr 7 17:40:49 2013 (r249238) +++ head/sys/kern/imgact_elf.c Sun Apr 7 17:42:27 2013 (r249239) @@ -1513,8 +1513,8 @@ __elfN(puthdr)(struct thread *td, void * phdr->p_paddr = 0; phdr->p_filesz = notesz; phdr->p_memsz = 0; - phdr->p_flags = 0; - phdr->p_align = 0; + phdr->p_flags = PF_R; + phdr->p_align = sizeof(Elf32_Size); phdr++; /* All the writable segments from the program. */ From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 17:44:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18AB65A7; Sun, 7 Apr 2013 17:44:31 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0BBD57CE; Sun, 7 Apr 2013 17:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37HiUJU034336; Sun, 7 Apr 2013 17:44:30 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37HiUq7034335; Sun, 7 Apr 2013 17:44:30 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304071744.r37HiUq7034335@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 7 Apr 2013 17:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249240 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 17:44:31 -0000 Author: trociny Date: Sun Apr 7 17:44:30 2013 New Revision: 249240 URL: http://svnweb.freebsd.org/changeset/base/249240 Log: Use pget(9) to reduce code duplication. MFC after: 1 week Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Apr 7 17:42:27 2013 (r249239) +++ head/sys/kern/kern_descrip.c Sun Apr 7 17:44:30 2013 (r249240) @@ -2944,12 +2944,9 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE struct tty *tp; name = (int *)arg1; - if ((p = pfind((pid_t)name[0])) == NULL) - return (ESRCH); - if ((error = p_candebug(curthread, p))) { - PROC_UNLOCK(p); + error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + if (error != 0) return (error); - } fdp = fdhold(p); PROC_UNLOCK(p); if (fdp == NULL) @@ -3239,12 +3236,9 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER cap_rights_t fd_cap_rights; name = (int *)arg1; - if ((p = pfind((pid_t)name[0])) == NULL) - return (ESRCH); - if ((error = p_candebug(curthread, p))) { - PROC_UNLOCK(p); + error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + if (error != 0) return (error); - } /* ktrace vnode */ tracevp = p->p_tracevp; if (tracevp != NULL) From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 17:54:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3C96A895; Sun, 7 Apr 2013 17:54:39 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2F722809; Sun, 7 Apr 2013 17:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37HscZs037338; Sun, 7 Apr 2013 17:54:38 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37HscqW037337; Sun, 7 Apr 2013 17:54:38 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304071754.r37HscqW037337@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 7 Apr 2013 17:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249241 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 17:54:39 -0000 Author: trociny Date: Sun Apr 7 17:54:38 2013 New Revision: 249241 URL: http://svnweb.freebsd.org/changeset/base/249241 Log: Fix synopsis for sbuf_len. MFC after: 3 days Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Sun Apr 7 17:44:30 2013 (r249240) +++ head/share/man/man9/sbuf.9 Sun Apr 7 17:54:38 2013 (r249241) @@ -94,7 +94,7 @@ .Fn sbuf_finish "struct sbuf *s" .Ft char * .Fn sbuf_data "struct sbuf *s" -.Ft int +.Ft ssize_t .Fn sbuf_len "struct sbuf *s" .Ft int .Fn sbuf_done "struct sbuf *s" From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 18:49:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1BC9B36F; Sun, 7 Apr 2013 18:49:11 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vb0-x22d.google.com (mail-vb0-x22d.google.com [IPv6:2607:f8b0:400c:c02::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 99BAD9CA; Sun, 7 Apr 2013 18:49:10 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id w15so3263842vbf.18 for ; Sun, 07 Apr 2013 11:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=ZwR3SzEQ+XksEqs9KKUxveKil3Nj+xWEnA0AZOPOUmY=; b=b+ROSlekOYBhR4ZVAYBz1Yvv24R5Jh4jTD3Z/lj4OAetFpZiVul4jFsed23o3fiUa9 BLPVQtOMRbfdHoQ39KI/jwtk3F4EbLJl7zNDZ/yQAHmwKs3cl4J4aQ8RF127qZrDs0lM BzP/SJcNwEi34+iPnpdfXgSGJcDlRUyy4Ewhg+U5P+X/hAqmpdSSl1EUhxeIR0OMwvfF IW06RoK1AWFeP3h5VDEYFKBuI8nyXl2l/lHxnDk2TJfcbEsK22gXQ+0L1doNAF8Lmjje G9854VMO+bex0v9J41q7BZMy3fj+zIjPxlTueUOZ33HPmWMeUqCM+OfFlYB7W8fS+HaD gg7g== X-Received: by 10.220.107.210 with SMTP id c18mr13941070vcp.5.1365360549961; Sun, 07 Apr 2013 11:49:09 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.59.9.103 with HTTP; Sun, 7 Apr 2013 11:48:49 -0700 (PDT) In-Reply-To: <5161ADD8.6090607@FreeBSD.org> References: <201304030827.r338RZih051806@svn.freebsd.org> <5161ADD8.6090607@FreeBSD.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Sun, 7 Apr 2013 20:48:49 +0200 X-Google-Sender-Auth: gEH4P7mlgvQesprboHgihoBSfZ8 Message-ID: Subject: Re: svn commit: r249041 - in head/sys/dev/drm2: . i915 To: =?ISO-8859-1?Q?Jean=2DS=E9bastien_P=E9dron?= Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 18:49:11 -0000 On Sun, Apr 7, 2013 at 7:33 PM, Jean-S=E9bastien P=E9dron wrote: > Hi Olivier! > > Could you please try the following patch? > http://people.freebsd.org/~dumbbell/radeonkms/drm-i915-intel_iic.a.patch > > It reverts a part of the commit, the one in intel_gmbus_transfer(). I > think this function was called with the .slave address already left-shift= ed. > Thanks for your fast response: svn up to latest rev 249241 + applied your patch=85 But still same problem = :-( Here is my full dmesg+xorg.log at r249241 with your patch (non working): http://gugus69.free.fr/freebsd/i915kms.r249241-patched.txt And here is the full dmesg + xorg.log at r249040 (working): http://gugus69.free.fr/freebsd/i915kms.r249040.txt Regards, Olivier From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 19:05:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C981A711; Sun, 7 Apr 2013 19:05:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF2BA8D; Sun, 7 Apr 2013 19:05:15 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r37J59Pm029646; Sun, 7 Apr 2013 22:05:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.2 kib.kiev.ua r37J59Pm029646 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r37J59AO029645; Sun, 7 Apr 2013 22:05:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 7 Apr 2013 22:05:09 +0300 From: Konstantin Belousov To: Olivier Cochard-Labb? Subject: Re: svn commit: r249041 - in head/sys/dev/drm2: . i915 Message-ID: <20130407190509.GA2930@kib.kiev.ua> References: <201304030827.r338RZih051806@svn.freebsd.org> <5161ADD8.6090607@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head , svn-src-all , src-committers , Jean-S?bastien P?dron X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 19:05:16 -0000 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 07, 2013 at 08:48:49PM +0200, Olivier Cochard-Labb? wrote: > On Sun, Apr 7, 2013 at 7:33 PM, Jean-S?bastien P?dron > wrote: >=20 > > Hi Olivier! > > > > Could you please try the following patch? > > http://people.freebsd.org/~dumbbell/radeonkms/drm-i915-intel_iic.a.patch > > > > It reverts a part of the commit, the one in intel_gmbus_transfer(). I > > think this function was called with the .slave address already left-shi= fted. > > >=20 > Thanks for your fast response: > svn up to latest rev 249241 + applied your patch? But still same problem = :-( >=20 > Here is my full dmesg+xorg.log at r249241 with your patch (non working): > http://gugus69.free.fr/freebsd/i915kms.r249241-patched.txt >=20 > And here is the full dmesg + xorg.log at r249040 (working): > http://gugus69.free.fr/freebsd/i915kms.r249040.txt I suspect that the issue is with the drm2/i915/intel_dp.c. You might try to use shift to 7 instead of 8 for address in the intel_dp_aux_native_read/write, but I am not sure. More useful debug info could be obtained by setting the kenv drm.debug to 3, and then looking at the dmesg. --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRYcNkAAoJEJDCuSvBvK1BkNEP/ieX0tdqHOtMgjdxFeRjOx84 Ad7tNVKRVlSZ7Ab5o2bTrYC+IrIB8i8FKVC7GS/RQg/8qESoFMiNCV4r8vsdvI1/ RdUdFXmgs5bbov6yJKcEAHsG554vXKOlqn5DBOSiNj7InEnpOGgT61DF9NkTtDwE hR8sbI9CFJaJUPLIVGzMZ6Boy9kHRPOux+rnFM5UvMdUQqWPIoO+7Gvomrr0aU2D NgwOHgYMCdTTwxjwmkmPxfKBnNBfi+RBC+sO57uYe1uToti+VnCjmUkydmS4epCt zjsEzJrCt5WXTDG3JjmWva7MeKtiSArKOQz/F+HuvKQ476IuzDnuORiwVhcJOgo9 RoB7jKeJ1a17kdWUbJlHK5DSx6l1+M8DrLR/u8V4BOitntbHQyVidCAw+Haf7pHi fTMCU2WBIkN0J2CAWF4q9YLN82qUFjDA0ci1QrkOAR0puEEpK11JJMd78Lk84wpl NRriBcZSsxjUEDa/rMxBfHFCJh7vuus77qpQR9t6FPigon/arm2y+heN6c3WjCx3 IeruGk3nIIrPp8B1v4BkfP2O6YSBqo4ez3+7N/xydtxZYa5lsEqaEdb3jcuBtgMl fN35nYx21/odQs+f6NjmgExAiLNECjLDPsJLAFv9MVKwMj6N5NLtaRqimY8euTLS mcZAlYkZW79A2rRiYmE/ =HK/S -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/-- From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 21:13:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 03A8CDFB; Sun, 7 Apr 2013 21:13:26 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx1.freebsd.org (Postfix) with ESMTP id 8155DFD6; Sun, 7 Apr 2013 21:13:24 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id kw10so2139544vcb.19 for ; Sun, 07 Apr 2013 14:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=yGUoyFWneJC6BVhyRJtIkXKnvFGSwsX6DZDtMKqODKY=; b=GWxUoJWvWL7vRRTdBmDc9RGAl+nd66XJCOTSsoiNMH+J9XWX+DaH2V7fNc11FROP9z GBY2PQeejsXYS7yIeSmnoDDjgGtnhQStPE1FcT+KAiWvHX4azkbSbPeuK9Ot51ri69Hs G4MfUjm4Nqh0EiL8hivSLjSg0DFyQhPvZyysLENQtdiSV4M7Ohfwb/jgrPo2BkEfV3yZ AbX2IBcM1Ph1tY4X6EG9jH9JJWBjGPv7fkvX3QJ+STlezQI/aiziUR+iHgby0njPJNCy Ww/y2EhPJnZLYnO2QFQH81xh4yzjRCMr7plf59cOvgyNmyYVFlQLO55/KCMX8xTosrj1 wLlA== X-Received: by 10.52.98.5 with SMTP id ee5mr11970211vdb.102.1365369197645; Sun, 07 Apr 2013 14:13:17 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.59.9.103 with HTTP; Sun, 7 Apr 2013 14:12:56 -0700 (PDT) In-Reply-To: <20130407190509.GA2930@kib.kiev.ua> References: <201304030827.r338RZih051806@svn.freebsd.org> <5161ADD8.6090607@FreeBSD.org> <20130407190509.GA2930@kib.kiev.ua> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Sun, 7 Apr 2013 23:12:56 +0200 X-Google-Sender-Auth: XFgBXBUgBS62gWWBvoNhIrrHEE0 Message-ID: Subject: Re: svn commit: r249041 - in head/sys/dev/drm2: . i915 To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head , svn-src-all , src-committers , Jean-S?bastien P?dron X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 21:13:26 -0000 On Sun, Apr 7, 2013 at 9:05 PM, Konstantin Belousov wrote: > > More useful debug info could be obtained by setting the kenv > drm.debug to 3, and then looking at the dmesg. OK, here are the 2 dmesg files: http://gugus69.free.fr/freebsd/dmesg.drm.debug.r249241-patched-non-working.txt http://gugus69.free.fr/freebsd/dmesg.drm.debug.r249040-working.txt ## Fast diff between theses files ## ### r249241-patched-non-working ### Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:7:LVDS-1] Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:7:LVDS-1] probed modes : Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_mode_debug_printmodeline] Modeline 27:"1366x768" 60 76300 1366 1430 1478 1606 768 770 775 792 0x8 0xa Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:11:VGA-1] Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_ironlake_crt_detect_hotplug] trigger hotplug detect cycle: adpa=0xf40000 Apr 7 22:48:25 laptop kernel: [drm:pid12:pch_irq_handler] i915: PCH transcoder audio interrupt Apr 7 22:48:25 laptop kernel: [drm:pid0:i915_hotplug_work_func] running encoder hotplug functions Apr 7 22:48:25 laptop kernel: [drm:KMS:pid0:i915_hotplug_work_func] running encoder hotplug functions Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_ironlake_crt_detect_hotplug] ironlake hotplug adpa=0xf40000, result 0 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_crt_detect] CRT not detected via hotplug Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:11:VGA-1] disconnected Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:14:HDMI-A-1] Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 5 error 2 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 4 error 2 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 3 error 2 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 2 error 2 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 1 error 2 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_hdmi_detect] [CONNECTOR:14:HDMI-A-1] got no edid, ddc port 5 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:14:HDMI-A-1] disconnected Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:17:DP-1] Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 5 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 4 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 3 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 2 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 1 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 5 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 4 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 3 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 2 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:intel_dp_i2c_aux_ch] aux_i2c nack Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:iic_dp_aux_xfer] dp_aux_xfer return 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_do_probe_ddc_edid] iicbus_transfer countdown 1 error 6 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_helper_probe_single_connector_modes] [CONNECTOR:17:DP-1] probed modes : Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_mode_debug_printmodeline] Modeline 30:"800x600" 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_mode_debug_printmodeline] Modeline 31:"848x480" 60 33750 848 864 976 1088 480 486 494 517 0x40 0x5 Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_mode_debug_printmodeline] Modeline 32:"1024x768" 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_mode_debug_printmodeline] Modeline 28:"640x480" 60 25175 640 656 752 800 480 489 492 525 0x40 0xa Apr 7 22:48:25 laptop kernel: [drm:KMS:pid945:drm_mode_debug_printmodeline] Modeline 29:"800x600" 56 36000 800 824 896 1024 600 601 603 625 0x40 0x5 ### r249040-working ### pr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_helper_probe_single_connector_modes] [CONNECTOR:7:LVDS-1] probed modes : Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 30:"1366x768" 60 76300 1366 1430 1478 1606 768 770 775 792 0x48 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 31:"1366x768" 40 50800 1366 1430 1478 1606 768 770 775 792 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_helper_probe_single_connector_modes] [CONNECTOR:14:VGA-1] Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:intel_ironlake_crt_detect_hotplug] trigger hotplug detect cycle: adpa=0xf40000 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:intel_ironlake_crt_detect_hotplug] ironlake hotplug adpa=0xf40000, result 0 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:intel_crt_detect] CRT not detected via hotplug Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_helper_probe_single_connector_modes] [CONNECTOR:14:VGA-1] disconnected Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_helper_probe_single_connector_modes] [CONNECTOR:17:HDMI-A-1] Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_do_probe_ddc_edid] iicbus_transfer countdown 5 error 2 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_do_probe_ddc_edid] iicbus_transfer countdown 4 error 2 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_do_probe_ddc_edid] iicbus_transfer countdown 3 error 2 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_do_probe_ddc_edid] iicbus_transfer countdown 2 error 2 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_do_probe_ddc_edid] iicbus_transfer countdown 1 error 2 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:intel_hdmi_detect] [CONNECTOR:17:HDMI-A-1] got no edid, ddc port 5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_helper_probe_single_connector_modes] [CONNECTOR:17:HDMI-A-1] disconnected Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_helper_probe_single_connector_modes] [CONNECTOR:20:DP-1] Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:iic_dp_aux_xfer] dp_aux_xfer return 0 Apr 7 22:41:40 laptop last message repeated 2 times Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_do_get_edid] got EDID from DP-1 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_detect_monitor_audio] Monitor has basic audio support Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:iic_dp_aux_xfer] dp_aux_xfer return 0 Apr 7 22:41:40 laptop last message repeated 2 times Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_do_get_edid] got EDID from DP-1 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_edid_to_eld] ELD monitor PA248 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_edid_to_eld] ELD size 7, SAD count 1 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_helper_probe_single_connector_modes] [CONNECTOR:20:DP-1] probed modes : Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 51:"800x600" 75 49500 800 816 896 1056 600 601 604 625 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 48:"1024x768" 70 75000 1024 1048 1184 1328 768 771 777 806 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 50:"832x624" 75 57284 832 864 928 1152 624 625 628 667 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 47:"1024x768" 75 78800 1024 1040 1136 1312 768 769 772 800 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 43:"640x480" 67 30240 640 704 768 864 480 483 486 525 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 38:"1680x1050" 60 146250 1680 1784 1960 2240 1050 1053 1059 1089 0x40 0x6 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 42:"640x480" 73 31500 640 664 704 832 480 489 491 520 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 44:"640x480" 60 25200 640 656 752 800 480 490 492 525 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 45:"720x400" 70 28320 720 738 846 900 400 412 414 449 0x40 0x6 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 52:"800x600" 72 50000 800 856 976 1040 600 637 643 666 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 41:"640x480" 75 31500 640 656 720 840 480 481 484 500 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 46:"1280x1024" 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 33:"1152x864" 75 108000 1152 1216 1344 1600 864 865 868 900 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 49:"1024x768" 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 39:"800x600" 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 37:"1600x1200" 60 162000 1600 1664 1856 2160 1200 1201 1204 1250 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 36:"1440x900" 60 106500 1440 1520 1672 1904 900 903 909 934 0x40 0x6 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 35:"1280x960" 60 108000 1280 1376 1488 1800 960 961 964 1000 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 34:"1280x1024" 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40 0x5 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 32:"1920x1080" 60 138500 1920 1968 2000 2080 1080 1083 1088 1110 0x40 0x9 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 11:"1920x1200" 60 154000 1920 1968 2000 2080 1200 1203 1209 1235 0x48 0x9 Apr 7 22:41:40 laptop kernel: [drm:KMS:pid955:drm_mode_debug_printmodeline] Modeline 40:"800x600" 56 36000 800 824 896 1024 600 601 603 625 0x40 0x5 Regards, Olivier From owner-svn-src-head@FreeBSD.ORG Sun Apr 7 22:31:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 65D9ED29; Sun, 7 Apr 2013 22:31:45 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (ns25270.ovh.net [91.121.29.24]) by mx1.freebsd.org (Postfix) with ESMTP id 29386349; Sun, 7 Apr 2013 22:31:44 +0000 (UTC) Received: from corvisart.dumbbell.fr ([88.178.10.224] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UOy7i-000AuH-Ha; Mon, 08 Apr 2013 00:31:43 +0200 Message-ID: <5161F3BA.8040001@FreeBSD.org> Date: Mon, 08 Apr 2013 00:31:22 +0200 From: =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r249041 - in head/sys/dev/drm2: . i915 References: <201304030827.r338RZih051806@svn.freebsd.org> <5161ADD8.6090607@FreeBSD.org> <20130407190509.GA2930@kib.kiev.ua> In-Reply-To: <20130407190509.GA2930@kib.kiev.ua> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2CNMKSCOCLNPAEPJCPDWM" Cc: =?ISO-8859-1?Q?Olivier_Cochard-Labb=E9?= , svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 22:31:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2CNMKSCOCLNPAEPJCPDWM Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07.04.2013 21:05, Konstantin Belousov wrote: > I suspect that the issue is with the drm2/i915/intel_dp.c. > You might try to use shift to 7 instead of 8 for address in the > intel_dp_aux_native_read/write, but I am not sure. Based on your remark, I proposed the following patch to Olivier: http://people.freebsd.org/~dumbbell/radeonkms/drm-i915-intel_iic.b.patch And it worked for him! If I understand correctly, this "aux channel" emulates a I2C bus. The patch right-shifts back the slave address (in drm_dp_iic_helper.c). This address is then used in intel_dp_i2c_aux_ch() (intel_dp.c). If you agree, I can commit it. --=20 Jean-S=E9bastien P=E9dron ------enig2CNMKSCOCLNPAEPJCPDWM 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.19 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFh884ACgkQa+xGJsFYOlPCugCePnb8tnkXzWkjFnCCeLdA4Fn6 KesAn1U53YGlrh0On1s2GaGV/argh6ca =NU2a -----END PGP SIGNATURE----- ------enig2CNMKSCOCLNPAEPJCPDWM-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 08:03:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DE4E5AC6; Mon, 8 Apr 2013 08:03:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D07F88F7; Mon, 8 Apr 2013 08:03:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3883g0M087725; Mon, 8 Apr 2013 08:03:42 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3883ggQ087724; Mon, 8 Apr 2013 08:03:42 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201304080803.r3883ggQ087724@svn.freebsd.org> From: Ed Schouten Date: Mon, 8 Apr 2013 08:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249244 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 08:03:43 -0000 Author: ed Date: Mon Apr 8 08:03:42 2013 New Revision: 249244 URL: http://svnweb.freebsd.org/changeset/base/249244 Log: Prevent the creation of an unused variable. We're only interested in the enumeration fields; we don't want to create a variable to store them. MFC after: 1 week Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Mon Apr 8 07:08:29 2013 (r249243) +++ head/sbin/camcontrol/camcontrol.c Mon Apr 8 08:03:42 2013 (r249244) @@ -1734,7 +1734,7 @@ enum { ATA_SECURITY_ACTION_ERASE, ATA_SECURITY_ACTION_ERASE_ENHANCED, ATA_SECURITY_ACTION_SET_PASSWORD -} atasecurity_action; +}; static void atasecurity_print_time(u_int16_t tw) From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 08:05:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5107CCDC; Mon, 8 Apr 2013 08:05:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 42B4D90E; Mon, 8 Apr 2013 08:05:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3885GnU087997; Mon, 8 Apr 2013 08:05:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3885Gvj087995; Mon, 8 Apr 2013 08:05:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201304080805.r3885Gvj087995@svn.freebsd.org> From: Ed Schouten Date: Mon, 8 Apr 2013 08:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249245 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 08:05:16 -0000 Author: ed Date: Mon Apr 8 08:05:15 2013 New Revision: 249245 URL: http://svnweb.freebsd.org/changeset/base/249245 Log: Mark the act_tbl static/const. This table is only used within this source file and is only accessed read-only. MFC after: 1 week Modified: head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Mon Apr 8 08:03:42 2013 (r249244) +++ head/usr.sbin/watchdogd/watchdogd.c Mon Apr 8 08:05:15 2013 (r249245) @@ -455,7 +455,7 @@ struct act_tbl { int at_value; }; -struct act_tbl act_tbl[] = { +static const struct act_tbl act_tbl[] = { { "panic", WD_SOFT_PANIC }, { "ddb", WD_SOFT_DDB }, { "log", WD_SOFT_LOG }, From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 08:19:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A6E2F379; Mon, 8 Apr 2013 08:19:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0949C5; Mon, 8 Apr 2013 08:19:43 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r388JSAB068202; Mon, 8 Apr 2013 11:19:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.2 kib.kiev.ua r388JSAB068202 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r388JStj068201; Mon, 8 Apr 2013 11:19:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 Apr 2013 11:19:28 +0300 From: Konstantin Belousov To: Jean-S?bastien P?dron Subject: Re: svn commit: r249041 - in head/sys/dev/drm2: . i915 Message-ID: <20130408081928.GB2930@kib.kiev.ua> References: <201304030827.r338RZih051806@svn.freebsd.org> <5161ADD8.6090607@FreeBSD.org> <20130407190509.GA2930@kib.kiev.ua> <5161F3BA.8040001@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f2QGlHpHGjS2mn6Y" Content-Disposition: inline In-Reply-To: <5161F3BA.8040001@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: Olivier Cochard-Labb? , svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 08:19:43 -0000 --f2QGlHpHGjS2mn6Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 08, 2013 at 12:31:22AM +0200, Jean-S?bastien P?dron wrote: > On 07.04.2013 21:05, Konstantin Belousov wrote: > > I suspect that the issue is with the drm2/i915/intel_dp.c. > > You might try to use shift to 7 instead of 8 for address in the > > intel_dp_aux_native_read/write, but I am not sure. >=20 > Based on your remark, I proposed the following patch to Olivier: > http://people.freebsd.org/~dumbbell/radeonkms/drm-i915-intel_iic.b.patch >=20 > And it worked for him! >=20 > If I understand correctly, this "aux channel" emulates a I2C bus. The > patch right-shifts back the slave address (in drm_dp_iic_helper.c). This > address is then used in intel_dp_i2c_aux_ch() (intel_dp.c). >=20 > If you agree, I can commit it. I see no reason to disagree. Please commit. As a side note, it is a miracle that DP connector KMS works at all. I had no DP hardware when I did the port, and Linux driver got a huge amount of bugfixes and churn in this area, which changes were only partially imported. I think that there is a complete rework of the modesetting sequence for Linux, either committed or going to be committed, motivated by the non-conformance of the DP and eDP handling. --f2QGlHpHGjS2mn6Y Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRYn2PAAoJEJDCuSvBvK1BwAkP/1KRAxsRDZdN+/njSSu1KI5h MPzEsY6+yzWfMIkEHX0YDbUdF3tEzdSYhPTiAbjHpZts9SqBRbPR2y9MbZAaNZpJ hG8HcJ7+gAvwaPuileztv6i17Yj+LWekkZjLoZ8k2zDugD1ipdYgW+pYvzT4VTKx LomNNR5cOezUWbr8ChaA866Td6WIDpfIrq1Fho4WmJHoDUyrIJ/6Q8kfSmXn7TZX DbZXCKVIcU71/T3krrOjGUqXGMb2axUjY5ZA0CK5L62lzQ69NQPtGEhLAACWefvN l1fTTXcS46aL2uk904dE4nsJ8hYFl8wsRHCvDvVpy4Lk6DYhEZdJ8ro+unmhhbEk 7t86o+qeINzF97VBVg4+3gWszCkxV5B0YyfKOaHw8DCaqEWrpD8FO4kDplN1LLO2 PWhAqAqFNUp+HYNVmTzOwd7wCmLbrRqt49ZTO55JDoOPlqUwutgoOUH6w4FHuGUa jDKFbf96vlhihvMc6hdTyCX758NZ3uCTKUY5l7tgAYjTsBx8ZUiSqPFm+MjMsPhX p4QfBZ9FSumUVb/uShOeNjPm3UEDox8WSHIBVs8/BTFus3Kahu5/PIy7ntw4YXYd xmGyt9u09JIsfHWhapIPv0Mf5GP5zn2+5Ib6Vg0mHDCXjqDfAknskA3zo8hIbV0O pZHkQmQVDwPRtnrHUduM =ilQO -----END PGP SIGNATURE----- --f2QGlHpHGjS2mn6Y-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 08:37:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 68E01CE9; Mon, 8 Apr 2013 08:37:58 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5C4C7AB3; Mon, 8 Apr 2013 08:37:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r388bwnk097301; Mon, 8 Apr 2013 08:37:58 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r388bwYW097300; Mon, 8 Apr 2013 08:37:58 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201304080837.r388bwYW097300@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Mon, 8 Apr 2013 08:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249249 - head/sys/dev/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 08:37:58 -0000 Author: dumbbell Date: Mon Apr 8 08:37:57 2013 New Revision: 249249 URL: http://svnweb.freebsd.org/changeset/base/249249 Log: drm: Right-shift I2C slave address before passing it to aux channel In r249041, I2C slave addresses were left-shifted at creation time to have the same behavior between i915 and radeon (not committed yet). This change broke the aux channel. The user-visible change was that display port on i915 didn't work anymore. To fix this, we right-shift the address back to restore the original value. Reported by: Olivier Cochard-Labbé Tested by: Olivier Cochard-Labbé Reviewed by: kib@ Modified: head/sys/dev/drm2/drm_dp_iic_helper.c Modified: head/sys/dev/drm2/drm_dp_iic_helper.c ============================================================================== --- head/sys/dev/drm2/drm_dp_iic_helper.c Mon Apr 8 08:35:24 2013 (r249248) +++ head/sys/dev/drm2/drm_dp_iic_helper.c Mon Apr 8 08:37:57 2013 (r249249) @@ -146,7 +146,7 @@ iic_dp_aux_xfer(device_t idev, struct ii len = msgs[m].len; buf = msgs[m].buf; reading = (msgs[m].flags & IIC_M_RD) != 0; - ret = iic_dp_aux_address(idev, msgs[m].slave, reading); + ret = iic_dp_aux_address(idev, msgs[m].slave >> 1, reading); if (ret != 0) break; if (reading) { From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 10:14:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 966C138C; Mon, 8 Apr 2013 10:14:50 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 89447B5; Mon, 8 Apr 2013 10:14:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38AEoIE026476; Mon, 8 Apr 2013 10:14:50 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38AEoQQ026475; Mon, 8 Apr 2013 10:14:50 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201304081014.r38AEoQQ026475@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 8 Apr 2013 10:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249252 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 10:14:50 -0000 Author: ae Date: Mon Apr 8 10:14:50 2013 New Revision: 249252 URL: http://svnweb.freebsd.org/changeset/base/249252 Log: Remove reference to the nonexistent sysctl node net.inet6.mld.stats. Also add cross reference to the icmp6(4). PR: 177696 MFC after: 1 week Modified: head/share/man/man4/mld.4 Modified: head/share/man/man4/mld.4 ============================================================================== --- head/share/man/man4/mld.4 Mon Apr 8 09:58:10 2013 (r249251) +++ head/share/man/man4/mld.4 Mon Apr 8 10:14:50 2013 (r249252) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2009 +.Dd April 8, 2013 .Dt MLD 4 .Os .Sh NAME @@ -68,11 +68,6 @@ to the protocol. .Sh SYSCTL VARIABLES .Bl -tag -width indent .\" -.It net.inet6.mld.stats -This opaque read-only variable exposes the stack-wide MLDv2 -protocol statistics to -.Xr netstat 1 . -.\" .It net.inet6.mld.ifinfo This opaque read-only variable exposes the per-link MLDv2 status to .Xr ifmcstat 8 . @@ -94,6 +89,7 @@ This sysctl is normally enabled by defau .\" .El .Sh SEE ALSO +.Xr icmp6 4 , .Xr ifmcstat 8 , .Xr inet 4 , .Xr multicast 4 , From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 10:53:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EA589C77; Mon, 8 Apr 2013 10:53:22 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DBF3A26F; Mon, 8 Apr 2013 10:53:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38ArMZ5037943; Mon, 8 Apr 2013 10:53:22 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38ArMop037942; Mon, 8 Apr 2013 10:53:22 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304081053.r38ArMop037942@svn.freebsd.org> From: Joel Dahl Date: Mon, 8 Apr 2013 10:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249253 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 10:53:23 -0000 Author: joel (doc committer) Date: Mon Apr 8 10:53:22 2013 New Revision: 249253 URL: http://svnweb.freebsd.org/changeset/base/249253 Log: mdoc: sort cross references. Modified: head/share/man/man4/mld.4 Modified: head/share/man/man4/mld.4 ============================================================================== --- head/share/man/man4/mld.4 Mon Apr 8 10:14:50 2013 (r249252) +++ head/share/man/man4/mld.4 Mon Apr 8 10:53:22 2013 (r249253) @@ -89,12 +89,12 @@ This sysctl is normally enabled by defau .\" .El .Sh SEE ALSO +.Xr netstat 1 , +.Xr sourcefilter 3 , .Xr icmp6 4 , -.Xr ifmcstat 8 , .Xr inet 4 , .Xr multicast 4 , -.Xr netstat 1 , -.Xr sourcefilter 3 +.Xr ifmcstat 8 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 15:36:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2A10C71; Mon, 8 Apr 2013 15:36:27 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1CBD9616; Mon, 8 Apr 2013 15:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38FaQpT021182; Mon, 8 Apr 2013 15:36:26 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38FaQfW021181; Mon, 8 Apr 2013 15:36:26 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201304081536.r38FaQfW021181@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 8 Apr 2013 15:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249256 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 15:36:27 -0000 Author: ken Date: Mon Apr 8 15:36:26 2013 New Revision: 249256 URL: http://svnweb.freebsd.org/changeset/base/249256 Log: Fix a memory leak that showed up when we delete LUNs. The memory used for the LUN was never freed. ctl.c: Adjust ctl_alloc_lun() to make sure we don't clear the CTL_LUN_MALLOCED flag. Reported by: Sreenivasa Honnur Sponsored by: Spectra Logic MFC after: 3 days Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Apr 8 15:13:15 2013 (r249255) +++ head/sys/cam/ctl/ctl.c Mon Apr 8 15:36:26 2013 (r249256) @@ -4223,7 +4223,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft { struct ctl_lun *nlun, *lun; struct ctl_frontend *fe; - int lun_number, i; + int lun_number, i, lun_malloced; if (be_lun == NULL) return (EINVAL); @@ -4245,11 +4245,15 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft } if (ctl_lun == NULL) { lun = malloc(sizeof(*lun), M_CTL, M_WAITOK); - lun->flags = CTL_LUN_MALLOCED; - } else + lun_malloced = 1; + } else { + lun_malloced = 0; lun = ctl_lun; + } memset(lun, 0, sizeof(*lun)); + if (lun_malloced) + lun->flags = CTL_LUN_MALLOCED; mtx_lock(&ctl_softc->ctl_lock); /* @@ -4301,7 +4305,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft * The processor LUN is always enabled. Disk LUNs come on line * disabled, and must be enabled by the backend. */ - lun->flags = CTL_LUN_DISABLED; + lun->flags |= CTL_LUN_DISABLED; lun->backend = be_lun->be; be_lun->ctl_lun = lun; be_lun->lun_id = lun_number; From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 17:46:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5BAD2AED; Mon, 8 Apr 2013 17:46:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6BDD75; Mon, 8 Apr 2013 17:46:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38Hkl2D061476; Mon, 8 Apr 2013 17:46:47 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38Hkj92061465; Mon, 8 Apr 2013 17:46:45 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201304081746.r38Hkj92061465@svn.freebsd.org> From: Mark Johnston Date: Mon, 8 Apr 2013 17:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249257 - in head: sys/dev/mfi usr.sbin/mfiutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 17:46:47 -0000 Author: markj Date: Mon Apr 8 17:46:45 2013 New Revision: 249257 URL: http://svnweb.freebsd.org/changeset/base/249257 Log: Add support for getting and setting BBU properties related to battery relearning. Specifically, add subcommands to mfiutil(8) which allow the user to set the BBU and autolearn modes when the firmware supports it, and add a subcommand which kicks off a battery relearn. Reviewed by: sbruno, rstone Tested by: sbruno Approved by: rstone (co-mentor) MFC after: 2 weeks Sponsored by: Sandvine Incorporated Added: head/usr.sbin/mfiutil/mfi_bbu.c (contents, props changed) Modified: head/sys/dev/mfi/mfi_debug.c head/sys/dev/mfi/mfireg.h head/usr.sbin/mfiutil/Makefile head/usr.sbin/mfiutil/mfi_show.c head/usr.sbin/mfiutil/mfi_volume.c head/usr.sbin/mfiutil/mfiutil.8 head/usr.sbin/mfiutil/mfiutil.c head/usr.sbin/mfiutil/mfiutil.h Modified: head/sys/dev/mfi/mfi_debug.c ============================================================================== --- head/sys/dev/mfi/mfi_debug.c Mon Apr 8 15:36:26 2013 (r249256) +++ head/sys/dev/mfi/mfi_debug.c Mon Apr 8 17:46:45 2013 (r249257) @@ -168,6 +168,15 @@ mfi_print_dcmd(struct mfi_softc *sc, dev case MFI_DCMD_LD_MAP_GET_INFO: opcode = "LD_MAP_GET_INFO"; break; + case MFI_DCMD_BBU_START_LEARN: + opcode = "BBU_START_LEARN"; + break; + case MFI_DCMD_BBU_GET_PROP: + opcode = "BBU_GET_PROP"; + break; + case MFI_DCMD_BBU_SET_PROP: + opcode = "BBU_SET_PROP"; + break; default: opcode = "UNKNOWN"; break; Modified: head/sys/dev/mfi/mfireg.h ============================================================================== --- head/sys/dev/mfi/mfireg.h Mon Apr 8 15:36:26 2013 (r249256) +++ head/sys/dev/mfi/mfireg.h Mon Apr 8 17:46:45 2013 (r249257) @@ -234,6 +234,9 @@ typedef enum { MFI_DCMD_BBU_GET_STATUS = 0x05010000, MFI_DCMD_BBU_GET_CAPACITY_INFO =0x05020000, MFI_DCMD_BBU_GET_DESIGN_INFO = 0x05030000, + MFI_DCMD_BBU_START_LEARN = 0x05040000, + MFI_DCMD_BBU_GET_PROP = 0x05050100, + MFI_DCMD_BBU_SET_PROP = 0x05050200, MFI_DCMD_CLUSTER = 0x08000000, MFI_DCMD_CLUSTER_RESET_ALL = 0x08010100, MFI_DCMD_CLUSTER_RESET_LD = 0x08010200 @@ -1367,6 +1370,15 @@ struct mfi_bbu_state { uint8_t reserved[21]; } __packed; +struct mfi_bbu_properties { + uint32_t auto_learn_period; + uint32_t next_learn_time; + uint8_t learn_delay_interval; + uint8_t auto_learn_mode; + uint8_t bbu_mode; + uint8_t reserved[21]; +} __packed; + union mfi_bbu_status_detail { struct mfi_ibbu_state ibbu; struct mfi_bbu_state bbu; Modified: head/usr.sbin/mfiutil/Makefile ============================================================================== --- head/usr.sbin/mfiutil/Makefile Mon Apr 8 15:36:26 2013 (r249256) +++ head/usr.sbin/mfiutil/Makefile Mon Apr 8 17:46:45 2013 (r249257) @@ -1,8 +1,8 @@ # $FreeBSD$ PROG= mfiutil -SRCS= mfiutil.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c mfi_flash.c \ - mfi_patrol.c mfi_show.c mfi_volume.c +SRCS= mfiutil.c mfi_bbu.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c \ + mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c MAN8= mfiutil.8 CFLAGS+= -fno-builtin-strftime Added: head/usr.sbin/mfiutil/mfi_bbu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/mfi_bbu.c Mon Apr 8 17:46:45 2013 (r249257) @@ -0,0 +1,252 @@ +/*- + * Copyright (c) 2013 Sandvine 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. The names of the authors 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 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mfiutil.h" + +/* The autolearn period is given in seconds. */ +void +mfi_autolearn_period(uint32_t period, char *buf, size_t sz) +{ + unsigned int d, h; + char *tmp; + + d = period / (24 * 3600); + h = (period % (24 * 3600)) / 3600; + + tmp = buf; + if (d != 0) { + tmp += snprintf(buf, sz, "%u day%s", d, d == 1 ? "" : "s"); + sz -= tmp - buf; + if (h != 0) { + tmp += snprintf(tmp, sz, ", "); + sz -= 2; + } + } + if (h != 0) + snprintf(tmp, sz, "%u hour%s", h, h == 1 ? "" : "s"); + + if (d == 0 && h == 0) + snprintf(tmp, sz, "less than 1 hour"); +} + +/* The time to the next relearn is given in seconds since 1/1/2000. */ +void +mfi_next_learn_time(uint32_t next_learn_time, char *buf, size_t sz) +{ + time_t basetime; + struct tm tm; + size_t len; + + memset(&tm, 0, sizeof(tm)); + tm.tm_year = 100; + basetime = timegm(&tm); + basetime += (time_t)next_learn_time; + len = snprintf(buf, sz, "%s", ctime(&basetime)); + if (len > 0) + /* Get rid of the newline added by ctime(3). */ + buf[len - 1] = '\0'; +} + +void +mfi_autolearn_mode(uint8_t mode, char *buf, size_t sz) +{ + + switch (mode) { + case 0: + snprintf(buf, sz, "enabled"); + break; + case 1: + snprintf(buf, sz, "disabled"); + break; + case 2: + snprintf(buf, sz, "warn via event"); + break; + default: + snprintf(buf, sz, "mode 0x%02x", mode); + break; + } +} + +int +mfi_bbu_get_props(int fd, struct mfi_bbu_properties *props, uint8_t *statusp) +{ + + return (mfi_dcmd_command(fd, MFI_DCMD_BBU_GET_PROP, props, + sizeof(*props), NULL, 0, statusp)); +} + +int +mfi_bbu_set_props(int fd, struct mfi_bbu_properties *props, uint8_t *statusp) +{ + + return (mfi_dcmd_command(fd, MFI_DCMD_BBU_SET_PROP, props, + sizeof(*props), NULL, 0, statusp)); +} + +static int +start_bbu_learn(int ac, char **av __unused) +{ + uint8_t status; + int error, fd; + + status = MFI_STAT_OK; + error = 0; + + if (ac != 1) { + warnx("start learn: unexpected arguments"); + return (EINVAL); + } + + fd = mfi_open(mfi_unit, O_RDWR); + if (fd < 0) { + error = errno; + warn("mfi_open"); + return (error); + } + + if (mfi_dcmd_command(fd, MFI_DCMD_BBU_START_LEARN, NULL, 0, NULL, 0, + &status) < 0) { + error = errno; + warn("Failed to start BBU learn"); + } else if (status != MFI_STAT_OK) { + warnx("Failed to start BBU learn: %s", mfi_status(status)); + error = EIO; + } + + return (error); +} +MFI_COMMAND(start, learn, start_bbu_learn); + +static int +update_bbu_props(int ac, char **av) +{ + struct mfi_bbu_properties props; + unsigned long delay; + uint8_t status; + int error, fd; + char *mode, *endptr; + + status = MFI_STAT_OK; + error = 0; + + if (ac != 3) { + warnx("bbu: property and value required"); + return (EINVAL); + } + + fd = mfi_open(mfi_unit, O_RDWR); + if (fd < 0) { + error = errno; + warn("mfi_open"); + return (error); + } + + if (mfi_bbu_get_props(fd, &props, &status) < 0) { + error = errno; + warn("Failed to get BBU properties"); + goto done; + } else if (status != MFI_STAT_OK) { + warnx("Failed to get BBU properties: %s", mfi_status(status)); + error = EIO; + goto done; + } + + if (strcmp(av[1], "learn-delay") == 0) { + delay = strtoul(av[2], &endptr, 10); + if (strlen(av[2]) == 0 || *endptr != '\0' || delay > 255) { + warnx("Invalid learn delay '%s'", av[2]); + error = EINVAL; + goto done; + } + + props.learn_delay_interval = delay; + } else if (strcmp(av[1], "autolearn-mode") == 0) { + mode = av[2]; + + if (strcmp(av[2], "enable") == 0) + props.auto_learn_mode = 0; + else if (strcmp(av[2], "disable") == 0) + props.auto_learn_mode = 1; + else if (mode[0] >= '0' && mode[0] <= '2' && mode[1] == '\0') + props.auto_learn_mode = mode[0] - '0'; + else { + warnx("Invalid mode '%s'", mode); + error = EINVAL; + goto done; + } + } else if (strcmp(av[1], "bbu-mode") == 0) { + if (props.bbu_mode == 0) { + warnx("This BBU does not implement different modes"); + error = EINVAL; + goto done; + } + + /* The mode must be an integer between 1 and 5. */ + mode = av[2]; + if (mode[0] < '1' || mode[0] > '5' || mode[1] != '\0') { + warnx("Invalid mode '%s'", mode); + error = EINVAL; + goto done; + } + + props.bbu_mode = mode[0] - '0'; + } else { + warnx("bbu: Invalid command '%s'", av[1]); + error = EINVAL; + goto done; + } + + if (mfi_bbu_set_props(fd, &props, &status) < 0) { + error = errno; + warn("Failed to set BBU properties"); + goto done; + } else if (status != MFI_STAT_OK) { + warnx("Failed to set BBU properties: %s", mfi_status(status)); + error = EIO; + goto done; + } + +done: + close(fd); + + return (error); +} +MFI_COMMAND(top, bbu, update_bbu_props); Modified: head/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_show.c Mon Apr 8 15:36:26 2013 (r249256) +++ head/usr.sbin/mfiutil/mfi_show.c Mon Apr 8 17:46:45 2013 (r249257) @@ -140,9 +140,11 @@ show_battery(int ac, char **av __unused) { struct mfi_bbu_capacity_info cap; struct mfi_bbu_design_info design; + struct mfi_bbu_properties props; struct mfi_bbu_status stat; uint8_t status; - int comma, error, fd, show_capacity; + int comma, error, fd, show_capacity, show_props; + char buf[32]; if (ac != 1) { warnx("show battery: extra arguments"); @@ -186,6 +188,14 @@ show_battery(int ac, char **av __unused) return (error); } + if (mfi_bbu_get_props(fd, &props, &status) < 0) { + error = errno; + warn("Failed to get properties"); + close(fd); + return (error); + } + show_props = (status == MFI_STAT_OK); + printf("mfi%d: Battery State:\n", mfi_unit); printf(" Manufacture Date: %d/%d/%d\n", design.mfg_date >> 5 & 0x0f, design.mfg_date & 0x1f, design.mfg_date >> 9 & 0xffff); @@ -205,6 +215,23 @@ show_battery(int ac, char **av __unused) printf(" Design Voltage: %d mV\n", design.design_voltage); printf(" Current Voltage: %d mV\n", stat.voltage); printf(" Temperature: %d C\n", stat.temperature); + if (show_props) { + mfi_autolearn_period(props.auto_learn_period, buf, sizeof(buf)); + printf(" Autolearn period: %s\n", buf); + if (props.auto_learn_mode != 0) + snprintf(buf, sizeof(buf), "never"); + else + mfi_next_learn_time(props.next_learn_time, buf, + sizeof(buf)); + printf(" Next learn time: %s\n", buf); + printf(" Learn delay interval: %u hour%s\n", + props.learn_delay_interval, + props.learn_delay_interval != 1 ? "s" : ""); + mfi_autolearn_mode(props.auto_learn_mode, buf, sizeof(buf)); + printf(" Autolearn mode: %s\n", buf); + if (props.bbu_mode != 0) + printf(" BBU Mode: %d\n", props.bbu_mode); + } printf(" Status:"); comma = 0; if (stat.fw_status & MFI_BBU_STATE_PACK_MISSING) { Modified: head/usr.sbin/mfiutil/mfi_volume.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_volume.c Mon Apr 8 15:36:26 2013 (r249256) +++ head/usr.sbin/mfiutil/mfi_volume.c Mon Apr 8 17:46:45 2013 (r249257) @@ -363,7 +363,8 @@ volume_cache(int ac, char **av) break; } if (props.default_cache_policy != props.current_cache_policy) - printf("Cache Disabled Due to Dead Battery\n"); + printf( + "Cache disabled due to dead battery or ongoing battery relearn\n"); error = 0; } else { new = props; Modified: head/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.8 Mon Apr 8 15:36:26 2013 (r249256) +++ head/usr.sbin/mfiutil/mfiutil.8 Mon Apr 8 17:46:45 2013 (r249257) @@ -141,6 +141,12 @@ .Nm .Op Fl u Ar unit .Cm flash Ar file +.Nm +.Op Fl u Ar unit +.Cm start learn +.Nm +.Op Fl u Ar unit +.Cm bbu Ar setting Ar value .Sh DESCRIPTION The .Nm @@ -565,6 +571,33 @@ Stop a currently running patrol read ope Updates the flash on the controller with the firmware stored in .Ar file . A reboot is required for the new firmware to take effect. +.It Cm start learn +Start a battery relearn. +.It Cm bbu Ar setting Ar value +Update battery backup unit (BBU) properties related to battery relearning. +The following settings are configurable: +.Bl -tag -width indent +.It Cm learn-delay +Add a delay to the next scheduled battery relearn event. This setting is +given in hours and must lie in the range of 0 to 255. +.It Cm autolearn-mode +Enable or disable automatic periodic battery relearning. +The setting may be set to +.Dq enable +or +.Dq disable +to respectively enable or disable the relearn cycle. +Alternatively, a mode of 0, 1 or 2 may be given. +Mode 0 enables periodic relearning, mode 1 disables it, and mode 2 disables +it and logs a warning to the event log when it detects that a battery relearn +should be performed. +.It Cm bbu-mode +Set the BBU's mode of operation. This setting is not supported by all BBUs. +Where it is supported, the possible values are the integers between 1 and 5 +inclusive. +Modes 1, 2 and 3 enable a transparent learn cycle, whereas modes 4 and 5 do not. +The BBU's data retention time is greater when transparent learning is not used. +.El .El .Sh EXAMPLES Configure the cache for volume mfid0 to cache only writes: Modified: head/usr.sbin/mfiutil/mfiutil.c ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.c Mon Apr 8 15:36:26 2013 (r249256) +++ head/usr.sbin/mfiutil/mfiutil.c Mon Apr 8 17:46:45 2013 (r249257) @@ -84,6 +84,8 @@ usage(void) fprintf(stderr, " start patrol - start a patrol read\n"); fprintf(stderr, " stop patrol - stop a patrol read\n"); fprintf(stderr, " flash \n"); + fprintf(stderr, " start learn - start a BBU relearn\n"); + fprintf(stderr, " bbu - set BBU properties\n"); #ifdef DEBUG fprintf(stderr, " debug - debug 'show config'\n"); fprintf(stderr, " dump - display 'saved' config\n"); Modified: head/usr.sbin/mfiutil/mfiutil.h ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.h Mon Apr 8 15:36:26 2013 (r249256) +++ head/usr.sbin/mfiutil/mfiutil.h Mon Apr 8 17:46:45 2013 (r249257) @@ -152,6 +152,13 @@ int mfi_reconfig_supported(void); const char *mfi_status(u_int status_code); const char *mfi_drive_name(struct mfi_pd_info *pinfo, uint16_t device_id, uint32_t def); +int mfi_bbu_get_props(int fd, struct mfi_bbu_properties *props, + uint8_t *statusp); +int mfi_bbu_set_props(int fd, struct mfi_bbu_properties *props, + uint8_t *statusp); +void mfi_autolearn_period(uint32_t, char *, size_t); +void mfi_next_learn_time(uint32_t, char *, size_t); +void mfi_autolearn_mode(uint8_t, char *, size_t); void scan_firmware(struct mfi_info_component *comp); void display_firmware(struct mfi_info_component *comp, const char *tag); From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 18:25:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BA38655B; Mon, 8 Apr 2013 18:25:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ADB74F72; Mon, 8 Apr 2013 18:25:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38IP7n9073081; Mon, 8 Apr 2013 18:25:07 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38IP7VM073080; Mon, 8 Apr 2013 18:25:07 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201304081825.r38IP7VM073080@svn.freebsd.org> From: Mark Johnston Date: Mon, 8 Apr 2013 18:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249258 - head/usr.sbin/mfiutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 18:25:07 -0000 Author: markj Date: Mon Apr 8 18:25:07 2013 New Revision: 249258 URL: http://svnweb.freebsd.org/changeset/base/249258 Log: Switch to a 2-clause license. Approved by: emaste (co-mentor) X-MFC with: r249257 Modified: head/usr.sbin/mfiutil/mfi_bbu.c Modified: head/usr.sbin/mfiutil/mfi_bbu.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_bbu.c Mon Apr 8 17:46:45 2013 (r249257) +++ head/usr.sbin/mfiutil/mfi_bbu.c Mon Apr 8 18:25:07 2013 (r249258) @@ -10,9 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The names of the authors 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 AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:03:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 27EEB767; Mon, 8 Apr 2013 19:03:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2851F7; Mon, 8 Apr 2013 19:03:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38J31Ku084694; Mon, 8 Apr 2013 19:03:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38J31FG084693; Mon, 8 Apr 2013 19:03:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201304081903.r38J31FG084693@svn.freebsd.org> From: John Baldwin Date: Mon, 8 Apr 2013 19:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249263 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:03:02 -0000 Author: jhb Date: Mon Apr 8 19:03:01 2013 New Revision: 249263 URL: http://svnweb.freebsd.org/changeset/base/249263 Log: Fix a potential socket leak in the NFS server. If a client closes its connection after it was accepted by the userland nfsd process but before it was handled off to svc_vc_create() in the kernel, then svc_vc_create() would see it as a new listen socket and try to listen on it leaving a dangling reference to the socket. Instead, check for disconnected sockets and treat them like a connected socket. The call to pru_getaddr() should fail and cause svc_vc_create() to fail. Note that we need to lock the socket to get a consistent snapshot of so_state since there is a window in soisdisconnected() where both flags are clear. Reviewed by: dfr, rmacklem MFC after: 1 week Modified: head/sys/rpc/svc_vc.c Modified: head/sys/rpc/svc_vc.c ============================================================================== --- head/sys/rpc/svc_vc.c Mon Apr 8 18:46:35 2013 (r249262) +++ head/sys/rpc/svc_vc.c Mon Apr 8 19:03:01 2013 (r249263) @@ -146,7 +146,9 @@ svc_vc_create(SVCPOOL *pool, struct sock struct sockaddr* sa; int error; - if (so->so_state & SS_ISCONNECTED) { + SOCK_LOCK(so); + if (so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED)) { + SOCK_UNLOCK(so); error = so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa); if (error) return (NULL); @@ -154,6 +156,7 @@ svc_vc_create(SVCPOOL *pool, struct sock free(sa, M_SONAME); return (xprt); } + SOCK_UNLOCK(so); xprt = svc_xprt_alloc(); sx_init(&xprt->xp_lock, "xprt->xp_lock"); From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:10:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BBFFC993; Mon, 8 Apr 2013 19:10:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ABF4D245; Mon, 8 Apr 2013 19:10:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38JAkP3087359; Mon, 8 Apr 2013 19:10:46 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JAj9t087353; Mon, 8 Apr 2013 19:10:45 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304081910.r38JAj9t087353@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Apr 2013 19:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249264 - in head: share/man/man9 sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:10:46 -0000 Author: glebius Date: Mon Apr 8 19:10:45 2013 New Revision: 249264 URL: http://svnweb.freebsd.org/changeset/base/249264 Log: Merge from projects/counters: UMA_ZONE_PCPU zones. These zones have slab size == sizeof(struct pcpu), but request from VM enough pages to fit (uk_slabsize * mp_ncpus). An item allocated from such zone would have a separate twin for each CPU in the system, and these twins are at a distance of sizeof(struct pcpu) from each other. This magic value of distance would allow us to make some optimizations later. To address private item from a CPU simple arithmetics should be used: item = (type *)((char *)base + sizeof(struct pcpu) * curcpu) These arithmetics are available as zpcpu_get() macro in pcpu.h. To introduce non-page size slabs a new field had been added to uma_keg uk_slabsize. This shifted some frequently used fields of uma_keg to the fourth cache line on amd64. To mitigate this pessimization, uma_keg fields were a bit rearranged and least frequently used uk_name and uk_link moved down to the fourth cache line. All other fields, that are dereferenced frequently fit into first three cache lines. Sponsored by: Nginx, Inc. Modified: head/share/man/man9/zone.9 head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Mon Apr 8 19:03:01 2013 (r249263) +++ head/share/man/man9/zone.9 Mon Apr 8 19:10:45 2013 (r249264) @@ -153,6 +153,23 @@ See .Fn uma_find_refcnt . .It Dv UMA_ZONE_NODUMP Pages belonging to the zone will not be included into mini-dumps. +.It Dv UMA_ZONE_PCPU +An allocation from zone would have +.Va mp_ncpu +shadow copies, that are privately assigned to CPUs. +A CPU can address its private copy using base allocation address plus +multiple of current CPU id and +.Fn sizeof "struct pcpu" : +.Bd -literal -offset indent +foo_zone = uma_zcreate(..., UMA_ZONE_PCPU); + ... +foo_base = uma_zalloc(foo_zone, ...); + ... +critical_enter(); +foo_pcpu = (foo_t *)zpcpu_get(foo_base); +/* do something with foo_pcpu */ +critical_exit(); +.Ed .It Dv UMA_ZONE_OFFPAGE By default book-keeping of items within a slab is done in the slab page itself. This flag explicitly tells subsystem that book-keeping structure should be Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Mon Apr 8 19:03:01 2013 (r249263) +++ head/sys/vm/uma.h Mon Apr 8 19:10:45 2013 (r249264) @@ -252,6 +252,10 @@ int uma_zsecond_add(uma_zone_t zone, uma * Zone's pages will not be included in * mini-dumps. */ +#define UMA_ZONE_PCPU 0x8000 /* + * Allocates mp_ncpus slabs sized to + * sizeof(struct pcpu). + */ /* * These flags are shared between the keg and zone. In zones wishing to add @@ -260,7 +264,7 @@ int uma_zsecond_add(uma_zone_t zone, uma */ #define UMA_ZONE_INHERIT \ (UMA_ZONE_OFFPAGE | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE | \ - UMA_ZONE_HASH | UMA_ZONE_REFCNT | UMA_ZONE_VTOSLAB) + UMA_ZONE_HASH | UMA_ZONE_REFCNT | UMA_ZONE_VTOSLAB | UMA_ZONE_PCPU) /* Definitions for align */ #define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */ Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Apr 8 19:03:01 2013 (r249263) +++ head/sys/vm/uma_core.c Mon Apr 8 19:10:45 2013 (r249264) @@ -765,9 +765,9 @@ finished: SKIP_NONE, ZFREE_STATFREE); #ifdef UMA_DEBUG printf("%s: Returning %d bytes.\n", - keg->uk_name, UMA_SLAB_SIZE * keg->uk_ppera); + keg->uk_name, PAGE_SIZE * keg->uk_ppera); #endif - keg->uk_freef(mem, UMA_SLAB_SIZE * keg->uk_ppera, flags); + keg->uk_freef(mem, PAGE_SIZE * keg->uk_ppera, flags); } } @@ -865,7 +865,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t wait |= M_NODUMP; /* zone is passed for legacy reasons. */ - mem = allocf(zone, keg->uk_ppera * UMA_SLAB_SIZE, &flags, wait); + mem = allocf(zone, keg->uk_ppera * PAGE_SIZE, &flags, wait); if (mem == NULL) { if (keg->uk_flags & UMA_ZONE_OFFPAGE) zone_free_item(keg->uk_slabzone, slab, NULL, @@ -927,7 +927,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t if (keg->uk_flags & UMA_ZONE_OFFPAGE) zone_free_item(keg->uk_slabzone, slab, NULL, SKIP_NONE, ZFREE_STATFREE); - keg->uk_freef(mem, UMA_SLAB_SIZE * keg->uk_ppera, + keg->uk_freef(mem, PAGE_SIZE * keg->uk_ppera, flags); KEG_LOCK(keg); return (NULL); @@ -1138,16 +1138,27 @@ keg_small_init(uma_keg_t keg) u_int wastedspace; u_int shsize; - KASSERT(keg != NULL, ("Keg is null in keg_small_init")); + if (keg->uk_flags & UMA_ZONE_PCPU) { + keg->uk_slabsize = sizeof(struct pcpu); + keg->uk_ppera = howmany(mp_ncpus * sizeof(struct pcpu), + PAGE_SIZE); + } else { + keg->uk_slabsize = UMA_SLAB_SIZE; + keg->uk_ppera = 1; + } + rsize = keg->uk_size; - if (rsize < UMA_SMALLEST_UNIT) - rsize = UMA_SMALLEST_UNIT; if (rsize & keg->uk_align) rsize = (rsize & ~keg->uk_align) + (keg->uk_align + 1); + if (rsize < keg->uk_slabsize / 256) + rsize = keg->uk_slabsize / 256; keg->uk_rsize = rsize; - keg->uk_ppera = 1; + + KASSERT((keg->uk_flags & UMA_ZONE_PCPU) == 0 || + keg->uk_rsize < sizeof(struct pcpu), + ("%s: size %u too large", __func__, keg->uk_rsize)); if (keg->uk_flags & UMA_ZONE_OFFPAGE) { shsize = 0; @@ -1159,10 +1170,12 @@ keg_small_init(uma_keg_t keg) shsize = sizeof(struct uma_slab); } - keg->uk_ipers = (UMA_SLAB_SIZE - shsize) / rsize; - KASSERT(keg->uk_ipers != 0, ("keg_small_init: ipers is 0")); + keg->uk_ipers = (keg->uk_slabsize - shsize) / rsize; + KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 255, + ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); + memused = keg->uk_ipers * rsize + shsize; - wastedspace = UMA_SLAB_SIZE - memused; + wastedspace = keg->uk_slabsize - memused; /* * We can't do OFFPAGE if we're internal or if we've been @@ -1175,24 +1188,26 @@ keg_small_init(uma_keg_t keg) (keg->uk_flags & UMA_ZFLAG_CACHEONLY)) return; - if ((wastedspace >= UMA_MAX_WASTE) && - (keg->uk_ipers < (UMA_SLAB_SIZE / keg->uk_rsize))) { - keg->uk_ipers = UMA_SLAB_SIZE / keg->uk_rsize; - KASSERT(keg->uk_ipers <= 255, - ("keg_small_init: keg->uk_ipers too high!")); + if ((wastedspace >= keg->uk_slabsize / UMA_MAX_WASTE) && + (keg->uk_ipers < (keg->uk_slabsize / keg->uk_rsize))) { + keg->uk_ipers = keg->uk_slabsize / keg->uk_rsize; + KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 255, + ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); #ifdef UMA_DEBUG printf("UMA decided we need offpage slab headers for " "keg: %s, calculated wastedspace = %d, " "maximum wasted space allowed = %d, " "calculated ipers = %d, " "new wasted space = %d\n", keg->uk_name, wastedspace, - UMA_MAX_WASTE, keg->uk_ipers, - UMA_SLAB_SIZE - keg->uk_ipers * keg->uk_rsize); + keg->uk_slabsize / UMA_MAX_WASTE, keg->uk_ipers, + keg->uk_slabsize - keg->uk_ipers * keg->uk_rsize); #endif keg->uk_flags |= UMA_ZONE_OFFPAGE; - if ((keg->uk_flags & UMA_ZONE_VTOSLAB) == 0) - keg->uk_flags |= UMA_ZONE_HASH; } + + if ((keg->uk_flags & UMA_ZONE_OFFPAGE) && + (keg->uk_flags & UMA_ZONE_VTOSLAB) == 0) + keg->uk_flags |= UMA_ZONE_HASH; } /* @@ -1209,19 +1224,15 @@ keg_small_init(uma_keg_t keg) static void keg_large_init(uma_keg_t keg) { - int pages; KASSERT(keg != NULL, ("Keg is null in keg_large_init")); KASSERT((keg->uk_flags & UMA_ZFLAG_CACHEONLY) == 0, ("keg_large_init: Cannot large-init a UMA_ZFLAG_CACHEONLY keg")); + KASSERT((keg->uk_flags & UMA_ZONE_PCPU) == 0, + ("%s: Cannot large-init a UMA_ZONE_PCPU keg", __func__)); - pages = keg->uk_size / UMA_SLAB_SIZE; - - /* Account for remainder */ - if ((pages * UMA_SLAB_SIZE) < keg->uk_size) - pages++; - - keg->uk_ppera = pages; + keg->uk_ppera = howmany(keg->uk_size, PAGE_SIZE); + keg->uk_slabsize = keg->uk_ppera * PAGE_SIZE; keg->uk_ipers = 1; keg->uk_rsize = keg->uk_size; @@ -1242,6 +1253,9 @@ keg_cachespread_init(uma_keg_t keg) int pages; int rsize; + KASSERT((keg->uk_flags & UMA_ZONE_PCPU) == 0, + ("%s: Cannot cachespread-init a UMA_ZONE_PCPU keg", __func__)); + alignsize = keg->uk_align + 1; rsize = keg->uk_size; /* @@ -1259,6 +1273,7 @@ keg_cachespread_init(uma_keg_t keg) pages = MIN(pages, (128 * 1024) / PAGE_SIZE); keg->uk_rsize = rsize; keg->uk_ppera = pages; + keg->uk_slabsize = UMA_SLAB_SIZE; keg->uk_ipers = ((pages * PAGE_SIZE) + trailer) / rsize; keg->uk_flags |= UMA_ZONE_OFFPAGE | UMA_ZONE_VTOSLAB; KASSERT(keg->uk_ipers <= uma_max_ipers, @@ -1308,6 +1323,13 @@ keg_ctor(void *mem, int size, void *udat if (arg->flags & UMA_ZONE_REFCNT || arg->flags & UMA_ZONE_MALLOC) keg->uk_flags |= UMA_ZONE_VTOSLAB; + if (arg->flags & UMA_ZONE_PCPU) +#ifdef SMP + keg->uk_flags |= UMA_ZONE_OFFPAGE; +#else + keg->uk_flags &= ~UMA_ZONE_PCPU; +#endif + /* * The +UMA_FRITM_SZ added to uk_size is to account for the * linkage that is added to the size in keg_small_init(). If @@ -1385,7 +1407,7 @@ keg_ctor(void *mem, int size, void *udat if (totsize & UMA_ALIGN_PTR) totsize = (totsize & ~UMA_ALIGN_PTR) + (UMA_ALIGN_PTR + 1); - keg->uk_pgoff = (UMA_SLAB_SIZE * keg->uk_ppera) - totsize; + keg->uk_pgoff = (PAGE_SIZE * keg->uk_ppera) - totsize; if (keg->uk_flags & UMA_ZONE_REFCNT) totsize = keg->uk_pgoff + sizeof(struct uma_slab_refcnt) @@ -1401,7 +1423,7 @@ keg_ctor(void *mem, int size, void *udat * mathematically possible for all cases, so we make * sure here anyway. */ - if (totsize > UMA_SLAB_SIZE * keg->uk_ppera) { + if (totsize > PAGE_SIZE * keg->uk_ppera) { printf("zone %s ipers %d rsize %d size %d\n", zone->uz_name, keg->uk_ipers, keg->uk_rsize, keg->uk_size); @@ -1676,7 +1698,8 @@ uma_startup(void *bootmem, int boot_page * that we need to go to offpage slab headers. Or, if we do, * then we trap that condition below and panic in the INVARIANTS case. */ - wsize = UMA_SLAB_SIZE - sizeof(struct uma_slab) - UMA_MAX_WASTE; + wsize = UMA_SLAB_SIZE - sizeof(struct uma_slab) - + (UMA_SLAB_SIZE / UMA_MAX_WASTE); totsize = wsize; objsize = UMA_SMALLEST_UNIT; while (totsize >= wsize) { @@ -1689,7 +1712,8 @@ uma_startup(void *bootmem, int boot_page objsize--; uma_max_ipers = MAX(UMA_SLAB_SIZE / objsize, 64); - wsize = UMA_SLAB_SIZE - sizeof(struct uma_slab_refcnt) - UMA_MAX_WASTE; + wsize = UMA_SLAB_SIZE - sizeof(struct uma_slab_refcnt) - + (UMA_SLAB_SIZE / UMA_MAX_WASTE); totsize = wsize; objsize = UMA_SMALLEST_UNIT; while (totsize >= wsize) { Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Mon Apr 8 19:03:01 2013 (r249263) +++ head/sys/vm/uma_int.h Mon Apr 8 19:10:45 2013 (r249264) @@ -120,8 +120,8 @@ #define UMA_BOOT_PAGES 64 /* Pages allocated for startup */ -/* Max waste before going to off page slab management */ -#define UMA_MAX_WASTE (UMA_SLAB_SIZE / 10) +/* Max waste percentage before going to off page slab management */ +#define UMA_MAX_WASTE 10 /* * I doubt there will be many cases where this is exceeded. This is the initial @@ -197,12 +197,9 @@ typedef struct uma_cache * uma_cache_t; * */ struct uma_keg { - LIST_ENTRY(uma_keg) uk_link; /* List of all kegs */ - struct mtx uk_lock; /* Lock for the keg */ struct uma_hash uk_hash; - const char *uk_name; /* Name of creating zone. */ LIST_HEAD(,uma_zone) uk_zones; /* Keg's zones */ LIST_HEAD(,uma_slab) uk_part_slab; /* partially allocated slabs */ LIST_HEAD(,uma_slab) uk_free_slab; /* empty slab list */ @@ -225,10 +222,15 @@ struct uma_keg { vm_offset_t uk_kva; /* Zone base KVA */ uma_zone_t uk_slabzone; /* Slab zone backing us, if OFFPAGE */ + u_int16_t uk_slabsize; /* Slab size for this keg */ u_int16_t uk_pgoff; /* Offset to uma_slab struct */ u_int16_t uk_ppera; /* pages per allocation from backend */ u_int16_t uk_ipers; /* Items per slab */ u_int32_t uk_flags; /* Internal flags */ + + /* Least used fields go to the last cache line. */ + const char *uk_name; /* Name of creating zone. */ + LIST_ENTRY(uma_keg) uk_link; /* List of all kegs */ }; typedef struct uma_keg * uma_keg_t; From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:19:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 56C2BCD4; Mon, 8 Apr 2013 19:19:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 492382B8; Mon, 8 Apr 2013 19:19:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38JJCix088656; Mon, 8 Apr 2013 19:19:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JJAvB088644; Mon, 8 Apr 2013 19:19:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304081919.r38JJAvB088644@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Apr 2013 19:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249265 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:19:12 -0000 Author: glebius Date: Mon Apr 8 19:19:10 2013 New Revision: 249265 URL: http://svnweb.freebsd.org/changeset/base/249265 Log: Merge from projects/counters: Pad struct pcpu so that its size is denominator of PAGE_SIZE. This is done to reduce memory waste in UMA_PCPU_ZONE zones. Sponsored by: Nginx, Inc. Modified: head/sys/amd64/include/pcpu.h head/sys/arm/include/pcpu.h head/sys/i386/include/pcpu.h head/sys/ia64/include/pcpu.h head/sys/mips/include/pcpu.h head/sys/powerpc/include/pcpu.h head/sys/sparc64/include/pcpu.h head/sys/sys/pcpu.h Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/amd64/include/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -77,7 +77,9 @@ /* Pointer to the CPU TSS descriptor */ \ struct system_segment_descriptor *pc_tss; \ u_int pc_cmci_mask /* MCx banks for CMCI */ \ - PCPU_XEN_FIELDS + PCPU_XEN_FIELDS; \ + char __pad[293] /* be divisor of PAGE_SIZE \ + after cache alignment */ #ifdef _KERNEL Modified: head/sys/arm/include/pcpu.h ============================================================================== --- head/sys/arm/include/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/arm/include/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -48,12 +48,13 @@ struct vmspace; unsigned int pc_vfpmvfr0; \ unsigned int pc_vfpmvfr1; \ struct thread *pc_vfpcthread; \ - struct pmap *pc_curpmap; + struct pmap *pc_curpmap; \ + char __pad[133] #else -#define PCPU_MD_FIELDS +#define PCPU_MD_FIELDS \ + char __pad[157] #endif - #ifdef _KERNEL struct pcb; Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/i386/include/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -74,18 +74,22 @@ struct shadow_time_info { int pc_resched_irq; \ int pc_callfunc_irq; \ int pc_virq_to_irq[NR_VIRQS]; \ - int pc_ipi_to_irq[NR_IPIS] + int pc_ipi_to_irq[NR_IPIS]; \ + char __pad[77] #elif defined(XENHVM) #define PCPU_XEN_FIELDS \ ; \ unsigned int pc_last_processed_l1i; \ - unsigned int pc_last_processed_l2i + unsigned int pc_last_processed_l2i; \ + char __pad[229] #else /* !XEN && !XENHVM */ -#define PCPU_XEN_FIELDS +#define PCPU_XEN_FIELDS \ + ; \ + char __pad[237] #endif Modified: head/sys/ia64/include/pcpu.h ============================================================================== --- head/sys/ia64/include/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/ia64/include/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -64,7 +64,8 @@ struct pcpu_md { #define PCPU_MD_FIELDS \ uint32_t pc_acpi_id; /* ACPI CPU id. */ \ - struct pcpu_md pc_md /* MD fields. */ + struct pcpu_md pc_md; /* MD fields. */ \ + char __pad[1265] #ifdef _KERNEL Modified: head/sys/mips/include/pcpu.h ============================================================================== --- head/sys/mips/include/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/mips/include/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -33,13 +33,29 @@ #include -#define PCPU_MD_FIELDS \ +#define PCPU_MD_COMMON_FIELDS \ pd_entry_t *pc_segbase; /* curthread segbase */ \ struct pmap *pc_curpmap; /* pmap of curthread */ \ u_int32_t pc_next_asid; /* next ASID to alloc */ \ u_int32_t pc_asid_generation; /* current ASID generation */ \ u_int pc_pending_ipis; /* IPIs pending to this CPU */ +#ifdef __mips_n64 +#define PCPU_MD_MIPS64_FIELDS \ + PCPU_MD_COMMON_FIELDS \ + char __pad[61] +#else +#define PCPU_MD_MIPS32_FIELDS \ + PCPU_MD_COMMON_FIELDS \ + char __pad[133] +#endif + +#ifdef __mips_n64 +#define PCPU_MD_FIELDS PCPU_MD_MIPS64_FIELDS +#else +#define PCPU_MD_FIELDS PCPU_MD_MIPS32_FIELDS +#endif + #ifdef _KERNEL extern char pcpu_space[MAXCPU][PAGE_SIZE * 2]; Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/powerpc/include/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -51,13 +51,15 @@ struct pmap; register_t pc_disisave[CPUSAVE_LEN]; \ register_t pc_dbsave[CPUSAVE_LEN]; -#define PCPU_MD_AIM32_FIELDS +#define PCPU_MD_AIM32_FIELDS \ + /* char __pad[0] */ #define PCPU_MD_AIM64_FIELDS \ struct slb pc_slb[64]; \ struct slb **pc_userslb; \ register_t pc_slbsave[18]; \ - uint8_t pc_slbstack[1024]; + uint8_t pc_slbstack[1024]; \ + char __pad[1137] #ifdef __powerpc64__ #define PCPU_MD_AIM_FIELDS PCPU_MD_AIM64_FIELDS @@ -76,7 +78,8 @@ struct pmap; register_t pc_booke_tlbsave[BOOKE_TLBSAVE_LEN]; \ register_t pc_booke_tlb_level; \ uint32_t *pc_booke_tlb_lock; \ - int pc_tid_next; + int pc_tid_next; \ + char __pad[173] /* Definitions for register offsets within the exception tmp save areas */ #define CPUSAVE_R27 0 /* where r27 gets saved */ Modified: head/sys/sparc64/include/pcpu.h ============================================================================== --- head/sys/sparc64/include/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/sparc64/include/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -60,7 +60,8 @@ struct pmap; u_int pc_node; \ u_int pc_tlb_ctx; \ u_int pc_tlb_ctx_max; \ - u_int pc_tlb_ctx_min + u_int pc_tlb_ctx_min; \ + char __pad[405] #ifdef _KERNEL Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) @@ -180,6 +180,14 @@ struct pcpu { PCPU_MD_FIELDS; } __aligned(CACHE_LINE_SIZE); +#ifdef CTASSERT +/* + * To minimize memory waste in per-cpu UMA zones, size of struct pcpu + * should be denominator of PAGE_SIZE. + */ +CTASSERT((PAGE_SIZE / sizeof(struct pcpu)) * sizeof(struct pcpu) == PAGE_SIZE); +#endif + #ifdef _KERNEL STAILQ_HEAD(cpuhead, pcpu); @@ -194,6 +202,14 @@ extern struct pcpu *cpuid_to_pcpu[]; #endif #define curvidata PCPU_GET(vidata) +/* Accessor to elements allocated via UMA_ZONE_PCPU zone. */ +static inline void * +zpcpu_get(void *base) +{ + + return ((char *)(base) + sizeof(struct pcpu) * curcpu); +} + /* * Machine dependent callouts. cpu_pcpu_init() is responsible for * initializing machine dependent fields of struct pcpu, and From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:20:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6803EFB2; Mon, 8 Apr 2013 19:20:28 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF492DF; Mon, 8 Apr 2013 19:20:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38JKSPd089149; Mon, 8 Apr 2013 19:20:28 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JKSHt089148; Mon, 8 Apr 2013 19:20:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304081920.r38JKSHt089148@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Apr 2013 19:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249266 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:20:28 -0000 Author: glebius Date: Mon Apr 8 19:20:27 2013 New Revision: 249266 URL: http://svnweb.freebsd.org/changeset/base/249266 Log: Forcibly defining _KERNEL is bad idea. Toss some code so that ip_var.h isn't included with forced _KERNEL define. Modified: head/sys/contrib/ipfilter/netinet/ip_auth.c Modified: head/sys/contrib/ipfilter/netinet/ip_auth.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_auth.c Mon Apr 8 19:19:10 2013 (r249265) +++ head/sys/contrib/ipfilter/netinet/ip_auth.c Mon Apr 8 19:20:27 2013 (r249266) @@ -70,14 +70,14 @@ struct file; #include #include #include +#if !defined(linux) +# include +#endif #if !defined(_KERNEL) && !defined(__osf__) && !defined(__sgi) # define KERNEL # define _KERNEL # define NOT_KERNEL #endif -#if !defined(linux) -# include -#endif #ifdef NOT_KERNEL # undef _KERNEL # undef KERNEL From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:40:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BA14B712; Mon, 8 Apr 2013 19:40:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A89BD682; Mon, 8 Apr 2013 19:40:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38JeuQm096633; Mon, 8 Apr 2013 19:40:56 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JerAB096616; Mon, 8 Apr 2013 19:40:53 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304081940.r38JerAB096616@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Apr 2013 19:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249268 - in head: share/man/man9 sys/amd64/include sys/arm/include sys/conf sys/i386/include sys/ia64/include sys/kern sys/mips/include sys/pc98/include sys/powerpc/include sys/sparc64... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:40:56 -0000 Author: glebius Date: Mon Apr 8 19:40:53 2013 New Revision: 249268 URL: http://svnweb.freebsd.org/changeset/base/249268 Log: Merge from projects/counters: counter(9). Introduce counter(9) API, that implements fast and raceless counters, provided (but not limited to) for gathering of statistical data. See http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html for more details. In collaboration with: kib Reviewed by: luigi Tested by: ae, ray Sponsored by: Nginx, Inc. Added: head/share/man/man9/counter.9 (contents, props changed) head/sys/amd64/include/counter.h (contents, props changed) head/sys/arm/include/counter.h (contents, props changed) head/sys/i386/include/counter.h (contents, props changed) head/sys/ia64/include/counter.h (contents, props changed) head/sys/kern/subr_counter.c (contents, props changed) head/sys/mips/include/counter.h (contents, props changed) head/sys/pc98/include/counter.h (contents, props changed) head/sys/powerpc/include/counter.h (contents, props changed) head/sys/sparc64/include/counter.h (contents, props changed) head/sys/sys/counter.h (contents, props changed) Modified: head/share/man/man9/Makefile head/sys/conf/files head/sys/sys/sysctl.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Apr 8 19:23:22 2013 (r249267) +++ head/share/man/man9/Makefile Mon Apr 8 19:40:53 2013 (r249268) @@ -51,6 +51,7 @@ MAN= accept_filter.9 \ config_intrhook.9 \ contigmalloc.9 \ copy.9 \ + counter.9 \ cr_cansee.9 \ critical_enter.9 \ cr_seeothergids.9 \ @@ -569,6 +570,14 @@ MLINKS+=copy.9 copyin.9 \ copy.9 copyout.9 \ copy.9 copyout_nofault.9 \ copy.9 copystr.9 +MLINKS+=counter.9 counter_u64_alloc.9 \ + counter.9 counter_u64_free.9 \ + counter.9 counter_u64_add.9 \ + counter.9 counter_enter.9 \ + counter.9 counter_exit.9 \ + counter.9 counter_u64_add_protected.9 \ + counter.9 counter_u64_fetch.9 \ + counter.9 counter_u64_zero.9 MLINKS+=critical_enter.9 critical.9 \ critical_enter.9 critical_exit.9 MLINKS+=crypto.9 crypto_dispatch.9 \ Added: head/share/man/man9/counter.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/counter.9 Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,200 @@ +.\"- +.\" Copyright (c) 2013 Gleb Smirnoff +.\" 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 April 3, 2013 +.Dt COUNTER 9 +.Os +.Sh NAME +.Nm counter +.Nd "SMP-friendly kernel counter implementation" +.Sh SYNOPSIS +.In sys/types.h +.In sys/counter.h +.Ft counter_u64_t +.Fn counter_u64_alloc "int wait" +.Ft void +.Fn counter_u64_free "counter_u64_t c" +.Ft void +.Fn counter_u64_add "counter_u64_t c" "int64_t v" +.Ft void +.Fn counter_enter +.Ft void +.Fn counter_exit +.Ft void +.Fn counter_u64_add_protected "counter_u64_t c" "int64_t v" +.Ft uint64_t +.Fn counter_u64_fetch "counter_u64_t c" +.Ft void +.Fn counter_u64_zero "counter_u64_t c" +.In sys/sysctl.h +.Fn SYSCTL_COUNTER_U64 parent nbr name access ptr val descr +.Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr +.Sh DESCRIPTION +.Nm +is a generic facility to create counters +that can be utilized for any purpose (such as collecting statistical +data). +A +.Nm +is guaranteed to be lossless when several kernel threads do simultaneous +updates. +However, +.Nm +does not block the calling thread, +also no +.Xr atomic 9 +operations are used for the update, therefore the counters +can be used in any non-interrupt context. +Moreover, +.Nm +has special optimisations for SMP environments, making +.Nm +update faster than simple arithmetic on the global variable. +Thus +.Nm +is considered suitable for accounting in the performance-critical +code pathes. +.Bl -tag -width indent +.It Fn counter_u64_alloc how +Allocate a new 64-bit unsigned counter. +The +.Fa wait +argument is the +.Xr malloc 9 +wait flag, should be either +.Va M_NOWAIT +or +.Va M_WAITOK . +If +.Va M_WAITOK +is specified the operation may fail. +.It Fn counter_u64_free c +Free the previously allocated counter +.Fa c . +.It Fn counter_u64_add c v +Add +.Fa v +to +.Fa c . +The KPI does not guarantee any protection from wraparound. +.It Fn counter_enter +Enter mode that would allow to safely update several counters via +.Fn counter_u64_add_protected . +On some machines this expands to +.Xr critical 9 +section, while on other is a nop. +See +.Sx IMPLEMENTATION DETAILS . +.It Fn counter_exit +Exit mode for updating several counters. +.It Fn counter_u64_add_protected c v +Same as +.Fn counter_u64_add , +but should be preceded by +.Fn counter_enter . +.It Fn counter_u64_fetch c +Take a snapshot of counter +.Fa c . +The data obtained is not guaranteed to reflect the real cumulative +value for any moment. +.It Fn counter_u64_zero c +Clear the counter +.Fa c +and set it to zero. +.It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr val descr +Declare a static +.Xr sysctl +oid that would represent a +.Nm . +The +.Fa ptr +argument should be a pointer to allocated +.Vt counter_u64_t . +A read of the oid returns value obtained through +.Fn counter_u64_fetch . +Any write to the oid zeroes it. +.It Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr +Create a +.Xr sysctl +oid that would represent a +.Nm . +The +.Fa ptr +argument should be a pointer to allocated +.Vt counter_u64_t . +A read of the oid returns value obtained through +.Fn counter_u64_fetch . +Any write to the oid zeroes it. +.El +.Sh IMPLEMENTATION DETAILS +On all architectures +.Nm +is implemented using per-CPU data fields that are specially aligned +in memory, to avoid inter-CPU bus traffic due to shared use +of the variables between CPUs. +These are allocated using +.Va UMA_ZONE_PCPU +.Xr uma 9 +zone. +The update operation only touches the field that is private to current CPU. +Fetch operation loops through all per-CPU fields and obtains a snapshot +sum of all fields. +.Pp +On amd64 a +.Nm counter +update is implemented as a single instruction without lock semantics, +operating on the private data for the current CPU, +which is safe against preemption and interrupts. +.Pp +On i386 architecture, when machine supports the cmpxchg8 instruction, +this instruction is used. +The multi-instruction sequence provides the same guarantees as the +amd64 single-instruction implementation. +.Pp +On some architectures updating a counter require a +.Xr critical 9 +section. +.Sh SEE ALSO +.Xr atomic 9 , +.Xr critical 9 , +.Xr locking 9 , +.Xr malloc 9 , +.Xr sysctl 9 , +.Xr uma 9 +.Sh HISTORY +The +.Nm +facility first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +facility was written by +.An Gleb Smirnoff +and +.An Konstantin Belousov . Added: head/sys/amd64/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2012 Konstantin Belousov + * 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$ + */ + +#ifndef __MACHINE_COUNTER_H__ +#define __MACHINE_COUNTER_H__ + +#include + +extern struct pcpu __pcpu[1]; + +#define counter_enter() do {} while (0) +#define counter_exit() do {} while (0) + +#define counter_u64_add_protected(c, i) counter_u64_add(c, i) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + + __asm __volatile("addq\t%1,%%gs:(%0)" + : + : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) + : "memory", "cc"); +} + +#endif /* ! __MACHINE_COUNTER_H__ */ Added: head/sys/arm/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2012 Konstantin Belousov + * 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$ + */ + +#ifndef __MACHINE_COUNTER_H__ +#define __MACHINE_COUNTER_H__ + +#include +#ifdef INVARIANTS +#include +#endif + +#define counter_enter() critical_enter() +#define counter_exit() critical_exit() + +#define counter_u64_add_protected(c, inc) do { \ + CRITICAL_ASSERT(curthread); \ + *(uint64_t *)zpcpu_get(c) += (inc); \ +} while (0) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + + counter_enter(); + counter_u64_add_protected(c, inc); + counter_exit(); +} + +#endif /* ! __MACHINE_COUNTER_H__ */ Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Apr 8 19:23:22 2013 (r249267) +++ head/sys/conf/files Mon Apr 8 19:40:53 2013 (r249268) @@ -2683,6 +2683,7 @@ kern/subr_bus.c standard kern/subr_bus_dma.c standard kern/subr_bufring.c standard kern/subr_clock.c standard +kern/subr_counter.c standard kern/subr_devstat.c standard kern/subr_disk.c standard kern/subr_eventhandler.c standard Added: head/sys/i386/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/i386/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2012 Konstantin Belousov + * 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$ + */ + +#ifndef __MACHINE_COUNTER_H__ +#define __MACHINE_COUNTER_H__ + +#include +#ifdef INVARIANTS +#include +#endif +#include +#include + +#define counter_enter() do { \ + if ((cpu_feature & CPUID_CX8) == 0) \ + critical_enter(); \ +} while (0) + +#define counter_exit() do { \ + if ((cpu_feature & CPUID_CX8) == 0) \ + critical_exit(); \ +} while (0) + +static inline void +counter_64_inc_8b(uint64_t *p, int64_t inc) +{ + + __asm __volatile( + "movl %%fs:(%%esi),%%eax\n\t" + "movl %%fs:4(%%esi),%%edx\n" +"1:\n\t" + "movl %%eax,%%ebx\n\t" + "movl %%edx,%%ecx\n\t" + "addl (%%edi),%%ebx\n\t" + "adcl 4(%%edi),%%ecx\n\t" + "cmpxchg8b %%fs:(%%esi)\n\t" + "jnz 1b" + : + : "S" (p), "D" (&inc) + : "memory", "cc", "eax", "edx", "ebx", "ecx"); +} + +#define counter_u64_add_protected(c, inc) do { \ + if ((cpu_feature & CPUID_CX8) == 0) { \ + CRITICAL_ASSERT(curthread); \ + *(uint64_t *)zpcpu_get(c) += (inc); \ + } else \ + counter_64_inc_8b((c), (inc)); \ +} while (0) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + + if ((cpu_feature & CPUID_CX8) == 0) { + critical_enter(); + *(uint64_t *)zpcpu_get(c) += inc; + critical_exit(); + } else { + counter_64_inc_8b(c, inc); + } +} + +#endif /* ! __MACHINE_COUNTER_H__ */ Added: head/sys/ia64/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ia64/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2012 Konstantin Belousov + * 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$ + */ + +#ifndef __MACHINE_COUNTER_H__ +#define __MACHINE_COUNTER_H__ + +#include +#ifdef INVARIANTS +#include +#endif + +#define counter_enter() critical_enter() +#define counter_exit() critical_exit() + +#define counter_u64_add_protected(c, inc) do { \ + CRITICAL_ASSERT(curthread); \ + *(uint64_t *)zpcpu_get(c) += (inc); \ +} while (0) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + + counter_enter(); + counter_u64_add_protected(c, inc); + counter_exit(); +} + +#endif /* ! __MACHINE_COUNTER_H__ */ Added: head/sys/kern/subr_counter.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/subr_counter.c Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,109 @@ +/*- + * Copyright (c) 2012 Gleb Smirnoff + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +static uma_zone_t uint64_pcpu_zone; + +void +counter_u64_zero(counter_u64_t c) +{ + int i; + + for (i = 0; i < mp_ncpus; i++) + *(uint64_t *)((char *)c + sizeof(struct pcpu) * i) = 0; +} + +uint64_t +counter_u64_fetch(counter_u64_t c) +{ + uint64_t r; + int i; + + r = 0; + for (i = 0; i < mp_ncpus; i++) + r += *(uint64_t *)((char *)c + sizeof(struct pcpu) * i); + + return (r); +} + +counter_u64_t +counter_u64_alloc(int flags) +{ + counter_u64_t r; + + r = uma_zalloc(uint64_pcpu_zone, flags); + if (r != NULL) + counter_u64_zero(r); + + return (r); +} + +void +counter_u64_free(counter_u64_t c) +{ + + uma_zfree(uint64_pcpu_zone, c); +} + +int +sysctl_handle_counter_u64(SYSCTL_HANDLER_ARGS) +{ + uint64_t out; + int error; + + out = counter_u64_fetch(*(counter_u64_t *)arg1); + + error = SYSCTL_OUT(req, &out, sizeof(uint64_t)); + + if (error || !req->newptr) + return (error); + + /* + * Any write attempt to a counter zeroes it. + */ + counter_u64_zero(*(counter_u64_t *)arg1); + + return (0); +} + +static void +counter_startup(void) +{ + + uint64_pcpu_zone = uma_zcreate("uint64 pcpu", sizeof(uint64_t), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); +} +SYSINIT(counter, SI_SUB_KMEM, SI_ORDER_ANY, counter_startup, NULL); Added: head/sys/mips/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2012 Konstantin Belousov + * 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$ + */ + +#ifndef __MACHINE_COUNTER_H__ +#define __MACHINE_COUNTER_H__ + +#include +#ifdef INVARIANTS +#include +#endif + +#define counter_enter() critical_enter() +#define counter_exit() critical_exit() + +#define counter_u64_add_protected(c, inc) do { \ + CRITICAL_ASSERT(curthread); \ + *(uint64_t *)zpcpu_get(c) += (inc); \ +} while (0) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + + counter_enter(); + counter_u64_add_protected(c, inc); + counter_exit(); +} + +#endif /* ! __MACHINE_COUNTER_H__ */ Added: head/sys/pc98/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/pc98/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include Added: head/sys/powerpc/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,82 @@ +/*- + * Copyright (c) 2012, 2013 Konstantin Belousov + * 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$ + */ + +#ifndef __MACHINE_COUNTER_H__ +#define __MACHINE_COUNTER_H__ + +#include +#ifdef INVARIANTS +#include +#endif + +#if defined(AIM) && defined(__powerpc64__) + +#define counter_enter() do {} while (0) +#define counter_exit() do {} while (0) + +#define counter_u64_add_protected(c, i) counter_u64_add(c, i) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + uint64_t ccpu, old; + + __asm __volatile("\n" + "1:\n\t" + "mfsprg %0, 0\n\t" + "ldarx %1, %0, %2\n\t" + "add %1, %1, %3\n\t" + "stdcx. %1, %0, %2\n\t" + "bne- 1b" + : "=&b" (ccpu), "=&r" (old) + : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) + : "cc", "memory"); +} + +#else /* !AIM || !64bit */ + +#define counter_enter() critical_enter() +#define counter_exit() critical_exit() + +#define counter_u64_add_protected(c, inc) do { \ + CRITICAL_ASSERT(curthread); \ + *(uint64_t *)zpcpu_get(c) += (inc); \ +} while (0) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + + counter_enter(); + counter_u64_add_protected(c, inc); + counter_exit(); +} + +#endif /* AIM 64bit */ + +#endif /* ! __MACHINE_COUNTER_H__ */ Added: head/sys/sparc64/include/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sparc64/include/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2012 Konstantin Belousov + * 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$ + */ + +#ifndef __MACHINE_COUNTER_H__ +#define __MACHINE_COUNTER_H__ + +#include +#ifdef INVARIANTS +#include +#endif + +#define counter_enter() critical_enter() +#define counter_exit() critical_exit() + +#define counter_u64_add_protected(c, inc) do { \ + CRITICAL_ASSERT(curthread); \ + *(uint64_t *)zpcpu_get(c) += (inc); \ +} while (0) + +static inline void +counter_u64_add(counter_u64_t c, int64_t inc) +{ + + counter_enter(); + counter_u64_add_protected(c, inc); + counter_exit(); +} + +#endif /* ! __MACHINE_COUNTER_H__ */ Added: head/sys/sys/counter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/counter.h Mon Apr 8 19:40:53 2013 (r249268) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2012 Gleb Smirnoff + * 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$ + */ + +#ifndef __SYS_COUNTER_H__ +#define __SYS_COUNTER_H__ + +typedef uint64_t *counter_u64_t; + +#include + +counter_u64_t counter_u64_alloc(int); +void counter_u64_free(counter_u64_t); + +void counter_u64_zero(counter_u64_t); +uint64_t counter_u64_fetch(counter_u64_t); + +#endif /* ! __SYS_COUNTER_H__ */ Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Mon Apr 8 19:23:22 2013 (r249267) +++ head/sys/sys/sysctl.h Mon Apr 8 19:40:53 2013 (r249268) @@ -184,6 +184,7 @@ int sysctl_handle_long(SYSCTL_HANDLER_AR int sysctl_handle_64(SYSCTL_HANDLER_ARGS); int sysctl_handle_string(SYSCTL_HANDLER_ARGS); int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS); +int sysctl_handle_counter_u64(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_long(SYSCTL_HANDLER_ARGS); @@ -379,6 +380,19 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a SYSCTL_ADD_ASSERT_TYPE(UINT64, ptr), 0, \ sysctl_handle_64, "QU", __DESCR(descr)) +/* Oid for a 64-bin unsigned counter(9). The pointer must be non NULL. */ +#define SYSCTL_COUNTER_U64(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_counter_u64, "QU", descr) + +#define SYSCTL_ADD_COUNTER_U64(ctx, parent, nbr, name, access, ptr, descr)\ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(UINT64, ptr), 0, \ + sysctl_handle_counter_u64, "QU", __DESCR(descr)) + /* Oid for an opaque object. Specified by a pointer and a length. */ #define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \ From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:42:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 22140899; Mon, 8 Apr 2013 19:42:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id F2817690; Mon, 8 Apr 2013 19:42:05 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 48BE3B915; Mon, 8 Apr 2013 15:42:05 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r249265 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sys Date: Mon, 8 Apr 2013 15:41:27 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201304081919.r38JJAvB088644@svn.freebsd.org> In-Reply-To: <201304081919.r38JJAvB088644@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201304081541.27408.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 08 Apr 2013 15:42:05 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:42:06 -0000 On Monday, April 08, 2013 3:19:10 pm Gleb Smirnoff wrote: > Author: glebius > Date: Mon Apr 8 19:19:10 2013 > New Revision: 249265 > URL: http://svnweb.freebsd.org/changeset/base/249265 > > Log: > Merge from projects/counters: > > Pad struct pcpu so that its size is denominator of PAGE_SIZE. This > is done to reduce memory waste in UMA_PCPU_ZONE zones. > > Sponsored by: Nginx, Inc. > > Modified: head/sys/sys/pcpu.h > ============================================================================== > --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) > +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) > @@ -180,6 +180,14 @@ struct pcpu { > PCPU_MD_FIELDS; > } __aligned(CACHE_LINE_SIZE); Why not change this to be PAGE_SIZE rather than putting explicit padding in all the pcpu fields? That would seem to be more maintainable. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:44:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 191D8B63; Mon, 8 Apr 2013 19:44:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 981726B9; Mon, 8 Apr 2013 19:44:37 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r38JiacB047230; Mon, 8 Apr 2013 23:44:36 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r38JiaIx047229; Mon, 8 Apr 2013 23:44:36 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 8 Apr 2013 23:44:36 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r249265 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sys Message-ID: <20130408194436.GI76816@FreeBSD.org> References: <201304081919.r38JJAvB088644@svn.freebsd.org> <201304081541.27408.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201304081541.27408.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:44:39 -0000 On Mon, Apr 08, 2013 at 03:41:27PM -0400, John Baldwin wrote: J> On Monday, April 08, 2013 3:19:10 pm Gleb Smirnoff wrote: J> > Author: glebius J> > Date: Mon Apr 8 19:19:10 2013 J> > New Revision: 249265 J> > URL: http://svnweb.freebsd.org/changeset/base/249265 J> > J> > Log: J> > Merge from projects/counters: J> > J> > Pad struct pcpu so that its size is denominator of PAGE_SIZE. This J> > is done to reduce memory waste in UMA_PCPU_ZONE zones. J> > J> > Sponsored by: Nginx, Inc. J> > J> > Modified: head/sys/sys/pcpu.h J> > J> ============================================================================== J> > --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) J> > +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) J> > @@ -180,6 +180,14 @@ struct pcpu { J> > PCPU_MD_FIELDS; J> > } __aligned(CACHE_LINE_SIZE); J> J> Why not change this to be PAGE_SIZE rather than putting explicit padding in J> all the pcpu fields? That would seem to be more maintainable. Because it can be smaller than PAGE_SIZE. Two times smaller, four times smaller. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:57:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4C37F6B7; Mon, 8 Apr 2013 19:57:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3E52E7C6; Mon, 8 Apr 2013 19:57:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38JvM7j001046; Mon, 8 Apr 2013 19:57:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JvLpw001040; Mon, 8 Apr 2013 19:57:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304081957.r38JvLpw001040@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Apr 2013 19:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249276 - in head: sys/netinet usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:57:22 -0000 Author: glebius Date: Mon Apr 8 19:57:21 2013 New Revision: 249276 URL: http://svnweb.freebsd.org/changeset/base/249276 Log: Merge from projects/counters: TCP/IP stats. Convert 'struct ipstat' and 'struct tcpstat' to counter(9). This speeds up IP forwarding at extreme packet rates, and makes accounting more precise. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c head/sys/netinet/ip_var.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_var.h head/usr.bin/netstat/inet.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Mon Apr 8 19:56:14 2013 (r249275) +++ head/sys/netinet/ip_input.c Mon Apr 8 19:57:21 2013 (r249276) @@ -153,11 +153,6 @@ VNET_DEFINE(struct in_ifaddrhead, in_ifa VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ -VNET_DEFINE(struct ipstat, ipstat); -SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, - &VNET_NAME(ipstat), ipstat, - "IP statistics (struct ipstat, netinet/ip_var.h)"); - static VNET_DEFINE(uma_zone_t, ipq_zone); static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); static struct mtx ipqlock; @@ -213,24 +208,89 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, static void ip_freef(struct ipqhead *, struct ipq *); /* + * IP statistics are stored in struct ipstat_p, which is + * an "array" of counter(9)s. Although it isn't a real + * array, we treat it as array to reduce code bloat. + */ +VNET_DEFINE(struct ipstat_p, ipstatp); + +static void +vnet_ipstatp_init(const void *unused) +{ + counter_u64_t *c; + int i; + + for (i = 0, c = (counter_u64_t *)&V_ipstatp; + i < sizeof(V_ipstatp) / sizeof(counter_u64_t); + i++, c++) { + *c = counter_u64_alloc(M_WAITOK); + counter_u64_zero(*c); + } +} +VNET_SYSINIT(vnet_ipstatp_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_ipstatp_init, NULL); + +#ifdef VIMAGE +static void +vnet_ipstatp_uninit(const void *unused) +{ + counter_u64_t *c; + int i; + + for (i = 0, c = (counter_u64_t *)&V_ipstatp; + i < sizeof(V_ipstatp) / sizeof(counter_u64_t); + i++, c++) + counter_u64_free(*c); +} +VNET_SYSUNINIT(vnet_ipstatp_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_ipstatp_uninit, NULL); +#endif /* VIMAGE */ + +static int +ipstat_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct ipstat ipstat; + counter_u64_t *c; + uint64_t *v; + int i; + + for (i = 0, c = (counter_u64_t *)&V_ipstatp, v = (uint64_t *)&ipstat; + i < sizeof(V_ipstatp) / sizeof(counter_u64_t); + i++, c++, v++) { + *v = counter_u64_fetch(*c); + /* + * Old interface allowed to rewrite 'struct ipstat', and + * netstat(1) used it to zero the structure. To keep + * compatibility with old netstat(1) we will zero out + * statistics on every write attempt, however we no longer + * support writing arbitrary fake values to the statistics. + */ + if (req->newptr) + counter_u64_zero(*c); + } + + return (SYSCTL_OUT(req, &ipstat, sizeof(ipstat))); +} +SYSCTL_VNET_PROC(_net_inet_ip, IPCTL_STATS, stats, CTLTYPE_OPAQUE | CTLFLAG_RW, + NULL, 0, ipstat_sysctl, "I", + "IP statistics (struct ipstat, netinet/ip_var.h)"); + +/* * Kernel module interface for updating ipstat. The argument is an index - * into ipstat treated as an array of u_long. While this encodes the general - * layout of ipstat into the caller, it doesn't encode its location, so that - * future changes to add, for example, per-CPU stats support won't cause - * binary compatibility problems for kernel modules. + * into ipstat treated as an array. */ void kmod_ipstat_inc(int statnum) { - (*((u_long *)&V_ipstat + statnum))++; + counter_u64_add((counter_u64_t )&V_ipstatp + statnum, 1); } void kmod_ipstat_dec(int statnum) { - (*((u_long *)&V_ipstat + statnum))--; + counter_u64_add((counter_u64_t )&V_ipstatp + statnum, -1); } static int Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Mon Apr 8 19:56:14 2013 (r249275) +++ head/sys/netinet/ip_var.h Mon Apr 8 19:57:21 2013 (r249276) @@ -97,59 +97,95 @@ struct ip_moptions { }; struct ipstat { - u_long ips_total; /* total packets received */ - u_long ips_badsum; /* checksum bad */ - u_long ips_tooshort; /* packet too short */ - u_long ips_toosmall; /* not enough data */ - u_long ips_badhlen; /* ip header length < data size */ - u_long ips_badlen; /* ip length < ip header length */ - u_long ips_fragments; /* fragments received */ - u_long ips_fragdropped; /* frags dropped (dups, out of space) */ - u_long ips_fragtimeout; /* fragments timed out */ - u_long ips_forward; /* packets forwarded */ - u_long ips_fastforward; /* packets fast forwarded */ - u_long ips_cantforward; /* packets rcvd for unreachable dest */ - u_long ips_redirectsent; /* packets forwarded on same net */ - u_long ips_noproto; /* unknown or unsupported protocol */ - u_long ips_delivered; /* datagrams delivered to upper level*/ - u_long ips_localout; /* total ip packets generated here */ - u_long ips_odropped; /* lost packets due to nobufs, etc. */ - u_long ips_reassembled; /* total packets reassembled ok */ - u_long ips_fragmented; /* datagrams successfully fragmented */ - u_long ips_ofragments; /* output fragments created */ - u_long ips_cantfrag; /* don't fragment flag was set, etc. */ - u_long ips_badoptions; /* error in option processing */ - u_long ips_noroute; /* packets discarded due to no route */ - u_long ips_badvers; /* ip version != 4 */ - u_long ips_rawout; /* total raw ip packets generated */ - u_long ips_toolong; /* ip length > max ip packet size */ - u_long ips_notmember; /* multicasts for unregistered grps */ - u_long ips_nogif; /* no match gif found */ - u_long ips_badaddr; /* invalid address on header */ + uint64_t ips_total; /* total packets received */ + uint64_t ips_badsum; /* checksum bad */ + uint64_t ips_tooshort; /* packet too short */ + uint64_t ips_toosmall; /* not enough data */ + uint64_t ips_badhlen; /* ip header length < data size */ + uint64_t ips_badlen; /* ip length < ip header length */ + uint64_t ips_fragments; /* fragments received */ + uint64_t ips_fragdropped; /* frags dropped (dups, out of space) */ + uint64_t ips_fragtimeout; /* fragments timed out */ + uint64_t ips_forward; /* packets forwarded */ + uint64_t ips_fastforward; /* packets fast forwarded */ + uint64_t ips_cantforward; /* packets rcvd for unreachable dest */ + uint64_t ips_redirectsent; /* packets forwarded on same net */ + uint64_t ips_noproto; /* unknown or unsupported protocol */ + uint64_t ips_delivered; /* datagrams delivered to upper level*/ + uint64_t ips_localout; /* total ip packets generated here */ + uint64_t ips_odropped; /* lost packets due to nobufs, etc. */ + uint64_t ips_reassembled; /* total packets reassembled ok */ + uint64_t ips_fragmented; /* datagrams successfully fragmented */ + uint64_t ips_ofragments; /* output fragments created */ + uint64_t ips_cantfrag; /* don't fragment flag was set, etc. */ + uint64_t ips_badoptions; /* error in option processing */ + uint64_t ips_noroute; /* packets discarded due to no route */ + uint64_t ips_badvers; /* ip version != 4 */ + uint64_t ips_rawout; /* total raw ip packets generated */ + uint64_t ips_toolong; /* ip length > max ip packet size */ + uint64_t ips_notmember; /* multicasts for unregistered grps */ + uint64_t ips_nogif; /* no match gif found */ + uint64_t ips_badaddr; /* invalid address on header */ }; #ifdef _KERNEL +#include #include +/* Should match 'struct ipstat' above. */ +struct ipstat_p { + counter_u64_t ips_total; + counter_u64_t ips_badsum; + counter_u64_t ips_tooshort; + counter_u64_t ips_toosmall; + counter_u64_t ips_badhlen; + counter_u64_t ips_badlen; + counter_u64_t ips_fragments; + counter_u64_t ips_fragdropped; + counter_u64_t ips_fragtimeout; + counter_u64_t ips_forward; + counter_u64_t ips_fastforward; + counter_u64_t ips_cantforward; + counter_u64_t ips_redirectsent; + counter_u64_t ips_noproto; + counter_u64_t ips_delivered; + counter_u64_t ips_localout; + counter_u64_t ips_odropped; + counter_u64_t ips_reassembled; + counter_u64_t ips_fragmented; + counter_u64_t ips_ofragments; + counter_u64_t ips_cantfrag; + counter_u64_t ips_badoptions; + counter_u64_t ips_noroute; + counter_u64_t ips_badvers; + counter_u64_t ips_rawout; + counter_u64_t ips_toolong; + counter_u64_t ips_notmember; + counter_u64_t ips_nogif; + counter_u64_t ips_badaddr; +}; +VNET_DECLARE(struct ipstat_p, ipstatp); +#define V_ipstatp VNET(ipstatp) + /* * In-kernel consumers can use these accessor macros directly to update * stats. */ -#define IPSTAT_ADD(name, val) V_ipstat.name += (val) -#define IPSTAT_SUB(name, val) V_ipstat.name -= (val) +#define IPSTAT_ADD(name, val) counter_u64_add(V_ipstatp.name, (val)) +#define IPSTAT_SUB(name, val) counter_u64_subtract(V_ipstatp.name, (val)) #define IPSTAT_INC(name) IPSTAT_ADD(name, 1) -#define IPSTAT_DEC(name) IPSTAT_SUB(name, 1) +#define IPSTAT_DEC(name) IPSTAT_ADD(name, -1) /* * Kernel module consumers must use this accessor macro. */ void kmod_ipstat_inc(int statnum); #define KMOD_IPSTAT_INC(name) \ - kmod_ipstat_inc(offsetof(struct ipstat, name) / sizeof(u_long)) + kmod_ipstat_inc(offsetof(struct ipstat_p, name) / sizeof(counter_u64_t)) void kmod_ipstat_dec(int statnum); #define KMOD_IPSTAT_DEC(name) \ - kmod_ipstat_dec(offsetof(struct ipstat, name) / sizeof(u_long)) + kmod_ipstat_dec(offsetof(struct ipstat_p, name) / sizeof(counter_u64_t)) /* flags passed to ip_output as last parameter */ #define IP_FORWARDING 0x1 /* most of ip header exists */ @@ -176,7 +212,6 @@ struct inpcb; struct route; struct sockopt; -VNET_DECLARE(struct ipstat, ipstat); VNET_DECLARE(u_short, ip_id); /* ip packet ctr, for ids */ VNET_DECLARE(int, ip_defttl); /* default IP ttl */ VNET_DECLARE(int, ipforwarding); /* ip forwarding */ @@ -192,7 +227,6 @@ VNET_DECLARE(int, rsvp_on); VNET_DECLARE(int, drop_redirect); extern struct pr_usrreqs rip_usrreqs; -#define V_ipstat VNET(ipstat) #define V_ip_id VNET(ip_id) #define V_ip_defttl VNET(ip_defttl) #define V_ipforwarding VNET(ipforwarding) Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Apr 8 19:56:14 2013 (r249275) +++ head/sys/netinet/tcp_input.c Mon Apr 8 19:57:21 2013 (r249276) @@ -120,11 +120,6 @@ __FBSDID("$FreeBSD$"); const int tcprexmtthresh = 3; -VNET_DEFINE(struct tcpstat, tcpstat); -SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW, - &VNET_NAME(tcpstat), tcpstat, - "TCP statistics (struct tcpstat, netinet/tcp_var.h)"); - int tcp_log_in_vain = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW, &tcp_log_in_vain, 0, @@ -245,17 +240,76 @@ static void inline hhook_run_tcp_est_in( struct tcphdr *th, struct tcpopt *to); /* + * TCP statistics are stored in struct tcpstat_p, which is + * an "array" of counter(9)s. Although it isn't a real + * array, we treat it as array to reduce code bloat. + */ +VNET_DEFINE(struct tcpstat_p, tcpstatp); + +static void +vnet_tcpstatp_init(const void *unused) +{ + counter_u64_t *c; + int i; + + for (i = 0, c = (counter_u64_t *)&V_tcpstatp; + i < sizeof(V_tcpstatp) / sizeof(counter_u64_t); + i++, c++) { + *c = counter_u64_alloc(M_WAITOK); + counter_u64_zero(*c); + } +} +VNET_SYSINIT(vnet_tcpstatp_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_tcpstatp_init, NULL); + +#ifdef VIMAGE +static void +vnet_tcpstatp_uninit(const void *unused) +{ + counter_u64_t *c; + int i; + + for (i = 0, c = (counter_u64_t *)&V_tcpstatp; + i < sizeof(V_tcpstatp) / sizeof(counter_u64_t); + i++, c++) + counter_u64_free(*c); +} +VNET_SYSUNINIT(vnet_tcpstatp_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_ipstatp_uninit, NULL); +#endif /* VIMAGE */ + +static int +tcpstat_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct tcpstat tcpstat; + counter_u64_t *c; + uint64_t *v; + int i; + + for (i = 0, c = (counter_u64_t *)&V_tcpstatp, v = (uint64_t *)&tcpstat; + i < sizeof(V_tcpstatp) / sizeof(counter_u64_t); + i++, c++, v++) { + *v = counter_u64_fetch(*c); + if (req->newptr) + counter_u64_zero(*c); + } + + return (SYSCTL_OUT(req, &tcpstat, sizeof(tcpstat))); +} + +SYSCTL_VNET_PROC(_net_inet_tcp, TCPCTL_STATS, stats, CTLTYPE_OPAQUE | + CTLFLAG_RW, NULL, 0, tcpstat_sysctl, "I", + "TCP statistics (struct tcpstat, netinet/tcp_var.h)"); + +/* * Kernel module interface for updating tcpstat. The argument is an index - * into tcpstat treated as an array of u_long. While this encodes the - * general layout of tcpstat into the caller, it doesn't encode its location, - * so that future changes to add, for example, per-CPU stats support won't - * cause binary compatibility problems for kernel modules. + * into tcpstat treated as an array. */ void kmod_tcpstat_inc(int statnum) { - (*((u_long *)&V_tcpstat + statnum))++; + counter_u64_add((counter_u64_t )&V_tcpstatp + statnum, 1); } /* Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Mon Apr 8 19:56:14 2013 (r249275) +++ head/sys/netinet/tcp_var.h Mon Apr 8 19:57:21 2013 (r249276) @@ -389,125 +389,233 @@ struct tcptw { * but that's inconvenient at the moment. */ struct tcpstat { - u_long tcps_connattempt; /* connections initiated */ - u_long tcps_accepts; /* connections accepted */ - u_long tcps_connects; /* connections established */ - u_long tcps_drops; /* connections dropped */ - u_long tcps_conndrops; /* embryonic connections dropped */ - u_long tcps_minmssdrops; /* average minmss too low drops */ - u_long tcps_closed; /* conn. closed (includes drops) */ - u_long tcps_segstimed; /* segs where we tried to get rtt */ - u_long tcps_rttupdated; /* times we succeeded */ - u_long tcps_delack; /* delayed acks sent */ - u_long tcps_timeoutdrop; /* conn. dropped in rxmt timeout */ - u_long tcps_rexmttimeo; /* retransmit timeouts */ - u_long tcps_persisttimeo; /* persist timeouts */ - u_long tcps_keeptimeo; /* keepalive timeouts */ - u_long tcps_keepprobe; /* keepalive probes sent */ - u_long tcps_keepdrops; /* connections dropped in keepalive */ - - u_long tcps_sndtotal; /* total packets sent */ - u_long tcps_sndpack; /* data packets sent */ - u_long tcps_sndbyte; /* data bytes sent */ - u_long tcps_sndrexmitpack; /* data packets retransmitted */ - u_long tcps_sndrexmitbyte; /* data bytes retransmitted */ - u_long tcps_sndrexmitbad; /* unnecessary packet retransmissions */ - u_long tcps_sndacks; /* ack-only packets sent */ - u_long tcps_sndprobe; /* window probes sent */ - u_long tcps_sndurg; /* packets sent with URG only */ - u_long tcps_sndwinup; /* window update-only packets sent */ - u_long tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */ - - u_long tcps_rcvtotal; /* total packets received */ - u_long tcps_rcvpack; /* packets received in sequence */ - u_long tcps_rcvbyte; /* bytes received in sequence */ - u_long tcps_rcvbadsum; /* packets received with ccksum errs */ - u_long tcps_rcvbadoff; /* packets received with bad offset */ - u_long tcps_rcvmemdrop; /* packets dropped for lack of memory */ - u_long tcps_rcvshort; /* packets received too short */ - u_long tcps_rcvduppack; /* duplicate-only packets received */ - u_long tcps_rcvdupbyte; /* duplicate-only bytes received */ - u_long tcps_rcvpartduppack; /* packets with some duplicate data */ - u_long tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */ - u_long tcps_rcvoopack; /* out-of-order packets received */ - u_long tcps_rcvoobyte; /* out-of-order bytes received */ - u_long tcps_rcvpackafterwin; /* packets with data after window */ - u_long tcps_rcvbyteafterwin; /* bytes rcvd after window */ - u_long tcps_rcvafterclose; /* packets rcvd after "close" */ - u_long tcps_rcvwinprobe; /* rcvd window probe packets */ - u_long tcps_rcvdupack; /* rcvd duplicate acks */ - u_long tcps_rcvacktoomuch; /* rcvd acks for unsent data */ - u_long tcps_rcvackpack; /* rcvd ack packets */ - u_long tcps_rcvackbyte; /* bytes acked by rcvd acks */ - u_long tcps_rcvwinupd; /* rcvd window update packets */ - u_long tcps_pawsdrop; /* segments dropped due to PAWS */ - u_long tcps_predack; /* times hdr predict ok for acks */ - u_long tcps_preddat; /* times hdr predict ok for data pkts */ - u_long tcps_pcbcachemiss; - u_long tcps_cachedrtt; /* times cached RTT in route updated */ - u_long tcps_cachedrttvar; /* times cached rttvar updated */ - u_long tcps_cachedssthresh; /* times cached ssthresh updated */ - u_long tcps_usedrtt; /* times RTT initialized from route */ - u_long tcps_usedrttvar; /* times RTTVAR initialized from rt */ - u_long tcps_usedssthresh; /* times ssthresh initialized from rt*/ - u_long tcps_persistdrop; /* timeout in persist state */ - u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */ - u_long tcps_mturesent; /* resends due to MTU discovery */ - u_long tcps_listendrop; /* listen queue overflows */ - u_long tcps_badrst; /* ignored RSTs in the window */ - - u_long tcps_sc_added; /* entry added to syncache */ - u_long tcps_sc_retransmitted; /* syncache entry was retransmitted */ - u_long tcps_sc_dupsyn; /* duplicate SYN packet */ - u_long tcps_sc_dropped; /* could not reply to packet */ - u_long tcps_sc_completed; /* successful extraction of entry */ - u_long tcps_sc_bucketoverflow; /* syncache per-bucket limit hit */ - u_long tcps_sc_cacheoverflow; /* syncache cache limit hit */ - u_long tcps_sc_reset; /* RST removed entry from syncache */ - u_long tcps_sc_stale; /* timed out or listen socket gone */ - u_long tcps_sc_aborted; /* syncache entry aborted */ - u_long tcps_sc_badack; /* removed due to bad ACK */ - u_long tcps_sc_unreach; /* ICMP unreachable received */ - u_long tcps_sc_zonefail; /* zalloc() failed */ - u_long tcps_sc_sendcookie; /* SYN cookie sent */ - u_long tcps_sc_recvcookie; /* SYN cookie received */ + uint64_t tcps_connattempt; /* connections initiated */ + uint64_t tcps_accepts; /* connections accepted */ + uint64_t tcps_connects; /* connections established */ + uint64_t tcps_drops; /* connections dropped */ + uint64_t tcps_conndrops; /* embryonic connections dropped */ + uint64_t tcps_minmssdrops; /* average minmss too low drops */ + uint64_t tcps_closed; /* conn. closed (includes drops) */ + uint64_t tcps_segstimed; /* segs where we tried to get rtt */ + uint64_t tcps_rttupdated; /* times we succeeded */ + uint64_t tcps_delack; /* delayed acks sent */ + uint64_t tcps_timeoutdrop; /* conn. dropped in rxmt timeout */ + uint64_t tcps_rexmttimeo; /* retransmit timeouts */ + uint64_t tcps_persisttimeo; /* persist timeouts */ + uint64_t tcps_keeptimeo; /* keepalive timeouts */ + uint64_t tcps_keepprobe; /* keepalive probes sent */ + uint64_t tcps_keepdrops; /* connections dropped in keepalive */ + + uint64_t tcps_sndtotal; /* total packets sent */ + uint64_t tcps_sndpack; /* data packets sent */ + uint64_t tcps_sndbyte; /* data bytes sent */ + uint64_t tcps_sndrexmitpack; /* data packets retransmitted */ + uint64_t tcps_sndrexmitbyte; /* data bytes retransmitted */ + uint64_t tcps_sndrexmitbad; /* unnecessary packet retransmissions */ + uint64_t tcps_sndacks; /* ack-only packets sent */ + uint64_t tcps_sndprobe; /* window probes sent */ + uint64_t tcps_sndurg; /* packets sent with URG only */ + uint64_t tcps_sndwinup; /* window update-only packets sent */ + uint64_t tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */ + + uint64_t tcps_rcvtotal; /* total packets received */ + uint64_t tcps_rcvpack; /* packets received in sequence */ + uint64_t tcps_rcvbyte; /* bytes received in sequence */ + uint64_t tcps_rcvbadsum; /* packets received with ccksum errs */ + uint64_t tcps_rcvbadoff; /* packets received with bad offset */ + uint64_t tcps_rcvmemdrop; /* packets dropped for lack of memory */ + uint64_t tcps_rcvshort; /* packets received too short */ + uint64_t tcps_rcvduppack; /* duplicate-only packets received */ + uint64_t tcps_rcvdupbyte; /* duplicate-only bytes received */ + uint64_t tcps_rcvpartduppack; /* packets with some duplicate data */ + uint64_t tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */ + uint64_t tcps_rcvoopack; /* out-of-order packets received */ + uint64_t tcps_rcvoobyte; /* out-of-order bytes received */ + uint64_t tcps_rcvpackafterwin; /* packets with data after window */ + uint64_t tcps_rcvbyteafterwin; /* bytes rcvd after window */ + uint64_t tcps_rcvafterclose; /* packets rcvd after "close" */ + uint64_t tcps_rcvwinprobe; /* rcvd window probe packets */ + uint64_t tcps_rcvdupack; /* rcvd duplicate acks */ + uint64_t tcps_rcvacktoomuch; /* rcvd acks for unsent data */ + uint64_t tcps_rcvackpack; /* rcvd ack packets */ + uint64_t tcps_rcvackbyte; /* bytes acked by rcvd acks */ + uint64_t tcps_rcvwinupd; /* rcvd window update packets */ + uint64_t tcps_pawsdrop; /* segments dropped due to PAWS */ + uint64_t tcps_predack; /* times hdr predict ok for acks */ + uint64_t tcps_preddat; /* times hdr predict ok for data pkts */ + uint64_t tcps_pcbcachemiss; + uint64_t tcps_cachedrtt; /* times cached RTT in route updated */ + uint64_t tcps_cachedrttvar; /* times cached rttvar updated */ + uint64_t tcps_cachedssthresh; /* times cached ssthresh updated */ + uint64_t tcps_usedrtt; /* times RTT initialized from route */ + uint64_t tcps_usedrttvar; /* times RTTVAR initialized from rt */ + uint64_t tcps_usedssthresh; /* times ssthresh initialized from rt*/ + uint64_t tcps_persistdrop; /* timeout in persist state */ + uint64_t tcps_badsyn; /* bogus SYN, e.g. premature ACK */ + uint64_t tcps_mturesent; /* resends due to MTU discovery */ + uint64_t tcps_listendrop; /* listen queue overflows */ + uint64_t tcps_badrst; /* ignored RSTs in the window */ + + uint64_t tcps_sc_added; /* entry added to syncache */ + uint64_t tcps_sc_retransmitted; /* syncache entry was retransmitted */ + uint64_t tcps_sc_dupsyn; /* duplicate SYN packet */ + uint64_t tcps_sc_dropped; /* could not reply to packet */ + uint64_t tcps_sc_completed; /* successful extraction of entry */ + uint64_t tcps_sc_bucketoverflow;/* syncache per-bucket limit hit */ + uint64_t tcps_sc_cacheoverflow; /* syncache cache limit hit */ + uint64_t tcps_sc_reset; /* RST removed entry from syncache */ + uint64_t tcps_sc_stale; /* timed out or listen socket gone */ + uint64_t tcps_sc_aborted; /* syncache entry aborted */ + uint64_t tcps_sc_badack; /* removed due to bad ACK */ + uint64_t tcps_sc_unreach; /* ICMP unreachable received */ + uint64_t tcps_sc_zonefail; /* zalloc() failed */ + uint64_t tcps_sc_sendcookie; /* SYN cookie sent */ + uint64_t tcps_sc_recvcookie; /* SYN cookie received */ - u_long tcps_hc_added; /* entry added to hostcache */ - u_long tcps_hc_bucketoverflow; /* hostcache per bucket limit hit */ + uint64_t tcps_hc_added; /* entry added to hostcache */ + uint64_t tcps_hc_bucketoverflow;/* hostcache per bucket limit hit */ - u_long tcps_finwait2_drops; /* Drop FIN_WAIT_2 connection after time limit */ + uint64_t tcps_finwait2_drops; /* Drop FIN_WAIT_2 connection after time limit */ /* SACK related stats */ - u_long tcps_sack_recovery_episode; /* SACK recovery episodes */ - u_long tcps_sack_rexmits; /* SACK rexmit segments */ - u_long tcps_sack_rexmit_bytes; /* SACK rexmit bytes */ - u_long tcps_sack_rcv_blocks; /* SACK blocks (options) received */ - u_long tcps_sack_send_blocks; /* SACK blocks (options) sent */ - u_long tcps_sack_sboverflow; /* times scoreboard overflowed */ + uint64_t tcps_sack_recovery_episode; /* SACK recovery episodes */ + uint64_t tcps_sack_rexmits; /* SACK rexmit segments */ + uint64_t tcps_sack_rexmit_bytes; /* SACK rexmit bytes */ + uint64_t tcps_sack_rcv_blocks; /* SACK blocks (options) received */ + uint64_t tcps_sack_send_blocks; /* SACK blocks (options) sent */ + uint64_t tcps_sack_sboverflow; /* times scoreboard overflowed */ /* ECN related stats */ - u_long tcps_ecn_ce; /* ECN Congestion Experienced */ - u_long tcps_ecn_ect0; /* ECN Capable Transport */ - u_long tcps_ecn_ect1; /* ECN Capable Transport */ - u_long tcps_ecn_shs; /* ECN successful handshakes */ - u_long tcps_ecn_rcwnd; /* # times ECN reduced the cwnd */ + uint64_t tcps_ecn_ce; /* ECN Congestion Experienced */ + uint64_t tcps_ecn_ect0; /* ECN Capable Transport */ + uint64_t tcps_ecn_ect1; /* ECN Capable Transport */ + uint64_t tcps_ecn_shs; /* ECN successful handshakes */ + uint64_t tcps_ecn_rcwnd; /* # times ECN reduced the cwnd */ /* TCP_SIGNATURE related stats */ - u_long tcps_sig_rcvgoodsig; /* Total matching signature received */ - u_long tcps_sig_rcvbadsig; /* Total bad signature received */ - u_long tcps_sig_err_buildsig; /* Mismatching signature received */ - u_long tcps_sig_err_sigopt; /* No signature expected by socket */ - u_long tcps_sig_err_nosigopt; /* No signature provided by segment */ + uint64_t tcps_sig_rcvgoodsig; /* Total matching signature received */ + uint64_t tcps_sig_rcvbadsig; /* Total bad signature received */ + uint64_t tcps_sig_err_buildsig; /* Mismatching signature received */ + uint64_t tcps_sig_err_sigopt; /* No signature expected by socket */ + uint64_t tcps_sig_err_nosigopt; /* No signature provided by segment */ - u_long _pad[12]; /* 6 UTO, 6 TBD */ + uint64_t _pad[12]; /* 6 UTO, 6 TBD */ }; #ifdef _KERNEL + +#include + +/* Should match 'struct tcpstat' above. */ +struct tcpstat_p { + counter_u64_t tcps_connattempt; + counter_u64_t tcps_accepts; + counter_u64_t tcps_connects; + counter_u64_t tcps_drops; + counter_u64_t tcps_conndrops; + counter_u64_t tcps_minmssdrops; + counter_u64_t tcps_closed; + counter_u64_t tcps_segstimed; + counter_u64_t tcps_rttupdated; + counter_u64_t tcps_delack; + counter_u64_t tcps_timeoutdrop; + counter_u64_t tcps_rexmttimeo; + counter_u64_t tcps_persisttimeo; + counter_u64_t tcps_keeptimeo; + counter_u64_t tcps_keepprobe; + counter_u64_t tcps_keepdrops; + counter_u64_t tcps_sndtotal; + counter_u64_t tcps_sndpack; + counter_u64_t tcps_sndbyte; + counter_u64_t tcps_sndrexmitpack; + counter_u64_t tcps_sndrexmitbyte; + counter_u64_t tcps_sndrexmitbad; + counter_u64_t tcps_sndacks; + counter_u64_t tcps_sndprobe; + counter_u64_t tcps_sndurg; + counter_u64_t tcps_sndwinup; + counter_u64_t tcps_sndctrl; + counter_u64_t tcps_rcvtotal; + counter_u64_t tcps_rcvpack; + counter_u64_t tcps_rcvbyte; + counter_u64_t tcps_rcvbadsum; + counter_u64_t tcps_rcvbadoff; + counter_u64_t tcps_rcvmemdrop; + counter_u64_t tcps_rcvshort; + counter_u64_t tcps_rcvduppack; + counter_u64_t tcps_rcvdupbyte; + counter_u64_t tcps_rcvpartduppack; + counter_u64_t tcps_rcvpartdupbyte; + counter_u64_t tcps_rcvoopack; + counter_u64_t tcps_rcvoobyte; + counter_u64_t tcps_rcvpackafterwin; + counter_u64_t tcps_rcvbyteafterwin; + counter_u64_t tcps_rcvafterclose; + counter_u64_t tcps_rcvwinprobe; + counter_u64_t tcps_rcvdupack; + counter_u64_t tcps_rcvacktoomuch; + counter_u64_t tcps_rcvackpack; + counter_u64_t tcps_rcvackbyte; + counter_u64_t tcps_rcvwinupd; + counter_u64_t tcps_pawsdrop; + counter_u64_t tcps_predack; + counter_u64_t tcps_preddat; + counter_u64_t tcps_pcbcachemiss; + counter_u64_t tcps_cachedrtt; + counter_u64_t tcps_cachedrttvar; + counter_u64_t tcps_cachedssthresh; + counter_u64_t tcps_usedrtt; + counter_u64_t tcps_usedrttvar; + counter_u64_t tcps_usedssthresh; + counter_u64_t tcps_persistdrop; + counter_u64_t tcps_badsyn; + counter_u64_t tcps_mturesent; + counter_u64_t tcps_listendrop; + counter_u64_t tcps_badrst; + counter_u64_t tcps_sc_added; + counter_u64_t tcps_sc_retransmitted; + counter_u64_t tcps_sc_dupsyn; + counter_u64_t tcps_sc_dropped; + counter_u64_t tcps_sc_completed; + counter_u64_t tcps_sc_bucketoverflow; + counter_u64_t tcps_sc_cacheoverflow; + counter_u64_t tcps_sc_reset; + counter_u64_t tcps_sc_stale; + counter_u64_t tcps_sc_aborted; + counter_u64_t tcps_sc_badack; + counter_u64_t tcps_sc_unreach; + counter_u64_t tcps_sc_zonefail; + counter_u64_t tcps_sc_sendcookie; + counter_u64_t tcps_sc_recvcookie; + counter_u64_t tcps_hc_added; + counter_u64_t tcps_hc_bucketoverflow; + counter_u64_t tcps_finwait2_drops; + counter_u64_t tcps_sack_recovery_episode; + counter_u64_t tcps_sack_rexmits; + counter_u64_t tcps_sack_rexmit_bytes; + counter_u64_t tcps_sack_rcv_blocks; + counter_u64_t tcps_sack_send_blocks; + counter_u64_t tcps_sack_sboverflow; + counter_u64_t tcps_ecn_ce; + counter_u64_t tcps_ecn_ect0; + counter_u64_t tcps_ecn_ect1; + counter_u64_t tcps_ecn_shs; + counter_u64_t tcps_ecn_rcwnd; + counter_u64_t tcps_sig_rcvgoodsig; + counter_u64_t tcps_sig_rcvbadsig; + counter_u64_t tcps_sig_err_buildsig; + counter_u64_t tcps_sig_err_sigopt; + counter_u64_t tcps_sig_err_nosigopt; +}; + +VNET_DECLARE(struct tcpstat_p, tcpstatp); /* tcp statistics */ +#define V_tcpstatp VNET(tcpstatp) + /* * In-kernel consumers can use these accessor macros directly to update * stats. */ -#define TCPSTAT_ADD(name, val) V_tcpstat.name += (val) +#define TCPSTAT_ADD(name, val) counter_u64_add(V_tcpstatp.name, (val)) #define TCPSTAT_INC(name) TCPSTAT_ADD(name, 1) /* @@ -515,7 +623,8 @@ struct tcpstat { */ void kmod_tcpstat_inc(int statnum); #define KMOD_TCPSTAT_INC(name) \ - kmod_tcpstat_inc(offsetof(struct tcpstat, name) / sizeof(u_long)) + kmod_tcpstat_inc(offsetof(struct tcpstat_p, name) / \ + sizeof(counter_u64_t)) /* * TCP specific helper hook point identifiers. @@ -605,7 +714,6 @@ MALLOC_DECLARE(M_TCPLOG); VNET_DECLARE(struct inpcbhead, tcb); /* queue of active tcpcb's */ VNET_DECLARE(struct inpcbinfo, tcbinfo); -VNET_DECLARE(struct tcpstat, tcpstat); /* tcp statistics */ extern int tcp_log_in_vain; VNET_DECLARE(int, tcp_mssdflt); /* XXX */ VNET_DECLARE(int, tcp_minmss); @@ -619,7 +727,6 @@ VNET_DECLARE(int, tcp_do_rfc3465); VNET_DECLARE(int, tcp_abc_l_var); #define V_tcb VNET(tcb) #define V_tcbinfo VNET(tcbinfo) -#define V_tcpstat VNET(tcpstat) #define V_tcp_mssdflt VNET(tcp_mssdflt) #define V_tcp_minmss VNET(tcp_minmss) #define V_tcp_delack_enabled VNET(tcp_delack_enabled) Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Mon Apr 8 19:56:14 2013 (r249275) +++ head/usr.bin/netstat/inet.c Mon Apr 8 19:57:21 2013 (r249276) @@ -608,115 +608,121 @@ tcp_stats(u_long off, const char *name, printf ("%s:\n", name); -#define p(f, m) if (tcpstat.f || sflag <= 1) \ - printf(m, tcpstat.f, plural(tcpstat.f)) -#define p1a(f, m) if (tcpstat.f || sflag <= 1) \ - printf(m, tcpstat.f) -#define p2(f1, f2, m) if (tcpstat.f1 || tcpstat.f2 || sflag <= 1) \ - printf(m, tcpstat.f1, plural(tcpstat.f1), tcpstat.f2, plural(tcpstat.f2)) -#define p2a(f1, f2, m) if (tcpstat.f1 || tcpstat.f2 || sflag <= 1) \ - printf(m, tcpstat.f1, plural(tcpstat.f1), tcpstat.f2) -#define p3(f, m) if (tcpstat.f || sflag <= 1) \ - printf(m, tcpstat.f, pluralies(tcpstat.f)) +#define p(f, m) if (tcpstat.f || sflag <= 1) \ + printf(m, (uintmax_t )tcpstat.f, plural(tcpstat.f)) - p(tcps_sndtotal, "\t%lu packet%s sent\n"); - p2(tcps_sndpack,tcps_sndbyte, "\t\t%lu data packet%s (%lu byte%s)\n"); +#define p1a(f, m) if (tcpstat.f || sflag <= 1) \ + printf(m, (uintmax_t )tcpstat.f) + +#define p2(f1, f2, m) if (tcpstat.f1 || tcpstat.f2 || sflag <= 1) \ + printf(m, (uintmax_t )tcpstat.f1, plural(tcpstat.f1), \ + (uintmax_t )tcpstat.f2, plural(tcpstat.f2)) + +#define p2a(f1, f2, m) if (tcpstat.f1 || tcpstat.f2 || sflag <= 1) \ + printf(m, (uintmax_t )tcpstat.f1, plural(tcpstat.f1), \ + (uintmax_t )tcpstat.f2) + +#define p3(f, m) if (tcpstat.f || sflag <= 1) \ + printf(m, (uintmax_t )tcpstat.f, pluralies(tcpstat.f)) + + p(tcps_sndtotal, "\t%ju packet%s sent\n"); + p2(tcps_sndpack,tcps_sndbyte, "\t\t%ju data packet%s (%ju byte%s)\n"); p2(tcps_sndrexmitpack, tcps_sndrexmitbyte, - "\t\t%lu data packet%s (%lu byte%s) retransmitted\n"); + "\t\t%ju data packet%s (%ju byte%s) retransmitted\n"); p(tcps_sndrexmitbad, - "\t\t%lu data packet%s unnecessarily retransmitted\n"); - p(tcps_mturesent, "\t\t%lu resend%s initiated by MTU discovery\n"); + "\t\t%ju data packet%s unnecessarily retransmitted\n"); + p(tcps_mturesent, "\t\t%ju resend%s initiated by MTU discovery\n"); p2a(tcps_sndacks, tcps_delack, - "\t\t%lu ack-only packet%s (%lu delayed)\n"); - p(tcps_sndurg, "\t\t%lu URG only packet%s\n"); - p(tcps_sndprobe, "\t\t%lu window probe packet%s\n"); - p(tcps_sndwinup, "\t\t%lu window update packet%s\n"); - p(tcps_sndctrl, "\t\t%lu control packet%s\n"); - p(tcps_rcvtotal, "\t%lu packet%s received\n"); + "\t\t%ju ack-only packet%s (%ju delayed)\n"); + p(tcps_sndurg, "\t\t%ju URG only packet%s\n"); + p(tcps_sndprobe, "\t\t%ju window probe packet%s\n"); + p(tcps_sndwinup, "\t\t%ju window update packet%s\n"); + p(tcps_sndctrl, "\t\t%ju control packet%s\n"); + p(tcps_rcvtotal, "\t%ju packet%s received\n"); p2(tcps_rcvackpack, tcps_rcvackbyte, - "\t\t%lu ack%s (for %lu byte%s)\n"); - p(tcps_rcvdupack, "\t\t%lu duplicate ack%s\n"); - p(tcps_rcvacktoomuch, "\t\t%lu ack%s for unsent data\n"); + "\t\t%ju ack%s (for %ju byte%s)\n"); + p(tcps_rcvdupack, "\t\t%ju duplicate ack%s\n"); + p(tcps_rcvacktoomuch, "\t\t%ju ack%s for unsent data\n"); p2(tcps_rcvpack, tcps_rcvbyte, - "\t\t%lu packet%s (%lu byte%s) received in-sequence\n"); + "\t\t%ju packet%s (%ju byte%s) received in-sequence\n"); p2(tcps_rcvduppack, tcps_rcvdupbyte, - "\t\t%lu completely duplicate packet%s (%lu byte%s)\n"); - p(tcps_pawsdrop, "\t\t%lu old duplicate packet%s\n"); + "\t\t%ju completely duplicate packet%s (%ju byte%s)\n"); + p(tcps_pawsdrop, "\t\t%ju old duplicate packet%s\n"); p2(tcps_rcvpartduppack, tcps_rcvpartdupbyte, - "\t\t%lu packet%s with some dup. data (%lu byte%s duped)\n"); + "\t\t%ju packet%s with some dup. data (%ju byte%s duped)\n"); p2(tcps_rcvoopack, tcps_rcvoobyte, - "\t\t%lu out-of-order packet%s (%lu byte%s)\n"); + "\t\t%ju out-of-order packet%s (%ju byte%s)\n"); p2(tcps_rcvpackafterwin, tcps_rcvbyteafterwin, - "\t\t%lu packet%s (%lu byte%s) of data after window\n"); - p(tcps_rcvwinprobe, "\t\t%lu window probe%s\n"); - p(tcps_rcvwinupd, "\t\t%lu window update packet%s\n"); - p(tcps_rcvafterclose, "\t\t%lu packet%s received after close\n"); - p(tcps_rcvbadsum, "\t\t%lu discarded for bad checksum%s\n"); - p(tcps_rcvbadoff, "\t\t%lu discarded for bad header offset field%s\n"); - p1a(tcps_rcvshort, "\t\t%lu discarded because packet too short\n"); - p1a(tcps_rcvmemdrop, "\t\t%lu discarded due to memory problems\n"); - p(tcps_connattempt, "\t%lu connection request%s\n"); - p(tcps_accepts, "\t%lu connection accept%s\n"); - p(tcps_badsyn, "\t%lu bad connection attempt%s\n"); - p(tcps_listendrop, "\t%lu listen queue overflow%s\n"); - p(tcps_badrst, "\t%lu ignored RSTs in the window%s\n"); - p(tcps_connects, "\t%lu connection%s established (including accepts)\n"); + "\t\t%ju packet%s (%ju byte%s) of data after window\n"); + p(tcps_rcvwinprobe, "\t\t%ju window probe%s\n"); + p(tcps_rcvwinupd, "\t\t%ju window update packet%s\n"); + p(tcps_rcvafterclose, "\t\t%ju packet%s received after close\n"); + p(tcps_rcvbadsum, "\t\t%ju discarded for bad checksum%s\n"); + p(tcps_rcvbadoff, "\t\t%ju discarded for bad header offset field%s\n"); + p1a(tcps_rcvshort, "\t\t%ju discarded because packet too short\n"); + p1a(tcps_rcvmemdrop, "\t\t%ju discarded due to memory problems\n"); + p(tcps_connattempt, "\t%ju connection request%s\n"); + p(tcps_accepts, "\t%ju connection accept%s\n"); + p(tcps_badsyn, "\t%ju bad connection attempt%s\n"); + p(tcps_listendrop, "\t%ju listen queue overflow%s\n"); + p(tcps_badrst, "\t%ju ignored RSTs in the window%s\n"); + p(tcps_connects, "\t%ju connection%s established (including accepts)\n"); p2(tcps_closed, tcps_drops, - "\t%lu connection%s closed (including %lu drop%s)\n"); - p(tcps_cachedrtt, "\t\t%lu connection%s updated cached RTT on close\n"); + "\t%ju connection%s closed (including %ju drop%s)\n"); + p(tcps_cachedrtt, "\t\t%ju connection%s updated cached RTT on close\n"); p(tcps_cachedrttvar, - "\t\t%lu connection%s updated cached RTT variance on close\n"); + "\t\t%ju connection%s updated cached RTT variance on close\n"); p(tcps_cachedssthresh, - "\t\t%lu connection%s updated cached ssthresh on close\n"); - p(tcps_conndrops, "\t%lu embryonic connection%s dropped\n"); + "\t\t%ju connection%s updated cached ssthresh on close\n"); + p(tcps_conndrops, "\t%ju embryonic connection%s dropped\n"); p2(tcps_rttupdated, tcps_segstimed, - "\t%lu segment%s updated rtt (of %lu attempt%s)\n"); - p(tcps_rexmttimeo, "\t%lu retransmit timeout%s\n"); - p(tcps_timeoutdrop, "\t\t%lu connection%s dropped by rexmit timeout\n"); - p(tcps_persisttimeo, "\t%lu persist timeout%s\n"); - p(tcps_persistdrop, "\t\t%lu connection%s dropped by persist timeout\n"); + "\t%ju segment%s updated rtt (of %ju attempt%s)\n"); + p(tcps_rexmttimeo, "\t%ju retransmit timeout%s\n"); + p(tcps_timeoutdrop, "\t\t%ju connection%s dropped by rexmit timeout\n"); + p(tcps_persisttimeo, "\t%ju persist timeout%s\n"); + p(tcps_persistdrop, "\t\t%ju connection%s dropped by persist timeout\n"); p(tcps_finwait2_drops, - "\t%lu Connection%s (fin_wait_2) dropped because of timeout\n"); - p(tcps_keeptimeo, "\t%lu keepalive timeout%s\n"); - p(tcps_keepprobe, "\t\t%lu keepalive probe%s sent\n"); - p(tcps_keepdrops, "\t\t%lu connection%s dropped by keepalive\n"); - p(tcps_predack, "\t%lu correct ACK header prediction%s\n"); - p(tcps_preddat, "\t%lu correct data packet header prediction%s\n"); - - p3(tcps_sc_added, "\t%lu syncache entr%s added\n"); - p1a(tcps_sc_retransmitted, "\t\t%lu retransmitted\n"); - p1a(tcps_sc_dupsyn, "\t\t%lu dupsyn\n"); - p1a(tcps_sc_dropped, "\t\t%lu dropped\n"); - p1a(tcps_sc_completed, "\t\t%lu completed\n"); - p1a(tcps_sc_bucketoverflow, "\t\t%lu bucket overflow\n"); - p1a(tcps_sc_cacheoverflow, "\t\t%lu cache overflow\n"); - p1a(tcps_sc_reset, "\t\t%lu reset\n"); - p1a(tcps_sc_stale, "\t\t%lu stale\n"); - p1a(tcps_sc_aborted, "\t\t%lu aborted\n"); - p1a(tcps_sc_badack, "\t\t%lu badack\n"); - p1a(tcps_sc_unreach, "\t\t%lu unreach\n"); - p(tcps_sc_zonefail, "\t\t%lu zone failure%s\n"); - p(tcps_sc_sendcookie, "\t%lu cookie%s sent\n"); - p(tcps_sc_recvcookie, "\t%lu cookie%s received\n"); + "\t%ju Connection%s (fin_wait_2) dropped because of timeout\n"); + p(tcps_keeptimeo, "\t%ju keepalive timeout%s\n"); + p(tcps_keepprobe, "\t\t%ju keepalive probe%s sent\n"); + p(tcps_keepdrops, "\t\t%ju connection%s dropped by keepalive\n"); + p(tcps_predack, "\t%ju correct ACK header prediction%s\n"); + p(tcps_preddat, "\t%ju correct data packet header prediction%s\n"); + + p3(tcps_sc_added, "\t%ju syncache entr%s added\n"); + p1a(tcps_sc_retransmitted, "\t\t%ju retransmitted\n"); + p1a(tcps_sc_dupsyn, "\t\t%ju dupsyn\n"); + p1a(tcps_sc_dropped, "\t\t%ju dropped\n"); + p1a(tcps_sc_completed, "\t\t%ju completed\n"); + p1a(tcps_sc_bucketoverflow, "\t\t%ju bucket overflow\n"); + p1a(tcps_sc_cacheoverflow, "\t\t%ju cache overflow\n"); + p1a(tcps_sc_reset, "\t\t%ju reset\n"); + p1a(tcps_sc_stale, "\t\t%ju stale\n"); + p1a(tcps_sc_aborted, "\t\t%ju aborted\n"); + p1a(tcps_sc_badack, "\t\t%ju badack\n"); + p1a(tcps_sc_unreach, "\t\t%ju unreach\n"); + p(tcps_sc_zonefail, "\t\t%ju zone failure%s\n"); + p(tcps_sc_sendcookie, "\t%ju cookie%s sent\n"); + p(tcps_sc_recvcookie, "\t%ju cookie%s received\n"); - p3(tcps_hc_added, "\t%lu hostcache entr%s added\n"); - p1a(tcps_hc_bucketoverflow, "\t\t%lu bucket overflow\n"); + p3(tcps_hc_added, "\t%ju hostcache entr%s added\n"); + p1a(tcps_hc_bucketoverflow, "\t\t%ju bucket overflow\n"); - p(tcps_sack_recovery_episode, "\t%lu SACK recovery episode%s\n"); + p(tcps_sack_recovery_episode, "\t%ju SACK recovery episode%s\n"); p(tcps_sack_rexmits, - "\t%lu segment rexmit%s in SACK recovery episodes\n"); + "\t%ju segment rexmit%s in SACK recovery episodes\n"); p(tcps_sack_rexmit_bytes, - "\t%lu byte rexmit%s in SACK recovery episodes\n"); + "\t%ju byte rexmit%s in SACK recovery episodes\n"); p(tcps_sack_rcv_blocks, - "\t%lu SACK option%s (SACK blocks) received\n"); - p(tcps_sack_send_blocks, "\t%lu SACK option%s (SACK blocks) sent\n"); - p1a(tcps_sack_sboverflow, "\t%lu SACK scoreboard overflow\n"); - - p(tcps_ecn_ce, "\t%lu packet%s with ECN CE bit set\n"); - p(tcps_ecn_ect0, "\t%lu packet%s with ECN ECT(0) bit set\n"); - p(tcps_ecn_ect1, "\t%lu packet%s with ECN ECT(1) bit set\n"); - p(tcps_ecn_shs, "\t%lu successful ECN handshake%s\n"); - p(tcps_ecn_rcwnd, "\t%lu time%s ECN reduced the congestion window\n"); + "\t%ju SACK option%s (SACK blocks) received\n"); + p(tcps_sack_send_blocks, "\t%ju SACK option%s (SACK blocks) sent\n"); + p1a(tcps_sack_sboverflow, "\t%ju SACK scoreboard overflow\n"); + + p(tcps_ecn_ce, "\t%ju packet%s with ECN CE bit set\n"); + p(tcps_ecn_ect0, "\t%ju packet%s with ECN ECT(0) bit set\n"); + p(tcps_ecn_ect1, "\t%ju packet%s with ECN ECT(1) bit set\n"); + p(tcps_ecn_shs, "\t%ju successful ECN handshake%s\n"); + p(tcps_ecn_rcwnd, "\t%ju time%s ECN reduced the congestion window\n"); #undef p #undef p1a #undef p2 @@ -858,43 +864,43 @@ ip_stats(u_long off, const char *name, i printf("%s:\n", name); #define p(f, m) if (ipstat.f || sflag <= 1) \ - printf(m, ipstat.f, plural(ipstat.f)) + printf(m, (uintmax_t )ipstat.f, plural(ipstat.f)) #define p1a(f, m) if (ipstat.f || sflag <= 1) \ - printf(m, ipstat.f) + printf(m, (uintmax_t )ipstat.f) - p(ips_total, "\t%lu total packet%s received\n"); - p(ips_badsum, "\t%lu bad header checksum%s\n"); - p1a(ips_toosmall, "\t%lu with size smaller than minimum\n"); - p1a(ips_tooshort, "\t%lu with data size < data length\n"); - p1a(ips_toolong, "\t%lu with ip length > max ip packet size\n"); - p1a(ips_badhlen, "\t%lu with header length < data size\n"); - p1a(ips_badlen, "\t%lu with data length < header length\n"); - p1a(ips_badoptions, "\t%lu with bad options\n"); - p1a(ips_badvers, "\t%lu with incorrect version number\n"); - p(ips_fragments, "\t%lu fragment%s received\n"); - p(ips_fragdropped, "\t%lu fragment%s dropped (dup or out of space)\n"); - p(ips_fragtimeout, "\t%lu fragment%s dropped after timeout\n"); - p(ips_reassembled, "\t%lu packet%s reassembled ok\n"); - p(ips_delivered, "\t%lu packet%s for this host\n"); - p(ips_noproto, "\t%lu packet%s for unknown/unsupported protocol\n"); - p(ips_forward, "\t%lu packet%s forwarded"); - p(ips_fastforward, " (%lu packet%s fast forwarded)"); + p(ips_total, "\t%ju total packet%s received\n"); + p(ips_badsum, "\t%ju bad header checksum%s\n"); + p1a(ips_toosmall, "\t%ju with size smaller than minimum\n"); + p1a(ips_tooshort, "\t%ju with data size < data length\n"); + p1a(ips_toolong, "\t%ju with ip length > max ip packet size\n"); + p1a(ips_badhlen, "\t%ju with header length < data size\n"); + p1a(ips_badlen, "\t%ju with data length < header length\n"); + p1a(ips_badoptions, "\t%ju with bad options\n"); + p1a(ips_badvers, "\t%ju with incorrect version number\n"); + p(ips_fragments, "\t%ju fragment%s received\n"); + p(ips_fragdropped, "\t%ju fragment%s dropped (dup or out of space)\n"); + p(ips_fragtimeout, "\t%ju fragment%s dropped after timeout\n"); + p(ips_reassembled, "\t%ju packet%s reassembled ok\n"); + p(ips_delivered, "\t%ju packet%s for this host\n"); + p(ips_noproto, "\t%ju packet%s for unknown/unsupported protocol\n"); + p(ips_forward, "\t%ju packet%s forwarded"); + p(ips_fastforward, " (%ju packet%s fast forwarded)"); if (ipstat.ips_forward || sflag <= 1) putchar('\n'); - p(ips_cantforward, "\t%lu packet%s not forwardable\n"); + p(ips_cantforward, "\t%ju packet%s not forwardable\n"); p(ips_notmember, - "\t%lu packet%s received for unknown multicast group\n"); - p(ips_redirectsent, "\t%lu redirect%s sent\n"); - p(ips_localout, "\t%lu packet%s sent from this host\n"); - p(ips_rawout, "\t%lu packet%s sent with fabricated ip header\n"); + "\t%ju packet%s received for unknown multicast group\n"); + p(ips_redirectsent, "\t%ju redirect%s sent\n"); + p(ips_localout, "\t%ju packet%s sent from this host\n"); + p(ips_rawout, "\t%ju packet%s sent with fabricated ip header\n"); p(ips_odropped, - "\t%lu output packet%s dropped due to no bufs, etc.\n"); - p(ips_noroute, "\t%lu output packet%s discarded due to no route\n"); - p(ips_fragmented, "\t%lu output datagram%s fragmented\n"); - p(ips_ofragments, "\t%lu fragment%s created\n"); - p(ips_cantfrag, "\t%lu datagram%s that can't be fragmented\n"); - p(ips_nogif, "\t%lu tunneling packet%s that can't find gif\n"); - p(ips_badaddr, "\t%lu datagram%s with bad address in header\n"); + "\t%ju output packet%s dropped due to no bufs, etc.\n"); + p(ips_noroute, "\t%ju output packet%s discarded due to no route\n"); + p(ips_fragmented, "\t%ju output datagram%s fragmented\n"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 19:58:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2CB96851; Mon, 8 Apr 2013 19:58:33 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 206B47D6; Mon, 8 Apr 2013 19:58:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38JwX96001262; Mon, 8 Apr 2013 19:58:33 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JwWf0001257; Mon, 8 Apr 2013 19:58:32 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201304081958.r38JwWf0001257@svn.freebsd.org> From: Attilio Rao Date: Mon, 8 Apr 2013 19:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249277 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:58:33 -0000 Author: attilio Date: Mon Apr 8 19:58:32 2013 New Revision: 249277 URL: http://svnweb.freebsd.org/changeset/base/249277 Log: Switch some "low-hanging fruit" to acquire read lock on vmobjects rather than write locks. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho Modified: head/sys/kern/imgact_elf.c head/sys/kern/kern_proc.c head/sys/kern/sys_process.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Mon Apr 8 19:57:21 2013 (r249276) +++ head/sys/kern/imgact_elf.c Mon Apr 8 19:58:32 2013 (r249277) @@ -1277,15 +1277,15 @@ each_writable_segment(td, func, closure) continue; /* Ignore memory-mapped devices and such things. */ - VM_OBJECT_WLOCK(object); + VM_OBJECT_RLOCK(object); while ((backing_object = object->backing_object) != NULL) { - VM_OBJECT_WLOCK(backing_object); - VM_OBJECT_WUNLOCK(object); + VM_OBJECT_RLOCK(backing_object); + VM_OBJECT_RUNLOCK(object); object = backing_object; } ignore_entry = object->type != OBJT_DEFAULT && object->type != OBJT_SWAP && object->type != OBJT_VNODE; - VM_OBJECT_WUNLOCK(object); + VM_OBJECT_RUNLOCK(object); if (ignore_entry) continue; Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Apr 8 19:57:21 2013 (r249276) +++ head/sys/kern/kern_proc.c Mon Apr 8 19:58:32 2013 (r249277) @@ -1995,7 +1995,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A kve->kve_private_resident = 0; obj = entry->object.vm_object; if (obj != NULL) { - VM_OBJECT_WLOCK(obj); + VM_OBJECT_RLOCK(obj); if (obj->shadow_count == 1) kve->kve_private_resident = obj->resident_page_count; @@ -2010,9 +2010,9 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) { if (tobj != obj) - VM_OBJECT_WLOCK(tobj); + VM_OBJECT_RLOCK(tobj); if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); + VM_OBJECT_RUNLOCK(lobj); lobj = tobj; } @@ -2072,11 +2072,11 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A break; } if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); + VM_OBJECT_RUNLOCK(lobj); kve->kve_ref_count = obj->ref_count; kve->kve_shadow_count = obj->shadow_count; - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { vn_fullpath(curthread, vp, &fullpath, &freepath); @@ -2162,7 +2162,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR kve->kve_private_resident = 0; obj = entry->object.vm_object; if (obj != NULL) { - VM_OBJECT_WLOCK(obj); + VM_OBJECT_RLOCK(obj); if (obj->shadow_count == 1) kve->kve_private_resident = obj->resident_page_count; @@ -2183,9 +2183,9 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) { if (tobj != obj) - VM_OBJECT_WLOCK(tobj); + VM_OBJECT_RLOCK(tobj); if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); + VM_OBJECT_RUNLOCK(lobj); lobj = tobj; } @@ -2247,11 +2247,11 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR break; } if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); + VM_OBJECT_RUNLOCK(lobj); kve->kve_ref_count = obj->ref_count; kve->kve_shadow_count = obj->shadow_count; - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { vn_fullpath(curthread, vp, &fullpath, &freepath); Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Apr 8 19:57:21 2013 (r249276) +++ head/sys/kern/sys_process.c Mon Apr 8 19:58:32 2013 (r249277) @@ -382,7 +382,7 @@ ptrace_vm_entry(struct thread *td, struc obj = entry->object.vm_object; if (obj != NULL) - VM_OBJECT_WLOCK(obj); + VM_OBJECT_RLOCK(obj); } while (0); vm_map_unlock_read(map); @@ -395,9 +395,9 @@ ptrace_vm_entry(struct thread *td, struc lobj = obj; for (tobj = obj; tobj != NULL; tobj = tobj->backing_object) { if (tobj != obj) - VM_OBJECT_WLOCK(tobj); + VM_OBJECT_RLOCK(tobj); if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); + VM_OBJECT_RUNLOCK(lobj); lobj = tobj; pve->pve_offset += tobj->backing_object_offset; } @@ -405,8 +405,8 @@ ptrace_vm_entry(struct thread *td, struc if (vp != NULL) vref(vp); if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(lobj); + VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { freepath = NULL; From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 20:02:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C2156A7E; Mon, 8 Apr 2013 20:02:28 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9B69F820; Mon, 8 Apr 2013 20:02:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38K2S9D003618; Mon, 8 Apr 2013 20:02:28 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38K2SSE003616; Mon, 8 Apr 2013 20:02:28 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201304082002.r38K2SSE003616@svn.freebsd.org> From: Attilio Rao Date: Mon, 8 Apr 2013 20:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249278 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 20:02:28 -0000 Author: attilio Date: Mon Apr 8 20:02:27 2013 New Revision: 249278 URL: http://svnweb.freebsd.org/changeset/base/249278 Log: The per-page act_count can be made very-easily protected by the per-page lock rather than vm_object lock, without any further overhead. Make the formal switch. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho Modified: head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon Apr 8 19:58:32 2013 (r249277) +++ head/sys/vm/vm_page.h Mon Apr 8 20:02:27 2013 (r249278) @@ -143,7 +143,7 @@ struct vm_page { uint8_t aflags; /* access is atomic */ uint8_t oflags; /* page VPO_* flags (O) */ uint16_t flags; /* page PG_* flags (P) */ - u_char act_count; /* page usage count (O) */ + u_char act_count; /* page usage count (P) */ u_char busy; /* page busy count (O) */ /* NOTE that these must support one bit per DEV_BSIZE in a page!!! */ /* so, on normal X86 kernels, they must be at least 8 bits wide */ Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Mon Apr 8 19:58:32 2013 (r249277) +++ head/sys/vm/vm_pageout.c Mon Apr 8 20:02:27 2013 (r249278) @@ -1015,9 +1015,9 @@ vm_pageout_scan(int pass) } else if ((m->aflags & PGA_REFERENCED) == 0 && (actcount = pmap_ts_referenced(m)) != 0) { vm_page_activate(m); - vm_page_unlock(m); - m->act_count += actcount + ACT_ADVANCE; VM_OBJECT_WUNLOCK(object); + m->act_count += actcount + ACT_ADVANCE; + vm_page_unlock(m); goto relock_queues; } @@ -1031,9 +1031,9 @@ vm_pageout_scan(int pass) vm_page_aflag_clear(m, PGA_REFERENCED); actcount = pmap_ts_referenced(m); vm_page_activate(m); - vm_page_unlock(m); - m->act_count += actcount + ACT_ADVANCE + 1; VM_OBJECT_WUNLOCK(object); + m->act_count += actcount + ACT_ADVANCE + 1; + vm_page_unlock(m); goto relock_queues; } From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 20:33:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC8F462E; Mon, 8 Apr 2013 20:33:51 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BF78A9EB; Mon, 8 Apr 2013 20:33:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38KXpMJ012920; Mon, 8 Apr 2013 20:33:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38KXp1J012919; Mon, 8 Apr 2013 20:33:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201304082033.r38KXp1J012919@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 8 Apr 2013 20:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249281 - head/gnu/usr.bin/groff/tmac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 20:33:51 -0000 Author: pluknet Date: Mon Apr 8 20:33:51 2013 New Revision: 249281 URL: http://svnweb.freebsd.org/changeset/base/249281 Log: Add FreeBSD 8.4. MFC after: 3 days Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Mon Apr 8 20:14:41 2013 (r249280) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Mon Apr 8 20:33:51 2013 (r249281) @@ -50,6 +50,7 @@ .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-7.4 7.4 .ds doc-operating-system-FreeBSD-8.3 8.3 +.ds doc-operating-system-FreeBSD-8.4 8.4 .ds doc-operating-system-FreeBSD-9.1 9.1 .ds doc-operating-system-FreeBSD-10.0 10.0 . From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 21:15:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2D12B419; Mon, 8 Apr 2013 21:15:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 20BF3CCA; Mon, 8 Apr 2013 21:15:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38LFifm025150; Mon, 8 Apr 2013 21:15:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38LFhN8025149; Mon, 8 Apr 2013 21:15:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304082115.r38LFhN8025149@svn.freebsd.org> From: Adrian Chadd Date: Mon, 8 Apr 2013 21:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249284 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 21:15:44 -0000 Author: adrian Date: Mon Apr 8 21:15:43 2013 New Revision: 249284 URL: http://svnweb.freebsd.org/changeset/base/249284 Log: Fix this to compile when ATH_DEBUG_ALQ is defined but ATH_DEBUG isn't. Modified: head/sys/dev/ath/if_ath_tx_edma.c Modified: head/sys/dev/ath/if_ath_tx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_edma.c Mon Apr 8 20:45:11 2013 (r249283) +++ head/sys/dev/ath/if_ath_tx_edma.c Mon Apr 8 21:15:43 2013 (r249284) @@ -636,7 +636,7 @@ ath_edma_tx_processq(struct ath_softc *s break; } -#ifdef ATH_DEBUG_ALQ +#if defined(ATH_DEBUG_ALQ) && defined(ATH_DEBUG) if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXSTATUS)) if_ath_alq_post(&sc->sc_alq, ATH_ALQ_EDMA_TXSTATUS, sc->sc_tx_statuslen, From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 23:16:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 35294380; Mon, 8 Apr 2013 23:16:43 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4622AB; Mon, 8 Apr 2013 23:16:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38NGgJE060738; Mon, 8 Apr 2013 23:16:42 GMT (envelope-from will@svn.freebsd.org) Received: (from will@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38NGgLZ060737; Mon, 8 Apr 2013 23:16:42 GMT (envelope-from will@svn.freebsd.org) Message-Id: <201304082316.r38NGgLZ060737@svn.freebsd.org> From: Will Andrews Date: Mon, 8 Apr 2013 23:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249291 - head/sys/dev/firewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 23:16:43 -0000 Author: will Date: Mon Apr 8 23:16:42 2013 New Revision: 249291 URL: http://svnweb.freebsd.org/changeset/base/249291 Log: FireWire: Don't allow a tlabel to reference an xfer after free. sys/dev/firewire/firewire.c: - fw_xfer_unload(): Since we are about to free this xfer, call fw_tl_free() to remove the xfer from its tlabel's list, if it has a tlabel. - In every occasion when a xfer is removed from a tlabel's list, reset xfer->tl to -1 while holding fc->tlabel_lock, so that the xfer isn't mis-identified as belonging to a tlabel. This doesn't fix all the use-after-free problems for M_FWMEM, but is an incremental towards that goal. Reviewed by: kan, sbruno Sponsored by: Spectra Logic Modified: head/sys/dev/firewire/firewire.c Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Mon Apr 8 23:06:25 2013 (r249290) +++ head/sys/dev/firewire/firewire.c Mon Apr 8 23:16:42 2013 (r249291) @@ -374,6 +374,7 @@ firewire_xfer_timeout(void *arg, int pen "tl=0x%x flag=0x%02x\n", i, xfer->flag); fw_dump_hdr(&xfer->send.hdr, "send"); xfer->resp = ETIMEDOUT; + xfer->tl = -1; STAILQ_REMOVE_HEAD(&fc->tlabels[i], tlabel); STAILQ_INSERT_TAIL(&xfer_timeout, xfer, tlabel); } @@ -608,6 +609,7 @@ fw_drain_txq(struct firewire_comm *fc) while ((xfer = STAILQ_FIRST(&fc->tlabels[i])) != NULL) { if (firewire_debug) printf("tl=%d flag=%d\n", i, xfer->flag); + xfer->tl = -1; xfer->resp = EAGAIN; STAILQ_REMOVE_HEAD(&fc->tlabels[i], tlabel); STAILQ_INSERT_TAIL(&xfer_drain, xfer, tlabel); @@ -1044,11 +1046,12 @@ fw_tl_free(struct firewire_comm *fc, str struct fw_xfer *txfer; int s; - if (xfer->tl < 0) - return; - s = splfw(); mtx_lock(&fc->tlabel_lock); + if (xfer->tl < 0) { + mtx_unlock(&fc->tlabel_lock); + return; + } #if 1 /* make sure the label is allocated */ STAILQ_FOREACH(txfer, &fc->tlabels[xfer->tl], tlabel) if(txfer == xfer) @@ -1067,6 +1070,7 @@ fw_tl_free(struct firewire_comm *fc, str #endif STAILQ_REMOVE(&fc->tlabels[xfer->tl], xfer, fw_xfer, tlabel); + xfer->tl = -1; mtx_unlock(&fc->tlabel_lock); splx(s); return; @@ -1191,6 +1195,11 @@ fw_xfer_unload(struct fw_xfer* xfer) splx(s); } if (xfer->fc != NULL) { + /* + * Ensure that any tlabel owner can't access this + * xfer after it's freed. + */ + fw_tl_free(xfer->fc, xfer); #if 1 if(xfer->flag & FWXF_START) /* From owner-svn-src-head@FreeBSD.ORG Mon Apr 8 23:32:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A78485DB; Mon, 8 Apr 2013 23:32:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id 43FA8308; Mon, 8 Apr 2013 23:32:22 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r38NWBjN015420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Apr 2013 09:32:13 +1000 Date: Tue, 9 Apr 2013 09:32:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r249265 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sys In-Reply-To: <20130408194436.GI76816@FreeBSD.org> Message-ID: <20130409090906.X1317@besplex.bde.org> References: <201304081919.r38JJAvB088644@svn.freebsd.org> <201304081541.27408.jhb@freebsd.org> <20130408194436.GI76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Ov0XUFDt c=1 sm=1 a=ZmwpETj09uMA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=IOvs9-exVioA:10 a=6I5d2MoRAAAA:8 a=o6H9giKKc9XhkaVdGnoA:9 a=CjuIK1q_8ugA:10 a=p4VOkwfX5Yu8O-DJ:21 a=VNgWRUltHtPrVWRC:21 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 23:32:23 -0000 On Mon, 8 Apr 2013, Gleb Smirnoff wrote: > On Mon, Apr 08, 2013 at 03:41:27PM -0400, John Baldwin wrote: > J> On Monday, April 08, 2013 3:19:10 pm Gleb Smirnoff wrote: > J> > Author: glebius > J> > Date: Mon Apr 8 19:19:10 2013 > J> > New Revision: 249265 > J> > URL: http://svnweb.freebsd.org/changeset/base/249265 > J> > > J> > Log: > J> > Merge from projects/counters: > J> > > J> > Pad struct pcpu so that its size is denominator of PAGE_SIZE. This > J> > is done to reduce memory waste in UMA_PCPU_ZONE zones. > J> > > J> > Sponsored by: Nginx, Inc. > J> > > J> > Modified: head/sys/sys/pcpu.h > J> > > J> ============================================================================== > J> > --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) > J> > +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) > J> > @@ -180,6 +180,14 @@ struct pcpu { > J> > PCPU_MD_FIELDS; > J> > } __aligned(CACHE_LINE_SIZE); > J> > J> Why not change this to be PAGE_SIZE rather than putting explicit padding in > J> all the pcpu fields? That would seem to be more maintainable. > > Because it can be smaller than PAGE_SIZE. Two times smaller, four times smaller. I said in private mail that I don't see a better way to do this. Now I see a way that might work: #define (in the MD pcpu.h) the expected number of times smaller (hopefully not fractional). This won't change very often. Then, if large alignments like PAGE_SIZE work, then smaller ones like PAGE_SIZE / will also work. How does explicit aligning to only CACHE_LINE_SIZE work anyway? I think you actually need PAGE_SIZE/N, and get this by magic padding combined with explicit alignment to only CACHE_LINE_SIZE. Bruce Bruce From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 06:50:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AF1A51C4; Tue, 9 Apr 2013 06:50:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A02543FB; Tue, 9 Apr 2013 06:50:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r396oDaY094506; Tue, 9 Apr 2013 06:50:13 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r396oBpw094498; Tue, 9 Apr 2013 06:50:11 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201304090650.r396oBpw094498@svn.freebsd.org> From: Ed Schouten Date: Tue, 9 Apr 2013 06:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249293 - in head: contrib/mtree usr.sbin/nmtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 06:50:13 -0000 Author: ed Date: Tue Apr 9 06:50:11 2013 New Revision: 249293 URL: http://svnweb.freebsd.org/changeset/base/249293 Log: Import a new version of NetBSD's mtree. This version of mtree implements a new flag (-O) that can be used to restrict the tool to certain pathnames. Also, it fixes a compiler warning generated by -Wmissing-variable-declarations. Acked by: brooks Added: head/contrib/mtree/only.c - copied unchanged from r249269, vendor/NetBSD/mtree/dist/only.c Modified: head/contrib/mtree/Makefile head/contrib/mtree/create.c head/contrib/mtree/extern.h head/contrib/mtree/mtree.8 head/contrib/mtree/mtree.c head/contrib/mtree/verify.c head/usr.sbin/nmtree/Makefile Directory Properties: head/contrib/mtree/ (props changed) Modified: head/contrib/mtree/Makefile ============================================================================== --- head/contrib/mtree/Makefile Tue Apr 9 06:33:03 2013 (r249292) +++ head/contrib/mtree/Makefile Tue Apr 9 06:50:11 2013 (r249293) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2012/10/05 01:26:56 christos Exp $ +# $NetBSD: Makefile,v 1.34 2013/02/03 19:15:16 christos Exp $ # from: @(#)Makefile 8.2 (Berkeley) 4/27/95 .include @@ -8,7 +8,7 @@ PROG= mtree CPPFLAGS+= -DMTREE MAN= mtree.8 SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c specspec.c \ - verify.c getid.c pack_dev.c + verify.c getid.c pack_dev.c only.c .if (${HOSTPROG:U} == "") DPADD+= ${LIBUTIL} LDADD+= -lutil Modified: head/contrib/mtree/create.c ============================================================================== --- head/contrib/mtree/create.c Tue Apr 9 06:33:03 2013 (r249292) +++ head/contrib/mtree/create.c Tue Apr 9 06:50:11 2013 (r249293) @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.68 2012/12/20 16:43:16 christos Exp $ */ +/* $NetBSD: create.c,v 1.69 2013/02/03 19:15:17 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.68 2012/12/20 16:43:16 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.69 2013/02/03 19:15:17 christos Exp $"); #endif #endif /* not lint */ @@ -134,6 +134,10 @@ cwalk(void) fts_set(t, p, FTS_SKIP); continue; } + if (!find_only(p->fts_path)) { + fts_set(t, p, FTS_SKIP); + continue; + } switch(p->fts_info) { case FTS_D: if (!bflag) Modified: head/contrib/mtree/extern.h ============================================================================== --- head/contrib/mtree/extern.h Tue Apr 9 06:33:03 2013 (r249292) +++ head/contrib/mtree/extern.h Tue Apr 9 06:50:11 2013 (r249293) @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.37 2012/12/20 16:43:16 christos Exp $ */ +/* $NetBSD: extern.h,v 1.38 2013/02/03 19:15:17 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -42,6 +42,7 @@ #include #include #include +#include #if HAVE_NETDB_H /* For MAXHOSTNAMELEN on some platforms. */ @@ -74,6 +75,8 @@ u_int parsetype(const char *); void read_excludes_file(const char *); const char *rlink(const char *); int verify(FILE *); +void load_only(const char *fname); +bool find_only(const char *path); extern int bflag, dflag, eflag, iflag, jflag, lflag, mflag, nflag, qflag, rflag, sflag, tflag, uflag; Modified: head/contrib/mtree/mtree.8 ============================================================================== --- head/contrib/mtree/mtree.8 Tue Apr 9 06:33:03 2013 (r249292) +++ head/contrib/mtree/mtree.8 Tue Apr 9 06:50:11 2013 (r249293) @@ -1,4 +1,4 @@ -.\" $NetBSD: mtree.8,v 1.67 2012/12/20 20:31:01 wiz Exp $ +.\" $NetBSD: mtree.8,v 1.69 2013/02/03 19:16:06 christos Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -56,7 +56,7 @@ .\" .\" @(#)mtree.8 8.2 (Berkeley) 12/11/93 .\" -.Dd December 20, 2012 +.Dd February 3, 2013 .Dt MTREE 8 .Os .Sh NAME @@ -73,6 +73,7 @@ .Op Fl K Ar keywords .Op Fl k Ar keywords .Op Fl N Ar dbdir +.Op Fl O Ar onlyfile .Op Fl p Ar path .Op Fl R Ar keywords .Op Fl s Ar seed @@ -273,6 +274,8 @@ rather than using the results from the s and .Xr getgrnam 3 (and related) library calls. +.It Fl O Ar onlypaths +Only include files included in this list of pathnames. .It Fl P Don't follow symbolic links in the file hierarchy, instead consider the symbolic link itself in any comparisons. Modified: head/contrib/mtree/mtree.c ============================================================================== --- head/contrib/mtree/mtree.c Tue Apr 9 06:33:03 2013 (r249292) +++ head/contrib/mtree/mtree.c Tue Apr 9 06:50:11 2013 (r249293) @@ -1,4 +1,4 @@ -/* $NetBSD: mtree.c,v 1.46 2012/12/20 19:09:25 christos Exp $ */ +/* $NetBSD: mtree.c,v 1.48 2013/04/08 17:39:11 christos Exp $ */ /*- * Copyright (c) 1989, 1990, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: mtree.c,v 1.46 2012/12/20 19:09:25 christos Exp $"); +__RCSID("$NetBSD: mtree.c,v 1.48 2013/04/08 17:39:11 christos Exp $"); #endif #endif /* not lint */ @@ -59,8 +59,8 @@ __RCSID("$NetBSD: mtree.c,v 1.46 2012/12 #include "extern.h" int ftsoptions = FTS_PHYSICAL; -int bflag, cflag, Cflag, dflag, Dflag, eflag, iflag, jflag, lflag, mflag, - nflag, qflag, rflag, sflag, tflag, uflag, Uflag, wflag; +int bflag, dflag, eflag, iflag, jflag, lflag, mflag, nflag, qflag, rflag, + sflag, tflag, uflag; char fullpath[MAXPATHLEN]; static struct { @@ -79,18 +79,20 @@ main(int argc, char **argv) { int ch, status; unsigned int i; + int cflag, Cflag, Dflag, Uflag, wflag; char *dir, *p; FILE *spec1, *spec2; setprogname(argv[0]); + cflag = Cflag = Dflag = Uflag = wflag = 0; dir = NULL; init_excludes(); spec1 = stdin; spec2 = NULL; while ((ch = getopt(argc, argv, - "bcCdDeE:f:F:I:ijk:K:lLmMnN:p:PqrR:s:StuUwWxX:")) + "bcCdDeE:f:F:I:ijk:K:lLmMnN:O:p:PqrR:s:StuUwWxX:")) != -1) { switch((char)ch) { case 'b': @@ -179,6 +181,9 @@ main(int argc, char **argv) "Unable to use user and group databases in `%s'", optarg); break; + case 'O': + load_only(optarg); + break; case 'p': dir = optarg; break; Copied: head/contrib/mtree/only.c (from r249269, vendor/NetBSD/mtree/dist/only.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/mtree/only.c Tue Apr 9 06:50:11 2013 (r249293, copy of r249269, vendor/NetBSD/mtree/dist/only.c) @@ -0,0 +1,152 @@ +/* $NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $ */ + +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include + +#if defined(__RCSID) && !defined(lint) +__RCSID("$NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $"); +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "extern.h" + +struct hentry { + char *str; + uint32_t hash; + struct hentry *next; +}; + +static struct hentry *table[1024]; +static bool loaded; + +static uint32_t +hash_str(const char *str) +{ + const uint8_t *s = (const uint8_t *)str; + uint8_t c; + uint32_t hash = 0; + while ((c = *s++) != '\0') + hash = hash * 33 + c; /* "perl": k=33, r=r+r/32 */ + return hash + (hash >> 5); +} + +static bool +hash_find(const char *str, uint32_t *h) +{ + struct hentry *e; + *h = hash_str(str) % __arraycount(table); + + for (e = table[*h]; e; e = e->next) + if (e->hash == *h && strcmp(e->str, str) == 0) + return true; + return false; +} + +static void +hash_insert(char *str, uint32_t h) +{ + struct hentry *e; + + if ((e = malloc(sizeof(*e))) == NULL) + mtree_err("memory allocation error"); + + e->str = str; + e->hash = h; + e->next = table[h]; + table[h] = e; +} + +static void +fill(char *str) +{ + uint32_t h; + char *ptr = strrchr(str, '/'); + + if (ptr == NULL) + return; + + *ptr = '\0'; + if (!hash_find(str, &h)) { + char *x = strdup(str); + if (x == NULL) + mtree_err("memory allocation error"); + hash_insert(x, h); + fill(str); + } + *ptr = '/'; +} + +void +load_only(const char *fname) +{ + FILE *fp; + char *line; + size_t len, lineno; + + if ((fp = fopen(fname, "r")) == NULL) + err(1, "Cannot open `%s'", fname); + + while ((line = fparseln(fp, &len, &lineno, NULL, FPARSELN_UNESCALL))) { + uint32_t h; + if (hash_find(line, &h)) + err(1, "Duplicate entry %s", line); + hash_insert(line, h); + fill(line); + } + + fclose(fp); + loaded = true; +} + +bool +find_only(const char *path) +{ + uint32_t h; + + if (!loaded) + return true; + return hash_find(path, &h); +} Modified: head/contrib/mtree/verify.c ============================================================================== --- head/contrib/mtree/verify.c Tue Apr 9 06:33:03 2013 (r249292) +++ head/contrib/mtree/verify.c Tue Apr 9 06:50:11 2013 (r249293) @@ -1,4 +1,4 @@ -/* $NetBSD: verify.c,v 1.43 2012/10/05 01:31:05 christos Exp $ */ +/* $NetBSD: verify.c,v 1.44 2013/02/03 19:15:17 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: verify.c,v 1.43 2012/10/05 01:31:05 christos Exp $"); +__RCSID("$NetBSD: verify.c,v 1.44 2013/02/03 19:15:17 christos Exp $"); #endif #endif /* not lint */ @@ -95,6 +95,10 @@ vwalk(void) fts_set(t, p, FTS_SKIP); continue; } + if (!find_only(p->fts_path)) { + fts_set(t, p, FTS_SKIP); + continue; + } switch(p->fts_info) { case FTS_D: case FTS_SL: Modified: head/usr.sbin/nmtree/Makefile ============================================================================== --- head/usr.sbin/nmtree/Makefile Tue Apr 9 06:33:03 2013 (r249292) +++ head/usr.sbin/nmtree/Makefile Tue Apr 9 06:50:11 2013 (r249293) @@ -7,7 +7,7 @@ PROG= nmtree MAN= nmtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ - spec.c specspec.c verify.c + only.c spec.c specspec.c verify.c LDADD+= -lmd -lutil CFLAGS+= -I${.CURDIR}/../../contrib/mknod From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 07:11:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3612B49D; Tue, 9 Apr 2013 07:11:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1868A677; Tue, 9 Apr 2013 07:11:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r397BQtG002288; Tue, 9 Apr 2013 07:11:26 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r397BNwL002265; Tue, 9 Apr 2013 07:11:23 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201304090711.r397BNwL002265@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 9 Apr 2013 07:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249294 - in head/sys: net netinet netinet6 netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 07:11:26 -0000 Author: ae Date: Tue Apr 9 07:11:22 2013 New Revision: 249294 URL: http://svnweb.freebsd.org/changeset/base/249294 Log: Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats. MFC after: 1 week Modified: head/sys/net/if_bridge.c head/sys/netinet/ip6.h head/sys/netinet6/dest6.c head/sys/netinet6/frag6.c head/sys/netinet6/in6_gif.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_output.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/route6.c head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/net/if_bridge.c Tue Apr 9 07:11:22 2013 (r249294) @@ -3336,14 +3336,14 @@ bridge_ip6_checkbasic(struct mbuf **mp) if ((m = m_copyup(m, sizeof(struct ip6_hdr), (max_linkhdr + 3) & ~3)) == NULL) { /* XXXJRT new stat, please */ - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); in6_ifstat_inc(inifp, ifs6_in_hdrerr); goto bad; } } else if (__predict_false(m->m_len < sizeof(struct ip6_hdr))) { struct ifnet *inifp = m->m_pkthdr.rcvif; if ((m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) { - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); in6_ifstat_inc(inifp, ifs6_in_hdrerr); goto bad; } @@ -3352,7 +3352,7 @@ bridge_ip6_checkbasic(struct mbuf **mp) ip6 = mtod(m, struct ip6_hdr *); if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { - V_ip6stat.ip6s_badvers++; + IP6STAT_INC(ip6s_badvers); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_hdrerr); goto bad; } Modified: head/sys/netinet/ip6.h ============================================================================== --- head/sys/netinet/ip6.h Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet/ip6.h Tue Apr 9 07:11:22 2013 (r249294) @@ -275,24 +275,24 @@ do { \ if (((m)->m_flags & M_LOOP) && \ ((m)->m_len < (off) + (hlen)) && \ (((m) = m_pullup((m), (off) + (hlen))) == NULL)) { \ - V_ip6stat.ip6s_exthdrtoolong++; \ + IP6STAT_INC(ip6s_exthdrtoolong); \ return ret; \ } else if ((m)->m_flags & M_EXT) { \ if ((m)->m_len < (off) + (hlen)) { \ - V_ip6stat.ip6s_exthdrtoolong++; \ + IP6STAT_INC(ip6s_exthdrtoolong); \ m_freem(m); \ return ret; \ } \ } else { \ if ((m)->m_len < (off) + (hlen)) { \ - V_ip6stat.ip6s_exthdrtoolong++; \ + IP6STAT_INC(ip6s_exthdrtoolong); \ m_freem(m); \ return ret; \ } \ } \ } else { \ if ((m)->m_len < (off) + (hlen)) { \ - V_ip6stat.ip6s_tooshort++; \ + IP6STAT_INC(ip6s_tooshort); \ in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); \ m_freem(m); \ return ret; \ Modified: head/sys/netinet6/dest6.c ============================================================================== --- head/sys/netinet6/dest6.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/dest6.c Tue Apr 9 07:11:22 2013 (r249294) @@ -93,7 +93,7 @@ dest6_input(struct mbuf **mp, int *offp, for (optlen = 0; dstoptlen > 0; dstoptlen -= optlen, opt += optlen) { if (*opt != IP6OPT_PAD1 && (dstoptlen < IP6OPT_MINLEN || *(opt + 1) + 2 > dstoptlen)) { - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); goto bad; } Modified: head/sys/netinet6/frag6.c ============================================================================== --- head/sys/netinet6/frag6.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/frag6.c Tue Apr 9 07:11:22 2013 (r249294) @@ -215,7 +215,7 @@ frag6_input(struct mbuf **mp, int *offp, return IPPROTO_DONE; } - V_ip6stat.ip6s_fragments++; + IP6STAT_INC(ip6s_fragments); in6_ifstat_inc(dstifp, ifs6_reass_reqd); /* offset now points to data portion */ @@ -228,7 +228,7 @@ frag6_input(struct mbuf **mp, int *offp, */ if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { /* XXX-BZ we want dedicated counters for this. */ - V_ip6stat.ip6s_reassembled++; + IP6STAT_INC(ip6s_reassembled); in6_ifstat_inc(dstifp, ifs6_reass_ok); *offp = offset; return (ip6f->ip6f_nxt); @@ -603,7 +603,7 @@ insert: m->m_pkthdr.len = plen; } - V_ip6stat.ip6s_reassembled++; + IP6STAT_INC(ip6s_reassembled); in6_ifstat_inc(dstifp, ifs6_reass_ok); /* @@ -619,7 +619,7 @@ insert: dropfrag: IP6Q_UNLOCK(); in6_ifstat_inc(dstifp, ifs6_reass_fail); - V_ip6stat.ip6s_fragdropped++; + IP6STAT_INC(ip6s_fragdropped); m_freem(m); return IPPROTO_DONE; } @@ -743,7 +743,7 @@ frag6_slowtimo(void) --q6->ip6q_ttl; q6 = q6->ip6q_next; if (q6->ip6q_prev->ip6q_ttl == 0) { - V_ip6stat.ip6s_fragtimeout++; + IP6STAT_INC(ip6s_fragtimeout); /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ frag6_freef(q6->ip6q_prev); } @@ -755,7 +755,7 @@ frag6_slowtimo(void) */ while (V_frag6_nfragpackets > (u_int)V_ip6_maxfragpackets && V_ip6q.ip6q_prev) { - V_ip6stat.ip6s_fragoverflow++; + IP6STAT_INC(ip6s_fragoverflow); /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ frag6_freef(V_ip6q.ip6q_prev); } @@ -781,7 +781,7 @@ frag6_drain(void) VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); while (V_ip6q.ip6q_next != &V_ip6q) { - V_ip6stat.ip6s_fragdropped++; + IP6STAT_INC(ip6s_fragdropped); /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */ frag6_freef(V_ip6q.ip6q_next); } Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/in6_gif.c Tue Apr 9 07:11:22 2013 (r249294) @@ -299,14 +299,14 @@ in6_gif_input(struct mbuf **mp, int *off sc = (struct gif_softc *)encap_getarg(m); if (sc == NULL) { m_freem(m); - V_ip6stat.ip6s_nogif++; + IP6STAT_INC(ip6s_nogif); return IPPROTO_DONE; } gifp = GIF2IFP(sc); if (gifp == NULL || (gifp->if_flags & IFF_UP) == 0) { m_freem(m); - V_ip6stat.ip6s_nogif++; + IP6STAT_INC(ip6s_nogif); return IPPROTO_DONE; } @@ -361,7 +361,7 @@ in6_gif_input(struct mbuf **mp, int *off break; default: - V_ip6stat.ip6s_nogif++; + IP6STAT_INC(ip6s_nogif); m_freem(m); return IPPROTO_DONE; } Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/in6_src.c Tue Apr 9 07:11:22 2013 (r249294) @@ -153,7 +153,7 @@ static struct in6_addrpolicy *match_addr #define REPLACE(r) do {\ if ((r) < sizeof(V_ip6stat.ip6s_sources_rule) / \ sizeof(V_ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ - V_ip6stat.ip6s_sources_rule[(r)]++; \ + IP6STAT_INC(ip6s_sources_rule[(r)]); \ /* { \ char ip6buf[INET6_ADDRSTRLEN], ip6b[INET6_ADDRSTRLEN]; \ printf("in6_selectsrc: replace %s with %s by %d\n", ia_best ? ip6_sprintf(ip6buf, &ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(ip6b, &ia->ia_addr.sin6_addr), (r)); \ @@ -163,7 +163,7 @@ static struct in6_addrpolicy *match_addr #define NEXT(r) do {\ if ((r) < sizeof(V_ip6stat.ip6s_sources_rule) / \ sizeof(V_ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ - V_ip6stat.ip6s_sources_rule[(r)]++; \ + IP6STAT_INC(ip6s_sources_rule[(r)]); \ /* { \ char ip6buf[INET6_ADDRSTRLEN], ip6b[INET6_ADDRSTRLEN]; \ printf("in6_selectsrc: keep %s against %s by %d\n", ia_best ? ip6_sprintf(ip6buf, &ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(ip6b, &ia->ia_addr.sin6_addr), (r)); \ @@ -173,7 +173,7 @@ static struct in6_addrpolicy *match_addr #define BREAK(r) do { \ if ((r) < sizeof(V_ip6stat.ip6s_sources_rule) / \ sizeof(V_ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ - V_ip6stat.ip6s_sources_rule[(r)]++; \ + IP6STAT_INC(ip6s_sources_rule[(r)]); \ goto out; /* XXX: we can't use 'break' here */ \ } while(0) @@ -734,7 +734,7 @@ selectroute(struct sockaddr_in6 *dstsock error = EHOSTUNREACH; } if (error == EHOSTUNREACH) - V_ip6stat.ip6s_noroute++; + IP6STAT_INC(ip6s_noroute); if (retifp != NULL) { *retifp = ifp; Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/ip6_forward.c Tue Apr 9 07:11:22 2013 (r249294) @@ -135,7 +135,7 @@ ip6_forward(struct mbuf *m, int srcrt) if ((m->m_flags & (M_BCAST|M_MCAST)) != 0 || IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard) */ if (V_ip6_log_time + V_ip6_log_interval < time_second) { V_ip6_log_time = time_second; @@ -183,7 +183,7 @@ ip6_forward(struct mbuf *m, int srcrt) IP_FORWARDING, &error); if (sp == NULL) { V_ipsec6stat.out_inval++; - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); if (mcopy) { #if 0 /* XXX: what icmp ? */ @@ -204,7 +204,7 @@ ip6_forward(struct mbuf *m, int srcrt) * This packet is just discarded. */ V_ipsec6stat.out_polvio++; - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); KEY_FREESP(&sp); if (mcopy) { #if 0 @@ -226,7 +226,7 @@ ip6_forward(struct mbuf *m, int srcrt) if (sp->req == NULL) { /* XXX should be panic ? */ printf("ip6_forward: No IPsec request specified.\n"); - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); KEY_FREESP(&sp); if (mcopy) { #if 0 @@ -310,7 +310,7 @@ ip6_forward(struct mbuf *m, int srcrt) /* don't show these error codes to the user */ break; } - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); if (mcopy) { #if 0 /* XXX: what icmp ? */ @@ -362,7 +362,7 @@ again2: if (rin6.ro_rt != NULL) RT_UNLOCK(rin6.ro_rt); else { - V_ip6stat.ip6s_noroute++; + IP6STAT_INC(ip6s_noroute); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute); if (mcopy) { icmp6_error(mcopy, ICMP6_DST_UNREACH, @@ -387,13 +387,13 @@ skip_routing: src_in6 = ip6->ip6_src; if (in6_setscope(&src_in6, rt->rt_ifp, &outzone)) { /* XXX: this should not happen */ - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); goto bad; } if (in6_setscope(&src_in6, m->m_pkthdr.rcvif, &inzone)) { - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); goto bad; } if (inzone != outzone @@ -401,8 +401,8 @@ skip_routing: && !ipsecrt #endif ) { - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard); if (V_ip6_log_time + V_ip6_log_interval < time_second) { @@ -432,8 +432,8 @@ skip_routing: if (in6_setscope(&dst_in6, m->m_pkthdr.rcvif, &inzone) != 0 || in6_setscope(&dst_in6, rt->rt_ifp, &outzone) != 0 || inzone != outzone) { - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); goto bad; } @@ -623,12 +623,12 @@ pass: error = nd6_output(rt->rt_ifp, origifp, m, dst, rt); if (error) { in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard); - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); } else { - V_ip6stat.ip6s_forward++; + IP6STAT_INC(ip6s_forward); in6_ifstat_inc(rt->rt_ifp, ifs6_out_forward); if (type) - V_ip6stat.ip6s_redirectsent++; + IP6STAT_INC(ip6s_redirectsent); else { if (mcopy) goto freecopy; Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/ip6_input.c Tue Apr 9 07:11:22 2013 (r249294) @@ -364,7 +364,7 @@ ip6_input_hbh(struct mbuf *m, uint32_t * * contained, ip6_hopopts_input() must set a valid * (non-zero) payload length to the variable plen. */ - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_discard); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_hdrerr); icmp6_error(m, ICMP6_PARAM_PROB, @@ -379,7 +379,7 @@ ip6_input_hbh(struct mbuf *m, uint32_t * IP6_EXTHDR_GET(hbh, struct ip6_hbh *, m, sizeof(struct ip6_hdr), sizeof(struct ip6_hbh)); if (hbh == NULL) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); goto out; } #endif @@ -462,20 +462,21 @@ ip6_input(struct mbuf *m) */ if (m->m_flags & M_EXT) { if (m->m_next) - V_ip6stat.ip6s_mext2m++; + IP6STAT_INC(ip6s_mext2m); else - V_ip6stat.ip6s_mext1++; + IP6STAT_INC(ip6s_mext1); } else { #define M2MMAX (sizeof(V_ip6stat.ip6s_m2m)/sizeof(V_ip6stat.ip6s_m2m[0])) if (m->m_next) { if (m->m_flags & M_LOOP) { - V_ip6stat.ip6s_m2m[V_loif->if_index]++; + IP6STAT_INC(ip6s_m2m[V_loif->if_index]); } else if (m->m_pkthdr.rcvif->if_index < M2MMAX) - V_ip6stat.ip6s_m2m[m->m_pkthdr.rcvif->if_index]++; + IP6STAT_INC( + ip6s_m2m[m->m_pkthdr.rcvif->if_index]); else - V_ip6stat.ip6s_m2m[0]++; + IP6STAT_INC(ip6s_m2m[0]); } else - V_ip6stat.ip6s_m1++; + IP6STAT_INC(ip6s_m1); #undef M2MMAX } @@ -486,7 +487,7 @@ ip6_input(struct mbuf *m) } in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_receive); - V_ip6stat.ip6s_total++; + IP6STAT_INC(ip6s_total); #ifndef PULLDOWN_TEST /* @@ -519,7 +520,7 @@ ip6_input(struct mbuf *m) struct ifnet *inifp; inifp = m->m_pkthdr.rcvif; if ((m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) { - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); in6_ifstat_inc(inifp, ifs6_in_hdrerr); return; } @@ -528,12 +529,12 @@ ip6_input(struct mbuf *m) ip6 = mtod(m, struct ip6_hdr *); if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { - V_ip6stat.ip6s_badvers++; + IP6STAT_INC(ip6s_badvers); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_hdrerr); goto bad; } - V_ip6stat.ip6s_nxthist[ip6->ip6_nxt]++; + IP6STAT_INC(ip6s_nxthist[ip6->ip6_nxt]); /* * Check against address spoofing/corruption. @@ -543,7 +544,7 @@ ip6_input(struct mbuf *m) /* * XXX: "badscope" is not very suitable for a multicast source. */ - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); goto bad; } @@ -555,7 +556,7 @@ ip6_input(struct mbuf *m) * because ip6_mloopback() passes the "actual" interface * as the outgoing/incoming interface. */ - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); goto bad; } @@ -580,7 +581,7 @@ ip6_input(struct mbuf *m) */ if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); goto bad; } @@ -594,7 +595,7 @@ ip6_input(struct mbuf *m) */ if (IN6_IS_ADDR_V4COMPAT(&ip6->ip6_src) || IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) { - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); goto bad; } @@ -657,12 +658,12 @@ passin: * is not loopback. */ if (in6_clearscope(&ip6->ip6_src) || in6_clearscope(&ip6->ip6_dst)) { - V_ip6stat.ip6s_badscope++; /* XXX */ + IP6STAT_INC(ip6s_badscope); /* XXX */ goto bad; } if (in6_setscope(&ip6->ip6_src, m->m_pkthdr.rcvif, NULL) || in6_setscope(&ip6->ip6_dst, m->m_pkthdr.rcvif, NULL)) { - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); goto bad; } @@ -866,7 +867,7 @@ passin: * and we're not a router. */ if (!V_ip6_forwarding) { - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_discard); goto bad; } @@ -920,7 +921,7 @@ passin: * Drop packet if shorter than we expect. */ if (m->m_pkthdr.len - sizeof(struct ip6_hdr) < plen) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); goto bad; } @@ -972,7 +973,7 @@ passin: */ if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); goto bad; } @@ -980,13 +981,13 @@ passin: /* * Tell launch routine the next header */ - V_ip6stat.ip6s_delivered++; + IP6STAT_INC(ip6s_delivered); in6_ifstat_inc(deliverifp, ifs6_in_deliver); nest = 0; while (nxt != IPPROTO_DONE) { if (V_ip6_hdrnestlimit && (++nest > V_ip6_hdrnestlimit)) { - V_ip6stat.ip6s_toomanyhdr++; + IP6STAT_INC(ip6s_toomanyhdr); goto bad; } @@ -995,7 +996,7 @@ passin: * more sanity checks in header chain processing. */ if (m->m_pkthdr.len < off) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); goto bad; } @@ -1089,14 +1090,14 @@ ip6_hopopts_input(u_int32_t *plenp, u_in IP6_EXTHDR_GET(hbh, struct ip6_hbh *, m, sizeof(struct ip6_hdr), sizeof(struct ip6_hbh)); if (hbh == NULL) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); return -1; } hbhlen = (hbh->ip6h_len + 1) << 3; IP6_EXTHDR_GET(hbh, struct ip6_hbh *, m, sizeof(struct ip6_hdr), hbhlen); if (hbh == NULL) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); return -1; } #endif @@ -1141,7 +1142,7 @@ ip6_process_hopopts(struct mbuf *m, u_in break; case IP6OPT_PADN: if (hbhlen < IP6OPT_MINLEN) { - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); goto bad; } optlen = *(opt + 1) + 2; @@ -1149,7 +1150,7 @@ ip6_process_hopopts(struct mbuf *m, u_in case IP6OPT_ROUTER_ALERT: /* XXX may need check for alignment */ if (hbhlen < IP6OPT_RTALERT_LEN) { - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); goto bad; } if (*(opt + 1) != IP6OPT_RTALERT_LEN - 2) { @@ -1166,7 +1167,7 @@ ip6_process_hopopts(struct mbuf *m, u_in case IP6OPT_JUMBO: /* XXX may need check for alignment */ if (hbhlen < IP6OPT_JUMBO_LEN) { - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); goto bad; } if (*(opt + 1) != IP6OPT_JUMBO_LEN - 2) { @@ -1184,7 +1185,7 @@ ip6_process_hopopts(struct mbuf *m, u_in */ ip6 = mtod(m, struct ip6_hdr *); if (ip6->ip6_plen) { - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, erroff + opt - opthead); @@ -1208,7 +1209,7 @@ ip6_process_hopopts(struct mbuf *m, u_in * there's no explicit mention in specification. */ if (*plenp != 0) { - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, erroff + opt + 2 - opthead); @@ -1220,7 +1221,7 @@ ip6_process_hopopts(struct mbuf *m, u_in * jumbo payload length must be larger than 65535. */ if (jumboplen <= IPV6_MAXPACKET) { - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, erroff + opt + 2 - opthead); @@ -1231,7 +1232,7 @@ ip6_process_hopopts(struct mbuf *m, u_in break; default: /* unknown option */ if (hbhlen < IP6OPT_MINLEN) { - V_ip6stat.ip6s_toosmall++; + IP6STAT_INC(ip6s_toosmall); goto bad; } optlen = ip6_unknown_opt(opt, m, @@ -1268,11 +1269,11 @@ ip6_unknown_opt(u_int8_t *optp, struct m m_freem(m); return (-1); case IP6OPT_TYPE_FORCEICMP: /* send ICMP even if multicasted */ - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_OPTION, off); return (-1); case IP6OPT_TYPE_ICMP: /* send ICMP if not multicasted */ - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); ip6 = mtod(m, struct ip6_hdr *); if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || (m->m_flags & (M_BCAST|M_MCAST))) @@ -1451,14 +1452,14 @@ ip6_savecontrol(struct inpcb *in6p, stru ext = ip6_pullexthdr(m, sizeof(struct ip6_hdr), ip6->ip6_nxt); if (ext == NULL) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); return; } hbh = mtod(ext, struct ip6_hbh *); hbhlen = (hbh->ip6h_len + 1) << 3; if (hbhlen != ext->m_len) { m_freem(ext); - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); return; } #endif @@ -1525,7 +1526,7 @@ ip6_savecontrol(struct inpcb *in6p, stru #else ext = ip6_pullexthdr(m, off, nxt); if (ext == NULL) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); return; } ip6e = mtod(ext, struct ip6_ext *); @@ -1535,7 +1536,7 @@ ip6_savecontrol(struct inpcb *in6p, stru elen = (ip6e->ip6e_len + 1) << 3; if (elen != ext->m_len) { m_freem(ext); - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); return; } #endif Modified: head/sys/netinet6/ip6_ipsec.c ============================================================================== --- head/sys/netinet6/ip6_ipsec.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/ip6_ipsec.c Tue Apr 9 07:11:22 2013 (r249294) @@ -149,7 +149,7 @@ ip6_ipsec_fwd(struct mbuf *m) error = ipsec_in_reject(sp, m); KEY_FREESP(&sp); if (error) { - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); return 1; } #endif /* IPSEC */ Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/ip6_mroute.c Tue Apr 9 07:11:22 2013 (r249294) @@ -1100,7 +1100,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, stru * (although such packets must normally set 1 to the hop limit field). */ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); if (V_ip6_log_time + V_ip6_log_interval < time_second) { V_ip6_log_time = time_second; log(LOG_DEBUG, @@ -1535,7 +1535,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *if dst0 = ip6->ip6_dst; if ((error = in6_setscope(&src0, ifp, &iszone)) != 0 || (error = in6_setscope(&dst0, ifp, &idzone)) != 0) { - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); return (error); } for (mifp = mif6table, mifi = 0; mifi < nummifs; mifp++, mifi++) { @@ -1555,7 +1555,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *if &odzone) || iszone != oszone || idzone != odzone) { - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); continue; } } Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/ip6_output.c Tue Apr 9 07:11:22 2013 (r249294) @@ -498,16 +498,16 @@ skip_ipsec2:; if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && (flags & IPV6_UNSPECSRC) == 0) { error = EOPNOTSUPP; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); goto bad; } if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { error = EOPNOTSUPP; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); goto bad; } - V_ip6stat.ip6s_localout++; + IP6STAT_INC(ip6s_localout); /* * Route packet. @@ -713,7 +713,7 @@ again: goto routefound; badscope: - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(origifp, ifs6_out_discard); if (error == 0) error = EHOSTUNREACH; /* XXX */ @@ -742,7 +742,7 @@ again: * Confirm that the outgoing interface supports multicast. */ if (!(ifp->if_flags & IFF_MULTICAST)) { - V_ip6stat.ip6s_noroute++; + IP6STAT_INC(ip6s_noroute); in6_ifstat_inc(ifp, ifs6_out_discard); error = ENETUNREACH; goto bad; @@ -1073,7 +1073,7 @@ passout: if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) < tlen /* - hlen */)) { error = ENOBUFS; - V_ip6stat.ip6s_odropped++; + IP6STAT_INC(ip6s_odropped); goto bad; } @@ -1123,7 +1123,7 @@ passout: m = m_gethdr(M_NOWAIT, MT_DATA); if (!m) { error = ENOBUFS; - V_ip6stat.ip6s_odropped++; + IP6STAT_INC(ip6s_odropped); goto sendorfree; } m->m_flags = m0->m_flags & M_COPYFLAGS; /* incl. FIB */ @@ -1135,7 +1135,7 @@ passout: m->m_len = sizeof(*mhip6); error = ip6_insertfraghdr(m0, m, hlen, &ip6f); if (error) { - V_ip6stat.ip6s_odropped++; + IP6STAT_INC(ip6s_odropped); goto sendorfree; } ip6f->ip6f_offlg = htons((u_short)((off - hlen) & ~7)); @@ -1147,7 +1147,7 @@ passout: sizeof(*ip6f) - sizeof(struct ip6_hdr))); if ((m_frgpart = m_copy(m0, off, len)) == 0) { error = ENOBUFS; - V_ip6stat.ip6s_odropped++; + IP6STAT_INC(ip6s_odropped); goto sendorfree; } m_cat(m, m_frgpart); @@ -1156,7 +1156,7 @@ passout: ip6f->ip6f_reserved = 0; ip6f->ip6f_ident = id; ip6f->ip6f_nxt = nextproto; - V_ip6stat.ip6s_ofragments++; + IP6STAT_INC(ip6s_ofragments); in6_ifstat_inc(ifp, ifs6_out_fragcreat); } @@ -1185,7 +1185,7 @@ sendorfree: } if (error == 0) - V_ip6stat.ip6s_fragmented++; + IP6STAT_INC(ip6s_fragmented); done: if (ro == &ip6route) Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/raw_ip6.c Tue Apr 9 07:11:22 2013 (r249294) @@ -296,7 +296,7 @@ rip6_input(struct mbuf **mp, int *offp, if ((last != NULL) && ipsec6_in_reject(m, last)) { m_freem(m); V_ipsec6stat.in_polvio++; - V_ip6stat.ip6s_delivered--; + IP6STAT_DEC(ip6s_delivered); /* Do not inject data into pcb. */ INP_RUNLOCK(last); } else @@ -328,7 +328,7 @@ rip6_input(struct mbuf **mp, int *offp, ICMP6_PARAMPROB_NEXTHEADER, prvnxtp - mtod(m, char *)); } - V_ip6stat.ip6s_delivered--; + IP6STAT_DEC(ip6s_delivered); } return (IPPROTO_DONE); } Modified: head/sys/netinet6/route6.c ============================================================================== --- head/sys/netinet6/route6.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netinet6/route6.c Tue Apr 9 07:11:22 2013 (r249294) @@ -69,7 +69,7 @@ route6_input(struct mbuf **mp, int *offp if (ip6a) { /* XXX reject home-address option before rthdr */ if (ip6a->ip6a_flags & IP6A_SWAP) { - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); m_freem(m); return IPPROTO_DONE; } @@ -84,7 +84,7 @@ route6_input(struct mbuf **mp, int *offp ip6 = mtod(m, struct ip6_hdr *); IP6_EXTHDR_GET(rh, struct ip6_rthdr *, m, off, sizeof(*rh)); if (rh == NULL) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); return IPPROTO_DONE; } #endif @@ -100,7 +100,7 @@ route6_input(struct mbuf **mp, int *offp rhlen = (rh->ip6r_len + 1) << 3; break; /* Final dst. Just ignore the header. */ } - V_ip6stat.ip6s_badoptions++; + IP6STAT_INC(ip6s_badoptions); icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, (caddr_t)&rh->ip6r_type - (caddr_t)ip6); return (IPPROTO_DONE); Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netipsec/ipsec_input.c Tue Apr 9 07:11:22 2013 (r249294) @@ -768,7 +768,7 @@ ipsec6_common_input_cb(struct mbuf *m, s nxt = nxt8; while (nxt != IPPROTO_DONE) { if (V_ip6_hdrnestlimit && (++nest > V_ip6_hdrnestlimit)) { - V_ip6stat.ip6s_toomanyhdr++; + IP6STAT_INC(ip6s_toomanyhdr); error = EINVAL; goto bad; } @@ -778,7 +778,7 @@ ipsec6_common_input_cb(struct mbuf *m, s * more sanity checks in header chain processing. */ if (m->m_pkthdr.len < skip) { - V_ip6stat.ip6s_tooshort++; + IP6STAT_INC(ip6s_tooshort); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); error = EINVAL; goto bad; Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Tue Apr 9 06:50:11 2013 (r249293) +++ head/sys/netipsec/ipsec_output.c Tue Apr 9 07:11:22 2013 (r249294) @@ -863,7 +863,7 @@ ipsec6_output_tunnel(struct ipsec_output rtalloc_ign_fib(state->ro, 0UL, M_GETFIB(m)); } if (state->ro->ro_rt == NULL) { - V_ip6stat.ip6s_noroute++; + IP6STAT_INC(ip6s_noroute); V_ipsec6stat.ips_out_noroute++; error = EHOSTUNREACH; goto bad; From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 09:15:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C288B4C2; Tue, 9 Apr 2013 09:15:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B54DEB6A; Tue, 9 Apr 2013 09:15:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r399FQ3K038217; Tue, 9 Apr 2013 09:15:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r399FQIO038216; Tue, 9 Apr 2013 09:15:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304090915.r399FQIO038216@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 9 Apr 2013 09:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249302 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 09:15:26 -0000 Author: glebius Date: Tue Apr 9 09:15:26 2013 New Revision: 249302 URL: http://svnweb.freebsd.org/changeset/base/249302 Log: Fix VIMAGE build. Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Apr 9 08:42:10 2013 (r249301) +++ head/sys/netinet/tcp_input.c Tue Apr 9 09:15:26 2013 (r249302) @@ -274,8 +274,8 @@ vnet_tcpstatp_uninit(const void *unused) i++, c++) counter_u64_free(*c); } -VNET_SYSUNINIT(vnet_tcpstatp_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, - vnet_ipstatp_uninit, NULL); +VNET_SYSUNINIT(vnet_tcpstatp_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_tcpstatp_uninit, NULL); #endif /* VIMAGE */ static int From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 10:04:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6BA62DD8; Tue, 9 Apr 2013 10:04:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5CD7DE74; Tue, 9 Apr 2013 10:04:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39A4APn052714; Tue, 9 Apr 2013 10:04:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39A4AZ4052713; Tue, 9 Apr 2013 10:04:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304091004.r39A4AZ4052713@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 9 Apr 2013 10:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249303 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 10:04:11 -0000 Author: kib Date: Tue Apr 9 10:04:10 2013 New Revision: 249303 URL: http://svnweb.freebsd.org/changeset/base/249303 Log: Fix the assertions for the state of the object under the map entry with the MAP_ENTRY_VN_WRITECNT flag: - Move the assertion that verifies the state of the v_writecount and vnp.writecount, under the block where the object is locked. - Check that the object type is OBJT_VNODE before asserting. Reported by: avg Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Apr 9 09:15:26 2013 (r249302) +++ head/sys/vm/vm_map.c Tue Apr 9 10:04:10 2013 (r249303) @@ -3160,6 +3160,22 @@ vmspace_fork(struct vmspace *vm1, vm_oof object->charge = old_entry->end - old_entry->start; old_entry->cred = NULL; } + + /* + * Assert the correct state of the vnode + * v_writecount while the object is locked, to + * not relock it later for the assertion + * correctness. + */ + if (old_entry->eflags & MAP_ENTRY_VN_WRITECNT && + object->type == OBJT_VNODE) { + KASSERT(((struct vnode *)object->handle)-> + v_writecount > 0, + ("vmspace_fork: v_writecount %p", object)); + KASSERT(object->un_pager.vnp.writemappings > 0, + ("vmspace_fork: vnp.writecount %p", + object)); + } VM_OBJECT_WUNLOCK(object); /* @@ -3171,12 +3187,6 @@ vmspace_fork(struct vmspace *vm1, vm_oof MAP_ENTRY_IN_TRANSITION); new_entry->wired_count = 0; if (new_entry->eflags & MAP_ENTRY_VN_WRITECNT) { - object = new_entry->object.vm_object; - KASSERT(((struct vnode *)object->handle)-> - v_writecount > 0, - ("vmspace_fork: v_writecount")); - KASSERT(object->un_pager.vnp.writemappings > 0, - ("vmspace_fork: vnp.writecount")); vnode_pager_update_writecount(object, new_entry->start, new_entry->end); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 12:01:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 763C88C1; Tue, 9 Apr 2013 12:01:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 69D95614; Tue, 9 Apr 2013 12:01:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39C1t62087519; Tue, 9 Apr 2013 12:01:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39C1tgf087518; Tue, 9 Apr 2013 12:01:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304091201.r39C1tgf087518@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 9 Apr 2013 12:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249304 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 12:01:55 -0000 Author: kib Date: Tue Apr 9 12:01:54 2013 New Revision: 249304 URL: http://svnweb.freebsd.org/changeset/base/249304 Log: Fix build for AIM 64bit. Modified: head/sys/powerpc/include/counter.h Modified: head/sys/powerpc/include/counter.h ============================================================================== --- head/sys/powerpc/include/counter.h Tue Apr 9 10:04:10 2013 (r249303) +++ head/sys/powerpc/include/counter.h Tue Apr 9 12:01:54 2013 (r249304) @@ -41,6 +41,8 @@ #define counter_u64_add_protected(c, i) counter_u64_add(c, i) +extern struct pcpu __pcpu[MAXCPU]; + static inline void counter_u64_add(counter_u64_t c, int64_t inc) { From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 12:20:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18855C90; Tue, 9 Apr 2013 12:20:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCA86E5; Tue, 9 Apr 2013 12:20:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39CKirT093180; Tue, 9 Apr 2013 12:20:44 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39CKimD093179; Tue, 9 Apr 2013 12:20:44 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304091220.r39CKimD093179@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 9 Apr 2013 12:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249305 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 12:20:45 -0000 Author: glebius Date: Tue Apr 9 12:20:44 2013 New Revision: 249305 URL: http://svnweb.freebsd.org/changeset/base/249305 Log: Fix KASSERTs: maximum number of items per slab is 256. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Apr 9 12:01:54 2013 (r249304) +++ head/sys/vm/uma_core.c Tue Apr 9 12:20:44 2013 (r249305) @@ -1171,7 +1171,7 @@ keg_small_init(uma_keg_t keg) } keg->uk_ipers = (keg->uk_slabsize - shsize) / rsize; - KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 255, + KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 256, ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); memused = keg->uk_ipers * rsize + shsize; @@ -1191,7 +1191,7 @@ keg_small_init(uma_keg_t keg) if ((wastedspace >= keg->uk_slabsize / UMA_MAX_WASTE) && (keg->uk_ipers < (keg->uk_slabsize / keg->uk_rsize))) { keg->uk_ipers = keg->uk_slabsize / keg->uk_rsize; - KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 255, + KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 256, ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); #ifdef UMA_DEBUG printf("UMA decided we need offpage slab headers for " @@ -1726,7 +1726,7 @@ uma_startup(void *bootmem, int boot_page objsize--; uma_max_ipers_ref = MAX(UMA_SLAB_SIZE / objsize, 64); - KASSERT((uma_max_ipers_ref <= 255) && (uma_max_ipers <= 255), + KASSERT((uma_max_ipers_ref <= 256) && (uma_max_ipers <= 256), ("uma_startup: calculated uma_max_ipers values too large!")); #ifdef UMA_DEBUG From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 13:14:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AED34A22; Tue, 9 Apr 2013 13:14:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A014F99B; Tue, 9 Apr 2013 13:14:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39DEfHi008645; Tue, 9 Apr 2013 13:14:41 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39DEdPK008637; Tue, 9 Apr 2013 13:14:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304091314.r39DEdPK008637@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 9 Apr 2013 13:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249307 - head/contrib/ldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 13:14:41 -0000 Author: des Date: Tue Apr 9 13:14:39 2013 New Revision: 249307 URL: http://svnweb.freebsd.org/changeset/base/249307 Log: Revert local changes and pull in r3828 from upstream. Modified: head/contrib/ldns/README head/contrib/ldns/README.svn head/contrib/ldns/dnssec_verify.c head/contrib/ldns/dnssec_zone.c head/contrib/ldns/parse.c head/contrib/ldns/rr.c head/contrib/ldns/util.c head/contrib/ldns/zone.c Directory Properties: head/contrib/ldns/ (props changed) Modified: head/contrib/ldns/README ============================================================================== --- head/contrib/ldns/README Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/README Tue Apr 9 13:14:39 2013 (r249307) @@ -22,6 +22,8 @@ compile on other systems like Solaris an REQUIREMENTS - OpenSSL (Optional, but needed for features like DNSSEC) + - OpenSSL >= 0.9.7f for DANE support + - OpenSSL >= 1.0.0 for ECDSA and GOST support - libpcap (Optional, but needed for examples/ldns-dpa) - (GNU) libtool (in OSX, that's glibtool, not libtool) - GNU make @@ -29,32 +31,10 @@ REQUIREMENTS INSTALLATION 1. Unpack the tarball 2. cd ldns- -3. ./configure -4. gmake (it needs gnu make to compile, on systems where GNU make is the - default you can just use 'make') -5. sudo gmake install -6. Optional. (cd examples; ./configure; gmake), make example programs included. -7. Optional. (cd drill; ./configure; gmake; gmake install), to build drill. - -You can configure and compile it in a separate build directory. - -* Examples -There are some examples and dns related tools in the examples/ directory. -These can be built with: -1. cd examples/ -2. ./configure [--with-ldns=] -3. gmake - -* Drill -Drill can be built with: -1. cd drill/ -2. ./configure [--with-ldns=] -3. gmake - -Note that you need to set LD_LIBRARY_PATH if you want to run the binaries -and you have not installed the library to a system directory. You can use -the make target all-static for the examples to run them if you don't want to -install the library. +3. ./configure --with-examples --with-drill + (optionally compile python bindings too with: --with-pyldns) +4. make +5. make install * Building from subversion repository @@ -84,6 +64,10 @@ We have received patches from the follow o Paul Wouters o Simon Vallet o OndÅ™ej Surý + o Karel Slany + o Havard Eidnes + o Leo Baltus + o Dag-Erling Smørgrav INFORMATION FOR SPECIFIC OPERATING SYSTEMS Modified: head/contrib/ldns/README.svn ============================================================================== --- head/contrib/ldns/README.svn Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/README.svn Tue Apr 9 13:14:39 2013 (r249307) @@ -10,17 +10,14 @@ # the correct versions may need to be set. On those # systems, the 'autoreconf' line should be changed to: # AUTOMAKE=automake-1.10 ACLOCAL=aclocal-1.10 autoreconf -# (and these systems probably need gmake instead of make) # older versions of libtoolize do not support --install # so you might need to remove that (with newer versions # it is needed) libtoolize -c --install autoreconf --install -./configure +./configure --with-examples --with-drill # --with-pyldns make make doc # needs doxygen for the html pages -(cd examples && autoreconf && ./configure && make) -(cd drill && autoreconf && ./configure && make) (cd pcat && autoreconf && ./configure && make) (cd examples/nsd-test && autoreconf && ./configure && make) Modified: head/contrib/ldns/dnssec_verify.c ============================================================================== --- head/contrib/ldns/dnssec_verify.c Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/dnssec_verify.c Tue Apr 9 13:14:39 2013 (r249307) @@ -628,20 +628,6 @@ ldns_dnssec_trust_tree_print_sm_fmt(FILE } } -#if 0 -static void -ldns_dnssec_trust_tree_print_sm(FILE *out, - ldns_dnssec_trust_tree *tree, - size_t tabs, - bool extended, - uint8_t *sibmap, - size_t treedepth) -{ - ldns_dnssec_trust_tree_print_sm_fmt(out, ldns_output_format_default, - tree, tabs, extended, sibmap, treedepth); -} -#endif - void ldns_dnssec_trust_tree_print_fmt(FILE *out, const ldns_output_format *fmt, ldns_dnssec_trust_tree *tree, Modified: head/contrib/ldns/dnssec_zone.c ============================================================================== --- head/contrib/ldns/dnssec_zone.c Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/dnssec_zone.c Tue Apr 9 13:14:39 2013 (r249307) @@ -298,17 +298,6 @@ ldns_dnssec_rrsets_print_soa_fmt(FILE *o } } -#if 0 -static void -ldns_dnssec_rrsets_print_soa(FILE *out, - ldns_dnssec_rrsets *rrsets, - bool follow, - bool show_soa) -{ - ldns_dnssec_rrsets_print_soa_fmt(out, ldns_output_format_default, - rrsets, follow, show_soa); -} -#endif void ldns_dnssec_rrsets_print_fmt(FILE *out, const ldns_output_format *fmt, @@ -429,16 +418,6 @@ ldns_dnssec_name_set_name(ldns_dnssec_na } } -#if 0 -static ldns_rr * -ldns_dnssec_name_nsec(ldns_dnssec_name *rrset) -{ - if (rrset) { - return rrset->nsec; - } - return NULL; -} -#endif void ldns_dnssec_name_set_nsec(ldns_dnssec_name *rrset, ldns_rr *nsec) @@ -592,14 +571,6 @@ ldns_dnssec_name_print_soa_fmt(FILE *out } } -#if 0 -static void -ldns_dnssec_name_print_soa(FILE *out, ldns_dnssec_name *name, bool show_soa) -{ - ldns_dnssec_name_print_soa_fmt(out, ldns_output_format_default, - name, show_soa); -} -#endif void ldns_dnssec_name_print_fmt(FILE *out, const ldns_output_format *fmt, @@ -827,7 +798,7 @@ ldns_dnssec_zone_deep_free(ldns_dnssec_z } /* use for dname comparison in tree */ -static int +int ldns_dname_compare_v(const void *a, const void *b) { return ldns_dname_compare((ldns_rdf *)a, (ldns_rdf *)b); } Modified: head/contrib/ldns/parse.c ============================================================================== --- head/contrib/ldns/parse.c Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/parse.c Tue Apr 9 13:14:39 2013 (r249307) @@ -340,20 +340,6 @@ tokenread: return (ssize_t)i; } -#if 0 -static void -ldns_bskipc(ldns_buffer *buffer, char c) -{ - while (c == (char) ldns_buffer_read_u8_at(buffer, ldns_buffer_position(buffer))) { - if (ldns_buffer_available_at(buffer, - buffer->_position + sizeof(char), sizeof(char))) { - buffer->_position += sizeof(char); - } else { - return; - } - } -} -#endif void ldns_bskipcs(ldns_buffer *buffer, const char *s) @@ -378,13 +364,6 @@ ldns_bskipcs(ldns_buffer *buffer, const } } -#if 0 -static void -ldns_fskipc(ATTR_UNUSED(FILE *fp), ATTR_UNUSED(char c)) -{ -} -#endif - void ldns_fskipcs(FILE *fp, const char *s) { Modified: head/contrib/ldns/rr.c ============================================================================== --- head/contrib/ldns/rr.c Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/rr.c Tue Apr 9 13:14:39 2013 (r249307) @@ -1394,25 +1394,6 @@ ldns_rr_list_clone(const ldns_rr_list *r return new_list; } -#if 0 -static int -qsort_rr_compare(const void *a, const void *b) -{ - const ldns_rr *rr1 = * (const ldns_rr **) a; - const ldns_rr *rr2 = * (const ldns_rr **) b; - - if (rr1 == NULL && rr2 == NULL) { - return 0; - } - if (rr1 == NULL) { - return -1; - } - if (rr2 == NULL) { - return 1; - } - return ldns_rr_compare(rr1, rr2); -} -#endif static int qsort_schwartz_rr_compare(const void *a, const void *b) Modified: head/contrib/ldns/util.c ============================================================================== --- head/contrib/ldns/util.c Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/util.c Tue Apr 9 13:14:39 2013 (r249307) @@ -25,46 +25,6 @@ #include #endif -#if 0 -/* put this here tmp. for debugging */ -static void -xprintf_rdf(ldns_rdf *rd) -{ - /* assume printable string */ - fprintf(stderr, "size\t:%u\n", (unsigned int)ldns_rdf_size(rd)); - fprintf(stderr, "type\t:%u\n", (unsigned int)ldns_rdf_get_type(rd)); - fprintf(stderr, "data\t:[%.*s]\n", (int)ldns_rdf_size(rd), - (char*)ldns_rdf_data(rd)); -} - -static void -xprintf_rr(ldns_rr *rr) -{ - /* assume printable string */ - uint16_t count, i; - - count = ldns_rr_rd_count(rr); - - for(i = 0; i < count; i++) { - fprintf(stderr, "print rd %u\n", (unsigned int) i); - xprintf_rdf(rr->_rdata_fields[i]); - } -} - -static void -xprintf_hex(uint8_t *data, size_t len) -{ - size_t i; - for (i = 0; i < len; i++) { - if (i > 0 && i % 20 == 0) { - printf("\t; %u - %u\n", (unsigned int) i - 19, (unsigned int) i); - } - printf("%02x ", (unsigned int) data[i]); - } - printf("\n"); -} -#endif - ldns_lookup_table * ldns_lookup_by_name(ldns_lookup_table *table, const char *name) { Modified: head/contrib/ldns/zone.c ============================================================================== --- head/contrib/ldns/zone.c Tue Apr 9 13:08:33 2013 (r249306) +++ head/contrib/ldns/zone.c Tue Apr 9 13:14:39 2013 (r249307) @@ -56,105 +56,6 @@ ldns_zone_push_rr(ldns_zone *z, ldns_rr return ldns_rr_list_push_rr( ldns_zone_rrs(z), rr); } -#if 0 -/* return a clone of the given rr list, without the glue records - * rr list should be the complete zone - * if present, stripped records are added to the list *glue_records - */ -static ldns_rr_list * -ldns_zone_strip_glue_rrs(const ldns_rdf *zone_name, const ldns_rr_list *rrs, ldns_rr_list *glue_rrs) -{ - ldns_rr_list *new_list; - - /* when do we find glue? It means we find an IP address - * (AAAA/A) for a nameserver listed in the zone - * - * Alg used here: - * first find all the zonecuts (NS records) - * find all the AAAA or A records (can be done it the - * above loop). - * - * Check if the aaaa/a list are subdomains under the - * NS domains. - * If yes -> glue, if no -> not glue - */ - - ldns_rr_list *zone_cuts; - ldns_rr_list *addr; - ldns_rr *r, *ns, *a; - ldns_rdf *dname_a, *ns_owner; - uint16_t i,j; - - new_list = NULL; - zone_cuts = NULL; - addr = NULL; - - new_list = ldns_rr_list_new(); - if (!new_list) goto memory_error; - zone_cuts = ldns_rr_list_new(); - if (!zone_cuts) goto memory_error; - addr = ldns_rr_list_new(); - if (!addr) goto memory_error; - - for(i = 0; i < ldns_rr_list_rr_count(rrs); i++) { - r = ldns_rr_list_rr(rrs, i); - if (ldns_rr_get_type(r) == LDNS_RR_TYPE_A || - ldns_rr_get_type(r) == LDNS_RR_TYPE_AAAA) { - /* possibly glue */ - if (!ldns_rr_list_push_rr(addr, r)) goto memory_error; - continue; - } - if (ldns_rr_get_type(r) == LDNS_RR_TYPE_NS) { - /* multiple zones will end up here - - * for now; not a problem - */ - /* don't add NS records for the current zone itself */ - if (ldns_rdf_compare(ldns_rr_owner(r), - zone_name) != 0) { - if (!ldns_rr_list_push_rr(zone_cuts, r)) goto memory_error; - } - continue; - } - } - - /* will sorting make it quicker ?? */ - for(i = 0; i < ldns_rr_list_rr_count(zone_cuts); i++) { - ns = ldns_rr_list_rr(zone_cuts, i); - ns_owner = ldns_rr_owner(ns); - for(j = 0; j < ldns_rr_list_rr_count(addr); j++) { - a = ldns_rr_list_rr(addr, j); - dname_a = ldns_rr_owner(a); - - if (ldns_dname_is_subdomain(dname_a, ns_owner)) { - /* GLUE! */ - if (glue_rrs) { - if (!ldns_rr_list_push_rr(glue_rrs, a)) goto memory_error; - } - break; - } else { - if (!ldns_rr_list_push_rr(new_list, a)) goto memory_error; - } - } - } - - ldns_rr_list_free(addr); - ldns_rr_list_free(zone_cuts); - - return new_list; - -memory_error: - if (new_list) { - ldns_rr_list_free(new_list); - } - if (zone_cuts) { - ldns_rr_list_free(zone_cuts); - } - if (addr) { - ldns_rr_list_free(addr); - } - return NULL; -} -#endif /* * Get the list of glue records in a zone @@ -401,22 +302,6 @@ ldns_zone_sort(ldns_zone *zone) ldns_rr_list_sort(zrr); } -#if 0 -/** - * ixfr function. Work on a ldns_zone and remove and add - * the rrs from the rrlist - * \param[in] z the zone to work on - * \param[in] del rr_list to remove from the zone - * \param[in] add rr_list to add to the zone - * \return Tja, wat zouden we eens returnen TODO - */ -void -ldns_zone_ixfr_del_add(ldns_zone *z, ldns_rr_list *del, ldns_rr_list *add) -{ - -} -#endif - void ldns_zone_free(ldns_zone *zone) { From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 13:16:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7D0BDBBA; Tue, 9 Apr 2013 13:16:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6FF629B0; Tue, 9 Apr 2013 13:16:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39DGCFc008922; Tue, 9 Apr 2013 13:16:12 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39DGCk9008920; Tue, 9 Apr 2013 13:16:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304091316.r39DGCk9008920@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 9 Apr 2013 13:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249308 - in head/contrib/ldns: . ldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 13:16:12 -0000 Author: des Date: Tue Apr 9 13:16:11 2013 New Revision: 249308 URL: http://svnweb.freebsd.org/changeset/base/249308 Log: Last remaining prototype issue that still hasn't been fixed upstream. Modified: head/contrib/ldns/dnssec_sign.c head/contrib/ldns/ldns/dname.h Modified: head/contrib/ldns/dnssec_sign.c ============================================================================== --- head/contrib/ldns/dnssec_sign.c Tue Apr 9 13:14:39 2013 (r249307) +++ head/contrib/ldns/dnssec_sign.c Tue Apr 9 13:16:11 2013 (r249308) @@ -771,9 +771,6 @@ ldns_dnssec_zone_create_nsecs(ldns_dnsse } #ifdef HAVE_SSL -/* in dnssec_zone.c */ -extern int ldns_dname_compare_v(const void *a, const void *b); - static ldns_status ldns_dnssec_zone_create_nsec3s_mkmap(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, Modified: head/contrib/ldns/ldns/dname.h ============================================================================== --- head/contrib/ldns/ldns/dname.h Tue Apr 9 13:14:39 2013 (r249307) +++ head/contrib/ldns/ldns/dname.h Tue Apr 9 13:16:11 2013 (r249308) @@ -150,6 +150,7 @@ bool ldns_dname_is_subdomain(const ldns_ * \return -1 if dname1 comes before dname2, 1 if dname1 comes after dname2, and 0 if they are equal. */ int ldns_dname_compare(const ldns_rdf *dname1, const ldns_rdf *dname2); +int ldns_dname_compare_v(const void *, const void *); /** * Checks whether the dname matches the given wildcard From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 15:15:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9D6869C5; Tue, 9 Apr 2013 15:15:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86480127; Tue, 9 Apr 2013 15:15:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39FFr64043946; Tue, 9 Apr 2013 15:15:53 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39FFq0V043945; Tue, 9 Apr 2013 15:15:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304091515.r39FFq0V043945@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 9 Apr 2013 15:15:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249309 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 15:15:53 -0000 Author: glebius Date: Tue Apr 9 15:15:52 2013 New Revision: 249309 URL: http://svnweb.freebsd.org/changeset/base/249309 Log: Since now we support 256 items per slab, we need more bits for us_freecount. This grows uma_slab_head on 32-bit arches, but growth isn't significant. Taking kmem zones as example, only the 32 byte zone is affected, ipers is reduced from 113 to 112. In collaboration with: kib Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Apr 9 13:16:11 2013 (r249308) +++ head/sys/vm/uma_int.h Tue Apr 9 15:15:52 2013 (r249309) @@ -246,7 +246,7 @@ struct uma_slab_head { SLIST_ENTRY(uma_slab) us_hlink; /* Link for hash table */ u_int8_t *us_data; /* First item */ u_int8_t us_flags; /* Page flags see uma.h */ - u_int8_t us_freecount; /* How many are free? */ + u_int16_t us_freecount; /* How many are free? */ u_int8_t us_firstfree; /* First free item index */ }; From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 15:32:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DD288DB5; Tue, 9 Apr 2013 15:32:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 5566B1FE; Tue, 9 Apr 2013 15:32:27 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r39FWMbW003450; Tue, 9 Apr 2013 18:32:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.2 kib.kiev.ua r39FWMbW003450 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r39FWMrv003449; Tue, 9 Apr 2013 18:32:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 9 Apr 2013 18:32:22 +0300 From: Konstantin Belousov To: Attilio Rao Subject: Re: svn commit: r249277 - head/sys/kern Message-ID: <20130409153222.GF2930@kib.kiev.ua> References: <201304081958.r38JwWf0001257@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p8PhoBjPxaQXD0vg" Content-Disposition: inline In-Reply-To: <201304081958.r38JwWf0001257@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 15:32:27 -0000 --p8PhoBjPxaQXD0vg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 08, 2013 at 07:58:32PM +0000, Attilio Rao wrote: > Author: attilio > Date: Mon Apr 8 19:58:32 2013 > New Revision: 249277 > URL: http://svnweb.freebsd.org/changeset/base/249277 >=20 > Log: > Switch some "low-hanging fruit" to acquire read lock on vmobjects > rather than write locks. Could you, please, change the assertion types for object page accessors, like vm_page_lookup(), as the first step ? For the out-of-tree code, which is going to be committed later, this would make life easier. --p8PhoBjPxaQXD0vg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRZDSFAAoJEJDCuSvBvK1BDG0QAIbneoaJ/2kGEvu1uB72DRZw BP9bpHTCbea1TTmWxLiSCs4mLy2pzLX6USgsUxb+unw2TZMdjxPktwodkwXKyx7J wBktHCB1A5vYnSbxYo9koQlZG2NmQhf6OEAkI/BcqtB0ODVIFCUsz0zF+GooEa1t 5oHnNpB/D+Jyni4qvvaJATPbrt3jE7uAqz3gYYoCbZHv1jDeanGTP+YL3+fGulNn gk3OCAxLzQUcB8wCVPDfATKbl6X4OYiHCmh2cGMAlngthHapQOe7jU36W2ki2YWO pUVALW1KLvZ+BCQoFOOFtibjqFPyUI7jMbtxjVSx3aF9zzwHY0n4aXYmBUeXMw6Y 3wBLbDbAqZJDtdDn7VEPPKS+YzINL5C+DoUXTBJXqnztxZFk/XrqKHX3hu0kD9mV DHIkyhU8BBqN4PdIEdeR+qmlulorxXiSiFCegSXP3IRUJ0ke1voGyJexK5vwhtdK NlaT1CQXmNSwZzA2ShjdGGHaOTpfImJRJNApYeB4a3ITn+RwgAHhWx9Wlxi+x/Z6 17O26ilptbwypZ5Z55w6in4cJAyZv8un/IHaHLp6wXFwP8hGaNIF1Uu9ZCeon6hY zzfShHqK8Tjc/xNKbV0fWHHqE2ubhk53X+hw+ak7SiBNXEZnLrLcpgsClsMQEXCz dIqpjTMYq1AljLoJvdFh =LbAt -----END PGP SIGNATURE----- --p8PhoBjPxaQXD0vg-- From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 15:34:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AD876F38; Tue, 9 Apr 2013 15:34:38 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 728CE210; Tue, 9 Apr 2013 15:34:38 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id c11so8794291ieb.29 for ; Tue, 09 Apr 2013 08:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=NHs/qtxUox7w0mY0EX7/jCz0VEwG01dk6Anha2lQJEI=; b=MbcRmvqvv972yQT7Kn34TWWgUr3bAyQDMcus4rmWiEbh+oxrMIL/sajJT6hLnPZ9gl mg6nnUhkNhFFCREfxaoFF18atnDZZTAJ1Bd6sWdt54xp8QF9o6R0THtUTPKKTyQXmhFf vTcsTHDk5bihXsOt6dtKk8tf3e5wa+peaNj74iM74piQG+J/bcCgjA0WmDDcHfUSlZG7 GbaK32iN+qXSC6uZbpG3Y58WM1U9IWFudHuOcVhx1NNLdZrcKfOeHp6YD9a8n3h8ypWh q0Nqrci5uQo/FE2W6OtKFuGj5HCWHwSsK0x1fzZcNYm4sckjyJmQH2EzJbv5RyF45ean z8Vg== MIME-Version: 1.0 X-Received: by 10.43.103.195 with SMTP id dj3mr15081454icc.3.1365521678053; Tue, 09 Apr 2013 08:34:38 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.42.117.134 with HTTP; Tue, 9 Apr 2013 08:34:37 -0700 (PDT) In-Reply-To: <20130409153222.GF2930@kib.kiev.ua> References: <201304081958.r38JwWf0001257@svn.freebsd.org> <20130409153222.GF2930@kib.kiev.ua> Date: Tue, 9 Apr 2013 17:34:37 +0200 X-Google-Sender-Auth: Vu7EqSpIAHwjZQfIUL79pvWEE8M Message-ID: Subject: Re: svn commit: r249277 - head/sys/kern From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 15:34:38 -0000 On Tue, Apr 9, 2013 at 5:32 PM, Konstantin Belousov wrote: > On Mon, Apr 08, 2013 at 07:58:32PM +0000, Attilio Rao wrote: >> Author: attilio >> Date: Mon Apr 8 19:58:32 2013 >> New Revision: 249277 >> URL: http://svnweb.freebsd.org/changeset/base/249277 >> >> Log: >> Switch some "low-hanging fruit" to acquire read lock on vmobjects >> rather than write locks. > > Could you, please, change the assertion types for object page accessors, > like vm_page_lookup(), as the first step ? This is going to happen pretty soon. Alan and I have some code that depends on such assertions changing and we want to do it in structured way. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 16:16:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EE2B1AB4; Tue, 9 Apr 2013 16:16:35 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D10E165E; Tue, 9 Apr 2013 16:16:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39GGZYS061680; Tue, 9 Apr 2013 16:16:35 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39GGZeG061677; Tue, 9 Apr 2013 16:16:35 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201304091616.r39GGZeG061677@svn.freebsd.org> From: Ed Schouten Date: Tue, 9 Apr 2013 16:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249311 - in head: include/protocols sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 16:16:36 -0000 Author: ed Date: Tue Apr 9 16:16:34 2013 New Revision: 249311 URL: http://svnweb.freebsd.org/changeset/base/249311 Log: Add static/const keywords to the arrays. This theoretically allows a compiler to optimize (parts of) the array away if unused. While there, make the array size implicit and use a _Static_assert() to ensure that the definition matches up with the number of elements in the list. Modified: head/include/protocols/timed.h head/sys/sys/syslog.h head/sys/sys/ttydefaults.h Modified: head/include/protocols/timed.h ============================================================================== --- head/include/protocols/timed.h Tue Apr 9 15:35:26 2013 (r249310) +++ head/include/protocols/timed.h Tue Apr 9 16:16:34 2013 (r249311) @@ -90,11 +90,13 @@ struct tsp { #define TSPTYPENUMBER 25 #ifdef TSPTYPES -const char *tsptype[TSPTYPENUMBER] = +static char const * const tsptype[] = { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP", "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT", "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ", "TEST", "SETDATE", "SETDATEREQ", "LOOP" }; +_Static_assert(sizeof(tsptype) / sizeof(const char *) == TSPTYPENUMBER, + "Size of tsptype does not match TSPTYPENUMBER"); #endif #endif /* !_TIMED_H_ */ Modified: head/sys/sys/syslog.h ============================================================================== --- head/sys/sys/syslog.h Tue Apr 9 15:35:26 2013 (r249310) +++ head/sys/sys/syslog.h Tue Apr 9 16:16:34 2013 (r249311) @@ -69,7 +69,7 @@ typedef struct _code { int c_val; } CODE; -CODE prioritynames[] = { +static const CODE prioritynames[] = { { "alert", LOG_ALERT, }, { "crit", LOG_CRIT, }, { "debug", LOG_DEBUG, }, @@ -122,7 +122,7 @@ CODE prioritynames[] = { #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) #ifdef SYSLOG_NAMES -CODE facilitynames[] = { +static const CODE facilitynames[] = { { "auth", LOG_AUTH, }, { "authpriv", LOG_AUTHPRIV, }, { "console", LOG_CONSOLE, }, Modified: head/sys/sys/ttydefaults.h ============================================================================== --- head/sys/sys/ttydefaults.h Tue Apr 9 15:35:26 2013 (r249310) +++ head/sys/sys/ttydefaults.h Tue Apr 9 16:16:34 2013 (r249311) @@ -95,10 +95,17 @@ * #define TTYDEFCHARS to include an array of default control characters. */ #ifdef TTYDEFCHARS -static cc_t ttydefchars[NCCS] = { - CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT, - CERASE2, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT, - CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE + +#include +#include + +static const cc_t ttydefchars[] = { + CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT, CERASE2, CINTR, + CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT, CDISCARD, CMIN, CTIME, + CSTATUS, _POSIX_VDISABLE }; +_Static_assert(sizeof(ttydefchars) / sizeof(cc_t) == NCCS, + "Size of ttydefchars does not match NCCS"); + #undef TTYDEFCHARS -#endif +#endif /* TTYDEFCHARS */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 17:25:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4ABDE6A; Tue, 9 Apr 2013 17:25:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3D7FDB16; Tue, 9 Apr 2013 17:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39HPFPF082002; Tue, 9 Apr 2013 17:25:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39HPF6t082001; Tue, 9 Apr 2013 17:25:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304091725.r39HPF6t082001@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 9 Apr 2013 17:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249312 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 17:25:16 -0000 Author: glebius Date: Tue Apr 9 17:25:15 2013 New Revision: 249312 URL: http://svnweb.freebsd.org/changeset/base/249312 Log: Swap us_freecount and us_flags, achieving same structure size as before previous commit. Submitted by: alc Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Apr 9 16:16:34 2013 (r249311) +++ head/sys/vm/uma_int.h Tue Apr 9 17:25:15 2013 (r249312) @@ -245,9 +245,9 @@ struct uma_slab_head { } us_type; SLIST_ENTRY(uma_slab) us_hlink; /* Link for hash table */ u_int8_t *us_data; /* First item */ + u_int16_t us_freecount; /* How many are free? */ u_int8_t us_flags; /* Page flags see uma.h */ - u_int16_t us_freecount; /* How many are free? */ - u_int8_t us_firstfree; /* First free item index */ + u_int8_t us_firstfree; /* First free item index */ }; /* The standard slab structure */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 17:43:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C3D2E8C6; Tue, 9 Apr 2013 17:43:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A62B2D53; Tue, 9 Apr 2013 17:43:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39Hhnud087766; Tue, 9 Apr 2013 17:43:49 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39HhnpO087762; Tue, 9 Apr 2013 17:43:49 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304091743.r39HhnpO087762@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 9 Apr 2013 17:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249313 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 17:43:49 -0000 Author: glebius Date: Tue Apr 9 17:43:48 2013 New Revision: 249313 URL: http://svnweb.freebsd.org/changeset/base/249313 Log: Convert UMA code to C99 uintXX_t types. Modified: head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_dbg.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Tue Apr 9 17:25:15 2013 (r249312) +++ head/sys/vm/uma.h Tue Apr 9 17:43:48 2013 (r249313) @@ -167,7 +167,7 @@ typedef void (*uma_fini)(void *mem, int */ uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor, uma_init uminit, uma_fini fini, - int align, u_int32_t flags); + int align, uint32_t flags); /* * Create a secondary uma zone @@ -359,7 +359,7 @@ uma_zfree(uma_zone_t zone, void *item) * A pointer to the allocated memory or NULL on failure. */ -typedef void *(*uma_alloc)(uma_zone_t zone, int size, u_int8_t *pflag, int wait); +typedef void *(*uma_alloc)(uma_zone_t zone, int size, uint8_t *pflag, int wait); /* * Backend page free routines @@ -372,7 +372,7 @@ typedef void *(*uma_alloc)(uma_zone_t zo * Returns: * None */ -typedef void (*uma_free)(void *item, int size, u_int8_t pflag); +typedef void (*uma_free)(void *item, int size, uint8_t pflag); @@ -590,9 +590,9 @@ void uma_prealloc(uma_zone_t zone, int i * item The address of the item for which we want a refcnt. * * Returns: - * A pointer to a u_int32_t reference counter. + * A pointer to a uint32_t reference counter. */ -u_int32_t *uma_find_refcnt(uma_zone_t zone, void *item); +uint32_t *uma_find_refcnt(uma_zone_t zone, void *item); /* * Used to determine if a fixed-size zone is exhausted. @@ -613,10 +613,10 @@ int uma_zone_exhausted_nolock(uma_zone_t */ #define UMA_STREAM_VERSION 0x00000001 struct uma_stream_header { - u_int32_t ush_version; /* Stream format version. */ - u_int32_t ush_maxcpus; /* Value of MAXCPU for stream. */ - u_int32_t ush_count; /* Number of records. */ - u_int32_t _ush_pad; /* Pad/reserved field. */ + uint32_t ush_version; /* Stream format version. */ + uint32_t ush_maxcpus; /* Value of MAXCPU for stream. */ + uint32_t ush_count; /* Number of records. */ + uint32_t _ush_pad; /* Pad/reserved field. */ }; #define UTH_MAX_NAME 32 @@ -626,32 +626,32 @@ struct uma_type_header { * Static per-zone data, some extracted from the supporting keg. */ char uth_name[UTH_MAX_NAME]; - u_int32_t uth_align; /* Keg: alignment. */ - u_int32_t uth_size; /* Keg: requested size of item. */ - u_int32_t uth_rsize; /* Keg: real size of item. */ - u_int32_t uth_maxpages; /* Keg: maximum number of pages. */ - u_int32_t uth_limit; /* Keg: max items to allocate. */ + uint32_t uth_align; /* Keg: alignment. */ + uint32_t uth_size; /* Keg: requested size of item. */ + uint32_t uth_rsize; /* Keg: real size of item. */ + uint32_t uth_maxpages; /* Keg: maximum number of pages. */ + uint32_t uth_limit; /* Keg: max items to allocate. */ /* * Current dynamic zone/keg-derived statistics. */ - u_int32_t uth_pages; /* Keg: pages allocated. */ - u_int32_t uth_keg_free; /* Keg: items free. */ - u_int32_t uth_zone_free; /* Zone: items free. */ - u_int32_t uth_bucketsize; /* Zone: desired bucket size. */ - u_int32_t uth_zone_flags; /* Zone: flags. */ - u_int64_t uth_allocs; /* Zone: number of allocations. */ - u_int64_t uth_frees; /* Zone: number of frees. */ - u_int64_t uth_fails; /* Zone: number of alloc failures. */ - u_int64_t uth_sleeps; /* Zone: number of alloc sleeps. */ - u_int64_t _uth_reserved1[2]; /* Reserved. */ + uint32_t uth_pages; /* Keg: pages allocated. */ + uint32_t uth_keg_free; /* Keg: items free. */ + uint32_t uth_zone_free; /* Zone: items free. */ + uint32_t uth_bucketsize; /* Zone: desired bucket size. */ + uint32_t uth_zone_flags; /* Zone: flags. */ + uint64_t uth_allocs; /* Zone: number of allocations. */ + uint64_t uth_frees; /* Zone: number of frees. */ + uint64_t uth_fails; /* Zone: number of alloc failures. */ + uint64_t uth_sleeps; /* Zone: number of alloc sleeps. */ + uint64_t _uth_reserved1[2]; /* Reserved. */ }; struct uma_percpu_stat { - u_int64_t ups_allocs; /* Cache: number of allocations. */ - u_int64_t ups_frees; /* Cache: number of frees. */ - u_int64_t ups_cache_free; /* Cache: free items in cache. */ - u_int64_t _ups_reserved[5]; /* Reserved. */ + uint64_t ups_allocs; /* Cache: number of allocations. */ + uint64_t ups_frees; /* Cache: number of frees. */ + uint64_t ups_cache_free; /* Cache: free items in cache. */ + uint64_t _ups_reserved[5]; /* Reserved. */ }; #endif Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Apr 9 17:25:15 2013 (r249312) +++ head/sys/vm/uma_core.c Tue Apr 9 17:43:48 2013 (r249313) @@ -168,7 +168,7 @@ struct uma_zctor_args { uma_fini fini; uma_keg_t keg; int align; - u_int32_t flags; + uint32_t flags; }; struct uma_kctor_args { @@ -177,7 +177,7 @@ struct uma_kctor_args { uma_init uminit; uma_fini fini; int align; - u_int32_t flags; + uint32_t flags; }; struct uma_bucket_zone { @@ -215,10 +215,10 @@ enum zfreeskip { SKIP_NONE, SKIP_DTOR, S /* Prototypes.. */ -static void *noobj_alloc(uma_zone_t, int, u_int8_t *, int); -static void *page_alloc(uma_zone_t, int, u_int8_t *, int); -static void *startup_alloc(uma_zone_t, int, u_int8_t *, int); -static void page_free(void *, int, u_int8_t); +static void *noobj_alloc(uma_zone_t, int, uint8_t *, int); +static void *page_alloc(uma_zone_t, int, uint8_t *, int); +static void *startup_alloc(uma_zone_t, int, uint8_t *, int); +static void page_free(void *, int, uint8_t); static uma_slab_t keg_alloc_slab(uma_keg_t, uma_zone_t, int); static void cache_drain(uma_zone_t); static void bucket_drain(uma_zone_t, uma_bucket_t); @@ -250,7 +250,7 @@ static uma_slab_t zone_fetch_slab(uma_zo static uma_slab_t zone_fetch_slab_multi(uma_zone_t zone, uma_keg_t last, int flags); static void *slab_alloc_item(uma_zone_t zone, uma_slab_t slab); static uma_keg_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, - uma_fini fini, int align, u_int32_t flags); + uma_fini fini, int align, uint32_t flags); static inline void zone_relock(uma_zone_t zone, uma_keg_t keg); static inline void keg_relock(uma_keg_t keg, uma_zone_t zone); @@ -695,8 +695,8 @@ keg_drain(uma_keg_t keg) struct slabhead freeslabs = { 0 }; uma_slab_t slab; uma_slab_t n; - u_int8_t flags; - u_int8_t *mem; + uint8_t flags; + uint8_t *mem; int i; /* @@ -828,8 +828,8 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t uma_slabrefcnt_t slabref; uma_alloc allocf; uma_slab_t slab; - u_int8_t *mem; - u_int8_t flags; + uint8_t *mem; + uint8_t flags; int i; mtx_assert(&keg->uk_lock, MA_OWNED); @@ -950,7 +950,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t * the VM is ready. */ static void * -startup_alloc(uma_zone_t zone, int bytes, u_int8_t *pflag, int wait) +startup_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) { uma_keg_t keg; uma_slab_t tmps; @@ -1010,7 +1010,7 @@ startup_alloc(uma_zone_t zone, int bytes * NULL if M_NOWAIT is set. */ static void * -page_alloc(uma_zone_t zone, int bytes, u_int8_t *pflag, int wait) +page_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) { void *p; /* Returned page */ @@ -1032,7 +1032,7 @@ page_alloc(uma_zone_t zone, int bytes, u * NULL if M_NOWAIT is set. */ static void * -noobj_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +noobj_alloc(uma_zone_t zone, int bytes, uint8_t *flags, int wait) { TAILQ_HEAD(, vm_page) alloctail; u_long npages; @@ -1095,7 +1095,7 @@ noobj_alloc(uma_zone_t zone, int bytes, * Nothing */ static void -page_free(void *mem, int size, u_int8_t flags) +page_free(void *mem, int size, uint8_t flags) { vm_map_t map; @@ -1752,8 +1752,8 @@ uma_startup(void *bootmem, int boot_page printf("Filling boot free list.\n"); #endif for (i = 0; i < boot_pages; i++) { - slab = (uma_slab_t)((u_int8_t *)bootmem + (i * UMA_SLAB_SIZE)); - slab->us_data = (u_int8_t *)slab; + slab = (uma_slab_t)((uint8_t *)bootmem + (i * UMA_SLAB_SIZE)); + slab->us_data = (uint8_t *)slab; slab->us_flags = UMA_SLAB_BOOT; LIST_INSERT_HEAD(&uma_boot_pages, slab, us_link); } @@ -1852,7 +1852,7 @@ uma_startup3(void) static uma_keg_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, - int align, u_int32_t flags) + int align, uint32_t flags) { struct uma_kctor_args args; @@ -1877,7 +1877,7 @@ uma_set_align(int align) /* See uma.h */ uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor, - uma_init uminit, uma_fini fini, int align, u_int32_t flags) + uma_init uminit, uma_fini fini, int align, uint32_t flags) { struct uma_zctor_args args; @@ -2404,7 +2404,7 @@ slab_alloc_item(uma_zone_t zone, uma_sla uma_keg_t keg; uma_slabrefcnt_t slabref; void *item; - u_int8_t freei; + uint8_t freei; keg = slab->us_keg; mtx_assert(&keg->uk_lock, MA_OWNED); @@ -2808,8 +2808,8 @@ zone_free_item(uma_zone_t zone, void *it uma_slab_t slab; uma_slabrefcnt_t slabref; uma_keg_t keg; - u_int8_t *mem; - u_int8_t freei; + uint8_t *mem; + uint8_t freei; int clearfull; if (skip < SKIP_DTOR && zone->uz_dtor) @@ -2826,7 +2826,7 @@ zone_free_item(uma_zone_t zone, void *it zone->uz_frees++; if (!(zone->uz_flags & UMA_ZONE_VTOSLAB)) { - mem = (u_int8_t *)((unsigned long)item & (~UMA_SLAB_MASK)); + mem = (uint8_t *)((unsigned long)item & (~UMA_SLAB_MASK)); keg = zone_first_keg(zone); /* Must only be one. */ if (zone->uz_flags & UMA_ZONE_HASH) { slab = hash_sfind(&keg->uk_hash, mem); @@ -3102,12 +3102,12 @@ uma_prealloc(uma_zone_t zone, int items) } /* See uma.h */ -u_int32_t * +uint32_t * uma_find_refcnt(uma_zone_t zone, void *item) { uma_slabrefcnt_t slabref; uma_keg_t keg; - u_int32_t *refcnt; + uint32_t *refcnt; int idx; slabref = (uma_slabrefcnt_t)vtoslab((vm_offset_t)item & @@ -3163,7 +3163,7 @@ uma_large_malloc(int size, int wait) { void *mem; uma_slab_t slab; - u_int8_t flags; + uint8_t flags; slab = zone_alloc_item(slabzone, NULL, wait); if (slab == NULL) @@ -3267,11 +3267,11 @@ uma_print_zone(uma_zone_t zone) * directly so that we don't have to. */ static void -uma_zone_sumstat(uma_zone_t z, int *cachefreep, u_int64_t *allocsp, - u_int64_t *freesp, u_int64_t *sleepsp) +uma_zone_sumstat(uma_zone_t z, int *cachefreep, uint64_t *allocsp, + uint64_t *freesp, uint64_t *sleepsp) { uma_cache_t cache; - u_int64_t allocs, frees, sleeps; + uint64_t allocs, frees, sleeps; int cachefree, cpu; allocs = frees = sleeps = 0; @@ -3422,7 +3422,7 @@ skip: #ifdef DDB DB_SHOW_COMMAND(uma, db_show_uma) { - u_int64_t allocs, frees, sleeps; + uint64_t allocs, frees, sleeps; uma_bucket_t bucket; uma_keg_t kz; uma_zone_t z; Modified: head/sys/vm/uma_dbg.c ============================================================================== --- head/sys/vm/uma_dbg.c Tue Apr 9 17:25:15 2013 (r249312) +++ head/sys/vm/uma_dbg.c Tue Apr 9 17:43:48 2013 (r249313) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -static const u_int32_t uma_junk = 0xdeadc0de; +static const uint32_t uma_junk = 0xdeadc0de; /* * Checks an item to make sure it hasn't been overwritten since it was freed, @@ -62,7 +62,7 @@ int trash_ctor(void *mem, int size, void *arg, int flags) { int cnt; - u_int32_t *p; + uint32_t *p; cnt = size / sizeof(uma_junk); @@ -85,7 +85,7 @@ void trash_dtor(void *mem, int size, void *arg) { int cnt; - u_int32_t *p; + uint32_t *p; cnt = size / sizeof(uma_junk); @@ -122,7 +122,7 @@ int mtrash_ctor(void *mem, int size, void *arg, int flags) { struct malloc_type **ksp; - u_int32_t *p = mem; + uint32_t *p = mem; int cnt; size -= sizeof(struct malloc_type *); @@ -150,7 +150,7 @@ void mtrash_dtor(void *mem, int size, void *arg) { int cnt; - u_int32_t *p; + uint32_t *p; size -= sizeof(struct malloc_type *); cnt = size / sizeof(uma_junk); @@ -196,9 +196,9 @@ uma_dbg_getslab(uma_zone_t zone, void *i { uma_slab_t slab; uma_keg_t keg; - u_int8_t *mem; + uint8_t *mem; - mem = (u_int8_t *)((unsigned long)item & (~UMA_SLAB_MASK)); + mem = (uint8_t *)((unsigned long)item & (~UMA_SLAB_MASK)); if (zone->uz_flags & UMA_ZONE_VTOSLAB) { slab = vtoslab((vm_offset_t)mem); } else { Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Apr 9 17:25:15 2013 (r249312) +++ head/sys/vm/uma_int.h Tue Apr 9 17:43:48 2013 (r249313) @@ -184,8 +184,8 @@ typedef struct uma_bucket * uma_bucket_t struct uma_cache { uma_bucket_t uc_freebucket; /* Bucket we're freeing to */ uma_bucket_t uc_allocbucket; /* Bucket to allocate from */ - u_int64_t uc_allocs; /* Count of allocations */ - u_int64_t uc_frees; /* Count of frees */ + uint64_t uc_allocs; /* Count of allocations */ + uint64_t uc_frees; /* Count of frees */ } UMA_ALIGN; typedef struct uma_cache * uma_cache_t; @@ -205,13 +205,13 @@ struct uma_keg { LIST_HEAD(,uma_slab) uk_free_slab; /* empty slab list */ LIST_HEAD(,uma_slab) uk_full_slab; /* full slabs */ - u_int32_t uk_recurse; /* Allocation recursion count */ - u_int32_t uk_align; /* Alignment mask */ - u_int32_t uk_pages; /* Total page count */ - u_int32_t uk_free; /* Count of items free in slabs */ - u_int32_t uk_size; /* Requested size of each item */ - u_int32_t uk_rsize; /* Real size of each item */ - u_int32_t uk_maxpages; /* Maximum number of pages to alloc */ + uint32_t uk_recurse; /* Allocation recursion count */ + uint32_t uk_align; /* Alignment mask */ + uint32_t uk_pages; /* Total page count */ + uint32_t uk_free; /* Count of items free in slabs */ + uint32_t uk_size; /* Requested size of each item */ + uint32_t uk_rsize; /* Real size of each item */ + uint32_t uk_maxpages; /* Maximum number of pages to alloc */ uma_init uk_init; /* Keg's init routine */ uma_fini uk_fini; /* Keg's fini routine */ @@ -222,11 +222,11 @@ struct uma_keg { vm_offset_t uk_kva; /* Zone base KVA */ uma_zone_t uk_slabzone; /* Slab zone backing us, if OFFPAGE */ - u_int16_t uk_slabsize; /* Slab size for this keg */ - u_int16_t uk_pgoff; /* Offset to uma_slab struct */ - u_int16_t uk_ppera; /* pages per allocation from backend */ - u_int16_t uk_ipers; /* Items per slab */ - u_int32_t uk_flags; /* Internal flags */ + uint16_t uk_slabsize; /* Slab size for this keg */ + uint16_t uk_pgoff; /* Offset to uma_slab struct */ + uint16_t uk_ppera; /* pages per allocation from backend */ + uint16_t uk_ipers; /* Items per slab */ + uint32_t uk_flags; /* Internal flags */ /* Least used fields go to the last cache line. */ const char *uk_name; /* Name of creating zone. */ @@ -244,17 +244,17 @@ struct uma_slab_head { unsigned long _us_size; /* Size of allocation */ } us_type; SLIST_ENTRY(uma_slab) us_hlink; /* Link for hash table */ - u_int8_t *us_data; /* First item */ - u_int16_t us_freecount; /* How many are free? */ - u_int8_t us_flags; /* Page flags see uma.h */ - u_int8_t us_firstfree; /* First free item index */ + uint8_t *us_data; /* First item */ + uint16_t us_freecount; /* How many are free? */ + uint8_t us_flags; /* Page flags see uma.h */ + uint8_t us_firstfree; /* First free item index */ }; /* The standard slab structure */ struct uma_slab { struct uma_slab_head us_head; /* slab header data */ struct { - u_int8_t us_item; + uint8_t us_item; } us_freelist[1]; /* actual number bigger */ }; @@ -265,8 +265,8 @@ struct uma_slab { struct uma_slab_refcnt { struct uma_slab_head us_head; /* slab header data */ struct { - u_int8_t us_item; - u_int32_t us_refcnt; + uint8_t us_item; + uint32_t us_refcnt; } us_freelist[1]; /* actual number bigger */ }; @@ -323,13 +323,13 @@ struct uma_zone { uma_init uz_init; /* Initializer for each item */ uma_fini uz_fini; /* Discards memory */ - u_int32_t uz_flags; /* Flags inherited from kegs */ - u_int32_t uz_size; /* Size inherited from kegs */ + uint32_t uz_flags; /* Flags inherited from kegs */ + uint32_t uz_size; /* Size inherited from kegs */ - u_int64_t uz_allocs UMA_ALIGN; /* Total number of allocations */ - u_int64_t uz_frees; /* Total number of frees */ - u_int64_t uz_fails; /* Total number of alloc failures */ - u_int64_t uz_sleeps; /* Total number of alloc sleeps */ + uint64_t uz_allocs UMA_ALIGN; /* Total number of allocations */ + uint64_t uz_frees; /* Total number of frees */ + uint64_t uz_fails; /* Total number of alloc failures */ + uint64_t uz_sleeps; /* Total number of alloc sleeps */ uint16_t uz_fills; /* Outstanding bucket fills */ uint16_t uz_count; /* Highest amount of items in bucket */ @@ -362,7 +362,7 @@ struct uma_zone { #ifdef _KERNEL /* Internal prototypes */ -static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data); +static __inline uma_slab_t hash_sfind(struct uma_hash *hash, uint8_t *data); void *uma_large_malloc(int size, int wait); void uma_large_free(uma_slab_t slab); @@ -396,7 +396,7 @@ void uma_large_free(uma_slab_t slab); * A pointer to a slab if successful, else NULL. */ static __inline uma_slab_t -hash_sfind(struct uma_hash *hash, u_int8_t *data) +hash_sfind(struct uma_hash *hash, uint8_t *data) { uma_slab_t slab; int hval; @@ -404,7 +404,7 @@ hash_sfind(struct uma_hash *hash, u_int8 hval = UMA_HASH(hash, data); SLIST_FOREACH(slab, &hash->uh_slab_hash[hval], us_hlink) { - if ((u_int8_t *)slab->us_data == data) + if ((uint8_t *)slab->us_data == data) return (slab); } return (NULL); @@ -450,8 +450,8 @@ vsetobj(vm_offset_t va, vm_object_t obj) * if they can provide more effecient allocation functions. This is useful * for using direct mapped addresses. */ -void *uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *pflag, int wait); -void uma_small_free(void *mem, int size, u_int8_t flags); +void *uma_small_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait); +void uma_small_free(void *mem, int size, uint8_t flags); #endif /* _KERNEL */ #endif /* VM_UMA_INT_H */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 17:55:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4F9EBCB8; Tue, 9 Apr 2013 17:55:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 421B6E17; Tue, 9 Apr 2013 17:55:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39HteUL091017; Tue, 9 Apr 2013 17:55:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39HtegX091016; Tue, 9 Apr 2013 17:55:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304091755.r39HtegX091016@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 9 Apr 2013 17:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249314 - head/sys/i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 17:55:40 -0000 Author: kib Date: Tue Apr 9 17:55:39 2013 New Revision: 249314 URL: http://svnweb.freebsd.org/changeset/base/249314 Log: Pass the segmented address of the counter, based on %fs, i.e. offset from the pcpu[0] to the counter base, instead of the linear address. Modified: head/sys/i386/include/counter.h Modified: head/sys/i386/include/counter.h ============================================================================== --- head/sys/i386/include/counter.h Tue Apr 9 17:43:48 2013 (r249313) +++ head/sys/i386/include/counter.h Tue Apr 9 17:55:39 2013 (r249314) @@ -46,6 +46,8 @@ critical_exit(); \ } while (0) +extern struct pcpu __pcpu[MAXCPU]; + static inline void counter_64_inc_8b(uint64_t *p, int64_t inc) { @@ -61,7 +63,7 @@ counter_64_inc_8b(uint64_t *p, int64_t i "cmpxchg8b %%fs:(%%esi)\n\t" "jnz 1b" : - : "S" (p), "D" (&inc) + : "S" ((char *)p - (char *)&__pcpu[0]), "D" (&inc) : "memory", "cc", "eax", "edx", "ebx", "ecx"); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 19:36:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8FEB4E45; Tue, 9 Apr 2013 19:36:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 82AF47E1; Tue, 9 Apr 2013 19:36:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39JaYuj020789; Tue, 9 Apr 2013 19:36:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39JaYxJ020788; Tue, 9 Apr 2013 19:36:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201304091936.r39JaYxJ020788@svn.freebsd.org> From: John Baldwin Date: Tue, 9 Apr 2013 19:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249315 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 19:36:35 -0000 Author: jhb Date: Tue Apr 9 19:36:34 2013 New Revision: 249315 URL: http://svnweb.freebsd.org/changeset/base/249315 Log: Proxy allocation requests for the PCI ROM BAR from child devices similar to how the VGA bus driver currently proxies allocation requests for other PCI BARs. MFC after: 1 week Modified: head/sys/dev/pci/vga_pci.c Modified: head/sys/dev/pci/vga_pci.c ============================================================================== --- head/sys/dev/pci/vga_pci.c Tue Apr 9 17:55:39 2013 (r249314) +++ head/sys/dev/pci/vga_pci.c Tue Apr 9 19:36:34 2013 (r249315) @@ -56,7 +56,8 @@ struct vga_resource { struct vga_pci_softc { device_t vga_msi_child; /* Child driver using MSI. */ - struct vga_resource vga_res[PCIR_MAX_BAR_0 + 1]; + struct vga_resource vga_bars[PCIR_MAX_BAR_0 + 1]; + struct vga_resource vga_bios; }; SYSCTL_DECL(_hw_pci); @@ -156,12 +157,24 @@ vga_pci_teardown_intr(device_t dev, devi return (BUS_TEARDOWN_INTR(device_get_parent(dev), dev, irq, cookie)); } +static struct vga_resource * +lookup_res(struct vga_pci_softc *sc, int rid) +{ + int bar; + + if (rid == PCIR_BIOS) + return (&sc->vga_bios); + bar = PCI_RID2BAR(rid); + if (bar >= 0 && bar <= PCIR_MAX_BAR_0) + return (&sc->vga_bars[bar]); + return (NULL); +} + static struct resource * vga_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - struct vga_pci_softc *sc; - int bar; + struct vga_resource *vr; switch (type) { case SYS_RES_MEMORY: @@ -170,16 +183,15 @@ vga_pci_alloc_resource(device_t dev, dev * For BARs, we cache the resource so that we only allocate it * from the PCI bus once. */ - bar = PCI_RID2BAR(*rid); - if (bar < 0 || bar > PCIR_MAX_BAR_0) + vr = lookup_res(device_get_softc(dev), *rid); + if (vr == NULL) return (NULL); - sc = device_get_softc(dev); - if (sc->vga_res[bar].vr_res == NULL) - sc->vga_res[bar].vr_res = bus_alloc_resource(dev, type, - rid, start, end, count, flags); - if (sc->vga_res[bar].vr_res != NULL) - sc->vga_res[bar].vr_refs++; - return (sc->vga_res[bar].vr_res); + if (vr->vr_res == NULL) + vr->vr_res = bus_alloc_resource(dev, type, rid, start, + end, count, flags); + if (vr->vr_res != NULL) + vr->vr_refs++; + return (vr->vr_res); } return (bus_alloc_resource(dev, type, rid, start, end, count, flags)); } @@ -188,8 +200,8 @@ static int vga_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - struct vga_pci_softc *sc; - int bar, error; + struct vga_resource *vr; + int error; switch (type) { case SYS_RES_MEMORY: @@ -198,24 +210,22 @@ vga_pci_release_resource(device_t dev, d * For BARs, we release the resource from the PCI bus * when the last child reference goes away. */ - bar = PCI_RID2BAR(rid); - if (bar < 0 || bar > PCIR_MAX_BAR_0) + vr = lookup_res(device_get_softc(dev), rid); + if (vr == NULL) return (EINVAL); - sc = device_get_softc(dev); - if (sc->vga_res[bar].vr_res == NULL) + if (vr->vr_res == NULL) return (EINVAL); - KASSERT(sc->vga_res[bar].vr_res == r, - ("vga_pci resource mismatch")); - if (sc->vga_res[bar].vr_refs > 1) { - sc->vga_res[bar].vr_refs--; + KASSERT(vr->vr_res == r, ("vga_pci resource mismatch")); + if (vr->vr_refs > 1) { + vr->vr_refs--; return (0); } - KASSERT(sc->vga_res[bar].vr_refs > 0, + KASSERT(vr->vr_refs > 0, ("vga_pci resource reference count underflow")); error = bus_release_resource(dev, type, rid, r); if (error == 0) { - sc->vga_res[bar].vr_res = NULL; - sc->vga_res[bar].vr_refs = 0; + vr->vr_res = NULL; + vr->vr_refs = 0; } return (error); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 19:53:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E22BB4B6; Tue, 9 Apr 2013 19:53:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id BF50592C; Tue, 9 Apr 2013 19:53:23 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 82F23B915; Tue, 9 Apr 2013 15:53:20 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r249265 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sys Date: Tue, 9 Apr 2013 15:20:25 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201304081919.r38JJAvB088644@svn.freebsd.org> <201304081541.27408.jhb@freebsd.org> <20130408194436.GI76816@FreeBSD.org> In-Reply-To: <20130408194436.GI76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <201304091520.25575.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 09 Apr 2013 15:53:20 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 19:53:24 -0000 On Monday, April 08, 2013 3:44:36 pm Gleb Smirnoff wrote: > On Mon, Apr 08, 2013 at 03:41:27PM -0400, John Baldwin wrote: > J> On Monday, April 08, 2013 3:19:10 pm Gleb Smirnoff wrote: > J> > Author: glebius > J> > Date: Mon Apr 8 19:19:10 2013 > J> > New Revision: 249265 > J> > URL: http://svnweb.freebsd.org/changeset/base/249265 > J> > > J> > Log: > J> > Merge from projects/counters: > J> > > J> > Pad struct pcpu so that its size is denominator of PAGE_SIZE. This > J> > is done to reduce memory waste in UMA_PCPU_ZONE zones. > J> > > J> > Sponsored by: Nginx, Inc. > J> > > J> > Modified: head/sys/sys/pcpu.h > J> > > J> ============================================================================== > J> > --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) > J> > +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) > J> > @@ -180,6 +180,14 @@ struct pcpu { > J> > PCPU_MD_FIELDS; > J> > } __aligned(CACHE_LINE_SIZE); > J> > J> Why not change this to be PAGE_SIZE rather than putting explicit padding in > J> all the pcpu fields? That would seem to be more maintainable. > > Because it can be smaller than PAGE_SIZE. Two times smaller, four times smaller. Ugh, I didn't parse the "denominator" part correctly. I had read it as "multiple". OTOH, it seems quite cheap even on a 32-bit platform to lose 3k per core (assuming 4k page size and 1k pcpu). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 19:57:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D9A7E722; Tue, 9 Apr 2013 19:57:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 64E8E982; Tue, 9 Apr 2013 19:57:51 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r39Jvp1v055609; Tue, 9 Apr 2013 23:57:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r39Jvp3I055608; Tue, 9 Apr 2013 23:57:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 9 Apr 2013 23:57:51 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r249265 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sys Message-ID: <20130409195751.GY76816@FreeBSD.org> References: <201304081919.r38JJAvB088644@svn.freebsd.org> <201304081541.27408.jhb@freebsd.org> <20130408194436.GI76816@FreeBSD.org> <201304091520.25575.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201304091520.25575.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 19:57:52 -0000 On Tue, Apr 09, 2013 at 03:20:25PM -0400, John Baldwin wrote: J> > J> > Log: J> > J> > Merge from projects/counters: J> > J> > J> > J> > Pad struct pcpu so that its size is denominator of PAGE_SIZE. This J> > J> > is done to reduce memory waste in UMA_PCPU_ZONE zones. J> > J> > J> > J> > Sponsored by: Nginx, Inc. J> > J> > J> > J> > Modified: head/sys/sys/pcpu.h J> > J> > J> > J> ============================================================================== J> > J> > --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) J> > J> > +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) J> > J> > @@ -180,6 +180,14 @@ struct pcpu { J> > J> > PCPU_MD_FIELDS; J> > J> > } __aligned(CACHE_LINE_SIZE); J> > J> J> > J> Why not change this to be PAGE_SIZE rather than putting explicit padding in J> > J> all the pcpu fields? That would seem to be more maintainable. J> > J> > Because it can be smaller than PAGE_SIZE. Two times smaller, four times smaller. J> J> Ugh, I didn't parse the "denominator" part correctly. I had read it as J> "multiple". OTOH, it seems quite cheap even on a 32-bit platform to lose J> 3k per core (assuming 4k page size and 1k pcpu). There could be several UMA_ZONE_PCPU zones. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 20:21:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 75D84E2B; Tue, 9 Apr 2013 20:21:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6857DAC0; Tue, 9 Apr 2013 20:21:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39KLaIZ034939; Tue, 9 Apr 2013 20:21:36 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39KLaB6034938; Tue, 9 Apr 2013 20:21:36 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304092021.r39KLaB6034938@svn.freebsd.org> From: Dimitry Andric Date: Tue, 9 Apr 2013 20:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249316 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 20:21:36 -0000 Author: dim Date: Tue Apr 9 20:21:35 2013 New Revision: 249316 URL: http://svnweb.freebsd.org/changeset/base/249316 Log: Ensure make -j N universe works correctly, by checking for an up-to-date make before starting the universe targets themselves. Otherwise, all of the targets would attempt to build make simultaneously, overwriting each other's copies of the make object files and executable. This could lead to strange errors, for example when partially-written make executables are invoked. Also amend r216620, to make the rest of universe wait properly until the upgrade_checks target is finished, by adding universe_${target}_prologue to the .ORDER target. Otherwise, make will be too smart for its own good, and start building the universe targets simultaneously with the prologues anyway. MFC after: 1 week Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Apr 9 19:36:34 2013 (r249315) +++ head/Makefile Tue Apr 9 20:21:35 2013 (r249316) @@ -361,7 +361,7 @@ MAKEFAIL=tee -a ${FAILFILE} MAKEFAIL=cat .endif -universe: universe_prologue +universe: universe_prologue upgrade_checks universe_prologue: @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @@ -371,7 +371,7 @@ universe_prologue: .endif .for target in ${TARGETS} universe: universe_${target} -.ORDER: universe_prologue universe_${target} universe_epilogue +.ORDER: universe_prologue upgrade_checks universe_${target}_prologue universe_${target} universe_epilogue universe_${target}: universe_${target}_prologue universe_${target}_prologue: @echo ">> ${target} started on `LC_ALL=C date`" From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 20:31:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2EC83520; Tue, 9 Apr 2013 20:31:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id E947FBD6; Tue, 9 Apr 2013 20:31:00 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::4d63:2bde:2d40:a6d0] (unknown [IPv6:2001:7b8:3a7:0:4d63:2bde:2d40:a6d0]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0F5F55C44; Tue, 9 Apr 2013 22:30:58 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r249316 - head From: Dimitry Andric In-Reply-To: <201304092021.r39KLaB6034938@svn.freebsd.org> Date: Tue, 9 Apr 2013 22:30:52 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <201304092021.r39KLaB6034938@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.1503) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 20:31:01 -0000 On Apr 9, 2013, at 22:21, Dimitry Andric wrote: > Author: dim > Date: Tue Apr 9 20:21:35 2013 > New Revision: 249316 > URL: http://svnweb.freebsd.org/changeset/base/249316 > > Log: > Ensure make -j N universe works correctly, by checking for an up-to-date > make before starting the universe targets themselves. Otherwise, all of > the targets would attempt to build make simultaneously, overwriting each > other's copies of the make object files and executable. This could lead > to strange errors, for example when partially-written make executables > are invoked. > > Also amend r216620, Oops, that should have been r216520, instead. From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 20:52:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 21C1BF30; Tue, 9 Apr 2013 20:52:27 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11B6CD8A; Tue, 9 Apr 2013 20:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39KqQVS043988; Tue, 9 Apr 2013 20:52:26 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39KqQNA043987; Tue, 9 Apr 2013 20:52:26 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201304092052.r39KqQNA043987@svn.freebsd.org> From: Andre Oppermann Date: Tue, 9 Apr 2013 20:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249317 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 20:52:27 -0000 Author: andre Date: Tue Apr 9 20:52:26 2013 New Revision: 249317 URL: http://svnweb.freebsd.org/changeset/base/249317 Log: Fix a race condition on tcp listen socket teardown with pending connections in the accept queue and contiguous new incoming SYNs. Compared to the original submitters patch I've moved the test next to the SYN handling to have it together in a logical unit and reworded the comment explaining the issue. Submitted by: Matt Miller Submitted by: Juan Mojica Reviewed by: Matt Miller (changes) Tested by: pho MFC after: 1 week Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Apr 9 20:21:35 2013 (r249316) +++ head/sys/netinet/tcp_input.c Tue Apr 9 20:52:26 2013 (r249317) @@ -1405,6 +1405,15 @@ relocked: */ INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); return; + } else if (tp->t_state == TCPS_LISTEN) { + /* + * When a listen socket is torn down the SO_ACCEPTCONN + * flag is removed first while connections are drained + * from the accept queue in a unlock/lock cycle of the + * ACCEPT_LOCK, opening a race condition allowing a SYN + * attempt go through unhandled. + */ + goto dropunlock; } #ifdef TCP_SIGNATURE From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 21:02:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E34862DC; Tue, 9 Apr 2013 21:02:22 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C6F97DF0; Tue, 9 Apr 2013 21:02:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39L2MtA047052; Tue, 9 Apr 2013 21:02:22 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39L2LrO047044; Tue, 9 Apr 2013 21:02:21 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201304092102.r39L2LrO047044@svn.freebsd.org> From: Andre Oppermann Date: Tue, 9 Apr 2013 21:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249318 - in head/sys: kern net netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 21:02:23 -0000 Author: andre Date: Tue Apr 9 21:02:20 2013 New Revision: 249318 URL: http://svnweb.freebsd.org/changeset/base/249318 Log: Change certain heavily used network related mutexes and rwlocks to reside on their own cache line to prevent false sharing with other nearby structures, especially for those in the .bss segment. NB: Those mutexes and rwlocks with variables next to them that get changed on every invocation do not benefit from their own cache line. Actually it may be net negative because two cache misses would be incurred in those cases. Modified: head/sys/kern/uipc_socket.c head/sys/net/if.c head/sys/net/if_llatbl.c head/sys/net/if_var.h head/sys/netinet/in_pcb.h head/sys/netinet/ip_id.c head/sys/netinet/ip_input.c head/sys/netinet/tcp_subr.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/kern/uipc_socket.c Tue Apr 9 21:02:20 2013 (r249318) @@ -240,14 +240,14 @@ SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO * accept_mtx locks down per-socket fields relating to accept queues. See * socketvar.h for an annotation of the protected fields of struct socket. */ -struct mtx accept_mtx; +struct mtx_padalign accept_mtx; MTX_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF); /* * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. */ -static struct mtx so_global_mtx; +static struct so_global_mtx so_global_mtx; MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); /* Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/net/if.c Tue Apr 9 21:02:20 2013 (r249318) @@ -206,7 +206,7 @@ VNET_DEFINE(struct ifindex_entry *, ifin * also to stablize it over long-running ioctls, without introducing priority * inversions and deadlocks. */ -struct rwlock ifnet_rwlock; +struct rwlock_padalign ifnet_rwlock; struct sx ifnet_sxlock; /* Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/net/if_llatbl.c Tue Apr 9 21:02:20 2013 (r249318) @@ -67,7 +67,7 @@ static VNET_DEFINE(SLIST_HEAD(, lltable) static void vnet_lltable_init(void); -struct rwlock lltable_rwlock; +struct rwlock_padalign lltable_rwlock; RW_SYSINIT(lltable_rwlock, &lltable_rwlock, "lltable_rwlock"); /* Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/net/if_var.h Tue Apr 9 21:02:20 2013 (r249318) @@ -191,9 +191,9 @@ struct ifnet { void *if_unused[2]; void *if_afdata[AF_MAX]; int if_afdata_initialized; - struct rwlock if_afdata_lock; struct task if_linktask; /* task for link change events */ - struct rwlock if_addr_lock; /* lock to protect address lists */ + struct rwlock_padalign if_afdata_lock; + struct rwlock_padalign if_addr_lock; /* lock to protect address lists */ LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ TAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if */ Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/netinet/in_pcb.h Tue Apr 9 21:02:20 2013 (r249318) @@ -330,7 +330,7 @@ struct inpcbinfo { /* * Global lock protecting non-pcbgroup hash lookup tables. */ - struct rwlock ipi_hash_lock; + struct rwlock_padalign ipi_hash_lock; /* * Global hash of inpcbs, hashed by local and foreign addresses and Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/netinet/ip_id.c Tue Apr 9 21:02:20 2013 (r249318) @@ -97,7 +97,7 @@ static int array_ptr = 0; static int array_size = 8192; static int random_id_collisions = 0; static int random_id_total = 0; -static struct mtx ip_id_mtx; +static struct mtx_padalign ip_id_mtx; static void ip_initid(void); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS); Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/netinet/ip_input.c Tue Apr 9 21:02:20 2013 (r249318) @@ -85,7 +85,7 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct ip) == 20); #endif -struct rwlock in_ifaddr_lock; +struct rwlock_padalign in_ifaddr_lock; RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); VNET_DEFINE(int, rsvp_on); @@ -155,7 +155,7 @@ VNET_DEFINE(u_long, in_ifaddrhmask); /* static VNET_DEFINE(uma_zone_t, ipq_zone); static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); -static struct mtx ipqlock; +static struct mtx_padalign ipqlock; #define V_ipq_zone VNET(ipq_zone) #define V_ipq VNET(ipq) Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Tue Apr 9 20:52:26 2013 (r249317) +++ head/sys/netinet/tcp_subr.c Tue Apr 9 21:02:20 2013 (r249318) @@ -255,7 +255,7 @@ static VNET_DEFINE(uma_zone_t, tcpcb_zon #define V_tcpcb_zone VNET(tcpcb_zone) MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers"); -static struct mtx isn_mtx; +static struct mtx_padalign isn_mtx; #define ISN_LOCK_INIT() mtx_init(&isn_mtx, "isn_mtx", NULL, MTX_DEF) #define ISN_LOCK() mtx_lock(&isn_mtx) From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 22:27:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0C89E6B3; Tue, 9 Apr 2013 22:27:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E2F70247; Tue, 9 Apr 2013 22:27:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39MRjIp071171; Tue, 9 Apr 2013 22:27:45 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39MRiN1071164; Tue, 9 Apr 2013 22:27:44 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304092227.r39MRiN1071164@svn.freebsd.org> From: Martin Matuska Date: Tue, 9 Apr 2013 22:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249319 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 22:27:46 -0000 Author: mm Date: Tue Apr 9 22:27:44 2013 New Revision: 249319 URL: http://svnweb.freebsd.org/changeset/base/249319 Log: ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl() doesn't copyout in this case. To solve this issue a new struct zfs_iocparm_t is introduced consisting of: - zfs_ioctl_version (future backwards compatibility purposes) - user space pointer to zfs_cmd_t (copyin and copyout) - size of zfs_cmd_t (verification purposes) The copyin and copyout of zfs_cmd_t is now done the illumos (vendor) way what makes porting of new changes easier and ensures correct behavior if returning an error. MFC after: 10 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Tue Apr 9 21:02:20 2013 (r249318) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Tue Apr 9 22:27:44 2013 (r249319) @@ -72,7 +72,9 @@ zcmd_ioctl(int fd, int request, zfs_cmd_ if (zfs_ioctl_version == ZFS_IOCVER_UNDEF) zfs_ioctl_version = get_zfs_ioctl_version(); - if (zfs_ioctl_version == ZFS_IOCVER_DEADMAN) + if (zfs_ioctl_version == ZFS_IOCVER_LZC) + cflag = ZFS_CMD_COMPAT_LZC; + else if (zfs_ioctl_version == ZFS_IOCVER_DEADMAN) cflag = ZFS_CMD_COMPAT_DEADMAN; /* Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Tue Apr 9 21:02:20 2013 (r249318) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Tue Apr 9 22:27:44 2013 (r249319) @@ -577,12 +577,18 @@ zcmd_ioctl_compat(int fd, int request, z int nc, ret; void *zc_c; unsigned long ncmd; + zfs_iocparm_t zp; switch (cflag) { case ZFS_CMD_COMPAT_NONE: + ncmd = _IOWR('Z', request, struct zfs_iocparm); + zp.zfs_cmd = (uint64_t)zc; + zp.zfs_cmd_size = sizeof(zfs_cmd_t); + zp.zfs_ioctl_version = ZFS_IOCVER_CURRENT; + return (ioctl(fd, ncmd, &zp)); + case ZFS_CMD_COMPAT_LZC: ncmd = _IOWR('Z', request, struct zfs_cmd); - ret = ioctl(fd, ncmd, zc); - return (ret); + return (ioctl(fd, ncmd, zc)); case ZFS_CMD_COMPAT_DEADMAN: zc_c = malloc(sizeof(zfs_cmd_deadman_t)); ncmd = _IOWR('Z', request, struct zfs_cmd_deadman); @@ -677,7 +683,7 @@ zfs_ioctl_compat_innvl(zfs_cmd_t *zc, nv char *poolname, *snapname; int err; - if (cflag == ZFS_CMD_COMPAT_NONE) + if (cflag == ZFS_CMD_COMPAT_NONE || cflag == ZFS_CMD_COMPAT_LZC) goto out; switch (vec) { @@ -828,7 +834,7 @@ zfs_ioctl_compat_outnvl(zfs_cmd_t *zc, n { nvlist_t *tmpnvl; - if (cflag == ZFS_CMD_COMPAT_NONE) + if (cflag == ZFS_CMD_COMPAT_NONE || cflag == ZFS_CMD_COMPAT_LZC) return (outnvl); switch (vec) { Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h Tue Apr 9 21:02:20 2013 (r249318) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h Tue Apr 9 22:27:44 2013 (r249319) @@ -49,19 +49,27 @@ extern "C" { #define ZFS_IOCVER_NONE 0 #define ZFS_IOCVER_DEADMAN 1 #define ZFS_IOCVER_LZC 2 -#define ZFS_IOCVER_CURRENT ZFS_IOCVER_LZC +#define ZFS_IOCVER_ZCMD 3 +#define ZFS_IOCVER_CURRENT ZFS_IOCVER_ZCMD /* compatibility conversion flag */ #define ZFS_CMD_COMPAT_NONE 0 #define ZFS_CMD_COMPAT_V15 1 #define ZFS_CMD_COMPAT_V28 2 #define ZFS_CMD_COMPAT_DEADMAN 3 +#define ZFS_CMD_COMPAT_LZC 4 #define ZFS_IOC_COMPAT_PASS 254 #define ZFS_IOC_COMPAT_FAIL 255 #define ZFS_IOCREQ(ioreq) ((ioreq) & 0xff) +typedef struct zfs_iocparm { + uint32_t zfs_ioctl_version; + uint64_t zfs_cmd; + uint64_t zfs_cmd_size; +} zfs_iocparm_t; + typedef struct zinject_record_v15 { uint64_t zi_objset; uint64_t zi_object; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Apr 9 21:02:20 2013 (r249318) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Apr 9 22:27:44 2013 (r249319) @@ -5713,11 +5713,13 @@ zfsdev_ioctl(struct cdev *dev, u_long zc { zfs_cmd_t *zc; uint_t vecnum; -#ifdef illumos int error, rc, len; +#ifdef illumos minor_t minor = getminor(dev); #else - int error, len, cflag, cmd, oldvecnum; + zfs_iocparm_t *zc_iocparm; + int cflag, cmd, oldvecnum; + boolean_t newioc, compat; cred_t *cr = td->td_ucred; #endif const zfs_ioc_vec_t *vec; @@ -5725,6 +5727,9 @@ zfsdev_ioctl(struct cdev *dev, u_long zc nvlist_t *innvl = NULL; cflag = ZFS_CMD_COMPAT_NONE; + compat = B_FALSE; + newioc = B_TRUE; + len = IOCPARM_LEN(zcmd); cmd = zcmd & 0xff; @@ -5732,19 +5737,26 @@ zfsdev_ioctl(struct cdev *dev, u_long zc * Check if we are talking to supported older binaries * and translate zfs_cmd if necessary */ - if (len != sizeof(zfs_cmd_t)) - if (len == sizeof(zfs_cmd_deadman_t)) { + if (len != sizeof(zfs_iocparm_t)) { + newioc = B_FALSE; + if (len == sizeof(zfs_cmd_t)) { + cflag = ZFS_CMD_COMPAT_LZC; + vecnum = cmd; + } else if (len == sizeof(zfs_cmd_deadman_t)) { cflag = ZFS_CMD_COMPAT_DEADMAN; + compat = B_TRUE; vecnum = cmd; } else if (len == sizeof(zfs_cmd_v28_t)) { cflag = ZFS_CMD_COMPAT_V28; + compat = B_TRUE; vecnum = cmd; } else if (len == sizeof(zfs_cmd_v15_t)) { cflag = ZFS_CMD_COMPAT_V15; + compat = B_TRUE; vecnum = zfs_ioctl_v15_to_v28[cmd]; } else return (EINVAL); - else + } else vecnum = cmd; #ifdef illumos @@ -5752,7 +5764,7 @@ zfsdev_ioctl(struct cdev *dev, u_long zc ASSERT3U(getmajor(dev), ==, ddi_driver_major(zfs_dip)); #endif - if (cflag != ZFS_CMD_COMPAT_NONE) { + if (compat) { if (vecnum == ZFS_IOC_COMPAT_PASS) return (0); else if (vecnum == ZFS_IOC_COMPAT_FAIL) @@ -5777,13 +5789,33 @@ zfsdev_ioctl(struct cdev *dev, u_long zc error = SET_ERROR(EFAULT); goto out; } -#else - error = 0; -#endif - - if (cflag != ZFS_CMD_COMPAT_NONE) { +#else /* !illumos */ + /* + * We don't alloc/free zc only if talking to library ioctl version 2 + */ + if (cflag != ZFS_CMD_COMPAT_LZC) { zc = kmem_zalloc(sizeof(zfs_cmd_t), KM_SLEEP); bzero(zc, sizeof(zfs_cmd_t)); + } else { + zc = (void *)arg; + error = 0; + } + + if (newioc) { + zc_iocparm = (void *)arg; + if (zc_iocparm->zfs_cmd_size != sizeof(zfs_cmd_t)) { + error = SET_ERROR(EFAULT); + goto out; + } + error = ddi_copyin((void *)zc_iocparm->zfs_cmd, zc, + sizeof(zfs_cmd_t), flag); + if (error != 0) { + error = SET_ERROR(EFAULT); + goto out; + } + } + + if (compat) { zfs_cmd_compat_get(zc, arg, cflag); oldvecnum = vecnum; error = zfs_ioctl_compat_pre(zc, &vecnum, cflag); @@ -5791,8 +5823,8 @@ zfsdev_ioctl(struct cdev *dev, u_long zc goto out; if (oldvecnum != vecnum) vec = &zfs_ioc_vec[vecnum]; - } else - zc = (void *)arg; + } +#endif /* !illumos */ zc->zc_iflags = flag & FKIOCTL; if (zc->zc_nvlist_src_size != 0) { @@ -5803,7 +5835,7 @@ zfsdev_ioctl(struct cdev *dev, u_long zc } /* rewrite innvl for backwards compatibility */ - if (cflag != ZFS_CMD_COMPAT_NONE) + if (compat) innvl = zfs_ioctl_compat_innvl(zc, innvl, vecnum, cflag); /* @@ -5880,7 +5912,7 @@ zfsdev_ioctl(struct cdev *dev, u_long zc fnvlist_free(lognv); /* rewrite outnvl for backwards compatibility */ - if (cflag != ZFS_CMD_COMPAT_NONE) + if (cflag != ZFS_CMD_COMPAT_NONE && cflag != ZFS_CMD_COMPAT_LZC) outnvl = zfs_ioctl_compat_outnvl(zc, outnvl, vecnum, cflag); @@ -5904,10 +5936,23 @@ zfsdev_ioctl(struct cdev *dev, u_long zc out: nvlist_free(innvl); + + if (compat) { + zfs_ioctl_compat_post(zc, cmd, cflag); + zfs_cmd_compat_put(zc, arg, vecnum, cflag); + } + #ifdef illumos rc = ddi_copyout(zc, (void *)arg, sizeof (zfs_cmd_t), flag); if (error == 0 && rc != 0) error = SET_ERROR(EFAULT); +#else + if (newioc) { + rc = ddi_copyout(zc, (void *)zc_iocparm->zfs_cmd, + sizeof (zfs_cmd_t), flag); + if (error == 0 && rc != 0) + error = SET_ERROR(EFAULT); + } #endif if (error == 0 && vec->zvec_allow_log) { char *s = tsd_get(zfs_allow_log_key); @@ -5919,14 +5964,14 @@ out: strfree(saved_poolname); } - if (cflag != ZFS_CMD_COMPAT_NONE) { - zfs_ioctl_compat_post(zc, cmd, cflag); - zfs_cmd_compat_put(zc, arg, vecnum, cflag); - kmem_free(zc, sizeof (zfs_cmd_t)); - } - #ifdef illumos kmem_free(zc, sizeof (zfs_cmd_t)); +#else + /* + * We don't alloc/free zc only if talking to library ioctl version 2 + */ + if (cflag != ZFS_CMD_COMPAT_LZC) + kmem_free(zc, sizeof (zfs_cmd_t)); #endif return (error); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 00:35:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 09D5146F; Wed, 10 Apr 2013 00:35:09 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EF81A8DE; Wed, 10 Apr 2013 00:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A0Z8xl009242; Wed, 10 Apr 2013 00:35:08 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A0Z8rM009241; Wed, 10 Apr 2013 00:35:08 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304100035.r3A0Z8rM009241@svn.freebsd.org> From: Jim Harris Date: Wed, 10 Apr 2013 00:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249320 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 00:35:09 -0000 Author: jimharris Date: Wed Apr 10 00:35:08 2013 New Revision: 249320 URL: http://svnweb.freebsd.org/changeset/base/249320 Log: Fix the build. Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Apr 9 22:27:44 2013 (r249319) +++ head/sys/kern/uipc_socket.c Wed Apr 10 00:35:08 2013 (r249320) @@ -247,7 +247,7 @@ MTX_SYSINIT(accept_mtx, &accept_mtx, "ac * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. */ -static struct so_global_mtx so_global_mtx; +static struct mtx_padalign so_global_mtx; MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); /* From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 02:12:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5907C412; Wed, 10 Apr 2013 02:12:41 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3A79BB5F; Wed, 10 Apr 2013 02:12:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A2CeQh038559; Wed, 10 Apr 2013 02:12:40 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A2CdhV038552; Wed, 10 Apr 2013 02:12:39 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304100212.r3A2CdhV038552@svn.freebsd.org> From: Neel Natu Date: Wed, 10 Apr 2013 02:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249321 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 02:12:41 -0000 Author: neel Date: Wed Apr 10 02:12:39 2013 New Revision: 249321 URL: http://svnweb.freebsd.org/changeset/base/249321 Log: Improve PCI BAR emulation: - Respect the MEMEN and PORTEN bits in the command register - Allow the guest to reprogram the address decoded by the BAR Submitted by: Gopakumar T Obtained from: NetApp Modified: head/usr.sbin/bhyve/consport.c head/usr.sbin/bhyve/dbgport.c head/usr.sbin/bhyve/inout.c head/usr.sbin/bhyve/inout.h head/usr.sbin/bhyve/mem.c head/usr.sbin/bhyve/mem.h head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/consport.c ============================================================================== --- head/usr.sbin/bhyve/consport.c Wed Apr 10 00:35:08 2013 (r249320) +++ head/usr.sbin/bhyve/consport.c Wed Apr 10 02:12:39 2013 (r249321) @@ -128,6 +128,7 @@ console_handler(struct vmctx *ctx, int v static struct inout_port consport = { "bvmcons", BVM_CONSOLE_PORT, + 1, IOPORT_F_INOUT, console_handler }; Modified: head/usr.sbin/bhyve/dbgport.c ============================================================================== --- head/usr.sbin/bhyve/dbgport.c Wed Apr 10 00:35:08 2013 (r249320) +++ head/usr.sbin/bhyve/dbgport.c Wed Apr 10 02:12:39 2013 (r249321) @@ -105,6 +105,7 @@ again: static struct inout_port dbgport = { "bvmdbg", BVM_DBG_PORT, + 1, IOPORT_F_INOUT, dbg_handler }; Modified: head/usr.sbin/bhyve/inout.c ============================================================================== --- head/usr.sbin/bhyve/inout.c Wed Apr 10 00:35:08 2013 (r249320) +++ head/usr.sbin/bhyve/inout.c Wed Apr 10 02:12:39 2013 (r249321) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "inout.h" @@ -41,6 +42,9 @@ SET_DECLARE(inout_port_set, struct inout #define MAX_IOPORTS (1 << 16) +#define VERIFY_IOPORT(port, size) \ + assert((port) >= 0 && (size) > 0 && ((port) + (size)) <= MAX_IOPORTS) + static struct { const char *name; int flags; @@ -69,6 +73,23 @@ default_inout(struct vmctx *ctx, int vcp return (0); } +static void +register_default_iohandler(int start, int size) +{ + struct inout_port iop; + + VERIFY_IOPORT(start, size); + + bzero(&iop, sizeof(iop)); + iop.name = "default"; + iop.port = start; + iop.size = size; + iop.flags = IOPORT_F_INOUT; + iop.handler = default_inout; + + register_inout(&iop); +} + int emulate_inout(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, int strict) @@ -113,17 +134,11 @@ void init_inout(void) { struct inout_port **iopp, *iop; - int i; /* * Set up the default handler for all ports */ - for (i = 0; i < MAX_IOPORTS; i++) { - inout_handlers[i].name = "default"; - inout_handlers[i].flags = IOPORT_F_IN | IOPORT_F_OUT; - inout_handlers[i].handler = default_inout; - inout_handlers[i].arg = NULL; - } + register_default_iohandler(0, MAX_IOPORTS); /* * Overwrite with specified handlers @@ -141,11 +156,28 @@ init_inout(void) int register_inout(struct inout_port *iop) { - assert(iop->port < MAX_IOPORTS); - inout_handlers[iop->port].name = iop->name; - inout_handlers[iop->port].flags = iop->flags; - inout_handlers[iop->port].handler = iop->handler; - inout_handlers[iop->port].arg = iop->arg; + int i; + + VERIFY_IOPORT(iop->port, iop->size); + + for (i = iop->port; i < iop->port + iop->size; i++) { + inout_handlers[i].name = iop->name; + inout_handlers[i].flags = iop->flags; + inout_handlers[i].handler = iop->handler; + inout_handlers[i].arg = iop->arg; + } + + return (0); +} + +int +unregister_inout(struct inout_port *iop) +{ + + VERIFY_IOPORT(iop->port, iop->size); + assert(inout_handlers[iop->port].name == iop->name); + + register_default_iohandler(iop->port, iop->size); return (0); } Modified: head/usr.sbin/bhyve/inout.h ============================================================================== --- head/usr.sbin/bhyve/inout.h Wed Apr 10 00:35:08 2013 (r249320) +++ head/usr.sbin/bhyve/inout.h Wed Apr 10 02:12:39 2013 (r249321) @@ -39,6 +39,7 @@ typedef int (*inout_func_t)(struct vmctx struct inout_port { const char *name; int port; + int size; int flags; inout_func_t handler; void *arg; @@ -51,6 +52,7 @@ struct inout_port { static struct inout_port __CONCAT(__inout_port, __LINE__) = { \ #name, \ (port), \ + 1, \ (flags), \ (handler), \ 0 \ @@ -61,7 +63,7 @@ void init_inout(void); int emulate_inout(struct vmctx *, int vcpu, int in, int port, int bytes, uint32_t *eax, int strict); int register_inout(struct inout_port *iop); - +int unregister_inout(struct inout_port *iop); void init_bvmcons(void); #endif /* _INOUT_H_ */ Modified: head/usr.sbin/bhyve/mem.c ============================================================================== --- head/usr.sbin/bhyve/mem.c Wed Apr 10 00:35:08 2013 (r249320) +++ head/usr.sbin/bhyve/mem.c Wed Apr 10 02:12:39 2013 (r249321) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "mem.h" @@ -71,6 +72,8 @@ RB_HEAD(mmio_rb_tree, mmio_rb_range) mmi */ static struct mmio_rb_range *mmio_hint[VM_MAXCPU]; +static pthread_rwlock_t rwlock; + static int mmio_rb_range_compare(struct mmio_rb_range *a, struct mmio_rb_range *b) { @@ -125,10 +128,12 @@ mmio_rb_dump(struct mmio_rb_tree *rbt) { struct mmio_rb_range *np; + pthread_rwlock_rdlock(&rwlock); RB_FOREACH(np, mmio_rb_tree, rbt) { printf(" %lx:%lx, %s\n", np->mr_base, np->mr_end, np->mr_param.name); } + pthread_rwlock_unlock(&rwlock); } #endif @@ -161,7 +166,8 @@ emulate_mem(struct vmctx *ctx, int vcpu, { struct mmio_rb_range *entry; int err; - + + pthread_rwlock_rdlock(&rwlock); /* * First check the per-vCPU cache */ @@ -173,10 +179,11 @@ emulate_mem(struct vmctx *ctx, int vcpu, entry = NULL; if (entry == NULL) { - if (!mmio_rb_lookup(&mmio_rb_root, paddr, &entry)) { + if (mmio_rb_lookup(&mmio_rb_root, paddr, &entry) == 0) { /* Update the per-vCPU cache */ mmio_hint[vcpu] = entry; } else if (mmio_rb_lookup(&mmio_rb_fallback, paddr, &entry)) { + pthread_rwlock_unlock(&rwlock); return (ESRCH); } } @@ -184,25 +191,29 @@ emulate_mem(struct vmctx *ctx, int vcpu, assert(entry != NULL); err = vmm_emulate_instruction(ctx, vcpu, paddr, vie, mem_read, mem_write, &entry->mr_param); + pthread_rwlock_unlock(&rwlock); + return (err); } static int register_mem_int(struct mmio_rb_tree *rbt, struct mem_range *memp) { - struct mmio_rb_range *mrp; + struct mmio_rb_range *entry, *mrp; int err; err = 0; mrp = malloc(sizeof(struct mmio_rb_range)); - + if (mrp != NULL) { mrp->mr_param = *memp; mrp->mr_base = memp->base; mrp->mr_end = memp->base + memp->size - 1; - - err = mmio_rb_add(rbt, mrp); + pthread_rwlock_wrlock(&rwlock); + if (mmio_rb_lookup(rbt, memp->base, &entry) != 0) + err = mmio_rb_add(rbt, mrp); + pthread_rwlock_unlock(&rwlock); if (err) free(mrp); } else @@ -225,10 +236,40 @@ register_mem_fallback(struct mem_range * return (register_mem_int(&mmio_rb_fallback, memp)); } +int +unregister_mem(struct mem_range *memp) +{ + struct mem_range *mr; + struct mmio_rb_range *entry = NULL; + int err, i; + + pthread_rwlock_wrlock(&rwlock); + err = mmio_rb_lookup(&mmio_rb_root, memp->base, &entry); + if (err == 0) { + mr = &entry->mr_param; + assert(mr->name == memp->name); + assert(mr->base == memp->base && mr->size == memp->size); + RB_REMOVE(mmio_rb_tree, &mmio_rb_root, entry); + + /* flush Per-vCPU cache */ + for (i=0; i < VM_MAXCPU; i++) { + if (mmio_hint[i] == entry) + mmio_hint[i] = NULL; + } + } + pthread_rwlock_unlock(&rwlock); + + if (entry) + free(entry); + + return (err); +} + void init_mem(void) { RB_INIT(&mmio_rb_root); RB_INIT(&mmio_rb_fallback); + pthread_rwlock_init(&rwlock, NULL); } Modified: head/usr.sbin/bhyve/mem.h ============================================================================== --- head/usr.sbin/bhyve/mem.h Wed Apr 10 00:35:08 2013 (r249320) +++ head/usr.sbin/bhyve/mem.h Wed Apr 10 02:12:39 2013 (r249321) @@ -54,5 +54,6 @@ int emulate_mem(struct vmctx *, int int register_mem(struct mem_range *memp); int register_mem_fallback(struct mem_range *memp); +int unregister_mem(struct mem_range *memp); #endif /* _MEM_H_ */ Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Wed Apr 10 00:35:08 2013 (r249320) +++ head/usr.sbin/bhyve/pci_emul.c Wed Apr 10 02:12:39 2013 (r249321) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -38,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -353,20 +355,150 @@ pci_emul_alloc_bar(struct pci_devinst *p return (pci_emul_alloc_pbar(pdi, idx, 0, type, size)); } +/* + * Register (or unregister) the MMIO or I/O region associated with the BAR + * register 'idx' of an emulated pci device. + */ +static void +modify_bar_registration(struct pci_devinst *pi, int idx, int registration) +{ + int error; + struct inout_port iop; + struct mem_range mr; + + switch (pi->pi_bar[idx].type) { + case PCIBAR_IO: + bzero(&iop, sizeof(struct inout_port)); + iop.name = pi->pi_name; + iop.port = pi->pi_bar[idx].addr; + iop.size = pi->pi_bar[idx].size; + if (registration) { + iop.flags = IOPORT_F_INOUT; + iop.handler = pci_emul_io_handler; + iop.arg = pi; + error = register_inout(&iop); + } else + error = unregister_inout(&iop); + break; + case PCIBAR_MEM32: + case PCIBAR_MEM64: + bzero(&mr, sizeof(struct mem_range)); + mr.name = pi->pi_name; + mr.base = pi->pi_bar[idx].addr; + mr.size = pi->pi_bar[idx].size; + if (registration) { + mr.flags = MEM_F_RW; + mr.handler = pci_emul_mem_handler; + mr.arg1 = pi; + mr.arg2 = idx; + error = register_mem(&mr); + } else + error = unregister_mem(&mr); + break; + default: + error = EINVAL; + break; + } + assert(error == 0); +} + +static void +unregister_bar(struct pci_devinst *pi, int idx) +{ + + modify_bar_registration(pi, idx, 0); +} + +static void +register_bar(struct pci_devinst *pi, int idx) +{ + + modify_bar_registration(pi, idx, 1); +} + +/* Are we decoding i/o port accesses for the emulated pci device? */ +static int +porten(struct pci_devinst *pi) +{ + uint16_t cmd; + + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); + + return (cmd & PCIM_CMD_PORTEN); +} + +/* Are we decoding memory accesses for the emulated pci device? */ +static int +memen(struct pci_devinst *pi) +{ + uint16_t cmd; + + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); + + return (cmd & PCIM_CMD_MEMEN); +} + +/* + * Update the MMIO or I/O address that is decoded by the BAR register. + * + * If the pci device has enabled the address space decoding then intercept + * the address range decoded by the BAR register. + */ +static void +update_bar_address(struct pci_devinst *pi, uint64_t addr, int idx, int type) +{ + int decode; + + if (pi->pi_bar[idx].type == PCIBAR_IO) + decode = porten(pi); + else + decode = memen(pi); + + if (decode) + unregister_bar(pi, idx); + + switch (type) { + case PCIBAR_IO: + case PCIBAR_MEM32: + pi->pi_bar[idx].addr = addr; + break; + case PCIBAR_MEM64: + pi->pi_bar[idx].addr &= ~0xffffffffUL; + pi->pi_bar[idx].addr |= addr; + break; + case PCIBAR_MEMHI64: + pi->pi_bar[idx].addr &= 0xffffffff; + pi->pi_bar[idx].addr |= addr; + break; + default: + assert(0); + } + + if (decode) + register_bar(pi, idx); +} + int pci_emul_alloc_pbar(struct pci_devinst *pdi, int idx, uint64_t hostbase, enum pcibar_type type, uint64_t size) { - int i, error; + int error; uint64_t *baseptr, limit, addr, mask, lobits, bar; - struct inout_port iop; - struct mem_range memp; assert(idx >= 0 && idx <= PCI_BARMAX); if ((size & (size - 1)) != 0) size = 1UL << flsl(size); /* round up to a power of 2 */ + /* Enforce minimum BAR sizes required by the PCI standard */ + if (type == PCIBAR_IO) { + if (size < 4) + size = 4; + } else { + if (size < 16) + size = 16; + } + switch (type) { case PCIBAR_NONE: baseptr = NULL; @@ -443,30 +575,7 @@ pci_emul_alloc_pbar(struct pci_devinst * pci_set_cfgdata32(pdi, PCIR_BAR(idx + 1), bar >> 32); } - /* add a handler to intercept accesses to the I/O bar */ - if (type == PCIBAR_IO) { - iop.name = pdi->pi_name; - iop.flags = IOPORT_F_INOUT; - iop.handler = pci_emul_io_handler; - iop.arg = pdi; - - for (i = 0; i < size; i++) { - iop.port = addr + i; - register_inout(&iop); - } - } else if (type == PCIBAR_MEM32 || type == PCIBAR_MEM64) { - /* add memory bar intercept handler */ - memp.name = pdi->pi_name; - memp.flags = MEM_F_RW; - memp.base = addr; - memp.size = size; - memp.handler = pci_emul_mem_handler; - memp.arg1 = pdi; - memp.arg2 = idx; - - error = register_mem(&memp); - assert(error == 0); - } + register_bar(pdi, idx); return (0); } @@ -1101,6 +1210,62 @@ pci_emul_cfgaddr(struct vmctx *ctx, int } INOUT_PORT(pci_cfgaddr, CONF1_ADDR_PORT, IOPORT_F_OUT, pci_emul_cfgaddr); +static uint32_t +bits_changed(uint32_t old, uint32_t new, uint32_t mask) +{ + + return ((old ^ new) & mask); +} + +static void +pci_emul_cmdwrite(struct pci_devinst *pi, uint32_t new, int bytes) +{ + int i; + uint16_t old; + + /* + * The command register is at an offset of 4 bytes and thus the + * guest could write 1, 2 or 4 bytes starting at this offset. + */ + + old = pci_get_cfgdata16(pi, PCIR_COMMAND); /* stash old value */ + CFGWRITE(pi, PCIR_COMMAND, new, bytes); /* update config */ + new = pci_get_cfgdata16(pi, PCIR_COMMAND); /* get updated value */ + + /* + * If the MMIO or I/O address space decoding has changed then + * register/unregister all BARs that decode that address space. + */ + for (i = 0; i < PCI_BARMAX; i++) { + switch (pi->pi_bar[i].type) { + case PCIBAR_NONE: + case PCIBAR_MEMHI64: + break; + case PCIBAR_IO: + /* I/O address space decoding changed? */ + if (bits_changed(old, new, PCIM_CMD_PORTEN)) { + if (porten(pi)) + register_bar(pi, i); + else + unregister_bar(pi, i); + } + break; + case PCIBAR_MEM32: + case PCIBAR_MEM64: + /* MMIO address space decoding changed? */ + if (bits_changed(old, new, PCIM_CMD_MEMEN)) { + if (memen(pi)) + register_bar(pi, i); + else + unregister_bar(pi, i); + } + break; + default: + assert(0); + } + } +} + static int pci_emul_cfgdata(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg) @@ -1108,7 +1273,7 @@ pci_emul_cfgdata(struct vmctx *ctx, int struct pci_devinst *pi; struct pci_devemu *pe; int coff, idx, needcfg; - uint64_t mask, bar; + uint64_t addr, bar, mask; assert(bytes == 1 || bytes == 2 || bytes == 4); @@ -1175,33 +1340,48 @@ pci_emul_cfgdata(struct vmctx *ctx, int if (bytes != 4 || (coff & 0x3) != 0) return (0); idx = (coff - PCIR_BAR(0)) / 4; + mask = ~(pi->pi_bar[idx].size - 1); switch (pi->pi_bar[idx].type) { case PCIBAR_NONE: - bar = 0; + pi->pi_bar[idx].addr = bar = 0; break; case PCIBAR_IO: - mask = ~(pi->pi_bar[idx].size - 1); - mask &= PCIM_BAR_IO_BASE; - bar = (*eax & mask) | PCIM_BAR_IO_SPACE; + addr = *eax & mask; + addr &= 0xffff; + bar = addr | PCIM_BAR_IO_SPACE; + /* + * Register the new BAR value for interception + */ + if (addr != pi->pi_bar[idx].addr) { + update_bar_address(pi, addr, idx, + PCIBAR_IO); + } break; case PCIBAR_MEM32: - mask = ~(pi->pi_bar[idx].size - 1); - mask &= PCIM_BAR_MEM_BASE; - bar = *eax & mask; + addr = bar = *eax & mask; bar |= PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_32; + if (addr != pi->pi_bar[idx].addr) { + update_bar_address(pi, addr, idx, + PCIBAR_MEM32); + } break; case PCIBAR_MEM64: - mask = ~(pi->pi_bar[idx].size - 1); - mask &= PCIM_BAR_MEM_BASE; - bar = *eax & mask; + addr = bar = *eax & mask; bar |= PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64 | PCIM_BAR_MEM_PREFETCH; + if (addr != (uint32_t)pi->pi_bar[idx].addr) { + update_bar_address(pi, addr, idx, + PCIBAR_MEM64); + } break; case PCIBAR_MEMHI64: mask = ~(pi->pi_bar[idx - 1].size - 1); - mask &= PCIM_BAR_MEM_BASE; - bar = ((uint64_t)*eax << 32) & mask; - bar = bar >> 32; + addr = ((uint64_t)*eax << 32) & mask; + bar = addr >> 32; + if (bar != pi->pi_bar[idx - 1].addr >> 32) { + update_bar_address(pi, addr, idx - 1, + PCIBAR_MEMHI64); + } break; default: assert(0); @@ -1210,6 +1390,8 @@ pci_emul_cfgdata(struct vmctx *ctx, int } else if (pci_emul_iscap(pi, coff)) { pci_emul_capwrite(pi, coff, bytes, *eax); + } else if (coff == PCIR_COMMAND) { + pci_emul_cmdwrite(pi, *eax, bytes); } else { CFGWRITE(pi, coff, *eax, bytes); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 02:18:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7C89A6DB; Wed, 10 Apr 2013 02:18:18 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5D894BEC; Wed, 10 Apr 2013 02:18:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A2IIt4039318; Wed, 10 Apr 2013 02:18:18 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A2IIjl039317; Wed, 10 Apr 2013 02:18:18 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304100218.r3A2IIjl039317@svn.freebsd.org> From: Neel Natu Date: Wed, 10 Apr 2013 02:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249322 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 02:18:18 -0000 Author: neel Date: Wed Apr 10 02:18:17 2013 New Revision: 249322 URL: http://svnweb.freebsd.org/changeset/base/249322 Log: Change name of variable from 'rwlock' to more descriptive 'mmio_rwlock' Requested by: grehan Obtained from: NetApp Modified: head/usr.sbin/bhyve/mem.c Modified: head/usr.sbin/bhyve/mem.c ============================================================================== --- head/usr.sbin/bhyve/mem.c Wed Apr 10 02:12:39 2013 (r249321) +++ head/usr.sbin/bhyve/mem.c Wed Apr 10 02:18:17 2013 (r249322) @@ -72,7 +72,7 @@ RB_HEAD(mmio_rb_tree, mmio_rb_range) mmi */ static struct mmio_rb_range *mmio_hint[VM_MAXCPU]; -static pthread_rwlock_t rwlock; +static pthread_rwlock_t mmio_rwlock; static int mmio_rb_range_compare(struct mmio_rb_range *a, struct mmio_rb_range *b) @@ -128,12 +128,12 @@ mmio_rb_dump(struct mmio_rb_tree *rbt) { struct mmio_rb_range *np; - pthread_rwlock_rdlock(&rwlock); + pthread_rwlock_rdlock(&mmio_rwlock); RB_FOREACH(np, mmio_rb_tree, rbt) { printf(" %lx:%lx, %s\n", np->mr_base, np->mr_end, np->mr_param.name); } - pthread_rwlock_unlock(&rwlock); + pthread_rwlock_unlock(&mmio_rwlock); } #endif @@ -167,7 +167,7 @@ emulate_mem(struct vmctx *ctx, int vcpu, struct mmio_rb_range *entry; int err; - pthread_rwlock_rdlock(&rwlock); + pthread_rwlock_rdlock(&mmio_rwlock); /* * First check the per-vCPU cache */ @@ -183,7 +183,7 @@ emulate_mem(struct vmctx *ctx, int vcpu, /* Update the per-vCPU cache */ mmio_hint[vcpu] = entry; } else if (mmio_rb_lookup(&mmio_rb_fallback, paddr, &entry)) { - pthread_rwlock_unlock(&rwlock); + pthread_rwlock_unlock(&mmio_rwlock); return (ESRCH); } } @@ -191,7 +191,7 @@ emulate_mem(struct vmctx *ctx, int vcpu, assert(entry != NULL); err = vmm_emulate_instruction(ctx, vcpu, paddr, vie, mem_read, mem_write, &entry->mr_param); - pthread_rwlock_unlock(&rwlock); + pthread_rwlock_unlock(&mmio_rwlock); return (err); } @@ -210,10 +210,10 @@ register_mem_int(struct mmio_rb_tree *rb mrp->mr_param = *memp; mrp->mr_base = memp->base; mrp->mr_end = memp->base + memp->size - 1; - pthread_rwlock_wrlock(&rwlock); + pthread_rwlock_wrlock(&mmio_rwlock); if (mmio_rb_lookup(rbt, memp->base, &entry) != 0) err = mmio_rb_add(rbt, mrp); - pthread_rwlock_unlock(&rwlock); + pthread_rwlock_unlock(&mmio_rwlock); if (err) free(mrp); } else @@ -243,7 +243,7 @@ unregister_mem(struct mem_range *memp) struct mmio_rb_range *entry = NULL; int err, i; - pthread_rwlock_wrlock(&rwlock); + pthread_rwlock_wrlock(&mmio_rwlock); err = mmio_rb_lookup(&mmio_rb_root, memp->base, &entry); if (err == 0) { mr = &entry->mr_param; @@ -257,7 +257,7 @@ unregister_mem(struct mem_range *memp) mmio_hint[i] = NULL; } } - pthread_rwlock_unlock(&rwlock); + pthread_rwlock_unlock(&mmio_rwlock); if (entry) free(entry); @@ -271,5 +271,5 @@ init_mem(void) RB_INIT(&mmio_rb_root); RB_INIT(&mmio_rb_fallback); - pthread_rwlock_init(&rwlock, NULL); + pthread_rwlock_init(&mmio_rwlock, NULL); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 02:40:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E6B16964; Wed, 10 Apr 2013 02:40:03 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DA1ACCD5; Wed, 10 Apr 2013 02:40:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A2e3D4045384; Wed, 10 Apr 2013 02:40:03 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A2e3XL045383; Wed, 10 Apr 2013 02:40:03 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201304100240.r3A2e3XL045383@svn.freebsd.org> From: David Xu Date: Wed, 10 Apr 2013 02:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249323 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 02:40:04 -0000 Author: davidxu Date: Wed Apr 10 02:40:03 2013 New Revision: 249323 URL: http://svnweb.freebsd.org/changeset/base/249323 Log: swapcontext wrapper can not be implemented in C, the stack pointer saved in the context becomes invalid when the function returns, same as setjmp, it must be implemented in assemble language, see discussions in PR misc/177624. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Wed Apr 10 02:18:17 2013 (r249322) +++ head/lib/libthr/thread/thr_sig.c Wed Apr 10 02:40:03 2013 (r249323) @@ -737,13 +737,4 @@ _setcontext(const ucontext_t *ucp) return __sys_setcontext(&uc); } -__weak_reference(_swapcontext, swapcontext); -int -_swapcontext(ucontext_t *oucp, const ucontext_t *ucp) -{ - ucontext_t uc; - - (void) memcpy(&uc, ucp, sizeof(uc)); - remove_thr_signals(&uc.uc_sigmask); - return __sys_swapcontext(oucp, &uc); -} +__weak_reference(__sys_swapcontext, swapcontext); From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 05:59:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E81712E7; Wed, 10 Apr 2013 05:59:08 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CB1C95F3; Wed, 10 Apr 2013 05:59:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A5x8YV004313; Wed, 10 Apr 2013 05:59:08 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A5x7PF004306; Wed, 10 Apr 2013 05:59:07 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304100559.r3A5x7PF004306@svn.freebsd.org> From: Neel Natu Date: Wed, 10 Apr 2013 05:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249324 - in head: sys/amd64/include sys/amd64/vmm sys/x86/x86 usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 05:59:09 -0000 Author: neel Date: Wed Apr 10 05:59:07 2013 New Revision: 249324 URL: http://svnweb.freebsd.org/changeset/base/249324 Log: Unsynchronized TSCs on the host require special handling in bhyve: - use clock_gettime(2) as the time base for the emulated ACPI timer instead of directly using rdtsc(). - don't advertise the invariant TSC capability to the guest to discourage it from using the TSC as its time base. Discussed with: jhb@ (about making 'smp_tsc' a global) Reported by: Dan Mack on freebsd-virtualization@ Obtained from: NetApp Modified: head/sys/amd64/include/clock.h head/sys/amd64/vmm/x86.c head/sys/x86/x86/tsc.c head/usr.sbin/bhyve/pmtmr.c Modified: head/sys/amd64/include/clock.h ============================================================================== --- head/sys/amd64/include/clock.h Wed Apr 10 02:40:03 2013 (r249323) +++ head/sys/amd64/include/clock.h Wed Apr 10 05:59:07 2013 (r249324) @@ -20,6 +20,9 @@ extern int i8254_max_count; extern uint64_t tsc_freq; extern int tsc_is_invariant; extern int tsc_perf_stat; +#ifdef SMP +extern int smp_tsc; +#endif void i8254_init(void); Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Wed Apr 10 02:40:03 2013 (r249323) +++ head/sys/amd64/vmm/x86.c Wed Apr 10 05:59:07 2013 (r249324) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -89,11 +90,27 @@ x86_emulate_cpuid(struct vm *vm, int vcp case CPUID_8000_0003: case CPUID_8000_0004: case CPUID_8000_0006: - case CPUID_8000_0007: case CPUID_8000_0008: cpuid_count(*eax, *ecx, regs); break; + case CPUID_8000_0007: + cpuid_count(*eax, *ecx, regs); + /* + * If the host TSCs are not synchronized across + * physical cpus then we cannot advertise an + * invariant tsc to a vcpu. + * + * XXX This still falls short because the vcpu + * can observe the TSC moving backwards as it + * migrates across physical cpus. But at least + * it should discourage the guest from using the + * TSC to keep track of time. + */ + if (!smp_tsc) + regs[3] &= ~AMDPM_TSC_INVARIANT; + break; + case CPUID_0000_0001: do_cpuid(1, regs); Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Wed Apr 10 02:40:03 2013 (r249323) +++ head/sys/x86/x86/tsc.c Wed Apr 10 05:59:07 2013 (r249324) @@ -61,7 +61,7 @@ SYSCTL_INT(_kern_timecounter, OID_AUTO, TUNABLE_INT("kern.timecounter.invariant_tsc", &tsc_is_invariant); #ifdef SMP -static int smp_tsc; +int smp_tsc; SYSCTL_INT(_kern_timecounter, OID_AUTO, smp_tsc, CTLFLAG_RDTUN, &smp_tsc, 0, "Indicates whether the TSC is safe to use in SMP mode"); TUNABLE_INT("kern.timecounter.smp_tsc", &smp_tsc); Modified: head/usr.sbin/bhyve/pmtmr.c ============================================================================== --- head/usr.sbin/bhyve/pmtmr.c Wed Apr 10 02:40:03 2013 (r249323) +++ head/usr.sbin/bhyve/pmtmr.c Wed Apr 10 05:59:07 2013 (r249324) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -53,35 +54,108 @@ __FBSDID("$FreeBSD$"); #define PMTMR_FREQ 3579545 /* 3.579545MHz */ static pthread_mutex_t pmtmr_mtx; -static uint64_t pmtmr_tscf; + static uint64_t pmtmr_old; + +static uint64_t pmtmr_tscf; static uint64_t pmtmr_tsc_old; +static clockid_t clockid = CLOCK_UPTIME_FAST; +static struct timespec pmtmr_uptime_old; + +#define timespecsub(vvp, uvp) \ + do { \ + (vvp)->tv_sec -= (uvp)->tv_sec; \ + (vvp)->tv_nsec -= (uvp)->tv_nsec; \ + if ((vvp)->tv_nsec < 0) { \ + (vvp)->tv_sec--; \ + (vvp)->tv_nsec += 1000000000; \ + } \ + } while (0) + +static uint64_t +timespec_to_pmtmr(const struct timespec *tsnew, const struct timespec *tsold) +{ + struct timespec tsdiff; + int64_t nsecs; + + tsdiff = *tsnew; + timespecsub(&tsdiff, tsold); + nsecs = tsdiff.tv_sec * 1000000000 + tsdiff.tv_nsec; + assert(nsecs >= 0); + + return (nsecs * PMTMR_FREQ / 1000000000 + pmtmr_old); +} + +static uint64_t +tsc_to_pmtmr(uint64_t tsc_new, uint64_t tsc_old) +{ + + return ((tsc_new - tsc_old) * PMTMR_FREQ / pmtmr_tscf + pmtmr_old); +} + +static void +pmtmr_init(void) +{ + size_t len; + int smp_tsc, err; + struct timespec tsnew, tsold = { 0 }; + + len = sizeof(smp_tsc); + err = sysctlbyname("kern.timecounter.smp_tsc", &smp_tsc, &len, NULL, 0); + assert(err == 0); + + if (smp_tsc) { + len = sizeof(pmtmr_tscf); + err = sysctlbyname("machdep.tsc_freq", &pmtmr_tscf, &len, + NULL, 0); + assert(err == 0); + + pmtmr_tsc_old = rdtsc(); + pmtmr_old = tsc_to_pmtmr(pmtmr_tsc_old, 0); + } else { + if (getenv("BHYVE_PMTMR_PRECISE") != NULL) + clockid = CLOCK_UPTIME; + + err = clock_gettime(clockid, &tsnew); + assert(err == 0); + + pmtmr_uptime_old = tsnew; + pmtmr_old = timespec_to_pmtmr(&tsnew, &tsold); + } +} + static uint32_t pmtmr_val(void) { + struct timespec tsnew; uint64_t pmtmr_tsc_new; uint64_t pmtmr_new; + int error; + static int inited = 0; if (!inited) { - size_t len; - - inited = 1; pthread_mutex_init(&pmtmr_mtx, NULL); - len = sizeof(pmtmr_tscf); - sysctlbyname("machdep.tsc_freq", &pmtmr_tscf, &len, - NULL, 0); - pmtmr_tsc_old = rdtsc(); - pmtmr_old = pmtmr_tsc_old / pmtmr_tscf * PMTMR_FREQ; + pmtmr_init(); + inited = 1; } pthread_mutex_lock(&pmtmr_mtx); - pmtmr_tsc_new = rdtsc(); - pmtmr_new = (pmtmr_tsc_new - pmtmr_tsc_old) * PMTMR_FREQ / pmtmr_tscf + - pmtmr_old; + + if (pmtmr_tscf) { + pmtmr_tsc_new = rdtsc(); + pmtmr_new = tsc_to_pmtmr(pmtmr_tsc_new, pmtmr_tsc_old); + pmtmr_tsc_old = pmtmr_tsc_new; + } else { + error = clock_gettime(clockid, &tsnew); + assert(error == 0); + + pmtmr_new = timespec_to_pmtmr(&tsnew, &pmtmr_uptime_old); + pmtmr_uptime_old = tsnew; + } pmtmr_old = pmtmr_new; - pmtmr_tsc_old = pmtmr_tsc_new; + pthread_mutex_unlock(&pmtmr_mtx); return (pmtmr_new); @@ -102,4 +176,3 @@ pmtmr_handler(struct vmctx *ctx, int vcp } INOUT_PORT(pmtmr, IO_PMTMR, IOPORT_F_IN, pmtmr_handler); - From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 06:21:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A5618914; Wed, 10 Apr 2013 06:21:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3205F6C2; Wed, 10 Apr 2013 06:21:00 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r3A6KxPe058989; Wed, 10 Apr 2013 10:20:59 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r3A6KxdH058988; Wed, 10 Apr 2013 10:20:59 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 10 Apr 2013 10:20:59 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r249318 - in head/sys: kern net netinet Message-ID: <20130410062059.GZ76816@FreeBSD.org> References: <201304092102.r39L2LrO047044@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201304092102.r39L2LrO047044@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 06:21:01 -0000 On Tue, Apr 09, 2013 at 09:02:21PM +0000, Andre Oppermann wrote: A> Author: andre A> Date: Tue Apr 9 21:02:20 2013 A> New Revision: 249318 A> URL: http://svnweb.freebsd.org/changeset/base/249318 A> A> Log: A> Change certain heavily used network related mutexes and rwlocks to A> reside on their own cache line to prevent false sharing with other A> nearby structures, especially for those in the .bss segment. A> A> NB: Those mutexes and rwlocks with variables next to them that get A> changed on every invocation do not benefit from their own cache line. A> Actually it may be net negative because two cache misses would be A> incurred in those cases. Although change is theoretically correct, IMO, such change should be supported by experimental performance benchmarking data. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 06:45:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AF7CEF06 for ; Wed, 10 Apr 2013 06:45:58 +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 285BE7DC for ; Wed, 10 Apr 2013 06:45:57 +0000 (UTC) Received: (qmail 91910 invoked from network); 10 Apr 2013 07:53:18 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 10 Apr 2013 07:53:18 -0000 Message-ID: <51650AA3.8060506@freebsd.org> Date: Wed, 10 Apr 2013 08:45:55 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: Jim Harris Subject: Re: svn commit: r249320 - head/sys/kern References: <201304100035.r3A0Z8rM009241@svn.freebsd.org> In-Reply-To: <201304100035.r3A0Z8rM009241@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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 06:45:58 -0000 On 10.04.2013 02:35, Jim Harris wrote: > Author: jimharris > Date: Wed Apr 10 00:35:08 2013 > New Revision: 249320 > URL: http://svnweb.freebsd.org/changeset/base/249320 > > Log: > Fix the build. > > Modified: > head/sys/kern/uipc_socket.c > > Modified: head/sys/kern/uipc_socket.c > ============================================================================== > --- head/sys/kern/uipc_socket.c Tue Apr 9 22:27:44 2013 (r249319) > +++ head/sys/kern/uipc_socket.c Wed Apr 10 00:35:08 2013 (r249320) > @@ -247,7 +247,7 @@ MTX_SYSINIT(accept_mtx, &accept_mtx, "ac > * so_global_mtx protects so_gencnt, numopensockets, and the per-socket > * so_gencnt field. > */ > -static struct so_global_mtx so_global_mtx; > +static struct mtx_padalign so_global_mtx; > MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); > > /* Dang. Thank you. I apologize and put on the pointy hat. -- Andre From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 07:01:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 68D76346; Wed, 10 Apr 2013 07:01:18 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC18865; Wed, 10 Apr 2013 07:01:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A71Hr0023817; Wed, 10 Apr 2013 07:01:17 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A71HbW023816; Wed, 10 Apr 2013 07:01:17 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304100701.r3A71HbW023816@svn.freebsd.org> From: Martin Matuska Date: Wed, 10 Apr 2013 07:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249326 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 07:01:18 -0000 Author: mm Date: Wed Apr 10 07:01:17 2013 New Revision: 249326 URL: http://svnweb.freebsd.org/changeset/base/249326 Log: Cast to (void *)(uintptr_t) on copyout and copyin of zfs_iocparm_t.zfs_cmd MFC after: 9 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Apr 10 06:21:39 2013 (r249325) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Apr 10 07:01:17 2013 (r249326) @@ -5807,7 +5807,7 @@ zfsdev_ioctl(struct cdev *dev, u_long zc error = SET_ERROR(EFAULT); goto out; } - error = ddi_copyin((void *)zc_iocparm->zfs_cmd, zc, + error = ddi_copyin((void *)(uintptr_t)zc_iocparm->zfs_cmd, zc, sizeof(zfs_cmd_t), flag); if (error != 0) { error = SET_ERROR(EFAULT); @@ -5948,7 +5948,7 @@ out: error = SET_ERROR(EFAULT); #else if (newioc) { - rc = ddi_copyout(zc, (void *)zc_iocparm->zfs_cmd, + rc = ddi_copyout(zc, (void *)(uintptr_t)zc_iocparm->zfs_cmd, sizeof (zfs_cmd_t), flag); if (error == 0 && rc != 0) error = SET_ERROR(EFAULT); From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 08:09:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9D28349B; Wed, 10 Apr 2013 08:09:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 748A9BD8; Wed, 10 Apr 2013 08:09:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A89Q9l042448; Wed, 10 Apr 2013 08:09:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A89PIA042442; Wed, 10 Apr 2013 08:09:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304100809.r3A89PIA042442@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 10 Apr 2013 08:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249327 - in head/sys: net netinet sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 08:09:26 -0000 Author: glebius Date: Wed Apr 10 08:09:25 2013 New Revision: 249327 URL: http://svnweb.freebsd.org/changeset/base/249327 Log: Fix build. Modified: head/sys/net/if_llatbl.h head/sys/net/if_var.h head/sys/netinet/in_var.h head/sys/sys/socketvar.h Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Wed Apr 10 07:01:17 2013 (r249326) +++ head/sys/net/if_llatbl.h Wed Apr 10 08:09:25 2013 (r249327) @@ -43,7 +43,7 @@ struct rt_addrinfo; struct llentry; LIST_HEAD(llentries, llentry); -extern struct rwlock lltable_rwlock; +extern struct rwlock_padalign lltable_rwlock; #define LLTABLE_RLOCK() rw_rlock(&lltable_rwlock) #define LLTABLE_RUNLOCK() rw_runlock(&lltable_rwlock) #define LLTABLE_WLOCK() rw_wlock(&lltable_rwlock) Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Apr 10 07:01:17 2013 (r249326) +++ head/sys/net/if_var.h Wed Apr 10 08:09:25 2013 (r249327) @@ -832,7 +832,7 @@ struct ifmultiaddr { #ifdef _KERNEL -extern struct rwlock ifnet_rwlock; +extern struct rwlock_padalign ifnet_rwlock; extern struct sx ifnet_sxlock; #define IFNET_LOCK_INIT() do { \ Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Wed Apr 10 07:01:17 2013 (r249326) +++ head/sys/netinet/in_var.h Wed Apr 10 08:09:25 2013 (r249327) @@ -116,7 +116,7 @@ VNET_DECLARE(u_long, in_ifaddrhmask); / #define INADDR_HASH(x) \ (&V_in_ifaddrhashtbl[INADDR_HASHVAL(x) & V_in_ifaddrhmask]) -extern struct rwlock in_ifaddr_lock; +extern struct rwlock_padalign in_ifaddr_lock; #define IN_IFADDR_LOCK_ASSERT() rw_assert(&in_ifaddr_lock, RA_LOCKED) #define IN_IFADDR_RLOCK() rw_rlock(&in_ifaddr_lock) Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Wed Apr 10 07:01:17 2013 (r249326) +++ head/sys/sys/socketvar.h Wed Apr 10 08:09:25 2013 (r249327) @@ -133,7 +133,7 @@ struct socket { * avoid defining a lock order between listen and accept sockets * until such time as it proves to be a good idea. */ -extern struct mtx accept_mtx; +extern struct mtx_padalign accept_mtx; #define ACCEPT_LOCK_ASSERT() mtx_assert(&accept_mtx, MA_OWNED) #define ACCEPT_UNLOCK_ASSERT() mtx_assert(&accept_mtx, MA_NOTOWNED) #define ACCEPT_LOCK() mtx_lock(&accept_mtx) From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 08:48:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 692ACCAA; Wed, 10 Apr 2013 08:48:11 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B9E7E21; Wed, 10 Apr 2013 08:48:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A8mBTe053968; Wed, 10 Apr 2013 08:48:11 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A8mBMp053967; Wed, 10 Apr 2013 08:48:11 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304100848.r3A8mBMp053967@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 10 Apr 2013 08:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249328 - head/usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 08:48:11 -0000 Author: trasz Date: Wed Apr 10 08:48:10 2013 New Revision: 249328 URL: http://svnweb.freebsd.org/changeset/base/249328 Log: Make ctladm(8) try to load ctl.ko kernel module if needed. Reviewed by: ken Modified: head/usr.sbin/ctladm/ctladm.c Modified: head/usr.sbin/ctladm/ctladm.c ============================================================================== --- head/usr.sbin/ctladm/ctladm.c Wed Apr 10 08:09:25 2013 (r249327) +++ head/usr.sbin/ctladm/ctladm.c Wed Apr 10 08:48:10 2013 (r249328) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3814,6 +3815,7 @@ main(int argc, char **argv) int retval, fd; int retries; int initid; + int saved_errno; retval = 0; cmdargs = CTLADM_ARG_NONE; @@ -3963,6 +3965,14 @@ main(int argc, char **argv) if ((cmdargs & CTLADM_ARG_DEVICE) && (command != CTLADM_CMD_HELP)) { fd = open(device, O_RDWR); + if (fd == -1 && errno == ENOENT) { + saved_errno = errno; + retval = kldload("ctl"); + if (retval != -1) + fd = open(device, O_RDWR); + else + errno = saved_errno; + } if (fd == -1) { fprintf(stderr, "%s: error opening %s: %s\n", argv[0], device, strerror(errno)); From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 11:26:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 86F56C92; Wed, 10 Apr 2013 11:26:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 690D185A; Wed, 10 Apr 2013 11:26:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3ABQVPC000869; Wed, 10 Apr 2013 11:26:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3ABQUda000868; Wed, 10 Apr 2013 11:26:30 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201304101126.r3ABQUda000868@svn.freebsd.org> From: Michael Tuexen Date: Wed, 10 Apr 2013 11:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249333 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 11:26:31 -0000 Author: tuexen Date: Wed Apr 10 11:26:30 2013 New Revision: 249333 URL: http://svnweb.freebsd.org/changeset/base/249333 Log: Remove the number of addresses restriction from sctp_connectx(). Remove unused code. While there, do some cleanup of the code. MFC after: 1 week Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Wed Apr 10 10:29:30 2013 (r249332) +++ head/lib/libc/net/sctp_sys_calls.c Wed Apr 10 11:26:30 2013 (r249333) @@ -48,8 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #ifndef IN6_IS_ADDR_V4MAPPED #define IN6_IS_ADDR_V4MAPPED(a) \ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ @@ -57,77 +55,8 @@ __FBSDID("$FreeBSD$"); (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff))) #endif - -#define SCTP_CONTROL_VEC_SIZE_SND 8192 #define SCTP_CONTROL_VEC_SIZE_RCV 16384 -#define SCTP_STACK_BUF_SIZE 2048 - -#ifdef SCTP_DEBUG_PRINT_ADDRESS - -#define SCTP_STRING_BUF_SZ 256 - -static void -SCTPPrintAnAddress(struct sockaddr *a) -{ - char stringToPrint[SCTP_STRING_BUF_SZ]; - u_short prt; - char *srcaddr, *txt; - - if (a == NULL) { - printf("NULL\n"); - return; - } - if (a->sa_family == AF_INET) { - srcaddr = (char *)&((struct sockaddr_in *)a)->sin_addr; - txt = "IPv4 Address: "; - prt = ntohs(((struct sockaddr_in *)a)->sin_port); - } else if (a->sa_family == AF_INET6) { - srcaddr = (char *)&((struct sockaddr_in6 *)a)->sin6_addr; - prt = ntohs(((struct sockaddr_in6 *)a)->sin6_port); - txt = "IPv6 Address: "; - } else if (a->sa_family == AF_LINK) { - int i; - char tbuf[SCTP_STRING_BUF_SZ]; - u_char adbuf[SCTP_STRING_BUF_SZ]; - struct sockaddr_dl *dl; - - dl = (struct sockaddr_dl *)a; - strncpy(tbuf, dl->sdl_data, dl->sdl_nlen); - tbuf[dl->sdl_nlen] = 0; - printf("Intf:%s (len:%d)Interface index:%d type:%x(%d) ll-len:%d ", - tbuf, - dl->sdl_nlen, - dl->sdl_index, - dl->sdl_type, - dl->sdl_type, - dl->sdl_alen - ); - memcpy(adbuf, LLADDR(dl), dl->sdl_alen); - for (i = 0; i < dl->sdl_alen; i++) { - printf("%2.2x", adbuf[i]); - if (i < (dl->sdl_alen - 1)) - printf(":"); - } - printf("\n"); - return; - } else { - return; - } - if (inet_ntop(a->sa_family, srcaddr, stringToPrint, sizeof(stringToPrint))) { - if (a->sa_family == AF_INET6) { - printf("%s%s:%d scope:%d\n", - txt, stringToPrint, prt, - ((struct sockaddr_in6 *)a)->sin6_scope_id); - } else { - printf("%s%s:%d\n", txt, stringToPrint, prt); - } - - } else { - printf("%s unprintable?\n", txt); - } -} -#endif /* SCTP_DEBUG_PRINT_ADDRESS */ static void in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) @@ -171,11 +100,10 @@ int sctp_connectx(int sd, const struct sockaddr *addrs, int addrcnt, sctp_assoc_t * id) { - char buf[SCTP_STACK_BUF_SIZE]; + char *buf; int i, ret, cnt, *aa; char *cpto; const struct sockaddr *at; - sctp_assoc_t *p_id; size_t len = sizeof(int); /* validate the address count and list */ @@ -183,24 +111,29 @@ sctp_connectx(int sd, const struct socka errno = EINVAL; return (-1); } + if ((buf = malloc(sizeof(int) + (size_t)addrcnt * sizeof(struct sockaddr_in6))) == NULL) { + errno = E2BIG; + return (-1); + } at = addrs; cnt = 0; - cpto = ((caddr_t)buf + sizeof(int)); + cpto = buf + sizeof(int); /* validate all the addresses and get the size */ for (i = 0; i < addrcnt; i++) { switch (at->sa_family) { case AF_INET: if (at->sa_len != sizeof(struct sockaddr_in)) { + free(buf); errno = EINVAL; return (-1); } memcpy(cpto, at, sizeof(struct sockaddr_in)); cpto = ((caddr_t)cpto + sizeof(struct sockaddr_in)); len += sizeof(struct sockaddr_in); - at = (struct sockaddr *)((caddr_t)at + sizeof(struct sockaddr_in)); break; case AF_INET6: if (at->sa_len != sizeof(struct sockaddr_in6)) { + free(buf); errno = EINVAL; return (-1); } @@ -213,31 +146,20 @@ sctp_connectx(int sd, const struct socka cpto = ((caddr_t)cpto + sizeof(struct sockaddr_in6)); len += sizeof(struct sockaddr_in6); } - at = (struct sockaddr *)((caddr_t)at + sizeof(struct sockaddr_in6)); break; default: + free(buf); errno = EINVAL; return (-1); } - if (len > (sizeof(buf) - sizeof(int))) { - /* Never enough memory */ - errno = E2BIG; - return (-1); - } - cnt++; - } - /* do we have any? */ - if (cnt == 0) { - errno = EINVAL; - return (-1); + at = (struct sockaddr *)((caddr_t)at + at->sa_len); } aa = (int *)buf; - *aa = cnt; + *aa = addrcnt; ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X, (void *)buf, (socklen_t) len); - if ((ret == 0) && id) { - p_id = (sctp_assoc_t *) buf; - *id = *p_id; + if ((ret == 0) && (id != NULL)) { + *id = *(sctp_assoc_t *) buf; } return (ret); } @@ -345,7 +267,6 @@ sctp_bindx(int sd, struct sockaddr *addr return (0); } - int sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t * size) { @@ -471,9 +392,9 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, void sctp_freepaddrs(struct sockaddr *addrs) { - /* Take away the hidden association id */ void *fr_addr; + /* Take away the hidden association id */ fr_addr = (void *)((caddr_t)addrs - sizeof(sctp_assoc_t)); /* Now free it */ free(fr_addr); @@ -534,15 +455,14 @@ sctp_getladdrs(int sd, sctp_assoc_t id, void sctp_freeladdrs(struct sockaddr *addrs) { - /* Take away the hidden association id */ void *fr_addr; + /* Take away the hidden association id */ fr_addr = (void *)((caddr_t)addrs - sizeof(sctp_assoc_t)); /* Now free it */ free(fr_addr); } - ssize_t sctp_sendmsg(int s, const void *data, @@ -568,11 +488,10 @@ sctp_sendmsg(int s, return (syscall(SYS_sctp_generic_sendmsg, s, data, len, to, tolen, &sinfo, 0)); #else - ssize_t sz; struct msghdr msg; - struct sctp_sndrcvinfo *s_info; + struct sctp_sndrcvinfo *sinfo; struct iovec iov; - char controlVector[SCTP_CONTROL_VEC_SIZE_RCV]; + char cmsgbuf[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; struct cmsghdr *cmsg; struct sockaddr *who = NULL; union { @@ -585,8 +504,9 @@ sctp_sendmsg(int s, errno = EINVAL; return (-1); } - if (to && (tolen > 0)) { - if (to->sa_family == AF_INET) { + if ((to != NULL) && (tolen > 0)) { + switch (to->sa_family) { + case AF_INET: if (tolen != sizeof(struct sockaddr_in)) { errno = EINVAL; return (-1); @@ -598,7 +518,8 @@ sctp_sendmsg(int s, } memcpy(&addr, to, sizeof(struct sockaddr_in)); addr.in.sin_len = sizeof(struct sockaddr_in); - } else if (to->sa_family == AF_INET6) { + break; + case AF_INET6: if (tolen != sizeof(struct sockaddr_in6)) { errno = EINVAL; return (-1); @@ -610,7 +531,8 @@ sctp_sendmsg(int s, } memcpy(&addr, to, sizeof(struct sockaddr_in6)); addr.in6.sin6_len = sizeof(struct sockaddr_in6); - } else { + break; + default: errno = EAFNOSUPPORT; return (-1); } @@ -628,26 +550,21 @@ sctp_sendmsg(int s, } msg.msg_iov = &iov; msg.msg_iovlen = 1; - msg.msg_control = (caddr_t)controlVector; - - cmsg = (struct cmsghdr *)controlVector; - + msg.msg_control = cmsgbuf; + msg.msg_controllen = CMSG_SPACE(sizeof(struct sctp_sndrcvinfo)); + cmsg = (struct cmsghdr *)cmsgbuf; cmsg->cmsg_level = IPPROTO_SCTP; cmsg->cmsg_type = SCTP_SNDRCV; cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); - s_info = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); - - s_info->sinfo_stream = stream_no; - s_info->sinfo_ssn = 0; - s_info->sinfo_flags = flags; - s_info->sinfo_ppid = ppid; - s_info->sinfo_context = context; - s_info->sinfo_assoc_id = 0; - s_info->sinfo_timetolive = timetolive; - errno = 0; - msg.msg_controllen = cmsg->cmsg_len; - sz = sendmsg(s, &msg, 0); - return (sz); + sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); + sinfo->sinfo_stream = stream_no; + sinfo->sinfo_ssn = 0; + sinfo->sinfo_flags = flags; + sinfo->sinfo_ppid = ppid; + sinfo->sinfo_context = context; + sinfo->sinfo_assoc_id = 0; + sinfo->sinfo_timetolive = timetolive; + return (sendmsg(s, &msg, 0)); #endif } @@ -662,12 +579,11 @@ sctp_getassocid(int sd, struct sockaddr siz = sizeof(sp); memset(&sp, 0, sizeof(sp)); memcpy((caddr_t)&sp.spinfo_address, sa, sa->sa_len); - errno = 0; if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_PEER_ADDR_INFO, &sp, &siz) != 0) { + /* We depend on the fact that 0 can never be returned */ return ((sctp_assoc_t) 0); } - /* We depend on the fact that 0 can never be returned */ return (sp.spinfo_assoc_id); } @@ -683,11 +599,9 @@ sctp_send(int sd, const void *data, size return (syscall(SYS_sctp_generic_sendmsg, sd, data, len, to, 0, sinfo, flags)); #else - ssize_t sz; struct msghdr msg; struct iovec iov; - struct sctp_sndrcvinfo *s_info; - char controlVector[SCTP_CONTROL_VEC_SIZE_SND]; + char cmsgbuf[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; struct cmsghdr *cmsg; if (sinfo == NULL) { @@ -697,24 +611,18 @@ sctp_send(int sd, const void *data, size iov.iov_base = (char *)data; iov.iov_len = len; - msg.msg_name = 0; + msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; - msg.msg_control = (caddr_t)controlVector; - - cmsg = (struct cmsghdr *)controlVector; - + msg.msg_control = cmsgbuf; + msg.msg_controllen = CMSG_SPACE(sizeof(struct sctp_sndrcvinfo)); + cmsg = (struct cmsghdr *)cmsgbuf; cmsg->cmsg_level = IPPROTO_SCTP; cmsg->cmsg_type = SCTP_SNDRCV; cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); - s_info = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); - /* copy in the data */ - *s_info = *sinfo; - errno = 0; - msg.msg_controllen = cmsg->cmsg_len; - sz = sendmsg(sd, &msg, flags); - return (sz); + memcpy(CMSG_DATA(cmsg), sinfo, sizeof(struct sctp_sndrcvinfo)); + return (sendmsg(sd, &msg, flags)); #endif } @@ -856,11 +764,10 @@ sctp_recvmsg(int s, return (syscall(SYS_sctp_generic_recvmsg, s, &iov, 1, from, fromlen, sinfo, msg_flags)); #else - struct sctp_sndrcvinfo *s_info; ssize_t sz; struct msghdr msg; struct iovec iov; - char controlVector[SCTP_CONTROL_VEC_SIZE_RCV]; + char cmsgbuf[SCTP_CONTROL_VEC_SIZE_RCV]; struct cmsghdr *cmsg; if (msg_flags == NULL) { @@ -877,52 +784,38 @@ sctp_recvmsg(int s, msg.msg_namelen = *fromlen; msg.msg_iov = &iov; msg.msg_iovlen = 1; - msg.msg_control = (caddr_t)controlVector; - msg.msg_controllen = sizeof(controlVector); - errno = 0; + msg.msg_control = cmsgbuf; + msg.msg_controllen = sizeof(cmsgbuf); sz = recvmsg(s, &msg, *msg_flags); *msg_flags = msg.msg_flags; if (sz <= 0) { return (sz); } - s_info = NULL; if (sinfo) { sinfo->sinfo_assoc_id = 0; } - if ((msg.msg_controllen) && sinfo) { + if ((msg.msg_controllen > 0) && (sinfo != NULL)) { /* * parse through and see if we find the sctp_sndrcvinfo (if * the user wants it). */ - cmsg = (struct cmsghdr *)controlVector; - while (cmsg) { - if ((cmsg->cmsg_len == 0) || (cmsg->cmsg_len > msg.msg_controllen)) { + for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { + if (cmsg->cmsg_level != IPPROTO_SCTP) { + continue; + } + if (cmsg->cmsg_type == SCTP_SNDRCV) { + memcpy(sinfo, CMSG_DATA(cmsg), sizeof(struct sctp_sndrcvinfo)); break; } - if (cmsg->cmsg_level == IPPROTO_SCTP) { - if (cmsg->cmsg_type == SCTP_SNDRCV) { - /* Got it */ - s_info = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); - /* Copy it to the user */ - if (sinfo) - *sinfo = *s_info; - break; - } else if (cmsg->cmsg_type == SCTP_EXTRCV) { - /* - * Got it, presumably the user has - * asked for this extra info, so the - * structure holds more room :-D - */ - s_info = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); - /* Copy it to the user */ - if (sinfo) { - memcpy(sinfo, s_info, sizeof(struct sctp_extrcvinfo)); - } - break; - - } + if (cmsg->cmsg_type == SCTP_EXTRCV) { + /* + * Let's hope that the user provided enough + * enough memory. At least he asked for more + * information. + */ + memcpy(sinfo, CMSG_DATA(cmsg), sizeof(struct sctp_extrcvinfo)); + break; } - cmsg = CMSG_NXTHDR(&msg, cmsg); } } return (sz); @@ -940,10 +833,10 @@ sctp_recvv(int sd, unsigned int *infotype, int *flags) { - char ctlbuf[SCTP_CONTROL_VEC_SIZE_RCV]; + char cmsgbuf[SCTP_CONTROL_VEC_SIZE_RCV]; struct msghdr msg; struct cmsghdr *cmsg; - ssize_t n; + ssize_t ret; struct sctp_rcvinfo *rcvinfo; struct sctp_nxtinfo *nxtinfo; @@ -964,12 +857,11 @@ sctp_recvv(int sd, } msg.msg_iov = (struct iovec *)iov; msg.msg_iovlen = iovlen; - msg.msg_control = ctlbuf; - msg.msg_controllen = sizeof(ctlbuf); - errno = 0; - n = recvmsg(sd, &msg, *flags); + msg.msg_control = cmsgbuf; + msg.msg_controllen = sizeof(cmsgbuf); + ret = recvmsg(sd, &msg, *flags); *flags = msg.msg_flags; - if ((n > 0) && + if ((ret > 0) && (msg.msg_controllen > 0) && (infotype != NULL) && (infolen != NULL) && @@ -982,41 +874,44 @@ sctp_recvv(int sd, } if (cmsg->cmsg_type == SCTP_RCVINFO) { rcvinfo = (struct sctp_rcvinfo *)CMSG_DATA(cmsg); + if (nxtinfo != NULL) { + break; + } else { + continue; + } } if (cmsg->cmsg_type == SCTP_NXTINFO) { nxtinfo = (struct sctp_nxtinfo *)CMSG_DATA(cmsg); - } - if (rcvinfo && nxtinfo) { - break; + if (rcvinfo != NULL) { + break; + } else { + continue; + } } } - if (rcvinfo) { - if (nxtinfo) { - if (*infolen >= sizeof(struct sctp_recvv_rn)) { - struct sctp_recvv_rn *rn_info; - - rn_info = (struct sctp_recvv_rn *)info; - rn_info->recvv_rcvinfo = *rcvinfo; - rn_info->recvv_nxtinfo = *nxtinfo; - *infolen = (socklen_t) sizeof(struct sctp_recvv_rn); - *infotype = SCTP_RECVV_RN; - } - } else { - if (*infolen >= sizeof(struct sctp_rcvinfo)) { - memcpy(info, rcvinfo, sizeof(struct sctp_rcvinfo)); - *infolen = (socklen_t) sizeof(struct sctp_rcvinfo); - *infotype = SCTP_RECVV_RCVINFO; - } + if (rcvinfo != NULL) { + if ((nxtinfo != NULL) && (*infolen >= sizeof(struct sctp_recvv_rn))) { + struct sctp_recvv_rn *rn_info; + + rn_info = (struct sctp_recvv_rn *)info; + rn_info->recvv_rcvinfo = *rcvinfo; + rn_info->recvv_nxtinfo = *nxtinfo; + *infolen = (socklen_t) sizeof(struct sctp_recvv_rn); + *infotype = SCTP_RECVV_RN; + } else if (*infolen >= sizeof(struct sctp_rcvinfo)) { + memcpy(info, rcvinfo, sizeof(struct sctp_rcvinfo)); + *infolen = (socklen_t) sizeof(struct sctp_rcvinfo); + *infotype = SCTP_RECVV_RCVINFO; } - } else if (nxtinfo) { - if (*infolen >= sizeof(struct sctp_rcvinfo)) { + } else if (nxtinfo != NULL) { + if (*infolen >= sizeof(struct sctp_nxtinfo)) { memcpy(info, nxtinfo, sizeof(struct sctp_nxtinfo)); *infolen = (socklen_t) sizeof(struct sctp_nxtinfo); *infotype = SCTP_RECVV_NXTINFO; } } } - return (n); + return (ret); } ssize_t @@ -1241,7 +1136,4 @@ sctp_peeloff(int sd, sctp_assoc_t assoc_ #endif - -#undef SCTP_CONTROL_VEC_SIZE_SND #undef SCTP_CONTROL_VEC_SIZE_RCV -#undef SCTP_STACK_BUF_SIZE From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 16:01:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A239A55C; Wed, 10 Apr 2013 16:01:45 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 952CE820; Wed, 10 Apr 2013 16:01:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AG1jIS083573; Wed, 10 Apr 2013 16:01:45 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AG1jZq083572; Wed, 10 Apr 2013 16:01:45 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201304101601.r3AG1jZq083572@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 10 Apr 2013 16:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249334 - head/usr.bin/ctlstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 16:01:45 -0000 Author: ken Date: Wed Apr 10 16:01:45 2013 New Revision: 249334 URL: http://svnweb.freebsd.org/changeset/base/249334 Log: Fix a time calculation error in ctlstat_standard(). ctlstat.c: When converting a timeval to a floating point number in ctlstat_standard(), cast the nanoseconds calculation to a long double, so we don't lose precision. Without the cast, we wind up with a time in whole seconds only. Sponsored by: Spectra Logic MFC after: 3 days Modified: head/usr.bin/ctlstat/ctlstat.c Modified: head/usr.bin/ctlstat/ctlstat.c ============================================================================== --- head/usr.bin/ctlstat/ctlstat.c Wed Apr 10 11:26:30 2013 (r249333) +++ head/usr.bin/ctlstat/ctlstat.c Wed Apr 10 16:01:45 2013 (r249334) @@ -416,9 +416,10 @@ ctlstat_standard(struct ctlstat_context if (F_CPU(ctx) && (getcpu(&ctx->cur_cpu) != 0)) errx(1, "error returned from getcpu()"); - cur_secs = ctx->cur_time.tv_sec + (ctx->cur_time.tv_nsec / 1000000000); + cur_secs = ctx->cur_time.tv_sec + + ((long double)ctx->cur_time.tv_nsec / 1000000000); prev_secs = ctx->prev_time.tv_sec + - (ctx->prev_time.tv_nsec / 1000000000); + ((long double)ctx->prev_time.tv_nsec / 1000000000); etime = cur_secs - prev_secs; From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 16:09:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C4BAA8B2; Wed, 10 Apr 2013 16:09:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B7CB688E; Wed, 10 Apr 2013 16:09:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AG9j3r084971; Wed, 10 Apr 2013 16:09:45 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AG9js1084970; Wed, 10 Apr 2013 16:09:45 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304101609.r3AG9js1084970@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 10 Apr 2013 16:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249335 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 16:09:45 -0000 Author: glebius Date: Wed Apr 10 16:09:45 2013 New Revision: 249335 URL: http://svnweb.freebsd.org/changeset/base/249335 Log: Since UMA_ZONE_PCPU zones put a constraint on sizeof(struct pcpu), declared as CTASSERT in MI pcpu.h, stop including all possible mutually exclusive PCPU_MD_FIELDS fields into LINT kernels, due to brekaing aforementioned CTASSERT. Modified: head/sys/powerpc/include/pcpu.h Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Wed Apr 10 16:01:45 2013 (r249334) +++ head/sys/powerpc/include/pcpu.h Wed Apr 10 16:09:45 2013 (r249335) @@ -112,7 +112,6 @@ struct pmap; #define TLBSAVE_BOOKE_R30 14 #define TLBSAVE_BOOKE_R31 15 -#ifndef COMPILING_LINT #ifdef AIM #define PCPU_MD_FIELDS \ PCPU_MD_COMMON_FIELDS \ @@ -123,12 +122,7 @@ struct pmap; PCPU_MD_COMMON_FIELDS \ PCPU_MD_BOOKE_FIELDS #endif -#else -#define PCPU_MD_FIELDS \ - PCPU_MD_COMMON_FIELDS \ - PCPU_MD_AIM_FIELDS \ - PCPU_MD_BOOKE_FIELDS -#endif + /* * Catch-all for ports (e.g. lsof, used by gtop) */ From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 17:43:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8AF2C9F3; Wed, 10 Apr 2013 17:43:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7E497D87; Wed, 10 Apr 2013 17:43:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AHhK6f014240; Wed, 10 Apr 2013 17:43:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AHhKrH014239; Wed, 10 Apr 2013 17:43:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304101743.r3AHhKrH014239@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Apr 2013 17:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249336 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 17:43:20 -0000 Author: mav Date: Wed Apr 10 17:43:20 2013 New Revision: 249336 URL: http://svnweb.freebsd.org/changeset/base/249336 Log: Add ID for ASMedia ASM1042 USB 3.0 controller. MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Wed Apr 10 16:09:45 2013 (r249335) +++ head/sys/dev/usb/controller/xhci_pci.c Wed Apr 10 17:43:20 2013 (r249336) @@ -99,6 +99,9 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x10421b21: + return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); case 0x8c318086: From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 17:51:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 106151AB; Wed, 10 Apr 2013 17:51:40 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 03F84E49; Wed, 10 Apr 2013 17:51:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AHpdnI017128; Wed, 10 Apr 2013 17:51:39 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AHpdJH017127; Wed, 10 Apr 2013 17:51:39 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201304101751.r3AHpdJH017127@svn.freebsd.org> From: Jack F Vogel Date: Wed, 10 Apr 2013 17:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249339 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 17:51:40 -0000 Author: jfv Date: Wed Apr 10 17:51:39 2013 New Revision: 249339 URL: http://svnweb.freebsd.org/changeset/base/249339 Log: Simplify allocate_legacy code, txr pointer was breaking LEGACY compile, thanks to Nick Rogers for pointing this out. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Apr 10 17:51:15 2013 (r249338) +++ head/sys/dev/e1000/if_igb.c Wed Apr 10 17:51:39 2013 (r249339) @@ -2474,7 +2474,6 @@ igb_allocate_legacy(struct adapter *adap { device_t dev = adapter->dev; struct igb_queue *que = adapter->queues; - struct tx_ring *txr = adapter->tx_rings; int error, rid = 0; /* Turn off all interrupts */ @@ -2494,7 +2493,7 @@ igb_allocate_legacy(struct adapter *adap } #ifndef IGB_LEGACY_TX - TASK_INIT(&txr->txq_task, 0, igb_deferred_mq_start, txr); + TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start, que->txr); #endif /* From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 18:53:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0C88D4E1; Wed, 10 Apr 2013 18:53:15 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F24B61F7; Wed, 10 Apr 2013 18:53:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AIrExX035931; Wed, 10 Apr 2013 18:53:14 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AIrE83035930; Wed, 10 Apr 2013 18:53:14 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304101853.r3AIrE83035930@svn.freebsd.org> From: Neel Natu Date: Wed, 10 Apr 2013 18:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249342 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 18:53:15 -0000 Author: neel Date: Wed Apr 10 18:53:14 2013 New Revision: 249342 URL: http://svnweb.freebsd.org/changeset/base/249342 Log: Remove obsolete comment about lack of locking for MMIO range lookup. Pointed out by: Tycho Nightingale (tycho.nightingale@plurisbusnetworks.com) Modified: head/usr.sbin/bhyve/mem.c Modified: head/usr.sbin/bhyve/mem.c ============================================================================== --- head/usr.sbin/bhyve/mem.c Wed Apr 10 18:13:33 2013 (r249341) +++ head/usr.sbin/bhyve/mem.c Wed Apr 10 18:53:14 2013 (r249342) @@ -30,12 +30,6 @@ * Memory ranges are represented with an RB tree. On insertion, the range * is checked for overlaps. On lookup, the key has the same base and limit * so it can be searched within the range. - * - * It is assumed that all setup of ranges takes place in single-threaded - * mode before vCPUs have been started. As such, no locks are used on the - * RB tree. If this is no longer the case, then a r/w lock could be used, - * with readers on the lookup and a writer if the tree needs to be changed - * (and per vCPU caches flushed) */ #include From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 18:59:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 186CE6AC; Wed, 10 Apr 2013 18:59:21 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0B886227; Wed, 10 Apr 2013 18:59:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AIxKKY036772; Wed, 10 Apr 2013 18:59:20 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AIxK17036771; Wed, 10 Apr 2013 18:59:20 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304101859.r3AIxK17036771@svn.freebsd.org> From: Neel Natu Date: Wed, 10 Apr 2013 18:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249343 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 18:59:21 -0000 Author: neel Date: Wed Apr 10 18:59:20 2013 New Revision: 249343 URL: http://svnweb.freebsd.org/changeset/base/249343 Log: Need to call init_mem() to really initialize the MMIO range lookups. This was working by accident because: - the RB_HEADs were being initialized to zero as part of BSS - the pthread_rwlock functions were implicitly initializing the lock object Obtained from: NetApp Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Wed Apr 10 18:53:14 2013 (r249342) +++ head/usr.sbin/bhyve/bhyverun.c Wed Apr 10 18:59:20 2013 (r249343) @@ -728,6 +728,7 @@ main(int argc, char *argv[]) exit(1); } + init_mem(); init_inout(); init_pci(ctx); if (ioapic) From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 20:26:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E5AE1DF2; Wed, 10 Apr 2013 20:26:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D6C5288C; Wed, 10 Apr 2013 20:26:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AKQssb064318; Wed, 10 Apr 2013 20:26:54 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AKQsTK064312; Wed, 10 Apr 2013 20:26:54 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304102026.r3AKQsTK064312@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 10 Apr 2013 20:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249344 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 20:26:55 -0000 Author: glebius Date: Wed Apr 10 20:26:53 2013 New Revision: 249344 URL: http://svnweb.freebsd.org/changeset/base/249344 Log: o Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations. o Provide function kvm_counter_u64_fetch() to fetch valut of a counter(9). Sponsored by: Nginx, Inc. Modified: head/lib/libkvm/Makefile head/lib/libkvm/kvm.h head/lib/libkvm/kvm_getpcpu.3 head/lib/libkvm/kvm_pcpu.c Modified: head/lib/libkvm/Makefile ============================================================================== --- head/lib/libkvm/Makefile Wed Apr 10 18:59:20 2013 (r249343) +++ head/lib/libkvm/Makefile Wed Apr 10 20:26:53 2013 (r249344) @@ -25,8 +25,10 @@ MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 \ kvm_read.3 -MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 -MLINKS+=kvm_getpcpu.3 kvm_dpcpu_setcpu.3 +MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 \ + kvm_getpcpu.3 kvm_dpcpu_setcpu.3 \ + kvm_getpcpu.3 kvm_read_zpcpu.3 \ + kvm_getpcpu.3 kvm_counter_u64_fetch MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3 MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3 MLINKS+=kvm_read.3 kvm_write.3 Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Wed Apr 10 18:59:20 2013 (r249343) +++ head/lib/libkvm/kvm.h Wed Apr 10 20:26:53 2013 (r249344) @@ -78,6 +78,7 @@ char *kvm_getfiles(kvm_t *, int, int, i int kvm_getloadavg(kvm_t *, double [], int); int kvm_getmaxcpu(kvm_t *); void *kvm_getpcpu(kvm_t *, int); +uint64_t kvm_counter_u64_fetch(kvm_t *, u_long); struct kinfo_proc * kvm_getprocs(kvm_t *, int, int, int *); int kvm_getswapinfo(kvm_t *, struct kvm_swap *, int, int); @@ -87,6 +88,7 @@ kvm_t *kvm_open kvm_t *kvm_openfiles (const char *, const char *, const char *, int, char *); ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t); +ssize_t kvm_read_zpcpu(kvm_t *, void *, u_long, size_t, int); ssize_t kvm_uread (kvm_t *, const struct kinfo_proc *, unsigned long, char *, size_t); ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t); Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Wed Apr 10 18:59:20 2013 (r249343) +++ head/lib/libkvm/kvm_getpcpu.3 Wed Apr 10 20:26:53 2013 (r249344) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2010 +.Dd April 11, 2013 .Dt KVM_GETPCPU 3 .Os .Sh NAME @@ -49,6 +49,10 @@ .Fn kvm_getmaxcpu "kvm_t *kd" .Ft void * .Fn kvm_getpcpu "kvm_t *kd" "int cpu" +.Ft ssize_t +.Fn kvm_read_zpcpu "kvm_t *kd" "void *buf" "u_long base" "size_t size" "int cpu" +.Ft uint64_t +.Fn kvm_counter_u64_fetch "kvm_t *kd" "u_long base" .Sh DESCRIPTION The .Fn kvm_dpcpu_setcpu , @@ -83,6 +87,28 @@ is not active, then .Dv NULL is returned instead. .Pp +The +.Fn kvm_read_zpcpu +function is used to obtain private per-CPU copy from a +.Dv UMA_ZONE_PCPU +.Xr zone 9 . +It takes +.Fa base +argument as base address of an allocation and copyies +.Fa size +bytes into +.Fa buf +from the part of allocation that is private to +.Fa cpu . +.Pp +The +.Fn kvm_counter_u64_fetch +function fetches value of a +.Xr counter 9 +pointed by +.Fa base +address. +.Pp Symbols for dynamic per-CPU data are accessed via .Xr kvm_nlist 3 as with other symbols. @@ -122,9 +148,16 @@ On success, the .Fn kvm_dpcpu_setcpu call returns 0; if an error occurs, it returns -1 instead. .Pp +On success, the +.Fn kvm_read_zpcpu +function returns number of bytes copied. +If an error occurs, it returns -1 instead. +.Pp If any function encounters an error, then an error message may be retrieved via .Xr kvm_geterr 3 . .Sh SEE ALSO .Xr free 3 , -.Xr kvm 3 +.Xr kvm 3 , +.Xr counter 9 , +.Xr zone 9 Modified: head/lib/libkvm/kvm_pcpu.c ============================================================================== --- head/lib/libkvm/kvm_pcpu.c Wed Apr 10 18:59:20 2013 (r249343) +++ head/lib/libkvm/kvm_pcpu.c Wed Apr 10 20:26:53 2013 (r249344) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2013 Gleb Smirnoff * Copyright (c) 2010 Juniper Networks, Inc. * Copyright (c) 2009 Robert N. M. Watson * Copyright (c) 2009 Bjoern A. Zeeb @@ -50,8 +51,12 @@ __FBSDID("$FreeBSD$"); static struct nlist kvm_pcpu_nl[] = { { .n_name = "_cpuid_to_pcpu" }, { .n_name = "_mp_maxcpus" }, + { .n_name = "_mp_ncpus" }, { .n_name = NULL }, }; +#define NL_CPUID_TO_PCPU 0 +#define NL_MP_MAXCPUS 1 +#define NL_MP_NCPUS 2 /* * Kernel per-CPU data state. We cache this stuff on the first @@ -63,9 +68,7 @@ static struct nlist kvm_pcpu_nl[] = { */ static void **pcpu_data; static int maxcpu; - -#define NL_CPUID_TO_PCPU 0 -#define NL_MP_MAXCPUS 1 +static int mp_ncpus; static int _kvm_pcpu_init(kvm_t *kd) @@ -89,6 +92,15 @@ _kvm_pcpu_init(kvm_t *kd) _kvm_err(kd, kd->program, "cannot read mp_maxcpus"); return (-1); } + if (kvm_pcpu_nl[NL_MP_NCPUS].n_value == 0) { + _kvm_err(kd, kd->program, "unable to find mp_ncpus"); + return (-1); + } + if (kvm_read(kd, kvm_pcpu_nl[NL_MP_NCPUS].n_value, &mp_ncpus, + sizeof(mp_ncpus)) != sizeof(mp_ncpus)) { + _kvm_err(kd, kd->program, "cannot read mp_ncpus"); + return (-1); + } len = max * sizeof(void *); data = malloc(len); if (data == NULL) { @@ -289,3 +301,36 @@ kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) return (_kvm_dpcpu_setcpu(kd, cpu, 1)); } + +/* + * Obtain a per-CPU copy for given cpu from UMA_ZONE_PCPU allocation. + */ +ssize_t +kvm_read_zpcpu(kvm_t *kd, void *buf, u_long base, size_t size, int cpu) +{ + + return (kvm_read(kd, (uintptr_t)(base + sizeof(struct pcpu) * cpu), + buf, size)); +} + +/* + * Fetch value of a counter(9). + */ +uint64_t +kvm_counter_u64_fetch(kvm_t *kd, u_long base) +{ + uint64_t r, c; + + if (mp_ncpus == 0) + if (_kvm_pcpu_init(kd) < 0) + return (0); + + r = 0; + for (int i = 0; i < mp_ncpus; i++) { + if (kvm_read_zpcpu(kd, &c, base, sizeof(c), i) != sizeof(c)) + return (0); + r += c; + } + + return (r); +} From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 20:29:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 40C08105; Wed, 10 Apr 2013 20:29:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 338B48B0; Wed, 10 Apr 2013 20:29:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AKTOJU064670; Wed, 10 Apr 2013 20:29:24 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AKTNF8064667; Wed, 10 Apr 2013 20:29:23 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304102029.r3AKTNF8064667@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 10 Apr 2013 20:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249345 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 20:29:24 -0000 Author: glebius Date: Wed Apr 10 20:29:23 2013 New Revision: 249345 URL: http://svnweb.freebsd.org/changeset/base/249345 Log: Use kvm_counter_u64_fetch() to fix obtaining ipstat and tcpstat from kernel core files. Sponsored by: Nginx, Inc. Modified: head/usr.bin/netstat/inet.c head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.h Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Wed Apr 10 20:26:53 2013 (r249344) +++ head/usr.bin/netstat/inet.c Wed Apr 10 20:29:23 2013 (r249345) @@ -603,8 +603,13 @@ tcp_stats(u_long off, const char *name, warn("sysctl: net.inet.tcp.stats"); return; } - } else - kread(off, &tcpstat, len); + } else { + u_long tcpstat_p[sizeof(struct tcpstat)/sizeof(uint64_t)]; + + kread(off, &tcpstat_p, sizeof(tcpstat_p)); + kread_counters(tcpstat_p, (uint64_t *)&tcpstat, + sizeof(struct tcpstat)/sizeof(uint64_t)); + } printf ("%s:\n", name); @@ -858,8 +863,13 @@ ip_stats(u_long off, const char *name, i warn("sysctl: net.inet.ip.stats"); return; } - } else - kread(off, &ipstat, len); + } else { + u_long ipstat_p[sizeof(struct ipstat)/sizeof(uint64_t)]; + + kread(off, &ipstat_p, sizeof(ipstat_p)); + kread_counters(ipstat_p, (uint64_t *)&ipstat, + sizeof(struct ipstat)/sizeof(uint64_t)); + } printf("%s:\n", name); Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Wed Apr 10 20:26:53 2013 (r249344) +++ head/usr.bin/netstat/main.c Wed Apr 10 20:29:23 2013 (r249345) @@ -147,11 +147,11 @@ static struct nlist nl[] = { #define N_IPCOMPSTAT 37 { .n_name = "_ipcompstat" }, #define N_TCPSTAT 38 - { .n_name = "_tcpstat" }, + { .n_name = "_tcpstatp" }, #define N_UDPSTAT 39 { .n_name = "_udpstat" }, #define N_IPSTAT 40 - { .n_name = "_ipstat" }, + { .n_name = "_ipstatp" }, #define N_ICMPSTAT 41 { .n_name = "_icmpstat" }, #define N_IGMPSTAT 42 @@ -696,37 +696,50 @@ printproto(struct protox *tp, const char (*pr)(off, name, af, tp->pr_protocol); } +static int +kvmd_init(void) +{ + char errbuf[_POSIX2_LINE_MAX]; + + if (kvmd != NULL) + return (0); + + kvmd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf); + setgid(getgid()); + + if (kvmd == NULL) { + warnx("kvm not available: %s", errbuf); + return (-1); + } + + if (kvm_nlist(kvmd, nl) < 0) { + if (nlistf) + errx(1, "%s: kvm_nlist: %s", nlistf, + kvm_geterr(kvmd)); + else + errx(1, "kvm_nlist: %s", kvm_geterr(kvmd)); + } + + if (nl[0].n_type == 0) { + if (nlistf) + errx(1, "%s: no namelist", nlistf); + else + errx(1, "no namelist"); + } + + return (0); +} + /* * Read kernel memory, return 0 on success. */ int kread(u_long addr, void *buf, size_t size) { - char errbuf[_POSIX2_LINE_MAX]; - if (kvmd == NULL) { - kvmd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf); - setgid(getgid()); - if (kvmd != NULL) { - if (kvm_nlist(kvmd, nl) < 0) { - if (nlistf) - errx(1, "%s: kvm_nlist: %s", nlistf, - kvm_geterr(kvmd)); - else - errx(1, "kvm_nlist: %s", kvm_geterr(kvmd)); - } + if (kvmd_init() < 0) + return (-1); - if (nl[0].n_type == 0) { - if (nlistf) - errx(1, "%s: no namelist", nlistf); - else - errx(1, "no namelist"); - } - } else { - warnx("kvm not available: %s", errbuf); - return(-1); - } - } if (!buf) return (0); if (kvm_read(kvmd, addr, buf, size) != (ssize_t)size) { @@ -736,6 +749,22 @@ kread(u_long addr, void *buf, size_t siz return (0); } +/* + * Read an array of N counters in kernel memory into array of N uint64_t's. + */ +int +kread_counters(u_long *addr, uint64_t *rval, size_t count) +{ + + if (kvmd_init() < 0) + return (-1); + + for (u_int i = 0; i < count; i++, addr++, rval++) + *rval = kvm_counter_u64_fetch(kvmd, *addr); + + return (0); +} + const char * plural(uintmax_t n) { Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Wed Apr 10 20:26:53 2013 (r249344) +++ head/usr.bin/netstat/netstat.h Wed Apr 10 20:29:23 2013 (r249345) @@ -60,6 +60,7 @@ extern int af; /* address family */ extern int live; /* true if we are examining a live system */ int kread(u_long addr, void *buf, size_t size); +int kread_counters(u_long *addr, uint64_t *rval, size_t count); const char *plural(uintmax_t); const char *plurales(uintmax_t); const char *pluralies(uintmax_t); From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 20:38:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A7594383; Wed, 10 Apr 2013 20:38:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 99CF393C; Wed, 10 Apr 2013 20:38:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AKcGC7067481; Wed, 10 Apr 2013 20:38:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AKcG2w067478; Wed, 10 Apr 2013 20:38:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304102038.r3AKcG2w067478@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Apr 2013 20:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249346 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 20:38:16 -0000 Author: mav Date: Wed Apr 10 20:38:15 2013 New Revision: 249346 URL: http://svnweb.freebsd.org/changeset/base/249346 Log: Create controller-level DMA tag, handling range of supported addresses. That simplifies logic for channels and gives the bus information about what device actually allocated the tag. Submitted by: jhb@ Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Apr 10 20:29:23 2013 (r249345) +++ head/sys/dev/ahci/ahci.c Wed Apr 10 20:38:15 2013 (r249346) @@ -452,9 +452,23 @@ ahci_attach(device_t dev) if ((ctlr->caps & AHCI_CAP_CCCS) == 0) ctlr->ccc = 0; ctlr->emloc = ATA_INL(ctlr->r_mem, AHCI_EM_LOC); + + /* Create controller-wide DMA tag. */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), 0, 0, + (ctlr->caps & AHCI_CAP_64BIT) ? BUS_SPACE_MAXADDR : + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE, + 0, NULL, NULL, &ctlr->dma_tag)) { + bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, + ctlr->r_mem); + rman_fini(&ctlr->sc_iomem); + return ENXIO; + } + ahci_ctlr_setup(dev); /* Setup interrupts. */ if (ahci_setup_interrupt(dev)) { + bus_dma_tag_destroy(ctlr->dma_tag); bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); rman_fini(&ctlr->sc_iomem); return ENXIO; @@ -544,6 +558,7 @@ ahci_detach(device_t dev) } } pci_release_msi(dev); + bus_dma_tag_destroy(ctlr->dma_tag); /* Free memory. */ rman_fini(&ctlr->sc_iomem); if (ctlr->r_mem) @@ -876,6 +891,14 @@ ahci_child_location_str(device_t dev, de return (0); } +static bus_dma_tag_t +ahci_get_dma_tag(device_t dev, device_t child) +{ + struct ahci_controller *ctlr = device_get_softc(dev); + + return (ctlr->dma_tag); +} + devclass_t ahci_devclass; static device_method_t ahci_methods[] = { DEVMETHOD(device_probe, ahci_probe), @@ -889,6 +912,7 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), { 0, 0 } }; static driver_t ahci_driver = { @@ -1198,13 +1222,9 @@ ahci_dmainit(device_t dev) struct ahci_dc_cb_args dcba; size_t rfsize; - if (ch->caps & AHCI_CAP_64BIT) - ch->dma.max_address = BUS_SPACE_MAXADDR; - else - ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT; /* Command area. */ if (bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, - ch->dma.max_address, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_WORK_SIZE, 1, AHCI_WORK_SIZE, 0, NULL, NULL, &ch->dma.work_tag)) goto error; @@ -1223,7 +1243,7 @@ ahci_dmainit(device_t dev) else rfsize = 256; if (bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, - ch->dma.max_address, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, rfsize, 1, rfsize, 0, NULL, NULL, &ch->dma.rfis_tag)) goto error; @@ -1238,7 +1258,7 @@ ahci_dmainit(device_t dev) ch->dma.rfis_bus = dcba.maddr; /* Data area. */ if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, - ch->dma.max_address, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_SG_ENTRIES * PAGE_SIZE * ch->numslots, AHCI_SG_ENTRIES, AHCI_PRD_MAX, Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Wed Apr 10 20:29:23 2013 (r249345) +++ head/sys/dev/ahci/ahci.h Wed Apr 10 20:38:15 2013 (r249346) @@ -348,7 +348,6 @@ struct ata_dma { uint8_t *rfis; /* FIS receive area */ bus_addr_t rfis_bus; /* bus address of rfis */ bus_dma_tag_t data_tag; /* data DMA tag */ - u_int64_t max_address; /* highest DMA'able address */ }; enum ahci_slot_states { @@ -453,6 +452,7 @@ struct ahci_enclosure { /* structure describing a AHCI controller */ struct ahci_controller { device_t dev; + bus_dma_tag_t dma_tag; int r_rid; struct resource *r_mem; struct rman sc_iomem; From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 22:12:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C18D6B31; Wed, 10 Apr 2013 22:12:22 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9A7F1DF7; Wed, 10 Apr 2013 22:12:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AMCMs1097063; Wed, 10 Apr 2013 22:12:22 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AMCMxk097062; Wed, 10 Apr 2013 22:12:22 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201304102212.r3AMCMxk097062@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 10 Apr 2013 22:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249347 - head/sys/cam/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 22:12:22 -0000 Author: ken Date: Wed Apr 10 22:12:21 2013 New Revision: 249347 URL: http://svnweb.freebsd.org/changeset/base/249347 Log: Add a callback to the ada(4) driver so that it knows when GEOM has released references to it. This is the functional equivalent to change r237518, which added this functionality to the cd(4) and da(4) drivers. This fix prevents a panic caused by GEOM calling adaopen() while the device is going away. We now keep the device around until GEOM has finished cleaning up its state. ata_da.c: In adaregister(), add a d_gone callback to the GEOM disk structure registered for the ada driver. Increment the peripheral reference count for GEOM. Add a new callback, adadiskgonecb(), that GEOM calls when it is done with its resources. This callback releases the reference acquired in adaregister(). Submitted by: Po-Li Soong Sponsored by: Spectra Logic MFC After: 5 days Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Apr 10 20:38:15 2013 (r249346) +++ head/sys/cam/ata/ata_da.c Wed Apr 10 22:12:21 2013 (r249347) @@ -801,6 +801,20 @@ adainit(void) } } +/* + * Callback from GEOM, called when it has finished cleaning up its + * resources. + */ +static void +adadiskgonecb(struct disk *dp) +{ + struct cam_periph *periph; + + periph = (struct cam_periph *)dp->d_drv1; + + cam_periph_release(periph); +} + static void adaoninvalidate(struct cam_periph *periph) { @@ -1157,6 +1171,7 @@ adaregister(struct cam_periph *periph, v softc->disk->d_strategy = adastrategy; softc->disk->d_getattr = adagetattr; softc->disk->d_dump = adadump; + softc->disk->d_gone = adadiskgonecb; softc->disk->d_name = "ada"; softc->disk->d_drv1 = periph; maxio = cpi.maxio; /* Honor max I/O size of SIM */ @@ -1222,6 +1237,17 @@ adaregister(struct cam_periph *periph, v } } else legacy_id = -1; + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * adadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + cam_periph_lock(periph); + return (CAM_REQ_CMP_ERR); + } disk_create(softc->disk, DISK_VERSION); cam_periph_lock(periph); cam_periph_unhold(periph); From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 23:20:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 124C17D7; Wed, 10 Apr 2013 23:20:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 04637109; Wed, 10 Apr 2013 23:20:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3ANKAOX016646; Wed, 10 Apr 2013 23:20:10 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3ANKAKw016642; Wed, 10 Apr 2013 23:20:10 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304102320.r3ANKAKw016642@svn.freebsd.org> From: Sean Bruno Date: Wed, 10 Apr 2013 23:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249348 - in head/sys: conf dev/dpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 23:20:11 -0000 Author: sbruno Date: Wed Apr 10 23:20:09 2013 New Revision: 249348 URL: http://svnweb.freebsd.org/changeset/base/249348 Log: options DPT_HANDLE_TIMEOUTS hasn't worked since dpt(4) was converted to CAM somewhere around svn r39402 to r39234. I don't know of anyone who really wants to test these changes, but they only remove the deprecated code in question. This shreds the driver down a bit and *removes* options from the kernel configs. These don't appear to be referenced in the man page, so no need to check it there. PR: kern/44587 Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/dev/dpt/dpt.h head/sys/dev/dpt/dpt_scsi.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Apr 10 22:12:21 2013 (r249347) +++ head/sys/conf/NOTES Wed Apr 10 23:20:09 2013 (r249348) @@ -1623,20 +1623,10 @@ options ISP_DEFAULT_ROLES=0 # Compaq are actually DPT controllers. # # See src/sys/dev/dpt for debugging and other subtle options. -# DPT_MEASURE_PERFORMANCE Enables a set of (semi)invasive metrics. Various +# DPT_MEASURE_PERFORMANCE Enables a set of (semi)invasive metrics. Various # instruments are enabled. The tools in # /usr/sbin/dpt_* assume these to be enabled. -# DPT_HANDLE_TIMEOUTS Normally device timeouts are handled by the DPT. -# If you want the driver to handle timeouts, enable -# this option. If your system is very busy, this -# option will create more trouble than solve. -# DPT_TIMEOUT_FACTOR Used to compute the excessive amount of time to -# wait when timing out with the above option. # DPT_DEBUG_xxxx These are controllable from sys/dev/dpt/dpt.h -# DPT_LOST_IRQ When enabled, will try, once per second, to catch -# any interrupt that got lost. Seems to help in some -# DPT-firmware/Motherboard combinations. Minimal -# cost, great benefit. # DPT_RESET_HBA Make "reset" actually reset the controller # instead of fudging it. Only enable this if you # are 100% certain you need it. @@ -1645,9 +1635,6 @@ device dpt # DPT options #!CAM# options DPT_MEASURE_PERFORMANCE -#!CAM# options DPT_HANDLE_TIMEOUTS -options DPT_TIMEOUT_FACTOR=4 -options DPT_LOST_IRQ options DPT_RESET_HBA # Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Apr 10 22:12:21 2013 (r249347) +++ head/sys/conf/options Wed Apr 10 23:20:09 2013 (r249348) @@ -534,9 +534,6 @@ NATM # DPT driver debug flags DPT_MEASURE_PERFORMANCE opt_dpt.h -DPT_HANDLE_TIMEOUTS opt_dpt.h -DPT_TIMEOUT_FACTOR opt_dpt.h -DPT_LOST_IRQ opt_dpt.h DPT_RESET_HBA opt_dpt.h # Misc debug flags. Most of these should probably be replaced with Modified: head/sys/dev/dpt/dpt.h ============================================================================== --- head/sys/dev/dpt/dpt.h Wed Apr 10 22:12:21 2013 (r249347) +++ head/sys/dev/dpt/dpt.h Wed Apr 10 23:20:09 2013 (r249348) @@ -1110,16 +1110,6 @@ typedef struct dpt_softc { #define DPT_HA_COMMAND_ACTIVE 0x00000080 #define DPT_HA_QUIET 0x00000100 -#ifdef DPT_LOST_IRQ -#define DPT_LOST_IRQ_SET 0x10000000 -#define DPT_LOST_IRQ_ACTIVE 0x20000000 -#endif - -#ifdef DPT_HANDLE_TIMEOUTS -#define DPT_HA_TIMEOUTS_SET 0x40000000 -#define DPT_HA_TIMEOUTS_ACTIVE 0x80000000 -#endif - u_int8_t primary; /* true if primary */ u_int8_t more_support :1, /* HBA supports MORE flag */ Modified: head/sys/dev/dpt/dpt_scsi.c ============================================================================== --- head/sys/dev/dpt/dpt_scsi.c Wed Apr 10 22:12:21 2013 (r249347) +++ head/sys/dev/dpt/dpt_scsi.c Wed Apr 10 23:20:09 2013 (r249348) @@ -1632,9 +1632,6 @@ dpt_intr_locked(dpt_softc_t *dpt) "clear EOC.\n Marking as LOST.\n", dccb->transaction_id); -#ifdef DPT_HANDLE_TIMEOUTS - dccb->state |= DPT_CCB_STATE_MARKED_LOST; -#endif /* This CLEARS the interrupt! */ status = dpt_inb(dpt, HA_RSTATUS); continue; @@ -2524,154 +2521,4 @@ dpt_user_cmd_done(dpt_softc_t * dpt, int return; } -#ifdef DPT_HANDLE_TIMEOUTS -/** - * This function walks down the SUBMITTED queue. - * Every request that is too old gets aborted and marked. - * Since the DPT will complete (interrupt) immediately (what does that mean?), - * We just walk the list, aborting old commands and marking them as such. - * The dpt_complete function will get rid of the that were interrupted in the - * normal manner. - * - * This function needs to run at splcam(), as it interacts with the submitted - * queue, as well as the completed and free queues. Just like dpt_intr() does. - * To run it at any ISPL other than that of dpt_intr(), will mean that dpt_intr - * willbe able to pre-empt it, grab a transaction in progress (towards - * destruction) and operate on it. The state of this transaction will be not - * very clear. - * The only other option, is to lock it only as long as necessary but have - * dpt_intr() spin-wait on it. In a UP environment this makes no sense and in - * a SMP environment, the advantage is dubvious for a function that runs once - * every ten seconds for few microseconds and, on systems with healthy - * hardware, does not do anything anyway. - */ - -static void -dpt_handle_timeouts(dpt_softc_t * dpt) -{ - dpt_ccb_t *ccb; - - if (dpt->state & DPT_HA_TIMEOUTS_ACTIVE) { - device_printf(dpt->dev, "WARNING: Timeout Handling Collision\n"); - return; - } - dpt->state |= DPT_HA_TIMEOUTS_ACTIVE; - - /* Loop through the entire submitted queue, looking for lost souls */ - TAILQ_FIRST(ccb, &&dpt->submitted_ccbs, links) { - struct scsi_xfer *xs; - u_int32_t age, max_age; - - xs = ccb->xs; - age = dpt_time_delta(ccb->command_started, microtime_now); - -#define TenSec 10000000 - - if (xs == NULL) { /* Local, non-kernel call */ - max_age = TenSec; - } else { - max_age = (((xs->timeout * (dpt->submitted_ccbs_count - + DPT_TIMEOUT_FACTOR)) - > TenSec) - ? (xs->timeout * (dpt->submitted_ccbs_count - + DPT_TIMEOUT_FACTOR)) - : TenSec); - } - - /* - * If a transaction is marked lost and is TWICE as old as we - * care, then, and only then do we destroy it! - */ - if (ccb->state & DPT_CCB_STATE_MARKED_LOST) { - /* Remember who is next */ - if (age > (max_age * 2)) { - dpt_Qremove_submitted(dpt, ccb); - ccb->state &= ~DPT_CCB_STATE_MARKED_LOST; - ccb->state |= DPT_CCB_STATE_ABORTED; -#define cmd_name scsi_cmd_name(ccb->eata_ccb.cp_scsi_cmd) - if (ccb->retries++ > DPT_RETRIES) { - device_printf(dpt->dev, - "ERROR: Destroying stale " - "%d (%s)\n" - " on " - "c%db%dt%du%d (%d/%d)\n", - ccb->transaction_id, - cmd_name, - device_get_unit(dpt->dev), - ccb->eata_ccb.cp_channel, - ccb->eata_ccb.cp_id, - ccb->eata_ccb.cp_LUN, age, - ccb->retries); -#define send_ccb &ccb->eata_ccb -#define ESA EATA_SPECIFIC_ABORT - (void) dpt_send_immediate(dpt, - send_ccb, - ESA, - 0, 0); - dpt_Qpush_free(dpt, ccb); - - /* The SCSI layer should re-try */ - xs->error |= XS_TIMEOUT; - xs->flags |= SCSI_ITSDONE; - scsi_done(xs); - } else { - device_printf(dpt->dev, - "ERROR: Stale %d (%s) on " - "c%db%dt%du%d (%d)\n" - " gets another " - "chance(%d/%d)\n", - ccb->transaction_id, - cmd_name, - device_get_unit(dpt->dev), - ccb->eata_ccb.cp_channel, - ccb->eata_ccb.cp_id, - ccb->eata_ccb.cp_LUN, - age, ccb->retries, DPT_RETRIES); - - dpt_Qpush_waiting(dpt, ccb); - dpt_sched_queue(dpt); - } - } - } else { - /* - * This is a transaction that is not to be destroyed - * (yet) But it is too old for our liking. We wait as - * long as the upper layer thinks. Not really, we - * multiply that by the number of commands in the - * submitted queue + 1. - */ - if (!(ccb->state & DPT_CCB_STATE_MARKED_LOST) && - (age != ~0) && (age > max_age)) { - device_printf(dpt->dev, - "ERROR: Marking %d (%s) on " - "c%db%dt%du%d \n" - " as late after %dusec\n", - ccb->transaction_id, - cmd_name, - device_get_unit(dpt->dev), - ccb->eata_ccb.cp_channel, - ccb->eata_ccb.cp_id, - ccb->eata_ccb.cp_LUN, age); - ccb->state |= DPT_CCB_STATE_MARKED_LOST; - } - } - } - - dpt->state &= ~DPT_HA_TIMEOUTS_ACTIVE; -} - -static void -dpt_timeout(void *arg) -{ - dpt_softc_t *dpt = (dpt_softc_t *) arg; - - mtx_assert(&dpt->lock, MA_OWNED); - if (!(dpt->state & DPT_HA_TIMEOUTS_ACTIVE)) - dpt_handle_timeouts(dpt); - - callout_reset(&dpt->timer, hz * 10, dpt_timeout, dpt); -} - -#endif /* DPT_HANDLE_TIMEOUTS */ - #endif From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 23:31:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 53389C09; Wed, 10 Apr 2013 23:31:20 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 45CCB17C; Wed, 10 Apr 2013 23:31:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3ANVKnJ021309; Wed, 10 Apr 2013 23:31:20 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3ANVKhD021308; Wed, 10 Apr 2013 23:31:20 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304102331.r3ANVKhD021308@svn.freebsd.org> From: Sean Bruno Date: Wed, 10 Apr 2013 23:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249349 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 23:31:20 -0000 Author: sbruno Date: Wed Apr 10 23:31:19 2013 New Revision: 249349 URL: http://svnweb.freebsd.org/changeset/base/249349 Log: While investigating a p/r I noted that the camcontrol devlist output for volumes behind a ciss(4) controller were being reported with malformeed names and identifiers. Repair that reporting by using the CAM values for the three SCSI indents reported via camcontrol devlist PR: kern/171650 Reviewed by: scottl Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Wed Apr 10 23:20:09 2013 (r249348) +++ head/sys/dev/ciss/ciss.c Wed Apr 10 23:31:19 2013 (r249349) @@ -3346,9 +3346,14 @@ ciss_cam_complete_fixup(struct ciss_soft cl = &sc->ciss_logical[bus][target]; - padstr(inq->vendor, "COMPAQ", 8); - padstr(inq->product, ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), 8); - padstr(inq->revision, ciss_name_ldrive_status(cl->cl_lstatus->status), 16); + padstr(inq->vendor, "COMPAQ", + SID_VENDOR_SIZE); + padstr(inq->product, + ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), + SID_PRODUCT_SIZE); + padstr(inq->revision, + ciss_name_ldrive_status(cl->cl_lstatus->status), + SID_REVISION_SIZE); } } From owner-svn-src-head@FreeBSD.ORG Wed Apr 10 23:37:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CD6C5DC1; Wed, 10 Apr 2013 23:37:15 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C04191A6; Wed, 10 Apr 2013 23:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3ANbF74022152; Wed, 10 Apr 2013 23:37:15 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3ANbFgU022151; Wed, 10 Apr 2013 23:37:15 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304102337.r3ANbFgU022151@svn.freebsd.org> From: Sean Bruno Date: Wed, 10 Apr 2013 23:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249350 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 23:37:15 -0000 Author: sbruno Date: Wed Apr 10 23:37:15 2013 New Revision: 249350 URL: http://svnweb.freebsd.org/changeset/base/249350 Log: Update ciss(4) man page. We absolutely support performant mode of operation on this controller. Indicate that the 5300 is the *only* controller that will only work in simple mode. Bus rescans should not be needed now and I consider it a bug if disks do not appear or dissapear when created or destroyed. Obtained from: Yahoo! Inc Modified: head/share/man/man4/ciss.4 Modified: head/share/man/man4/ciss.4 ============================================================================== --- head/share/man/man4/ciss.4 Wed Apr 10 23:31:19 2013 (r249349) +++ head/share/man/man4/ciss.4 Wed Apr 10 23:37:15 2013 (r249350) @@ -62,14 +62,11 @@ control protocol from earlier Compaq ada .Pp Currently .Nm -only supports the +supports the .Dq simple -transport layer over PCI. -This interface (ab)uses the I2O register set (specifically the post -queues) to exchange commands with the adapter. -Other interfaces are available, but we are not supposed to know about them, -and it is dubious whether they would provide major performance improvements -except under extreme load. +and +.Dq performant +transport layer. .Pp Non-disk devices (such as internal DATs and devices attached to the external SCSI bus) are supported as normal CAM devices @@ -82,8 +79,8 @@ Direct Access devices (such as disk drives) are only exposed as .Xr pass 4 devices. -Hot-insertion and removal of devices is supported but a bus -rescan might be necessary. +Hot-insertion and removal of devices is supported and notification messages +will be reported to the console and logs. .Pp The problem which adapter freezes with the message .Dq ADAPTER HEARTBEAT FAILED @@ -97,7 +94,7 @@ driver include: .Pp .Bl -bullet -compact .It -Compaq Smart Array 5300 +Compaq Smart Array 5300 (simple mode only) .It Compaq Smart Array 532 .It From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 01:59:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2DBD997C; Thu, 11 Apr 2013 01:59:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 05D1B890; Thu, 11 Apr 2013 01:59:05 +0000 (UTC) Received: from glenbarber.us (nucleus.glenbarber.us [IPv6:2001:470:8:1205:2:2:ff:29]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 229E423F804; Wed, 10 Apr 2013 21:59:03 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.8.2 onyx.glenbarber.us 229E423F804 Authentication-Results: onyx.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Wed, 10 Apr 2013 21:59:00 -0400 From: Glen Barber To: Gleb Smirnoff Subject: Re: svn commit: r249344 - head/lib/libkvm Message-ID: <20130411015900.GB1539@glenbarber.us> References: <201304102026.r3AKQsTK064312@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <201304102026.r3AKQsTK064312@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 01:59:05 -0000 --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 10, 2013 at 08:26:54PM +0000, Gleb Smirnoff wrote: > Modified: head/lib/libkvm/kvm.h > ============================================================================== > --- head/lib/libkvm/kvm.h Wed Apr 10 18:59:20 2013 (r249343) > +++ head/lib/libkvm/kvm.h Wed Apr 10 20:26:53 2013 (r249344) > @@ -78,6 +78,7 @@ char *kvm_getfiles(kvm_t *, int, int, i > int kvm_getloadavg(kvm_t *, double [], int); > int kvm_getmaxcpu(kvm_t *); > void *kvm_getpcpu(kvm_t *, int); > +uint64_t kvm_counter_u64_fetch(kvm_t *, u_long); This seems to break the build. Glen --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJRZhjkAAoJEFJPDDeguUajybgH/3EBQEsjxucXqy62xRTe9nIy 8TrBA9mCwf24RFhAMGPcR4QDottaxDLkoQ5I4birDiQJhKgm67IefzUfo1tdfheX S+RsagLep9bxQG/osE098i4rbRiANjUVUkvLKak9F9UQBYKcvhrjfLS7O+0ON2ns 0S5kTJ1pRoJnJdoZ8MUG38ukpKM3qFey3aO+3D5EA0tuMewjKyaWmRdAg/StewBX RYf27O52ZOzFiu+DKYHUm8R2haYLYrd3hXA2Iwg0Pp0s35vJg/vvc1ju7G1ZbWbi ryVsAQoh1Ouzg6Tm/2pMuQTqj/II7dbFIEhnK+24ZUvQPdWWS6W76lyRD+OJtI8= =qfSi -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 04:29:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1B186AE7; Thu, 11 Apr 2013 04:29:46 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0D31EE6E; Thu, 11 Apr 2013 04:29:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3B4TjBv011472; Thu, 11 Apr 2013 04:29:45 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3B4TjWx011469; Thu, 11 Apr 2013 04:29:45 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304110429.r3B4TjWx011469@svn.freebsd.org> From: Neel Natu Date: Thu, 11 Apr 2013 04:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249351 - in head/sys: amd64/vmm/intel x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 04:29:46 -0000 Author: neel Date: Thu Apr 11 04:29:45 2013 New Revision: 249351 URL: http://svnweb.freebsd.org/changeset/base/249351 Log: Make the code to check if VMX is enabled more readable by using macros instead of magic numbers. Discussed with: Chris Torek Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/x86/include/specialreg.h Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Wed Apr 10 23:37:15 2013 (r249350) +++ head/sys/amd64/vmm/intel/vmx.c Thu Apr 11 04:29:45 2013 (r249351) @@ -441,7 +441,8 @@ vmx_init(void) * are set (bits 0 and 2 respectively). */ feature_control = rdmsr(MSR_IA32_FEATURE_CONTROL); - if ((feature_control & 0x5) != 0x5) { + if ((feature_control & IA32_FEATURE_CONTROL_LOCK) == 0 || + (feature_control & IA32_FEATURE_CONTROL_VMX_EN) == 0) { printf("vmx_init: VMX operation disabled by BIOS\n"); return (ENXIO); } Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Wed Apr 10 23:37:15 2013 (r249350) +++ head/sys/x86/include/specialreg.h Thu Apr 11 04:29:45 2013 (r249351) @@ -418,6 +418,11 @@ #define APICBASE_ENABLED 0x00000800 #define APICBASE_ADDRESS 0xfffff000 +/* MSR_IA32_FEATURE_CONTROL related */ +#define IA32_FEATURE_CONTROL_LOCK 0x01 /* lock bit */ +#define IA32_FEATURE_CONTROL_SMX_EN 0x02 /* enable VMX inside SMX */ +#define IA32_FEATURE_CONTROL_VMX_EN 0x04 /* enable VMX outside SMX */ + /* * PAT modes. */ From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 06:34:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 328ABDE4; Thu, 11 Apr 2013 06:34:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 25F6F28E; Thu, 11 Apr 2013 06:34:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3B6Yf0N049832; Thu, 11 Apr 2013 06:34:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3B6Yf5t049831; Thu, 11 Apr 2013 06:34:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304110634.r3B6Yf5t049831@svn.freebsd.org> From: Alexander Motin Date: Thu, 11 Apr 2013 06:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249352 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 06:34:42 -0000 Author: mav Date: Thu Apr 11 06:34:41 2013 New Revision: 249352 URL: http://svnweb.freebsd.org/changeset/base/249352 Log: Do not sent 120 TEST UNIT READY requests on generic NOT READY statuses. Some failing disks tend to return vendor-specific ASC/ASCQ codes with NOT READY sense key. It caused extremely long recovery attempts, repeating these 120 TURs (it takes at least 1 minute) for every I/O request. Instead of that use default error handling, doing just few retries. Reviewed by: ken, gibbs MFC after: 1 month Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Thu Apr 11 04:29:45 2013 (r249351) +++ head/sys/cam/scsi/scsi_all.c Thu Apr 11 06:34:41 2013 (r249352) @@ -699,10 +699,7 @@ const struct sense_key_table_entry sense { { SSD_KEY_NO_SENSE, SS_NOP, "NO SENSE" }, { SSD_KEY_RECOVERED_ERROR, SS_NOP|SSQ_PRINT_SENSE, "RECOVERED ERROR" }, - { - SSD_KEY_NOT_READY, SS_TUR|SSQ_MANY|SSQ_DECREMENT_COUNT|EBUSY, - "NOT READY" - }, + { SSD_KEY_NOT_READY, SS_RDEF, "NOT READY" }, { SSD_KEY_MEDIUM_ERROR, SS_RDEF, "MEDIUM ERROR" }, { SSD_KEY_HARDWARE_ERROR, SS_RDEF, "HARDWARE FAILURE" }, { SSD_KEY_ILLEGAL_REQUEST, SS_FATAL|EINVAL, "ILLEGAL REQUEST" }, @@ -877,7 +874,7 @@ static struct asc_table_entry asc_table[ { SST(0x03, 0x02, SS_RDEF, "Excessive write errors") }, /* DTLPWROMAEBKVF */ - { SST(0x04, 0x00, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EIO, + { SST(0x04, 0x00, SS_RDEF, "Logical unit not ready, cause not reportable") }, /* DTLPWROMAEBKVF */ { SST(0x04, 0x01, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EBUSY, From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 07:06:55 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D2BEF65E; Thu, 11 Apr 2013 07:06:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id 7110D3F0; Thu, 11 Apr 2013 07:06:55 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3B76iCs014378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Apr 2013 17:06:46 +1000 Date: Thu, 11 Apr 2013 17:06:44 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Kenneth D. Merry" Subject: Re: svn commit: r249334 - head/usr.bin/ctlstat In-Reply-To: <201304101601.r3AG1jZq083572@svn.freebsd.org> Message-ID: <20130411163712.Y1200@besplex.bde.org> References: <201304101601.r3AG1jZq083572@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Ov0XUFDt c=1 sm=1 a=jrZi4plbApYA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=ns49S-B92uUA:10 a=YHl7f7u7s7nfAW9j7NkA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 07:06:55 -0000 On Wed, 10 Apr 2013, Kenneth D. Merry wrote: > Log: > Fix a time calculation error in ctlstat_standard(). > > ctlstat.c: When converting a timeval to a floating point > number in ctlstat_standard(), cast the nanoseconds > calculation to a long double, so we don't lose > precision. Without the cast, we wind up with a > time in whole seconds only. > ... > Modified: head/usr.bin/ctlstat/ctlstat.c > ============================================================================== > --- head/usr.bin/ctlstat/ctlstat.c Wed Apr 10 11:26:30 2013 (r249333) > +++ head/usr.bin/ctlstat/ctlstat.c Wed Apr 10 16:01:45 2013 (r249334) > @@ -416,9 +416,10 @@ ctlstat_standard(struct ctlstat_context > if (F_CPU(ctx) && (getcpu(&ctx->cur_cpu) != 0)) > errx(1, "error returned from getcpu()"); > > - cur_secs = ctx->cur_time.tv_sec + (ctx->cur_time.tv_nsec / 1000000000); > + cur_secs = ctx->cur_time.tv_sec + > + ((long double)ctx->cur_time.tv_nsec / 1000000000); > prev_secs = ctx->prev_time.tv_sec + > - (ctx->prev_time.tv_nsec / 1000000000); > + ((long double)ctx->prev_time.tv_nsec / 1000000000); > > etime = cur_secs - prev_secs; long double is rarely necessary. It mainly asks for slowness (10-50%) on i386 and extreme slowness (hundreds of times slower) on space64. Double precision is plenty. Many arches in FreeBSD have long double == double, so you can't depend on long double being more precise than double, and statistics utilities are especially not in need of much precision. (Float precision would be enough here. It would be accurate to 1/16 of a microsecond. Not to 1 nanosecond, but you don't need that. The integer division was only accurate to 1/4 second, so ist error was noticeable.) There is no need for any casts. There is no need for any divisions. Simply multiply by 1 nanosecond. This must be in floating point, since integers can't represent 1 nanosecond (neither can floating, but the error of ~2**-53 nanosecnds for double precision is neglogible). When 1 nanosecond is in a floating point literal, the whole expression is automatically promoted correctly. Other style bugs in the above: - non-KNF indentation (1 tab) for the newly split line - different non-KNF indentation (5 spaces) for the previously split line - exessive parentheses around the division operation - bogus blank line which splits up the etime initialization - general verboseness from the above. Fixing these gives: cur_secs = ctx->cur_time.tv_sec + ctx->cur_time.tv_nsec * 1e-9; prev_secs = ctx->prev_time.tv_sec + ctx->prev_time.tv_nsec * 1e-9 etime = cur_secs - prev_secs; It is now clear that this is still too verbose, since cur_secs and prev_secs are not used except to initialize etime. Simplifying this gives: etime = ctx->cur_time.tv_sec - ctx->prev_time.tv_sec + (ctx->prev_time.tv_nsec - ctx->cur_time.tv_nsec) * 1e-9; This might need casting to double of ctx->cur_time.tv_sec, in case time_t is unsigned and the time went backwards. Otherwise, this should be the usual expression for subtracting timespecs. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 07:30:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 65860B54; Thu, 11 Apr 2013 07:30:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3D7AA6D6; Thu, 11 Apr 2013 07:30:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3B7Uo0K067303; Thu, 11 Apr 2013 07:30:50 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3B7Uo6d067302; Thu, 11 Apr 2013 07:30:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304110730.r3B7Uo6d067302@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 11 Apr 2013 07:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249355 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 07:30:50 -0000 Author: glebius Date: Thu Apr 11 07:30:49 2013 New Revision: 249355 URL: http://svnweb.freebsd.org/changeset/base/249355 Log: Include types.h for C99 uintXX_t types. Modified: head/lib/libkvm/kvm.h Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Thu Apr 11 07:02:27 2013 (r249354) +++ head/lib/libkvm/kvm.h Thu Apr 11 07:30:49 2013 (r249355) @@ -34,7 +34,7 @@ #define _KVM_H_ #include -#include +#include #include /* Default version symbol. */ From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 07:40:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC55EDA5; Thu, 11 Apr 2013 07:40:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BF3D77A3; Thu, 11 Apr 2013 07:40:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3B7eVrm068798; Thu, 11 Apr 2013 07:40:31 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3B7eV13068797; Thu, 11 Apr 2013 07:40:31 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304110740.r3B7eV13068797@svn.freebsd.org> From: Martin Matuska Date: Thu, 11 Apr 2013 07:40:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249356 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 07:40:31 -0000 Author: mm Date: Thu Apr 11 07:40:30 2013 New Revision: 249356 URL: http://svnweb.freebsd.org/changeset/base/249356 Log: MFV r249354: Merge bugfixes accepted and integrated by vendor. Underlying problems have been reported by us and fixed in r240942 and r249196. Illumos ZFS issues: 3645 dmu_send_impl: possibilty of pool hold leak 3692 Panic on zfs receive of a recursive deduplicated stream MFC after: 8 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Apr 11 07:30:49 2013 (r249355) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Apr 11 07:40:30 2013 (r249356) @@ -1692,7 +1692,7 @@ add_ds_to_guidmap(const char *name, avl_ err = dsl_pool_hold(name, FTAG, &dp); if (err != 0) return (err); - gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP); + gmep = kmem_alloc(sizeof (*gmep), KM_SLEEP); err = dsl_dataset_hold_obj(dp, snapobj, gmep, &snapds); if (err == 0) { gmep->guid = snapds->ds_phys->ds_guid; @@ -1700,7 +1700,7 @@ add_ds_to_guidmap(const char *name, avl_ avl_add(guid_map, gmep); dsl_dataset_long_hold(snapds, gmep); } else - kmem_free(gmep, sizeof (guid_map_entry_t)); + kmem_free(gmep, sizeof (*gmep)); dsl_pool_rele(dp, FTAG); return (err); From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 07:49:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E63188F; Thu, 11 Apr 2013 07:49:16 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BDD45810; Thu, 11 Apr 2013 07:49:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3B7nGO5071589; Thu, 11 Apr 2013 07:49:16 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3B7nGxR071588; Thu, 11 Apr 2013 07:49:16 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304110749.r3B7nGxR071588@svn.freebsd.org> From: Martin Matuska Date: Thu, 11 Apr 2013 07:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249357 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 07:49:17 -0000 Author: mm Date: Thu Apr 11 07:49:16 2013 New Revision: 249357 URL: http://svnweb.freebsd.org/changeset/base/249357 Log: Fix libzfs to report error instead of returning zero if trying to hold or release a non-existing snapshot of a existing dataset. In recursive case error is reported if no snapshots with the requested name have been found. Problem and proposed solution reported to illumos: 3699 zfs hold or release of a non-existent snapshot does not output error MFC after: 8 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 11 07:40:30 2013 (r249356) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 11 07:49:16 2013 (r249357) @@ -4203,6 +4203,17 @@ zfs_hold(zfs_handle_t *zhp, const char * ha.tag = tag; ha.recursive = recursive; (void) zfs_hold_one(zfs_handle_dup(zhp), &ha); + + if (nvlist_next_nvpair(ha.nvl, NULL) == NULL) { + fnvlist_free(ha.nvl); + ret = ENOENT; + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, "cannot hold snapshot '%s@%s'"), + zhp->zfs_name, snapname); + (void) zfs_standard_error(hdl, ret, errbuf); + return (ret); + } + ret = lzc_hold(ha.nvl, cleanup_fd, &errors); fnvlist_free(ha.nvl); @@ -4304,12 +4315,25 @@ zfs_release(zfs_handle_t *zhp, const cha nvlist_t *errors; nvpair_t *elem; libzfs_handle_t *hdl = zhp->zfs_hdl; + char errbuf[1024]; ha.nvl = fnvlist_alloc(); ha.snapname = snapname; ha.tag = tag; ha.recursive = recursive; (void) zfs_release_one(zfs_handle_dup(zhp), &ha); + + if (nvlist_next_nvpair(ha.nvl, NULL) == NULL) { + fnvlist_free(ha.nvl); + ret = ENOENT; + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, + "cannot release hold from snapshot '%s@%s'"), + zhp->zfs_name, snapname); + (void) zfs_standard_error(hdl, ret, errbuf); + return (ret); + } + ret = lzc_release(ha.nvl, &errors); fnvlist_free(ha.nvl); @@ -4318,8 +4342,6 @@ zfs_release(zfs_handle_t *zhp, const cha if (nvlist_next_nvpair(errors, NULL) == NULL) { /* no hold-specific errors */ - char errbuf[1024]; - (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot release")); switch (errno) { @@ -4336,8 +4358,6 @@ zfs_release(zfs_handle_t *zhp, const cha for (elem = nvlist_next_nvpair(errors, NULL); elem != NULL; elem = nvlist_next_nvpair(errors, elem)) { - char errbuf[1024]; - (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot release hold from snapshot '%s'"), From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 07:59:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6D15A98A; Thu, 11 Apr 2013 07:59:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id DCE208D9; Thu, 11 Apr 2013 07:59:33 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3B7xOXI002983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Apr 2013 17:59:26 +1000 Date: Thu, 11 Apr 2013 17:59:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r249355 - head/lib/libkvm In-Reply-To: <201304110730.r3B7Uo6d067302@svn.freebsd.org> Message-ID: <20130411175308.Q1435@besplex.bde.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Ov0XUFDt c=1 sm=1 a=YIxocstYFt4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=iKLQVopRUfNpZhVUvFYA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 07:59:34 -0000 > Log: > Include types.h for C99 uintXX_t types. This adds namespace pollution that was carefully left out. > Modified: > head/lib/libkvm/kvm.h > > Modified: head/lib/libkvm/kvm.h > ============================================================================== > --- head/lib/libkvm/kvm.h Thu Apr 11 07:02:27 2013 (r249354) > +++ head/lib/libkvm/kvm.h Thu Apr 11 07:30:49 2013 (r249355) > @@ -34,7 +34,7 @@ > #define _KVM_H_ > > #include > -#include The __uintXX_t types are declared here, and should be used, like the __Xsize_t types already are. > +#include > #include > > /* Default version symbol. */ > Hmm, I never got around to committing the cleaning of . It only takes 1 forward declaration and perhaps fixing clients that depend on the pollution. % Index: kvm.h % =================================================================== % RCS file: /home/ncvs/src/lib/libkvm/kvm.h,v % retrieving revision 1.16 % diff -u -2 -r1.16 kvm.h % --- kvm.h 13 Oct 2003 04:44:55 -0000 1.16 % +++ kvm.h 13 Oct 2003 04:46:29 -0000 % @@ -40,5 +40,4 @@ % #include % #include % -#include % % /* Default version symbol. */ % @@ -59,4 +58,5 @@ % % struct kinfo_proc; % +struct nlist; % struct proc; % Bruce From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 08:24:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 89C32E78; Thu, 11 Apr 2013 08:24:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1727DA0B; Thu, 11 Apr 2013 08:24:58 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r3B8OwCF067953; Thu, 11 Apr 2013 12:24:58 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r3B8OwrF067952; Thu, 11 Apr 2013 12:24:58 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 11 Apr 2013 12:24:57 +0400 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r249355 - head/lib/libkvm Message-ID: <20130411082457.GS76816@FreeBSD.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130411175308.Q1435@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 08:24:59 -0000 Bruce, On Thu, Apr 11, 2013 at 05:59:24PM +1000, Bruce Evans wrote: B> > Modified: B> > head/lib/libkvm/kvm.h B> > B> > Modified: head/lib/libkvm/kvm.h B> > ============================================================================== B> > --- head/lib/libkvm/kvm.h Thu Apr 11 07:02:27 2013 (r249354) B> > +++ head/lib/libkvm/kvm.h Thu Apr 11 07:30:49 2013 (r249355) B> > @@ -34,7 +34,7 @@ B> > #define _KVM_H_ B> > B> > #include B> > -#include B> B> The __uintXX_t types are declared here, and should be used, like the B> __Xsize_t types already are. Why non-standard types should be used instead of standard ones? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 08:49:12 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 82A525C7; Thu, 11 Apr 2013 08:49:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 00349B1F; Thu, 11 Apr 2013 08:49:11 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3B8n226002839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Apr 2013 18:49:03 +1000 Date: Thu, 11 Apr 2013 18:49:02 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r249355 - head/lib/libkvm In-Reply-To: <20130411082457.GS76816@FreeBSD.org> Message-ID: <20130411184049.W1641@besplex.bde.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=S7iBW/QP c=1 sm=1 a=YIxocstYFt4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=k2ckYh4kuC5l7K2a6UQA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 08:49:12 -0000 On Thu, 11 Apr 2013, Gleb Smirnoff wrote: > On Thu, Apr 11, 2013 at 05:59:24PM +1000, Bruce Evans wrote: > B> > Modified: > B> > head/lib/libkvm/kvm.h > B> > > B> > Modified: head/lib/libkvm/kvm.h > B> > ============================================================================== > B> > --- head/lib/libkvm/kvm.h Thu Apr 11 07:02:27 2013 (r249354) > B> > +++ head/lib/libkvm/kvm.h Thu Apr 11 07:30:49 2013 (r249355) > B> > @@ -34,7 +34,7 @@ > B> > #define _KVM_H_ > B> > > B> > #include > B> > -#include > B> > B> The __uintXX_t types are declared here, and should be used, like the > B> __Xsize_t types already are. > > Why non-standard types should be used instead of standard ones? Sometimes because the namespace doesn't allow the standard ones, but here I was just saying to typedef just the standard ones that you need (only uint64_t?) as is done for size_t and ssize_t. Including also turns the careful ifdefs for the latter into no-ops. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 09:14:20 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9F461CCB; Thu, 11 Apr 2013 09:14:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2A2E5CE8; Thu, 11 Apr 2013 09:14:19 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r3B9EIIS068388; Thu, 11 Apr 2013 13:14:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r3B9EIlQ068387; Thu, 11 Apr 2013 13:14:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 11 Apr 2013 13:14:18 +0400 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r249355 - head/lib/libkvm Message-ID: <20130411091418.GW76816@FreeBSD.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130411184049.W1641@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 09:14:20 -0000 On Thu, Apr 11, 2013 at 06:49:02PM +1000, Bruce Evans wrote: B> > On Thu, Apr 11, 2013 at 05:59:24PM +1000, Bruce Evans wrote: B> > B> > Modified: B> > B> > head/lib/libkvm/kvm.h B> > B> > B> > B> > Modified: head/lib/libkvm/kvm.h B> > B> > ============================================================================== B> > B> > --- head/lib/libkvm/kvm.h Thu Apr 11 07:02:27 2013 (r249354) B> > B> > +++ head/lib/libkvm/kvm.h Thu Apr 11 07:30:49 2013 (r249355) B> > B> > @@ -34,7 +34,7 @@ B> > B> > #define _KVM_H_ B> > B> > B> > B> > #include B> > B> > -#include B> > B> B> > B> The __uintXX_t types are declared here, and should be used, like the B> > B> __Xsize_t types already are. B> > B> > Why non-standard types should be used instead of standard ones? B> B> Sometimes because the namespace doesn't allow the standard ones, but B> here I was just saying to typedef just the standard ones that you need B> (only uint64_t?) as is done for size_t and ssize_t. Including B> also turns the careful ifdefs for the latter into B> no-ops. What was the reason to avoid including types.h and typedefing size_t and ssize_t manually? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 09:42:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 375AC608; Thu, 11 Apr 2013 09:42:52 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id EEB04E68; Thu, 11 Apr 2013 09:42:51 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 3D45D1A3CE1; Thu, 11 Apr 2013 02:42:45 -0700 (PDT) Message-ID: <51668589.2040509@mu.org> Date: Thu, 11 Apr 2013 02:42:33 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Alexander Motin Subject: Re: svn commit: r249352 - head/sys/cam/scsi References: <201304110634.r3B6Yf5t049831@svn.freebsd.org> In-Reply-To: <201304110634.r3B6Yf5t049831@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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 09:42:52 -0000 woohoo! -Alfred On 4/10/13 11:34 PM, Alexander Motin wrote: > Author: mav > Date: Thu Apr 11 06:34:41 2013 > New Revision: 249352 > URL: http://svnweb.freebsd.org/changeset/base/249352 > > Log: > Do not sent 120 TEST UNIT READY requests on generic NOT READY statuses. > > Some failing disks tend to return vendor-specific ASC/ASCQ codes with > NOT READY sense key. It caused extremely long recovery attempts, repeating > these 120 TURs (it takes at least 1 minute) for every I/O request. > Instead of that use default error handling, doing just few retries. > > Reviewed by: ken, gibbs > MFC after: 1 month > > Modified: > head/sys/cam/scsi/scsi_all.c > > Modified: head/sys/cam/scsi/scsi_all.c > ============================================================================== > --- head/sys/cam/scsi/scsi_all.c Thu Apr 11 04:29:45 2013 (r249351) > +++ head/sys/cam/scsi/scsi_all.c Thu Apr 11 06:34:41 2013 (r249352) > @@ -699,10 +699,7 @@ const struct sense_key_table_entry sense > { > { SSD_KEY_NO_SENSE, SS_NOP, "NO SENSE" }, > { SSD_KEY_RECOVERED_ERROR, SS_NOP|SSQ_PRINT_SENSE, "RECOVERED ERROR" }, > - { > - SSD_KEY_NOT_READY, SS_TUR|SSQ_MANY|SSQ_DECREMENT_COUNT|EBUSY, > - "NOT READY" > - }, > + { SSD_KEY_NOT_READY, SS_RDEF, "NOT READY" }, > { SSD_KEY_MEDIUM_ERROR, SS_RDEF, "MEDIUM ERROR" }, > { SSD_KEY_HARDWARE_ERROR, SS_RDEF, "HARDWARE FAILURE" }, > { SSD_KEY_ILLEGAL_REQUEST, SS_FATAL|EINVAL, "ILLEGAL REQUEST" }, > @@ -877,7 +874,7 @@ static struct asc_table_entry asc_table[ > { SST(0x03, 0x02, SS_RDEF, > "Excessive write errors") }, > /* DTLPWROMAEBKVF */ > - { SST(0x04, 0x00, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EIO, > + { SST(0x04, 0x00, SS_RDEF, > "Logical unit not ready, cause not reportable") }, > /* DTLPWROMAEBKVF */ > { SST(0x04, 0x01, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EBUSY, > From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 10:14:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AF0B1B65; Thu, 11 Apr 2013 10:14:28 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A0D9CF81; Thu, 11 Apr 2013 10:14:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BAES3J016784; Thu, 11 Apr 2013 10:14:28 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BAESql016783; Thu, 11 Apr 2013 10:14:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304111014.r3BAESql016783@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 11 Apr 2013 10:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249358 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 10:14:28 -0000 Author: glebius Date: Thu Apr 11 10:14:28 2013 New Revision: 249358 URL: http://svnweb.freebsd.org/changeset/base/249358 Log: Fix typo. Modified: head/lib/libkvm/Makefile Modified: head/lib/libkvm/Makefile ============================================================================== --- head/lib/libkvm/Makefile Thu Apr 11 07:49:16 2013 (r249357) +++ head/lib/libkvm/Makefile Thu Apr 11 10:14:28 2013 (r249358) @@ -28,7 +28,7 @@ MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 \ kvm_getpcpu.3 kvm_dpcpu_setcpu.3 \ kvm_getpcpu.3 kvm_read_zpcpu.3 \ - kvm_getpcpu.3 kvm_counter_u64_fetch + kvm_getpcpu.3 kvm_counter_u64_fetch.3 MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3 MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3 MLINKS+=kvm_read.3 kvm_write.3 From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 11:07:37 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5E5CD600; Thu, 11 Apr 2013 11:07:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail27.syd.optusnet.com.au (mail27.syd.optusnet.com.au [211.29.133.168]) by mx1.freebsd.org (Postfix) with ESMTP id F1E3E235; Thu, 11 Apr 2013 11:07:36 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail27.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3BB7Pmh031990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Apr 2013 21:07:28 +1000 Date: Thu, 11 Apr 2013 21:07:25 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r249355 - head/lib/libkvm In-Reply-To: <20130411091418.GW76816@FreeBSD.org> Message-ID: <20130411201652.F1911@besplex.bde.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> <20130411091418.GW76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=S7iBW/QP c=1 sm=1 a=YIxocstYFt4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=Q6GEI8Ml7t8wZdQY7fMA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 11:07:37 -0000 On Thu, 11 Apr 2013, Gleb Smirnoff wrote: > On Thu, Apr 11, 2013 at 06:49:02PM +1000, Bruce Evans wrote: > B> > On Thu, Apr 11, 2013 at 05:59:24PM +1000, Bruce Evans wrote: > B> > B> > Modified: > B> > B> > head/lib/libkvm/kvm.h > B> > B> > > B> > B> > Modified: head/lib/libkvm/kvm.h > B> > B> > ============================================================================== > B> > B> > --- head/lib/libkvm/kvm.h Thu Apr 11 07:02:27 2013 (r249354) > B> > B> > +++ head/lib/libkvm/kvm.h Thu Apr 11 07:30:49 2013 (r249355) > B> > B> > @@ -34,7 +34,7 @@ > B> > B> > #define _KVM_H_ > B> > B> > > B> > B> > #include > B> > B> > -#include > B> > B> > B> > B> The __uintXX_t types are declared here, and should be used, like the > B> > B> __Xsize_t types already are. > B> > > B> > Why non-standard types should be used instead of standard ones? > B> > B> Sometimes because the namespace doesn't allow the standard ones, but > B> here I was just saying to typedef just the standard ones that you need > B> (only uint64_t?) as is done for size_t and ssize_t. Including > B> also turns the careful ifdefs for the latter into > B> no-ops. > > What was the reason to avoid including types.h and typedefing size_t > and ssize_t manually? Just routine avoidance of namespace pollution. This is easy in such a simple header. In 4.4BSD, kvm.h only included nlist.h and (redundantly) sys/cdefs.h. Its read/write functions returned int and took unsigned count args, with the latter not abbreviated as u_int, so it didn't need size_t or ssize_t and didn't depend on sys/types.h. FreeBSD broke this by using size_t and ssize_t for its read/write functions, without even polluting it by including sys/types.h, so it grew a dependency on sys/types.h. Its old and new dependencies were and remain undocumented. I fixed this using the typedefs (the old 4.4BSD ones in , where many fewer than now had underscored versions but ones for these 2 were already there). I was fixing lots of namespace pollution at the time including automatically detecting new prerequisites but not new pollution for many headers. So its namespace grew minimally. Its old and new namespace were and remain undocumented. If it were a POSIX header, then it would be specified to to declare size_t and ssize_t and to reserve kvm_, and not much else. Except newer versions of POSIX tend to be broken and say "the foo.h header may make visible all of the symbols in [a long list of headers]". POSIX has always allowed all symbols ending in _t to be declared as a typedef in any header, so including sys/types.h would not be not namespace pollution for it. However, FreeBSD's sys/types.h declares many other symbols. So many that they are hard to list and harder to document. The list of symbols declared in or reserved for for kvm.h is fairly short: - size_t, ssize_t and kvm_*, as above - all symbols in nlist.h. This is a bug, but nlist.h is fairly clean - VRS_SYM and VRS_KEY. These probably shouldn't be public. They are not documented in kvm.h of course. - struct tags kinfo_proc and proc - struct member names ksw_* - SWIF_DEV_PREFIX. This is needed for using kvm_getswapinfo(), but it is not documented. More precisely, it is misdocumented as "the flags argument is currently unused and must be 0", but the flags argument is used for this flag. This flag is passed mainly by pstat/pstat.c. Your change to use uint64_t without declaring it gave a new prerequisite just like the old change that I fixed. It is interesting that the problem was found much more quickly. It lived for 3 months in 1998. Now there is the tinderbox to find such problems, and apparently less pollution that hides them. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 12:24:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4B65F980; Thu, 11 Apr 2013 12:24:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 24C6886E; Thu, 11 Apr 2013 12:24:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BCOUL5056220; Thu, 11 Apr 2013 12:24:30 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BCOUaI056219; Thu, 11 Apr 2013 12:24:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304111224.r3BCOUaI056219@svn.freebsd.org> From: Eitan Adler Date: Thu, 11 Apr 2013 12:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249359 - head/usr.bin/fstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 12:24:30 -0000 Author: eadler Date: Thu Apr 11 12:24:29 2013 New Revision: 249359 URL: http://svnweb.freebsd.org/changeset/base/249359 Log: fuser(1) requires a filename. Reviewed by: lstewart Approved by: bcr (mentor) MFC after: 3 days Modified: head/usr.bin/fstat/fuser.1 Modified: head/usr.bin/fstat/fuser.1 ============================================================================== --- head/usr.bin/fstat/fuser.1 Thu Apr 11 10:14:28 2013 (r249358) +++ head/usr.bin/fstat/fuser.1 Thu Apr 11 12:24:29 2013 (r249359) @@ -36,7 +36,7 @@ .Op Fl M Ar core .Op Fl N Ar system .Op Fl s Ar signal -.Op Ar +.Ar .Sh DESCRIPTION The .Nm From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 12:49:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 42DC9E3E; Thu, 11 Apr 2013 12:49:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1BB0A991; Thu, 11 Apr 2013 12:49:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BCngQN062738; Thu, 11 Apr 2013 12:49:42 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BCngFQ062737; Thu, 11 Apr 2013 12:49:42 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201304111249.r3BCngFQ062737@svn.freebsd.org> From: Ed Maste Date: Thu, 11 Apr 2013 12:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249360 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 12:49:43 -0000 Author: emaste Date: Thu Apr 11 12:49:42 2013 New Revision: 249360 URL: http://svnweb.freebsd.org/changeset/base/249360 Log: Remove unused atomic header Modified: head/lib/libc/stdio/fwalk.c Modified: head/lib/libc/stdio/fwalk.c ============================================================================== --- head/lib/libc/stdio/fwalk.c Thu Apr 11 12:24:29 2013 (r249359) +++ head/lib/libc/stdio/fwalk.c Thu Apr 11 12:49:42 2013 (r249360) @@ -37,7 +37,6 @@ static char sccsid[] = "@(#)fwalk.c 8.1 __FBSDID("$FreeBSD$"); #include -#include #include #include "local.h" #include "glue.h" From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 13:05:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D7A82348; Thu, 11 Apr 2013 13:05:38 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CAA7EA3F; Thu, 11 Apr 2013 13:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BD5cr8068395; Thu, 11 Apr 2013 13:05:38 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BD5cmp068393; Thu, 11 Apr 2013 13:05:38 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304111305.r3BD5cmp068393@svn.freebsd.org> From: Joel Dahl Date: Thu, 11 Apr 2013 13:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249361 - in head: lib/libkvm share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 13:05:38 -0000 Author: joel (doc committer) Date: Thu Apr 11 13:05:38 2013 New Revision: 249361 URL: http://svnweb.freebsd.org/changeset/base/249361 Log: Remove EOL whitespace. Modified: head/lib/libkvm/kvm_getpcpu.3 head/share/man/man4/ciss.4 Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Thu Apr 11 12:49:42 2013 (r249360) +++ head/lib/libkvm/kvm_getpcpu.3 Thu Apr 11 13:05:38 2013 (r249361) @@ -94,7 +94,7 @@ function is used to obtain private per-C .Xr zone 9 . It takes .Fa base -argument as base address of an allocation and copyies +argument as base address of an allocation and copyies .Fa size bytes into .Fa buf Modified: head/share/man/man4/ciss.4 ============================================================================== --- head/share/man/man4/ciss.4 Thu Apr 11 12:49:42 2013 (r249360) +++ head/share/man/man4/ciss.4 Thu Apr 11 13:05:38 2013 (r249361) @@ -80,7 +80,7 @@ drives) are only exposed as .Xr pass 4 devices. Hot-insertion and removal of devices is supported and notification messages -will be reported to the console and logs. +will be reported to the console and logs. .Pp The problem which adapter freezes with the message .Dq ADAPTER HEARTBEAT FAILED From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 16:24:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 683D171F; Thu, 11 Apr 2013 16:24:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 57A9A786; Thu, 11 Apr 2013 16:24:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BGOgx1028916; Thu, 11 Apr 2013 16:24:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BGOaio028873; Thu, 11 Apr 2013 16:24:36 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201304111624.r3BGOaio028873@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 11 Apr 2013 16:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249367 - in head: cddl/contrib/opensolaris/cmd/dtrace cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs cddl/contrib/opensol... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 16:24:42 -0000 Author: pfg Date: Thu Apr 11 16:24:36 2013 New Revision: 249367 URL: http://svnweb.freebsd.org/changeset/base/249367 Log: DTrace: option for time-ordered output Merge changes from illumos: 3021 option for time-ordered output from dtrace(1M) 3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work 3025 register leak in D code generation 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider This brings yet another feature implemented in upstream DTrace. A complete description is available here: http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/ This change bumps the DT_VERS_* number to 1.9.1 in accordance to what is done in illumos. This change was somewhat complicated because upstream is mixed many changes in an individual commit and some of the tests don't really apply to us. There are also appear to be differences in timestamping with Solaris so we had to workaround some assertions making sure no regression happened. Special thanks to Fabian Keil for changes and testing. Illumos Revisions: 13758:23432da34147 Reference: https://www.illumos.org/issues/3021 https://www.illumos.org/issues/3022 https://www.illumos.org/issues/3023 https://www.illumos.org/issues/3024 https://www.illumos.org/issues/3025 https://www.illumos.org/issues/1694 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 months Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/ - copied from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.dyn.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/tst.dyn.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out - copied unchanged from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pq.c - copied, changed from r249291, vendor/illumos/dist/lib/libdtrace/common/dt_pq.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pq.h - copied unchanged from r249314, vendor/illumos/dist/lib/libdtrace/common/dt_pq.h Deleted: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/predicates/tst.predcache.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c head/cddl/lib/libdtrace/Makefile head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Thu Apr 11 16:24:36 2013 (r249367) @@ -23,8 +23,9 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ #include #include @@ -1409,6 +1410,7 @@ main(int argc, char *argv[]) (void) dtrace_setopt(g_dtp, "bufsize", "4m"); (void) dtrace_setopt(g_dtp, "aggsize", "4m"); #endif + (void) dtrace_setopt(g_dtp, "temporal", "yes"); /* * If -G is specified, enable -xlink=dynamic and -xunodefs to permit Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Thu Apr 11 16:24:36 2013 (r249367) @@ -583,6 +583,8 @@ if ($opt_x) { die "$PNAME: failed to open $PNAME.$$.log: $!\n" unless (!$opt_l || open(LOG, ">$PNAME.$$.log")); +$ENV{'DTRACE_DEBUG_REGSET'} = 'true'; + if ($opt_g) { $ENV{'UMEM_DEBUG'} = 'default,verbose'; $ENV{'UMEM_LOGGING'} = 'fail,contents'; Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d) @@ -0,0 +1,35 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +/* + * Make sure the sizes of compatible keys doesn't affect the sort order. + */ + +BEGIN +{ + @[(int)1, 0] = sum(10); + @[(uint64_t)2, 0] = sum(20); + @[(int)3, 0] = sum(30); + @[(uint64_t)4, 0] = sum(40); + printa(@); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out) @@ -0,0 +1,6 @@ + + 1 0 10 + 2 0 20 + 3 0 30 + 4 0 40 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out) @@ -0,0 +1,8 @@ +The value of i is 6 +The value of i is 18 +The value of i is 72 +The value of i is 25920 +The value of i is 935761216 +The value of i is -91738734 +The value of i is -91738729 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d) @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Test compile-time casting between integer types of different size. + */ + +#pragma D option quiet + +int64_t x; + +BEGIN +{ + x = (int32_t)(int16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (int32_t)(uint16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(int16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(uint16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + printf("\n"); + + x = (int16_t)(int32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (int16_t)(uint32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(int32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(uint32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out) @@ -0,0 +1,10 @@ +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fffffff0 4294967280 4294967280 + fff0 65520 65520 + +fffffffffffffff0 -16 18446744073709551600 +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fff0 65520 65520 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d) @@ -0,0 +1,36 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Test narrowing at assignment. + */ + +#pragma D option quiet + +uint16_t x; +uint32_t y; + +BEGIN +{ + x = 0xbeefcafe; + y = x; + printf("%x", y); /* where's the beef? */ + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out) @@ -0,0 +1 @@ +cafe Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d) @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Test execution-time casting between integer types of different size. + */ + +#pragma D option quiet + +int64_t x; + +BEGIN +{ + z = 0xfff0; + + x = (int32_t)(int16_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (int32_t)(uint16_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(int16_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(uint16_t)z; + printf("%16x %20d %20u\n", x, x, x); + printf("\n"); + + x = (int16_t)(int32_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (int16_t)(uint32_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(int32_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(uint32_t)z; + printf("%16x %20d %20u\n", x, x, x); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out) @@ -0,0 +1,10 @@ +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fffffff0 4294967280 4294967280 + fff0 65520 65520 + +fffffffffffffff0 -16 18446744073709551600 +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fff0 65520 65520 + Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d Thu Apr 11 16:24:36 2013 (r249367) @@ -23,26 +23,29 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: * Positive test for fill buffer policy. * * SECTION: Buffers and Buffering/fill Policy; - * Buffers and Buffering/Buffer Sizes; + * Buffers and Buffering/Buffer Sizes; * Options and Tunables/bufsize; * Options and Tunables/bufpolicy; * Options and Tunables/statusrate */ /* - * This is a brute-force way of testing fill buffers. We assume that each - * printf() stores 8 bytes. Because each fill buffer is per-CPU, we must - * fill up our buffer in one series of enablings on a single CPU. + * This is a brute-force way of testing fill buffers. We assume that + * each printf() stores 16 bytes (4x 32-bit words for EPID, timestamp + * lo, timestamp hi, and the variable i). Because each fill buffer is + * per-CPU, we must fill up our buffer in one series of enablings on a + * single CPU. */ #pragma D option bufpolicy=fill -#pragma D option bufsize=64 +#pragma D option bufsize=128 #pragma D option statusrate=10ms #pragma D option quiet Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d Thu Apr 11 16:24:36 2013 (r249367) @@ -23,8 +23,9 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -37,19 +38,20 @@ */ /* - * We make some regrettable assumptions about the implementation in this test. - * First, we assume that each entry for the printf() of an int takes _exactly_ - * eight bytes (four bytes for the EPID, four bytes for the payload). Second, - * we assume that by allocating storage for n + 1 records, we will get exactly - * n. Here is why: the final predicate that evaluates to false will reserve - * space that it won't use. This act of reservation will advance the wrapped - * offset. That record won't be subsequently used, but the wrapped offset has - * advanced. (And in this case, that old record is clobbered by the exit() - * anyway.) Thirdly: we rely on t_cpu/cpu_id. Finally: we rely on being - * able to run on the CPU that we first ran on. + * We make some regrettable assumptions about the implementation in this + * test. First, we assume that each entry for the printf() of an int + * takes _exactly_ 16 bytes (4 bytes for the EPID, 8 bytes for the + * timestamp, 4 bytes for the payload). Second, we assume that by + * allocating storage for n + 1 records, we will get exactly n. Here is + * why: the final predicate that evaluates to false will reserve space + * that it won't use. This act of reservation will advance the wrapped + * offset. That record won't be subsequently used, but the wrapped + * offset has advanced. (And in this case, that old record is clobbered + * by the exit() anyway.) Thirdly: we rely on t_cpu/cpu_id. Finally: + * we rely on being able to run on the CPU that we first ran on. */ #pragma D option bufpolicy=ring -#pragma D option bufsize=40 +#pragma D option bufsize=80 #pragma D option quiet int n; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh Thu Apr 11 16:24:36 2013 (r249367) @@ -24,7 +24,9 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" + +# +# Copyright (c) 2012 by Delphix. All rights reserved. # if [ $# != 1 ]; then @@ -49,13 +51,13 @@ tick-1s tick-1s /(i % 2) == 0/ { - system("dtrace -c date -ln 'pid\$target::main:entry' >/dev/null"); + system("dtrace -c date -n 'pid\$target::main:entry' >/dev/null"); } tick-1s /(i % 2) == 1/ { - system("dtrace -c date -ln 'pid\$target::main:return' >/dev/null"); + system("dtrace -c date -n 'pid\$target::main:return' >/dev/null"); } EOF Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d) @@ -0,0 +1,28 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + *((int *)alloca(4)) = 1; +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + this->a = alloca(4); + *((int *)this->a) = 1; +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh) @@ -0,0 +1,106 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +############################################################################ +# ASSERTION: +# temporal option causes output to be sorted +# +# SECTION: Pragma +# +# NOTES: The temporal option has no effect on a single-CPU system, so +# this needs to be run on a multi-CPU system to effectively test the +# temporal option. +# +############################################################################ + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +file=/tmp/out.$$ + +rm -f $file + +$dtrace -o $file -c 'sleep 3' -s /dev/stdin < $file.2 + +sort -n $file.2 | diff $file.2 - +status=$? +if [ "$status" -ne 0 ]; then + echo $tst: output is not sorted + exit $status +fi + +head -n 1 $file.2 | grep begin >/dev/null +status=$? +if [ "$status" -ne 0 ]; then + echo $tst: begin probe did not fire + exit $status +fi + +tail -n 2 $file.2 | grep end >/dev/null +status=$? +if [ "$status" -ne 0 ]; then + echo $tst: end probe did not fire + exit $status +fi + +if [ $(tail -n 1 $file.2 | cut -f3 -d ' ') -ne \ + $(wc -l $file.2) ]; then + echo $tst: incorrect number of lines output + exit 1 +fi + +exit $status Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh) @@ -0,0 +1,102 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +############################################################################ +# ASSERTION: +# temporal option causes output to be sorted, even when some +# buffers are empty +# +# SECTION: Pragma +# +# NOTES: The temporal option has no effect on a single-CPU system, so +# this needs to be run on a multi-CPU system to effectively test the +# temporal option. +# +############################################################################ + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +file=/tmp/out.$$ + +rm -f $file + +$dtrace -o $file -s /dev/stdin < $file.2 + +sort -n $file.2 | diff $file.2 - +status=$? +if [ "$status" -ne 0 ]; then + echo $tst: output is not sorted + exit $status +fi + +exit $status Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d) @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * This test excercises the "remnant" handling of the temporal option. + * At the end of one pass of retrieving and printing data from all CPUs, + * some unprocessed data will remain, because its timestamp is after the + * time covered by all CPUs' buffers. This unprocessed data is + * rearranged in a more space-efficient manner. If this is done + * incorrectly, an alignment error may occur. To test this, we use a + * high-frequency probe so that data will be recorded in subsequent + * CPU's buffers after the first CPU's buffer is obtained. The + * combination of data traced here (a 8-byte value and a 4-byte value) + * is effective to cause alignment problems with an incorrect + * implementation. + * + * This test needs to be run on a multi-CPU system to be effective. + */ + +#pragma D option quiet +#pragma D option temporal + +profile-4997 +{ + printf("%u %u", 1ULL, 2); +} + +tick-1 +/i++ == 10/ +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.dyn.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.dyn.d) @@ -0,0 +1,28 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + print(*curpsinfo); +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d) @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +typedef struct pancakes { + int i; + string s; + timespec_t t; +} pancakes_t; + +translator pancakes_t < void *V > { + i = 2 * 10; + s = strjoin("I like ", "pancakes"); + t = *(timespec_t *)`dtrace_zero; +}; + +BEGIN +{ + print(*(xlate < pancakes_t * > ((void *)NULL))); +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d.out) @@ -0,0 +1,8 @@ +pancakes_t { + int i = 0x14 + string s = [ "I like pancakes" ] + timespec_t t = { + time_t tv_sec = 0 + long tv_nsec = 0 + } +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out Thu Apr 11 16:24:36 2013 (r249367) @@ -1,6 +1,6 @@ -239 -52719 +-17 +-12817 -1867788817 1311768467294899695 Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d) @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Check %d v. %i v. %u. + */ + +#pragma D option quiet + +uint16_t x; +int16_t y; + +BEGIN +{ + x = 0xffffffff; + y = 0xffffffff; + + printf("%d %i %u\n", x, x, x); + printf("%d %i %u\n", y, y, y); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d.out) @@ -0,0 +1,3 @@ +65535 -1 65535 +-1 -1 65535 + Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d Thu Apr 11 16:24:36 2013 (r249367) @@ -24,7 +24,10 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + /* * ASSERTION: @@ -35,17 +38,10 @@ * * NOTES: This test behaves differently depending on the values * assigned to bufsize. - * 1. 0 > bufsize. - * 2. 0 == bufsize. - * 3. 0 < bufsize <= 7 - * 4. 8 <= bufsize <= 31 - * 5. 32 <= bufsize <= 47 - * 6. 48 <= bufsize <= 71 - * 7. 72 <= bufsize */ #pragma D option quiet -#pragma D option bufsize=41 +#pragma D option bufsize=49 BEGIN { Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d Thu Apr 11 15:59:18 2013 (r249366) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d Thu Apr 11 16:24:36 2013 (r249367) @@ -24,7 +24,10 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + /* * ASSERTION: * Verify the behavior of speculations with changes in specsize. @@ -35,7 +38,7 @@ */ #pragma D option quiet -#pragma D option specsize=40 +#pragma D option specsize=48 BEGIN { Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/tst.dyn.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/tst.dyn.d) @@ -0,0 +1,28 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + trace(*curpsinfo); +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh (from r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh Thu Apr 11 16:24:36 2013 (r249367, copy of r249291, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh) @@ -0,0 +1,62 @@ +# +# 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 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Test the output for stable translations. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -v -s /dev/stdin < (curthread); + +#pragma D attributes Stable/Stable/Common myinfo + +BEGIN +{ + this->a = myinfo->pr_flag; + exit(0); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 16:50:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CAAB2BDD; Thu, 11 Apr 2013 16:50:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BC816971; Thu, 11 Apr 2013 16:50:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BGowGQ037514; Thu, 11 Apr 2013 16:50:58 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BGow28037513; Thu, 11 Apr 2013 16:50:58 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304111650.r3BGow28037513@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 16:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249368 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 16:50:58 -0000 Author: np Date: Thu Apr 11 16:50:58 2013 New Revision: 249368 URL: http://svnweb.freebsd.org/changeset/base/249368 Log: Set and display the IP fragment bit correctly when dealing with the filter mode. MFC after: 3 days. Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Thu Apr 11 16:24:36 2013 (r249367) +++ head/tools/tools/cxgbetool/cxgbetool.c Thu Apr 11 16:50:58 2013 (r249368) @@ -867,6 +867,9 @@ get_filter_mode(void) if (mode & T4_FILTER_IP_DPORT) printf("dport "); + if (mode & T4_FILTER_IP_FRAGMENT) + printf("frag "); + if (mode & T4_FILTER_MPS_HIT_TYPE) printf("matchtype "); @@ -886,7 +889,7 @@ get_filter_mode(void) printf("vlan "); if (mode & T4_FILTER_VNIC) - printf("vnic "); + printf("vnic/ovlan "); if (mode & T4_FILTER_PORT) printf("iport "); @@ -905,6 +908,9 @@ set_filter_mode(int argc, const char *ar uint32_t mode = 0; for (; argc; argc--, argv++) { + if (!strcmp(argv[0], "frag")) + mode |= T4_FILTER_IP_FRAGMENT; + if (!strcmp(argv[0], "matchtype")) mode |= T4_FILTER_MPS_HIT_TYPE; From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 17:16:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B2CDC37A; Thu, 11 Apr 2013 17:16:09 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A4ECABFC; Thu, 11 Apr 2013 17:16:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BHG9YD044702; Thu, 11 Apr 2013 17:16:09 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BHG9ma044701; Thu, 11 Apr 2013 17:16:09 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201304111716.r3BHG9ma044701@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 11 Apr 2013 17:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249369 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 17:16:09 -0000 Author: gavin Date: Thu Apr 11 17:16:08 2013 New Revision: 249369 URL: http://svnweb.freebsd.org/changeset/base/249369 Log: - Add entries for alc and akoszek, alredy referenced elsewhere - Add phk -> mux relationship, confirmed by mux@ - Add scottl -> sbruno relationship - Move four ex-committers to the alumni section - Sort. Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Apr 11 16:50:58 2013 (r249368) +++ head/share/misc/committers-src.dot Thu Apr 11 17:16:08 2013 (r249369) @@ -45,6 +45,7 @@ cjc [label="Crist J. Clark\ncjc@FreeBSD. dds [label="Diomidis Spinellis\ndds@FreeBSD.org\n2003/06/20\n2010/09/22"] dhartmei [label="Daniel Hartmeier\ndhartmei@FreeBSD.org\n2004/04/06\n2008/12/08"] dmlb [label="Duncan Barclay\ndmlb@FreeBSD.org\n2001/12/14\n2008/11/10"] +dougb [label="Doug Barton\ndougb@FreeBSD.org\n2000/10/26\n2012/10/08"] eik [label="Oliver Eikemeier\neik@FreeBSD.org\n2004/05/20\n2008/11/10"] furuta [label="Atsushi Furuta\nfuruta@FreeBSD.org\n2000/06/21\n2003/03/08"] groudier [label="Gerard Roudier\ngroudier@FreeBSD.org\n1999/12/30\n2006/04/06"] @@ -71,6 +72,7 @@ nate [label="Nate Willams\nnate@FreeBSD. njl [label="Nate Lawson\nnjl@FreeBSD.org\n2002/08/07\n2008/02/16"] non [label="Noriaki Mitsnaga\nnon@FreeBSD.org\n2000/06/19\n2007/03/06"] onoe [label="Atsushi Onoe\nonoe@FreeBSD.org\n2000/07/21\n2008/11/10"] +rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2007/01/31\n2012/07/23"] randi [label="Randi Harper\nrandi@FreeBSD.org\n2010/04/20\n2012/05/10"] rgrimes [label="Rod Grimes\nrgrimes@FreeBSD.org\n1993/06/12\n2003/03/08"] rink [label="Rink Springer\nrink@FreeBSD.org\n2006/01/16\n2010/11/04"] @@ -85,7 +87,9 @@ tmm [label="Thomas Moestl\ntmm@FreeBSD.o toshi [label="Toshihiko Arai\ntoshi@FreeBSD.org\n2000/07/06\n2003/03/08"] tshiozak [label="Takuya SHIOZAKI\ntshiozak@FreeBSD.org\n2001/04/25\n2003/03/08"] uch [label="UCHIYAMA Yasushi\nuch@FreeBSD.org\n2000/06/21\n2002/04/24"] +wilko [label="Wilko Bulte\nwilko@FreeBSD.org\n2000/01/13\n2013/01/17"] yar [label="Yar Tikhiy\nyar@FreeBSD.org\n2001/03/25\n2012/05/23"] +zack [label="Zack Kirsch\nzack@FreeBSD.org\n2010/11/05\n2012/09/08"] node [color=lightblue2, style=filled, bgcolor=black]; @@ -97,6 +101,7 @@ achim [label="Achim Leubner\nachim@FreeB adrian [label="Adrian Chadd\nadrian@FreeBSD.org\n2000/07/03"] ae [label="Andrey V. Elsukov\nae@FreeBSD.org\n2010/06/03"] akiyama [label="Shunsuke Akiyama\nakiyama@FreeBSD.org\n2000/06/19"] +alc [label="Alan Cox\nalc@FreeBSD.org\n1999/02/23"] ambrisko [label="Doug Ambrisko\nambrisko@FreeBSD.org\n2001/12/19"] anchie [label="Ana Kukec\nanchie@FreeBSD.org\n2010/04/14"] andre [label="Andre Oppermann\nandre@FreeBSD.org\n2003/11/12"] @@ -132,7 +137,6 @@ des [label="Dag-Erling Smorgrav\ndes@Fre dfr [label="Doug Rabson\ndfr@FreeBSD.org\n????/??/??"] dg [label="David Greenman\ndg@FreeBSD.org\n1993/06/14"] dim [label="Dimitry Andric\ndim@FreeBSD.org\n2010/08/30"] -dougb [label="Doug Barton\ndougb@FreeBSD.org\n2000/10/26"] dteske [label="Devin Teske\ndteske@FreeBSD.org\n2012/04/10"] dumbbell [label="Jean-Sebastien Pedron\ndumbbell@FreeBSD.org\n2004/11/29"] dwmalone [label="David Malone\ndwmalone@FreeBSD.org\n2000/07/11"] @@ -229,7 +233,6 @@ pjd [label="Pawel Jakub Dawidek\npjd@Fre pluknet [label="Sergey Kandaurov\npluknet@FreeBSD.org\n2010/10/05"] ps [label="Paul Saab\nps@FreeBSD.org\n2000/02/23"] qingli [label="Qing Li\nqingli@FreeBSD.org\n2005/04/13"] -rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2007/01/31"] ray [label="Aleksandr Rybalko\nray@FreeBSD.org\n2011/05/25"] rdivacky [label="Roman Divacky\nrdivacky@FreeBSD.org\n2008/03/13"] remko [label="Remko Lodder\nremko@FreeBSD.org\n2007/02/23"] @@ -245,8 +248,8 @@ rstone [label="Ryan Stone\nrstone@FreeBS ru [label="Ruslan Ermilov\nru@FreeBSD.org\n1999/05/27"] rwatson [label="Robert N. M. Watson\nrwatson@FreeBSD.org\n1999/12/16"] sam [label="Sam Leffler\nsam@FreeBSD.org\n2002/07/02"] -sbruno [label="Sean Bruno\nsbruno@FreeBSD.org\n????/??/??"] sanpei [label="MIHIRA Sanpei Yoshiro\nsanpei@FreeBSD.org\n2000/06/19"] +sbruno [label="Sean Bruno\nsbruno@FreeBSD.org\n2008/08/02"] scf [label="Sean C. Farley\nscf@FreeBSD.org\n2007/06/24"] schweikh [label="Jens Schweikhardt\nschweikh@FreeBSD.org\n2001/04/06"] scottl [label="Scott Long\nscottl@FreeBSD.org\n2000/09/28"] @@ -276,11 +279,10 @@ vanhu [label="Yvan Vanhullebus\nvanhu@Fr versus [label="Konrad Jankowski\nversus@FreeBSD.org\n2008/10/27"] weongyo [label="Weongyo Jeong\nweongyo@FreeBSD.org\n2007/12/21"] wes [label="Wes Peters\nwes@FreeBSD.org\n1998/11/25"] -wilko [label="Wilko Bulte\nwilko@FreeBSD.org\n2000/01/13"] +wkoszek [label="Wojciech A. Koszek\nwkoszek@FreeBSD.org\n2006/02/21"] wollman [label="Garrett Wollman\nwollman@FreeBSD.org\n????/??/??"] wsalamon [label="Wayne Salamon\nwsalamon@FreeBSD.org\n2005/06/25"] yongari [label="Pyun YongHyeon\nyongari@FreeBSD.org\n2004/08/01"] -zack [label="Zack Kirsch\nzack@FreeBSD.org\n2010/11/05"] zec [label="Marko Zec\nzec@FreeBSD.org\n2008/06/22"] zml [label="Zachary Loafman\nzml@FreeBSD.org\n2009/05/27"] zont [label="Andrey Zonov\nzont@FreeBSD.org\n2012/08/21"] @@ -342,6 +344,7 @@ bz -> syrinx cognet -> jceel cognet -> kevlo cognet -> ian +cognet -> wkoszek cperciva -> eadler cperciva -> flz @@ -565,6 +568,8 @@ philip -> jls philip -> matteo philip -> uqs +phk -> mux + pjd -> kib pjd -> lulf pjd -> smh @@ -622,6 +627,7 @@ scottl -> achim scottl -> jimharris scottl -> pjd scottl -> sah +scottl -> sbruno scottl -> yongari sheldonh -> dwmalone From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 17:50:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 21897C24; Thu, 11 Apr 2013 17:50:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 14A78E96; Thu, 11 Apr 2013 17:50:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BHooQX055612; Thu, 11 Apr 2013 17:50:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BHoorN055611; Thu, 11 Apr 2013 17:50:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304111750.r3BHoorN055611@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 17:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249370 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 17:50:51 -0000 Author: np Date: Thu Apr 11 17:50:50 2013 New Revision: 249370 URL: http://svnweb.freebsd.org/changeset/base/249370 Log: cxgbe(4): Ensure that the MOD_LOAD handler runs before either t4nex or t5nex attach to their devices. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Apr 11 17:16:08 2013 (r249369) +++ head/sys/dev/cxgbe/t4_main.c Thu Apr 11 17:50:50 2013 (r249370) @@ -418,7 +418,7 @@ static int read_i2c(struct adapter *, st #ifdef TCP_OFFLOAD static int toe_capability(struct port_info *, int); #endif -static int t4_mod_event(module_t, int, void *); +static int mod_event(module_t, int, void *); struct { uint16_t device; @@ -6997,12 +6997,15 @@ tweak_tunables(void) } static int -t4_mod_event(module_t mod, int cmd, void *arg) +mod_event(module_t mod, int cmd, void *arg) { int rc = 0; + static int loaded = 0; switch (cmd) { case MOD_LOAD: + if (atomic_fetchadd_int(&loaded, 1)) + break; t4_sge_modload(); mtx_init(&t4_list_lock, "T4 adapters", 0, MTX_DEF); SLIST_INIT(&t4_list); @@ -7014,6 +7017,8 @@ t4_mod_event(module_t mod, int cmd, void break; case MOD_UNLOAD: + if (atomic_fetchadd_int(&loaded, -1) > 1) + break; #ifdef TCP_OFFLOAD mtx_lock(&t4_uld_list_lock); if (!SLIST_EMPTY(&t4_uld_list)) { @@ -7041,10 +7046,10 @@ t4_mod_event(module_t mod, int cmd, void static devclass_t t4_devclass, t5_devclass; static devclass_t cxgbe_devclass, cxl_devclass; -DRIVER_MODULE(t4nex, pci, t4_driver, t4_devclass, t4_mod_event, 0); +DRIVER_MODULE(t4nex, pci, t4_driver, t4_devclass, mod_event, 0); MODULE_VERSION(t4nex, 1); -DRIVER_MODULE(t5nex, pci, t5_driver, t5_devclass, 0, 0); +DRIVER_MODULE(t5nex, pci, t5_driver, t5_devclass, mod_event, 0); MODULE_VERSION(t5nex, 1); DRIVER_MODULE(cxgbe, t4nex, cxgbe_driver, cxgbe_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:00:16 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8F56AF94; Thu, 11 Apr 2013 18:00:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3C4F12; Thu, 11 Apr 2013 18:00:15 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r3BI0Eg1071216; Thu, 11 Apr 2013 22:00:14 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r3BI0Dtn071215; Thu, 11 Apr 2013 22:00:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 11 Apr 2013 22:00:13 +0400 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r249355 - head/lib/libkvm Message-ID: <20130411180013.GB76816@FreeBSD.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> <20130411091418.GW76816@FreeBSD.org> <20130411201652.F1911@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130411201652.F1911@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:00:16 -0000 Bruce, On Thu, Apr 11, 2013 at 09:07:25PM +1000, Bruce Evans wrote: B> Just routine avoidance of namespace pollution. This is easy in such a B> simple header. Sorry, with all respect, but I can't call including sys/types.h a namespace pollution. Ok, even you force me to name it that way, still I would prefer namespace pollution instead of handmade copy pasted typedefs. Thus, I'd prefer to leave include as is, moreover I'd like to remove handmade typedefs for size_t and ssize_t. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:02:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 485A81F4; Thu, 11 Apr 2013 18:02:43 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3AC76F35; Thu, 11 Apr 2013 18:02:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BI2hq3059049; Thu, 11 Apr 2013 18:02:43 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BI2hRI059048; Thu, 11 Apr 2013 18:02:43 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304111802.r3BI2hRI059048@svn.freebsd.org> From: Joel Dahl Date: Thu, 11 Apr 2013 18:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249371 - head/sbin/geom/class/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:02:43 -0000 Author: joel (doc committer) Date: Thu Apr 11 18:02:42 2013 New Revision: 249371 URL: http://svnweb.freebsd.org/changeset/base/249371 Log: Remove kernel options from the SYNOPSIS. They are already documented in the geom(4) manual page SYNOPSIS. Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Thu Apr 11 17:50:50 2013 (r249370) +++ head/sbin/geom/class/part/gpart.8 Thu Apr 11 18:02:42 2013 (r249371) @@ -31,33 +31,6 @@ .Nm gpart .Nd "control utility for the disk partitioning GEOM class" .Sh SYNOPSIS -To add support for the disk partitioning GEOM class, -place one or more of the following -lines in the kernel configuration file: -.Bd -ragged -offset indent -.Cd "options GEOM_PART_APM" -.Cd "options GEOM_PART_BSD" -.Cd "options GEOM_PART_GPT" -.Cd "options GEOM_PART_LDM" -.Cd "options GEOM_PART_MBR" -.Cd "options GEOM_PART_EBR" -.Cd "options GEOM_PART_EBR_COMPAT" -.Cd "options GEOM_PART_PC98" -.Cd "options GEOM_PART_VTOC8" -.Ed -.Pp -These options provide support for the various types of partitioning -schemes supported by the -.Ns Nm -utility. -See -.Sx "PARTITIONING SCHEMES" -below for more details. -.Pp -Usage of the -.Ns Nm -utility: -.Pp .\" ==== ADD ==== .Nm .Cm add From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:05:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 71E513B3 for ; Thu, 11 Apr 2013 18:05:50 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) by mx1.freebsd.org (Postfix) with ESMTP id EF4E3F5D for ; Thu, 11 Apr 2013 18:05:49 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id ec20so1768906lab.27 for ; Thu, 11 Apr 2013 11:05:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=RsGH/Cx0FLCOW26rAHLskklkqamDO5yZ1qwDuNHEKis=; b=KUXyEC91DQ0ZrU7Do8n/1AfCoSwjCHmUU1Si5xL/UKAZVvfM82kMQJLkcIY66KcP8N EGUdaLqW2LXeM5FhiZ1KjNyl9uzY6BTBUWb7kGfoz1VFc1V+PTdtEvhgf8L2DdNKKSR+ PT5AOrzZpWoa1Y1bDYYYRmuaqcgmGMpZMOPbb7Hkn0vxbLnFvepL+ZPKoVEOyWMiCQwo 0FD8lFSZ6z98amyap1zieXQOtiDgsahw2qpf9/YuK77AMl/e/dApv6jF9ioVTdSmvVDz XyjuGWCqClnOLQvDy5drbWOP83ujMOLw3yvzzNFi2h/cB4EC6yxEWGlZoIvTb+UmwQ5g sUDA== X-Received: by 10.152.115.196 with SMTP id jq4mr3739654lab.53.1365703548647; Thu, 11 Apr 2013 11:05:48 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.28.196 with HTTP; Thu, 11 Apr 2013 11:05:28 -0700 (PDT) In-Reply-To: <20130411180013.GB76816@FreeBSD.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> <20130411091418.GW76816@FreeBSD.org> <20130411201652.F1911@besplex.bde.org> <20130411180013.GB76816@FreeBSD.org> From: Juli Mallett Date: Thu, 11 Apr 2013 11:05:28 -0700 X-Google-Sender-Auth: wzRidOcnZ9cIwzr0ox_W3BnFq5g Message-ID: Subject: Re: svn commit: r249355 - head/lib/libkvm To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnIJh0OGiXKzW5JjgSBTGkoyeOStEbE711kN4I48zRwpS6Y9yZ+rVIqxzNYDsdAJOufjooO Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:05:50 -0000 On Thu, Apr 11, 2013 at 11:00 AM, Gleb Smirnoff wrote: > Bruce, > > On Thu, Apr 11, 2013 at 09:07:25PM +1000, Bruce Evans wrote: > B> Just routine avoidance of namespace pollution. This is easy in such a > B> simple header. > > Sorry, with all respect, but I can't call including sys/types.h > a namespace pollution. > > Ok, even you force me to name it that way, still I would prefer > namespace pollution instead of handmade copy pasted typedefs. But Gleb, making such changes unilaterally is a bit of a leap. The project has mostly accepted Bruce's wisdom about trying to minimize and reduce namespace pollution. Now, this isn't a standard header so it's quite a bit less of a concern, but it's not no concern. If you think that we should reverse our trend on including namespace-polluting headers in system headers, we should discuss that on arch@, and it shouldn't be something that's done without any discussion or consideration. Should we expect further changes of this nature (and of the proposed nature removing __size_t and __ssize_t use) if you make changes to other headers as part of your work? Are you going to add to every header currently using in a single go, or will you be doing that a little at a time when making functional changes? Thanks, Juli. From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:12:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4247965F; Thu, 11 Apr 2013 18:12:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 66842FEC; Thu, 11 Apr 2013 18:12:44 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r3BICYqI071361; Thu, 11 Apr 2013 22:12:34 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r3BICXAF071360; Thu, 11 Apr 2013 22:12:33 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 11 Apr 2013 22:12:33 +0400 From: Gleb Smirnoff To: Juli Mallett Subject: Re: svn commit: r249355 - head/lib/libkvm Message-ID: <20130411181233.GC76816@FreeBSD.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> <20130411091418.GW76816@FreeBSD.org> <20130411201652.F1911@besplex.bde.org> <20130411180013.GB76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:12:45 -0000 Juli, On Thu, Apr 11, 2013 at 11:05:28AM -0700, Juli Mallett wrote: J> > On Thu, Apr 11, 2013 at 09:07:25PM +1000, Bruce Evans wrote: J> > B> Just routine avoidance of namespace pollution. This is easy in such a J> > B> simple header. J> > J> > Sorry, with all respect, but I can't call including sys/types.h J> > a namespace pollution. J> > J> > Ok, even you force me to name it that way, still I would prefer J> > namespace pollution instead of handmade copy pasted typedefs. J> J> But Gleb, making such changes unilaterally is a bit of a leap. The J> project has mostly accepted Bruce's wisdom about trying to minimize J> and reduce namespace pollution. Now, this isn't a standard header so J> it's quite a bit less of a concern, but it's not no concern. If you J> think that we should reverse our trend on including J> namespace-polluting headers in system headers, we should discuss that J> on arch@, and it shouldn't be something that's done without any J> discussion or consideration. J> J> Should we expect further changes of this nature (and of the proposed J> nature removing __size_t and __ssize_t use) if you make changes to J> other headers as part of your work? Are you going to add J> to every header currently using in a J> single go, or will you be doing that a little at a time when making J> functional changes? Your suggestion? Typedef standard uint64_t manually as size_t and ssize_t already are done? Can you please define amount of standard types needed for kvm.h (or any abstract header) that would give a permission to include sys/types.h instead of typedefing all these types via a cut-n-paste surrounded by ifdefs? I am all against namespace pollution, but not when it comes to sys/types.h. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:13:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 834707D8 for ; Thu, 11 Apr 2013 18:13:31 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 3661EFFC for ; Thu, 11 Apr 2013 18:13:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpapi; bh=VVpJ1jGp04Do4L2O46msoo QOBaY=; b=JOfXI6bzkyr7x0rFssfCuIhzzj6VMKLf7E4u7bpM4jUBBfvXV0EjaO IBzVn4sCtdAOwz49g4+PN9D1erXyARRgXMUqWdThpUdEbp1d8k6UfpUR1qXCAykm WYsu75kJMPCcy/TFtSQUddD0vBCdct1U35ZUZjj1x9snTT7VuEsho= Received: by 10.8.49.98 with SMTP id mf75.26530.5166FD4A2 Thu, 11 Apr 2013 18:13:30 +0000 (UTC) Received: from mail.tarsnap.com (unknown [10.60.208.17]) by mi14 (SG) with ESMTP id 5166fd49.7f96.64bbe for ; Thu, 11 Apr 2013 13:13:29 -0500 (CST) Received: (qmail 46763 invoked from network); 11 Apr 2013 18:13:29 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 11 Apr 2013 18:13:29 -0000 Received: (qmail 5129 invoked from network); 11 Apr 2013 18:13:20 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 11 Apr 2013 18:13:20 -0000 Message-ID: <5166FD40.6040102@freebsd.org> Date: Thu, 11 Apr 2013 11:13:20 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130406 Thunderbird/17.0.5 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r249355 - head/lib/libkvm References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> In-Reply-To: <20130411175308.Q1435@besplex.bde.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNHEKDT3rmpKQeTVzM86OFeALhpKjbJHlFN3YPAA7L9Qp8T0HRPLKQnLEWVPsk4lpdvrlWr019oZ0djp4piwmlpE Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:13:31 -0000 On 04/11/13 00:59, Bruce Evans wrote: >> Log: >> Include types.h for C99 uintXX_t types. > > This adds namespace pollution that was carefully left out. ... and as a developer, I wish we left out such namespace pollution more often. I write code on FreeBSD which I then publish with the intention that people will be able to use it on any POSIX-compliant system, and I've lost count of the number of times I've been hit by "this won't build on OS X or Linux because you forgot to #include ". Namespace pollution has a very real cost in wasted developer time. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:23:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 40CF4BBD; Thu, 11 Apr 2013 18:23:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 232D31093; Thu, 11 Apr 2013 18:23:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BINvRq065518; Thu, 11 Apr 2013 18:23:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BINuwC065517; Thu, 11 Apr 2013 18:23:56 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304111823.r3BINuwC065517@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 11 Apr 2013 18:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249372 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:23:57 -0000 Author: glebius Date: Thu Apr 11 18:23:56 2013 New Revision: 249372 URL: http://svnweb.freebsd.org/changeset/base/249372 Log: Fix tcp_output() so that tcpcb is updated in the same manner when an mbuf allocation fails, as in a case when ip_output() returns error. To achieve that, move large block of code that updates tcpcb below the out: label. This fixes a panic, that requires the following sequence to happen: 1) The SYN was sent to the network, tp->snd_nxt = iss + 1, tp->snd_una = iss 2) The retransmit timeout happened for the SYN we had sent, tcp_timer_rexmt() sets tp->snd_nxt = tp->snd_una, and calls tcp_output(). In tcp_output m_get() fails. 3) Later on the SYN|ACK for the SYN sent in step 1) came, tcp_input sets tp->snd_una += 1, which leads to tp->snd_una > tp->snd_nxt inconsistency, that later panics in socket buffer code. For reference, this bug fixed in DragonflyBSD repo: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1ff9b7d322dc5a26f7173aa8c38ecb79da80e419 Reviewed by: andre Tested by: pho Sponsored by: Nginx, Inc. PR: kern/177456 Submitted by: HouYeFei&XiBoLiu Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Apr 11 18:02:42 2013 (r249371) +++ head/sys/netinet/tcp_output.c Thu Apr 11 18:23:56 2013 (r249372) @@ -852,6 +852,7 @@ send: if (m == NULL) { SOCKBUF_UNLOCK(&so->so_snd); error = ENOBUFS; + sack_rxmit = 0; goto out; } @@ -874,6 +875,7 @@ send: SOCKBUF_UNLOCK(&so->so_snd); (void) m_free(m); error = ENOBUFS; + sack_rxmit = 0; goto out; } } @@ -901,6 +903,7 @@ send: m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { error = ENOBUFS; + sack_rxmit = 0; goto out; } #ifdef INET6 @@ -1123,75 +1126,6 @@ send: __func__, len, hdrlen, ipoptlen, m_length(m, NULL))); #endif - /* - * In transmit state, time the transmission and arrange for - * the retransmit. In persist state, just set snd_max. - */ - if ((tp->t_flags & TF_FORCEDATA) == 0 || - !tcp_timer_active(tp, TT_PERSIST)) { - tcp_seq startseq = tp->snd_nxt; - - /* - * Advance snd_nxt over sequence space of this segment. - */ - if (flags & (TH_SYN|TH_FIN)) { - if (flags & TH_SYN) - tp->snd_nxt++; - if (flags & TH_FIN) { - tp->snd_nxt++; - tp->t_flags |= TF_SENTFIN; - } - } - if (sack_rxmit) - goto timer; - tp->snd_nxt += len; - if (SEQ_GT(tp->snd_nxt, tp->snd_max)) { - tp->snd_max = tp->snd_nxt; - /* - * Time this transmission if not a retransmission and - * not currently timing anything. - */ - if (tp->t_rtttime == 0) { - tp->t_rtttime = ticks; - tp->t_rtseq = startseq; - TCPSTAT_INC(tcps_segstimed); - } - } - - /* - * Set retransmit timer if not currently set, - * and not doing a pure ack or a keep-alive probe. - * Initial value for retransmit timer is smoothed - * round-trip time + 2 * round-trip time variance. - * Initialize shift counter which is used for backoff - * of retransmit time. - */ -timer: - if (!tcp_timer_active(tp, TT_REXMT) && - ((sack_rxmit && tp->snd_nxt != tp->snd_max) || - (tp->snd_nxt != tp->snd_una))) { - if (tcp_timer_active(tp, TT_PERSIST)) { - tcp_timer_activate(tp, TT_PERSIST, 0); - tp->t_rxtshift = 0; - } - tcp_timer_activate(tp, TT_REXMT, tp->t_rxtcur); - } - } else { - /* - * Persist case, update snd_max but since we are in - * persist mode (no window) we do not update snd_nxt. - */ - int xlen = len; - if (flags & TH_SYN) - ++xlen; - if (flags & TH_FIN) { - ++xlen; - tp->t_flags |= TF_SENTFIN; - } - if (SEQ_GT(tp->snd_nxt + xlen, tp->snd_max)) - tp->snd_max = tp->snd_nxt + len; - } - /* Run HHOOK_TCP_ESTABLISHED_OUT helper hooks. */ hhook_run_tcp_est_out(tp, th, &to, len, tso); @@ -1282,6 +1216,77 @@ timer: RO_RTFREE(&ro); } #endif /* INET */ + +out: + /* + * In transmit state, time the transmission and arrange for + * the retransmit. In persist state, just set snd_max. + */ + if ((tp->t_flags & TF_FORCEDATA) == 0 || + !tcp_timer_active(tp, TT_PERSIST)) { + tcp_seq startseq = tp->snd_nxt; + + /* + * Advance snd_nxt over sequence space of this segment. + */ + if (flags & (TH_SYN|TH_FIN)) { + if (flags & TH_SYN) + tp->snd_nxt++; + if (flags & TH_FIN) { + tp->snd_nxt++; + tp->t_flags |= TF_SENTFIN; + } + } + if (sack_rxmit) + goto timer; + tp->snd_nxt += len; + if (SEQ_GT(tp->snd_nxt, tp->snd_max)) { + tp->snd_max = tp->snd_nxt; + /* + * Time this transmission if not a retransmission and + * not currently timing anything. + */ + if (tp->t_rtttime == 0) { + tp->t_rtttime = ticks; + tp->t_rtseq = startseq; + TCPSTAT_INC(tcps_segstimed); + } + } + + /* + * Set retransmit timer if not currently set, + * and not doing a pure ack or a keep-alive probe. + * Initial value for retransmit timer is smoothed + * round-trip time + 2 * round-trip time variance. + * Initialize shift counter which is used for backoff + * of retransmit time. + */ +timer: + if (!tcp_timer_active(tp, TT_REXMT) && + ((sack_rxmit && tp->snd_nxt != tp->snd_max) || + (tp->snd_nxt != tp->snd_una))) { + if (tcp_timer_active(tp, TT_PERSIST)) { + tcp_timer_activate(tp, TT_PERSIST, 0); + tp->t_rxtshift = 0; + } + tcp_timer_activate(tp, TT_REXMT, tp->t_rxtcur); + } + } else { + /* + * Persist case, update snd_max but since we are in + * persist mode (no window) we do not update snd_nxt. + */ + int xlen = len; + if (flags & TH_SYN) + ++xlen; + if (flags & TH_FIN) { + ++xlen; + tp->t_flags |= TF_SENTFIN; + } + if (SEQ_GT(tp->snd_nxt + xlen, tp->snd_max)) + tp->snd_max = tp->snd_nxt + len; + } + if (error) { /* @@ -1309,7 +1314,6 @@ timer: } else tp->snd_nxt -= len; } -out: SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) { case EPERM: From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:31:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4223FEE8; Thu, 11 Apr 2013 18:31:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-da0-x234.google.com (mail-da0-x234.google.com [IPv6:2607:f8b0:400e:c00::234]) by mx1.freebsd.org (Postfix) with ESMTP id 07FA51123; Thu, 11 Apr 2013 18:31:10 +0000 (UTC) Received: by mail-da0-f52.google.com with SMTP id f10so791008dak.25 for ; Thu, 11 Apr 2013 11:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:subject:mime-version:content-type:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer; bh=rG/OlK1qmi0/1Xd5+kqS4lV1eCRJGAeD5n8PX9CDV9I=; b=m/D2FE8jCInr073/XjTyoiTDsfpbRQ3pQb5Oqc565yeYvqf0qGU6+vIAqAKtQO+Knd CrY6lWN5mu/Zgw8TCRjI6HzwbHl30HniObPkPHw9dvZIfk0ON3cFM46xR0s7PS7+Ya82 vt2HaVpkFMz20xHbYFC5jiHCtQLLLCgsm0jdu/OuSDlwLpcU5aVpo5ZcEZRj3jdIU0Hk mR/3MkMMZutdUOG0SSKF065lvuxBtk6FIn419nAMX9v40tIJNuK4N+YOGIxELpiJPKwI haW5OgVIoFrYutv7rfcfRCXEmjAMV5T3xypVY49P7f4WdlXO16n84EC7N0X+s65rlmzL DDHA== X-Received: by 10.68.5.166 with SMTP id t6mr10549671pbt.105.1365705069385; Thu, 11 Apr 2013 11:31:09 -0700 (PDT) Received: from [10.0.1.3] (c-98-203-241-95.hsd1.wa.comcast.net. [98.203.241.95]) by mx.google.com with ESMTPS id ew5sm5163500pbc.9.2013.04.11.11.31.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 11:31:08 -0700 (PDT) Subject: Re: svn commit: r249355 - head/lib/libkvm Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: <5166FD40.6040102@freebsd.org> Date: Thu, 11 Apr 2013 11:31:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <6ABB36AE-A7AB-4A06-82B9-5E3F07F18AAC@gmail.com> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <5166FD40.6040102@freebsd.org> To: Colin Percival X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:31:10 -0000 On Apr 11, 2013, at 11:13 AM, Colin Percival wrote: > On 04/11/13 00:59, Bruce Evans wrote: >>> Log: >>> Include types.h for C99 uintXX_t types. >>=20 >> This adds namespace pollution that was carefully left out. >=20 > ... and as a developer, I wish we left out such namespace pollution = more often. >=20 > I write code on FreeBSD which I then publish with the intention that = people will > be able to use it on any POSIX-compliant system, and I've lost count = of the > number of times I've been hit by "this won't build on OS X or Linux = because you > forgot to #include ". Funny this would be mentioned. I've seen the converse a lot with = Linux devs because they fail to understand that headers on Linux = #include a lot more crud than they need to.. Devs in general don't read the [POSIX] manpages like they should = to figure out what needs to be #include'd in order to get = function/constant definitions. Third party devs are usually the worst = offenders. Thanks, -Garrett= From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 18:46:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 850F2697; Thu, 11 Apr 2013 18:46:44 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7526912B4; Thu, 11 Apr 2013 18:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BIkiNN071789; Thu, 11 Apr 2013 18:46:44 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BIkfC3071767; Thu, 11 Apr 2013 18:46:41 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304111846.r3BIkfC3071767@svn.freebsd.org> From: Joel Dahl Date: Thu, 11 Apr 2013 18:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249373 - in head: sbin/camcontrol sbin/kldload sbin/newfs share/man/man3 share/man/man4 share/man/man9 usr.bin/patch usr.sbin/bluetooth/l2ping usr.sbin/ctladm usr.sbin/makefs usr.sbin/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:46:44 -0000 Author: joel (doc committer) Date: Thu Apr 11 18:46:41 2013 New Revision: 249373 URL: http://svnweb.freebsd.org/changeset/base/249373 Log: Remove contractions. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/kldload/kldload.8 head/sbin/newfs/newfs.8 head/share/man/man3/fpgetround.3 head/share/man/man4/ng_tag.4 head/share/man/man4/sdhci.4 head/share/man/man9/locking.9 head/share/man/man9/zone.9 head/usr.bin/patch/patch.1 head/usr.sbin/bluetooth/l2ping/l2ping.8 head/usr.sbin/ctladm/ctladm.8 head/usr.sbin/makefs/makefs.8 head/usr.sbin/mptutil/mptutil.8 head/usr.sbin/services_mkdb/services_mkdb.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/sbin/camcontrol/camcontrol.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -376,7 +376,7 @@ There are a couple of options to modify .It Fl c Just print out a count of LUNs, not the actual LUN numbers. .It Fl l -Just print out the LUNs, and don't print out the count. +Just print out the LUNs, and do not print out the count. .It Fl r Ar reporttype Specify the type of report to request from the target: .Bl -tag -width 012345678 Modified: head/sbin/kldload/kldload.8 ============================================================================== --- head/sbin/kldload/kldload.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/sbin/kldload/kldload.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -63,7 +63,7 @@ in the current directory. The following options are available: .Bl -tag -width indent .It Fl n -Don't try to load module if already loaded. +Do not try to load module if already loaded. .It Fl v Be more verbose. .It Fl q Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/sbin/newfs/newfs.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -226,7 +226,7 @@ See for more details on how to set this option. .It Fl p Ar partition The partition name (a..h) you want to use in case the underlying image -is a file, so you don't have access to individual partitions through the +is a file, so you do not have access to individual partitions through the filesystem. Can also be used with a device, e.g. .Nm Modified: head/share/man/man3/fpgetround.3 ============================================================================== --- head/share/man/man3/fpgetround.3 Thu Apr 11 18:23:56 2013 (r249372) +++ head/share/man/man3/fpgetround.3 Thu Apr 11 18:46:41 2013 (r249373) @@ -164,7 +164,7 @@ and .Fn fpsetprec functions provide functionality unavailable on many platforms. At present, they are implemented only on the i386 and amd64 platforms. -Changing precision isn't a supported feature: +Changing precision is not a supported feature: it may be ineffective when code is compiled to take advantage of SSE, and many library functions and compiler optimizations depend upon the default precision for correct behavior. Modified: head/share/man/man4/ng_tag.4 ============================================================================== --- head/share/man/man4/ng_tag.4 Thu Apr 11 18:23:56 2013 (r249372) +++ head/share/man/man4/ng_tag.4 Thu Apr 11 18:46:41 2013 (r249373) @@ -284,7 +284,7 @@ ngctl msg ngdc: sethookout { thisHook=\e tag_id=412 } .Ed .Pp -Don't forget to program +Do not forget to program .Xr ng_bpf 4 .Dq Li ipfw hook with the above expression (see Modified: head/share/man/man4/sdhci.4 ============================================================================== --- head/share/man/man4/sdhci.4 Thu Apr 11 18:23:56 2013 (r249372) +++ head/share/man/man4/sdhci.4 Thu Apr 11 18:46:41 2013 (r249373) @@ -85,4 +85,4 @@ TI PCIXX21/XX11 Many of existing SD controller chips have some nonstandard requirements, proprietary registers and hardware bugs, requiring additional handling. ENE chips are handled to work fine, while some revisions of RICOH and TI -controllers still don't see cards without some additional initialization. +controllers still do not see cards without some additional initialization. Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Thu Apr 11 18:23:56 2013 (r249372) +++ head/share/man/man9/locking.9 Thu Apr 11 18:46:41 2013 (r249373) @@ -128,7 +128,7 @@ between them is that shared/exclusive lo (and may thus perform an unbounded sleep). They are inherently less efficient than mutexes, reader/writer locks and read-mostly locks. -They don't support priority propagation. +They do not support priority propagation. They should be considered to be closely related to .Xr sleep 9 . They could in some cases be @@ -250,7 +250,7 @@ Shared/exclusive locks, used mostly in in particular as a .Xr vnode 9 lock. -They have features other lock types don't have, such as sleep timeout, +They have features other lock types do not have, such as sleep timeout, writer starvation avoidance, draining, and interlock mutex, but this makes them complicated to implement; for this reason, they are deprecated. .Pp Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Thu Apr 11 18:23:56 2013 (r249372) +++ head/share/man/man9/zone.9 Thu Apr 11 18:46:41 2013 (r249373) @@ -187,7 +187,7 @@ The zone will have its .Ft uma_init method set to internal method that initializes a new allocated slab to all zeros. -Don't mistake +Do not mistake .Ft uma_init method with .Ft uma_ctor . Modified: head/usr.bin/patch/patch.1 ============================================================================== --- head/usr.bin/patch/patch.1 Thu Apr 11 18:23:56 2013 (r249372) +++ head/usr.bin/patch/patch.1 Thu Apr 11 18:46:41 2013 (r249373) @@ -162,7 +162,7 @@ Forces to assume that the user knows exactly what he or she is doing, and to not ask any questions. It assumes the following: -skip patches for which a file to patch can't be found; +skip patches for which a file to patch cannot be found; patch files even though they have the wrong version for the .Qq Prereq: line in the patch; @@ -261,7 +261,7 @@ will reverse the hunk to see if it can b If it can, you will be asked if you want to have the .Fl R option set. -If it can't, the patch will continue to be applied normally. +If it cannot, the patch will continue to be applied normally. (Note: this method cannot detect a reversed patch if it is a normal diff and if the first command is an append (i.e. it should have been a delete) since appends always succeed, due to the fact that a null context will match @@ -285,7 +285,7 @@ do its work silently, unless an error oc Similar to .Fl f , in that it suppresses questions, but makes some different assumptions: -skip patches for which a file to patch can't be found (the same as +skip patches for which a file to patch cannot be found (the same as .Fl f ) ; skip patches for which the file has the wrong version for the .Qq Prereq: @@ -552,10 +552,10 @@ file which is patched to increment the p patch file you send out. If you put a .Qq Prereq: -line in with the patch, it won't let them apply +line in with the patch, it will not let them apply patches out of order without some warning. .Pp -Second, make sure you've specified the file names right, either in a +Second, make sure you have specified the file names right, either in a context diff header, or with an .Qq Index: line. @@ -566,7 +566,7 @@ option as needed. .Pp Third, you can create a file by sending out a diff that compares a null file to the file you want to create. -This will only work if the file you want to create doesn't exist already in +This will only work if the file you want to create does not exist already in the target directory. .Pp Fourth, take care not to send out reversed patches, since it makes people wonder @@ -620,7 +620,7 @@ An error occurred. .El .Pp When applying a set of patches in a loop it behooves you to check this -exit status so you don't apply a later patch to a partially patched file. +exit status so you do not apply a later patch to a partially patched file. .Sh DIAGNOSTICS Too many to list here, but generally indicative that .Nm @@ -694,7 +694,7 @@ If code has been duplicated (for instanc is incapable of patching both versions, and, if it works at all, will likely patch the wrong one, and tell you that it succeeded to boot. .Pp -If you apply a patch you've already applied, +If you apply a patch you have already applied, .Nm will think it is a reversed patch, and offer to un-apply the patch. This could be construed as a feature. Modified: head/usr.sbin/bluetooth/l2ping/l2ping.8 ============================================================================== --- head/usr.sbin/bluetooth/l2ping/l2ping.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/usr.sbin/bluetooth/l2ping/l2ping.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -63,7 +63,7 @@ If this option is not specified, .Nm will operate until interrupted. .It Fl f -Don't wait between sending each packet. +Do not wait between sending each packet. .It Fl h Display usage message and exit. .It Fl i Ar wait Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/usr.sbin/ctladm/ctladm.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -487,7 +487,7 @@ cache for the entire LUN. .It Fl r Specify relative addressing for the starting LBA. CTL does not support relative addressing, since it only works for linked commands, and CTL -doesn't support linked commands. +does not support linked commands. .It Fl i Tell the target to return status immediately after issuing the SYHCHRONIZE CACHE command rather than waiting for the cache to finish syncing. CTL does not Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/usr.sbin/makefs/makefs.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -325,7 +325,7 @@ Load a generic boot image into the first .It Sy hard-disk-boot Boot image is a hard disk image. .It Sy keep-bad-images -Don't throw away images whose write was aborted due to an error. +Do not throw away images whose write was aborted due to an error. For debugging purposes. .It Sy label Label name of the image. Modified: head/usr.sbin/mptutil/mptutil.8 ============================================================================== --- head/usr.sbin/mptutil/mptutil.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/usr.sbin/mptutil/mptutil.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -196,7 +196,7 @@ If any hot spare drives are configured, Lists all of the physical drives attached to the controller. .It Cm show events Display all the entries from the controller's event log. -Due to lack of documentation this command isn't very useful currently and +Due to lack of documentation this command is not very useful currently and just dumps each log entry in hex. .It Cm show volumes Lists all of the logical volumes managed by the controller. @@ -388,7 +388,7 @@ The mpt version 1 API that is used by .Nm and .Xr mpt 4 -doesn't support volumes above two terabytes. +does not support volumes above two terabytes. This is a limitation of the API. If you are using this adapter with volumes larger than two terabytes, use the adapter in JBOD mode. Utilize Modified: head/usr.sbin/services_mkdb/services_mkdb.8 ============================================================================== --- head/usr.sbin/services_mkdb/services_mkdb.8 Thu Apr 11 18:23:56 2013 (r249372) +++ head/usr.sbin/services_mkdb/services_mkdb.8 Thu Apr 11 18:46:41 2013 (r249373) @@ -64,7 +64,7 @@ The options are as follows: .It Fl o Ar database Put the output databases in the named file. .It Fl q -Don't warn about duplicate services. +Do not warn about duplicate services. .It Fl u Print the services file to stdout, omitting duplicate entries and comments. .El From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 19:05:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EF575E43; Thu, 11 Apr 2013 19:05:25 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E0CDA13B8; Thu, 11 Apr 2013 19:05:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BJ5P6a078037; Thu, 11 Apr 2013 19:05:25 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BJ5Pnf078030; Thu, 11 Apr 2013 19:05:25 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304111905.r3BJ5Pnf078030@svn.freebsd.org> From: Joel Dahl Date: Thu, 11 Apr 2013 19:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249375 - in head: sbin/ipfw usr.bin/rctl usr.sbin/bsnmpd/tools/bsnmptools usr.sbin/pmcannotate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 19:05:26 -0000 Author: joel (doc committer) Date: Thu Apr 11 19:05:24 2013 New Revision: 249375 URL: http://svnweb.freebsd.org/changeset/base/249375 Log: Minor spelling and grammar fixes. Modified: head/sbin/ipfw/ipfw.8 head/usr.bin/rctl/rctl.8 head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 head/usr.sbin/pmcannotate/pmcannotate.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Thu Apr 11 18:47:16 2013 (r249374) +++ head/sbin/ipfw/ipfw.8 Thu Apr 11 19:05:24 2013 (r249375) @@ -854,7 +854,7 @@ So, to prevent endless loops in case of and .Cm return actions don't do any jumps and simply go to the next rule if memory -can't be allocated or stack overflowed/undeflowed. +cannot be allocated or stack overflowed/underflowed. .Pp Internally stack for rule numbers is implemented using .Xr mbuf_tags 9 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Thu Apr 11 18:47:16 2013 (r249374) +++ head/usr.bin/rctl/rctl.8 Thu Apr 11 19:05:24 2013 (r249375) @@ -162,7 +162,7 @@ See for a list of supported signals. .Pp Not all actions are supported for all resources. -Attempt to add rule with action not supported by a given resouce will result +Attempt to add rule with action not supported by a given resource will result in error. .Pp Note that limiting RSS may kill the machine due to thrashing. Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 Thu Apr 11 18:47:16 2013 (r249374) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 Thu Apr 11 19:05:24 2013 (r249375) @@ -108,7 +108,7 @@ Depending on the options .Nm bsnmpget constructs either a SMNP GetRequest, GetNextRequest or a GetBulkRequest packet, fills in the object identifiers (OIDs) of the -objects whose values will be retrived, waits for a response and prints it if +objects whose values will be retrieved, waits for a response and prints it if received successfully. .Pp .Nm Bsnmpwalk @@ -259,7 +259,7 @@ for and getnext for .Nm bsnmpwalk . Getbulk allows executing the so called SNMP "bulkwalks" allowing the values of -multiple columns to be retrived in a single PDU by +multiple columns to be retrieved in a single PDU by .Nm bsnmpwalk . .It Fl r Ar retries Number of resends of request packets before giving up if the agent does @@ -332,7 +332,7 @@ will use version 2. Note that GetBulkRequest-PDUs were introduced in SNMPv2 thus setting the version to 1 is incompatiable with sending a GetBulk PDU. .It OID -The object identifier whose value to retrive. +The object identifier whose value to retrieve. At least one OID should be provided for .Nm bsnmpget to be able to send a request. @@ -340,7 +340,7 @@ to be able to send a request. For .Nm bsnmpwalk this is the root object identifier of the subtree whose values are to be -retrived. +retrieved. If no OID is provided .Nm bsnmpwalk will walk the mib2 subtree rooted Modified: head/usr.sbin/pmcannotate/pmcannotate.8 ============================================================================== --- head/usr.sbin/pmcannotate/pmcannotate.8 Thu Apr 11 18:47:16 2013 (r249374) +++ head/usr.sbin/pmcannotate/pmcannotate.8 Thu Apr 11 19:05:24 2013 (r249375) @@ -45,7 +45,7 @@ The .Nm utility can produce both C sources or assembly sources of a program with a line-by-line based profiling. -The profiling informations are retrieved through a +The profiling information is retrieved through a .Xr pmcstat 8 raw output while the program operations are retrieved through the .Xr objdump 1 @@ -71,9 +71,9 @@ The following options are available: .Bl -tag -width indent .It Fl a Shows the program profiling inlined in the assembly code only. -No C informations involving C sources are provided. +No C information involving C sources is provided. .It Fl h -Prints out informations about the usage of the tool. +Prints out information about the usage of the tool. .It Fl l Ar level Changes the lower bound (expressed in percentage) for traced functions that will be printed out in the report. From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 19:39:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 24E8B620; Thu, 11 Apr 2013 19:39:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1771715B1; Thu, 11 Apr 2013 19:39:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BJdesM087671; Thu, 11 Apr 2013 19:39:40 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BJdeTf087670; Thu, 11 Apr 2013 19:39:40 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304111939.r3BJdeTf087670@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 19:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249376 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 19:39:41 -0000 Author: np Date: Thu Apr 11 19:39:40 2013 New Revision: 249376 URL: http://svnweb.freebsd.org/changeset/base/249376 Log: - Explain clearly why a different firmware is being installed (if/when it is being installed). Improve other error messages while here. - Select special FPGA specific configuration profile when appropriate. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Apr 11 19:05:24 2013 (r249375) +++ head/sys/dev/cxgbe/t4_main.c Thu Apr 11 19:39:40 2013 (r249376) @@ -255,6 +255,7 @@ TUNABLE_INT("hw.cxgbe.interrupt_types", #define DEFAULT_CF "default" #define FLASH_CF "flash" #define UWIRE_CF "uwire" +#define FPGA_CF "fpga" static char t4_cfg_file[32] = DEFAULT_CF; TUNABLE_STR("hw.cxgbe.config_file", t4_cfg_file, sizeof(t4_cfg_file)); @@ -1885,6 +1886,46 @@ fw_compatible(const struct fw_hdr *hdr1, } /* + * The firmware in the KLD is usable and can be installed. But should it be? + * This routine explains itself in detail if it indicates the KLD firmware + * should be installed. + */ +static int +should_install_kld_fw(struct adapter *sc, int card_fw_usable, int k, int c) +{ + const char *reason; + + KASSERT(t4_fw_install != 0, ("%s: Can't install; shouldn't be asked " + "to evaluate if install is a good idea.", __func__)); + + if (!card_fw_usable) { + reason = "incompatible or unusable"; + goto install; + } + + if (k > c) { + reason = "older than the version bundled with this driver"; + goto install; + } + + if (t4_fw_install == 2 && k != c) { + reason = "different than the version bundled with this driver"; + goto install; + } + + return (0); + +install: + device_printf(sc->dev, "firmware on card (%u.%u.%u.%u) is %s, " + "installing firmware %u.%u.%u.%u on card.\n", + G_FW_HDR_FW_VER_MAJOR(c), G_FW_HDR_FW_VER_MINOR(c), + G_FW_HDR_FW_VER_MICRO(c), G_FW_HDR_FW_VER_BUILD(c), reason, + G_FW_HDR_FW_VER_MAJOR(k), G_FW_HDR_FW_VER_MINOR(k), + G_FW_HDR_FW_VER_MICRO(k), G_FW_HDR_FW_VER_BUILD(k)); + + return (1); +} +/* * Establish contact with the firmware and determine if we are the master driver * or not, and whether we are responsible for chip initialization. */ @@ -1972,15 +2013,8 @@ prep_firmware(struct adapter *sc) * on the card. */ } else if (kld_fw_usable && state == DEV_STATE_UNINIT && - (!card_fw_usable || - be32toh(kld_fw->fw_ver) > be32toh(card_fw->fw_ver) || - (t4_fw_install == 2 && kld_fw->fw_ver != card_fw->fw_ver))) { - uint32_t v = ntohl(kld_fw->fw_ver); - - device_printf(sc->dev, - "installing firmware %d.%d.%d.%d on card.\n", - G_FW_HDR_FW_VER_MAJOR(v), G_FW_HDR_FW_VER_MINOR(v), - G_FW_HDR_FW_VER_MICRO(v), G_FW_HDR_FW_VER_BUILD(v)); + should_install_kld_fw(sc, card_fw_usable, be32toh(kld_fw->fw_ver), + be32toh(card_fw->fw_ver))) { rc = -t4_load_fw(sc, fw->data, fw->datasize); if (rc != 0) { @@ -2101,6 +2135,8 @@ partition_resources(struct adapter *sc, /* Card specific overrides go here. */ if (pci_get_device(sc->dev) == 0x440a) snprintf(sc->cfg_file, sizeof(sc->cfg_file), UWIRE_CF); + if (is_fpga(sc)) + snprintf(sc->cfg_file, sizeof(sc->cfg_file), FPGA_CF); } /* @@ -2114,17 +2150,20 @@ partition_resources(struct adapter *sc, snprintf(s, sizeof(s), "%s_%s", name_prefix, sc->cfg_file); cfg = firmware_get(s); if (cfg == NULL) { - device_printf(sc->dev, "unable to load module \"%s\" " - "for configuration profile \"%s\", ", - s, sc->cfg_file); if (default_cfg != NULL) { - device_printf(sc->dev, "will use the default " - "config file instead.\n"); + device_printf(sc->dev, + "unable to load module \"%s\" for " + "configuration profile \"%s\", will use " + "the default config file instead.\n", + s, sc->cfg_file); snprintf(sc->cfg_file, sizeof(sc->cfg_file), "%s", DEFAULT_CF); } else { - device_printf(sc->dev, "will use the config " - "file on the card's flash instead.\n"); + device_printf(sc->dev, + "unable to load module \"%s\" for " + "configuration profile \"%s\", will use " + "the config file on the card's flash " + "instead.\n", s, sc->cfg_file); snprintf(sc->cfg_file, sizeof(sc->cfg_file), "%s", FLASH_CF); } @@ -2217,8 +2256,8 @@ use_config_on_flash: rc = -t4_wr_mbox(sc, sc->mbox, &caps, sizeof(caps), &caps); if (rc != 0) { device_printf(sc->dev, - "failed to pre-process config file: %d (mtype %d).\n", rc, - mtype); + "failed to pre-process config file: %d " + "(mtype %d, moff 0x%x).\n", rc, mtype, moff); goto done; } From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 19:49:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B85599FE; Thu, 11 Apr 2013 19:49:18 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AB04F162D; Thu, 11 Apr 2013 19:49:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BJnIs8090568; Thu, 11 Apr 2013 19:49:18 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BJnIXC090566; Thu, 11 Apr 2013 19:49:18 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304111949.r3BJnIXC090566@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 11 Apr 2013 19:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249377 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 19:49:18 -0000 Author: trociny Date: Thu Apr 11 19:49:18 2013 New Revision: 249377 URL: http://svnweb.freebsd.org/changeset/base/249377 Log: Add sbuf_start_section() and sbuf_end_section() functions, which can be used for automatic section alignment. Discussed with: kib Reviewed by: kib MFC after: 1 month Modified: head/sys/kern/subr_sbuf.c head/sys/sys/sbuf.h Modified: head/sys/kern/subr_sbuf.c ============================================================================== --- head/sys/kern/subr_sbuf.c Thu Apr 11 19:39:40 2013 (r249376) +++ head/sys/kern/subr_sbuf.c Thu Apr 11 19:49:18 2013 (r249377) @@ -69,6 +69,7 @@ static MALLOC_DEFINE(M_SBUF, "sbuf", "st #define SBUF_HASROOM(s) ((s)->s_len < (s)->s_size - 1) #define SBUF_FREESPACE(s) ((s)->s_size - ((s)->s_len + 1)) #define SBUF_CANEXTEND(s) ((s)->s_flags & SBUF_AUTOEXTEND) +#define SBUF_ISSECTION(s) ((s)->s_flags & SBUF_INSECTION) /* * Set / clear flags @@ -254,6 +255,8 @@ sbuf_uionew(struct sbuf *s, struct uio * return (NULL); } s->s_len = s->s_size - 1; + if (SBUF_ISSECTION(s)) + s->s_sect_len = s->s_size - 1; *error = 0; return (s); } @@ -272,6 +275,7 @@ sbuf_clear(struct sbuf *s) SBUF_CLEARFLAG(s, SBUF_FINISHED); s->s_error = 0; s->s_len = 0; + s->s_sect_len = 0; } /* @@ -290,6 +294,8 @@ sbuf_setpos(struct sbuf *s, ssize_t pos) KASSERT(pos < s->s_size, ("attempt to seek past end of sbuf (%jd >= %jd)", (intmax_t)pos, (intmax_t)s->s_size)); + KASSERT(!SBUF_ISSECTION(s), + ("attempt to seek when in a section")); if (pos < 0 || pos > s->s_len) return (-1); @@ -372,6 +378,8 @@ sbuf_put_byte(struct sbuf *s, int c) return; } s->s_buf[s->s_len++] = c; + if (SBUF_ISSECTION(s)) + s->s_sect_len++; } /* @@ -491,6 +499,8 @@ sbuf_copyin(struct sbuf *s, const void * /* fall through */ case 0: s->s_len += done - 1; + if (SBUF_ISSECTION(s)) + s->s_sect_len += done - 1; break; default: return (-1); /* XXX */ @@ -601,6 +611,8 @@ sbuf_vprintf(struct sbuf *s, const char if (SBUF_FREESPACE(s) < len) len = SBUF_FREESPACE(s); s->s_len += len; + if (SBUF_ISSECTION(s)) + s->s_sect_len += len; if (!SBUF_HASROOM(s) && !SBUF_CANEXTEND(s)) s->s_error = ENOMEM; @@ -656,8 +668,11 @@ sbuf_trim(struct sbuf *s) if (s->s_error != 0) return (-1); - while (s->s_len > 0 && isspace(s->s_buf[s->s_len-1])) + while (s->s_len > 0 && isspace(s->s_buf[s->s_len-1])) { --s->s_len; + if (SBUF_ISSECTION(s)) + s->s_sect_len--; + } return (0); } @@ -758,3 +773,58 @@ sbuf_done(const struct sbuf *s) return (SBUF_ISFINISHED(s)); } + +/* + * Start a section. + */ +void +sbuf_start_section(struct sbuf *s, ssize_t *old_lenp) +{ + + assert_sbuf_integrity(s); + assert_sbuf_state(s, 0); + + if (!SBUF_ISSECTION(s)) { + KASSERT(s->s_sect_len == 0, + ("s_sect_len != 0 when starting a section")); + if (old_lenp != NULL) + *old_lenp = -1; + SBUF_SETFLAG(s, SBUF_INSECTION); + } else { + KASSERT(old_lenp != NULL, + ("s_sect_len should be saved when starting a subsection")); + *old_lenp = s->s_sect_len; + s->s_sect_len = 0; + } +} + +/* + * End the section padding to the specified length with the specified + * character. + */ +ssize_t +sbuf_end_section(struct sbuf *s, ssize_t old_len, size_t pad, int c) +{ + ssize_t len; + + assert_sbuf_integrity(s); + assert_sbuf_state(s, 0); + KASSERT(SBUF_ISSECTION(s), + ("attempt to end a section when not in a section")); + + if (pad > 1) { + len = roundup(s->s_sect_len, pad) - s->s_sect_len; + for (; s->s_error == 0 && len > 0; len--) + sbuf_put_byte(s, c); + } + len = s->s_sect_len; + if (old_len == -1) { + s->s_sect_len = 0; + SBUF_CLEARFLAG(s, SBUF_INSECTION); + } else { + s->s_sect_len += old_len; + } + if (s->s_error != 0) + return (-1); + return (len); +} Modified: head/sys/sys/sbuf.h ============================================================================== --- head/sys/sys/sbuf.h Thu Apr 11 19:39:40 2013 (r249376) +++ head/sys/sys/sbuf.h Thu Apr 11 19:49:18 2013 (r249377) @@ -52,7 +52,9 @@ struct sbuf { #define SBUF_DYNAMIC 0x00010000 /* s_buf must be freed */ #define SBUF_FINISHED 0x00020000 /* set by sbuf_finish() */ #define SBUF_DYNSTRUCT 0x00080000 /* sbuf must be freed */ +#define SBUF_INSECTION 0x00100000 /* set by sbuf_start_section() */ int s_flags; /* flags */ + ssize_t s_sect_len; /* current length of section */ }; __BEGIN_DECLS @@ -81,6 +83,8 @@ char *sbuf_data(struct sbuf *); ssize_t sbuf_len(struct sbuf *); int sbuf_done(const struct sbuf *); void sbuf_delete(struct sbuf *); +void sbuf_start_section(struct sbuf *, ssize_t *); +ssize_t sbuf_end_section(struct sbuf *, ssize_t, size_t, int); #ifdef _KERNEL struct uio; From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 19:50:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B01A9B75; Thu, 11 Apr 2013 19:50:10 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A36C31635; Thu, 11 Apr 2013 19:50:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BJoAqn092170; Thu, 11 Apr 2013 19:50:10 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BJoAu9092168; Thu, 11 Apr 2013 19:50:10 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304111950.r3BJoAu9092168@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 11 Apr 2013 19:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249378 - head/lib/libsbuf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 19:50:10 -0000 Author: trociny Date: Thu Apr 11 19:50:10 2013 New Revision: 249378 URL: http://svnweb.freebsd.org/changeset/base/249378 Log: Add sbuf_start_section and sbuf_end_section to the libsbuf symbol map. MFC after: 1 month Modified: head/lib/libsbuf/Symbol.map head/lib/libsbuf/Version.def Modified: head/lib/libsbuf/Symbol.map ============================================================================== --- head/lib/libsbuf/Symbol.map Thu Apr 11 19:49:18 2013 (r249377) +++ head/lib/libsbuf/Symbol.map Thu Apr 11 19:50:10 2013 (r249378) @@ -22,3 +22,8 @@ FBSD_1.2 { sbuf_done; sbuf_delete; }; + +FBSD_1.3 { + sbuf_start_section; + sbuf_end_section; +}; Modified: head/lib/libsbuf/Version.def ============================================================================== --- head/lib/libsbuf/Version.def Thu Apr 11 19:49:18 2013 (r249377) +++ head/lib/libsbuf/Version.def Thu Apr 11 19:50:10 2013 (r249378) @@ -2,3 +2,6 @@ FBSD_1.2 { }; + +FBSD_1.3 { +} FBSD_1.2; From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 19:51:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 63E79D2A; Thu, 11 Apr 2013 19:51:54 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3C17A164E; Thu, 11 Apr 2013 19:51:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BJpsmB092588; Thu, 11 Apr 2013 19:51:54 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BJpsi0092587; Thu, 11 Apr 2013 19:51:54 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304111951.r3BJpsi0092587@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 11 Apr 2013 19:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249379 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 19:51:54 -0000 Author: trociny Date: Thu Apr 11 19:51:53 2013 New Revision: 249379 URL: http://svnweb.freebsd.org/changeset/base/249379 Log: Document sbuf_start_section() and sbuf_end_section() functions. MFC after: 1 month Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Thu Apr 11 19:50:10 2013 (r249378) +++ head/share/man/man9/sbuf.9 Thu Apr 11 19:51:53 2013 (r249379) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2011 +.Dd April 11, 2013 .Dt SBUF 9 .Os .Sh NAME @@ -51,7 +51,9 @@ .Nm sbuf_data , .Nm sbuf_len , .Nm sbuf_done , -.Nm sbuf_delete +.Nm sbuf_delete , +.Nm sbuf_start_section , +.Nm sbuf_end_section .Nd safe string composition .Sh SYNOPSIS .In sys/types.h @@ -100,6 +102,10 @@ .Fn sbuf_done "struct sbuf *s" .Ft void .Fn sbuf_delete "struct sbuf *s" +.Ft void +.Fn sbuf_start_section "struct sbuf *s" "ssize_t *old_lenp" +.Ft ssize_t +.Fn sbuf_end_section "struct sbuf *s" "ssize_t old_len" "size_t pad" "int c" .In sys/sysctl.h .Ft struct sbuf * .Fn sbuf_new_for_sysctl "struct sbuf *s" "char *buf" "int length" "struct sysctl_req *req" @@ -402,6 +408,30 @@ returns the length of the un-drained dat returns non-zero if the .Fa sbuf is finished. +.Pp +The +.Fn sbuf_start_section +and +.Fn sbuf_end_section +functions may be used for automatic section alignment. +The arguments +.Fa pad +and +.Fa c +specify the padding size and a character used for padding. +The arguments +.Fa old_lenp +and +.Fa old_len +are to save and restore the current section length when nested sections +are used. +For the top level section +.Dv NULL +and \-1 can be specified for +.Fa old_lenp +and +.Fa old_len +respectively. .Sh NOTES If an operation caused an .Fa sbuf @@ -473,6 +503,10 @@ returns \-1 if copying string from userl copied otherwise. .Pp The +.Fn sbuf_end_section +function returns the section length or \-1 if the buffer has an error. +.Pp +The .Fn sbuf_finish 9 function (the kernel version) returns ENOMEM if the sbuf overflowed before being finished, From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 20:15:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 13C4F671; Thu, 11 Apr 2013 20:15:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 064BA17AA; Thu, 11 Apr 2013 20:15:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BKFbYU099767; Thu, 11 Apr 2013 20:15:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BKFboG099763; Thu, 11 Apr 2013 20:15:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201304112015.r3BKFboG099763@svn.freebsd.org> From: Ed Maste Date: Thu, 11 Apr 2013 20:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249381 - in head/lib/libc: gen stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 20:15:38 -0000 Author: emaste Date: Thu Apr 11 20:15:37 2013 New Revision: 249381 URL: http://svnweb.freebsd.org/changeset/base/249381 Log: Spelling correction Modified: head/lib/libc/gen/glob.c head/lib/libc/stdio/fgetln.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Thu Apr 11 20:12:28 2013 (r249380) +++ head/lib/libc/gen/glob.c Thu Apr 11 20:15:37 2013 (r249381) @@ -738,7 +738,7 @@ glob3(Char *pathbuf, Char *pathend, Char /* - * Extend the gl_pathv member of a glob_t structure to accomodate a new item, + * Extend the gl_pathv member of a glob_t structure to accommodate a new item, * add the new item, and update gl_pathc. * * This assumes the BSD realloc, which only copies the block when its size Modified: head/lib/libc/stdio/fgetln.c ============================================================================== --- head/lib/libc/stdio/fgetln.c Thu Apr 11 20:12:28 2013 (r249380) +++ head/lib/libc/stdio/fgetln.c Thu Apr 11 20:15:37 2013 (r249381) @@ -115,7 +115,7 @@ fgetln(FILE *fp, size_t *lenp) * As a bonus, though, we can leave off the __SMOD. * * OPTIMISTIC is length that we (optimistically) expect will - * accomodate the `rest' of the string, on each trip through the + * accommodate the `rest' of the string, on each trip through the * loop below. */ #define OPTIMISTIC 80 From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 21:15:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7C9FF2A5; Thu, 11 Apr 2013 21:15:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4671BEF; Thu, 11 Apr 2013 21:15:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BLFa7P017998; Thu, 11 Apr 2013 21:15:36 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BLFaSv017997; Thu, 11 Apr 2013 21:15:36 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304112115.r3BLFaSv017997@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 21:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249382 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 21:15:36 -0000 Author: np Date: Thu Apr 11 21:15:35 2013 New Revision: 249382 URL: http://svnweb.freebsd.org/changeset/base/249382 Log: There is no need for elaborate queries and error checking when trying to set FW4MSG_ENCAP. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Apr 11 20:15:37 2013 (r249381) +++ head/sys/dev/cxgbe/t4_main.c Thu Apr 11 21:15:35 2013 (r249382) @@ -2480,27 +2480,13 @@ static int set_params__post_init(struct adapter *sc) { uint32_t param, val; - int rc; + /* ask for encapsulated CPLs */ param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP); - rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); - if (rc == 0) { - /* ask for encapsulated CPLs */ - param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP); - val = 1; - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); - if (rc != 0) { - device_printf(sc->dev, - "failed to set parameter (post_init): %d.\n", rc); - return (rc); - } - } else if (rc != FW_EINVAL) { - device_printf(sc->dev, - "failed to check for encapsulated CPLs: %d.\n", rc); - } else - rc = 0; /* the firmware doesn't support the param, no worries */ + val = 1; + (void)t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); - return (rc); + return (0); } #undef FW_PARAM_PFVF From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 21:17:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B3B7245C; Thu, 11 Apr 2013 21:17:49 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A69C61C17; Thu, 11 Apr 2013 21:17:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BLHn0J018318; Thu, 11 Apr 2013 21:17:49 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BLHnbp018317; Thu, 11 Apr 2013 21:17:49 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304112117.r3BLHnbp018317@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 21:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249383 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 21:17:49 -0000 Author: np Date: Thu Apr 11 21:17:49 2013 New Revision: 249383 URL: http://svnweb.freebsd.org/changeset/base/249383 Log: Get rid of a couple of stray \n's. MFC after: 3 days. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Apr 11 21:15:35 2013 (r249382) +++ head/sys/dev/cxgbe/t4_main.c Thu Apr 11 21:17:49 2013 (r249383) @@ -5760,11 +5760,11 @@ sysctl_wrwc_stats(SYSCTL_HANDLER_ARGS) v = t4_read_reg(sc, A_SGE_STAT_CFG); if (G_STATSOURCE_T5(v) == 7) { if (G_STATMODE(v) == 0) { - sbuf_printf(sb, "\ntotal %d, incomplete %d", + sbuf_printf(sb, "total %d, incomplete %d", t4_read_reg(sc, A_SGE_STAT_TOTAL), t4_read_reg(sc, A_SGE_STAT_MATCH)); } else if (G_STATMODE(v) == 1) { - sbuf_printf(sb, "\ntotal %d, data overflow %d", + sbuf_printf(sb, "total %d, data overflow %d", t4_read_reg(sc, A_SGE_STAT_TOTAL), t4_read_reg(sc, A_SGE_STAT_MATCH)); } From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 21:18:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9F1EB5C9; Thu, 11 Apr 2013 21:18:04 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9213F1C1A; Thu, 11 Apr 2013 21:18:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BLI4fN018400; Thu, 11 Apr 2013 21:18:04 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BLI4NE018399; Thu, 11 Apr 2013 21:18:04 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201304112118.r3BLI4NE018399@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 11 Apr 2013 21:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249384 - head/usr.bin/ctlstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 21:18:04 -0000 Author: ken Date: Thu Apr 11 21:18:04 2013 New Revision: 249384 URL: http://svnweb.freebsd.org/changeset/base/249384 Log: Fix bugs in the elapsed time calculation in ctlstat_standard() pointed out by bde: - Casting to long double isn't needed. - The division isn't needed, multiplication can be used. "When 1 nanosecond is in a floating point literal, the whole expression is automatically promoted correctly." - non-KNF indentation (1 tab) for the newly split line - different non-KNF indentation (5 spaces) for the previously split line - exessive parentheses around the division operation - bogus blank line which splits up the etime initialization - general verboseness from the above. Submitted by: bde MFC after: 3 days Modified: head/usr.bin/ctlstat/ctlstat.c Modified: head/usr.bin/ctlstat/ctlstat.c ============================================================================== --- head/usr.bin/ctlstat/ctlstat.c Thu Apr 11 21:17:49 2013 (r249383) +++ head/usr.bin/ctlstat/ctlstat.c Thu Apr 11 21:18:04 2013 (r249384) @@ -404,7 +404,7 @@ ctlstat_json(struct ctlstat_context *ctx static void ctlstat_standard(struct ctlstat_context *ctx) { - long double cur_secs, prev_secs, etime; + long double etime; uint64_t delta_jiffies, delta_idle; uint32_t port; long double cpu_percentage; @@ -416,12 +416,8 @@ ctlstat_standard(struct ctlstat_context if (F_CPU(ctx) && (getcpu(&ctx->cur_cpu) != 0)) errx(1, "error returned from getcpu()"); - cur_secs = ctx->cur_time.tv_sec + - ((long double)ctx->cur_time.tv_nsec / 1000000000); - prev_secs = ctx->prev_time.tv_sec + - ((long double)ctx->prev_time.tv_nsec / 1000000000); - - etime = cur_secs - prev_secs; + etime = ctx->cur_time.tv_sec - ctx->prev_time.tv_sec + + (ctx->prev_time.tv_nsec - ctx->cur_time.tv_nsec) * 1e-9; if (F_CPU(ctx)) { ctx->prev_total_jiffies = ctx->cur_total_jiffies; From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 21:36:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F257A98C; Thu, 11 Apr 2013 21:36:01 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CBC751D18; Thu, 11 Apr 2013 21:36:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BLa1mQ024033; Thu, 11 Apr 2013 21:36:01 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BLa1wB024031; Thu, 11 Apr 2013 21:36:01 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304112136.r3BLa1wB024031@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 21:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249385 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 21:36:02 -0000 Author: np Date: Thu Apr 11 21:36:01 2013 New Revision: 249385 URL: http://svnweb.freebsd.org/changeset/base/249385 Log: cxgbe/tom: Slight simplification of code that calculates options2. MFC after: 3 days Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 11 21:18:04 2013 (r249384) +++ head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 11 21:36:01 2013 (r249385) @@ -226,7 +226,10 @@ calc_opt2a(struct socket *so, struct toe struct tcpcb *tp = so_sototcpcb(so); struct port_info *pi = toep->port; struct adapter *sc = pi->adapter; - uint32_t opt2 = 0; + uint32_t opt2; + + opt2 = V_TX_QUEUE(sc->params.tp.tx_modq[pi->tx_chan]) | + F_RSS_QUEUE_VALID | V_RSS_QUEUE(toep->ofld_rxq->iq.abs_id); if (tp->t_flags & TF_SACK_PERMIT) opt2 |= F_SACK_EN; @@ -240,12 +243,12 @@ calc_opt2a(struct socket *so, struct toe if (V_tcp_do_ecn) opt2 |= F_CCTRL_ECN; - opt2 |= V_TX_QUEUE(sc->params.tp.tx_modq[pi->tx_chan]); - opt2 |= F_RSS_QUEUE_VALID | V_RSS_QUEUE(toep->ofld_rxq->iq.abs_id); + /* RX_COALESCE is always a valid value (M_RX_COALESCE). */ if (is_t4(sc)) - opt2 |= F_RX_COALESCE_VALID | V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_COALESCE_VALID; else - opt2 |= F_T5_OPT_2_VALID | V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_T5_OPT_2_VALID; + opt2 |= V_RX_COALESCE(M_RX_COALESCE); #ifdef USE_DDP_RX_FLOW_CONTROL if (toep->ulp_mode == ULP_MODE_TCPDDP) Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Thu Apr 11 21:18:04 2013 (r249384) +++ head/sys/dev/cxgbe/tom/t4_listen.c Thu Apr 11 21:36:01 2013 (r249385) @@ -990,8 +990,11 @@ static uint32_t calc_opt2p(struct adapter *sc, struct port_info *pi, int rxqid, const struct tcp_options *tcpopt, struct tcphdr *th, int ulp_mode) { - uint32_t opt2 = 0; struct sge_ofld_rxq *ofld_rxq = &sc->sge.ofld_rxq[rxqid]; + uint32_t opt2; + + opt2 = V_TX_QUEUE(sc->params.tp.tx_modq[pi->tx_chan]) | + F_RSS_QUEUE_VALID | V_RSS_QUEUE(ofld_rxq->iq.abs_id); if (V_tcp_do_rfc1323) { if (tcpopt->tstamp) @@ -1005,12 +1008,12 @@ calc_opt2p(struct adapter *sc, struct po if (V_tcp_do_ecn && th->th_flags & (TH_ECE | TH_CWR)) opt2 |= F_CCTRL_ECN; - opt2 |= V_TX_QUEUE(sc->params.tp.tx_modq[pi->tx_chan]); - opt2 |= F_RSS_QUEUE_VALID | V_RSS_QUEUE(ofld_rxq->iq.abs_id); + /* RX_COALESCE is always a valid value (0 or M_RX_COALESCE). */ if (is_t4(sc)) - opt2 |= F_RX_COALESCE_VALID | V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_COALESCE_VALID; else - opt2 |= F_T5_OPT_2_VALID | V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_T5_OPT_2_VALID; + opt2 |= V_RX_COALESCE(M_RX_COALESCE); #ifdef USE_DDP_RX_FLOW_CONTROL if (ulp_mode == ULP_MODE_TCPDDP) From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 22:02:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C4296E61; Thu, 11 Apr 2013 22:02:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B6E101E0B; Thu, 11 Apr 2013 22:02:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BM2ZLO032512; Thu, 11 Apr 2013 22:02:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BM2ZX7032511; Thu, 11 Apr 2013 22:02:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304112202.r3BM2ZX7032511@svn.freebsd.org> From: Adrian Chadd Date: Thu, 11 Apr 2013 22:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249386 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:02:35 -0000 Author: adrian Date: Thu Apr 11 22:02:35 2013 New Revision: 249386 URL: http://svnweb.freebsd.org/changeset/base/249386 Log: Always enable TXOK interrupts when setting up TX queues for EDMA NICs. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Apr 11 21:36:01 2013 (r249385) +++ head/sys/dev/ath/if_ath.c Thu Apr 11 22:02:35 2013 (r249386) @@ -3468,7 +3468,13 @@ ath_txq_setup(struct ath_softc *sc, int * up in which case the top half of the kernel may backup * due to a lack of tx descriptors. */ - qi.tqi_qflags = HAL_TXQ_TXEOLINT_ENABLE | HAL_TXQ_TXDESCINT_ENABLE; + if (sc->sc_isedma) + qi.tqi_qflags = HAL_TXQ_TXEOLINT_ENABLE | + HAL_TXQ_TXOKINT_ENABLE; + else + qi.tqi_qflags = HAL_TXQ_TXEOLINT_ENABLE | + HAL_TXQ_TXDESCINT_ENABLE; + qnum = ath_hal_setuptxqueue(ah, qtype, &qi); if (qnum == -1) { /* From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 22:18:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ABEB266D; Thu, 11 Apr 2013 22:18:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9D85D1EDB; Thu, 11 Apr 2013 22:18:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BMILSA036795; Thu, 11 Apr 2013 22:18:21 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BMILxq036793; Thu, 11 Apr 2013 22:18:21 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201304112218.r3BMILxq036793@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Apr 2013 22:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249390 - in head/sys: conf powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:18:21 -0000 Author: bz Date: Thu Apr 11 22:18:20 2013 New Revision: 249390 URL: http://svnweb.freebsd.org/changeset/base/249390 Log: Generate a LINT for powerpc and for powerpc64. Discussed with: nwhitehorn Modified: head/sys/conf/makeLINT.mk head/sys/powerpc/conf/Makefile Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Thu Apr 11 22:10:15 2013 (r249389) +++ head/sys/conf/makeLINT.mk Thu Apr 11 22:18:20 2013 (r249390) @@ -46,6 +46,12 @@ LINT: ${NOTES} ../../conf/makeLINT.sed echo "nodevice txp" >> ${.TARGET}-NOIP echo "nodevice vxge" >> ${.TARGET}-NOIP .endif -.if ${TARGET} == "powerpc" || ${TARGET} == "mips" +.if ${TARGET} == "mips" echo "machine ${TARGET} ${TARGET_ARCH}" >> ${.TARGET} .endif +.if ${TARGET} == "powerpc" + # cat is available, not sure if cp is? + cat ${.TARGET} > ${.TARGET}64 + echo "machine ${TARGET} powerpc" >> ${.TARGET} + echo "machine ${TARGET} powerpc64" >> ${.TARGET}64 +.endif Modified: head/sys/powerpc/conf/Makefile ============================================================================== --- head/sys/powerpc/conf/Makefile Thu Apr 11 22:10:15 2013 (r249389) +++ head/sys/powerpc/conf/Makefile Thu Apr 11 22:18:20 2013 (r249390) @@ -1,8 +1,5 @@ # $FreeBSD$ TARGET=powerpc -.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpc64 -TARGET_ARCH?=${MACHINE_ARCH} -.endif .include "${.CURDIR}/../../conf/makeLINT.mk" From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 22:46:36 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 44CB3DAF; Thu, 11 Apr 2013 22:46:36 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 1599B29; Thu, 11 Apr 2013 22:46:35 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id r3BMkYLo056288; Thu, 11 Apr 2013 16:46:34 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r3BMkYnx056287; Thu, 11 Apr 2013 16:46:34 -0600 (MDT) (envelope-from ken) Date: Thu, 11 Apr 2013 16:46:34 -0600 From: "Kenneth D. Merry" To: Bruce Evans Subject: Re: svn commit: r249334 - head/usr.bin/ctlstat Message-ID: <20130411224634.GA56177@nargothrond.kdm.org> References: <201304101601.r3AG1jZq083572@svn.freebsd.org> <20130411163712.Y1200@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130411163712.Y1200@besplex.bde.org> User-Agent: Mutt/1.4.2i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:46:36 -0000 On Thu, Apr 11, 2013 at 17:06:44 +1000, Bruce Evans wrote: > On Wed, 10 Apr 2013, Kenneth D. Merry wrote: > > >Log: > > Fix a time calculation error in ctlstat_standard(). > > > > ctlstat.c: When converting a timeval to a floating point > > number in ctlstat_standard(), cast the nanoseconds > > calculation to a long double, so we don't lose > > precision. Without the cast, we wind up with a > > time in whole seconds only. > >... > >Modified: head/usr.bin/ctlstat/ctlstat.c > >============================================================================== > >--- head/usr.bin/ctlstat/ctlstat.c Wed Apr 10 11:26:30 2013 (r249333) > >+++ head/usr.bin/ctlstat/ctlstat.c Wed Apr 10 16:01:45 2013 (r249334) > >@@ -416,9 +416,10 @@ ctlstat_standard(struct ctlstat_context > > if (F_CPU(ctx) && (getcpu(&ctx->cur_cpu) != 0)) > > errx(1, "error returned from getcpu()"); > > > >- cur_secs = ctx->cur_time.tv_sec + (ctx->cur_time.tv_nsec / > >1000000000); > >+ cur_secs = ctx->cur_time.tv_sec + > >+ ((long double)ctx->cur_time.tv_nsec / 1000000000); > > prev_secs = ctx->prev_time.tv_sec + > >- (ctx->prev_time.tv_nsec / 1000000000); > >+ ((long double)ctx->prev_time.tv_nsec / 1000000000); > > > > etime = cur_secs - prev_secs; > > long double is rarely necessary. It mainly asks for slowness (10-50%) > on i386 and extreme slowness (hundreds of times slower) on space64. > Double precision is plenty. Many arches in FreeBSD have long double == > double, so you can't depend on long double being more precise than double, > and statistics utilities are especially not in need of much precision. > (Float precision would be enough here. It would be accurate to 1/16 > of a microsecond. Not to 1 nanosecond, but you don't need that. The > integer division was only accurate to 1/4 second, so ist error was > noticeable.) > > There is no need for any casts. There is no need for any divisions. > Simply multiply by 1 nanosecond. This must be in floating point, since > integers can't represent 1 nanosecond (neither can floating, but the > error of ~2**-53 nanosecnds for double precision is neglogible). When > 1 nanosecond is in a floating point literal, the whole expression is > automatically promoted correctly. > > Other style bugs in the above: > - non-KNF indentation (1 tab) for the newly split line > - different non-KNF indentation (5 spaces) for the previously split line > - exessive parentheses around the division operation > - bogus blank line which splits up the etime initialization > - general verboseness from the above. > > Fixing these gives: > > cur_secs = ctx->cur_time.tv_sec + ctx->cur_time.tv_nsec * 1e-9; > prev_secs = ctx->prev_time.tv_sec + ctx->prev_time.tv_nsec * 1e-9 > etime = cur_secs - prev_secs; > > It is now clear that this is still too verbose, since cur_secs and prev_secs > are not used except to initialize etime. Simplifying this gives: > > etime = ctx->cur_time.tv_sec - ctx->prev_time.tv_sec + > (ctx->prev_time.tv_nsec - ctx->cur_time.tv_nsec) * 1e-9; > > This might need casting to double of ctx->cur_time.tv_sec, in case time_t > is unsigned and the time went backwards. Otherwise, this should be the > usual expression for subtracting timespecs. The time can't go backwards in this case, because it is the system uptime. Using wall clock time causes problems measuring performance when NTP decides that the system time needs to change. I have a local patch to dd to fix instances of bogus performance numbers due to its using wall clock time to measure elapsed time. This should be fixed now, thanks for the review! Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 22:46:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E6AADDB0; Thu, 11 Apr 2013 22:46:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D93D02F; Thu, 11 Apr 2013 22:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BMkdlq045587; Thu, 11 Apr 2013 22:46:39 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BMkdtK045586; Thu, 11 Apr 2013 22:46:39 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304112246.r3BMkdtK045586@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 22:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249391 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:46:40 -0000 Author: np Date: Thu Apr 11 22:46:39 2013 New Revision: 249391 URL: http://svnweb.freebsd.org/changeset/base/249391 Log: Auto-reduce the holdoff timers that are greater than the maximum value allowed by the hardware. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Apr 11 22:18:20 2013 (r249390) +++ head/sys/dev/cxgbe/t4_sge.c Thu Apr 11 22:46:39 2013 (r249391) @@ -280,12 +280,16 @@ t4_init_sge_cpl_handlers(struct adapter t4_register_fw_msg_handler(sc, FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); } +/* + * adap->params.vpd.cclk must be set up before this is called. + */ void t4_tweak_chip_settings(struct adapter *sc) { int i; uint32_t v, m; int intr_timer[SGE_NTIMERS] = {1, 5, 10, 50, 100, 200}; + int timer_max = M_TIMERVALUE0 * 1000 / sc->params.vpd.cclk; int intr_pktcount[SGE_NCOUNTERS] = {1, 8, 16, 32}; /* 63 max */ uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); @@ -318,7 +322,24 @@ t4_tweak_chip_settings(struct adapter *s V_THRESHOLD_2(intr_pktcount[2]) | V_THRESHOLD_3(intr_pktcount[3]); t4_write_reg(sc, A_SGE_INGRESS_RX_THRESHOLD, v); - /* adap->params.vpd.cclk must be set up before this */ + KASSERT(intr_timer[0] <= timer_max, + ("%s: not a single usable timer (%d, %d)", __func__, intr_timer[0], + timer_max)); + for (i = 1; i < nitems(intr_timer); i++) { + KASSERT(intr_timer[i] >= intr_timer[i - 1], + ("%s: timers not listed in increasing order (%d)", + __func__, i)); + + while (intr_timer[i] > timer_max) { + if (i == nitems(intr_timer) - 1) { + intr_timer[i] = timer_max; + break; + } + intr_timer[i] += intr_timer[i - 1]; + intr_timer[i] /= 2; + } + } + v = V_TIMERVALUE0(us_to_core_ticks(sc, intr_timer[0])) | V_TIMERVALUE1(us_to_core_ticks(sc, intr_timer[1])); t4_write_reg(sc, A_SGE_TIMER_VALUE_0_AND_1, v); From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 22:49:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 578D115A; Thu, 11 Apr 2013 22:49:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 49F7196; Thu, 11 Apr 2013 22:49:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BMnTO7046000; Thu, 11 Apr 2013 22:49:29 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BMnTBh045996; Thu, 11 Apr 2013 22:49:29 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304112249.r3BMnTBh045996@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 22:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249392 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:49:30 -0000 Author: np Date: Thu Apr 11 22:49:29 2013 New Revision: 249392 URL: http://svnweb.freebsd.org/changeset/base/249392 Log: Cosmetic change (s/wrwc/wcwr/;s/WRWC/WCWR/). MFC after: 3 days. Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Apr 11 22:46:39 2013 (r249391) +++ head/sys/dev/cxgbe/adapter.h Thu Apr 11 22:49:29 2013 (r249392) @@ -319,7 +319,7 @@ enum { }; /* Listed in order of preference. Update t4_sysctls too if you change these */ -enum {DOORBELL_UDB, DOORBELL_WRWC, DOORBELL_UDBWC, DOORBELL_KDB}; +enum {DOORBELL_UDB, DOORBELL_WCWR, DOORBELL_UDBWC, DOORBELL_KDB}; /* * Egress Queue: driver is producer, T4 is consumer. Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Apr 11 22:46:39 2013 (r249391) +++ head/sys/dev/cxgbe/t4_main.c Thu Apr 11 22:49:29 2013 (r249392) @@ -397,7 +397,7 @@ static int sysctl_tcp_stats(SYSCTL_HANDL static int sysctl_tids(SYSCTL_HANDLER_ARGS); static int sysctl_tp_err_stats(SYSCTL_HANDLER_ARGS); static int sysctl_tx_rate(SYSCTL_HANDLER_ARGS); -static int sysctl_wrwc_stats(SYSCTL_HANDLER_ARGS); +static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); #endif static inline void txq_start(struct ifnet *, struct sge_txq *); static uint32_t fconf_to_mode(uint32_t); @@ -1413,7 +1413,7 @@ map_bar_2(struct adapter *sc) rman_get_size(sc->udbs_res), PAT_WRITE_COMBINING); if (rc == 0) { clrbit(&sc->doorbells, DOORBELL_UDB); - setbit(&sc->doorbells, DOORBELL_WRWC); + setbit(&sc->doorbells, DOORBELL_WCWR); setbit(&sc->doorbells, DOORBELL_UDBWC); } else { device_printf(sc->dev, @@ -4054,7 +4054,7 @@ t4_sysctls(struct adapter *sc) "\5INITIATOR_SSNOFLD\6TARGET_SSNOFLD", "\20\1INITIATOR\2TARGET\3CTRL_OFLD" /* caps[5] fcoecaps */ }; - static char *doorbells = {"\20\1UDB\2WRWC\3UDBWC\4KDB"}; + static char *doorbells = {"\20\1UDB\2WCWR\3UDBWC\4KDB"}; ctx = device_get_sysctl_ctx(sc->dev); @@ -4260,9 +4260,9 @@ t4_sysctls(struct adapter *sc) sysctl_tx_rate, "A", "Tx rate"); if (is_t5(sc)) { - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "wrwc_stats", + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "wcwr_stats", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, - sysctl_wrwc_stats, "A", "work request (WC) statistics"); + sysctl_wcwr_stats, "A", "write combined work requests"); } #endif @@ -5743,7 +5743,7 @@ sysctl_tx_rate(SYSCTL_HANDLER_ARGS) } static int -sysctl_wrwc_stats(SYSCTL_HANDLER_ARGS) +sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; struct sbuf *sb; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Apr 11 22:46:39 2013 (r249391) +++ head/sys/dev/cxgbe/t4_sge.c Thu Apr 11 22:49:29 2013 (r249392) @@ -2305,7 +2305,7 @@ alloc_eq(struct adapter *sc, struct port if (isset(&eq->doorbells, DOORBELL_UDB) || isset(&eq->doorbells, DOORBELL_UDBWC) || - isset(&eq->doorbells, DOORBELL_WRWC)) { + isset(&eq->doorbells, DOORBELL_WCWR)) { uint32_t s_qpp = sc->sge.s_qpp; uint32_t mask = (1 << s_qpp) - 1; volatile uint8_t *udb; @@ -2314,7 +2314,7 @@ alloc_eq(struct adapter *sc, struct port udb += (eq->cntxt_id >> s_qpp) << PAGE_SHIFT; /* pg offset */ eq->udb_qid = eq->cntxt_id & mask; /* id in page */ if (eq->udb_qid > PAGE_SIZE / UDBS_SEG_SIZE) - clrbit(&eq->doorbells, DOORBELL_WRWC); + clrbit(&eq->doorbells, DOORBELL_WCWR); else { udb += eq->udb_qid << UDBS_SEG_SHIFT; /* seg offset */ eq->udb_qid = 0; @@ -3451,7 +3451,7 @@ ring_eq_db(struct adapter *sc, struct sg db = eq->doorbells; pending = eq->pending; if (pending > 1) - clrbit(&db, DOORBELL_WRWC); + clrbit(&db, DOORBELL_WCWR); eq->pending = 0; wmb(); @@ -3460,14 +3460,14 @@ ring_eq_db(struct adapter *sc, struct sg *eq->udb = htole32(V_QID(eq->udb_qid) | V_PIDX(pending)); return; - case DOORBELL_WRWC: { + case DOORBELL_WCWR: { volatile uint64_t *dst, *src; int i; /* * Queues whose 128B doorbell segment fits in the page do not * use relative qid (udb_qid is always 0). Only queues with - * doorbell segments can do WRWC. + * doorbell segments can do WCWR. */ KASSERT(eq->udb_qid == 0 && pending == 1, ("%s: inappropriate doorbell (0x%x, %d, %d) for eq %p", From owner-svn-src-head@FreeBSD.ORG Thu Apr 11 23:40:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BC08C89F; Thu, 11 Apr 2013 23:40:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AF6AB23E; Thu, 11 Apr 2013 23:40:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BNe6mB062721; Thu, 11 Apr 2013 23:40:06 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BNe66n062720; Thu, 11 Apr 2013 23:40:06 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201304112340.r3BNe66n062720@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Apr 2013 23:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249393 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 23:40:06 -0000 Author: np Date: Thu Apr 11 23:40:05 2013 New Revision: 249393 URL: http://svnweb.freebsd.org/changeset/base/249393 Log: Add pciids of the T5 based cards. The ones that I haven't tested with cxgbe(4) are disabled for now. This will change. MFC after: 2 weeks Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Apr 11 22:49:29 2013 (r249392) +++ head/sys/dev/cxgbe/t4_main.c Thu Apr 11 23:40:05 2013 (r249393) @@ -441,6 +441,27 @@ struct { }, t5_pciids[] = { {0xb000, "Chelsio Terminator 5 FPGA"}, {0x5400, "Chelsio T580-dbg"}, + {0x5401, "Chelsio T520-CR"}, + {0x5407, "Chelsio T520-SO"}, + {0x5408, "Chelsio T520-CX"}, + {0x5411, "Chelsio T520-LL-CR"}, +#ifdef notyet + {0x5402, "Chelsio T522-CR"}, + {0x5403, "Chelsio T540-CR"}, + {0x5404, "Chelsio T520-BCH"}, + {0x5405, "Chelsio T540-BCH"}, + {0x5406, "Chelsio T540-CH"}, + {0x5409, "Chelsio T520-BT"}, + {0x540a, "Chelsio T504-BT"}, + {0x540b, "Chelsio B520-SR"}, + {0x540c, "Chelsio B504-BT"}, + {0x540d, "Chelsio T580-CR"}, + {0x540e, "Chelsio T540-LP-CR"}, + {0x540f, "Chelsio Amsterdam"}, + {0x5410, "Chelsio T580-LP-CR"}, + {0x5412, "Chelsio T560-CR"}, + {0x5413, "Chelsio T580-CR"}, +#endif }; #ifdef TCP_OFFLOAD From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 00:34:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 45660F40; Fri, 12 Apr 2013 00:34:20 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 36AA83EC; Fri, 12 Apr 2013 00:34:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3C0YKha078766; Fri, 12 Apr 2013 00:34:20 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3C0YKp3078765; Fri, 12 Apr 2013 00:34:20 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201304120034.r3C0YKp3078765@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 12 Apr 2013 00:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249395 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 00:34:20 -0000 Author: sjg Date: Fri Apr 12 00:34:19 2013 New Revision: 249395 URL: http://svnweb.freebsd.org/changeset/base/249395 Log: If doing buildworld -DWITH_BMAKE make sure bmake does the build. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Apr 11 23:45:40 2013 (r249394) +++ head/Makefile Fri Apr 12 00:34:19 2013 (r249395) @@ -281,6 +281,9 @@ kernel: buildkernel installkernel # upgrade_checks: .if !defined(.PARSEDIR) +.if defined(WITH_BMAKE) + (cd ${.CURDIR} && ${MAKE} bmake) +.else @if ! (cd ${.CURDIR}/tools/build/make_check && \ PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \ PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \ @@ -288,6 +291,7 @@ upgrade_checks: (cd ${.CURDIR} && ${MAKE} make); \ fi .endif +.endif # # Upgrade make(1) to the current version using the installed @@ -302,12 +306,12 @@ MMAKE= ${MMAKEENV} ${MAKE} \ -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WERROR -make: .PHONY +make bmake: .PHONY @echo @echo "--------------------------------------------------------------" @echo ">>> Building an up-to-date make(1)" @echo "--------------------------------------------------------------" - ${_+_}@cd ${.CURDIR}/usr.bin/make; \ + ${_+_}@cd ${.CURDIR}/usr.bin/${.TARGET}; \ ${MMAKE} obj && \ ${MMAKE} depend && \ ${MMAKE} all && \ From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 01:16:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 422605A1; Fri, 12 Apr 2013 01:16:54 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 235F3754; Fri, 12 Apr 2013 01:16:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3C1Gr4b091638; Fri, 12 Apr 2013 01:16:53 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3C1GrOj091632; Fri, 12 Apr 2013 01:16:53 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304120116.r3C1GrOj091632@svn.freebsd.org> From: Neel Natu Date: Fri, 12 Apr 2013 01:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249396 - in head/sys/amd64: include vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 01:16:54 -0000 Author: neel Date: Fri Apr 12 01:16:52 2013 New Revision: 249396 URL: http://svnweb.freebsd.org/changeset/base/249396 Log: If vmm.ko could not be initialized correctly then prevent the creation of virtual machines subsequently. Submitted by: Chris Torek Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Fri Apr 12 00:34:19 2013 (r249395) +++ head/sys/amd64/include/vmm.h Fri Apr 12 01:16:52 2013 (r249396) @@ -87,7 +87,7 @@ struct vmm_ops { extern struct vmm_ops vmm_ops_intel; extern struct vmm_ops vmm_ops_amd; -struct vm *vm_create(const char *name); +int vm_create(const char *name, struct vm **retvm); void vm_destroy(struct vm *vm); const char *vm_name(struct vm *vm); int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Fri Apr 12 00:34:19 2013 (r249395) +++ head/sys/amd64/vmm/vmm.c Fri Apr 12 01:16:52 2013 (r249396) @@ -103,6 +103,8 @@ struct vm { cpuset_t active_cpus; }; +static int vmm_initialized; + static struct vmm_ops *ops; #define VMM_INIT() (ops != NULL ? (*ops->init)() : 0) #define VMM_CLEANUP() (ops != NULL ? (*ops->cleanup)() : 0) @@ -213,6 +215,8 @@ vmm_handler(module_t mod, int what, void vmmdev_init(); iommu_init(); error = vmm_init(); + if (error == 0) + vmm_initialized = 1; break; case MOD_UNLOAD: error = vmmdev_cleanup(); @@ -221,6 +225,7 @@ vmm_handler(module_t mod, int what, void vmm_ipi_cleanup(); error = VMM_CLEANUP(); } + vmm_initialized = 0; break; default: error = 0; @@ -249,8 +254,8 @@ MODULE_VERSION(vmm, 1); SYSCTL_NODE(_hw, OID_AUTO, vmm, CTLFLAG_RW, NULL, NULL); -struct vm * -vm_create(const char *name) +int +vm_create(const char *name, struct vm **retvm) { int i; struct vm *vm; @@ -258,8 +263,15 @@ vm_create(const char *name) const int BSP = 0; + /* + * If vmm.ko could not be successfully initialized then don't attempt + * to create the virtual machine. + */ + if (!vmm_initialized) + return (ENXIO); + if (name == NULL || strlen(name) >= VM_MAX_NAMELEN) - return (NULL); + return (EINVAL); vm = malloc(sizeof(struct vm), M_VM, M_WAITOK | M_ZERO); strcpy(vm->name, name); @@ -274,7 +286,8 @@ vm_create(const char *name) vm->iommu = iommu_create_domain(maxaddr); vm_activate_cpu(vm, BSP); - return (vm); + *retvm = vm; + return (0); } static void Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Fri Apr 12 00:34:19 2013 (r249395) +++ head/sys/amd64/vmm/vmm_dev.c Fri Apr 12 01:16:52 2013 (r249396) @@ -475,9 +475,9 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) if (sc != NULL) return (EEXIST); - vm = vm_create(buf); - if (vm == NULL) - return (EINVAL); + error = vm_create(buf, &vm); + if (error != 0) + return (error); sc = malloc(sizeof(struct vmmdev_softc), M_VMMDEV, M_WAITOK | M_ZERO); sc->vm = vm; From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 02:01:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3D626EDD; Fri, 12 Apr 2013 02:01:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD618AC; Fri, 12 Apr 2013 02:01:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3C21I6w006152; Fri, 12 Apr 2013 02:01:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3C21ICi006151; Fri, 12 Apr 2013 02:01:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304120201.r3C21ICi006151@svn.freebsd.org> From: Xin LI Date: Fri, 12 Apr 2013 02:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249397 - head/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 02:01:18 -0000 Author: delphij Date: Fri Apr 12 02:01:17 2013 New Revision: 249397 URL: http://svnweb.freebsd.org/changeset/base/249397 Log: Fix a few typos. Reviewed by: gjb MFC after: 3 days Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Apr 12 01:16:52 2013 (r249396) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Apr 12 02:01:17 2013 (r249397) @@ -171,7 +171,7 @@ There is a wide variety of motherboards available for this architecture. Motherboards using the ISA, VLB, EISA, AGP, and - PCI expansion busses are well-supported. There is some + PCI expansion buses are well-supported. There is some limited support for the MCA (MicroChannel) expansion bus used in the IBM PS/2 line of PCs. @@ -200,7 +200,7 @@ memory above 4 gigabytes and allow it to be used by the system. This feature places constraints on the device drivers and other features of &os; which may be used; consult the - &man.pae.4; manpage for more details. + &man.pae.4; manual page for more details. &os; will generally run on i386-based laptops, albeit with varying levels of support for certain hardware features such @@ -533,7 +533,7 @@ The following systems are partially supported by &os;. In - particular the fibre channel controllers in SBus-based systems are not + particular the fiber channel controllers in SBus-based systems are not supported. However, it is possible to use these with a SCSI controller supported by the &man.esp.4 driver (Sun ESP SCSI, Sun FAS Fast-SCSI and Sun FAS366 Fast-Wide SCSI controllers). From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 07:59:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 495FF99A; Fri, 12 Apr 2013 07:59:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3C5D31562; Fri, 12 Apr 2013 07:59:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3C7xsJP013871; Fri, 12 Apr 2013 07:59:54 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3C7xsBU013869; Fri, 12 Apr 2013 07:59:54 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201304120759.r3C7xsBU013869@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 12 Apr 2013 07:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249398 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 07:59:55 -0000 Author: ae Date: Fri Apr 12 07:59:54 2013 New Revision: 249398 URL: http://svnweb.freebsd.org/changeset/base/249398 Log: Free memory after deleting an address policy entry. MFC after: 1 week Modified: head/sys/netinet6/in6_src.c Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Apr 12 02:01:17 2013 (r249397) +++ head/sys/netinet6/in6_src.c Fri Apr 12 07:59:54 2013 (r249398) @@ -1100,6 +1100,7 @@ delete_addrsel_policyent(struct in6_addr TAILQ_REMOVE(&V_addrsel_policytab, pol, ape_entry); ADDRSEL_UNLOCK(); ADDRSEL_XUNLOCK(); + free(pol, M_IFADDR); return (0); } From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 08:39:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5B83BFAB; Fri, 12 Apr 2013 08:39:19 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4E72B172D; Fri, 12 Apr 2013 08:39:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3C8dJWP026232; Fri, 12 Apr 2013 08:39:19 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3C8dJv0026231; Fri, 12 Apr 2013 08:39:19 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201304120839.r3C8dJv0026231@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 12 Apr 2013 08:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249399 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 08:39:19 -0000 Author: gavin Date: Fri Apr 12 08:39:18 2013 New Revision: 249399 URL: http://svnweb.freebsd.org/changeset/base/249399 Log: Update with several early mentor/mentee relationships and dates commit bits were granted. Relationships have been provided by the mentees, dates have been sourced from either the mentees or the CVS mailing list archives. Obtained from: mux, wilko, msmith, peter, schweikh Obtained from: gallatin, dfr, murray, jkoshy Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Fri Apr 12 07:59:54 2013 (r249398) +++ head/share/misc/committers-src.dot Fri Apr 12 08:39:18 2013 (r249399) @@ -52,7 +52,7 @@ groudier [label="Gerard Roudier\ngroudie jake [label="Jake Burkholder\njake@FreeBSD.org\n2000/05/16\n2008/11/10"] jayanth [label="Jayanth Vijayaraghavan\njayanth@FreeBSD.org\n2000/05/08\n2008/11/10"] jb [label="John Birrell\njb@FreeBSD.org\n????/??/??\n2009/12/15"] -jdp [label="John Polstra\njdp@FreeBSD.org\n????/??/??\n2008/02/26"] +jdp [label="John Polstra\njdp@FreeBSD.org\n1995/12/07\n2008/02/26"] jedgar [label="Chris D. Faulhaber\njedgar@FreeBSD.org\n1999/12/15\n2006/04/07"] jkh [label="Jordan K. Hubbard\njkh@FreeBSD.org\n1993/06/12\n2008/06/13"] jlemon [label="Jonathan Lemon\njlemon@FreeBSD.org\n1997/08/14\n2008/11/10"] @@ -65,7 +65,7 @@ lulf [label="Ulf Lilleengen\nlulf@FreeBS mb [label="Maxim Bolotin\nmb@FreeBSD.org\n2000/04/06\n2003/03/08"] marks [label="Mark Santcroos\nmarks@FreeBSD.org\n2004/03/18\n2008/09/29"] mike [label="Mike Barcroft\nmike@FreeBSD.org\n2001/07/17\n2006/04/28"] -msmith [label="Mike Smith\nmsmith@FreeBSD.org\n????/??/??\n2003/12/15"] +msmith [label="Mike Smith\nmsmith@FreeBSD.org\n1996/10/22\n2003/12/15"] murray [label="Murray Stokely\nmurray@FreeBSD.org\n2000/04/05\n2010/07/25"] mux [label="Maxime Henrion\nmux@FreeBSD.org\n2002/03/03\n2011/06/22"] nate [label="Nate Willams\nnate@FreeBSD.org\n1993/06/12\n2003/12/15"] @@ -153,7 +153,7 @@ fjoe [label="Max Khon\nfjoe@FreeBSD.org\ flz [label="Florent Thoumie\nflz@FreeBSD.org\n2006/03/30"] gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2010/02/02"] gad [label="Garance A. Drosehn\ngad@FreeBSD.org\n2000/10/27"] -gallatin [label="Andrew Gallatin\ngallatin@FreeBSD.org\n????/??/??"] +gallatin [label="Andrew Gallatin\ngallatin@FreeBSD.org\n1999/01/15"] gavin [label="Gavin Atkinson\ngavin@FreeBSD.org\n2009/12/07"] gibbs [label="Justin T. Gibbs\ngibbs@FreeBSD.org\n????/??/??"] gleb [label="Gleb Kurtsou\ngleb@FreeBSD.org\n2011/09/19"] @@ -188,7 +188,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBS jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"] -julian [label="Julian Elischer\njulian@FreeBSD.org\n1993/??/??"] +julian [label="Julian Elischer\njulian@FreeBSD.org\n1993/04/19"] jwd [label="John De Boskey\njwd@FreeBSD.org\n2000/05/19"] kaiw [label="Kai Wang\nkaiw@FreeBSD.org\n2007/09/26"] kan [label="Alexander Kabaev\nkan@FreeBSD.org\n2002/07/21"] @@ -202,7 +202,7 @@ lstewart [label="Lawrence Stewart\nlstew marcel [label="Marcel Moolenaar\nmarcel@FreeBSD.org\n1999/07/03"] marius [label="Marius Strobl\nmarius@FreeBSD.org\n2004/04/17"] markj [label="Mark Johnston\nmarkj@FreeBSD.org\n2012/12/18"] -markm [label="Mark Murray\nmarkm@FreeBSD.org\n199?/??/??"] +markm [label="Mark Murray\nmarkm@FreeBSD.org\n1995/04/24"] markus [label="Markus Brueffer\nmarkus@FreeBSD.org\n2006/06/01"] matteo [label="Matteo Riondato\nmatteo@FreeBSD.org\n2006/01/18"] mav [label="Alexander Motin\nmav@FreeBSD.org\n2007/04/12"] @@ -223,7 +223,7 @@ nwhitehorn [label="Nathan Whitehorn\nnwh obrien [label="David E. O'Brien\nobrien@FreeBSD.org\n1996/10/29"] olli [label="Oliver Fromme\nolli@FreeBSD.org\n2008/02/14"] peadar [label="Peter Edwards\npeadar@FreeBSD.org\n2004/03/08"] -peter [label="Peter Wemm\npeter@FreeBSD.org\n????/??/??"] +peter [label="Peter Wemm\npeter@FreeBSD.org\n1995/07/04"] peterj [label="Peter Jeremy\npeterj@FreeBSD.org\n2012/09/14"] pfg [label="Pedro Giffuni\npfg@FreeBSD.org\n2011/12/01"] philip [label="Philip Paeps\nphilip@FreeBSD.org\n2004/01/21"] @@ -367,8 +367,11 @@ des -> bapt dds -> versus +dfr -> gallatin dfr -> zml +dg -> peter + dim -> theraven dwmalone -> fanf @@ -469,6 +472,8 @@ jkh -> imp jkh -> jlemon jkh -> joerg jkh -> jwd +jkh -> msmith +jkh -> murray jkh -> phk jkh -> wes jkh -> yar @@ -484,6 +489,7 @@ joerg -> brian joerg -> eik joerg -> le joerg -> netchild +joerg -> schweikh julian -> glebius julian -> davidxu From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 08:46:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0EBB82EB; Fri, 12 Apr 2013 08:46:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id A13181798; Fri, 12 Apr 2013 08:46:45 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3C8kSE5031870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Apr 2013 18:46:30 +1000 Date: Fri, 12 Apr 2013 18:46:28 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper Subject: Re: svn commit: r249355 - head/lib/libkvm In-Reply-To: <6ABB36AE-A7AB-4A06-82B9-5E3F07F18AAC@gmail.com> Message-ID: <20130412182135.M1222@besplex.bde.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <5166FD40.6040102@freebsd.org> <6ABB36AE-A7AB-4A06-82B9-5E3F07F18AAC@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=HfxM1V48 c=1 sm=1 a=YIxocstYFt4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=61DczPY8zHOY0A7g9e8A:9 a=CjuIK1q_8ugA:10 a=HZS-E-n1ygOHqO4r:21 a=uEd-T1FI1J5-Rb3g:21 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Colin Percival X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 08:46:46 -0000 On Thu, 11 Apr 2013, Garrett Cooper wrote: > On Apr 11, 2013, at 11:13 AM, Colin Percival wrote: > >> On 04/11/13 00:59, Bruce Evans wrote: >>>> Log: >>>> Include types.h for C99 uintXX_t types. >>> >>> This adds namespace pollution that was carefully left out. >> >> ... and as a developer, I wish we left out such namespace pollution more often. >> >> I write code on FreeBSD which I then publish with the intention that people will >> be able to use it on any POSIX-compliant system, and I've lost count of the >> number of times I've been hit by "this won't build on OS X or Linux because you >> forgot to #include ". Declaring uint64_t and a few other stdint types in does tend to give bugs like that. And the pollution is pointless for the kernel (which was originally the only place that used it), since is now polluted with an include of -- a change that I disagee with. I also disagree with the existence of so many foo/[_]stdint.h headers. There is a machine/_stdint.h and a sys/_stdint.h, a sys/stdint.h and of course a plain stdint.h. At least sys/_stdint.h shouldn't exist. All it does is avoid repeatung the ifdefs for the stdint pollution in sys/types.h. But it was created long after the much larger pollution in sys/systm.h, so it does nothing for the kernel. For userland, it gives the above problem, but it has been there for so long that it is very hard to untangle. sys/types.h still has a comment saying that it shoudn't do this. I have only fixed bugs in this comment and a few nearby things: @ Index: types.h @ =================================================================== @ RCS file: /home/ncvs/src/sys/sys/types.h,v @ retrieving revision 1.90 @ diff -u -2 -r1.90 types.h @ --- types.h 19 Jun 2004 17:58:32 -0000 1.90 @ +++ types.h 20 Jun 2004 02:03:26 -0000 @ @@ -40,8 +40,7 @@ @ @ #include @ +#include @ @ -/* Machine type dependent parameters. */ @ #include @ -#include @ @ #if __BSD_VISIBLE Sort includes and remove wrong comment. machine/endian.h doesn't contain type parameters. sys/_types.h contains typedefs, not parameters. @ @@ -57,5 +56,5 @@ @ @ /* @ - * XXX POSIX sized integrals that should appear only in . @ + * XXX C99 integer types that should appear only in . @ */ @ #ifndef _INT8_T_DECLARED These types have nothing to do with POSIX, > Funny this would be mentioned. I've seen the converse a lot with Linux devs because they fail to understand that headers on Linux #include a lot more crud than they need to.. > Devs in general don't read the [POSIX] manpages like they should to figure out what needs to be #include'd in order to get function/constant definitions. Third party devs are usually the worst offenders. That's a bit surprising, since glibc tries much harder than FreeBSD to avoid namespace pollution. It has labyrinth includes, partly to avoid namespace pollution and partly to handle machine dependencies. This makes even simple headers unreadable. E.g., fcntl.h. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 08:52:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 65AF2608; Fri, 12 Apr 2013 08:52:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 58DB317EF; Fri, 12 Apr 2013 08:52:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3C8qKmx031185; Fri, 12 Apr 2013 08:52:20 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3C8qKse031184; Fri, 12 Apr 2013 08:52:20 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304120852.r3C8qKse031184@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 12 Apr 2013 08:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249400 - head/sys/netgraph/netflow X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 08:52:20 -0000 Author: glebius Date: Fri Apr 12 08:52:19 2013 New Revision: 249400 URL: http://svnweb.freebsd.org/changeset/base/249400 Log: Attempt to clean up spacing and long lines. Modified: head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/netgraph/netflow/ng_netflow.h ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.h Fri Apr 12 08:39:18 2013 (r249399) +++ head/sys/netgraph/netflow/ng_netflow.h Fri Apr 12 08:52:19 2013 (r249400) @@ -90,7 +90,7 @@ struct ng_netflow_ifinfo { uint32_t ifinfo_packets; /* number of packets for this iface */ uint8_t ifinfo_dlt; /* Data Link Type, DLT_XXX */ #define MAXDLTNAMELEN 20 - u_int16_t ifinfo_index; /* connected iface index */ + uint16_t ifinfo_index; /* connected iface index */ uint32_t conf; }; @@ -98,13 +98,13 @@ struct ng_netflow_ifinfo { /* This structure is passed to NGM_NETFLOW_SETDLT message */ struct ng_netflow_setdlt { uint16_t iface; /* which iface dlt change */ - uint8_t dlt; /* DLT_XXX from bpf.h */ + uint8_t dlt; /* DLT_XXX from bpf.h */ }; /* This structure is passed to NGM_NETFLOW_SETIFINDEX */ struct ng_netflow_setifindex { - u_int16_t iface; /* which iface index change */ - u_int16_t index; /* new index */ + uint16_t iface; /* which iface index change */ + uint16_t index; /* new index */ }; /* This structure is passed to NGM_NETFLOW_SETTIMEOUTS */ @@ -126,8 +126,8 @@ struct ng_netflow_settimeouts { /* This structure is passed to NGM_NETFLOW_SETCONFIG */ struct ng_netflow_setconfig { - u_int16_t iface; /* which iface config change */ - u_int32_t conf; /* new config */ + uint16_t iface; /* which iface config change */ + uint32_t conf; /* new config */ }; /* This structure is passed to NGM_NETFLOW_SETTEMPLATE */ @@ -145,7 +145,7 @@ struct ng_netflow_setmtu { struct ngnf_show_header { u_char version; /* IPv4 or IPv6 */ uint32_t hash_id; /* current hash index */ - uint32_t list_id; /* current record number in given hash */ + uint32_t list_id; /* current record number in hash */ uint32_t nentries; /* number of records in response */ }; @@ -164,7 +164,7 @@ struct ng_netflow_v9info { /* This is unique data, which identifies flow */ struct flow_rec { - uint16_t flow_type; /* IPv4 L4/L3 flow, see NETFLOW_V9_FLOW* */ + uint16_t flow_type; uint16_t fib; struct in_addr r_src; struct in_addr r_dst; @@ -187,7 +187,7 @@ struct flow_rec { /* This is unique data, which identifies flow */ struct flow6_rec { - uint16_t flow_type; /* IPv4 L4/L3 Ipv6 L4/L3 flow, see NETFLOW_V9_FLOW* */ + uint16_t flow_type; uint16_t fib; union { struct in_addr r_src; @@ -224,48 +224,48 @@ struct flow6_rec { /* A flow entry which accumulates statistics */ struct flow_entry_data { - uint16_t version; /* Protocol version */ - struct flow_rec r; - struct in_addr next_hop; - uint16_t fle_o_ifx; /* output interface index */ -#define fle_i_ifx r.misc.i.i_ifx + uint16_t version; /* Protocol version */ + struct flow_rec r; + struct in_addr next_hop; + uint16_t fle_o_ifx; /* output interface index */ +#define fle_i_ifx r.misc.i.i_ifx uint8_t dst_mask; /* destination route mask bits */ uint8_t src_mask; /* source route mask bits */ - u_long packets; - u_long bytes; - long first; /* uptime on first packet */ - long last; /* uptime on last packet */ - u_char tcp_flags; /* cumulative OR */ + u_long packets; + u_long bytes; + long first; /* uptime on first packet */ + long last; /* uptime on last packet */ + u_char tcp_flags; /* cumulative OR */ }; struct flow6_entry_data { uint16_t version; /* Protocol version */ struct flow6_rec r; union { - struct in_addr next_hop; - struct in6_addr next_hop6; + struct in_addr next_hop; + struct in6_addr next_hop6; } n; - uint16_t fle_o_ifx; /* output interface index */ -#define fle_i_ifx r.misc.i.i_ifx + uint16_t fle_o_ifx; /* output interface index */ +#define fle_i_ifx r.misc.i.i_ifx uint8_t dst_mask; /* destination route mask bits */ uint8_t src_mask; /* source route mask bits */ - u_long packets; - u_long bytes; - long first; /* uptime on first packet */ - long last; /* uptime on last packet */ - u_char tcp_flags; /* cumulative OR */ + u_long packets; + u_long bytes; + long first; /* uptime on first packet */ + long last; /* uptime on last packet */ + u_char tcp_flags; /* cumulative OR */ }; /* * How many flow records we will transfer at once * without overflowing socket receive buffer */ -#define NREC_AT_ONCE 1000 -#define NREC6_AT_ONCE (NREC_AT_ONCE * sizeof(struct flow_entry_data) / \ - sizeof(struct flow6_entry_data)) -#define NGRESP_SIZE (sizeof(struct ngnf_show_header) + (NREC_AT_ONCE * \ - sizeof(struct flow_entry_data))) -#define SORCVBUF_SIZE (NGRESP_SIZE + 2 * sizeof(struct ng_mesg)) +#define NREC_AT_ONCE 1000 +#define NREC6_AT_ONCE (NREC_AT_ONCE * sizeof(struct flow_entry_data) / \ + sizeof(struct flow6_entry_data)) +#define NGRESP_SIZE (sizeof(struct ngnf_show_header) + (NREC_AT_ONCE * \ + sizeof(struct flow_entry_data))) +#define SORCVBUF_SIZE (NGRESP_SIZE + 2 * sizeof(struct ng_mesg)) /* Everything below is for kernel */ @@ -283,42 +283,42 @@ struct flow6_entry { /* Parsing declarations */ /* Parse the info structure */ -#define NG_NETFLOW_INFO_TYPE { \ - { "IPv4 bytes", &ng_parse_uint64_type }, \ - { "IPv4 packets", &ng_parse_uint32_type }, \ - { "IPv6 bytes", &ng_parse_uint64_type }, \ - { "IPv6 packets", &ng_parse_uint32_type }, \ - { "IPv4 skipped bytes", &ng_parse_uint64_type }, \ - { "IPv4 skipped packets", &ng_parse_uint32_type }, \ - { "IPv6 skipped bytes", &ng_parse_uint64_type }, \ - { "IPv6 skipped packets", &ng_parse_uint32_type }, \ - { "IPv4 records used", &ng_parse_uint32_type },\ - { "IPv6 records used", &ng_parse_uint32_type },\ - { "Failed allocations", &ng_parse_uint32_type },\ - { "V5 failed exports", &ng_parse_uint32_type },\ - { "V9 failed exports", &ng_parse_uint32_type },\ - { "mbuf reallocations", &ng_parse_uint32_type },\ - { "fibs allocated", &ng_parse_uint32_type },\ - { "Active expiries", &ng_parse_uint32_type },\ - { "Inactive expiries", &ng_parse_uint32_type },\ - { "Inactive timeout", &ng_parse_uint32_type },\ - { "Active timeout", &ng_parse_uint32_type },\ - { NULL } \ +#define NG_NETFLOW_INFO_TYPE { \ + { "IPv4 bytes", &ng_parse_uint64_type },\ + { "IPv4 packets", &ng_parse_uint32_type },\ + { "IPv6 bytes", &ng_parse_uint64_type },\ + { "IPv6 packets", &ng_parse_uint32_type },\ + { "IPv4 skipped bytes", &ng_parse_uint64_type },\ + { "IPv4 skipped packets", &ng_parse_uint32_type },\ + { "IPv6 skipped bytes", &ng_parse_uint64_type },\ + { "IPv6 skipped packets", &ng_parse_uint32_type },\ + { "IPv4 records used", &ng_parse_uint32_type },\ + { "IPv6 records used", &ng_parse_uint32_type },\ + { "Failed allocations", &ng_parse_uint32_type },\ + { "V5 failed exports", &ng_parse_uint32_type },\ + { "V9 failed exports", &ng_parse_uint32_type },\ + { "mbuf reallocations", &ng_parse_uint32_type },\ + { "fibs allocated", &ng_parse_uint32_type },\ + { "Active expiries", &ng_parse_uint32_type },\ + { "Inactive expiries", &ng_parse_uint32_type },\ + { "Inactive timeout", &ng_parse_uint32_type },\ + { "Active timeout", &ng_parse_uint32_type },\ + { NULL } \ } /* Parse the ifinfo structure */ #define NG_NETFLOW_IFINFO_TYPE { \ - { "packets", &ng_parse_uint32_type }, \ - { "data link type", &ng_parse_uint8_type }, \ - { "index", &ng_parse_uint16_type }, \ - { "conf", &ng_parse_uint32_type }, \ + { "packets", &ng_parse_uint32_type },\ + { "data link type", &ng_parse_uint8_type }, \ + { "index", &ng_parse_uint16_type },\ + { "conf", &ng_parse_uint32_type },\ { NULL } \ } /* Parse the setdlt structure */ #define NG_NETFLOW_SETDLT_TYPE { \ { "iface", &ng_parse_uint16_type }, \ - { "dlt", &ng_parse_uint8_type }, \ + { "dlt", &ng_parse_uint8_type }, \ { NULL } \ } @@ -357,11 +357,11 @@ struct flow6_entry { } /* Parse the v9info structure */ -#define NG_NETFLOW_V9INFO_TYPE { \ +#define NG_NETFLOW_V9INFO_TYPE { \ { "v9 template packets", &ng_parse_uint16_type },\ - { "v9 template time", &ng_parse_uint16_type },\ - { "v9 MTU", &ng_parse_uint16_type },\ - { NULL } \ + { "v9 template time", &ng_parse_uint16_type },\ + { "v9 MTU", &ng_parse_uint16_type },\ + { NULL } \ } /* Private hook data */ @@ -382,30 +382,34 @@ struct netflow_export_item { /* Structure contatining fib-specific data */ struct fib_export { - uint32_t fib; /* kernel fib id */ - struct netflow_export_item exp; /* Various data used for export */ - struct mtx export_mtx; /* exp.item mutex */ - struct mtx export9_mtx; /* exp.item9 mutex */ - uint32_t flow_seq; /* current V5 flow sequence */ - uint32_t flow9_seq; /* current V9 flow sequence */ - uint32_t domain_id; /* Observartion domain id */ + uint32_t fib; /* kernel fib id */ + + /* Various data used for export */ + struct netflow_export_item exp; + + struct mtx export_mtx; /* exp.item mutex */ + struct mtx export9_mtx; /* exp.item9 mutex */ + uint32_t flow_seq; /* current V5 flow sequence */ + uint32_t flow9_seq; /* current V9 flow sequence */ + uint32_t domain_id; /* Observartion domain id */ /* Netflow V9 counters */ - uint32_t templ_last_ts; /* unixtime of last template announce */ - uint32_t templ_last_pkt; /* packets count on last template announce */ - uint32_t sent_packets; /* packets sent by exporter; */ - struct netflow_v9_packet_opt *export9_opt; /* current packet specific options */ + uint32_t templ_last_ts; /* unixtime of last template announce */ + uint32_t templ_last_pkt; /* packet count on last announce */ + uint32_t sent_packets; /* packets sent by exporter; */ + + /* Current packet specific options */ + struct netflow_v9_packet_opt *export9_opt; }; typedef struct fib_export *fib_export_p; /* Structure describing our flow engine */ struct netflow { - node_p node; /* link to the node itself */ - hook_p export; /* export data goes there */ - hook_p export9; /* Netflow V9 export data goes there */ - - struct ng_netflow_info info; - struct callout exp_callout; /* expiry periodic job */ + node_p node; /* link to the node itself */ + hook_p export; /* export data goes there */ + hook_p export9; /* Netflow V9 export data goes there */ + struct ng_netflow_info info; + struct callout exp_callout; /* expiry periodic job */ /* * Flow entries are allocated in uma(9) zone zone. They are @@ -435,22 +439,28 @@ struct netflow { uma_zone_t zone6; struct flow_hash_entry *hash6; #endif + /* Multiple FIB support */ - fib_export_p *fib_data; /* array of pointers to per-fib data */ - uint16_t maxfibs; /* number of allocated fibs */ + fib_export_p *fib_data; /* vector to per-fib data */ + uint16_t maxfibs; /* number of allocated fibs */ /* Netflow v9 configuration options */ /* * RFC 3954 clause 7.3 * "Both options MUST be configurable by the user on the Exporter." */ - uint16_t templ_time; /* time between sending templates */ - uint16_t templ_packets; /* packets between sending templates */ + uint16_t templ_time; /* time between sending templates */ + uint16_t templ_packets; /* packets between sending templates */ #define NETFLOW_V9_MAX_FLOWSETS 2 - u_char flowsets_count; /* current flowsets used */ - u_char flowset_records[NETFLOW_V9_MAX_FLOWSETS - 1]; /* Count of records in each flowset */ - uint16_t mtu; /* export interface MTU */ - struct netflow_v9_flowset_header *v9_flowsets[NETFLOW_V9_MAX_FLOWSETS - 1]; /* Pointers to pre-compiled flowsets */ + u_char flowsets_count; /* current flowsets used */ + + /* Count of records in each flowset */ + u_char flowset_records[NETFLOW_V9_MAX_FLOWSETS - 1]; + uint16_t mtu; /* export interface MTU */ + + /* Pointers to pre-compiled flowsets */ + struct netflow_v9_flowset_header + *v9_flowsets[NETFLOW_V9_MAX_FLOWSETS - 1]; struct ng_netflow_iface ifaces[NG_NETFLOW_MAXIFACES]; }; @@ -492,18 +502,22 @@ int ng_netflow_fib_init(priv_p priv, int void ng_netflow_copyinfo(priv_p, struct ng_netflow_info *); void ng_netflow_copyv9info(priv_p, struct ng_netflow_v9info *); timeout_t ng_netflow_expire; -int ng_netflow_flow_add(priv_p, fib_export_p, struct ip *, caddr_t, uint8_t, uint8_t, unsigned int); -int ng_netflow_flow6_add(priv_p, fib_export_p, struct ip6_hdr *, caddr_t , uint8_t, uint8_t, unsigned int); -int ng_netflow_flow_show(priv_p, struct ngnf_show_header *req, struct ngnf_show_header *resp); - +int ng_netflow_flow_add(priv_p, fib_export_p, struct ip *, caddr_t, + uint8_t, uint8_t, unsigned int); +int ng_netflow_flow6_add(priv_p, fib_export_p, struct ip6_hdr *, caddr_t, + uint8_t, uint8_t, unsigned int); +int ng_netflow_flow_show(priv_p, struct ngnf_show_header *req, + struct ngnf_show_header *resp); void ng_netflow_v9_cache_init(priv_p); void ng_netflow_v9_cache_flush(priv_p); -item_p get_export9_dgram(priv_p, fib_export_p, struct netflow_v9_packet_opt **); +item_p get_export9_dgram(priv_p, fib_export_p, + struct netflow_v9_packet_opt **); void return_export9_dgram(priv_p, fib_export_p, item_p, - struct netflow_v9_packet_opt *, int); -int export9_add(item_p, struct netflow_v9_packet_opt *, struct flow_entry *); -int export9_send(priv_p, fib_export_p, item_p, struct netflow_v9_packet_opt *, - int); + struct netflow_v9_packet_opt *, int); +int export9_add(item_p, struct netflow_v9_packet_opt *, + struct flow_entry *); +int export9_send(priv_p, fib_export_p, item_p, + struct netflow_v9_packet_opt *, int); #endif /* _KERNEL */ #endif /* _NG_NETFLOW_H_ */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 09:57:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B0DB0355; Fri, 12 Apr 2013 09:57:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3812B1CE8; Fri, 12 Apr 2013 09:57:34 +0000 (UTC) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3C9vNuU004833; Fri, 12 Apr 2013 19:57:23 +1000 Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3C9vAIF022047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Apr 2013 19:57:11 +1000 Date: Fri, 12 Apr 2013 19:57:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r249355 - head/lib/libkvm In-Reply-To: <20130411181233.GC76816@FreeBSD.org> Message-ID: <20130412185159.T1222@besplex.bde.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> <20130411091418.GW76816@FreeBSD.org> <20130411201652.F1911@besplex.bde.org> <20130411180013.GB76816@FreeBSD.org> <20130411181233.GC76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=HfxM1V48 c=1 sm=1 a=YIxocstYFt4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=O_ub2waKdkZD0YVSVngA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: Juli Mallett , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 09:57:35 -0000 On Thu, 11 Apr 2013, Gleb Smirnoff wrote: > Juli, > > On Thu, Apr 11, 2013 at 11:05:28AM -0700, Juli Mallett wrote: > J> > On Thu, Apr 11, 2013 at 09:07:25PM +1000, Bruce Evans wrote: > J> > B> Just routine avoidance of namespace pollution. This is easy in such a > J> > B> simple header. > J> > > J> > Sorry, with all respect, but I can't call including sys/types.h > J> > a namespace pollution. > J> > > J> > Ok, even you force me to name it that way, still I would prefer > J> > namespace pollution instead of handmade copy pasted typedefs. > J> > J> But Gleb, making such changes unilaterally is a bit of a leap. The > J> project has mostly accepted Bruce's wisdom about trying to minimize > J> and reduce namespace pollution. Now, this isn't a standard header so > J> it's quite a bit less of a concern, but it's not no concern. If you > J> think that we should reverse our trend on including > J> namespace-polluting headers in system headers, we should discuss that > J> on arch@, and it shouldn't be something that's done without any > J> discussion or consideration. > J> > J> Should we expect further changes of this nature (and of the proposed > J> nature removing __size_t and __ssize_t use) if you make changes to > J> other headers as part of your work? Are you going to add > J> to every header currently using in a > J> single go, or will you be doing that a little at a time when making > J> functional changes? > > Your suggestion? Typedef standard uint64_t manually as size_t and ssize_t > already are done? Can you please define amount of standard types needed > for kvm.h (or any abstract header) that would give a permission to include > sys/types.h instead of typedefing all these types via a cut-n-paste > surrounded by ifdefs? A number larger than any header needs. has 7 ifdefs for types (as part of carefully avoiding including sys/types.h>) and 13 _FOO_DECLARED ifdefs for other things (maily for functions). has 8 for types. has 10 for functions. These are the largest users of _FOO_DECLARED in the installed /usr/include. > I am all against namespace pollution, but not when it comes to sys/types.h. It has lots of historical BSD pollution (mainly endian and select). This is carefully ifdefed under _BSD_VISIBLE. This is another reason not to depend on sys/types.h declaring uint64_t or anything else not specifed by POSIX in any other header -- someone might define _BSD_VISIBLE as 0. It happens that uint64_t is not under any ifdef. This is justified since it is a type ending with the reserved suffix _t. kvm.h is a BSD header, so defining _BSD_VISIBLE as 0 before including it is probably invalid. POSIX headers need to be more careful. The tinderbox failure mail showed another namespace error -- a new prototype in kvm.h uses u_long. The declaration of this in sys/types.h would _is_ turned off by BSD_VISIBLE = 0. Old prototypes in kvm.h avoid this problem by spelling unsigned long as itself. Using the verbose spelling would be a style bug in the kernel or system applications, but it must be used in application headers since using u_long would depend on namespace pollution. Newer pollution in sys/types.h includes everything in sys/_pthreadtypes.h, further pollution for select (pselect(), struct timespec and everything in sys/timespec.h. Perhaps current POSIX allows or requires this (I know it requires pthread stuff, since it standardized some namespace errors). But none of this is properly ifdefed, so you get pthread stuff and pselect() for old POSIXes where they are not permitted in the namespace. We have a labyrinth of timespec and timeval headers from old attempts to avoid namespace pollution. sys/_timespec.h is now nonsense. Its reason for existence was to declare struct _timespec for use in contexts where struct timespec would be pollution. Now it just declares struct timespec and time_t. The layer above this, sys/timespec.h adds just a little to it. For timevals, there is no intermediate layer (just sys/_timeval.h). The non-polluting sys/_timespec.h was only used in sys/stat.h, only in old versions of FreeBSD (FreeBSD-5 and maybe some later versions). Now sys/stat.h just uses struct timespec, so it has namespace pollution for old versions of POSIX. Old versions of FreeBSD avoided this pollution by hiding it in !_POSIX_SOURCE ifdefs. E.g., in FreeBSD-4: @ #ifndef _POSIX_SOURCE @ struct timespec st_atimespec; /* time of last access */ @ struct timespec st_mtimespec; /* time of last data modification */ @ struct timespec st_ctimespec; /* time of last file status change */ @ #else @ time_t st_atime; /* time of last access */ @ long st_atimensec; /* nsec of last access */ @ time_t st_mtime; /* time of last data modification */ @ long st_mtimensec; /* nsec of last data modification */ @ time_t st_ctime; /* time of last file status change */ @ long st_ctimensec; /* nsec of last file status change */ @ #endif Here st_foo is in the POSIX namespace, but timespec isn't. There are serious padding problems with this -- there is little chance that time_t followed by long has the same padding as struct timespec on all machine supported now. struct _timespec was supposed to be used here to get the same padding, but it never was. It was only used for padding of birthtime and/or the end of the struct. All this to spell timespec's name with an underscore in 1 place. The _POSIX_SOURCE ifdefs were improved to _BSD_VISIBLE ifdefs in FreeBSD-5, then lost. POSIX didn't have timespecs in sys/stat.h even in the 2001 version. I'm not sure when it was added. Perhaps never. Anyway, there are no ifdefs for it in FreeBSD now. If it were ifdefed for the POSIX versions that have it, it would be very obvious that it can't be used for POSIX versions that don't have it. The newer POSIX functions in sys/stat.h are ifdefed, but none of them use timespecs. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 10:09:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 593A7612; Fri, 12 Apr 2013 10:09:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id E29F21D54; Fri, 12 Apr 2013 10:09:36 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3CA9RkM024782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Apr 2013 20:09:28 +1000 Date: Fri, 12 Apr 2013 20:09:27 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Juli Mallett Subject: Re: svn commit: r249355 - head/lib/libkvm In-Reply-To: Message-ID: <20130412195828.C1222@besplex.bde.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> <20130411091418.GW76816@FreeBSD.org> <20130411201652.F1911@besplex.bde.org> <20130411180013.GB76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Ov0XUFDt c=1 sm=1 a=YIxocstYFt4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=6I5d2MoRAAAA:8 a=iq4sv8YNmSFSRNsHFbsA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 10:09:37 -0000 On Thu, 11 Apr 2013, Juli Mallett wrote: > On Thu, Apr 11, 2013 at 11:00 AM, Gleb Smirnoff wrote: >> Bruce, >> >> On Thu, Apr 11, 2013 at 09:07:25PM +1000, Bruce Evans wrote: >> B> Just routine avoidance of namespace pollution. This is easy in such a >> B> simple header. >> >> Sorry, with all respect, but I can't call including sys/types.h >> a namespace pollution. >> >> Ok, even you force me to name it that way, still I would prefer >> namespace pollution instead of handmade copy pasted typedefs. The copying gives a good implementation. Much easier to read (though not write) than definitions in deeply nested includes. We have too many little include files to avoid duplication, but a few big nested include files like machine/_types.h are hard to avoid. > But Gleb, making such changes unilaterally is a bit of a leap. The > project has mostly accepted Bruce's wisdom about trying to minimize > and reduce namespace pollution. Now, this isn't a standard header so > it's quite a bit less of a concern, but it's not no concern. If you > think that we should reverse our trend on including > namespace-polluting headers in system headers, we should discuss that > on arch@, and it shouldn't be something that's done without any > discussion or consideration. > > Should we expect further changes of this nature (and of the proposed > nature removing __size_t and __ssize_t use) if you make changes to > other headers as part of your work? Are you going to add > to every header currently using in a > single go, or will you be doing that a little at a time when making > functional changes? That would be a large policy change, not to mention it would break most C99 headers like . C99 headers can't include POSIX headers like since the POSIX namespace rules don't apply to them. Most of them include sys/_types.h or machine/_types.h to get declarararions like __size_t which they use to declare the limited set of typedefs specified by C99. C99 headers are relatively simple and mostly de-polluted. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 10:54:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B7A09DB5; Fri, 12 Apr 2013 10:54:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 7CD0E1ECB; Fri, 12 Apr 2013 10:54:02 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id C640712140B; Fri, 12 Apr 2013 20:23:04 +1000 (EST) Date: Fri, 12 Apr 2013 20:23:04 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Kenneth D. Merry" Subject: Re: svn commit: r249334 - head/usr.bin/ctlstat In-Reply-To: <20130411224634.GA56177@nargothrond.kdm.org> Message-ID: <20130412200948.A1222@besplex.bde.org> References: <201304101601.r3AG1jZq083572@svn.freebsd.org> <20130411163712.Y1200@besplex.bde.org> <20130411224634.GA56177@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=HfxM1V48 c=1 sm=1 a=jrZi4plbApYA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=ns49S-B92uUA:10 a=gHfMRZwAIj3U6oAC7EsA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 10:54:02 -0000 On Thu, 11 Apr 2013, Kenneth D. Merry wrote: > On Thu, Apr 11, 2013 at 17:06:44 +1000, Bruce Evans wrote: >> ... >> It is now clear that this is still too verbose, since cur_secs and prev_secs >> are not used except to initialize etime. Simplifying this gives: >> >> etime = ctx->cur_time.tv_sec - ctx->prev_time.tv_sec + >> (ctx->prev_time.tv_nsec - ctx->cur_time.tv_nsec) * 1e-9; >> >> This might need casting to double of ctx->cur_time.tv_sec, in case time_t >> is unsigned and the time went backwards. Otherwise, this should be the >> usual expression for subtracting timespecs. > > The time can't go backwards in this case, because it is the system uptime. I expected this, but was not sure where the timestamps are generated. > Using wall clock time causes problems measuring performance when NTP > decides that the system time needs to change. I have a local patch to dd > to fix instances of bogus performance numbers due to its using wall clock > time to measure elapsed time. All uses of gettimeofday() are suspect. A quick grep shows other obviously wrong ones in ping*, time and systat. Uses of CLOCK_REALTIME are hopefully correct, but about half of them in /usr/src/*bin seem to be incorrect. ktrace and truss are interesting. Real times are used and are probably best for absolute times but wrong for relative times. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 13:56:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BB6E561E; Fri, 12 Apr 2013 13:56:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ADE94939; Fri, 12 Apr 2013 13:56:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CDuLIo022498; Fri, 12 Apr 2013 13:56:21 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CDuL0v022497; Fri, 12 Apr 2013 13:56:21 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201304121356.r3CDuL0v022497@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 12 Apr 2013 13:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249403 - head/sys/modules/ata/atacbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 13:56:21 -0000 Author: bz Date: Fri Apr 12 13:56:21 2013 New Revision: 249403 URL: http://svnweb.freebsd.org/changeset/base/249403 Log: isa_if.h is indirectly included. Depend on it to unbreak pc98 builds. Modified: head/sys/modules/ata/atacbus/Makefile Modified: head/sys/modules/ata/atacbus/Makefile ============================================================================== --- head/sys/modules/ata/atacbus/Makefile Fri Apr 12 13:04:23 2013 (r249402) +++ head/sys/modules/ata/atacbus/Makefile Fri Apr 12 13:56:21 2013 (r249403) @@ -4,6 +4,6 @@ KMOD= atacbus SRCS= ata-cbus.c -SRCS+= ata_if.h bus_if.h device_if.h bus_if.h +SRCS+= ata_if.h isa_if.h bus_if.h device_if.h bus_if.h .include From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 14:19:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B5C2AC05; Fri, 12 Apr 2013 14:19:44 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A8297A2F; Fri, 12 Apr 2013 14:19:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CEJicY029487; Fri, 12 Apr 2013 14:19:44 GMT (envelope-from gahr@svn.freebsd.org) Received: (from gahr@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CEJisX029486; Fri, 12 Apr 2013 14:19:44 GMT (envelope-from gahr@svn.freebsd.org) Message-Id: <201304121419.r3CEJisX029486@svn.freebsd.org> From: Pietro Cerutti Date: Fri, 12 Apr 2013 14:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249404 - head/usr.bin/at X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 14:19:44 -0000 Author: gahr (ports committer) Date: Fri Apr 12 14:19:44 2013 New Revision: 249404 URL: http://svnweb.freebsd.org/changeset/base/249404 Log: - Switch order of setting real uid and gid. If we set uid first, then we don't have enough privileges to set gid. This looks like a long standing bug, just recently revealed by r241852. Approved by: cognet Modified: head/usr.bin/at/privs.h (contents, props changed) Modified: head/usr.bin/at/privs.h ============================================================================== --- head/usr.bin/at/privs.h Fri Apr 12 13:56:21 2013 (r249403) +++ head/usr.bin/at/privs.h Fri Apr 12 14:19:44 2013 (r249404) @@ -99,8 +99,8 @@ gid_t real_gid, effective_gid; PRIV_START \ effective_uid = (a); \ effective_gid = (b); \ - if (setreuid((uid_t)-1, effective_uid) != 0) err(1, "setreuid failed"); \ if (setregid((gid_t)-1, effective_gid) != 0) err(1, "setregid failed"); \ + if (setreuid((uid_t)-1, effective_uid) != 0) err(1, "setreuid failed"); \ PRIV_END \ } #endif From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 14:32:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 534714D8; Fri, 12 Apr 2013 14:32:17 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2B619AD8; Fri, 12 Apr 2013 14:32:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CEWHsc034436; Fri, 12 Apr 2013 14:32:17 GMT (envelope-from gahr@svn.freebsd.org) Received: (from gahr@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CEWHBc034435; Fri, 12 Apr 2013 14:32:17 GMT (envelope-from gahr@svn.freebsd.org) Message-Id: <201304121432.r3CEWHBc034435@svn.freebsd.org> From: Pietro Cerutti Date: Fri, 12 Apr 2013 14:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249406 - head/usr.bin/at X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 14:32:17 -0000 Author: gahr (ports committer) Date: Fri Apr 12 14:32:16 2013 New Revision: 249406 URL: http://svnweb.freebsd.org/changeset/base/249406 Log: - Do not bail out if stat(2) fails with ENOENT in the spool directory. This happens if another atrm process removes a job while we're scanning through the directory. - While at it, optimize a bit the directory scanning, so that we quit looping as soon as all jobs specified in argv have been dealt with. Approved by: cognet Modified: head/usr.bin/at/at.c Modified: head/usr.bin/at/at.c ============================================================================== --- head/usr.bin/at/at.c Fri Apr 12 14:23:21 2013 (r249405) +++ head/usr.bin/at/at.c Fri Apr 12 14:32:16 2013 (r249406) @@ -531,6 +531,10 @@ process_jobs(int argc, char **argv, int /* Delete every argument (job - ID) given */ int i; + int rc; + int nofJobs; + int nofDone; + int statErrno; struct stat buf; DIR *spool; struct dirent *dirent; @@ -538,6 +542,9 @@ process_jobs(int argc, char **argv, int char queue; long jobno; + nofJobs = argc - optind; + nofDone = 0; + PRIV_START if (chdir(ATJOB_DIR) != 0) @@ -553,9 +560,20 @@ process_jobs(int argc, char **argv, int while((dirent = readdir(spool)) != NULL) { PRIV_START - if (stat(dirent->d_name, &buf) != 0) - perr("cannot stat in " ATJOB_DIR); + rc = stat(dirent->d_name, &buf); + statErrno = errno; PRIV_END + /* There's a race condition between readdir above and stat here: + * another atrm process could have removed the file from the spool + * directory under our nose. If this happens, stat will set errno to + * ENOENT, which we shouldn't treat as fatal. + */ + if (rc != 0) { + if (statErrno == ENOENT) + continue; + else + perr("cannot stat in " ATJOB_DIR); + } if(sscanf(dirent->d_name, "%c%5lx%8lx", &queue, &jobno, &ctm)!=3) continue; @@ -601,9 +619,15 @@ process_jobs(int argc, char **argv, int errx(EXIT_FAILURE, "internal error, process_jobs = %d", what); } + + /* All arguments have been processed + */ + if (++nofDone == nofJobs) + goto end; } } } +end: closedir(spool); } /* delete_jobs */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 15:19:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 17D94D0E; Fri, 12 Apr 2013 15:19:37 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 09B15D33; Fri, 12 Apr 2013 15:19:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CFJaOj047703; Fri, 12 Apr 2013 15:19:36 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CFJau6047700; Fri, 12 Apr 2013 15:19:36 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304121519.r3CFJau6047700@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 12 Apr 2013 15:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249407 - in head: bin/sh tools/regression/bin/sh/execution X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 15:19:37 -0000 Author: jilles Date: Fri Apr 12 15:19:35 2013 New Revision: 249407 URL: http://svnweb.freebsd.org/changeset/base/249407 Log: sh: Don't modify exit status when break/continue/return passes !. This matches what would happen if ! P were to be replaced with if P; then false; else true; fi. Example: f() { ! return 0; }; f Added: head/tools/regression/bin/sh/execution/not1.0 (contents, props changed) head/tools/regression/bin/sh/execution/not2.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Fri Apr 12 14:32:16 2013 (r249406) +++ head/bin/sh/eval.c Fri Apr 12 15:19:35 2013 (r249407) @@ -279,6 +279,8 @@ evaltree(union node *n, int flags) break; case NNOT: evaltree(n->nnot.com, EV_TESTED); + if (evalskip) + goto out; exitstatus = !exitstatus; break; Added: head/tools/regression/bin/sh/execution/not1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/not1.0 Fri Apr 12 15:19:35 2013 (r249407) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +f() { ! return $1; } +f 0 && ! f 1 Added: head/tools/regression/bin/sh/execution/not2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/not2.0 Fri Apr 12 15:19:35 2013 (r249407) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +while :; do + ! break + exit 3 +done From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 15:58:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D00E09BB; Fri, 12 Apr 2013 15:58:54 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C2C62FC7; Fri, 12 Apr 2013 15:58:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CFwsGi059284; Fri, 12 Apr 2013 15:58:54 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CFwsb4059283; Fri, 12 Apr 2013 15:58:54 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201304121558.r3CFwsb4059283@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 12 Apr 2013 15:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249408 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 15:58:54 -0000 Author: jchandra Date: Fri Apr 12 15:58:53 2013 New Revision: 249408 URL: http://svnweb.freebsd.org/changeset/base/249408 Log: Fix kenv behavior when there is no static environment In case where there are no static kernel environment entries, the function init_dynamic_kenv() adds an incorrect entry at position 0 of the dynamic kernel environment. This in turn causes kenv(1) to print and empty list even though there are dynamic entries added later. Fix this by checking env_pos in init_dynamic_kenv() and adding dynamic entries only if there are static entries. Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Fri Apr 12 15:19:35 2013 (r249407) +++ head/sys/kern/kern_environment.c Fri Apr 12 15:58:53 2013 (r249408) @@ -231,20 +231,23 @@ init_dynamic_kenv(void *data __unused) kenvp = malloc((KENV_SIZE + 1) * sizeof(char *), M_KENV, M_WAITOK | M_ZERO); i = 0; - for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { - len = strlen(cp) + 1; - if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { - printf("WARNING: too long kenv string, ignoring %s\n", - cp); - continue; + if (env_pos > 0) { + for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { + len = strlen(cp) + 1; + if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { + printf( + "WARNING: too long kenv string, ignoring %s\n", + cp); + continue; + } + if (i < KENV_SIZE) { + kenvp[i] = malloc(len, M_KENV, M_WAITOK); + strcpy(kenvp[i++], cp); + } else + printf( + "WARNING: too many kenv strings, ignoring %s\n", + cp); } - if (i < KENV_SIZE) { - kenvp[i] = malloc(len, M_KENV, M_WAITOK); - strcpy(kenvp[i++], cp); - } else - printf( - "WARNING: too many kenv strings, ignoring %s\n", - cp); } kenvp[i] = NULL; From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 16:03:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0DF54BFF; Fri, 12 Apr 2013 16:03:23 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0067E1008; Fri, 12 Apr 2013 16:03:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CG3MSu061762; Fri, 12 Apr 2013 16:03:22 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CG3Mm6061760; Fri, 12 Apr 2013 16:03:22 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201304121603.r3CG3Mm6061760@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 12 Apr 2013 16:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249409 - head/sys/mips/nlm/dev/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 16:03:23 -0000 Author: jchandra Date: Fri Apr 12 16:03:22 2013 New Revision: 249409 URL: http://svnweb.freebsd.org/changeset/base/249409 Log: Fix incorrect KASSERTs in xlpge Fix for crash in Netlogic XLP network accelerator driver when invariants are enabled - use correct the condition for KASSERT. Modified: head/sys/mips/nlm/dev/net/xlpge.c Modified: head/sys/mips/nlm/dev/net/xlpge.c ============================================================================== --- head/sys/mips/nlm/dev/net/xlpge.c Fri Apr 12 15:58:53 2013 (r249408) +++ head/sys/mips/nlm/dev/net/xlpge.c Fri Apr 12 16:03:22 2013 (r249409) @@ -975,7 +975,7 @@ nlm_mii_pollstat(void *arg) if (sc->mii_bus) { mii = device_get_softc(sc->mii_bus); - KASSERT(mii == NULL, ("mii ptr is NULL")); + KASSERT(mii != NULL, ("mii ptr is NULL")); mii_pollstat(mii); @@ -1143,7 +1143,7 @@ get_buf(void) #ifdef INVARIANTS temp1 = vtophys((vm_offset_t) m_new->m_data); temp2 = vtophys((vm_offset_t) m_new->m_data + 1536); - KASSERT((temp1 + 1536) != temp2, + KASSERT((temp1 + 1536) == temp2, ("Alloced buffer is not contiguous")); #endif return ((void *)m_new->m_data); From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 16:25:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4C336707; Fri, 12 Apr 2013 16:25:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3DC621137; Fri, 12 Apr 2013 16:25:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CGP6uM068416; Fri, 12 Apr 2013 16:25:06 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CGP3Dv068400; Fri, 12 Apr 2013 16:25:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304121625.r3CGP3Dv068400@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 12 Apr 2013 16:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 16:25:06 -0000 Author: trasz Date: Fri Apr 12 16:25:03 2013 New Revision: 249410 URL: http://svnweb.freebsd.org/changeset/base/249410 Log: Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' and kern.cam.ctl.disable tunable; those were introduced as a workaround to make it possible to boot GENERIC on low memory machines. With ctl(4) being built as a module and automatically loaded by ctladm(8), this makes CTL work out of the box. Reviewed by: ken Sponsored by: FreeBSD Foundation Modified: head/sys/amd64/conf/GENERIC head/sys/arm/conf/ATMEL head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_internal.c head/sys/cam/ctl/scsi_ctl.c head/sys/conf/options head/sys/i386/conf/GENERIC head/sys/i386/conf/PAE head/sys/ia64/conf/GENERIC head/sys/modules/ctl/Makefile head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/amd64/conf/GENERIC Fri Apr 12 16:25:03 2013 (r249410) @@ -137,10 +137,7 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer -options CTL_DISABLE # Disable CTL by default to save memory. - # Re-enable with kern.cam.ctl.disable=0 in - # /boot/loader.conf +#device ctl # CAM Target Layer # RAID controllers interfaced to the SCSI subsystem device amr # AMI MegaRAID Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/arm/conf/ATMEL Fri Apr 12 16:25:03 2013 (r249410) @@ -150,7 +150,7 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer +#device ctl # CAM Target Layer # Serial (COM) ports device uart # Multi-uart driver Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/cam/ctl/ctl.c Fri Apr 12 16:25:03 2013 (r249410) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_ctl.h" - struct ctl_softc *control_softc = NULL; /* @@ -320,16 +318,8 @@ static int persis_offset; static uint8_t ctl_pause_rtr; static int ctl_is_single = 1; static int index_to_aps_page; -#ifdef CTL_DISABLE -int ctl_disable = 1; -#else -int ctl_disable = 0; -#endif SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); -SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0, - "Disable CTL"); -TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -966,10 +956,6 @@ ctl_init(void) ctl_pause_rtr = 0; rcv_sync_msg = 0; - /* If we're disabled, don't initialize. */ - if (ctl_disable != 0) - return (0); - control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK | M_ZERO); softc = control_softc; Modified: head/sys/cam/ctl/ctl_backend.c ============================================================================== --- head/sys/cam/ctl/ctl_backend.c Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/cam/ctl/ctl_backend.c Fri Apr 12 16:25:03 2013 (r249410) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include extern struct ctl_softc *control_softc; -extern int ctl_disable; int ctl_backend_register(struct ctl_backend_driver *be) @@ -72,10 +71,6 @@ ctl_backend_register(struct ctl_backend_ ctl_softc = control_softc; - /* Don't continue if CTL is disabled */ - if (ctl_disable != 0) - return (0); - mtx_lock(&ctl_softc->ctl_lock); /* * Sanity check, make sure this isn't a duplicate registration. Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Apr 12 16:25:03 2013 (r249410) @@ -119,7 +119,6 @@ struct cfcs_softc cfcs_softc; * amount of SCSI sense data that we will report to CAM. */ static int cfcs_max_sense = sizeof(struct scsi_sense_data); -extern int ctl_disable; SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0, "CAM Target Layer SIM frontend"); @@ -150,10 +149,6 @@ cfcs_init(void) #endif int retval; - /* Don't continue if CTL is disabled */ - if (ctl_disable != 0) - return (0); - softc = &cfcs_softc; retval = 0; bzero(softc, sizeof(*softc)); Modified: head/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_internal.c Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/cam/ctl/ctl_frontend_internal.c Fri Apr 12 16:25:03 2013 (r249410) @@ -188,7 +188,6 @@ struct cfi_softc { MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI"); static struct cfi_softc fetd_internal_softc; -extern int ctl_disable; int cfi_init(void); void cfi_shutdown(void) __unused; @@ -243,10 +242,6 @@ cfi_init(void) retval = 0; - /* If we're disabled, don't initialize */ - if (ctl_disable != 0) - return (0); - if (sizeof(struct cfi_lun_io) > CTL_PORT_PRIV_SIZE) { printf("%s: size of struct cfi_lun_io %zd > " "CTL_PORT_PRIV_SIZE %d\n", __func__, Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/cam/ctl/scsi_ctl.c Fri Apr 12 16:25:03 2013 (r249410) @@ -244,7 +244,6 @@ MODULE_DEPEND(ctlfe, ctl, 1, 1, 1); MODULE_DEPEND(ctlfe, cam, 1, 1, 1); extern struct ctl_softc *control_softc; -extern int ctl_disable; void ctlfeshutdown(void) @@ -257,10 +256,6 @@ ctlfeinit(void) { cam_status status; - /* Don't initialize if we're disabled */ - if (ctl_disable != 0) - return; - STAILQ_INIT(&ctlfe_softc_list); mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/conf/options Fri Apr 12 16:25:03 2013 (r249410) @@ -332,9 +332,6 @@ SCSI_PT_DEFAULT_TIMEOUT opt_pt.h # Options used only in cam/scsi/scsi_ses.c SES_ENABLE_PASSTHROUGH opt_ses.h -# Options used only in cam/ctl -CTL_DISABLE opt_ctl.h - # Options used in dev/sym/ (Symbios SCSI driver). SYM_SETUP_LP_PROBE_MAP opt_sym.h #-Low Priority Probe Map (bits) # Allows the ncr to take precedence Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/i386/conf/GENERIC Fri Apr 12 16:25:03 2013 (r249410) @@ -145,10 +145,7 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer -options CTL_DISABLE # Disable CTL by default to save memory. - # Re-enable with kern.cam.ctl.disable=0 in - # /boot/loader.conf +#device ctl # CAM Target Layer # RAID controllers interfaced to the SCSI subsystem device amr # AMI MegaRAID Modified: head/sys/i386/conf/PAE ============================================================================== --- head/sys/i386/conf/PAE Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/i386/conf/PAE Fri Apr 12 16:25:03 2013 (r249410) @@ -38,8 +38,6 @@ nodevice ncv nodevice nsp nodevice stg -nodevice ctl - nodevice asr nodevice dpt nodevice mly Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/ia64/conf/GENERIC Fri Apr 12 16:25:03 2013 (r249410) @@ -113,7 +113,7 @@ device da # Direct Access (ie disk) device pass # Passthrough (direct ATA/SCSI access) device sa # Sequential Access (ie tape) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer +#device ctl # CAM Target Layer # RAID controllers device aac # Adaptec FSA RAID Modified: head/sys/modules/ctl/Makefile ============================================================================== --- head/sys/modules/ctl/Makefile Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/modules/ctl/Makefile Fri Apr 12 16:25:03 2013 (r249410) @@ -21,7 +21,6 @@ SRCS+= bus_if.h SRCS+= device_if.h SRCS+= vnode_if.h SRCS+= opt_cam.h -SRCS+= opt_ctl.h SRCS+= opt_kdtrace.h .include Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Fri Apr 12 16:03:22 2013 (r249409) +++ head/sys/sparc64/conf/GENERIC Fri Apr 12 16:25:03 2013 (r249410) @@ -120,10 +120,7 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer -options CTL_DISABLE # Disable CTL by default to save memory. - # Re-enable with kern.cam.ctl.disable=0 in - # /boot/loader.conf +#device ctl # CAM Target Layer # RAID controllers #device amr # AMI MegaRAID From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 16:29:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id ABA3C8DC; Fri, 12 Apr 2013 16:29:15 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9EAAA1178; Fri, 12 Apr 2013 16:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CGTFMA068972; Fri, 12 Apr 2013 16:29:15 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CGTFcn068971; Fri, 12 Apr 2013 16:29:15 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201304121629.r3CGTFcn068971@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 12 Apr 2013 16:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249411 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 16:29:15 -0000 Author: ae Date: Fri Apr 12 16:29:15 2013 New Revision: 249411 URL: http://svnweb.freebsd.org/changeset/base/249411 Log: Reflect removing of the counter_u64_subtract() function in the macro. Modified: head/sys/netinet/ip_var.h Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Fri Apr 12 16:25:03 2013 (r249410) +++ head/sys/netinet/ip_var.h Fri Apr 12 16:29:15 2013 (r249411) @@ -173,9 +173,9 @@ VNET_DECLARE(struct ipstat_p, ipstatp); * stats. */ #define IPSTAT_ADD(name, val) counter_u64_add(V_ipstatp.name, (val)) -#define IPSTAT_SUB(name, val) counter_u64_subtract(V_ipstatp.name, (val)) +#define IPSTAT_SUB(name, val) IPSTAT_ADD(name, -(val)) #define IPSTAT_INC(name) IPSTAT_ADD(name, 1) -#define IPSTAT_DEC(name) IPSTAT_ADD(name, -1) +#define IPSTAT_DEC(name) IPSTAT_SUB(name, 1) /* * Kernel module consumers must use this accessor macro. From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 16:36:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0179CAD7; Fri, 12 Apr 2013 16:36:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E87BA11BE; Fri, 12 Apr 2013 16:36:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CGaIcW071559; Fri, 12 Apr 2013 16:36:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CGaI5m071558; Fri, 12 Apr 2013 16:36:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304121636.r3CGaI5m071558@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 12 Apr 2013 16:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249412 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 16:36:19 -0000 Author: trasz Date: Fri Apr 12 16:36:18 2013 New Revision: 249412 URL: http://svnweb.freebsd.org/changeset/base/249412 Log: Fix usage for soreceive(9) - uio must always be non-NULL. MFC after: 1 week Modified: head/share/man/man9/socket.9 Modified: head/share/man/man9/socket.9 ============================================================================== --- head/share/man/man9/socket.9 Fri Apr 12 16:29:15 2013 (r249411) +++ head/share/man/man9/socket.9 Fri Apr 12 16:36:18 2013 (r249412) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 14, 2006 +.Dd April 12, 2013 .Dt SOCKET 9 .Os .Sh NAME @@ -208,12 +208,19 @@ Data may be retrieved directly to kernel argument, or as an mbuf chain returned to the caller via .Fa mp0 , avoiding a data copy. -Only one of the +The .Fa uio -or -.Fa mp0 -pointers may be +must always be .Pf non- Dv NULL . +If +.Fa mp0 +is +.Pf non- Dv NULL , +only the +.Pf uio_resid +of +.Fa uio +is used. The caller may optionally retrieve a socket address on a protocol with the .Dv PR_ADDR capability by providing storage via From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:01:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EBAC0EC8; Fri, 12 Apr 2013 17:01:07 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C45361289; Fri, 12 Apr 2013 17:01:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CH17cW079759; Fri, 12 Apr 2013 17:01:07 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CH17YB079757; Fri, 12 Apr 2013 17:01:07 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201304121701.r3CH17YB079757@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 12 Apr 2013 17:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249413 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:01:08 -0000 Author: gavin Date: Fri Apr 12 17:01:07 2013 New Revision: 249413 URL: http://svnweb.freebsd.org/changeset/base/249413 Log: Add some more dates and relationships. Submitted by: jkoshy, gj, dfr Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Fri Apr 12 16:36:18 2013 (r249412) +++ head/share/misc/committers-src.dot Fri Apr 12 17:01:07 2013 (r249413) @@ -48,10 +48,11 @@ dmlb [label="Duncan Barclay\ndmlb@FreeBS dougb [label="Doug Barton\ndougb@FreeBSD.org\n2000/10/26\n2012/10/08"] eik [label="Oliver Eikemeier\neik@FreeBSD.org\n2004/05/20\n2008/11/10"] furuta [label="Atsushi Furuta\nfuruta@FreeBSD.org\n2000/06/21\n2003/03/08"] +gj [label="Gary L. Jennejohn\ngj@FreeBSD.org\n1994/??/??\n2006/04/28"] groudier [label="Gerard Roudier\ngroudier@FreeBSD.org\n1999/12/30\n2006/04/06"] jake [label="Jake Burkholder\njake@FreeBSD.org\n2000/05/16\n2008/11/10"] jayanth [label="Jayanth Vijayaraghavan\njayanth@FreeBSD.org\n2000/05/08\n2008/11/10"] -jb [label="John Birrell\njb@FreeBSD.org\n????/??/??\n2009/12/15"] +jb [label="John Birrell\njb@FreeBSD.org\n1997/03/27\n2009/12/15"] jdp [label="John Polstra\njdp@FreeBSD.org\n1995/12/07\n2008/02/26"] jedgar [label="Chris D. Faulhaber\njedgar@FreeBSD.org\n1999/12/15\n2006/04/07"] jkh [label="Jordan K. Hubbard\njkh@FreeBSD.org\n1993/06/12\n2008/06/13"] @@ -143,7 +144,7 @@ dwmalone [label="David Malone\ndwmalone@ eadler [label="Eitan Adler\neadler@FreeBSD.org\n2012/01/18"] ed [label="Ed Schouten\ned@FreeBSD.org\n2008/05/22"] edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2007/06/25"] -eivind [label="Eivind Eklund\neivind@FreeBSD.org\n????/??/??"] +eivind [label="Eivind Eklund\neivind@FreeBSD.org\n1997/02/02"] emaste [label="Ed Maste\nemaste@FreeBSD.org\n2005/10/04"] emax [label="Maksim Yevmenkin\nemax@FreeBSD.org\n2003/10/12"] eri [label="Ermal Luci\neri@FreeBSD.org\n2008/06/11"] @@ -467,6 +468,8 @@ jhb -> rnoland jimharris -> carl +jkh -> dfr +jkh -> gj jkh -> grog jkh -> imp jkh -> jlemon @@ -574,6 +577,7 @@ philip -> jls philip -> matteo philip -> uqs +phk -> jkoshy phk -> mux pjd -> kib From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:22:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 89B55640; Fri, 12 Apr 2013 17:22:13 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6BE481350; Fri, 12 Apr 2013 17:22:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHMCmW086333; Fri, 12 Apr 2013 17:22:12 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHMCx7086331; Fri, 12 Apr 2013 17:22:12 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201304121722.r3CHMCx7086331@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 12 Apr 2013 17:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249415 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:22:13 -0000 Author: jchandra Date: Fri Apr 12 17:22:12 2013 New Revision: 249415 URL: http://svnweb.freebsd.org/changeset/base/249415 Log: Move MIPS_MAX_TLB_ENTRIES definition from cpuregs.h to tlb.c Having MIPS_MAX_TLB_ENTRIES defined to 128 is misleading, since it used to be 64 in older releases of MIPS architecture (where it could be read from Config1) and can be much more than 128 for the newer processors. For now, move the definition to the only file using it (mips/mips/tlb.c) and define MIPS_MAX_TLB_ENTRIES depending on the MIPS cpu defined. Also add few checks so that we do not write beyond the end of the tlb_state array. This fixes a kernel data corruption seen in Netlogic XLP, which was casued by tlb_save() writing beyond the end of tlb_state array when breaking into debugger. Modified: head/sys/mips/include/cpuregs.h head/sys/mips/mips/tlb.c Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Fri Apr 12 17:15:47 2013 (r249414) +++ head/sys/mips/include/cpuregs.h Fri Apr 12 17:22:12 2013 (r249415) @@ -521,7 +521,6 @@ #define MIPS_CONFIG1_TLBSZ_MASK 0x7E000000 /* bits 30..25 # tlb entries minus one */ #define MIPS_CONFIG1_TLBSZ_SHIFT 25 -#define MIPS_MAX_TLB_ENTRIES 128 #define MIPS_CONFIG1_IS_MASK 0x01C00000 /* bits 24..22 icache sets per way */ #define MIPS_CONFIG1_IS_SHIFT 22 Modified: head/sys/mips/mips/tlb.c ============================================================================== --- head/sys/mips/mips/tlb.c Fri Apr 12 17:15:47 2013 (r249414) +++ head/sys/mips/mips/tlb.c Fri Apr 12 17:22:12 2013 (r249415) @@ -40,6 +40,14 @@ #include #include +#if defined(CPU_CNMIPS) +#define MIPS_MAX_TLB_ENTRIES 128 +#elif defined(CPU_NLM) +#define MIPS_MAX_TLB_ENTRIES (2048 + 128) +#else +#define MIPS_MAX_TLB_ENTRIES 64 +#endif + struct tlb_state { unsigned wired; struct tlb_entry { @@ -264,12 +272,15 @@ tlb_invalidate_range(pmap_t pmap, vm_off void tlb_save(void) { - unsigned i, cpu; + unsigned ntlb, i, cpu; cpu = PCPU_GET(cpuid); - + if (num_tlbentries > MIPS_MAX_TLB_ENTRIES) + ntlb = MIPS_MAX_TLB_ENTRIES; + else + ntlb = num_tlbentries; tlb_state[cpu].wired = mips_rd_wired(); - for (i = 0; i < num_tlbentries; i++) { + for (i = 0; i < ntlb; i++) { mips_wr_index(i); tlb_read(); @@ -329,7 +340,7 @@ tlb_invalidate_one(unsigned i) DB_SHOW_COMMAND(tlb, ddb_dump_tlb) { register_t ehi, elo0, elo1; - unsigned i, cpu; + unsigned i, cpu, ntlb; /* * XXX @@ -344,12 +355,18 @@ DB_SHOW_COMMAND(tlb, ddb_dump_tlb) db_printf("Invalid CPU %u\n", cpu); return; } + if (num_tlbentries > MIPS_MAX_TLB_ENTRIES) { + ntlb = MIPS_MAX_TLB_ENTRIES; + db_printf("Warning: Only %d of %d TLB entries saved!\n", + ntlb, num_tlbentries); + } else + ntlb = num_tlbentries; if (cpu == PCPU_GET(cpuid)) tlb_save(); db_printf("Beginning TLB dump for CPU %u...\n", cpu); - for (i = 0; i < num_tlbentries; i++) { + for (i = 0; i < ntlb; i++) { if (i == tlb_state[cpu].wired) { if (i != 0) db_printf("^^^ WIRED ENTRIES ^^^\n"); From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:34:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 14EFCA63; Fri, 12 Apr 2013 17:34:50 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EB83E13B4; Fri, 12 Apr 2013 17:34:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHYnCa089618; Fri, 12 Apr 2013 17:34:49 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHYnNo089616; Fri, 12 Apr 2013 17:34:49 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304121734.r3CHYnNo089616@svn.freebsd.org> From: Jim Harris Date: Fri, 12 Apr 2013 17:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249416 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:34:50 -0000 Author: jimharris Date: Fri Apr 12 17:34:49 2013 New Revision: 249416 URL: http://svnweb.freebsd.org/changeset/base/249416 Log: Do not panic when a busdma mapping operation fails. Instead, print an error message and fail the associated command with DATA_TRANSFER_ERROR NVMe completion status. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme.c head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Fri Apr 12 17:22:12 2013 (r249415) +++ head/sys/dev/nvme/nvme.c Fri Apr 12 17:34:49 2013 (r249416) @@ -235,7 +235,13 @@ nvme_payload_map(void *arg, bus_dma_segm struct nvme_tracker *tr = arg; uint32_t cur_nseg; - KASSERT(error == 0, ("nvme_payload_map error != 0\n")); + /* + * If the mapping operation failed, return immediately. The caller + * is responsible for detecting the error status and failing the + * tracker manually. + */ + if (error != 0) + return; /* * Note that we specified PAGE_SIZE for alignment and max Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Fri Apr 12 17:22:12 2013 (r249415) +++ head/sys/dev/nvme/nvme_qpair.c Fri Apr 12 17:34:49 2013 (r249416) @@ -702,7 +702,7 @@ static void _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) { struct nvme_tracker *tr; - int err; + int err = 0; mtx_assert(&qpair->lock, MA_OWNED); @@ -745,7 +745,8 @@ _nvme_qpair_submit_request(struct nvme_q err = bus_dmamap_load(tr->qpair->dma_tag, tr->payload_dma_map, req->u.payload, req->payload_size, nvme_payload_map, tr, 0); if (err != 0) - panic("bus_dmamap_load returned non-zero!\n"); + nvme_printf(qpair->ctrlr, + "bus_dmamap_load returned 0x%x!\n", err); break; case NVME_REQUEST_NULL: nvme_qpair_submit_tracker(tr->qpair, tr); @@ -755,20 +756,36 @@ _nvme_qpair_submit_request(struct nvme_q tr->payload_dma_map, req->u.uio, nvme_payload_map_uio, tr, 0); if (err != 0) - panic("bus_dmamap_load_uio returned non-zero!\n"); + nvme_printf(qpair->ctrlr, + "bus_dmamap_load_uio returned 0x%x!\n", err); break; #ifdef NVME_UNMAPPED_BIO_SUPPORT case NVME_REQUEST_BIO: err = bus_dmamap_load_bio(tr->qpair->dma_tag, tr->payload_dma_map, req->u.bio, nvme_payload_map, tr, 0); if (err != 0) - panic("bus_dmamap_load_bio returned non-zero!\n"); + nvme_printf(qpair->ctrlr, + "bus_dmamap_load_bio returned 0x%x!\n", err); break; #endif default: panic("unknown nvme request type 0x%x\n", req->type); break; } + + if (err != 0) { + /* + * The dmamap operation failed, so we manually fail the + * tracker here with DATA_TRANSFER_ERROR status. + * + * nvme_qpair_manual_complete_tracker must not be called + * with the qpair lock held. + */ + mtx_unlock(&qpair->lock); + nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, + NVME_SC_DATA_TRANSFER_ERROR, 1 /* do not retry */, TRUE); + mtx_lock(&qpair->lock); + } } void From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:36:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2E2D3BE4; Fri, 12 Apr 2013 17:36:49 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0681A13BF; Fri, 12 Apr 2013 17:36:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHamgm089918; Fri, 12 Apr 2013 17:36:48 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHamC7089916; Fri, 12 Apr 2013 17:36:48 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304121736.r3CHamC7089916@svn.freebsd.org> From: Jim Harris Date: Fri, 12 Apr 2013 17:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249417 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:36:49 -0000 Author: jimharris Date: Fri Apr 12 17:36:48 2013 New Revision: 249417 URL: http://svnweb.freebsd.org/changeset/base/249417 Log: Rename the controller's fail_req_lock, so that it can be used for other locking operations on the controller. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_private.h Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Fri Apr 12 17:34:49 2013 (r249416) +++ head/sys/dev/nvme/nvme_ctrlr.c Fri Apr 12 17:36:48 2013 (r249417) @@ -307,9 +307,9 @@ nvme_ctrlr_post_failed_request(struct nv struct nvme_request *req) { - mtx_lock(&ctrlr->fail_req_lock); + mtx_lock(&ctrlr->lock); STAILQ_INSERT_TAIL(&ctrlr->fail_req, req, stailq); - mtx_unlock(&ctrlr->fail_req_lock); + mtx_unlock(&ctrlr->lock); taskqueue_enqueue(ctrlr->taskqueue, &ctrlr->fail_req_task); } @@ -319,14 +319,14 @@ nvme_ctrlr_fail_req_task(void *arg, int struct nvme_controller *ctrlr = arg; struct nvme_request *req; - mtx_lock(&ctrlr->fail_req_lock); + mtx_lock(&ctrlr->lock); while (!STAILQ_EMPTY(&ctrlr->fail_req)) { req = STAILQ_FIRST(&ctrlr->fail_req); STAILQ_REMOVE_HEAD(&ctrlr->fail_req, stailq); nvme_qpair_manual_complete_request(req->qpair, req, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, TRUE); } - mtx_unlock(&ctrlr->fail_req_lock); + mtx_unlock(&ctrlr->lock); } static int @@ -935,6 +935,8 @@ nvme_ctrlr_construct(struct nvme_control ctrlr->dev = dev; + mtx_init(&ctrlr->lock, "nvme ctrlr lock", NULL, MTX_DEF); + status = nvme_ctrlr_allocate_bar(ctrlr); if (status != 0) @@ -1033,8 +1035,6 @@ intx: TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); TASK_INIT(&ctrlr->fail_req_task, 0, nvme_ctrlr_fail_req_task, ctrlr); - mtx_init(&ctrlr->fail_req_lock, "nvme ctrlr fail req lock", NULL, - MTX_DEF); STAILQ_INIT(&ctrlr->fail_req); ctrlr->is_failed = FALSE; Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Fri Apr 12 17:34:49 2013 (r249416) +++ head/sys/dev/nvme/nvme_private.h Fri Apr 12 17:36:48 2013 (r249417) @@ -247,6 +247,8 @@ struct nvme_controller { device_t dev; + struct mtx lock; + uint32_t ready_timeout_in_ms; bus_space_tag_t bus_tag; @@ -325,7 +327,6 @@ struct nvme_controller { uint32_t is_resetting; - struct mtx fail_req_lock; boolean_t is_failed; STAILQ_HEAD(, nvme_request) fail_req; From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:41:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DC852D9D; Fri, 12 Apr 2013 17:41:24 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CF32213E5; Fri, 12 Apr 2013 17:41:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHfOW8092138; Fri, 12 Apr 2013 17:41:24 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHfODp092136; Fri, 12 Apr 2013 17:41:24 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304121741.r3CHfODp092136@svn.freebsd.org> From: Jim Harris Date: Fri, 12 Apr 2013 17:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249418 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:41:24 -0000 Author: jimharris Date: Fri Apr 12 17:41:24 2013 New Revision: 249418 URL: http://svnweb.freebsd.org/changeset/base/249418 Log: Add a mutex to each namespace, for general locking operations on the namespace. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_ns.c head/sys/dev/nvme/nvme_private.h Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:36:48 2013 (r249417) +++ head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:41:24 2013 (r249418) @@ -300,6 +300,17 @@ nvme_ns_construct(struct nvme_namespace ns->ctrlr = ctrlr; ns->id = id; + /* + * Namespaces are reconstructed after a controller reset, so check + * to make sure we only call mtx_init once on each mtx. + * + * TODO: Move this somewhere where it gets called at controller + * construction time, which is not invoked as part of each + * controller reset. + */ + if (!mtx_initialized(&ns->lock)) + mtx_init(&ns->lock, "nvme ns lock", NULL, MTX_DEF); + #ifdef CHATHAM2 if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) nvme_ns_populate_chatham_data(ns); Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Fri Apr 12 17:36:48 2013 (r249417) +++ head/sys/dev/nvme/nvme_private.h Fri Apr 12 17:41:24 2013 (r249418) @@ -238,6 +238,7 @@ struct nvme_namespace { uint16_t flags; struct cdev *cdev; void *cons_cookie[NVME_MAX_CONSUMERS]; + struct mtx lock; }; /* From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:44:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A4C7CF25; Fri, 12 Apr 2013 17:44:56 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86A44143A; Fri, 12 Apr 2013 17:44:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHiu35092648; Fri, 12 Apr 2013 17:44:56 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHiuY7092646; Fri, 12 Apr 2013 17:44:56 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304121744.r3CHiuY7092646@svn.freebsd.org> From: Jim Harris Date: Fri, 12 Apr 2013 17:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249419 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:44:56 -0000 Author: jimharris Date: Fri Apr 12 17:44:55 2013 New Revision: 249419 URL: http://svnweb.freebsd.org/changeset/base/249419 Log: Remove the NVMe-specific physio and associated routines. These were added early on for benchmarking purposes to avoid the mapped I/O penalties incurred in kern_physio. Now that FreeBSD (including kern_physio) supports unmapped I/O, the need for these NVMe-specific routines no longer exists. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_ns.c head/sys/dev/nvme/nvme_uio.c Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:41:24 2013 (r249418) +++ head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:44:55 2013 (r249419) @@ -152,13 +152,11 @@ static struct cdevsw nvme_ns_cdevsw = { .d_version = D_VERSION, #ifdef NVME_UNMAPPED_BIO_SUPPORT .d_flags = D_DISK | D_UNMAPPED_IO, - .d_read = physread, - .d_write = physwrite, #else .d_flags = D_DISK, - .d_read = nvme_ns_physio, - .d_write = nvme_ns_physio, #endif + .d_read = physread, + .d_write = physwrite, .d_open = nvme_ns_open, .d_close = nvme_ns_close, .d_strategy = nvme_ns_strategy, Modified: head/sys/dev/nvme/nvme_uio.c ============================================================================== --- head/sys/dev/nvme/nvme_uio.c Fri Apr 12 17:41:24 2013 (r249418) +++ head/sys/dev/nvme/nvme_uio.c Fri Apr 12 17:44:55 2013 (r249419) @@ -34,171 +34,10 @@ __FBSDID("$FreeBSD$"); #include "nvme_private.h" -static void -nvme_uio_done(void *arg, const struct nvme_completion *cpl) -{ - struct mtx *mtx; - struct uio *uio = arg; - - if (!nvme_completion_is_error(cpl)) - uio->uio_resid = 0; - - mtx = mtx_pool_find(mtxpool_sleep, arg); - mtx_lock(mtx); - wakeup(arg); - mtx_unlock(mtx); -} - void nvme_payload_map_uio(void *arg, bus_dma_segment_t *seg, int nseg, bus_size_t mapsize, int error) { - struct nvme_tracker *tr = arg; - /* - * Now that we know the actual size of the uio, divide it by the - * sector size that we stored in cdw12. - */ - tr->req->cmd.cdw12 = (mapsize / tr->req->cmd.cdw12)-1; nvme_payload_map(arg, seg, nseg, error); } - -static int -nvme_read_uio(struct nvme_namespace *ns, struct uio *uio) -{ - struct nvme_request *req; - struct nvme_command *cmd; - uint64_t lba; - - req = nvme_allocate_request_uio(uio, nvme_uio_done, uio); - - if (req == NULL) - return (ENOMEM); - - cmd = &req->cmd; - cmd->opc = NVME_OPC_READ; - cmd->nsid = ns->id; - lba = uio->uio_offset / nvme_ns_get_sector_size(ns); - - *(uint64_t *)&cmd->cdw10 = lba; - /* - * Store the sector size in cdw12 (where the LBA count normally goes). - * We'll adjust cdw12 in the map_uio callback based on the mapsize - * parameter. This allows us to not have to store the namespace - * in the request simply to get the sector size in the map_uio - * callback. - */ - cmd->cdw12 = nvme_ns_get_sector_size(ns); - - nvme_ctrlr_submit_io_request(ns->ctrlr, req); - - return (0); -} - -static int -nvme_write_uio(struct nvme_namespace *ns, struct uio *uio) -{ - struct nvme_request *req; - struct nvme_command *cmd; - uint64_t lba; - - req = nvme_allocate_request_uio(uio, nvme_uio_done, uio); - - if (req == NULL) - return (ENOMEM); - - cmd = &req->cmd; - cmd->opc = NVME_OPC_WRITE; - cmd->nsid = ns->id; - lba = uio->uio_offset / nvme_ns_get_sector_size(ns); - - *(uint64_t *)&cmd->cdw10 = lba; - /* - * Store the sector size in cdw12 (where the LBA count normally goes). - * We'll adjust cdw12 in the map_uio callback based on the mapsize - * parameter. This allows us to not have to store the namespace - * in the request simply to get the sector size in the map_uio - * callback. - */ - cmd->cdw12 = nvme_ns_get_sector_size(ns); - - nvme_ctrlr_submit_io_request(ns->ctrlr, req); - - return (0); -} - -int -nvme_ns_physio(struct cdev *dev, struct uio *uio, int ioflag) -{ - struct uio uio_tmp; - struct iovec uio_iov_tmp; - struct nvme_namespace *ns; - struct mtx *mtx; - int i, nvme_err, physio_err = 0; -#if __FreeBSD_version > 900017 - int ref; -#endif - - PHOLD(curproc); - - ns = dev->si_drv1; - mtx = mtx_pool_find(mtxpool_sleep, &uio_tmp); - -#if __FreeBSD_version > 900017 - dev_refthread(dev, &ref); -#else - dev_refthread(dev); -#endif - - /* - * NVM Express doesn't really support true SGLs. All SG elements - * must be PAGE_SIZE, except for the first and last element. - * Because of this, we need to break up each iovec into a separate - * NVMe command - otherwise we could end up with sub-PAGE_SIZE - * elements in the middle of an SGL which is not allowed. - */ - uio_tmp.uio_iov = &uio_iov_tmp; - uio_tmp.uio_iovcnt = 1; - uio_tmp.uio_offset = uio->uio_offset; - uio_tmp.uio_segflg = uio->uio_segflg; - uio_tmp.uio_rw = uio->uio_rw; - uio_tmp.uio_td = uio->uio_td; - - for (i = 0; i < uio->uio_iovcnt; i++) { - - uio_iov_tmp.iov_base = uio->uio_iov[i].iov_base; - uio_iov_tmp.iov_len = uio->uio_iov[i].iov_len; - uio_tmp.uio_resid = uio_iov_tmp.iov_len; - - mtx_lock(mtx); - - if (uio->uio_rw == UIO_READ) - nvme_err = nvme_read_uio(ns, &uio_tmp); - else - nvme_err = nvme_write_uio(ns, &uio_tmp); - - if (nvme_err == 0) - msleep(&uio_tmp, mtx, PRIBIO, "nvme_physio", 0); - - mtx_unlock(mtx); - - if (uio_tmp.uio_resid == 0) { - uio->uio_resid -= uio_iov_tmp.iov_len; - uio->uio_offset += uio_iov_tmp.iov_len; - } else { - physio_err = EFAULT; - break; - } - - uio_tmp.uio_offset += uio_iov_tmp.iov_len; - } - -#if __FreeBSD_version > 900017 - dev_relthread(dev, ref); -#else - dev_relthread(dev); -#endif - - PRELE(curproc); - return (physio_err); -} From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:48:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 41AA91AC; Fri, 12 Apr 2013 17:48:46 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 324A61463; Fri, 12 Apr 2013 17:48:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHmkZc093207; Fri, 12 Apr 2013 17:48:46 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHmjNS093198; Fri, 12 Apr 2013 17:48:45 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304121748.r3CHmjNS093198@svn.freebsd.org> From: Jim Harris Date: Fri, 12 Apr 2013 17:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249420 - in head/sys: dev/nvme modules/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:48:46 -0000 Author: jimharris Date: Fri Apr 12 17:48:45 2013 New Revision: 249420 URL: http://svnweb.freebsd.org/changeset/base/249420 Log: Move the busdma mapping functions to nvme_qpair.c. This removes nvme_uio.c completely. Sponsored by: Intel Deleted: head/sys/dev/nvme/nvme_uio.c Modified: head/sys/dev/nvme/nvme.c head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c head/sys/modules/nvme/Makefile Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Fri Apr 12 17:44:55 2013 (r249419) +++ head/sys/dev/nvme/nvme.c Fri Apr 12 17:48:45 2013 (r249420) @@ -229,43 +229,6 @@ nvme_dump_completion(struct nvme_complet cpl->status.m, cpl->status.dnr); } -void -nvme_payload_map(void *arg, bus_dma_segment_t *seg, int nseg, int error) -{ - struct nvme_tracker *tr = arg; - uint32_t cur_nseg; - - /* - * If the mapping operation failed, return immediately. The caller - * is responsible for detecting the error status and failing the - * tracker manually. - */ - if (error != 0) - return; - - /* - * Note that we specified PAGE_SIZE for alignment and max - * segment size when creating the bus dma tags. So here - * we can safely just transfer each segment to its - * associated PRP entry. - */ - tr->req->cmd.prp1 = seg[0].ds_addr; - - if (nseg == 2) { - tr->req->cmd.prp2 = seg[1].ds_addr; - } else if (nseg > 2) { - cur_nseg = 1; - tr->req->cmd.prp2 = (uint64_t)tr->prp_bus_addr; - while (cur_nseg < nseg) { - tr->prp[cur_nseg-1] = - (uint64_t)seg[cur_nseg].ds_addr; - cur_nseg++; - } - } - - nvme_qpair_submit_tracker(tr->qpair, tr); -} - static int nvme_attach(device_t dev) { Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Fri Apr 12 17:44:55 2013 (r249419) +++ head/sys/dev/nvme/nvme_private.h Fri Apr 12 17:48:45 2013 (r249420) @@ -429,10 +429,6 @@ void nvme_ctrlr_cmd_set_async_event_conf void nvme_ctrlr_cmd_abort(struct nvme_controller *ctrlr, uint16_t cid, uint16_t sqid, nvme_cb_fn_t cb_fn, void *cb_arg); -void nvme_payload_map(void *arg, bus_dma_segment_t *seg, int nseg, - int error); -void nvme_payload_map_uio(void *arg, bus_dma_segment_t *seg, int nseg, - bus_size_t mapsize, int error); void nvme_completion_poll_cb(void *arg, const struct nvme_completion *cpl); int nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev); Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Fri Apr 12 17:44:55 2013 (r249419) +++ head/sys/dev/nvme/nvme_qpair.c Fri Apr 12 17:48:45 2013 (r249420) @@ -699,6 +699,51 @@ nvme_qpair_submit_tracker(struct nvme_qp } static void +nvme_payload_map(void *arg, bus_dma_segment_t *seg, int nseg, int error) +{ + struct nvme_tracker *tr = arg; + uint32_t cur_nseg; + + /* + * If the mapping operation failed, return immediately. The caller + * is responsible for detecting the error status and failing the + * tracker manually. + */ + if (error != 0) + return; + + /* + * Note that we specified PAGE_SIZE for alignment and max + * segment size when creating the bus dma tags. So here + * we can safely just transfer each segment to its + * associated PRP entry. + */ + tr->req->cmd.prp1 = seg[0].ds_addr; + + if (nseg == 2) { + tr->req->cmd.prp2 = seg[1].ds_addr; + } else if (nseg > 2) { + cur_nseg = 1; + tr->req->cmd.prp2 = (uint64_t)tr->prp_bus_addr; + while (cur_nseg < nseg) { + tr->prp[cur_nseg-1] = + (uint64_t)seg[cur_nseg].ds_addr; + cur_nseg++; + } + } + + nvme_qpair_submit_tracker(tr->qpair, tr); +} + +static void +nvme_payload_map_uio(void *arg, bus_dma_segment_t *seg, int nseg, + bus_size_t mapsize, int error) +{ + + nvme_payload_map(arg, seg, nseg, error); +} + +static void _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) { struct nvme_tracker *tr; Modified: head/sys/modules/nvme/Makefile ============================================================================== --- head/sys/modules/nvme/Makefile Fri Apr 12 17:44:55 2013 (r249419) +++ head/sys/modules/nvme/Makefile Fri Apr 12 17:48:45 2013 (r249420) @@ -12,7 +12,6 @@ SRCS = nvme.c \ nvme_qpair.c \ nvme_sysctl.c \ nvme_test.c \ - nvme_uio.c \ \ bus_if.h \ device_if.h \ From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:52:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 27FAA39F; Fri, 12 Apr 2013 17:52:18 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 199721493; Fri, 12 Apr 2013 17:52:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHqHSA095289; Fri, 12 Apr 2013 17:52:17 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHqH1H095286; Fri, 12 Apr 2013 17:52:17 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304121752.r3CHqH1H095286@svn.freebsd.org> From: Jim Harris Date: Fri, 12 Apr 2013 17:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249421 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:52:18 -0000 Author: jimharris Date: Fri Apr 12 17:52:17 2013 New Revision: 249421 URL: http://svnweb.freebsd.org/changeset/base/249421 Log: Add support for passthrough NVMe commands. This includes a new IOCTL to support a generic method for nvmecontrol(8) to pass IDENTIFY, GET_LOG_PAGE, GET_FEATURES and other commands to the controller, rather than separate IOCTLs for each. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_ns.c Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Fri Apr 12 17:48:45 2013 (r249420) +++ head/sys/dev/nvme/nvme.h Fri Apr 12 17:52:17 2013 (r249421) @@ -38,6 +38,7 @@ #define NVME_IO_TEST _IOWR('n', 2, struct nvme_io_test) #define NVME_BIO_TEST _IOWR('n', 4, struct nvme_io_test) #define NVME_RESET_CONTROLLER _IO('n', 5) +#define NVME_PASSTHROUGH_CMD _IOWR('n', 6, struct nvme_pt_command) /* * Use to mark a command to apply to all namespaces, or to retrieve global @@ -716,6 +717,59 @@ enum nvme_io_test_flags { NVME_TEST_FLAG_REFTHREAD = 0x1, }; +struct nvme_pt_command { + + /* + * cmd is used to specify a passthrough command to a controller or + * namespace. + * + * The following fields from cmd may be specified by the caller: + * * opc (opcode) + * * nsid (namespace id) - for admin commands only + * * cdw10-cdw15 + * + * Remaining fields must be set to 0 by the caller. + */ + struct nvme_command cmd; + + /* + * cpl returns completion status for the passthrough command + * specified by cmd. + * + * The following fields will be filled out by the driver, for + * consumption by the caller: + * * cdw0 + * * status (except for phase) + * + * Remaining fields will be set to 0 by the driver. + */ + struct nvme_completion cpl; + + /* buf is the data buffer associated with this passthrough command. */ + void * buf; + + /* + * len is the length of the data buffer associated with this + * passthrough command. + */ + uint32_t len; + + /* + * is_read = 1 if the passthrough command will read data into the + * supplied buffer. + * + * is_read = 0 if the passthrough command will write data into the + * supplied buffer. + */ + uint32_t is_read; + + /* + * driver_lock is used by the driver only. It must be set to 0 + * by the caller. + */ + struct mtx * driver_lock; +}; + #define nvme_completion_is_error(cpl) \ ((cpl)->status.sc != 0 || (cpl)->status.sct != 0) @@ -740,6 +794,11 @@ enum nvme_namespace_flags { NVME_NS_FLUSH_SUPPORTED = 0x2, }; +int nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, + struct nvme_pt_command *pt, + uint32_t nsid, int is_user_buffer, + int is_admin_cmd); + /* Admin functions */ void nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, uint8_t feature, uint32_t cdw11, Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Fri Apr 12 17:48:45 2013 (r249420) +++ head/sys/dev/nvme/nvme_ctrlr.c Fri Apr 12 17:52:17 2013 (r249421) @@ -28,10 +28,14 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include +#include #include +#include #include #include @@ -878,12 +882,103 @@ nvme_ctrlr_configure_intx(struct nvme_co return (0); } +static void +nvme_pt_done(void *arg, const struct nvme_completion *cpl) +{ + struct nvme_pt_command *pt = arg; + + bzero(&pt->cpl, sizeof(pt->cpl)); + pt->cpl.cdw0 = cpl->cdw0; + pt->cpl.status = cpl->status; + pt->cpl.status.p = 0; + + mtx_lock(pt->driver_lock); + wakeup(pt); + mtx_unlock(pt->driver_lock); +} + +int +nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, + struct nvme_pt_command *pt, uint32_t nsid, int is_user_buffer, + int is_admin_cmd) +{ + struct nvme_request *req; + struct mtx *mtx; + struct buf *buf = NULL; + int ret = 0; + + if (pt->len > 0) + if (is_user_buffer) { + /* + * Ensure the user buffer is wired for the duration of + * this passthrough command. + */ + PHOLD(curproc); + buf = getpbuf(NULL); + buf->b_saveaddr = buf->b_data; + buf->b_data = pt->buf; + buf->b_bufsize = pt->len; + buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE; +#ifdef NVME_UNMAPPED_BIO_SUPPORT + if (vmapbuf(buf, 1) < 0) { +#else + if (vmapbuf(buf) < 0) { +#endif + ret = EFAULT; + goto err; + } + req = nvme_allocate_request_vaddr(buf->b_data, pt->len, + nvme_pt_done, pt); + } else + req = nvme_allocate_request_vaddr(pt->buf, pt->len, + nvme_pt_done, pt); + else + req = nvme_allocate_request_null(nvme_pt_done, pt); + + req->cmd.opc = pt->cmd.opc; + req->cmd.cdw10 = pt->cmd.cdw10; + req->cmd.cdw11 = pt->cmd.cdw11; + req->cmd.cdw12 = pt->cmd.cdw12; + req->cmd.cdw13 = pt->cmd.cdw13; + req->cmd.cdw14 = pt->cmd.cdw14; + req->cmd.cdw15 = pt->cmd.cdw15; + + req->cmd.nsid = nsid; + + if (is_admin_cmd) + mtx = &ctrlr->lock; + else + mtx = &ctrlr->ns[nsid-1].lock; + + mtx_lock(mtx); + pt->driver_lock = mtx; + + if (is_admin_cmd) + nvme_ctrlr_submit_admin_request(ctrlr, req); + else + nvme_ctrlr_submit_io_request(ctrlr, req); + + mtx_sleep(pt, mtx, PRIBIO, "nvme_pt", 0); + mtx_unlock(mtx); + + pt->driver_lock = NULL; + +err: + if (buf != NULL) { + relpbuf(buf, NULL); + PRELE(curproc); + } + + return (ret); +} + static int nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, struct thread *td) { struct nvme_completion_poll_status status; struct nvme_controller *ctrlr; + struct nvme_pt_command *pt; ctrlr = cdev->si_drv1; @@ -912,6 +1007,10 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_lo case NVME_RESET_CONTROLLER: nvme_ctrlr_reset(ctrlr); break; + case NVME_PASSTHROUGH_CMD: + pt = (struct nvme_pt_command *)arg; + return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, pt->cmd.nsid, + 1 /* is_user_buffer */, 1 /* is_admin_cmd */)); default: return (ENOTTY); } Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:48:45 2013 (r249420) +++ head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:52:17 2013 (r249421) @@ -48,6 +48,7 @@ nvme_ns_ioctl(struct cdev *cdev, u_long struct nvme_completion_poll_status status; struct nvme_namespace *ns; struct nvme_controller *ctrlr; + struct nvme_pt_command *pt; ns = cdev->si_drv1; ctrlr = ns->ctrlr; @@ -78,6 +79,10 @@ nvme_ns_ioctl(struct cdev *cdev, u_long case NVME_BIO_TEST: nvme_ns_test(ns, cmd, arg); break; + case NVME_PASSTHROUGH_CMD: + pt = (struct nvme_pt_command *)arg; + return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, ns->id, + 1 /* is_user_buffer */, 0 /* is_admin_cmd */)); case DIOCGMEDIASIZE: *(off_t *)arg = (off_t)nvme_ns_get_size(ns); break; From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:56:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F32D3692; Fri, 12 Apr 2013 17:56:48 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D557A14E3; Fri, 12 Apr 2013 17:56:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHumjc095937; Fri, 12 Apr 2013 17:56:48 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHumDp095933; Fri, 12 Apr 2013 17:56:48 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304121756.r3CHumDp095933@svn.freebsd.org> From: Jim Harris Date: Fri, 12 Apr 2013 17:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249422 - in head: sbin/nvmecontrol sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:56:49 -0000 Author: jimharris Date: Fri Apr 12 17:56:47 2013 New Revision: 249422 URL: http://svnweb.freebsd.org/changeset/base/249422 Log: Remove the NVME_IDENTIFY_CONTROLLER and NVME_IDENTIFY_NAMESPACE IOCTLs and replace them with the NVMe passthrough equivalent. Sponsored by: Intel Modified: head/sbin/nvmecontrol/nvmecontrol.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_ns.c Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Fri Apr 12 17:52:17 2013 (r249421) +++ head/sbin/nvmecontrol/nvmecontrol.c Fri Apr 12 17:56:47 2013 (r249422) @@ -210,6 +210,53 @@ ns_get_sector_size(struct nvme_namespace return (1 << nsdata->lbaf[0].lbads); } +static void +read_controller_data(int fd, struct nvme_controller_data *cdata) +{ + struct nvme_pt_command pt; + + memset(&pt, 0, sizeof(pt)); + pt.cmd.opc = NVME_OPC_IDENTIFY; + pt.cmd.cdw10 = 1; + pt.buf = cdata; + pt.len = sizeof(*cdata); + pt.is_read = 1; + + if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) { + printf("Identify request failed. errno=%d (%s)\n", + errno, strerror(errno)); + exit(EX_IOERR); + } + + if (nvme_completion_is_error(&pt.cpl)) { + printf("Passthrough command returned error.\n"); + exit(EX_IOERR); + } +} + +static void +read_namespace_data(int fd, int nsid, struct nvme_namespace_data *nsdata) +{ + struct nvme_pt_command pt; + + memset(&pt, 0, sizeof(pt)); + pt.cmd.opc = NVME_OPC_IDENTIFY; + pt.cmd.nsid = nsid; + pt.buf = nsdata; + pt.len = sizeof(*nsdata); + pt.is_read = 1; + + if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) { + printf("Identify request failed. errno=%d (%s)\n", + errno, strerror(errno)); + exit(EX_IOERR); + } + + if (nvme_completion_is_error(&pt.cpl)) { + printf("Passthrough command returned error.\n"); + exit(EX_IOERR); + } +} static void devlist(int argc, char *argv[]) @@ -251,33 +298,12 @@ devlist(int argc, char *argv[]) continue; } - if (ioctl(fd, NVME_IDENTIFY_CONTROLLER, &cdata) < 0) { - printf("Identify request to %s failed. errno=%d (%s)\n", - path, errno, strerror(errno)); - exit_code = EX_IOERR; - continue; - } - + read_controller_data(fd, &cdata); printf("%6s: %s\n", name, cdata.mn); for (i = 0; i < cdata.nn; i++) { sprintf(name, "nvme%dns%d", ctrlr, i+1); - sprintf(path, "/dev/%s", name); - - fd = open(path, O_RDWR); - if (fd < 0) { - printf("Could not open %s. errno=%d (%s)\n", - path, errno, strerror(errno)); - exit_code = EX_NOPERM; - continue; - } - if (ioctl(fd, NVME_IDENTIFY_NAMESPACE, &nsdata) < 0) { - printf("Identify request to %s failed. " - "errno=%d (%s)\n", path, errno, - strerror(errno)); - exit_code = EX_IOERR; - continue; - } + read_namespace_data(fd, i+1, &nsdata); printf(" %10s (%lldGB)\n", name, nsdata.nsze * @@ -329,11 +355,7 @@ identify_ctrlr(int argc, char *argv[]) exit(EX_NOPERM); } - if (ioctl(fd, NVME_IDENTIFY_CONTROLLER, &cdata) < 0) { - printf("Identify request to %s failed. errno=%d (%s)\n", path, - errno, strerror(errno)); - exit(EX_IOERR); - } + read_controller_data(fd, &cdata); if (hexflag == 1) { if (verboseflag == 1) @@ -360,7 +382,8 @@ identify_ns(int argc, char *argv[]) struct nvme_namespace_data nsdata; struct stat devstat; char path[64]; - int ch, fd, hexflag = 0, hexlength; + char *nsloc; + int ch, fd, hexflag = 0, hexlength, nsid; int verboseflag = 0; while ((ch = getopt(argc, argv, "vx")) != -1) { @@ -376,8 +399,41 @@ identify_ns(int argc, char *argv[]) } } + /* + * Check if the specified device node exists before continuing. + * This is a cleaner check for cases where the correct controller + * is specified, but an invalid namespace on that controller. + */ sprintf(path, "/dev/%s", argv[optind]); + if (stat(path, &devstat) < 0) { + printf("Invalid device node %s. errno=%d (%s)\n", path, errno, + strerror(errno)); + exit(EX_IOERR); + } + nsloc = strstr(argv[optind], "ns"); + if (nsloc == NULL) { + printf("Invalid namepsace %s.\n", argv[optind]); + exit(EX_IOERR); + } + + /* + * Pull the namespace id from the string. +2 skips past the "ns" part + * of the string. + */ + nsid = strtol(nsloc + 2, NULL, 10); + if (nsid == 0 && errno != 0) { + printf("Invalid namespace ID %s.\n", argv[optind]); + exit(EX_IOERR); + } + + /* + * We send IDENTIFY commands to the controller, not the namespace, + * since it is an admin cmd. So the path should only include the + * nvmeX part of the nvmeXnsY string. + */ + sprintf(path, "/dev/"); + strncat(path, argv[optind], nsloc - argv[optind]); if (stat(path, &devstat) < 0) { printf("Invalid device node %s. errno=%d (%s)\n", path, errno, strerror(errno)); @@ -391,11 +447,7 @@ identify_ns(int argc, char *argv[]) exit(EX_NOPERM); } - if (ioctl(fd, NVME_IDENTIFY_NAMESPACE, &nsdata) < 0) { - printf("Identify request to %s failed. errno=%d (%s)\n", path, - errno, strerror(errno)); - exit(EX_IOERR); - } + read_namespace_data(fd, nsid, &nsdata); if (hexflag == 1) { if (verboseflag == 1) Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Fri Apr 12 17:52:17 2013 (r249421) +++ head/sys/dev/nvme/nvme.h Fri Apr 12 17:56:47 2013 (r249422) @@ -33,12 +33,11 @@ #include #endif -#define NVME_IDENTIFY_CONTROLLER _IOR('n', 0, struct nvme_controller_data) -#define NVME_IDENTIFY_NAMESPACE _IOR('n', 1, struct nvme_namespace_data) -#define NVME_IO_TEST _IOWR('n', 2, struct nvme_io_test) -#define NVME_BIO_TEST _IOWR('n', 4, struct nvme_io_test) -#define NVME_RESET_CONTROLLER _IO('n', 5) -#define NVME_PASSTHROUGH_CMD _IOWR('n', 6, struct nvme_pt_command) +#define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_command) +#define NVME_RESET_CONTROLLER _IO('n', 1) + +#define NVME_IO_TEST _IOWR('n', 100, struct nvme_io_test) +#define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test) /* * Use to mark a command to apply to all namespaces, or to retrieve global Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Fri Apr 12 17:52:17 2013 (r249421) +++ head/sys/dev/nvme/nvme_ctrlr.c Fri Apr 12 17:56:47 2013 (r249422) @@ -976,34 +976,12 @@ static int nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, struct thread *td) { - struct nvme_completion_poll_status status; struct nvme_controller *ctrlr; struct nvme_pt_command *pt; ctrlr = cdev->si_drv1; switch (cmd) { - case NVME_IDENTIFY_CONTROLLER: -#ifdef CHATHAM2 - /* - * Don't refresh data on Chatham, since Chatham returns - * garbage on IDENTIFY anyways. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) { - memcpy(arg, &ctrlr->cdata, sizeof(ctrlr->cdata)); - break; - } -#endif - /* Refresh data before returning to user. */ - status.done = FALSE; - nvme_ctrlr_cmd_identify_controller(ctrlr, &ctrlr->cdata, - nvme_completion_poll_cb, &status); - while (status.done == FALSE) - DELAY(5); - if (nvme_completion_is_error(&status.cpl)) - return (ENXIO); - memcpy(arg, &ctrlr->cdata, sizeof(ctrlr->cdata)); - break; case NVME_RESET_CONTROLLER: nvme_ctrlr_reset(ctrlr); break; Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:52:17 2013 (r249421) +++ head/sys/dev/nvme/nvme_ns.c Fri Apr 12 17:56:47 2013 (r249422) @@ -45,7 +45,6 @@ static int nvme_ns_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, struct thread *td) { - struct nvme_completion_poll_status status; struct nvme_namespace *ns; struct nvme_controller *ctrlr; struct nvme_pt_command *pt; @@ -54,27 +53,6 @@ nvme_ns_ioctl(struct cdev *cdev, u_long ctrlr = ns->ctrlr; switch (cmd) { - case NVME_IDENTIFY_NAMESPACE: -#ifdef CHATHAM2 - /* - * Don't refresh data on Chatham, since Chatham returns - * garbage on IDENTIFY anyways. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) { - memcpy(arg, &ns->data, sizeof(ns->data)); - break; - } -#endif - /* Refresh data before returning to user. */ - status.done = FALSE; - nvme_ctrlr_cmd_identify_namespace(ctrlr, ns->id, &ns->data, - nvme_completion_poll_cb, &status); - while (status.done == FALSE) - DELAY(5); - if (nvme_completion_is_error(&status.cpl)) - return (ENXIO); - memcpy(arg, &ns->data, sizeof(ns->data)); - break; case NVME_IO_TEST: case NVME_BIO_TEST: nvme_ns_test(ns, cmd, arg); From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 17:57:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0AD82813; Fri, 12 Apr 2013 17:57:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ED4F714EE; Fri, 12 Apr 2013 17:57:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHvkuL096120; Fri, 12 Apr 2013 17:57:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHvfE6096091; Fri, 12 Apr 2013 17:57:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304121757.r3CHvfE6096091@svn.freebsd.org> From: Dimitry Andric Date: Fri, 12 Apr 2013 17:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249423 - in head: . contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llvm/include/llvm/An... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:57:47 -0000 Author: dim Date: Fri Apr 12 17:57:40 2013 New Revision: 249423 URL: http://svnweb.freebsd.org/changeset/base/249423 Log: Upgrade our copy of llvm/clang to trunk r178860, in preparation of the upcoming 3.3 release (branching and freezing expected in a few weeks). Preliminary release notes can be found at the usual location: An MFC is planned once the actual 3.3 release is finished. Added: head/contrib/llvm/include/llvm/ADT/None.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/ADT/None.h head/contrib/llvm/include/llvm/ADT/SparseMultiSet.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/ADT/SparseMultiSet.h head/contrib/llvm/include/llvm/Analysis/CallGraphSCCPass.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Analysis/CallGraphSCCPass.h head/contrib/llvm/include/llvm/Analysis/CallPrinter.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Analysis/CallPrinter.h head/contrib/llvm/include/llvm/Analysis/PtrUseVisitor.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Analysis/PtrUseVisitor.h head/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h head/contrib/llvm/include/llvm/CodeGen/DAGCombine.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/CodeGen/DAGCombine.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalUnion.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalUnion.h head/contrib/llvm/include/llvm/CodeGen/LiveRegMatrix.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/CodeGen/LiveRegMatrix.h head/contrib/llvm/include/llvm/CodeGen/MachineTraceMetrics.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/CodeGen/MachineTraceMetrics.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDFS.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/CodeGen/ScheduleDFS.h head/contrib/llvm/include/llvm/CodeGen/VirtRegMap.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/CodeGen/VirtRegMap.h head/contrib/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/ExecutionEngine/SectionMemoryManager.h head/contrib/llvm/include/llvm/IR/ - copied from r249262, vendor/llvm/dist/include/llvm/IR/ head/contrib/llvm/include/llvm/IRReader/ - copied from r249262, vendor/llvm/dist/include/llvm/IRReader/ head/contrib/llvm/include/llvm/InstVisitor.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/InstVisitor.h head/contrib/llvm/include/llvm/LinkAllIR.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/LinkAllIR.h head/contrib/llvm/include/llvm/MC/MCELF.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/MC/MCELF.h head/contrib/llvm/include/llvm/MC/MCELFStreamer.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/MC/MCELFStreamer.h head/contrib/llvm/include/llvm/MC/MCInstBuilder.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/MC/MCInstBuilder.h head/contrib/llvm/include/llvm/Option/ - copied from r249262, vendor/llvm/dist/include/llvm/Option/ head/contrib/llvm/include/llvm/Support/ArrayRecycler.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Support/ArrayRecycler.h head/contrib/llvm/include/llvm/Support/ConvertUTF.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Support/ConvertUTF.h head/contrib/llvm/include/llvm/Support/ErrorOr.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Support/ErrorOr.h head/contrib/llvm/include/llvm/Support/Watchdog.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Support/Watchdog.h head/contrib/llvm/include/llvm/Support/YAMLTraits.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Support/YAMLTraits.h head/contrib/llvm/include/llvm/Target/CostTable.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Target/CostTable.h head/contrib/llvm/include/llvm/Transforms/ObjCARC.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Transforms/ObjCARC.h head/contrib/llvm/include/llvm/Transforms/Utils/BlackList.h - copied unchanged from r249262, vendor/llvm/dist/include/llvm/Transforms/Utils/BlackList.h head/contrib/llvm/lib/Analysis/IPA/CallPrinter.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Analysis/IPA/CallPrinter.cpp head/contrib/llvm/lib/Analysis/IPA/InlineCost.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp head/contrib/llvm/lib/Analysis/PtrUseVisitor.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Analysis/PtrUseVisitor.cpp head/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp head/contrib/llvm/lib/Bitcode/Reader/BitstreamReader.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Bitcode/Reader/BitstreamReader.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp head/contrib/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/CodeGen/BasicTargetTransformInfo.cpp head/contrib/llvm/lib/CodeGen/ErlangGC.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/CodeGen/ErlangGC.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/CodeGen/TargetInstrInfo.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/CodeGen/TargetRegisterInfo.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugFrame.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/DebugInfo/DWARFDebugFrame.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugFrame.h - copied unchanged from r249262, vendor/llvm/dist/lib/DebugInfo/DWARFDebugFrame.h head/contrib/llvm/lib/DebugInfo/DWARFRelocMap.h - copied unchanged from r249262, vendor/llvm/dist/lib/DebugInfo/DWARFRelocMap.h head/contrib/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp head/contrib/llvm/lib/IR/ - copied from r249262, vendor/llvm/dist/lib/IR/ head/contrib/llvm/lib/IRReader/ - copied from r249262, vendor/llvm/dist/lib/IRReader/ head/contrib/llvm/lib/Option/ - copied from r249262, vendor/llvm/dist/lib/Option/ head/contrib/llvm/lib/Support/ConvertUTF.c - copied unchanged from r249262, vendor/llvm/dist/lib/Support/ConvertUTF.c head/contrib/llvm/lib/Support/ConvertUTFWrapper.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Support/ConvertUTFWrapper.cpp head/contrib/llvm/lib/Support/Unix/Watchdog.inc - copied unchanged from r249262, vendor/llvm/dist/lib/Support/Unix/Watchdog.inc head/contrib/llvm/lib/Support/Watchdog.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Support/Watchdog.cpp head/contrib/llvm/lib/Support/Windows/Watchdog.inc - copied unchanged from r249262, vendor/llvm/dist/lib/Support/Windows/Watchdog.inc head/contrib/llvm/lib/Support/YAMLTraits.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Support/YAMLTraits.cpp head/contrib/llvm/lib/Target/AArch64/ - copied from r249262, vendor/llvm/dist/lib/Target/AArch64/ head/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/ARM/A15SDOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/ARM/ARMTargetTransformInfo.cpp head/contrib/llvm/lib/Target/ARM/LICENSE.TXT - copied unchanged from r249262, vendor/llvm/dist/lib/Target/ARM/LICENSE.TXT head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOp.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMUnwindOp.h head/contrib/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Hexagon/HexagonFixupHwLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonOperands.td - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Hexagon/HexagonOperands.td head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsReginfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsReginfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsReginfo.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsReginfo.h head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/Mips16ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/Mips16ISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MipsConstantIslandPass.cpp head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.h head/contrib/llvm/lib/Target/NVPTX/NVVMReflect.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/NVPTX/NVVMReflect.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.cpp head/contrib/llvm/lib/Target/R600/ - copied from r249262, vendor/llvm/dist/lib/Target/R600/ head/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td - copied unchanged from r249262, vendor/llvm/dist/lib/Target/Sparc/SparcInstr64Bit.td head/contrib/llvm/lib/Target/X86/X86PadShortFunction.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/X86/X86PadShortFunction.cpp head/contrib/llvm/lib/Target/X86/X86SchedHaswell.td - copied unchanged from r249262, vendor/llvm/dist/lib/Target/X86/X86SchedHaswell.td head/contrib/llvm/lib/Target/X86/X86SchedSandyBridge.td - copied unchanged from r249262, vendor/llvm/dist/lib/Target/X86/X86SchedSandyBridge.td head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp head/contrib/llvm/lib/Target/XCore/Disassembler/ - copied from r249262, vendor/llvm/dist/lib/Target/XCore/Disassembler/ head/contrib/llvm/lib/Target/XCore/InstPrinter/ - copied from r249262, vendor/llvm/dist/lib/Target/XCore/InstPrinter/ head/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Target/XCore/XCoreMCInstLower.cpp head/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.h - copied unchanged from r249262, vendor/llvm/dist/lib/Target/XCore/XCoreMCInstLower.h head/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp - copied unchanged from r249262, vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ - copied from r249262, vendor/llvm/dist/lib/Transforms/ObjCARC/ head/contrib/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h - copied unchanged from r249267, vendor/clang/dist/include/clang/AST/ASTTypeTraits.h head/contrib/llvm/tools/clang/include/clang/AST/ASTUnresolvedSet.h - copied unchanged from r249267, vendor/clang/dist/include/clang/AST/ASTUnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/AST/AttrIterator.h - copied unchanged from r249267, vendor/clang/dist/include/clang/AST/AttrIterator.h head/contrib/llvm/tools/clang/include/clang/AST/CommentHTMLNamedCharacterReferences.td - copied unchanged from r249267, vendor/clang/dist/include/clang/AST/CommentHTMLNamedCharacterReferences.td head/contrib/llvm/tools/clang/include/clang/AST/DeclOpenMP.h - copied unchanged from r249267, vendor/clang/dist/include/clang/AST/DeclOpenMP.h head/contrib/llvm/tools/clang/include/clang/Basic/CharInfo.h - copied unchanged from r249267, vendor/clang/dist/include/clang/Basic/CharInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/CommentOptions.h - copied unchanged from r249267, vendor/clang/dist/include/clang/Basic/CommentOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def - copied unchanged from r249267, vendor/clang/dist/include/clang/Basic/OpenMPKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h - copied unchanged from r249267, vendor/clang/dist/include/clang/Basic/OpenMPKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/OperatorPrecedence.h - copied unchanged from r249267, vendor/clang/dist/include/clang/Basic/OperatorPrecedence.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetCXXABI.h - copied unchanged from r249267, vendor/clang/dist/include/clang/Basic/TargetCXXABI.h head/contrib/llvm/tools/clang/include/clang/Format/ - copied from r249267, vendor/clang/dist/include/clang/Format/ head/contrib/llvm/tools/clang/include/clang/Lex/PPConditionalDirectiveRecord.h - copied unchanged from r249267, vendor/clang/dist/include/clang/Lex/PPConditionalDirectiveRecord.h head/contrib/llvm/tools/clang/include/clang/Serialization/GlobalModuleIndex.h - copied unchanged from r249267, vendor/clang/dist/include/clang/Serialization/GlobalModuleIndex.h head/contrib/llvm/tools/clang/lib/ARCMigrate/TransProtectedScope.cpp - copied unchanged from r249267, vendor/clang/dist/lib/ARCMigrate/TransProtectedScope.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp - copied unchanged from r249267, vendor/clang/dist/lib/AST/ASTDumper.cpp head/contrib/llvm/tools/clang/lib/AST/DeclOpenMP.cpp - copied unchanged from r249267, vendor/clang/dist/lib/AST/DeclOpenMP.cpp head/contrib/llvm/tools/clang/lib/Basic/CharInfo.cpp - copied unchanged from r249267, vendor/clang/dist/lib/Basic/CharInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp - copied unchanged from r249267, vendor/clang/dist/lib/Basic/OpenMPKinds.cpp head/contrib/llvm/tools/clang/lib/Basic/OperatorPrecedence.cpp - copied unchanged from r249267, vendor/clang/dist/lib/Basic/OperatorPrecedence.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp - copied unchanged from r249267, vendor/clang/dist/lib/CodeGen/CGAtomic.cpp head/contrib/llvm/tools/clang/lib/Format/ - copied from r249267, vendor/clang/dist/lib/Format/ head/contrib/llvm/tools/clang/lib/Headers/prfchwintrin.h - copied unchanged from r249267, vendor/clang/dist/lib/Headers/prfchwintrin.h head/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h - copied unchanged from r249267, vendor/clang/dist/lib/Headers/rdseedintrin.h head/contrib/llvm/tools/clang/lib/Headers/stdnoreturn.h - copied unchanged from r249267, vendor/clang/dist/lib/Headers/stdnoreturn.h head/contrib/llvm/tools/clang/lib/Lex/PPConditionalDirectiveRecord.cpp - copied unchanged from r249267, vendor/clang/dist/lib/Lex/PPConditionalDirectiveRecord.cpp head/contrib/llvm/tools/clang/lib/Lex/UnicodeCharSets.h - copied unchanged from r249267, vendor/clang/dist/lib/Lex/UnicodeCharSets.h head/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp - copied unchanged from r249267, vendor/clang/dist/lib/Parse/ParseOpenMP.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp - copied unchanged from r249267, vendor/clang/dist/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp - copied unchanged from r249267, vendor/clang/dist/lib/Serialization/GlobalModuleIndex.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp - copied unchanged from r249267, vendor/clang/dist/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp - copied unchanged from r249267, vendor/clang/dist/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp head/contrib/llvm/tools/llvm-objdump/COFFDump.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-objdump/COFFDump.cpp head/contrib/llvm/tools/llvm-objdump/ELFDump.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-objdump/ELFDump.cpp head/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp head/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/ELFDumper.cpp head/contrib/llvm/tools/llvm-readobj/Error.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/Error.cpp head/contrib/llvm/tools/llvm-readobj/Error.h - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/Error.h head/contrib/llvm/tools/llvm-readobj/MachODumper.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/MachODumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/ObjDumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.h - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/ObjDumper.h head/contrib/llvm/tools/llvm-readobj/StreamWriter.cpp - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/StreamWriter.cpp head/contrib/llvm/tools/llvm-readobj/StreamWriter.h - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/StreamWriter.h head/contrib/llvm/tools/llvm-readobj/llvm-readobj.h - copied unchanged from r249262, vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.h head/contrib/llvm/tools/llvm-symbolizer/ - copied from r249262, vendor/llvm/dist/tools/llvm-symbolizer/ head/contrib/llvm/utils/TableGen/CTagsEmitter.cpp - copied unchanged from r249262, vendor/llvm/dist/utils/TableGen/CTagsEmitter.cpp head/contrib/llvm/utils/TableGen/OptParserEmitter.cpp - copied unchanged from r249262, vendor/llvm/dist/utils/TableGen/OptParserEmitter.cpp head/lib/clang/include/clang/AST/AttrDump.inc (contents, props changed) head/lib/clang/include/clang/AST/CommentCommandList.inc (contents, props changed) head/lib/clang/include/clang/AST/CommentHTMLNamedCharacterReferences.inc (contents, props changed) head/lib/clang/include/clang/Sema/AttrSpellingListIndex.inc (contents, props changed) head/lib/clang/include/llvm/IR/ head/lib/clang/include/llvm/IR/Intrinsics.gen (contents, props changed) head/lib/clang/libllvmirreader/ head/lib/clang/libllvmirreader/Makefile (contents, props changed) head/lib/clang/libllvmobjcarcopts/ head/lib/clang/libllvmobjcarcopts/Makefile (contents, props changed) Deleted: head/contrib/llvm/include/llvm-c/EnhancedDisassembly.h head/contrib/llvm/include/llvm/AddressingMode.h head/contrib/llvm/include/llvm/Argument.h head/contrib/llvm/include/llvm/Attributes.h head/contrib/llvm/include/llvm/BasicBlock.h head/contrib/llvm/include/llvm/CallGraphSCCPass.h head/contrib/llvm/include/llvm/CallingConv.h head/contrib/llvm/include/llvm/CodeGen/MachineLoopRanges.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGILP.h head/contrib/llvm/include/llvm/Constant.h head/contrib/llvm/include/llvm/Constants.h head/contrib/llvm/include/llvm/DataLayout.h head/contrib/llvm/include/llvm/DefaultPasses.h head/contrib/llvm/include/llvm/DerivedTypes.h head/contrib/llvm/include/llvm/Function.h head/contrib/llvm/include/llvm/GlobalAlias.h head/contrib/llvm/include/llvm/GlobalValue.h head/contrib/llvm/include/llvm/GlobalVariable.h head/contrib/llvm/include/llvm/IR/CMakeLists.txt head/contrib/llvm/include/llvm/IRBuilder.h head/contrib/llvm/include/llvm/InlineAsm.h head/contrib/llvm/include/llvm/InstrTypes.h head/contrib/llvm/include/llvm/Instruction.def head/contrib/llvm/include/llvm/Instruction.h head/contrib/llvm/include/llvm/Instructions.h head/contrib/llvm/include/llvm/IntrinsicInst.h head/contrib/llvm/include/llvm/Intrinsics.h head/contrib/llvm/include/llvm/Intrinsics.td head/contrib/llvm/include/llvm/IntrinsicsARM.td head/contrib/llvm/include/llvm/IntrinsicsCellSPU.td head/contrib/llvm/include/llvm/IntrinsicsHexagon.td head/contrib/llvm/include/llvm/IntrinsicsMips.td head/contrib/llvm/include/llvm/IntrinsicsNVVM.td head/contrib/llvm/include/llvm/IntrinsicsPowerPC.td head/contrib/llvm/include/llvm/IntrinsicsX86.td head/contrib/llvm/include/llvm/IntrinsicsXCore.td head/contrib/llvm/include/llvm/LLVMContext.h head/contrib/llvm/include/llvm/LinkAllVMCore.h head/contrib/llvm/include/llvm/MC/EDInstInfo.h head/contrib/llvm/include/llvm/MC/MCTargetAsmLexer.h head/contrib/llvm/include/llvm/MDBuilder.h head/contrib/llvm/include/llvm/Metadata.h head/contrib/llvm/include/llvm/Module.h head/contrib/llvm/include/llvm/OperandTraits.h head/contrib/llvm/include/llvm/Operator.h head/contrib/llvm/include/llvm/Support/IRReader.h head/contrib/llvm/include/llvm/Support/InstVisitor.h head/contrib/llvm/include/llvm/SymbolTableListTraits.h head/contrib/llvm/include/llvm/Target/TargetTransformImpl.h head/contrib/llvm/include/llvm/TargetTransformInfo.h head/contrib/llvm/include/llvm/Transforms/Utils/AddrModeMatcher.h head/contrib/llvm/include/llvm/Type.h head/contrib/llvm/include/llvm/TypeBuilder.h head/contrib/llvm/include/llvm/TypeFinder.h head/contrib/llvm/include/llvm/Use.h head/contrib/llvm/include/llvm/User.h head/contrib/llvm/include/llvm/Value.h head/contrib/llvm/include/llvm/ValueSymbolTable.h head/contrib/llvm/lib/Analysis/DbgInfoPrinter.cpp head/contrib/llvm/lib/Analysis/InlineCost.cpp head/contrib/llvm/lib/CodeGen/CodePlacementOpt.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.h head/contrib/llvm/lib/CodeGen/LiveRegMatrix.h head/contrib/llvm/lib/CodeGen/MachineLoopRanges.cpp head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.h head/contrib/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.h head/contrib/llvm/lib/IR/CMakeLists.txt head/contrib/llvm/lib/IR/LLVMBuild.txt head/contrib/llvm/lib/IR/Makefile head/contrib/llvm/lib/IRReader/CMakeLists.txt head/contrib/llvm/lib/IRReader/LLVMBuild.txt head/contrib/llvm/lib/IRReader/Makefile head/contrib/llvm/lib/Linker/LinkArchives.cpp head/contrib/llvm/lib/Linker/LinkItems.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.h head/contrib/llvm/lib/MC/MCDisassembler/EDInfo.h head/contrib/llvm/lib/MC/MCDisassembler/EDInst.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDInst.h head/contrib/llvm/lib/MC/MCDisassembler/EDMain.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDOperand.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDOperand.h head/contrib/llvm/lib/MC/MCDisassembler/EDToken.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDToken.h head/contrib/llvm/lib/MC/MCELF.h head/contrib/llvm/lib/MC/MCTargetAsmLexer.cpp head/contrib/llvm/lib/Option/CMakeLists.txt head/contrib/llvm/lib/Option/LLVMBuild.txt head/contrib/llvm/lib/Option/Makefile head/contrib/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt head/contrib/llvm/lib/Target/AArch64/AsmParser/LLVMBuild.txt head/contrib/llvm/lib/Target/AArch64/AsmParser/Makefile head/contrib/llvm/lib/Target/AArch64/CMakeLists.txt head/contrib/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt head/contrib/llvm/lib/Target/AArch64/Disassembler/LLVMBuild.txt head/contrib/llvm/lib/Target/AArch64/Disassembler/Makefile head/contrib/llvm/lib/Target/AArch64/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/AArch64/InstPrinter/LLVMBuild.txt head/contrib/llvm/lib/Target/AArch64/InstPrinter/Makefile head/contrib/llvm/lib/Target/AArch64/LLVMBuild.txt head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/AArch64/Makefile head/contrib/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/AArch64/TargetInfo/LLVMBuild.txt head/contrib/llvm/lib/Target/AArch64/TargetInfo/Makefile head/contrib/llvm/lib/Target/AArch64/Utils/CMakeLists.txt head/contrib/llvm/lib/Target/AArch64/Utils/LLVMBuild.txt head/contrib/llvm/lib/Target/AArch64/Utils/Makefile head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp head/contrib/llvm/lib/Target/CellSPU/ head/contrib/llvm/lib/Target/Hexagon/HexagonImmediates.td head/contrib/llvm/lib/Target/Hexagon/HexagonMCInst.h head/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp head/contrib/llvm/lib/Target/NVPTX/InstPrinter/Makefile head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/NVPTX/Makefile head/contrib/llvm/lib/Target/NVPTX/TargetInfo/Makefile head/contrib/llvm/lib/Target/NVPTX/VectorElementize.cpp head/contrib/llvm/lib/Target/NVPTX/gen-register-defs.py head/contrib/llvm/lib/Target/PTX/ head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h head/contrib/llvm/lib/Target/R600/CMakeLists.txt head/contrib/llvm/lib/Target/R600/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/R600/InstPrinter/LLVMBuild.txt head/contrib/llvm/lib/Target/R600/InstPrinter/Makefile head/contrib/llvm/lib/Target/R600/LLVMBuild.txt head/contrib/llvm/lib/Target/R600/MCTargetDesc/CMakeLists.txt head/contrib/llvm/lib/Target/R600/MCTargetDesc/LLVMBuild.txt head/contrib/llvm/lib/Target/R600/MCTargetDesc/Makefile head/contrib/llvm/lib/Target/R600/Makefile head/contrib/llvm/lib/Target/R600/TargetInfo/CMakeLists.txt head/contrib/llvm/lib/Target/R600/TargetInfo/LLVMBuild.txt head/contrib/llvm/lib/Target/R600/TargetInfo/Makefile head/contrib/llvm/lib/Target/TargetInstrInfo.cpp head/contrib/llvm/lib/Target/TargetRegisterInfo.cpp head/contrib/llvm/lib/Target/TargetTransformImpl.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmLexer.cpp head/contrib/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt head/contrib/llvm/lib/Target/XCore/Disassembler/LLVMBuild.txt head/contrib/llvm/lib/Target/XCore/Disassembler/Makefile head/contrib/llvm/lib/Target/XCore/InstPrinter/CMakeLists.txt head/contrib/llvm/lib/Target/XCore/InstPrinter/LLVMBuild.txt head/contrib/llvm/lib/Target/XCore/InstPrinter/Makefile head/contrib/llvm/lib/Transforms/Instrumentation/BlackList.h head/contrib/llvm/lib/Transforms/ObjCARC/CMakeLists.txt head/contrib/llvm/lib/Transforms/ObjCARC/LLVMBuild.txt head/contrib/llvm/lib/Transforms/ObjCARC/Makefile head/contrib/llvm/lib/Transforms/Scalar/ObjCARC.cpp head/contrib/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp head/contrib/llvm/lib/VMCore/ head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTTypeTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/ConvertUTF.h head/contrib/llvm/tools/clang/include/clang/Lex/PPMutationListener.h head/contrib/llvm/tools/clang/lib/AST/CommentDumper.cpp head/contrib/llvm/tools/clang/lib/AST/StmtDumper.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Makefile head/contrib/llvm/tools/clang/lib/Basic/ConvertUTF.c head/contrib/llvm/tools/clang/lib/Basic/ConvertUTFWrapper.cpp head/contrib/llvm/tools/clang/lib/Format/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Format/Makefile head/contrib/llvm/tools/clang/lib/Rewrite/Core/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Rewrite/Core/Makefile head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/Makefile head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp head/contrib/llvm/tools/llvm-symbolizer/CMakeLists.txt head/contrib/llvm/tools/llvm-symbolizer/Makefile head/contrib/llvm/utils/TableGen/EDEmitter.cpp head/lib/clang/include/ARMGenEDInfo.inc head/lib/clang/include/MipsGenEDInfo.inc head/lib/clang/include/X86GenEDInfo.inc head/lib/clang/include/llvm/Intrinsics.gen Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/contrib/llvm/LICENSE.TXT head/contrib/llvm/include/llvm-c/Core.h head/contrib/llvm/include/llvm-c/Disassembler.h head/contrib/llvm/include/llvm-c/Initialization.h head/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h head/contrib/llvm/include/llvm-c/TargetMachine.h head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/APFloat.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/APSInt.h head/contrib/llvm/include/llvm/ADT/ArrayRef.h head/contrib/llvm/include/llvm/ADT/BitVector.h head/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h head/contrib/llvm/include/llvm/ADT/DeltaAlgorithm.h head/contrib/llvm/include/llvm/ADT/DenseMap.h head/contrib/llvm/include/llvm/ADT/DenseSet.h head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h head/contrib/llvm/include/llvm/ADT/FoldingSet.h head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h head/contrib/llvm/include/llvm/ADT/ImmutableList.h head/contrib/llvm/include/llvm/ADT/ImmutableMap.h head/contrib/llvm/include/llvm/ADT/ImmutableSet.h head/contrib/llvm/include/llvm/ADT/IntervalMap.h head/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h head/contrib/llvm/include/llvm/ADT/MapVector.h head/contrib/llvm/include/llvm/ADT/NullablePtr.h head/contrib/llvm/include/llvm/ADT/Optional.h head/contrib/llvm/include/llvm/ADT/OwningPtr.h head/contrib/llvm/include/llvm/ADT/PointerIntPair.h head/contrib/llvm/include/llvm/ADT/PointerUnion.h head/contrib/llvm/include/llvm/ADT/PostOrderIterator.h head/contrib/llvm/include/llvm/ADT/PriorityQueue.h head/contrib/llvm/include/llvm/ADT/SCCIterator.h head/contrib/llvm/include/llvm/ADT/STLExtras.h head/contrib/llvm/include/llvm/ADT/SmallBitVector.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/SmallSet.h head/contrib/llvm/include/llvm/ADT/SmallString.h head/contrib/llvm/include/llvm/ADT/SmallVector.h head/contrib/llvm/include/llvm/ADT/SparseSet.h head/contrib/llvm/include/llvm/ADT/Statistic.h head/contrib/llvm/include/llvm/ADT/StringExtras.h head/contrib/llvm/include/llvm/ADT/StringMap.h head/contrib/llvm/include/llvm/ADT/StringRef.h head/contrib/llvm/include/llvm/ADT/StringSet.h head/contrib/llvm/include/llvm/ADT/TinyPtrVector.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/ValueMap.h head/contrib/llvm/include/llvm/ADT/VariadicFunction.h head/contrib/llvm/include/llvm/ADT/ilist.h head/contrib/llvm/include/llvm/ADT/ilist_node.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyImpl.h head/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h head/contrib/llvm/include/llvm/Analysis/CFGPrinter.h head/contrib/llvm/include/llvm/Analysis/CallGraph.h head/contrib/llvm/include/llvm/Analysis/CaptureTracking.h head/contrib/llvm/include/llvm/Analysis/CodeMetrics.h head/contrib/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h head/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/DominatorInternals.h head/contrib/llvm/include/llvm/Analysis/Dominators.h head/contrib/llvm/include/llvm/Analysis/IVUsers.h head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h head/contrib/llvm/include/llvm/Analysis/Interval.h head/contrib/llvm/include/llvm/Analysis/IntervalIterator.h head/contrib/llvm/include/llvm/Analysis/IntervalPartition.h head/contrib/llvm/include/llvm/Analysis/LibCallAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/Loads.h head/contrib/llvm/include/llvm/Analysis/LoopInfo.h head/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h head/contrib/llvm/include/llvm/Analysis/LoopIterator.h head/contrib/llvm/include/llvm/Analysis/LoopPass.h head/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h head/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/PHITransAddr.h head/contrib/llvm/include/llvm/Analysis/Passes.h head/contrib/llvm/include/llvm/Analysis/PathNumbering.h head/contrib/llvm/include/llvm/Analysis/PathProfileInfo.h head/contrib/llvm/include/llvm/Analysis/PostDominators.h head/contrib/llvm/include/llvm/Analysis/ProfileDataLoader.h head/contrib/llvm/include/llvm/Analysis/ProfileInfo.h head/contrib/llvm/include/llvm/Analysis/ProfileInfoLoader.h head/contrib/llvm/include/llvm/Analysis/RegionInfo.h head/contrib/llvm/include/llvm/Analysis/RegionIterator.h head/contrib/llvm/include/llvm/Analysis/RegionPass.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionNormalization.h head/contrib/llvm/include/llvm/Analysis/SparsePropagation.h head/contrib/llvm/include/llvm/Analysis/Trace.h head/contrib/llvm/include/llvm/Analysis/ValueTracking.h head/contrib/llvm/include/llvm/Assembly/PrintModulePass.h head/contrib/llvm/include/llvm/Bitcode/Archive.h head/contrib/llvm/include/llvm/Bitcode/BitCodes.h head/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h head/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h head/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h head/contrib/llvm/include/llvm/Bitcode/ReaderWriter.h head/contrib/llvm/include/llvm/CodeGen/Analysis.h head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/CodeGen/CommandFlags.h head/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/GCMetadata.h head/contrib/llvm/include/llvm/CodeGen/GCs.h head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/IntrinsicLowering.h head/contrib/llvm/include/llvm/CodeGen/JITCodeEmitter.h head/contrib/llvm/include/llvm/CodeGen/LatencyPriorityQueue.h head/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h head/contrib/llvm/include/llvm/CodeGen/LinkAllAsmWriterComponents.h head/contrib/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h head/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h head/contrib/llvm/include/llvm/CodeGen/LiveStackAnalysis.h head/contrib/llvm/include/llvm/CodeGen/LiveVariables.h head/contrib/llvm/include/llvm/CodeGen/MachORelocation.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineCodeEmitter.h head/contrib/llvm/include/llvm/CodeGen/MachineCodeInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineFunction.h head/contrib/llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h head/contrib/llvm/include/llvm/CodeGen/MachineFunctionPass.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBundle.h head/contrib/llvm/include/llvm/CodeGen/MachineJumpTableInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineLoopInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineOperand.h head/contrib/llvm/include/llvm/CodeGen/MachinePostDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h head/contrib/llvm/include/llvm/CodeGen/PBQP/HeuristicSolver.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Heuristics/Briggs.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Math.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Solution.h head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/PseudoSourceValue.h head/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h head/contrib/llvm/include/llvm/CodeGen/RegAllocRegistry.h head/contrib/llvm/include/llvm/CodeGen/RegisterClassInfo.h head/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h head/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h head/contrib/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/include/llvm/CodeGen/SchedulerRegistry.h head/contrib/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h head/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.td head/contrib/llvm/include/llvm/DIBuilder.h head/contrib/llvm/include/llvm/DebugInfo.h head/contrib/llvm/include/llvm/DebugInfo/DIContext.h head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/ExecutionEngine/GenericValue.h head/contrib/llvm/include/llvm/ExecutionEngine/Interpreter.h head/contrib/llvm/include/llvm/ExecutionEngine/JIT.h head/contrib/llvm/include/llvm/ExecutionEngine/JITEventListener.h head/contrib/llvm/include/llvm/ExecutionEngine/JITMemoryManager.h head/contrib/llvm/include/llvm/ExecutionEngine/MCJIT.h head/contrib/llvm/include/llvm/ExecutionEngine/OProfileWrapper.h head/contrib/llvm/include/llvm/ExecutionEngine/ObjectBuffer.h head/contrib/llvm/include/llvm/ExecutionEngine/ObjectImage.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h head/contrib/llvm/include/llvm/GVMaterializer.h head/contrib/llvm/include/llvm/InitializePasses.h head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/Linker.h head/contrib/llvm/include/llvm/MC/MCAsmBackend.h head/contrib/llvm/include/llvm/MC/MCAsmInfo.h head/contrib/llvm/include/llvm/MC/MCAsmInfoCOFF.h head/contrib/llvm/include/llvm/MC/MCAsmInfoDarwin.h head/contrib/llvm/include/llvm/MC/MCAsmLayout.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCAtom.h head/contrib/llvm/include/llvm/MC/MCCodeEmitter.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDisassembler.h head/contrib/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h head/contrib/llvm/include/llvm/MC/MCExpr.h head/contrib/llvm/include/llvm/MC/MCFixedLenDisassembler.h head/contrib/llvm/include/llvm/MC/MCInstPrinter.h head/contrib/llvm/include/llvm/MC/MCInstrDesc.h head/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h head/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCObjectWriter.h head/contrib/llvm/include/llvm/MC/MCParser/AsmCond.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h head/contrib/llvm/include/llvm/MC/MCParser/MCParsedAsmOperand.h head/contrib/llvm/include/llvm/MC/MCRegisterInfo.h head/contrib/llvm/include/llvm/MC/MCSchedule.h head/contrib/llvm/include/llvm/MC/MCSection.h head/contrib/llvm/include/llvm/MC/MCSectionCOFF.h head/contrib/llvm/include/llvm/MC/MCSectionELF.h head/contrib/llvm/include/llvm/MC/MCSectionMachO.h head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h head/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h head/contrib/llvm/include/llvm/MC/MCValue.h head/contrib/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h head/contrib/llvm/include/llvm/MC/SubtargetFeature.h head/contrib/llvm/include/llvm/Object/Archive.h head/contrib/llvm/include/llvm/Object/Binary.h head/contrib/llvm/include/llvm/Object/ELF.h head/contrib/llvm/include/llvm/Object/MachO.h head/contrib/llvm/include/llvm/Object/MachOFormat.h head/contrib/llvm/include/llvm/Object/MachOObject.h head/contrib/llvm/include/llvm/Object/ObjectFile.h head/contrib/llvm/include/llvm/Object/RelocVisitor.h head/contrib/llvm/include/llvm/Pass.h head/contrib/llvm/include/llvm/PassAnalysisSupport.h head/contrib/llvm/include/llvm/PassManagers.h head/contrib/llvm/include/llvm/PassSupport.h head/contrib/llvm/include/llvm/Support/AlignOf.h head/contrib/llvm/include/llvm/Support/Allocator.h head/contrib/llvm/include/llvm/Support/Atomic.h head/contrib/llvm/include/llvm/Support/CFG.h head/contrib/llvm/include/llvm/Support/COFF.h head/contrib/llvm/include/llvm/Support/CallSite.h head/contrib/llvm/include/llvm/Support/Casting.h head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/Compiler.h head/contrib/llvm/include/llvm/Support/ConstantFolder.h head/contrib/llvm/include/llvm/Support/ConstantRange.h head/contrib/llvm/include/llvm/Support/DOTGraphTraits.h head/contrib/llvm/include/llvm/Support/DataExtractor.h head/contrib/llvm/include/llvm/Support/DataFlow.h head/contrib/llvm/include/llvm/Support/DataStream.h head/contrib/llvm/include/llvm/Support/DebugLoc.h head/contrib/llvm/include/llvm/Support/Dwarf.h head/contrib/llvm/include/llvm/Support/DynamicLibrary.h head/contrib/llvm/include/llvm/Support/ELF.h head/contrib/llvm/include/llvm/Support/Endian.h head/contrib/llvm/include/llvm/Support/Errno.h head/contrib/llvm/include/llvm/Support/ErrorHandling.h head/contrib/llvm/include/llvm/Support/FEnv.h head/contrib/llvm/include/llvm/Support/FileOutputBuffer.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/FormattedStream.h head/contrib/llvm/include/llvm/Support/GCOV.h head/contrib/llvm/include/llvm/Support/GetElementPtrTypeIterator.h head/contrib/llvm/include/llvm/Support/GraphWriter.h head/contrib/llvm/include/llvm/Support/Host.h head/contrib/llvm/include/llvm/Support/IncludeFile.h head/contrib/llvm/include/llvm/Support/InstIterator.h head/contrib/llvm/include/llvm/Support/IntegersSubset.h head/contrib/llvm/include/llvm/Support/IntegersSubsetMapping.h head/contrib/llvm/include/llvm/Support/LEB128.h head/contrib/llvm/include/llvm/Support/Locale.h head/contrib/llvm/include/llvm/Support/LockFileManager.h head/contrib/llvm/include/llvm/Support/MathExtras.h head/contrib/llvm/include/llvm/Support/Memory.h head/contrib/llvm/include/llvm/Support/MemoryObject.h head/contrib/llvm/include/llvm/Support/Mutex.h head/contrib/llvm/include/llvm/Support/NoFolder.h head/contrib/llvm/include/llvm/Support/PassNameParser.h head/contrib/llvm/include/llvm/Support/PathV1.h head/contrib/llvm/include/llvm/Support/PatternMatch.h head/contrib/llvm/include/llvm/Support/PredIteratorCache.h head/contrib/llvm/include/llvm/Support/Process.h head/contrib/llvm/include/llvm/Support/Program.h head/contrib/llvm/include/llvm/Support/Recycler.h head/contrib/llvm/include/llvm/Support/Regex.h head/contrib/llvm/include/llvm/Support/RegistryParser.h head/contrib/llvm/include/llvm/Support/SMLoc.h head/contrib/llvm/include/llvm/Support/SaveAndRestore.h head/contrib/llvm/include/llvm/Support/Signals.h head/contrib/llvm/include/llvm/Support/Solaris.h head/contrib/llvm/include/llvm/Support/SourceMgr.h head/contrib/llvm/include/llvm/Support/StreamableMemoryObject.h head/contrib/llvm/include/llvm/Support/StringPool.h head/contrib/llvm/include/llvm/Support/SwapByteOrder.h head/contrib/llvm/include/llvm/Support/TargetFolder.h head/contrib/llvm/include/llvm/Support/TargetRegistry.h head/contrib/llvm/include/llvm/Support/ThreadLocal.h head/contrib/llvm/include/llvm/Support/Threading.h head/contrib/llvm/include/llvm/Support/TimeValue.h head/contrib/llvm/include/llvm/Support/Timer.h head/contrib/llvm/include/llvm/Support/ToolOutputFile.h head/contrib/llvm/include/llvm/Support/Valgrind.h head/contrib/llvm/include/llvm/Support/ValueHandle.h head/contrib/llvm/include/llvm/Support/Win64EH.h head/contrib/llvm/include/llvm/Support/YAMLParser.h head/contrib/llvm/include/llvm/Support/circular_raw_ostream.h head/contrib/llvm/include/llvm/Support/raw_ostream.h head/contrib/llvm/include/llvm/Support/system_error.h head/contrib/llvm/include/llvm/Support/type_traits.h head/contrib/llvm/include/llvm/TableGen/Error.h head/contrib/llvm/include/llvm/TableGen/Record.h head/contrib/llvm/include/llvm/TableGen/StringMatcher.h head/contrib/llvm/include/llvm/Target/Mangler.h head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetFrameLowering.h head/contrib/llvm/include/llvm/Target/TargetInstrInfo.h head/contrib/llvm/include/llvm/Target/TargetJITInfo.h head/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/Target/TargetMachine.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Target/TargetSchedule.td head/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h head/contrib/llvm/include/llvm/Transforms/IPO.h head/contrib/llvm/include/llvm/Transforms/IPO/InlinerPass.h head/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h head/contrib/llvm/include/llvm/Transforms/Instrumentation.h head/contrib/llvm/include/llvm/Transforms/Scalar.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/BypassSlowDivision.h head/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h head/contrib/llvm/include/llvm/Transforms/Utils/CmpInstAnalysis.h head/contrib/llvm/include/llvm/Transforms/Utils/IntegerDivision.h head/contrib/llvm/include/llvm/Transforms/Utils/Local.h head/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h head/contrib/llvm/include/llvm/Transforms/Vectorize.h head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisCounter.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp head/contrib/llvm/lib/Analysis/AliasDebugger.cpp head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/Analysis.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp head/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp head/contrib/llvm/lib/Analysis/CFGPrinter.cpp head/contrib/llvm/lib/Analysis/CaptureTracking.cpp head/contrib/llvm/lib/Analysis/CodeMetrics.cpp head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/CostModel.cpp head/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/DominanceFrontier.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp head/contrib/llvm/lib/Analysis/IPA/FindUsedTypes.cpp head/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp head/contrib/llvm/lib/Analysis/IPA/IPA.cpp head/contrib/llvm/lib/Analysis/IVUsers.cpp head/contrib/llvm/lib/Analysis/InstCount.cpp head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/Interval.cpp head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp head/contrib/llvm/lib/Analysis/LibCallAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/LibCallSemantics.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/Loads.cpp head/contrib/llvm/lib/Analysis/LoopInfo.cpp head/contrib/llvm/lib/Analysis/MemDepPrinter.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp head/contrib/llvm/lib/Analysis/NoAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/PHITransAddr.cpp head/contrib/llvm/lib/Analysis/PathNumbering.cpp head/contrib/llvm/lib/Analysis/PathProfileInfo.cpp head/contrib/llvm/lib/Analysis/PathProfileVerifier.cpp head/contrib/llvm/lib/Analysis/PostDominators.cpp head/contrib/llvm/lib/Analysis/ProfileDataLoader.cpp head/contrib/llvm/lib/Analysis/ProfileDataLoaderPass.cpp head/contrib/llvm/lib/Analysis/ProfileEstimatorPass.cpp head/contrib/llvm/lib/Analysis/ProfileInfo.cpp head/contrib/llvm/lib/Analysis/ProfileInfoLoader.cpp head/contrib/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp head/contrib/llvm/lib/Analysis/ProfileVerifierPass.cpp head/contrib/llvm/lib/Analysis/RegionInfo.cpp head/contrib/llvm/lib/Analysis/RegionPrinter.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/SparsePropagation.cpp head/contrib/llvm/lib/Analysis/Trace.cpp head/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/Archive/Archive.cpp head/contrib/llvm/lib/Archive/ArchiveInternals.h head/contrib/llvm/lib/Archive/ArchiveReader.cpp head/contrib/llvm/lib/Archive/ArchiveWriter.cpp head/contrib/llvm/lib/AsmParser/LLLexer.cpp head/contrib/llvm/lib/AsmParser/LLLexer.h head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/AsmParser/LLParser.h head/contrib/llvm/lib/AsmParser/LLToken.h head/contrib/llvm/lib/AsmParser/Parser.cpp head/contrib/llvm/lib/Bitcode/Reader/BitReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h head/contrib/llvm/lib/Bitcode/Writer/BitWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AllocationOrder.cpp head/contrib/llvm/lib/CodeGen/AllocationOrder.h head/contrib/llvm/lib/CodeGen/Analysis.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h head/contrib/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/CallingConvLower.cpp head/contrib/llvm/lib/CodeGen/CodeGen.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp head/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp head/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp head/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp head/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp head/contrib/llvm/lib/CodeGen/ExpandISelPseudos.cpp head/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp head/contrib/llvm/lib/CodeGen/GCMetadata.cpp head/contrib/llvm/lib/CodeGen/GCStrategy.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.h head/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LexicalScopes.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.h head/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp head/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp head/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp head/contrib/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp head/contrib/llvm/lib/CodeGen/MachineFunction.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineLoopInfo.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp head/contrib/llvm/lib/CodeGen/MachineScheduler.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/OptimizePHIs.cpp head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/PHIEliminationUtils.cpp head/contrib/llvm/lib/CodeGen/Passes.cpp head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.h head/contrib/llvm/lib/CodeGen/PseudoSourceValue.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.h head/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp head/contrib/llvm/lib/CodeGen/RegAllocFast.cpp head/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp head/contrib/llvm/lib/CodeGen/RegisterPressure.cpp head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeOrdering.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp head/contrib/llvm/lib/CodeGen/ShrinkWrapping.cpp head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SlotIndexes.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.cpp head/contrib/llvm/lib/CodeGen/Spiller.cpp head/contrib/llvm/lib/CodeGen/SplitKit.cpp head/contrib/llvm/lib/CodeGen/StackColoring.cpp head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp head/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp head/contrib/llvm/lib/CodeGen/TailDuplication.cpp head/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TargetSchedule.cpp head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/UnreachableBlockElim.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.cpp head/contrib/llvm/lib/DebugInfo/DIContext.cpp head/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.cpp head/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.h head/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.cpp head/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.h head/contrib/llvm/lib/DebugInfo/DWARFContext.cpp head/contrib/llvm/lib/DebugInfo/DWARFContext.h head/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h head/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.h head/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugLine.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugLine.h head/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp head/contrib/llvm/lib/DebugInfo/DWARFFormValue.h head/contrib/llvm/lib/ExecutionEngine/EventListenerCommon.h head/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventsWrapper.h head/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.h head/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h head/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp head/contrib/llvm/lib/Linker/LinkModules.cpp head/contrib/llvm/lib/Linker/Linker.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCAsmInfo.cpp head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h head/contrib/llvm/lib/MC/MCDwarf.cpp head/contrib/llvm/lib/MC/MCELF.cpp head/contrib/llvm/lib/MC/MCELFObjectTargetWriter.cpp head/contrib/llvm/lib/MC/MCELFStreamer.cpp head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCInstPrinter.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCNullStreamer.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp head/contrib/llvm/lib/MC/MCPureStreamer.cpp head/contrib/llvm/lib/MC/MCSection.cpp head/contrib/llvm/lib/MC/MCSectionMachO.cpp head/contrib/llvm/lib/MC/MCStreamer.cpp head/contrib/llvm/lib/MC/MCSubtargetInfo.cpp head/contrib/llvm/lib/MC/MCWin64EH.cpp head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFStreamer.cpp head/contrib/llvm/lib/Object/Archive.cpp head/contrib/llvm/lib/Object/COFFObjectFile.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Object/MachOObject.cpp head/contrib/llvm/lib/Object/MachOObjectFile.cpp head/contrib/llvm/lib/Object/ObjectFile.cpp head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/Allocator.cpp head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/ConstantRange.cpp head/contrib/llvm/lib/Support/CrashRecoveryContext.cpp head/contrib/llvm/lib/Support/DataStream.cpp head/contrib/llvm/lib/Support/Debug.cpp head/contrib/llvm/lib/Support/Disassembler.cpp head/contrib/llvm/lib/Support/Dwarf.cpp head/contrib/llvm/lib/Support/DynamicLibrary.cpp head/contrib/llvm/lib/Support/ErrorHandling.cpp head/contrib/llvm/lib/Support/FileOutputBuffer.cpp head/contrib/llvm/lib/Support/FileUtilities.cpp head/contrib/llvm/lib/Support/FoldingSet.cpp head/contrib/llvm/lib/Support/GraphWriter.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Support/LocaleWindows.inc head/contrib/llvm/lib/Support/LocaleXlocale.inc head/contrib/llvm/lib/Support/LockFileManager.cpp head/contrib/llvm/lib/Support/Memory.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/Path.cpp head/contrib/llvm/lib/Support/PathV2.cpp head/contrib/llvm/lib/Support/PluginLoader.cpp head/contrib/llvm/lib/Support/PrettyStackTrace.cpp head/contrib/llvm/lib/Support/Process.cpp head/contrib/llvm/lib/Support/Program.cpp head/contrib/llvm/lib/Support/Regex.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/SourceMgr.cpp head/contrib/llvm/lib/Support/Statistic.cpp head/contrib/llvm/lib/Support/StringRef.cpp head/contrib/llvm/lib/Support/Threading.cpp head/contrib/llvm/lib/Support/TimeValue.cpp head/contrib/llvm/lib/Support/Timer.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/Unix/Memory.inc head/contrib/llvm/lib/Support/Unix/PathV2.inc head/contrib/llvm/lib/Support/Unix/Process.inc head/contrib/llvm/lib/Support/Unix/Program.inc head/contrib/llvm/lib/Support/Unix/Signals.inc head/contrib/llvm/lib/Support/Unix/TimeValue.inc head/contrib/llvm/lib/Support/Unix/Unix.h head/contrib/llvm/lib/Support/Windows/Memory.inc head/contrib/llvm/lib/Support/Windows/Path.inc head/contrib/llvm/lib/Support/Windows/PathV2.inc head/contrib/llvm/lib/Support/Windows/Process.inc head/contrib/llvm/lib/Support/Windows/Program.inc head/contrib/llvm/lib/Support/Windows/Signals.inc head/contrib/llvm/lib/Support/YAMLParser.cpp head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/Support/regcomp.c head/contrib/llvm/lib/Support/system_error.cpp head/contrib/llvm/lib/TableGen/Error.cpp head/contrib/llvm/lib/TableGen/Main.cpp head/contrib/llvm/lib/TableGen/Record.cpp head/contrib/llvm/lib/TableGen/TGLexer.cpp head/contrib/llvm/lib/TableGen/TGLexer.h head/contrib/llvm/lib/TableGen/TGParser.cpp head/contrib/llvm/lib/TableGen/TGParser.h head/contrib/llvm/lib/TableGen/TableGenBackend.cpp head/contrib/llvm/lib/Target/ARM/ARM.h head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h head/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMJITInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMJITInfo.h head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h head/contrib/llvm/lib/Target/ARM/ARMSchedule.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td head/contrib/llvm/lib/Target/ARM/ARMScheduleSwift.td head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.h head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp head/contrib/llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.h head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp head/contrib/llvm/lib/Target/CppBackend/CPPTargetMachine.h head/contrib/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp head/contrib/llvm/lib/Target/Hexagon/Hexagon.h head/contrib/llvm/lib/Target/Hexagon/Hexagon.td head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.h head/contrib/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h head/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonPeephole.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSchedule.td head/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp head/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp head/contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp head/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp head/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp head/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.h head/contrib/llvm/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeAsmPrinter.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeFrameLowering.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeFrameLowering.h head/contrib/llvm/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.h head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.td head/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeMCInstLower.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeMachineFunction.h head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.h head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.h head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp head/contrib/llvm/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp head/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp head/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp head/contrib/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp head/contrib/llvm/lib/Target/MSP430/MSP430CallingConv.td head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td head/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp head/contrib/llvm/lib/Target/MSP430/MSP430MachineFunctionInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h head/contrib/llvm/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp head/contrib/llvm/lib/Target/Mangler.cpp head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp head/contrib/llvm/lib/Target/Mips/Mips.h head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.h head/contrib/llvm/lib/Target/Mips/Mips16InstrFormats.td head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.h head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MipsCondMov.td head/contrib/llvm/lib/Target/Mips/MipsDSPInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.h head/contrib/llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp head/contrib/llvm/lib/Target/NVPTX/ManagedStringPool.h head/contrib/llvm/lib/Target/NVPTX/NVPTX.h head/contrib/llvm/lib/Target/NVPTX/NVPTX.td head/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.h head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.h head/contrib/llvm/lib/Target/NVPTX/NVPTXNumRegisters.h head/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXSection.h head/contrib/llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.h head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h head/contrib/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXUtilities.h head/contrib/llvm/lib/Target/NVPTX/NVPTXutil.cpp head/contrib/llvm/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp head/contrib/llvm/lib/Target/NVPTX/cl_common_defines.h head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h head/contrib/llvm/lib/Target/PowerPC/PPC.h head/contrib/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td head/contrib/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleG5.td head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h head/contrib/llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp head/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp head/contrib/llvm/lib/Target/Sparc/FPMover.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp head/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h head/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.td head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h head/contrib/llvm/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp head/contrib/llvm/lib/Target/Target.cpp head/contrib/llvm/lib/Target/TargetIntrinsicInfo.cpp head/contrib/llvm/lib/Target/TargetLibraryInfo.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/TargetMachineC.cpp head/contrib/llvm/lib/Target/TargetSubtargetInfo.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.h head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp head/contrib/llvm/lib/Target/X86/TargetInfo/X86TargetInfo.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86.td head/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/X86AsmPrinter.h head/contrib/llvm/lib/Target/X86/X86COFFMachineModuleInfo.h head/contrib/llvm/lib/Target/X86/X86CallingConv.td head/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.h head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86Instr3DNow.td head/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td head/contrib/llvm/lib/Target/X86/X86InstrCMovSetCC.td head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrControl.td head/contrib/llvm/lib/Target/X86/X86InstrExtension.td head/contrib/llvm/lib/Target/X86/X86InstrFMA.td head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrMMX.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86InstrTSX.td head/contrib/llvm/lib/Target/X86/X86JITInfo.cpp head/contrib/llvm/lib/Target/X86/X86JITInfo.h head/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.h head/contrib/llvm/lib/Target/X86/X86Schedule.td head/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.h head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h head/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp head/contrib/llvm/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp head/contrib/llvm/lib/Target/XCore/XCore.td head/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h head/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h head/contrib/llvm/lib/Target/XCore/XCoreInstrFormats.td head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td head/contrib/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.td head/contrib/llvm/lib/Target/XCore/XCoreSubtarget.h head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h head/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp head/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp head/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp head/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/Internalize.cpp head/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp head/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp head/contrib/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp head/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/BlackList.cpp head/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp head/contrib/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp head/contrib/llvm/lib/Transforms/Instrumentation/MaximumSpanningTree.h head/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp head/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp head/contrib/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp head/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp head/contrib/llvm/lib/Transforms/Scalar/ConstantProp.cpp head/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp head/contrib/llvm/lib/Transforms/Scalar/DCE.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/GlobalMerge.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/LowerAtomic.cpp head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/Reg2Mem.cpp head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp head/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Scalar/Sink.cpp head/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp head/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp head/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp head/contrib/llvm/lib/Transforms/Utils/CmpInstAnalysis.cpp head/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp head/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/InstructionNamer.cpp head/contrib/llvm/lib/Transforms/Utils/IntegerDivision.cpp head/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp head/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp head/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp head/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp head/contrib/llvm/lib/Transforms/Utils/Mem2Reg.cpp head/contrib/llvm/lib/Transforms/Utils/MetaRenamer.cpp head/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp head/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/Vectorize.cpp head/contrib/llvm/tools/bugpoint/BugDriver.cpp head/contrib/llvm/tools/bugpoint/BugDriver.h head/contrib/llvm/tools/bugpoint/CrashDebugger.cpp head/contrib/llvm/tools/bugpoint/ExecutionDriver.cpp head/contrib/llvm/tools/bugpoint/ExtractFunction.cpp head/contrib/llvm/tools/bugpoint/ListReducer.h head/contrib/llvm/tools/bugpoint/Miscompilation.cpp head/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.h head/contrib/llvm/tools/bugpoint/bugpoint.cpp head/contrib/llvm/tools/clang/LICENSE.TXT head/contrib/llvm/tools/clang/include/clang-c/CXCompilationDatabase.h head/contrib/llvm/tools/clang/include/clang-c/CXString.h head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h head/contrib/llvm/tools/clang/include/clang/AST/APValue.h head/contrib/llvm/tools/clang/include/clang/AST/AST.h head/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h head/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h head/contrib/llvm/tools/clang/include/clang/AST/ASTVector.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/BuiltinTypes.def head/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h head/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h head/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h head/contrib/llvm/tools/clang/include/clang/AST/Comment.h head/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h head/contrib/llvm/tools/clang/include/clang/AST/CommentCommands.td head/contrib/llvm/tools/clang/include/clang/AST/CommentLexer.h head/contrib/llvm/tools/clang/include/clang/AST/CommentParser.h head/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h head/contrib/llvm/tools/clang/include/clang/AST/CommentVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclAccessPair.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h head/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h head/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/DeclVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h head/contrib/llvm/tools/clang/include/clang/AST/DependentDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/LambdaMangleContext.h head/contrib/llvm/tools/clang/include/clang/AST/Mangle.h head/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h head/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h head/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h head/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h head/contrib/llvm/tools/clang/include/clang/AST/StmtGraphTraits.h head/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateName.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLocVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/TypeOrdering.h head/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/AST/VTTBuilder.h head/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h head/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h head/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h head/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h head/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h head/contrib/llvm/tools/clang/include/clang/Analysis/Support/BlkExprDeclBitVector.h head/contrib/llvm/tools/clang/include/clang/Analysis/Support/BumpVector.h head/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommentKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Linkage.h head/contrib/llvm/tools/clang/include/clang/Basic/MacroBuilder.h head/contrib/llvm/tools/clang/include/clang/Basic/Module.h head/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h head/contrib/llvm/tools/clang/include/clang/Basic/OnDiskHashTable.h head/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def head/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h head/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/Version.h head/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h head/contrib/llvm/tools/clang/include/clang/Basic/Visibility.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h head/contrib/llvm/tools/clang/include/clang/Driver/Arg.h head/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.td head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/Job.h head/contrib/llvm/tools/clang/include/clang/Driver/OptSpecifier.h head/contrib/llvm/tools/clang/include/clang/Driver/Option.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Phases.h head/contrib/llvm/tools/clang/include/clang/Driver/Tool.h head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Driver/Types.def head/contrib/llvm/tools/clang/include/clang/Driver/Types.h head/contrib/llvm/tools/clang/include/clang/Driver/Util.h head/contrib/llvm/tools/clang/include/clang/Edit/Commit.h head/contrib/llvm/tools/clang/include/clang/Edit/EditedSource.h head/contrib/llvm/tools/clang/include/clang/Edit/Rewriters.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedIncludesSource.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticRenderer.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandard.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def head/contrib/llvm/tools/clang/include/clang/Frontend/LayoutOverrideSource.h head/contrib/llvm/tools/clang/include/clang/Frontend/LogDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOutputOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h head/contrib/llvm/tools/clang/include/clang/Lex/ExternalPreprocessorSource.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h head/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h head/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h head/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h head/contrib/llvm/tools/clang/include/clang/Lex/Token.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/RewriteRope.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/Rewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FixItRewriter.h head/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Sema/CXXFieldCollector.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteOptions.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h head/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/Overload.h head/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaInternal.h head/contrib/llvm/tools/clang/include/clang/Sema/Template.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h head/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h head/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerOptInfo.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h head/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h head/contrib/llvm/tools/clang/include/clang/Tooling/FileMatchTrie.h head/contrib/llvm/tools/clang/include/clang/Tooling/JSONCompilationDatabase.h head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h head/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Internals.h head/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/PlistReporter.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransAPIUses.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransARCAssign.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransBlockObjCVariable.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCCalls.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransProperties.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h head/contrib/llvm/tools/clang/lib/AST/APValue.cpp head/contrib/llvm/tools/clang/lib/AST/ASTConsumer.cpp head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/AttrImpl.cpp head/contrib/llvm/tools/clang/lib/AST/CXXABI.h head/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp head/contrib/llvm/tools/clang/lib/AST/Comment.cpp head/contrib/llvm/tools/clang/lib/AST/CommentBriefParser.cpp head/contrib/llvm/tools/clang/lib/AST/CommentCommandTraits.cpp head/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp head/contrib/llvm/tools/clang/lib/AST/CommentParser.cpp head/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclFriend.cpp head/contrib/llvm/tools/clang/lib/AST/DeclGroup.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp head/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp head/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp head/contrib/llvm/tools/clang/lib/AST/InheritViz.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/LambdaMangleContext.cpp head/contrib/llvm/tools/clang/lib/AST/Mangle.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp head/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp head/contrib/llvm/tools/clang/lib/AST/RawCommentList.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp head/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.cpp head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.h head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFGStmtMap.cpp head/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp head/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatStringParsing.h head/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp head/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp head/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp head/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp head/contrib/llvm/tools/clang/lib/Basic/Module.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/TokenKinds.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuilder.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h head/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h head/contrib/llvm/tools/clang/lib/Driver/Action.cpp head/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp head/contrib/llvm/tools/clang/lib/Driver/CC1AsOptions.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/InputInfo.h head/contrib/llvm/tools/clang/lib/Driver/Job.cpp head/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp head/contrib/llvm/tools/clang/lib/Driver/Option.cpp head/contrib/llvm/tools/clang/lib/Driver/Phases.cpp head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.h head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.h head/contrib/llvm/tools/clang/lib/Driver/Types.cpp head/contrib/llvm/tools/clang/lib/Driver/WindowsToolChain.cpp head/contrib/llvm/tools/clang/lib/Edit/Commit.cpp head/contrib/llvm/tools/clang/lib/Edit/EditedSource.cpp head/contrib/llvm/tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp head/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp head/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/LayoutOverrideSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/Warnings.cpp head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/altivec.h head/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h head/contrib/llvm/tools/clang/lib/Headers/avxintrin.h head/contrib/llvm/tools/clang/lib/Headers/cpuid.h head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h head/contrib/llvm/tools/clang/lib/Headers/immintrin.h head/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h head/contrib/llvm/tools/clang/lib/Headers/mm_malloc.h head/contrib/llvm/tools/clang/lib/Headers/module.map head/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/smmintrin.h head/contrib/llvm/tools/clang/lib/Headers/stdalign.h head/contrib/llvm/tools/clang/lib/Headers/stddef.h head/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/unwind.h head/contrib/llvm/tools/clang/lib/Headers/x86intrin.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.h head/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp head/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp head/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp head/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp head/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.h head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h head/contrib/llvm/tools/clang/lib/Rewrite/Core/DeltaTree.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Core/HTMLRewrite.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Core/Rewriter.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Core/TokenRewriter.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/FixItRewriter.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteMacros.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp head/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp head/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.h head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp head/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/APSIntType.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp head/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/FileMatchTrie.cpp head/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp head/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/OptParserEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp head/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h head/contrib/llvm/tools/llc/llc.cpp head/contrib/llvm/tools/lli/RecordingMemoryManager.cpp head/contrib/llvm/tools/lli/RecordingMemoryManager.h head/contrib/llvm/tools/lli/RemoteTarget.h head/contrib/llvm/tools/lli/lli.cpp head/contrib/llvm/tools/llvm-ar/llvm-ar.cpp head/contrib/llvm/tools/llvm-as/llvm-as.cpp head/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp head/contrib/llvm/tools/llvm-diff/DiffConsumer.cpp head/contrib/llvm/tools/llvm-diff/DiffConsumer.h head/contrib/llvm/tools/llvm-diff/DiffLog.cpp head/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp head/contrib/llvm/tools/llvm-diff/DifferenceEngine.h head/contrib/llvm/tools/llvm-diff/llvm-diff.cpp head/contrib/llvm/tools/llvm-dis/llvm-dis.cpp head/contrib/llvm/tools/llvm-extract/llvm-extract.cpp head/contrib/llvm/tools/llvm-link/llvm-link.cpp head/contrib/llvm/tools/llvm-mc/Disassembler.cpp head/contrib/llvm/tools/llvm-mc/Disassembler.h head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp head/contrib/llvm/tools/llvm-nm/llvm-nm.cpp head/contrib/llvm/tools/llvm-objdump/MachODump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.h head/contrib/llvm/tools/llvm-prof/llvm-prof.cpp head/contrib/llvm/tools/llvm-ranlib/llvm-ranlib.cpp head/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp head/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp head/contrib/llvm/tools/llvm-stress/llvm-stress.cpp head/contrib/llvm/tools/macho-dump/macho-dump.cpp head/contrib/llvm/tools/opt/AnalysisWrappers.cpp head/contrib/llvm/tools/opt/GraphPrinters.cpp head/contrib/llvm/tools/opt/PrintSCC.cpp head/contrib/llvm/tools/opt/opt.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.h head/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h head/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.h head/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp head/contrib/llvm/utils/TableGen/CodeGenSchedule.h head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.h head/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcher.h head/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp head/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.cpp head/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp head/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h head/contrib/llvm/utils/TableGen/SetTheory.cpp head/contrib/llvm/utils/TableGen/SetTheory.h head/contrib/llvm/utils/TableGen/StringToOffsetTable.h head/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp head/contrib/llvm/utils/TableGen/TableGen.cpp head/contrib/llvm/utils/TableGen/TableGenBackends.h head/contrib/llvm/utils/TableGen/X86DisassemblerShared.h head/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerTables.h head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.h head/etc/mtree/BSD.include.dist head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/libclanganalysis/Makefile head/lib/clang/libclangarcmigrate/Makefile head/lib/clang/libclangast/Makefile head/lib/clang/libclangbasic/Makefile head/lib/clang/libclangcodegen/Makefile head/lib/clang/libclangedit/Makefile head/lib/clang/libclangfrontend/Makefile head/lib/clang/libclanglex/Makefile head/lib/clang/libclangparse/Makefile head/lib/clang/libclangrewritefrontend/Makefile head/lib/clang/libclangsema/Makefile head/lib/clang/libclangserialization/Makefile head/lib/clang/libclangstaticanalyzercheckers/Makefile head/lib/clang/libclangstaticanalyzercore/Makefile head/lib/clang/libclangstaticanalyzerfrontend/Makefile head/lib/clang/libllvmanalysis/Makefile head/lib/clang/libllvmarmasmparser/Makefile head/lib/clang/libllvmarmcodegen/Makefile head/lib/clang/libllvmarmdesc/Makefile head/lib/clang/libllvmarmdisassembler/Makefile head/lib/clang/libllvmasmprinter/Makefile head/lib/clang/libllvmbitreader/Makefile head/lib/clang/libllvmbitwriter/Makefile head/lib/clang/libllvmcodegen/Makefile head/lib/clang/libllvmcore/Makefile head/lib/clang/libllvmdebuginfo/Makefile head/lib/clang/libllvminstrumentation/Makefile head/lib/clang/libllvmipa/Makefile head/lib/clang/libllvmlinker/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmmcdisassembler/Makefile head/lib/clang/libllvmmcjit/Makefile head/lib/clang/libllvmmipscodegen/Makefile head/lib/clang/libllvmmipsdesc/Makefile head/lib/clang/libllvmmipsdisassembler/Makefile head/lib/clang/libllvmpowerpccodegen/Makefile head/lib/clang/libllvmscalaropts/Makefile head/lib/clang/libllvmsupport/Makefile head/lib/clang/libllvmtablegen/Makefile head/lib/clang/libllvmtarget/Makefile head/lib/clang/libllvmtransformutils/Makefile head/lib/clang/libllvmx86asmparser/Makefile head/lib/clang/libllvmx86codegen/Makefile head/lib/clang/libllvmx86disassembler/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/bugpoint/Makefile head/usr.bin/clang/bugpoint/bugpoint.1 head/usr.bin/clang/clang-tblgen/Makefile head/usr.bin/clang/clang/Makefile head/usr.bin/clang/llc/Makefile head/usr.bin/clang/llc/llc.1 head/usr.bin/clang/lli/Makefile head/usr.bin/clang/lli/lli.1 head/usr.bin/clang/llvm-ar/Makefile head/usr.bin/clang/llvm-ar/llvm-ar.1 head/usr.bin/clang/llvm-as/Makefile head/usr.bin/clang/llvm-as/llvm-as.1 head/usr.bin/clang/llvm-bcanalyzer/Makefile head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 head/usr.bin/clang/llvm-diff/Makefile head/usr.bin/clang/llvm-diff/llvm-diff.1 head/usr.bin/clang/llvm-dis/Makefile head/usr.bin/clang/llvm-dis/llvm-dis.1 head/usr.bin/clang/llvm-extract/Makefile head/usr.bin/clang/llvm-extract/llvm-extract.1 head/usr.bin/clang/llvm-link/Makefile head/usr.bin/clang/llvm-link/llvm-link.1 head/usr.bin/clang/llvm-mc/Makefile head/usr.bin/clang/llvm-nm/llvm-nm.1 head/usr.bin/clang/llvm-objdump/Makefile head/usr.bin/clang/llvm-prof/llvm-prof.1 head/usr.bin/clang/llvm-ranlib/Makefile head/usr.bin/clang/llvm-ranlib/llvm-ranlib.1 head/usr.bin/clang/llvm-rtdyld/Makefile head/usr.bin/clang/opt/Makefile head/usr.bin/clang/opt/opt.1 head/usr.bin/clang/tblgen/Makefile head/usr.bin/clang/tblgen/tblgen.1 Directory Properties: head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Apr 12 17:56:47 2013 (r249422) +++ head/Makefile.inc1 Fri Apr 12 17:57:40 2013 (r249423) @@ -380,7 +380,7 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFL # kernel stage KMAKEENV= ${WMAKEENV} -KMAKE= ${KMAKEENV} ${MAKE} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} +KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} # # buildworld Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Apr 12 17:56:47 2013 (r249422) +++ head/ObsoleteFiles.inc Fri Apr 12 17:57:40 2013 (r249423) @@ -38,6 +38,37 @@ # xargs -n1 | sort | uniq -d; # done +# 20130411: new clang import which bumps version from 3.2 to 3.3. +OLD_FILES+=usr/include/clang/3.2/__wmmintrin_aes.h +OLD_FILES+=usr/include/clang/3.2/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/clang/3.2/altivec.h +OLD_FILES+=usr/include/clang/3.2/ammintrin.h +OLD_FILES+=usr/include/clang/3.2/avx2intrin.h +OLD_FILES+=usr/include/clang/3.2/avxintrin.h +OLD_FILES+=usr/include/clang/3.2/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.2/bmiintrin.h +OLD_FILES+=usr/include/clang/3.2/cpuid.h +OLD_FILES+=usr/include/clang/3.2/emmintrin.h +OLD_FILES+=usr/include/clang/3.2/f16cintrin.h +OLD_FILES+=usr/include/clang/3.2/fma4intrin.h +OLD_FILES+=usr/include/clang/3.2/fmaintrin.h +OLD_FILES+=usr/include/clang/3.2/immintrin.h +OLD_FILES+=usr/include/clang/3.2/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.2/mm3dnow.h +OLD_FILES+=usr/include/clang/3.2/mm_malloc.h +OLD_FILES+=usr/include/clang/3.2/mmintrin.h +OLD_FILES+=usr/include/clang/3.2/module.map +OLD_FILES+=usr/include/clang/3.2/nmmintrin.h +OLD_FILES+=usr/include/clang/3.2/pmmintrin.h +OLD_FILES+=usr/include/clang/3.2/popcntintrin.h +OLD_FILES+=usr/include/clang/3.2/rtmintrin.h +OLD_FILES+=usr/include/clang/3.2/smmintrin.h +OLD_FILES+=usr/include/clang/3.2/tmmintrin.h +OLD_FILES+=usr/include/clang/3.2/wmmintrin.h +OLD_FILES+=usr/include/clang/3.2/x86intrin.h +OLD_FILES+=usr/include/clang/3.2/xmmintrin.h +OLD_FILES+=usr/include/clang/3.2/xopintrin.h +OLD_DIRS+=usr/include/clang/3.2 # 20130404: legacy ATA stack removed OLD_FILES+=sbin/atacontrol OLD_FILES+=usr/share/man/man8/atacontrol.8.gz Modified: head/contrib/llvm/LICENSE.TXT ============================================================================== --- head/contrib/llvm/LICENSE.TXT Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/LICENSE.TXT Fri Apr 12 17:57:40 2013 (r249423) @@ -4,7 +4,7 @@ LLVM Release License University of Illinois/NCSA Open Source License -Copyright (c) 2003-2012 University of Illinois at Urbana-Champaign. +Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: @@ -64,7 +64,7 @@ Program Directory Autoconf llvm/autoconf llvm/projects/ModuleMaker/autoconf llvm/projects/sample/autoconf -CellSPU backend llvm/lib/Target/CellSPU/README.txt Google Test llvm/utils/unittest/googletest OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} +ARM contributions llvm/lib/Target/ARM/LICENSE.TXT Modified: head/contrib/llvm/include/llvm-c/Core.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Core.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm-c/Core.h Fri Apr 12 17:57:40 2013 (r249423) @@ -21,8 +21,8 @@ /* Need these includes to support the LLVM 'cast' template for the C++ 'wrap' and 'unwrap' conversion functions. */ -#include "llvm/IRBuilder.h" -#include "llvm/Module.h" +#include "llvm/IR/IRBuilder.h" +#include "llvm/IR/Module.h" #include "llvm/PassRegistry.h" extern "C" { @@ -173,10 +173,11 @@ typedef enum { LLVMUWTable = 1 << 30, LLVMNonLazyBind = 1 << 31 - /* FIXME: This attribute is currently not included in the C API as + /* FIXME: These attributes are currently not included in the C API as a temporary measure until the API/ABI impact to the C API is understood and the path forward agreed upon. - LLVMAddressSafety = 1ULL << 32 + LLVMAddressSafety = 1ULL << 32, + LLVMStackProtectStrongAttribute = 1ULL<<33 */ } LLVMAttribute; @@ -357,6 +358,11 @@ typedef enum { void LLVMInitializeCore(LLVMPassRegistryRef R); +/** Deallocate and destroy all ManagedStatic variables. + @see llvm::llvm_shutdown + @see ManagedStatic */ +void LLVMShutdown(); + /*===-- Error handling ----------------------------------------------------===*/ @@ -2547,6 +2553,13 @@ LLVMBool LLVMCreateMemoryBufferWithConte char **OutMessage); LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, char **OutMessage); +LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(const char *InputData, + size_t InputDataLength, + const char *BufferName, + LLVMBool RequiresNullTerminator); +LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData, + size_t InputDataLength, + const char *BufferName); void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf); /** @@ -2619,6 +2632,34 @@ void LLVMDisposePassManager(LLVMPassMana */ /** + * @defgroup LLVMCCoreThreading Threading + * + * Handle the structures needed to make LLVM safe for multithreading. + * + * @{ + */ + +/** Allocate and initialize structures needed to make LLVM safe for + multithreading. The return value indicates whether multithreaded + initialization succeeded. Must be executed in isolation from all + other LLVM api calls. + @see llvm::llvm_start_multithreaded */ +LLVMBool LLVMStartMultithreaded(); + +/** Deallocate structures necessary to make LLVM safe for multithreading. + Must be executed in isolation from all other LLVM api calls. + @see llvm::llvm_stop_multithreaded */ +void LLVMStopMultithreaded(); + +/** Check whether LLVM is executing in thread-safe mode or not. + @see llvm::llvm_is_multithreaded */ +LLVMBool LLVMIsMultithreaded(); + +/** + * @} + */ + +/** * @} */ Modified: head/contrib/llvm/include/llvm-c/Disassembler.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Disassembler.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm-c/Disassembler.h Fri Apr 12 17:57:40 2013 (r249423) @@ -139,13 +139,26 @@ extern "C" { * by passing a block of information in the DisInfo parameter and specifying the * TagType and callback functions as described above. These can all be passed * as NULL. If successful, this returns a disassembler context. If not, it - * returns NULL. + * returns NULL. This function is equivalent to calling LLVMCreateDisasmCPU() + * with an empty CPU name. */ LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp); /** + * Create a disassembler for the TripleName and a specific CPU. Symbolic + * disassembly is supported by passing a block of information in the DisInfo + * parameter and specifying the TagType and callback functions as described + * above. These can all be passed * as NULL. If successful, this returns a + * disassembler context. If not, it returns NULL. + */ +LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU, + void *DisInfo, int TagType, + LLVMOpInfoCallback GetOpInfo, + LLVMSymbolLookupCallback SymbolLookUp); + +/** * Set the disassembler's options. Returns 1 if it can set the Options and 0 * otherwise. */ @@ -153,6 +166,10 @@ int LLVMSetDisasmOptions(LLVMDisasmConte /* The option to produce marked up assembly. */ #define LLVMDisassembler_Option_UseMarkup 1 +/* The option to print immediates as hex. */ +#define LLVMDisassembler_Option_PrintImmHex 2 +/* The option use the other assembler printer variant */ +#define LLVMDisassembler_Option_AsmPrinterVariant 4 /** * Dispose of a disassembler context. Modified: head/contrib/llvm/include/llvm-c/Initialization.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Initialization.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm-c/Initialization.h Fri Apr 12 17:57:40 2013 (r249423) @@ -34,6 +34,7 @@ extern "C" { void LLVMInitializeCore(LLVMPassRegistryRef R); void LLVMInitializeTransformUtils(LLVMPassRegistryRef R); void LLVMInitializeScalarOpts(LLVMPassRegistryRef R); +void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R); void LLVMInitializeVectorization(LLVMPassRegistryRef R); void LLVMInitializeInstCombine(LLVMPassRegistryRef R); void LLVMInitializeIPO(LLVMPassRegistryRef R); Modified: head/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h ============================================================================== --- head/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm-c/LinkTimeOptimizer.h Fri Apr 12 17:57:40 2013 (r249423) @@ -13,8 +13,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __LTO_CAPI_H__ -#define __LTO_CAPI_H__ +#ifndef LLVM_C_LINKTIMEOPTIMIZER_H +#define LLVM_C_LINKTIMEOPTIMIZER_H #ifdef __cplusplus extern "C" { Modified: head/contrib/llvm/include/llvm-c/TargetMachine.h ============================================================================== --- head/contrib/llvm/include/llvm-c/TargetMachine.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm-c/TargetMachine.h Fri Apr 12 17:57:40 2013 (r249423) @@ -20,6 +20,7 @@ #define LLVM_C_TARGETMACHINE_H #include "llvm-c/Core.h" +#include "llvm-c/Target.h" #ifdef __cplusplus extern "C" { Modified: head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h Fri Apr 12 17:57:40 2013 (r249423) @@ -11,8 +11,8 @@ |* *| \*===----------------------------------------------------------------------===*/ -#ifndef LLVM_C_PASSMANAGERBUILDER -#define LLVM_C_PASSMANAGERBUILDER +#ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H +#define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H #include "llvm-c/Core.h" @@ -77,8 +77,8 @@ LLVMPassManagerBuilderPopulateModulePass /** See llvm::PassManagerBuilder::populateLTOPassManager. */ void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM, - bool Internalize, - bool RunInliner); + LLVMBool Internalize, + LLVMBool RunInliner); /** * @} Modified: head/contrib/llvm/include/llvm-c/lto.h ============================================================================== --- head/contrib/llvm/include/llvm-c/lto.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm-c/lto.h Fri Apr 12 17:57:40 2013 (r249423) @@ -13,8 +13,8 @@ |* *| \*===----------------------------------------------------------------------===*/ -#ifndef LTO_H -#define LTO_H 1 +#ifndef LLVM_C_LTO_H +#define LLVM_C_LTO_H #include #include @@ -291,6 +291,13 @@ lto_codegen_compile_to_file(lto_code_gen extern void lto_codegen_debug_options(lto_code_gen_t cg, const char *); +/** + * Initializes LLVM disassemblers. + * FIXME: This doesn't really belong here. + */ +extern void +lto_initialize_disassembler(void); + #ifdef __cplusplus } #endif Modified: head/contrib/llvm/include/llvm/ADT/APFloat.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APFloat.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/APFloat.h Fri Apr 12 17:57:40 2013 (r249423) @@ -97,8 +97,8 @@ nexttoward. */ -#ifndef LLVM_FLOAT_H -#define LLVM_FLOAT_H +#ifndef LLVM_ADT_APFLOAT_H +#define LLVM_ADT_APFLOAT_H // APInt contains static functions implementing bignum arithmetic. #include "llvm/ADT/APInt.h" @@ -184,9 +184,9 @@ namespace llvm { APFloat(const fltSemantics &, integerPart); APFloat(const fltSemantics &, fltCategory, bool negative); APFloat(const fltSemantics &, uninitializedTag); + APFloat(const fltSemantics &, const APInt &); explicit APFloat(double d); explicit APFloat(float f); - explicit APFloat(const APInt &, bool isIEEE = false); APFloat(const APFloat &); ~APFloat(); @@ -300,7 +300,7 @@ namespace llvm { /* The definition of equality is not straightforward for floating point, so we won't use operator==. Use one of the following, or write whatever it is you really mean. */ - // bool operator==(const APFloat &) const; // DO NOT IMPLEMENT + bool operator==(const APFloat &) const LLVM_DELETED_FUNCTION; /* IEEE comparison with another floating point number (NaNs compare unordered, 0==-0). */ @@ -327,6 +327,7 @@ namespace llvm { bool isNegative() const { return sign; } bool isPosZero() const { return isZero() && !isNegative(); } bool isNegZero() const { return isZero() && isNegative(); } + bool isDenormal() const; APFloat& operator=(const APFloat &); @@ -422,7 +423,7 @@ namespace llvm { APInt convertQuadrupleAPFloatToAPInt() const; APInt convertF80LongDoubleAPFloatToAPInt() const; APInt convertPPCDoubleDoubleAPFloatToAPInt() const; - void initFromAPInt(const APInt& api, bool isIEEE = false); + void initFromAPInt(const fltSemantics *Sem, const APInt& api); void initFromHalfAPInt(const APInt& api); void initFromFloatAPInt(const APInt& api); void initFromDoubleAPInt(const APInt& api); @@ -462,4 +463,4 @@ namespace llvm { hash_code hash_value(const APFloat &Arg); } /* namespace llvm */ -#endif /* LLVM_FLOAT_H */ +#endif /* LLVM_ADT_APFLOAT_H */ Modified: head/contrib/llvm/include/llvm/ADT/APInt.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APInt.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/APInt.h Fri Apr 12 17:57:40 2013 (r249423) @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_APINT_H -#define LLVM_APINT_H +#ifndef LLVM_ADT_APINT_H +#define LLVM_ADT_APINT_H #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Compiler.h" @@ -274,7 +274,7 @@ public: initSlowCase(that); } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES /// @brief Move Constructor. APInt(APInt&& that) : BitWidth(that.BitWidth), VAL(that.VAL) { that.BitWidth = 0; @@ -427,7 +427,7 @@ public: /// @returns the all-ones value for an APInt of the specified bit-width. /// @brief Get the all-ones value. static APInt getAllOnesValue(unsigned numBits) { - return APInt(numBits, -1ULL, true); + return APInt(numBits, UINT64_MAX, true); } /// @returns the '0' value for an APInt of the specified bit-width. @@ -498,13 +498,24 @@ public: if (loBitsSet == 0) return APInt(numBits, 0); if (loBitsSet == APINT_BITS_PER_WORD) - return APInt(numBits, -1ULL); + return APInt(numBits, UINT64_MAX); // For small values, return quickly. if (loBitsSet <= APINT_BITS_PER_WORD) - return APInt(numBits, -1ULL >> (APINT_BITS_PER_WORD - loBitsSet)); + return APInt(numBits, UINT64_MAX >> (APINT_BITS_PER_WORD - loBitsSet)); return getAllOnesValue(numBits).lshr(numBits - loBitsSet); } + /// \brief Return a value containing V broadcasted over NewLen bits. + static APInt getSplat(unsigned NewLen, const APInt &V) { + assert(NewLen >= V.getBitWidth() && "Can't splat to smaller bit width!"); + + APInt Val = V.zextOrSelf(NewLen); + for (unsigned I = V.getBitWidth(); I < NewLen; I <<= 1) + Val |= Val << I; + + return Val; + } + /// \brief Determine if two APInts have the same value, after zero-extending /// one of them (if needed!) to ensure that the bit-widths match. static bool isSameValue(const APInt &I1, const APInt &I2) { @@ -601,7 +612,7 @@ public: return AssignSlowCase(RHS); } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES /// @brief Move assignment operator. APInt& operator=(APInt&& that) { if (!isSingleWord()) @@ -799,16 +810,7 @@ public: /// Signed divide this APInt by APInt RHS. /// @brief Signed division function for APInt. - APInt sdiv(const APInt &RHS) const { - if (isNegative()) - if (RHS.isNegative()) - return (-(*this)).udiv(-RHS); - else - return -((-(*this)).udiv(RHS)); - else if (RHS.isNegative()) - return -(this->udiv(-RHS)); - return this->udiv(RHS); - } + APInt sdiv(const APInt &RHS) const; /// Perform an unsigned remainder operation on this APInt with RHS being the /// divisor. Both this and RHS are treated as unsigned quantities for purposes @@ -821,16 +823,7 @@ public: /// Signed remainder operation on APInt. /// @brief Function for signed remainder operation. - APInt srem(const APInt &RHS) const { - if (isNegative()) - if (RHS.isNegative()) - return -((-(*this)).urem(-RHS)); - else - return -((-(*this)).urem(RHS)); - else if (RHS.isNegative()) - return this->urem(-RHS); - return this->urem(RHS); - } + APInt srem(const APInt &RHS) const; /// Sometimes it is convenient to divide two APInt values and obtain both the /// quotient and remainder. This function does both operations in the same @@ -842,24 +835,9 @@ public: APInt &Quotient, APInt &Remainder); static void sdivrem(const APInt &LHS, const APInt &RHS, - APInt &Quotient, APInt &Remainder) { - if (LHS.isNegative()) { - if (RHS.isNegative()) - APInt::udivrem(-LHS, -RHS, Quotient, Remainder); - else { - APInt::udivrem(-LHS, RHS, Quotient, Remainder); - Quotient = -Quotient; - } - Remainder = -Remainder; - } else if (RHS.isNegative()) { - APInt::udivrem(LHS, -RHS, Quotient, Remainder); - Quotient = -Quotient; - } else { - APInt::udivrem(LHS, RHS, Quotient, Remainder); - } - } - - + APInt &Quotient, APInt &Remainder); + + // Operations that return overflow indicators. APInt sadd_ov(const APInt &RHS, bool &Overflow) const; APInt uadd_ov(const APInt &RHS, bool &Overflow) const; @@ -1113,11 +1091,11 @@ public: /// @brief Set every bit to 1. void setAllBits() { if (isSingleWord()) - VAL = -1ULL; + VAL = UINT64_MAX; else { // Set all the bits in all the words. for (unsigned i = 0; i < getNumWords(); ++i) - pVal[i] = -1ULL; + pVal[i] = UINT64_MAX; } // Clear the unused ones clearUnusedBits(); @@ -1142,10 +1120,10 @@ public: /// @brief Toggle every bit to its opposite value. void flipAllBits() { if (isSingleWord()) - VAL ^= -1ULL; + VAL ^= UINT64_MAX; else { for (unsigned i = 0; i < getNumWords(); ++i) - pVal[i] ^= -1ULL; + pVal[i] ^= UINT64_MAX; } clearUnusedBits(); } @@ -1191,7 +1169,8 @@ public: /// APInt. This is used in conjunction with getActiveData to extract the raw /// value of the APInt. unsigned getActiveWords() const { - return whichWord(getActiveBits()-1) + 1; + unsigned numActiveBits = getActiveBits(); + return numActiveBits ? whichWord(numActiveBits - 1) + 1 : 1; } /// Computes the minimum bit width for this APInt while considering it to be Modified: head/contrib/llvm/include/llvm/ADT/APSInt.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APSInt.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/APSInt.h Fri Apr 12 17:57:40 2013 (r249423) @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_APSINT_H -#define LLVM_APSINT_H +#ifndef LLVM_ADT_APSINT_H +#define LLVM_ADT_APSINT_H #include "llvm/ADT/APInt.h" @@ -23,7 +23,7 @@ class APSInt : public APInt { bool IsUnsigned; public: /// Default constructor that creates an uninitialized APInt. - explicit APSInt() {} + explicit APSInt() : IsUnsigned(false) {} /// APSInt ctor - Create an APSInt with the specified width, default to /// unsigned. @@ -161,11 +161,11 @@ public: } APSInt& operator++() { - static_cast(*this)++; + ++(static_cast(*this)); return *this; } APSInt& operator--() { - static_cast(*this)--; + --(static_cast(*this)); return *this; } APSInt operator++(int) { Modified: head/contrib/llvm/include/llvm/ADT/ArrayRef.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ArrayRef.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/ArrayRef.h Fri Apr 12 17:57:40 2013 (r249423) @@ -33,6 +33,8 @@ namespace llvm { typedef const T *const_iterator; typedef size_t size_type; + typedef std::reverse_iterator reverse_iterator; + private: /// The start of the array, in an external buffer. const T *Data; @@ -84,6 +86,9 @@ namespace llvm { iterator begin() const { return Data; } iterator end() const { return Data + Length; } + reverse_iterator rbegin() const { return reverse_iterator(end()); } + reverse_iterator rend() const { return reverse_iterator(begin()); } + /// empty - Check if the array is empty. bool empty() const { return Length == 0; } @@ -171,41 +176,41 @@ namespace llvm { /// Construct an empty ArrayRef. /*implicit*/ MutableArrayRef() : ArrayRef() {} - + /// Construct an MutableArrayRef from a single element. /*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef(OneElt) {} - + /// Construct an MutableArrayRef from a pointer and length. /*implicit*/ MutableArrayRef(T *data, size_t length) : ArrayRef(data, length) {} - + /// Construct an MutableArrayRef from a range. MutableArrayRef(T *begin, T *end) : ArrayRef(begin, end) {} - + /// Construct an MutableArrayRef from a SmallVector. /*implicit*/ MutableArrayRef(SmallVectorImpl &Vec) : ArrayRef(Vec) {} - + /// Construct a MutableArrayRef from a std::vector. /*implicit*/ MutableArrayRef(std::vector &Vec) : ArrayRef(Vec) {} - + /// Construct an MutableArrayRef from a C array. template /*implicit*/ MutableArrayRef(T (&Arr)[N]) : ArrayRef(Arr) {} - + T *data() const { return const_cast(ArrayRef::data()); } iterator begin() const { return data(); } iterator end() const { return data() + this->size(); } - + /// front - Get the first element. T &front() const { assert(!this->empty()); return data()[0]; } - + /// back - Get the last element. T &back() const { assert(!this->empty()); @@ -217,14 +222,14 @@ namespace llvm { assert(N <= this->size() && "Invalid specifier"); return MutableArrayRef(data()+N, this->size()-N); } - + /// slice(n, m) - Chop off the first N elements of the array, and keep M /// elements in the array. MutableArrayRef slice(unsigned N, unsigned M) const { assert(N+M <= this->size() && "Invalid specifier"); return MutableArrayRef(data()+N, M); } - + /// @} /// @name Operator Overloads /// @{ @@ -301,5 +306,5 @@ namespace llvm { static const bool value = true; }; } - + #endif Modified: head/contrib/llvm/include/llvm/ADT/BitVector.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/BitVector.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/BitVector.h Fri Apr 12 17:57:40 2013 (r249423) @@ -98,7 +98,7 @@ public: std::memcpy(Bits, RHS.Bits, Capacity * sizeof(BitWord)); } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES BitVector(BitVector &&RHS) : Bits(RHS.Bits), Size(RHS.Size), Capacity(RHS.Capacity) { RHS.Bits = 0; @@ -452,7 +452,7 @@ public: return *this; } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES const BitVector &operator=(BitVector &&RHS) { if (this == &RHS) return *this; Modified: head/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h Fri Apr 12 17:57:40 2013 (r249423) @@ -9,8 +9,8 @@ #ifndef LLVM_ADT_DAGDELTAALGORITHM_H #define LLVM_ADT_DAGDELTAALGORITHM_H -#include #include +#include namespace llvm { Modified: head/contrib/llvm/include/llvm/ADT/DeltaAlgorithm.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DeltaAlgorithm.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/DeltaAlgorithm.h Fri Apr 12 17:57:40 2013 (r249423) @@ -9,8 +9,8 @@ #ifndef LLVM_ADT_DELTAALGORITHM_H #define LLVM_ADT_DELTAALGORITHM_H -#include #include +#include namespace llvm { Modified: head/contrib/llvm/include/llvm/ADT/DenseMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DenseMap.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/DenseMap.h Fri Apr 12 17:57:40 2013 (r249423) @@ -14,20 +14,20 @@ #ifndef LLVM_ADT_DENSEMAP_H #define LLVM_ADT_DENSEMAP_H -#include "llvm/Support/Compiler.h" +#include "llvm/ADT/DenseMapInfo.h" #include "llvm/Support/AlignOf.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/PointerLikeTypeTraits.h" #include "llvm/Support/type_traits.h" -#include "llvm/ADT/DenseMapInfo.h" #include -#include -#include -#include #include #include #include #include +#include +#include +#include namespace llvm { @@ -75,7 +75,7 @@ public: void clear() { if (getNumEntries() == 0 && getNumTombstones() == 0) return; - + // If the capacity of the array is huge, and the # elements used is small, // shrink the array. if (getNumEntries() * 4 < getNumBuckets() && getNumBuckets() > 64) { @@ -159,6 +159,24 @@ public: return std::make_pair(iterator(TheBucket, getBucketsEnd(), true), true); } +#if LLVM_HAS_RVALUE_REFERENCES + // Inserts key,value pair into the map if the key isn't already in the map. + // If the key is already in the map, it returns false and doesn't update the + // value. + std::pair insert(std::pair &&KV) { + BucketT *TheBucket; + if (LookupBucketFor(KV.first, TheBucket)) + return std::make_pair(iterator(TheBucket, getBucketsEnd(), true), + false); // Already in map. + + // Otherwise, insert the new element. + TheBucket = InsertIntoBucket(std::move(KV.first), + std::move(KV.second), + TheBucket); + return std::make_pair(iterator(TheBucket, getBucketsEnd(), true), true); + } +#endif + /// insert - Range insertion of pairs. template void insert(InputIt I, InputIt E) { @@ -198,7 +216,7 @@ public: return FindAndConstruct(Key).second; } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES value_type& FindAndConstruct(KeyT &&Key) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) @@ -383,7 +401,7 @@ private: return TheBucket; } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES BucketT *InsertIntoBucket(const KeyT &Key, ValueT &&Value, BucketT *TheBucket) { TheBucket = InsertIntoBucketImpl(Key, TheBucket); @@ -430,7 +448,8 @@ private: incrementNumEntries(); // If we are writing over a tombstone, remember this. - if (!KeyInfoT::isEqual(TheBucket->first, getEmptyKey())) + const KeyT EmptyKey = getEmptyKey(); + if (!KeyInfoT::isEqual(TheBucket->first, EmptyKey)) decrementNumTombstones(); return TheBucket; @@ -474,7 +493,6 @@ private: if (KeyInfoT::isEqual(ThisBucket->first, EmptyKey)) { // If we've already seen a tombstone while probing, fill it in instead // of the empty bucket we eventually probed to. - if (FoundTombstone) ThisBucket = FoundTombstone; FoundBucket = FoundTombstone ? FoundTombstone : ThisBucket; return false; } @@ -531,13 +549,13 @@ public: init(NumInitBuckets); } - DenseMap(const DenseMap &other) { + DenseMap(const DenseMap &other) : BaseT() { init(0); copyFrom(other); } -#if LLVM_USE_RVALUE_REFERENCES - DenseMap(DenseMap &&other) { +#if LLVM_HAS_RVALUE_REFERENCES + DenseMap(DenseMap &&other) : BaseT() { init(0); swap(other); } @@ -566,7 +584,7 @@ public: return *this; } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES DenseMap& operator=(DenseMap &&other) { this->destroyAll(); operator delete(Buckets); @@ -700,7 +718,7 @@ public: copyFrom(other); } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES SmallDenseMap(SmallDenseMap &&other) { init(0); swap(other); @@ -795,7 +813,7 @@ public: return *this; } -#if LLVM_USE_RVALUE_REFERENCES +#if LLVM_HAS_RVALUE_REFERENCES SmallDenseMap& operator=(SmallDenseMap &&other) { this->destroyAll(); deallocateBuckets(); @@ -1027,7 +1045,7 @@ private: ++Ptr; } }; - + template static inline size_t capacity_in_bytes(const DenseMap &X) { Modified: head/contrib/llvm/include/llvm/ADT/DenseSet.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DenseSet.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/DenseSet.h Fri Apr 12 17:57:40 2013 (r249423) @@ -32,8 +32,10 @@ public: bool empty() const { return TheMap.empty(); } unsigned size() const { return TheMap.size(); } + size_t getMemorySize() const { return TheMap.getMemorySize(); } - /// Grow the denseset so that it has at least Size buckets. Does not shrink + /// Grow the DenseSet so that it has at least Size buckets. Will not shrink + /// the Size of the set. void resize(size_t Size) { TheMap.resize(Size); } void clear() { Modified: head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h Fri Apr 12 17:57:40 2013 (r249423) @@ -34,8 +34,8 @@ #define LLVM_ADT_DEPTHFIRSTITERATOR_H #include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/PointerIntPair.h" +#include "llvm/ADT/SmallPtrSet.h" #include #include Modified: head/contrib/llvm/include/llvm/ADT/FoldingSet.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/FoldingSet.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/FoldingSet.h Fri Apr 12 17:57:40 2013 (r249423) @@ -16,9 +16,9 @@ #ifndef LLVM_ADT_FOLDINGSET_H #define LLVM_ADT_FOLDINGSET_H -#include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" +#include "llvm/Support/DataTypes.h" namespace llvm { class APFloat; Modified: head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h Fri Apr 12 17:57:40 2013 (r249423) @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_ADT_IMMUTABLE_INTERVAL_MAP_H -#define LLVM_ADT_IMMUTABLE_INTERVAL_MAP_H +#ifndef LLVM_ADT_IMMUTABLEINTERVALMAP_H +#define LLVM_ADT_IMMUTABLEINTERVALMAP_H #include "llvm/ADT/ImmutableMap.h" Modified: head/contrib/llvm/include/llvm/ADT/ImmutableList.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ImmutableList.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/ImmutableList.h Fri Apr 12 17:57:40 2013 (r249423) @@ -11,11 +11,11 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_ADT_IMLIST_H -#define LLVM_ADT_IMLIST_H +#ifndef LLVM_ADT_IMMUTABLELIST_H +#define LLVM_ADT_IMMUTABLELIST_H -#include "llvm/Support/Allocator.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/Support/Allocator.h" #include "llvm/Support/DataTypes.h" #include Modified: head/contrib/llvm/include/llvm/ADT/ImmutableMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ImmutableMap.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/ImmutableMap.h Fri Apr 12 17:57:40 2013 (r249423) @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_ADT_IMMAP_H -#define LLVM_ADT_IMMAP_H +#ifndef LLVM_ADT_IMMUTABLEMAP_H +#define LLVM_ADT_IMMUTABLEMAP_H #include "llvm/ADT/ImmutableSet.h" @@ -211,17 +211,22 @@ public: friend class ImmutableMap; public: - value_type_ref operator*() const { return itr->getValue(); } - value_type* operator->() const { return &itr->getValue(); } + typedef typename ImmutableMap::value_type value_type; + typedef typename ImmutableMap::value_type_ref reference; + typedef typename iterator::value_type *pointer; + typedef std::bidirectional_iterator_tag iterator_category; + + typename iterator::reference operator*() const { return itr->getValue(); } + typename iterator::pointer operator->() const { return &itr->getValue(); } key_type_ref getKey() const { return itr->getValue().first; } data_type_ref getData() const { return itr->getValue().second; } - iterator& operator++() { ++itr; return *this; } iterator operator++(int) { iterator tmp(*this); ++itr; return tmp; } iterator& operator--() { --itr; return *this; } iterator operator--(int) { iterator tmp(*this); --itr; return tmp; } + bool operator==(const iterator& RHS) const { return RHS.itr == itr; } bool operator!=(const iterator& RHS) const { return RHS.itr != itr; } }; @@ -288,6 +293,13 @@ public: Factory(F) { if (Root) { Root->retain(); } } + + explicit ImmutableMapRef(const ImmutableMap &X, + typename ImmutableMap::Factory &F) + : Root(X.getRootWithoutRetain()), + Factory(F.getTreeFactory()) { + if (Root) { Root->retain(); } + } ImmutableMapRef(const ImmutableMapRef &X) : Root(X.Root), @@ -318,12 +330,20 @@ public: return ImmutableMapRef(0, F); } - ImmutableMapRef add(key_type_ref K, data_type_ref D) { + void manualRetain() { + if (Root) Root->retain(); + } + + void manualRelease() { + if (Root) Root->release(); + } + + ImmutableMapRef add(key_type_ref K, data_type_ref D) const { TreeTy *NewT = Factory->add(Root, std::pair(K, D)); return ImmutableMapRef(NewT, Factory); } - ImmutableMapRef remove(key_type_ref K) { + ImmutableMapRef remove(key_type_ref K) const { TreeTy *NewT = Factory->remove(Root, K); return ImmutableMapRef(NewT, Factory); } Modified: head/contrib/llvm/include/llvm/ADT/ImmutableSet.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ImmutableSet.h Fri Apr 12 17:56:47 2013 (r249422) +++ head/contrib/llvm/include/llvm/ADT/ImmutableSet.h Fri Apr 12 17:57:40 2013 (r249423) @@ -11,12 +11,12 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_ADT_IMSET_H -#define LLVM_ADT_IMSET_H +#ifndef LLVM_ADT_IMMUTABLESET_H +#define LLVM_ADT_IMMUTABLESET_H -#include "llvm/Support/Allocator.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/Support/Allocator.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/ErrorHandling.h" #include @@ -1054,18 +1054,27 @@ public: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 19:47:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DAAB2F61; Fri, 12 Apr 2013 19:47:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CD87E1A5E; Fri, 12 Apr 2013 19:47:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CJlWjK029582; Fri, 12 Apr 2013 19:47:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CJlW1Q029580; Fri, 12 Apr 2013 19:47:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304121947.r3CJlW1Q029580@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 12 Apr 2013 19:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249425 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 19:47:32 -0000 Author: jilles Date: Fri Apr 12 19:47:32 2013 New Revision: 249425 URL: http://svnweb.freebsd.org/changeset/base/249425 Log: libthr: Remove _thr_rtld_fini(), unused since r245630. Modified: head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_rtld.c Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Fri Apr 12 19:36:53 2013 (r249424) +++ head/lib/libthr/thread/thr_private.h Fri Apr 12 19:47:32 2013 (r249425) @@ -746,7 +746,6 @@ void _thr_ref_delete(struct pthread *, s void _thr_ref_delete_unlocked(struct pthread *, struct pthread *) __hidden; int _thr_find_thread(struct pthread *, struct pthread *, int) __hidden; void _thr_rtld_init(void) __hidden; -void _thr_rtld_fini(void) __hidden; void _thr_rtld_postfork_child(void) __hidden; int _thr_stack_alloc(struct pthread_attr *) __hidden; void _thr_stack_free(struct pthread_attr *) __hidden; Modified: head/lib/libthr/thread/thr_rtld.c ============================================================================== --- head/lib/libthr/thread/thr_rtld.c Fri Apr 12 19:36:53 2013 (r249424) +++ head/lib/libthr/thread/thr_rtld.c Fri Apr 12 19:47:32 2013 (r249425) @@ -213,14 +213,3 @@ _thr_rtld_init(void) _rtld_thread_init(&li); _thr_signal_unblock(curthread); } - -void -_thr_rtld_fini(void) -{ - struct pthread *curthread; - - curthread = _get_curthread(); - _thr_signal_block(curthread); - _rtld_thread_init(NULL); - _thr_signal_unblock(curthread); -} From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 20:10:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 911F8419; Fri, 12 Apr 2013 20:10:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80D2B1B66; Fri, 12 Apr 2013 20:10:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CKAVxT038059; Fri, 12 Apr 2013 20:10:31 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CKAS2E038034; Fri, 12 Apr 2013 20:10:28 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201304122010.r3CKAS2E038034@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 12 Apr 2013 20:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249426 - in head/cddl/contrib/opensolaris: cmd/dtrace/test/tst/common/funcs cmd/dtrace/test/tst/common/pointers cmd/dtrace/test/tst/common/print cmd/dtrace/test/tst/common/safety cmd/d... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 20:10:31 -0000 Author: pfg Date: Fri Apr 12 20:10:27 2013 New Revision: 249426 URL: http://svnweb.freebsd.org/changeset/base/249426 Log: Dtrace: resolve const types from fbt and other fixes. Merge change from illumos: 3519 DTrace fails to resolve const types from fbt 3520 dtrace internal error -- token type 316 is not a valid D compilation token 3521 clean up dtrace unit tests Illumos Revision: e98f46c Reference: https://www.illumos.org/issues/3519 https://www.illumos.org/issues/3520 https://www.illumos.org/issues/3521 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d - copied unchanged from r249381, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d - copied unchanged from r249381, vendor/illumos/dist/cmd/dtrace/test/tst/common/types/tst.const.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ #pragma D option quiet @@ -36,3 +38,8 @@ BEGIN printf("%s\n", strjoin("", "")); exit(0); } + +BEGIN +{ + exit(1); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: This test reproduces the alignment error. @@ -39,9 +41,10 @@ BEGIN { - x = (int *) 64; + x = (int *)64; y = *x; trace(y); + exit(0); } ERROR Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: D pointers do not allow invalid pointer accesses. @@ -44,6 +46,7 @@ BEGIN y = (int *) (x - 3300778156056); *y = 3; trace(*y); + exit(0); } ERROR Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: D pointers do not allow invalid pointer accesses. @@ -39,9 +41,10 @@ BEGIN { - y = (int *) (-33007); + y = (int *)-33007; *y = 3; trace(*y); + exit(0); } ERROR Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: Demonstrating valid memory access. @@ -40,10 +42,11 @@ BEGIN { x = (int *)alloca(sizeof (int)); - printf("Address x: %x\n", (int) x); - y = (int *) (x - 2); + printf("Address x: %x\n", (int)x); + y = (int *)(x - 2); *y = 3; - printf("Address y: %x\tValue: %d\n", (int) y, *y); + printf("Address y: %x\tValue: %d\n", (int)y, *y); + exit(0); } ERROR Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d (from r249381, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d Fri Apr 12 20:10:27 2013 (r249426, copy of r249381, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + @ = count(); + print(@); +} + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Fri Apr 12 20:10:27 2013 (r249426) @@ -20,10 +20,15 @@ */ /* - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ BEGIN { print((void)`p0); } + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d Fri Apr 12 20:10:27 2013 (r249426) @@ -20,10 +20,15 @@ */ /* - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ BEGIN { print(); } + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -39,7 +41,7 @@ */ -#pragma D option bufsize=16 +#pragma D option bufsize=32 #pragma D option bufpolicy=ring #pragma D option statusrate=1nsec Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,8 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -39,3 +40,8 @@ BEGIN trace(); } + +BEGIN +{ + exit(0); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d Fri Apr 12 20:10:27 2013 (r249426) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + @ = count(); + trace(@); +} + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d Fri Apr 12 20:10:27 2013 (r249426) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -37,3 +39,8 @@ BEGIN { trace((void)`kmem_flags); } + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d (from r249381, vendor/illumos/dist/cmd/dtrace/test/tst/common/types/tst.const.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d Fri Apr 12 20:10:27 2013 (r249426, copy of r249381, vendor/illumos/dist/cmd/dtrace/test/tst/common/types/tst.const.d) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Make sure we can scope types with modifiers. + */ + +BEGIN +{ + trace((D`int *)0); + trace((const D`int *)0); + exit(0); +} Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Fri Apr 12 20:10:27 2013 (r249426) @@ -677,6 +677,12 @@ dt_action_trace(dtrace_hdl_t *dtp, dt_no "%s( ) may not be applied to a translated pointer\n", act); } + if (dnp->dn_args->dn_kind == DT_NODE_AGG) { + dnerror(dnp->dn_args, istrace ? D_TRACE_AGG : D_PRINT_AGG, + "%s( ) may not be applied to an aggregation%s\n", act, + istrace ? "" : " -- did you mean printa()?"); + } + dt_cg(yypcb, dnp->dn_args); /* Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c Fri Apr 12 20:10:27 2013 (r249426) @@ -21,6 +21,7 @@ */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Use is subject to license terms. */ @@ -254,11 +255,6 @@ dt_decl_spec(ushort_t kind, char *name) ddp->dd_kind = kind; ddp->dd_name = name; - if (name != NULL && strchr(name, '`') != NULL) { - xyerror(D_DECL_SCOPE, "D scoping operator may not be used " - "in a type name\n"); - } - return (dt_decl_check(ddp)); } Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Fri Apr 12 19:47:32 2013 (r249425) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Fri Apr 12 20:10:27 2013 (r249426) @@ -190,8 +190,10 @@ typedef enum { D_PRINTA_AGGPROTO, /* printa() aggregation mismatch */ D_TRACE_VOID, /* trace() argument has void type */ D_TRACE_DYN, /* trace() argument has dynamic type */ + D_TRACE_AGG, /* trace() argument is an aggregation */ D_PRINT_VOID, /* print() argument has void type */ D_PRINT_DYN, /* print() argument has dynamic type */ + D_PRINT_AGG, /* print() argument is an aggregation */ D_TRACEMEM_ADDR, /* tracemem() address bad type */ D_TRACEMEM_SIZE, /* tracemem() size bad type */ D_TRACEMEM_ARGS, /* tracemem() illegal number of args */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 20:21:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8FF4C6F2; Fri, 12 Apr 2013 20:21:28 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 835E41BDD; Fri, 12 Apr 2013 20:21:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CKLSUi041180; Fri, 12 Apr 2013 20:21:28 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CKLS0i041179; Fri, 12 Apr 2013 20:21:28 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201304122021.r3CKLS0i041179@svn.freebsd.org> From: Alan Cox Date: Fri, 12 Apr 2013 20:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249427 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 20:21:28 -0000 Author: alc Date: Fri Apr 12 20:21:28 2013 New Revision: 249427 URL: http://svnweb.freebsd.org/changeset/base/249427 Log: Although we perform path compression to reduce the height of the trie and the number of interior nodes, we always create a level zero interior node at the root of every non-empty trie, even when that node is not strictly necessary, i.e., it has only one child. This change is the first step in eliminating those unnecessary level zero interior nodes. Specifically, it updates all of the lookup functions so that they do not require a level zero interior node at the root. Reviewed by: attilio, jeff (an earlier version) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Fri Apr 12 20:10:27 2013 (r249426) +++ head/sys/vm/vm_radix.c Fri Apr 12 20:21:28 2013 (r249427) @@ -270,11 +270,7 @@ vm_radix_addlev(vm_pindex_t *idx, boolea for (; levels[ilev] == FALSE || vm_radix_slot(*idx, ilev) == (VM_RADIX_COUNT - 1); ilev--) if (ilev == 0) - break; - KASSERT(ilev > 0 || levels[0], - ("%s: levels back-scanning problem", __func__)); - if (ilev == 0 && vm_radix_slot(*idx, ilev) == (VM_RADIX_COUNT - 1)) - return (1); + return (1); wrapidx = *idx; *idx = vm_radix_trimkey(*idx, ilev); *idx += VM_RADIX_UNITLEVEL(ilev); @@ -295,11 +291,7 @@ vm_radix_declev(vm_pindex_t *idx, boolea for (; levels[ilev] == FALSE || vm_radix_slot(*idx, ilev) == 0; ilev--) if (ilev == 0) - break; - KASSERT(ilev > 0 || levels[0], - ("%s: levels back-scanning problem", __func__)); - if (ilev == 0 && vm_radix_slot(*idx, ilev) == 0) - return (1); + return (1); wrapidx = *idx; *idx = vm_radix_trimkey(*idx, ilev); *idx |= VM_RADIX_UNITLEVEL(ilev) - 1; @@ -474,17 +466,16 @@ vm_radix_lookup(struct vm_radix *rtree, rnode = vm_radix_getroot(rtree); while (rnode != NULL) { - if (vm_radix_keybarr(rnode, index)) - return (NULL); - slot = vm_radix_slot(index, rnode->rn_clev); - rnode = rnode->rn_child[slot]; if (vm_radix_isleaf(rnode)) { m = vm_radix_topage(rnode); if (m->pindex == index) return (m); else - return (NULL); - } + break; + } else if (vm_radix_keybarr(rnode, index)) + break; + slot = vm_radix_slot(index, rnode->rn_clev); + rnode = rnode->rn_child[slot]; } return (NULL); } @@ -505,12 +496,21 @@ vm_radix_lookup_ge(struct vm_radix *rtre int loops = 0; #endif + rnode = vm_radix_getroot(rtree); + if (rnode == NULL) + return (NULL); + else if (vm_radix_isleaf(rnode)) { + m = vm_radix_topage(rnode); + if (m->pindex >= index) + return (m); + else + return (NULL); + } restart: KASSERT(++loops < 1000, ("%s: too many loops", __func__)); for (difflev = 0; difflev < (VM_RADIX_LIMIT + 1); difflev++) maplevels[difflev] = FALSE; - rnode = vm_radix_getroot(rtree); - while (rnode != NULL) { + for (;;) { maplevels[rnode->rn_clev] = TRUE; /* @@ -532,6 +532,7 @@ restart: } else index = vm_radix_trimkey(rnode->rn_owner, difflev); + rnode = vm_radix_getroot(rtree); goto restart; } slot = vm_radix_slot(index, rnode->rn_clev); @@ -572,6 +573,7 @@ restart: if (rnode->rn_clev == 0 || vm_radix_addlev(&index, maplevels, rnode->rn_clev - 1) > 0) break; + rnode = vm_radix_getroot(rtree); goto restart; descend: rnode = child; @@ -595,12 +597,21 @@ vm_radix_lookup_le(struct vm_radix *rtre int loops = 0; #endif + rnode = vm_radix_getroot(rtree); + if (rnode == NULL) + return (NULL); + else if (vm_radix_isleaf(rnode)) { + m = vm_radix_topage(rnode); + if (m->pindex <= index) + return (m); + else + return (NULL); + } restart: KASSERT(++loops < 1000, ("%s: too many loops", __func__)); for (difflev = 0; difflev < (VM_RADIX_LIMIT + 1); difflev++) maplevels[difflev] = FALSE; - rnode = vm_radix_getroot(rtree); - while (rnode != NULL) { + for (;;) { maplevels[rnode->rn_clev] = TRUE; /* @@ -622,6 +633,7 @@ restart: } else if (vm_radix_declev(&index, maplevels, difflev) > 0) break; + rnode = vm_radix_getroot(rtree); goto restart; } slot = vm_radix_slot(index, rnode->rn_clev); @@ -663,6 +675,7 @@ restart: if (rnode->rn_clev == 0 || vm_radix_declev(&index, maplevels, rnode->rn_clev - 1) > 0) break; + rnode = vm_radix_getroot(rtree); goto restart; descend: rnode = child; From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 20:43:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E40FFB7A; Fri, 12 Apr 2013 20:43:14 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D75311C9D; Fri, 12 Apr 2013 20:43:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CKhEEK047228; Fri, 12 Apr 2013 20:43:14 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CKhETk047227; Fri, 12 Apr 2013 20:43:14 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201304122043.r3CKhETk047227@svn.freebsd.org> From: Ryan Stone Date: Fri, 12 Apr 2013 20:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249428 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 20:43:15 -0000 Author: rstone Date: Fri Apr 12 20:43:14 2013 New Revision: 249428 URL: http://svnweb.freebsd.org/changeset/base/249428 Log: Cosmetic change: make a comment reference Sandy Bridge *Xeon* Reviewed by: sbruno MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Fri Apr 12 20:21:28 2013 (r249427) +++ head/sys/dev/hwpmc/hwpmc_core.c Fri Apr 12 20:43:14 2013 (r249428) @@ -560,7 +560,7 @@ struct iap_event_descr { #define IAP_F_SB (1 << 6) /* CPU: Sandy Bridge */ #define IAP_F_IB (1 << 7) /* CPU: Ivy Bridge */ #define IAP_F_SBX (1 << 8) /* CPU: Sandy Bridge Xeon */ -#define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge */ +#define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ #define IAP_F_HW (1 << 10) /* CPU: Haswell */ #define IAP_F_FM (1 << 11) /* Fixed mask */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 21:29:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BD2E25E8; Fri, 12 Apr 2013 21:29:37 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B0C431E4F; Fri, 12 Apr 2013 21:29:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CLTbHR060351; Fri, 12 Apr 2013 21:29:37 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CLTbTn060350; Fri, 12 Apr 2013 21:29:37 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201304122129.r3CLTbTn060350@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 12 Apr 2013 21:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249430 - head/tools/tools/umastat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 21:29:37 -0000 Author: pluknet Date: Fri Apr 12 21:29:37 2013 New Revision: 249430 URL: http://svnweb.freebsd.org/changeset/base/249430 Log: Fix build. - pass a format string to printf - catch up with constifying uz_name MFC after: 3 days Modified: head/tools/tools/umastat/umastat.c Modified: head/tools/tools/umastat/umastat.c ============================================================================== --- head/tools/tools/umastat/umastat.c Fri Apr 12 20:48:55 2013 (r249429) +++ head/tools/tools/umastat/umastat.c Fri Apr 12 21:29:37 2013 (r249430) @@ -79,7 +79,7 @@ kread(kvm_t *kvm, void *kvm_pointer, voi } static int -kread_string(kvm_t *kvm, void *kvm_pointer, char *buffer, int buflen) +kread_string(kvm_t *kvm, const void *kvm_pointer, char *buffer, int buflen) { ssize_t ret; int i; @@ -151,7 +151,7 @@ uma_print_keg_flags(struct uma_keg *ukp, if (ukp->uk_flags & flaginfo[i].fi_flag) { if (count++ > 0) printf(" | "); - printf(flaginfo[i].fi_name); + printf("%s", flaginfo[i].fi_name); } } From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 21:42:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B75B584C; Fri, 12 Apr 2013 21:42:28 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id A9B721EB1; Fri, 12 Apr 2013 21:42:27 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id ea20so2923372lab.33 for ; Fri, 12 Apr 2013 14:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1FP7XO5Y/Oq5vhl2/GSrtPxXlzZICF5YZ+a98vkpUgc=; b=0Yl6AWfbTf/jirjinj0Kf7XKddePAE1KTR+KUVmYLZNVJFU1r7uCJiI9SFm3JHIQN3 vEy+GuG/FA8Wltcwf9VsusBJSrc+beX+UejuHnbn+paSYJ1L3ItuJOtsJdQaKN/blct2 6uTTmlfqb1y7y05trn2AAGsHExbDR1Ly8DTm1J26O5LCLMUE+Az6h79t/g1yaVvimvf4 249gJ5CYP2h/pd6p9C5WeKc5WYfFa7CTgnnrgnLi9QJ+XZ7iktRX6kcgv7T3bAjEwpph QyACaCTynoc0neuNMHzFUyBQHpioiI5a+TGdL/vrnKOCPdkjhWtClEp9eNDAySIyK7Sf 0Uyg== MIME-Version: 1.0 X-Received: by 10.112.154.233 with SMTP id vr9mr5000014lbb.23.1365802946312; Fri, 12 Apr 2013 14:42:26 -0700 (PDT) Sender: nparhar@gmail.com Received: by 10.114.12.232 with HTTP; Fri, 12 Apr 2013 14:42:26 -0700 (PDT) In-Reply-To: <201304121558.r3CFwsb4059283@svn.freebsd.org> References: <201304121558.r3CFwsb4059283@svn.freebsd.org> Date: Fri, 12 Apr 2013 14:42:26 -0700 X-Google-Sender-Auth: J3iEPvJnjYaT2Idt5Oh2Phh96cg Message-ID: Subject: Re: svn commit: r249408 - head/sys/kern From: Navdeep Parhar To: "Jayachandran C." Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 21:42:28 -0000 This prevents my system from booting up properly. Backing out this change restores normal operation. The symptoms are that the kernel doesn't find the root fs itself but waits at the mountroot> prompt instead. I'm able to specify the filesystem to use and then the boot proceeds as normal. Once the system has booted up I see only two entries in kenv, indicating that something clobbered the environment. # kenv kern.devalias.ada0="ad4" kern.devalias.ada1="ad6" Regards, Navdeep On Fri, Apr 12, 2013 at 8:58 AM, Jayachandran C. wrote: > Author: jchandra > Date: Fri Apr 12 15:58:53 2013 > New Revision: 249408 > URL: http://svnweb.freebsd.org/changeset/base/249408 > > Log: > Fix kenv behavior when there is no static environment > > In case where there are no static kernel environment entries, the > function init_dynamic_kenv() adds an incorrect entry at position 0 of > the dynamic kernel environment. This in turn causes kenv(1) to print > and empty list even though there are dynamic entries added later. > > Fix this by checking env_pos in init_dynamic_kenv() and adding dynamic > entries only if there are static entries. > > Modified: > head/sys/kern/kern_environment.c > > Modified: head/sys/kern/kern_environment.c > ============================================================================== > --- head/sys/kern/kern_environment.c Fri Apr 12 15:19:35 2013 (r249407) > +++ head/sys/kern/kern_environment.c Fri Apr 12 15:58:53 2013 (r249408) > @@ -231,20 +231,23 @@ init_dynamic_kenv(void *data __unused) > kenvp = malloc((KENV_SIZE + 1) * sizeof(char *), M_KENV, > M_WAITOK | M_ZERO); > i = 0; > - for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { > - len = strlen(cp) + 1; > - if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { > - printf("WARNING: too long kenv string, ignoring %s\n", > - cp); > - continue; > + if (env_pos > 0) { > + for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { > + len = strlen(cp) + 1; > + if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { > + printf( > + "WARNING: too long kenv string, ignoring %s\n", > + cp); > + continue; > + } > + if (i < KENV_SIZE) { > + kenvp[i] = malloc(len, M_KENV, M_WAITOK); > + strcpy(kenvp[i++], cp); > + } else > + printf( > + "WARNING: too many kenv strings, ignoring %s\n", > + cp); > } > - if (i < KENV_SIZE) { > - kenvp[i] = malloc(len, M_KENV, M_WAITOK); > - strcpy(kenvp[i++], cp); > - } else > - printf( > - "WARNING: too many kenv strings, ignoring %s\n", > - cp); > } > kenvp[i] = NULL; > From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 22:05:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0A43AEB6; Fri, 12 Apr 2013 22:05:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F198C1FA0; Fri, 12 Apr 2013 22:05:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CM5F1X071845; Fri, 12 Apr 2013 22:05:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CM5FZM071844; Fri, 12 Apr 2013 22:05:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304122205.r3CM5FZM071844@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 12 Apr 2013 22:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249431 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 22:05:16 -0000 Author: des Date: Fri Apr 12 22:05:15 2013 New Revision: 249431 URL: http://svnweb.freebsd.org/changeset/base/249431 Log: Use the CONNECT method to proxy HTTPS connections through HTTP proxies. PR: bin/80176 Submitted by: Yuichiro NAITO Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Fri Apr 12 21:29:37 2013 (r249430) +++ head/lib/libfetch/http.c Fri Apr 12 22:05:15 2013 (r249431) @@ -1373,6 +1373,7 @@ http_authorize(conn_t *conn, const char static conn_t * http_connect(struct url *URL, struct url *purl, const char *flags) { + struct url *curl; conn_t *conn; int verbose; int af, val; @@ -1391,17 +1392,21 @@ http_connect(struct url *URL, struct url af = AF_INET6; #endif - if (purl && strcasecmp(URL->scheme, SCHEME_HTTPS) != 0) { - URL = purl; - } else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0) { - /* can't talk http to an ftp server */ - /* XXX should set an error code */ - return (NULL); - } + curl = (purl != NULL) ? purl : URL; - if ((conn = fetch_connect(URL->host, URL->port, af, verbose)) == NULL) + if ((conn = fetch_connect(curl->host, curl->port, af, verbose)) == NULL) /* fetch_connect() has already set an error code */ return (NULL); + if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && purl) { + http_cmd(conn, "CONNECT %s:%d HTTP/1.1", + URL->host, URL->port); + http_cmd(conn, ""); + if (http_get_reply(conn) != HTTP_OK) { + fetch_close(conn); + return (NULL); + } + http_get_reply(conn); + } if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && fetch_ssl(conn, verbose) == -1) { fetch_close(conn); From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 22:16:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 22899243; Fri, 12 Apr 2013 22:16:45 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) by mx1.freebsd.org (Postfix) with ESMTP id 39AD21FF5; Fri, 12 Apr 2013 22:16:44 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id hm14so42225wib.3 for ; Fri, 12 Apr 2013 15:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=yG7DPaqPrdR7jnQpTZZMC36XEi5OW2BoioHL8BBUl8A=; b=t7zhiraWHbpBlC3Ok5U9Jt/BctxZlZ5OJ9jXPPI8iWF5RSPC9/bSEISprbq55WQgT5 2I43PjaVXeE5rY03w/PhzqCxa9ygyQR5Z7aLGEEJe+In+GzYnTLzo4OZ4d61XrvZAMhV +m5D7ucVIA8Wrl4kqw0ePZ446B70ULgHX9odOrAJUgz70Zp6eFPBfTGa01sZzqyn5vra hvoIeBeSI73fxN7VG9CY/5HLEsHs70SjKf9LBE1034aUauFc6yPSLiFYq/AZoqMANlVP HqkAfBrmnG2lba9IvSJJ5tHuXjvaHGhn6c7zyeUX1Rw3A7ctATV1/sHPCDfsqUpNyh2X Hk1g== X-Received: by 10.194.10.129 with SMTP id i1mr20480545wjb.21.1365805003398; Fri, 12 Apr 2013 15:16:43 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPS id ed6sm337704wib.9.2013.04.12.15.16.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Apr 2013 15:16:42 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 13 Apr 2013 00:16:39 +0200 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r249431 - head/lib/libfetch Message-ID: <20130412221639.GK95891@ithaqua.etoilebsd.net> References: <201304122205.r3CM5FZM071844@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/+CTqSGWdiRg+8j" Content-Disposition: inline In-Reply-To: <201304122205.r3CM5FZM071844@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 22:16:45 -0000 --W/+CTqSGWdiRg+8j Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 12, 2013 at 10:05:15PM +0000, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Fri Apr 12 22:05:15 2013 > New Revision: 249431 > URL: http://svnweb.freebsd.org/changeset/base/249431 >=20 > Log: > Use the CONNECT method to proxy HTTPS connections through HTTP proxies. > =20 > PR: bin/80176 > Submitted by: Yuichiro NAITO >=20 I don't see any MFC period here :), does that mean you don't plan to MFC it? regards, Bapt --W/+CTqSGWdiRg+8j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFoh8cACgkQ8kTtMUmk6EyVVQCgj8Lsb3Vx43KCmmtzsvREImEV B+AAoKGt5x4zamnPg3Gd7YCkwRZxJQEx =Wkui -----END PGP SIGNATURE----- --W/+CTqSGWdiRg+8j-- From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 22:36:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F2ED67DB; Fri, 12 Apr 2013 22:36:38 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7B68414A; Fri, 12 Apr 2013 22:36:38 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id CA77C87DB; Fri, 12 Apr 2013 22:36:37 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 72B619D9A; Sat, 13 Apr 2013 00:36:37 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Subject: Re: svn commit: r249431 - head/lib/libfetch References: <201304122205.r3CM5FZM071844@svn.freebsd.org> <20130412221639.GK95891@ithaqua.etoilebsd.net> Date: Sat, 13 Apr 2013 00:36:37 +0200 In-Reply-To: <20130412221639.GK95891@ithaqua.etoilebsd.net> (Baptiste Daroussin's message of "Sat, 13 Apr 2013 00:16:39 +0200") Message-ID: <86ip3ridfu.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 22:36:39 -0000 Baptiste Daroussin writes: > I don't see any MFC period here :), does that mean you don't plan to > MFC it? No, just that I forgot to mark it. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 23:10:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1F2D4B96; Fri, 12 Apr 2013 23:10:57 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11DE723E; Fri, 12 Apr 2013 23:10:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CNAuSb092415; Fri, 12 Apr 2013 23:10:56 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CNAuet092413; Fri, 12 Apr 2013 23:10:56 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304122310.r3CNAuet092413@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 12 Apr 2013 23:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249432 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 23:10:57 -0000 Author: jkim Date: Fri Apr 12 23:10:56 2013 New Revision: 249432 URL: http://svnweb.freebsd.org/changeset/base/249432 Log: Unbreak tinderbox build after r249420. Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Apr 12 22:05:15 2013 (r249431) +++ head/sys/conf/files.amd64 Fri Apr 12 23:10:56 2013 (r249432) @@ -221,7 +221,6 @@ dev/nvme/nvme_ns_cmd.c optional nvme dev/nvme/nvme_qpair.c optional nvme dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme -dev/nvme/nvme_uio.c optional nvme dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional random rdrand_rng dev/random/nehemiah.c optional random padlock_rng Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Apr 12 22:05:15 2013 (r249431) +++ head/sys/conf/files.i386 Fri Apr 12 23:10:56 2013 (r249432) @@ -233,7 +233,6 @@ dev/nvme/nvme_ns_cmd.c optional nvme dev/nvme/nvme_qpair.c optional nvme dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme -dev/nvme/nvme_uio.c optional nvme dev/nvram/nvram.c optional nvram isa dev/pcf/pcf_isa.c optional pcf dev/random/ivy.c optional random rdrand_rng From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 23:16:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 850CCEA5; Fri, 12 Apr 2013 23:16:51 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 99AC1287; Fri, 12 Apr 2013 23:16:50 +0000 (UTC) Received: by mail-ea0-f170.google.com with SMTP id a15so1493680eae.29 for ; Fri, 12 Apr 2013 16:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=uQ8z1G9i9cvsVdU9svXNiK8FxnA6hKKsM8mWpm0yF2k=; b=d9qx3NYU8+34C3f0nS5X7KYft/60HjR4FtY1M/ks3ds/dNlDKMnG7eOd46k7Bftv7j y+vTzzpF0HHw4YvvFOHYBynXKJvA0t2Lg3TbqLNWqDLHwvGTsHj/ciscC8YcI5+cM0C4 bbfuB+rkOfTUWqhf9jx+FnE+vPbmsBiUXkQGuYU+j668GVGZARfU+7sypLOjO/+u1Pjo 1ufpSR3I6pjJA+JgSytUbFPo27wEuCGGlb4X/GyVXcONeaL+Lc5LU1HjJMQsb+uiPadV 4FY6XnTHRaEWd0zuELvQuzACDXJ3YztjYyA0dnAqlMS+jeEVJFiolC++8WuQ0lusCiQj qR8g== MIME-Version: 1.0 X-Received: by 10.15.99.201 with SMTP id bl49mr32546373eeb.43.1365808609706; Fri, 12 Apr 2013 16:16:49 -0700 (PDT) Received: by 10.14.96.129 with HTTP; Fri, 12 Apr 2013 16:16:49 -0700 (PDT) In-Reply-To: <201304122310.r3CNAuet092413@svn.freebsd.org> References: <201304122310.r3CNAuet092413@svn.freebsd.org> Date: Fri, 12 Apr 2013 16:16:49 -0700 Message-ID: Subject: Re: svn commit: r249432 - head/sys/conf From: Jim Harris To: Jung-uk Kim Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 23:16:51 -0000 On Fri, Apr 12, 2013 at 4:10 PM, Jung-uk Kim wrote: > Author: jkim > Date: Fri Apr 12 23:10:56 2013 > New Revision: 249432 > URL: http://svnweb.freebsd.org/changeset/base/249432 > > Log: > Unbreak tinderbox build after r249420. > > Modified: > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > > Pointy hat to: jimharris From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 02:55:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AFCD28A8; Sat, 13 Apr 2013 02:55:06 +0000 (UTC) (envelope-from poyopoyo@puripuri.plala.or.jp) Received: from msa04b.plala.or.jp (msa04.plala.or.jp [58.93.240.4]) by mx1.freebsd.org (Postfix) with ESMTP id E5890A62; Sat, 13 Apr 2013 02:55:05 +0000 (UTC) Received: from i58-95-187-135.s02.a026.ap.plala.or.jp ([58.95.187.135]) by msa04b.plala.or.jp with ESMTP id <20130413025449.UYRM10966.msa04b.plala.or.jp@i58-95-187-135.s02.a026.ap.plala.or.jp>; Sat, 13 Apr 2013 11:54:49 +0900 Date: Sat, 13 Apr 2013 11:54:49 +0900 Message-ID: <86a9p3rvgm.wl%poyopoyo@puripuri.plala.or.jp> From: poyopoyo@puripuri.plala.or.jp To: Ryan Stone Subject: Re: svn commit: r249428 - head/sys/dev/hwpmc In-Reply-To: <201304122043.r3CKhETk047227@svn.freebsd.org> References: <201304122043.r3CKhETk047227@svn.freebsd.org> Mail-Followup-To: Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, poyopoyo@puripuri.plala.or.jp User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.8 Emacs/24.3 (amd64-portbld-freebsd10.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-VirusScan: Outbound; msa04b; Sat, 13 Apr 2013 11:54:49 +0900 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 02:55:06 -0000 At Fri, 12 Apr 2013 20:43:14 +0000 (UTC), Ryan Stone wrote: > Cosmetic change: make a comment reference Sandy Bridge *Xeon* .. > #define IAP_F_SBX (1 << 8) /* CPU: Sandy Bridge Xeon */ > -#define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge */ > +#define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ > #define IAP_F_HW (1 << 10) /* CPU: Haswell */ .. and *Ivy* Bridge Xeon? :) From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 05:11:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C54DB6C2; Sat, 13 Apr 2013 05:11:21 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B8263F7B; Sat, 13 Apr 2013 05:11:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3D5BLUD003363; Sat, 13 Apr 2013 05:11:21 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3D5BLjp003362; Sat, 13 Apr 2013 05:11:21 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304130511.r3D5BLjp003362@svn.freebsd.org> From: Neel Natu Date: Sat, 13 Apr 2013 05:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249435 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 05:11:21 -0000 Author: neel Date: Sat Apr 13 05:11:21 2013 New Revision: 249435 URL: http://svnweb.freebsd.org/changeset/base/249435 Log: Use the MAKEDEV_CHECKNAME flag to check for an invalid device name and return an error instead of panicking. Obtained from: NetApp Modified: head/sys/amd64/vmm/vmm_dev.c Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Sat Apr 13 02:15:59 2013 (r249434) +++ head/sys/amd64/vmm/vmm_dev.c Sat Apr 13 05:11:21 2013 (r249435) @@ -497,8 +497,12 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) return (EEXIST); } - sc->cdev = make_dev(&vmmdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "vmm/%s", buf); + error = make_dev_p(MAKEDEV_CHECKNAME, &sc->cdev, &vmmdevsw, NULL, + UID_ROOT, GID_WHEEL, 0600, "vmm/%s", buf); + if (error != 0) { + vmmdev_destroy(sc, TRUE); + return (error); + } sc->cdev->si_drv1 = sc; return (0); From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 05:51:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E577399D; Sat, 13 Apr 2013 05:51:20 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 98D55A4; Sat, 13 Apr 2013 05:51:20 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id c10so4206760ieb.3 for ; Fri, 12 Apr 2013 22:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=6ED90G7qgUq7NHR2FYM1L8u2oq70/VtFKB77BwHHWB0=; b=0xTaS7rBWTrPKZ6ZyNsApPW4202WwfJKcw5aetzrls5x+oY/K7n0qszkebgbaIaxxU ToWX2L6wTbxJxRFdVz24soJrKMWupEFIhecA+mEjRZsaCGYnPzeiJxXZiesggXGjIHTT MfDKkswnzT5L3qv2ub6lcVSAbFNY3NqYmAq6PWudaK8vdPHyd4ANcngG3kLHu3R2Irjr LNfMuABLPBu0FsyyKqjpGRe9Zt2rp9tKRvTveCplH//329o7J9t8n2eN78ASIVUhO4vf 46OSN5UXSQlHxgRlT4ELS8k0YDX0XK5NgyFYvYaXWky/SPUyIT5HqksU5hzkFry3WLhr ZCTQ== MIME-Version: 1.0 X-Received: by 10.50.67.18 with SMTP id j18mr855825igt.110.1365832280271; Fri, 12 Apr 2013 22:51:20 -0700 (PDT) Sender: c.jayachandran@gmail.com Received: by 10.64.138.67 with HTTP; Fri, 12 Apr 2013 22:51:20 -0700 (PDT) In-Reply-To: References: <201304121558.r3CFwsb4059283@svn.freebsd.org> Date: Sat, 13 Apr 2013 11:21:20 +0530 X-Google-Sender-Auth: esT9v_i4AUvX-Br07t9B8GAaN4M Message-ID: Subject: Re: svn commit: r249408 - head/sys/kern From: "Jayachandran C." To: Navdeep Parhar Content-Type: multipart/mixed; boundary=047d7bdc0532e3711204da379be5 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 05:51:21 -0000 --047d7bdc0532e3711204da379be5 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Apr 13, 2013 at 3:12 AM, Navdeep Parhar wrote: > This prevents my system from booting up properly. Backing out this > change restores normal operation. > > The symptoms are that the kernel doesn't find the root fs itself but > waits at the mountroot> prompt instead. I'm able to specify the > filesystem to use and then the boot proceeds as normal. Once the > system has booted up I see only two entries in kenv, indicating that > something clobbered the environment. > > # kenv > kern.devalias.ada0="ad4" > kern.devalias.ada1="ad6" > > After looking at the changes again, I realized that most architectures do not update the env_pos when they setup kern_envp. If there are no objections, I will check-in the attached change, otherwise I will revert this commit. Thanks for reporting this, and sorry for the mess. JC. > On Fri, Apr 12, 2013 at 8:58 AM, Jayachandran C. > wrote: > > Author: jchandra > > Date: Fri Apr 12 15:58:53 2013 > > New Revision: 249408 > > URL: http://svnweb.freebsd.org/changeset/base/249408 > > > > Log: > > Fix kenv behavior when there is no static environment > > > > In case where there are no static kernel environment entries, the > > function init_dynamic_kenv() adds an incorrect entry at position 0 of > > the dynamic kernel environment. This in turn causes kenv(1) to print > > and empty list even though there are dynamic entries added later. > > > > Fix this by checking env_pos in init_dynamic_kenv() and adding dynamic > > entries only if there are static entries. > > > > Modified: > > head/sys/kern/kern_environment.c > > > > Modified: head/sys/kern/kern_environment.c > > > ============================================================================== > > --- head/sys/kern/kern_environment.c Fri Apr 12 15:19:35 2013 > (r249407) > > +++ head/sys/kern/kern_environment.c Fri Apr 12 15:58:53 2013 > (r249408) > > @@ -231,20 +231,23 @@ init_dynamic_kenv(void *data __unused) > > kenvp = malloc((KENV_SIZE + 1) * sizeof(char *), M_KENV, > > M_WAITOK | M_ZERO); > > i = 0; > > - for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { > > - len = strlen(cp) + 1; > > - if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { > > - printf("WARNING: too long kenv string, ignoring > %s\n", > > - cp); > > - continue; > > + if (env_pos > 0) { > > + for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { > > + len = strlen(cp) + 1; > > + if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { > > + printf( > > + "WARNING: too long kenv string, ignoring > %s\n", > > + cp); > > + continue; > > + } > > + if (i < KENV_SIZE) { > > + kenvp[i] = malloc(len, M_KENV, M_WAITOK); > > + strcpy(kenvp[i++], cp); > > + } else > > + printf( > > + "WARNING: too many kenv strings, > ignoring %s\n", > > + cp); > > } > > - if (i < KENV_SIZE) { > > - kenvp[i] = malloc(len, M_KENV, M_WAITOK); > > - strcpy(kenvp[i++], cp); > > - } else > > - printf( > > - "WARNING: too many kenv strings, ignoring > %s\n", > > - cp); > > } > > kenvp[i] = NULL; > > > --047d7bdc0532e3711204da379be5 Content-Type: application/octet-stream; name="kenv-fix.diff" Content-Disposition: attachment; filename="kenv-fix.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hfgcmq3w0 SW5kZXg6IHN5cy9rZXJuL2tlcm5fZW52aXJvbm1lbnQuYwo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMva2Vy bi9rZXJuX2Vudmlyb25tZW50LmMJKHJldmlzaW9uIDI0OTQwOCkKKysrIHN5cy9rZXJuL2tlcm5f ZW52aXJvbm1lbnQuYwkod29ya2luZyBjb3B5KQpAQCAtMjMxLDcgKzIzMSw3IEBACiAJa2VudnAg PSBtYWxsb2MoKEtFTlZfU0laRSArIDEpICogc2l6ZW9mKGNoYXIgKiksIE1fS0VOViwKIAkJTV9X QUlUT0sgfCBNX1pFUk8pOwogCWkgPSAwOwotCWlmIChlbnZfcG9zID4gMCkgeworCWlmICgqa2Vy bl9lbnZwICE9ICdcMCcpIHsKIAkJZm9yIChjcCA9IGtlcm5fZW52cDsgY3AgIT0gTlVMTDsgY3Ag PSBrZXJuZW52X25leHQoY3ApKSB7CiAJCQlsZW4gPSBzdHJsZW4oY3ApICsgMTsKIAkJCWlmIChs ZW4gPiBLRU5WX01OQU1FTEVOICsgMSArIEtFTlZfTVZBTExFTiArIDEpIHsK --047d7bdc0532e3711204da379be5-- From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 07:23:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5066499A; Sat, 13 Apr 2013 07:23:38 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 42A5036D; Sat, 13 Apr 2013 07:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3D7NbQG042464; Sat, 13 Apr 2013 07:23:37 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3D7Nbnr042463; Sat, 13 Apr 2013 07:23:37 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201304130723.r3D7Nbnr042463@svn.freebsd.org> From: "Jayachandran C." Date: Sat, 13 Apr 2013 07:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249436 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 07:23:38 -0000 Author: jchandra Date: Sat Apr 13 07:23:37 2013 New Revision: 249436 URL: http://svnweb.freebsd.org/changeset/base/249436 Log: Fix changes made in r249408. In some cases, kern_envp is set by the architecture code and env_pos does not contain the length of the static kernel environment. In these cases r249408 causes the kernel to discard the environment. Fix this by updating the check for empty static env to *kern_envp != '\0' Reported by: np@ Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Sat Apr 13 05:11:21 2013 (r249435) +++ head/sys/kern/kern_environment.c Sat Apr 13 07:23:37 2013 (r249436) @@ -231,7 +231,7 @@ init_dynamic_kenv(void *data __unused) kenvp = malloc((KENV_SIZE + 1) * sizeof(char *), M_KENV, M_WAITOK | M_ZERO); i = 0; - if (env_pos > 0) { + if (*kern_envp != '\0') { for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) { len = strlen(cp) + 1; if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 14:03:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 92A931B5; Sat, 13 Apr 2013 14:03:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 853746A8; Sat, 13 Apr 2013 14:03:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DE3iTf062730; Sat, 13 Apr 2013 14:03:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DE3iPB062729; Sat, 13 Apr 2013 14:03:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304131403.r3DE3iPB062729@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Apr 2013 14:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249438 - head/sys/cam/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 14:03:44 -0000 Author: mav Date: Sat Apr 13 14:03:44 2013 New Revision: 249438 URL: http://svnweb.freebsd.org/changeset/base/249438 Log: MFprojects/camlock r248894: Use full freeze while PMP does hard reset. This is only cosmetical change. Modified: head/sys/cam/ata/ata_pmp.c Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Sat Apr 13 10:31:45 2013 (r249437) +++ head/sys/cam/ata/ata_pmp.c Sat Apr 13 14:03:44 2013 (r249438) @@ -190,8 +190,7 @@ pmpfreeze(struct cam_periph *periph, int i, 0) == CAM_REQ_CMP) { softc->frozen |= (1 << i); xpt_acquire_device(dpath->device); - cam_freeze_devq_arg(dpath, - RELSIM_RELEASE_RUNLEVEL, CAM_RL_BUS + 1); + cam_freeze_devq(dpath); xpt_free_path(dpath); } } @@ -212,8 +211,7 @@ pmprelease(struct cam_periph *periph, in xpt_path_path_id(periph->path), i, 0) == CAM_REQ_CMP) { softc->frozen &= ~(1 << i); - cam_release_devq(dpath, - RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_BUS + 1, FALSE); + cam_release_devq(dpath, 0, 0, 0, FALSE); xpt_release_device(dpath->device); xpt_free_path(dpath); } From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 15:20:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C63357AB; Sat, 13 Apr 2013 15:20:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B7DC98CA; Sat, 13 Apr 2013 15:20:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DFKXRr086474; Sat, 13 Apr 2013 15:20:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DFKXoW086472; Sat, 13 Apr 2013 15:20:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304131520.r3DFKXoW086472@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 13 Apr 2013 15:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249439 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 15:20:33 -0000 Author: kib Date: Sat Apr 13 15:20:33 2013 New Revision: 249439 URL: http://svnweb.freebsd.org/changeset/base/249439 Log: Fix the name of the pcb member in the comments. Submitted by: Oliver Pinter MFC after: 3 days Modified: head/sys/amd64/amd64/support.S head/sys/i386/i386/support.s Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Sat Apr 13 14:03:44 2013 (r249438) +++ head/sys/amd64/amd64/support.S Sat Apr 13 15:20:33 2013 (r249439) @@ -200,9 +200,9 @@ END(fillw) * Access user memory from inside the kernel. These routines should be * the only places that do this. * - * These routines set curpcb->onfault for the time they execute. When a + * These routines set curpcb->pcb_onfault for the time they execute. When a * protection violation occurs inside the functions, the trap handler - * returns to *curpcb->onfault instead of the function. + * returns to *curpcb->pcb_onfault instead of the function. */ /* Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Sat Apr 13 14:03:44 2013 (r249438) +++ head/sys/i386/i386/support.s Sat Apr 13 15:20:33 2013 (r249439) @@ -262,9 +262,9 @@ END(memcpy) * write permissions when we are executing with EPL 0. The 486 does check * this if the WP bit is set in CR0, so we can use a simpler version here. * - * These routines set curpcb->onfault for the time they execute. When a + * These routines set curpcb->pcb_onfault for the time they execute. When a * protection violation occurs inside the functions, the trap handler - * returns to *curpcb->onfault instead of the function. + * returns to *curpcb->pcb_onfault instead of the function. */ /* From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 17:07:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F002A1F4 for ; Sat, 13 Apr 2013 17:07:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) by mx1.freebsd.org (Postfix) with ESMTP id BA871BE6 for ; Sat, 13 Apr 2013 17:07:05 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id un3so3213444obb.11 for ; Sat, 13 Apr 2013 10:07:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=NNI6lW6x2kM+GuGCPAh1cQRHg0g9+ZSdk2EUvfwmJOs=; b=QIpYHSd4gDLD48U1n48lcEByztMxjZogZW1tShv3VMbPRZgeUmqFmjQSHVfopER5Jb tPVHl20kfzBiKtZYCnscPK8CC5G0jxocyCQoViXMVbBakfgviqgpkjpm20YvfdG3iVPp oiaypqE/4yLxpOZNQDlE2rISoWb6XMYb/8Oosv0TXp7AfW47Brm/hx61+DE6yVB8eCXC NVHgv+0r6MSFx9Sf5ggcu1pFbfCpU39W1P2D8fTYzQC+8oyG6S+e2hAH75A14TljRpsN Phhl/Z54f6Z4M6Utzcq+5JOxQBRtsA74cEqmgIKlYUngzNjPpm7hoa/acR1wnk8nOlSZ 5QhA== X-Received: by 10.60.3.71 with SMTP id a7mr5368028oea.35.1365872825155; Sat, 13 Apr 2013 10:07:05 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id s4sm2397561obx.7.2013.04.13.10.07.02 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Apr 2013 10:07:03 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r249432 - head/sys/conf Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sat, 13 Apr 2013 11:07:00 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <2546B68A-9C60-40C3-96D1-C44FE3B64F1F@bsdimp.com> References: <201304122310.r3CNAuet092413@svn.freebsd.org> To: Jim Harris X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQnxtlPKWnwewdfUoupODw+4LmbxRyCW+H79VQ7kMdH0jhpCu/qi2BT1BrCM12RQ/MioC0y3 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 17:07:06 -0000 I'm curious why this is in files.amd64 / files.i386, and not just in = files. Is there really things that are x86 specific in there still Warner On Apr 12, 2013, at 5:16 PM, Jim Harris wrote: >=20 >=20 >=20 > On Fri, Apr 12, 2013 at 4:10 PM, Jung-uk Kim wrote: > Author: jkim > Date: Fri Apr 12 23:10:56 2013 > New Revision: 249432 > URL: http://svnweb.freebsd.org/changeset/base/249432 >=20 > Log: > Unbreak tinderbox build after r249420. >=20 > Modified: > head/sys/conf/files.amd64 > head/sys/conf/files.i386 >=20 >=20 > Pointy hat to: jimharris >=20 From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 18:05:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 55BF0DE; Sat, 13 Apr 2013 18:05:10 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-ea0-x22b.google.com (mail-ea0-x22b.google.com [IPv6:2a00:1450:4013:c01::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 695C5E93; Sat, 13 Apr 2013 18:05:09 +0000 (UTC) Received: by mail-ea0-f171.google.com with SMTP id b15so1624380eae.30 for ; Sat, 13 Apr 2013 11:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=jPBPXKkEXkmEjs7AfLSDY6+p8QSBVmMMPKF9i6rJ/8c=; b=dkvkpG6aCkn8tzujbCrnBRiwanW1zLsWJLU2YDgqG6XI2fn0tMcwxi0BasYMOm2LW2 kXYy9vBvV76TSNKIknYHYvo8426kUOSCymZ81LWBjZJiXUBGZ5aV3YDNECIuabLouYaA 9PYN2WDNOUxuUXcIzwYL+stTuUID+rdSzUoyoojOdZ0aNO9WCNx1vRJAiYBoUMFqu4t0 UzdZbGWAVkeZkl4aJ1M19jMN8fPOSTj1Fo/5mbBTmtMvyR3E2/zahWsKq3JY/AQH2im3 0nUh12b+IwJLtfk+GcBuBog7DyATO+uXJhmjci3Ht4YwpLFyitkLZujOYrhFHGZXr/QH ewGw== MIME-Version: 1.0 X-Received: by 10.14.39.5 with SMTP id c5mr42294982eeb.27.1365876308517; Sat, 13 Apr 2013 11:05:08 -0700 (PDT) Received: by 10.14.96.129 with HTTP; Sat, 13 Apr 2013 11:05:08 -0700 (PDT) In-Reply-To: <2546B68A-9C60-40C3-96D1-C44FE3B64F1F@bsdimp.com> References: <201304122310.r3CNAuet092413@svn.freebsd.org> <2546B68A-9C60-40C3-96D1-C44FE3B64F1F@bsdimp.com> Date: Sat, 13 Apr 2013 11:05:08 -0700 Message-ID: Subject: Re: svn commit: r249432 - head/sys/conf From: Jim Harris To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 18:05:10 -0000 On Sat, Apr 13, 2013 at 10:07 AM, Warner Losh wrote: > I'm curious why this is in files.amd64 / files.i386, and not just in > files. Is there really things that are x86 specific in there still > > There are a few areas that need to be addressed to get the NVM Express drivers running on other architectures - namely DMA sync operations and endianness. If someone has NVM Express hardware, is interested in non-x86 architectures, and is willing to test, I'd be happy to provide some initial patches. But until then I though it was best to only enable these drivers on amd64 and i386. -Jim > Warner > > On Apr 12, 2013, at 5:16 PM, Jim Harris wrote: > > > > > > > > > On Fri, Apr 12, 2013 at 4:10 PM, Jung-uk Kim wrote: > > Author: jkim > > Date: Fri Apr 12 23:10:56 2013 > > New Revision: 249432 > > URL: http://svnweb.freebsd.org/changeset/base/249432 > > > > Log: > > Unbreak tinderbox build after r249420. > > > > Modified: > > head/sys/conf/files.amd64 > > head/sys/conf/files.i386 > > > > > > Pointy hat to: jimharris > > > > From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 19:02:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B233FEB1; Sat, 13 Apr 2013 19:02:58 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A531A1020; Sat, 13 Apr 2013 19:02:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DJ2wZa053262; Sat, 13 Apr 2013 19:02:58 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DJ2wwX053257; Sat, 13 Apr 2013 19:02:58 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201304131902.r3DJ2wwX053257@svn.freebsd.org> From: John-Mark Gurney Date: Sat, 13 Apr 2013 19:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249440 - head/sys/geom/nop X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 19:02:58 -0000 Author: jmg Date: Sat Apr 13 19:02:58 2013 New Revision: 249440 URL: http://svnweb.freebsd.org/changeset/base/249440 Log: move the error report to a lower log level... Now you can see when it returns an error without getting every single io that went through it.. MFC after: 1 week Modified: head/sys/geom/nop/g_nop.c head/sys/geom/nop/g_nop.h Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Sat Apr 13 15:20:33 2013 (r249439) +++ head/sys/geom/nop/g_nop.c Sat Apr 13 19:02:58 2013 (r249440) @@ -124,7 +124,7 @@ g_nop_start(struct bio *bp) rval = arc4random() % 100; if (rval < failprob) { - G_NOP_LOGREQ(bp, "Returning error=%d.", sc->sc_error); + G_NOP_LOGREQLVL(1, bp, "Returning error=%d.", sc->sc_error); g_io_deliver(bp, sc->sc_error); return; } Modified: head/sys/geom/nop/g_nop.h ============================================================================== --- head/sys/geom/nop/g_nop.h Sat Apr 13 15:20:33 2013 (r249439) +++ head/sys/geom/nop/g_nop.h Sat Apr 13 19:02:58 2013 (r249440) @@ -44,9 +44,10 @@ printf("\n"); \ } \ } while (0) -#define G_NOP_LOGREQ(bp, ...) do { \ - if (g_nop_debug >= 2) { \ - printf("GEOM_NOP[2]: "); \ +#define G_NOP_LOGREQ(bp, ...) G_NOP_LOGREQLVL(2, bp, __VA_ARGS__) +#define G_NOP_LOGREQLVL(lvl, bp, ...) do { \ + if (g_nop_debug >= (lvl)) { \ + printf("GEOM_NOP[%d]: ", (lvl)); \ printf(__VA_ARGS__); \ printf(" "); \ g_print_bio(bp); \ From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 21:21:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4B3C2E2B; Sat, 13 Apr 2013 21:21:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2EDE0149A; Sat, 13 Apr 2013 21:21:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DLLFWB096190; Sat, 13 Apr 2013 21:21:15 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DLLD8o096179; Sat, 13 Apr 2013 21:21:13 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304132121.r3DLLD8o096179@svn.freebsd.org> From: Dimitry Andric Date: Sat, 13 Apr 2013 21:21:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249449 - in head/sys: arm/allwinner arm/broadcom/bcm2835 arm/freescale/imx arm/xscale/ixp425 mips/atheros mips/cavium mips/rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 21:21:15 -0000 Author: dim Date: Sat Apr 13 21:21:13 2013 New Revision: 249449 URL: http://svnweb.freebsd.org/changeset/base/249449 Log: Fix undefined behaviour in several gpio_pin_setflags() routines (under sys/arm and sys/mips), squelching the clang 3.3 warnings about this. Noticed by: tinderbox and many irate spectators Submitted by: Luiz Otavio O Souza PR: kern/177759 MFC after: 3 days Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/freescale/imx/imx51_gpio.c head/sys/arm/xscale/ixp425/avila_gpio.c head/sys/arm/xscale/ixp425/cambria_gpio.c head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/cavium/octeon_gpio.c head/sys/mips/rt305x/rt305x_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/arm/allwinner/a10_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -300,8 +300,8 @@ a10_gpio_pin_setflags(device_t dev, uint if (i >= sc->sc_gpio_npins) return (EINVAL); - /* Filter out unwanted flags. */ - if ((flags &= sc->sc_gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together. */ Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -385,8 +385,8 @@ bcm_gpio_pin_setflags(device_t dev, uint if (bcm_gpio_pin_is_ro(sc, pin)) return (EINVAL); - /* Filter out unwanted flags. */ - if ((flags &= sc->sc_gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together. */ Modified: head/sys/arm/freescale/imx/imx51_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/arm/freescale/imx/imx51_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -261,8 +261,8 @@ imx51_gpio_pin_setflags(device_t dev, ui if (i >= sc->gpio_npins) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: head/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/arm/xscale/ixp425/avila_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -220,8 +220,8 @@ avila_gpio_pin_setflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->sc_pins[pin].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->sc_pins[pin].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/cambria_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/arm/xscale/ixp425/cambria_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -317,8 +317,8 @@ cambria_gpio_pin_setflags(device_t dev, if (pin >= GPIO_PINS) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->sc_pins[pin].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->sc_pins[pin].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/mips/atheros/ar71xx_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -219,8 +219,8 @@ ar71xx_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: head/sys/mips/cavium/octeon_gpio.c ============================================================================== --- head/sys/mips/cavium/octeon_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/mips/cavium/octeon_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -219,8 +219,8 @@ octeon_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: head/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- head/sys/mips/rt305x/rt305x_gpio.c Sat Apr 13 21:17:43 2013 (r249448) +++ head/sys/mips/rt305x/rt305x_gpio.c Sat Apr 13 21:21:13 2013 (r249449) @@ -242,8 +242,8 @@ rt305x_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 21:41:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5D8214E6; Sat, 13 Apr 2013 21:41:52 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4E93D154E; Sat, 13 Apr 2013 21:41:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DLfqhF002236; Sat, 13 Apr 2013 21:41:52 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DLfqTe002235; Sat, 13 Apr 2013 21:41:52 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201304132141.r3DLfqTe002235@svn.freebsd.org> From: Neel Natu Date: Sat, 13 Apr 2013 21:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249450 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 21:41:52 -0000 Author: neel Date: Sat Apr 13 21:41:51 2013 New Revision: 249450 URL: http://svnweb.freebsd.org/changeset/base/249450 Log: Create sysctl node 'hw.vmm.vmx' and populate it with oids that expose the VMX hardware capabilities. Obtained from: NetApp Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Apr 13 21:21:13 2013 (r249449) +++ head/sys/amd64/vmm/intel/vmx.c Sat Apr 13 21:41:51 2013 (r249450) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -116,6 +117,9 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_VMX, "vmx", "vmx"); +SYSCTL_DECL(_hw_vmm); +SYSCTL_NODE(_hw_vmm, OID_AUTO, vmx, CTLFLAG_RW, NULL, NULL); + int vmxon_enabled[MAXCPU]; static char vmxon_region[MAXCPU][PAGE_SIZE] __aligned(PAGE_SIZE); @@ -123,12 +127,25 @@ static uint32_t pinbased_ctls, procbased static uint32_t exit_ctls, entry_ctls; static uint64_t cr0_ones_mask, cr0_zeros_mask; +SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr0_ones_mask, CTLFLAG_RD, + &cr0_ones_mask, 0, NULL); +SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr0_zeros_mask, CTLFLAG_RD, + &cr0_zeros_mask, 0, NULL); + static uint64_t cr4_ones_mask, cr4_zeros_mask; +SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_ones_mask, CTLFLAG_RD, + &cr4_ones_mask, 0, NULL); +SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_zeros_mask, CTLFLAG_RD, + &cr4_zeros_mask, 0, NULL); static volatile u_int nextvpid; static int vmx_no_patmsr; +static int vmx_initialized; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, initialized, CTLFLAG_RD, + &vmx_initialized, 0, "Intel VMX initialized"); + /* * Virtual NMI blocking conditions. * @@ -593,6 +610,8 @@ vmx_init(void) /* enable VMX operation */ smp_rendezvous(NULL, vmx_enable, NULL, NULL); + vmx_initialized = 1; + return (0); } From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 22:44:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B476BC47; Sat, 13 Apr 2013 22:44:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A48F71685; Sat, 13 Apr 2013 22:44:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DMio5o021015; Sat, 13 Apr 2013 22:44:50 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DMin08021009; Sat, 13 Apr 2013 22:44:49 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304132244.r3DMin08021009@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 13 Apr 2013 22:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249453 - in head/contrib/ldns: compat ldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 22:44:50 -0000 Author: des Date: Sat Apr 13 22:44:48 2013 New Revision: 249453 URL: http://svnweb.freebsd.org/changeset/base/249453 Log: Clean up the ntop / pton code. Part of a patch which has been submitted upstream but not yet adopted. Modified: head/contrib/ldns/compat/b32_ntop.c head/contrib/ldns/compat/b32_pton.c head/contrib/ldns/compat/b64_ntop.c head/contrib/ldns/compat/b64_pton.c head/contrib/ldns/ldns/config.h head/contrib/ldns/ldns/util.h Modified: head/contrib/ldns/compat/b32_ntop.c ============================================================================== --- head/contrib/ldns/compat/b32_ntop.c Sat Apr 13 22:30:02 2013 (r249452) +++ head/contrib/ldns/compat/b32_ntop.c Sat Apr 13 22:44:48 2013 (r249453) @@ -40,6 +40,7 @@ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #include +#ifndef HAVE_B32_NTOP #include #include @@ -61,6 +62,8 @@ #include +#include + static const char Base32[] = "abcdefghijklmnopqrstuvwxyz234567"; /* "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";*/ @@ -171,7 +174,7 @@ static const char Pad32 = '='; */ -int +static int ldns_b32_ntop_ar(uint8_t const *src, size_t srclength, char *target, size_t targsize, const char B32_ar[]) { size_t datalength = 0; uint8_t input[5]; @@ -331,3 +334,4 @@ b32_ntop_extended_hex(uint8_t const *src return ldns_b32_ntop_ar(src, srclength, target, targsize, Base32_extended_hex); } +#endif /* !HAVE_B32_NTOP */ Modified: head/contrib/ldns/compat/b32_pton.c ============================================================================== --- head/contrib/ldns/compat/b32_pton.c Sat Apr 13 22:30:02 2013 (r249452) +++ head/contrib/ldns/compat/b32_pton.c Sat Apr 13 22:44:48 2013 (r249453) @@ -40,6 +40,7 @@ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #include +#ifndef HAVE_B32_PTON #include #include @@ -59,6 +60,8 @@ #include #include +#include + /* "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";*/ static const char Base32[] = "abcdefghijklmnopqrstuvwxyz234567"; @@ -174,7 +177,7 @@ static const char Pad32 = '='; it returns the number of data bytes stored at the target, or -1 on error. */ -int +static int ldns_b32_pton_ar(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize, const char B32_ar[]) { int tarindex, state, ch; @@ -385,3 +388,5 @@ b32_pton_extended_hex(char const *src, s { return ldns_b32_pton_ar(src, hashed_owner_str_len, target, targsize, Base32_extended_hex); } + +#endif /* !HAVE_B32_PTON */ Modified: head/contrib/ldns/compat/b64_ntop.c ============================================================================== --- head/contrib/ldns/compat/b64_ntop.c Sat Apr 13 22:30:02 2013 (r249452) +++ head/contrib/ldns/compat/b64_ntop.c Sat Apr 13 22:44:48 2013 (r249453) @@ -40,6 +40,7 @@ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #include +#ifndef HAVE_B64_NTOP #include #include @@ -59,6 +60,8 @@ #include #include +#include + #define Assert(Cond) if (!(Cond)) abort() static const char Base64[] = @@ -200,3 +203,5 @@ ldns_b64_ntop(uint8_t const *src, size_t target[datalength] = '\0'; /* Returned value doesn't count \0. */ return (int) (datalength); } + +#endif /* !HAVE_B64_NTOP */ Modified: head/contrib/ldns/compat/b64_pton.c ============================================================================== --- head/contrib/ldns/compat/b64_pton.c Sat Apr 13 22:30:02 2013 (r249452) +++ head/contrib/ldns/compat/b64_pton.c Sat Apr 13 22:44:48 2013 (r249453) @@ -40,6 +40,7 @@ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #include +#ifndef HAVE_B64_PTON #include #include @@ -59,7 +60,7 @@ #include #include -#define Assert(Cond) if (!(Cond)) abort() +#include static const char Base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -258,3 +259,5 @@ ldns_b64_pton(char const *src, uint8_t * return (tarindex); } + +#endif /* !HAVE_B64_PTON */ Modified: head/contrib/ldns/ldns/config.h ============================================================================== --- head/contrib/ldns/ldns/config.h Sat Apr 13 22:30:02 2013 (r249452) +++ head/contrib/ldns/ldns/config.h Sat Apr 13 22:44:48 2013 (r249453) @@ -489,30 +489,6 @@ extern "C" { #endif -#ifndef B64_PTON -int ldns_b64_ntop(uint8_t const *src, size_t srclength, - char *target, size_t targsize); -/** - * calculates the size needed to store the result of b64_ntop - */ -/*@unused@*/ -static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize) -{ - return ((((srcsize + 2) / 3) * 4) + 1); -} -#endif /* !B64_PTON */ -#ifndef B64_NTOP -int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize); -/** - * calculates the size needed to store the result of ldns_b64_pton - */ -/*@unused@*/ -static inline size_t ldns_b64_pton_calculate_size(size_t srcsize) -{ - return (((((srcsize + 3) / 4) * 3)) + 1); -} -#endif /* !B64_NTOP */ - #ifndef HAVE_SLEEP /* use windows sleep, in millisecs, instead */ #define sleep(x) Sleep((x)*1000) Modified: head/contrib/ldns/ldns/util.h ============================================================================== --- head/contrib/ldns/ldns/util.h Sat Apr 13 22:30:02 2013 (r249452) +++ head/contrib/ldns/ldns/util.h Sat Apr 13 22:44:48 2013 (r249453) @@ -325,7 +325,7 @@ uint16_t ldns_get_random(void); */ char *ldns_bubblebabble(uint8_t *data, size_t len); -#ifndef B32_NTOP +#ifndef HAVE_B32_NTOP int ldns_b32_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize); int b32_ntop(uint8_t const *src, size_t srclength, @@ -343,8 +343,8 @@ INLINE size_t ldns_b32_ntop_calculate_si size_t result = ((((srcsize / 5) * 8) - 2) + 2); return result; } -#endif /* !B32_NTOP */ -#ifndef B32_PTON +#endif /* !HAVE_B32_NTOP */ +#ifndef HAVE_B32_PTON int ldns_b32_pton(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize); int b32_pton(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize); int ldns_b32_pton_extended_hex(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize); @@ -358,7 +358,30 @@ INLINE size_t ldns_b32_pton_calculate_si size_t result = ((((srcsize) / 8) * 5)); return result; } -#endif /* !B32_PTON */ +#endif /* !HAVE_B32_PTON */ +#ifndef HAVE_B64_NTOP +int ldns_b64_ntop(uint8_t const *src, size_t srclength, + char *target, size_t targsize); +/** + * calculates the size needed to store the result of b64_ntop + */ +/*@unused@*/ +static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize) +{ + return ((((srcsize + 2) / 3) * 4) + 1); +} +#endif /* !HAVE_B64_NTOP */ +#ifndef HAVE_B64_PTON +int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize); +/** + * calculates the size needed to store the result of ldns_b64_pton + */ +/*@unused@*/ +static inline size_t ldns_b64_pton_calculate_size(size_t srcsize) +{ + return (((((srcsize + 3) / 4) * 3)) + 1); +} +#endif /* !HAVE_B64_PTON */ INLINE time_t ldns_time(time_t *t) { return time(t); } From owner-svn-src-head@FreeBSD.ORG Sat Apr 13 22:45:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E20E8EAF; Sat, 13 Apr 2013 22:45:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D537616AC; Sat, 13 Apr 2013 22:45:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DMjfRx021196; Sat, 13 Apr 2013 22:45:41 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DMjfhX021195; Sat, 13 Apr 2013 22:45:41 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304132245.r3DMjfhX021195@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 13 Apr 2013 22:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249454 - head/lib/libldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 22:45:42 -0000 Author: des Date: Sat Apr 13 22:45:41 2013 New Revision: 249454 URL: http://svnweb.freebsd.org/changeset/base/249454 Log: Include ldns's b{32,64}_{ntop,pton}(). Modified: head/lib/libldns/Makefile Modified: head/lib/libldns/Makefile ============================================================================== --- head/lib/libldns/Makefile Sat Apr 13 22:44:48 2013 (r249453) +++ head/lib/libldns/Makefile Sat Apr 13 22:45:41 2013 (r249454) @@ -3,7 +3,7 @@ # Vendor sources and generated files LDNSDIR = ${.CURDIR}/../../contrib/ldns -.PATH: ${LDNSDIR} +.PATH: ${LDNSDIR} ${LDNSDIR}/compat LIB = ldns INTERNALLIB = true @@ -40,6 +40,11 @@ SRCS += util.c SRCS += wire2host.c SRCS += zone.c +SRCS += b32_ntop.c +SRCS += b32_pton.c +SRCS += b64_ntop.c +SRCS += b64_pton.c + WARNS ?= 3 .include